????

Your IP : 3.147.52.13


Current Path : C:/Windows/SysWOW64/F12/
Upload File :
Current File : C:/Windows/SysWOW64/F12/F12Script.dll

MZ����@���	�!�L�!This program cannot be run in DOS mode.

$�?P��^>��^>��^>�.?��^>��^?��^>�.:��^>�.6��^>�.>��^>�.���^>�.<��^>�Rich�^>�PELU�d��!�p� 


�pS�q@E�6 0(@8�p�p0�T�0.text� `.data` @�.idata�0
@@.rsrc8�p@�p@@.reloc0�p�p@B� 0�u��U�d�&DDU�d�
HllU�d�$��4���RSDS�X�5��,ws[�F12Script.pdbGCTL�.rdata$brc�.gfids�T.rdata(.rdata$voltmdD�.rdata$zzzdbg��.text$mn�6.edata  .data  @.bss0.idata$50.00cfg 0.idata$240.idata$3H0.idata$4d0�.idata$6@��.rsrc$01�2X�o.rsrc$02 �X�5��,ws[�f�#�v7=��LMU�d���U��}u�u�0�
3�@]������̋�U����e��e��
 V�N�@���t;�uU�E�P�0�E�3E�E��01E��01E��03E��M�3��E��E�P�0�E�3E�M�3�u�Ή
 �щ
 ^����������������������U�d��F12Script.dll��DN�@��0�0�0�0�0d0�H0�00�0�0�0�0�0d0!DisableThreadLibraryCallsXQueryPerformanceCounterGetCurrentProcessId GetCurrentThreadId�GetSystemTimeAsFileTimeGetTickCountKERNEL32.dll���(�@�X�����0^���]�0��]�H�
^�`�N^�x�t^���<_���`_����_����_���db���l� ��_�8�`�P�T`�h�rx���,x����{���|���v|����|���P}���}�(��~�@�4�X���p����������~���h~����y���`z���y���z�0�.{�H��x�`����x� ����v����r����΃���,����΂����� �L��8����P����h�����*����������������������Z������(���@�P��X����p�����z����Ĉ���,��������D���������0�p��H�؍�`�R��x�Ǝ���L��������������Z����Ȑ���� �z��8�֑�P�D��h�t����ƅ�����������������ޓ���@������(����@����X���p������:���������L������������������0�.��H�
��`�z��x������r����.���������������l�� �Ğ�8��x�P�:y�h�
y���py����`����b����^����v����q�� q�(�jq�@��q�X��s�p�t����t���Bv���|s���Dr����r��4s���r�0�w�H��t�`�&u�x��v���Pw����u���`u����w���Tt���u� ��w�8��b�P�Pc�h�c����`����c����c����c���di����i�� j�(�~j�@��j�X�2k�p��k���$d���^d����d����d���e��Te��\f�0��f�H��e�`��e�x��e���$f����f��� g���Vg����g� ��g�  ��g�8 �6h�P ��h�h ��h�� �"i�� �jh�� ��k�� �Bl�� ��`�� ��p�!�Zp�(!�a�@!��^�X!�_�p!��l��!�Fm��!��m��!�@a��!��m��!�ba�"��a�"�n�0"��o�H"�bn�`"��n�x"��n��"�*o��"�to��"��o��"��a��"��a�#��p� #�(b�8#�Hb�P#���h#�,���#����#�:���#�(���#�ޢ��#�j���#����$���($� ��@$�T��X$����p$�l���$�����$����$�����$����$�~��%�t��%�ڭ�0%�@��H%�j��`%�4��x%�Ы��%�����%�4���%����%�����%���&�x�� &���8&�V��P&����h&�&���&�����&����&�����&����&�\���&�Ʋ�'���('�f��@'�ҳ�X'�&��p'�����'����'�$���'�����'�����'�B��(�|��(�ȵ�0(���H(�J��`(����x(�Զ��(����(�T���(�����(�η��(���)�T�� )����8)�ָ�P)���h)�f���)�����)�����)�@���)�����)�ʺ��)���*�@��(*����@*���X*�`��p*����*�����*����*�(���*�b���*����+�޽�+�$��0+�^��H+����`+�о�x+����+�d���+�����+�T���+�����+���,�
�� ,�h��8,����P,���h,�r���,�P���,�����,�,���,�~���,�����,����-����(-�H��@-����X-�\��p-�v���-�����-�����-�����-�����-�У�.���.�Υ�0.���H.�h��`.����x.����.�4���.�Ч��.�����.����.�F��/�f�� /�"��8/�D��P/�b��h/�����/����/�.���/�����/�����/�j���/�0��0����(0����@0���X0�J��p0�z���0�����0�����0�"���0�\���0����1����1����01���H1�J��`1����x1�����1�����1�0���1����1�n���1����2���� 2���82�8��P2�z��h2�����2����2�N���2�����2�2���2�x���2����3�D��(3����@3�x��X3����p3�����3�����3�����3����3�T���3����4����4�D��04����H4����`4�
��x4�����4�����4����4�����4�Z���4����5�6�� 5�j��85����P5����h5����5�F���5�N���5�����5�����5�����5���6�.��(6�X��@6����X6����p6�&���6�0���6�6���6�����6�����6����7����7�@��07����H7����`7�r��x7�����7����7�����7�>���7�^���7�f��8���� 8����88����P8����h8�:���8�H���8�����8�����8����8�<���8�r��9�$��(9�n��@9����X9���p9�Z���9�����9����9�p���9�����9����:����:���0:�P��H:����`:����x:�����:�f���:�����:�L���:����:�t��;���� ;�X��8;����P;����h;����;�����;�����;�����;�*���;�����;�8��<����(<�J��@<����X<�8��p<�����<�����<�(���<�N���<�����<���=����=�$��0=���H=����`=�x��x=�R���=�����=�����=�����=�8���=�j��>���� >�d��8>����P>����h>�,���>�	�>	�>	�>	�>	�>	�>	�>	?	?	(?	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	�H	�H	�H	�H	�H	�H	I	I	(I	8I	HI	XI	hI	xI	�I	�I	�I	�I	�I	�I	�I	�I	J	J	(J	8J	HJ	XJ	hJ	xJ	�J	�J	�J	�J	�J	�J	�J	�J	K	K	(K	8K	HK	XK	hK	xK	�K	�K	�K	�K	�K	�K	�K	�K	L	L	(L	8L	HL	XL	hL	xL	�L	�L	�L	�L	�L	�L	�L	�L	M	M	(M	8M	HM	XM	hM	xM	�M	�M	�M	�M	�M	�M	�M	�M	N	N	(N	8N	HN	XN	hN	xN	�N	�N	�N	�N	�N	�N	�N	�N	O	O	(O	8O	HO	XO	hO	xO	�O	�O	�O	�O	�O	�O	�O	�O	P	P	(P	8P	HP	XP	hP	xP	�P	�P	�P	�P	�P	�P	�P	�P	Q	Q	(Q	8Q	HQ	XQ	hQ	xQ	�Q	�Q	�Q	�Q	�Q	�Q	�Q	�Q	R	R	(R	8R	HR	XR	hR	xR	�R	�R	�R	�R	�R	�R	�R	�R	S	S	(S	8S	HS	XS	hS	xS	�S	�S	�S	�S	�S	�S	�S	�S	T	T	(T	8T	HT	XT	hT	xT	�T	�T	�T	�T	�T	�T	�T	�T	U	U	(U	8U	HU	XU	hU	xU	�U	�U	�U	�U	�U	�U	�U	�U	V	V	(V	8V	HV	XV	hV	xV	�V	�V	�V	�V	�V	�V	�V	�V	W	W	(W	8W	HW	XW	hW	xW	�W	�W	�W	�W	�W	�W	�W	�W	X	X	(X	8X	HX	XX	hX	xX	�X	�X	�X	�X	�X	�X	�X	�X	Y	Y	(Y	8Y	HY	XY	hY	xY	�Y	�Y	�Y	�Y	�Y	�Y	�Y	�Y	Z	Z	(Z	8Z	HZ	XZ	hZ	xZ	�Z	�Z	�Z	�Z	�Z	�Z	�Z	�Z	[	[	([	8[	H[	X[	h[	x[	�[	�[	�[	�[	�[	�[	�[	�[	\	\	(\	8\	H\	X\	h\	x\	�\	�\	�\	�\	�\	�\	�\	�\	]	]	(]	8]	H]	X]	h]	x]	�]	�]	�]p�p��2h�b}H6��>��D�dy���[�0}�2
��$�Qh�
X���(v8x�
 �_0��[����������(����4��I��������E��E�����8����B���	�4���1s8-&�P��&��&8~&d��&�`�&��&�8�X��10&h�&_ȋ&��&���*�Ю*�)��*���*�h�*F�+�0 +�!+7rP�,9��,�p�,���*�
�+�h�,�6��,���,? �,��,S[XK-�PL-�E(�-�(�-&P�-"x�-��P�.� �.���.���.�'��.�x�.;��&J�&���.�x�.�p�.2"�/��/M?�C/z��0��0�0%$(101CSxh8�i8w�y8{8IX�8��8�8ؼ8hE/�M�/��/}Qp�0z0�8�(�8��8z%`�8�H�8�@�8��LǍ@�jX���������E8J�,Р�(���C0��XB8�S�
�d�H~�F%���h��@��"��HI8�7�hz8j�8��p��@zo� �4xa]�v`X���	C��i@��H��(��"��H��ЙzP�&x�4������h�ho�,!7��88�9�?j�I�pJ�`A��D��E��F�K��K�0L�3�%�����]��8���; �!���h��@�}�W5I�TH�+�O�i��!��(��x����
�<
X��A��
X[P�8*.XX�s_hu��ˑ@	
P

v0~��
�Hxb
�H�8�A�<6�;9kPK9/y��<�`�<���<�p�<�p�<`Ц<���<n��<f��;\O�<�qІ<���<A �P�1��P^2��P�H�PPQ 8�Pm��P$��Pa��P`�P���P�pQz�Q�xQe�	Q��Q�Q��
Q:��P�H�P��Q�xQ�PQ��QYHQd�Q/�Q��!Q�X#Q�&Q��OWP�O�"�fH�L�&Q��'Q\-Qpp/Qo�4Q��:Q/=Q��>QAQ  BQ��IQ�HMQ;�SQ�VQ��VQ�WQ4YQ[Q`h\Qh�]Q��cQ�8eQ��hQHjQ�HkQ�mQ��oQ�`lQ�`pQhrQL�sQ��tQ(�uQqXwQ�0yQ��{Q�H~Qo��Q�H�Q1��QAȇQ��Q���Q>��Q<ȡQE�Q�ȣQzH�Q��Q�	-P�Xx�Q�9P�QZ/� R�دQ�`!R5�=R�@RVCR(�<Ŋ�J=rG�aH�h�=�P-F���H�8�E� �E��JH��KH��LH�XMH�0NHHRHL�YHjhUHuP]H!x^H~�TH��E�ȺEe0�EgHEHv�H��2H�UR��dRt��S�	XwRM��SS�S��S1�S���S�(��S�P�p�@�pk��p��p���S	-�T�
�
T3�خT�`�T�H�T�(�T� �T�0�T"��T�X�T��T���TоT���T���Tix�T�h�T�P�Ts��TyH�T��T0X�T�
 �TW8�T:8�T&`�T�x�T3��T0'YZQ�x[	�\�<8�\���]pp�]�`�]�(�]���]z0�]��]u0�]���]���]5��]���]6��]���]/�]��]���]���]lP�]P�X�q��T+T�AU@(PU!@�YL8Y��cSxh`=�p�]Y%�^ZQ0a`FX�b�(�b
0�b���b�h�b~�Va	��b" �b� �b���b��b�@c�c�ȳbb0�bb�c/	c���b�8�b��]b�Xrb�98�b�حb��fC8�fS��f� �f��f���f���fC�f�

cs_xic�'��f�x�c2&��c��H�f`�f�$��jӠ�`g�P�j-��jT�j�j���j��j���jz��l�P�l,��l��l�X�l2��l6��l9�l �lX�j5��jB�jyp�k<h�k�<�k����k���j^P�f)j fgp>��j�"��g�$�j �g��8�l���o
�fo� �o�
�o@(�o�
�pxV�p���p��o�J(ip�9CHOOSER/CHOOSER.CSSCHOOSER/CHOOSER.HTMLCHOOSER/CHOOSER.JSCHOOSER/APP.JSCHOOSER/PROMISE.JSCOMMON/ASSERT.JSCOMMON/MEDIATYPEMANAGER.JSCOMMON/FEATUREAVAILABILITY.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/TARGETENGINEKIND.JSCOMMON/TOOLWINDOW.CSSCOMMON/TRACE.JS
COMMON/URI.JSCOMMON/CONTROLS/CONTROLS.CSSCOMMON/ETWDATACOLLECTOR.JS"COMMON/GRID/GRIDCELLEDITCONTROL.JSCOMMON/GRID/GRIDCONTROL.JSCOMMON/GRID/GRIDCONTROL.CSSCOMMON/IMAGES/ADD_ROW.PNGCOMMON/IMAGES/CHECKMARK.PNGCOMMON/IMAGES/CLOSE.PNGCOMMON/IMAGES/COLUMNMOVE.PNGCOMMON/IMAGES/COMMON_ICONS.PNGCOMMON/IMAGES/CRITICAL.PNGCOMMON/IMAGES/F12LOGO.PNG&COMMON/IMAGES/FORCESTORAGECAPSTATE.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/REFRESHSTATE.PNGCOMMON/IMAGES/RESTORE.PNGCOMMON/IMAGES/TREE_ICONS.PNGCOMMON/IMAGES/TABCLOSE.PNG#COMMON/IMAGES/TOGGLEPRETTYPRINT.PNG COMMON/IMAGES/TOGGLEWORDWRAP.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/CONTROLS/LISTCONTROL/LISTCONTROL.CSS$COMMON/OBJECTVIEW/OBJECTTREEVIEW.CSS*COMMON/OBJECTVIEW/TREEVIEWREMOTEHELPERS.JS&COMMON/OBJECTVIEW/TREEVIEWUTILITIES.JSCOMMON/REMOTE/RPC.JS&COMMON/RESOURCESVIEW/RESOURCESVIEW.CSSCOMMON/SLICKGRID/SLICK.CORE.JS"COMMON/SLICKGRID/SLICK.DATAVIEW.JS!COMMON/SLICKGRID/SLICK.EDITORS.JS$COMMON/SLICKGRID/SLICK.FORMATTERS.JSCOMMON/SLICKGRID/SLICK.GRID.CSSCOMMON/SLICKGRID/SLICK.GRID.JS3COMMON/SLICKGRID/PLUGINS/SLICK.ROWSELECTIONMODEL.JS&COMMON/JQUERY/JQUERY.EVENT.DRAG-2.2.JS!COMMON/JQUERY/JQUERY-2.1.1.MIN.JSCOMMON/TOOLWINDOW.F12.CSS$COMMON/FORMATTER/CSS/CSSFORMATTER.JS'COMMON/FORMATTER/CSS/CSSFORMATWORKER.JS!COMMON/FORMATTER/CSS/CSSPARSER.JS"COMMON/FORMATTER/CSS/CSSEMITTER.JS&COMMON/FORMATTER/HTML/HTMLFORMATTER.JS)COMMON/FORMATTER/HTML/HTMLFORMATWORKER.JS&COMMON/FORMATTER/HTML/HTMLTOKENIZER.JS#COMMON/FORMATTER/HTML/HTMLPARSER.JS$COMMON/FORMATTER/HTML/HTMLEMITTER.JS(COMMON/FORMATTER/FORMATTEDTEXTMAPPING.JSCOMMON/FORMATTER/FORMATTER.JS COMMON/FORMATTER/STATEMACHINE.JS$COMMON/FORMATTER/FORMATTEROPTIONS.JS"COMMON/FORMATTER/IFORMATSERVICE.JSCOMMON/FORMATTER/POSITION.JSCOMMON/FORMATTER/SOURCESPAN.JS'COMMON/FORMATTER/UNMAPPEDTEXTMAPPING.JS)COMMON/FORMATTER/SOURCEMAPPARSERWORKER.JS COMMON/FORMATTER/FORMATWORKER.JS%COMMON/FORMATTER/SOURCEMAPMAPPINGS.JSCOMMON/FORMATTER/BASE64.JS$COMMON/FORMATTER/HTMLSCRIPTFINDER.JS#COMMON/FORMATTER/SOURCEMAPPARSER.JS%COMMON/FORMATTER/SOURCESPANBUILDER.JS#COMMON/FORMATTER/WORKERMESSAGING.JS"COMMON/EDITOR/EDITORDEFINITIONS.JSCOMMON/EDITOR/EDITOR.CSSCOMMON/EDITOR/VS/CSS.JSCOMMON/EDITOR/VS/LOADER.JSCOMMON/EDITOR/VS/NLS.JSCOMMON/EDITOR/VS/NATIVE.JSCOMMON/EDITOR/VS/TEXT.JS*COMMON/EDITOR/VS/BASE/WORKER/WORKERMAIN.JS3COMMON/EDITOR/VS/BASE/WORKER/WORKERMAINPROCESS.HTML9COMMON/EDITOR/VS/BASE/WORKER/WORKERMAINCOMPATIBILITY.HTML,COMMON/EDITOR/VS/BASE/WORKER/WORKERSERVER.JS5COMMON/EDITOR/VS/BASE/WORKER/WORKERSERVER.NLS.KEYS.JS6COMMON/EDITOR/VS/BASE/UI/SCROLLBAR/IMPL/ARROW-DOWN.PNG6COMMON/EDITOR/VS/BASE/UI/SCROLLBAR/IMPL/ARROW-LEFT.PNG7COMMON/EDITOR/VS/BASE/UI/SCROLLBAR/IMPL/ARROW-RIGHT.PNG4COMMON/EDITOR/VS/BASE/UI/SCROLLBAR/IMPL/ARROW-UP.PNG3COMMON/EDITOR/VS/BASE/UI/WIDGETS/CASE-SENSITIVE.SVG*COMMON/EDITOR/VS/BASE/UI/WIDGETS/REGEX.SVG,COMMON/EDITOR/VS/BASE/UI/WIDGETS/WARNING.SVG/COMMON/EDITOR/VS/BASE/UI/WIDGETS/WHOLE-WORD.SVG5COMMON/EDITOR/VS/BASE/UI/WIDGETS/SHELL/MEDIA/HELP.SVG5COMMON/EDITOR/VS/BASE/UI/WIDGETS/SHELL/MEDIA/LOGO.SVG9COMMON/EDITOR/VS/BASE/UI/WIDGETS/SHELL/MEDIA/SETTINGS.SVG5COMMON/EDITOR/VS/BASE/UI/WIDGETS/TOOLBAR/ELLIPSIS.SVG=COMMON/EDITOR/VS/BASE/UI/WIDGETS/TOOLBAR/ELLIPSIS-INVERSE.SVG'COMMON/EDITOR/VS/EDITOR/EDITOR.MAIN.CSS&COMMON/EDITOR/VS/EDITOR/EDITOR.MAIN.JS/COMMON/EDITOR/VS/EDITOR/EDITOR.MAIN.NLS.KEYS.JS;COMMON/EDITOR/VS/EDITOR/CONTRIB/QUICKOPEN/SYMBOL-SPRITE.SVG-COMMON/EDITOR/VS/EDITOR/CSS/DEFAULT-THEME.CSS(COMMON/EDITOR/VS/EDITOR/CSS/VS-THEME.CSS*COMMON/EDITOR/VS/EDITOR/CSS/ARROW-LEFT.PNG+COMMON/EDITOR/VS/EDITOR/CSS/ARROW-RIGHT.PNG.COMMON/EDITOR/VS/EDITOR/CSS/GREEN-SQUIGGLY.SVG,COMMON/EDITOR/VS/EDITOR/CSS/RED-SQUIGGLY.SVG6COMMON/EDITOR/VS/EDITOR/MODES/MONARCH/MONARCHWORKER.JS?COMMON/EDITOR/VS/EDITOR/MODES/MONARCH/MONARCHWORKER.NLS.KEYS.JS(COMMON/EDITOR/VS/LANGUAGES/NULLWORKER.JS1COMMON/EDITOR/VS/LANGUAGES/NULLWORKER.NLS.KEYS.JS4COMMON/EDITOR/VS/EDITOR/WORKER/EDITORWORKERSERVER.JS=COMMON/EDITOR/VS/EDITOR/WORKER/EDITORWORKERSERVER.NLS.KEYS.JS7COMMON/EDITOR/VS/LANGUAGES/COFFEESCRIPT/COFFEESCRIPT.JS@COMMON/EDITOR/VS/LANGUAGES/COFFEESCRIPT/COFFEESCRIPT.NLS.KEYS.JS+COMMON/EDITOR/VS/LANGUAGES/CSHARP/CSHARP.JS4COMMON/EDITOR/VS/LANGUAGES/CSHARP/CSHARP.NLS.KEYS.JS3COMMON/EDITOR/VS/LANGUAGES/CSS/SERVICES/BROWSERS.JS<COMMON/EDITOR/VS/LANGUAGES/CSS/SERVICES/BROWSERS.NLS.KEYS.JS%COMMON/EDITOR/VS/LANGUAGES/CSS/CSS.JS.COMMON/EDITOR/VS/LANGUAGES/CSS/CSS.NLS.KEYS.JS+COMMON/EDITOR/VS/LANGUAGES/CSS/CSSWORKER.JS4COMMON/EDITOR/VS/LANGUAGES/CSS/CSSWORKER.NLS.KEYS.JS3COMMON/EDITOR/VS/LANGUAGES/CSS/MONACOPARTICIPANT.JS<COMMON/EDITOR/VS/LANGUAGES/CSS/MONACOPARTICIPANT.NLS.KEYS.JS'COMMON/EDITOR/VS/LANGUAGES/HTML/HTML.JS0COMMON/EDITOR/VS/LANGUAGES/HTML/HTML.NLS.KEYS.JS-COMMON/EDITOR/VS/LANGUAGES/HTML/HTMLWORKER.JS6COMMON/EDITOR/VS/LANGUAGES/HTML/HTMLWORKER.NLS.KEYS.JS3COMMON/EDITOR/VS/LANGUAGES/JAVASCRIPT/JAVASCRIPT.JS<COMMON/EDITOR/VS/LANGUAGES/JAVASCRIPT/JAVASCRIPT.NLS.KEYS.JS9COMMON/EDITOR/VS/LANGUAGES/JAVASCRIPT/JAVASCRIPTWORKER.JSBCOMMON/EDITOR/VS/LANGUAGES/JAVASCRIPT/JAVASCRIPTWORKER.NLS.KEYS.JS'COMMON/EDITOR/VS/LANGUAGES/JSON/JSON.JS0COMMON/EDITOR/VS/LANGUAGES/JSON/JSON.NLS.KEYS.JS-COMMON/EDITOR/VS/LANGUAGES/JSON/JSONWORKER.JS6COMMON/EDITOR/VS/LANGUAGES/JSON/JSONWORKER.NLS.KEYS.JS'COMMON/EDITOR/VS/LANGUAGES/LESS/LESS.JS0COMMON/EDITOR/VS/LANGUAGES/LESS/LESS.NLS.KEYS.JS-COMMON/EDITOR/VS/LANGUAGES/LESS/LESSWORKER.JS6COMMON/EDITOR/VS/LANGUAGES/LESS/LESSWORKER.NLS.KEYS.JS7COMMON/EDITOR/VS/LANGUAGES/LESS/PARSER/LESS.GRAMMAR.TXT1COMMON/EDITOR/VS/LANGUAGES/PLAINTEXT/PLAINTEXT.JS:COMMON/EDITOR/VS/LANGUAGES/PLAINTEXT/PLAINTEXT.NLS.KEYS.JS'COMMON/EDITOR/VS/LANGUAGES/SASS/SASS.JS0COMMON/EDITOR/VS/LANGUAGES/SASS/SASS.NLS.KEYS.JS-COMMON/EDITOR/VS/LANGUAGES/SASS/SASSWORKER.JS6COMMON/EDITOR/VS/LANGUAGES/SASS/SASSWORKER.NLS.KEYS.JS7COMMON/EDITOR/VS/LANGUAGES/TYPESCRIPT/TYPESCRIPTMODE.JS@COMMON/EDITOR/VS/LANGUAGES/TYPESCRIPT/TYPESCRIPTMODE.NLS.KEYS.JS:COMMON/EDITOR/VS/LANGUAGES/TYPESCRIPT/TYPESCRIPTWORKER2.JSCCOMMON/EDITOR/VS/LANGUAGES/TYPESCRIPT/TYPESCRIPTWORKER2.NLS.KEYS.JSBCOMMON/EDITOR/VS/LANGUAGES/TYPESCRIPT/JS/GLOBALVARIABLEREWRITER.JSKCOMMON/EDITOR/VS/LANGUAGES/TYPESCRIPT/JS/GLOBALVARIABLEREWRITER.NLS.KEYS.JSCCOMMON/EDITOR/VS/LANGUAGES/TYPESCRIPT/JS/IMPORTANDEXPORTREWRITER.JSLCOMMON/EDITOR/VS/LANGUAGES/TYPESCRIPT/JS/IMPORTANDEXPORTREWRITER.NLS.KEYS.JS?COMMON/EDITOR/VS/LANGUAGES/TYPESCRIPT/LIB/TYPESCRIPTSERVICES.JSHCOMMON/EDITOR/VS/LANGUAGES/TYPESCRIPT/LIB/TYPESCRIPTSERVICES.NLS.KEYS.JSICOMMON/EDITOR/VS/LANGUAGES/TYPESCRIPT/PARTICIPANTS/FILENAMESUGGESTIONS.JSRCOMMON/EDITOR/VS/LANGUAGES/TYPESCRIPT/PARTICIPANTS/FILENAMESUGGESTIONS.NLS.KEYS.JSDCOMMON/EDITOR/VS/LANGUAGES/TYPESCRIPT/PARTICIPANTS/NLSPARTICIPANT.JSMCOMMON/EDITOR/VS/LANGUAGES/TYPESCRIPT/PARTICIPANTS/NLSPARTICIPANT.NLS.KEYS.JS@COMMON/EDITOR/VS/LANGUAGES/TYPESCRIPT/PROJECT/PROJECTRESOLVER.JSICOMMON/EDITOR/VS/LANGUAGES/TYPESCRIPT/PROJECT/PROJECTRESOLVER.NLS.KEYS.JS%COMMON/EDITOR/VS/LANGUAGES/XML/XML.JS.COMMON/EDITOR/VS/LANGUAGES/XML/XML.NLS.KEYS.JS+COMMON/EDITOR/VS/LANGUAGES/XML/XMLWORKER.JS4COMMON/EDITOR/VS/LANGUAGES/XML/XMLWORKER.NLS.KEYS.JS)COMMON/EDITOR/VS/LANGUAGES/VSXML/VSXML.JS2COMMON/EDITOR/VS/LANGUAGES/VSXML/VSXML.NLS.KEYS.JSCONSOLE/CONSOLE.CSSCONSOLE/CONSOLE.HTMLCONSOLE/CONSOLEMERGED.JSCONSOLE/MANIFEST.JSONCONSOLE/REMOTE.JSCONSOLE/REMOTEMAIN.JSCONSOLE/REMOTECONSOLEHELPERS.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.JSDOM/DOMTREE/DOMTREE.CSS"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/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.PNG0DEBUGGER/BREAKPOINTS/IMAGES/ADDXHRBREAKPOINT.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/BREAKPOINTS/IMAGES/XHRBREAKPOINT.PNG5DEBUGGER/BREAKPOINTS/IMAGES/XHRBREAKPOINTDISABLED.PNG4DEBUGGER/BREAKPOINTS/IMAGES/XHRBREAKPOINTUNBOUND.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.PNG/DEBUGGER/CURSOR/IMAGES/CURRENTLOCATIONARROW.PNGDEBUGGER/IMAGES/BREAKALL.PNG%DEBUGGER/IMAGES/BREAKONEXCEPTIONS.PNGDEBUGGER/IMAGES/BREAKWORKER.PNG DEBUGGER/IMAGES/CLEARCOOKIES.PNG'DEBUGGER/IMAGES/CLEARSESSIONCOOKIES.PNGDEBUGGER/IMAGES/CONTINUE.PNGDEBUGGER/IMAGES/COOKIES.PNG#DEBUGGER/IMAGES/COPYTOCLIPBOARD.PNGDEBUGGER/IMAGES/CSSFILEICON.PNGDEBUGGER/IMAGES/DIFFICON.PNGDEBUGGER/IMAGES/DIFFTABICON.PNG"DEBUGGER/IMAGES/DISCONNECTICON.PNGDEBUGGER/IMAGES/FILEPICKER.PNG!DEBUGGER/IMAGES/FILESNODEICON.PNG DEBUGGER/IMAGES/FUNCTIONICON.PNG&DEBUGGER/IMAGES/FUNCTIONICONMAPPED.PNG&DEBUGGER/IMAGES/GRIDHEADERHTTPONLY.PNG$DEBUGGER/IMAGES/GRIDHEADERSECURE.PNG DEBUGGER/IMAGES/HTMLFILEICON.PNG#DEBUGGER/IMAGES/LIBRARYCODEICON.PNG DEBUGGER/IMAGES/LOCALSTORAGE.PNGDEBUGGER/IMAGES/MYCODEICON.PNGDEBUGGER/IMAGES/NEXTTAB.PNG$DEBUGGER/IMAGES/NOTAFUNCTIONICON.PNG*DEBUGGER/IMAGES/NOTAFUNCTIONICONMAPPED.PNGDEBUGGER/IMAGES/PREVTAB.PNG#DEBUGGER/IMAGES/PREVIEWTABCLOSE.PNG"DEBUGGER/IMAGES/PREVIEWTABICON.PNG DEBUGGER/IMAGES/REDIRECTICON.PNGDEBUGGER/IMAGES/RETURNVALUE.PNGDEBUGGER/IMAGES/SAVEICON.PNG"DEBUGGER/IMAGES/SCRIPTFILEICON.PNGDEBUGGER/IMAGES/SEARCH.PNG"DEBUGGER/IMAGES/SESSIONSTORAGE.PNGDEBUGGER/IMAGES/STEPINTO.PNGDEBUGGER/IMAGES/STEPOUT.PNGDEBUGGER/IMAGES/STEPOVER.PNG#DEBUGGER/IMAGES/TOGGLESOURCEMAP.PNG%DEBUGGER/IMAGES/TOOLBARMYCODEICON.PNGDEBUGGER/IMAGES/TSFILEICON.PNG(DEBUGGER/LANGUAGESERVICE/FINDRESULTS.CSS/DEBUGGER/LANGUAGESERVICE/IMAGES/FINDRESULTS.PNG0DEBUGGER/LANGUAGESERVICE/IMAGES/CLEARRESULTS.PNG)DEBUGGER/LANGUAGESERVICE/IMAGES/CLOSE.PNG.DEBUGGER/LANGUAGESERVICE/IMAGES/NEXTRESULT.PNG'DEBUGGER/LANGUAGESERVICE/IMAGES/PIN.PNG2DEBUGGER/LANGUAGESERVICE/IMAGES/PREVIOUSRESULT.PNG)DEBUGGER/LANGUAGESERVICE/IMAGES/UNPIN.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/FOREGROUND.PNGHEADER/IMAGES/HELP.PNGHEADER/IMAGES/OVERFLOW.PNGHEADER/IMAGES/MAXIMIZE.PNGHEADER/IMAGES/MINIMIZE.PNGHEADER/IMAGES/RESTORE.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.JSNETWORK/NETWORK.CSSNETWORK/NETWORK.HTMLNETWORK/NETWORKMERGED.JSNETWORK/MANIFEST.JSONNETWORK/REMOTE.JSNETWORK/REMOTEHELPERS.JS#NETWORK/COMMON/EXTERNAL/CONTROLS.JS)NETWORK/COMMON/EXTERNAL/DIAGNOSTICSHUB.JS NETWORK/COMMON/EXTERNAL/GRID.CSS,NETWORK/COMMON/EXTERNAL/JSTREEGRIDCONTROL.JS!NETWORK/COMMON/EXTERNAL/RULER.CSSNETWORK/IMAGES/BADGEERROR.PNG"NETWORK/IMAGES/CUSTOMMARK5_18X.PNGNETWORK/IMAGES/I_APPEVENT.PNGNETWORK/IMAGES/I_USERMARK.PNG)NETWORK/IMAGES/I_CHECKERED_BACKGROUND.PNGNETWORK/IMAGES/I_CLEARCACHE.PNG!NETWORK/IMAGES/I_CLEARCOOKIES.PNG!NETWORK/IMAGES/I_CLEARSESSION.PNG$NETWORK/IMAGES/I_CLEARONNAVIGATE.PNG&NETWORK/IMAGES/I_FILTERING_OPTIONS.PNGNETWORK/IMAGES/I_OPEN.PNG"NETWORK/IMAGES/I_REFRESHSERVER.PNGNETWORK/IMAGES/I_SAVE.PNGNETWORK/IMAGES/I_START.PNGNETWORK/IMAGES/I_STOP.PNG&NETWORK/IMAGES/NETWORKSTATUS-ERROR.PNG#NETWORK/IMAGES/NETWORKSTATUS-OK.PNG(NETWORK/IMAGES/NETWORKSTATUS-WARNING.PNG)PERFTOOLS/COMMON/CONTROLS/GRIDCONTROL.CSS(PERFTOOLS/COMMON/CONTROLS/HUBCONTROLS.JS)PERFTOOLS/COMMON/CONTROLS/MENUCONTROL.CSS PERFTOOLS/COMMON/COMMONMERGED.JS"PERFTOOLS/COMMON/DIAGNOSTICSHUB.JS%PERFTOOLS/COMMON/PERFREMOTEHELPERS.JSPERFTOOLS/COMMON/PLUGIN.CSSPERFTOOLS/COMMON/PLUGIN.JS#PERFTOOLS/COMMON/TOKENEXTRACTOR.CSS%PERFTOOLS/COMMON/IMAGES/CHECKMARK.PNG+PERFTOOLS/COMMON/IMAGES/CUSTOMMARK5_18X.PNG&PERFTOOLS/COMMON/IMAGES/I_APPEVENT.PNG'PERFTOOLS/COMMON/IMAGES/I_SORT_DOWN.PNG%PERFTOOLS/COMMON/IMAGES/I_SORT_UP.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/CONTROLS/MULTILINEGRAPH.CSS&PERFTOOLS/COMMON/CONTROLS/RENDERER.CSS#PERFTOOLS/COMMON/CONTROLS/RULER.CSS'PERFTOOLS/COMMON/CONTROLS/SCROLLBAR.CSS&PERFTOOLS/COMMON/CONTROLS/SWIMLANE.CSSPERFTOOLS/COMMON/COMMON.F12.CSS"PERFTOOLS/COMMON/IMAGES/I_OPEN.PNG"PERFTOOLS/COMMON/IMAGES/I_SAVE.PNG#PERFTOOLS/COMMON/IMAGES/I_START.PNG"PERFTOOLS/COMMON/IMAGES/I_STOP.PNGPERFTOOLS/MEMORY/MANIFEST.JSON#PERFTOOLS/MEMORY/MEMORYANALYZER.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/MEMORY/MEMORYANALYZER.F12.CSS&PERFTOOLS/VISUALPROFILER/MANIFEST.JSON/PERFTOOLS/VISUALPROFILER/DATACATEGORYSTYLES.CSS+PERFTOOLS/VISUALPROFILER/VISUALPROFILER.CSS,PERFTOOLS/VISUALPROFILER/VISUALPROFILER.HTML0PERFTOOLS/VISUALPROFILER/VISUALPROFILERMERGED.JS.PERFTOOLS/VISUALPROFILER/VISUALPROFILER.VS.CSS0PERFTOOLS/VISUALPROFILER/JS/CONTROLS/DIVIDER.CSS9PERFTOOLS/VISUALPROFILER/JS/HUBGRAPHS/STACKEDBARCHART.CSS2PERFTOOLS/VISUALPROFILER/IMAGES/I_CHARTZOOM_IN.PNG;PERFTOOLS/VISUALPROFILER/IMAGES/I_CHARTZOOM_IN_DISABLED.PNG5PERFTOOLS/VISUALPROFILER/IMAGES/I_CHARTZOOM_RESET.PNG>PERFTOOLS/VISUALPROFILER/IMAGES/I_CHARTZOOM_RESET_DISABLED.PNG:PERFTOOLS/VISUALPROFILER/IMAGES/I_CHARTSELECTION_CLEAR.PNGCPERFTOOLS/VISUALPROFILER/IMAGES/I_CHARTSELECTION_CLEAR_DISABLED.PNG:PERFTOOLS/VISUALPROFILER/IMAGES/I_CHECKERED_BACKGROUND.PNG7PERFTOOLS/VISUALPROFILER/IMAGES/I_FILTERING_OPTIONS.PNG4PERFTOOLS/VISUALPROFILER/IMAGES/I_FRAME_GROUPING.PNG/PERFTOOLS/VISUALPROFILER/VISUALPROFILER.F12.CSS*PERFTOOLS/VISUALPROFILER/CPUUSAGEMERGED.JS9PERFTOOLS/VISUALPROFILER/JS/CPUUSAGE/CPUUSAGETREEGRID.CSS>PERFTOOLS/VISUALPROFILER/JS/CPUUSAGE/MESSAGEOVERLAYCONTROL.CSS-PERFTOOLS/VISUALPROFILER/JS/CPUUSAGE/GRID.CSS9PERFTOOLS/VISUALPROFILER/JS/CPUUSAGE/JSTREEGRIDCONTROL.JS>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.PNGPLUGINHOST/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.PNG PLUGINHOST/THEME/I_ALERTINFO.PNGEXPERIMENTS/EXPERIMENTS.CSSEXPERIMENTS/EXPERIMENTS.HTML EXPERIMENTS/EXPERIMENTSMERGED.JSEXPERIMENTS/MANIFEST.JSONMUIh4VS_VERSION_INFO��|O|O?�StringFileInfo�040904B0LCompanyNameMicrosoft CorporationPFileDescriptionF12 Developer Toolsj%FileVersion11.00.20348.1 (WinBuild.160101.0800)<InternalNameF12Script.dll�.LegalCopyright� Microsoft Corporation. All rights reserved.DOriginalFilenameF12Script.dllDProductNameInternet Explorer@ProductVersion11.00.20348.1DVarFileInfo$Translation	�html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    border: 1px solid #000000;
    box-sizing: border-box;
}

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: 90%;
    border: 1px solid #000000;
    border-top: 4px solid #000000;
    box-sizing: border-box;
    display: -ms-grid;
    -ms-grid-columns: 52px 1fr 28px 28px;
    -ms-grid-rows: 32px auto auto 1fr;
}

#microsoftEdgeChooserLink {
    width: 100%;
    bottom: 20px;
    font-size: 14px;
    margin: 10px 10px;
}

.headerImg {
    font-family: 'Segoe UI Symbol';
    font-size: 18px;
    cursor: pointer;
    height: 26px;
    padding-top: 4px;
    padding-left: 2px;
    padding-right: 2px;
}

    .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 {
    -ms-grid-column: 3;
    -ms-grid-row: 1;
}

#closeCmd {
    -ms-grid-column: 4;
    -ms-grid-row: 1;
    font-size: 22px;
}

#targets {
    -ms-grid-column: 1;
    -ms-grid-column-span: 4;
    -ms-grid-row: 4;
    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;
}
<!-- saved from url=(0016)http://localhost -->
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=11" />
    <meta charset="utf-8" />
    <meta http-equiv="Content-Type" content="text/html">
    <meta http-equiv="format-detection" content="telephone=no">
    <title>F12 Chooser</title>
    <script>
        // Create an empty Microsoft object so that promise.js will work correctly
        var Microsoft = { Plugin: { Utilities: {} } };
    </script>
    <script type="text/javascript" src="promise.js"></script>
    <script type="text/javascript" src="../Common/isDebugBuild.js"></script>
    <script type="text/javascript" src="../Common/CommonMinimal.js"></script>
    <script type="text/javascript" src="chooser.js"></script>
    <script type="text/javascript" src="app.js"></script>

    <link rel="stylesheet" type="text/css" href="chooser.css" />
    <script type="text/javascript">
        document.addEventListener("DOMContentLoaded", function () {
            F12.Tools.Chooser.app.main();
        });
    </script>
</head>

<body>
    <div id="grid">
        <div id="f12Logo"></div>
        <div id="headerTitle"></div>
        <div id="refreshCmd" role="button" tabindex="1" class="headerImg"></div>
        <div id="closeCmd" role="button" tabindex="1" class="headerImg"></div>
        <div id="targets"></div>
    </div>
    <div id="microsoftEdgeChooserLink"></div>
</body>

</html>var F12;(function(F12){var Tools;(function(Tools){var Chooser;(function(Chooser_1){"use strict";var ChooserResource;(function(ChooserResource){ChooserResource[ChooserResource["SelectTargetToDebug"]=432]="SelectTargetToDebug";ChooserResource[ChooserResource["RefreshTarget"]=433]="RefreshTarget";ChooserResource[ChooserResource["Close"]=434]="Close";ChooserResource[ChooserResource["ClickToKnowAboutEdgeChooser"]=435]="ClickToKnowAboutEdgeChooser"})(ChooserResource||(ChooserResource={}));var Chooser=function(){function Chooser(){var _this=this;this._pluginAPI=window.external;this._ieRootPath=this._pluginAPI.getIERootPath();if(!/\\$/.test(this._ieRootPath)){this._ieRootPath+="\\"}this._ieRootUrl=encodeURI(this._ieRootPath);this._hasUserUpdatedUrl=false;this._closeButton=document.getElementById("closeCmd");this._refreshButton=document.getElementById("refreshCmd");this._microsoftEdgeChooserLink=document.getElementById("microsoftEdgeChooserLink");var edgeLink=document.createElement("a");var linkTextNode=document.createTextNode(this._pluginAPI.getResourceString(ChooserResource.ClickToKnowAboutEdgeChooser));edgeLink.appendChild(linkTextNode);edgeLink.setAttribute("id","edgeLink");edgeLink.setAttribute("class","signature");edgeLink.setAttribute("href","javascript:F12.Tools.Chooser.Chooser.prototype.navigateToF12ChooserUrl()");this._microsoftEdgeChooserLink.appendChild(edgeLink);document.getElementById("headerTitle").innerText=this._pluginAPI.getResourceString(ChooserResource.SelectTargetToDebug);this._closeButton.innerText=String.fromCharCode(57569);this._closeButton.setAttribute("title",this._pluginAPI.getResourceString(ChooserResource.Close));this._closeButton.setAttribute("aria-label",this._pluginAPI.getResourceString(ChooserResource.Close));this._closeButton.addEventListener("click",function(){_this._pluginAPI.cancel()});this._closeButton.addEventListener("keydown",function(e){if(e.keyCode===Common.KeyCodes.Enter||e.keyCode===Common.KeyCodes.Space){_this._pluginAPI.cancel()}});this._refreshButton.innerText=String.fromCharCode(57586);this._refreshButton.setAttribute("title",this._pluginAPI.getResourceString(ChooserResource.RefreshTarget));this._refreshButton.setAttribute("aria-label",this._pluginAPI.getResourceString(ChooserResource.RefreshTarget));this._refreshButton.addEventListener("click",function(){_this.loadInstances()});this._refreshButton.addEventListener("keydown",function(e){if(e.keyCode===Common.KeyCodes.Enter||e.keyCode===Common.KeyCodes.Space){_this.loadInstances()}});document.addEventListener("keydown",function(e){if(e.keyCode===Common.KeyCodes.F5){_this.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){_this.animateTitleStart(title);window.setTimeout(function(){if(title){_this.animateTitleEnd(title)}},2600)}}},3e3)}Chooser.prototype.checkLaunchParameters=function(){this.loadInstances()};Chooser.prototype.navigateToF12ChooserUrl=function(){var xhr=new XMLHttpRequest;var linkUrl="http://aka.ms/f12chooser-external";xhr.open("GET","http://hrweb/Pages/default.aspx",false);try{xhr.send();if(xhr.status=="200"){linkUrl="http://aka.ms/f12chooser-internal"}}catch(e){}window.external.openBrowser(linkUrl)};Chooser.prototype.loadInstances=function(){var _this=this;this.removeAllTargets();var instancesArray=this._pluginAPI.getWebInstances();instancesArray.forEach(function(instance,index){instance.index=index;instance.url=Chooser.urlForInstance(instance)});instancesArray.sort(function(a,b){var urlA=_this.createShortenedUrlText(Chooser.urlForInstance(a));var urlB=_this.createShortenedUrlText(Chooser.urlForInstance(b));return urlA===urlB?0:urlA<urlB?-1:1});instancesArray.forEach(function(instance){var url=instance.url;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;_this.addTarget(instance.index,url,title,image,processExeName,packageName,pid)})};Chooser.prototype.jsonRpcNotificationReceive=function(event,params){switch(event){case"onResult":Tools.Utility.Assert.areEqual(4,params.length);this.onResult(params[0],params[1],params[2],params[3]);break;default:Tools.Utility.Assert.fail("Unknown event '"+event+"'")}};Chooser.urlForInstance=function(instance){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"}}return url};Chooser.prototype.animateTitleStart=function(titleNode){titleNode.style.height="60px";titleNode.style.whiteSpace="normal"};Chooser.prototype.animateTitleEnd=function(titleNode){titleNode.style.height="20px";titleNode.style.whiteSpace="nowrap"};Chooser.prototype.addTarget=function(index,url,title,screenshot,processExeName,packageName,pid){var _this=this;if(!title){title=this.createShortenedUrlText(url)}if(screenshot){screenshot="data:image/png;base64,"+screenshot}if(!processExeName){processExeName="unknown"}var processId=""+pid;if(pid===null||isNaN(pid)){processId="unknown"}if(isDebugBuild){title+=" ("+processExeName.replace(/\.exe$/i,"")+": "+processId+")"}var attachToTarget=function(){_this.selectTarget(index)};var targetEl=document.createElement("div");targetEl.className="target";targetEl.addEventListener("click",function(e){attachToTarget()});targetEl.addEventListener("mouseover",function(e){var element=e.currentTarget;var nodeList=element.querySelectorAll(".title");if(nodeList&&nodeList[0]){_this.animateTitleStart(nodeList[0])}});targetEl.addEventListener("mouseout",function(e){var element=e.currentTarget;var nodeList=element.querySelectorAll(".title");if(nodeList&&nodeList[0]){_this.animateTitleEnd(nodeList[0])}});targetEl.addEventListener("keydown",function(e){if(e.keyCode===Common.KeyCodes.Enter||e.keyCode===Common.KeyCodes.Space){attachToTarget()}});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));titleEl.setAttribute("title",title);targetEl.setAttribute("role","button");targetEl.setAttribute("aria-label",title);targetEl.tabIndex=1;targetEl.appendChild(imgEl);targetEl.appendChild(titleEl);var targetsEl=document.getElementById("targets");targetsEl.appendChild(targetEl)};Chooser.prototype.removeAllTargets=function(){var targetsEl=document.getElementById("targets");targetsEl.innerHTML=""};Chooser.prototype.selectTarget=function(index){this._pluginAPI.selectInstanceByIndex(index,false)};Chooser.prototype.createShortenedUrlText=function(url){var shortenedText=url;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(index!==-1&&index===shortenedText.length-1){shortenedText=shortenedText.substring(0,shortenedText.length-1);index=shortenedText.lastIndexOf("/")}if(index>-1){shortenedText=shortenedText.substring(index+1)}return shortenedText};return Chooser}();Chooser_1.Chooser=Chooser})(Chooser=Tools.Chooser||(Tools.Chooser={}))})(Tools=F12.Tools||(F12.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
var F12;(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function t(){}return t.prototype.main=function(){var t=new n.Chooser;t.checkLaunchParameters()},t}();n.ChooserApp=t;n.app=new t})(t=n.Chooser||(n.Chooser={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}))
//# sourceMappingURL=app.min.js.map
(function(n,t){"use strict";function i(n,i,r){for(var h=Object.keys(i),f,o=0,c=h.length;o<c;o++){var e=h[o],s=e.charCodeAt(0)!==95,u=i[e];if(u&&typeof u=="object"&&(u.value!==t||typeof u.get=="function"||typeof u.set=="function")){u.enumerable===t&&(u.enumerable=s);r&&u.setName&&typeof u.setName=="function"&&u.setName(r+"."+e);f=f||{};f[e]=u;continue}if(!s){f=f||{};f[e]={value:u,enumerable:s,configurable:!0,writable:!0};continue}n[e]=u}f&&Object.defineProperties(n,f)}Debug=Debug||{};Debug.msTraceAsyncOperationStarting||(Debug.msTraceAsyncOperationStarting=function(){return 0});Debug.msTraceAsyncOperationCompleted||(Debug.msTraceAsyncOperationCompleted=function(){});Debug.msTraceAsyncCallbackStarting||(Debug.msTraceAsyncCallbackStarting=function(){});Debug.msTraceAsyncCallbackCompleted||(Debug.msTraceAsyncCallbackCompleted=function(){});typeof Debug.MS_ASYNC_CALLBACK_STATUS_ASSIGN_DELEGATE=="undefined"&&(Debug.MS_ASYNC_CALLBACK_STATUS_ASSIGN_DELEGATE=0);typeof Debug.MS_ASYNC_CALLBACK_STATUS_CANCEL=="undefined"&&(Debug.MS_ASYNC_CALLBACK_STATUS_CANCEL=3);typeof Debug.MS_ASYNC_CALLBACK_STATUS_CHOOSEANY=="undefined"&&(Debug.MS_ASYNC_CALLBACK_STATUS_CHOOSEANY=2);typeof Debug.MS_ASYNC_CALLBACK_STATUS_ERROR=="undefined"&&(Debug.MS_ASYNC_CALLBACK_STATUS_ERROR=4);typeof Debug.MS_ASYNC_CALLBACK_STATUS_JOIN=="undefined"&&(Debug.MS_ASYNC_CALLBACK_STATUS_JOIN=1);typeof Debug.MS_ASYNC_OP_STATUS_CANCELED=="undefined"&&(Debug.MS_ASYNC_OP_STATUS_CANCELED=2);typeof Debug.MS_ASYNC_OP_STATUS_ERROR=="undefined"&&(Debug.MS_ASYNC_OP_STATUS_ERROR=3);typeof Debug.MS_ASYNC_OP_STATUS_SUCCESS=="undefined"&&(Debug.MS_ASYNC_OP_STATUS_SUCCESS=1);typeof Debug.debuggerEnabled=="undefined"&&(Debug.debuggerEnabled=!1),function(t){function f(n,t,r){var u=n||{},o,f,s,e;if(t)for(o=t.split("."),f=0,s=o.length;f<s;f++)e=o[f],u[e]||Object.defineProperty(u,e,{value:{},writable:!1,enumerable:!0,configurable:!0}),u=u[e];return r&&i(u,r,t||"<ANONYMOUS>"),u}function e(t,i){return f(n,t,i)}function o(n){var f,u,t,i;return typeof n=="string"&&(f=n,n=function(){return PluginUtilities.Utilities.getMember(f)}),t=r.uninitialized,{setName:function(n){u=n},get:function(){switch(t){case r.initialized:return i;case r.uninitialized:t=r.working;try{msWriteProfilerMark("PluginUtilities.Namespace._lazy:"+u+",StartTM");i=n()}finally{msWriteProfilerMark("PluginUtilities.Namespace._lazy:"+u+",StopTM");t=r.uninitialized}return n=null,t=r.initialized,i;case r.working:throw"Illegal: reentrancy on initialization";default:throw"Illegal"}},set:function(n){switch(t){case r.working:throw"Illegal: reentrancy on initialization";default:t=r.initialized;i=n}},enumerable:!0,configurable:!0}}var u,r;n[t]||(n[t]=Object.create(Object.prototype));u=n[t];u.Namespace||(u.Namespace=Object.create(Object.prototype));r={uninitialized:1,working:2,initialized:3};Object.defineProperties(u.Namespace,{defineWithParent:{value:f,writable:!0,enumerable:!0,configurable:!0},define:{value:e,writable:!0,enumerable:!0,configurable:!0},_lazy:{value:o,writable:!0,enumerable:!0,configurable:!0}})}("PluginUtilities"),function(n){function t(t,r,u){return t=t||function(){},n.Utilities.markSupportedForProcessing(t),r&&i(t.prototype,r),u&&i(t,u),t}function r(r,u,f,e){if(r){u=u||function(){};var o=r.prototype;return u.prototype=Object.create(o),n.Utilities.markSupportedForProcessing(u),Object.defineProperty(u.prototype,"constructor",{value:u,writable:!0,configurable:!0,enumerable:!0}),f&&i(u.prototype,f),e&&i(u,e),u}return t(u,f,e)}function u(n){n=n||function(){};for(var t=1,r=arguments.length;t<r;t++)i(n.prototype,arguments[t]);return n}n.Namespace.define("PluginUtilities.Class",{define:t,derive:r,mix:u})}(PluginUtilities)})(this),function(n,t){"use strict";function f(n){return n}function r(n,t,i){return n.split(".").reduce(function(n,t){return n?i(n[t]):null},t)}var i=!!n.Windows,u={get notSupportedForProcessing(){return t.Resources._getPluginUtilitiesString("base/notSupportedForProcessing").value}};t.Namespace.define("PluginUtilities.Utilities",{_setHasWinRT:{value:function(n){i=n},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||n,f):null},ready:function(i,r){return new t.Promise(function(u,f){function e(){if(i)try{i();u()}catch(n){f(n)}else u()}var o=t.Utilities.testReadyState;o||(o=n.document?document.readyState:"complete");o==="complete"||n.document&&document.body!==null?r?t.Utilities.Scheduler.schedule(function(){e()},t.Utilities.Scheduler.Priority.normal,null,"PluginUtilities.Utilities.ready"):e():n.addEventListener("DOMContentLoaded",e,!1)})},strictProcessing:{get:function(){return!0},configurable:!1,enumerable:!0},markSupportedForProcessing:{value:function(n){return n.supportedForProcessing=!0,n},configurable:!1,writable:!1,enumerable:!0},requireSupportedForProcessing:{value:function(i){var r=!0,f,e;r=r&&!(i===n);r=r&&!(i===n.location);r=r&&!(i instanceof HTMLIFrameElement);r=r&&!(typeof i=="function"&&!i.supportedForProcessing);switch(n.frames.length){case 0:break;case 1:r=r&&!(i===n.frames[0]);break;default:for(f=0,e=n.frames.length;r&&f<e;f++)r=r&&!(i===n.frames[f])}if(r)return i;throw new t.ErrorFromName("PluginUtilities.Utilities.requireSupportedForProcessing",t.Resources._formatString(u.notSupportedForProcessing,i))},configurable:!1,writable:!1,enumerable:!0},_shallowCopy:function(n){return this._mergeAll([n])},_merge:function(n,t){return this._mergeAll([n,t])},_mergeAll:function(n){var t={};return n.forEach(function(n){Object.keys(n).forEach(function(i){t[i]=n[i]})}),t},_getProfilerMarkIdentifier:function(n){var t="";return n.id&&(t+=" id='"+n.id+"'"),n.className&&(t+=" class='"+n.className+"'"),t}});t.Namespace.define("PluginUtilities",{validation:!1,strictProcessing:{value:function(){},configurable:!1,writable:!1,enumerable:!1}})}(this,PluginUtilities),function(){"use strict";function r(t,r,u){var f=t;return typeof f=="function"&&(f=f()),(u&&i.test(u)?"":u?u+": ":"")+(r?r.replace(n,":")+": ":"")+f}function u(n,t,r){var u=PluginUtilities.Utilities.formatLog(n,t,r);console[r&&i.test(r)?r:"log"](u)}function t(n){return n.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&")}var n=/\s+/g,i=/^(error|warn|info|log)$/;PluginUtilities.Namespace.define("PluginUtilities.Utilities",{startLog:function(i){var r;i=i||{};typeof i=="string"&&(i={tags:i});var f=i.type&&new RegExp("^("+t(i.type).replace(n," ").split(" ").join("|")+")$"),e=i.excludeTags&&new RegExp("(^|\\s)("+t(i.excludeTags).replace(n," ").split(" ").join("|")+")(\\s|$)","i"),o=i.tags&&new RegExp("(^|\\s)("+t(i.tags).replace(n," ").split(" ").join("|")+")(\\s|$)","i"),s=i.action||u;if(!f&&!e&&!o&&!PluginUtilities.log){PluginUtilities.log=s;return}r=function(n,t,i){f&&!f.test(i)||e&&e.test(t)||o&&!o.test(t)||s(n,t,i);r.next&&r.next(n,t,i)};r.next=PluginUtilities.log;PluginUtilities.log=r},stopLog:function(){delete PluginUtilities.log},formatLog:r})}(),function(n){"use strict";function t(n){var t="_on"+n+"state";return{get:function(){var n=this[t];return n&&n.userHandler},set:function(i){var r=this[t];i?(r||(r={wrapper:function(n){return r.userHandler(n)},userHandler:i},Object.defineProperty(this,t,{value:r,enumerable:!1,writable:!0,configurable:!0}),this.addEventListener(n,r.wrapper,!1)),r.userHandler=i):r&&(this.removeEventListener(n,r.wrapper,!1),this[t]=null)},enumerable:!0}}function i(){for(var i,r={},n=0,u=arguments.length;n<u;n++)i=arguments[n],r["on"+i]=t(i);return r}var r=n.Class.define(function(n,t,i){this.detail=t;this.target=i;this.timeStamp=Date.now();this.type=n},{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}),u={_listeners:null,addEventListener:function(n,t,i){var r,u,e,f;for(i=i||!1,this._listeners=this._listeners||{},r=this._listeners[n]=this._listeners[n]||[],u=0,e=r.length;u<e;u++)if(f=r[u],f.useCapture===i&&f.listener===t)return;r.push({listener:t,useCapture:i})},dispatchEvent:function(n,t){var i=this._listeners&&this._listeners[n],u,f,e;if(i){for(u=new r(n,t,this),i=i.slice(0,i.length),f=0,e=i.length;f<e&&!u._stopImmediatePropagationCalled;f++)i[f].listener(u);return u.defaultPrevented||!1}return!1},removeEventListener:function(n,t,i){var r,u,e,f;if(i=i||!1,r=this._listeners&&this._listeners[n],r)for(u=0,e=r.length;u<e;u++)if(f=r[u],f.listener===t&&f.useCapture===i){r.splice(u,1);r.length===0&&delete this._listeners[n];break}}};n.Namespace.define("PluginUtilities.Utilities",{_createEventProperty:t,createEventProperties:i,eventMixin:u})}(PluginUtilities),function(n,t){"use strict";function i(){}function w(n,t){var i;i=t&&typeof t=="object"&&typeof t.then=="function"?l:pt;n._value=t;n._setState(i)}function b(n,t,i,r,u,f){return{exception:n,error:t,promise:i,handler:f,id:r,parent:u}}function k(n,t,i,r){var u=i._isException,f=i._errorId;return b(u?t:null,u?null:t,n,f,i,r)}function wt(n,t,i){var r=i._isException,u=i._errorId;return ht(n,u,r),b(r?t:null,r?null:t,n,u,i)}function bt(n,t){var i=++ft;return ht(n,i),b(null,t,n,i)}function kt(n,t){var i=++ft;return ht(n,i,!0),b(t,null,n,i)}function d(n,t,i,r){var u=Debug.msTraceAsyncOperationStarting("PluginUtilities.Promise.done");st(n,{c:t,e:i,p:r,asyncOpID:u})}function g(n,t,i,r){n._value=t;o(n,t,i,r);n._setState(ot)}function dt(n,t){var h=n._value,r=n._listeners,u,o;if(r)for(n._listeners=null,u=0,o=Array.isArray(r)?r.length:1;u<o;u++){var f=o===1?r:r[u],s=f.c,i=f.promise;if(Debug.msTraceAsyncOperationCompleted(f.asyncOpID,Debug.MS_ASYNC_OP_STATUS_SUCCESS),i){Debug.msTraceAsyncCallbackStarting(f.asyncOpID);try{i._setCompleteValue(s?s(h):h)}catch(c){i._setExceptionValue(c)}finally{Debug.msTraceAsyncCallbackCompleted()}i._state!==l&&i._listeners&&t.push(i)}else e.prototype.done.call(n,s)}}function gt(n,t){var r=n._value,u=n._listeners,e,a,v;if(u)for(n._listeners=null,e=0,a=Array.isArray(u)?u.length:1;e<a;e++){var h=a===1?u:u[e],f=h.e,i=h.promise,y=r&&r.name===c?Debug.MS_ASYNC_OP_STATUS_CANCELED:Debug.MS_ASYNC_OP_STATUS_ERROR;if(Debug.msTraceAsyncOperationCompleted(h.asyncOpID,y),i){v=!1;try{f?(Debug.msTraceAsyncCallbackStarting(h.asyncOpID),v=!0,f.handlesOnError||o(i,r,k,n,f),i._setCompleteValue(f(r))):i._setChainedErrorValue(r,n)}catch(p){i._setExceptionValue(p)}finally{v&&Debug.msTraceAsyncCallbackCompleted()}i._state!==l&&i._listeners&&t.push(i)}else s.prototype.done.call(n,null,f)}}function o(n,t,i,r,u){if(h._listeners[ut]){if(t instanceof Error&&t.message===c)return;h.dispatchEvent(ut,i(n,t,r,u))}}function nt(n,t){var r=n._listeners,u,f,i,e;if(r)for(u=0,f=Array.isArray(r)?r.length:1;u<f;u++){if(i=f===1?r:r[u],e=i.p,e)try{e(t)}catch(o){}i.c||i.e||!i.promise||i.promise._progress(t)}}function st(n,t){var i=n._listeners;i?(i=Array.isArray(i)?i:[i],i.push(t)):i=t;n._listeners=i}function ht(n,t,i){n._isException=i||!1;n._errorId=t}function tt(n,t,i,r){n._value=t;o(n,t,i,r);n._setState(y)}function it(n,t){var i;i=t&&typeof t=="object"&&typeof t.then=="function"?l:v;n._value=t;n._setState(i)}function rt(n,t,i,r){var u=new ct(n),f=Debug.msTraceAsyncOperationStarting("PluginUtilities.Promise.then");return st(n,{promise:u,c:t,e:i,p:r,asyncOpID:f}),u}function ui(n){var t;return new PluginUtilities.Promise(function(i){n?t=setTimeout(i,n):setImmediate(i)},function(){t&&clearTimeout(t)})}function fi(n,t){var r=function(){t.cancel()},i=function(){n.cancel()};return n.then(r),t.then(i,i),t}var lt,h,ft,a,at,l,vt,yt,et,pt,v,ot,y,p,ti,u,ii,ri;n.Debug&&(n.Debug.setNonUserCodeExceptions=!0);lt=PluginUtilities.Class.mix(PluginUtilities.Class.define(null,{},{supportedForProcessing:!1}),PluginUtilities.Utilities.eventMixin);h=new lt;h._listeners={};var ut="error",c="Canceled",r=!1,f={promise:1,thenPromise:2,errorPromise:4,exceptionPromise:8,completePromise:16};f.all=f.promise|f.thenPromise|f.errorPromise|f.exceptionPromise|f.completePromise;ft=1;a={name:"created",enter:function(n){n._setState(at)},cancel:i,done:i,then:i,_completed:i,_error:i,_notify:i,_progress:i,_setCompleteValue:i,_setErrorValue:i};at={name:"working",enter:i,cancel:function(n){n._setState(yt)},done:d,then:rt,_completed:w,_error:g,_notify:i,_progress:nt,_setCompleteValue:it,_setErrorValue:tt};l={name:"waiting",enter:function(n){var t=n._value,i;t instanceof ct&&t._state!==y&&t._state!==v?st(t,{promise:n}):(i=function(r){t._errorId?n._chainedError(r,t):(o(n,r,k,t,i),n._error(r))},i.handlesOnError=!0,t.then(n._completed.bind(n),i,n._progress.bind(n)))},cancel:function(n){n._setState(vt)},done:d,then:rt,_completed:w,_error:g,_notify:i,_progress:nt,_setCompleteValue:it,_setErrorValue:tt};vt={name:"waiting_canceled",enter:function(n){n._setState(et);var t=n._value;t.cancel&&t.cancel()},cancel:i,done:d,then:rt,_completed:w,_error:g,_notify:i,_progress:nt,_setCompleteValue:it,_setErrorValue:tt};yt={name:"canceled",enter:function(n){n._setState(et);n._cancelAction()},cancel:i,done:d,then:rt,_completed:w,_error:g,_notify:i,_progress:nt,_setCompleteValue:it,_setErrorValue:tt};et={name:"canceling",enter:function(n){var t=new Error(c);t.name=t.message;n._value=t;n._setState(ot)},cancel:i,done:i,then:i,_completed:i,_error:i,_notify:i,_progress:i,_setCompleteValue:i,_setErrorValue:i};pt={name:"complete_notify",enter:function(n){if(n.done=e.prototype.done,n.then=e.prototype.then,n._listeners)for(var t=[n],i;t.length;)i=t.shift(),i._state._notify(i,t);n._setState(v)},cancel:i,done:null,then:null,_completed:i,_error:i,_notify:dt,_progress:i,_setCompleteValue:i,_setErrorValue:i};v={name:"success",enter:function(n){n.done=e.prototype.done;n.then=e.prototype.then;n._cleanupAction()},cancel:i,done:null,then:null,_completed:i,_error:i,_notify:dt,_progress:i,_setCompleteValue:i,_setErrorValue:i};ot={name:"error_notify",enter:function(n){if(n.done=s.prototype.done,n.then=s.prototype.then,n._listeners)for(var t=[n],i;t.length;)i=t.shift(),i._state._notify(i,t);n._setState(y)},cancel:i,done:null,then:null,_completed:i,_error:i,_notify:gt,_progress:i,_setCompleteValue:i,_setErrorValue:i};y={name:"error",enter:function(n){n.done=s.prototype.done;n.then=s.prototype.then;n._cleanupAction()},cancel:i,done:null,then:null,_completed:i,_error:i,_notify:gt,_progress:i,_setCompleteValue:i,_setErrorValue:i};p=PluginUtilities.Class.define(null,{_listeners:null,_nextState:null,_state:null,_value:null,cancel:function(){this._state.cancel(this);this._run()},done:function(n,t,i){this._state.done(this,n,t,i)},then:function(n,t,i){return this._state.then(this,n,t,i)},_chainedError:function(n,t){var i=this._state._error(this,n,wt,t);return this._run(),i},_completed:function(n){var t=this._state._completed(this,n);return this._run(),t},_error:function(n){var t=this._state._error(this,n,bt);return this._run(),t},_progress:function(n){this._state._progress(this,n)},_setState:function(n){this._nextState=n},_setCompleteValue:function(n){this._state._setCompleteValue(this,n);this._run()},_setChainedErrorValue:function(n,t){var i=this._state._setErrorValue(this,n,wt,t);return this._run(),i},_setExceptionValue:function(n){var t=this._state._setErrorValue(this,n,kt);return this._run(),t},_run:function(){while(this._nextState)this._state=this._nextState,this._nextState=null,this._state.enter(this)}},{supportedForProcessing:!1});var ct=PluginUtilities.Class.derive(p,function(n){r&&(r===!0||r&f.thenPromise)&&(this._stack=PluginUtilities.Promise._getStack());this._creator=n;this._setState(a);this._run()},{_creator:null,_cancelAction:function(){this._creator&&this._creator.cancel()},_cleanupAction:function(){this._creator=null}},{supportedForProcessing:!1}),s=PluginUtilities.Class.define(function(n){r&&(r===!0||r&f.errorPromise)&&(this._stack=PluginUtilities.Promise._getStack());this._value=n;o(this,n,bt)},{cancel:function(){},done:function(n,t){var i=this._value,r;if(t)try{t.handlesOnError||o(null,i,k,this,t);r=t(i);r&&typeof r=="object"&&typeof r.done=="function"&&r.done();return}catch(u){i=u}i instanceof Error&&i.message===c||PluginUtilities.Utilities.Scheduler.schedule(function(){throw i},PluginUtilities.Utilities.Scheduler.Priority.normal,null,"PluginUtilities.Promise._throwException")},then:function(n,t){if(!t)return this;var i,r=this._value;try{t.handlesOnError||o(null,r,k,this,t);i=new e(t(r))}catch(u){i=u===r?this:new ni(u)}return i}},{supportedForProcessing:!1}),ni=PluginUtilities.Class.derive(s,function(n){r&&(r===!0||r&f.exceptionPromise)&&(this._stack=PluginUtilities.Promise._getStack());this._value=n;o(this,n,kt)},{},{supportedForProcessing:!1}),e=PluginUtilities.Class.define(function(n){if(r&&(r===!0||r&f.completePromise)&&(this._stack=PluginUtilities.Promise._getStack()),n&&typeof n=="object"&&typeof n.then=="function"){var t=new ct(null);return t._setCompleteValue(n),t}this._value=n},{cancel:function(){},done:function(n){if(n)try{var t=n(this._value);t&&typeof t=="object"&&typeof t.done=="function"&&t.done()}catch(i){PluginUtilities.Utilities.Scheduler.schedule(function(){throw i},PluginUtilities.Utilities.Scheduler.Priority.normal,null,"PluginUtilities.Promise._throwException")}},then:function(n){try{var t=n?n(this._value):this._value;return t===this._value?this:new e(t)}catch(i){return new ni(i)}}},{supportedForProcessing:!1});u=PluginUtilities.Class.derive(p,function(n,t){r&&(r===!0||r&f.promise)&&(this._stack=PluginUtilities.Promise._getStack());this._oncancel=t;this._setState(a);this._run();try{var i=this._completed.bind(this),u=this._error.bind(this),e=this._progress.bind(this);n(i,u,e)}catch(o){this._setExceptionValue(o)}},{_oncancel:null,_cancelAction:function(){if(this._oncancel)try{this._oncancel()}catch(n){}},_cleanupAction:function(){this._oncancel=null}},{addEventListener:function(n,t,i){h.addEventListener(n,t,i)},any:function(n){return new u(function(t,i){var r=Object.keys(n),e=Array.isArray(n)?[]:{},f;r.length===0&&t();f=0;r.forEach(function(e){u.as(n[e]).then(function(){t({key:e,value:n[e]})},function(u){if(u instanceof Error&&u.name===c){++f===r.length&&t(PluginUtilities.Promise.cancel);return}i({key:e,value:n[e]})})})},function(){var t=Object.keys(n);t.forEach(function(t){var i=u.as(n[t]);typeof i.cancel=="function"&&i.cancel()})})},as:function(n){return n&&typeof n=="object"&&typeof n.then=="function"?n:new e(n)},cancel:{get:function(){return ti=ti||new s(new PluginUtilities.ErrorFromName(c))}},dispatchEvent:function(n,t){return h.dispatchEvent(n,t)},is:function(n){return n&&typeof n=="object"&&typeof n.then=="function"},join:function(n){return new u(function(i,r,f){var o=Object.keys(n),e=Array.isArray(n)?[]:{},s=Array.isArray(n)?[]:{},l=0,h=o.length,a=function(n){var t,u;--h==0?(t=Object.keys(e).length,t===0?i(s):(u=0,o.forEach(function(n){var t=e[n];t instanceof Error&&t.name===c&&u++}),u===t?i(PluginUtilities.Promise.cancel):r(e))):f({Key:n,Done:!0})};if(o.forEach(function(i){var r=n[i];r===t?l++:u.then(r,function(n){s[i]=n;a(i)},function(n){e[i]=n;a(i)})}),h-=l,h===0){i(s);return}},function(){Object.keys(n).forEach(function(t){var i=u.as(n[t]);typeof i.cancel=="function"&&i.cancel()})})},removeEventListener:function(n,t,i){h.removeEventListener(n,t,i)},supportedForProcessing:!1,then:function(n,t,i,r){return u.as(n).then(t,i,r)},thenEach:function(n,t,i,r){var f=Array.isArray(n)?[]:{};return Object.keys(n).forEach(function(e){f[e]=u.as(n[e]).then(t,i,r)}),u.join(f)},timeout:function(n,t){var i=ui(n);return t?fi(i,t):i},wrap:function(n){return new e(n)},wrapError:function(n){return new s(n)},_veryExpensiveTagWithStack:{get:function(){return r},set:function(n){r=n}},_veryExpensiveTagWithStack_tag:f,_getStack:function(){if(Debug.debuggerEnabled)try{throw new Error}catch(n){return n.stack}},_cancelBlocker:function(n){if(!u.is(n))return u.wrap(n);var t,i,r=new PluginUtilities.Promise(function(n,r){t=n;i=r},function(){t=null;i=null});return n.then(function(n){t&&t(n)},function(n){i&&i(n)}),r}});Object.defineProperties(u,PluginUtilities.Utilities.createEventProperties(ut));ii=PluginUtilities.Class.derive(p,function(n){this._oncancel=n;this._setState(a);this._run()},{_cancelAction:function(){this._oncancel&&this._oncancel()},_cleanupAction:function(){this._oncancel=null}},{supportedForProcessing:!1});ri=PluginUtilities.Class.define(function(n){this._promise=new ii(n)},{promise:{get:function(){return this._promise}},cancel:function(){this._promise.cancel()},complete:function(n){this._promise._completed(n)},error:function(n){this._promise._error(n)},progress:function(n){this._promise._progress(n)}},{supportedForProcessing:!1});PluginUtilities.Namespace.define("PluginUtilities",{Promise:u,_Signal:ri});Microsoft.Plugin.Promise=u}(this),function(n,t){"use strict";t.Namespace.define("PluginUtilities",{ErrorFromName:t.Class.derive(Error,function(n,t){this.name=n;this.message=t||n},{},{supportedForProcessing:!1})})}(this,PluginUtilities),function(){"use strict";function n(n){var r={},t="_prev"+n,i="_next"+n;return r["_remove"+n]=function(){var n=this[t],r=this[i];r&&(r[t]=n);n&&(n[i]=r);this[t]=null;this[i]=null},r["_insert"+n+"Before"]=function(n){var r=this[t];return r&&(r[i]=n),n[i]=this,n[t]=r,this[t]=n,n},r["_insert"+n+"After"]=function(n){var r=this[i];return this[i]=n,n[i]=r,n[t]=this,r&&(r[t]=n),n},r}PluginUtilities.Namespace.define("PluginUtilities.Utilities",{_linkedListMixin:n})}(this),function(n,t){"use strict";function ni(n,i,r){return r!==t?"("+n+";"+i+";"+r+")":i!==t?"("+n+";"+i+")":n!==t?"("+n+")":""}function p(n,t,i,r){msWriteProfilerMark("PluginUtilities.Scheduler:"+n+ni(i,r)+","+t)}function e(n,i,r,u,f){var e=n.name||u!==t||f!==t;msWriteProfilerMark("PluginUtilities.Scheduler:"+i+":"+n.id+(e?ni(n.name,u,f):"")+","+r)}function r(){return!1}function d(n){throw"Illegal call by job("+n.id+") in state: "+this.name}function v(n){return function(t,i,r){t._setState(n,i,r)}}function ht(n,t){n._setPriority(t)}function fr(n,t){function e(n,t){PluginUtilities.log&&PluginUtilities.log(t+": MARKER: "+n.name,"PluginUtilities scheduler","log")}function o(n,t){PluginUtilities.log&&PluginUtilities.log(t+": JOB("+n.id+"): state: "+(n._state?n._state.name:"")+(n.name?", name: "+n.name:""),"PluginUtilities scheduler","log")}PluginUtilities.log&&PluginUtilities.log("highWaterMark: "+f,"PluginUtilities scheduler","log");var u=0,s=t?ct[ct.length-1]:ct[0],r=s;do r instanceof i&&e(r,u),r instanceof k&&o(r,u),u++,r=t?r["_prev"+n]:r["_next"+n];while(r)}function er(){function u(t,i){n+="    "+(i?"*":" ")+"id: "+t.id+", priority: "+h(t.priority).name+(t.name?", name: "+t.name:"")+"\n"}var n="",t,r,i,e;for(n+="Jobs:\n",t=h(f),r=0,st&&(u(st,!0),r++);t.priority>=s.min;)t instanceof k&&(u(t,!1),r++),t=t._nextJob;for(r===0&&(n+="     None\n"),n+="Drain requests:\n",i=0,e=o.length;i<e;i++)n+="    "+(i===0?"*":" ")+"priority: "+h(o[i].priority).name+", name: "+o[i].name+"\n";return o.length===0&&(n+="     None\n"),n}function or(){var n=ct[0];do{if(n instanceof k)return!1;n=n._nextJob}while(n);return!0}function bi(){return o.length===0?null:o[0].priority}function ri(n){p("drain","StartTM",n.name,h(n.priority).name)}function ki(n,t){t&&p("drain-canceled","info",n.name,h(n.priority).name);p("drain","StopTM",n.name,h(n.priority).name)}function sr(n,t,i){o.push({priority:n,complete:t,name:i});o.length===1&&(ri(o[0]),n>f&&(f=n,rt=!0))}function hr(n,t){for(var r=o.length,i=0;i<r;i++)if(o[i].complete===n){i===0&&(ki(o[0],t),o[1]&&ri(o[1]));o.splice(i,1);break}}function cr(){var n=o.shift();n&&(ki(n),o[0]&&ri(o[0]),n.complete())}function di(){var t=!1,n;if(!!o.length)for(n=bi();+n===n&&n>f;)lt=n,cr(),t=!0,n=bi();return t}function vt(n){return n>=s.aboveNormal+1?u.HIGH:n>=s.belowNormal?u.NORMAL:u.IDLE}function lr(n,t){return ut[n]>=ut[t]}function ar(n,t){return ut[n]>ut[t]}function gi(n){switch(n){case u.HIGH:return!1;case u.NORMAL:return u.isTaskScheduledAtPriorityOrHigher(u.HIGH);case u.IDLE:return u.isTaskScheduledAtPriorityOrHigher(u.NORMAL)}}function vr(n,t){var i=h(t);i.priority>f&&(f=i.priority,rt=!0);i._insertJobAfter(n)}function ui(n,t){var i=h(t);i.priority>f&&(f=i.priority,rt=!0);i._nextMarker._insertJobBefore(n)}function fi(n){return n=n|0,n=Math.max(n,ur),Math.min(n,pi)}function h(n){return n=fi(n),ct[-1*(n-pi)]}function yr(n){var r,c,t,b,y,a,d;yt=!0;p("timeslice","StartTM");c=!0;rt=!1;try{for(var g=ei(),nt=g+wi,i,l=!1,v=!1,w=function(){return(v=!1,rt)?!0:gi(vt(f))?!0:!o.length?ei()>nt?(v=!0,!0):!1:!1};f>=s.min&&!w()&&!l;){r=!1;t=h(f)._nextJob;do lt=t.priority,t instanceof k?(i!==t.priority&&(+i===i&&p("priority","StopTM",h(i).name),p("priority","StartTM",h(t.priority).name),i=t.priority),r=!0,c=!1,st=t,e(st,"job-running","StartTM",h(lt).name),t._execute(w),e(st,"job-running","StopTM",h(lt).name),st=null,c=!0):(b=vt(f),f=t.priority,r=di(),y=vt(f),ar(b,y)&&(!at||u.isTaskScheduledAtPriorityOrHigher(y))&&(l=!0)),t=t._nextJob;while(t&&!r&&!l&&!gi(vt(f)));rt=!1}}finally{for(st=null,c||(e(t,"job-error","info"),e(t,"job-running","StopTM",h(lt).name),t.cancel()),+i===i&&p("priority","StopTM",h(i).name),a=!1;f>=s.min&&!a;){r=!1;t=h(f)._nextJob;do t instanceof k?a=!0:(f=t.priority,r=di()),t=t._nextJob;while(t&&!r&&!a)}d=c?v?"timeslice exhausted":f<s.min?"jobs exhausted":l?"reached WWA priority boundary":"WWA host work":"job error";n&&(bt=null);yt=!1;f>=s.min&&hi();p("yielding","info",d);p("timeslice","StopTM")}}function hi(n){var t,i,r;(+n!==n&&(n=f),t=vt(n),yt)||bt&&(!at||lr(bt,t))||(i=++oi,r=function(){si<i&&(si=oi,yr(!0))},u.execAsyncAtPriority(r,t),bt=t)}function pr(n,i){var f=rr++,r,u;return i===t&&(i="Drain Request "+f),n=+n===n?n:s.min,n=fi(n),u=new dt(function(t){r=t;sr(n,r,i)},function(){hr(r,!0)}),yt||hi(),u}function wr(n){return u.execAtPriority(n,u.HIGH)}function br(){return new li}function nr(n,t,i,r){t=t||s.normal;i=i||null;var u=++ir,f=Debug.msTraceAsyncOperationStarting("PluginUtilities.Utilities.Scheduler.schedule: "+u+ni(r));return r=r||"",new k(u,n,t,i,r,f)}function kr(){if(yt)return lt;switch(u.getCurrentPriority()){case u.HIGH:return s.high;case u.NORMAL:return s.normal;case u.IDLE:return s.idle}}function pt(n){return function(t,i){var r;return new PluginUtilities.Promise(function(u){r=nr(function(){u(t)},n,null,i)},function(){r.cancel()})}}var dt=PluginUtilities.Promise,gt=PluginUtilities.Utilities._linkedListMixin,tr={get jobInfoIsNoLongerValid(){return PluginUtilities.Resources._getPluginUtilitiesString("base/jobInfoIsNoLongerValid").value}},k=PluginUtilities.Class.define(function(n,t,i,r,u,f){this._id=n;this._work=t;this._context=r;this._name=u;this._asyncOpID=f;this._setPriority(i);this._setState(ai);e(this,"job-scheduled","info")},{completed:{get:function(){return!!this._state.completed}},id:{get:function(){return this._id}},name:{get:function(){return this._name},set:function(n){this._name=n}},owner:{get:function(){return this._owner},set:function(n){this._owner&&this._owner._remove(this);this._owner=n;this._owner&&this._owner._add(this)}},priority:{get:function(){return this._priority},set:function(n){n=fi(n);this._state.setPriority(this,n)}},cancel:function(){this._state.cancel(this)},pause:function(){this._state.pause(this)},resume:function(){this._state.resume(this)},_execute:function(n){this._state.execute(this,n)},_executeDone:function(n){return this._state.executeDone(this,n)},_blockedDone:function(n){return this._state.blockedDone(this,n)},_setPriority:function(n){+this._priority===this._priority&&this._priority!==n&&e(this,"job-priority-changed","info",h(this._priority).name,h(n).name);this._priority=n},_setState:function(n,t,i){this._state&&PluginUtilities.log&&PluginUtilities.log("Transitioning job ("+this.id+") from: "+this._state.name+" to: "+n.name,"PluginUtilities scheduler","log");this._state=n;this._state.enter(this,t,i)}}),i,kt,u,ut,ei,oi,si;PluginUtilities.Class.mix(k,gt("Job"));var l={complete:1,"continue":2,block:3},ci=PluginUtilities.Class.define(function(n,t){this._job=t;this._result=null;this._yieldPolicy=l.complete;this._shouldYield=n},{job:{get:function(){return this._throwIfDisabled(),this._job}},shouldYield:{get:function(){return this._throwIfDisabled(),this._shouldYield()}},setPromise:function(n){this._throwIfDisabled();this._result=n;this._yieldPolicy=l.block},setWork:function(n){this._throwIfDisabled();this._result=n;this._yieldPolicy=l.continue},_disablePublicApi:function(){this._publicApiDisabled=!0},_throwIfDisabled:function(){if(this._publicApiDisabled)throw new PluginUtilities.ErrorFromName("PluginUtilities.Utilities.Scheduler.JobInfoIsNoLongerValid",tr.jobInfoIsNoLongerValid)}}),li=PluginUtilities.Class.define(function(){this._jobs={}},{cancelAll:function(){var t=this._jobs,i=Object.keys(t),n,r;for(this._jobs={},n=0,r=i.length;n<r;n++)t[i[n]].cancel()},_add:function(n){this._jobs[n.id]=n},_remove:function(n){delete this._jobs[n.id]}});var c=PluginUtilities.Class.define(function(n){this.name=n;this.enter=d;this.execute=d;this.executeDone=d;this.blockedDone=d;this.cancel=d;this.pause=d;this.resume=d;this.setPriority=d}),ai=new c("created"),w=new c("scheduled"),ft=new c("paused"),a=new c("canceled"),et=new c("running"),g=new c("running_paused"),ot=new c("running_resumed"),b=new c("running_canceled"),vi=new c("running_canceled_blocked"),wt=new c("cooperative_yield"),ti=new c("cooperative_yield_paused"),ii=new c("blocked"),nt=new c("blocked_waiting"),yi=new c("blocked_paused"),tt=new c("blocked_paused_waiting"),it=new c("blocked_canceled"),y=new c("complete");ai.enter=function(n){ui(n,n.priority);n._setState(w)};w.enter=function(){hi()};w.execute=v(et);w.cancel=v(a);w.pause=v(ft);w.resume=r;w.setPriority=function(n,t){n.priority!==t&&(n._setPriority(t),n.pause(),n.resume())};ft.enter=function(n){e(n,"job-paused","info");n._removeJob()};ft.cancel=v(a);ft.pause=r;ft.resume=function(n){e(n,"job-resumed","info");ui(n,n.priority);n._setState(w)};ft.setPriority=ht;a.enter=function(n){e(n,"job-canceled","info");Debug.msTraceAsyncOperationCompleted(n._asyncOpID,Debug.MS_ASYNC_OP_STATUS_CANCELED);n._removeJob();n._work=null;n._context=null;n.owner=null};a.cancel=r;a.pause=r;a.resume=r;a.setPriority=r;et.enter=function(n,t){var i,e;n._removeJob();var r=n.priority,o=n._work,f=n._context;n._work=null;n._context=null;i=new ci(t,n);Debug.msTraceAsyncCallbackStarting(n._asyncOpID);try{u.execAtPriority(function(){o.call(f,i)},vt(r))}finally{Debug.msTraceAsyncCallbackCompleted();i._disablePublicApi()}n._context=f;e=n._executeDone(i._yieldPolicy);n._setState(e,i._result,r)};et.executeDone=function(n,t){switch(t){case l.complete:return y;case l.continue:return wt;case l.block:return ii}};et.cancel=function(n){rt=!0;n._setState(b)};et.pause=function(n){rt=!0;n._setState(g)};et.resume=r;et.setPriority=ht;g.enter=r;g.executeDone=function(n,t){switch(t){case l.complete:return y;case l.continue:return ti;case l.block:return yi}};g.cancel=v(b);g.pause=r;g.resume=v(ot);g.setPriority=ht;ot.enter=r;ot.executeDone=function(n,t){switch(t){case l.complete:return y;case l.continue:return wt;case l.block:return ii}};ot.cancel=v(b);ot.pause=v(g);ot.resume=r;ot.setPriority=ht;b.enter=r;b.executeDone=function(n,t){switch(t){case l.complete:case l.continue:return a;case l.block:return vi}};b.cancel=r;b.pause=r;b.resume=r;b.setPriority=r;vi.enter=function(n,t){t.cancel();n._setState(a)};wt.enter=function(n,t,i){e(n,"job-yielded","info");i===n.priority?vr(n,n.priority):ui(n,n.priority);n._work=t;n._setState(w)};ti.enter=function(n,t){e(n,"job-yielded","info");n._work=t;n._setState(ft)};ii.enter=function(n,t,i){e(n,"job-blocked","StartTM");n._work=t;n._setState(nt);t.done(function(t){e(n,"job-blocked","StopTM");var r=n._blockedDone(t);n._setState(r,t,i)},function(t){return t&&t.name==="Canceled"||e(n,"job-error","info"),e(n,"job-blocked","StopTM"),n._setState(a),dt.wrapError(t)})};nt.enter=r;nt.blockedDone=function(n,t){return typeof t=="function"?wt:y};nt.cancel=v(it);nt.pause=v(tt);nt.resume=r;nt.setPriority=ht;yi.enter=function(n,t,i){e(n,"job-blocked","StartTM");n._work=t;n._setState(tt);t.done(function(t){e(n,"job-blocked","StopTM");var r=n._blockedDone(t);n._setState(r,t,i)},function(t){return t&&t.name==="Canceled"||e(n,"job-error","info"),e(n,"job-blocked","StopTM"),n._setState(a),dt.wrapError(t)})};tt.enter=r;tt.blockedDone=function(n,t){return typeof t=="function"?ti:y};tt.cancel=v(it);tt.pause=r;tt.resume=v(nt);tt.setPriority=ht;it.enter=function(n){n._work.cancel();n._work=null};it.blockedDone=function(){return a};it.cancel=r;it.pause=r;it.resume=r;it.setPriority=r;y.completed=!0;y.enter=function(n){Debug.msTraceAsyncOperationCompleted(n._asyncOpID,Debug.MS_ASYNC_OP_STATUS_SUCCESS);n._work=null;n._context=null;n.owner=null;e(n,"job-completed","info")};y.cancel=r;y.pause=r;y.resume=r;y.setPriority=r;i=PluginUtilities.Class.define(function(n,t){this.priority=n;this.name=t},{});PluginUtilities.Class.mix(i,gt("Job"),gt("Marker"));var ir=0,rr=0,ur=-15,pi=15,s={max:15,high:13,aboveNormal:9,normal:0,belowNormal:-9,idle:-13,min:-15},ct=[new i(15,"max"),new i(14,"14"),new i(13,"high"),new i(12,"12"),new i(11,"11"),new i(10,"10"),new i(9,"aboveNormal"),new i(8,"8"),new i(7,"7"),new i(6,"6"),new i(5,"5"),new i(4,"4"),new i(3,"3"),new i(2,"2"),new i(1,"1"),new i(0,"normal"),new i(-1,"-1"),new i(-2,"-2"),new i(-3,"-3"),new i(-4,"-4"),new i(-5,"-5"),new i(-6,"-6"),new i(-7,"-7"),new i(-8,"-8"),new i(-9,"belowNormal"),new i(-10,"-10"),new i(-11,"-11"),new i(-12,"-12"),new i(-13,"idle"),new i(-14,"-14"),new i(-15,"min"),new i(-16,"<TAIL>")];var bt=null,yt,lt,st=null,at=!!(n.MSApp&&n.MSApp.execAtPriority),o=[],rt,wi=30,f=s.min;ct.reduce(function(n,t){return n&&(n._insertJobAfter(t),n._insertMarkerAfter(t)),t});kt={execAsyncAtPriority:function(n,t){t===u.HIGH&&setTimeout(n,0);setImmediate(n)},execAtPriority:function(n){return n()},getCurrentPriority:function(){return kt.NORMAL},isTaskScheduledAtPriorityOrHigher:function(){return!1},HIGH:"high",NORMAL:"normal",IDLE:"idle"};u=at?n.MSApp:kt;ut={};ut[u.IDLE]=1;ut[u.NORMAL]=2;ut[u.HIGH]=3;ei=n.performance&&performance.now&&performance.now.bind(performance)||Date.now.bind(Date);oi=0;si=0;PluginUtilities.Namespace.define("PluginUtilities.Utilities.Scheduler",{Priority:s,schedule:nr,createOwnerToken:br,execHigh:wr,requestDrain:pr,currentPriority:{get:kr},schedulePromiseHigh:pt(s.high),schedulePromiseAboveNormal:pt(s.aboveNormal),schedulePromiseNormal:pt(s.normal),schedulePromiseBelowNormal:pt(s.belowNormal),schedulePromiseIdle:pt(s.idle),retrieveState:er,_JobNode:k,_JobInfo:ci,_OwnerToken:li,_dumpList:fr,_isEmpty:{get:or},_usingWwaScheduler:{get:function(){return at},set:function(t){at=t;u=at?n.MSApp:kt}},_MSApp:{get:function(){return u},set:function(n){u=n}},_TIME_SLICE:wi})}(this),function(n,t){function i(n,t,i){u.schedule(function(){n(t)},i,null,"Microsoft.Plugin.Utilities.xhr")}function r(){}var u=PluginUtilities.Utilities.Scheduler;Microsoft.Plugin.Utilities.xhr=function(n){var f;return new Microsoft.Plugin.Promise(function(e,o,s){var h=u.currentPriority;f=new XMLHttpRequest;f.onreadystatechange=function(){if(f._canceled){f.onreadystatechange=r;return}f.readyState===4?(f.status>=200&&f.status<300?i(e,f,h):i(o,f,h),f.onreadystatechange=r):i(s,f,h)};f.open(n.type||"GET",n.url,!0,n.user,n.password);f.responseType=n.responseType||"";Object.keys(n.headers||{}).forEach(function(t){f.setRequestHeader(t,n.headers[t])});n.customRequestInitializer&&n.customRequestInitializer(f);n.data===t?f.send():f.send(n.data)},function(){f.onreadystatechange=r;f._canceled=!0;f.abort()})}}(this)
//# sourceMappingURL=promise.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var F12;(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.isTrue=function(t,i){t||(i=i?"Internal error. "+i:"Internal error. Unexpectedly false.",n.fail(i))},n.isFalse=function(t,i){t&&(i=i?"Internal error. "+i:"Internal error. Unexpectedly true.",n.fail(i))},n.isNull=function(t,i){t!==null&&(i=i?"Internal error. "+i:"Internal error. Unexpectedly not null.",i+=" '"+t+"'",n.fail(i))},n.isUndefined=function(t,i){undefined!==void 0&&(i="Internal error. Unexpectedly undefined has been redefined.",i+=" '"+undefined+"'",n.fail(i));t!==undefined&&(i=i?"Internal error. "+i:"Internal error. Unexpectedly not undefined.",i+=" '"+t+"'",n.fail(i))},n.hasValue=function(t,i){undefined!==void 0&&(i="Internal error. Unexpectedly undefined has been redefined.",i+=" '"+undefined+"'",n.fail(i));(t===null||t===undefined)&&(i=i?"Internal error. "+i:"Internal error. Unexpectedly "+(t===null?"null":"undefined")+".",n.fail(i))},n.areEqual=function(t,i,r){t!==i&&(r=r?"Internal error. "+r:"Internal error. Unexpectedly not equal.",r+=" '"+t+"' !== '"+i+"'.",n.fail(r))},n.areNotEqual=function(t,i,r){t===i&&(r=r?"Internal error. "+r:"Internal error. Unexpectedly equal.",r+=" '"+t+"' === '"+i+"'.",n.fail(r))},n.throws=function(t,i){try{t();i=i?"Internal error. "+i:"Internal error. Unexpectedly didn't throw.";n.fail(i)}catch(r){return}},n.fail=function(t){n.fail_helper(t,!0)},n.reportWatson=function(t){n.fail_helper(t,!1)},n.failDebugOnly=function(t){isDebugBuild&&n.fail(t)},n.fail_helper=function(n,t){var f=new Error((n||"Assert failed.")+"\n"),r,u;try{throw f}catch(i){if(r=typeof Common!="undefined"&&Common&&Common.ErrorHandling,u=typeof Microsoft!="undefined"&&Microsoft&&Microsoft.Plugin&&Microsoft.Plugin.F12&&Microsoft.Plugin.F12.SelfTest,r&&u&&!Microsoft.Plugin.F12.SelfTest.selfTestEnabled&&Common.ErrorHandling.reportErrorGivenStack(i),isDebugBuild||t){i.stack&&(i.description=i.stack);throw i}}},n}();n.Assert=t})(t=n.Utility||(n.Utility={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}))
//# sourceMappingURL=assert.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){"use strict";var t=function(){function t(){}return t.getCanonicalMediaType=function(n){return(this.initialize(),!n)?n:(n=this.normalizeMediaType(n),this.getCanonicalMediaTypeCommon(n))},t.isEditableMediaType=function(n){return(this.initialize(),!n)?!1:(n=this.normalizeMediaType(n),this.isEditableMediaTypeCommon(n))},t.mediaTypeSupportsFindRefs=function(n){return(this.initialize(),!n)?!1:(n=this.normalizeMediaType(n),this.mediaTypeSupportsFindRefsCommon(n))},t.isJMCEnabledForMediaType=function(n){return(this.initialize(),!n)?!1:(n=this.normalizeMediaType(n),this.isJMCEnabledForMediaTypeCommon(n))},t.getMediaTypeForFileExtension=function(n,t){return(this.initialize(),n)?(n=this.normalizeFileExtension(n),this.getMediaTypeForFileExtensionCommon(n,t)):this.getCanonicalFallbackMediaType(t)},t.getSortedMediaTypes=function(n){var o=this,f,i,r,u,s,e,t;if(this.initialize(),!n)return[];if(f=new Set,n=n.filter(function(n){return!n||f.has(n)?!1:(f.add(n),!0)}),i=n.length,i<=0)return[];for(r=new Array(i),u=new Array(i),t=0;t<i;t++)r[t]=t,s=this.normalizeMediaType(n[t]),u[t]=this.getCanonicalMediaTypeCommon(s);for(r.sort(function(n,t){var i=o.getRank(u[n]),r=o.getRank(u[t]);return i<r?-1:i>r?1:n-t}),e=new Array(i),t=0;t<i;t++)e[t]=n[r[t]];return e},t.registerMediaTypes=function(n){if(n)for(var t in n)this.registerMediaType(t,n[t])},t.registerMediaType=function(n,t){n&&(n=this.normalizeMediaType(n),this.registerMediaTypeCommon(n,t))},t.setEditableMediaType=function(n,t){n&&(n=this.normalizeMediaType(n),this.setEditableMediaTypeCommon(n,t))},t.setJMCEnabledMediaType=function(n,t){n&&(n=this.normalizeMediaType(n),this.setJMCEnabledMediaTypeCommon(n,t))},t.registerAlternateMediaTypes=function(n,t){!n||!t||t.length<=0||(n=this.normalizeMediaType(n),this.registerAlternateMediaTypesCommon(n,t))},t.registerAlternateMediaType=function(n,t){n&&t&&(n=this.normalizeMediaType(n),t=this.normalizeMediaType(t),this.registerAlternateMediaTypeCommon(n,t))},t.registerMediaTypeFileExtensions=function(n,t){!n||!t||t.length<=0||(n=this.normalizeMediaType(n),this.registerMediaTypeFileExtensionsCommon(n,t))},t.registerMediaTypeFileExtension=function(n,t){t&&n&&(n=this.normalizeMediaType(n),t=this.normalizeFileExtension(t),this.registerMediaTypeFileExtensionCommon(n,t))},t.initialize=function(){this._initialized||(this.registerMediaTypes(this._defaultMediaTypes),this.setEditableMediaType("text/css",!0),n.FeatureAvailability&&this.setEditableMediaType("text/javascript",n.FeatureAvailability.isEnabled(0)),this._initialized=!0)},t.getCanonicalMediaTypeCommon=function(n){for(;;){var t=this._canonicalMap.get(n);if(t){n=t;continue}break}return n},t.getMediaTypeForFileExtensionCommon=function(n,t){var i=this._extensionMap.get(n);return i?this.getCanonicalMediaTypeCommon(i):this.getCanonicalFallbackMediaType(t)},t.isEditableMediaTypeCommon=function(n){while(n){if(this._editableMediaTypes.has(n))return!0;n=this._canonicalMap.get(n)}return!1},t.isJMCEnabledForMediaTypeCommon=function(n){while(n){if(this._jmcMediaTypes.has(n))return!0;n=this._canonicalMap.get(n)}return!1},t.mediaTypeSupportsFindRefsCommon=function(n){while(n){if(this._findRefsMediaTypes.has(n))return!0;n=this._canonicalMap.get(n)}return!1},t.registerMediaTypeCommon=function(n,t){t&&(t.alternates&&t.alternates.length>0&&this.registerAlternateMediaTypesCommon(n,t.alternates),t.extensions&&t.extensions.length>0&&this.registerMediaTypeFileExtensionsCommon(n,t.extensions),"editable"in t&&this.setEditableMediaTypeCommon(n,t.editable),"canFindRefs"in t&&this.setMediaTypeCanFindRefsCommon(n,t.canFindRefs),"jmcEnabled"in t&&this.setJMCEnabledMediaTypeCommon(n,t.jmcEnabled))},t.registerAlternateMediaTypesCommon=function(n,t){var i=this;t.forEach(function(t){t&&(t=i.normalizeMediaType(t),i.registerAlternateMediaTypeCommon(n,t))})},t.registerAlternateMediaTypeCommon=function(n,t){if(n!==t){for(var i=this._canonicalMap.get(n);i;)F12.Tools.Utility.Assert.areNotEqual(i,t,"Invalid attempt to add a cyclical reference to a media type."),i=this._canonicalMap.get(i);this._canonicalMap.set(t,n)}},t.registerMediaTypeFileExtensionsCommon=function(n,t){var i=this;t.forEach(function(t){t&&(t=i.normalizeFileExtension(t),i.registerMediaTypeFileExtensionCommon(n,t))})},t.registerMediaTypeFileExtensionCommon=function(n,t){this._extensionMap.set(t,n)},t.setEditableMediaTypeCommon=function(n,t){t?this._editableMediaTypes.add(n):this._editableMediaTypes.delete(n)},t.setMediaTypeCanFindRefsCommon=function(n,t){t?this._findRefsMediaTypes.add(n):this._findRefsMediaTypes.delete(n)},t.setJMCEnabledMediaTypeCommon=function(n,t){t?this._jmcMediaTypes.add(n):this._jmcMediaTypes.delete(n)},t.normalizeMediaType=function(n){n=n.trim();n=n.toLowerCase();var t=n.indexOf(";");return t>-1&&(n=n.substr(0,t)),n},t.normalizeFileExtension=function(n){return n=n.trim(),n=n.toLowerCase(),n.charAt(0)!=="."&&(n="."+n),n},t.getRank=function(n){switch(n){case"text/plain":return 3;case"text/javascript":case"text/html":case"text/css":case"text/xml":return 2;case"text/typescript":case"text/coffeescript":case"text/x-csharp":case"text/less":case"text/scss":return 1;default:return 0}},t.getCanonicalFallbackMediaType=function(n){return n?(n=this.normalizeMediaType(n),this.getCanonicalMediaTypeCommon(n)):"text/plain"},t._initialized=!1,t._defaultMediaTypes={"text/html":{alternates:["text/x-jshtm","text/x.jshtm"],extensions:[".html",".htm"],jmcEnabled:!0},"text/xml":{alternates:["application/xml",],extensions:[".xml",".xsl",".svg"]},"text/javascript":{alternates:["text/javascript1.0","text/javascript1.1","text/javascript1.2","text/javascript1.3","text/javascript1.4","text/javascript1.5","text/jscript","text/livescript","text/x-javascript","text/x-ecmascript","text/x.javascript","text/x.ecmascript","application/javascript","application/ecmascript","application/x-javascript","application/x-ecmascript","application/x.javascript","application/x.ecmascript"],extensions:[".js"],jmcEnabled:!0,canFindRefs:!0},"text/typescript":{alternates:["video/vnd.dlna.mpeg-tts","text/x.typescript","text/vnd.ms.typescript","application/typescript","application/x.typescript","application/vnd.ms.typescript"],extensions:[".ts",".str"],jmcEnabled:!0,canFindRefs:!0},"text/coffeescript":{alternates:["text/x-coffeescript","text/x.coffeescript","application/coffeescript","application/x-coffeescript","application/x.coffeescript"],extensions:[".coffee"],jmcEnabled:!0},"text/x-csharp":{alternates:[],extensions:[".cs"],jmcEnabled:!0},"text/css":{alternates:[],extensions:[".css"]},"text/less":{alternates:["text/x-less","text/x.less"],extensions:[".less"]},"text/scss":{alternates:["text/x-scss","text/x.scss"],extensions:[".sass",".scss"]}},t._extensionMap=new Map,t._canonicalMap=new Map,t._editableMediaTypes=new Set,t._findRefsMediaTypes=new Set,t._jmcMediaTypes=new Set,t}();n.MediaTypeManager=t})(Common||(Common={}))
//# sourceMappingURL=MediaTypeManager.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(n){"use strict";function f(){return u(0,!1)}function u(n,u){if(u===void 0&&(u=!1),n in i)return i[n];var e=u,f=t.F12&&t.F12.getRegEntryForF12("FeatureF12"+r[n]);return f!==null&&f!==undefined&&f.length>0&&(e=f.toLowerCase()==="true"&&t.F12.isTargetEdge),i[n]=e,e}function e(n,u,f){f===void 0&&(f=!1);i[n]=u;f&&t.F12&&t.F12.setRegEntryForF12("FeatureF12"+r[n],String(u))}var t=Microsoft.Plugin,i=Object.create(null),r;(function(n){n[n.EditOnIdle=0]="EditOnIdle";n[n.ObjectMutationBreakpoint=1]="ObjectMutationBreakpoint"})(n.Feature||(n.Feature={}));r=n.Feature;n.isEditOnIdleEnabled=f;n.isEnabled=u;n.setEnabledState=e})(t=n.FeatureAvailability||(n.FeatureAvailability={}))})(Common||(Common={}))
//# sourceMappingURL=featureAvailability.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var __extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},Common;(function(n){"use strict";var t=function(){function n(){this._packetCount=0;this._data=""}return n.splitMessage=function(t){for(var u=t.length,f=Math.max(1,Math.ceil(u/n.MAX_MESSAGE_LENGTH)),e=[],i=0;i<f;i++){var r=i*n.MAX_MESSAGE_LENGTH,o=r+Math.min(n.MAX_MESSAGE_LENGTH,u-r),s=t.slice(r,o),h={n:f,data:s};e.push(JSON.stringify(h))}return e},n.prototype.combineMessages=function(n){var t=JSON.parse(n.data),i;t.n>=1?(this._data+=t.data||"",this._packetCount++,this._packetCount===t.n?(i=this._data,this._packetCount=0,this._data="",n.data=i,n.handled=!1):n.handled=!0):n.handled=!0},n.MAX_MESSAGE_LENGTH=32768,n}(),i;n.MessageThrottle=t;i=function(n){function i(t){n.call(this);this._messageHandlers=[];this._port=t}return __extends(i,n),Object.defineProperty(i.prototype,"name",{get:function(){return this._port.name},enumerable:!0,configurable:!0}),i.prototype.initialize=function(){this._port.addEventListener("message",this.onmessage.bind(this))},i.prototype.postMessage=function(n){for(var r=t.splitMessage(n),f,i=0,u=r.length;i<u;i++)f=r[i],this._port.postMessage(f);return!0},i.prototype.addEventListener=function(n,t){if(n!=="message")throw new Error("Invalid event type");this._messageHandlers.push(t)},i.prototype.removeEventListener=function(n,t){if(n!=="message")throw new Error("Invalid event type");for(;;){var i=this._messageHandlers.indexOf(t);if(i===-1)break;this._messageHandlers.splice(i,1)}},i.prototype.onmessage=function(n){var t,i,r;if(this.combineMessages(n),!n.handled)for(t=0,i=this._messageHandlers.length;t<i;t++)r=this._messageHandlers[t],r(n)},i}(t);n.PortThrottler=i})(Common||(Common={}))
//# sourceMappingURL=messageThrottle.min.js.map
/*
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.
function $m(n){var t,i;return typeof n=="string"?(t=n.match(/<(\w+?)>/),t?new $mList("",document.createElement(t[1])):(i=document.querySelectorAll(n),new $mList(n,i))):new $mList("",n)}var MonacoDefinitions,ControlTemplates,Proxy,$mList,$mNode,DataTreeView,F12,__rpcLog,__extends,Common;(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.isTrue=function(t,i){t||(i=i?"Internal error. "+i:"Internal error. Unexpectedly false.",n.fail(i))},n.isFalse=function(t,i){t&&(i=i?"Internal error. "+i:"Internal error. Unexpectedly true.",n.fail(i))},n.isNull=function(t,i){t!==null&&(i=i?"Internal error. "+i:"Internal error. Unexpectedly not null.",i+=" '"+t+"'",n.fail(i))},n.isUndefined=function(t,i){undefined!==void 0&&(i="Internal error. Unexpectedly undefined has been redefined.",i+=" '"+undefined+"'",n.fail(i));t!==undefined&&(i=i?"Internal error. "+i:"Internal error. Unexpectedly not undefined.",i+=" '"+t+"'",n.fail(i))},n.hasValue=function(t,i){undefined!==void 0&&(i="Internal error. Unexpectedly undefined has been redefined.",i+=" '"+undefined+"'",n.fail(i));(t===null||t===undefined)&&(i=i?"Internal error. "+i:"Internal error. Unexpectedly "+(t===null?"null":"undefined")+".",n.fail(i))},n.areEqual=function(t,i,r){t!==i&&(r=r?"Internal error. "+r:"Internal error. Unexpectedly not equal.",r+=" '"+t+"' !== '"+i+"'.",n.fail(r))},n.areNotEqual=function(t,i,r){t===i&&(r=r?"Internal error. "+r:"Internal error. Unexpectedly equal.",r+=" '"+t+"' === '"+i+"'.",n.fail(r))},n.throws=function(t,i){try{t();i=i?"Internal error. "+i:"Internal error. Unexpectedly didn't throw.";n.fail(i)}catch(r){return}},n.fail=function(t){n.fail_helper(t,!0)},n.reportWatson=function(t){n.fail_helper(t,!1)},n.failDebugOnly=function(t){isDebugBuild&&n.fail(t)},n.fail_helper=function(n,t){var f=new Error((n||"Assert failed.")+"\n"),r,u;try{throw f}catch(i){if(r=typeof Common!="undefined"&&Common&&Common.ErrorHandling,u=typeof Microsoft!="undefined"&&Microsoft&&Microsoft.Plugin&&Microsoft.Plugin.F12&&Microsoft.Plugin.F12.SelfTest,r&&u&&!Microsoft.Plugin.F12.SelfTest.selfTestEnabled&&Common.ErrorHandling.reportErrorGivenStack(i),isDebugBuild||t){i.stack&&(i.description=i.stack);throw i}}},n}();n.Assert=t})(t=n.Utility||(n.Utility={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var r=function(){function n(){}return n.UNKNOWN=0,n.TEXTAREA=1,n.GUTTER_GLYPH_MARGIN=2,n.GUTTER_LINE_NUMBERS=3,n.GUTTER_LINE_DECORATIONS=4,n.GUTTER_VIEW_ZONE=5,n.CONTENT_TEXT=6,n.CONTENT_EMPTY=7,n.CONTENT_VIEW_ZONE=8,n.CONTENT_WIDGET=9,n.OVERVIEW_RULER=10,n.SCROLLBAR=11,n.OVERLAY_WIDGET=12,n}(),t,i;n.MouseTargetType=r;t=function(){function n(){}return n.TextDefined=0,n.LF=1,n.CRLF=2,n}();n.EndOfLinePreference=t;i=function(){function n(){}return n.ModelContentChanged="contentChanged",n.MouseMove="mousemove",n}();n.EventType=i})(MonacoDefinitions||(MonacoDefinitions={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";function f(){return u(0,!1)}function u(n,u){if(u===void 0&&(u=!1),n in i)return i[n];var e=u,f=t.F12&&t.F12.getRegEntryForF12("FeatureF12"+r[n]);return f!==null&&f!==undefined&&f.length>0&&(e=f.toLowerCase()==="true"&&t.F12.isTargetEdge),i[n]=e,e}function e(n,u,f){f===void 0&&(f=!1);i[n]=u;f&&t.F12&&t.F12.setRegEntryForF12("FeatureF12"+r[n],String(u))}var t=Microsoft.Plugin,i=Object.create(null),r;(function(n){n[n.EditOnIdle=0]="EditOnIdle";n[n.ObjectMutationBreakpoint=1]="ObjectMutationBreakpoint"})(n.Feature||(n.Feature={}));r=n.Feature;n.isEditOnIdleEnabled=f;n.isEnabled=u;n.setEnabledState=e})(t=n.FeatureAvailability||(n.FeatureAvailability={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.encode=function(t){if(t<64&&t>=0)return n.EncodedValues.charAt(t);throw TypeError(t+": not a 64 based value")},n.decodeChar=function(t){if(t.length===1)return n.EncodedValues.indexOf(t);throw TypeError("'"+t+"' must have length 1")},n.EncodedValues="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n}(),i=function(){function n(){}return n.encode=function(i){var r,u;if(i===null||typeof i===n.UndefinedType)return null;i=i<0?(-i<<1)+1:i<<1;r="";do u=i&31,i=i>>5,i>0&&(u=u|32),r=r+t.encode(u);while(i>0);return r},n.decode=function(n,i){for(var u,f=0,e=!1,o=0,r=i;r<n.length;r++){if(u=t.decodeChar(n[r]),r===i){if(u===-1)return null;(u&1)==1&&(e=!0);f=u>>1&15}else f=f|(u&31)<<o;if(o+=r===i?4:5,(u&32)!=32)return{value:e?-f:f,charsRead:r-i+1}}},n.UndefinedType="undefined",n}();n.Base64VLQFormat=i})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function r(n){n===void 0&&(n=t.FormatServiceHelper.DefaultServices);this._services=n;this.options=new t.FormatterOptions}return Object.defineProperty(r.prototype,"canFormat",{get:function(){return this.sourceText&&this.sourceText.text&&this.sourceText.text.trim().length>0},enumerable:!0,configurable:!0}),r.supportsMimeType=function(n){return n?n.toLowerCase()==="text/css":!1},r.prototype.updateOptions=function(n){this.options.prettyPrint=n.prettyPrint;this.options.sourcemapSupport=n.sourcemapSupport},r.prototype.setDocument=function(n,r,u,f,e){return this.sourceText=new t.PositionOffsetMapper(n),this.options.prettyPrint&&e&&(this._prettyPrintPromise=this.startPrettyPrinting()),i.Promise.as(null)},r.prototype.getFormattedText=function(){return this.options.prettyPrint?(this._prettyPrintPromise=this._prettyPrintPromise||this.startPrettyPrinting(),this._prettyPrintPromise):i.Promise.as(this.sourceText)},r.prototype.startPrettyPrinting=function(){var r=this;return new i.Promise(function(i){window.setImmediate(function(){var f=t.FormatServiceHelper.getWorkerServices(new n.Uri("css/CssFormatWorker.js"),r._services),u=new Worker(f.path);u.onmessage=function(n){var f=n.data,e=new t.OffsetTextMapping(f.text,f.mappings,r.sourceText.text);u.terminate();i(e);r._prettyPrintPromise=null};u.onerror=function(n){u.terminate();r._prettyPrintPromise=null;throw new Error(n)};u.postMessage({services:f.services,text:r.sourceText.text})})})},r}();t.CssFormatter=r})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){"use strict";var i;(function(t){function i(i,r){r===void 0&&(r=t.DefaultServices);var u=n.Uri.getCurrent(),e=new n.Uri(u,r.commonRoot),o=new n.Uri(u,r.editorRoot),f=new n.Uri(u,r.formatterRoot);return i=new n.Uri(f,i),{path:u.makeRelative(i).toString(),services:{commonRoot:i.makeRelative(e).toString(),editorRoot:i.makeRelative(o).toString(),formatterRoot:i.makeRelative(f).toString()}}}t.DefaultServices={commonRoot:"../common/",editorRoot:"../common/editor/vs/",formatterRoot:"../common/formatter/"};t.getWorkerServices=i})(i=t.FormatServiceHelper||(t.FormatServiceHelper={}))})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var u=function(){function t(n,i,r,u,f){F12.Tools.Utility.Assert.isTrue(n===2||n===1,"Invalid sourceType");F12.Tools.Utility.Assert.hasValue(u&&u.length,"sourceSpans are required");this.sourceType=n;this.text=i;this._originalText=r;this._sourceSpans=u;this.errorMessage=f||r.errorMessage;this._formattedOffsets=t.calculateLineOffsets(i)}return t.calculateLineOffsets=function(n){var r=0,i=[],t;if(i[r]=0,n)for(t=0;t<n.length;t++)n.charAt(t)==="\n"&&(i[++r]=t+1);return i},t.prototype.getOffsetMappings=function(){for(var n,i=[],r=this._sourceSpans[0].sourcemap.allMappings,t=0;t<r.length;t++)n=r[t],i.push({originalOffset:this._originalText.positionToOffset({line:n.sourceLine,column:n.sourceColumn,file:0}),mappedOffset:this.positionToOffset({line:n.generatedLine,column:n.generatedColumn,file:0})});return i},t.prototype.getOriginalPosition=function(n){var t=this.getOriginalOffset(n);return this._originalText.getOriginalPosition(this._originalText.offsetToPosition(t))},t.prototype.getMappedPosition=function(t){var i,e,u,r,f;if(t=this._originalText.getMappedPosition(t),i=this._originalText.positionToOffset(t),e=this._originalText.text.length,e===0)return new n.Position(0,0);for(i<0&&(i=0),i>=e&&(i=e-1),r=0;r<this._sourceSpans.length;r++)if(this._sourceSpans[r].start<=i&&this._sourceSpans[r].end>=i){u=this._sourceSpans[r];break}return F12.Tools.Utility.Assert.isTrue(r<this._sourceSpans.length,"Could not find source code for offset"),f=u.getPosition(i-u.start),u.sourcemap&&(f=u.sourcemap.getGeneratedPosition(f)),f.line+=u.generatedLineOffset,f},t.prototype.positionToOffset=function(n){return this._formattedOffsets[n.line]+n.column},t.prototype.offsetToPosition=function(t){for(var i=0;i<this._formattedOffsets.length;i++)if(this._formattedOffsets[i]>t)break;return i--,new n.Position(i,t-this._formattedOffsets[i],0)},t.prototype.getOriginalOffset=function(t){var i,r,u;if(this._originalText.text.length===0)return 0;for(i=new n.Position(t.line,t.column,t.file),r=0;r<this._sourceSpans.length-1;r++)if(i.line<this._sourceSpans[r+1].generatedLineOffset)break;return u=this._sourceSpans[r],i.line-=u.generatedLineOffset,u.sourcemap&&(i=u.sourcemap.getOriginalPosition(i)),u.getOffset(i)},t}(),i,r,t;n.FormattedTextMapping=u;i=function(){function n(n,t){this.originalOffset=n;this.mappedOffset=t}return n}();n.OffsetMappingPair=i;r=function(){function n(n,i,r){this.text=n;this.mappings=i;this._originalTextMapper=new t(r);this._mappedTextMapper=new t(n)}return n.prototype.getOriginalPosition=function(n){for(var r,i=this._mappedTextMapper.positionToOffset(n),t=this.mappings.length-1;t>=0;t--)if(i>=this.mappings[t].mappedOffset)return r=i-this.mappings[t].mappedOffset,this._originalTextMapper.offsetToPosition(this.mappings[t].originalOffset+r);return this._mappedTextMapper.offsetToPosition(0)},n.prototype.getMappedPosition=function(n){for(var r,i=this._originalTextMapper.positionToOffset(n),t=this.mappings.length-1;t>=0;t--)if(i>=this.mappings[t].originalOffset)return r=i-this.mappings[t].originalOffset,this._mappedTextMapper.offsetToPosition(this.mappings[t].mappedOffset+r);return this._mappedTextMapper.offsetToPosition(0)},n.prototype.positionToOffset=function(n){return this._mappedTextMapper.positionToOffset(n)},n.prototype.offsetToPosition=function(n){return this._mappedTextMapper.offsetToPosition(n)},n.prototype.getOffsetMappings=function(){return this.mappings},n}();n.OffsetTextMapping=r;t=function(){function n(n){this.text=n||"";this._newlineOffsets=[0];for(var t;;)if(t=n.indexOf("\n",t+1),t>-1)this._newlineOffsets.push(t+1);else break}return n.prototype.positionToOffset=function(n){if(!n)return 0;var t=n.line;return t>=this._newlineOffsets.length&&(t=Math.max(0,this._newlineOffsets.length-1)),this._newlineOffsets[t]+n.column},n.prototype.offsetToPosition=function(n){n=Math.max(n,0);for(var t=this._newlineOffsets.length-1;t>=0;t--)if(this._newlineOffsets[t]<=n)return{line:t,column:n-this._newlineOffsets[t],file:0};return{line:0,column:n,file:0}},n.prototype.getOriginalPosition=function(n){return n},n.prototype.getMappedPosition=function(n){return n},n.prototype.getOffsetMappings=function(){return[]},n}();n.PositionOffsetMapper=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){"use strict";var i=function(){function i(n){n===void 0&&(n=t.FormatServiceHelper.DefaultServices);this._options=null;this._sourceText=null;this._sourceInfo=null;this._options=new t.FormatterOptions;this._canBePrettyPrinted=!0;this._prettyPrintPromise=null}return Object.defineProperty(i.prototype,"canFormat",{get:function(){return this._canBePrettyPrinted},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sourceText",{get:function(){return this._sourceText},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"options",{get:function(){return this._options},enumerable:!0,configurable:!0}),i.prototype.updateOptions=function(n){this._options.updateAllOptions(n)},i.prototype.setDocument=function(n,i,r,u,f){var e=this;return F12.Tools.Utility.Assert.hasValue(n,"source does not have a value."),new Microsoft.Plugin.Promise(function(i){e._sourceText=new t.UnmappedTextMapping(n);e._sourceInfo={name:"",mimeType:r,sourceType:2};e._canBePrettyPrinted=n.length>0&&!/^[\s;]+$/.test(n);e._prettyPrintPromise&&(e._prettyPrintPromise.cancel(),e._prettyPrintPromise=null);f&&e._canBePrettyPrinted&&e.formatSource(e._options.forceChunking);i(e._sourceInfo)})},i.prototype.getFormattedText=function(n){F12.Tools.Utility.Assert.isTrue(!!this.sourceText,"Must call setDocument first");n=n||this._options;var t=n.prettyPrint&&this._canBePrettyPrinted?2:0;return t===2?(this._prettyPrintPromise||this.formatSource(n.forceChunking),F12.Tools.Utility.Assert.hasValue(this._prettyPrintPromise,"No pretty print promise."),this._prettyPrintPromise):Microsoft.Plugin.Promise.as(this._sourceText)},i.prototype.formatSource=function(i){var r=this,u=null,f;(F12.Tools.Utility.Assert.isTrue(this._canBePrettyPrinted,"Source cannot be pretty printed."),this._prettyPrintPromise)||(f=function(){u&&u.terminate()},this._prettyPrintPromise=new Microsoft.Plugin.Promise(function(e){window.setImmediate(function(){var c=t.FormatServiceHelper.getWorkerServices(new n.Uri("formatWorker.js"),r._services),s,h,o;u=new Worker(c.path);s=null;u.onerror=function(){r._canBePrettyPrinted=!1;s=n.ToolWindowHelpers.loadString("FormatterInternalError");f();e(new t.UnmappedTextMapping(r._sourceText.text,s));return};h=[];u.onmessage=function(i){var c,y,o,v,l,a,u,p;if(i.error&&F12.Tools.Utility.Assert.failDebugOnly(i.errorMessage),typeof i.data.generatedSourceSpanIndex!="undefined"){for(c=i.data,h[c.generatedSourceSpanIndex]||(h[c.generatedSourceSpanIndex]=[]),y=h[c.generatedSourceSpanIndex],u=0;u<c.mappings.length;u++)y.push(c.mappings[u]);return}if(o=i.data,r._canBePrettyPrinted=o.canBePrettyPrinted,v=null,r._canBePrettyPrinted){for(l=o.generatedSourceSpanData,a=[],u=0;u<l.length;u++)h[u]&&(F12.Tools.Utility.Assert.isNull(l[u].mappings),l[u].mappings=h[u]),p=new t.SourceSpan(l[u]),a.push(p);o.error&&(s=n.ToolWindowHelpers.loadString(a.length>1?"FormatterEmbededJSInternalError":"FormatterInternalError"),o.errorMessage.length>0&&(s+="\n",s+=o.errorMessage));v=new t.FormattedTextMapping(2,o.formattedText,r._sourceText,a,s)}f();e(v||r.sourceText)};o=new t.WorkerSendMessage;o.source=r._sourceText.text;o.mimeType=r._sourceInfo.mimeType;o.commonUrl=c.services.commonRoot;o.loader=c.services.editorRoot;o.typescriptServices=c.services.editorRoot+"languages/typescript/lib/";o.forceResponseChunking=i;u.postMessage(o)})},f))},i}();t.ScriptFormatter=i})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=function(){function n(){this._prettyPrint=!1;this._sourcemapSupport=!1}return Object.defineProperty(n.prototype,"sourcemapSupport",{get:function(){return this._sourcemapSupport},set:function(n){this._sourcemapSupport=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"prettyPrint",{get:function(){return this._prettyPrint},set:function(n){this._prettyPrint=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"forceChunking",{get:function(){return this._forceChunking},set:function(n){this._forceChunking=n},enumerable:!0,configurable:!0}),n.prototype.updateAllOptions=function(n){this.prettyPrint=n.prettyPrint||!1;this.sourcemapSupport=n.sourcemapSupport||!1;this.forceChunking=n.forceChunking},n}();n.FormatterOptions=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function r(n){n===void 0&&(n=t.FormatServiceHelper.DefaultServices);this.options={};this._services=n;this.options=new t.FormatterOptions}return Object.defineProperty(r.prototype,"canFormat",{get:function(){return this.sourceText&&this.sourceText.text&&this.sourceText.text.trim().length>0},enumerable:!0,configurable:!0}),r.supportsMimeType=function(n){if(n){var t=n.toLowerCase();return t==="text/html"||t==="application/xml"||t.lastIndexOf("+xml")===t.length-4}return!1},r.prototype.updateOptions=function(n){this.options.updateAllOptions(n)},r.prototype.setDocument=function(n,r,u,f,e){return this.sourceText=new t.PositionOffsetMapper(n),this.options.prettyPrint&&e&&(this._prettyPrintPromise=this.startPrettyPrint()),i.Promise.as(null)},r.prototype.getFormattedText=function(){return this.options.prettyPrint?(this._prettyPrintPromise=this._prettyPrintPromise||this.startPrettyPrint(),this._prettyPrintPromise):i.Promise.as(this.sourceText)},r.prototype.startPrettyPrint=function(){var r=this;return new i.Promise(function(i){window.setImmediate(function(){var f=t.FormatServiceHelper.getWorkerServices(new n.Uri("Html/HtmlFormatWorker.js"),r._services),u=new Worker(f.path);u.onmessage=function(n){var f=JSON.parse(n.data),e=new t.OffsetTextMapping(f.text,f.mappings,r.sourceText.text);u.terminate();i(e);r._prettyPrintPromise=null};u.onerror=function(){u.terminate();i(r.sourceText);r._prettyPrintPromise=null};u.postMessage({services:f.services,text:r.sourceText.text})})})},r}();t.HtmlFormatter=r})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=function(){function t(n){F12.Tools.Utility.Assert.hasValue(n,"Need to set a valid source");this._source=n;this._sourceSpans=null;this._earlyEnd=!1}return Object.defineProperty(t.prototype,"sourceSpans",{get:function(){return this._sourceSpans===null&&this.findScriptTags(),this._sourceSpans},enumerable:!0,configurable:!0}),t.isSupportedScript=function(n,t){var i=n?n.toLocaleLowerCase():"",r=t?t.toLocaleLowerCase():"";return!i&&!r||i==="text/javascript"||i==="text/jscript"||i==="application/javascript"||i==="application/x-javascript"||i==="text/ecmascript"||r==="javascript"||r==="jscript"||r==="ecmascript"},t.prototype.findScriptTags=function(){this._index=0;this._sourceSpans=[];this._htmlStart=0;var t=this._source;do if(t[this._index]==="<"){if(this._index+1>=t.length)break;t[this._index+1]==="!"?this._index+3<this._source.length&&this._source[this._index+2]==="-"&&this._source[this._index+3]==="-"?this.parseComment():this.parseTag():t[this._index+1]==="?"?this.parseTag():(t[this._index+1].match(/[a-zA-Z]/)||t[this._index+1]==="_"||t[this._index+1]==="/"&&this._index+2<t.length&&(t[this._index+2].match(/a-zA-Z/)||t[this._index+2]==="_"))&&this.parseTag()}while(++this._index<t.length);this._earlyEnd||this._sourceSpans.push(new n.SourceSpanBuilder(this._htmlStart,this._source.length-1,!1))},t.prototype.parseComment=function(){for(F12.Tools.Utility.Assert.areEqual(this._source[this._index],"<"),F12.Tools.Utility.Assert.areEqual(this._source[this._index+1],"!"),F12.Tools.Utility.Assert.areEqual(this._source[this._index+2],"-"),F12.Tools.Utility.Assert.areEqual(this._source[this._index+3],"-"),this._index+=3;++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}},t.prototype.parseTag=function(){var u;F12.Tools.Utility.Assert.areEqual(this._source[this._index],"<");u=!1;this._index+1<this._source.length&&(this._source[this._index+1]==="/"||this._source[this._index+1]==="!"||this._source[this._index+1]==="?")&&(u=!0);for(var r=!1,s=!1,t=!1,i=!1,o,f="",e="",n;++this._index<this._source.length;)switch(this._source[this._index]){case">":(this._source[this._index-1]==="/"||this._source[this._index-1]==="?")&&(u=!0);u||o&&o.toLowerCase()==="script"&&(++this._index,this.findScriptEnd(f,e));return;case'"':n=this.parseQuotedValue('"');r=!1;t&&(f=n,t=!1);i&&(e=n,i=!1);break;case"'":n=this.parseQuotedValue("'");r=!1;t&&(f=n,t=!1);i&&(e=n,i=!1);break;case"=":r=!0;break;default:r&&!this._source[this._index].match(/\s/)?(n=this.parsePropertyValue(),r=!1,t&&(f=n,t=!1),i&&(e=n,i=!1)):(this._source[this._index].match(/[a-zA-Z]/)||this._source[this._index]==="_")&&(s?(n=this.parseAttribute(),n.toLowerCase()==="type"?t=!0:n.toLowerCase()!=="language"||t||(i=!0)):(o=this.parseElement(),s=!0))}},t.prototype.findScriptEnd=function(i,r){var f=this._index,s=t.isSupportedScript(i,r),o="<\/script",e,u;do if(this._source[this._index]==="<"&&this._index+o.length<this._source.length&&this._source.substr(this._index,o.length).toLowerCase()===o){this._index-=1;e=this._index;s&&f<e&&(u=new n.SourceSpanBuilder(this._htmlStart,f-1,!1),this._sourceSpans.push(u),this._htmlStart=e+1,u=new n.SourceSpanBuilder(f,e,!0),this._sourceSpans.push(u));break}while(++this._index<this._source.length);this._index===this._source.length&&s&&(u=new n.SourceSpanBuilder(this._htmlStart,f-1,!1),this._sourceSpans.push(u),u=new n.SourceSpanBuilder(f,this._index-1,!0),this._sourceSpans.push(u),this._earlyEnd=!0)},t.prototype.parseQuotedValue=function(n){F12.Tools.Utility.Assert.isTrue(n==='"'||n==="'","Invalid quote type");F12.Tools.Utility.Assert.areEqual(this._source[this._index],n);for(var t="";++this._index<this._source.length;){if(this._source[this._index]===n)return t;this._source[this._index]==="\n"||(t+=this._source[this._index])}return F12.Tools.Utility.Assert.fail("Should not be here"),null},t.prototype.parsePropertyValue=function(){var n="";do switch(this._source[this._index]){case">":return this._index--,n;default:if(this._source[this._index].match(/\s/))return this._index--,n;n+=this._source[this._index]}while(++this._index<this._source.length);return F12.Tools.Utility.Assert.fail("Should not be here"),n},t.prototype.parseElement=function(){F12.Tools.Utility.Assert.isTrue(this._source[this._index].match(/[a-zA-Z_]/),"Non alpha or underscore character");var n="";for(n+=this._source[this._index];++this._index<this._source.length;)switch(this._source[this._index]){case":":n+=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]==="-")n+=this._source[this._index];else return this._index--,n}return F12.Tools.Utility.Assert.fail("Should not be here"),n},t.prototype.parseAttribute=function(){F12.Tools.Utility.Assert.isTrue(this._source[this._index].match(/[a-zA-Z_]/),"Non alpha or underscore character");var n="";for(n+=this._source[this._index];++this._index<this._source.length;)switch(this._source[this._index]){case".":n+=this._source[this._index];break;case":":n+=this._source[this._index];break;case"-":case"_":n+=this._source[this._index];break;default:if(this._source[this._index].match(/[a-zA-Z0-9]/))n+=this._source[this._index];else return this._index--,n}return F12.Tools.Utility.Assert.fail("Should not be here"),n},t}();n.HTMLScriptFinder=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";(function(n){n[n.Original=0]="Original";n[n.Sourcemap=1]="Sourcemap";n[n.PrettyPrint=2]="PrettyPrint"})(n.SourceType||(n.SourceType={}));var t=n.SourceType})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={})),function(n){var t;(function(n){"use strict";var i=function(){function n(){}return n.supportsMimeType=function(n){if(n){var t=n.toLowerCase();return t==="application/json"||t==="text/x-json"}return!1},n.prototype.format=function(n){this._text="";this._indentation=new t;try{var i=JSON.parse(n);return this.printItem(i),this._text}catch(r){return n}},n.prototype.printItem=function(n){n===null?this._text+="null":n instanceof Array?this.printArray(n):typeof n=="object"?this.printObject(n):typeof n=="string"?this._text+='"'+n+'"':typeof n=="number"?this._text+=n:typeof n=="boolean"&&(this._text+=n)},n.prototype.printArray=function(n){n.length>1?this.printLongArray(n):this.printShortArray(n)},n.prototype.printObject=function(n){var t=Object.getOwnPropertyNames(n);t.length>1?this.printLongObject(n):this.printShortObject(n)},n.prototype.printLongArray=function(n){this._text+="[\n";this._indentation.increase();for(var t=0;t<n.length;t++)this._text+=this.indent(),this.printItem(n[t]),t<n.length-1&&(this._text+=","),this._text+="\n";this._indentation.decrease();this._text+=this.indent()+"]"},n.prototype.printShortArray=function(n){this._text+="[";n.length>0&&this.printItem(n[0]);this._text+="]"},n.prototype.printLongObject=function(n){var i=Object.getOwnPropertyNames(n),t,r;for(this._text+="{\n",this._indentation.increase(),t=0;t<i.length;t++)r=i[t],this._text+=this.indent()+'"'+r+'": ',this.printItem(n[r]),t<i.length-1&&(this._text+=","),this._text+="\n";this._indentation.decrease();this._text+=this.indent();this._text+="}"},n.prototype.printShortObject=function(n){var t=Object.getOwnPropertyNames(n);this._text+="{";t.length>0&&(this._text+='"'+t[0]+'": ',this.printItem(n[t[0]]));this._text+="}"},n.prototype.indent=function(){return this._indentation.print()},n}(),t;n.JsonFormatter=i;t=function(){function n(){this._indentDepth=0;this._indentString=""}return n.prototype.increase=function(){this._indentDepth++;this._indentString+="    "},n.prototype.decrease=function(){this._indentDepth--;this._indentString=this._indentString.substring(0,this._indentDepth*4)},n.prototype.print=function(){return this._indentString},n}()})(t=n.FormatService||(n.FormatService={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i){n?(F12.Tools.Utility.Assert.isTrue(n>=0,"Invalid line number: "+n.toString()),this._line=n):this._line=0;t?(F12.Tools.Utility.Assert.isTrue(t>=0,"Invalid column: "+t.toString()),this._column=t):this._column=0;i?(F12.Tools.Utility.Assert.isTrue(i>=0,"Invalid file: "+i.toString()),this._file=i):this._file=0}return Object.defineProperty(n.prototype,"line",{get:function(){return this._line},set:function(n){F12.Tools.Utility.Assert.isTrue(n>=0,"Invalid line number: "+n.toString());this._line=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"column",{get:function(){return this._column},set:function(n){F12.Tools.Utility.Assert.isTrue(n>=0,"Invalid column: "+n.toString());this._column=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"file",{get:function(){return this._file},set:function(n){F12.Tools.Utility.Assert.isTrue(n>=0,"Invalid file: "+n.toString());this._file=n},enumerable:!0,configurable:!0}),n.EMPTY_POSITION=new n,n}();n.Position=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=function(){function t(n,t){var i=this;this.urls=t;this._fileMappings=[];this._allMappings=[];n&&n.forEach(function(n){i._fileMappings[n.file]||(i._fileMappings[n.file]=[]);i._fileMappings[n.file].push(n);i._allMappings.push(n)});this._fileMappings.forEach(function(n){n.sort(function(n,t){return n.sourceLine!==t.sourceLine?n.sourceLine-t.sourceLine:n.sourceColumn!==t.sourceColumn?n.sourceColumn-t.sourceColumn:n.generatedLine!==t.generatedLine?n.generatedLine-t.generatedLine:n.generatedColumn-t.generatedColumn})})}return Object.defineProperty(t.prototype,"allMappings",{get:function(){return this._allMappings},enumerable:!0,configurable:!0}),t.binarySearch=function(n,t,i){for(var r=n.length-1,e=0,u,o,f;e<=r;)if(u=e+r>>1,o=i(n[u],t.line,t.column),o>0)e=u+1;else if(o<0)r=u-1;else{r=u;break}for(f=Math.max(Math.min(n.length-1,r),0);f+1<n.length&&i(n[f+1],t.line,t.column)===0;)f++;return f},t.binaryCompareSource=function(n,t,i){return n.sourceLine===t?i-n.sourceColumn:t-n.sourceLine},t.binaryCompareGenerated=function(n,t,i){return n.generatedLine===t?i-n.generatedColumn:t-n.generatedLine},t.prototype.isValid=function(){return this._fileMappings&&this._fileMappings.length>0},t.prototype.hasOriginalPosition=function(i){var e=new n.Position(i.line,i.column,i.file),r=this._allMappings,u,f;return r.length>0?(u=t.binarySearch(r,e,t.binaryCompareGenerated),f=r[u],i.line===f.generatedLine):!0},t.prototype.getOriginalPosition=function(i){var r=new n.Position(i.line,i.column,i.file),u=this._allMappings,f;return u.length>0&&(f=t.binarySearch(u,r,t.binaryCompareGenerated),r.line=Math.max(u[f].sourceLine,0),r.column=Math.max(u[f].sourceColumn,0),r.file=Math.min(Math.max(u[f].file,0),this._fileMappings.length-1)),r},t.prototype.getGeneratedPosition=function(i){var r=new n.Position(i.line,i.column,i.file),u=this._fileMappings[r.file],f;return u&&u.length>0&&(f=t.binarySearch(u,r,t.binaryCompareSource),r.line=Math.max(u[f].generatedLine,0),r.column=Math.max(u[f].generatedColumn,0)),r},t}();n.SourcemapMappings=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=function(){function t(){}return t.calculateMappings=function(i){var h=[],e,f;if(!i||i.version!==3||!i.mappings||typeof i.mappings!="string"||!i.sources||i.sources.length===0)return null;var a=i.sources.length,o=new n.SourcemapMapping,l=0,u=i.mappings;u.length===0&&(e=new n.SourcemapMapping,h.push(e));for(var c=0,r=0,s=u.length;r<s;)if(u.charAt(r)===t.ScopeOrLineDelimiter)l++,r++,o.generatedColumn=0;else if(u.charAt(r)===t.SegmentDelimiter)r++;else{if(e=new n.SourcemapMapping,e.generatedLine=l,f=n.Base64VLQFormat.decode(u,r),e.generatedColumn=o.generatedColumn+f.value,o.generatedColumn=e.generatedColumn,r+=f.charsRead,r<s&&u.charAt(r)!==t.ScopeOrLineDelimiter&&u.charAt(r)!==t.SegmentDelimiter){if(f=n.Base64VLQFormat.decode(u,r),c+=f.value,c>a)return null;r+=f.charsRead}e.file=c;r<s&&u.charAt(r)!==t.ScopeOrLineDelimiter&&u.charAt(r)!==t.SegmentDelimiter&&(f=n.Base64VLQFormat.decode(u,r),e.sourceLine=f.value+o.sourceLine,o.sourceLine=e.sourceLine,r+=f.charsRead);r<s&&u.charAt(r)!==t.ScopeOrLineDelimiter&&u.charAt(r)!==t.SegmentDelimiter&&(f=n.Base64VLQFormat.decode(u,r),e.sourceColumn=f.value+o.sourceColumn,o.sourceColumn=e.sourceColumn,r+=f.charsRead);r<s&&u.charAt(r)!==t.ScopeOrLineDelimiter&&u.charAt(r)!==t.SegmentDelimiter&&(f=n.Base64VLQFormat.decode(u,r),r+=f.charsRead);h.push(e)}return h},t.calculateScopeSegments=function(i){var o,s,f,h;if(i&&i.version===3&&typeof i.x_ms_scopes=="string"&&i.x_ms_scopes.length!==0){for(var e=i.x_ms_scopes,u=0,v=e.length,r,c=[],l=0,a=0;u<v;){if(o=n.Base64VLQFormat.decode(e,u),!o)return;if(u+=o.charsRead,s=n.Base64VLQFormat.decode(e,u),!s)return;if(u+=s.charsRead,f=new n.SourceScopeSegment(l+o.value,a+s.value),l=f.line,a=f.column,h=e.charAt(u++),h===t.StartScopeSegmentDelimiter)r=new n.SourceScope(f,r),c.push(r);else if(h===t.EndScopeSegmentDelimiter){if(!r||!r.startSegment||r.endSegment)return;r.endSegment=f;r=r.parentScope}else return}if(!r)return c}},t.calculateLocalsMapping=function(i,r){var e,o,l;if(i&&i.version===3&&i.names&&i.names.length!==0&&typeof i.x_ms_locals=="string"&&i.x_ms_scopes.length!==0&&r&&r.length!==0)for(var s=i.names,f=i.x_ms_locals,y=f.length,a=0,h=r[a],u=0,v=f.length,c=0;u<v;){if(e=n.Base64VLQFormat.decode(f,u),!e)return;if(u+=e.charsRead,o=n.Base64VLQFormat.decode(f,u),o?(h.localsMap[s[c+=e.value]]=s[c+=o.value],u+=o.charsRead):h.localsMap[s[c+=e.value]]=null,u>=v)break;if(l=f.charAt(u++),l===t.ScopeOrLineDelimiter)h=r[++a];else if(l!==t.SegmentDelimiter)return}},t.parseMapContent=function(n){var i=null,t;try{n.substr(0,4)===")]}'"&&(t=n.indexOf("\n"),t>=0&&(n=n.slice(t+1)));i=JSON.parse(n)}catch(r){}return i},t.StartScopeSegmentDelimiter=">",t.EndScopeSegmentDelimiter="<",t.SegmentDelimiter=",",t.ScopeOrLineDelimiter=";",t}();n.SourcemapParser=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";typeof importScripts=="function"&&typeof document=="undefined"&&(onmessage=function(t){importScripts("sourcemapParser.js","sourcemapMappings.js","workerMessaging.js","base64.js");var f=t.data.content,i,r,u;i=n.SourcemapParser.parseMapContent(f);i&&i.version===3&&(r=n.SourcemapParser.calculateMappings(i),u=n.SourcemapParser.calculateScopeSegments(i),n.SourcemapParser.calculateLocalsMapping(i,u));r?this.postMessage({id:t.data.id,sourcemapMappings:r,urls:i.sources,sourceRoot:i.sourceRoot,sourcesContent:i.sourcesContent,version:i.version,sourceMediaTypes:i.x_ms_sourceMediaTypes,mediaTypes:i.x_ms_mediaTypes,sourceScopes:u}):this.postMessage({id:t.data.id,sourcemapMappings:null,urls:[],sourceRoot:"",sourcesContent:[],version:i&&i.version,sourceMediaTypes:null,mediaTypes:null,sourceScopes:null})})})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=function(){function t(t){this._start=t.start;this._end=t.end;this._lineOffsets=t.lineOffsets;this._generatedLineOffset=t.generatedLineOffset;this._sourcemap=new n.SourcemapMappings(t.mappings,[]);this._length=t.length}return Object.defineProperty(t.prototype,"start",{get:function(){return this._start},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this._end},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"generatedLineOffset",{get:function(){return this._generatedLineOffset},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sourcemap",{get:function(){return this._sourcemap},enumerable:!0,configurable:!0}),t.prototype.getPosition=function(t){var r,i,u,f;for(F12.Tools.Utility.Assert.isTrue(t>=0,"Negative offset"),F12.Tools.Utility.Assert.isTrue(this._lineOffsets.length>=1,"Need to call calculateLineOffsets first"),t=Math.min(t,this._length-1),r=this._lineOffsets.length-1,i=0;i<r;)u=i+r>>1,this._lineOffsets[u]<t?i=u+1:r=u;return i>0&&i<this._lineOffsets.length&&this._lineOffsets[i]>t&&(i=i-1),f=t-this._lineOffsets[i],F12.Tools.Utility.Assert.isTrue(f>=0,"Calculated negative column"),new n.Position(i,f)},t.prototype.getOffset=function(n){F12.Tools.Utility.Assert.isTrue(this._lineOffsets.length>=1,"Need to call calculateLineOffsets first");F12.Tools.Utility.Assert.isTrue(n.line>=0,"Line outside of range");F12.Tools.Utility.Assert.isTrue(n.column>=0,"Column outside of range");var t;return n.line>=this._lineOffsets.length?t=Math.max(0,this._length-1):(t=this._lineOffsets[n.line]+n.column,n.line<this._lineOffsets.length-1&&t>=this._lineOffsets[n.line+1]&&(t=this._lineOffsets[n.line+1]-1),t>=this._length&&(t=Math.max(0,this._length-1))),t+this._start},t}();n.SourceSpan=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=function(){function t(t,i,r){F12.Tools.Utility.Assert.isTrue(t>=0,"Invalid start offset: "+t.toString());F12.Tools.Utility.Assert.isTrue(i>=t,"Invalid end offset: "+i.toString());this._data=new n.SourceSpanData;this._data.start=t;this._data.end=i;this._isScript=r;this._data.lineOffsets=[];this._data.generatedLineOffset=0;this._data.length=0;this._data.mappings=[]}return Object.defineProperty(t.prototype,"_mappings",{get:function(){return this._data.mappings},set:function(n){this._data.mappings=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"start",{get:function(){return this._data.start},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this._data.end},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isScript",{get:function(){return this._isScript},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"generatedLineOffset",{get:function(){return this._data.generatedLineOffset},set:function(n){F12.Tools.Utility.Assert.isTrue(n>=0,"offset is negative");this._data.generatedLineOffset=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lineOffsets",{get:function(){return this._data.lineOffsets},enumerable:!0,configurable:!0}),t.prototype.calculateLineOffsets=function(n){var i=0,t;for(this._data.lineOffsets=[],this._data.lineOffsets[i]=0,this._data.length=n.length,t=0;t<n.length;t++)n.charAt(t)==="\n"&&(this._data.lineOffsets[++i]=t+1);return i},t}();n.SourceSpanBuilder=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=function(){function n(){this._stateStack=[]}return n.prototype.pushState=function(n){this._stateStack.push(n)},n.prototype.pushStates=function(){for(var t=[],n=0;n<arguments.length;n++)t[+n]=arguments[n];while(t.length)this.pushState(t.pop())},n.prototype.popState=function(){return this._stateStack.pop()},n.prototype.run=function(){while(this.runOne());},n.prototype.runUntil=function(n){for(var t;t=this._stateStack.pop();)if(t.call(this),t===n)return!0;return!1},n.prototype.runOne=function(){var n;return(n=this._stateStack.pop())?(n.call(this),!0):!1},n.prototype.stop=function(){this._stateStack.length=0},n}();n.StateMachine=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=function(){function t(t,i){this.text=t;this.errorMessage=i;var r=new n.SourceSpanBuilder(0,t.length);r.calculateLineOffsets(t);this._sourceSpan=new n.SourceSpan(r.data)}return t.prototype.getOriginalPosition=function(n){return n},t.prototype.getMappedPosition=function(n){return n},t.prototype.positionToOffset=function(n){return this.text.length===0?0:this._sourceSpan.getOffset(n)},t.prototype.offsetToPosition=function(t){return this.text.length===0?n.Position.EMPTY_POSITION:this._sourceSpan.getPosition(Math.min(this.text.length,Math.max(0,t)))},t.prototype.getOffsetMappings=function(){return[]},t}();n.UnmappedTextMapping=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var o=function(){function n(){this.generatedColumn=0;this.generatedLine=0;this.sourceColumn=0;this.sourceLine=0;this.file=0}return n}(),t,i,r,u,f,e;n.SourcemapMapping=o;t=function(){function n(n,t){this.line=n;this.column=t}return n}();n.SourceScopeSegment=t;i=function(){function n(n,t){t===void 0&&(t=null);this.startSegment=n;this.parentScope=t;this.initializeLocalsMap()}return Object.defineProperty(n.prototype,"parentScope",{get:function(){return this._parentScope},set:function(n){this._parentScope=n;this.initializeLocalsMap()},enumerable:!0,configurable:!0}),n.prototype.initializeLocalsMap=function(){this.localsMap=this.parentScope?Object.create(this.parentScope.localsMap):Object.create(null)},n}();n.SourceScope=i;r=function(){function n(){}return n}();n.SourceSpanData=r;u=function(){function n(){}return n}();n.WorkerSendMessage=u;f=function(){function n(){}return n}();n.WorkerResponseMessage=f;e=function(){function n(){}return n}();n.WorkerMappingSubsetResponseMessage=e})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){"use strict";function e(n,t){return n.then(function(n){return u(function(){return t()})().then(function(){return r(n)})},function(n){return u(function(){return t()})().then(function(){return l(n)})})}function s(n,t,i){return e(n.then(undefined,u(t)),i)}function h(){return new i.Promise(function(n){return setImmediate(n)})}function c(n){return new i.Promise(function(t){return setTimeout(t,n)})}function r(n){return new i.Promise(function(t){return setImmediate(t,n)})}function l(n){if(n instanceof Error&&!("stack"in n))try{throw n}catch(t){n=t}return new i.Promise(function(t,i){return setImmediate(i,n)})}function u(n){if(n)return function(t){return r(t).then(n)}}function a(n){return new i.Promise(function(t,i){var u=0,f=function(){if(u<n.length){var t=n[u++];return r(t()).then(f,i)}};t(f())})}function v(t,r,u){var f=this,e=t();return e?i.Promise.wrap(!0):u<0?i.Promise.wrap(!1):n.Async.sleep(r).then(function(){return f.waitForCondition(t,r,u-r)})}var i=Microsoft.Plugin,o=function(){function n(n){n===void 0&&(n=!1);this._waiters=[];this._signaled=n}return n.prototype.wait=function(){var n=this;return this._signaled?new i.Promise(function(n){setImmediate(n)}):new i.Promise(function(t){return n._waiters.push(t)})},n.prototype.set=function(){var t,n,i,r;if(!this._signaled&&(this._signaled=!0,this._waiters.length>0))for(t=this._waiters.splice(0,this._waiters.length),n=0,i=t.length;n<i;n++)r=t[n],setImmediate(r)},n.prototype.reset=function(){this._signaled=!1},n}(),f;t.ManualResetEvent=o;f=function(){function n(t,i){if(i===void 0&&(i=n.MAX_INT32),this._waiters=[],(t|=0)<0||t>i)throw new RangeError;if((i|=0)<1)throw new RangeError;this._currentCount=t;this._initialCount=t;this._maxCount=i}return Object.defineProperty(n.prototype,"isEmpty",{get:function(){return this._currentCount===this._initialCount},enumerable:!0,configurable:!0}),n.prototype.wait=function(){var n=this;return this._currentCount>0?(this._currentCount--,new i.Promise(function(n){setImmediate(n)})):new i.Promise(function(t){n._waiters.push(t)})},n.prototype.release=function(n){if(n===void 0&&(n=1),(n|=0)<1)throw new RangeError;if(this._maxCount-this._currentCount<n)throw new Error("Semaphore full");while(n-->0)if(this._waiters.length>0){var t=this._waiters.shift();setImmediate(t)}else this._currentCount++},n.MAX_INT32=Math.pow(2,31)-1,n}();t.Semaphore=f;t.tryFinally=e;t.tryCatchFinally=s;t.yieldAsync=h;t.sleep=c;t.iterate=a;t.waitForCondition=v})(t=n.Async||(n.Async={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i;(function(n){var i=function(){function n(n,t){this._moduleName=n;this._channel=t}return n.prototype.call=function(n,i){var r=this;return new t.Promise(function(t,u){r._channel.call(r._moduleName+"."+n,i,function(n){n.error?u(new Error(n.error.message)):n.result&&n.result.error?u(new Error(n.result.error)):t(n.result)})})},n.prototype.addMessageHander=function(n,t){this._channel.addMessageHandler(this._moduleName+"."+n,function(n){var i=n.data;return t(i.params,n.engineId),n})},n}();n.Command=i})(i=n.Chromium||(n.Chromium={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t;(function(n){var t=function(n){function t(t){n.call(this,"Debugger",t)}return __extends(t,n),t.prototype.enable=function(){return this.call("enable",undefined)},t.prototype.evaluateOnCallFrame=function(n){return this.call("evaluateOnCallFrame",n)},t.prototype.onPaused=function(n){this.addMessageHander("paused",n)},t.prototype.onResumed=function(n){this.addMessageHander("resumed",n)},t}(n.Command);n.Debugger=t})(t=n.Chromium||(n.Chromium={}))}(Common||(Common={})),function(n){var t;(function(n){"use strict";var t=function(){function t(t){this.console=new n.Console(t);this.css=new n.CSS(t);this.dom=new n.DOM(t);this.inspect=new n.Inspector(t);this.network=new n.Network(t);this.page=new n.Page(t);this.runtime=new n.Runtime(t)}return t}();n.RemoteDebug=t})(t=n.Chromium||(n.Chromium={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t;(function(n){var t=function(n){function t(t){n.call(this,"Inspector",t)}return __extends(t,n),t.prototype.enable=function(){return this.call("enable",undefined)},t.prototype.onInspect=function(n){this.addMessageHander("inspect",function(t){n(t.object)})},t}(n.Command);n.Inspector=t})(t=n.Chromium||(n.Chromium={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t;(function(n){var t=function(n){function t(t){n.call(this,"Runtime",t)}return __extends(t,n),t.prototype.enable=function(){return this.call("enable",undefined)},t.prototype.evaluate=function(n){return this.call("evaluate",n)},t.prototype.getProperties=function(n){return this.call("getProperties",n)},t.prototype.releaseObject=function(n){return this.call("releaseObject",n)},t.prototype.callFunctionOn=function(n){return this.call("callFunctionOn",n)},t.prototype.releaseObjectGroup=function(n){return this.call("releaseObjectGroup",n)},t.prototype.onExecutionContextCreated=function(n){this.addMessageHander("executionContextCreated",n)},t}(n.Command);n.Runtime=t})(t=n.Chromium||(n.Chromium={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){"use strict";var t=function(n){function t(t){n.call(this,"Network",t)}return __extends(t,n),t.prototype.canClearBrowserCache=function(){return this.call("canClearBrowserCache",null)},t.prototype.canClearBrowserCookies=function(){return this.call("canClearBrowserCookies",null)},t.prototype.clearBrowserCache=function(){return this.call("clearBrowserCache",null)},t.prototype.clearBrowserCookies=function(){return this.call("clearBrowserCookies",null)},t.prototype.disable=function(){return this.call("disable",null)},t.prototype.enable=function(){return this.call("enable",null)},t.prototype.getResponseBody=function(n){return this.call("getResponseBody",{requestId:n})},t.prototype.setCacheDisabled=function(n){return this.call("setCacheDisabled",{cacheDisabled:n})},t.prototype.setExtraHTTPHeaders=function(n){return this.call("setExtraHTTPHeaders",{headers:n})},t.prototype.setUserAgentOverride=function(n){return this.call("setUserAgentOverride",{userAgent:n})},t.prototype.onDataReceived=function(n){this.addMessageHander("dataReceived",function(t){n(t)})},t.prototype.onLoadingFailed=function(n){this.addMessageHander("loadingFailed",function(t){n(t)})},t.prototype.onLoadingFinished=function(n){this.addMessageHander("loadingFinished",function(t){n(t)})},t.prototype.onRequestServedFromCache=function(n){this.addMessageHander("requestServedFromCache",function(t){n(t)})},t.prototype.onRequestWillBeSent=function(n){this.addMessageHander("requestWillBeSent",function(t){n(t)})},t.prototype.onResponseReceived=function(n){this.addMessageHander("responseReceived",function(t){n(t)})},t}(n.Command);n.Network=t})(t=n.Chromium||(n.Chromium={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t;(function(n){var t=function(n){function t(t){n.call(this,"Page",t)}return __extends(t,n),t.prototype.enable=function(){return this.call("enable",undefined)},t.prototype.getResourceTree=function(){return this.call("getResourceTree")},t.prototype.onFrameNavigated=function(n){this.addMessageHander("frameNavigated",function(t,i){n(t.frame,i)})},t.prototype.onFrameAttached=function(n){this.addMessageHander("frameAttached",function(t,i){n(t.frameId,i)})},t.prototype.onFrameDetached=function(n){this.addMessageHander("frameDetached",function(t,i){n(t.frameId,i)})},t.prototype.onFrameStartedLoading=function(n){this.addMessageHander("frameStartedLoading",function(t,i){n(t.frameId,i)})},t}(n.Command);n.Page=t})(t=n.Chromium||(n.Chromium={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t;(function(n){var t=function(n){function t(t){n.call(this,"Console",t)}return __extends(t,n),t.prototype.enable=function(){return this.call("enable",undefined)},t.prototype.clearMessages=function(){return this.call("clearMessages",undefined)},t.prototype.addInspectedNode=function(n){return this.call("addInspectedNode",{nodeId:n})},t.prototype.onMessageAdded=function(n){this.addMessageHander("messageAdded",n)},t.prototype.onMessagesCleared=function(n){this.addMessageHander("messagesCleared",n)},t.prototype.onMessageRepeatCountUpdated=function(n){this.addMessageHander("messageRepeatCountUpdated",n)},t}(n.Command);n.Console=t})(t=n.Chromium||(n.Chromium={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,i;(function(n){var i=function(n){function i(t){n.call(this,"DOM",t)}return __extends(i,n),i.prototype.discardSearchResults=function(n){return this.call("discardSearchResults",{searchId:n})},i.prototype.enable=function(){return this.call("enable",undefined)},i.prototype.getAttributes=function(n){var i=this;return new t.Promise(function(t,r){i.call("getAttributes",{nodeId:n}).done(function(n){t(n.attributes)},r)})},i.prototype.getDocument=function(){var n=this;return new t.Promise(function(t,i){n.call("getDocument",undefined).done(function(n){t(n.root)},i)})},i.prototype.getEventEventListenersForNode=function(n){var i=this;return new t.Promise(function(t,r){i.call("getEventListenersForNode",{nodeId:n}).done(function(n){t(n.listeners)},r)})},i.prototype.getOuterHTML=function(n){var i=this;return new t.Promise(function(t,r){i.call("getOuterHTML",{nodeId:n}).done(function(n){t(n.outerHTML)},r)})},i.prototype.getSearchResults=function(n,i,r){var u=this;return new t.Promise(function(t,f){u.call("getSearchResults",{searchId:n,fromIndex:i,toIndex:r}).done(function(n){t(n.nodeIds)},f)})},i.prototype.hideHighlight=function(){return this.call("hideHighlight",undefined)},i.prototype.highlightNode=function(n,t){return this.call("highlightNode",{nodeId:n,highlightConfig:t})},i.prototype.markUndoableState=function(){return this.call("markUndoableState",undefined)},i.prototype.moveTo=function(n,i,r){var u=this;return new t.Promise(function(t,f){u.call("moveTo",{nodeId:n,targetNodeId:i,insertBeforeNodeId:r}).done(function(n){t(n.nodeId)},f)})},i.prototype.onSetChildNodes=function(n){this.addMessageHander("setChildNodes",function(t,i){n(t.parentId,t.nodes,i)})},i.prototype.onDocumentUpdated=function(n){this.addMessageHander("documentUpdated",n)},i.prototype.onInlineStyleInvalidated=function(n){this.addMessageHander("inlineStyleInvalidated",function(t,i){n(t.nodeIds,i)})},i.prototype.onInspectNodeRequested=function(n){this.addMessageHander("inspectNodeRequested",function(t,i){n(t.nodeId,i)})},i.prototype.onAttributeModified=function(n){this.addMessageHander("attributeModified",function(t,i){n(t.nodeId,t.name,t.value,i)})},i.prototype.onAttributeRemoved=function(n){this.addMessageHander("attributeRemoved",function(t,i){n(t.nodeId,t.name,i)})},i.prototype.onCharacterDataModified=function(n){this.addMessageHander("characterDataModified",function(t,i){n(t.nodeId,t.characterData,i)})},i.prototype.onChildNodeCountUpdated=function(n){this.addMessageHander("childNodeCountUpdated",function(t,i){n(t.nodeId,t.childNodeCount,i)})},i.prototype.onChildNodeInserted=function(n){this.addMessageHander("childNodeInserted",function(t,i){n(t.parentNodeId,t.previousNodeId,t.node,i)})},i.prototype.onChildNodeRemoved=function(n){this.addMessageHander("childNodeRemoved",function(t,i){n(t.parentNodeId,t.nodeId,i)})},i.prototype.performSearch=function(n){var i=this;return new t.Promise(function(t,r){i.call("performSearch",{query:n}).done(function(n){t(n)},r)})},i.prototype.querySelector=function(n,i){var r=this;return new t.Promise(function(t,u){r.call("querySelector",{nodeId:n,selector:i}).done(function(n){t(n.nodeId)},u)})},i.prototype.redo=function(){return this.call("redo",undefined)},i.prototype.removeAttribute=function(n,t){return this.call("removeAttribute",{nodeId:n,name:t})},i.prototype.removeNode=function(n){return this.call("removeNode",{nodeId:n})},i.prototype.requestChildNodes=function(n){return this.call("requestChildNodes",{nodeId:n})},i.prototype.requestNode=function(n){return this.call("requestNode",{objectId:n})},i.prototype.setAttributeValue=function(n,t,i){return this.call("setAttributeValue",{nodeId:n,name:t,value:i})},i.prototype.setInspectModeEnabled=function(n,t){return this.call("setInspectModeEnabled",{enabled:n,highlightConfig:t})},i.prototype.setNodeValue=function(n,t){return this.call("setNodeValue",{nodeId:n,value:t})},i.prototype.setOuterHTML=function(n,t){return this.call("setOuterHTML",{nodeId:n,outerHTML:t})},i.prototype.undo=function(){return this.call("undo",undefined)},i}(n.Command);n.DOM=i})(i=n.Chromium||(n.Chromium={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,i;(function(n){var i=function(n){function i(t){n.call(this,"CSS",t)}return __extends(i,n),i.prototype.addRule=function(n,i){var r=this;return new t.Promise(function(t,u){return r.call("addRule",{contextNodeId:n,selector:i}).done(function(n){t(n.rule)},u)})},i.prototype.addRuleByStyleSheetId=function(n,i){var r=this;return new t.Promise(function(t,u){return r.call("addRule",{styleSheetId:n,selector:i}).done(function(n){t(n.rule)},u)})},i.prototype.addRuleByText=function(n,i,r){var u=this;return new t.Promise(function(t,f){return u.call("addRule",{styleSheetId:n,ruleText:i,location:r}).done(function(n){t(n.rule)},f)})},i.prototype.createStyleSheet=function(n){var i=this;return new t.Promise(function(t,r){return i.call("createStyleSheet",{frameId:n}).done(function(n){t(n.styleSheetId)},r)})},i.prototype.enable=function(){return this.call("enable",undefined)},i.prototype.forcePseudoState=function(n,t){return this.call("forcePseudoState",{nodeId:n,forcedPseudoClasses:t})},i.prototype.getComputedStyleForNode=function(n){var i=this;return new t.Promise(function(t,r){return i.call("getComputedStyleForNode",{nodeId:n}).done(function(n){t(n.computedStyle)},r)})},i.prototype.getStyleSheetText=function(n){var i=this;return new t.Promise(function(t,r){return i.call("getStyleSheetText",{styleSheetId:n}).done(function(n){t(n.text)},r)})},i.prototype.getInlineStylesForNode=function(n){var i=this;return new t.Promise(function(t,r){return i.call("getInlineStylesForNode",{nodeId:n}).done(function(n){t(n.inlineStyle)},r)})},i.prototype.getMatchedStylesForNode=function(n){var i=this;return new t.Promise(function(t,r){return i.call("getMatchedStylesForNode",{nodeId:n}).done(function(n){t({inherited:n.inherited,matchedCSSRules:n.matchedCSSRules})},r)})},i.prototype.onStyleSheetAdded=function(n){this.addMessageHander("styleSheetAdded",function(t,i){n(t.header,i)})},i.prototype.onStyleSheetChanged=function(n){this.addMessageHander("styleSheetChanged",function(t,i){n(t.styleSheetId,i)})},i.prototype.onStyleSheetRemoved=function(n){this.addMessageHander("styleSheetRemoved",function(t,i){n(t.styleSheetId,i)})},i.prototype.setPropertyText=function(n,i,r,u){var f=this;return new t.Promise(function(t,e){return f.call("setPropertyText",{styleId:n,propertyIndex:i,text:r,overwrite:u}).done(function(n){t(n.style)},e)})},i.prototype.setPropertyTextByRange=function(n,i,r){var u=this;return new t.Promise(function(t,f){return u.call("setPropertyText",{styleSheetId:n,range:i,text:r}).done(function(n){t(n.style)},f)})},i.prototype.setRuleSelector=function(n,i){var r=this;return new t.Promise(function(t,u){return r.call("setRuleSelector",{ruleId:n,selector:i}).done(function(n){t(n.rule)},u)})},i.prototype.setRuleSelectorByRange=function(n,i,r){var u=this;return new t.Promise(function(t,f){return u.call("setRuleSelector",{styleSheetId:n,range:i,selector:r}).done(function(n){t(n.rule)},f)})},i.prototype.toggleProperty=function(n,t,i){return this.call("toggleProperty",{styleId:n,propertyIndex:t,disable:i})},i}(n.Command);n.CSS=i})(i=n.Chromium||(n.Chromium={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){function f(n,t){return n===t?n!==0||1/n==1/t:n!==n&&t!==t}function u(){var n=new Uint8Array(16),i,r;if(typeof crypto!="undefined")crypto.getRandomValues(n);else if(typeof msCrypto!="undefined")msCrypto.getRandomValues(n);else for(i=0;i<16;i++)n[i]=Math.random()*255|0;return n[6]=n[6]&79|64,n[8]=n[8]&191|128,r=0,t.uuidFormatText.replace(/DD/g,function(){return(n[r]<16?"0":"")+n[r++].toString(16).toLowerCase()})}var r,e,i,o,s;t.origPreventExtensions=Object.preventExtensions;t.origSeal=Object.seal;t.origFreeze=Object.freeze;t.origDefineProperties=Object.defineProperties;t.origDefineProperty=Object.defineProperty;t.origKeys=Object.keys;t.origGetOwnPropertyNames=Object.getOwnPropertyNames;t.origGetOwnPropertyDescriptor=Object.getOwnPropertyDescriptor;t.uuidFormatText="urn:uuid:DDDDDDDD-DDDD-DDDD-DDDD-DDDDDDDDDDDD";r=function(){function n(){}return n.create=function(i){n.Id in i||t.origDefineProperty(i,n.Id,{enumerable:!1,writable:!1,configurable:!1,value:Object.create(null)})},n.has=function(t,i){if(n.Id in t){var r=t[n.Id];if(i in r)return r[i]!==n.UnsetValue}return!1},n.get=function(t,i){if(n.Id in t){var u=t[n.Id],r=u[i];if(r!==n.UnsetValue)return r}},n.set=function(t,i,r){n.create(t);var u=t[n.Id];u[i]=r},n.delete=function(t,i){if(n.Id in t){var r=t[n.Id];if(i in r&&r[i]!==n.UnsetValue)return r[i]=n.UnsetValue,!0}return!1},n.UnsetValue=Object.create(null),n.Id=u(),n}();t.AttachedProperty=r;e=function(){function n(){this._id=u();this._entries=[]}return n.prototype.clear=function(){this._entries.forEach(function(n){n.value=undefined});this._entries=[];this._id=u()},n.prototype.delete=function(n){var t=r.get(n,this._id);return t?(t.value=undefined,r.delete(n,this._id),!0):!1},n.prototype.has=function(n){return r.has(n,this._id)},n.prototype.get=function(n){var t=r.get(n,this._id);if(t)return t.value},n.prototype.set=function(n,t){var i=r.get(n,this._id);return i||(i={value:undefined},this._entries.push(i),r.set(n,this._id,i)),i.value=t,this},n}();t.PolyfillWeakMap=e,function(t){function s(n){var r,e,o,s;if(f(n>>>0&2147483647,n))return n;var u=!1,i=0,t=0;if(isFinite(n)){if(n<0&&(u=!0,n=-n),i=0,n>=Math.pow(2,-1022)){for(r=n;r<1;)i-=1,r*=2;while(r>=2)i+=1,r/=2;i+=1023}i!==0?(e=n/Math.pow(2,i-1023),t=Math.floor((e-1)*Math.pow(2,52))):t=Math.floor(n/Math.pow(2,-1074))}else i=2047,isNaN(n)?(u=!0,t=0x8000000000000):(u=n===-Infinity,t=0);return o=(((u?1:0)<<7|i>>4)<<24|((i&15)<<4|t/281474976710656)<<16|t%281474976710656/1099511627776<<8|t%1099511627776/4294967296)>>>0,s=(t%4294967296/16777216<<24|t%16777216/65536<<16|t%65536/256<<8|t%256)>>>0,(o^10)&2147483647}function r(n){for(var i=1540483477,u=0,f=n.length,t=0^f;f>=2;){var e=n.charCodeAt(u),o=n.charCodeAt(u+1),r=e|o<<16;r*=i;r^=r>>4;r*=i;t*=i;t^=r;u+=2;f-=2}return f===1&&(t^=n.charCodeAt(u),t*=i),t^=t>>13,t*=i,t^t>>15}function l(n){var t=0,f,e,o,h;if(n!==null&&typeof n!="undefined")if(typeof n=="string")t=r(n);else if(typeof n=="number")t=s(n);else if(typeof n=="boolean")t=n>>>0;else if(n instanceof Date)t=s(n.getTime());else if(n instanceof RegExp)t=r(n.toString());else{if(f=!1,"hash"in n&&(e=n.hash,typeof e=="function")){if(o=e.call(n),typeof o!="number")throw new TypeError("Expected number from call to hash()");t=o|0;f=!0}f||(i.has(n)?t=i.get(n):(h=u(),t=r(h),i.set(n,t)))}return t&2147483647}function h(n){var i,t;if((n&1)!=0){for(i=Math.sqrt(n),t=3;t<i;t+=2)if(n%t==0)return!1;return!0}return n===2}function e(n){for(var i,t=0,r=o.length;t<r;t++)if(i=o[t],i>=n)return i;for(t=n|1;t<Math.pow(2,31)-1;t+=2)if(h(t)&&(t-1)%101!=0)return t;return n}function c(n){var t=n<<1;return t>2146435069&&2146435069>n?2146435069:e(t)}function a(n,t,i){for(var u=i%n.buckets.length,r=n.buckets[u];r;r=r.next)if(r.hashCode===i&&f(t,r.key))return r}function v(n){for(var t,u,o,f=c(n.buckets.length),e=n.buckets,i=new Array(f),r=0,s=e.length;r<s;r++)for(t=e[r];t!==null&&typeof t!="undefined";)u=t.hashCode%f,o=t.next,t.next=i[u],i[u]=t,t=o;n.buckets=i}function y(n){for(var t=0,i=n.buckets.length;t<i;t++)n.buckets[t]=null;n.size=0}function p(n,t,i){for(var e=i%n.buckets.length,r=n.buckets[e],u=null;r;u=r,r=r.next)if(r.hashCode===i&&f(t,r.key))return u?u.next=r.next:n.buckets[e]=r.next,r.key=undefined,r.hashCode=undefined,r.next=undefined,n.size--,r}function w(n,t,i){for(var u=n.buckets.length,r;u>0;)for(u--,r=n.buckets[u];r;r=r.next)t.call(i,r)}function b(){var n=Object.create(null);return n.buckets=new Array(e(0)),n.size=0,n}function k(n,t,i,r){var u=Object.create(null);return u.key=n,u.hashCode=t,u.value=i,u.next=r,u}t.LOAD_FACTOR=1;var i=new n.Collections.PolyfillWeakMap,o=[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.computeHash=l;t.isPrime=h;t.getPrime=e;t.expandPrime=c;t.find=a;t.grow=v;t.clear=y;t.remove=p;t.forEach=w;t.createHashMap=b;t.createHashEntry=k}(i=t.Hash||(t.Hash={}));o=function(){function n(){this._hashMap=i.createHashMap()}return Object.defineProperty(n.prototype,"size",{get:function(){return this._hashMap.size},enumerable:!0,configurable:!0}),n.prototype.has=function(n){if(this._hashMap.size===0)return!1;var t=i.computeHash(n);return!!i.find(this._hashMap,n,t)},n.prototype.get=function(n){var r=i.computeHash(n),t=i.find(this._hashMap,n,r);if(t)return t.value},n.prototype.set=function(n,t){var u=i.computeHash(n),r=i.find(this._hashMap,n,u),f;return r?r.value=t:(f=u%this._hashMap.buckets.length,r=i.createHashEntry(n,u,t,this._hashMap.buckets[f]),this._hashMap.buckets[f]=r,this._hashMap.size>=this._hashMap.buckets.length*i.LOAD_FACTOR&&i.grow(this._hashMap),this._hashMap.size++),this},n.prototype.delete=function(n){var r=i.computeHash(n),t=i.remove(this._hashMap,n,r);return t?(t.value=undefined,!0):!1},n.prototype.clear=function(){i.clear(this._hashMap)},n.prototype.forEach=function(n,t){var r=this;i.forEach(this._hashMap,function(i){n.call(t,i.value,i.key,r)})},n}();t.PolyfillMap=o;s=function(){function n(){this._map=new Map}return Object.defineProperty(n.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),n.prototype.has=function(n){return this._map.has(n)},n.prototype.add=function(n){return this._map.set(n,n),this},n.prototype.delete=function(n){return this._map.delete(n)},n.prototype.clear=function(){this._map.clear()},n.prototype.forEach=function(n,t){var i=this;this._map.forEach(function(r,u){n.call(t,r,u,i)})},n}();t.PolyfillSet=s})(t=n.Collections||(n.Collections={}))})(Common||(Common={}));typeof this.Map=="undefined"&&(this.Map=Common.Collections.PolyfillMap,this.WeakMap=Common.Collections.PolyfillWeakMap,this.Set=Common.Collections.PolyfillSet,Object.preventExtensions=function(n){return Common.Collections.AttachedProperty.create(n),Common.Collections.origPreventExtensions.call(Object,n)},Object.seal=function(n){return Common.Collections.AttachedProperty.create(n),Common.Collections.origSeal.call(Object,n)},Object.freeze=function(n){return Common.Collections.AttachedProperty.create(n),Common.Collections.origFreeze.call(Object,n)},Object.defineProperties=function(n,t){return Common.Collections.AttachedProperty.Id in t&&delete t[Common.Collections.AttachedProperty.Id],Common.Collections.origDefineProperties.call(Object,n,t)},Object.defineProperty=function(n,t,i){return t!==Common.Collections.AttachedProperty.Id?Common.Collections.origDefineProperty.call(Object,n,t,i):n},Object.keys=function(n){var t=Common.Collections.origKeys.call(Object,n);return t.filter(function(n){return n!==Common.Collections.AttachedProperty.Id})},Object.getOwnPropertyNames=function(n){var t=Common.Collections.origGetOwnPropertyNames.call(Object,n);return t.filter(function(n){return n!==Common.Collections.AttachedProperty.Id})},Object.getOwnPropertyDescriptor=function(n,t){if(t!==Common.Collections.AttachedProperty.Id)return Common.Collections.origGetOwnPropertyDescriptor.call(Object,n,t)});
//! Copyright (C) Microsoft. All rights reserved.
(function(){"use strict"})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(){}return n.prototype.delay=function(n){this._id&&(window.clearImmediate(this._id),this._id=0);this._id=window.setImmediate(n)},n}();n.Delayer=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(){this._handlers=null;this._eventsRunning=0}return i.prototype.addHandler=function(n){var t=this;return F12.Tools.Utility.Assert.isTrue(typeof n=="function","handler must be function"),this._handlers||(this._handlers=[]),this._handlers.push(n),{unregister:function(){return t.removeHandler(n)}}},i.prototype.addOne=function(n){var t=this.addHandler(function(i){t.unregister();n(i)});return t},i.prototype.removeHandler=function(n){for(var t=this._handlers.length;t--;)if(this._handlers[t]===n){this._eventsRunning>0?this._handlers[t]=null:this._handlers.splice(t,1);return}},i.prototype.invoke=function(n,t){if(this._handlers){this._eventsRunning++;for(var i=0;i<this._handlers.length;i++)this._handlers[i]&&this._handlers[i](n,t);this._eventsRunning--;this._eventsRunning===0&&this.cleanupNullHandlers()}},i.prototype.invokeAsync=function(i){var f,r,u;if(this._handlers){for(this._eventsRunning++,f=[],r=0;r<this._handlers.length;r++)u=this._handlers[r]&&this._handlers[r](i),u&&u.then&&f.push(u);return this._eventsRunning--,this._eventsRunning===0&&this.cleanupNullHandlers(),t.Promise.join(f)}return n.PromiseUtilities.EmptyPromise},i.prototype.cleanupNullHandlers=function(){for(var n=this._handlers.length-1;n>=0;n--)this._handlers[n]||this._handlers.splice(n,1)},i}();n.EventSource=i})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(){"use strict"})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(){"use strict"})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(n){this._sizeLimit=n;this.resetPool()}return Object.defineProperty(n.prototype,"sizeLimit",{get:function(){return this._sizeLimit},enumerable:!0,configurable:!0}),n.prototype.getControl=function(n,t){var i=this.getControlBucket(n,!0);return i.length>0?i.pop():t?t():null},n.prototype.recycleControl=function(n,t){var i=this.getControlBucket(n,!0);this._sizeLimit!==null&&this._sizeLimit!==undefined&&i.length>=this._sizeLimit||i.push(t)},n.prototype.clear=function(n){n?this._pool.delete(n):this.resetPool()},n.prototype.getControlBucket=function(n,t){var i=this._pool.get(n);return!i&&t&&(i=[],this._pool.set(n,i)),i},n.prototype.resetPool=function(){this._pool=new Map},n}();n.ControlPool=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";(function(n){n[n.In=0]="In";n[n.Out=1]="Out"})(n.ItemFilterState||(n.ItemFilterState={}));var i=n.ItemFilterState,t=function(){function t(t){t===void 0&&(t=[]);this._list=t.slice(0);this._filteredList=this._list;this._mutableItemsLog=[];this.propertyChanged=new n.EventSource;this.collectionChanged=new n.EventSource}return Object.defineProperty(t.prototype,"filter",{get:function(){return this._filter},set:function(n){this._filterChangedEventRegistration&&(this._filterChangedEventRegistration.unregister(),this._filterChangedEventRegistration=null);n&&(this._filter=n,this._filterChangedEventRegistration=this._filter.filterChanged.addHandler(this.onFilterChanged.bind(this)))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this._filteredList.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lengthOfOriginalList",{get:function(){return this._list.length},enumerable:!0,configurable:!0}),t.prototype.getFilteredArray=function(){return this._filteredList},t.prototype.getOriginalArray=function(){return this._list},t.prototype.push=function(){for(var n=[],i=0;i<arguments.length;i++)n[+i]=arguments[i];var e=this._list.length,f=Array.prototype.push.apply(this._list,n),u=0,r;return this._filter&&this._filteredList!==this._list?(u=this._filteredList.length,r=this.filterAndPushItems(n),f=r.length):(u=e,r=n),this.propertyChanged.invoke(t.LengthProperty),this.invokeCollectionChanged(0,r,u),f},t.prototype.pop=function(){var n=this._filteredList.pop(),i;return this._filteredList!==this._list&&(i=this._list.lastIndexOf(n),F12.Tools.Utility.Assert.isTrue(i>=0,"Unable to pop unknown item"),this._list.splice(i,1)),this.propertyChanged.invoke(t.LengthProperty),this.invokeCollectionChanged(1,null,null,[n],this._filteredList.length),n},t.prototype.indexOf=function(n,t){return this._filteredList.indexOf(n,t)},t.prototype.indexOfFromOriginalList=function(n,t){return this._list.indexOf(n,t)},t.prototype.lastIndexOf=function(n,t){return t===void 0&&(t=-1),this._filteredList.lastIndexOf(n,t)},t.prototype.lastIndexOfFromOriginalList=function(n,t){return t===void 0&&(t=-1),this._list.lastIndexOf(n,t)},t.prototype.clear=function(){var n=this._list;this._list=[];this._filteredList=[];this.clearBacklogFilterItems();this.propertyChanged.invoke(t.LengthProperty);this.invokeCollectionChanged(3,null,null,n,0)},t.prototype.onFilterChanged=function(){this.runFilter()},t.prototype.map=function(n,t){return this._filteredList.map(n,t)},t.prototype.getItem=function(n){return this._filteredList[n]},t.prototype.getItemFromOriginalList=function(n){return this._list[n]},t.prototype.resetItems=function(n){this._list=n.slice(0);this._filteredList=this._list;return this.runFilter().length},t.prototype.runFilter=function(){this.clearBacklogFilterItems();this._filteredList=[];var n=this.filterAndPushItems(this._list);return this.propertyChanged.invoke(t.LengthProperty),this.invokeCollectionChanged(2),n},t.prototype.filterAndPushItems=function(n){for(var t,u,i=[],r=0;r<n.length;r++)t=n[r],u=this._filter.getFilterState(t),u===0&&i.push(t),this._filter.isFilteredValueMutable(t)&&t.propertyChanged&&this._mutableItemsLog.push({item:t,position:this._filteredList.length+i.length,propertyChangedEventRegistration:t.propertyChanged.addHandler(this.backlogItemPropertyChanged.bind(this,t))});return Array.prototype.push.apply(this._filteredList,i),i},t.prototype.clearBacklogFilterItems=function(){for(var n=0;n<this._mutableItemsLog.length;n++)this._mutableItemsLog[n].propertyChangedEventRegistration&&this._mutableItemsLog[n].propertyChangedEventRegistration.unregister();this._mutableItemsLog=[]},t.prototype.backlogItemPropertyChanged=function(n,i){if(this._filteredList!==this._list&&this.filter.isValidFilterProperty(i)){var r=this.findBacklogItem(n),f=this._filter.getFilterState(r.item),u=this._filteredList.indexOf(n);f===0&&u===-1?(this._filteredList.splice(r.position,0,r.item),this.propertyChanged.invoke(t.LengthProperty),this.invokeCollectionChanged(0,[r.item],r.position)):f===1&&u>-1&&(this._filteredList.splice(u,1),this.propertyChanged.invoke(t.LengthProperty),this.invokeCollectionChanged(1,[n],u));this._filter.isFilteredValueMutable(r.item)||this.removeItemFromBacklog(r)}},t.prototype.findBacklogItem=function(n){for(var i,t=0;t<this._mutableItemsLog.length;t++)if(this._mutableItemsLog[t].item===n){i=this._mutableItemsLog[t];break}return i},t.prototype.removeItemFromBacklog=function(n){var i=this._mutableItemsLog.indexOf(n),t;if(this._mutableItemsLog.splice(i,1),i>-1)for(t=i;t<this._mutableItemsLog.length;t++)this._mutableItemsLog[t].position++;n.propertyChangedEventRegistration.unregister()},t.prototype.invokeCollectionChanged=function(n,t,i,r,u){var f={action:n,newItems:t,newStartingIndex:i,oldItems:r,oldStartingIndex:u};this.collectionChanged.invoke(f)},t.LengthProperty="length",t}();n.FilteredObservableCollection=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function t(t){t===void 0&&(t=[]);this._list=t.slice(0);this.propertyChanged=new n.EventSource;this.collectionChanged=new n.EventSource}return Object.defineProperty(t.prototype,"length",{get:function(){return this._list.length},enumerable:!0,configurable:!0}),t.prototype.getInternalArray=function(){return this._list},t.prototype.push=function(){for(var r,u,i=[],n=0;n<arguments.length;n++)i[+n]=arguments[n];return r=this._list.length,u=Array.prototype.push.apply(this._list,i),this.propertyChanged.invoke(t.LengthProperty),this.invokeCollectionChanged(0,i,r),u},t.prototype.pop=function(){var n=this._list.pop();return this.propertyChanged.invoke(t.LengthProperty),this.invokeCollectionChanged(1,null,null,[n],this._list.length),n},t.prototype.splice=function(n,i){for(var f,r=[],u=2;u<arguments.length;u++)r[u-2]=arguments[u];f=[n,i];r&&Array.prototype.push.apply(f,r);var e=Array.prototype.splice.apply(this._list,f),o=e.length>0,s=r&&r.length>0;return(o||s)&&(this.propertyChanged.invoke(t.LengthProperty),o&&this.invokeCollectionChanged(1,null,null,e,n),s&&this.invokeCollectionChanged(0,r,n,null,null)),e},t.prototype.indexOf=function(n,t){return this._list.indexOf(n,t)},t.prototype.lastIndexOf=function(n,t){return t===void 0&&(t=-1),this._list.lastIndexOf(n,t)},t.prototype.clear=function(){var n=this._list;this._list=[];this.propertyChanged.invoke(t.LengthProperty);this.invokeCollectionChanged(3,null,null,n,0)},t.prototype.filter=function(n,t){return this._list.filter(n,t)},t.prototype.map=function(n,t){return this._list.map(n,t)},t.prototype.getItem=function(n){return this._list[n]},t.prototype.resetItems=function(n){this._list=[];var i=Array.prototype.push.apply(this._list,n);return this.propertyChanged.invoke(t.LengthProperty),this.invokeCollectionChanged(2),i},t.prototype.invokeCollectionChanged=function(n,t,i,r,u){var f={action:n,newItems:t,newStartingIndex:i,oldItems:r,oldStartingIndex:u};this.collectionChanged.invoke(f)},t.LengthProperty="length",t}();n.ObservableCollection=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function t(){this.propertyChanged=new n.EventSource}return t.fromObject=function(n){if(typeof n.propertyChanged!="undefined")return n;var r=new t,u={};return Object.defineProperties(r,i.expandProperties(n,u,r)),r._backingData=u,r},t}(),i;n.Observable=t;i=function(){function n(){}return n.defineProperty=function(n,t,i,r,u){var f="_"+t;Object.defineProperty(n.prototype,t,{get:function(){return typeof this[f]=="undefined"&&(this[f]=i),this[f]},set:function(n){var i=this[f],e;n!==i&&(u&&u(this,i,n),this[f]=n,e=this,e.propertyChanged.invoke(t,e),r&&r(this,i,n))}})},n.describePropertyForObjectShape=function(n,i,r,u){var f={get:function(){return r[n]},enumerable:!0},e=i[n];return typeof e=="object"?(r[n]=t.fromObject(e),f.set=function(i){i!==r[n]&&(r[n]=t.fromObject(i),u.propertyChanged.invoke(n,u))}):(r[n]=e,f.set=function(t){t!==r[n]&&(r[n]=t,u.propertyChanged.invoke(n,u))}),f},n.expandProperties=function(t,i,r){var u={};for(var f in t)u[f]=n.describePropertyForObjectShape(f,t,i,r);return u},n}();n.ObservableHelpers=i})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(){"use strict"})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";(function(n){n[n.Add=0]="Add";n[n.Remove=1]="Remove";n[n.Reset=2]="Reset";n[n.Clear=3]="Clear"})(n.CollectionChangedAction||(n.CollectionChangedAction={}));var t=n.CollectionChangedAction})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t,i,r,u;n.targetAccessViaProperty={getValue:function(n,t){return n[t]},isSourceSupported:function(n){return!!n},isValueSupported:function(n){return n!==undefined},setValue:function(n,t,i,r){n[t]=r}};n.targetAccessForModel={getValue:function(n){return n.model},isSourceSupported:function(){return!0},isValueSupported:function(){return!0},setValue:function(n,t,i,r){n.model=r}};n.targetAccessViaAttribute={getValue:function(n,t){return n.getAttribute(t)},isSourceSupported:function(n){return!!n},isValueSupported:function(){return!0},setValue:function(n,t,i,r){r===null||r===undefined?n.removeAttribute(t):n.setAttribute(t,r)}};n.targetAccessForClass={getValue:function(n,t){return n.classList.contains(t)},isSourceSupported:function(n){return!!n},isValueSupported:function(n){return n!==null&&n!==undefined},setValue:function(n,t,i,r){F12.Tools.Utility.Assert.isTrue(r!==null&&r!==undefined,"Unexpected value");r?n.classList.add(t):n.classList.remove(t)}};t=function(){function n(){}return n.prototype.getValue=function(){return F12.Tools.Utility.Assert.fail("Event doesn't support two-way binding."),null},n.prototype.isSourceSupported=function(){return!0},n.prototype.isValueSupported=function(){return!0},n.prototype.setValue=function(){},n}();n.TargetAccessForEventBase=t;i=function(n){function t(){n.apply(this,arguments)}return __extends(t,n),t.prototype.setValue=function(n,t,i,r){if(this._eventRegistration&&(this._eventRegistration.unregister(),this._eventRegistration=null),i&&r){var u=n[t];u&&(this._eventRegistration=u.addHandler(r.bind(i)))}},t}(t);n.TargetAccessForEventSource=i;r=function(n){function t(){n.apply(this,arguments)}return __extends(t,n),t.prototype.setValue=function(n,t,i,r){this._previousAddedHandler&&(n.removeEventListener(t,this._previousAddedHandler),this._previousAddedHandler=null);i&&r&&(this._previousAddedHandler=r.bind(i),n.addEventListener(t,this._previousAddedHandler))},t}(t);n.TargetAccessForHTMLEvent=r;u=function(){function t(i,r,u,f,e,o,s){var c=this,h;F12.Tools.Utility.Assert.hasValue(r,"sourceExpression");F12.Tools.Utility.Assert.hasValue(u,"destination");F12.Tools.Utility.Assert.hasValue(f,"destinationProperty");o=o||t.ONE_WAY_MODE;h=r.split(".");this._source=null;this._sourceChangedRegistration=null;this._destChangedRegistration=null;this._sourceProperty=h[0];this._childBinding=null;this._paused=!1;this._twoWay=!1;this._converter=e;this._destination=u;this._destinationProperty=f;this._targetAccess=s||n.targetAccessViaProperty;h.length>1?(h.splice(0,1),this._childBinding=new t(null,h.join("."),u,f,e,o,this._targetAccess)):o.toLowerCase()===t.TWO_WAY_MODE&&(this._twoWay=!0,this._destChangedRegistration=this.attachChangeHandler(u,function(n){var t=n;(typeof t!="string"||t===null||t===c._destinationProperty)&&c.updateSourceFromDest()}));this.setSource(i)}return t.prototype.isForDestination=function(n,t){return n===this._destination&&t===this._destinationProperty},t.prototype.unbind=function(){this._source=null;this._sourceChangedRegistration&&(this._sourceChangedRegistration.unregister(),this._sourceChangedRegistration=null);this._childBinding&&(this._childBinding.unbind(),this._childBinding=null);this._destChangedRegistration&&(this._destChangedRegistration.unregister(),this._destChangedRegistration=null)},t.prototype.updateSourceFromDest=function(){if(this._source&&this._twoWay){this._paused=!0;var n=this._targetAccess.getValue(this._destination,this._destinationProperty);this._converter&&(n=this._converter.convertFrom(n));this._source[this._sourceProperty]=n;this._paused=!1}},t.prototype.updateDestination=function(){if(!this._paused){this._paused=!0;var n=this.getValue();this._childBinding?this._childBinding.setSource(n):this._targetAccess.isSourceSupported(this._source)&&(this._converter&&(n=this._converter.convertTo(n)),this._targetAccess.isValueSupported(n)&&this._targetAccess.setValue(this._destination,this._destinationProperty,this._source,n));this._paused=!1}},t.prototype.setSource=function(n){var t=this;this._sourceChangedRegistration&&(this._sourceChangedRegistration.unregister(),this._sourceChangedRegistration=null);this._source=n;this._source&&(this._sourceChangedRegistration=this.attachChangeHandler(this._source,function(n){(typeof n!="string"||n===null||n===t._sourceProperty)&&t.updateDestination()}));this.updateDestination();this.updateSourceFromDest()},t.prototype.attachChangeHandler=function(n,t){if(n.propertyChanged)return n.propertyChanged.addHandler(t);var i=n;if((i.tagName==="INPUT"||i.tagName==="SELECT")&&i.addEventListener&&i.removeEventListener)return i.addEventListener("change",t),{unregister:function(){return i.removeEventListener("change",t)}}},t.prototype.getValue=function(){return this._source&&this._source[this._sourceProperty]},t.ONE_WAY_MODE="oneway",t.TWO_WAY_MODE="twoway",t}();n.Binding=u}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,r,i;(function(n){n[n.On=0]="On";n[n.Off=1]="Off";n[n.Disabled=2]="Disabled"})(n.Tristate||(n.Tristate={}));r=n.Tristate;i=function(){function i(){}return i.initialize=function(){i.AriaConverterElement=document.createElement("span");i.CreateShortenedUrlConverter=i.getCreateShortenedUrlConverter();i.HtmlTooltipFromResourceConverter=i.getHtmlTooltipFromResourceConverter();i.IntToStringConverter=i.getIntToStringConverter();i.IntToStringWithGroupSeperatorConverter=i.getIntToStringWithGroupSeperatorConverter();i.IntToBooleanConverter=i.getIntToBooleanConverter();i.InvertBool=i.invertBoolConverter();i.IsTabbableToTabIndexConverter=i.getIsTabbableToTabIndexConverter();i.JsonHtmlTooltipToInnerTextConverter=i.getJsonHtmlTooltipToInnerTextConverter();i.NotDisabledToTrue=i.getNotDisabledToTrueConverter();i.NullPermittedConverter=i.getNullPermittedConverter();i.OnToTrue=i.getOnToTrueConverter();i.ResourceConverter=i.getResourceConverter();i.StringToBooleanConverter=i.getStringToBooleanConverter();i.StringToIntConverter=i.getStringToIntConverter();i.ThemedImageConverter=i.getThemedImageConverter()},i.getCreateShortenedUrlConverter=function(){return{convertTo:function(t){return n.ToolWindowHelpers.createShortenedUrlText(t)},convertFrom:null}},i.getResourceConverter=function(){return{convertTo:function(n){return n?t.Resources.getString(n):""},convertFrom:null}},i.getThemedImageConverter=function(){return{convertTo:function(n){return t.Theme.getValue(n)},convertFrom:null}},i.getStringToBooleanConverter=function(){return{convertTo:function(n){return n==="true"?!0:!1},convertFrom:function(n){return n?"true":"false"}}},i.getStringToIntConverter=function(){return{convertTo:function(n){return n>>0},convertFrom:function(n){return n.toString()}}},i.getIntToStringConverter=function(){return{convertTo:function(n){return n!==null&&n!==undefined?n.toString():""},convertFrom:function(n){return n>>0}}},i.getIntToStringWithGroupSeperatorConverter=function(){return{convertTo:function(t){return t!==null&&t!==undefined?n.FormattingHelpers.getDecimalLocaleString(t,!0):""},convertFrom:function(n){var i=t.Culture.NumberFormat;return i&&i.numberGroupSeparator&&(n=n.replace(i.numberGroupSeparator,"")),n>>0}}},i.getIntToBooleanConverter=function(){return{convertTo:function(n){return!!n},convertFrom:function(n){return n?1:0}}},i.invertBoolConverter=function(){return{convertTo:function(n){return!n},convertFrom:function(n){return!n}}},i.getIsTabbableToTabIndexConverter=function(){return{convertTo:function(n){return n?0:-1},convertFrom:null}},i.getHtmlTooltipFromResourceConverter=function(){return{convertTo:function(n){return JSON.stringify({content:t.Resources.getString(n),contentContainsHTML:!0})},convertFrom:null}},i.getJsonHtmlTooltipToInnerTextConverter=function(){return{convertTo:function(n){var t,r;if(n.match(i.JSONRegex))try{return t=JSON.parse(n),t.contentContainsHTML?(i.AriaConverterElement.innerHTML=t.content,r=i.AriaConverterElement.innerText,i.AriaConverterElement.innerHTML="",r):t.content}catch(u){}return n},convertFrom:null}},i.getNotDisabledToTrueConverter=function(){return{convertTo:function(n){return n!==2&&n!==null&&typeof n!="undefined"},convertFrom:null}},i.getNullPermittedConverter=function(){return{convertTo:function(n){return n},convertFrom:function(n){return n}}},i.getOnToTrueConverter=function(){return{convertTo:function(n){return n===0},convertFrom:function(n){return n?0:1}}},i.JSONRegex=/^\{.*\}$/,i}();n.CommonConverters=i;i.initialize()})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(){"use strict"})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function t(t,i){F12.Tools.Utility.Assert.areEqual(typeof t,"function","The given control '"+t+"' ("+typeof t+") doesn't represent a control.");this.controlType=t;this.templateId=i;this.isTemplateContorl=this.controlType===n.TemplateControl||this.controlType.prototype instanceof n.TemplateControl}return t.createFromString=function(n){var f,r,i,e,u;return F12.Tools.Utility.Assert.isTrue(!!n,"Invalid control construction string."),r=n.split(/[()]/,2),r&&r.length>0&&(i=r[0],i&&(i=i.trim()),F12.Tools.Utility.Assert.isTrue(!!i,"Invalid control construction string. The control class name is required."),e=t.getControlType(i),u=r[1],u&&(u=u.trim()),f=new t(e,u)),F12.Tools.Utility.Assert.isTrue(!!f,"Invalid control construction string."),f},t.createFromObject=function(n){if(n instanceof t)return n;var i=n;return F12.Tools.Utility.Assert.areEqual(typeof i,"function","The given control '"+i+"' doesn't represent a control type which implements IControl."),new t(i)},t.createFromStringOrType=function(n){return typeof n=="string"?t.createFromString(n):t.createFromObject(n)},t.prototype.getNewControl=function(){return this.isTemplateContorl?new this.controlType(this.templateId):new this.controlType},t.getControlType=function(n){var t,r,i,u;for(F12.Tools.Utility.Assert.isTrue(!!n,"Invalid control name."),t=window,r=n.split("."),i=0;i<r.length;i++)u=r[i],t=t[u],F12.Tools.Utility.Assert.hasValue(t,"Couldn't find the control with the given name '"+n+"'.");return F12.Tools.Utility.Assert.areEqual(typeof t,"function","The given control '"+n+"' doesn't represent a control type which implements IControl."),t},t}();n.ControlConstruction=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(){"use strict"})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(){var n=function(){function n(){}return n}()})(ControlTemplates||(ControlTemplates={})),function(n){"use strict";var t=function(){function n(n){F12.Tools.Utility.Assert.hasValue(n,"Invalid template container.");this._container=n;this._registeredTemplates={}}return n.prototype.getTemplateString=function(n){var t,i,u,r,f;if(F12.Tools.Utility.Assert.isTrue(!!n,"Invalid template ID."),t=this._registeredTemplates[n],!t){for(i=this._container,u=n.split("."),r=0;r<u.length;r++)f=u[r],i=i[f],F12.Tools.Utility.Assert.isTrue(!!i,"Couldn't find the template with the given ID '"+n+"'.");t=i}return F12.Tools.Utility.Assert.areEqual(typeof t,"string","The given template name doesn't point to a template."),t},n.prototype.registerTemplateString=function(n,t){F12.Tools.Utility.Assert.isTrue(!!n,"Invalid template ID.");F12.Tools.Utility.Assert.isUndefined(this._registeredTemplates[n],"Template with id '"+n+"' already registered.");this._registeredTemplates[n]=t},n}();n.ScriptTemplateRepository=t;n.templateRepository=new t(ControlTemplates)}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(){}return n.BINDING="data-binding",n.CONTROL="data-control",n.NAME="data-name",n.CONTROL_TEMPLATE_ID=n.CONTROL+"-templateId",n.CONTROL_BINDING="data-controlbinding",n.OPTIONS="data-options",n.TEMPLATE_ID_OPTION=n.OPTIONS+"-templateId",n}();n.TemplateDataAttributes=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function t(n){F12.Tools.Utility.Assert.hasValue(n,"Invalid template repository.");this._parsingNode=document.createElement("div");this._repository=n;this._templateCache={};this._visitedControls={};this._visitedTemplates={}}return Object.defineProperty(t.prototype,"repository",{get:function(){return this._repository},enumerable:!0,configurable:!0}),t.prototype.loadTemplate=function(n){var t=this._templateCache[n],i,r;if(!t){i=this._repository.getTemplateString(n);F12.Tools.Utility.Assert.isFalse(this._visitedTemplates[n],"Detected a recursive template. TemplateId '"+n+"' is part of the parents hierarchy.");this._visitedTemplates[n]=!0;try{t=this.loadTemplateUsingHtml(i)}finally{this._visitedTemplates[n]=!1}this._templateCache[n]=t}return r=t.cloneNode(!0),this.resolvePlaceholders(r)},t.prototype.loadTemplateUsingHtml=function(n){var i,r,u,f,t;for(this._parsingNode.innerHTML=n,F12.Tools.Utility.Assert.areEqual(this._parsingNode.childElementCount,1,"Template should have only one root element."),i=this._parsingNode.children[0],this._parsingNode.removeChild(i),r=[i];r.length>0;)for(u=r.pop(),f=u.childNodes.length-1;f>=0;f--)t=u.childNodes.item(f),t.nodeType===Node.COMMENT_NODE?u.removeChild(t):t.hasChildNodes()&&r.push(t);return i},t.prototype.getControlInstance=function(t,i){var u,r;return F12.Tools.Utility.Assert.isTrue(!!t,"Invalid control name."),u=n.ControlConstruction.createFromString(t),i&&(u.templateId=i),r=u.getNewControl(),F12.Tools.Utility.Assert.hasValue(r.rootElement,"The given control '"+t+"' doesn't represent a control type which implements IControl."),r.rootElement.control!==r&&(r.rootElement.control=r),r},t.prototype.resolvePlaceholders=function(t){var r,u,i,f;if(t.hasAttribute(n.TemplateDataAttributes.CONTROL))t=this.resolvePlaceholder(t);else for(r=t.querySelectorAll("div["+n.TemplateDataAttributes.CONTROL+"]"),u=r.length,i=0;i<u;i++)f=r[i],this.resolvePlaceholder(f);return t},t.prototype.resolvePlaceholder=function(t){var s,r,u,e;F12.Tools.Utility.Assert.isFalse(t.hasChildNodes(),"Control placeholders cannot have children.");var o=t.getAttribute(n.TemplateDataAttributes.CONTROL),f=t.getAttribute(n.TemplateDataAttributes.CONTROL_TEMPLATE_ID),i=o+(f?","+f:"");F12.Tools.Utility.Assert.isFalse(this._visitedControls[i],"Detected a recursive control. Control '"+i+"' is part of the parents hierarchy.");this._visitedControls[i]=!0;try{s=this.getControlInstance(o,f)}finally{this._visitedControls[i]=!1}for(r=s.rootElement,u=0;u<t.attributes.length;u++)e=t.attributes[u],r.setAttribute(e.name,e.value);return t.parentElement&&t.parentElement.replaceChild(r,t),r},t}();n.TemplateLoader=t;n.templateLoader=new t(n.templateRepository)})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=function(t){function i(n){t.call(this);this.onInitializeOverride();this._templateId=n;this.setRootElementFromTemplate()}return __extends(i,t),Object.defineProperty(i.prototype,"model",{get:function(){return this._model},set:function(n){this._model!==n&&(this._model=n,this.onModelChanging(),this.propertyChanged.invoke(i.ModelPropertyName),this.onModelChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tabIndex",{get:function(){return this._tabIndex?this._tabIndex:0},set:function(n){if(this._tabIndex!==n){var t=this._tabIndex;this._tabIndex=n>>0;this.propertyChanged.invoke(i.TabIndexPropertyName);this.onTabIndexChanged(t,this._tabIndex)}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"templateId",{get:function(){return this._templateId},set:function(n){this._templateId!==n&&(this._templateId=n,this._binding.unbind(),this.setRootElementFromTemplate(),this.propertyChanged.invoke(i.TemplateIdPropertyName))},enumerable:!0,configurable:!0}),i.initialize=function(){n.ObservableHelpers.defineProperty(i,i.ClassNamePropertyName,null,function(n,t,i){return n.onClassNameChanged(t,i)});n.ObservableHelpers.defineProperty(i,i.IsEnabledPropertyName,!0,function(n){return n.onIsEnabledChanged()});n.ObservableHelpers.defineProperty(i,i.IsVisiblePropertyName,!0,function(n){return n.onIsVisibleChanged()});n.ObservableHelpers.defineProperty(i,i.TooltipPropertyName,null,function(n){return n.onTooltipChanged()})},i.prototype.getBinding=function(n,t){var i;return this._binding&&(i=this._binding.findBinding(n,t)),i},i.prototype.onApplyTemplate=function(){this.onClassNameChanged(null,this.className);this.onIsVisibleChanged();this.onTabIndexChanged(null,this._tabIndex);this.onTooltipChanged()},i.prototype.onInitializeOverride=function(){},i.prototype.onModelChanged=function(){},i.prototype.onModelChanging=function(){},i.prototype.onTemplateChanging=function(){},i.prototype.getNamedControl=function(n){var t=this.getNamedElement(n);return t?t.control:null},i.prototype.getNamedElement=function(t){var r=[],i,f,u;for(r.push(this.rootElement);r.length>0;){if(i=r.pop(),i.getAttribute(n.TemplateDataAttributes.NAME)===t)return i;if(i.children&&(!i.hasAttribute(n.TemplateDataAttributes.CONTROL)||i===this.rootElement))for(f=i.children.length,u=0;u<f;u++)r.push(i.children[u])}return null},i.prototype.onIsEnabledChangedOverride=function(){},i.prototype.onIsVisibleChangedOverride=function(){},i.prototype.onTabIndexChangedOverride=function(){},i.prototype.onTooltipChangedOverride=function(){},i.prototype.onClassNameChanged=function(n,t){var r,u,i;if(this.rootElement){if(n)for(r=n.split(" "),i=0;i<r.length;i++)this.rootElement.classList.remove(r[i]);if(t)for(u=t.split(" "),i=0;i<u.length;i++)this.rootElement.classList.add(u[i])}},i.prototype.onIsEnabledChanged=function(){if(this.rootElement){if(this.isEnabled){this.rootElement.classList.remove(i.CLASS_DISABLED);this.rootElement.removeAttribute("aria-disabled");this.onTabIndexChanged(this._tabIndex,this._tabIndex)}else this.rootElement.classList.add(i.CLASS_DISABLED),this.rootElement.setAttribute("aria-disabled",!0),this.rootElement.tabIndex=-1;this.onIsEnabledChangedOverride()}},i.prototype.onIsVisibleChanged=function(){if(this.rootElement){if(this.isVisible){this.rootElement.classList.remove(i.CLASS_HIDDEN);this.rootElement.removeAttribute("aria-hidden");this.onTabIndexChanged(this._tabIndex,this._tabIndex)}else this.rootElement.classList.add(i.CLASS_HIDDEN),this.rootElement.setAttribute("aria-hidden","true"),this.rootElement.tabIndex=-1;this.onIsVisibleChangedOverride()}},i.prototype.onTabIndexChanged=function(n,t){this.rootElement&&(this.isEnabled&&this.isVisible&&(n||t||t===0)&&(this.rootElement.tabIndex=t),n!==t&&this.onTabIndexChangedOverride())},i.prototype.onTooltipChanged=function(){this.rootElement&&this.onTooltipChangedOverride()},i.prototype.setRootElementFromTemplate=function(){var t,i;this.onTemplateChanging();this.rootElement&&(t=this.rootElement,this.rootElement.control=null);this.rootElement=this._templateId?n.templateLoader.loadTemplate(this._templateId):document.createElement("div");t&&(i=t.attributes.getNamedItem(n.TemplateDataAttributes.NAME),i&&this.rootElement.setAttribute(i.name,i.value));this.rootElement.control=this;this._binding=new n.TemplateDataBinding(this);t&&t.parentElement&&t.parentElement.replaceChild(this.rootElement,t);this.onApplyTemplate()},i.CLASS_DISABLED="disabled",i.CLASS_HIDDEN="BPT-hidden",i.ClassNamePropertyName="className",i.IsEnabledPropertyName="isEnabled",i.IsVisiblePropertyName="isVisible",i.ModelPropertyName="model",i.TabIndexPropertyName="tabIndex",i.TemplateIdPropertyName="templateId",i.TooltipPropertyName="tooltip",i}(n.Observable);n.TemplateControl=t;t.initialize()}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function t(n){this._bindings=t.bind(n)}return t.prototype.findBinding=function(n,t){var u,i,r;if(this._bindings)for(i=0;i<this._bindings.length;i++)if(r=this._bindings[i],r.isForDestination(n,t)){u=r;break}return u},t.prototype.unbind=function(){if(this._bindings)for(var n=0;n<this._bindings.length;n++)this._bindings[n].unbind();this._bindings=null},t.buildBindingCommand=function(i,r,u,f,e){var o=n.targetAccessViaProperty,s;return i===r?u.substr(0,t.STYLE_PREFIX.length)===t.STYLE_PREFIX?(i=r.style,u=u.substr(t.STYLE_PREFIX.length)):u.substr(0,t.ATTRIBUTE_PREFIX.length)===t.ATTRIBUTE_PREFIX?(u=u.substr(t.ATTRIBUTE_PREFIX.length),o=n.targetAccessViaAttribute):u.substr(0,t.CONTROL_PREFIX.length)===t.CONTROL_PREFIX&&(s=r,i=s.control,u=u.substr(t.CONTROL_PREFIX.length)):u===n.TemplateControl.ModelPropertyName&&(o=n.targetAccessForModel),u.substr(0,t.CLASS_PREFIX.length)===t.CLASS_PREFIX?(i=r,u=u.substr(t.CLASS_PREFIX.length),o=n.targetAccessForClass):u.substr(0,t.EVENT_PREFIX.length)===t.EVENT_PREFIX&&(u=u.substr(t.EVENT_PREFIX.length),i[u]instanceof n.EventSource?o=new n.TargetAccessForEventSource:(i=r,typeof i["on"+u]!="undefined"&&i.addEventListener&&i.removeEventListener?o=new n.TargetAccessForHTMLEvent:F12.Tools.Utility.Assert.fail("Trying to bind an event but the target doesn't seem to carry that event. Event name: "+u))),{target:i,targetAccess:o,targetName:u,source:f,value:e}},t.extractBindingCommandsForBinding=function(n,i,r,u,f){for(var e,o,c,l=u.split(","),a=l.length,s=0;s<a;s++){e=l[s];o=e.split(":",2);F12.Tools.Utility.Assert.areEqual(o.length,2,"Invalid binding syntax, the keyvalue pair should have the syntax target:source '"+e+"'.");var v=o[0].trim(),y=o[1].trim(),h=t.parseSourceSyntax(y);f||(h.name=t.MODEL_PREFIX+h.name);c=t.buildBindingCommand(i,r,v,h,null);F12.Tools.Utility.Assert.isTrue(!!c.targetName,"Invalid binding syntax. Target name is missing '"+e+"'.");n.push(c)}},t.extractBindingCommandsForOptions=function(n,i,r,u){for(var f,e,c,l=u.split(","),a=l.length,s=0;s<a;s++){f=l[s];e=f.split(":",2);F12.Tools.Utility.Assert.areEqual(e.length,2,"Invalid options syntax, the keyvalue pair should have the syntax target:source '"+f+"'.");var v=e[0].trim(),y=e[1].trim(),o=t.parseSourceSyntax(y),h=o.name;o.converter&&o.converter.convertTo&&(h=o.converter.convertTo(h));c=t.buildBindingCommand(i,r,v,null,h);F12.Tools.Utility.Assert.isTrue(!!c.targetName,"Invalid option syntax. Target name is missing '"+f+"'.");n.push(c)}},t.getBindingCommands=function(i){var f,e=[],u,c,l,h;for(e.push(i.rootElement);e.length>0;){var r=e.pop(),o=r.control,s=r;if(o&&o!==i&&(s=o),s&&(u=r.getAttributeNode(n.TemplateDataAttributes.BINDING),u&&(f=f||[],t.extractBindingCommandsForBinding(f,s,r,u.value,!1),r.removeAttributeNode(u)),u=r.getAttributeNode(n.TemplateDataAttributes.CONTROL_BINDING),u&&(f=f||[],t.extractBindingCommandsForBinding(f,s,r,u.value,!0),r.removeAttributeNode(u)),u=r.getAttributeNode(n.TemplateDataAttributes.OPTIONS),u&&(f=f||[],c=o||r,t.extractBindingCommandsForOptions(f,c,r,u.value),r.removeAttributeNode(u))),r.children&&(!r.hasAttribute(n.TemplateDataAttributes.CONTROL)||r===i.rootElement))for(l=r.children.length,h=0;h<l;h++)e.push(r.children[h])}return f},t.bind=function(i){var u,e=t.getBindingCommands(i),o,f,r,s;if(e)for(u=[],o=e.length,f=0;f<o;f++)r=e[f],r.source?(s=new n.Binding(i,r.source.name,r.target,r.targetName,r.source.converter,r.source.mode,r.targetAccess),u.push(s)):r.value!==undefined&&r.targetAccess.setValue(r.target,r.targetName,null,r.value);return u&&u.length>0?u:null},t.getConverterInstance=function(n){for(var u,t=window,r=n.split("."),i=0;i<r.length;i++)u=r[i],t=t[u],F12.Tools.Utility.Assert.hasValue(t,"Couldn't find the converter instance with the given name '"+n+"'.");return F12.Tools.Utility.Assert.hasValue(t.convertFrom||t.convertTo,"The converter instance with the given name '"+n+"' doesn't point to a valid converter instance."),t},t.parseSourceSyntax=function(n){var r,u,f,i;for(F12.Tools.Utility.Assert.isTrue(!!n,"Invalid binding syntax."),r=n.split(";"),u={name:r[0].trim()},f=1;f<r.length;f++){i=r[f].split("=",2);F12.Tools.Utility.Assert.areEqual(i.length,2,"Invalid binding syntax, the keyvalue pair should have the syntax key=value.");switch(i[0].trim().toLowerCase()){case"mode":u.mode=i[1].trim().toLowerCase();break;case"converter":u.converter=t.getConverterInstance(i[1].trim())}}return u},t.ATTRIBUTE_PREFIX="attr-",t.CLASS_PREFIX="class-",t.CONTROL_PREFIX="control.",t.EVENT_PREFIX="event-",t.MODEL_PREFIX="model.",t.STYLE_PREFIX="style.",t}();n.TemplateDataBinding=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";(function(n){n[n.Next=0]="Next";n[n.Previous=1]="Previous"})(n.NavigationDirection||(n.NavigationDirection={}));var t=n.NavigationDirection})(t=n.Controls||(n.Controls={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=function(t){function i(n){t.call(this,n)}return __extends(i,t),i.initialize=function(){n.ObservableHelpers.defineProperty(i,"content",null,function(n,t,i){return n.onContentChanged(t,i)})},i.prototype.onContentChangedOverride=function(){},i.prototype.onContentChanged=function(n){this.onContentChangedOverride(n)},i}(n.TemplateControl);t.ContentControl=i;i.initialize()})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";(function(n){n[n.None=0]="None";n[n.Tab=1]="Tab";n[n.ShiftTab=2]="ShiftTab"})(t.TabPressKind||(t.TabPressKind={}));var r=t.TabPressKind,i=function(i){function r(n){var t=this;this._blurHandler=function(n){return t.onBlur(n)};this._focusOutHandler=function(n){return t.onFocusOut(n)};this._keyHandler=function(n){return t.onKeyEvent(n)};this._mouseHandler=function(n){return t.onDocumentMouseHandler(n)};this._targetButtonClickHandler=function(){return t.onTargetButtonClick()};this._targetButtonKeyHandler=function(n){return t.onTargetButtonKeyUp(n)};this._windowResizeHandler=function(n){return t.onWindowResize(n)};i.call(this,n)}return __extends(r,i),r.initialize=function(){n.ObservableHelpers.defineProperty(r,"targetButtonElement",null,function(n,t,i){return n.onTargetButtonElementChanged(t,i)})},r.prototype.onApplyTemplate=function(){i.prototype.onApplyTemplate.call(this);this.rootElement&&this.rootElement.classList.add(r.CLASS_POPUP);this.onTargetButtonElementChanged(null,this.targetButtonElement)},r.prototype.onInitializeOverride=function(){i.prototype.onInitializeOverride.call(this);this.isVisible=!1},r.prototype.onTemplateChanging=function(){this.rootElement&&this.rootElement.classList.remove(r.CLASS_POPUP)},r.prototype.onIsVisibleChangedOverride=function(){var n=this;i.prototype.onIsVisibleChangedOverride.call(this);this.isVisible?(window.setImmediate(function(){n.rootElement.focus()}),this._tabLastPressed=0,this.targetButtonElement&&!this.disablePopupActiveIndicator&&this.targetButtonElement.classList.add(r.CLASS_POPUP_ACTIVE_ONTARGET),this.setPopupPosition(),window.addEventListener("resize",this._windowResizeHandler),document.addEventListener("focusout",this._focusOutHandler,!0),document.addEventListener("mousedown",this._mouseHandler,!0),document.addEventListener("mouseup",this._mouseHandler,!0),document.addEventListener("mousewheel",this._mouseHandler,!0),document.addEventListener("click",this._mouseHandler,!0),this.rootElement.addEventListener("blur",this._blurHandler,!0),this.rootElement.addEventListener("keydown",this._keyHandler),this.rootElement.addEventListener("keyup",this._keyHandler)):(this.targetButtonElement&&(this.targetButtonElement.classList.remove(r.CLASS_POPUP_ACTIVE_ONTARGET),this._skipTargetButtonFocus||window.setImmediate(function(){n.targetButtonElement&&n.targetButtonElement.focus()})),window.removeEventListener("resize",this._windowResizeHandler),document.removeEventListener("focusout",this._focusOutHandler,!0),document.removeEventListener("mousedown",this._mouseHandler,!0),document.removeEventListener("mouseup",this._mouseHandler,!0),document.removeEventListener("mousewheel",this._mouseHandler,!0),document.removeEventListener("click",this._mouseHandler,!0),this.rootElement.removeEventListener("blur",this._blurHandler,!0),this.rootElement.removeEventListener("keydown",this._keyHandler),this.rootElement.removeEventListener("keyup",this._keyHandler))},r.prototype.onKeyDownOverride=function(){return!1},r.prototype.onKeyUpOverride=function(){return!1},r.prototype.show=function(n,t){this.isVisible=!0;n!==undefined&&t!==undefined&&(this.rootElement.style.left=n-this.rootElement.offsetWidth+"px",this.rootElement.style.top=t+"px")},r.prototype.updatePopupPosition=function(){this.setPopupPosition()},r.prototype.setPopupPosition=function(){var u,f,t,e,o,s;if(this.rootElement.style.left="0px",this.rootElement.style.top="0px",this.targetButtonElement){for(var p=this.viewportMargin?this.viewportMargin.top||0:0,w=window.innerHeight-(this.viewportMargin?this.viewportMargin.bottom||0:0),b=this.viewportMargin?this.viewportMargin.left||0:0,k=window.innerWidth-(this.viewportMargin?this.viewportMargin.right||0:0),h=this.targetButtonElement.getBoundingClientRect(),c=Math.round(h.left),l=Math.round(h.top),a=0,v=0,n=this.rootElement.offsetParent;n;)v+=n.scrollLeft,a+=n.scrollTop,n=n.offsetParent;var d=r.totalOffsetLeft(this.rootElement),g=r.totalOffsetTop(this.rootElement),i=c,y=i+this.rootElement.offsetWidth;y>k&&(u=c+this.targetButtonElement.offsetWidth,f=u-this.rootElement.offsetWidth,f>=b&&(i=f,y=u));this.rootElement.style.left=v+i-d+"px";t=l+this.targetButtonElement.offsetHeight;e=t+this.rootElement.offsetHeight;e>w&&(o=l,s=o-this.rootElement.offsetHeight,s>=p&&(t=s,e=o));parseInt(window.getComputedStyle(this.rootElement).borderTopWidth)>0&&parseInt(window.getComputedStyle(this.targetButtonElement).borderBottomWidth)>0&&t--;this.rootElement.style.top=a+t-g+"px"}},r.totalOffsetLeft=function(n){var t=0;do isNaN(n.offsetLeft)||(t+=n.offsetLeft);while(n=n.offsetParent);return t},r.totalOffsetTop=function(n){var t=0;do isNaN(n.offsetTop)||(t+=n.offsetTop);while(n=n.offsetParent);return t},r.prototype.onBlur=function(n){this.keepVisibleOnBlur||document.hasFocus()||this._tabLastPressed||this.targetButtonElement&&this.targetButtonElement.contains(n.relatedTarget)||(this.isVisible=!1)},r.prototype.onTargetButtonElementChanged=function(n,i){var r,u;n&&(n.removeAttribute("aria-haspopup"),n.removeAttribute("aria-owns"),this._targetButtonClickEvtReg&&(this._targetButtonClickEvtReg.unregister(),this._targetButtonClickEvtReg=null),n.removeEventListener("click",this._targetButtonClickHandler),n.removeEventListener("keyup",this._targetButtonKeyHandler));i&&(i.setAttribute("aria-haspopup","true"),i.setAttribute("aria-owns",this.rootElement.id),r=i.control,r&&r instanceof t.Button?(u=r,this._targetButtonClickEvtReg=u.click.addHandler(this._targetButtonClickHandler)):(i.addEventListener("click",this._targetButtonClickHandler),i.addEventListener("keyup",this._targetButtonKeyHandler)))},r.prototype.onTargetButtonClick=function(){this.show()},r.prototype.onTargetButtonKeyUp=function(n){(n.keyCode===32||n.keyCode===13)&&(this.show(),n.preventDefault(),n.stopImmediatePropagation())},r.prototype.onWindowResize=function(){this.isVisible=!1},r.prototype.onFocusOut=function(n){var f=this._tabLastPressed!==0||n.relatedTarget!==null,e=n.relatedTarget!==this.rootElement&&!this.rootElement.contains(n.relatedTarget),r,u,t,i;if(f&&e)if(this._tabLastPressed!==0){if(r=this.rootElement.querySelectorAll("[tabindex]"),u=this.rootElement,this._tabLastPressed===1){for(t=0;t<r.length;t++)if(i=r.item(t),i.tabIndex>=0&&i.offsetParent){u=i;break}}else for(t=r.length-1;t>=0;t--)if(i=r.item(t),i.tabIndex>=0&&i.offsetParent){u=i;break}window.setImmediate(function(){u.focus()})}else this.targetButtonElement&&this.targetButtonElement.contains(n.relatedTarget)||(this.isVisible=!1,window.setImmediate(function(){n.target&&n.target.focus()}));return!1},r.prototype.onDocumentMouseHandler=function(n){var t=this.rootElement.contains(n.target),i,r;if(!t)if(i=this.targetButtonElement&&this.targetButtonElement.contains(n.target),i)n.type==="click"&&this.dismissOnTargetButtonClick&&(this.isVisible=!1),n.stopImmediatePropagation(),n.preventDefault();else if(r=document.elementFromPoint(n.x,n.y),t=this.rootElement.contains(r),!t){this._skipTargetButtonFocus=!0;try{this.isVisible=!1}finally{this._skipTargetButtonFocus=!1}}},r.prototype.onKeyEvent=function(t){if(t.stopImmediatePropagation(),n.preventIEKeys(t),this._tabLastPressed=t.keyCode===9?t.shiftKey?2:1:0,t.type==="keyup"){var i=this.onKeyUpOverride(t);if(!i)switch(t.keyCode){case 27:this.isVisible=!1}}else if(t.type==="keydown")this.onKeyDownOverride(t);return!1},r.CLASS_POPUP="BPT-popup",r.CLASS_POPUP_ACTIVE_ONTARGET="BPT-popupActive",r}(n.TemplateControl);t.PopupControl=i;i.initialize()})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=function(t){function i(i){var r=this;this._mouseHandler=function(n){return r.onMouseEvent(n)};this._keyHandler=function(n){return r.onKeyboardEvent(n)};this.click=new n.EventSource;t.call(this,i||"Common.defaultButtonTemplate")}return __extends(i,t),i.initialize=function(){n.ObservableHelpers.defineProperty(i,i.IsPressedPropertyName,!1,function(n,t,i){return n.onIsPressedChanged(t,i)})},i.prototype.onApplyTemplate=function(){if(t.prototype.onApplyTemplate.call(this),this.rootElement){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)}},i.prototype.onTemplateChanging=function(){t.prototype.onTemplateChanging.call(this);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))},i.prototype.onTooltipChangedOverride=function(){t.prototype.onTooltipChangedOverride.call(this);this.tooltip?(this.rootElement.setAttribute("data-plugin-vs-tooltip",this.tooltip),this.rootElement.setAttribute("aria-label",n.CommonConverters.JsonHtmlTooltipToInnerTextConverter.convertTo(this.tooltip))):(this.rootElement.removeAttribute("data-plugin-vs-tooltip"),this.rootElement.removeAttribute("aria-label"))},i.prototype.press=function(n){this.isEnabled&&this.click.invoke(n)},i.prototype.onKeyboardEventOverride=function(){return!1},i.prototype.onIsPressedChanged=function(n,t){this.rootElement&&(t?this.rootElement.classList.add(i.CLASS_PRESSED):this.rootElement.classList.remove(i.CLASS_PRESSED))},i.prototype.onMouseEvent=function(n){if(this.isEnabled){var t=!1;switch(n.type){case"click":this.rootElement.focus();this.click.invoke(n);t=!0;break;case"mousedown":this.isPressed=!0;break;case"mouseup":case"mouseleave":this.isPressed=!1;break;default:F12.Tools.Utility.Assert.fail("Unexpected")}t&&(n.stopImmediatePropagation(),n.preventDefault())}},i.prototype.onKeyboardEvent=function(n){if(this.isEnabled&&!this.onKeyboardEventOverride(n)&&(n.keyCode===13||n.keyCode===32))switch(n.type){case"keydown":this.isPressed=!0;break;case"keyup":this.isPressed&&(this.isPressed=!1,this.click.invoke(n));break;default:F12.Tools.Utility.Assert.fail("Unexpected")}},i.CLASS_PRESSED="pressed",i.IsPressedPropertyName="isPressed",i}(t.ContentControl);t.Button=i;i.initialize()})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){"use strict";var t=function(n){function t(t){n.call(this,t)}return __extends(t,n),t.prototype.onKeyboardEventOverride=function(n){if(n.keyCode===40&&n.altKey&&!n.ctrlKey)switch(n.type){case"keydown":return this.isPressed=!0,!0;case"keyup":return this.isPressed&&(this.isPressed=!1,this.press()),!0}return!1},t}(n.Button);n.DropDownButton=t})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=function(t){function i(n){var i=this;this._focusInHandler=function(n){return i.onFocusIn(n)};this._selectedIndex=-1;this._menuItemsClickRegistration=[];this._menuItemsPropChangedRegistration=[];this.menuItems=[];t.call(this,n||"Common.menuControlTemplate")}return __extends(i,t),i.initialize=function(){n.ObservableHelpers.defineProperty(i,i.MenuItemsTemplateIdPropertyName,null,function(n,t,i){return n.onMenuTemplateIdChanged(t,i)});n.ObservableHelpers.defineProperty(i,i.SelectedItemPropertyName,null,function(n){return n.onSelectedItemChanged()})},i.prototype.addClickHandlerToMenuItem=function(n,t){var i=this.getNamedElement(n);i&&i.control&&i.control.click.addHandler(t)},i.prototype.onIsVisibleChangedOverride=function(){var r=this,n;if(this.targetButtonElement&&this.rootElement&&this.isVisible&&(this.isMenuContentsLongerThanButton()?(this.targetButtonElement.classList.add(i.CLASS_LONG_MENU),this.rootElement.classList.add(i.CLASS_LONG_MENU)):(this.targetButtonElement.classList.remove(i.CLASS_LONG_MENU),this.rootElement.classList.remove(i.CLASS_LONG_MENU))),t.prototype.onIsVisibleChangedOverride.call(this),this.isVisible){for(this.rootElement.addEventListener("focusin",this._focusInHandler),this.selectedItem=null,n=0;n<this.menuItems.length;n++)this.menuItems[n].rootElement.classList.remove(i.CLASS_SELECTED);this.focusFirstItemOnShow&&this.menuItems.length>0&&window.setImmediate(function(){r.menuItems[0].rootElement.focus()})}else this.rootElement.removeEventListener("focusin",this._focusInHandler)},i.prototype.onKeyUpOverride=function(n){var i=!1;switch(n.keyCode){case 40:this.changeSelection(0);i=!0;break;case 38:this.changeSelection(1);i=!0;break;case 32:case 13:this.pressSelectedItem();i=!0}return i||(i=t.prototype.onKeyUpOverride.call(this,n)),i},i.prototype.setPopupPosition=function(){if(t.prototype.setPopupPosition.call(this),this.isMenuContentsLongerThanButton()){var n=parseInt(window.getComputedStyle(this.rootElement).borderTopWidth),i=parseInt(this.rootElement.style.top.replace(/px/,""));this.rootElement.style.top=i-n+"px"}},i.prototype.onMenuItemClick=function(){this.dismissOnMenuItemClick&&(this.isVisible=!1)},i.prototype.onMenuItemPropertyChanged=function(n,t){var r,i;if((t==="isChecked"||t==="groupName")&&n.groupName&&n.isChecked)for(r=0;r<this.menuItems.length;r++)i=this.menuItems[r],i!==n&&i.groupName===n.groupName&&i.isChecked&&(i.isChecked=!1)},i.prototype.onMenuTemplateIdChanged=function(t,i){for(var f,u,e,r;this._menuItemsPropChangedRegistration.length>0;)this._menuItemsPropChangedRegistration.pop().unregister();while(this._menuItemsClickRegistration.length>0)this._menuItemsClickRegistration.pop().unregister();if(i)for(this.menuItems=[],this.selectedItem=null,this._menuItemsPropChangedRegistration=[],this._menuItemsClickRegistration=[],f=this.rootElement.querySelectorAll("li["+n.TemplateDataAttributes.CONTROL+"]"),u=0;u<f.length;u++)e=f[u],F12.Tools.Utility.Assert.isTrue(!!e.control,"All menuItemElements must have a control"),r=e.control,this.menuItems.push(r),this._menuItemsPropChangedRegistration.push(r.propertyChanged.addHandler(this.onMenuItemPropertyChanged.bind(this,r))),this._menuItemsClickRegistration.push(r.click.addHandler(this.onMenuItemClick.bind(this)))},i.prototype.onSelectedItemChanged=function(){if(this.selectedItem){var n=this.menuItems.indexOf(this.selectedItem);n!==this._selectedIndex&&this.setSelectedIndex(n,!1)}else this.setSelectedIndex(-1,!1)},i.prototype.onFocusIn=function(n){for(var t=0,i;t<this.menuItems.length;t++)if(i=this.menuItems[t],i.rootElement.contains(n.target))break;t<this.menuItems.length&&this.setSelectedIndex(t,!1)},i.prototype.changeSelection=function(n){if(this.menuItems.length!==0){var u=n===0?1:-1,r=this.menuItems[this._selectedIndex],t,i=this._selectedIndex;do if(i=(i+u)%this.menuItems.length,i<0&&(i=this.menuItems.length-1),t=this.menuItems[i],r){if(t===r)break}else r=t;while(!(t.isVisible&&t.isEnabled));t.isVisible&&t.isEnabled&&this.setSelectedIndex(i,!0)}},i.prototype.pressSelectedItem=function(){var n=this.menuItems[this._selectedIndex];n&&n.press()},i.prototype.setSelectedIndex=function(n,t){this._selectedIndex>=0&&this._selectedIndex<this.menuItems.length&&this.menuItems[this._selectedIndex].rootElement.classList.remove(i.CLASS_SELECTED);this._selectedIndex=n;var r=this.menuItems[this._selectedIndex];r&&(r.rootElement.classList.add(i.CLASS_SELECTED),t&&r.rootElement.focus(),this.selectedItem=r)},i.prototype.isMenuContentsLongerThanButton=function(){if(this.rootElement&&this.targetButtonElement&&this.isVisible){var n=this.rootElement.offsetWidth,t=this.targetButtonElement.offsetWidth;return n>t}return!1},i.CLASS_LONG_MENU="longMenu",i.CLASS_SELECTED="selected",i.MenuItemsTemplateIdPropertyName="menuItemsTemplateId",i.SelectedItemPropertyName="selectedItem",i}(t.PopupControl);t.MenuControl=i;i.initialize()})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=function(t){function i(i){var r=this;this._mouseHandler=function(n){return r.onMouseEvent(n)};this._keyUpHandler=function(n){return r.onKeyUp(n)};this._domEventHanlder=function(n){return r.onDomAttributeModified(n)};t.call(this,i||"Common.menuItemTemplate");this.click=new n.EventSource}return __extends(i,t),i.initialize=function(){n.ObservableHelpers.defineProperty(i,i.GroupNamePropertyName,null);n.ObservableHelpers.defineProperty(i,i.IsChecked,!1,function(n,t,i){return n.onIsCheckedChanged(t,i)})},i.prototype.onApplyTemplate=function(){t.prototype.onApplyTemplate.call(this);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)},i.prototype.onIsEnabledChangedOverride=function(){t.prototype.onIsEnabledChangedOverride.call(this);this.isEnabled?this.rootElement.removeAttribute("disabled"):this.rootElement.setAttribute("disabled")},i.prototype.onKeyUpOverride=function(){return!1},i.prototype.onMouseClickOverride=function(){return!1},i.prototype.onTemplateChanging=function(){t.prototype.onTemplateChanging.call(this);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))},i.prototype.press=function(n){this.isEnabled&&this.click.invoke(n)},i.prototype.onDomAttributeModified=function(n){if(n.attrName==="aria-checked"){var t=n.newValue==="true";this.isChecked!==t&&(this.isChecked=t)}},i.prototype.onIsCheckedChanged=function(n,t){this.rootElement&&(t?this.rootElement.classList.remove(i.CLASS_HIDDEN_CHECK_MARK):this.rootElement.classList.add(i.CLASS_HIDDEN_CHECK_MARK),this.rootElement.setAttribute("aria-checked",""+t),this.rootElement.focus())},i.prototype.onKeyUp=function(n){if(this.isEnabled){var t=this.onKeyUpOverride(n);t||(n.keyCode===13||n.keyCode===32)&&(this.press(n),t=!0);t&&n.stopImmediatePropagation()}},i.prototype.onMouseEvent=function(n){if(this.isEnabled){switch(n.type){case"click":var t=this.onMouseClickOverride(n);t||this.press(n);break;case"mousedown":case"mouseup":case"mouseleave":break;default:F12.Tools.Utility.Assert.fail("Unexpected")}n.stopImmediatePropagation()}},i.CLASS_HIDDEN_CHECK_MARK="hiddenCheckMark",i.GroupNamePropertyName="groupName",i.IsChecked="isChecked",i}(t.ContentControl);t.MenuItem=i;i.initialize()})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=function(t){function i(n){t.call(this,n||"Common.menuItemCheckBoxTemplate")}return __extends(i,t),i.prototype.onKeyUpOverride=function(i){var r=!1;return i.key===n.Keys.SPACEBAR&&(this.isChecked=!this.isChecked,r=!0),r||(r=t.prototype.onKeyUpOverride.call(this,i)),r},i.prototype.press=function(n){var i=this.getNamedElement("BPT-menuItemCheckBox");n&&n.srcElement===i||(this.isChecked=!this.isChecked,t.prototype.press.call(this,n))},i}(n.Controls.MenuItem);t.CheckBoxMenuItem=i})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=function(t){function i(n){var i=this;this._focusInHandler=function(n){return i.onFocusIn(n)};t.call(this,n||"Common.menuItemTextBoxTemplate")}return __extends(i,t),i.initialize=function(){n.ObservableHelpers.defineProperty(i,i.PlaceholderPropertyName,null)},i.prototype.onApplyTemplate=function(){t.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)},i.prototype.onKeyUpOverride=function(n){var i=!1;return n.srcElement===this._textBox&&n.keyCode===27&&(n.stopImmediatePropagation(),i=!0),i||(i=t.prototype.onKeyUpOverride.call(this,n)),i},i.prototype.onTemplateChanging=function(){t.prototype.onTemplateChanging.call(this);this.rootElement&&this.rootElement.removeEventListener("focusin",this._focusInHandler)},i.prototype.press=function(){},i.prototype.onFocusIn=function(){this._textBox.focus()},i.PlaceholderPropertyName="placeholder",i}(n.Controls.MenuItem);t.TextBoxMenuItem=i;i.initialize()})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=function(t){function i(n){var i=this;this._focusInHandler=function(n){return i.onFocusIn(n)};t.call(this,n||"Common.menuItemComboBoxTemplate")}return __extends(i,t),i.initialize=function(){n.ObservableHelpers.defineProperty(i,"items",null);n.ObservableHelpers.defineProperty(i,"selectedValue",null)},i.prototype.onApplyTemplate=function(){t.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)},i.prototype.onKeyUpOverride=function(i){var r=!1;return(i.srcElement===this._selectElement&&i.key===n.Keys.SPACEBAR||i.key===n.Keys.ENTER||i.key===n.Keys.DOWN||i.key===n.Keys.UP)&&(r=!0),r||(r=t.prototype.onKeyUpOverride.call(this,i)),r},i.prototype.onTemplateChanging=function(){t.prototype.onTemplateChanging.call(this);this.rootElement&&this.rootElement.removeEventListener("focusin",this._focusInHandler)},i.prototype.press=function(){},i.prototype.onFocusIn=function(){this._selectElement.focus()},i}(n.Controls.MenuItem);t.ComboBoxMenuItem=i;i.initialize()})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=function(n){function t(t){n.call(this,t)}return __extends(t,n),t.initialize=function(){},t.prototype.addClickHandlerToButton=function(n,t){var i=this.getNamedElement(n);i&&i.control&&i.control.click.addHandler(t)},t}(n.TemplateControl);t.Panel=i;i.initialize()})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=function(t){function i(n){var i=this;this._keyboardHandler=function(n){return i.onKeyboardEvent(n)};t.call(this,n||"Common.defaultTextBoxTemplate")}return __extends(i,t),Object.defineProperty(i.prototype,"focusableElement",{get:function(){return this.rootElement},enumerable:!0,configurable:!0}),i.initialize=function(){n.ObservableHelpers.defineProperty(i,i.PlaceholderPropertyName,"");n.ObservableHelpers.defineProperty(i,i.ReadonlyPropertyName,!1,function(n){return n.onReadonlyChanged()});n.ObservableHelpers.defineProperty(i,i.TextPropertyName,"",function(n){return n.onTextChangedOverride()})},i.prototype.onApplyTemplate=function(){t.prototype.onApplyTemplate.call(this);this._inputRootElement=this.getNamedElement(i.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)},i.prototype.onIsEnabledChangedOverride=function(){t.prototype.onIsEnabledChangedOverride.call(this);this.isEnabled?this.rootElement.removeAttribute("disabled"):this.rootElement.setAttribute("disabled")},i.prototype.onTextChangedOverride=function(){},i.prototype.onTemplateChanging=function(){t.prototype.onTemplateChanging.call(this);this._inputRootElement&&(this._inputRootElement.removeEventListener("keypress",this._keyboardHandler),this._inputRootElement.removeEventListener("keydown",this._keyboardHandler),this._inputRootElement.removeEventListener("input",this._keyboardHandler))},i.prototype.onKeyboardEvent=function(t){if(this.isEnabled)switch(t.type){case"keydown":t.key===n.Keys.ENTER&&this._textBinding&&this._textBinding.updateSourceFromDest();break;case"keypress":this.clearOnEscape&&t.keyCode===27&&(this._inputRootElement.value="",this._textBinding&&this._textBinding.updateSourceFromDest(),t.stopImmediatePropagation(),t.preventDefault());break;case"input":this.updateOnInput&&this._textBinding&&this._textBinding.updateSourceFromDest();break;default:F12.Tools.Utility.Assert.fail("Unexpected")}},i.prototype.onReadonlyChanged=function(){this._inputRootElement&&(this._inputRootElement.readOnly=this.readonly)},i.PlaceholderPropertyName="placeholder",i.ReadonlyPropertyName="readonly",i.TextPropertyName="text",i.InputElementName="_textBoxRoot",i}(n.TemplateControl);t.TextBox=i;i.initialize()})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=function(t){function r(n){t.call(this,n||"Common.searchBoxTemplate");this.updateOnInput=!0;this.placeholder=i.Resources.getString("/Common/SearchBoxPlaceholder")}return __extends(r,t),Object.defineProperty(r.prototype,"searchText",{get:function(){return this.text},set:function(n){this.text=n||""},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"searchProvider",{get:function(){return this._searchProvider},set:function(n){(this._searchProvider=n,this._searchProvider)&&(this._searchProvider.disableButtons&&this.hideNextPreviousButtons(),typeof this._searchProvider.searchText!="undefined"&&(this.searchText=this._searchProvider.searchText))},enumerable:!0,configurable:!0}),r.prototype.onApplyTemplate=function(){var r=this,u;t.prototype.onApplyTemplate.call(this);this._searchBoxBorder=this.getNamedElement("searchBoxBorder");this._searchBox=this.getNamedElement("_textBoxRoot");this._searchPreviousButton=this.getNamedElement("searchPreviousResult");this._searchPreviousButton.addEventListener("click",function(){r.findNextMatch(!1,0)});this._searchPreviousButton.addEventListener("keydown",function(n){return n.keyCode===13||n.keyCode===32?(r.findNextMatch(!1,1),!1):!0});this._searchNextButton=this.getNamedElement("searchNextResult");this._searchNextButton.addEventListener("click",function(){r.findNextMatch(!0,0)});this._searchNextButton.addEventListener("keydown",function(n){return n.keyCode===13||n.keyCode===32?(r.findNextMatch(!0,1),!1):!0});this.hideNextPreviousButtons();this._searchBox.addEventListener("keydown",function(n){return r.onKeyDownSearchBox(n)});u=new n.CutCopyPasteContextMenu(this._searchBox,this.onTextChangedOverride.bind(this));this._keydownHandler=function(n){return r.onKeyDownGlobal(n)};document.addEventListener("keydown",this._keydownHandler);i.F12&&i.F12.addEventListener("keydown",this._keydownHandler)},r.prototype.onTemplateChanging=function(){document.removeEventListener("keydown",this._keydownHandler);i.F12&&i.F12.removeEventListener("keydown",this._keydownHandler)},r.prototype.findNextMatch=function(t,i,u){var f=this,e;return u===void 0&&(u=n.Telemetry.CommandName.FIND_NEXT_OR_PREVIOUS),e=document.activeElement===this._searchBox,this.isEnabled=!1,this.searchProvider.findNextMatch(this.searchText,t,i,u).then(function(n){return f.isEnabled=!0,e&&window.setImmediate(function(){document.body&&document.body.contains(f._searchBox)&&f._searchBox.focus()}),n||(f.isEnabled=!0,f._searchBoxBorder.classList.add(r.RESULT_NOT_FOUND_CLASS),f.hideNextPreviousButtons()),n})},r.prototype.findAndHighlightMatches=function(){this._searchBoxBorder.classList.remove(r.RESULT_NOT_FOUND_CLASS);this.searchProvider.findAndHighlightMatches(this.searchText)},r.prototype.onTextChangedOverride=function(){this.findAndHighlightMatches();this.searchText===""?this.hideNextPreviousButtons():this.showNextPreviousButtons()},r.prototype.focusSearchBox=function(n,t){try{i.F12&&F12&&F12.Tools&&F12.Tools.Debugger&&F12.Tools.Debugger.Telemetry.logCommandWrapper(n,t,function(){})}catch(r){}this._searchBox.focus();this._searchBox.setSelectionRange(0,this.searchText.length)},r.prototype.onKeyDownGlobal=function(t){if(!document.body||!document.body.contains(this._searchBox))return!0;var i=!1;return(t.keyCode!==114||t.ctrlKey||t.altKey?t.keyCode===114&&t.ctrlKey&&!t.altKey?(this.updateSearchTextFromSelection(),this.findNextMatch(!t.shiftKey,1,n.Telemetry.CommandName.UPDATE_SEARCH_NEXT_OR_PREVIOUS),i=!0):t.keyCode===70&&t.ctrlKey&&!t.altKey&&(this.updateSearchTextFromSelection(),this.focusSearchBox(n.Telemetry.CommandName.DEBUGGER_FIND,1),i=!0):(this.findNextMatch(!t.shiftKey,1),i=!0),i)?(t.preventDefault(),t.stopImmediatePropagation(),!1):!0},r.prototype.onKeyDownSearchBox=function(n){return n.keyCode!==13||n.altKey||n.ctrlKey?n.keyCode===27&&this.clearSearchBox():this.findNextMatch(!n.shiftKey,1),!0},r.prototype.clearSearchBox=function(){try{i.F12&&F12&&F12.Tools&&F12.Tools.Debugger&&F12.Tools.Debugger.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.SEARCHBOX_CLEAR,1)}catch(t){}this.searchText="";this.findAndHighlightMatches();this.hideNextPreviousButtons()},r.prototype.updateSearchTextFromSelection=function(){var n=this.searchProvider.getSearchTextFromSelection(this.searchText);this.searchText=n;this.findAndHighlightMatches()},r.prototype.showNextPreviousButtons=function(){this._searchProvider.disableButtons||(this._searchPreviousButton.classList.remove(n.TemplateControl.CLASS_HIDDEN),this._searchNextButton.classList.remove(n.TemplateControl.CLASS_HIDDEN))},r.prototype.hideNextPreviousButtons=function(){this._searchPreviousButton.classList.add(n.TemplateControl.CLASS_HIDDEN);this._searchNextButton.classList.add(n.TemplateControl.CLASS_HIDDEN)},r.RESULT_NOT_FOUND_CLASS="BPT-SearchBox-NoResult",r.SEARCH_TIMEOUT=5e3,r.SEARCH_TERM_DECORATION_CLASS="searchTermDecoration",r}(t.TextBox);t.SearchControl=r})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=function(i){function r(n){var t=this;this._modificationHandler=function(n){return t.onModificationEvent(n)};i.call(this,n);this.toggleIsCheckedOnClick=!0;this.click.addHandler(function(){t.toggleIsCheckedOnClick&&(t.isChecked=!t.isChecked)})}return __extends(r,i),r.initialize=function(){n.ObservableHelpers.defineProperty(t.Button,"isChecked",!1,function(n,t,i){return n.onIsCheckedChanged(t,i)})},r.prototype.onApplyTemplate=function(){if(i.prototype.onApplyTemplate.call(this),this.rootElement){this.rootElement.addEventListener("DOMAttrModified",this._modificationHandler);this.onIsCheckedChanged(null,this.isChecked)}},r.prototype.onTemplateChanging=function(){i.prototype.onTemplateChanging.call(this);this.rootElement&&this.rootElement.removeEventListener("DOMAttrModified",this._modificationHandler)},r.prototype.onKeyboardEventOverride=function(n){if(n.keyCode===40&&n.altKey&&!n.ctrlKey)switch(n.type){case"keydown":return this.press(n),!0}return!1},r.prototype.onIsCheckedChanged=function(n,t){this.rootElement&&(this._isChangingAriaPressed||(this._isChangingAriaPressed=!0,this.rootElement.setAttribute("aria-pressed",t+""),this._isChangingAriaPressed=!1),t?this.rootElement.classList.add(r.CLASS_CHECKED):this.rootElement.classList.remove(r.CLASS_CHECKED))},r.prototype.onModificationEvent=function(n){!this._isChangingAriaPressed&&this.isEnabled&&n.attrName==="aria-pressed"&&n.attrChange===n.MODIFICATION&&(this._isChangingAriaPressed=!0,this.isChecked=n.newValue==="true",this._isChangingAriaPressed=!1)},r.CLASS_CHECKED="checked",r}(t.Button);t.ToggleButton=i;i.initialize()})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=function(t){function i(n){var i=this;this._activeIndex=-1;this._controls=[];this._controlsPropChangedRegistration=[];this._focusInHandler=function(n){return i.onFocusIn(n)};this._toolbarKeyHandler=function(n){return i.onToolbarKeyboardEvent(n)};this._toolbarPanel=null;t.call(this,n||"Common.defaultToolbarTemplate")}return __extends(i,t),i.initialize=function(){n.ObservableHelpers.defineProperty(i,i.PanelTemplateIdPropertyName,"",function(n,t,i){return n.onPanelTemplateIdChanged(t,i)});n.ObservableHelpers.defineProperty(i,i.TitlePropertyName,"")},i.prototype.getActiveElement=function(){return this._activeIndex>=0&&this._activeIndex<this._controls.length?this._controls[this._activeIndex].rootElement:null},i.prototype.moveToControl=function(n){var e=n===0?1:this._controls.length-1,f=document.activeElement,r,t,i,u;if(this._controls.length!==0&&this._activeIndex!==-1&&f){for(r=this._activeIndex,t=0;t<this._controls.length;t++)if(this._controls[t].rootElement===f){r=t;break}for(i=r;r!==(i=(i+e)%this._controls.length);)if(u=this._controls[i],u.isVisible&&u.isEnabled){this.setActiveIndex(i,!0);break}}},i.prototype.onFocusIn=function(n){for(var t=0,i;t<this._controls.length;t++)if(i=this._controls[t],i.rootElement.contains(n.target))break;t<this._controls.length&&this.setTabStop(t)},i.prototype.onPanelTemplateIdChanged=function(t,r){var u,f,e;for(this._toolbarPanel&&(this._toolbarPanel.removeEventListener("focusin",this._focusInHandler),this._toolbarPanel.removeEventListener("keydown",this._toolbarKeyHandler),this._toolbarPanel=null);this._controlsPropChangedRegistration.length>0;)this._controlsPropChangedRegistration.pop().unregister();if(r)for(this._controls=[],this.setActiveIndex(-1),this._toolbarPanel=this.getNamedElement(i.TOOLBAR_PANEL_ELEMENT_NAME),F12.Tools.Utility.Assert.hasValue(this._toolbarPanel,"Expecting a toolbar panel with the name: "+i.TOOLBAR_PANEL_ELEMENT_NAME),this._toolbarPanel.addEventListener("focusin",this._focusInHandler),this._toolbarPanel.addEventListener("keydown",this._toolbarKeyHandler),u=0;u<this._toolbarPanel.children.length;u++)f=this._toolbarPanel.children[u],f.control&&(F12.Tools.Utility.Assert.isTrue(f.control instanceof n.TemplateControl,"We only support controls of type TemplateControl in the Toolbar"),e=f.control,this._controls.push(e),this._controlsPropChangedRegistration.push(e.propertyChanged.addHandler(this.onChildControlPropertyChanged.bind(this,e))));this.setTabStop()},i.prototype.onToolbarKeyboardEvent=function(n){n.keyCode===37?(this.moveToControl(1),n.stopPropagation()):n.keyCode===39&&(this.moveToControl(0),n.stopPropagation())},i.prototype.onChildControlPropertyChanged=function(t,i){if(i===n.TemplateControl.IsEnabledPropertyName||i===n.TemplateControl.IsVisiblePropertyName)if(this._activeIndex===-1)this.setTabStop();else{var r=this._controls[this._activeIndex];t===r&&(t.isEnabled&&t.isVisible||this.setTabStop(this._activeIndex))}},i.prototype.setTabStop=function(n){var t,r,i;if(this.setActiveIndex(-1),n=n||0,!(n<0)&&!(n>=this._controls.length)){t=n;r=!1;do i=this._controls[t],!r&&i.isVisible&&i.isEnabled?(this.setActiveIndex(t),r=!0):i.tabIndex=-1;while(n!==(t=(t+1)%this._controls.length))}},i.prototype.setActiveIndex=function(n,t){this._activeIndex>=0&&this._activeIndex<this._controls.length&&(this._controls[this._activeIndex].tabIndex=-1);this._activeIndex=n;var i=this._controls[this._activeIndex];i&&(i.tabIndex=1,t&&i.rootElement.focus())},i.TOOLBAR_PANEL_ELEMENT_NAME="_toolbarPanel",i.PanelTemplateIdPropertyName="panelTemplateId",i.TitlePropertyName="title",i}(t.Panel);t.ToolbarControl=i;i.initialize()})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=function(t){function i(n){t.call(this,n)}return __extends(i,t),Object.defineProperty(i.prototype,"itemControlsPoolSizeLimit",{get:function(){return this._itemControlsPool?this._itemControlsPool.sizeLimit:0},set:function(t){this.itemControlsPoolSizeLimit!==t&&(this._itemControlsPool=new n.ControlPool(t))},enumerable:!0,configurable:!0}),i.initialize=function(){n.ObservableHelpers.defineProperty(i,"items","",function(n,t,i){return n.onItemsChange(t,i)});n.ObservableHelpers.defineProperty(i,"itemContainerControl","",function(n,t,i){return n.onItemContainerControlChange(t,i)})},i.prototype.getIndex=function(n){F12.Tools.Utility.Assert.isTrue(!!this._collection,"Expecting a non-null collection in the ItemsControl");var t=this._collection.indexOf(n);if(t!==-1)return t},i.prototype.getItem=function(n){return F12.Tools.Utility.Assert.isTrue(!!this._collection,"Expecting a non-null collection in the ItemsControl"),this._collection.getItem(n)},i.prototype.getItemCount=function(){return this._collection?this._collection.length:0},i.prototype.onTooltipChangedOverride=function(){t.prototype.onTooltipChangedOverride.call(this);this.updateTooltip(this.tooltip)},i.prototype.disposeItemContainerOverride=function(){},i.prototype.prepareItemContainerOverride=function(){},i.prototype.onApplyTemplate=function(){t.prototype.onApplyTemplate.call(this);this.panelRootElement=this.getNamedElement(i.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()},i.prototype.onTemplateChanging=function(){this.updateTooltip(null);this.removeAllItemControls();t.prototype.onTemplateChanging.call(this)},i.prototype.onItemsChangedOverride=function(){},i.prototype.onItemContainerControlChangedOverride=function(){},i.prototype.onCollectionChangedOverride=function(){},i.prototype.onItemsChange=function(){this._collectionChangedRegistration&&(this._collectionChangedRegistration.unregister(),this._collectionChangedRegistration=null);this._collection=null;this.items&&(this.items.collectionChanged?(this._collectionChangedRegistration=this.items.collectionChanged.addHandler(this.onCollectionChanged.bind(this)),this._collection=this.items):this._collection=new n.ObservableCollection(this.items));this.regenerateItemControls();this.onItemsChangedOverride()},i.prototype.onItemContainerControlChange=function(){this._itemContainerConstruction=null;this._itemControlsPool&&this._itemControlsPool.clear();this.itemContainerControl&&(this._itemContainerConstruction=n.ControlConstruction.createFromStringOrType(this.itemContainerControl));this.regenerateItemControls();this.onItemContainerControlChangedOverride()},i.prototype.onCollectionChanged=function(n){switch(n.action){case 0:this.insertItemControls(n.newStartingIndex,n.newItems.length);break;case 3:this.removeAllItemControls();break;case 1:this.removeItemControls(n.oldStartingIndex,n.oldItems.length);break;case 2:this.regenerateItemControls()}this.onCollectionChangedOverride(n)},i.prototype.createItemControl=function(n){var i=this,t;return t=this._itemControlsPool?this._itemControlsPool.getControl("default",function(){return i._itemContainerConstruction.getNewControl()}):this._itemContainerConstruction.getNewControl(),this.prepareItemContainer(t,n),t},i.prototype.disposeItemContainer=function(n){this.disposeItemContainerOverride(n);n&&n.model&&(n.model=null,this._itemControlsPool&&this._itemControlsPool.recycleControl("default",n))},i.prototype.prepareItemContainer=function(n,t){this._itemContainerConstruction.isTemplateContorl&&(n.model=t);this.prepareItemContainerOverride(n,t)},i.prototype.regenerateItemControls=function(){(this.removeAllItemControls(),this._collection)&&this.insertItemControls(0,this._collection.length)},i.prototype.insertItemControls=function(n,t){var r,e,i,u,f;if(this._itemContainerConstruction)if(r=n+t,F12.Tools.Utility.Assert.isTrue(r<=this._collection.length,"Unexpected range after inserting into items."),F12.Tools.Utility.Assert.isTrue(n<=this.panelRootElement.childElementCount,"Collection and child elements mismatch."),n===this.panelRootElement.childElementCount)for(i=n;i<r;i++)u=this._collection.getItem(i),f=this.createItemControl(u),this.panelRootElement.appendChild(f.rootElement);else for(e=this.panelRootElement.childNodes.item(n),i=n;i<r;i++)u=this._collection.getItem(i),f=this.createItemControl(u),this.panelRootElement.insertBefore(f.rootElement,e)},i.prototype.removeAllItemControls=function(){if(this.panelRootElement)while(this.panelRootElement.hasChildNodes()){var n=this.panelRootElement.lastChild,t=n.control;this.disposeItemContainer(t);this.panelRootElement.removeChild(n)}},i.prototype.removeItemControls=function(n,t){for(var r,u,i=n+t-1;i>=n;i--)r=this.panelRootElement.children[i],r&&(u=r.control,this.disposeItemContainer(u),this.panelRootElement.removeChild(r))},i.prototype.updateTooltip=function(n){this.panelRootElement&&(n?(this.panelRootElement.setAttribute("data-plugin-vs-tooltip",n),this.panelRootElement.setAttribute("aria-label",n)):(this.panelRootElement.removeAttribute("data-plugin-vs-tooltip"),this.panelRootElement.removeAttribute("aria-label")))},i.PanelRootElementName="_panel",i}(n.TemplateControl);t.ItemsControl=i;i.initialize()})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=function(i){function r(n){var t=this;this._currentOffset=0;this._backwardScrollHandler=function(){return t.scrollBackward()};this._forwardScrollHandler=function(){return t.scrollForward()};this._onFocusInHandler=function(n){return t.onFocusIn(n)};this._onFocusOutHandler=function(n){return t.onFocusOut(n)};this._onKeyDownhandler=function(n){return t.onKeyDown(n)};i.call(this,n);this.selectedItem=null}return __extends(r,i),Object.defineProperty(r.prototype,"selectedItem",{get:function(){return this._selectedItem},set:function(n){if(n!==this._selectedItem){var t=this.getItemCount()===0?undefined:this.getIndex(n);t!==undefined?(this._selectedItem=n,this.selectedIndex=t):(this._selectedItem=null,this.selectedIndex=null);this.propertyChanged.invoke(r.SelectedItemPropertyName)}},enumerable:!0,configurable:!0}),r.initialize=function(){n.ObservableHelpers.defineProperty(r,r.IsVerticalPropertyName,!1,function(n){return n.onIsVerticalChanged()});n.ObservableHelpers.defineProperty(r,r.ScrollIncrementPropertyName,1,function(n){return n.updateButtons()});n.ObservableHelpers.defineProperty(r,r.ScrollPositionPropertyName,0,function(n){return n.onScrollPositionChanged()});n.ObservableHelpers.defineProperty(r,r.SelectedIndexPropertyName,null,function(n,t,i){return n.onSelectedIndexChanged(t,i)})},r.prototype.scrollBackward=function(){this.scrollPosition=Math.max(this.scrollPosition-this.scrollIncrement,0)},r.prototype.scrollForward=function(){this.scrollPosition+this.scrollIncrement<this.getItemCount()&&(this.scrollPosition+=this.scrollIncrement)},r.prototype.onApplyTemplate=function(){i.prototype.onApplyTemplate.call(this);this._panelTabIndex=this.panelRootElement.tabIndex;this.panelRootElement.classList.add(r.PANEL_CLASS);this.onIsVerticalChanged();this.initializeButtons();this.initializeKeyboard();this.refresh()},r.prototype.onTemplateChanging=function(){this.panelRootElement&&(this.cleanupKeyboard(),this.cleanupButtons(),this.selectedIndex=null,this.scrollPosition=0,this.panelRootElement.classList.remove(r.HORIZONTAL_PANEL_CLASS),this.panelRootElement.classList.remove(r.PANEL_CLASS),this._panelTabIndex=null);i.prototype.onTemplateChanging.call(this)},r.prototype.onItemsChangedOverride=function(){i.prototype.onItemsChangedOverride.call(this);this.resetState()},r.prototype.onCollectionChangedOverride=function(n){i.prototype.onCollectionChangedOverride.call(this,n);this.resetState()},r.prototype.refresh=function(){this.onScrollPositionChanged();this.displaySelected();this.updateButtons()},r.prototype.onIsVerticalChanged=function(){this.setOffset(0);this.isVertical?(this._lengthProperty="offsetHeight",this._offsetProperty="offsetTop",this._positioningProperty="top",this.panelRootElement.classList.remove(r.HORIZONTAL_PANEL_CLASS)):(this._lengthProperty="offsetWidth",this._offsetProperty="offsetLeft",this._positioningProperty="left",this.panelRootElement.classList.add(r.HORIZONTAL_PANEL_CLASS));this.refresh()},r.prototype.onScrollPositionChanged=function(){if(this.updateButtons(),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 n=this.panelRootElement.children[this.scrollPosition];this.setOffset(this._currentOffset+n[this._offsetProperty])},r.prototype.onSelectedIndexChanged=function(n,t){n!==null&&n<this.getItemCount()&&(F12.Tools.Utility.Assert.isTrue(n>=0&&n<this.getItemCount(),"Invalid existing index "+n),this.panelRootElement.children[n].classList.remove(r.SELECTED_ITEM_CLASS));t===null?this.selectedItem=null:(F12.Tools.Utility.Assert.isTrue(this.selectedIndex>=0&&this.selectedIndex<this.getItemCount(),"Invalid new index "+this.selectedIndex),this.selectedItem=this.getItem(t));this.displaySelected()},r.prototype.displaySelected=function(){if(this.selectedIndex!==null){var n=this.panelRootElement.children[this.selectedIndex];F12.Tools.Utility.Assert.isTrue(!!n,"No HTML element for selected index: "+this.selectedIndex);this.scrollIntoView(n);n.classList.add(r.SELECTED_ITEM_CLASS)}},r.prototype.onFocusIn=function(n){for(var t=0,r=this.panelRootElement.children.length,i;t<r;t++)if(i=this.panelRootElement.children[t],i.contains(n.target)){this.makeTabbable(i);this.selectedIndex===t?this.displaySelected():this.selectedIndex=t;return}this.selectedIndex!==null&&(n.preventDefault(),this.setFocus(this.panelRootElement.children[this.selectedIndex]))},r.prototype.onFocusOut=function(n){n.relatedTarget&&(n.relatedTarget===this.panelRootElement||this.panelRootElement.contains(n.relatedTarget))||this.makeTabbable(this.panelRootElement)},r.prototype.onKeyDown=function(n){var t=!1,i=this.isVertical?38:37,r=this.isVertical?40:39;switch(n.keyCode){case r:this.focusNext();t=!0;break;case i:this.focusPrevious();t=!0}return t&&n.stopImmediatePropagation(),t},r.prototype.focusPrevious=function(){var n;this.getItemCount()>0&&(this.selectedIndex===null?n=this.getItemCount()-1:(F12.Tools.Utility.Assert.isTrue(this.selectedIndex>=0&&this.selectedIndex<this.getItemCount(),"Invalid selected index"),n=Math.max(this.selectedIndex-1,0)),this.setFocus(this.panelRootElement.children[n]))},r.prototype.focusNext=function(){var n;this.getItemCount()>0&&(this.selectedIndex===null?n=0:(F12.Tools.Utility.Assert.isTrue(this.selectedIndex>=0&&this.selectedIndex<this.getItemCount(),"Invalid selected index"),n=Math.min(this.selectedIndex+1,this.getItemCount()-1)),this.setFocus(this.panelRootElement.children[n]))},r.prototype.scrollIntoView=function(n){var t;if(this.isForwardEdgeOutOfView(n)){for(t=this.scrollPosition;t<this.getItemCount();t+=this.scrollIncrement)if(this.isInView(n,t)){this.scrollPosition=t;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(n)){for(t=this.scrollPosition;t>=0;t-=this.scrollIncrement)if(this.isInView(n,t)){this.scrollPosition=t;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?")}},r.prototype.isInView=function(n,t){return!this.isForwardEdgeOutOfView(n,t)&&!this.isBackwardEdgeOutOfView(n,t)},r.prototype.isBackwardEdgeOutOfView=function(n,t){(t===undefined||t===null)&&(t=this.scrollPosition);var i=n[this._offsetProperty]-this.panelRootElement.children[t][this._offsetProperty];return i<0},r.prototype.isForwardEdgeOutOfView=function(n,t){(t===undefined||t===null)&&(t=this.scrollPosition);var i=this.panelRootElement.children[t],r=n[this._offsetProperty]+n[this._lengthProperty],u=i[this._offsetProperty]+this.panelRootElement[this._lengthProperty]-r;return u<0},r.prototype.updateButtons=function(){this._backwardScrollButton&&(F12.Tools.Utility.Assert.hasValue(this._forwardScrollButton),this._backwardScrollButton.isEnabled=this.scrollPosition>0,this._forwardScrollButton.isEnabled=this.scrollPosition+this.scrollIncrement<this.getItemCount())},r.prototype.makeTabbable=function(n){this.panelRootElement.removeAttribute("tabIndex");this.selectedIndex!==null&&this.panelRootElement.children[this.selectedIndex].setAttribute("tabIndex","-1");F12.Tools.Utility.Assert.hasValue(this._panelTabIndex);n.tabIndex=this._panelTabIndex},r.prototype.setOffset=function(n){var i,t;for(this._currentOffset=n,i=this.panelRootElement.children,t=0;t<i.length;t++)i[t].style[this._positioningProperty]=-n+"px"},r.prototype.setFocus=function(n){n.contains(document.activeElement)||(n.focus(),this.panelRootElement.scrollLeft=0,this.panelRootElement.scrollTop=0)},r.prototype.resetState=function(){this.selectedIndex=null;this.scrollPosition=0;this.refresh()},r.prototype.initializeButtons=function(){this._backwardScrollButton=this.getNamedControl(r.BackwardScrollButtonName);F12.Tools.Utility.Assert.hasValue(this._backwardScrollButton,"RibbonControl template must have a backward button control named "+r.BackwardScrollButtonName+" as a direct child");this._forwardScrollButton=this.getNamedControl(r.ForwardScrollButtonName);F12.Tools.Utility.Assert.hasValue(this._backwardScrollButton,"RibbonControl template must have a forward button control named "+r.ForwardScrollButtonName+" as a direct child");this._backwardScrollButton.click.addHandler(this._backwardScrollHandler);this._forwardScrollButton.click.addHandler(this._forwardScrollHandler);this.updateButtons()},r.prototype.cleanupButtons=function(){this._backwardScrollButton&&(F12.Tools.Utility.Assert.hasValue(this._forwardScrollButton),this._backwardScrollButton.isEnabled=!1,this._forwardScrollButton.isEnabled=!1,this._backwardScrollButton.click.removeHandler(this._backwardScrollHandler),this._forwardScrollButton.click.removeHandler(this._forwardScrollHandler),this._backwardScrollButton=null,this._forwardScrollButton=null)},r.prototype.initializeKeyboard=function(){this.rootElement.removeAttribute("tabIndex");this._backwardScrollButton.rootElement.removeAttribute("tabIndex");this._forwardScrollButton.rootElement.removeAttribute("tabIndex");this.getNamedElement(t.ItemsControl.PanelRootElementName).addEventListener("focusin",this._onFocusInHandler);this.getNamedElement(t.ItemsControl.PanelRootElementName).addEventListener("focusout",this._onFocusOutHandler);this.getNamedElement(t.ItemsControl.PanelRootElementName).addEventListener("keydown",this._onKeyDownhandler)},r.prototype.cleanupKeyboard=function(){this.getNamedElement(t.ItemsControl.PanelRootElementName).removeEventListener("focusin",this._onFocusInHandler);this.getNamedElement(t.ItemsControl.PanelRootElementName).removeEventListener("focusout",this._onFocusOutHandler);this.getNamedElement(t.ItemsControl.PanelRootElementName).removeEventListener("keydown",this._onKeyDownhandler)},r.HORIZONTAL_PANEL_CLASS="BPT-horizontalRibbonPanel",r.PANEL_CLASS="BPT-ribbonPanel",r.SELECTED_ITEM_CLASS="BPT-selected",r.BackwardScrollButtonName="_backwardScrollButton",r.ForwardScrollButtonName="_forwardScrollButton",r.IsVerticalPropertyName="isVertical",r.ScrollIncrementPropertyName="scrollIncrement",r.ScrollPositionPropertyName="scrollPosition",r.SelectedIndexPropertyName="selectedIndex",r.SelectedItemPropertyName="selectedItem",r}(t.ItemsControl);t.RibbonControl=i;i.initialize()})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var i=function(){function n(n,t,i,r){this.red=n;this.green=t;this.blue=i;this.alpha=r;this.assertValid()}return n.getString=function(t){var r=new n(0,0,0,0),i;return(r.setFromString(t),i=n.DUMMY_ELEMENT.style.color,!i||i==="inherit"||i==="currentColor"||i==="invert")?"":r.toString()},n.prototype.setFromString=function(t){var i,u,r,f;if(n.DUMMY_ELEMENT.style.color="",n.DUMMY_ELEMENT.style.color=t,i=n.DUMMY_ELEMENT.style.color,i&&i!=="inherit"&&i!=="currentColor"&&i!=="invert"){if(i==="transparent")return this.setFromRgba(this.red,this.green,this.blue,0)}else return!1;for(u=document.defaultView.getComputedStyle(n.DUMMY_ELEMENT,null).color,r=0;r<n.RGBA_REGEXPS.length;r++)if(f=n.RGBA_REGEXPS[r].exec(u),f!==null)return this.setFromRgba(this.toNumber(RegExp.$1),this.toNumber(RegExp.$2),this.toNumber(RegExp.$3),RegExp.$4?this.toNumber(RegExp.$4):1);return F12.Tools.Utility.Assert.fail("Unexpected computed color string format"),!1},n.prototype.setFromHsla=function(n){n.assertValid();var r,t,u=n.hue/360,f=n.saturation/100,i=n.lightness/100;return t=i<=.5?i*(f+1):i+f-i*f,r=i*2-t,this.setFromRgba(Math.round(this.hslToRgbHelper(r,t,u+1/3)*255),Math.round(this.hslToRgbHelper(r,t,u)*255),Math.round(this.hslToRgbHelper(r,t,u-1/3)*255),n.alpha)},n.prototype.setFromRgba=function(n,t,i,r){return this.red!==n||this.green!==t||this.blue!==i||this.alpha!==r?(this.red=n,this.green=t,this.blue=i,this.alpha=r,this.assertValid(),!0):!1},n.prototype.toString=function(){return this.alpha===0?n.TRANSPARENT_STRING:"rgba("+this.red+", "+this.green+", "+this.blue+", "+this.alpha+")"},n.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")},n.prototype.hslToRgbHelper=function(n,t,i){return(i<0&&(i=i+1),i>1&&(i=i-1),i*6<1)?n+(t-n)*i*6:i*2<1?t:i*3<2?n+(t-n)*(2/3-i)*6:n},n.prototype.toNumber=function(n){return+n},n.DUMMY_ELEMENT=document.createElement("div"),n.RGBA_REGEXPS=[/^ *rgba\(([0-9]+), *([0-9]+), *([0-9]+), *([0-9.]+)\) *$/,/^ *rgb\(([0-9]+), *([0-9]+), *([0-9]+)\) *$/],n.TRANSPARENT_STRING="rgba(0, 0, 0, 0)",n}(),t;n.RgbaColor=i;t=function(){function n(n,t,i,r){this.hue=n;this.saturation=t;this.lightness=i;this.alpha=r;this.assertValid()}return n.prototype.setFromRgba=function(n){var e;n.assertValid();var i=n.red/255,r=n.green/255,u=n.blue/255,o,s,c,l=n.alpha,t=Math.max(i,r,u),h=Math.min(i,r,u),f=t-h;return c=Math.round(.5*(t+h)*100),f===0?(s=0,o=this.hue):(i===t?e=(r-u)/f%6:r===t?e=(u-i)/f+2:(F12.Tools.Utility.Assert.areEqual(u,t),e=(i-r)/f+4),o=Math.round(e*60+360)%360,s=Math.round(f/(1-Math.abs(t+h-1))*100)),this.setFromHsla(o,s,c,l)},n.prototype.setFromHsla=function(n,t,i,r){return this.hue!==n||this.saturation!==t||this.lightness!==i||this.alpha!==r?(this.hue=n,this.saturation=t,this.lightness=i,this.alpha=r,this.assertValid(),!0):!1},n.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")},n}();n.HslaColor=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=function(){function n(){}return n.initialize=function(){n.AlphaConverter=n.getAlphaConverter()},n.getAlphaConverter=function(){return{convertTo:function(n){return(n*100).toString()},convertFrom:function(n){return n/100}}},n}();n.ColorSlidersConverters=t;t.initialize()}(Common||(Common={})),function(n){var t;(function(t){"use strict";var i=function(t){function i(i){this._rgba=new n.RgbaColor(0,0,0,1);this._hsla=new n.HslaColor(180,0,0,1);this._color="rgba(0, 0, 0, 1)";t.call(this,i||"Common.slidersPaneTemplate")}return __extends(i,t),Object.defineProperty(i.prototype,"color",{get:function(){return this._color},set:function(n){n&&n!==this._color&&(this._color=n,this._rgba.setFromString(n)&&this._hsla.setFromRgba(this._rgba)&&(this.propertyChanged.invoke(i.HuePropertyName),this.propertyChanged.invoke(i.SaturationPropertyName),this.propertyChanged.invoke(i.LightnessPropertyName),this.propertyChanged.invoke(i.AlphaPropertyName)),this.propertyChanged.invoke(i.ColorPropertyName))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hue",{get:function(){return this._hsla.hue},set:function(n){n!==this._hsla.hue&&(this._hsla.hue=n,this._rgba.setFromHsla(this._hsla)&&(this._color=this._rgba.toString(),this.propertyChanged.invoke(i.ColorPropertyName)),this.propertyChanged.invoke(i.HuePropertyName))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"saturation",{get:function(){return this._hsla.saturation},set:function(n){n!==this._hsla.saturation&&(this._hsla.saturation=n,this._rgba.setFromHsla(this._hsla)&&(this._color=this._rgba.toString(),this.propertyChanged.invoke(i.ColorPropertyName)),this.propertyChanged.invoke(i.SaturationPropertyName))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"lightness",{get:function(){return this._hsla.lightness},set:function(n){n!==this._hsla.lightness&&(this._hsla.lightness=n,this._rgba.setFromHsla(this._hsla)&&(this._color=this._rgba.toString(),this.propertyChanged.invoke(i.ColorPropertyName)),this.propertyChanged.invoke(i.LightnessPropertyName))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"alpha",{get:function(){return this._hsla.alpha},set:function(n){n!==this._hsla.alpha&&(this._hsla.alpha=n,this._rgba.setFromHsla(this._hsla)&&(this._color=this._rgba.toString(),this.propertyChanged.invoke(i.ColorPropertyName)),this.propertyChanged.invoke(i.AlphaPropertyName))},enumerable:!0,configurable:!0}),i.DUMMY_ELEMENT=document.createElement("div"),i.RGBA_REGEXPS=[/^ *rgba\(([0-9]+), *([0-9]+), *([0-9]+), *([0-9.]+)\) *$/,/^ *rgb\(([0-9]+), *([0-9]+), *([0-9]+)\) *$/],i.AlphaPropertyName="alpha",i.ColorPropertyName="color",i.HuePropertyName="hue",i.LightnessPropertyName="lightness",i.SaturationPropertyName="saturation",i}(n.TemplateControl);t.ColorPickerSlidersControl=i})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var r=Microsoft.Plugin,i=function(t){function i(i){t.call(this,i||"Common.defaultColorPickerTemplate");this.color="rgba(0, 0, 0, 1)";this.paletteColors=new n.ObservableCollection;this.dismissOnTargetButtonClick=!0}return __extends(i,t),Object.defineProperty(i.prototype,"color",{get:function(){return this._color},set:function(n){n&&n!==this._color&&(this._color=n,this.propertyChanged.invoke(i.ColorPropertyName))},enumerable:!0,configurable:!0}),i.initialize=function(){n.ObservableHelpers.defineProperty(i,i.CancellationColorPropertyName,null);n.ObservableHelpers.defineProperty(i,i.IsCompactViewPropertyName,!1,function(n){return n.onIsCompactViewChanged()});n.ObservableHelpers.defineProperty(i,i.IsEyedropperActivePropertyName,!1,function(n){return n.onIsEyedropperActiveChanged()});n.ObservableHelpers.defineProperty(i,i.IsPaletteLoadingPropertyName,!1);n.ObservableHelpers.defineProperty(i,i.IsSlidersShownPropertyName,!1,function(n){return n.onIsSlidersShownChanged()});n.ObservableHelpers.defineProperty(i,i.PaletteColorsPropertyName,null)},i.prototype.onApplyTemplate=function(){if(t.prototype.onApplyTemplate.call(this),this._palette=this.getNamedControl(i.PALETTE_NAME),F12.Tools.Utility.Assert.hasValue(this._palette,"Color picker template must have a ribbon control named "+i.PALETTE_NAME),r.F12.isTargetEdge){var n=this.getNamedControl("eyedropperButton"),u=this.getNamedControl("slidersButton");n.isVisible=!1;u.isVisible=!1}},i.prototype.onTemplateChanging=function(){this._palette&&(this._palette=null);t.prototype.onTemplateChanging.call(this)},i.prototype.onIsVisibleChangedOverride=function(){t.prototype.onIsVisibleChangedOverride.call(this);this.isVisible?(this.cancellationColor=this.color,this._palette.refresh()):this.cancellationColor=null},i.prototype.onKeyDownOverride=function(n){return this.onCustomKeyDown?this.onCustomKeyDown(n):!1},i.prototype.onKeyUpOverride=function(n){var i=!1;switch(n.keyCode){case 27:this.color=this.cancellationColor;break;case 13:this.isVisible=!1;i=!0}return i||(i=t.prototype.onKeyUpOverride.call(this,n)),i},i.prototype.onIsCompactViewChanged=function(){var t=this.getNamedElement("selectedColorPane");t&&(this.isCompactView?(t.classList.add(n.TemplateControl.CLASS_HIDDEN),t.setAttribute("aria-hidden","true")):(t.classList.remove(n.TemplateControl.CLASS_HIDDEN),t.removeAttribute("aria-hidden")))},i.prototype.onIsEyedropperActiveChanged=function(){this.keepVisibleOnBlur=this.isEyedropperActive},i.prototype.onIsSlidersShownChanged=function(){this.updateSlidersMaxHeight()},i.prototype.updateSlidersMaxHeight=function(){var n=this.getNamedElement(i.SLIDERS_CONTROL_NAME),r,u,e,t,o,s;if(n){if(r=this.viewportMargin?this.viewportMargin.top||0:0,u=window.innerHeight-(this.viewportMargin?this.viewportMargin.bottom||0:0),n.style.maxHeight="",this.updatePopupPosition(),e=n.getBoundingClientRect(),t=Math.floor(e.bottom)-u,t>0){if(this.targetButtonElement){var f=this.targetButtonElement.getBoundingClientRect(),h=Math.abs(f.top-r),c=Math.abs(f.bottom-u);h>c&&(o=this.rootElement.getBoundingClientRect(),t=Math.max(0,Math.floor(r+o.height-f.top)))}s=n.scrollHeight-t;n.style.maxHeight=Math.max(30,s)+"px"}else n.style.maxHeight="";this.updatePopupPosition()}},i.PALETTE_NAME="_colorPalette",i.SLIDERS_CONTROL_NAME="slidersPane",i.CancellationColorPropertyName="cancellationColor",i.ColorPropertyName="color",i.IsCompactViewPropertyName="isCompactView",i.IsEyedropperActivePropertyName="isEyedropperActive",i.IsPaletteLoadingPropertyName="isPaletteLoading",i.IsSlidersShownPropertyName="isSlidersShown",i.PaletteColorsPropertyName="paletteColors",i}(t.PopupControl);t.ColorPickerControl=i;i.initialize()})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=function(t){function i(n){t.call(this,n||"Common.tabControlTemplate");this._items=[]}return __extends(i,t),Object.defineProperty(i.prototype,"selectedItem",{get:function(){return this._selectedItem},set:function(n){if(this._selectedItem!==n){if(n&&!this.containsTab(n))return;this._selectedItem&&(this._selectedItem.header.rootElement.setAttribute("tabindex","-1"),this._selectedItem.active=!1);this._selectedItem=n;this._selectedItem&&(this._selectedItem.header.rootElement.setAttribute("tabindex","0"),this._selectedItem.active=!0);this.selectedItemChanged&&(this.selectedItem.tabPane&&this.selectedItem.tabPane.onTabActivated(),this.selectedItemChanged())}},enumerable:!0,configurable:!0}),i.initialize=function(){n.ObservableHelpers.defineProperty(i,i.TabsLeftAlignedPropertyName,!0)},i.prototype.addTab=function(n){this._items.push(n);n.ownerTabControl=this;this._barPanel.appendChild(n.header.rootElement);this._contentPane.appendChild(n.rootElement);this._selectedItem||(this.selectedItem=n)},i.prototype.onApplyTemplate=function(){t.prototype.onApplyTemplate.call(this);this._barPanel=this.getNamedElement("tabBar");F12.Tools.Utility.Assert.hasValue(this._barPanel,"Unable to find element with name tabBar");this._barPanel.setAttribute("role","tabList");this._barPanel.addEventListener("keydown",this.onKeyDown.bind(this));this._contentPane=this.getNamedElement("tabContentPane");F12.Tools.Utility.Assert.hasValue(this._contentPane,"Unable to find element with name tabContentPane");this.beforeBarContainer=this.getNamedElement("beforeBarContainer");this.afterBarContainer=this.getNamedElement("afterBarContainer");this._tabBarContainer=this.getNamedElement("tabBarContainer");F12.Tools.Utility.Assert.hasValue(this._tabBarContainer,"Unable to find element with name tabBarContainer")},i.prototype.removeTab=function(n){var t=this._items.indexOf(n),i;t<0||(this.selectedItem===n&&(this.selectedItem=null),this._items.splice(t,1),i=Math.min(this._items.length-1,t),i>=0&&(this.selectedItem=this._items[i]),this._barPanel.removeChild(n.header.rootElement),this._contentPane.removeChild(n.rootElement),n.ownerTabControl=null)},i.prototype.containsTab=function(n){return this._items.indexOf(n)>=0},i.prototype.getTab=function(n){return this._items[n]},i.prototype.getTabIndex=function(n){return this._items.indexOf(n)},i.prototype.length=function(){return this._items.length},i.prototype.onTabItemSelected=function(n){this.selectedItem=n},i.prototype.onKeyDown=function(n){var t=this._items.filter(function(n){return n.isEnabled}),i=t.indexOf(this._selectedItem);i>=0?n.keyCode===39?this.selectedItem=t[(i+1)%t.length]:n.keyCode===37&&(this.selectedItem=t[i-1<0?t.length-1:i-1]):t.length>0&&(this.selectedItem=t[0]);this._selectedItem.header.rootElement.focus()},i.TabsLeftAlignedPropertyName="tabsLeftAligned",i}(n.TemplateControl);t.TabControl=i;i.initialize()})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var u=Microsoft.Plugin,i=function(t){function i(i){t.call(this,i||"Common.tabHeaderTemplate");this._click=new n.EventSource;this._onKeyDownHandler=this.onKeyDown.bind(this)}return __extends(i,t),Object.defineProperty(i.prototype,"click",{get:function(){return this._click},enumerable:!0,configurable:!0}),i.initialize=function(){n.ObservableHelpers.defineProperty(i,i.ActivePropertyName,!1);n.ObservableHelpers.defineProperty(i,i.TitlePropertyName,"")},i.prototype.onApplyTemplate=function(){t.prototype.onApplyTemplate.call(this);this.rootElement.onclick=this.onHeaderClicked.bind(this);this.rootElement.addEventListener("keydown",this._onKeyDownHandler)},i.prototype.onTemplateChanging=function(){this.rootElement&&this.rootElement.removeEventListener("keydown",this._onKeyDownHandler)},i.prototype.onHeaderClicked=function(){this.isEnabled&&this.click.invoke()},i.prototype.onKeyDown=function(n){(n.keyCode===13||n.keyCode===32)&&this.onHeaderClicked()},i.ActivePropertyName="active",i.TitlePropertyName="title",i}(n.TemplateControl),r;t.TabHeader=i;i.initialize();r=function(t){function r(n){var r=this;t.call(this,n||"Common.tabItemTemplate");this.header=new i;this.header.click.addHandler(function(){return r.onHeaderClicked()});this.header.rootElement.setAttribute("role","tab");this._onResizeHandler=function(){r._tabPane&&r._tabPane.onTabResize()}}return __extends(r,t),Object.defineProperty(r.prototype,"tabPane",{get:function(){return this._tabPane},set:function(n){this._tabPane=n;this.content=n.rootElement;this._onResizeHandler()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"ownerTabControl",{get:function(){return this._ownerTabControl},set:function(n){if(this._ownerTabControl!==n){if(this._ownerTabControl&&n)throw new Error(u.Resources.getErrorString("JSPerf.1022"));this._ownerTabControl=n}this._ownerTabControl?window.addEventListener("resize",this._onResizeHandler):window.removeEventListener("resize",this._onResizeHandler)},enumerable:!0,configurable:!0}),r.initialize=function(){n.ObservableHelpers.defineProperty(r,r.ActivePropertyName,!1,function(n){return n.onActiveChanged()});n.ObservableHelpers.defineProperty(r,r.TitlePropertyName,"",function(n){return n.onTitleChanged()})},r.prototype.onContentChangedOverride=function(n){n&&this.rootElement.removeChild(n);this.rootElement.appendChild(this.content)},r.prototype.onTooltipChangedOverride=function(){t.prototype.onTooltipChangedOverride.call(this);this.header&&(this.header.tooltip=this.tooltip)},r.prototype.onIsEnabledChangedOverride=function(){t.prototype.onIsEnabledChangedOverride.call(this);this.header.isEnabled=this.isEnabled},r.prototype.onActiveChanged=function(){this.header.active=this.active},r.prototype.onHeaderClicked=function(){this.isEnabled&&this.ownerTabControl&&(this.ownerTabControl.selectedItem=this)},r.prototype.onKeyDown=function(n){(n.keyCode===13||n.keyCode===32)&&this.onHeaderClicked()},r.prototype.onTitleChanged=function(){this.header.title=this.title},r.ActivePropertyName="active",r.TitlePropertyName="title",r}(t.ContentControl);t.TabItem=r;r.initialize()})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,u=function(){function t(){var t=this;this.sourceMapChange=new n.EventSource;i.F12.Communications.addEventListener("onSourceMapStateChanged",function(n){return t.onSourceMapStateChangedHandler(n)})}return t.prototype.getTranslatedLocation=function(n){return i.F12.Debugger.getTranslatedLocation(n.source,n.line,n.column).then(function(t){return{sourceInfo:n,mappedSourceInfo:{column:t.oneBasedColumn,line:t.oneBasedLine,name:n.name,source:t.documentPath}}})},t.prototype.onSourceMapStateChangedHandler=function(n){this.sourceMapChange.invoke({originalSource:n.customData})},t}(),r;t.F12SourceMapHelper=u;r=function(){function t(){this.sourceMapChange=new n.EventSource}return t.prototype.getTranslatedLocation=function(n){return i.Promise.as({sourceInfo:n,mappedSourceInfo:n})},t}();t.VsSourceMapHelper=r;t.sourceMapHelper=i.F12?new u:new r})(t=n.Controls||(n.Controls={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=function(t){function r(n){t.call(this,n||"Common.sourceInfoTooltipTemplate")}return __extends(r,t),Object.defineProperty(r.prototype,"html",{get:function(){return this.rootElement.outerHTML},enumerable:!0,configurable:!0}),r.initialize=function(){n.ObservableHelpers.defineProperty(r,r.TitleLabelResourceIdPropertyName,null);n.ObservableHelpers.defineProperty(r,r.TitlePropertyName,null)},r.prototype.onApplyTemplate=function(){var n,r,u;t.prototype.onApplyTemplate.call(this);n=this.getNamedElement("sourceInfoFileLabel");F12.Tools.Utility.Assert.isTrue(n,"Expecting a named element");n.innerText=i.Resources.getString("/Common/ScriptErrorFile","");r=this.getNamedElement("sourceInfoLineLabel");F12.Tools.Utility.Assert.isTrue(n,"Expecting a named element");r.innerText=i.Resources.getString("/Common/ScriptErrorLine","");u=this.getNamedElement("sourceInfoColumnLabel");F12.Tools.Utility.Assert.isTrue(n,"Expecting a named element");u.innerText=i.Resources.getString("/Common/ScriptErrorColumn","")},r.TitleLabelResourceIdPropertyName="titleLabelResourceId",r.TitlePropertyName="title",r}(n.TemplateControl);t.SourceInfoTooltip=r;r.initialize()})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=function(r){function u(t){r.call(this,t||"Common.sourceInfoTemplate");this.click=new n.EventSource}return __extends(u,r),u.initialize=function(){n.ObservableHelpers.defineProperty(u,u.KeyboardAccessiblePropertyName,!0,function(n){return n.onKeyboardAccessibleChanged()});n.ObservableHelpers.defineProperty(u,u.MappedSourceInfoPropertyName,null)},u.prototype.onApplyTemplate=function(){var n=this;r.prototype.onApplyTemplate.call(this);this.rootElement&&(this.rootElement.addEventListener("mouseover",function(t){return n.showTooltip(t)}),this.rootElement.addEventListener("mouseout",function(){return i.Tooltip.dismiss()}),this.rootElement.addEventListener("mousedown",function(t){return n.stopMouseEvents(t)}),this.rootElement.addEventListener("mouseup",function(t){return n.stopMouseEvents(t)}),this.rootElement.addEventListener("click",function(t){n.model&&n.isEnabled&&(n.click.invoke(n.model),n.stopMouseEvents(t))}),this.rootElement.addEventListener("keydown",function(t){var i=t.keyCode===32||t.keyCode===13;if(n.model&&n.keyboardAccessible&&n.isEnabled&&i)return n.click.invoke(n.model),t.stopImmediatePropagation(),t.preventDefault(),!1}));this.onKeyboardAccessibleChanged()},u.prototype.onModelChanged=function(){var n=this;r.prototype.onModelChanged.call(this);this._onSourceMapStateChangeRegistration&&(this._onSourceMapStateChangeRegistration.unregister(),this._onSourceMapStateChangeRegistration=null);this.updateMappedSourceInfo();this.model&&(this._onSourceMapStateChangeRegistration=t.sourceMapHelper.sourceMapChange.addHandler(function(t){return n.onSourceMapStateChanged(t)}))},u.prototype.onKeyboardAccessibleChanged=function(){this.tabIndex=this.keyboardAccessible?0:-1},u.prototype.onSourceMapStateChanged=function(){this.updateMappedSourceInfo()},u.prototype.showTooltip=function(n){var r,u;if(this.model){if(r=new t.SourceInfoTooltip,r.model=this.mappedSourceInfo,this.onShowingTooltip)this.onShowingTooltip(r);u={content:r.html,contentContainsHTML:!0};i.Tooltip.show(u);n.stopImmediatePropagation()}},u.prototype.stopMouseEvents=function(n){this.model&&this.isEnabled&&(n.stopImmediatePropagation(),n.preventDefault())},u.prototype.updateMappedSourceInfo=function(){var n=this,i;this.mappedSourceInfo&&this.model||(this.mappedSourceInfo=this.model);this.model&&this.model.source&&(i=this.model,t.sourceMapHelper.getTranslatedLocation(i).done(function(t){t.sourceInfo===n.model&&(n.mappedSourceInfo=t.mappedSourceInfo)}))},u.KeyboardAccessiblePropertyName="keyboardAccessible",u.MappedSourceInfoPropertyName="mappedSourceInfo",u}(n.TemplateControl);t.SourceInfoControl=r;r.initialize()})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=function(){function t(n){this._uid=0;this._handlers=[];this._processors=[];this._callbacks={};this._pendingMessages=[];this._pendingTimeout=null;this._traceWriter=n}return Object.defineProperty(t.prototype,"engine",{get:function(){return this._engine},enumerable:!0,configurable:!0}),t.prototype.connect=function(n){this._engine=n},t.prototype.post=function(n){for(var i=[n],o,u,f,s,h,e,t=0,r=this._processors.length;t<r;t++){for(o=this._processors[t],u=[],f=0,s=i.length;f<s;f++)e=i[f],h=o.processor(e),u=u.concat(h);i=u}for(t=0,r=i.length;t<r;t++)e=i[t],this.runSendMessage(e)},t.prototype.loadScript=function(){throw new Error("Not implemented")},t.prototype.runSendMessage=function(){throw new Error("Not implemented")},t.prototype.detach=function(){throw new Error("Not implemented.")},t.prototype.call=function(n,t,i,r){var f=this,h=this.getUid(),s,e,u,o,c,l;if(i&&(this._callbacks[h]={synced:!0,callback:i||null}),s=[],e=[],t)for(u=0;u<t.length;u++)typeof t[u]=="function"?(o=this.getUid(),s.push(o),this._callbacks[o]={synced:!1,callback:t[u]},e[u]={uid:o,type:"callback"}):e[u]=t[u];return c={uid:h,command:n,args:e},l=function(n,i){i&&i(n,t[0]);try{f.post(n)}catch(r){return}},this._pendingMessages.push(c),this._pendingTimeout||(this._pendingTimeout=setTimeout(function(){var n=JSON.stringify(f._pendingMessages);f._pendingTimeout=null;f._pendingMessages=[];l(n,r)},0)),s},t.prototype.onmessage=function(n){var i,r,u,f;this._traceWriter.raiseEvent(405);window.msWriteProfilerMark("ConsoleWindow:BeginOnMessage");try{if(typeof n.engineId=="undefined"&&(n.engineId=t.ENGINE_ID),!this._engine||n.engineId!==this._engine.engineId)return;for(i={engineId:n.engineId,data:n.data,handled:!1},r=0,u=this._handlers.length;r<u;r++)if(f=this._handlers[r],f.handler(i),i.handled)return;this.fireCallbacks(i)}finally{window.msWriteProfilerMark("ConsoleWindow:EndOnMessage");this._traceWriter.raiseEvent(406)}},t.prototype.getUid=function(){return"uid"+(this._uid++).toString(36)},t.prototype.addCallback=function(n,t){this._callbacks[n]=t},t.prototype.addMessageProcessor=function(n,t){this._processors.push({stepName:n,processor:t})},t.prototype.addMessageHandler=function(n,t){this._handlers.push({stepName:n,handler:t})},t.prototype.clearCallbacks=function(){this._callbacks={}},t.prototype.fireCallbacks=function(t){for(var i,u=JSON.parse(t.data),r=0;r<u.length;r++)i=u[r],i&&i.args&&i.args.push(t.engineId),this._callbacks[i.uid]?(this._callbacks[i.uid].callback.apply(this,i.args),this._callbacks[i.uid]&&this._callbacks[i.uid].synced&&delete this._callbacks[i.uid]):i.uid==="scriptError"&&n.ErrorHandling.reportErrorDetails(i.args[0]);return t},t.ENGINE_ID="F12Engine",t}(),i,r,u;n.Channel=t;i=function(n){function t(t,i){n.call(this,i);this._proxy=t;this._proxy.addEventListener("message",this._onmessage=this.onmessage.bind(this))}return __extends(t,n),t.prototype.runSendMessage=function(n){if(this.engine.portName)return this._proxy._post("sendMessage",this.engine.engineId,this.engine.portName,n)},t.prototype.loadScript=function(n){this._proxy._post("loadScript",this.engine.engineId,n)},t.prototype.detach=function(){this._proxy.removeEventListener("message",this._onmessage)},t}(t);n.VSChannel=i;r=function(n){function t(t,i){n.call(this,i);this._external=t;this._external.addEventListener("connect",this._onconnect=this.onConnect.bind(this))}return __extends(t,n),t.prototype.runSendMessage=function(n){this._port.postMessage(n)},t.prototype.loadScript=function(n){this._external.loadScriptInProc(n)},t.prototype.onConnect=function(n){this._port=n;this._port.addEventListener("message",this._onmessage=this.onmessage.bind(this))},t.prototype.detach=function(){this._port.removeEventListener("connect",this._onconnect);this._port.removeEventListener("message",this._onmessage)},t}(t);n.IEChannel=r;u=function(){function n(n,t){this._uid=0;this._handlers=[];this._processors=[];this._callbacks={};this._pendingMessages=[];this._pendingTimeout=null;this._proxy=n;this._proxy.addEventListener("message",this._onmessage=this.onmessage.bind(this));this._traceWriter=t}return n.prototype.connect=function(n){this._engine=n},Object.defineProperty(n.prototype,"engine",{get:function(){return this._engine},enumerable:!0,configurable:!0}),n.prototype.post=function(n){for(var i=[n],o,u,f,s,h,e,t=0,r=this._processors.length;t<r;t++){for(o=this._processors[t],u=[],f=0,s=i.length;f<s;f++)e=i[f],h=o.processor(e),u=u.concat(h);i=u}for(t=0,r=i.length;t<r;t++)e=i[t],this.runSendMessage(e)},n.prototype.loadScript=function(){},n.prototype.runSendMessage=function(n){return this._proxy._post("sendMessage",this._engine.engineId,this._engine.portName,n)},n.prototype.call=function(n,t,i,r){var f=this.getUid(),e,u;i&&(this._callbacks[f]={synced:!0,callback:i||null});e={id:f,method:n,params:t};u=JSON.stringify(e);r&&r(u,t[0]);try{this.post(u)}catch(o){return}return[]},n.prototype.onmessage=function(n){var t,r,i;this._traceWriter.raiseEvent(405);window.msWriteProfilerMark("ConsoleWindow:BeginOnMessage");try{if(t=JSON.parse(n.data),t)if(t.id&&this._callbacks[t.id])this._callbacks[t.id]&&(this._callbacks[t.id].callback.call(this,t),this._callbacks[t.id].synced&&delete this._callbacks[t.id]);else if(t.method)for(r={engineId:n.engineId,data:t,handled:!1},i=0;i<this._handlers.length;i++)if(this._handlers[i].stepName===t.method&&(this._handlers[i].handler(r),r.handled))break}finally{window.msWriteProfilerMark("ConsoleWindow:EndOnMessage");this._traceWriter.raiseEvent(406)}},n.prototype.getUid=function(){return this._uid++},n.prototype.addCallback=function(n,t){this._callbacks[n]=t},n.prototype.addMessageProcessor=function(n,t){this._processors.push({stepName:n,processor:t})},n.prototype.addMessageHandler=function(n,t){this._handlers.push({stepName:n,handler:t})},n.prototype.clearCallbacks=function(){this._callbacks={}},n.prototype.detach=function(){this._proxy.removeEventListener("message",this._onmessage)},n}();n.ChromiumChannel=u}(Common||(Common={})),function(n){var t=function(){function n(){}return n.defaultButtonTemplate='<div class="BPT-button" tabindex="1"><\/div>',n.iconButton24x24='<div class="BPT-button iconButton24x24" tabindex="1">            <span class="buttonIcon"><\/span>        <\/div>',n.menuButton33x24='<div class="BPT-button menuButton33x24" tabindex="1">            <span class="buttonIcon"><\/span>        <\/div>',n.menuButton33x24x5='<div class="BPT-button menuButton33x24 imageStates5" tabindex="1">            <span class="buttonIcon"><\/span>        <\/div>',n.iconButton='<div class="BPT-button iconButton" tabindex="1">            <span class="buttonIcon"><\/span>        <\/div>',n.labeledIconButton='<div class="BPT-button labeledIconButton" tabindex="1">            <span class="buttonIcon"><\/span>            <span class="buttonText" data-controlbinding="innerText:content"><\/span>        <\/div>',n.defaultToolbarTemplate='<div class="BPT-Toolbar" role="toolbar">            <div class="BPT-ToolbarContents">                <span class="BPT-ToolTitle" data-controlbinding="innerText:title,                                            attr-aria-label:title"><\/span>                <div data-name="_toolbarPanel" data-control="Common.TemplateControl" data-controlbinding="model:model,                                           templateId:panelTemplateId" data-options="className:buttons"><\/div>            <\/div>        <\/div>',n.toolbarTemplateWithSearchControl='<div class="BPT-Toolbar" role="toolbar">            <div class="BPT-ToolbarContents">                <span class="BPT-ToolTitle" data-controlbinding="innerText:title,                                            attr-aria-label:title"><\/span>                <div data-name="_toolbarPanel" data-control="Common.TemplateControl" data-controlbinding="model:model,                                           templateId:panelTemplateId" data-options="className:buttons"><\/div>                <div data-name="_searchControl" data-control="Common.Controls.SearchControl"><\/div>            <\/div>        <\/div>',n.searchBoxTemplate='<div data-name="searchBoxBorder" id="searchBoxBorder" class="BPT-SearchBox-Border">            <input type="text" id="searchbox" class="BPT-SearchBox" tabindex="0" role="search" data-name="_textBoxRoot" data-controlbinding="attr-data-plugin-vs-tooltip:tooltip,                                         value:text; mode=twoway,                                         placeholder:placeholder" data-options="attr-aria-label:/Common/SearchBoxTooltip; converter=Common.CommonConverters.ResourceConverter,                                  attr-data-plugin-vs-tooltip:/Common/SearchBoxPlaceholder; converter=Common.CommonConverters.ResourceConverter" />            <div data-name="searchPreviousResult" id="searchPreviousResult" class="BPT-Search-Button" role="button" tabindex="0" data-options="attr-data-plugin-vs-tooltip:/Common/SearchPrevText; converter=Common.CommonConverters.ResourceConverter,                                attr-aria-label:/Common/SearchPrevText; converter=Common.CommonConverters.ResourceConverter">                <div class="BPT-Search-Previous"><\/div>            <\/div>            <div data-name="searchNextResult" id="searchNextResult" class="BPT-Search-Button" role="button" tabindex="0" data-options="attr-data-plugin-vs-tooltip:/Common/SearchNextText; converter=Common.CommonConverters.ResourceConverter,                                attr-aria-label:/Common/SearchNextText; converter=Common.CommonConverters.ResourceConverter">                <div class="BPT-Search-Next"><\/div>            <\/div>        <\/div>',n.toolbarTemplateWithSearchBox='<div class="BPT-Toolbar" role="toolbar">            <div class="BPT-ToolbarContents">                <span class="BPT-ToolTitle" data-controlbinding="innerText:title,                                            attr-aria-label:title"><\/span>                <div data-name="_toolbarPanel" data-control="Common.TemplateControl" data-controlbinding="model:model,                                           templateId:panelTemplateId" data-options="className:buttons"><\/div>                <div id="searchBoxBorder" class="BPT-SearchBox-Border">                    <input type="text" id="searchbox" class="BPT-SearchBox" tabindex="1" role="search" />                    <div id="searchPreviousResult" class="BPT-Search-Button" role="button" tabindex="1">                        <div class="BPT-Search-Previous"><\/div>                    <\/div>                    <div id="searchNextResult" class="BPT-Search-Button" role="button" tabindex="1">                        <div class="BPT-Search-Next"><\/div>                    <\/div>                <\/div>            <\/div>        <\/div>',n.toolbarTemplateWithoutTitle='<div class="BPT-Toolbar" role="toolbar">            <div class="BPT-ToolbarContents">                <div data-name="_toolbarPanel" data-control="Common.TemplateControl" data-controlbinding="model:model,                                           templateId:panelTemplateId" data-options="className:buttons"><\/div>            <\/div>        <\/div>',n.menuControlTemplate='<div class="BPT-menuControl" role="menu">            <div data-control="Common.TemplateControl" data-controlbinding="model:model,                                       templateId:menuItemsTemplateId" data-options="className:BPT-menuContent"><\/div>        <\/div>',n.menuItemTemplate='<li class="menuItem" role="menuitem" tabindex="0" data-controlbinding="attr-aria-label:tooltip,                                  attr-data-plugin-vs-tooltip:tooltip">            <div class="gutter"><\/div>            <span data-controlbinding="innerText:content,                                        attr-aria-label:content"><\/span>        <\/li>',n.menuItemCheckMarkTemplate='<li class="menuItem" role="menuitemcheckbox" tabindex="0" data-controlbinding="attr-aria-label:tooltip,                                  attr-data-plugin-vs-tooltip:tooltip">            <img class="menuToggleItem gutter" data-options="src:plugin-menu-item-checkmark; converter=Common.CommonConverters.ThemedImageConverter" />            <span data-controlbinding="innerText:content,                                        attr-aria-label:content"><\/span>        <\/li>',n.menuItemCheckBoxTemplate='<li class="menuItem" role="menuitemcheckbox" tabindex="0" data-controlbinding="attr-aria-label:tooltip,                                  attr-data-plugin-vs-tooltip:tooltip">            <input type="checkbox" tabindex="-1" data-name="BPT-menuItemCheckBox" data-controlbinding="checked:isChecked; mode=twoway" />            <span data-controlbinding="innerText:content,                                        attr-aria-label:content"><\/span>        <\/li>',n.menuItemComboBoxTemplate='<li class="menuItem comboBoxMenuItem" role="menuitem" tabindex="-1">            <div data-control="Common.Controls.ComboBox" data-name="BPT-menuItemComboBox" data-controlbinding="items:items,                                      selectedValue:selectedValue; mode=twoway,                                      tooltip:tooltip" data-options="tabIndex:0"><\/div>        <\/li>',n.menuItemTextBoxTemplate='<li class="menuItem textBoxMenuItem" role="menuitem" tabindex="-1">            <div data-control="Common.Controls.TextBox" data-name="BPT-menuItemTextBox" data-controlbinding="isEnabled:isEnabled,                                      placeholder:placeholder,                                      text:content; mode=twoway,                                      tooltip:tooltip" data-options="clearOnEscape:1,                               tabIndex:0,                               updateOnInput:1"><\/div>        <\/li>',n.defaultComboBoxTemplate='<select data-controlbinding="value:selectedValue; mode=twoway" data-options="tabIndex:0"><\/select>',n.defaultComboBoxItemTemplate='<option data-binding="attr-aria-label:label,                               attr-data-plugin-vs-tooltip:tooltip,                               title:tooltip,                               text:text,                               value:value"><\/option>',n.defaultTextBoxTemplate='<input type="text" class="BPT-TextBox" data-controlbinding="attr-data-plugin-vs-tooltip:tooltip,                                     value:text; mode=twoway,                                     placeholder:placeholder" />',n.tabHeaderTemplate='<li tabindex="-1" data-controlbinding="attr-aria-label:tooltip,                                  attr-data-plugin-vs-tooltip:tooltip,                                  class-active:active,                                  class-disabled:isEnabled; converter=Common.CommonConverters.InvertBool,                                  tabindex: isEnabled; converter=Common.CommonConverters.IsTabbableToTabIndexConverter,                                  textContent:title"><\/li>',n.tabItemTemplate='<div class="BPT-tabItem tabItemContent" data-controlbinding="class-active:active"><\/div>',n.tabControlTemplate='<div class="BPT-tabControl">            <div class="tabHeader">                <div data-name="beforeBarContainer" class="beforeBarContainer"><\/div>                <nav data-name="tabBarContainer" class="tabBarContainer" data-controlbinding="class-tabBarContainerLeftAlign:tabsLeftAligned">                    <ul data-name="tabBar" class="tabBar"><\/ul>                <\/nav>                <div data-name="afterBarContainer" class="afterBarContainer"><\/div>            <\/div>            <div data-name="tabContentPane" class="tabContentPane"><\/div>        <\/div>',n.sourceInfoTemplate='<div class="BPT-FileLink">            <a data-controlbinding="class-BPT-hidden:mappedSourceInfo; converter=Common.CommonConverters.InvertBool">                <span data-controlbinding="innerText:mappedSourceInfo.name"><\/span>                (<span data-controlbinding="innerText:mappedSourceInfo.source; converter=Common.CommonConverters.CreateShortenedUrlConverter"><\/span>:<span data-controlbinding="innerText:mappedSourceInfo.line; converter=Common.CommonConverters.IntToStringConverter"><\/span>)            <\/a>        <\/div>',n.sourceInfoSourceOnlyTemplate='<div class="BPT-FileLink">            <a data-controlbinding="class-BPT-hidden:mappedSourceInfo; converter=Common.CommonConverters.InvertBool">                <span data-controlbinding="innerText:mappedSourceInfo.source; converter=Common.CommonConverters.CreateShortenedUrlConverter"><\/span>:<span data-controlbinding="innerText:mappedSourceInfo.line; converter=Common.CommonConverters.IntToStringConverter"><\/span><\/a>        <\/div>',n.sourceInfoNameOnlyTemplate='<div class="BPT-FileLink">            <a data-controlbinding="class-BPT-hidden:mappedSourceInfo; converter=Common.CommonConverters.InvertBool">                <span data-controlbinding="innerText:mappedSourceInfo.name"><\/span>            <\/a>        <\/div>',n.sourceInfoTooltipTemplate='<div class="BPT-sourceInfoTooltip">            <div class="sourceInfoNameLabel" data-controlbinding="class-BPT-hidden:titleLabelResourceId; converter=Common.CommonConverters.InvertBool,                                                                   innerText:titleLabelResourceId; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div class="sourceInfoName" data-controlbinding="class-BPT-hidden:title; converter=Common.CommonConverters.InvertBool,                                                              innerText:title"><\/div>            <div class="sourceInfoFileLabel" data-name="sourceInfoFileLabel"><\/div>            <div class="sourceInfoFile" data-binding="innerText:source"><\/div>            <div class="sourceInfoLineLabel" data-name="sourceInfoLineLabel"><\/div>            <div class="sourceInfoLine" data-binding="innerText:line; converter=Common.CommonConverters.IntToStringWithGroupSeperatorConverter"><\/div>            <div class="sourceInfoColumnLabel" data-name="sourceInfoColumnLabel"><\/div>            <div class="sourceInfoColumn" data-binding="innerText:column; converter=Common.CommonConverters.IntToStringWithGroupSeperatorConverter"><\/div>        <\/div>',n.virtualizingStackPanelTemplate='<div class="BPT-stackPanel">            <div data-name="contentSizer" class="BPT-contentSizer"><\/div>            <div data-name="content"><\/div>        <\/div>',n.stackPanelTemplate='<div class="BPT-stackPanel">            <div id="contentSizer" class="BPT-contentSizer"><\/div>            <div id="content"><\/div>        <\/div>',n.defaultTreeItemDataTemplate='<div class="BPT-treeItemDataTemplate">            <div data-name="expander"><\/div>        <\/div>',n.defaultColorPickerTemplate='<div class="colorPicker">            <div data-name="selectedColorPane" class="selectedColorPane">                <div data-name="selectedColorSquare" data-control="Common.Controls.Button" data-control-templateid="Common.selectedColorTemplate" data-controlbinding="content:color,                                           tooltip:color"><\/div>                <div data-name="selectedColorText" data-control="Common.Controls.TextBox" data-controlbinding="text:color" data-options="className:selectedColorValue,                                    readonly:1" tabindex="1"><\/div>            <\/div>            <div class="colorToolsPane">                <div data-name="eyedropperButton" data-control="Common.Controls.ToggleButton" data-control-templateid="Common.iconButton24x24" data-controlbinding="isChecked:isEyedropperActive; mode=twoway" data-options="className:eyedropperButton,                                    tooltip:/Common/EyedropperButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>                <div data-name="slidersButton" data-control="Common.Controls.ToggleButton" data-control-templateid="Common.iconButton24x24" data-controlbinding="isChecked:isSlidersShown; mode=twoway" data-options="className:slidersButton,                                    tooltip:/Common/SlidersButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>                <div data-name="paletteProgress" data-control="Common.TemplateControl" data-control-templateid="Common.paletteProgressTemplate" data-controlbinding="isVisible:isPaletteLoading"><\/div>                <div data-name="_colorPalette" data-control="Common.Controls.RibbonControl" data-control-templateid="Common.paletteItemsControlTemplate" data-controlbinding="items:paletteColors,                                           selectedItem:color; mode=twoway,                                           isEnabled:isPaletteLoading; converter=Common.CommonConverters.InvertBool" data-options="itemContainerControl:Common.Controls.Button(Common.paletteColorTemplate),                                    scrollIncrement:4; converter=Common.CommonConverters.StringToIntConverter,                                    tooltip:/Common/ColorPickerPaletteTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <\/div>            <div class="slidersPane" data-name="slidersPane" data-control="Common.Controls.ColorPickerSlidersControl" data-control-templateid="Common.slidersPaneTemplate" data-controlbinding="isVisible:isSlidersShown,                                       color:color; mode=twoway"><\/div>        <\/div>',n.paletteItemsControlTemplate='<div class="colorPalette">            <div data-name="_backwardScrollButton" data-control="Common.Controls.Button" data-control-templateid="Common.arrowButton" data-options="className:arrowLeft,                                tooltip:/Common/RibbonControlPreviousButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="_panel" data-options="className:colorPalettePanel" tabindex="1"><\/div>            <div data-name="_forwardScrollButton" data-control="Common.Controls.Button" data-control-templateid="Common.arrowButton" data-options="className:arrowRight,                                tooltip:/Common/RibbonControlNextButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>        <\/div>',n.slidersPaneTemplate='<div>            <label data-options="textContent:/Common/Hue; converter=Common.CommonConverters.ResourceConverter">Hue<\/label>            <div data-name="hueText" data-control="Common.Controls.TextBox" data-controlbinding="text:hue" data-options="className:hslText,                                readonly:1" tabindex="-1"><\/div>            <input class="colorSlider hueSlider" type="range" min="0" max="359" step="1" data-controlbinding="value:hue; mode=twoway; converter=Common.CommonConverters.IntToStringConverter" data-options="attr-data-plugin-vs-tooltip:/Common/Hue; converter=Common.CommonConverters.ResourceConverter,                                  attr-aria-label:/Common/Hue; converter=Common.CommonConverters.ResourceConverter" tabindex="1" />            <label data-options="textContent:/Common/Saturation; converter=Common.CommonConverters.ResourceConverter">Saturation<\/label>            <div data-name="saturationText" data-control="Common.Controls.TextBox" data-controlbinding="text:saturation" data-options="className:hslText,                                readonly:1" tabindex="-1"><\/div>            <input class="colorSlider saturationSlider" type="range" min="0" max="100" step="1" data-controlbinding="value:saturation; mode=twoway; converter=Common.CommonConverters.IntToStringConverter" data-options="attr-data-plugin-vs-tooltip:/Common/Saturation; converter=Common.CommonConverters.ResourceConverter,                                  attr-aria-label:/Common/Saturation; converter=Common.CommonConverters.ResourceConverter" tabindex="1" />            <label data-options="textContent:/Common/Lightness; converter=Common.CommonConverters.ResourceConverter">Lightness<\/label>            <div data-name="lightnessText" data-control="Common.Controls.TextBox" data-controlbinding="text:lightness" data-options="className:hslText,                                readonly:1" tabindex="-1"><\/div>            <input class="colorSlider lightnessSlider" type="range" min="0" max="100" step="1" data-controlbinding="value:lightness; mode=twoway; converter=Common.CommonConverters.IntToStringConverter" data-options="attr-data-plugin-vs-tooltip:/Common/Lightness; converter=Common.CommonConverters.ResourceConverter,                                  attr-aria-label:/Common/Lightness; converter=Common.CommonConverters.ResourceConverter" tabindex="1" />            <label data-options="textContent:/Common/Alpha; converter=Common.CommonConverters.ResourceConverter">Alpha<\/label>            <div data-name="alphaText" data-control="Common.Controls.TextBox" data-controlbinding="text:alpha" data-options="className:hslText,                                readonly:1" tabindex="-1"><\/div>            <input class="colorSlider alphaSlider" type="range" min="0" max="100" step="1" data-controlbinding="value:alpha; mode=twoway; converter=Common.ColorSlidersConverters.AlphaConverter" data-options="attr-data-plugin-vs-tooltip:/Common/Alpha; converter=Common.CommonConverters.ResourceConverter,                                  attr-aria-label:/Common/Alpha; converter=Common.CommonConverters.ResourceConverter" tabindex="1" />        <\/div>',n.selectedColorTemplate='<div class="BPT-button colorSquare">            <span class="buttonIcon" data-controlbinding="style.backgroundColor:content"><\/span>        <\/div>',n.paletteColorTemplate='<div class="BPT-button colorSquare" tabindex="-1" data-controlbinding="attr-data-plugin-vs-tooltip:model,                                   attr-aria-label:model">            <span class="buttonIcon" data-controlbinding="style.backgroundColor:model"><\/span>        <\/div>',n.arrowButton='<div class="arrowButton"><\/div>',n.paletteProgressTemplate='<progress class="colorPaletteProgress colorPalettePanel"><\/progress>',n}();n.Common=t}(ControlTemplates||(ControlTemplates={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var r=Microsoft.Plugin,i=function(t){function i(n){var i=this;this._mouseHandler=function(n){return i.onMouseEvent(n)};t.call(this,n||"Common.defaultComboBoxTemplate");this.itemContainerControl="Common.TemplateControl(Common.defaultComboBoxItemTemplate)"}return __extends(i,t),Object.defineProperty(i.prototype,"focusableElement",{get:function(){return this.rootElement},enumerable:!0,configurable:!0}),i.initialize=function(){n.ObservableHelpers.defineProperty(i,i.SelectedValuePropertyName,"")},i.prototype.onApplyTemplate=function(){t.prototype.onApplyTemplate.call(this);this.rootElement&&this.rootElement.addEventListener("mouseover",this._mouseHandler)},i.prototype.onTemplateChanging=function(){t.prototype.onTemplateChanging.call(this);this.rootElement&&this.rootElement.removeEventListener("mouseover",this._mouseHandler)},i.prototype.onItemsChangedOverride=function(){this.propertyChanged.invoke(i.SelectedValuePropertyName)},i.prototype.onItemContainerControlChangedOverride=function(){this.propertyChanged.invoke(i.SelectedValuePropertyName)},i.prototype.onCollectionChangedOverride=function(){this.propertyChanged.invoke(i.SelectedValuePropertyName)},i.prototype.onIsEnabledChangedOverride=function(){t.prototype.onIsEnabledChangedOverride.call(this);this.isEnabled?this.rootElement.removeAttribute("disabled"):this.rootElement.setAttribute("disabled")},i.prototype.onMouseEvent=function(n){var u,f,t,i;if(this.isEnabled){switch(n.type){case"mouseover":for(u=this.selectedValue,f=this.getItemCount(),t=0;t<f;t++)i=this.getItem(t),i.value===u&&i.tooltip&&r.Tooltip.show({content:i.tooltip});break;default:F12.Tools.Utility.Assert.fail("Unexpected")}n.stopImmediatePropagation();n.preventDefault()}},i.SelectedValuePropertyName="selectedValue",i}(t.ItemsControl);t.ComboBox=i;i.initialize()})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function t(){}return t.getCanonicalMediaType=function(n){return(this.initialize(),!n)?n:(n=this.normalizeMediaType(n),this.getCanonicalMediaTypeCommon(n))},t.isEditableMediaType=function(n){return(this.initialize(),!n)?!1:(n=this.normalizeMediaType(n),this.isEditableMediaTypeCommon(n))},t.mediaTypeSupportsFindRefs=function(n){return(this.initialize(),!n)?!1:(n=this.normalizeMediaType(n),this.mediaTypeSupportsFindRefsCommon(n))},t.isJMCEnabledForMediaType=function(n){return(this.initialize(),!n)?!1:(n=this.normalizeMediaType(n),this.isJMCEnabledForMediaTypeCommon(n))},t.getMediaTypeForFileExtension=function(n,t){return(this.initialize(),n)?(n=this.normalizeFileExtension(n),this.getMediaTypeForFileExtensionCommon(n,t)):this.getCanonicalFallbackMediaType(t)},t.getSortedMediaTypes=function(n){var o=this,f,i,r,u,s,e,t;if(this.initialize(),!n)return[];if(f=new Set,n=n.filter(function(n){return!n||f.has(n)?!1:(f.add(n),!0)}),i=n.length,i<=0)return[];for(r=new Array(i),u=new Array(i),t=0;t<i;t++)r[t]=t,s=this.normalizeMediaType(n[t]),u[t]=this.getCanonicalMediaTypeCommon(s);for(r.sort(function(n,t){var i=o.getRank(u[n]),r=o.getRank(u[t]);return i<r?-1:i>r?1:n-t}),e=new Array(i),t=0;t<i;t++)e[t]=n[r[t]];return e},t.registerMediaTypes=function(n){if(n)for(var t in n)this.registerMediaType(t,n[t])},t.registerMediaType=function(n,t){n&&(n=this.normalizeMediaType(n),this.registerMediaTypeCommon(n,t))},t.setEditableMediaType=function(n,t){n&&(n=this.normalizeMediaType(n),this.setEditableMediaTypeCommon(n,t))},t.setJMCEnabledMediaType=function(n,t){n&&(n=this.normalizeMediaType(n),this.setJMCEnabledMediaTypeCommon(n,t))},t.registerAlternateMediaTypes=function(n,t){!n||!t||t.length<=0||(n=this.normalizeMediaType(n),this.registerAlternateMediaTypesCommon(n,t))},t.registerAlternateMediaType=function(n,t){n&&t&&(n=this.normalizeMediaType(n),t=this.normalizeMediaType(t),this.registerAlternateMediaTypeCommon(n,t))},t.registerMediaTypeFileExtensions=function(n,t){!n||!t||t.length<=0||(n=this.normalizeMediaType(n),this.registerMediaTypeFileExtensionsCommon(n,t))},t.registerMediaTypeFileExtension=function(n,t){t&&n&&(n=this.normalizeMediaType(n),t=this.normalizeFileExtension(t),this.registerMediaTypeFileExtensionCommon(n,t))},t.initialize=function(){this._initialized||(this.registerMediaTypes(this._defaultMediaTypes),this.setEditableMediaType("text/css",!0),n.FeatureAvailability&&this.setEditableMediaType("text/javascript",n.FeatureAvailability.isEnabled(0)),this._initialized=!0)},t.getCanonicalMediaTypeCommon=function(n){for(;;){var t=this._canonicalMap.get(n);if(t){n=t;continue}break}return n},t.getMediaTypeForFileExtensionCommon=function(n,t){var i=this._extensionMap.get(n);return i?this.getCanonicalMediaTypeCommon(i):this.getCanonicalFallbackMediaType(t)},t.isEditableMediaTypeCommon=function(n){while(n){if(this._editableMediaTypes.has(n))return!0;n=this._canonicalMap.get(n)}return!1},t.isJMCEnabledForMediaTypeCommon=function(n){while(n){if(this._jmcMediaTypes.has(n))return!0;n=this._canonicalMap.get(n)}return!1},t.mediaTypeSupportsFindRefsCommon=function(n){while(n){if(this._findRefsMediaTypes.has(n))return!0;n=this._canonicalMap.get(n)}return!1},t.registerMediaTypeCommon=function(n,t){t&&(t.alternates&&t.alternates.length>0&&this.registerAlternateMediaTypesCommon(n,t.alternates),t.extensions&&t.extensions.length>0&&this.registerMediaTypeFileExtensionsCommon(n,t.extensions),"editable"in t&&this.setEditableMediaTypeCommon(n,t.editable),"canFindRefs"in t&&this.setMediaTypeCanFindRefsCommon(n,t.canFindRefs),"jmcEnabled"in t&&this.setJMCEnabledMediaTypeCommon(n,t.jmcEnabled))},t.registerAlternateMediaTypesCommon=function(n,t){var i=this;t.forEach(function(t){t&&(t=i.normalizeMediaType(t),i.registerAlternateMediaTypeCommon(n,t))})},t.registerAlternateMediaTypeCommon=function(n,t){if(n!==t){for(var i=this._canonicalMap.get(n);i;)F12.Tools.Utility.Assert.areNotEqual(i,t,"Invalid attempt to add a cyclical reference to a media type."),i=this._canonicalMap.get(i);this._canonicalMap.set(t,n)}},t.registerMediaTypeFileExtensionsCommon=function(n,t){var i=this;t.forEach(function(t){t&&(t=i.normalizeFileExtension(t),i.registerMediaTypeFileExtensionCommon(n,t))})},t.registerMediaTypeFileExtensionCommon=function(n,t){this._extensionMap.set(t,n)},t.setEditableMediaTypeCommon=function(n,t){t?this._editableMediaTypes.add(n):this._editableMediaTypes.delete(n)},t.setMediaTypeCanFindRefsCommon=function(n,t){t?this._findRefsMediaTypes.add(n):this._findRefsMediaTypes.delete(n)},t.setJMCEnabledMediaTypeCommon=function(n,t){t?this._jmcMediaTypes.add(n):this._jmcMediaTypes.delete(n)},t.normalizeMediaType=function(n){n=n.trim();n=n.toLowerCase();var t=n.indexOf(";");return t>-1&&(n=n.substr(0,t)),n},t.normalizeFileExtension=function(n){return n=n.trim(),n=n.toLowerCase(),n.charAt(0)!=="."&&(n="."+n),n},t.getRank=function(n){switch(n){case"text/plain":return 3;case"text/javascript":case"text/html":case"text/css":case"text/xml":return 2;case"text/typescript":case"text/coffeescript":case"text/x-csharp":case"text/less":case"text/scss":return 1;default:return 0}},t.getCanonicalFallbackMediaType=function(n){return n?(n=this.normalizeMediaType(n),this.getCanonicalMediaTypeCommon(n)):"text/plain"},t._initialized=!1,t._defaultMediaTypes={"text/html":{alternates:["text/x-jshtm","text/x.jshtm"],extensions:[".html",".htm"],jmcEnabled:!0},"text/xml":{alternates:["application/xml",],extensions:[".xml",".xsl",".svg"]},"text/javascript":{alternates:["text/javascript1.0","text/javascript1.1","text/javascript1.2","text/javascript1.3","text/javascript1.4","text/javascript1.5","text/jscript","text/livescript","text/x-javascript","text/x-ecmascript","text/x.javascript","text/x.ecmascript","application/javascript","application/ecmascript","application/x-javascript","application/x-ecmascript","application/x.javascript","application/x.ecmascript"],extensions:[".js"],jmcEnabled:!0,canFindRefs:!0},"text/typescript":{alternates:["video/vnd.dlna.mpeg-tts","text/x.typescript","text/vnd.ms.typescript","application/typescript","application/x.typescript","application/vnd.ms.typescript"],extensions:[".ts",".str"],jmcEnabled:!0,canFindRefs:!0},"text/coffeescript":{alternates:["text/x-coffeescript","text/x.coffeescript","application/coffeescript","application/x-coffeescript","application/x.coffeescript"],extensions:[".coffee"],jmcEnabled:!0},"text/x-csharp":{alternates:[],extensions:[".cs"],jmcEnabled:!0},"text/css":{alternates:[],extensions:[".css"]},"text/less":{alternates:["text/x-less","text/x.less"],extensions:[".less"]},"text/scss":{alternates:["text/x-scss","text/x.scss"],extensions:[".sass",".scss"]}},t._extensionMap=new Map,t._canonicalMap=new Map,t._editableMediaTypes=new Set,t._findRefsMediaTypes=new Set,t._jmcMediaTypes=new Set,t}();n.MediaTypeManager=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(){}return Object.defineProperty(n,"EmptyPromise",{get:function(){return n.EmptyPromiseObject||(n.EmptyPromiseObject=t.Promise.as(undefined)),n.EmptyPromiseObject},enumerable:!0,configurable:!0}),n}();n.PromiseUtilities=i})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function t(n){var f=this,r,u,i;this._viewModel=n;this._rootElement=document.createElement("div");this._rootElement.classList.add("resourceGrid");this._gridRootElement=document.createElement("div");this._gridRootElement.classList.add("resourceGrid-grid");this._titleElement=document.createElement("div");this._titleElement.classList.add("resourceGrid-title");this._viewModel.title.addHandler(this.onTitleChange.bind(this));this._rootElement.appendChild(this._titleElement);this._rootElement.appendChild(this._gridRootElement);r={enableColumnReorder:!1,forceFitColumns:!0,editable:!0,enableAddRow:!0,autoEdit:!1,explicitInitialization:!0,editCommandHandler:this._viewModel.editItem.bind(this._viewModel),enableAsyncPostRender:!0,asyncPostRenderDelay:0,rowHeight:20,syncColumnCellResize:!0};t.initColumns(this._viewModel.columns);u=this._viewModel.dataView;this._grid=new Slick.Grid(this._gridRootElement,u,this._viewModel.columns,r);this._grid.setSelectionModel(new Slick.RowSelectionModel);i=this._viewModel.columns[0];this._grid.setSortColumn(i.id,!0);this._viewModel.sort({sortColName:i.field,ascending:!0});$(this._gridRootElement).on("blur","input.editor-text",function(){return Slick.GlobalEditorLock.commitCurrentEdit()});this._contextMenuId=t.NextId++;this._gridRootElement.addEventListener("contextmenu",function(n){return f.showContextMenu(n)});window.addEventListener("resize",this.doLayout.bind(this));this.setupGridDataEvents()}return Object.defineProperty(t.prototype,"rootElement",{get:function(){return this._rootElement},enumerable:!0,configurable:!0}),t.prototype.setupGridDataEvents=function(){var t=this,i=this._viewModel.dataView;i.onRowCountChanged.subscribe(function(){t.preserveActiveRowState(function(){t._grid.updateRowCount();t._grid.render()})});i.onRowsChanged.subscribe(function(n,i){t.preserveActiveRowState(function(){t._grid.invalidateRows(i.rows);t._grid.render()})});this._grid.onAddNewRow.subscribe(function(n,i){t._viewModel.addItem(i.item)});this._grid.onSort.subscribe(function(n,i){t._viewModel.sort({sortColName:i.sortCol.field,ascending:i.sortAsc})});this._grid.onBeforeEditCell.subscribe(function(n,r){var u=!0;return r.row===i.getLength()&&r.column!==t._viewModel.columns[0]&&(u=!1,t.forceEditInAddNewRow()),u});this._grid.onKeyDown.subscribe(function(n){if(n.which!==46||n.ctrlKey||n.shiftKey||n.altKey||!t._grid.getActiveCell()||t.isEditing())n.which===9?t.isEditing()&&window.setImmediate(function(){return t._grid.editActiveCell()}):n.which!==116||!n.ctrlKey||n.shiftKey||n.altKey||t.isEditing()?n.which!==65||!n.ctrlKey||n.shiftKey||n.altKey||t.isEditing()||t.selectAll():t._viewModel.refresh();else{var i=t._grid.getDataLength(),r=t._grid.getSelectedRows().filter(function(n){return n!==i});t._grid.setSelectedRows([]);t._viewModel.removeItems(r)}});this._grid.onActiveCellChanged.subscribe(function(n,r){typeof r.row!="undefined"?(t._activeRowNum=r.row,t._activeRowId=t._viewModel.dataView.mapRowsToIds([r.row])[0],t._activeCell=r.cell,r.row===i.getLength()&&t.forceEditInAddNewRow()):t._activeRowNum=t._activeRowId=t._activeCell=null});this._viewModel.setupGridDataEvents(this._grid);n.ClipboardHelper.addCopyListener(this._rootElement,this.onCopy.bind(this))},t.prototype.doLayout=function(){this._grid.resizeCanvas()},t.prototype.init=function(){this._grid.init();this.initHeaderTooltips()},t.initColumns=function(n){var t=function(n,t,i,r){var u=""+i[r.field],f;n.setAttribute("aria-label",r.name+", "+u);f=JSON.stringify({content:u});n.setAttribute("data-plugin-vs-tooltip",f)};n.forEach(function(n){return n.asyncPostRender=t})},t.prototype.forceEditInAddNewRow=function(){var n=this;setTimeout(function(){!n._rootElement.parentElement||n._grid.gotoCell(n._viewModel.dataView.getLength(),0,!0)},0)},t.prototype.initHeaderTooltips=function(){var n=this;this._viewModel.columns.filter(function(n){return n.headerCssClass&&n.showF12Tooltip}).forEach(function(t){var i=n._gridRootElement.querySelector(".slick-header-column."+t.headerCssClass);i&&i.setAttribute("data-plugin-vs-tooltip",t.name)})},t.prototype.onCopy=function(){var t=this._viewModel.columns.map(function(n){return n.field}).filter(function(n){return n!=="id"}),i=this._viewModel.dataView.getItems()||[],r=this._grid.getSelectedRows().sort(function(n,t){return n-t}).map(function(n){return i[n]});return n.CSVWriter.toCSV(t,r)},t.prototype.onCopyMenuItemClicked=function(){n.ClipboardHelper.fireCopyEvent(this._rootElement)},t.prototype.selectAll=function(){var n=this._viewModel.dataView.getItems(),t,i;n&&(t=0,i=n.map(function(){return t++}),this._grid.setSelectedRows(i))},t.prototype.onTitleChange=function(n){this._titleElement.innerText=n;this._titleElement.setAttribute("data-plugin-vs-tooltip",n)},t.prototype.isEditing=function(){return!!this._grid.getCellEditor()},t.prototype.showContextMenu=function(n){var t,e,r,u,f;this._contextMenu&&(this._contextMenu.dispose(),this._contextMenu=null);t=this._grid.getCellFromEvent(n);e=t?t.row:null;this._contextMenu=i.ContextMenu.create(this.createContextMenuItems(e),"resourceContextMenu"+this._contextMenuId);r=0;u=0;n instanceof MouseEvent&&(r=n.pageX,u=n.pageY);r<=0&&u<=0&&(f=this._grid.getCellNode(t.row,t.cell).getBoundingClientRect(),r=f.left,u=f.top);this._contextMenu.show(r,u);n.preventDefault();n.stopImmediatePropagation()},t.prototype.createContextMenuItems=function(n){var r=this,t=[];return t.push({id:"menuItemRefreshResourceItems"+this._contextMenuId,callback:function(){return r._viewModel.refresh()},label:i.Resources.getString("/Common/ResourceGridRefresh"),type:1,disabled:function(){return!1},accessKey:i.Resources.getString("/Common/AccessKeyCtrlF5")}),t=t.concat(this._viewModel.createContextMenuItems(n)),t.push({id:"menuItemCopySelected"+this._contextMenuId,callback:this.onCopyMenuItemClicked.bind(this),label:i.Resources.getString("CopySelectedItems"),type:1,disabled:function(){return!1},accessKey:i.Resources.getString("/Common/AccessKeyCtrlC")}),t.push({id:"menuItemSelectAll"+this._contextMenuId,callback:this.selectAll.bind(this),label:i.Resources.getString("SelectAll"),type:1,disabled:function(){return!1},accessKey:i.Resources.getString("/Common/AccessKeyCtrlA")}),t},t.prototype.preserveActiveRowState=function(n){var e=this._activeRowId,l=this._activeRowNum,o=this._activeCell,s,i=this._grid.getCellEditor(),h,t,r,u,c,f;i&&(s=i.serializeValue());h=document.activeElement===this._grid.getActiveCellNode();n();e&&(t=this._viewModel.dataView.mapIdsToRows([e])[0],t=typeof t=="number"?t:l,r=this._grid.getDataLength(),t=Math.min(t,r),this._grid.setActiveCell(t,o),this._grid.getSelectedRows().length||this._grid.setSelectedRows([t]),u=this._grid.getActiveCellNode(),u&&h&&u.focus(),(i||t===r)&&!!this._rootElement.parentElement&&(this._grid.editActiveCell(),c=this._viewModel.columns[o].field,i&&(f={},f[c]=s,i.loadValue(f))))},t.NextId=0,t}();t.ResourceGrid=r})(t=n.ResourcesView||(n.ResourcesView={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){"use strict";(function(n){n[n.BackgroundOpen=0]="BackgroundOpen";n[n.SwitchWithoutFocus=1]="SwitchWithoutFocus";n[n.SwitchWithFocus=2]="SwitchWithFocus"})(t.Activation||(t.Activation={}));var r=t.Activation,i=function(){function t(i,r,u){r===void 0&&(r=null);u===void 0&&(u=!1);this._handlers=new Map;this.propertyChanged=new n.EventSource;this._rootElement=i||document.createElement("div");this._openModels=[];this._toolbar=r;this._keepModelStack=u;this._listeners=new Set;this._testEventObject=new n.EventHelperObject;r&&r.rootElement.classList.add(t.HideResourceToolbarCssClass)}return Object.defineProperty(t.prototype,"rootElement",{get:function(){return this._rootElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentModel",{get:function(){return this._openModels.length>0?this._openModels[this._openModels.length-1]:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentHandler",{get:function(){return this.currentModel?this._handlers.get(this.currentModel.modelName):null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"testEventObject",{get:function(){return this._testEventObject},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"openModels",{get:function(){return this._openModels},enumerable:!0,configurable:!0}),t.prototype.registerHandler=function(n,t){F12.Tools.Utility.Assert.hasValue(n);F12.Tools.Utility.Assert.isTrue(n.length>0);F12.Tools.Utility.Assert.hasValue(t);this._handlers.set(n,t)},t.prototype.registerListener=function(n){F12.Tools.Utility.Assert.hasValue(n);this._listeners.add(n)},t.prototype.doLayout=function(){if(this.currentModel){var n=this._handlers.get(this.currentModel.modelName);n&&(this._pendingLayoutImmediate&&window.clearImmediate(this._pendingLayoutImmediate),this._pendingLayoutImmediate=window.setImmediate(function(){return n.doLayout()}))}},t.prototype.primeWithElement=function(n){this.currentModel||this.rootElement.firstChild||this.rootElement.appendChild(n)},t.prototype.open=function(t,i){var r=this,u,f;return(i===void 0&&(i={}),F12.Tools.Utility.Assert.hasValue(t),i.activation==null&&(i.activation=2),u=this._handlers.get(t.modelName),!u)?n.PromiseUtilities.EmptyPromise:(this.currentModel||i.activation!==0||(i.activation=1),f=this.currentModel,i.activation!==0?(this.removeModel(t),this._openModels.push(t),this.propertyChanged.invoke("currentModel")):this.modelIsOpen(t)||this._openModels.unshift(t),u.open(t,i.activation,i.params).then(function(n){if(!n){r.removeModel(t);return}(!r._keepModelStack&&f&&r.close(f,!1),r.modelIsOpen(t))&&(r.fireOpened(t,i.activation,i.params,i.softOpen),i.activation!==0&&t===r.currentModel)&&(r.rootElement.firstChild&&(r.rootElement.removeChild(r.rootElement.firstChild),F12.Tools.Utility.Assert.isFalse(!!r.rootElement.firstChild)),r.rootElement.appendChild(n.rootElement),u.onAttach&&u.onAttach(),r.updateToolbar(),u.searchProvider&&u.searchProvider.findAndHighlightMatches())}))},t.prototype.closeCurrent=function(n){this.currentModel&&this.close(this.currentModel,n)},t.prototype.close=function(n,t,i){i===void 0&&(i=!0);F12.Tools.Utility.Assert.hasValue(n);var r=this._handlers.get(n.modelName);r&&(i=i&&this.currentModel===n&&this._keepModelStack,r.close(n,t),this.removeModel(n),this.fireClosed(n,t),i&&this.currentModel?this.open(this.currentModel,{activation:2}):this.currentModel||(this.updateToolbar(),this.rootElement&&this.rootElement.firstChild&&this.rootElement.removeChild(this.rootElement.firstChild)))},t.prototype.closeAllButThis=function(t,i){while(this._openModels.length>0){var r=this._openModels[0];r!==t?this.close(r,i,!1):this._openModels.shift()}return t?this.open(t,{activation:2}):n.PromiseUtilities.EmptyPromise},t.prototype.replace=function(n,t){for(var i=0;i<this._openModels.length;i++)if(this._openModels[i]===n){this._openModels[i]=t;i===this._openModels.length-1&&(this.propertyChanged.invoke("currentModel"),this.updateToolbar());break}},t.prototype.resourceAdded=function(n,t){F12.Tools.Utility.Assert.hasValue(n);this.fireAdded(n,t)},t.prototype.resourceRemoved=function(n){F12.Tools.Utility.Assert.hasValue(n);this.modelIsOpen(n)&&this.close(n,!0);this.fireRemoved(n)},t.prototype.getElementsByClassNameInToolbarRootElement=function(n){return this._toolbar.rootElement.getElementsByClassName(n)},t.prototype.updateToolbar=function(){this._toolbar&&(this.currentModel&&this.currentModel.toolbarPanelTemplate?(this._toolbar.model=this.currentModel,this._toolbar.panelTemplateId=this.currentModel.toolbarPanelTemplate,this._toolbar.rootElement.classList.remove(t.HideResourceToolbarCssClass)):this._toolbar.rootElement.classList.add(t.HideResourceToolbarCssClass))},t.prototype.modelIsOpen=function(n){return this._openModels.indexOf(n)>=0},t.prototype.removeModel=function(n){var t=this._openModels.indexOf(n);t>=0&&(this._openModels.splice(t,1),t===this._openModels.length&&this.propertyChanged.invoke("currentModel"))},t.prototype.fireOpened=function(n,t,i,r){this._listeners.forEach(function(u){u.resourceOpened&&u.resourceOpened(n,t,i,r)});this._testEventObject.fireEvent("resourceOpened",{model:n,activation:t})},t.prototype.fireClosed=function(n,t){this._listeners.forEach(function(i){i.resourceClosed&&i.resourceClosed(n,t)});this._testEventObject.fireEvent("resourceClosed",{model:n,isRuntimeTriggered:t})},t.prototype.fireAdded=function(n,t){this._listeners.forEach(function(i){i.resourceAdded&&i.resourceAdded(n,t)});this._testEventObject.fireEvent("resourceAdded",{model:n,couldHaveExistingChildren:t})},t.prototype.fireRemoved=function(n,t){this._listeners.forEach(function(t){t.resourceRemoved&&t.resourceRemoved(n)});this._testEventObject.fireEvent("fireRemoved",{model:n,leaveInTable:t})},t.NextModelId=1,t.HideResourceToolbarCssClass="BPT-hidden",t}();t.ResourceViewController=i})(t=n.ResourcesView||(n.ResourcesView={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(){}return n.registerFocusHandlers=function(i){t.F12&&(n.LastActiveElement=document.head.parentElement,n.LastActiveElement.focus(),t.F12.Communications.registerMethodHandler("showfocus",function(t){return n.showFocus(t,i)}))},n.registerNavigationFrames=function(i){n.NavigationFrames=i;t.F12&&!n.Registered&&(t.F12.addEventListener("navigatesubframes",function(t){return n.navigateFrames(t.isForward,t.useActiveElement)}),n.Registered=!0)},n.enableNavigation=function(){n.Enabled=!0},n.disableNavigation=function(){n.Enabled=!1},n.makeNavigationFrameFromTarget=function(t,i){return n.makeNavigationFrameFromCallback(t,function(){return i})},n.makeNavigationFrameFromCallback=function(n,t){return{container:n,getNavigationTarget:t}},n.navigateFrames=function(t,i){var e=[],h=[],r=-1,a=t?1:-1,o,c,v,u,s,f,l;if(!n.Enabled)return!1;if(!n.navigateFrames||n.navigateFrames.length===0)return!0;for(o=0;o<n.NavigationFrames.length;o++)c=n.NavigationFrames[o],e.push(c.container),h.push(c.getNavigationTarget());if(i){for(v=document.activeElement,s=0;s<e.length;s++)f=e[s],f.contains(v)&&(u?u.contains(f)&&(u=f):u=f);u&&(r=e.indexOf(u)+a)}else r=t?0:n.NavigationFrames.length-1;while(r>=0&&r<h.length){if(l=h[r],l)return l.focus(),!1;r+=a}return!0},n.showFocus=function(i,r){var f=document.head.parentElement,u=document.activeElement,e=n.LastActiveElement,o;if(i)u&&u!==f?u.focus():n.shouldFocus(e)&&e!==f?e.focus():(o=!0,r===t.F12.PluginId.Console&&(o=!1),n.navigateFrames(o,!1));else{u&&u!==f&&(n.LastActiveElement=u);try{f.setActive()}catch(s){}}return!1},n.shouldFocus=function(n){return n&&document.body.contains(n)&&n.style.display!=="none"&&n.style.visibility!=="hidden"&&!n.disabled&&n.tabIndex>=0},n.Enabled=!0,n.Registered=!1,n}();n.NavigationUtilities=i})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(){}return n.addPromiseErrorListener=function(){var t=Microsoft.Plugin;t.Promise.addEventListener("error",function(i){t.F12&&t.F12.SelfTest.selfTestEnabled||!isDebugBuild&&n.ReportedToWatson||i&&i.detail&&i.detail.exception&&(!i.detail.exception.ExceptionType||i.detail.exception.ExceptionType!=="UnexpectedResult")&&(n.reportErrorGivenStack(i.detail.exception),n.ReportedToWatson=!0)})},n.reportErrorGivenStack=function(t){var e=t.message,u,f,i,r;if(!("stack"in t))try{throw t}catch(o){t=o}for(u=t.stack||"",f=u.split("\n"),r=0;r<f.length;r++)if(i=n.StackRegex.exec(f[r]),i)break;if(i){var s=i[3],h=parseInt(i[4],10),c=parseInt(i[5],10);window.reportError(e,s,h,u,c)}},n.reportErrorDetails=function(n){window.reportError(n.message,n.file,n.line,n.additionalInfo,n.column)},n.StackRegex=new RegExp(".* at ([^(]+) (.*/23/([^:]+):([0-9]+):([0-9]+))","gim"),n.ReportedToWatson=!1,n}();n.ErrorHandling=t})(Common||(Common={}));typeof window!="undefined"&&(window.reportError=function(n,t,i,r,u){var f,e;n=n||"";t=t||"";i=i||0;r=r||"";u=u||0;isDebugBuild&&(window.parent.getExternalObj?f=window.parent.getExternalObj():window.external&&(f=window.external),f&&(e=window.errorComponent?window.errorComponent:"Common",console.error([e,n,t,i,u].join("\r\n")),window.errorDisplayHandler&&window.errorDisplayHandler(n,t,i,r,u)));Microsoft&&Microsoft.Plugin&&Microsoft.Plugin.Diagnostics&&Microsoft.Plugin.Diagnostics.reportError&&Microsoft.Plugin.Diagnostics.reportError(n,t,i,r,u)},window.onerror=function(n,t,i){var r=0,u="";return arguments&&(arguments[3]&&typeof arguments[3]=="number"&&(r=arguments[3]),arguments[4]&&arguments[4]instanceof Error&&(u="Error number: "+arguments[4].number+("\r\nStack: "+arguments[4].stack))),window.reportError(n,t,i,u,r),!0});
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";function e(){document.addEventListener("keydown",function(n){return t(n)});document.addEventListener("contextmenu",function(n){return n.preventDefault(),n.stopPropagation(),!1});window.addEventListener("mousewheel",function(n){if(n.ctrlKey)return n.preventDefault(),n.stopPropagation(),!1})}function o(n){return n.shiftKey||n.ctrlKey||n.altKey}function s(n){return n.ctrlKey&&!n.shiftKey&&!n.altKey}function t(n){return n.keyCode===116||n.keyCode===117||n.keyCode===121&&n.shiftKey||n.keyCode===70&&n.ctrlKey?(n.preventDefault(),n.stopPropagation(),!1):!0}var i=function(){function n(){}return n.C="c",n.DEL="Del",n.DOWN="Down",n.END="End",n.ENTER="Enter",n.F10="F10",n.HOME="Home",n.LEFT="Left",n.RIGHT="Right",n.SPACEBAR="Spacebar",n.UP="Up",n}(),r,u,f;n.Keys=i,function(n){n[n.Backspace=8]="Backspace";n[n.Tab=9]="Tab";n[n.Enter=13]="Enter";n[n.Shift=16]="Shift";n[n.Control=17]="Control";n[n.Alt=18]="Alt";n[n.CapsLock=20]="CapsLock";n[n.Escape=27]="Escape";n[n.Space=32]="Space";n[n.PageUp=33]="PageUp";n[n.PageDown=34]="PageDown";n[n.End=35]="End";n[n.Home=36]="Home";n[n.ArrowLeft=37]="ArrowLeft";n[n.ArrowFirst=37]="ArrowFirst";n[n.ArrowUp=38]="ArrowUp";n[n.ArrowRight=39]="ArrowRight";n[n.ArrowDown=40]="ArrowDown";n[n.ArrowLast=40]="ArrowLast";n[n.Insert=45]="Insert";n[n.Delete=46]="Delete";n[n.A=65]="A";n[n.B=66]="B";n[n.C=67]="C";n[n.D=68]="D";n[n.E=69]="E";n[n.F=70]="F";n[n.G=71]="G";n[n.H=72]="H";n[n.I=73]="I";n[n.J=74]="J";n[n.K=75]="K";n[n.L=76]="L";n[n.M=77]="M";n[n.N=78]="N";n[n.O=79]="O";n[n.P=80]="P";n[n.Q=81]="Q";n[n.R=82]="R";n[n.S=83]="S";n[n.T=84]="T";n[n.U=85]="U";n[n.V=86]="V";n[n.W=87]="W";n[n.X=88]="X";n[n.Y=89]="Y";n[n.Z=90]="Z";n[n.ContextMenu=93]="ContextMenu";n[n.Multiply=106]="Multiply";n[n.Plus=107]="Plus";n[n.Minus=109]="Minus";n[n.F1=112]="F1";n[n.F2=113]="F2";n[n.F3=114]="F3";n[n.F4=115]="F4";n[n.F5=116]="F5";n[n.F6=117]="F6";n[n.F7=118]="F7";n[n.F8=119]="F8";n[n.F9=120]="F9";n[n.F10=121]="F10";n[n.F11=122]="F11";n[n.F12=123]="F12";n[n.Comma=188]="Comma";n[n.Period=190]="Period"}(n.KeyCodes||(n.KeyCodes={}));r=n.KeyCodes,function(n){n[n.LeftButton=0]="LeftButton";n[n.MiddleButton=1]="MiddleButton";n[n.RightButton=2]="RightButton"}(n.MouseButtons||(n.MouseButtons={}));u=n.MouseButtons,function(n){n[n.None=0]="None";n[n.Shift=1]="Shift";n[n.Ctrl=2]="Ctrl";n[n.Alt=4]="Alt"}(n.KeyFlags||(n.KeyFlags={}));f=n.KeyFlags;n.blockBrowserAccelerators=e;n.HasAnyOfAltCtrlShiftKeyFlags=o;n.HasOnlyCtrlKeyFlags=s;n.preventIEKeys=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){function e(n,i){u(n,i,t.Paste)}function o(n,i){u(n,i,t.Cut)}function s(n,i){u(n,i,t.Copy)}function h(n){r(n,t.Paste)}function c(n){r(n,t.Cut)}function l(n){r(n,t.Copy)}function u(n,r,u){n.addEventListener("keydown",function(n){return a(n,r,u)});document.body.addEventListener(t[u].toLowerCase(),function(t){for(var f=i||document.activeElement;!!f;){if(f===n)return v(t,r,u);f=f.parentNode}return!0})}function r(n,r){var u,f,e;if(window.clipboardData)u=document.createEvent("Event"),u.keyCode=r,u.ctrlKey=!0,u.initEvent("keydown",!0,!0),n.dispatchEvent(u);else{e=window.getSelection();e.rangeCount===0&&(f=document.createRange(),f.selectNode(y()),e.addRange(f));try{i=n;document.execCommand(t[r])}finally{i=undefined;f&&e.rangeCount>0&&e.removeRange(f)}}}function a(n,t,i){if(n.keyCode===i&&n.ctrlKey&&!n.shiftKey&&!n.altKey){var u=n.target;if(typeof clipboardData!="undefined")return f(clipboardData,t,i,u);if(u)return r(u,i),event.preventDefault(),event.stopPropagation(),!1}return!0}function v(n,t,r){return typeof n.clipboardData!="undefined"?f(n.clipboardData,t,r,i):!0}function f(n,i,r,u){var f=!0,e,o;return r===t.Paste?(e=n.getData("text"),e&&(f=i(e,u))):(o=i(u),o&&(n.setData("text",o),f=!1)),f||(event.preventDefault(),event.stopPropagation()),f}function y(){var n=document.getElementById("clipboardDiv");return n||(n=document.createElement("div"),n.id="clipboardDiv",n.contentEditable="true",document.body.appendChild(n)),n}var t,i;(function(n){n[n.Cut=88]="Cut";n[n.Copy=67]="Copy";n[n.Paste=86]="Paste"})(t||(t={}));n.addPasteListener=e;n.addCutListener=o;n.addCopyListener=s;n.firePasteEvent=h;n.fireCutEvent=c;n.fireCopyEvent=l})(t=n.ClipboardHelper||(n.ClipboardHelper={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(){}return n.changeButtonStatus=function(t,i,r){var u=n.isEnabled(t);i&&!u?(t.classList.remove("toolbarButtonStateDisabled"),t.setAttribute("aria-disabled","false")):!i&&u&&(t.classList.add("toolbarButtonStateDisabled"),t.setAttribute("aria-disabled","true"));typeof r=="boolean"&&(n.IsChangingAriaPressed=!0,r?(t.setAttribute("aria-pressed","true"),t.classList.add("toolbarButtonStateActive")):(t.setAttribute("aria-pressed","false"),t.classList.remove("toolbarButtonStateActive")),n.IsChangingAriaPressed=!1)},n.isEnabled=function(n){return!n.classList.contains("toolbarButtonStateDisabled")},n.isValidEvent=function(t){return(t.type==="click"||t.keyCode===13||t.keyCode===32)&&n.isEnabled(t.currentTarget)},n.setButtonTooltip=function(n,i,r){r===void 0&&(r=!0);var u=r?t.Resources.getString(i):i;n.setAttribute("data-plugin-vs-tooltip",u);n.setAttribute("aria-label",u)},n.setupButton=function(t,i,r,u,f){u===void 0&&(u=!0);f===void 0&&(f=!0);typeof i=="string"&&(n.setButtonTooltip(t,i,f),t.setAttribute("role","button"));r&&(t.addEventListener("click",function(t){return n.onButtonPress(t,r)}),t.addEventListener("keydown",function(t){return n.onButtonPress(t,r)}),t.addEventListener("DOMAttrModified",function(i){!n.IsChangingAriaPressed&&n.isEnabled(t)&&i.attrName==="aria-pressed"&&i.attrChange===i.MODIFICATION&&r(i)}));t.addEventListener("mousedown",n.onButtonMouseDown);t.addEventListener("mouseenter",n.onButtonMouseEnter);t.addEventListener("mouseleave",n.onButtonMouseLeave);t.addEventListener("mouseup",n.onButtonMouseUp);u||n.changeButtonStatus(t,!1)},n.onButtonMouseDown=function(t){var i=t.currentTarget;n.isEnabled(i)?i.classList.add("toolbarButtonMouseDown"):t.stopImmediatePropagation()},n.onButtonMouseEnter=function(t){var i=t.currentTarget;n.isEnabled(i)?i.classList.add("toolbarButtonMouseHover"):(t.preventDefault(),t.stopImmediatePropagation())},n.onButtonMouseLeave=function(n){var t=n.currentTarget;t.classList.remove("toolbarButtonMouseHover");t.classList.remove("toolbarButtonMouseDown")},n.onButtonMouseUp=function(n){var t=n.currentTarget;t.classList.remove("toolbarButtonMouseDown")},n.onButtonPress=function(t,i){n.isValidEvent(t)&&(i(t),t.preventDefault(),t.stopImmediatePropagation())},n}();n.ButtonHelpers=i})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(){}return n.addClasses=function(n,t){for(var r=n?n.split(" "):[],u=t?t.split(" "):[],i=0;i<u.length;i++)r.indexOf(u[i])===-1&&r.push(u[i]);return r.join(" ")},n.removeClasses=function(n,t){for(var r=n?n.split(" "):[],f=t?t.split(" "):[],u=[],i=0;i<r.length;i++)f.indexOf(r[i])===-1&&u.push(r[i]);return u.join(" ")},n}();n.CssUtilities=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function t(){}return t.escapeRegExp=function(n){return String.prototype.replace.call(n,t.ESCAPE_USER_INPUT_REGEX,"\\$&")},t.escapeRegExpWithWildCard=function(n){return String.prototype.replace.call(n,t.ESCAPE_USER_INPUT_REGEX,function(n){return n==="*"?".*":"\\"+n})},t.wrapInQuotes=function(n){return'"'+String.prototype.replace.call(n,/\\"/g,'"')+'"'},t.unescapeHtml=function(n){if(typeof n!="string"){if(n===null||n===undefined)return"";n=""+n}return String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(n,/&gt;/g,">"),/&lt;/g,"<"),/&apos;/g,"'"),/&quot;/g,'"'),/&amp;/g,"&")},t.escapeHtmlAndPreserveWhitespace=function(t){var f=[t],r,u,i;if(t=t.replace(/(\r\n|\n\r|\r|\n)/g,"\r\n"),r=t.split("\r\n"),r.length>0)for(f=[],u=0;u<r.length;u++)i=r[u],i=n.EncodingUtilities.escapeHtml(i),i="<pre>"+i+"<\/pre>",f.push(i);return f},t.escapeHtml=function(n){if(typeof n!="string"){if(n===null||n===undefined)return"";n=""+n}return String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(n,/&/g,"&amp;"),/"/g,"&quot;"),/'/g,"&apos;"),/</g,"&lt;"),/>/g,"&gt;")},t.replaceSpacesWithNonBreakingSpaceEntities=function(n){return String.prototype.replace.call(n,/ /g,"\u00a0")},t.replaceLineBreaksWithNonBreakingSpaceEntities=function(n){return String.prototype.replace.call(n,/[\r\n]/g,"\u00a0")},t.ESCAPE_USER_INPUT_REGEX=/([.+?^=!:${}()|\[\]\/\\])|(\*)/g,t}();n.EncodingUtilities=t})(Common||(Common={})),function(n){"use strict";var i=function(){function n(n,t){this._proxy=n;this._portName=t}return Object.defineProperty(n.prototype,"name",{get:function(){return this._portName},enumerable:!0,configurable:!0}),n.prototype.postMessage=function(n){return this._proxy._post("sendMessage",this._portName,n),!0},n.prototype.addEventListener=function(n,t){n==="message"&&this._proxy.addEventListener(n,t)},n.prototype.removeEventListener=function(n,t){n==="message"&&this._proxy.removeEventListener(n,t)},n}(),r=function(){function n(n){this._externalObj=n}return n.prototype.loadScriptInProc=function(n){try{this._externalObj.loadScriptInProc(n)}catch(t){return}},n.prototype.createPort=function(n){return n},n.prototype.addEventListener=function(n,t){this._externalObj.addEventListener(n,t)},n.prototype.removeEventListener=function(n,t){this._externalObj.removeEventListener(n,t)},n.prototype.fireAttachedEvent=function(){this._externalObj.fireAttachedEvent()},n.prototype.fireDetachedEvent=function(){this._externalObj.fireDetachedEvent()},n}(),t;n.IEDiagnosticsBridge=r;t=function(){function n(n){this._proxy=n}return n.prototype.loadScriptInProc=function(n){this._proxy._post("loadScript",n)},n.prototype.createPort=function(n){return new i(this._proxy,n.portName)},n.prototype.addEventListener=function(n,t){this._proxy.addEventListener(n,t)},n.prototype.removeEventListener=function(n,t){this._proxy.removeEventListener(n,t)},n.prototype.fireAttachedEvent=function(){},n.prototype.fireDetachedEvent=function(){},n}();n.DiagnosticsBridge=t}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(){}return n.showDocument=function(n,i,r){try{var u=decodeURI(n);t.Host.getDocumentLocation(u).done(function(n){try{t.Host.showDocument(n,i||1,r||1)}catch(u){return}})}catch(f){return}},n}();n.ProjectDocuments=i})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){(function(n){n[n.Edge=0]="Edge";n[n.IE=1]="IE"})(n.TargetType||(n.TargetType={}));var t=n.TargetType})(t=n.SelfTest||(n.SelfTest={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";(function(n){n[n.Pass=0]="Pass";n[n.Fail=1]="Fail";n[n.Timeout=2]="Timeout"})(n.SelfTestResult||(n.SelfTestResult={}));var i=n.SelfTestResult,t=function(){function n(n,t,i){this.status=n;this.result=t;this.message=i;this.name="SelfTestError"}return n}();n.SelfTestError=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i;(function(n){var i=function(){function n(){}return n.waitForCondition=function(i,r,u,f){r===void 0&&(r=n.POLLING_TIMEOUT);u===void 0&&(u=n.POLLING_INTERVAL);f===void 0&&(f="");F12.Tools.Utility.Assert.hasValue(i,"Condition evaluator must have a value");F12.Tools.Utility.Assert.isTrue(r>u,"Timeout must be greater than polling interval");var o=Math.floor(r/u),e=0;return new t.Promise(function(n){var r=window.setInterval(function(){if(e>=o){t.F12.SelfTest.logMessage("Polling action: "+f+" timed out");clearInterval(r);throw new Error("Timeout: "+f)}e++;var u=i(),s=typeof u=="boolean"&&!u;s||u===null||typeof u=="undefined"||(clearInterval(r),n(u))},u)})},n.waitForConditionWithPromise=function(){throw new Error("Not Implemented")},n.tryWaitForCondition=function(){throw new Error("Not Implemented")},n.waitForEventOnAction=function(){throw new Error("Not Implemented")},n.tryWaitForEventOnAction=function(){throw new Error("Not Implemented")},n.waitForEventOnActionWithCondition=function(){throw new Error("Not Implemented")},n.waitForEventWithCondition=function(){throw new Error("Not Implemented")},n.tryWaitForEventWithCondition=function(){throw new Error("Not Implemented")},n.waitForEvent=function(){throw new Error("Not Implemented")},n.tryWaitForEvent=function(){throw new Error("Not Implemented")},n.POLLING_TIMEOUT=1e4,n.POLLING_INTERVAL=250,n}();n.Synchronization=i})(i=n.SelfTestAction||(n.SelfTestAction={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var r,t,u,i;(function(n){n[n.RelativeOrAbsolute=0]="RelativeOrAbsolute";n[n.Absolute=1]="Absolute";n[n.Relative=2]="Relative"})(n.UriKind||(n.UriKind={}));r=n.UriKind,function(n){n[n.Scheme=1]="Scheme";n[n.Userinfo=2]="Userinfo";n[n.Hostname=4]="Hostname";n[n.Port=8]="Port";n[n.Directory=16]="Directory";n[n.FilenameWithoutExtension=32]="FilenameWithoutExtension";n[n.Extension=64]="Extension";n[n.Filename=n.FilenameWithoutExtension|n.Extension]="Filename";n[n.Pathname=n.Directory|n.Filename]="Pathname";n[n.Search=128]="Search";n[n.Hash=256]="Hash";n[n.StrongPort=512]="StrongPort";n[n.KeepDelimiter=1024]="KeepDelimiter";n[n.AbsoluteUri=n.Scheme|n.Userinfo|n.Hostname|n.Port|n.Pathname|n.Search|n.Hash]="AbsoluteUri";n[n.HostnameAndPort=n.Hostname|n.StrongPort]="HostnameAndPort";n[n.StrongAuthority=n.Userinfo|n.Hostname|n.StrongPort]="StrongAuthority";n[n.Origin=n.Scheme|n.Hostname|n.Port]="Origin";n[n.PathnameAndSearch=n.Pathname|n.Search]="PathnameAndSearch"}(n.UriComponents||(n.UriComponents={}));t=n.UriComponents,function(n){n[n.UriEscaped=1]="UriEscaped";n[n.Unescaped=2]="Unescaped";n[n.SafeUnescaped=3]="SafeUnescaped"}(n.UriFormat||(n.UriFormat={}));u=n.UriFormat;i=function(){function i(){for(var f,r,e,u,n=[],t=0;t<arguments.length;t++)n[+t]=arguments[t];if(n.length>=2&&n[0]instanceof i){if(f=n[0],n[1]instanceof i)r=n[1];else if(n[1]!==null&&n[1]!==undefined)r=new i(String(n[1]),0);else throw new TypeError("Missing required argument: uri.");i.mergeCore(f,r,this)}else if(n.length>=1&&n[0]!==null&&n[0]!==undefined){if(e=String(n[0]),u=1,n.length>=2)if(typeof n[1]=="number")u=n[1];else throw new TypeError("Invalid argument: kind.");i.parseCore(e,u,this)}else throw new TypeError("Argument not optional.")}return Object.defineProperty(i.prototype,"isRooted",{get:function(){return this.isAbsolute||/^\//.test(this.pathname)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isAbsolute",{get:function(){return this._scheme===i.UriSchemeFile&&typeof this._pathname=="string"&&/^[\\/]?\.{1,2}([\\/]|$)/.test(this._pathname)?!1:!!this._scheme},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isFile",{get:function(){return this._scheme===i.UriSchemeFile},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isUnc",{get:function(){return this.isFile&&!!(this._components&4)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isDosPath",{get:function(){return this.isFile&&!this._hostname&&/^\/?[a-z][:|]/i.test(this._pathname)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hasDefaultPort",{get:function(){return this.isAbsolute&&(typeof this._port!="number"||this._scheme===i.UriSchemeHttp&&this._port===80||this._scheme===i.UriSchemeHttps&&this._port===443)?!0:!1},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"raw",{get:function(){return this._raw},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"origin",{get:function(){return this.getComponentsCore(t.Origin,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"authority",{get:function(){return this.getComponentsCore(t.HostnameAndPort,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"protocol",{get:function(){return this.getComponentsCore(1025,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"scheme",{get:function(){return this.getComponentsCore(1,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"userinfo",{get:function(){return this.getComponentsCore(2,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"host",{get:function(){return this.getComponentsCore(t.HostnameAndPort,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hostname",{get:function(){return this.getComponentsCore(4,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pathname",{get:function(){return this.getComponentsCore(t.Pathname,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pathnameAndSearch",{get:function(){return this.getComponentsCore(t.PathnameAndSearch,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"search",{get:function(){return this.getComponentsCore(1152,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hash",{get:function(){return this.getComponentsCore(1280,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"port",{get:function(){return typeof this._port=="number"?this._port:this._scheme===i.UriSchemeHttp?i.DEFAULT_PORT_HTTP:this._scheme===i.UriSchemeHttps?i.DEFAULT_PORT_HTTPS:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"absoluteUri",{get:function(){return this.getComponentsCore(t.AbsoluteUri,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"absolutePath",{get:function(){var n=this.getComponentsCore(t.Pathname|1024,1);return this.isDosPath&&(n=n.substr(1)),n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"localPath",{get:function(){if(this.isUnc||this.isDosPath){var n=this.getComponentsCore(t.Pathname|1024,1);if(n=n.replace(i.PATH_DELIMITER,i.DOS_PATH_DELIMITER),this.isUnc)return i.UNC_ROOT+this.hostname+n;if(this.isDosPath)return n.substr(1)}return""},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"segments",{get:function(){var n=this.getComponentsCore(t.Pathname|1024,1);return n.length>1?(n=n.substr(1),n.split(i.PATH_DELIMITER)):[]},enumerable:!0,configurable:!0}),i.parse=function(n,t){return t===void 0&&(t=1),new i(n,t)},i.tryParse=function(n,t){if(t===void 0&&(t=1),n===null||n===undefined)throw new TypeError("Missing required argument: text.");return i.parseCore(n,t,undefined)},i.tryMerge=function(n,t){if(n===null||n===undefined)throw new TypeError("Missing required argument: baseUri.");if(t===null||t===undefined)throw new TypeError("Missing required argument: uri.");return i.mergeCore(n,t,undefined)},i.create=function(r){var s,l,a,h,v,e,o,c,f,y,u,p;if(r||(r={}),c=!1,f=0,typeof r.keepDelimiter=="boolean"&&(c=r.keepDelimiter),typeof r.scheme=="string"&&(s=n.ToolWindowHelpers.tryDecodeURIComponent(r.scheme.toLowerCase()),f|=1,(s===i.UriSchemeHttp||s===i.UriSchemeHttps)&&(f|=512)),typeof r.userinfo=="string"&&(l=r.userinfo.toLowerCase(),f|=2),typeof r.hostname=="string"&&(a=r.hostname.toLowerCase(),f|=4),typeof r.port=="number"){if(r instanceof i)y=r,h=y._port;else{if(r.port<0)throw new RangeError("Invalid port.");h=r.port}typeof h=="number"&&(f|=520)}return r.pathname&&(v=r.pathname,f|=t.Pathname),r.search&&(e=r.search,!c&&e.length>0&&e.charAt(0)===i.SEARCH_DELIMITER&&(e=e.substr(1)),f|=128),r.hash&&(o=r.hash,!c&&o.length>0&&o.charAt(0)===i.HASH_DELIMITER&&(o=o.substr(1)),f|=256),u=Object.create(i.prototype),u._scheme=s,u._userinfo=l,u._hostname=a,u._port=h,u._pathname=v,u._search=e,u._hash=o,u._components=f,u=new i(u.toString()),typeof r.uri=="string"&&(p=new i(r.uri),u=new i(p,u)),u},i.equals=function(n,t,r){if(r===void 0&&(r=!1),n===t)return!0;if(n===null)return t===null;if(t===null)return!1;if(n===undefined)return t===undefined;if(t===undefined)return!1;var u,f;return u=typeof n=="string"?new i(n,0):n,f=typeof t=="string"?new i(t,0):t,i.stringEquals(u.toString(),f.toString(),r)?!0:u._scheme===f._scheme&&u._userinfo===f._userinfo&&u._hostname===f._hostname&&u.port===f.port&&i.stringEquals(u._pathname,f._pathname,r)&&i.stringEquals(u._search,f._search,r)&&i.stringEquals(u._hash,f._hash,r)?!0:!1},i.compare=function(n,r,u,f,e){if(u===void 0&&(u=t.AbsoluteUri),f===void 0&&(f=1),e===void 0&&(e=!1),typeof u!="number")throw new TypeError("Invalid argument: partsToCompare.");if(typeof f!="number")throw new TypeError("Invalid argument: compareFormat.");if((f&-4)!=0)throw new RangeError("Argument out of range: compareFormat.");return n===r?0:n===null||n===undefined?r===null||r===undefined?0:-1:r===null||r===undefined?1:n.isAbsolute&&r.isAbsolute?i.compareStrings(n.getComponentsCore(u,f),r.getComponentsCore(u,f),e):n.isAbsolute?1:r.isAbsolute?-1:i.compareStrings(n.raw,r.raw,e)},i.getCurrent=function(){return typeof self!="undefined"?new i(self.location.href):new i(".")},i.prototype.getComponents=function(n,t){if(typeof n!="number"||typeof t!="number")throw new TypeError("Invalid argument: components.");if(typeof t!="number")throw new TypeError("Invalid argument: format.");if((t&-4)!=0)throw new RangeError("Argument out of range: format.");return n=i.adjustComponents(n),this.getComponentsCore(n,t)},i.prototype.toString=function(){return this.getComponentsCore(t.AbsoluteUri,3)},i.prototype.toJSON=function(){return this.toString()},i.prototype.isSameOrigin=function(n){if(n===null||n===undefined)throw new TypeError("Missing required argument: uri.");var r=n instanceof i?n:new i(String(n));return this.isAbsolute?this.getComponentsCore(t.Origin,1)===r.getComponentsCore(t.Origin,1):!r.isAbsolute},i.prototype.isBaseOf=function(n){var r;if(n===null||n===undefined)throw new TypeError("Missing required argument: uri.");var e=this.getComponentsCore(t.AbsoluteUri&-257,3),o=this.getComponentsCore(t.AbsoluteUri&-257,3),u=e.split(i.PATH_DELIMITER),f=o.split(i.PATH_DELIMITER);if(u.length>f.length)return!1;for(r=0;r<u.length;r++)if(!i.compareStrings(u[r],f[r],this.isDosPath||this.isUnc||n.isDosPath||n.isUnc))return!1;return!0},i.prototype.makeRelative=function(n){var f;if(n===null||n===undefined)throw new TypeError("Missing required argument: uri.");if(!this.isAbsolute||!n.isAbsolute)throw new URIError("URI not absolute.");if(!this.isSameOrigin(n))return n;var r=n.absolutePath,t=i.computePathDifference(this.absolutePath,r,this.isDosPath||this.isUnc),u=/[:\\/?#]/.exec(t);return u&&u[0]===":"&&(!n.isDosPath||t!==r)&&(t="./"+t),f=t+n.getComponentsCore(384,1),new i(f,2)},i.prototype.equals=function(n,t){return i.equals(this,n,t)},i.stringEquals=function(n,t,i){return i&&typeof n=="string"&&typeof t=="string"&&(n=n.toLowerCase(),t=t.toLowerCase()),n===t},i.compareStrings=function(n,t,i){return i&&typeof n=="string"&&typeof t=="string"&&(n=n.toLowerCase(),t=t.toLowerCase()),n>t?1:n<t?-1:0},i.compareNumbers=function(n,t){return n<t?-1:n>t?1:0},i.formatUserinfo=function(t,r){switch(r){case 1:t=i.escape(t,"?#","%");break;case 2:t=n.ToolWindowHelpers.tryDecodeURIComponent(t);break;case 3:t=i.unescape(t,"@/\\","safe")}return t},i.formatPath=function(t,r){switch(r){case 1:t=i.escape(t,"?#","%");break;case 2:t=n.ToolWindowHelpers.tryDecodeURIComponent(t);break;case 3:t=i.unescape(t,"?#","safe")}return t},i.formatSearch=function(n,t){switch(t){case 1:n=i.escape(n,"#","%");break;case 2:n=i.unescape(n,"#","all");break;case 3:n=i.unescape(n,"#","safe")}return n},i.formatHash=function(n,t){switch(t){case 1:n=i.escape(n,"","%");break;case 2:n=i.unescape(n,"#","all");break;case 3:n=i.unescape(n,"#","safe")}return n},i.escape=function(t,i,r){var u,s,h;if(!t)return t;var f=[],o=0,e="";for(u=0;u<t.length;u++)if(s=t.charAt(u),i.indexOf(s)>-1?e="forced":r.indexOf(s)>-1&&(e="reserved"),e!==""){if(o<u&&f.push(n.ToolWindowHelpers.tryEncodeURI(t.substring(o,u))),o=u+1,e==="forced")f.push(n.ToolWindowHelpers.tryEncodeURIComponent(s));else if(e==="reserved")if(s==="%"){if(u+3<=t.length&&(h=t.substr(u,3),/^%[a-f\d]{2}$/i.test(h))){f.push(h);e="";u+=2;o+=2;continue}f.push(n.ToolWindowHelpers.tryEncodeURIComponent("%"))}else f.push(s);e=""}return o<u&&f.push(n.ToolWindowHelpers.tryEncodeURI(t.substring(o,u))),f.join("")},i.unescape=function(t,i,r){var f,o,e,h;if(!t)return t;for(var c=[],l=0,v=function(t){c.push(n.ToolWindowHelpers.tryEncodeURIComponent(t))},a=function(n,t){c.push(n);u+=t;l=u+1},s=function(){l<u&&c.push(t.substring(l,u));l=u+1},u=0;u<t.length;u++)if(f=t.charAt(u),o=1,f==="%"){if(u+3<=t.length){e=t.substr(u,3);f="";try{/^%[a-f\d]{2}$/i.test(e)&&(h=parseInt("0x"+e.substr(1)),h<128?(o=2,f=decodeURIComponent(e)):h<224&&u+6<=t.length?(e=t.substr(u,6),/^(%[a-f\d]{2}){2}$/i.test(e)&&(o=5,f=decodeURIComponent(e))):h<240&&u+9<=t.length?(e=t.substr(u,9),/^(%[a-f\d]{2}){3}$/i.test(e)&&(o=8,f=decodeURIComponent(e))):h<245&&u+12<=t.length&&(e=t.substr(u,12),/^(%[a-f\d]{2}){4}$/i.test(e)&&(o=11,f=decodeURIComponent(e))))}catch(y){s();a(e,o)}if(r==="all"){if(f.length!==1)continue;s();a(f,o)}else if(f.length!==1)continue;else f==="%"||i.indexOf(f)>-1?u+=2:/^[;/?:@&=+$#%\\\x00-\x17]$/.test(f)?u+=2:(s(),a(f,o))}}else if(r==="all")continue;else i.indexOf(f)>-1&&(s(),v(f));return s(),c.join("")},i.parseCore=function(n,r,u){var o,l,e,a,p,f,w,v,y,h=0,b=n,s,c;if(n=n.trim(),f=n,r!==2){if(i.DosPath.test(n)&&(n="file:///"+n),s=i.UriParser.exec(n),s)o=s[i.SCHEME_INDEX],l=s[i.USERINFO_INDEX],e=s[i.HOSTNAME_INDEX],a=s[i.PORT_INDEX],f=s[i.PATHNAME_INDEX],w=!!s[i.SCHEMESEGMENT_INDEX],v=s[i.SEARCH_INDEX],y=s[i.HASH_INDEX],r=1;else{if(r===1){if(u)throw new URIError;return}r=2}if(!o&&w){if(u)throw new URIError;return}(o||e)&&f&&(f=f.replace(/\\/g,i.PATH_DELIMITER));o&&o.toLowerCase()===i.UriSchemeFile&&(/^\.{1,2}$/.test(e)&&/^([\\/]|$)/.test(f)||/^[a-z]$/i.test(e)&&/^:[\\/]/.test(f)?(f=e+f,e=undefined):e||(/^[\\/]\.{1,2}/.test(f)?f=f.substr(1):/^[\\/]{2,}/.test(f)&&(f=f.replace(/^[\\/]{2,}/,""),c=f.indexOf(i.PATH_DELIMITER),c>-1?(e=f.substr(0,c),f=f.substr(c)):(e=f,f=""))))}return typeof o=="string"&&(o=o.toLowerCase(),h|=1,(o===i.UriSchemeHttp||o===i.UriSchemeHttps)&&(h|=512)),typeof l=="string"&&(h|=2),typeof e=="string"&&(e=e.toLowerCase(),h|=4),typeof a=="string"&&(p=parseInt(a),h|=520),typeof f=="string"&&r!==2&&(f=i.normalizePath(f)),f&&(h|=t.Pathname),typeof v=="string"&&(h|=128),typeof y=="string"&&(h|=256),u||(u=Object.create(i.prototype)),u._scheme=o,u._userinfo=l,u._hostname=e,u._port=p,u._pathname=i.escape(f,"","%"),u._search=v,u._hash=y,u._raw=b,u._components=h,u},i.mergeCore=function(n,r,u){if(!u&&r.isAbsolute)return r;var o,h,c,l,f,s,a,e=0;return r._scheme?(o=r._scheme,h=r._userinfo,c=r._hostname,l=r._port,f=i.normalizePath(r._pathname),s=r._search):(r._hostname?(h=r._userinfo,c=r._hostname,l=r._port,f=i.normalizePath(r._pathname),s=r._search):(r._pathname?(r._pathname.charAt(0)===i.PATH_DELIMITER?f=i.normalizePath(r._pathname):(f=i.mergePath(n._pathname,r._pathname),f=i.normalizePath(f)),s=r._search):(f=n._pathname,s=r._search?r._search:n._search),h=n._userinfo,c=n._hostname,l=n._port),o=n._scheme),a=r._hash,typeof o=="string"&&(e|=1,(o===i.UriSchemeHttp||o===i.UriSchemeHttps)&&(e|=512)),typeof h=="string"&&(e|=2),typeof c=="string"&&(e|=4),typeof l=="number"&&(e|=520),f&&(e|=t.Pathname),typeof s=="string"&&(e|=128),typeof a=="string"&&(e|=256),u||(u=Object.create(i.prototype)),u._scheme=o,u._userinfo=h,u._hostname=c,u._port=l,u._pathname=f,u._search=s,u._hash=a,u._components=e,u._raw=u.toString(),u},i.mergePath=function(n,t){var r=-1;return n&&(r=n.lastIndexOf(i.PATH_DELIMITER)),r>=0?n.substr(0,r+1)+t:t},i.normalizePath=function(n){var t,u,r,f;for(n=n.replace(/^\s+|\s+$/g,""),n=n.replace(/\\+|\/+/g,i.PATH_DELIMITER),t=n.split(/\//g),u=t[0]==="",u&&t.shift(),r=0;r<t.length;){f=t[r];switch(f){case i.CURRENT_DIRECTORY_TOKEN:if(r!==0||u){t.splice(r,1);r===t.length&&t.push("");continue}break;case i.PARENT_DIRECTORY_TOKEN:if(r===0&&u){t.splice(r,1);continue}if(r>=1&&t[r-1]!==i.CURRENT_DIRECTORY_TOKEN&&t[r-1]!==i.PARENT_DIRECTORY_TOKEN){t.splice(--r,2);r===t.length&&t.push("");continue}}r++}return u&&t.unshift(""),t.join(i.PATH_DELIMITER)},i.computePathDifference=function(n,t,r){for(var e=-1,f,u=0;u<n.length&&u<t.length&&i.compareStrings(n.charAt(u),t.charAt(u),r)===0;u++)n.charAt(u)===i.PATH_DELIMITER&&(e=u);if(u===0)return t;if(u===n.length&&u===t.length)return"";for(f=[];u<n.length;u++)n.charAt(u)===i.PATH_DELIMITER&&f.push(i.PARENT_DIRECTORY_TOKEN,i.PATH_DELIMITER);return f.length===0&&t.length-1===e?i.CURRENT_DIRECTORY_TOKEN+i.PATH_DELIMITER:f.join("")+t.substr(e+1)},i.adjustComponents=function(n){return n&512&&(n|=8),n&2&&(n&-1025)!=2&&(n|=4),n&8&&(n&-1537)!=8&&(n|=4),n&t.Origin&&(n&256?n|=t.PathnameAndSearch:n&128?n|=t.Pathname:n&64?n|=48:n&32&&(n|=16)),(n&t.Pathname)==80&&(n|=32),n},i.prototype.getComponentsCore=function(n,r){var u=[],e=!1,f=n&this._components;return f&1&&(u.push(this._scheme),e=this._scheme===i.UriSchemeFile,n!==1&&u.push(i.PROTOCOL_DELIMITER)),(n&1025&&f&(t.StrongAuthority|8)||e)&&u.push(i.SCHEME_DELIMITER),f&(t.StrongAuthority|8)&&(f&2&&(u.push(i.formatUserinfo(this._userinfo,r)),n!==2&&u.push(i.USERINFO_DELIMITER)),f&4&&u.push(this._hostname),f&520&&(u.push(i.PORT_DELIMITER),u.push(this.port.toString()))),n&t.Pathname&&u.push(this.getCanonicalPath(n,r)),f&128&&(n!==128&&u.push(i.SEARCH_DELIMITER),u.push(i.formatSearch(this._search,r))),f&256&&(n!==256&&u.push(i.HASH_DELIMITER),u.push(i.formatHash(this._hash,r))),u.join("")},i.prototype.getCanonicalPath=function(n,r){var u=this._pathname,c=!1,y,o,f,s,l,a,e,h,v;if(n&1024?c=!0:this.isAbsolute&&(this.isFile?c=!0:(this._components&(4|t.Pathname))==(4|t.Pathname)&&(c=!0)),!(this._components&t.Pathname)||u.length===0)return n&16&&c?i.PATH_DELIMITER:"";if(n&16&&(y=u.charAt(0)!==i.PATH_DELIMITER,c&&y&&(u=i.PATH_DELIMITER+u)),o=n&t.Pathname,o===t.Pathname)return i.formatPath(u,r);if(s=u.lastIndexOf(i.PATH_DELIMITER),o&16){if(s===u.length-1?l=i.formatPath(u,r):s>-1&&(l=i.formatPath(u.substr(0,s+1),r)),o===16)return l;f||(f=[]);f.push(l)}if(a=o&t.Filename,a&&s<u.length-1)if(e=s>-1?u.substr(s+1):u,a===t.Filename){if(e=i.formatPath(e,r),o===t.Filename)return e;f||(f=[]);f.push(e)}else if(h=e.lastIndexOf(i.EXTENSION_DELIMITER),a===32){if(v=h===-1?i.formatPath(e,r):h>0?i.formatPath(e.substr(0,h),r):"",o===32)return v;f||(f=[]);f.push(v)}else return h===0?i.formatPath(e,r):h>0?i.formatPath(e.substr(h),r):"";return f?f.join(""):""},i.UriParser=/^(?:([a-z][a-z0-9+.\-]*)[:|])?(?:[\\/]{2}(?:((?:[\w\-._~!$&'()*+,;=:]|%[a-f0-9]{2})*)@)?(\[[^\[\]]+\]|[\w\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\.\-_]*)(?:\:(\d+))?|(?![\\/]{2}))(([^/\\?#]*:)?[^?#]*?)(?:\?([^#]*?))?(?:#(.*?))?$/i,i.DosPath=/^([a-z]\:|[\\/]{2,}[^\\/@:?#]+)[\\/]/i,i.SCHEME_INDEX=1,i.USERINFO_INDEX=2,i.HOSTNAME_INDEX=3,i.PORT_INDEX=4,i.PATHNAME_INDEX=5,i.SCHEMESEGMENT_INDEX=6,i.SEARCH_INDEX=7,i.HASH_INDEX=8,i.SCHEME_DELIMITER="//",i.PATH_DELIMITER="/",i.DOS_PATH_DELIMITER="\\",i.UNC_ROOT="\\\\",i.USERINFO_DELIMITER="@",i.SEARCH_DELIMITER="?",i.HASH_DELIMITER="#",i.CURRENT_DIRECTORY_TOKEN=".",i.PARENT_DIRECTORY_TOKEN="..",i.PROTOCOL_DELIMITER=":",i.PORT_DELIMITER=":",i.EXTENSION_DELIMITER=".",i.DEFAULT_PORT_HTTP=80,i.DEFAULT_PORT_HTTPS=443,i.SchemeDelimiter="://",i.UriSchemeHttp="http",i.UriSchemeHttps="https",i.UriSchemeFile="file",i.UriSchemeData="data",i}();n.Uri=i})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i;(function(n){function l(n,t){n.metadata=t}function o(){function f(n){return function(){var i=arguments;return t.Promise.timeout().then(function(){return t.F12.SelfTest.logMessage("Executing step "+n+"."),u[n].apply(null,i)})}}for(var i,r,u=[],n=0;n<arguments.length;n++)u[+n]=arguments[n];for(i=t.Promise.wrap(null),r=0;r<u.length;r++)i=i.then(f(r));return i}function a(n){var u,i,r,f;for(u in n){i=n[u];for(r in i)r[0]!=="_"&&(f=u+"."+r,t.F12.Communications.registerMethodHandler(e+f,g(i,i[r]),!0))}}function i(n,i,r){var u=r?JSON.stringify(r).slice(1,-1):"";return t.F12.SelfTest.logMessage("Calling "+i+"("+u+") on "+t.F12.PluginId[n]),t.F12.Communications.callMethod(n,e+i,r)}function u(n){try{return i(t.F12.PluginId.Debugger,"Contract.executeOnTargetPage",["("+n.toString()+")();"])}catch(r){return t.Promise.wrap(null)}}function v(n){var t="function () {document.getElementById('testPlayground').innerHTML = \""+n+'";}';return u(t)}function s(){return u(function(){var n=document.getElementById("testPlayground");n.innerHTML=""})}function y(n,i){!f&&t.F12.SelfTest.selfTestEnabled&&(f=!0,n&&n(),w(i))}function p(){return o(function(){return i(t.F12.PluginId.Debugger,"Contract.resume",[!1])},function(){return i(t.F12.PluginId.Debugger,"Contract.removeAllBreakpoints")},function(){return i(t.F12.PluginId.Debugger,"Contract.removeAllWatches")},function(){return s()})}function w(n){if(t.F12.SelfTest.selfTestEnabled){var i=Object.keys(n).reduce(function(t,i){return t.concat(k(i,n[i]))},[]);t.F12.Communications.registerMethodHandler("runSelfTest",b(n),!0);t.F12.Communications.callMethod(t.F12.PluginId.Header,"registerSelfTests",[i])}}function b(n){return function(t,i){function f(n){i(null,n)}try{var r=t.moduleName,u=t.testCaseName;F12.Tools.Utility.Assert.hasValue(n[r],"Unknown module name: "+r);F12.Tools.Utility.Assert.hasValue(n[r][u],"Unknown test name: "+u);n[r][u]().then(function(){return i(!0)},f)}catch(e){f(e)}}}function k(n,t){return Object.keys(t).filter(function(n){return n!=="metadata"}).map(function(i){return d(n,t,i)})}function d(n,i,u){var e=r("priority",i[u],i),f;return typeof e=="undefined"&&(e=c),f=r("timeout",i[u],i),typeof f=="undefined"&&(f=h),{testCaseName:u,name:[t.F12.myPluginName,n,u].join("."),pluginName:t.F12.myPluginName,pluginId:t.F12.PluginId[t.F12.myPluginName],moduleName:n,metadata:{priority:e,timeout:f,disabledWithBug:r("disabledWithBug",i[u],i),requiresTarget:r("requiresTarget",i[u],i),requireFeatureKey:r("requireFeatureKey",i[u],i)}}}function r(n,t,i){return t.metadata&&typeof t.metadata[n]!="undefined"?t.metadata[n]:i.metadata&&typeof i.metadata[n]!="undefined"?i.metadata[n]:void 0}function g(n,t){return function(){for(var u,i,f=[],r=0;r<arguments.length;r++)f[+r]=arguments[r];u=f.pop();i=t.apply(n,f);i&&i.then&&i.done&&i.cancel?i.then(function(n){u(n||!0)},function(n){u(null,n)}):u(i||!0)}}var h=4e3,c=3,e="__$",f;n.setTestMetadata=l;n.joinSerial=o;n.publishModules=a;n.callMethodOn=i;n.runOnTargetPage=u;n.setupTestPage=v;n.cleanupTestPage=s;f=!1;n.initialize=y;n.globalTestCleanup=p})(i=n.SelfTestUtilities||(n.SelfTestUtilities={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(){}return i.initializeToolWindow=function(){document.addEventListener("mousedown",function(){$m(document.body).removeClass("showFocus")},!0);$m(document).bind("contextmenu",function(){return!1});$m(document).bind("keydown",function(n){if(n.keyCode===116||n.keyCode===121&&n.shiftKey)return n.preventDefault(),n.stopPropagation(),!1;n.keyCode===9&&$m(document.body).addClass("showFocus")});$m(".BPT-ToolbarButton").bind("mousedown",function(n){var t=$m(this);t.hasClass("BPT-ToolbarButton-StateDisabled")?n.stopImmediatePropagation():t.addClass("BPT-ToolbarButton-MouseDown")});$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(n){var t=$m(this);t.hasClass("BPT-ToolbarButton-StateDisabled")?(n.preventDefault(),n.stopImmediatePropagation()):t.addClass("BPT-ToolbarButton-MouseHover")});$m(".BPT-ToolbarButton").bind("click keydown",function(n){var t,i;(n.type==="click"||n.keyCode===13||n.keyCode===32)&&(t=$m(this),t.hasClass("BPT-ToolbarButton-StateDisabled")?(n.preventDefault(),n.stopImmediatePropagation()):(i=t.get(0),document.activeElement!==i&&i.focus()))});$m(".BPT-ToolbarToggleButton").bind("click keydown",function(n){var t,i;(n.type==="click"||n.keyCode===13||n.keyCode===32)&&(t=$m(this),t.hasClass("BPT-ToolbarButton-StateDisabled")?(n.preventDefault(),n.stopImmediatePropagation()):(i=t.get(0),document.activeElement!==i&&i.focus(),t.hasClass("BPT-ToolbarToggleButton-StateOn")?(t.removeClass("BPT-ToolbarToggleButton-StateOn"),t.attr("aria-pressed",!1)):(t.addClass("BPT-ToolbarToggleButton-StateOn"),t.attr("aria-pressed",!0))))});$m(".BPT-TabCycle-Horizontal, .BPT-TabCycle-Vertical").children(".BPT-TabCycle-Item").bind("keydown",function(n){if($m(this).parent().hasClass("BPT-TabCycle-Horizontal")&&(n.keyCode===37||n.keyCode===39)||$m(this).parent().hasClass("BPT-TabCycle-Vertical")&&(n.keyCode===38||n.keyCode===40)){var i=$m(this),t=n.keyCode===37||n.keyCode===38?i.prev(".BPT-TabCycle-Item").first():i.next(".BPT-TabCycle-Item").first();t.length>0&&(t.attr("tabindex","1"),t.trigger("focus"),t.trigger("click"),i.removeAttr("tabindex"))}});$m(".BPT-TabCycle-Horizontal, .BPT-TabCycle-Vertical").children(".BPT-TabCycle-Item").bind("mousedown",function(){var t=$m(this).siblings(".BPT-TabCycle-Item").matchAttr("tabindex","1"),n=$m(this);n.length>0&&(n.attr("tabindex","1"),n.trigger("focus"),t.removeAttr("tabindex"))})},i.registerErrorComponent=function(n,t){window.errorComponent=n;window.errorDisplayHandler=t},i.loadString=function(n){for(var i=[],r=1;r<arguments.length;r++)i[r-1]=arguments[r];return i.length===1&&Array.isArray(i[0])&&(i=i[0]),t.Resources.getString.apply(this,["/Common/"+n].concat(i))},i.codeMarker=function(n){t.VS.Internal.CodeMarkers.fire(n)},i.scrollIntoView=function(n,t){if(n&&n.getBoundingClientRect){var i=n.getBoundingClientRect(),r=t.getBoundingClientRect(),u=i.top<r.top,f=i.bottom>r.bottom;if(u||f)return n.scrollIntoView(!0),!0}return!1},i.getSortedObjectProperties=function(t){var i=[];for(var r in t)i.push(r);return i.sort(n.ToolWindowHelpers.naturalSort),i},i.getSortedArrayProperties=function(t,i,r){for(var f=[],e,u=0;u<t.length;u++)f.push({property:t[u][i],realIndex:u});for(f.sort(function(t,i){if(r){if(t.property===r&&i.property===r)return 0;if(t.property===r)return-1;if(i.property===r)return 1}return n.ToolWindowHelpers.naturalSort(t.property,i.property)}),e=[],u=0;u<f.length;u++)e.push(f[u].realIndex);return e},i.naturalSort=function(n,t){var s=/(\d+)|(\D+)/g,i=String(n).toLocaleLowerCase().match(s),r=String(t).toLocaleLowerCase().match(s);if(!i&&r)return-1;if(i&&!r)return 1;if(!i&&!r)return 0;while(i.length>0&&r.length>0){var e=i.shift(),o=r.shift(),u=parseInt(e,10),f=parseInt(o,10);if(isNaN(u)&&isNaN(f)){if(e!==o)return e.localeCompare(o)}else{if(isNaN(u))return 1;if(isNaN(f))return-1;if(u!==f)return u-f}}return i.length-r.length},i.createShortenedUrlText=function(t){var e,h,f;if(!t)return t;if(t instanceof n.Uri)return(e=t,e.scheme==="javascript")?"javascript:<URI>":(h=e.segments,f=h.pop(),f||(f=h.pop()),f?e.hostname||e.scheme!=="about"||(f=e.scheme+":"+f):f=e.hostname,i.tryDecodeURIComponent(f));var l=t,r=l,c="javascript:";if(r.toLowerCase().substr(0,c.length)===c)return"javascript:<URI>";var o=r.indexOf("#"),s=r.indexOf("?"),u=-1;for(o>-1&&s>-1?u=Math.min(o,s):o>-1?u=o:s>-1&&(u=s),u>-1&&(r=r.substring(0,u)),u=Math.max(r.lastIndexOf("/"),r.lastIndexOf("\\"));u!==-1&&u===r.length-1;)r=r.substring(0,r.length-1),u=Math.max(r.lastIndexOf("/"),r.lastIndexOf("\\"));return u>-1&&(r=r.substring(u+1),r=i.tryDecodeURIComponent(r)),r},i.getTruncatedString=function(n,t){if(t===void 0&&(t=20),!n)return n;if(n.length>t){var i=t/2-2;n=n.substr(0,i)+this.loadString("Ellipsis")+n.substr(n.length-i)}return n},i.getTruncatedFileName=function(n,t){return t===void 0&&(t=20),i.getTruncatedString(i.createShortenedUrlText(n),t)},i.createFileLinkText=function(n,t,i,r){var u=n?this.getTruncatedFileName(n,r):"";return t&&(n&&(u+=" "),u+="("+t,i&&(u+=", "+i),u+=")"),u},i.pathCombine=function(n,t){var i=/[\/\\]/,r;return t?this.isAbsoluteUrl(t)||!n?t:t.charAt(0)==="/"&&this.isAbsoluteUrl(n)?this.getRoot(n)+t:n.charAt(n.length-1).match(i)||t.charAt(0).match(i)?n+t:(r=(n+t).lastIndexOf("\\")>=0?"\\":"/",n+r+t):n},i.getRoot=function(n){return n.substring(0,n.indexOf("/",n.indexOf("://")+3))},i.isAbsoluteUrl=function(n){return this.isUncPath(n)||this.pathStartsWithDriveLetter(n)?!0:!n.match(/^file:\/{2,3}\./i)?!!n.match(/^[a-zA-Z][\w\+\-\.]*:/)||this.isDataURI(n):!1},i.isUncPath=function(n){return!!n.match(/^\\\\/)},i.pathStartsWithDriveLetter=function(n){return!!n.match(/^[A-Za-z]:/)},i.isFileURI=function(n){return n.length>5&&n.substr(0,5).toLocaleLowerCase()==="file:"},i.isDataURI=function(n){return n.length>5&&n.substr(0,5).toLocaleLowerCase()==="data:"},i.addFileProtocolIfNeeded=function(t){return(n.ToolWindowHelpers.pathStartsWithDriveLetter(t)||n.ToolWindowHelpers.isUncPath(t))&&!n.ToolWindowHelpers.isFileURI(t)&&(t="file:///"+t),t},i.truncateProtocolFromUrl=function(n){return n.replace(/^[a-zAZ][\w\+\-\.]*:(\/\/)?/g,"")},i.parseBase64DataUriContent=function(n){if(!i.isDataURI(n)||n.indexOf("base64,")===-1)return null;try{return window.atob(n.substr(n.indexOf("base64,")+7))}catch(t){return null}},i.parseDataUriMimeType=function(n){return!i.isDataURI(n)||n.indexOf(";")===-1?null:n.substring(5,n.indexOf(";"))},i.hasSelectedText=function(){var n=window.getSelection().toString();return!!n},i.getSelectedText=function(){return window.getSelection().toString()},i.getTextForClipboard=function(){var n=window.getSelection().toString();return n&&(n=n.replace(/[\r\n]+/g,"\r\n")),n},i.isDarkThemeBackground=function(n){var i,t,r;if(n){while((!i||i==="transparent")&&n&&n.length>0)i=n.css("background-color"),n=n.parent();if(i&&(t=i.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/),t&&t.length===4))return r=(parseInt(t[1],10)*299+parseInt(t[2],10)*587+parseInt(t[3],10)*114)/1e3,r<127}return!1},i.isContextMenuUp=function(){return n.ToolWindowHelpers.ContextMenuIsUp},i.contextMenuUp=function(t){n.ToolWindowHelpers.ContextMenuIsUp=t},i.nodeInDocument=function(n,t){if(t===void 0&&(t=document),n)while(n=n.parentNode)if(n===t)return!0;return!1},i.isFocusGood=function(){var n=document.querySelector(":focus");return n&&n.tagName!=="BODY"},i.fireCustomEvent=function(n,t){var i=document.createEvent("CustomEvent");i.initEvent(t,!0,!0);n.dispatchEvent(i)},i.getExtension=function(n){if(!n)return"";n=this.createShortenedUrlText(n);var t=n.lastIndexOf(".");return t<0?"":n.substr(t).toLowerCase()},i.guessMimeTypeFromUrlExtension=function(n){switch(this.getExtension(n)){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".less":return"text/less";case".sass":case".scss":return"text/scss";case".coffee":return"text/coffeescript";case".cs":return"text/x-csharp";default:return"text/plain"}},i.isNumber=function(n){return typeof n=="number"&&!isNaN(n)},i.stringEndsWith=function(n,t){return n===null||typeof n!="string"?!1:t===null||typeof t!="string"?!1:n.indexOf(t,n.length-t.length)>=0},i.replaceTextInRange=function(n,t,i,r){return n.substring(0,t)+r+n.substring(i,n.length)},i.mirrorInputElementOffScreen=function(n){var t=document.createElement("div"),u,f,r;t.id="toolwindow-offScreenMirrorElement";document.body.appendChild(t);u=window.getComputedStyle(n);for(f in i.TextSizingProps)r=i.TextSizingProps[f],u[r]&&(t.style[r]=u[r]);return t.style.visibility="hidden",t.style.position="absolute",t.style.left="-10000px",t.style.whiteSpace="pre-wrap",t.textContent=n.value||".",t},i.getCharScreenPosition=function(t,i){var u=n.ToolWindowHelpers.mirrorInputElementOffScreen(t),s=u.childNodes[0],o=document.createRange();o.setStart(s,i);o.setEnd(s,i);var r=o.getBoundingClientRect(),f=u.getBoundingClientRect(),e=t.getBoundingClientRect();return u.parentElement.removeChild(u),{left:r.left-f.left+e.left,right:r.right-f.left+e.left,top:r.top-f.top+e.top,bottom:r.bottom-f.bottom+e.bottom,width:r.width,height:r.height}},i.tryDecodeURIComponent=function(n){try{return decodeURIComponent(n)}catch(t){return n}},i.tryEncodeURIComponent=function(n){try{return encodeURIComponent(n)}catch(t){return n}},i.tryEncodeURI=function(n){try{return encodeURI(n)}catch(t){return n}},i.getSelection=function(n){var t=0,i=0;try{t=n.selectionStart}catch(r){}try{i=n.selectionEnd}catch(r){}return{start:t,end:i}},i.ContextMenuIsUp=!1,i.TextSizingProps=["boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize"],i.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},i.AreCodeMarkersEnabled=!1,i}();n.ToolWindowHelpers=i})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
Proxy=function(){function n(n){this._uid=0;this._callbacks={};this._pendingTimeout=null;this.remotePort=null;this._diagnosticsBridge=n}return n.prototype.callRemote=function(n,t,i,r){var f=this,h=this.getUid(),s,e,u,o,c,l;if(i&&(this._callbacks[h]={synced:!0,callback:i||null}),s=[],e=[],t)for(u=0;u<t.length;u++)typeof t[u]=="function"?(o=this.getUid(),s.push(o),this._callbacks[o]={synced:!1,callback:t[u]},e[u]={uid:o,type:"callback"}):e[u]=t[u];return c={uid:h,command:n,args:e},l=function(n,i){if(f.remotePort){i&&i(n,t[0]);try{f.remotePort.postMessage(n)}catch(r){return}}},this._pendingMessages.push(c),this._pendingTimeout||(this._pendingTimeout=setTimeout(function(){var n=JSON.stringify(f._pendingMessages);f._pendingMessages=[];f._pendingTimeout=null;l(n,r)},0)),s},n.prototype.clearCallBacks=function(n){var t=this;n?n.forEach(function(n){delete t._callbacks[n]}):this._callbacks={}},n.prototype.fireCallbacks=function(n){for(var t,r=JSON.parse(n),i=0;i<r.length;i++)t=r[i],this._callbacks[t.uid]?(this._callbacks[t.uid].callback.apply(this,t.args),this._callbacks[t.uid]&&this._callbacks[t.uid].synced&&delete this._callbacks[t.uid]):t.uid==="scriptError"&&window.reportError(t.args[0].message,t.args[0].file,t.args[0].line,t.args[0].additionalInfo)},n.prototype.initializeProxy=function(n,t,i,r,u){var f=this;this._pendingMessages=[];this._onMessageCallback=n;this._onAttachCallback=t;this._onDetachCallback=i||function(){return!1};this._onBreakCallback=r||function(){return!1};this._onRunCallback=u||function(){return!1};this._diagnosticsBridge.addEventListener("attach",function(){return f.onAttach()});this._diagnosticsBridge.addEventListener("break",function(){return f.onBreak()});this._diagnosticsBridge.addEventListener("connect",function(n){return f.onConnect(n)});this._diagnosticsBridge.addEventListener("detach",function(){return f.onDetach()});this._diagnosticsBridge.addEventListener("run",function(){return f.onRun()});this.onAttach()},n.prototype.onAttach=function(){this.hideWarningSection();this._onAttachCallback()},n.prototype.onDetach=function(){this.remotePort&&(this.remotePort.removeEventListener("message",this._onMessageCallback),this.remotePort=null);this._callbacks={};this._pendingMessages=[];this._pendingTimeout=null;this._onDetachCallback();this.postWarning("DiagnosticsDisabled")},n.prototype.onBreak=function(){this._onBreakCallback&&this._onBreakCallback()},n.prototype.onRun=function(){this._onRunCallback&&this._onRunCallback()},n.prototype.onConnect=function(n){var i=this._diagnosticsBridge.createPort(n),t=new Common.PortThrottler(i);t.initialize();this.remotePort=t;this.remotePort.addEventListener("message",this._onMessageCallback)},n.prototype.getUid=function(){return"uid"+(this._uid++).toString(36)},n.prototype.hideWarningSection=function(){$m("#warningSection").hide()},n.prototype.postWarning=function(n){$m("#warningMessageText").text(Common.ToolWindowHelpers.loadString(n));$m("#warningSection").show()},n}();
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,u,f,i,r;(function(n){n[n.Timeline_Zoom_Start=101]="Timeline_Zoom_Start";n[n.Timeline_Zoom_Stop=102]="Timeline_Zoom_Stop";n[n.Timeline_GridSort_Start=103]="Timeline_GridSort_Start";n[n.Timeline_GridSort_Stop=104]="Timeline_GridSort_Stop";n[n.Timeline_LoadGraphs_Start=105]="Timeline_LoadGraphs_Start";n[n.Timeline_LoadGraphs_Stop=106]="Timeline_LoadGraphs_Stop";n[n.Timeline_GridScrolled=107]="Timeline_GridScrolled";n[n.Timeline_GridUpdatedForTimeSelection=108]="Timeline_GridUpdatedForTimeSelection";n[n.Timeline_UserSelectedTimeSlice_Start=109]="Timeline_UserSelectedTimeSlice_Start";n[n.Timeline_UserSelectedTimeSlice_Stop=110]="Timeline_UserSelectedTimeSlice_Stop";n[n.Timeline_GridUpdatedForFilterBackground_Start=111]="Timeline_GridUpdatedForFilterBackground_Start";n[n.Timeline_GridUpdatedForFilterBackground_Stop=112]="Timeline_GridUpdatedForFilterBackground_Stop";n[n.Timeline_GridUpdatedForFilterNetwork_Start=113]="Timeline_GridUpdatedForFilterNetwork_Start";n[n.Timeline_GridUpdatedForFilterNetwork_Stop=114]="Timeline_GridUpdatedForFilterNetwork_Stop";n[n.Timeline_GridUpdatedForFilterMeasures_Start=115]="Timeline_GridUpdatedForFilterMeasures_Start";n[n.Timeline_GridUpdatedForFilterMeasures_Stop=116]="Timeline_GridUpdatedForFilterMeasures_Stop";n[n.Timeline_GridUpdatedForFilterFrames_Start=117]="Timeline_GridUpdatedForFilterFrames_Start";n[n.Timeline_GridUpdatedForFilterFrames_Stop=118]="Timeline_GridUpdatedForFilterFrames_Stop";n[n.Timeline_GridUpdatedForFilterName_Start=119]="Timeline_GridUpdatedForFilterName_Start";n[n.Timeline_GridUpdatedForFilterName_Stop=120]="Timeline_GridUpdatedForFilterName_Stop";n[n.Memory_TakeSnapshot_Start=201]="Memory_TakeSnapshot_Start";n[n.Memory_TakeSnapshot_Stop=202]="Memory_TakeSnapshot_Stop";n[n.Memory_CompareSnapshot_Start=203]="Memory_CompareSnapshot_Start";n[n.Memory_CompareSnapshot_Stop=204]="Memory_CompareSnapshot_Stop";n[n.Memory_ViewSnapshot_Start=205]="Memory_ViewSnapshot_Start";n[n.Memory_ViewSnapshot_Stop=206]="Memory_ViewSnapshot_Stop";n[n.Memory_GridSort_Start=207]="Memory_GridSort_Start";n[n.Memory_GridSort_Stop=208]="Memory_GridSort_Stop";n[n.Memory_DisplayFirstLevelSnapshotData_Start=209]="Memory_DisplayFirstLevelSnapshotData_Start";n[n.Memory_DisplayFirstLevelSnapshotData_Stop=210]="Memory_DisplayFirstLevelSnapshotData_Stop";n[n.Memory_ToolReady_Start=211]="Memory_ToolReady_Start";n[n.Memory_ToolReady_Stop=212]="Memory_ToolReady_Stop";n[n.Memory_GridFilterResponse_Start=213]="Memory_GridFilterResponse_Start";n[n.Memory_GridFilterResponse_Stop=214]="Memory_GridFilterResponse_Stop";n[n.Memory_UpdateObjectReferenceGraph_Start=215]="Memory_UpdateObjectReferenceGraph_Start";n[n.Memory_UpdateObjectReferenceGraph_Stop=216]="Memory_UpdateObjectReferenceGraph_Stop";n[n.Memory_ProcessingSnapshot_Start=217]="Memory_ProcessingSnapshot_Start";n[n.Memory_ProcessingSnapshot_Stop=218]="Memory_ProcessingSnapshot_Stop";n[n.Memory_ProcessingDiffSnapshot_Start=219]="Memory_ProcessingDiffSnapshot_Start";n[n.Memory_ProcessingDiffSnapshot_Stop=220]="Memory_ProcessingDiffSnapshot_Stop";n[n.Debugger_StepOver_Start=301]="Debugger_StepOver_Start";n[n.Debugger_StepInto_Start=302]="Debugger_StepInto_Start";n[n.Debugger_StepOut_Start=303]="Debugger_StepOut_Start";n[n.Debugger_OnBreak_Start=304]="Debugger_OnBreak_Start";n[n.Debugger_OnBreak_Stop=305]="Debugger_OnBreak_Stop";n[n.Debugger_PrettyPrint_Start=306]="Debugger_PrettyPrint_Start";n[n.Debugger_PrettyPrint_Stop=307]="Debugger_PrettyPrint_Stop";n[n.Debugger_CloseDocument_Start=310]="Debugger_CloseDocument_Start";n[n.Debugger_CloseDocument_Stop=311]="Debugger_CloseDocument_Stop";n[n.Debugger_RevealRange_Start=314]="Debugger_RevealRange_Start";n[n.Debugger_RevealRange_Stop=315]="Debugger_RevealRange_Stop";n[n.Debugger_CallstackController_GoTo_Start=316]="Debugger_CallstackController_GoTo_Start";n[n.Debugger_CallstackController_GoTo_Stop=317]="Debugger_CallstackController_GoTo_Stop";n[n.Debugger_BreakpointController_SetAllEnabledStates_Start=318]="Debugger_BreakpointController_SetAllEnabledStates_Start";n[n.Debugger_BreakpointController_SetAllEnabledStates_Stop=319]="Debugger_BreakpointController_SetAllEnabledStates_Stop";n[n.Debugger_EditorWindow_NavigateTo_Start=320]="Debugger_EditorWindow_NavigateTo_Start";n[n.Debugger_EditorWindow_NavigateTo_Stop=321]="Debugger_EditorWindow_NavigateTo_Stop";n[n.Debugger_Editor_SetModel_Start=322]="Debugger_Editor_SetModel_Start";n[n.Debugger_Editor_SetModel_Stop=323]="Debugger_Editor_SetModel_Stop";n[n.Debugger_Editor_CreateModel_Start=324]="Debugger_Editor_CreateModel_Start";n[n.Debugger_Editor_CreateModel_Stop=325]="Debugger_Editor_CreateModel_Stop";n[n.Debugger_Editor_Create_Start=326]="Debugger_Editor_Create_Start";n[n.Debugger_Editor_Create_Stop=327]="Debugger_Editor_Create_Stop";n[n.Debugger_Editor_Layout_Start=328]="Debugger_Editor_Layout_Start";n[n.Debugger_Editor_Layout_Stop=329]="Debugger_Editor_Layout_Stop";n[n.Debugger_Editor_ChangeViewZones_Start=330]="Debugger_Editor_ChangeViewZones_Start";n[n.Debugger_Editor_ChangeViewZones_Stop=331]="Debugger_Editor_ChangeViewZones_Stop";n[n.Debugger_Editor_RevealPosition_Start=332]="Debugger_Editor_RevealPosition_Start";n[n.Debugger_Editor_RevealPosition_Stop=333]="Debugger_Editor_RevealPosition_Stop";n[n.Debugger_Editor_SaveViewState_Start=334]="Debugger_Editor_SaveViewState_Start";n[n.Debugger_Editor_SaveViewState_Stop=335]="Debugger_Editor_SaveViewState_Stop";n[n.Debugger_Editor_RestoreViewState_Start=336]="Debugger_Editor_RestoreViewState_Start";n[n.Debugger_Editor_RestoreViewState_Stop=337]="Debugger_Editor_RestoreViewState_Stop";n[n.Debugger_EditorWindow_CreateDataTipFromPosition_Start=338]="Debugger_EditorWindow_CreateDataTipFromPosition_Start";n[n.Debugger_EditorWindow_CreateDataTipFromPosition_Stop=339]="Debugger_EditorWindow_CreateDataTipFromPosition_Stop";n[n.Debugger_BreakpointController_SetEnabledState_Start=340]="Debugger_BreakpointController_SetEnabledState_Start";n[n.Debugger_BreakpointController_SetEnabledState_Stop=341]="Debugger_BreakpointController_SetEnabledState_Stop";n[n.Debugger_BreakpointController_BreakpointChanged_Start=342]="Debugger_BreakpointController_BreakpointChanged_Start";n[n.Debugger_BreakpointController_BreakpointChanged_Stop=343]="Debugger_BreakpointController_BreakpointChanged_Stop";n[n.Debugger_BreakpointWindow_BreakpointChanged_Start=344]="Debugger_BreakpointWindow_BreakpointChanged_Start";n[n.Debugger_BreakpointWindow_BreakpointChanged_Stop=345]="Debugger_BreakpointWindow_BreakpointChanged_Stop";n[n.Debugger_WatchWindowView_RefreshView_Start=346]="Debugger_WatchWindowView_RefreshView_Start";n[n.Debugger_WatchWindowView_RefreshView_Stop=347]="Debugger_WatchWindowView_RefreshView_Stop";n[n.Debugger_StepDocument_Start=348]="Debugger_StepDocument_Start";n[n.Debugger_ToggleJMC_Start=349]="Debugger_ToggleJMC_Start";n[n.Debugger_ToggleJMC_Stop=350]="Debugger_ToggleJMC_Stop";n[n.Debugger_ToggleCallstackLibraryFrames_Start=351]="Debugger_ToggleCallstackLibraryFrames_Start";n[n.Debugger_ToggleCallstackLibraryFrames_Stop=352]="Debugger_ToggleCallstackLibraryFrames_Stop";n[n.Debugger_SpecifyUrlAsJMCType_Start=353]="Debugger_SpecifyUrlAsJMCType_Start";n[n.Debugger_SpecifyUrlAsJMCType_Stop=354]="Debugger_SpecifyUrlAsJMCType_Stop";n[n.Debugger_Persistence_DataLoad_Start=355]="Debugger_Persistence_DataLoad_Start";n[n.Debugger_Persistence_DataLoad_Stop=356]="Debugger_Persistence_DataLoad_Stop";n[n.Debugger_Persistence_AddBreakpoints_Start=357]="Debugger_Persistence_AddBreakpoints_Start";n[n.Debugger_Persistence_AddBreakpoints_Stop=358]="Debugger_Persistence_AddBreakpoints_Stop";n[n.Debugger_Persistence_AddWatches_Start=359]="Debugger_Persistence_AddWatches_Start";n[n.Debugger_Persistence_AddWatches_Stop=360]="Debugger_Persistence_AddWatches_Stop";n[n.Debugger_Persistence_TabOpen_Start=361]="Debugger_Persistence_TabOpen_Start";n[n.Debugger_Persistence_TabOpen_Stop=362]="Debugger_Persistence_TabOpen_Stop";n[n.Debugger_Persistence_SaveState_Start=363]="Debugger_Persistence_SaveState_Start";n[n.Debugger_Persistence_SaveState_Stop=364]="Debugger_Persistence_SaveState_Stop";n[n.Debugger_SourceMap_ToggleSourceMap_Start=365]="Debugger_SourceMap_ToggleSourceMap_Start";n[n.Debugger_SourceMap_ToggleSourceMap_Stop=366]="Debugger_SourceMap_ToggleSourceMap_Stop";n[n.Debugger_SourceMap_ParseSourceMapAsync_Start=367]="Debugger_SourceMap_ParseSourceMapAsync_Start";n[n.Debugger_SourceMap_ParseSourceMapAsync_Stop=368]="Debugger_SourceMap_ParseSourceMapAsync_Stop";n[n.Debugger_Editor_GetOrCreateMode_Start=369]="Debugger_Editor_GetOrCreateMode_Start";n[n.Debugger_Editor_GetOrCreateMode_Stop=370]="Debugger_Editor_GetOrCreateMode_Stop";n[n.Debugger_OnAddDocuments_Info=371]="Debugger_OnAddDocuments_Info";n[n.Debugger_Intellisense_ListBox_Build_Start=372]="Debugger_Intellisense_ListBox_Build_Start";n[n.Debugger_Intellisense_ListBox_Build_Stop=373]="Debugger_Intellisense_ListBox_Build_Stop";n[n.Debugger_Intellisense_ListBox_Reset_Start=374]="Debugger_Intellisense_ListBox_Reset_Start";n[n.Debugger_Intellisense_ListBox_Reset_Stop=375]="Debugger_Intellisense_ListBox_Reset_Stop";n[n.Debugger_Intellisense_Menu_Filter_Start=376]="Debugger_Intellisense_Menu_Filter_Start";n[n.Debugger_Intellisense_Menu_Filter_Stop=377]="Debugger_Intellisense_Menu_Filter_Stop";n[n.Debugger_Intellisense_Menu_Layout_Start=378]="Debugger_Intellisense_Menu_Layout_Start";n[n.Debugger_Intellisense_Menu_Layout_Stop=379]="Debugger_Intellisense_Menu_Layout_Stop";n[n.Debugger_Intellisense_Provider_Get_Expression_Start=380]="Debugger_Intellisense_Provider_Get_Expression_Start";n[n.Debugger_Intellisense_Provider_Get_Expression_Stop=381]="Debugger_Intellisense_Provider_Get_Expression_Stop";n[n.Debugger_Intellisense_Provider_Update_Start=382]="Debugger_Intellisense_Provider_Update_Start";n[n.Debugger_Intellisense_Provider_Update_Stop=383]="Debugger_Intellisense_Provider_Update_Stop";n[n.Debugger_Intellisense_Provider_Get_Items_Start=384]="Debugger_Intellisense_Provider_Get_Items_Start";n[n.Debugger_Intellisense_Provider_Get_Items_Stop=385]="Debugger_Intellisense_Provider_Get_Items_Stop";n[n.Debugger_AsyncStackProvider_GetFrames_Start=386]="Debugger_AsyncStackProvider_GetFrames_Start";n[n.Debugger_AsyncStackProvider_GetFrames_Stop=387]="Debugger_AsyncStackProvider_GetFrames_Stop";n[n.Debugger_AsyncStackProvider_GetFrames_Timeout=388]="Debugger_AsyncStackProvider_GetFrames_Timeout";n[n.Console_Window_Create_Start=401]="Console_Window_Create_Start";n[n.Console_Window_Create_Stop=402]="Console_Window_Create_Stop";n[n.Console_Attach_Start=403]="Console_Attach_Start";n[n.Console_Attach_Stop=404]="Console_Attach_Stop";n[n.Console_Message_Start=405]="Console_Message_Start";n[n.Console_Message_Stop=406]="Console_Message_Stop";n[n.Console_Input_Start=407]="Console_Input_Start";n[n.Console_Input_Stop=408]="Console_Input_Stop";n[n.Console_Output_Start=409]="Console_Output_Start";n[n.Console_Output_Stop=410]="Console_Output_Stop";n[n.Console_Output_Render_Start=411]="Console_Output_Render_Start";n[n.Console_Output_Render_Stop=412]="Console_Output_Render_Stop";n[n.Console_Item_Toggle_Start=413]="Console_Item_Toggle_Start";n[n.Console_Item_Toggle_Stop=414]="Console_Item_Toggle_Stop";n[n.Console_HtmlLines_Expand_Start=415]="Console_HtmlLines_Expand_Start";n[n.Console_HtmlLines_Expand_Stop=416]="Console_HtmlLines_Expand_Stop";n[n.Console_Context_Menu_Loading_Start=417]="Console_Context_Menu_Loading_Start";n[n.Console_Context_Menu_Loading_Stop=418]="Console_Context_Menu_Loading_Stop";n[n.Console_Scroll_Start=419]="Console_Scroll_Start";n[n.Console_Scroll_Stop=420]="Console_Scroll_Stop";n[n.Console_Intellisense_ListBox_Build_Start=421]="Console_Intellisense_ListBox_Build_Start";n[n.Console_Intellisense_ListBox_Build_Stop=422]="Console_Intellisense_ListBox_Build_Stop";n[n.Console_Intellisense_ListBox_Reset_Start=423]="Console_Intellisense_ListBox_Reset_Start";n[n.Console_Intellisense_ListBox_Reset_Stop=424]="Console_Intellisense_ListBox_Reset_Stop";n[n.Console_Intellisense_Menu_Filter_Start=425]="Console_Intellisense_Menu_Filter_Start";n[n.Console_Intellisense_Menu_Filter_Stop=426]="Console_Intellisense_Menu_Filter_Stop";n[n.Console_Intellisense_Menu_Layout_Start=427]="Console_Intellisense_Menu_Layout_Start";n[n.Console_Intellisense_Menu_Layout_Stop=428]="Console_Intellisense_Menu_Layout_Stop";n[n.Console_Intellisense_Provider_Get_Expression_Start=429]="Console_Intellisense_Provider_Get_Expression_Start";n[n.Console_Intellisense_Provider_Get_Expression_Stop=430]="Console_Intellisense_Provider_Get_Expression_Stop";n[n.Console_Intellisense_Provider_Update_Start=431]="Console_Intellisense_Provider_Update_Start";n[n.Console_Intellisense_Provider_Update_Stop=432]="Console_Intellisense_Provider_Update_Stop";n[n.Console_Intellisense_Provider_Get_Items_Start=433]="Console_Intellisense_Provider_Get_Items_Start";n[n.Console_Intellisense_Provider_Get_Items_Stop=434]="Console_Intellisense_Provider_Get_Items_Stop";n[n.Dom_Window_Create_Start=501]="Dom_Window_Create_Start";n[n.Dom_Window_Create_Stop=502]="Dom_Window_Create_Stop";n[n.Dom_ExpandNode_Start=503]="Dom_ExpandNode_Start";n[n.Dom_ExpandNode_Stop=504]="Dom_ExpandNode_Stop";n[n.Dom_UndoRedo_Start=505]="Dom_UndoRedo_Start";n[n.Dom_UndoRedo_Stop=506]="Dom_UndoRedo_Stop";n[n.Dom_DragDrop_Start=507]="Dom_DragDrop_Start";n[n.Dom_DragDrop_Stop=508]="Dom_DragDrop_Stop";n[n.Dom_AddAttribute_Start=509]="Dom_AddAttribute_Start";n[n.Dom_AddAttribute_Stop=510]="Dom_AddAttribute_Stop";n[n.Dom_Intellisense_Start=511]="Dom_Intellisense_Start";n[n.Dom_Intellisense_Stop=512]="Dom_Intellisense_Stop";n[n.Dom_SelectElement_Start=513]="Dom_SelectElement_Start";n[n.Dom_SelectElement_Stop=514]="Dom_SelectElement_Stop";n[n.Dom_CutElement_Start=515]="Dom_CutElement_Start";n[n.Dom_CutElement_Stop=516]="Dom_CutElement_Stop";n[n.Dom_PasteElement_Start=517]="Dom_PasteElement_Start";n[n.Dom_PasteElement_Stop=518]="Dom_PasteElement_Stop";n[n.Dom_CollapseElement_Start=519]="Dom_CollapseElement_Start";n[n.Dom_CollapseElement_Stop=520]="Dom_CollapseElement_Stop";n[n.Dom_StylesTabLoad_Start=521]="Dom_StylesTabLoad_Start";n[n.Dom_StylesTabLoad_Stop=522]="Dom_StylesTabLoad_Stop";n[n.Dom_StylesTab_Intellisense_Start=523]="Dom_StylesTab_Intellisense_Start";n[n.Dom_StylesTab_Intellisense_Stop=524]="Dom_StylesTab_Intellisense_Stop";n[n.Dom_TreeItemExpand_Start=525]="Dom_TreeItemExpand_Start";n[n.Dom_TreeItemExpand_Stop=526]="Dom_TreeItemExpand_Stop";n[n.Dom_ComputedTabLoad_Start=527]="Dom_ComputedTabLoad_Start";n[n.Dom_ComputedTabLoad_Stop=528]="Dom_ComputedTabLoad_Stop";n[n.Dom_ChangesTabLoad_Start=529]="Dom_ChangesTabLoad_Start";n[n.Dom_ChangesTabLoad_Stop=530]="Dom_ChangesTabLoad_Stop";n[n.Dom_LayoutTabLoad_Start=531]="Dom_LayoutTabLoad_Start";n[n.Dom_LayoutTabLoad_Stop=532]="Dom_LayoutTabLoad_Stop";n[n.Dom_EventsTabLoad_Start=533]="Dom_EventsTabLoad_Start";n[n.Dom_EventsTabLoad_Stop=534]="Dom_EventsTabLoad_Stop";n[n.Dom_TreeItemCollapse_Start=535]="Dom_TreeItemCollapse_Start";n[n.Dom_TreeItemCollapse_Stop=536]="Dom_TreeItemCollapse_Stop";n[n.Dom_Search_Start=537]="Dom_Search_Start";n[n.Dom_Search_Stop=538]="Dom_Search_Stop";n[n.Dom_RemoteInjection_Start=539]="Dom_RemoteInjection_Start";n[n.Dom_RemoteInjection_Stop=540]="Dom_RemoteInjection_Stop";n[n.Dom_EnterEditAsHtml_Start=541]="Dom_EnterEditAsHtml_Start";n[n.Dom_EnterEditAsHtml_Stop=542]="Dom_EnterEditAsHtml_Stop";n[n.Dom_CommitEditAsHtml_Start=543]="Dom_CommitEditAsHtml_Start";n[n.Dom_CommitEditAsHtml_Stop=544]="Dom_CommitEditAsHtml_Stop";n[n.Dom_CommitEditAttribute_Start=545]="Dom_CommitEditAttribute_Start";n[n.Dom_CommitEditAttribute_Stop=546]="Dom_CommitEditAttribute_Stop";n[n.Dom_ShowColorPicker_Start=547]="Dom_ShowColorPicker_Start";n[n.Dom_ShowColorPicker_Stop=548]="Dom_ShowColorPicker_Stop";n[n.Dom_HideColorPicker_Start=549]="Dom_HideColorPicker_Start";n[n.Dom_HideColorPicker_Stop=550]="Dom_HideColorPicker_Stop";n[n.Dom_SetColorUsingColorPicker_Start=551]="Dom_SetColorUsingColorPicker_Start";n[n.Dom_SetColorUsingColorPicker_Stop=552]="Dom_SetColorUsingColorPicker_Stop";n[n.Emulation_Window_Create_Start=601]="Emulation_Window_Create_Start";n[n.Emulation_Window_Create_Stop=602]="Emulation_Window_Create_Stop";n[n.Generic_Debug_1_Start=701]="Generic_Debug_1_Start";n[n.Generic_Debug_1_Stop=702]="Generic_Debug_1_Stop";n[n.Generic_Debug_2_Start=703]="Generic_Debug_2_Start";n[n.Generic_Debug_2_Stop=704]="Generic_Debug_2_Stop";n[n.Generic_Debug_3_Start=705]="Generic_Debug_3_Start";n[n.Generic_Debug_3_Stop=706]="Generic_Debug_3_Stop";n[n.Generic_Debug_4_Start=707]="Generic_Debug_4_Start";n[n.Generic_Debug_4_Stop=708]="Generic_Debug_4_Stop";n[n.Generic_Debug_5_Start=709]="Generic_Debug_5_Start";n[n.Generic_Debug_5_Stop=710]="Generic_Debug_5_Stop";n[n.Generic_Debug_6_Start=711]="Generic_Debug_6_Start";n[n.Generic_Debug_6_Stop=712]="Generic_Debug_6_Stop";n[n.Generic_Debug_7_Start=713]="Generic_Debug_7_Start";n[n.Generic_Debug_7_Stop=714]="Generic_Debug_7_Stop";n[n.Generic_Debug_8_Start=715]="Generic_Debug_8_Start";n[n.Generic_Debug_8_Stop=716]="Generic_Debug_8_Stop";n[n.Generic_Debug_9_Start=717]="Generic_Debug_9_Start";n[n.Generic_Debug_9_Stop=718]="Generic_Debug_9_Stop";n[n.Header_InitializeTabs_Start=801]="Header_InitializeTabs_Start";n[n.Header_InitializeTabs_Stop=802]="Header_InitializeTabs_Stop"})(n.TraceEvents||(n.TraceEvents={}));u=n.TraceEvents,function(n){n[n.Debugger_OpenDocument_Start=308]="Debugger_OpenDocument_Start";n[n.Debugger_OpenDocument_Stop=309]="Debugger_OpenDocument_Stop";n[n.Debugger_SwitchDocument_Start=312]="Debugger_SwitchDocument_Start";n[n.Debugger_SwitchDocument_Stop=313]="Debugger_SwitchDocument_Stop"}(n.TraceEventsWithKey||(n.TraceEventsWithKey={}));f=n.TraceEventsWithKey;i=function(){function n(){}return n.prototype.raiseEvent=function(){},n.prototype.raiseEventWithMessage=function(){},n.prototype.raiseEventWithKey=function(){},n}();n.DefaultTraceWriter=i;r=function(){function n(n){!n&&Microsoft&&t&&(t.F12?n=t.F12.TraceWriter:t.VS&&(n=t.VS.Utilities.createExternalObject("PerformanceTraceExtension","{D76A409F-7234-4B71-9BFD-DEF3DC4CCCA6}")));this._performanceTracer=n}return n.prototype.raiseEventWithKey=function(n,t,i){this._performanceTracer&&this._performanceTracer.raiseEventWithKey(n,t,i)},n.prototype.raiseEventWithMessage=function(n,t){this._performanceTracer&&this._performanceTracer.raiseEvent(n,t)},n.prototype.raiseEvent=function(n){this.raiseEventWithMessage(n,"")},n}();n.TraceWriter=r})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(){}return n.toCSV=function(t,i){var r=[],u;return r.push(n.writeRecord(t)),u=i.map(function(i){return n.writeRecord(t.map(function(n){return i[n]}))}),r=r.concat(u),r.join("\r\n")},n.writeRecord=function(t){return t.map(function(t){return n.writeValue(t)}).join(",")},n.writeValue=function(n){return n===null||typeof n=="undefined"?"":(n=String(n),n.indexOf('"')>=0||n.indexOf(",")>=0)?'"'+n.replace('"','""')+'"':n},n}();n.CSVWriter=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
//! Copyright (C) Microsoft. All rights reserved.
$mList=function(){function n(n,t){var r,u,i;if(this.selector=n,t===null)this._array=[];else if(t.length!==undefined)for(this._array=[],r=t,u=r.length,i=0;i<u;i++)this._array.push(new $mNode(r[i]));else this._array=[new $mNode(t)]}return Object.defineProperty(n.prototype,"length",{get:function(){return this._array.length},enumerable:!0,configurable:!0}),n.prototype.is=function(n){if(n===":hidden"){for(var t=0;t<this.length;t++)if(!this._array[t].is(":hidden"))return!1;return!0}if(n===":visible")return!this.is(":hidden");throw"$mNode.is(s: string) : boolean - can only be called with :hidden or :visible"},n.prototype.scrollTop=function(){if(this.length!==0)return this._array[0].scrollTop()},n.prototype.scrollLeft=function(){if(this.length!==0)return this._array[0].scrollLeft()},n.prototype.data=function(n,t){if(this.length!==0)return this._array[0].data(n,t)},n.prototype.attr=function(n,t){if(this.length!==0){if(t!==undefined){for(var i=0;i<this.length;i++)this._array[i].setAttr(n,t);return this}return this._array[0].attr(n)}},n.prototype.removeAttr=function(n){for(var t=0;t<this.length;t++)this._array[t].removeAttr(n);return this},n.prototype.matchAttr=function(t,i){for(var u,f=new n(this.selector+" \u2192 matchAttr",null),e=this.length,r=0;r<e;r++)u=this._array[r],u.matchAttr(t,i)&&f.push(u);return f},n.prototype.addClass=function(n){for(var t=0;t<this.length;t++)this._array[t].addClass(n);return this},n.prototype.removeClass=function(n){for(var i=this.length,t=0;t<i;t++)this._array[t].removeClass(n);return this},n.prototype.hasClass=function(n){for(var t=0;t<this.length;t++)if(this._array[t].hasClass(n))return!0;return!1},n.prototype.hide=function(){for(var t=this.length,n=0;n<t;n++)this._array[n].hide();return this},n.prototype.show=function(){for(var t=this.length,n=0;n<t;n++)this._array[n].show();return this},n.prototype.placeholder=function(n){for(var i=this.length,t=0;t<i;t++)this._array[t].placeholder(n);return this},n.prototype.focus=function(){return this.length>=1&&this._array[0].focus(),this},n.prototype.text=function(n){var i,t;if(n===undefined)return this.length>0?this._array[0].text():void 0;for(i=this.length,t=0;t<i;t++)this._array[t].text(n);return this},n.prototype.html=function(n){var i,t;if(n===undefined)return this.length>0?this._array[0].html():void 0;for(i=this.length,t=0;t<i;t++)this._array[t].html(n);return this},n.prototype.each=function(n){for(var i=this.length,t=0;t<i;t++)n.call(this._array[t].get(),t,this._array[t].get())},n.prototype.parent=function(t){var r,f,i,u;if(t!==undefined){if(!n.isClassSelector(t))return;t=t.substr(1)}for(r=new n(this.selector+" \u2192 parent",null),f=this.length,i=0;i<f;i++)u=this._array[i].parent(t),u&&r.push(u);return r},n.prototype.parents=function(t){var f,e,r,i,u;if(n.isClassSelector(t)){for(t=t.substr(1),f=new n(this.selector+" \u2192 parents",null),e=this.length,r=0;r<e;r++)if(i=this._array[r].parents(t),i&&i.length)for(u=0;u<i.length;u++)f.push(i[u]);return f}},n.prototype.children=function(t){var u,e,r,o,i,f;if(t!==undefined){if(!n.isClassSelector(t))return;t=t.substr(1)}for(u=new n(this.selector+" \u2192 children",null),e=this.length,r=0;r<e;r++)for(o=this._array[r].get(),i=o.firstChild;i;)i.nodeType===1&&(f=new $mNode(i),(t===undefined||f.hasClass(t))&&u.push(f)),i=i.nextSibling;return u},n.prototype.siblings=function(t){var u,e,r,f;if(t!==undefined){if(!n.isClassSelector(t))return;t=t.substr(1)}for(u=new n(this.selector+" \u2192 siblings",null),e=this.length,r=0;r<e;r++)for(var o=this._array[r].get(),s=this._array[r].get().parentNode,i=s.firstChild;i;)i.nodeType===1&&i!==o&&(f=new $mNode(i),(t===undefined||f.hasClass(t))&&u.push(f)),i=i.nextSibling;return u},n.prototype.next=function(t){var r,e,u,i,f;if(t!==undefined){if(!n.isClassSelector(t))return;t=t.substr(1)}for(r=new n(this.selector+" \u2192 next",null),e=this.length,u=0;u<e;u++)for(i=this._array[u].get().nextSibling;i;){if(f=new $mNode(i),t===undefined||f.hasClass(t))return r.push(f),r;i=i.nextSibling}return r},n.prototype.prev=function(t){var r,e,u,i,f;if(t!==undefined){if(!n.isClassSelector(t))return;t=t.substr(1)}for(r=new n(this.selector+" \u2192 prev",null),e=this.length,u=0;u<e;u++)for(i=this._array[u].get().previousSibling;i;){if(f=new $mNode(i),t===undefined||f.hasClass(t))return r.push(f),r;i=i.previousSibling}return r},n.prototype.appendTo=function(n){var i,r,t;if(n.length===1)for(i=this.length,r=n.get(0),t=0;t<i;t++)r.appendChild(this.get(t));return this},n.prototype.after=function(n){var f,i,r,u,t;if(n.length>0)for(f=this.length,i=0;i<f;i++)if(r=this.get(i),u=r.parentNode,r.nextSibling)for(t=0;t<n.length;t++)u.insertBefore(n.get(t),r.nextSibling);else for(t=0;t<n.length;t++)u.appendChild(n.get(t));return this},n.prototype.not=function(t){var r,f,i,u;if(n.isClassSelector(t)){for(t=t.substr(1),r=new n(this.selector+" \u2192 not",null),f=this.length,i=0;i<f;i++)u=this._array[i],u.hasClass(t)||r.push(u);return r}},n.prototype.slice=function(t,i){var u=new n(this.selector+" \u2192 slice",null),f=this.length,r,e;for((typeof i=="undefined"||i>f)&&(i=f),r=t;r<i;r++)e=this._array[r],u.push(e);return u},n.prototype.closest=function(t){for(var f,o,u,e,i=t.split(/[ ,]+/),r=0;r<i.length;r++){if(!n.isClassSelector(i[r]))return;i[r]=i[r].substr(1)}for(f=new n(this.selector+" \u2192 closest",null),o=this.length,u=0;u<o;u++)e=this._array[u].closest(i),e&&f.push(e);return f},n.prototype.find=function(t){for(var e,i,r,o,f=new n(this.selector+" \u2192 find",null),s=this.length,u=0;u<s;u++)if(e=this._array[u].get(),i=e.querySelectorAll(t),i)for(r=0,o=i.length;r<o;r++)f.push(new $mNode(i[r]));return f},n.prototype.remove=function(){for(var i=new n(this.selector+" \u2192 remove",null),r=this.length,t=0;t<r;t++)this._array[t].remove();return i},n.prototype.prepend=function(n){var r,t,i;if(n.length>0)for(r=this.length,t=0;t<r;t++)for(i=n.length-1;i>=0;i--)this._array[t].prepend(n._array[i].get());return this},n.prototype.append=function(n){var r,t,i;if(n.length>0)for(r=this.length,t=0;t<r;t++)for(i=0;i<n.length;i++)this._array[t].append(n._array[i].get());return this},n.prototype.appendText=function(n){for(var i,r=this.length,t=0;t<r;t++)i=this._array[t],i.append(document.createTextNode(n));return this},n.prototype.replaceWith=function(n){var i=this.length,t;if(i>0&&n.length===1)for(t=0;t<i;t++)this._array[t].replaceWith(n._array[0]);return this},n.prototype.select=function(){for(var t=this.length,n=0;n<t;n++)this._array[n].select();return this},n.prototype.val=function(n){var i=this.length,t;if(n!==undefined){for(t=0;t<i;t++)this._array[t].val(n);return this}if(i!==0)return this._array[0].val(n)},n.prototype.css=function(n,t){var r=this.length,i;if(t!==undefined){for(i=0;i<r;i++)this._array[i].css(n,t);return this}if(r!==0)return this._array[0].css(n)},n.prototype.click=function(){for(var t=this.length,n=0;n<t;n++)this._array[n].click();return this},n.prototype.dblclick=function(){for(var t=this.length,n=0;n<t;n++)this._array[n].dblclick();return this},n.prototype.bindTarget=function(n,t,i,r){return this.changeBinding(n,!0,t,i,r)},n.prototype.bind=function(n,t,i){return this.changeBinding(undefined,!0,n,t,i)},n.prototype.unbind=function(n,t){return this.changeBinding(undefined,!1,n,t)},n.prototype.trigger=function(t,i){for(var u,f,e=t.split(" "),o=this.length,r=0;r<o;r++)for(u=0;u<e.length;u++)f=e[u],n.DomEvents.indexOf(f)>=0?this._array[r].triggerEvent(f,i):this._array[r].triggerSpecial(f,i);return this},n.prototype.get=function(n){return(n<0&&(n=n+this.length),n>=this.length||n<0)?null:this._array[n].get()},n.prototype.first=function(){var t=new n(this.selector+" \u2192 first",null);return this.length>0&&t.push(this._array[0]),t},n.prototype.last=function(){var t=new n(this.selector+" \u2192 last",null);return this.length>0&&t.push(this._array[this.length-1]),t},n.prototype.position=function(){var n=this.length;if(n>0)return this._array[0].position()},n.prototype.height=function(){var n=this.length;if(n>0)return this._array[0].height()},n.prototype.outerHeight=function(n){var t=this.length;if(t>0)return this._array[0].outerHeight(n)},n.prototype.width=function(){var n=this.length;if(n>0)return this._array[0].width()},n.prototype.outerWidth=function(n){var t=this.length;if(t>0)return this._array[0].outerWidth(n)},n.isClassSelector=function(n){return n[0]!=="."?!1:n.indexOf(",")!==-1?!1:n.indexOf("#")!==-1?!1:n.indexOf(">")!==-1?!1:n.indexOf(" ")!==-1?!1:n.indexOf("[")!==-1?!1:!0},n.prototype.push=function(n){this._array.push(n)},n.prototype.changeBinding=function(t,i,r,u,f){for(var o,s,h=r.split(" "),c=this.length,e=0;e<c;e++)for(o=0;o<h.length;o++)s=h[o],n.DomEvents.indexOf(s)>=0?this._array[e].changeEventBinding(i,t,s,u,f):this._array[e].changeSpecialBinding(i,t,s,u,f);return this},n.DomEvents=["click","dblclick","mousedown","mouseup","mousemove","mouseover","mouseout","contextmenu","focus","blur","focusin","focusout","keydown","keyup","keypress","change","reset","select","submit"],n}();
//! Copyright (C) Microsoft. All rights reserved.
$mNode=function(){function n(n){this.length=1;this._node=n}return n.prototype.get=function(){return this._node},n.prototype.is=function(n){if(!(this._node instanceof HTMLElement))throw"$mNode.is(s: string) : boolean - can only be called on HTML elements";var t=this._node;if(n===":hidden")return t.style.display==="none";if(n===":visible")return t.style.display!=="none";throw"$mNode.is(s: string) : boolean - can only be called with :hidden or :visible"},n.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 n=this._node;return n.style.display="none",this},n.prototype.show=function(){var n,t,i;if(!(this._node instanceof HTMLElement)&&!(this._node instanceof SVGElement))throw"$mNode.show(): IQueryNode - can only be called on HTML or SVG elements";return n=this._node,n.style.display="",t=n.ownerDocument.defaultView.getComputedStyle(n,null),i=t.display,i==="none"&&(n.style.display="block"),this},n.prototype.placeholder=function(n){if(!(this._node instanceof HTMLInputElement))throw"$mNode.placeholder(s: string): IQueryNode - can only be called on HTMLInput elements";var t=this._node;return t.placeholder=n,this},n.prototype.focus=function(){var n=this._node;return n.focus(),this},n.prototype.scrollTop=function(n){if(!(this._node instanceof HTMLElement))throw"$mNode.scrollTop(value?: number): number - can only be called on HTML elements";var t=this._node;return n!==undefined?t.scrollTop:(t.scrollTop=n,n)},n.prototype.addClass=function(n){if(!(this._node instanceof HTMLElement))throw"$mNode.addClass(className: string) - can only be called on HTML elements";var t=this._node;t.classList.contains(n)||t.classList.add(n)},n.prototype.removeClass=function(n){if(!(this._node instanceof HTMLElement))throw"$mNode.removeClass(className: string) - can only be called on HTML elements";var t=this._node;t.classList.contains(n)&&t.classList.remove(n)},n.prototype.hasClass=function(n){if(!(this._node instanceof HTMLElement))return!1;var t=this._node;return t.classList&&t.classList.contains(n)},n.prototype.scrollLeft=function(n){if(!(this._node instanceof Element))throw"$mNode.scrollLeft(value?: number): number - can only be called on Elements";var t=this._node;return n!==undefined?t.scrollLeft:(t.scrollLeft=n,n)},n.prototype.data=function(t,i){var r=this._node[n.DATA_KEY];if(r||(this._node[n.DATA_KEY]=r={}),t===undefined)return r;if(i!==undefined)r[t]=i;else return r[t];return r},n.prototype.attr=function(n){if(!(this._node instanceof Element))throw"$mNode.attr(attributeName: string): string - can only be called on Elements";var i=this._node,t=i[n];return t===undefined&&(t=i.getAttribute(n)),t===null?undefined:t},n.prototype.removeAttr=function(n){if(!(this._node instanceof Element))throw"$mNode.removeAttr(attributeName: string): string - can only be called on Elements";var t=this._node;t.removeAttribute(n)},n.prototype.matchAttr=function(n,t){if(!(this._node instanceof Element))throw"$mNode.matchAttr(attributeName: string, value: string) - can only be called on Elements";var i=this._node;return i.getAttribute(n)===t},n.prototype.setAttr=function(n,t){if(!(this._node instanceof Element))throw"$mNode.setAttr(attributeName: string, setValue: any): void - can only be called on Elements";var i=this._node;i.setAttribute(n,t)},n.prototype.parent=function(t){if(this._node instanceof HTMLElement){var i=this._node.parentNode;return t===undefined||i.classList.contains(t)?new n(i):undefined}},n.prototype.parents=function(t){var r,i;if(!(this._node instanceof HTMLElement))throw"$mNode.parents(s: string): IQueryNode - can only be called on HTML elements";for(i=this._node,r=[];i.parentNode instanceof HTMLElement;)i=i.parentNode,i.classList.contains(t)&&r.push(new n(i));return r},n.prototype.text=function(n){if(!(this._node instanceof HTMLElement))throw"$mNode.text(s?: string): string - can only be called on HTML elements";var t=this._node;return n===undefined?t.innerText:(t.innerText=n,n)},n.prototype.html=function(n){if(!(this._node instanceof HTMLElement))throw"$mNode.html(htmlString?: string): string - can only be called on HTML elements";var t=this._node;return n===undefined?t.innerHTML:(t.innerHTML=n,n)},n.prototype.remove=function(){this._node.parentNode&&this._node.parentNode.removeChild(this._node)},n.prototype.prepend=function(n){this._node.insertBefore(n,this._node.firstChild)},n.prototype.append=function(n){this._node.appendChild(n)},n.prototype.replaceWith=function(n){var t=this._node.parentNode,i,r;t&&(i=this._node.nextSibling,t.removeChild(this._node),r=n._node,i?t.insertBefore(r,i):t.appendChild(r))},n.prototype.select=function(){if(!(this._node instanceof HTMLElement))throw"$mNode.select() - can only be called on HTML elements";var n=this._node;n.select()},n.prototype.val=function(n){var i,t;if(!(this._node instanceof HTMLInputElement))throw"$mNode.val(): string - can only be called on HTMLInput elements";if(i=this._node,n===undefined)return(t=i.value,typeof t=="string")?t.replace(/\r/g,""):t===undefined||t===null?"":t;i.value=n},n.prototype.closest=function(t){for(var i=this._node,r;i;){if(i.classList)for(r=0;r<t.length;r++)if(i.classList.contains(t[r]))return new n(i);i=i.parentNode}},n.prototype.css=function(n,t){var u,i,r;if(n&&typeof n=="object"){u=n;for(i in u)this.css(i,u[i])}else return i=n,r=this._node,t!==undefined&&(r.style[i]=t),r.style?r.style[i]:undefined},n.prototype.click=function(){if(!(this._node instanceof HTMLElement))throw"$mNode.click(): IQueryNode - can only be called on HTML elements";var n=this._node;return n.click(),this},n.prototype.dblclick=function(){if(!(this._node instanceof HTMLElement))throw"$mNode.dblclick(): IQueryNode - can only be called on HTML elements";var n=this._node;n.fireEvent("ondblclick")},n.prototype.changeEventBinding=function(n,t,i,r,u){var e=this._node,c="on"+i,o=e[c],s,f=o&&o.boundFuncList?o.boundFuncList:[],h;return n?f.push(r):r?(h=f.indexOf(r),h>=0&&f.splice(h,1)):f=[],f.length&&(t===undefined&&(t=e),s=function(n){var i,e=!0,r;for(n.target=t,i=0;i<f.length;i++)r=f[i].call(t,n,u),r||typeof r!="boolean"||(n.preventDefault(),n.stopPropagation(),e=!1);return e},s.boundFuncList=f),e[c]=s,this},n.prototype.triggerEvent=function(n,t){var i=this._node,r=i[n];return r&&r.call(i,{},t),this},n.prototype.changeSpecialBinding=function(t,i,r,u){var f=this._node,e=n.BINDING_KEY+r;return f[e]=t?u:undefined,this},n.prototype.triggerSpecial=function(t,i){var r=this._node,f=n.BINDING_KEY+t,u=r[f];return u&&u.call(r,{},i),this},n.prototype.position=function(){var n=this._node;return{top:n.offsetTop,left:n.offsetLeft}},n.prototype.height=function(){var i=this._node,n=i.getBoundingClientRect().height,t=window.getComputedStyle(i,null);return n-=parseInt(t.paddingTop,10),n-=parseInt(t.paddingBottom,10),n-=parseInt(t.borderTopWidth,10),n-parseInt(t.borderBottomWidth,10)},n.prototype.outerHeight=function(n){var r=this._node,t=r.getBoundingClientRect().height,i;return n&&(i=window.getComputedStyle(r,null),t+=parseInt(i.marginTop,10),t+=parseInt(i.marginBottom,10)),t},n.prototype.width=function(){var i=this._node,n=i.getBoundingClientRect().width,t=window.getComputedStyle(i,null);return n-=parseInt(t.paddingLeft,10),n-=parseInt(t.paddingRight,10),n-=parseInt(t.borderLeftWidth,10),n-parseInt(t.borderRightWidth,10)},n.prototype.outerWidth=function(n){var r=this._node,t=r.getBoundingClientRect().width,i;return n&&(i=window.getComputedStyle(r,null),t+=parseInt(i.marginLeft,10),t+=parseInt(i.marginRight,10)),t},n.BINDING_KEY="$BPT$Binding$",n.DATA_KEY="$BPT$QueryData$",n}();
//! Copyright (C) Microsoft. All rights reserved.
DataTreeView=function(){function n(){}return n.getChildren=function(n){return n.hasClass("BPT-DataTree-Container")?n.children().first().children(".BPT-DataTreeItem-ChildCollection").children(".BPT-DataTreeItem"):n.children(".BPT-DataTreeItem-ChildCollection").children(".BPT-DataTreeItem")},n.getName=function(n){var t=n.find("span.BPT-DataTreeItem-Name").first(),i=t.children(".BPT-HTML-CSS-Name");return i.length===1?i:t},n.getValue=function(n){var t=n.find("span.BPT-DataTreeItem-Value").first(),i=t.children(".BPT-HTML-CSS-Value");return i.length===1?i:t},n.clear=function(n){return n.children(".BPT-DataTreeItem-ChildCollection").remove(),n.hasClass("BPT-DataTree-Container")&&n.children().first().children(".BPT-DataTreeItem-ChildCollection").remove(),n},n}();
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(){}return Object.defineProperty(i.prototype,"diagnosticsBridge",{get:function(){return this._diagnosticsBridge},enumerable:!0,configurable:!0}),i.prototype.main=function(){var i,r;if(window.parent.getExternalObj?i=window.parent.getExternalObj():window.external&&(i=window.external),Microsoft&&t&&t.F12?this._diagnosticsBridge=new n.IEDiagnosticsBridge(i):(r=t.Utilities.JSONMarshaler.attachToPublishedObject("F12.Common.Bridge.IDomBridge",this,!0),this._diagnosticsBridge=new n.DiagnosticsBridge(r)),document.documentMode<10){window.navigate("about:blank");return}this.onStartup()},i.prototype.onStartup=function(){},i}();n.App=i})(Common||(Common={})),function(n){"use strict";(function(n){n[n.None=0]="None";n[n.Trident=1]="Trident";n[n.Chromium=2]="Chromium"})(n.TargetEngineKind||(n.TargetEngineKind={}));var t=n.TargetEngineKind}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f){this.firstIndex=n;this.lastIndex=t;this.content=i;this.isFromComplexBlock=r;this.isStart=u;this.rangeType=f}return n}();n.Range=t})(t=n.Templating||(n.Templating={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=function(){function t(){}return t.prototype.findRanges=function(n){var t=[];return!n||n.length===0?t:(t=t.concat(this.internalFindRanges("##forEach(",")##",n,"forEach",!0)),t=t.concat(this.internalFindRanges("##endForEach##",null,n,"forEach",!1)),t=t.concat(this.internalFindRanges("##if(",")##",n,"if",!0)),t=t.concat(this.internalFindRanges("##endIf##",null,n,"if",!1)),t=t.concat(this.internalFindRanges("##include(",")##",n,"include",!1)),t.sort(this.compareRanges),t=t.concat(this.findRemainingRanges(n,t)),t.sort(this.compareRanges),t)},t.prototype.compareRanges=function(n,t){return n.firstIndex===t.firstIndex?0:n.firstIndex<t.firstIndex?-1:1},t.prototype.internalFindRanges=function(t,i,r,u,f){for(var e,o=0,h,s=[],l,c;o<r.length;){if(e=r.indexOf(t,o),h=null,l=null,c=null,e===-1)return s;if(i){if((o=e+t.length+1,o>=r.length)||(h=r.indexOf(i,o),h===-1))return s;l=r.substring(e+t.length,h);c=h+i.length-1}else c=e+t.length-1;s.push(new n.Range(e,c,l,!0,f,u));o=s[s.length-1].lastIndex+1}return s},t.prototype.findRemainingRanges=function(t,i){var u=[],r,e,f;if(i.length===0)return u.push(new n.Range(0,t.length-1,t,!1,!1,"text")),u;for(r=0,f=0;f<i.length;f++)e=i[f].firstIndex-r,e>0&&u.push(new n.Range(r,r+e-1,t.substring(r,r+e),!1,!1,"text")),r=i[f].lastIndex+1;return r<t.length-1&&u.push(new n.Range(r,t.length-1,t.substring(r,t.length),!1,!1,"text")),u},t}();n.RangeFinder=t})(t=n.Templating||(n.Templating={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=function(){function n(){this.blocks=[]}return n.prototype.addBlock=function(n){this.blocks.push(n)},n.prototype.process=function(){return""},n}();n.Block=t})(t=n.Templating||(n.Templating={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){"use strict";var t=function(n){function t(t){n.call(this);this._negate=!1;this._useCapabilities=!1;this._decisionVariable=t.content;this._decisionVariable[0]==="!"&&(this._negate=!0,this._decisionVariable=this._decisionVariable.substr(1));this._decisionVariable[0]==="@"&&(this._useCapabilities=!0,this._decisionVariable=this._decisionVariable.substr(1));this.containerType="if"}return __extends(t,n),t.prototype.process=function(n,t){var u="",i=(this._useCapabilities?t:n)[this._decisionVariable],f,r;if(typeof i=="function"&&(f=i,i=f.call(n)),this._negate&&(i=!i),i)for(r=0;r<this.blocks.length;r++)u=u+this.blocks[r].process(n,t);return u},t}(n.Block);n.IfBlock=t})(t=n.Templating||(n.Templating={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){"use strict";var t=function(n){function t(t){n.call(this);this._iterationVariable=t.content;this.containerType="forEach"}return __extends(t,n),t.prototype.process=function(n,t){var u="",f=n[this._iterationVariable],i,r,e;if(f)for(i=0;i<f.length;i++)for(e=f[i],r=0;r<this.blocks.length;r++)u=u+this.blocks[r].process(e,t);return u},t}(n.Block);n.ForEachBlock=t})(t=n.Templating||(n.Templating={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){"use strict";var t=function(n){function t(t){n.call(this);this._text=t.content;this.containerType="text"}return __extends(t,n),t.prototype.process=function(n){for(var r,u=this._text;r=this.findNextDelimitedString(u);){var e=r.substring(t.DelimiterLength,r.length-t.DelimiterLength),f="",i=n;e.split(".").forEach(function(n){i&&(i=i[n])});typeof i!="undefined"&&i!==null&&(f=typeof i=="string"?i:i.toString());f=f.replace(t.GTRegex,"&gt;").replace(t.LTRegex,"&lt;").replace(t.DoubleQuoteRegex,"&quot;").replace(t.SingleQuoteRegex,"&apos;").replace(t.DollarRegex,"$$$$");u=u.replace(r,f)}return u},t.prototype.findNextDelimitedString=function(n){var i=t.DelimiterRegex.exec(n);return i?i[0]:null},t.DelimiterRegex=/%%[$a-zA-Z_][$a-zA-Z0-9_]*(\.[$a-zA-Z_][$a-zA-Z0-9_]*)*%%/,t.GTRegex=/>/g,t.LTRegex=/</g,t.DoubleQuoteRegex=/"/g,t.SingleQuoteRegex=/'/g,t.DollarRegex=/[$]/g,t.DelimiterLength=2,t}(n.Block);n.TextBlock=t})(t=n.Templating||(n.Templating={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){"use strict";var t=function(t){function i(n){t.call(this);this._template=n.content;this.containerType="include"}return __extends(i,t),i.prototype.process=function(t,i){var r=new n.Template(i,{htmlElementSource:document,templateId:this._template});return r.createTemplateText(t)},i}(n.Block);n.IncludeBlock=t})(t=n.Templating||(n.Templating={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=function(){function t(){}return t.prototype.loadBlocks=function(t,i){for(var c=new n.RangeFinder,h=c.findRanges(i),u=[t],r,f,e,o,s=0;s<h.length;s++)if(r=h[s],r.rangeType==="text")u[u.length-1].addBlock(new n.TextBlock(r));else if(r.rangeType==="include")u[u.length-1].addBlock(new n.IncludeBlock(r));else if(r.isStart){if(r.rangeType==="if"?f=new n.IfBlock(r,i):r.rangeType==="forEach"&&(f=new n.ForEachBlock(r,i)),!f)throw new Error("unrecognized block type "+r.rangeType);u[u.length-1].addBlock(f);u.push(f);f=null}else{if(o=r.rangeType,e=u[u.length-1].containerType,o!==e)throw new Error("the current container ("+e+") is missing an end tag. Found a ("+o+") end tag instead");u.pop()}},t}();n.BlockFactory=t})(t=n.Templating||(n.Templating={}))})(Common||(Common={})),function(n){var t;(function(n){"use strict";var t=function(){function t(n,t,i,r){var u;if(this._templateId="",this._blocks=[],this.containerType="template",this._capabilities=n,t){if(this._htmlElementSource=t.htmlElementSource,this._templateId=t.templateId,u=this._htmlElementSource.getElementById(this._templateId),!u)throw new Error("Template with id "+this._templateId+" is not valid.");var f=u.innerHTML,f=this.removeInternodalWhitespace(f),e=this.localize(f,r);this.initialize(e)}else this.initialize(i)}return t.prototype.addBlock=function(n){this._blocks.push(n)},t.prototype.createTemplateText=function(n){return this.processBlocks(n)},t.prototype.createTemplateElement=function(n){var t=this._htmlElementSource.createElement("div"),r,i;for(t.innerHTML=this.createTemplateText(n),i=0;i<t.childNodes.length;i++){if(t.childNodes[i].nodeType===Node.TEXT_NODE&&!t.childNodes[i].textContent.match(/^\s+$/))return t;if(t.childNodes[i].nodeType===Node.ELEMENT_NODE){if(r)return t;r=t.childNodes[i]}}return r},t.prototype.appendChild=function(n,t,i){var r=this.createTemplateElement(t);i&&r.classList.add(i);n.appendChild(r)},t.prototype.replaceChildren=function(n,t,i){n.innerHTML="";this.appendChild(n,t,i)},t.prototype.localize=function(n,i){var u,r,f,e,o;if(!i||(r=t.LocalizationRegex.exec(n),!r||r.length===0))return n;for(f=0;f<r.length;f++)u=r[f],e=u.substring(t.DelimiterLength,u.length-t.DelimiterLength),o=i.getString(e),n=n.replace(u,o);return n},t.prototype.removeInternodalWhitespace=function(n){return n=n.trim(),n=n.replace(/>\s*\n\s*</g,"><"),n.replace(/<\/>/g,"")},t.prototype.initialize=function(t){var i=new n.BlockFactory;i.loadBlocks(this,t)},t.prototype.processBlocks=function(n){for(var t="",i=0;i<this._blocks.length;i++)t=t+this._blocks[i].process(n,this._capabilities);return t},t.LocalizationRegex=/%L%[a-zA-Z]+%L%/,t.DelimiterLength=3,t}();n.Template=t})(t=n.Templating||(n.Templating={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=function(){function n(n){this.cache=[];this.listSource=n}return Object.defineProperty(n.prototype,"length",{get:function(){return this.cache.length},enumerable:!0,configurable:!0}),n.prototype.load=function(n){var t=this;this.listSource(function(i){t.cache=i||[];n()},this._loadArgs)},n.prototype.setLoadArgs=function(n){this._loadArgs=n},n.prototype.item=function(n){return F12.Tools.Utility.Assert.isTrue(n>=0&&n<this.cache.length),this.cache[n]},n}();n.ListModel=t})(t=n.ModelView||(n.ModelView={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=n.Templating,u=function(){function t(n,t,i,r,u,f,e){var o=this;if(this._alternateTemplates=[],this._handlersAdded=[],this.htmlElementSource=n,this.listViewDivId=t,this.listRoot=n.getElementById(t),!this.listRoot)throw new Error("Can't find list root element with id '"+t+"'.");if(this._defaultTemplate=this.createTemplate(u,i,e),!this.listRoot)throw new Error("Can't find default template element with id '"+i+"'.");this.model=r;f&&f.forEach(function(n){var t=o.createTemplate(u,n.templateId);o._alternateTemplates.push({selectionFunction:n.templateMatchFunction,template:t})})}return t.prototype.createTemplate=function(n,t,i){return new r.Template(n,{htmlElementSource:this.htmlElementSource,templateId:t},null,i)},t.prototype.addAutoRemoveHandlers=function(n,t,i,r){var u=this,f=function(n){return u.eventHandler(r,n)};i.forEach(function(i){for(var r=[],o=n.querySelectorAll("."+i),e=0;e<o.length;e++)r.push(o[e]);n.classList.contains(i)&&r.push(n);r.forEach(function(n){n.addEventListener(t,f);u._handlersAdded.push({element:n,event:t,handler:f})})})},t.prototype.addHandler=function(n,t,i,r){var u=this;n.addEventListener(t,function(n){return u.eventHandler(r,n,i)})},t.prototype.updateView=function(){var n=this;this.model.load(function(){n.renderView()})},t.prototype.renderView=function(){this.clearView();this.preViewProcessing();for(var n=0;n<this.model.length;n++)this.preItemViewProcessing(n),this.listRoot.appendChild(this.renderItem(this.model.item(n),"BPT-List-Item")),this.postItemViewProcessing(n);this.postViewProcessing();this.renderViewCallback&&this.renderViewCallback()},t.prototype.renderItem=function(n,t){var r=this.chooseTemplate(n),i=r.createTemplateElement(n);return t&&i.classList.add(t),i},t.prototype.renderItemText=function(n){var t=this.chooseTemplate(n);return t.createTemplateText(n)},t.prototype.clearView=function(){this.removeAllHandlers();$m(this.listRoot).children().remove()},t.prototype.removeAllHandlers=function(){this._handlersAdded.forEach(function(n){n.element.removeEventListener(n.event,n.handler)});this._handlersAdded=[]},t.prototype.setFocus=function(n){this.setTabIndex(n);n.focus()},t.prototype.setTabIndex=function(n){for(var i=this.listRoot.querySelectorAll("[tabIndex='1']"),t=0;t<i.length;t++)i[t].removeAttribute("tabIndex");n.setAttribute("tabIndex","1")},t.prototype.postViewProcessing=function(){this.addAutoRemoveHandlers(this.listRoot,"mouseenter",[t.TOOLTIP_ITEM],function(n){var t=n.target.getAttribute("data-tooltip");return t&&i.Tooltip.show({content:t}),!0});this.addAutoRemoveHandlers(this.listRoot,"mouseleave",[t.TOOLTIP_ITEM],function(){return i.Tooltip.dismiss(),!0})},t.prototype.preViewProcessing=function(){},t.prototype.preItemViewProcessing=function(){},t.prototype.postItemViewProcessing=function(){},t.prototype.chooseTemplate=function(n){var t=null;return this._alternateTemplates.forEach(function(i){if(i.selectionFunction(n)){t=i.template;return}}),t||(t=this._defaultTemplate),t},t.prototype.eventHandler=function(t,i,r){var u,f,e;if(!n.ToolWindowHelpers.isContextMenuUp()&&(u=i.target,u)){if(r&&r.length&&u.classList){for(f=!1,e=0;e<r.length;e++)if(u.classList.contains(r[e])){f=!0;break}}else f=!0;f&&!t(i)&&(i.preventDefault(),i.stopPropagation())}},t.TOOLTIP_ITEM="BPT-Tooltip-Item",t}();t.ListView=u})(t=n.ModelView||(n.ModelView={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f,e){this._idPropertyName=n;this._sortPropertyName=t;this._insertBeforeCallback=i;this._updateCallback=r;this._deleteCallback=u;this._isChanged=f;this._clearDirtyFlag=e;this._isChanged||(this._isChanged=function(n,t){return n!==t})}return n.prototype.reconcile=function(n,t){var u=this,i,r;for((n===null||n===undefined)&&(n=[]),(t===null||t===undefined)&&(t=[]),this._sortPropertyName&&t.sort(function(n,t){var i=n[u._sortPropertyName],r=t[u._sortPropertyName];return i===r?0:i<r?-1:1}),i=0,r=0;i<n.length||r<t.length;)r>=t.length?this._deleteCallback(n[i++]):i>=n.length?this._insertBeforeCallback(t[r++],i<n.length?n[i]:null):t[r][this._idPropertyName]===n[i][this._idPropertyName]?(this._isChanged(t[r],n[i])&&(this._updateCallback(t[r],n[i]),this._clearDirtyFlag&&this._clearDirtyFlag(t[r])),r++,i++):t[r][this._sortPropertyName]>n[i][this._sortPropertyName]?this._deleteCallback(n[i++]):this._insertBeforeCallback(t[r++],n[i])},n}();n.ListReconciler=t})(t=n.ModelView||(n.ModelView={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){"use strict";var t=function(t){function i(i,r,u,f,e,o,s,h,c,l,a){t.call(this,i,r,u,f,e,o,s);this.objectsPreviouslyRendered=[];this.htmlElementSource=i;this.listViewDivId=r;this.idPropertyName=h;this._sortPropertyName=c;this.idPropertyName&&this._sortPropertyName&&(this.listReconciler=new n.ListReconciler(h,c,this.insertBefore.bind(this),this.update.bind(this),this.deleteItem.bind(this),l,a))}return __extends(i,t),i.prototype.renderView=function(){if(!this.listReconciler){t.prototype.renderView.call(this);return}this.preViewProcessing();this.listReconciler.reconcile(this.objectsPreviouslyRendered,this.model.cache);this.objectsPreviouslyRendered=this.model.cache.slice(0);this.postViewProcessing();this.renderViewCallback&&this.renderViewCallback()},i.prototype.beforeUpdate=function(){},i.prototype.afterUpdate=function(){},i.prototype.beforeDelete=function(){},i.prototype.afterDelete=function(){},i.prototype.clearView=function(){t.prototype.clearView.call(this);this.objectsPreviouslyRendered=[]},i.prototype.insertBefore=function(n,t){var r=this.renderItem(n,i.ListItemClassName),u;if(!t){this.listRoot.appendChild(r);return}u=this.listRoot.querySelector("[data-listid='"+t[this.idPropertyName]+"']");u?this.listRoot.insertBefore(r,u):this.listRoot.appendChild(r)},i.prototype.update=function(n,t){var r=this.listRoot.querySelector("[data-listid='"+t[this.idPropertyName]+"']"),u;r&&(this.beforeUpdate(n,t,r),u=this.renderItemText(n),r.outerHTML=u,r.classList.add(i.ListItemClassName),this.afterUpdate(n,t,r))},i.prototype.deleteItem=function(n){var t=this.listRoot.querySelector("[data-listid='"+n[this.idPropertyName]+"']");t&&(this.beforeDelete(n,t),t.parentNode.removeChild(t),this.afterDelete())},i.ListItemClassName="BPT-List-Item",i}(n.ListView);n.ReconcilingListView=t})(t=n.ModelView||(n.ModelView={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n){if(this._rootElement=n,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.")}return Object.defineProperty(n.prototype,"rootElement",{get:function(){return this._rootElement},set:function(n){if(!n)throw new Error("Invalid root");var t=this._rootElement;this._rootElement=n;t&&t.parentNode&&t.parentNode.replaceChild(n,t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parent",{get:function(){return this._parent},set:function(n){this._parent!==n&&(this._parent=n,this._parent&&!this._parent.rootElement.contains(this._rootElement)&&this._parent.appendChild(this),this.onParentChanged())},enumerable:!0,configurable:!0}),n.prototype.appendChild=function(n){this._rootElement.appendChild(n.rootElement);n.parent=this},n.prototype.removeChild=function(n){n.rootElement.parentElement&&(this._rootElement.removeChild(n.rootElement),n.parent=null)},n.prototype.destroy=function(){this._rootElement=null},n.prototype.onParentChanged=function(){},n}();n.Control=t})(t=n.Legacy||(n.Legacy={}))})(t=n.Controls||(n.Controls={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(n){function t(){n.call(this)}return __extends(t,n),Object.defineProperty(t.prototype,"content",{get:function(){return this._content},set:function(n){this._content!==n&&(this._content&&this.removeChild(this._content),this._content=n,this.appendChild(this._content),this.onContentChanged())},enumerable:!0,configurable:!0}),t.prototype.appendChild=function(t){if(this.rootElement.children.length!==0)throw new Error("Only one child is allowed in a content control.");n.prototype.appendChild.call(this,t)},t.prototype.onContentChanged=function(){},t}(n.Control);n.ContentControl=t})(t=n.Legacy||(n.Legacy={}))})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(n){function t(i,r){n.call(this);this._idPostfix=t.GlobalIdPostfix++;i&&this.setTemplateFromName(i,r)}return __extends(t,n),t.prototype.setTemplateFromName=function(n,t){var r,i;t?(r=t.getTemplateString(n),this.setTemplateFromHTML(r)):(i=this.getTemplateElementCopy(n),this.adjustElementIds(i),this.rootElement=i)},t.prototype.setTemplateFromHTML=function(n){var t=this.getTemplateElementFromHTML(n);this.adjustElementIds(t);this.rootElement=t},t.prototype.findElement=function(n){var t=n+this._idPostfix;return this.forAllSelfAndDescendants(this.rootElement,function(n){return n.id&&n.id===t?!1:!0})},t.prototype.findElementsByClassName=function(n){var t=[];return this.forAllSelfAndDescendants(this.rootElement,function(i){return i.classList&&i.classList.contains(n)&&t.push(i),!0}),t},t.prototype.getTemplateElementCopy=function(n){var t=document.getElementById(n);if(!t)throw new Error("Couldn't find the template with name: "+n);if(t.tagName.toLowerCase()!=="script")throw new Error("Expecting the template container to be a script element.");return this.getTemplateElementFromHTML(t.innerHTML)},t.prototype.getTemplateElementFromHTML=function(n){var t=this.getTemplateRootElement();return t.innerHTML=n,t.childElementCount===1&&(t=t.firstElementChild),t},t.prototype.getTemplateRootElement=function(){var n=document.createElement("div");return n.style.width=n.style.height="100%",n},t.prototype.adjustElementIds=function(n){var t=this._idPostfix;this.forAllSelfAndDescendants(n,function(n){return n.id&&(n.id=n.id+t),!0})},t.prototype.forAllSelfAndDescendants=function(n,t){var i=null,u,f,r;if(t(n)){if(n.children)for(u=n.children,f=u.length,r=0;r<f;r++)if(i=this.forAllSelfAndDescendants(u[r],t),i)break}else i=n;return i},t.GlobalIdPostfix=1,t}(n.Controls.Legacy.Control);t.TemplateControl=i})(i=t.Legacy||(t.Legacy={}))})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(t,i){var r=this;this._element=t;this._onModifyCallback=i;this._element.addEventListener("contextmenu",function(n){return r.handleContextMenu(n)});this._element instanceof HTMLInputElement&&this._element.addEventListener("keyup",function(n){return r.handleKeyUp(n)});n.ClipboardHelper.addCutListener(this._element,this.onCut.bind(this));n.ClipboardHelper.addCopyListener(this._element,this.onCopy.bind(this));n.ClipboardHelper.addPasteListener(this._element,this.onPaste.bind(this))}return Object.defineProperty(i.prototype,"isActive",{get:function(){return this._isActive},enumerable:!0,configurable:!0}),i.prototype.show=function(i,r){var h=this,e=i,o=r,c,s,u,l,f;this._element instanceof HTMLInputElement&&(e<=0||o<=0)&&(c=n.ToolWindowHelpers.getSelection(this._element),s=n.ToolWindowHelpers.getCharScreenPosition(this._element,c.end),e=s.left,o=s.top);u=[];this._element instanceof HTMLInputElement&&u.push({id:"menuInputBoxCut",type:1,label:t.Resources.getString("/Common/CutMenuText"),accessKey:t.Resources.getString("/Common/AccessKeyCtrlX")});u.push({id:"menuInputBoxCopy",type:1,label:t.Resources.getString("/Common/CopyMenuText"),accessKey:t.Resources.getString("/Common/AccessKeyCtrlC")});this._element instanceof HTMLInputElement&&u.push({id:"menuInputBoxPaste",type:1,label:t.Resources.getString("/Common/PasteMenuText"),accessKey:t.Resources.getString("/Common/AccessKeyCtrlV")});l=function(n,t){h.invokeContextMenu(n,t)};f=t.ContextMenu.create(u,null,null,null,l);f.addEventListener("dismiss",function(){f.dispose();h._isActive=!1});f.attach(this._element);this._isActive=!0;f.show(e,o)},i.prototype.invokeContextMenu=function(t,i){switch(i.id){case"menuInputBoxCut":n.ClipboardHelper.fireCutEvent(this._element);break;case"menuInputBoxPaste":n.ClipboardHelper.firePasteEvent(this._element);break;case"menuInputBoxCopy":n.ClipboardHelper.fireCopyEvent(this._element);this._element.focus()}},i.prototype.onCut=function(){var t=n.ToolWindowHelpers.getSelection(this._element),r=this.getSelectedText(),i=this._element;return i.value=i.value.substring(0,t.start)+i.value.substring(t.end),this._onModifyCallback&&this._onModifyCallback(),this._element.focus(),i.setSelectionRange(t.start,t.start),r},i.prototype.onCopy=function(){return this.getSelectedText()},i.prototype.onPaste=function(t){var r=n.ToolWindowHelpers.getSelection(this._element),i=this._element,u;return i.value=n.ToolWindowHelpers.replaceTextInRange(i.value,r.start,r.end,t),this._onModifyCallback&&this._onModifyCallback(),i.focus(),u=r.start+t.length,setImmediate(function(){return i.setSelectionRange(u,u)}),!1},i.prototype.getSelectedText=function(){var t,r,u,f,i;return this._element instanceof HTMLInputElement?(r=n.ToolWindowHelpers.getSelection(this._element),u=this._element,t=u.value.substring(r.start,r.end)||u.value):(f=window.getSelection(),f.rangeCount===1&&(i=f.getRangeAt(0),i.startContainer.parentNode===this._element&&i.endContainer.parentNode===this._element&&(t=i.toString())),t||(t=this._element.textContent)),t},i.prototype.handleContextMenu=function(n){return this.show(n.clientX,n.clientY),n.stopImmediatePropagation(),n.preventDefault(),!1},i.prototype.handleKeyUp=function(n){if(n.keyCode===121&&n.shiftKey&&!n.ctrlKey&&!n.altKey)return this.show(0,0),n.stopImmediatePropagation(),n.preventDefault(),!1},i}();n.CutCopyPasteContextMenu=i})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(n){"use strict";var r=Microsoft.Plugin,u=function(){function n(n,t,i,r){this.index=-1;this.value=n;this.text=t;this.info=i||"";this.itemClass=r||""}return n}(),i,t;n.ListBoxItem=u;i=function(n){function i(t,r,u){var f=this;n.call(this,t);t||this.setTemplateFromHTML('<ul class="listBox"><\/ul>');this.rootElement.setAttribute("tabindex","0");this.rootElement.setAttribute("role","listbox");this.rootElement.onkeydown=function(n){return f.onKeyDown(n)};this._listItemElementType=r||"li";this._listItemElementClass=u||"";this._listItemContainers=[];this._selectedIndex=-1;this.rootElement.id||(this.rootElement.id=i.getUniqueID())}return __extends(i,n),Object.defineProperty(i.prototype,"selectedItemChanged",{get:function(){return this._onSelectedItemChanged},set:function(n){this._onSelectedItemChanged=n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectedIndexChanged",{get:function(){return this._onSelectedIndexChanged},set:function(n){this._onSelectedIndexChanged=n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"itemDoubleClicked",{get:function(){return this._onItemDoubleClicked},set:function(n){this._onItemDoubleClicked=n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"listItems",{get:function(){return this._listItems},set:function(n){var t,i,r;if(this.fireBuildListBoxStartEvent(),this.selectedIndex=-1,this._listItems=[],t=0,n)for(;t<n.length;++t)i=n[t],i.index=t,this._listItems.push(i),t<this._listItemContainers.length?(this._listItemContainers[t].item=i,this._listItemContainers[t].rootElement.style.display="list-item",this._listItemContainers[t].rootElement.removeAttribute("aria-hidden")):(r=this.createListItemContainer(i),this._listItemContainers.push(r),this.appendChild(r));this.resetUnusedItems(t);this.fireBuildListBoxEndEvent()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"listItemHeight",{get:function(){if(typeof this._listItemHeight=="undefined")if(this.listItems.length>0)this._listItemHeight=this._listItemContainers[0].rootElement.offsetHeight;else return i.DEFAULT_LIST_ITEM_HEIGHT;return this._listItemHeight},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"itemContainers",{get:function(){return this._listItemContainers},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(n){var t,i,r;this._selectedIndex!==n&&(t=this._selectedIndex,this._selectedIndex=n,t>=0&&(i=this._listItemContainers[t],i.selected=!1),n>=0&&n<this._listItemContainers.length&&(r=this._listItemContainers[n],r.selected=!0,n!==t&&(this._onSelectedIndexChanged&&this._onSelectedIndexChanged(n),this._onSelectedItemChanged&&this._onSelectedItemChanged(this._listItems[n]))))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectedItem",{get:function(){var n=this.selectedIndex;return n>=0?this._listItems[n]:null},set:function(n){var i=this.selectedIndex,t=this._listItems.indexOf(n);this.selectedIndex=t},enumerable:!0,configurable:!0}),i.prototype.scrollIntoView=function(n,t){var r=this._listItems.indexOf(n);if(r>=0){var u=this._listItemContainers[r].rootElement,i=u.getBoundingClientRect(),f=document.elementFromPoint(i.left+1,i.top+1),e=document.elementFromPoint(i.right-1,i.bottom-1);(f!==u||e!==u)&&this._listItemContainers[r].rootElement.scrollIntoView(t)}},i.prototype.createListItemContainer=function(n){return new t(this,n,this._listItemElementType,this._listItemElementClass)},i.prototype.fireBuildListBoxStartEvent=function(){},i.prototype.fireBuildListBoxEndEvent=function(){},i.prototype.fireResetListBoxStartEvent=function(){},i.prototype.fireResetListBoxEndEvent=function(){},i.getUniqueID=function(){return"Common-Controls-Legacy-ListBox-"+i.CurrentUniqueID++},i.prototype.resetUnusedItems=function(n){this.fireResetListBoxStartEvent();for(var t=n;t<this._listItemContainers.length;++t)this._listItemContainers[t].rootElement.style.display="none",this._listItemContainers[t].rootElement.setAttribute("aria-hidden","true"),this._listItemContainers[t].item=null;this.fireResetListBoxEndEvent()},i.prototype.onKeyDown=function(n){var t=!event.shiftKey&&!event.ctrlKey&&!event.altKey;n.keyCode===38&&t?this.selectedIndex>0&&(this.selectedIndex--,this.scrollIntoView(this.selectedItem,!0)):n.keyCode===40&&t&&this.selectedIndex<this._listItemContainers.length-1&&(this.selectedIndex++,this.scrollIntoView(this.selectedItem,!1))},i.DEFAULT_LIST_ITEM_HEIGHT=10,i.CurrentUniqueID=0,i}(n.TemplateControl);n.ListBox=i;t=function(n){function t(i,u,f,e){var o=this;n.call(this,document.createElement(f));this._owner=i;this._item=u;this.rootElement.innerText=u.text;this.rootElement.value=u.value;u.itemClass&&u.itemClass.length>0&&this.rootElement.classList.add(u.itemClass);e!==""&&this.rootElement.classList.add(e);this.rootElement.onmouseover=function(){return o._item&&o._item.info&&r.Tooltip.show({content:o._item.info}),!0};this.rootElement.setAttribute("role","option");this.rootElement.onmousedown=function(n){return o.onMouseDown(n)};this.rootElement.onclick=function(n){return o.onMouseDown(n)};this.rootElement.ondblclick=function(n){return o.onDoubleClicked(n)};this.rootElement.getAttribute("id")||this.rootElement.setAttribute("id",t.getUniqueID())}return __extends(t,n),Object.defineProperty(t.prototype,"selectedChanged",{get:function(){return this._onSelectChanged},set:function(n){this._onSelectChanged=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected},set:function(n){var t=n!==this._selected;this._selected=n;t&&(n?(this.rootElement.setAttribute("selected","selected"),this.rootElement.setAttribute("aria-selected","true"),this._owner.selectedItem=this._item):(this.rootElement.removeAttribute("selected"),this.rootElement.removeAttribute("aria-selected")));this._onSelectChanged&&t&&this._onSelectChanged(n)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this._item},set:function(n){n&&typeof n.text=="string"?(this._item=n,this.rootElement.firstChild?this.rootElement.firstChild.nodeValue=this._item.text:this.rootElement.innerText=this._item.text,this.rootElement.setAttribute("aria-label",this._item.text)):(this._item=null,this.rootElement.firstChild&&(this.rootElement.firstChild.nodeValue=""),this.rootElement.removeAttribute("aria-label"))},enumerable:!0,configurable:!0}),t.getUniqueID=function(){return"Common-Controls-Legacy-ListBoxItemContainer-"+t.CurrentUniqueID++},t.prototype.onMouseDown=function(){this.selected=!0;this._owner.rootElement.focus()},t.prototype.onDoubleClicked=function(){this.selected=!0;this._owner.rootElement.focus();this._owner.itemDoubleClicked&&this._owner.itemDoubleClicked(this._item)},t.CurrentUniqueID=0,t.CONTENT_ELEMENT_ID="content",t}(n.Control);n.ListBoxItemContainer=t})(t=n.Legacy||(n.Legacy={}))})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";(function(n){n[n.Tab=0]="Tab";n[n.Enter=1]="Enter";n[n.DoubleClick=2]="DoubleClick"})(n.ChoiceCommitSource||(n.ChoiceCommitSource={}));var t=n.ChoiceCommitSource})(t=n.Intellisense||(n.Intellisense={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var r=function(n){function t(t,i){n.call(this,t,t,i)}return __extends(t,n),Object.defineProperty(t.prototype,"optionName",{get:function(){return this.text},enumerable:!0,configurable:!0}),t}(n.Controls.Legacy.ListBoxItem),i;t.IntellisenseChoice=r;i=function(n){function t(t,i,r,u){var f=this;n.call(this,t,i,r||"intellisenseListBoxItem");this.itemDoubleClicked=function(n){return f.optionDoubleClicked(n)};this._traceProvider=u;this._currentEtwKey=-1}return __extends(t,n),Object.defineProperty(t.prototype,"intellisenseChoiceSelected",{get:function(){return this._intellisenseChoiceSelected},set:function(n){this._intellisenseChoiceSelected=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentEtwKey",{get:function(){return this._currentEtwKey},set:function(n){this._currentEtwKey=n},enumerable:!0,configurable:!0}),t.prototype.optionDoubleClicked=function(n){this._intellisenseChoiceSelected&&this._intellisenseChoiceSelected(n,2)},t.prototype.fireBuildListBoxStartEvent=function(){this._traceProvider&&this._traceProvider.fireBuildListBoxStartEvent(this.currentEtwKey)},t.prototype.fireBuildListBoxEndEvent=function(){this._traceProvider&&this._traceProvider.fireBuildListBoxEndEvent(this.currentEtwKey)},t.prototype.fireResetListBoxStartEvent=function(){this._traceProvider&&this._traceProvider.fireResetListBoxStartEvent(this.currentEtwKey)},t.prototype.fireResetListBoxEndEvent=function(){this._traceProvider&&this._traceProvider.fireResetListBoxEndEvent(this.currentEtwKey)},t}(n.Controls.Legacy.ListBox);t.IntellisenseListBox=i})(t=n.Intellisense||(n.Intellisense={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r){this._textEditorBridge=n;this._intellisenseMenu=t;this._intellisenseProvider=i;this._isInitialized=!1;this._deactivationHandler=this.uninitialize.bind(this);this._events=r;this._events&&this._events.addEventListener("deactivated",this._deactivationHandler)}return Object.defineProperty(n.prototype,"textEditorBridge",{get:function(){return this._textEditorBridge},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"intellisenseMenu",{get:function(){return this._intellisenseMenu},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"intellisenseProvider",{get:function(){return this._intellisenseProvider},enumerable:!0,configurable:!0}),n.prototype.initialize=function(n){this._isInitialized||(this.textEditorBridge.attach(n),this.intellisenseMenu.attach(this.textEditorBridge),this.intellisenseProvider.attach(this),this._isInitialized=!0)},n.prototype.uninitialize=function(){this._isInitialized&&(this._isInitialized=!1,this._events&&this._events.removeEventListener("deactivated",this._deactivationHandler),this.intellisenseProvider.detach(),this.intellisenseMenu.detach(),this.textEditorBridge.detach())},n}();n.IntellisenseContext=t})(t=n.Intellisense||(n.Intellisense={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){"use strict";var i=function(){function t(){var n=this;this._lastSelectionLength=-1;this._lastCaretPosition=-1;this._timerFunction=function(){return n.timer_elapsed()}}return Object.defineProperty(t.prototype,"onTextChanged",{get:function(){return this._onTextChanged},set:function(n){this._onTextChanged=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onCaptureKeyDown",{get:function(){return this._onCaptureKeyDown},set:function(n){this._onCaptureKeyDown=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onBlur",{get:function(){return this._onBlur},set:function(n){this._onBlur=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onCaretPositionChanged",{get:function(){return this._onCaretPositionChanged},set:function(n){this._onCaretPositionChanged=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onSelectionLengthChanged",{get:function(){return this._onSelectionLengthChanged},set:function(n){this._onSelectionLengthChanged=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onMenuRequested",{get:function(){return this._onMenuRequested},set:function(n){this._onMenuRequested=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"caretPosition",{get:function(){if(this._editor)try{return this._editor.selectionEnd}catch(n){return-1}return-1},set:function(t){if(this._editor&&n.ToolWindowHelpers.nodeInDocument(this._editor)){var i=this.caretPosition!==t;this._editor.setSelectionRange(t,t);i&&this.fireCaretPositionChanged()}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectionLength",{get:function(){if(this._editor)try{return this._editor.selectionEnd-this._editor.selectionStart}catch(n){return-1}return-1},set:function(t){if(this._editor&&n.ToolWindowHelpers.nodeInDocument(this._editor)){this._editor.setSelectionRange(this._editor.selectionStart,this._editor.selectionStart+t);var i=this._lastSelectionLength!==this.selectionLength;this._lastSelectionLength=this.selectionLength;i&&this.fireSelectionLengthChanged()}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"text",{get:function(){return this._editor?this._editor.value:null},set:function(n){this._editor&&(this._editor.value=n)},enumerable:!0,configurable:!0}),t.prototype.getPlacementTarget=function(t){var i;if(this._editor){if((!this._lastPlacementTarget||this._lastPlacementTargetIndex!==t)&&(this._lastPlacementTarget=n.ToolWindowHelpers.getCharScreenPosition(this._editor,t),this._lastPlacementTargetIndex=t,i=this._editor.getBoundingClientRect(),this._lastPlacementTarget.right<i.left||this._lastPlacementTarget.right>i.right||this._lastPlacementTarget.top<i.top||this._lastPlacementTarget.bottom>i.bottom)){var r=Math.max(this._lastPlacementTarget.top,i.top),u=Math.min(this._lastPlacementTarget.bottom,i.bottom),f=Math.max(Math.min(this._lastPlacementTarget.right,i.right),i.left);this._lastPlacementTarget={top:r,bottom:u,right:f,left:f,height:u-r,width:0}}return this._lastPlacementTarget}return null},t.prototype.attach=function(n){var i=this;return(this._editor=t.validateTextEditorElement(n),this._editor)?(this._isAttached=!0,this._inputHandler=function(n){i.editor_input(n)},this._editor.addEventListener("input",this._inputHandler),this._blurHandler=function(n){i.editor_blur(n)},this._editor.addEventListener("blur",this._blurHandler),this._focusHandler=function(n){i.editor_focus(n)},this._editor.addEventListener("focus",this._focusHandler),this._captureKeyDownHandler=function(n){i.editor_captureKeyDown(n)},this._editor.addEventListener("keydown",this._captureKeyDownHandler,!0),this._editor.setAttribute("aria-autocomplete","list"),this._editor.setAttribute("aria-haspopup","true"),document.activeElement===this._editor&&this.startTimer(),!0):!1},t.prototype.detach=function(){this._isAttached&&(this._isAttached=!1,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,!0),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())},t.prototype.insertText=function(t,i,r){var u=document.queryCommandSupported("ms-beginUndoUnit");u&&document.execCommand("ms-beginUndoUnit");this._editor.value=n.ToolWindowHelpers.replaceTextInRange(this._editor.value,t,i,r);this.caretPosition=t+r.length;u&&document.execCommand("ms-endUndoUnit")},t.prototype.setActiveDescendant=function(n){n?this._editor.setAttribute("aria-activedescendant",n):this._editor.removeAttribute("aria-activedescendant")},t.prototype.setListBox=function(n){n?this._editor.setAttribute("aria-controls",n):this._editor.removeAttribute("aria-controls")},t.prototype.focusEditor=function(){this._editor.focus()},t.validateTextEditorElement=function(n){var i=n,t=i;return typeof t.selectionStart=="undefined"||typeof t.selectionEnd=="undefined"||typeof t.setSelectionRange=="undefined"||typeof t.value=="undefined"?null:i},t.prototype.startTimer=function(){this._timerActivated||(this._timerId=window.setInterval(this._timerFunction,t.TIMER_INTERVAL),this._timerActivated=!0)},t.prototype.resetTimer=function(){this._timerActivated&&(this.stopTimer(),this.startTimer())},t.prototype.stopTimer=function(){this._timerActivated&&(this._timerActivated=!1,window.clearInterval(this._timerId))},t.prototype.timer_elapsed=function(){(this._lastCaretPosition!==this.caretPosition||this._lastSelectionLength!==this.selectionLength||this._lastEditorValue!==this._editor.value)&&(this.stopTimer(),this._isAttached&&(this._lastEditorValue!==this._editor.value&&(this.fireTextChanged(),this._lastEditorValue=this._editor.value),this._lastCaretPosition!==this.caretPosition&&(this.fireCaretPositionChanged(),this._lastCaretPosition=this.caretPosition),this._lastSelectionLength!==this.selectionLength&&(this.fireSelectionLengthChanged(),this._lastSelectionLength=this.selectionLength)),this.startTimer())},t.prototype.editor_input=function(){this.resetTimer()},t.prototype.editor_captureKeyDown=function(n){if(n.keyCode===32&&n.ctrlKey){this.fireMenuRequested();n.preventDefault();return}(n.keyCode===13||n.keyCode===9||n.keyCode===27)&&this.timer_elapsed();this._onCaptureKeyDown&&this._onCaptureKeyDown(n)},t.prototype.editor_blur=function(){this.fireOnBlur()},t.prototype.editor_focus=function(){this.startTimer()},t.prototype.fireOnBlur=function(){this.stopTimer();this._lastPlacementTarget=null;this._onBlur&&this._onBlur()},t.prototype.fireTextChanged=function(){this._lastPlacementTarget=null;this._onTextChanged&&this._onTextChanged(this._editor.value)},t.prototype.fireCaretPositionChanged=function(){this._lastPlacementTarget=null;this._onCaretPositionChanged&&this._onCaretPositionChanged(this.caretPosition)},t.prototype.fireSelectionLengthChanged=function(){this._onSelectionLengthChanged&&this._onSelectionLengthChanged(this.selectionLength)},t.prototype.fireMenuRequested=function(){this._onMenuRequested&&this._onMenuRequested()},t.TIMER_INTERVAL=100,t}();t.InputElementTextEditorBridge=i})(t=n.Intellisense||(n.Intellisense={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=function(){function t(i,r,u,f,e,o,s,h){var c=this;this._listBox=new n.IntellisenseListBox(i,r,u,s);this._listBox.rootElement.style.position="absolute";this._listBox.rootElement.style.display="none";this._isAttached=!1;this._placementTargetIndex=0;this._isDeferringLayout=!1;this._suppressMenu=!1;this._alreadyForcedOpen=!1;this._ignoreCommit=!1;this._willMenuBeOpen=!1;this._maxMenuItems=f?f:t.MAX_MENU_ITEMS;this._resizeListener=function(){c._resizeListenerHasFired=!0;c._windowInnerHeight=window.innerHeight;c._windowInnerWidth=window.innerWidth;c._toolbarOffsetHeight=0;c._listBoxOffsetWidthIsStale=!0;c._listBoxOffsetHeightIsStale=!0;var n=document.getElementById("toolbar");n&&(c._toolbarOffsetHeight=n.offsetHeight)};this._resizeListenerHasFired=!1;window.addEventListener("resize",this._resizeListener);this._autoSuppressMenuEnabled=e?!0:!1;this._showAllOptionsWhenNoMatch=h;this._traceProvider=o;this._currentEtwKey=-1}return Object.defineProperty(t.prototype,"placementTargetIndex",{get:function(){return this._placementTargetIndex},set:function(n){this._placementTargetIndex=n;this._lastTextEditorPlacementTarget=null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentEtwKey",{get:function(){return this._currentEtwKey},set:function(n){this._currentEtwKey=n;this._listBox.currentEtwKey=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._isAttached},set:function(n){this._willMenuBeOpen=n;n!==this.isOpen&&(n&&!this.suppressMenu?this.show():(this.hide(),this._alreadyForcedOpen=!1))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasSelection",{get:function(){return this.isOpen&&!this.isDeferringLayout&&!this._ignoreCommit&&!!this._selectedOption},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentSelection",{get:function(){return this._selectedOption},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"intellisenseChoices",{get:function(){return this._listBox?this._options:[]},set:function(n){this._options=n;this._filteredOptions=n;this._selectedOption=null;this.listBoxListItems=null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"filteredIntellisenseChoices",{get:function(){return this._filteredOptions},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"willIntellisenseMenuBeOpen",{get:function(){return this._willMenuBeOpen},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"menuListBox",{get:function(){return this._listBox},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onClosing",{get:function(){return this._onClosing},set:function(n){this._onClosing=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onOpened",{get:function(){return this._onOpened},set:function(n){this._onOpened=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onChoiceCommitted",{get:function(){return this._onChoiceCommitted},set:function(n){this._onChoiceCommitted=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onSelectionChanged",{get:function(){return this._onSelectionChanged},set:function(n){this._onSelectionChanged=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"forbiddenBottomLeftRect",{get:function(){return this._forbiddenBottomLeftRect},set:function(n){this._forbiddenBottomLeftRect=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"suppressMenu",{get:function(){return this._suppressMenu&&this._autoSuppressMenuEnabled},set:function(n){this._suppressMenu=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDeferringLayout",{get:function(){return this._isDeferringLayout},set:function(n){n?(this.stopDeferredRenderTimer(),this.startDeferredRenderTimer()):this.stopDeferredRenderTimer()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"listBoxListItems",{get:function(){return this._listBox.listItems},set:function(n){this._listBox.listItems=n;this._listBoxOffsetWidthIsStale=!0;this._listBoxOffsetHeightIsStale=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"listBoxOffsetWidth",{get:function(){return this._listBoxOffsetWidthIsStale&&(this._listBoxOffsetWidth=this._listBox.rootElement.offsetWidth,this._listBoxOffsetWidthIsStale=!1),this._listBoxOffsetWidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"listBoxOffsetHeight",{get:function(){return this._listBoxOffsetHeightIsStale&&(this._listBoxOffsetHeight=this._listBox.rootElement.offsetHeight,this._listBoxOffsetHeightIsStale=!1),this._listBoxOffsetHeight},enumerable:!0,configurable:!0}),t.prototype.forceOpen=function(){this._filteredOptions&&this._filteredOptions.length>0&&(this.suppressMenu=!1,this.isOpen=!0,this.listBoxListItems=this._filteredOptions,this.isDeferringLayout=!1,this.updateLayout(!this._alreadyForcedOpen),this.updateListBoxSelection(),this._alreadyForcedOpen=!0)},t.prototype.attach=function(n){var t=this;this._textEditorBridge||(document.body.appendChild(this._listBox.rootElement),this._textEditorBridge=n,this._textEditorBridge.onBlur=function(){return t.textEditorBridge_blur()});this._textEditorBridge.setListBox(this._listBox.rootElement.id)},t.prototype.detach=function(){this._textEditorBridge&&(this.isOpen=!1,this._textEditorBridge.onBlur=null,this._textEditorBridge.setListBox(null),this._textEditorBridge=null,document.body.removeChild(this._listBox.rootElement))},t.prototype.setFilter=function(n){var t=this;return(this.fireSetFilterStartEvent(),this.setSelectedAndFilteredOptions(n),this.fireSetFilterEndEvent(),this._filteredOptions.length>this._maxMenuItems)?(this._willMenuBeOpen=!0,this.isDeferringLayout=!0,this._filteredOptions):this._filteredOptions.length===1&&this._selectedOption&&this._selectedOption.text===n?(this._willMenuBeOpen=!1,window.setImmediate(function(){return t.isOpen=!1}),this._filteredOptions):(this._willMenuBeOpen=!0,this.listBoxListItems=this._filteredOptions,this.updateLayout(this.isDeferringLayout),this.isDeferringLayout=!1,this.updateListBoxSelection(),this._filteredOptions)},t.prototype.getTextEditorPlacementTarget=function(n){return(!this._lastTextEditorPlacementTarget||n)&&(this._lastTextEditorPlacementTarget=this._textEditorBridge.getPlacementTarget(this.placementTargetIndex)),this._lastTextEditorPlacementTarget},t.prototype.startDeferredRenderTimer=function(){var i=this,n;this._isDeferringLayout||(n=this.currentEtwKey,this._deferredRenderTimerId=window.setTimeout(function(){return i.deferredRenderTimer_elapsed(n)},t.DEFERRED_RENDER_TIMER_INTERVAL),this._ignoreCommit=!0,this._isDeferringLayout=!0)},t.prototype.stopDeferredRenderTimer=function(){this._isDeferringLayout&&(this._ignoreCommit=!1,this._isDeferringLayout=!1,window.clearTimeout(this._deferredRenderTimerId))},t.prototype.deferredRenderTimer_elapsed=function(n){var i=this;this._isDeferringLayout=!1;this.currentEtwKey=n;this.isOpen&&(this.forceOpen(),window.setTimeout(function(){return i._ignoreCommit=!1},t.DEFERRED_RENDER_TIMER_INTERVAL))},t.prototype.updateListBoxSelection=function(){this._selectedOption?(this._listBox.selectedItem=this._selectedOption,this._listBox.scrollIntoView(this._selectedOption,!1)):this.listBoxListItems.length>0&&(this._listBox.selectedIndex=-1,this._listBox.scrollIntoView(this.listBoxListItems[0],!1))},t.prototype.setSelectedAndFilteredOptions=function(n){var r,t,i;if(n&&n.length!==0&&this._options)if(r=n.toUpperCase(),t=this._options.filter(function(n){return n.optionName.toUpperCase().indexOf(r)!==-1},this),t.length>0){if(this._filteredOptions=t,i=this.getMatchingOption(t,n,!0),i<0&&(i=this.getMatchingOption(t,n,!1),i<0)){this._selectedOption=null;return}this._selectedOption=this._filteredOptions[i]}else this._showAllOptionsWhenNoMatch&&(this._filteredOptions=this._options),this._selectedOption=null},t.prototype.getMatchingOption=function(n,t,i){for(var u,f=i?t:t.toUpperCase(),r=0;r<n.length;++r)if(u=i?n[r].optionName:n[r].optionName.toUpperCase(),u.indexOf(f)===0)return r;return-1},t.prototype.textEditorBridge_blur=function(){document.activeElement!==this._listBox.rootElement?this.hide():document.activeElement===this._listBox.rootElement&&this._textEditorBridge.focusEditor()},t.prototype.updateLayout=function(n){var a,e,c,o,l;if(this.isOpen&&this.listBoxListItems&&this.listBoxListItems.length!==0){this.fireUpdateLayoutStartEvent();a=this._listBox.rootElement.style.left;this._resizeListenerHasFired||this._resizeListener();var r=this.getTextEditorPlacementTarget(n),f=r.right,i=r.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=t.MIN_MENU_WIDTH+"px";this._listBox.rootElement.style.maxHeight=t.MAX_MENU_HEIGHT+"px";var h=this.listBoxOffsetHeight,u=this.listBoxOffsetWidth,s=0;this._forbiddenBottomLeftRect&&(s=this._forbiddenBottomLeftRect.top-i<h?this._forbiddenBottomLeftRect.width:0);e=this._windowInnerHeight-i-2;r.top>e?(i=r.top-h,i<this._toolbarOffsetHeight?(i=Math.max(r.top-t.MAX_MENU_HEIGHT,this._toolbarOffsetHeight),c=r.top-i,this._listBox.rootElement.style.top=i+"px",this._listBox.rootElement.style.maxHeight=c+"px"):this._listBox.rootElement.style.top=i+"px"):(this._listBox.rootElement.style.top=i+"px",e<t.MAX_MENU_HEIGHT&&(this._listBox.rootElement.style.maxHeight=e+"px"));f+u<this._windowInnerWidth?this._listBox.rootElement.style.left=f+"px":f-u>s?this._listBox.rootElement.style.left=f-u+"px":(o=Math.max(this._windowInnerWidth-u,s),l=Math.min(o+u,this._windowInnerWidth),this._listBox.rootElement.style.left=o+"px",this._listBox.rootElement.style.width=l-o+"px",this._listBox.rootElement.style.minWidth="");this._listBox.selectedItem&&this._listBox.scrollIntoView(this._listBox.selectedItem,!1);this.fireUpdateLayoutEndEvent()}},t.prototype.show=function(){var n=this;this._isAttached||(this._isAttached=!0,this.suppressMenu=!1,this.updateLayout(!0),this._listBox.intellisenseChoiceSelected=function(t,i){return n.listBox_intellisenseChoiceSelected(t,i)},this._listBox.selectedItemChanged=function(t){return n.listBox_selectedItemChanged(t)},this._textEditorBridge.onCaptureKeyDown=function(t){return n.editor_captureKeyDown(t)},this._listBox.rootElement.setAttribute("aria-expanded","true"),this._listBox.selectedItem&&this.listBox_selectedItemChanged(this._listBox.selectedItem),this._onOpened&&this._onOpened())},t.prototype.hide=function(){this._isAttached&&(this._isAttached=!1,this._willMenuBeOpen=!1,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"))},t.prototype.listBox_intellisenseChoiceSelected=function(n,t){this.fireValueCommitted(n,t)},t.prototype.listBox_selectedItemChanged=function(n){n&&(this._selectedOption=n,this._textEditorBridge.setActiveDescendant(this._listBox.itemContainers[n.index].rootElement.id),this._onSelectionChanged&&this._onSelectionChanged(n))},t.prototype.calculateListPageSize=function(){return Math.round(this.listBoxOffsetHeight/this._listBox.listItemHeight)},t.prototype.setListBoxSelectedIndex=function(n,t){n=Math.max(0,Math.min(this.listBoxListItems.length-1,n));this._listBox.selectedIndex=n;this._listBox.scrollIntoView(this._listBox.selectedItem,t)},t.prototype.editor_captureKeyDown=function(n){var t;if(!this.isDeferringLayout){if(n.keyCode===38){this.setListBoxSelectedIndex(this._listBox.selectedIndex-1,!0);n.stopImmediatePropagation();n.preventDefault();return}if(n.keyCode===40){this.setListBoxSelectedIndex(this._listBox.selectedIndex+1,!1);n.stopImmediatePropagation();n.preventDefault();return}if(n.keyCode===33){t=this.calculateListPageSize();this.setListBoxSelectedIndex(this._listBox.selectedIndex-t,!0);n.stopImmediatePropagation();n.preventDefault();return}if(n.keyCode===34){t=this.calculateListPageSize();this.setListBoxSelectedIndex(this._listBox.selectedIndex+t,!1);n.stopImmediatePropagation();n.preventDefault();return}if(n.keyCode===13){this.fireSelectedValueCommitted(1)&&(n.stopImmediatePropagation(),n.preventDefault());return}if(n.keyCode===9){this.fireSelectedValueCommitted(0)&&(n.stopImmediatePropagation(),n.preventDefault());return}if(n.keyCode===32){this.hide();return}if(n.keyCode===27){this.hide();n.preventDefault();n.stopImmediatePropagation();this.suppressMenu=!0;return}}},t.prototype.fireValueCommitted=function(n,t){return this._onChoiceCommitted&&n?(this._onChoiceCommitted(n,t),!0):!1},t.prototype.fireSelectedValueCommitted=function(n){return this._listBox&&this._listBox.selectedItem!==null?this.fireValueCommitted(this._listBox.selectedItem,n):!1},t.prototype.fireSetFilterStartEvent=function(){this._traceProvider&&this._traceProvider.fireSetFilterStartEvent(this.currentEtwKey)},t.prototype.fireSetFilterEndEvent=function(){this._traceProvider&&this._traceProvider.fireSetFilterEndEvent(this.currentEtwKey)},t.prototype.fireUpdateLayoutStartEvent=function(){this._traceProvider&&this._traceProvider.fireUpdateLayoutStartEvent(this.currentEtwKey)},t.prototype.fireUpdateLayoutEndEvent=function(){this._traceProvider&&this._traceProvider.fireUpdateLayoutEndEvent(this.currentEtwKey)},t.MAX_MENU_HEIGHT=300,t.MIN_MENU_WIDTH=200,t.MAX_MENU_ITEMS=50,t.DEFERRED_RENDER_TIMER_INTERVAL=200,t}();n.IntellisenseMenu=t})(t=n.Intellisense||(n.Intellisense={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var r=Microsoft.Plugin,t=function(){function n(){this._isCanceled=!1}return Object.defineProperty(n.prototype,"isCanceled",{get:function(){return this._isCanceled},enumerable:!0,configurable:!0}),n.prototype.cancel=function(){this._isCanceled=!0},n}(),i;n.GetIntellisenseChoicesCancelToken=t;i=function(){function n(){this._lastTextValue="";this._lastSearchExpression="";this._searchExpressionUpdated=!1;this._currentSearchToken="";this._currentSearchTokenStart=-1;this._currentSearchTokenEnd=-1;this._currentIntellisenseChoicesPromise=null;this._menuShouldOpenAfterPromiseCompletes=!1;this._currentIntellisenseChoices=null;this._performingCommit=!1;this._nextETWKey=0}return Object.defineProperty(n.prototype,"textEditorBridge",{get:function(){return this._intellisenseContext.textEditorBridge},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"intellisenseMenu",{get:function(){return this._intellisenseContext.intellisenseMenu},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"currentSearchToken",{get:function(){return this._currentSearchToken},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"currentSearchTokenStart",{get:function(){return this._currentSearchTokenStart},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"currentSearchTokenEnd",{get:function(){return this._currentSearchTokenEnd},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"onIntellisenseResultsAvailable",{get:function(){return this._onIntellisenseResultsAvailable},set:function(n){this._onIntellisenseResultsAvailable=n},enumerable:!0,configurable:!0}),n.prototype.setCurrentIntellisenseChoices=function(n){this._currentIntellisenseChoices=n},n.prototype.attach=function(n){var t=this;this._intellisenseContext=n;this.textEditorBridge.onTextChanged=function(n){return t.textEditorBridge_textChanged(n)};this.textEditorBridge.onCaretPositionChanged=function(n){return t.textEditorBridge_caretPositionChanged(n)};this.textEditorBridge.onSelectionLengthChanged=function(n){return t.textEditorBridge_selectionLengthChanged(n)};this.textEditorBridge.onMenuRequested=function(){return t.textEditorBridge_menuRequested()};this.intellisenseMenu.onSelectionChanged=function(n){return t.intellisenseMenu_selectionChanged(n)};this.intellisenseMenu.onChoiceCommitted=function(n,i){return t.intellisenseMenu_choiceCommitted(n,i)};this.intellisenseMenu.onClosing=function(){return t.intellisenseMenu_closing()};this._lastTextValue=this.textEditorBridge.text},n.prototype.detach=function(){this._currentIntellisenseChoicesPromise&&(this._currentIntellisenseChoicesPromise.cancel(),this._currentIntellisenseChoicesPromise=null,this._menuShouldOpenAfterPromiseCompletes=!1);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},n.prototype.getCurrentFilteredIntellisenseCompletionList=function(){return this._currentIntellisenseChoices&&this._currentIntellisenseChoices.length>0?this.intellisenseMenu.filteredIntellisenseChoices:[]},n.prototype.clearLastValues=function(){this._currentSearchToken="";this._currentSearchTokenStart=-1;this._currentSearchTokenEnd=-1;this._currentIntellisenseChoices=null;this._lastTextValue=""},n.prototype.getCurrentExpression=function(t,i,r){var f,p,a,v,s,y,c,w;r===void 0&&(r=-1);this.fireGetCurrentExpressionStartEvent(r);var u=t.substr(0,i),b=t.substr(i),l={text:"",offset:i},e=!1,o=!1,h=!1;if(u&&u.length>0){for(f=0;f<u.length;++f)p=e||o,u[f]==="\\"&&p?h=!0:(u[f]!=="'"||h?u[f]!=='"'||h||(o=!e&&!o):e=!e&&!o,h=!1);if(e||o)return this.fireGetCurrentExpressionEndEvent(r),l}return(a=u.match(/var\s+\S+$/),a&&a.length>0)?(this.fireGetCurrentExpressionEndEvent(r),l):(v=u.match(n.JAVASCRIPT_BEGIN_EXPRESSION_REGEX),s="",v&&(s=v[0]),y=b.match(n.JAVASCRIPT_END_EXPRESSION_REGEX),c="",y&&(c=y[0]),w=s+c,w.match(/^\d/))?(this.fireGetCurrentExpressionEndEvent(r),l):(this.fireGetCurrentExpressionEndEvent(r),{text:s+c,offset:u.length-s.length})},n.prototype.getSearchTokenFromFullExpression=function(t){var i={text:"",offset:t.length},r=t.match(n.JAVASCRIPT_BEGIN_SEARCH_TOKEN_REGEX);return r&&r.length>0?(i.text=r[0],i.offset=t.length-i.text.length,i):i},n.prototype.getIntellisenseChoices=function(n,t){t(null)},n.prototype.onMenuSelectionChanged=function(){},n.prototype.onMenuChoiceCommitted=function(n){this.textEditorBridge.insertText(this.currentSearchTokenStart,this.currentSearchTokenEnd,n.text)},n.prototype.onMenuClosing=function(){},n.prototype.fireGetCurrentExpressionStartEvent=function(){},n.prototype.fireGetCurrentExpressionEndEvent=function(){},n.prototype.fireUpdateIntellisenseStartEvent=function(){},n.prototype.fireUpdateIntellisenseEndEvent=function(){},n.prototype.completePromiseResults=function(n,t){this._currentIntellisenseChoicesPromise=null;this._menuShouldOpenAfterPromiseCompletes=!1;this._currentIntellisenseChoices=n;t||(t=this._etwKey);this.updateMenu(this._text,this._searchTokenUpdated,this._menuWillBeOpen,this._forceMenuOpen,t)},n.prototype.getIntellisenseChoicesAsync=function(n,i){var u=this,f=new t;return new r.Promise(function(t){u.getIntellisenseChoices(n,t,f,i)},function(){f.cancel();u.fireUpdateIntellisenseEndEvent(i)})},n.prototype.updateIntellisense=function(n,t,i){var y=this,u,r,l,a,c,v,e;if(i===void 0&&(i=!1),!this._performingCommit){if(u=this._nextETWKey++,r=this.getCurrentExpression(n,t,u),r.text.length>0||i){this.fireUpdateIntellisenseStartEvent(u);var f=this.getSearchTokenFromFullExpression(r.text),o=f.text!==this._currentSearchToken||i,p=!f.text.match("^"+this._currentSearchToken)&&!this._currentSearchToken.match("^"+f.text)||f.text.length===1;this._currentSearchToken=f.text;this._currentSearchTokenEnd=r.offset+r.text.length;this._currentSearchTokenStart=this._currentSearchTokenEnd-this._currentSearchToken.length;var s=r.text.substr(0,f.offset-1),w=o&&p||this._lastSearchExpression!==s,h=this._searchExpressionUpdated;this._searchExpressionUpdated=!1;l=this.intellisenseMenu.isOpen;a=this._menuShouldOpenAfterPromiseCompletes;(w||!this._currentIntellisenseChoices)&&(this._currentIntellisenseChoicesPromise&&(this._currentIntellisenseChoicesPromise.cancel(),this._currentIntellisenseChoicesPromise=null,this._menuShouldOpenAfterPromiseCompletes=!1),this.intellisenseMenu.isOpen=!1,this.intellisenseMenu.placementTargetIndex=this.currentSearchTokenStart,r.text.indexOf(".")!==0&&r.text.indexOf("..")<0&&(this._currentIntellisenseChoicesPromise=this.getIntellisenseChoicesAsync(s,u),this._lastSearchExpression=s,h=!0));c=!1;t>0&&n.length>=t&&(v=n[t-1],c=!!v.match(/\s/));e=this.intellisenseMenu.isOpen||l||a||i;this._lastTextValue.length===n.length-1&&!c&&(this._currentSearchToken.length===1||h)?e=!0:this._searchExpressionUpdated=h;this._text=n;this._searchTokenUpdated=o;this._menuWillBeOpen=e;this._forceMenuOpen=i;this._etwKey=u;this._currentIntellisenseChoicesPromise?(this._menuShouldOpenAfterPromiseCompletes=e,this._currentIntellisenseChoicesPromise.done(function(n){y.completePromiseResults(n,u)})):this.updateMenu(n,o,e,i,u)}else this.intellisenseMenu.isOpen=!1,this.intellisenseMenu.intellisenseChoices=null,this._currentSearchToken="",this._currentSearchTokenStart=-1,this._currentSearchTokenEnd=-1,this._currentIntellisenseChoices=null,this.fireOnIntellisenseResultsAvailable();this._lastTextValue=n}},n.prototype.updateMenu=function(t,i,r,u,f){this.intellisenseMenu.currentEtwKey=f;this._currentIntellisenseChoices&&this._currentIntellisenseChoices.length>0?(r&&(this.intellisenseMenu.intellisenseChoices!==this._currentIntellisenseChoices&&(this.intellisenseMenu.intellisenseChoices=this._currentIntellisenseChoices.filter(function(t){return!n.IGNORED_OPTIONS.some(function(n){return t.optionName===n})}),this._currentIntellisenseChoices=this.intellisenseMenu.intellisenseChoices,i=!0),i&&this.intellisenseMenu.setFilter(this._currentSearchToken),this.fireOnIntellisenseResultsAvailable()),u?this.intellisenseMenu.forceOpen():this.intellisenseMenu.isOpen=r):this.fireOnIntellisenseResultsAvailable();this.fireUpdateIntellisenseEndEvent(f)},n.prototype.fireOnIntellisenseResultsAvailable=function(){this._onIntellisenseResultsAvailable&&this._onIntellisenseResultsAvailable()},n.prototype.textEditorBridge_textChanged=function(n){this.updateIntellisense(n,this.textEditorBridge.caretPosition)},n.prototype.textEditorBridge_caretPositionChanged=function(n){this.textEditorBridge.selectionLength===0&&this.updateIntellisense(this.textEditorBridge.text,n)},n.prototype.textEditorBridge_selectionLengthChanged=function(n){n>0&&(this.intellisenseMenu.isOpen=!1)},n.prototype.textEditorBridge_menuRequested=function(){this.updateIntellisense(this.textEditorBridge.text,this.textEditorBridge.caretPosition,!0)},n.prototype.intellisenseMenu_selectionChanged=function(n){this.onMenuSelectionChanged(n)},n.prototype.intellisenseMenu_choiceCommitted=function(n,t){this._performingCommit=!0;this.onMenuChoiceCommitted(n,t);this.intellisenseMenu.isOpen=!1;this._lastTextValue=this.textEditorBridge.text;this.textEditorBridge.focusEditor();this._performingCommit=!1},n.prototype.intellisenseMenu_closing=function(){this.onMenuClosing()},n.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",n.JAVASCRIPT_BEGIN_EXPRESSION_REGEX=new RegExp("[\\."+n.VALID_JAVASCRIPT_VARIABLE_LETTERS+"]+$"),n.JAVASCRIPT_END_EXPRESSION_REGEX=new RegExp("^["+n.VALID_JAVASCRIPT_VARIABLE_LETTERS+"]+"),n.JAVASCRIPT_BEGIN_SEARCH_TOKEN_REGEX=new RegExp("["+n.VALID_JAVASCRIPT_VARIABLE_LETTERS+"]+$"),n.JAVASCRIPT_VALID_JS_VARIABLENAME_REGEX=new RegExp("^["+n.VALID_JAVASCRIPT_VARIABLE_LETTERS+"]+$"),n.EVAL_RESULT_NAME="__IE_DEVTOOLBAR_CONSOLE_EVAL_RESULT",n.EVAL_ERROR="__IE_DEVTOOLBAR_CONSOLE_EVAL_ERROR",n.EVAL_ERRORCODE="__IE_DEVTOOLBAR_CONSOLE_EVAL_ERRORCODE",n.IGNORED_OPTIONS=["__proto__",n.EVAL_RESULT_NAME,n.EVAL_ERROR,n.EVAL_ERRORCODE],n}();n.IntellisenseProviderBase=i})(t=n.Intellisense||(n.Intellisense={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=function(){function n(n){n===void 0&&(n=!0);this._breakUpFilterTextByWhitespace=n}return Object.defineProperty(n.prototype,"choices",{get:function(){return this._choices},set:function(n){this._choices=n;this._onIntellisenseResultsAvailable&&this._onIntellisenseResultsAvailable();this._intellisenseContext&&(this._intellisenseContext.intellisenseMenu.intellisenseChoices=n)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"onIntellisenseResultsAvailable",{get:function(){return this._onIntellisenseResultsAvailable},set:function(n){this._onIntellisenseResultsAvailable=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"onShouldOpenOnTextChange",{get:function(){return this._onShouldOpenOnTextChange},set:function(n){this._onShouldOpenOnTextChange=n},enumerable:!0,configurable:!0}),n.prototype.attach=function(n){var t=this;this._intellisenseContext=n;this._intellisenseContext.textEditorBridge.onTextChanged=function(n){return t.textEditorBridge_textChanged(n)};this._intellisenseContext.textEditorBridge.onCaretPositionChanged=function(n){return t.textEditorBridge_caretPositionChanged(n)};this._intellisenseContext.textEditorBridge.onSelectionLengthChanged=function(n){return t.textEditorBridge_selectionLengthChanged(n)};this._intellisenseContext.textEditorBridge.onMenuRequested=function(){return t.textEditorBridge_menuRequested()};this._intellisenseContext.intellisenseMenu.onChoiceCommitted=function(n,i){return t.intellisenseMenu_choiceCommitted(n,i)};this._intellisenseContext.intellisenseMenu.intellisenseChoices=this._choices},n.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},n.prototype.getCurrentFilteredIntellisenseCompletionList=function(){return this._intellisenseContext.intellisenseMenu.filteredIntellisenseChoices},n.prototype.clearLastValues=function(){},n.prototype.onMenuChoiceCommitted=function(n){this.closeMenu();this.insertText(this._token.leftIndex,this._token.rightIndex,n.text)},n.prototype.insertText=function(n,t,i){this._intellisenseContext.textEditorBridge.insertText(n,t,i)},n.prototype.updateIntellisense=function(n,t,i){this._token=this.findTokenWhereCaretResides(n,t);this.setFilter(this._token.text);i||this._choices&&this._choices.length>0&&this._token.text&&this._token.text.length>0&&(!this._onShouldOpenOnTextChange||this._onShouldOpenOnTextChange(n))?this.openMenu(i):this.closeMenu()},n.prototype.setFilter=function(n){this._intellisenseContext.intellisenseMenu.setFilter(n)},n.prototype.openMenu=function(n){n?this._intellisenseContext.intellisenseMenu.forceOpen():this._intellisenseContext.intellisenseMenu.isOpen=!0},n.prototype.closeMenu=function(){this._intellisenseContext.intellisenseMenu.isOpen=!1},n.isAtLeftEndOrHasWhiteSpaceToTheLeft=function(n,t){if(t<0)return!0;var i=n.charAt(t);return i===" "||i==="\t"},n.isAtRightEndOrHasWhiteSpaceToTheRight=function(n,t){if(t>=n.length)return!0;var i=n.charAt(t);return i===" "||i==="\t"},n.prototype.findTokenWhereCaretResides=function(t,i){var r,u;if(!this._breakUpFilterTextByWhitespace)return{leftIndex:0,rightIndex:t.length,text:t};for(r=i;!n.isAtLeftEndOrHasWhiteSpaceToTheLeft(t,r-1);)r--;for(u=i;!n.isAtRightEndOrHasWhiteSpaceToTheRight(t,u);)u++;return{leftIndex:r,rightIndex:u,text:t.substring(r,u)}},n.prototype.textEditorBridge_textChanged=function(n){this.updateIntellisense(n,this._intellisenseContext.textEditorBridge.caretPosition)},n.prototype.textEditorBridge_caretPositionChanged=function(n){this._intellisenseContext.textEditorBridge.selectionLength===0&&this.updateIntellisense(this._intellisenseContext.textEditorBridge.text,n)},n.prototype.textEditorBridge_selectionLengthChanged=function(n){n>0&&(this._intellisenseContext.intellisenseMenu.isOpen=!1)},n.prototype.textEditorBridge_menuRequested=function(){this.updateIntellisense(this._intellisenseContext.textEditorBridge.text,this._intellisenseContext.textEditorBridge.caretPosition,!0)},n.prototype.intellisenseMenu_choiceCommitted=function(n,t){this.onMenuChoiceCommitted(n,t)},n}();n.StaticContentProvider=t})(t=n.Intellisense||(n.Intellisense={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(){"use strict"})(t=n.Intellisense||(n.Intellisense={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(){"use strict"})(t=n.Intellisense||(n.Intellisense={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(){"use strict"})(t=n.Intellisense||(n.Intellisense={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){"use strict";var i=function(){function t(n){this._context=n}return t.evaluateProperty=function(n,i,r,u){var f=function(n,i){if(n)try{var u=t.getPagePropertyDescriptor(r,n,i);return u?u:f(r.Object.getPrototypeOf(n),i)}catch(e){return e.name==="TypeError"?{}:void 0}return n},e=function(n,t,i){if(i){if(typeof i.value!="undefined"&&i.value!==null)return i.value;var f=typeof n;if(f!=="object"&&f!=="function"&&(n=new r.Object(n)),i.isSafeGet)return u(n,t)}return};return n&&e(n,i,f(n,i))},t.getObjectContextPropertiesNames=function(t){var r=[],u,f,e,i,o;if(t.object!==null&&t.object!==undefined)for(u=typeof t.object,u!=="object"&&u!=="function"&&(t.object=new t.windowContext.Object(t.object)),f=n.RemoteHelpers.getValidWindow(t.windowContext,t.object),f.isValid&&(t.object=t.windowContext=f.window),e=t.windowContext.Object.getOwnPropertyNames(t.object),e&&(r=e),i=t.windowContext.Object.getPrototypeOf(t.object);i;)o=t.windowContext.Object.getOwnPropertyNames(i),r=Array.prototype.concat.call(r,o),i=t.windowContext.Object.getPrototypeOf(i);return r},t.prototype.getIntellisenseItemsForExpression=function(n){return this.getIntellisenseItemsForExpressionUsingWindowContext(n,this._context.currentWindowContext,this._context.currentWindowContext.window,[])},t.prototype.getIntellisenseItemsForExpressionUsingWindowContext=function(n,i,r,u){var f=this.getObjectContextForExpressionUsingEvaluator(n,i,r,t.evaluateProperty),e=n.length===0&&i===r;return this.getIntellisenseItemsForObjectContext(f,t.getObjectContextPropertiesNames,e,u)},t.getPagePropertyDescriptor=function(t,i,r){var u=function(n,t){var i,r;try{window.__BROWSERTOOLS_CONSOLE_INTELLISENSE_DESCRIPTOR=null;i=Object.getOwnPropertyDescriptor(n,t);i&&(r=!1,i.get&&/\[native code\]/.test(i.get.toString())?r=!0:typeof i.get=="undefined"&&(r=!0),window.__BROWSERTOOLS_CONSOLE_INTELLISENSE_DESCRIPTOR={value:i.value,isSafeGet:r})}catch(u){}};try{return n.RemoteHelpers.executeScript("window.__BROWSERTOOLS_CONSOLE_INTELLISENSE_GET_DESCRIPTOR = "+u.toString(),t,!0),t.__BROWSERTOOLS_CONSOLE_INTELLISENSE_GET_DESCRIPTOR(i,r),t.__BROWSERTOOLS_CONSOLE_INTELLISENSE_DESCRIPTOR}catch(f){return new t.Object(null)}},t.prototype.getObjectContextForExpressionUsingEvaluator=function(t,i,r,u){for(var s,o,e=t.split("."),f=0;f<e.length&&e[f].length>0;++f)s=n.PropertyEvaluationIgnoreList.propertyEvaluationFunction(i,r),r=u(r,e[f],i,s),o=n.RemoteHelpers.getValidWindow(i,r),o.isValid&&(r=i=o.window);return{object:r,windowContext:i}},t.prototype.elementHasId=function(n){return Object.getOwnPropertyDescriptor(n,"id")?!1:typeof n.id!="string"?!1:n.id!==""},t.prototype.getGlobalElementNames=function(n){var t=this,i=n.windowContext.document.querySelectorAll("[id]"),r=Array.prototype.filter.call(i,function(n){return t.elementHasId(n)});return Array.prototype.map.call(r,function(n){return""+n.id})},t.prototype.getIntellisenseItemsForObjectContext=function(n,i,r,u){var e=i(n),o,h,s,f;for(r&&(e=Array.prototype.concat.call(e,t.JSKeywords),e=Array.prototype.concat.call(e,u),e=Array.prototype.concat.call(e,this.getGlobalElementNames(n))),o=[],f=0,h=e.length;f<h;f++)String.prototype.match.call(e[f],/^\d/)||o.push({name:e[f],info:""});for(s=function(n,t){return n<t?-1:n>t?1:0},o=Array.prototype.sort.call(o,function(n,t){var i=s(n.name.toLowerCase(),t.name.toLowerCase());return i===0?s(t.name,n.name):i}),f=1;f<o.length;)o[f-1].name===o[f].name?o.splice(f,1):f++;return{choices:o}},t.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","$","$$"],t}();t.IntellisenseRemoteHelpers=i})(t=n.Intellisense||(n.Intellisense={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){"use strict";var r=Microsoft.Plugin,u=function(){function n(){this._cellOffset=0;this._rowHeight=0;this._unitEx=0}return Object.defineProperty(n.prototype,"cellOffset",{get:function(){return this._cellOffset},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"rowHeight",{get:function(){return this._rowHeight},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"unitEx",{get:function(){return this._unitEx},enumerable:!0,configurable:!0}),n.prototype.update=function(n){var t=i.createElement("div","listview-grid"),r,u,f;t.style.display="block";t.style.position="absolute";t.style.left="-5000px";t.style.top="-5000px";t.style.width="1000px";t.style.height="500px";(n||document.body).appendChild(t);r=i.createElement("div","listview-grid-row grid-row-normal");r.tabIndex=-1;r.setAttribute("role","listitem");t.appendChild(r);u=i.createElement("div","listview-grid-cell");u.style.width="100px";u.innerText="1";r.appendChild(u);this._rowHeight=r.offsetHeight;this._cellOffset=u.offsetWidth-100;f=i.createElement("div");f.style.overflow="hidden";f.style.width="1em";f.style.height="1ex";u.appendChild(f);this._unitEx=f.offsetHeight;(n||document.body).removeChild(t)},n}(),i,f;t.Measurements=u,function(n){function t(n,t){var i=document.createElement(n);return t&&(i.className=t),i}function i(n,t,i){for(var u=i||document.body,r=n;r&&r!==u;){if(r.msMatchesSelector(t))return r;r=r.parentElement}return null}n.createElement=t;n.findClosestElement=i}(i=t.DomHelpers||(t.DomHelpers={}));f=function(){function t(n,i,r,u,f,e){this._isTabbingOut=!1;this._delayedRenderRequestCount=0;this._containerElement=n;this._toggleCallback=i;this._selectCallback=r;this._editCallback=u;this._clickCallback=f;this._nameColumnWidth=t.DefaultColumnSize;this._isInitialResize=!0;this._autoScrollEnabled=!0;this._scrollPadding=5;this._hasIndent=!0;this._renderFunction=e;this._renderFunction||(this._renderFunction=function(n,t,i){return window.setTimeout(n,t,i)});this.initialize()}return Object.defineProperty(t.prototype,"onUpdated",{get:function(){return this._onUpdated},set:function(n){this._onUpdated=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"postRenderCallback",{get:function(){return this._postRenderCallback},set:function(n){this._postRenderCallback=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"notifyToggleCallback",{get:function(){return this._notifyToggleCallback},set:function(n){this._notifyToggleCallback=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scrollPadding",{get:function(){return this._scrollPadding},set:function(n){this._scrollPadding=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasIndent",{get:function(){return this._hasIndent},set:function(n){this._hasIndent=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onBeforeRendering",{get:function(){return this._onBeforeRendering},set:function(n){this._onBeforeRendering=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onRendered",{get:function(){return this._onRendered},set:function(n){this._onRendered=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onBeforeItemToggle",{get:function(){return this._onBeforeItemToggle},set:function(n){this._onBeforeItemToggle=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onItemToggled",{get:function(){return this._onItemToggled},set:function(n){this._onItemToggled=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onBeforeScroll",{get:function(){return this._onBeforeScroll},set:function(n){this._onBeforeScroll=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onScrollCompleted",{get:function(){return this._onScrollCompleted},set:function(n){this._onScrollCompleted=n},enumerable:!0,configurable:!0}),t.prototype.resize=function(){this.onResize(null)},t.prototype.addItems=function(n,t,i,r,u){var g=this,e=null,v=null,y=null,s=0,o=0,c,h,w,b,l,a,k,p,f,d;for(F12.Tools.Utility.Assert.isFalse(u&&!i,"addBeforeSibling (true) can only be used with linkAsSiblings (true) in objectTreeView addItems"),c=[],h=[],f=0;f<n.length;f++)if(n[f].isStale=t&&t.isStale,n[f].additionalClass==="consoleItemInput"&&(this._autoScrollEnabled=!0),f>0?w=n[f-1]:this._filteredList&&this._filteredList.length>0&&(w=this.getItem(this._filteredList.length-1)),b=(!this._filter||this._filter(n[f]))&&this.separatorFilter(n[f],w),l=n[f].id,n[f].htmlLines&&n[f].htmlLines.length>0)for(a=0;a<n[f].htmlLines.length;a++)c.push(l+"::"+a),b&&h.push(l+"::"+a);else c.push(l),b&&h.push(l);for(t&&(e=this._dataContextMap[t.id],v=e,i&&(e=v.parentContext)),e||v?(k=v.item,s=this.getIndexOfItem(this._unfilteredList,k)+1,o=this.getIndexOfItem(this._filteredList,k)+1,i?u&&(s-=1,o-=1,F12.Tools.Utility.Assert.isTrue(s>=0),F12.Tools.Utility.Assert.isTrue(o>=0),s<0&&(s=0),o<0&&(o=0)):(s+=e?e.descendantCount:0,o+=e?e.expandedCount:0),e&&(e.children=(e.children||[]).concat(n),this.updateContextCounts(e,c.length,h.length)),p=o-1,p+h.length>=this._currentViewport.last-this._scrollPadding-1&&(y=h.length+1<this._currentViewport.unboundLast-this._currentViewport.unboundFirst-this._scrollPadding*2?{index:p+h.length,top:!1}:{index:p,top:!0})):(s=this._unfilteredList.length,o=this._filteredList.length),f=0;f<n.length;f++)d=n[f].htmlLines&&n[f].htmlLines.length>0?n[f].htmlLines.length-1:0,this._dataContextMap[n[f].id]={item:n[f],children:[],parentContext:e,descendantCount:d,expandedCount:d};this._unfilteredList.length===0||s===this._unfilteredList.length?this._unfilteredList=this._unfilteredList.concat(c):this.spliceArray(this._unfilteredList,c,s);this._filteredList.length===0||o===this._filteredList.length?this._filteredList=this._filteredList.concat(h):this.spliceArray(this._filteredList,h,o);this.requestRender(!0);!r&&y&&(this._delayedScrollFunction=function(){g.scrollIndexIntoView(y.index,y.top)})},t.prototype.updateItemLines=function(n,t){var o=n.id,s=this.getIndexOfItem(this._unfilteredList,n),e=this.getIndexOfItem(this._filteredList,n),r,u,i,f;if(s>=0){for(r=[],u=[],i=0;i<n.htmlLines.length;i++)r.push(o+"::"+i),e>=0&&u.push(o+"::"+i);f=[s,t].concat(r);Array.prototype.splice.apply(this._unfilteredList,f);e>=0&&(f=[e,t].concat(u),Array.prototype.splice.apply(this._filteredList,f));this.updateContextCounts(this._dataContextMap[n.id],r.length-t,u.length-t)}this.requestRender(!0)},t.prototype.selectItem=function(n,t){var e=this,f,u,i,r;if(t===void 0&&(t=!0),this._delayedRenderCookie)return this._delayedSelectFunction=function(){return e.selectItem(n,t)},!1;for(f=this._gridElement.querySelectorAll(".listview-grid-row"),u=0;u<f.length;u++)if(r=f.item(u),i=parseInt(r.getAttribute("data-index"),10),this.getItem(i)===n&&(!n.htmlLines||this.getLineIndex(this._filteredList[i])===0))return this.selectRow(r,t,!1),!0;return(i=this.getIndexOfItem(this._filteredList,n,!1),i>-1&&(this.scrollIndexIntoView(i,!0),r=document.getElementById("row_"+i),r))?(this.selectRow(r,t,!1),!0):!1},t.prototype.markItemsAsStale=function(n,t){for(var i=0,u=this._unfilteredList.length;i<u;i++){var e=this.getItemId(this._unfilteredList[i]),f=this._dataContextMap[e].item,r=f.target;r&&(f.isStale=n?r.targetId===n:r.engineId===t)}this.requestRender(!0)},t.prototype.selectRow=function(n,t,i){var r=this,f,u;if(i===void 0&&(i=!0),n&&n.classList.contains("listview-grid-row")&&(u=parseInt(n.getAttribute("data-index"),10),u!==this._selectedIndex||t)){if(this._selectedIndex=u,this._selectedRow=n,f=this.getLineIndex(this._filteredList[this._selectedIndex]),f>=1&&i){u=this._selectedIndex-f;this.selectItem(this.getItem(u));return}this._delayedSelectCookie&&window.clearTimeout(this._delayedSelectCookie);this._delayedSelectCookie=window.setTimeout(function(){var f,u,n,i,e;if(r._selectedRow){for(f=r._gridElement.querySelectorAll(".listview-grid-row-selected"),u=0;u<f.length;u++)f.item(u).classList.remove("listview-grid-row-selected");if(n=r.getItem(r._selectedIndex),!n){r._delayedSelectCookie=null;return}for(i=r._selectedRow,e=0;e<(n.htmlLines?n.htmlLines.length:1)&&i;)i.classList.add("listview-grid-row-selected"),i=i.nextSibling,e++;t||r.isFocusWithin()?r._selectedRow.focus():r.scrollIndexIntoView(r._selectedIndex);r.updateGroupLine();r._selectCallback&&r._selectCallback(n)}r._delayedSelectCookie=null},10)}},t.prototype.toggleRow=function(n){var t=parseInt(n.getAttribute("data-index"),10),i;isNaN(t)||(i=n.querySelector(".listview-icon-tree"),i&&this.toggleRowAt(t))},t.prototype.setRowState=function(n,i){var r=this.getItem(n),f,u;r&&(f=this._dataContextMap[r.id],u=f.descendantCount<=(r.htmlLines?r.htmlLines.length-1:0),(i===t.EXPAND_ROW&&u||i===t.COLLAPSE_ROW&&!u)&&this.toggleRowAt(n))},t.prototype.toggleRowAt=function(n){var e=this,t=this.getItem(n),i,u,h;if(t){if(this._onBeforeItemToggle&&this._onBeforeItemToggle(),i=this._dataContextMap[t.id],i.descendantCount<=(t.htmlLines?t.htmlLines.length-1:0))this._toggleCallback&&this._toggleCallback(i.item);else{var r=t.htmlLines?t.htmlLines.length-1:0,o=i.descendantCount-r,f=i.expandedCount-r,c=this.getIndexOfItem(this._unfilteredList,t),s=this._unfilteredList.splice(c+1+r,o);for(u=0;u<s.length;u++)h=this.getItemId(s[u]),this._dataContextMap[h]=null;this._selectedIndex>n+r&&this._selectedIndex<n+1+r+f&&(this._selectedIndex=n);this._filteredList.splice(n+1+r,f);this.updateContextCounts(i,-o,-f);this.requestRender(!0,n);this._onUpdated&&this._onUpdated([t])}setTimeout(function(){e._notifyToggleCallback&&e._notifyToggleCallback()});this._onItemToggled&&this._onItemToggled()}},t.prototype.setButtonState=function(t,i,u,f){var c,s,l,a,e,o,v,h;if(t.buttonItems)for(c=this._gridElement.querySelectorAll(".listview-grid-row"),s=0;s<c.length;s++)l=c.item(s),a=parseInt(l.getAttribute("data-index"),10),this.getItem(a)===t&&this.getLineIndex(this._filteredList[a])===0&&(e=l.querySelector('[listview-button-index="'+i+'"]'),e&&(n.ButtonHelpers.changeButtonStatus(e,u),o=t.buttonItems[i],o.isEnabled=u,u&&(o.isChecked=f,v=f?o.checkedTooltip:o.uncheckedTooltip,e.setAttribute("data-plugin-vs-tooltip",r.Resources.getString(v)),e.setAttribute("aria-label",r.Resources.getString(v)),h=e.querySelector(".buttonIcon.icon_16x16"),h&&(f?h.classList.add("checked"):h.classList.remove("checked")))))},t.prototype.setFilter=function(n){var c=this,o,i,u,s,l,t,r;for(this._filter=n,o={},t=0;t<this._filteredList.length;t++)o[this._filteredList[t]]=!0;for(i=[],u=-1,this._selectedIndex>-1&&(s=this.getSelectedItem(),s&&(u=this.getIndexOfItem(this._unfilteredList,s)),this._selectedIndex=-1),t=0;t<this._unfilteredList.length;t++){var h=this._unfilteredList[t],f=this._dataContextMap[this.getItemId(h)],e=0,a=!!o[h];if(n(f.item)&&this.separatorFilter(f.item,l)?(l=f.item,i.push(h),a||(e=1),t>=u&&this._selectedIndex===-1&&(this._selectedIndex=i.length-1)):a&&(e=-1,t===u&&i&&i.length>0&&(this._selectedIndex=i.length-1)),e&&(r=f.parentContext,r))while(r)r.expandedCount+=e,r=r.parentContext}this._filteredList=i;this._selectedIndex===-1?this._selectedRow=null:this._delayedScrollFunction=function(){return c.scrollIndexIntoView(c._selectedIndex,!0)};this.requestRender(!0)},t.prototype.sortFilteredList=function(t){var i=this;this._filteredList.sort(function(r,u){var r=t(i._dataContextMap[i.getItemId(r)].item),u=t(i._dataContextMap[i.getItemId(u)].item),f=n.ToolWindowHelpers.naturalSort(r.toLowerCase(),u.toLowerCase());return f===0?n.ToolWindowHelpers.naturalSort(u,r):f})},t.prototype.getItemCount=function(){return this._filteredList.length},t.prototype.getUnfilteredItemCount=function(){return this._unfilteredList.length},t.prototype.getItemAt=function(n){return n>=0&&n<this._filteredList.length?this.getItem(n):null},t.prototype.getSelectedItem=function(){return this._selectedIndex>=0&&this._selectedIndex<this._filteredList.length?this.getItem(this._selectedIndex):null},t.prototype.getSelectedRow=function(){return this._selectedRow?this._selectedRow:this._selectedIndex>=0&&this._selectedIndex<this._filteredList.length?(this.scrollIndexIntoView(this._selectedIndex),document.getElementById("row_"+this._selectedIndex)):null},t.prototype.getItemChildren=function(n){return this._dataContextMap[n.id]?this._dataContextMap[n.id].children:null},t.prototype.isItemExpanded=function(n){return this._dataContextMap[n.id]&&this._dataContextMap[n.id].descendantCount>(n.htmlLines?n.htmlLines.length-1:0)},t.prototype.isItemCollapsed=function(n){return this._dataContextMap[n.id]&&this._dataContextMap[n.id].descendantCount<=(n.htmlLines?n.htmlLines.length-1:0)},t.prototype.removeItem=function(n,t){var i,u,s,o,h,f,r,e;if(n&&(i=this._dataContextMap[n.id],i)){for(u=this.getIndexOfItem(this._filteredList,n),u!==-1&&this._filteredList.splice(u,i.expandedCount+1),s=this.getIndexOfItem(this._unfilteredList,n),o=this._unfilteredList.splice(s,i.descendantCount+1),r=0;r<o.length;r++)h=this.getItemId(o[r]),this._dataContextMap[h]=null;f=i.parentContext;f&&f.children&&(r=f.children.indexOf(n),r>-1&&f.children.splice(r,1),this.updateContextCounts(i,-(i.descendantCount+1),-(i.expandedCount+1)));this._selectedIndex===u?e=this.getItem(Math.min(u,this._filteredList.length-1)):this._selectedIndex>u&&(e=this.getItem(Math.min(this._selectedIndex-i.expandedCount,this._filteredList.length-1)));e&&this.selectItem(e);this.requestRender(!t)}},t.prototype.scrollToBottom=function(){var n=this;this._delayedRenderCookie?this._delayedScrollFunction=function(){n.scrollToBottom()}:this._rootElement.scrollTop=this._rootElement.scrollHeight},t.prototype.remeasure=function(){this._measurements.update();this.requestRender(!0)},t.prototype.refresh=function(){this.requestRender(!0)},t.prototype.clear=function(){this._delayedSelectCookie&&(clearTimeout(this._delayedSelectCookie),this._delayedSelectCookie=null);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";this._onUpdated&&this._onUpdated(null);this.executePendingRenderRequest(!0)},t.prototype.expandAllItems=function(n,t){var r=this.getItem(n),i;r&&(i=this._dataContextMap[r.id],i&&this.expandDescendants(i.item,t))},t.prototype.collapseAllItems=function(n){var t=this.getItem(n),i;t&&(i=this._dataContextMap[t.id],i&&(t=i.item,this.isItemExpanded(t)&&this.toggleRowAt(this.getIndexOfItem(this._filteredList,t))))},t.prototype.getTreeViewItemIndent=function(n){var t=-1,r=this.getItem(n),i;return r&&(t=0,this._dataContextMap&&(i=this._dataContextMap[r.id],i&&(t=this.getIndent(i)))),t},t.prototype.getIndex=function(n){return this.getIndexOfItem(this._filteredList,n)},t.prototype.itemIndexToLineIndex=function(n){if(n>0&&n<this._filteredList.length){for(var t=1,i=0;t<this._filteredList.length&&i<n;t++)this.getItemId(this._filteredList[t])!==this.getItemId(this._filteredList[t-1])&&i++;return t-1}return n},t.prototype.lineIndexToItemIndex=function(n){var i,t;if(n<1)return n;for(i=0,t=1;t<=Math.min(n,this._filteredList.length-1);t++)this.getItemId(this._filteredList[t])!==this.getItemId(this._filteredList[t-1])&&i++;return i},t.prototype.isAutoScrollToItemEnabled=function(n){var i=!1,t=1;return n&&n.htmlLines&&(t=n.htmlLines.length),i=this.getIndex(n)===this.getItemCount()-t,this._scrollBottom>=this._measurements.rowHeight*Math.max(0,this._filteredList.length-t)&&(this._autoScrollEnabled=!0),this._autoScrollEnabled&&i},t.prototype.onDOMAttrModified=function(n){if(n.attrName==="aria-expanded"){var t=n.target,i=n.newValue==="true",r=t.classList.contains("listview-grid-row-expanded"),u=t.classList.contains("listview-grid-row-collapsed");(i&&u||!i&&r)&&this.toggleRow(t)}},t.prototype.addDOMAttrModifiedHandler=function(n){n.addEventListener("DOMAttrModified",this.onDOMAttrModified.bind(this))},t.prototype.initialize=function(){var r=this;this._rootElement=i.createElement("div","listview");this._rootElement.setAttribute("tabindex","1");this._rootElement.setAttribute("role","tree");this._containerElement.appendChild(this._rootElement);this._spacerTopElement=i.createElement("span","listview-grid-content-spacer");this._rootElement.appendChild(this._spacerTopElement);this._rootElement.appendChild(i.createElement("div",""));this._gridElement=i.createElement("div","listview-grid");this._rootElement.appendChild(this._gridElement);this._groupLineElement=i.createElement("div","listview-grid-groupline");this._rootElement.appendChild(this._groupLineElement);this._separatorElement=i.createElement("div","listview-grid-separator");this._separatorElement.style.left=t.SeparatorOffset+this._nameColumnWidth+"px";this._rootElement.appendChild(this._separatorElement);this._rootElement.appendChild(i.createElement("div",""));this._spacerBottomElement=i.createElement("span","listview-grid-content-spacer");this._rootElement.appendChild(this._spacerBottomElement);window.addEventListener("resize",function(n){return r.onResize(n)});this._rootElement.addEventListener("scroll",function(n){return r.onScroll(n)});this._rootElement.addEventListener("mousedown",function(n){return r.onMouseDown(n)});this._rootElement.addEventListener("dblclick",function(n){return r.onMouseDblClick(n)});this._rootElement.addEventListener("keydown",function(n){return r.onKeyDown(n)});this._rootElement.addEventListener("focus",function(n){return r.onFocus(n)},!0);this._rootElement.addEventListener("blur",function(n){return r.onBlur(n)},!0);n.ClipboardHelper.addCopyListener(this._rootElement,this.onCopy.bind(this));this._measurements=new u;window.setTimeout(function(){r._measurements.update(r._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=n.ToolWindowHelpers.loadString("SingleError",[""]);this._infoLabel=n.ToolWindowHelpers.loadString("SingleMessage",[""]);this._warningLabel=n.ToolWindowHelpers.loadString("SingleWarning",[""]);this._isStaleLabel=n.ToolWindowHelpers.loadString("ConsoleStaleMessage")},t.prototype.resetViewport=function(){this._currentViewport={first:Number.MAX_VALUE,last:-1,scrollTop:0,spaceTop:0,spaceBottom:0,unboundFirst:Number.MAX_VALUE,unboundLast:-1}},t.prototype.getViewportRowInfo=function(){var t=Math.max(0,this._filteredList.length-1),n=this._measurements.rowHeight,r=(t+2)*n-this._rootElement.clientHeight;this._rootElement.scrollTop>r&&(this._rootElement.scrollTop=r);var i=this._rootElement.scrollTop,s=i+this._rootElement.clientHeight,u=Math.floor(i/n)-this._scrollPadding,f=Math.ceil(s/n)+this._scrollPadding,e=Math.min(t,Math.max(0,u)),o=Math.max(0,Math.min(t,f)),h=Math.max(0,e*n),c=Math.max(0,(t-o)*n);return{first:e,last:o,scrollTop:i,spaceTop:h,spaceBottom:c,unboundFirst:u,unboundLast:f}},t.prototype.sizeSpacer=function(n,i){var u,r,o,e,f;if(n.firstChild&&n.removeChild(n.firstChild),i<t.MaxSpacerSize)n.style.height=i+"px",n.style.display="block";else{for(u=document.createDocumentFragment(),n.style.height="auto",n.style.display="inline",r=document.createElement("div"),r.style.height=i%t.MaxSpacerSize+"px",u.appendChild(r),o=Math.floor(i/t.MaxSpacerSize),e=0;e<o;e++)r=document.createElement("div"),r.style.height=t.MaxSpacerSize+"px",u.appendChild(r);f=document.createElement("span");f.style.display="inline-block";f.appendChild(u);n.appendChild(f)}},t.prototype.requestRender=function(n,i){var r=this;this._delayedRenderCookie?this._delayedRenderRequestCount++:this._delayedRenderCookie=this._renderFunction(function(){return r.executePendingRenderRequest(n,i)},t.DelayedRenderInterval);this._delayedRenderRequestCount>t.MaxDelayedRenderRequestCount&&(this._delayedRenderCookie&&window.clearTimeout(this._delayedRenderCookie),this.executePendingRenderRequest(n,i))},t.prototype.executePendingRenderRequest=function(n,t){this._onBeforeRendering&&this._onBeforeRendering();this._delayedRenderCookie=null;this._delayedRenderRequestCount=0;this.performRender(n,t);this._delayedScrollFunction&&(this._delayedScrollFunction(),this._delayedScrollFunction=null);this._delayedSelectFunction&&(this._delayedSelectFunction(),this._delayedSelectFunction=null)},t.prototype.getLabelForAddedClasses=function(n){if(!n)return"";var t;return n.lastIndexOf("consoleItemError")>=0?t=this._errorLabel:n.lastIndexOf("consoleItemInfo")>=0?t=this._infoLabel:n.lastIndexOf("consoleItemWarn")>=0&&(t=this._warningLabel),t&&n.lastIndexOf("Stale")>=0?t=this._isStaleLabel+" "+t:t||(t=""),t},t.prototype.performRender=function(u,f){var et=this,c,ot,st,ht,e,bt,g,ut,ct,w,nt,b,tt,kt,a,v,y,lt,ft,at,dt,yt,s,o,it,gt,pt;if(this._ignoreScroll=!0,c=this.getViewportRowInfo(),this._gridElement.style.height=this._gridElement.clientHeight+"px",this.sizeSpacer(this._spacerTopElement,c.spaceTop),this.sizeSpacer(this._spacerBottomElement,c.spaceBottom),this._separatorElement.style.top=c.scrollTop+"px",u){while(this._gridElement.hasChildNodes())ot=this._gridElement.lastChild,this._selectedRow===ot&&(this.isFocusWithin()&&(it=this._rootElement.scrollTop,this._rootElement.focus(),this._rootElement.scrollTop=it),this._selectedRow=null),this._gridElement.removeChild(ot);this.resetViewport()}for(st=document.createDocumentFragment(),ht=document.createDocumentFragment(),s=c.first;s<=c.last&&s<this._filteredList.length;s++)if(s<this._currentViewport.first||s>this._currentViewport.last){if(e=this.getItem(s),!e)continue;var k=this._dataContextMap[e.id],rt=this.getIndent(k),ni=e.name===null||e.name===undefined,h=e.htmlLines&&e.htmlLines.length>0?this.getLineIndex(this._filteredList[s]):-1,d=k.descendantCount>(e.htmlLines?e.htmlLines.length-1:0),wt=this.getSelectedItem()===e,l="",ti="listview-grid-row"+(e.additionalClass?" "+e.additionalClass:""),o=i.createElement("div",ti);if(o.tabIndex=-1,o.id="row_"+s,o.setAttribute("data-index",""+s),o.setAttribute("role","treeitem"),o.style.height=this._measurements.rowHeight+"px",wt&&o.classList.add("listview-grid-row-selected"),bt=s<this._currentViewport.first?st:ht,bt.appendChild(o),e.isSeparator)l=e.value,o.appendChild(i.createElement("div","listview-horizontal-separator"));else if(ni||e.htmlLinesFileLine&&e.htmlLinesFileLine===h){if(ut=this._hasIndent?rt+(e.hasIcon?-1:1):0,ct=i.createElement("div","listview-grid-cell listview-grid-cell-indent"),ct.style.width=ut*t.IndentWidth+"px",o.appendChild(ct),e.hasIcon&&(w=i.createElement("div","listview-grid-cell "+(h<=0?"listview-grid-cell-icon":"listview-grid-cell-icon-space")),h<=0&&e.additionalClass&&(l=this.getLabelForAddedClasses(e.additionalClass)+" "),o.appendChild(w)),e.buttonItems)for(nt=0;nt<e.buttonItems.length;nt++)b=e.buttonItems[nt],tt=i.createElement("div","listview-grid-cell iconShell_16x16 "+b.buttonClass),tt.setAttribute("listview-button-index",""+nt),kt=i.createElement("div","buttonIcon icon_16x16"+(b.isChecked?" checked":"")),tt.appendChild(kt),n.ButtonHelpers.setupButton(tt,b.isChecked?b.checkedTooltip:b.uncheckedTooltip,b.clickHandler),o.appendChild(tt);if(e.hasChildren&&(e.hasIcon&&(w.style.marginRight="16px",ut+=2),(h===-1||h===0)&&(a=i.createElement("div","listview-icon-tree"),a.classList.add(d?"listview-icon-tree-expanded":"listview-icon-tree-collapsed"),o.setAttribute("aria-expanded",d?"true":"false"),this.addDOMAttrModifiedHandler(o),a.style.left=ut*t.IndentWidth-13+"px",o.appendChild(a))),v=i.createElement("div","listview-grid-cell listview-grid-cell-full listview-grid-cell-value"),h===-1)v.innerText=e.value,l=l+e.value;else{if(v.innerHTML=e.htmlLines[h],h===0)for(y=0;y<e.htmlLines.length;y++)l=l+e.htmlLines[y].replace(/<[^>]*>/g,"")+" ";wt&&o.classList.add("listview-grid-row-selected")}o.appendChild(v)}else{if(e.hasIcon&&(w=i.createElement("div","listview-grid-cell "+(h<=0?"listview-grid-cell-icon":"listview-grid-cell-icon-space")),w.style.position="absolute",w.style.left=(rt-1)*t.IndentWidth+"px",o.appendChild(w),h<=0&&e.additionalClass&&(l=this.getLabelForAddedClasses(e.additionalClass)+" ")),g=i.createElement("div","listview-grid-cell listview-grid-cell-resize"),g.innerText=h<=0?e.name:"",h<=0&&e.name&&(l=l+e.name+" "),g.style.textIndent=(rt+1)*t.IndentWidth+"px",g.style.width=this._nameColumnWidth+"px",o.appendChild(g),e.hasChildren&&(h===-1||h===0)&&(a=i.createElement("div","listview-icon-tree"),a.classList.add(d?"listview-icon-tree-expanded":"listview-icon-tree-collapsed"),o.setAttribute("aria-expanded",d?"true":"false"),this.addDOMAttrModifiedHandler(o),a.style.left=rt*t.IndentWidth+3+"px",o.appendChild(a)),v=i.createElement("div","listview-grid-cell listview-grid-cell-value"),h===-1)v.innerText=e.value,l=l+e.value;else if(v.innerHTML=e.htmlLines[h],h===0)for(y=0;y<e.htmlLines.length;y++)l=l+e.htmlLines[y].replace(/<[^>]*>/g,"")+" ";o.appendChild(v)}for(lt=o.querySelectorAll(".BPT-Tooltip-Item"),ft=0;ft<lt.length;ft++)at=lt[ft],at instanceof HTMLElement&&at.addEventListener("mouseover",function(n){var t=n.srcElement.getAttribute("data-tooltip");r.Host.getDocumentLocation(t).done(function(n){r.Tooltip.show({content:n})})});if(e.hasChildren&&o.classList.add(d?"listview-grid-row-expanded":"listview-grid-row-collapsed"),h===-1||h===e.htmlLines.length-1){var p=k,vt=e.hasSeparator,ii=s<c.last&&this.getItem(s+1).isSeparator;if(!vt&&k.parentContext)for(p=k.parentContext;p&&s===this.getIndexOfItem(this._filteredList,p.item)+p.expandedCount;){if(p.item.hasSeparator){vt=!0;break}p=p.parentContext}vt&&!ii&&(dt=this.getIndent(p),yt=i.createElement("div","listview-grid-underline"),yt.style.left=(dt-1)*t.IndentWidth+"px",o.appendChild(yt))}o.setAttribute("aria-label",l)}else s===this._currentViewport.first&&(s=this._currentViewport.last);for(s=this._currentViewport.first;s<=this._currentViewport.last;s++)s<c.first||s>c.last?(o=document.getElementById("row_"+s),o&&(this._selectedRow===o&&(this.isFocusWithin()&&(it=this._rootElement.scrollTop,this._rootElement.focus(),this._rootElement.scrollTop=it),this._selectedRow=null),o.parentElement.removeChild(o))):s===c.first&&(s=c.last);this._gridElement.insertBefore(st,this._gridElement.firstChild);this._gridElement.appendChild(ht);this._gridElement.style.height="auto";isNaN(f)||(this._selectedIndex=f,this._selectedRow=null);gt=this._selectedIndex>=0&&(this._selectedIndex<c.unboundFirst||this._selectedIndex>c.unboundLast)&&this._selectedIndex>=this._currentViewport.unboundFirst&&this._selectedIndex<=this._currentViewport.unboundLast;this._selectedIndex>=0&&!this._selectedRow&&!gt?(pt=document.getElementById("row_"+this._selectedIndex),pt&&(this._selectedRow=pt),this.updateGroupLine()):u&&this.updateGroupLine();this._currentViewport=c;this._ignoreScroll=!1;setTimeout(function(){et._postRenderCallback&&(et._postRenderCallback(),et._postRenderCallback=null)});this._onRendered&&this._onRendered();this._rootElement.setAttribute("tabindex",this._filteredList.length>0?"1":"-1")},t.prototype.getItemId=function(n){var t=n.lastIndexOf("::");return t>-1&&(n=n.substring(0,t)),n},t.prototype.getLineIndex=function(n){var i=-1,t;return n&&(t=n.lastIndexOf("::"),t>-1&&(i=parseInt(n.substring(t+2),10))),i},t.prototype.getIndexOfItem=function(n,t,i){i===void 0&&(i=!0);var r=this.getItemId(t.id);return r=t.additionalClass==="consoleItemInput"&&i?r+(t.htmlLines&&t.htmlLines.length>0?"::"+(t.htmlLines.length-1).toString():""):r+(t.htmlLines&&t.htmlLines.length>0?"::0":""),n.indexOf(r)},t.prototype.getItem=function(n){if(n>=0&&n<this._filteredList.length){var t=this.getItemId(this._filteredList[n]);if(this._dataContextMap[t])return this._dataContextMap[t].item}return null},t.prototype.isFocusWithin=function(){return this._rootElement.querySelectorAll(":focus").length>0},t.prototype.scrollIndexIntoView=function(n,t){if(!document.getElementById("row_"+n)||t||n<this._currentViewport.unboundFirst+this._scrollPadding||n>=this._currentViewport.unboundLast-this._scrollPadding-1){if(t)this._rootElement.scrollTop=Math.min(this._filteredList.length*this._measurements.rowHeight-this._rootElement.clientHeight,n*this._measurements.rowHeight);else{var i=this.getItem(n),r=1;i&&i.htmlLines&&(r=i.htmlLines.length);this._rootElement.scrollTop=(n+r+1)*this._measurements.rowHeight-this._rootElement.clientHeight}this.performRender()}},t.prototype.getIndent=function(n){if(!this._hasIndent)return 0;for(var t=n.item.hasIcon?1:0;n&&n.parentContext;)n=n.parentContext,t+=n.item.hasIcon?2:1;return t},t.prototype.updateGroupLine=function(){var r=!1,n,i;this._selectedIndex>=0&&this._selectedIndex<this._filteredList.length&&(n=this.getItem(this._selectedIndex),n&&(i=this._dataContextMap[n.id],i&&i.expandedCount>(n.htmlLines?n.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(i)+1)*t.IndentWidth-4+"px",this._groupLineElement.style.height=i.expandedCount*this._measurements.rowHeight+1+"px",r=!0)));r||(this._groupLineElement.style.display="none")},t.prototype.updateContextCounts=function(n,t,i){for(var r=n;r;)r.descendantCount+=t,r.expandedCount+=i,r=r.parentContext},t.prototype.spliceArray=function(n,t,i){for(var o,f,r,u=2e5,s=~~(t.length/u),e=0;e<s;e++)o=e*u,r=[i+o,0].concat(t.slice(o,u)),Array.prototype.splice.apply(n,r);f=t.length%u;f>0&&(r=[i+(t.length-f),0].concat(t.slice(t.length-f,t.length)),Array.prototype.splice.apply(n,r))},t.prototype.moveSelectionUp=function(n){var t;if(n){var r=parseInt(this._selectedRow.getAttribute("data-index"),10),u=this.getItem(r),i=this._dataContextMap[u.id];i.parentContext&&this.selectItem(i.parentContext.item)}else t=this._selectedIndex-1,t>=0&&t<this._filteredList.length&&this.selectItem(this.getItem(t))},t.prototype.moveSelectionDown=function(){var n=this.getSelectedItem(),t=this._selectedIndex+(n.htmlLines&&n.htmlLines.length>0?n.htmlLines.length:1);t>=0&&t<this._filteredList.length&&this.selectItem(this.getItem(t))},t.prototype.onDocumentMouseMove=function(n){var i=n.clientX-this._separatorStartX;return this._nameColumnWidth=Math.max(t.MinColumnSize,this._nameColumnWidth+i),this._separatorElement.style.left=t.SeparatorOffset+this._nameColumnWidth+"px",this._separatorStartX=Math.max(t.MinColumnSize,n.clientX),!0},t.prototype.onDocumentMouseUp=function(){var t,i,n;for(this._separatorElement.classList.remove("listview-grid-separator-visible"),t=this._gridElement.querySelectorAll(".listview-grid-cell-resize"),n=0;n<t.length;n++)t.item(n).style.width=this._nameColumnWidth+"px";for(i=this._gridElement.querySelectorAll(".listview-grid-cell-full-content"),n=0;n<i.length;n++)i.item(n).style.left=-this._nameColumnWidth+"px";return document.removeEventListener("mousemove",this._boundDocMouseMoveCallback),document.removeEventListener("mouseup",this._boundDocMouseUpCallback),!0},t.prototype.onMouseDown=function(n){var f=this,r=n.target,t=i.findClosestElement(r,".listview-grid-row, .listview-grid-separator"),e,u;t&&(t.classList.contains("listview-grid-row")?(this.selectRow(t,!0),r.classList.contains("listview-grid-cell-clicksection")&&this._clickCallback&&(e=parseInt(t.getAttribute("data-index"),10),u=this.getItem(e),u&&this._clickCallback(u,t,r,n.button)),r.classList.contains("listview-icon-tree")&&n.which===1&&(t.focus(),this.toggleRow(t))):(this._separatorStartX=n.clientX,this._separatorElement.classList.add("listview-grid-separator-visible"),this._boundDocMouseMoveCallback=function(n){return f.onDocumentMouseMove(n)},this._boundDocMouseUpCallback=function(n){return f.onDocumentMouseUp(n)},document.addEventListener("mousemove",this._boundDocMouseMoveCallback),document.addEventListener("mouseup",this._boundDocMouseUpCallback)))},t.prototype.onMouseDblClick=function(n){var t=n.target,r=i.findClosestElement(t,".listview-grid-row"),u,f;r&&n.which===1&&(t.classList.contains("listview-grid-cell-editsection")&&this._editCallback?(u=parseInt(r.getAttribute("data-index"),10),f=this.getItem(u),this._editCallback(f,r,t)):t.classList.contains("listview-icon-tree")||this.toggleRow(r))},t.prototype.onKeyDown=function(n){var r,e,t,u,f,i;if(n.keyCode>=37&&n.keyCode<=40||n.keyCode===109||n.keyCode===107){if(this._selectedIndex>=0){if((this._selectedRow||(this.scrollIndexIntoView(this._selectedIndex,!0),r=document.getElementById("row_"+this._selectedIndex),r&&this.selectRow(r,!1)),!this._selectedRow)||(e=parseInt(this._selectedRow.getAttribute("data-index"),10),t=this.getItem(e),!t))return!0;u=this._dataContextMap[t.id];f=u.descendantCount>(t.htmlLines?t.htmlLines.length-1:0);switch(event.keyCode){case 109:case 37:this._hasIndent&&(f?this.toggleRow(this._selectedRow):(i=u.parentContext,i&&i.item&&this.getIndex(i.item)>=0&&this.selectItem(i.item)));break;case 38:this.moveSelectionUp();break;case 107:case 39:f||this.toggleRow(this._selectedRow);break;case 40:this.moveSelectionDown()}}return n.preventDefault(),!1}return n.keyCode===65&&n.ctrlKey||n.keyCode===32?(n.preventDefault(),!1):(n.keyCode===9&&(this._isTabbingOut=!0,this._rootElement.focus()),!0)},t.prototype.onFocus=function(n){var i=this;this._rootElement.classList.add("listview-grid-focus-within");n.target===this._rootElement&&this._selectedRow&&!this._isTabbingOut&&(this._delayedFocusCookie||(this._delayedFocusCookie=window.setTimeout(function(){var n=i._rootElement.scrollLeft,t=i._rootElement.scrollTop;i._selectedRow&&i._selectedRow.focus();i._rootElement.scrollLeft=n;i._rootElement.scrollTop=t;clearTimeout(i._delayedFocusCookie);i._delayedFocusCookie=null},t.DelayedRenderInterval)));this._isTabbingOut=!1},t.prototype.onBlur=function(){this._rootElement.classList.remove("listview-grid-focus-within")},t.prototype.onResize=function(){this.requestRender(this._isInitialResize);this._isInitialResize=!1;this._rootElement.scrollTop=this._scrollBottom-this._rootElement.clientHeight},t.prototype.onScroll=function(){if(!this._ignoreScroll){this._onBeforeScroll&&this._onBeforeScroll();var n=this._rootElement.clientHeight+this._rootElement.scrollTop,t=this._measurements.rowHeight*this._filteredList.length;this._filteredList.length>0&&n>(this._filteredList.length-1)*this._measurements.rowHeight&&(n=t);n<this._scrollBottom?this._autoScrollEnabled=!1:this._autoScrollEnabled||(this._autoScrollEnabled=n>=t);n!==this._scrollBottom&&(this._scrollBottom=n,t>this._rootElement.clientHeight&&this.requestRender());this._onScrollCompleted&&this._onScrollCompleted()}},t.prototype.onCopy=function(){var t=n.ToolWindowHelpers.getTextForClipboard(),i;return t&&t.length!==0||(i=this.getSelectedItem(),i&&i.getCopyText&&(t=i.getCopyText())),t},t.prototype.expandDescendants=function(n,t){var r,i;if(t&&t(n)){this.isItemExpanded(n)&&this.toggleRowAt(this.getIndexOfItem(this._filteredList,n));return}if(this.isItemExpanded(n)||this._toggleCallback(n),n.hasChildren)for(r=this.getItemChildren(n),i=0;i<r.length;i++)this.expandDescendants(r[i],t)},t.prototype.separatorFilter=function(n,t){if(n&&t){if(n.isSeparator&&t.isSeparator)return!1}else return!0;return!0},t.DefaultColumnSize=170,t.IndentWidth=16,t.MaxSpacerSize=15e5,t.MinColumnSize=50,t.SeparatorOffset=8,t.MaxDelayedRenderRequestCount=500,t.DelayedRenderInterval=50,t.EXPAND_ROW=1,t.COLLAPSE_ROW=-1,t}();t.ObjectTreeView=f})(t=n.ObjectView||(n.ObjectView={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){"use strict";var u=function(){function t(){}return t.getDetailedTypeOf=function(n,t){var r,i;if(n===undefined)return"undefined";if(r=typeof n,r==="object"&&t){if(n)for(i=0;i<t.length;i++){var u=t[i]&&t[i].array?t[i].array:[].constructor,f=t[i]&&t[i].date?t[i].date:(new Date).constructor,e=t[i]&&t[i].regex?t[i].regex:new RegExp("").constructor;try{if(n.constructor===u)return"array";if(n.constructor===f)return"date";if(n.constructor===e)return"regex"}catch(o){}}else return"null";return"object"}return r},t.getVisibleHtmlElementText=function(n){if($m(n).is(":visible")){if(n.nodeType===3)return n.nodeValue;for(var r="",i=0;n.childNodes[i];)r+=t.getVisibleHtmlElementText(n.childNodes[i]),i++;return r}return""},t.createPadding=function(n,t){var i,r;if(n===0)return"";for(i="",r=0;r<n;r++)i+=t;return i},t.getIndentedObjectString=function(t,i,r,u,f,e){var v="",h=""+t,l,o,a,c,y,s,p,w;if(/\S/.test(h))if(l=0,o=[],i==="string")e&&(h=n.EncodingUtilities.escapeHtml(h)),v=h.replace(/(\r\n|\n\r|\r|\n)/g,f);else{for(a=h.replace(/^\s+|\s+$/g,"").split(/[\r\n]+/),c=0;c<a.length;c++)if(a[c]!==""){if(y="",s=a[c],e&&(s=n.EncodingUtilities.escapeHtml(s)),s=s.replace(/^\s+|\s+$/g,""),i==="function"){for(/^\}/.test(s)&&l--,p=0;p<l;p++)y+=u;/\{$/.test(s)&&l++}o.push(y+s)}w=f;i==="function"&&o.length===3&&(o[1]=o[1].replace(/^(&nbsp;)+/,"").replace(/^\s+|\s+$/g,""),o[2]=o[2].replace(/^\s+|\s+$/g,""),w=" ");v=o.join(w)}return v},t.propertyNameCompare=function(n,i){var f,e,r,u;return isNaN(f=parseInt(n,10))||isNaN(e=parseInt(i,10))?(r=n.toLowerCase(),u=i.toLowerCase(),r===u?t.stringValueCompare(n,i):t.stringValueCompare(r,u)):f-e},t.stringValueCompare=function(n,t){return n<t?-1:n>t?1:0},t.ConsoleNotifyType={assert:"consoleItemError",error:"consoleItemError",info:"consoleItemInfo",log:"consoleItemLog",warn:"consoleItemWarn",internalMessage:"internalMessage"},t.ConsoleInternalMessage={startGroup:"startGroup",startGroupCollapsed:"startGroupCollapsed",endGroup:"endGroup",displayTraceStyles:"displayTraceStyles"},t.ConsoleUITypeStrings={functionName:"[function]",objectName:"[object]",arrayName:"[array]",emptyArray:" [ ]",emptyObject:" { }",expandableArray:" [...]",expandableObject:" {...}"},t.ConsoleFilterId={all:-1,error:0,warning:1,message:2,log:3},t}(),i,r;t.TreeViewUtils=u;i=function(){function t(){}return t.createValueString=function(n,i,r){var u;if(r===void 0&&(r=!1),n&&typeof n=="object"){var e,h=!0,o="<span>",s,f="<\/span>";switch(i){case"object":o=o+"{";s=!0;f="}"+f;break;case"array":o=o+"[";s=!1;f="]"+f;n=n.filter(function(n){return!isNaN(parseInt(n.propertyName,10))});break;default:return}for(e=o,u=0;u<n.length;u++)if(n[u].propertyName.substr(0,2)!=="__"&&n[u].propertyName!=="[functions]"&&(h||(e+=", "),h=!1,s&&(e+=t.createPropertyNameToken(n[u]),e+=": "),e+=t.createPropertyValueToken(n[u]),u>20)){r=!0;break}return r&&(f=" ..."+f),e+f}},t.createPropertyValueString=function(t,i){var r,u;try{switch(t.detailedType){case"array":if(r=t.value.indexOf(":"),r!==-1)return"Array["+n.EncodingUtilities.escapeHtml(i.length)+"]";case"object":if(r=t.name.indexOf(" "),r!==-1)return u=n.EncodingUtilities.escapeHtml(t.name.substr(r+1,t.name.length-r-2)),u+" {...}"}}catch(f){}return t.detailedType},t.formatPropertyValueString=function(t){if(t&&typeof t=="string"){var i=t.length>15?t.substr(0,12)+'..."':t;return i=String.prototype.replace.call(i,/(\r\n|\n\r|\r|\n)/g,"  "),n.EncodingUtilities.escapeHtml(i)}return t},t.createPropertyValueToken=function(n){var t;switch(n.propertyValue.detailedType){case"undefined":t="valueStringToken-Undefined";break;case"null":t="valueStringToken-Null";break;case"boolean":t="valueStringToken-Boolean";break;case"number":t="valueStringToken-Number";break;case"string":t="valueStringToken-String";break;case"function":t="valueStringToken-Function";break;case"array":t="valueStringToken-Array";break;case"object":t="valueStringToken-Object";break;default:t="valueStringToken-Default"}return"<span class ='"+t+"'>"+n.propertyValue.valueString+"<\/span>"},t.createPropertyNameToken=function(t){var i=n.EncodingUtilities.escapeHtml(t.propertyName);return"<span class ='valueStringToken-PropertyName'>"+i+"<\/span>"},t}();t.TreeViewValueStringBuilder=i;r=function(){function n(){}return n.formatConsoleMessage=function(){for(var r,t=[],u=0;u<arguments.length;u++)t[+u]=arguments[u];var i=0,e=n.convertToString(t[i++]),o=function(r){if(i>=t.length)return r;switch(r){case"%%":return"%";case"%d":case"%i":return n.convertToInteger(t[i++]);case"%f":return n.convertToNumber(t[i++]);case"%s":return n.convertToString(t[i++]);case"%b":return n.convertToBase(t[i++],2);case"%x":case"%X":return n.convertToBase(t[i++],16);case"%E":case"%e":return n.convertToExponential(t[i++]);default:return r}},f=e.replace(/%%|%([sbxXideEfF])/g,o);for(r=i;r<t.length;r++)f=f.length>0?f+" "+n.convertToString(t[r]):n.convertToString(t[r]);return f.slice(0,1024)},n.convertToString=function(n){var t;try{n===undefined||n===null?t=String(n):(t=n.toString(),typeof t!="string"&&(t="[object Object]"))}catch(i){t="[object Object]"}return t},n.convertToInteger=function(t){var i=n.convertToNumber(t);return isNaN(i)?i.toString():Math.round(i-i%1).toString()},n.convertToBase=function(t,i){var r=n.convertToNumber(t),u;return isNaN(r)?r.toString():(u={"2":"0b","8":"0","16":"0x"}[i]||"",u.toString()+(r<0?(r>>>0).toString(i):r.toString(i)))},n.convertToExponential=function(t){var i=n.convertToNumber(t);return isNaN(i)?i.toString():i.toExponential()},n.convertToNumber=function(t){return isNaN(t)||t===null?Number(n.convertToString(t)):Number(t)},n}();t.TreeViewStringFormatter=r})(t=n.ObjectView||(n.ObjectView={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){var y=Microsoft.Plugin,p,w,i,c,r,l,u,f,e,o,s,h,a,v;(function(n){n[n.None=0]="None";n[n.Assert=1]="Assert";n[n.Error=2]="Error";n[n.Info=3]="Info";n[n.Log=4]="Log";n[n.Warn=5]="Warn"})(t.TreeViewNotifyType||(t.TreeViewNotifyType={}));p=t.TreeViewNotifyType,function(n){n[n.Object=1]="Object";n[n.Html=2]="Html"}(t.ViewableTypeFlags||(t.ViewableTypeFlags={}));w=t.ViewableTypeFlags;i=function(){function t(n,i,r,u,f,e,o,s,h,c){h===void 0&&(h=0);this._id=t.IdCounter++;this._name=f;this._value=n;this._hasChildren=i;this._hasIcon=r;this._hasSeparator=u;this._additionalClass=e;this._htmlLines=o;this._fullHtmlLines=s;this._buttonItems=null;this._notifyType=h;this._htmlLinesFileLine=c}return Object.defineProperty(t.prototype,"id",{get:function(){return""+this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){return this._target},set:function(n){this._target=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isStale",{get:function(){return this._isStale},set:function(n){if(!this._isStale&&(this._isStale=n,this._isStale)){var t;switch(this._notifyType){case 2:t=" consoleItemErrorStale";break;case 3:t=" consoleItemInfoStale";break;case 5:t=" consoleItemWarnStale"}this._additionalClass+=t}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"notifyType",{get:function(){return this._notifyType},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(n){this._value=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasChildren",{get:function(){return this._hasChildren},set:function(n){this._hasChildren=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasIcon",{get:function(){return this._hasIcon},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"buttonItems",{get:function(){return this._buttonItems},set:function(n){this._buttonItems=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasSeparator",{get:function(){return this._hasSeparator},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"additionalClass",{get:function(){return this._additionalClass},set:function(n){this._additionalClass=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"htmlLines",{get:function(){return this._htmlLines},set:function(n){if(this._htmlLines&&this._htmlLines.length!==n.length)throw new Error("The number of lines cannot be changed for a TreeView item after initialization");this._htmlLines=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"htmlLinesFileLine",{get:function(){return this._htmlLinesFileLine},set:function(n){this._htmlLinesFileLine=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"consoleItemId",{get:function(){return this._id},enumerable:!0,configurable:!0}),t.encodeValueForListItem=function(i,r,u,f,e){e===void 0&&(e=!0);var o="",s=null;r||(r=n.ObjectView.TreeViewUtils.getDetailedTypeOf(i));switch(r){case"array":o=i||n.ObjectView.TreeViewUtils.ConsoleUITypeStrings.arrayName;e&&(o+=u?n.ObjectView.TreeViewUtils.ConsoleUITypeStrings.expandableArray:n.ObjectView.TreeViewUtils.ConsoleUITypeStrings.emptyArray);break;case"object":o=i||n.ObjectView.TreeViewUtils.ConsoleUITypeStrings.objectName;e&&(o+=u?n.ObjectView.TreeViewUtils.ConsoleUITypeStrings.expandableObject:n.ObjectView.TreeViewUtils.ConsoleUITypeStrings.emptyObject);break;case"null":o="null";break;case"undefined":o="undefined";break;default:o=""+i;s=t.getHtmlTextLines(o,r);r!=="string"&&s.length===1?(o=n.EncodingUtilities.unescapeHtml(s[0]),s=null):f&&s.length>1&&(o=t.getFirstLine(i),s.splice(0,0,"<span class ='Console-ExpandableString listview-grid-cell-clicksection'>"+s[0].replace("<pre>","").replace("<\/pre>","")+"<span class='Console-ExpandableLines listview-grid-cell-clicksection'> ...<\/span><\/span>"),o+=" ...")}return{value:o,htmlLines:s}},t.getHtmlTextLines=function(t,i){var r=null,f,o,e,s,u,h;if(typeof t=="string"&&(t=t.replace(/(\r\n|\n\r|\r|\n)/g,"\r\n"),f=t.split("\r\n"),f.length>0)){for(o=0,r=[],e=0;e<f.length;e++)if(i==="string"||f[e]!==""){if(s="",u=f[e],u=n.EncodingUtilities.escapeHtml(u),u=i==="string"?"<pre>"+u+"<\/pre>":u.replace(/^\s+|\s+$/g,""),i==="function"){for(/^\}/.test(u)&&o--,h=0;h<o;h++)s+="&nbsp;&nbsp;&nbsp;";/\{$/.test(u)&&o++}r.push(s+u)}i==="function"&&r.length===3&&(r[1]=r[1].replace(/^(&nbsp;)+/,""),r[2]=r[2],r=[r.join(" ")])}return r},t.getHtmlTreeLines=function(i,r){var ct=i.uid,c=i.tag,w=n.EncodingUtilities.escapeHtml(c),b=i.text,d=i.hasChildren,u=i.attributes,ot=i.rootTagToShow,f,l="",g="",e,y="",nt="",tt,it,p,rt,ut,o,s,st,k;if(c==="#document")tt="",it="",ot&&(p=n.EncodingUtilities.escapeHtml(ot),tt="<span class='Console-Html'>&lt;<\/span><span class='Console-Html-Tag'>"+p+"<\/span><span class='Console-Html'>&gt;<\/span>",it="<span class='Console-Html'>&lt;/<\/span><span class='Console-Html-Tag'>"+p+"<\/span><span class='Console-Html'>&gt;<\/span>",l="<"+p+">",y="<\/"+p+">"),f="<span class='Console-Html-Document'>"+tt+"<\/span>",e="<span class='Console-Html-Document'>"+it+"<\/span>";else if(c==="#doctype")f="<span class='Console-Html-DocType'><\/span>",e="<span class='Console-Html-DocType'><\/span>";else if(c==="#comment")f="<span class='Console-Html-Comment'>&lt;!--<\/span>",e="<span class='Console-Html-Comment'>--&gt;<\/span>",l="<!--",y="-->",g="<span class='Console-Html-Comment'><\/span>",nt="<span class='Console-Html-Comment'><\/span>";else if(c===null||c===undefined)f="<span class='Console-Html-Text'><\/span>",e="<span class='Console-Html-Text'><\/span>";else{if(rt="",ut="",u&&u.length>0)for(o=0;o<u.length;o++)rt+="<span class='Console-Html-Attribute-Section'> <span class='Console-Html-Attribute'>"+n.EncodingUtilities.escapeHtml(u[o].name)+"<\/span><span class='Console-Html-Operator'>=<\/span>\"<span class='Console-Html-Value' data-attrName='"+n.EncodingUtilities.escapeHtml(u[o].name)+"'>"+n.EncodingUtilities.escapeHtml(u[o].value)+'<\/span>"<\/span>',ut+=" "+n.EncodingUtilities.escapeHtml(u[o].name)+'="'+n.EncodingUtilities.escapeHtml(u[o].value)+'"';f="<span class='Console-Html'>&lt;<\/span><span class='Console-Html-Tag'>"+w+"<\/span>"+rt+"<span class='Console-Html'>&gt;<\/span>";l="<"+w+ut+">";e="<span class='Console-Html'>&lt;/<\/span><span class='Console-Html-Tag'>"+w+"<\/span><span class='Console-Html'>&gt;<\/span>";y="<\/"+w+">"}var ht=d?"<span class='Console-Html-Ellipses'>...<\/span>":"",ft=d?"<span class='Console-Html-CollapsedFooter'>"+ht+e+"<\/span>":e,et="";r===null||isNaN(r)||(et="<span class='Console-Html Console-Html-Text Console-Html-Numbering'>"+r+"<\/span>");var a="<span class='Console-HtmlItem'>",v="<\/span>",h=[];if(b)if(s=t.getHtmlTextLines(b,"string"),s.length<=1)l+=b,st="<span class='Console-Html-Text'>"+s[0]+"<\/span>",h.push(a+et+f+st+ft+v);else{for(l+=b,y="",h.push(a+f+"<span class='Console-Html-Text'>"+s[0]+"<\/span>"+nt+v),k=1;k<s.length-1;k++)h.push(a+g+"<span class='Console-Html-Text'>"+s[k]+"<\/span>"+nt+v);h.push(a+g+"<span class='Console-Html-Text'>"+s[s.length-1]+"<\/span>"+ft+v)}else h.push(a+et+f+ft+v);return d&&h.push(a+"<span class='Console-Html-Footer'>"+e+"<\/span>"+v),{headerText:l,footerText:y,htmlLines:h}},t.getFirstLine=function(n){var t=n,f,i,r,u;if(t&&(f=t.replace(/(\r\n|\n\r|\r|\n)/g,"\r\n"),i=f.split("\r\n"),i.length>0))for(r=0;r<i.length;r++)if(u=i[r].replace(/^\s+|\s+$/g,""),u.length>0){t=u;break}return t},t.prototype.getCopyText=function(n){return n===void 0&&(n=""),n+this._value},t.prototype.getWatchExpression=function(){return},t.prototype.expandLines=function(){if(this._fullHtmlLines&&this._fullHtmlLines.length>0){this._htmlLines=this._fullHtmlLines.slice(1);this._value=n.EncodingUtilities.unescapeHtml(this._htmlLines[0]);for(var t=1;t<this._htmlLines.length;t++)this._value+="\r\n",this._value+=n.EncodingUtilities.unescapeHtml(this._htmlLines[t]);return!0}return!1},t.prototype.setButtonCheckState=function(n,t){this._buttonItems&&this._buttonItems.length>n&&(this._buttonItems[n].isChecked=t)},t.IdCounter=-1,t.TextCopyIndent="   ",t}();t.TreeViewItem=i;c=function(n){function t(t,r){var u=i.encodeValueForListItem(t,"string");n.call(this,u.value,!1,!0,!0,null,"consoleItemInput",u.htmlLines);this._inputCommand=t;this._onCompleteCallback=r;this._outputItem=null}return __extends(t,n),t.prototype.getCopyText=function(n){return n===void 0&&(n=""),n+this._inputCommand},t.prototype.getWatchExpression=function(){return this._inputCommand},t.prototype.executeCallback=function(n){this._onCompleteCallback&&this._onCompleteCallback(this.consoleItemId,n.consoleItemId,n.additionalClass||"",n.value||"")},t}(i);t.TreeViewInputItem=c;r=function(n){function t(t,i,r,u,f,e,o,s,h,c,l,a){c===void 0&&(c=0);t&&parseInt(t,10)!==-1||(o=(o||"")+" consoleItemOutput-Async");this._watchExpression=l;n.call(this,i,r,u,f,e,o,s,h,c,a);this._matchingInputId=typeof t!="undefined"&&typeof t!="null"?t:"-1"}return __extends(t,n),Object.defineProperty(t.prototype,"matchingInputId",{get:function(){return this._matchingInputId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"viewableTypeFlags",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"typeEvaluationId",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._children},set:function(n){this._children=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isExpandable",{get:function(){return this.children&&this.children.length>0},enumerable:!0,configurable:!0}),t.prototype.getWatchExpression=function(){return this._watchExpression},t.prototype.evaluateAsType=function(n,t,i){if((this.viewableTypeFlags&t)===t){switch(t){case 2:n("getObjectItemAsHtml",[this.typeEvaluationId],i);break;case 1:n("getHtmlItemAsObject",[this.typeEvaluationId],i);break;default:return!1}return!0}return!1},t}(i);t.TreeViewOutputItem=r;l=function(t){function r(r,u,f,e,o){var h,c,a,l,p,w,s;this.target=u;h="consoleItemOutput";c=!1;switch(r.detailedType){case"exception":h+=" consoleItemOutput-Exception";break;case"undefined":h+=" consoleItemOutput-Undefined";break;case"null":h+=" consoleItemOutput-Null";break;case"boolean":h+=" consoleItemOutput-Boolean";break;case"number":h+=" consoleItemOutput-Number";break;case"string":h+=" consoleItemOutput-String";break;case"function":h+=" consoleItemOutput-Function";break;case"array":h+=" consoleItemOutput-Array";c=!0;break;case"object":h+=" consoleItemOutput-Object";c=!0;break;case"internal":h+=" consoleItemOutput-Internal"}a=!!f;c=c&&!a;var b=!a,v=a||r.detailedType==="function"&&r.isExpandable,s=i.encodeValueForListItem(r.value,r.detailedType,r.isExpandable,v),y=null;if(v&&s.htmlLines&&s.htmlLines.length>1&&(y=s.htmlLines.slice(0),s.htmlLines=[s.htmlLines.shift()]),l=i.getFirstLine(f||r.name),r.isExpandable){c?(w=r.valueString,p=w||r.name):p=r.name;s=i.encodeValueForListItem(p,r.detailedType,!0,!0,!c);!s.htmlLines&&c&&(s.htmlLines=[s.value]);v&&s.htmlLines&&s.htmlLines.length>1&&(y=s.htmlLines.slice(0),s.htmlLines=[s.htmlLines.shift()]);switch(r.detailedType){case"function":l=a?l||n.ObjectView.TreeViewUtils.ConsoleUITypeStrings.functionName:null;break;case"array":l=l||n.ObjectView.TreeViewUtils.ConsoleUITypeStrings.arrayName;break;default:l=l||n.ObjectView.TreeViewUtils.ConsoleUITypeStrings.objectName}}t.call(this,r.inputId,s.value,r.isExpandable,b,!a,l,h,s.htmlLines,y,o,e);this._originalObject=r;Array.isArray(r.value)?(this.children=this.createChildren(),this._hasLoadedChildren=!0):(this._remoteExpansionId=r.value,this._hasLoadedChildren=!1)}return __extends(r,t),Object.defineProperty(r.prototype,"viewableTypeFlags",{get:function(){return this._originalObject.isHtmlViewableType?2:0},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"typeEvaluationId",{get:function(){return this._remoteExpansionId||this._originalObject.uid},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isExpandable",{get:function(){return this._originalObject.isExpandable},enumerable:!0,configurable:!0}),r.prototype.getWatchExpression=function(){if(this.name!=="[functions]"&&this.name&&!(this.name.indexOf("...")>=0))return t.prototype.getWatchExpression.call(this)},r.prototype.getChildren=function(t,i){if(this.isExpandable){n.ToolWindowHelpers.codeMarker(n.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsExpandConsoleObjectBegin);var r=this.createOnExpansionCompleteWrapper(i);this._hasLoadedChildren?r():this.isStale||this.loadChildren(t,r)}},r.prototype.getCopyText=function(n){var t,u,f,e,r,o;n===void 0&&(n="");t=n;switch(this._originalObject.detailedType){case"array":case"object":if(u="{",f="}",this._originalObject.detailedType==="array"&&(u="[",f="]"),this.children&&this.children.length!==0){for(t+=u+"\r\n",e=n+i.TextCopyIndent,r=0;r<this.children.length;r++)o=this.children[r],r!==0&&(t+=",\r\n"),t+=e+o.name+": "+o.getCopyText(e).trim();t+="\r\n"+n+f}else t+=u+" "+f;break;case"string":t+=this._originalObject&&this._originalObject.value?this._originalObject.value:this.value;break;case"function":t+=this.value.replace(/(&nbsp;)/g," ");break;default:t+=this.value}return t},r.prototype.buildWatchExpressionForChild=function(n,t){var i;return t&&(i=n==="[functions]"||n.indexOf("...")>=0?t:isNaN(parseInt(n))?t+"."+n:t+"["+n+"]"),i},r.prototype.createChildren=function(){var e=this._originalObject,o,t,i,c;for(this._sortedPropertyNames||(this._sortedPropertyNames=n.ToolWindowHelpers.getSortedArrayProperties(e.value,"propertyName")),t=[],i=0;i<this._sortedPropertyNames.length;i++){var s=this._sortedPropertyNames[i],u=e.value[s].propertyName,f=e.value[s].propertyValue,h=this.buildWatchExpressionForChild(u,this.getWatchExpression());u==="[functions]"&&f.isInternalProperty&&typeof f.isInternalProperty=="boolean"?o=new r(f,this.target,u,h,this.notifyType):(c=new r(f,this.target,u,h,this.notifyType),t.push(c))}return o&&t.unshift(o),t},r.prototype.loadChildren=function(n,t){var i=this;n("getObjectChildren",[this._remoteExpansionId],function(n){i._originalObject.value=n?n.isExpandable?n.value:[{propertyName:"undefined",propertyValue:{detailedType:"undefined"}}]:[{propertyName:"undefined",propertyValue:{detailedType:"undefined"}}];i.children=i.createChildren();i._hasLoadedChildren=!0;t()})},r.prototype.createOnExpansionCompleteWrapper=function(t){var i=this;return function(){t(i.children);n.ToolWindowHelpers.codeMarker(n.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsExpandConsoleObjectEnd)}},r}(r);t.TreeViewObjectItem=l;u=function(t){function r(r,u,f,o,s,h,c){var y,p,a,w,v,l,b,k;if(s===void 0&&(s=0),h===void 0&&(h=!1),this.target=u,f&&f.localizeId)try{f.text=n.ToolWindowHelpers.loadString(f.localizeId)}catch(d){}r?(y=r.inputId,p=r.value.uid,a=r.value.hasChildren,w=r.value,v=!0):(y="-1",p=f.uid,a=f.hasChildren,w=f,v=!1);l=i.getHtmlTreeLines(w,o);a&&(this._footerLine=l.htmlLines.pop());this._headerText=l.headerText;this._footerText=l.footerText;b="consoleItemOutput";h&&s!==0&&(k=e.getNotifyTypeString(s),b+=" "+k);t.call(this,y,l.headerText+l.footerText,a,v,v,null,b,l.htmlLines,null,s,c);this._originalObject=r||f;this._remoteExpansionId=p;this._isExpandable=a}return __extends(r,t),Object.defineProperty(r.prototype,"viewableTypeFlags",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"typeEvaluationId",{get:function(){return this._originalObject.value?this._originalObject.value.uid:this._originalObject.uid},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"uidChain",{get:function(){if(this._originalObject)if(this._originalObject.tag||this._originalObject.value&&this._originalObject.value.tag){if(this._originalObject.uid!=="")return this._originalObject.uid}else if(this._originalObject.parentUid)return this._originalObject.parentUid;return null},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isExpandable",{get:function(){return this._isExpandable},enumerable:!0,configurable:!0}),r.prototype.getChildren=function(t,i){if(this.isExpandable){n.ToolWindowHelpers.codeMarker(n.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsExpandConsoleObjectBegin);var r=this.createOnExpansionCompleteWrapper(i);this._hasLoadedChildren?r():this.loadChildren(t,r)}},r.prototype.getCopyText=function(n){var t,u,r,f;if(n===void 0&&(n=""),t=n,t+=this._headerText,this.children&&this.children.length!==0){for(u=n+i.TextCopyIndent,r=0;r<this.children.length;r++)f=this.children[r],t+="\r\n"+u+f.getCopyText(u);t+="\r\n"+n+this._footerText}else t+=this._footerText;return t},r.prototype.createChildren=function(n){for(var t,o,s,e=this._originalObject.value?this._originalObject.value:this._originalObject,h=e.tag==="NodeList"||e.tag==="HtmlCollection",f=[],u=0;u<n.length;u++)(t=n[u],t.tag||t.text&&/\S/.test(t.text))&&(o=new r(null,this.target,t,h?u:undefined,this.notifyType),f.push(o));return s=new i(this._footerText,!1,!1,!1,null,"consoleItemOutput",[this._footerLine],null,this.notifyType),f.push(s),f},r.prototype.loadChildren=function(n,t){var i=this;n("getHtmlChildren",[this._remoteExpansionId],function(n){n||(n=[]);i.children=i.createChildren(n);i._hasLoadedChildren=!0;t()})},r.prototype.createOnExpansionCompleteWrapper=function(t){var i=this;return function(){t(i.children);n.ToolWindowHelpers.codeMarker(n.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsExpandConsoleObjectEnd)}},r}(r);t.TreeViewHtmlItem=u;f=function(t){function r(i){var e,o,c,tt,a,v,it,y,u,p,l,d,g,ht,w,ct;this._originalObject=i;var f={},nt=i.value,lt=nt.length;for(u=0;u<lt;u++)e=nt[u],o=e.strikeKey=r.getStrikeKey(e),f[o]||(f[o]=[],f[o].activeUid=null),f[o].push({index:u,uid:e.uid,style:e});for(c in f)for(f[c]=f[c].sort(function(n,t){return n.index>t.index}),tt=f[c].length,u=0;u<tt;u++)if(a=f[c],a[u].style.enabled){a.activeUid=a[0].uid;break}v=[];for(it in f)v.push({key:it});var rt=n.ToolWindowHelpers.getSortedArrayProperties(v,"key"),ut=[],at=rt.length;for(y=0;y<at;y++){var ft=v[rt[y]].key,b=f[ft],et=b.activeUid,k=[],ot,st,vt=b.length;for(u=0;u<vt;u++)p=b[u],p&&p.style&&(l=p.style,d=new h(l,et===l.uid),et===l.uid&&(ot=d.getHtmlContent(),st=l.value),k.push(d));for(g=new s(ft,ot,st,!1),ht=k.length,w=0;w<ht;w++)g.addChild(k[w]);ut.push(g)}this.children=ut;ct=n.ToolWindowHelpers.loadString("CSSTraceStyles");t.call(this,i.inputId,ct,i.isExpandable,!1)}return __extends(r,t),Object.defineProperty(r.prototype,"isExpandable",{get:function(){return this._originalObject.isExpandable},enumerable:!0,configurable:!0}),r.isColorProperty=function(n){if(!n||n.indexOf("color")===-1)return!1;switch(n.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!0}return!1},r.prototype.getChildren=function(n,t){t(this.children)},r.prototype.getCopyText=function(n){var r,u,t,f;for(n===void 0&&(n=""),r=n,u=n+i.TextCopyIndent,t=0;t<this.children.length;t++)f=this.children[t],r+="\r\n"+f.getCopyText(u);return r+"\r\n"},r.getStrikeKey=function(n){if(n.selector&&n.selector.indexOf("::")>=0){var t=n.selector.match(/::[\w\-]+/);if(t&&t.length===1)return t[0]+" "+n.property}return n.property},r}(r);t.TreeViewTraceStylesItem=f;e=function(t){function r(f){var v,e,d,o,y,it,c,rt,g,ut,l,s,p,w,nt,a,ft,b,tt,h,k;if(this.target=f.targetInfo,v=f.notifyType,typeof f.message=="object"?e=f.message:(d="undefined",f.message&&f.message.toString&&(d=f.message.toString()),e={message:d}),f.notifyType==="consoleItemCDContext"){v=r.getNotifyTypeString(3);try{e.message=n.ToolWindowHelpers.loadString("CDContextChanged",[f.message])}catch(et){}}if(f.message&&f.message.localizeId)try{f.message.localizeId==="ConsoleTimerDisplay"&&(f.message.args[1]=Number(f.message.args[1]).toLocaleString());e.message=n.ToolWindowHelpers.loadString(f.message.localizeId,f.message.args||undefined)}catch(ot){}if(y="",typeof f.message=="object"&&(e.messageId||e.fileUrl||e.lineNumber||e.columnNumber)?(o={value:e.message,htmlLines:[]},it=n.EncodingUtilities.escapeHtmlAndPreserveWhitespace(e.message),e.messageId?(c=e.messageId,rt=e.message.substring(0,c.length),rt===c&&(g=n.EncodingUtilities.wrapInQuotes(n.EncodingUtilities.escapeHtml(r.createHelpLinkURL(c))),ut="<span class='BPT-HelpLink BPT-Tooltip-Item' data-linkKeyword='"+c+"' data-tooltip="+g+"  data-linkUrl="+g+">"+c+"<\/span>",o.htmlLines.push(ut+r.replaceURLsWithLinks(n.EncodingUtilities.escapeHtml(e.message.substring(c.length)))))):it.forEach(function(n){o.htmlLines.push(r.replaceURLsWithLinks(n))}),e.fileUrl?(l=r.parseLocationInfo(e.fileUrl,e.lineNumber,e.columnNumber),s="<span class='BPT-FileLink BPT-Tooltip-Item' role='link'",s+=" data-linkUrl="+l.url,s+=" data-linkLine='"+l.line+"'",s+=" data-linkCol='"+l.col+"'",e.originalFileUrl&&(p=r.parseLocationInfo(e.originalFileUrl,e.originalLineNumber,e.originalColumnNumber),s+=" data-originalLinkUrl="+p.url,s+=" data-originalLinkLine='"+p.line+"'",s+=" data-originalLinkCol='"+p.col+"'"),s+=" data-tooltip="+l.tooltip+">",s+=l.fileLabel+"<\/span>",o.htmlLines.push(s),y=l.fileLabel):(w=!1,nt=!1,e.lineNumber===null||isNaN(e.lineNumber)||(w=!0,e.columnNumber===null||isNaN(e.columnNumber)||(nt=!0)),a=null,w&&nt?a=n.EncodingUtilities.escapeHtml(n.ToolWindowHelpers.loadString("EventScriptPositionText",[e.lineNumber,e.columnNumber])):w&&(a=n.EncodingUtilities.escapeHtml(n.ToolWindowHelpers.loadString("ScriptErrorLine",[e.lineNumber]))),a&&(o.htmlLines.push("<span>"+a+"<\/span>"),y=a))):o=i.encodeValueForListItem(e.message,"string"),ft=o.htmlLines.length-1,this._originalObject=f,b=r.parseNotifyTypeString(f.notifyType),this._message=o.value,this._fileInfo=y,tt=null,f.message.viewableObject&&f.message.viewableObject.length)if(this.children=[],f.message.viewableObject.length===1&&f.message.viewableObject[0].uid!==f.message.viewableObject[0].value)if(h=this.createTreeViewItem(f.message.viewableObject[0],b),h instanceof u)this.children.push(h);else{this._originalTreeViewObjectItem=h;tt=h.name;v+=" "+v+"Expandable";switch(f.message.viewableObject[0].detailedType){case"regex":case"date":o.htmlLines[0]=n.EncodingUtilities.escapeHtml(h.value);break;default:o.htmlLines[0]=h.value}this.children=h.children}else for(k=0;k<f.message.viewableObject.length;k++)this.children.push(this.createTreeViewItem(f.message.viewableObject[k],b));t.call(this,f.inputId,o.value,this.isExpandable,!0,!0,tt,v,o.htmlLines,null,b,null,ft)}return __extends(r,t),r.replaceURLsWithLinks=function(n){var i=!1,r,t;return n.indexOf("<pre>")===0&&(n=n.replace("<pre>",""),n=n.substring(0,n.lastIndexOf("<\/pre>")),i=!0),r=/((https?:\/\/)|(www\.)|(ftp:\/\/)|(file:\/\/))(([.!?:,;\)\]\>\}]*)[^\s\)\]\>\}.!?:,]+)*/g,t=n.replace(r,function(n,t){var i=n,r;return i=t==="www."?"http://"+i:i,r=i,"<span class='BPT-IELink BPT-Tooltip-Item' data-linkUrl='"+i+"' data-tooltip='"+r+"'>"+n+"<\/span>"}),i?"<pre>"+t+"<\/pre>":t},r.createHelpLinkURL=function(n){return"http://msdn.microsoft.com/query/dev12.query?appId=Dev12IDEF1&l="+y.Culture.lang.toUpperCase()+"&k=k(VS.WebClient.Help."+n+")"},r.getNotifyTypeString=function(n){switch(n){case 1:return"consoleItemError";case 2:return"consoleItemError";case 3:return"consoleItemInfo";case 4:return"consoleItemLog";case 5:return"consoleItemWarn";default:return null}},r.parseNotifyTypeString=function(n){switch(n){case"consoleItemError":return 2;case"consoleItemInfo":return 3;case"consoleItemCDContext":return 3;case"consoleItemLog":return 4;case"consoleItemWarn":return 5;default:return 0}},r.prototype.getCopyText=function(n){var t,u,r;if(n===void 0&&(n=""),t=n,t+=this._message,this._fileInfo&&(t+="\r\n"+n+this._fileInfo),u=n+i.TextCopyIndent,this._originalTreeViewObjectItem)t+="\r\n"+this._originalTreeViewObjectItem.getCopyText(u)+"\r\n";else if(this.children&&this.children.length>0){for(r=0;r<this.children.length;r++)t+="\r\n"+this.children[r].getCopyText(u);t+="\r\n"}return t},r.prototype.getChildren=function(n,t){t(this.children)},r.prototype.createTreeViewItem=function(t,i){return t.detailedType!=="htmlElement"?new n.ObjectView.TreeViewObjectItem(t,this.target,null,null,i):new n.ObjectView.TreeViewHtmlItem(t,this.target,null,null,i)},r.parseLocationInfo=function(t,i,r){var s=n.EncodingUtilities.wrapInQuotes(n.EncodingUtilities.escapeHtml(t)),f=!1,u,e,o;return i===null||isNaN(i)||((r===null||isNaN(r))&&(r=1),f=!0),u=n.ToolWindowHelpers.createShortenedUrlText(t),e=n.EncodingUtilities.wrapInQuotes(n.EncodingUtilities.escapeHtml(t)),o=f?n.EncodingUtilities.escapeHtml(n.FormattingHelpers.fileLineColumnFormat(u,i,r)):n.EncodingUtilities.escapeHtml(u),{url:s,line:i,col:r,tooltip:e,fileLabel:o}},r}(r);t.TreeViewNotifyItem=e;o=function(n){function t(t,r,u,f){t===void 0&&(t="");u===void 0&&(u=null);var e=i.encodeValueForListItem(t,"string",!1,!0),o=u?i.encodeValueForListItem(u,"string",!1,!0).value:null;n.call(this,e.value,!0,!1,!0,o,"consoleOutputInput",f||e.htmlLines);this._title=t;this._isInitialCollapsed=!!r;this._children=[]}return __extends(t,n),Object.defineProperty(t.prototype,"isExpandable",{get:function(){return this._children&&this._children.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasChildren",{get:function(){return this._children&&this._children.length>0},enumerable:!0,configurable:!0}),t.prototype.getChildren=function(n,t){t(this._children)},t.prototype.addChild=function(n,t){if(t){var i=this._children.indexOf(t);i>-1?this._children.splice(i+1,0,n):this._children.push(n)}else this._children.push(n)},t.prototype.getCopyText=function(n,t,r){var o,u,f,e;for(n===void 0&&(n=""),o=r?n="":n+i.TextCopyIndent,u=n,this._title&&this._title.length>0&&(u+=this._title+"\r\n"),f=0;f<this._children.length;f++)e=this._children[f],t||(t=function(){return!0}),t(e)&&(u+=e.getCopyText(o)+"\r\n");return u},t.prototype.isItemInGroup=function(n){return this._children.indexOf(n)>-1},t.prototype.isFirstUIChildNeeded=function(){return this._children.length===0&&!this._isInitialCollapsed},t}(i);t.TreeViewGroupItem=o;s=function(n){function t(t,i,r,u){n.call(this,null,u,t,i);this._propertyName=t;this._propertyValueHtml=i.length>0?i[0]:"";this._propertyValue=r}return __extends(t,n),t.prototype.getCopyText=function(n){return n===void 0&&(n=""),n+this._propertyName+": "+this._propertyValue+";\r\n"},t}(o);t.TreeViewCssStyleGroup=s;h=function(n){function t(t,i){var u=f.isColorProperty(t.property)?"<span class='Console-ColorThumbnail' style='background-color: "+t.value+"' title='"+t.value+"'><\/span>":"",e=(t.inherited?"<"+t.inherited.toLowerCase()+"> ":"")+t.selector,r=[u+"<span class='Console-StyleItem-Value Console-Html-CSS-Value' >"+t.value+"<\/span>"],o=(i?"":" Console-Style-Disabled ")+"Console-Html-CSS-Selector";n.call(this,null,!1,!1,!1,e,o,r);this._html=r;this._styleObject=t}return __extends(t,n),t.prototype.getHtmlContent=function(){return this._html},t.prototype.getCopyText=function(n){return n===void 0&&(n=""),n+this._styleObject.selector+" {\r\n   "+this._styleObject.property.toLowerCase()+": "+this._styleObject.value+"\r\n}\r\n"},t}(i);t.TreeViewStyleItem=h;a=function(n){function t(t){var i=t.message.name;i||(i="");n.call(this,t.inputId,t.message.message,!1,!1,!1,i+":",null,null)}return __extends(t,n),t}(r);t.TreeViewCountItem=a;v=function(t){function i(){var i=n.ToolWindowHelpers.loadString("ConsoleNavigationSeparatorLabel");t.call(this,i,!1,!1,!1,null,null,[""])}return __extends(i,t),Object.defineProperty(i.prototype,"isSeparator",{get:function(){return!0},enumerable:!0,configurable:!0}),i}(i);t.TreeViewSeparatorItem=v})(t=n.ObjectView||(n.ObjectView={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,r=function(){function n(n){if(this._proxy=n,!this._proxy)throw new Error(t.Resources.getErrorString("JSPerf.1055"))}return n.prototype.startSession=function(n,r,u){var f=this;return new t.Promise(function(t,e){f._proxy.startSession(n,r,u,function(n){t(new i(n))},function(n){e&&e(new Error(n.toString()))})})},n.prototype.stopCollection=function(){this._proxy.stopCollection()},n}(),i;n.F12EtwDataCollector=r;i=function(){function n(n){this._proxy=n}return n.prototype.stop=function(){var n=this;return new t.Promise(function(t,i){n._proxy.stop(function(n){t(n)},function(n){i&&i(new Error("Error: "+n))})})},n.prototype.getGraphDataUpdate=function(n){var i=this;return new t.Promise(function(t,r){i._proxy.getGraphDataUpdate(n,function(n){t(n)},function(n){r&&r(new Error("Error: "+n))})})},n.prototype.sendStringToCollectionAgent=function(n){var i=this;return new t.Promise(function(t,r){i._proxy.sendStringToCollectionAgent(n,function(n){t(n)},function(n){r&&r(new Error("Error: "+n))})})},n.prototype.addEventListener=function(n,t){this._proxy.addEventListener(n,t)},n.prototype.removeEventListener=function(n,t){this._proxy.removeEventListener(n,t)},n.prototype.isEventListenerAttached=function(n,t){return this._proxy.isEventListenerAttached(n,t)},n.prototype.removeAllEventListeners=function(){this._proxy.removeAllEventListeners()},n}();n.F12EtwDataCollectorSession=i})(t=n.Data||(n.Data={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(n){function i(t){var i=this;n.call(this,t);this.rootElement.addEventListener("click",function(n){return i.onClick(n)});this.rootElement.addEventListener("keydown",function(n){return i.onKeydown(n)});this.rootElement.addEventListener("mousedown",function(n){return i.onMouseDown(n)});this.rootElement.addEventListener("mouseup",function(n){return i.onMouseUpLeave(n)});this.rootElement.addEventListener("mouseleave",function(n){return i.onMouseUpLeave(n)})}return __extends(i,n),Object.defineProperty(i.prototype,"click",{get:function(){return this._onClick},set:function(n){this._onClick=n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"content",{get:function(){return this.rootElement.innerHTML},set:function(n){this.rootElement.innerHTML=n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltip",{get:function(){return this._tooltip},set:function(n){var i=this;this._tooltip=n;this.rootElement.onmouseover=function(){return t.Tooltip.show({content:i._tooltip}),!0}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"disabled",{get:function(){return this.rootElement.disabled},set:function(n){this.rootElement.disabled=n},enumerable:!0,configurable:!0}),i.prototype.onClick=function(){this.rootElement.focus();this._onClick&&this._onClick()},i.prototype.onKeydown=function(n){(n.keyCode===32||n.keyCode===13)&&(this._onClick&&this._onClick(),n.preventDefault())},i.prototype.onMouseDown=function(){this.disabled||this.rootElement.classList.add("BPT-ToolbarButton-MouseDown")},i.prototype.onMouseUpLeave=function(){this.rootElement.classList.remove("BPT-ToolbarButton-MouseDown")},i}(n.Control);n.Button=i})(t=n.Legacy||(n.Legacy={}))})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(n){function t(i){var r=this;n.call(this,i);this._radioButtonElement=this.rootElement;t.RadioButtons.push(this);this.rootElement.addEventListener("click",function(n){return r.onCheck(n)});this.updateAriaProperties()}return __extends(t,n),Object.defineProperty(t.prototype,"check",{get:function(){return this._onCheck},set:function(n){this._onCheck=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this._radioButtonElement.checked},set:function(n){this._radioButtonElement.checked=n;this.updateAriaProperties()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.rootElement.disabled},set:function(n){this.rootElement.disabled=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"groupName",{get:function(){return this._radioButtonElement.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"focusableElement",{get:function(){return this._radioButtonElement},enumerable:!0,configurable:!0}),t.prototype.onCheck=function(){var n,i;if(this.checked)for(this.rootElement.focus(),this._onCheck&&this._onCheck(),n=0;n<t.RadioButtons.length;++n)i=t.RadioButtons[n],i!==this&&i.groupName===this.groupName&&i.updateAriaProperties();this.updateAriaProperties()},t.prototype.updateAriaProperties=function(){this.rootElement.setAttribute("aria-checked",""+this.checked)},t.RadioButtons=[],t}(n.Control);n.RadioButton=t})(t=n.Legacy||(n.Legacy={}))})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(n){function t(t){var i=this;n.call(this,t);F12.Tools.Utility.Assert.areEqual(this.rootElement.getAttribute("role"),"button","Missing button role");this.rootElement.addEventListener("DOMAttrModified",function(n){if(n.attrName==="aria-pressed"){var t=n.newValue==="true";i.rootElement.setAttribute("selected",""+t);i._onSelectChanged&&n.newValue!==n.prevValue&&i._onSelectChanged(t)}});this.selected=this.selected}return __extends(t,n),Object.defineProperty(t.prototype,"selectedChanged",{get:function(){return this._onSelectChanged},set:function(n){this._onSelectChanged=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return this.rootElement.getAttribute("aria-pressed")==="true"},set:function(n){this.rootElement.setAttribute("aria-pressed",""+n)},enumerable:!0,configurable:!0}),t.prototype.onClick=function(t){n.prototype.onClick.call(this,t);this.selected=!this.selected},t.prototype.onKeydown=function(t){(t.keyCode===32||t.keyCode===13)&&(n.prototype.onKeydown.call(this,t),this.selected=!this.selected,t.preventDefault())},t}(n.Button);n.ToggleButton=t})(t=n.Legacy||(n.Legacy={}))})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(n){function t(i){var r=this,u;n.call(this,i);this._idPostfix=t.GlobalIdPostfix++;u="textBoxDataList"+this._idPostfix;this._inputElement=document.createElement("input");this._inputElement.type="text";this._inputElement.setAttribute("list",u);this._inputElement.addEventListener("input",function(n){return r.onInput(n)});this._inputElement.addEventListener("keydown",function(n){return r.onKeydown(n)});this._inputElement.addEventListener("change",function(n){return r.onChange(n)});this._dataListElement=document.createElement("datalist");this._dataListElement.id=u;this._optionElements=null;this.rootElement.appendChild(this._inputElement);this.rootElement.appendChild(this._dataListElement)}return __extends(t,n),Object.defineProperty(t.prototype,"items",{get:function(){return this._items},set:function(n){var t,i;for(this.clearItems(),this._optionElements=[],t=0;t<n.length;++t)i=document.createElement("option"),i.text=n[t].text,this._optionElements.push(i),this._dataListElement.appendChild(i)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"text",{get:function(){return this._inputElement.value},set:function(n){this._inputElement.value=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textChanged",{get:function(){return this._valueChanged},set:function(n){this._valueChanged=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textCommitted",{get:function(){return this._valueCommitted},set:function(n){this._valueCommitted=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"focusableElement",{get:function(){return this._inputElement},enumerable:!0,configurable:!0}),t.prototype.clearItems=function(){if(this._optionElements){for(var n=0;n<this._optionElements.length;++n)this._dataListElement.removeChild(this._optionElements[n]);this._optionElements=null}},t.prototype.onInput=function(){this.textChanged&&this.textChanged(this.text)},t.prototype.onKeydown=function(n){var t=this;n.keyCode===13&&window.setImmediate(function(){t.textCommitted&&t.textCommitted(t.text)})},t.prototype.onChange=function(){this.textCommitted&&this.textCommitted(this.text)},t.GlobalIdPostfix=1,t}(n.Control);n.DataListTextBox=t})(t=n.Legacy||(n.Legacy={}))})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var u=function(){function t(n,t,i,r,u){var f=this;this._ourIdentifier=n;this._nextId=0;this._promiseTable={};this._jsonRpcMethodReceive=t;this._jsonRpcNotificationReceive=i;this._postMessage=r;Date.now||(Date.now=function(){return+new Date});this._startTime=Date.now();u(function(n){f.onMessage(n)})}return t.prototype.jsonRpcMethodCall=function(n,t,r,u,f){var s=this,o=this._ourIdentifier+"|"+this._nextId,e;return this._nextId++,this._promiseTable[o]={completed:r,error:u},e=JSON.stringify({id:o,method:n,params:t}),this.logTraffic(e),i.RandomDelay?(i.queueData(function(){s._postMessage(e,f)},e),!0):this._postMessage(e,f)},t.prototype.jsonRpcNotification=function(n,t,r){var f=this,e=this._ourIdentifier+"|NULL",u=JSON.stringify({id:e,method:n,params:t});this.logTraffic(u);i.RandomDelay?i.queueData(function(){f._postMessage(u,r)},u):this._postMessage(u,r)},t.prototype.logTraffic=function(n){if(isDebugBuild){var t=("  "+(Date.now()-this._startTime)/1e3).slice(-9);__rpcLog.push(t+" | "+n);__rpcLog.length>100&&__rpcLog.shift()}},t.prototype.onMessage=function(t){var f=this,r,u;this.logTraffic(t.data);r=JSON.parse(t.data);u=r.id.split("|");n.Utility.Assert.areEqual(u.length,2);u[1]==="NULL"?u[0]!==this._ourIdentifier&&this._jsonRpcNotificationReceive(r.method,r.params):u[0]===this._ourIdentifier?i.RandomDelay?i.queueData(function(){f.handleReply(r)},t.data):this.handleReply(r):i.RandomDelay?i.queueData(function(){f.handleCall(r)},t.data):this.handleCall(r)},t.prototype.handleReply=function(t){if(!this._promiseTable[t.id]){n.Utility.Assert.failDebugOnly("Can't complete a promise that does not exist in the promise table. Probably a dup reply msg.");return}t.error?(n.Utility.Assert.isUndefined(t.data,"Can't have both data and error"),this._promiseTable[t.id].error(t.error)):this._promiseTable[t.id].completed(t.data);delete this._promiseTable[t.id]},t.prototype.handleCall=function(t){var i=this;this._jsonRpcMethodReceive(t.method,t.params,function(r,u){var f;r!==null&&r!==undefined?(n.Utility.Assert.isUndefined(u,"Can't have both data and error"),f=JSON.stringify({id:t.id,data:r})):(n.Utility.Assert.hasValue(u,"RPC call returned no value, but no error object either"),f=JSON.stringify({id:t.id,error:u}));i._postMessage(f)})},t}(),r,i;t.JsonRPCEndpoint=u;r=function(){function n(n,t){this.callback=n;this.message=t}return n}();t.RpcDelayData=r;i=function(){function n(){}return n.enableDelay=function(t,i){n.RandomDelay=!0;n.CalculateDelayTime=t;n.DelayedMessage=i},n.disableDelay=function(){n.RandomDelay=!1;n.RandomDelayTimeout&&(clearTimeout(n.RandomDelayTimeout),n.RandomDelayTimeout=null,n.clearQueue())},n.queueData=function(t,i){var f=new r(t,i),u;n.DelayedQueue.push(f);n.RandomDelayTimeout||(u=n.CalculateDelayTime(i),n.RandomDelayTimeout=setTimeout(n.fireRandomly,u))},n.fireRandomly=function(){var t=n.DelayedQueue.shift(),i;n.DelayedMessage(t.message);t.callback();n.DelayedQueue.length>0?(i=n.CalculateDelayTime(n.DelayedQueue[0].message),n.RandomDelayTimeout=setTimeout(n.fireRandomly,i)):n.RandomDelayTimeout=null},n.clearQueue=function(){for(var i,t=0;t<n.DelayedQueue.length;t++)i=n.DelayedQueue[t],n.DelayedMessage(i.message),i.callback();n.DelayedQueue=[]},n.RandomDelay=!1,n.DelayedQueue=[],n}();t.RpcDelayHook=i})(t=n.RPC||(n.RPC={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));isDebugBuild&&(__rpcLog=[]);
//! Copyright (C) Microsoft. All rights reserved.
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(){this._eventCallbacks={}}return n.prototype.addEventListener=function(n,t){var i=this._eventCallbacks[n];i||(this._eventCallbacks[n]=[],i=this._eventCallbacks[n]);i.push(t)},n.prototype.addOneTimeListener=function(n,t){var r=this,i=function(u){r.removeEventListener(n,i);t(u)};this.addEventListener(n,i)},n.prototype.removeEventListener=function(n,t){var i=this._eventCallbacks[n];i&&i.splice(i.indexOf(t),1)},n.prototype.fireEvent=function(n,t){var r,i;if(this._eventCallbacks[n])for(r=this._eventCallbacks[n].slice(0),i=0;i<r.length;i++)r[i](t)},n.prototype.fireEventForFirstListener=function(n,t){if(this._eventCallbacks[n]){var i=this._eventCallbacks[n].slice(0);i.length>0&&i[0](t)}},n}();n.EventHelperObject=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(n,t){this._container=n;this._elementCreator=t;this._index=null;this._elements=[];this._recycledElements=[]}return n.forDivWithClass=function(t,i){return new n(t,function(){var n=document.createElement("div");return n.className=i,n})},n.prototype.start=function(){this._index=0},n.prototype.getNext=function(){F12.Tools.Utility.Assert.isTrue(this._index!==null,"Invalid operation. Method 'start' must be called before calling getNext.");var n=this._elements[this._index];return n||(n=this._recycledElements.length>0?this._recycledElements.pop():this._elementCreator(),this._elements.push(n),this._container.appendChild(n)),this._index++,n},n.prototype.stop=function(){var n,t;if(this._index!==null){for(n=this._elements.length-1;n>=this._index;--n)t=this._elements.pop(),this._recycledElements.push(t),this._container.removeChild(t);this._index=null}},n.prototype.recycleAll=function(){for(var t,n=this._elements.length-1;n>=0;--n)t=this._elements.pop(),this._recycledElements.push(t),this._container.removeChild(t)},n.prototype.removeAll=function(){for(var t,n=this._elements.length-1;n>=0;--n)t=this._elements.pop(),this._container.removeChild(t);this._elements=[];this._recycledElements=[]},n}();n.ElementRecyclerFactory=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(){"use strict"})(t=n.Controls||(n.Controls={}))})(Common||(Common={}));
//! Copyright (C) Microsoft.\u00a0All rights reserved.
(function(n){var t;(function(){"use strict"})(t=n.Controls||(n.Controls={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(){"use strict"})(t=n.Controls||(n.Controls={}))})(Common||(Common={}));
//! Copyright (C) Microsoft.\u00a0All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=function(t){function i(i){t.call(this,i);this.hoverStateChangeEvent=new n.EventSource}return __extends(i,t),Object.defineProperty(i.prototype,"id",{get:function(){return this.item?this.item.id:null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isSelected",{get:function(){return this._isSelected},set:function(n){this._isSelected!==n&&(this._isSelected=n,this.updateStyle())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"item",{get:function(){return this._item},set:function(n){this._item=n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hasFocus",{get:function(){return this.id!==null&&this.id===i.FocusedContainerId},set:function(n){i.FocusedContainerId=n?this.id:null},enumerable:!0,configurable:!0}),i.prototype.clearHoverState=function(){this.rootElement.classList.remove(i.HOVER_CSS_CLASSNAME)},i.prototype.empty=function(){this.item=null;this.template&&(this.template.model=null);this._isSelected=null;this.updateStyle();this.rootElement.classList.remove("itemContainerHover")},i.prototype.focus=function(){this.isSelected=!0;this.hasFocus=!0;this.updateStyle();try{this.rootElement.setActive()}catch(n){}},i.prototype.onApplyTemplate=function(){var n=this;t.prototype.onApplyTemplate.call(this);this.rootElement.id="listItemContainer"+i.IdCount++;this.rootElement.className=i.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(){n.rootElement.classList.add(i.HOVER_CSS_CLASSNAME);n.hoverStateChangeEvent.invoke({hovering:!0,container:n})});this.rootElement.addEventListener("mouseleave",function(){n.rootElement.classList.remove(i.HOVER_CSS_CLASSNAME);n.hoverStateChangeEvent.invoke({hovering:!1,container:n})})},i.getRowHeight=function(){if(!i.RowHeight){var n=new i;document.body.appendChild(n.rootElement);i.RowHeight=n.rootElement.offsetHeight;document.body.removeChild(n.rootElement)}return i.RowHeight},i.prototype.updateStyle=function(){this._isSelected?(this.rootElement.tabIndex=this.selectedTabIndex||0,this.hasFocus?(this.rootElement.classList.add(i.SELECTED_ACTIVE_CSS_CLASSNAME),this.rootElement.classList.remove(i.SELECTED_CSS_CLASSNAME)):(this.rootElement.classList.add(i.SELECTED_CSS_CLASSNAME),this.rootElement.classList.remove(i.SELECTED_ACTIVE_CSS_CLASSNAME))):(this.rootElement.tabIndex=-1,this.rootElement.classList.remove(i.SELECTED_CSS_CLASSNAME),this.rootElement.classList.remove(i.SELECTED_ACTIVE_CSS_CLASSNAME))},i.prototype.onBlur=function(){this.hasFocus=!1;this.updateStyle()},i.prototype.onClick=function(n){n.target instanceof HTMLTextAreaElement||n.target instanceof HTMLInputElement||this.clicked&&(this.clicked(n),n.stopImmediatePropagation())},i.prototype.onContextMenu=function(){this.contextMenu&&this.contextMenu()},i.prototype.onFocus=function(){this.hasFocus=!0;this.updateStyle()},i.BASE_CSS_CLASSNAME="BPT-listItemContainer",i.HOVER_CSS_CLASSNAME="BPT-listItemContainerHover",i.SELECTED_CSS_CLASSNAME="BPT-listItemSelected",i.SELECTED_ACTIVE_CSS_CLASSNAME="BPT-listItemSelectedActive",i.IdCount=0,i}(n.TemplateControl);t.ItemContainer=i})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){"use strict";var i=function(){function i(){this._itemContainers={};this._unusedItemContainers=[];this.countChanged=new n.EventSource}return Object.defineProperty(i.prototype,"count",{get:function(){return this._dataSource?this._dataSource.count:0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"indentLevel",{get:function(){return this._dataSource?this._dataSource.indentLevel:0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"indentIndexStart",{get:function(){return this._dataSource?this._dataSource.indentIndexStart:0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"indentIndexEnd",{get:function(){return this._dataSource?this._dataSource.indentIndexEnd:0},enumerable:!0,configurable:!0}),i.prototype.setDataSource=function(n){this._dataSource!==n&&(this._dataSourceListChangedEventRegistration&&(this._dataSourceListChangedEventRegistration.unregister(),this._dataSourceListChangedEventRegistration=null),this._dataSource=n,this._currentIndex=null,this.recycleAll(),this._dataSource&&this._dataSource.listChanged&&(this._dataSourceListChangedEventRegistration=this._dataSource.listChanged.addHandler(this.onDataSourceListChanged.bind(this))),this.countChanged.invoke({action:2}))},i.prototype.startAt=function(n){this._dataSource&&(F12.Tools.Utility.Assert.isTrue(n>=0&&n<this._dataSource.count,"Index out of range."),this._currentIndex=n,this._dataSource.startAt(this._currentIndex))},i.prototype.stop=function(){return this._dataSource?(this._currentIndex=null,this._dataSource.stop()):n.PromiseUtilities.EmptyPromise},i.prototype.getItemContainerByIndex=function(n){return this._itemContainers[n]},i.prototype.getNext=function(){var n,t;return this._dataSource?(F12.Tools.Utility.Assert.isTrue(this._currentIndex!==null,"Invalid operation. startAt must be called before calling getNext."),n=null,this._currentIndex<this._dataSource.count&&(t=this._dataSource.getNext(),t&&(n=this._itemContainers[this._currentIndex],n?n.item!==t&&(n.empty(),n.item=t):(n=this.getItemContainer(this._currentIndex,t),this._itemContainers[this._currentIndex]=n),this._currentIndex+=1)),n):null},i.prototype.getItemContainerFromItemId=function(n){var i,t;for(i in this._itemContainers)if(t=this._itemContainers[i],t.id===n)return t;return null},i.prototype.recycle=function(n){var t=this._itemContainers[n];t&&(delete this._itemContainers[n],t.empty(),this._unusedItemContainers.push(t))},i.prototype.recycleAll=function(){var t,n;for(t in this._itemContainers)n=this._itemContainers[t],n&&(n.empty(),this._unusedItemContainers.push(n));this._itemContainers={}},i.prototype.reset=function(){this.recycleAll();this._unusedItemContainers=[]},i.prototype.newItemContainer=function(){return new t.ItemContainer},i.prototype.getItemContainer=function(n,t){var i;return i=this._unusedItemContainers.length>0?this._unusedItemContainers.pop():this.newItemContainer(),i.item=t,i},i.prototype.onDataSourceListChanged=function(n){this.countChanged.invoke(n)},i}();t.ItemContainerGenerator=i})(t=n.Controls||(n.Controls={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=function(i){function r(t){i.call(this,t||"Common.stackPanelTemplate");this.renderStartingEvent=new n.EventSource;this.renderCompletedEvent=new n.EventSource;this.children=[];this._requestScrollToOffset=null;this._scrollTopCached=null}return __extends(r,i),Object.defineProperty(r.prototype,"content",{get:function(){return this._content},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"itemContainerGenerator",{get:function(){return this._itemContainerGenerator},set:function(n){this._itemContainerGenerator!==n&&(this._itemContainerGenerator=n,this.onItemContainerGeneratorChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"rowHeight",{get:function(){if(!this._rowHeight){var n=new t.ItemContainer;this.content.appendChild(n.rootElement);this._rowHeight=n.rootElement.offsetHeight;this.content.removeChild(n.rootElement)}return this._rowHeight},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"charWidth",{get:function(){var n,i;return this._charWidth||(n=document.createElement("div"),n.textContent="H",n.style.height="auto",n.style.width="auto",n.style.position="absolute",i=new t.ItemContainer,i.rootElement.appendChild(n),this.content.appendChild(i.rootElement),this._charWidth=n.getBoundingClientRect().width,this.content.removeChild(i.rootElement)),this._charWidth},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"charHeight",{get:function(){var n,i;return this._charHeight||(n=document.createElement("div"),n.textContent="H",n.style.height="auto",n.style.width="auto",n.style.position="absolute",i=new t.ItemContainer,i.rootElement.appendChild(n),this.content.appendChild(i.rootElement),this._charHeight=n.getBoundingClientRect().height,this.content.removeChild(i.rootElement)),this._charHeight},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"viewportHeight",{get:function(){if(!this._viewportHeight){var n=this.rootElement.parentElement;F12.Tools.Utility.Assert.isTrue(!!n,"Trying to access the parent element when the panel is not attached to it.");this._viewportHeight=Math.floor(n.getBoundingClientRect().height)}return this._viewportHeight},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"viewportRowsCount",{get:function(){return this.rowHeight===0||isNaN(this.rowHeight)?0:Math.floor(this.viewportHeight/this.rowHeight)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"viewportWidth",{get:function(){return this._viewportWidth||(this._viewportWidth=this.content.clientWidth),this._viewportWidth},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"scrollHeight",{get:function(){return this.rootElement.scrollHeight},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"scrollTop",{get:function(){if(this._requestScrollToOffset!==null){var n=Math.min(this._requestScrollToOffset,this.scrollHeight-this.viewportHeight);return Math.max(0,n)}return this.scrollTopCached},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"scrollTopCached",{get:function(){return this._scrollTopCached===null&&(this._scrollTopCached=this.rootElement.scrollTop),this._scrollTopCached},enumerable:!0,configurable:!0}),r.prototype.getItemRowInfoFromRow=function(n){return{index:n,rowsSpan:1,topRow:n}},r.prototype.getItemRowInfoFromIndex=function(n){return{index:n,rowsSpan:1,topRow:n}},r.prototype.ensureVisible=function(n,t){var u=this.getItemRowInfoFromIndex(n),i;if(u){var r=u.topRow*this.rowHeight,f=r+(u.rowsSpan||1)*this.rowHeight,e=this.scrollTop,o=e+this.viewportHeight;(t||r<e||f>o)&&(t?(i=(r+f-this.viewportHeight)/2,i=Math.max(i,0),i=Math.min(i,this.scrollHeight-this.viewportHeight)):i=r<e?r:f-this.viewportHeight,this.scrollToOffset(i))}},r.prototype.getScrollViewportOffset=function(n){var i=parseInt(n.rootElement.style.top),r=this.scrollTop,u=this.viewportHeight,t=i-r;return t>0&&t<=u-this.rowHeight?t:0},r.prototype.invalidate=function(){var n=this;this.children.forEach(function(t){t&&n.templateBinder.unbind(t)});this.itemContainerGenerator.recycleAll();this.children=[]},r.prototype.invalidateScrollCache=function(){this._scrollTopCached=null},r.prototype.invalidateSizeCache=function(){this._viewportHeight=null;this._viewportWidth=null;this._charWidth=0;this._charHeight=0;this._rowHeight=0},r.prototype.isPartiallyVisible=function(n){var t=this.getItemRowInfoFromIndex(n);if(!t)return!1;var i=t.topRow*this.rowHeight,u=i+(t.rowsSpan||1)*this.rowHeight,r=this.scrollTop,f=r+this.viewportHeight;return u>r&&u<=f||i>=r&&i<f},r.prototype.render=function(){if(!this._isRendering&&this.templateBinder){this._isRendering=!0;this.renderStartingEvent.invoke(this);try{this.renderCoreOverride();this._requestScrollToOffset!==null&&(this.scrollTopCached!==this._requestScrollToOffset&&(this._scrollTopCached=null,this.rootElement.scrollTop=this._requestScrollToOffset),this._requestScrollToOffset=null)}finally{this._isRendering=!1;this.renderCompletedEvent.invoke(this)}}},r.prototype.renderCoreOverride=function(){var t=0,n;for(this.itemContainerGenerator.startAt(0),n=this.itemContainerGenerator.getNext();n;)this.templateBinder.bind(n,t++),this.rootElement.appendChild(n.rootElement),n=this.itemContainerGenerator.getNext();this.itemContainerGenerator.stop()},r.prototype.scrollToIndex=function(n,t,i){var r,u;t===void 0&&(t=0);r=this.getItemRowInfoFromIndex(n);r&&(u=r.topRow*this.rowHeight+t,this.scrollToOffset(u,i))},r.prototype.scrollToOffset=function(n,t){t?this._requestScrollToOffset=n:(this._requestScrollToOffset=null,this._scrollTopCached=null,this.rootElement.scrollTop=n,this._skipNextOnScroll=!0,this.render())},r.prototype.onApplyTemplate=function(){i.prototype.onApplyTemplate.call(this);this._content=this.getNamedElement("content");F12.Tools.Utility.Assert.isTrue(!!this._content,"Expecting a child element called 'content'");this.rootElement.addEventListener("scroll",this.onScroll.bind(this),!1)},r.prototype.onItemContainerGeneratorChanged=function(){},r.prototype.onScroll=function(n){if(this._scrollTopCached=null,this._skipNextOnScroll){this._skipNextOnScroll=!1;return}if((this._lastScrollTop!==n.srcElement.scrollTop||this._lastScrollHeight!==n.srcElement.scrollHeight||this._lastScrollLeft!==n.srcElement.scrollLeft||this._lastScrollWidth!==n.srcElement.scrollWidth)&&(this.render(),this._lastScrollTop=n.srcElement.scrollTop,this._lastScrollHeight=n.srcElement.scrollHeight,this._lastScrollLeft=n.srcElement.scrollLeft,this._lastScrollWidth=n.srcElement.scrollWidth,this.onScrolled))this.onScrolled(n)},r}(n.TemplateControl);t.StackPanel=i})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){"use strict";var t=function(t){function i(n){t.call(this,n||"Common.virtualizingStackPanelTemplate");this._firstVisibleItemIndex=0}return __extends(i,t),Object.defineProperty(i.prototype,"actualHeight",{get:function(){return this.viewportHeight},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"scrollHeight",{get:function(){return this.virtualHeight},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"virtualHeight",{get:function(){return this.rowHeight*this.itemContainerGenerator.count},enumerable:!0,configurable:!0}),i.prototype.renderCoreOverride=function(){var h=this,r,f,i,n,v,o,t,s,y;this.updateVirtualHeight();var p=this.getVisibleRowsScrollFraction(),c=Math.ceil(p),l=Math.ceil(c/4),a=this.getFirstVisibleRowScrollFraction(),w=Math.floor(Math.max(0,a-l)),e=Math.ceil(a+c+l),u=this.getItemRowInfoFromRow(w);if(u&&u.index<this.itemContainerGenerator.count){for(r=u.topRow,f=u.index,this._lastFirstTop=r*this.rowHeight,t=this._firstVisibleItemIndex;t<f;++t)this.removeItemContainerByIndex(t);for(this.itemContainerGenerator.startAt(f),i=f;i<=this.itemContainerGenerator.count&&r<e;++i){if(n=this.itemContainerGenerator.getNext(),!n)break;n.clearHoverState();this.templateBinder.bind(n,i);v=parseInt(n.rootElement.style.top)+(parseInt(n.rootElement.style.height)||this.rowHeight);v>parseInt(this._contentSizer.style.top)&&this.invalidateScrollCache();n.rootElement.style.top=r*this.rowHeight+"px";n.rootElement.style.height="";this.children[i]!==n&&(this.content.contains(n.rootElement)||this.content.appendChild(n.rootElement),this.children[i]=n);r=this.containerRenderedOverride(r,i,n)}for(e=this.allContainersRenderedOverride(u.topRow,r),this._lastBottomTop=e*this.rowHeight,this.itemContainerGenerator.stop(),o=i,t=o;t<=this._lastVisibleItemIndex;++t)this.removeItemContainerByIndex(t);this._firstVisibleItemIndex=f;this._lastVisibleItemIndex=o}this.itemContainerGenerator.count<this.children.length&&(s=this.itemContainerGenerator.count,y=this.children.splice(s,this.children.length-s),y.forEach(function(n,t){n&&h.templateBinder.unbind(n);h.itemContainerGenerator.recycle(t)}));this.removeOrphanElements();this.updateIndentLine()},i.prototype.scrollToOffset=function(n,i){i||this.updateVirtualHeight();t.prototype.scrollToOffset.call(this,n,i)},i.prototype.updateIndentLine=function(){var t=this.getSelectionIndentElement(),i=this.itemContainerGenerator,h=this.itemContainerGenerator.count,r=i.indentIndexStart,u=i.indentIndexEnd,f,e,o,s;r!==undefined&&r<h&&u!==undefined&&u<h&&this._firstVisibleItemIndex<u&&this._lastVisibleItemIndex>r?(this._firstVisibleItemIndex>=r?f=this._lastFirstTop:(e=i.getItemContainerByIndex(r),f=e?parseInt(e.rootElement.style.top,10):0),this._lastVisibleItemIndex<=u?o=this._lastBottomTop:(s=i.getItemContainerByIndex(u),o=s?parseInt(s.rootElement.style.top,10):f),t.style.top=f+this.rowHeight+"px",t.style.height=o-f+"px",t.style.marginLeft=(i.indentLevel+1)*n.TreeItemDataTemplate.INDENTATION_IN_PIXELS_DEFAULT+"px",this.content.appendChild(t)):t.parentNode&&t.parentNode.removeChild(t)},i.prototype.allContainersRenderedOverride=function(n,t){return t},i.prototype.containerRenderedOverride=function(n){return n+1},i.prototype.updateVirtualHeight=function(){this._contentSizer.style.top=this.virtualHeight+"px"},i.prototype.onApplyTemplate=function(){t.prototype.onApplyTemplate.call(this);this._contentSizer=this.getNamedElement("contentSizer");F12.Tools.Utility.Assert.isTrue(!!this._contentSizer,"Expecting a child element called 'content'")},i.prototype.getSelectionIndentElement=function(){return this._selectionIndentElement||(this._selectionIndentElement=document.createElement("div"),this._selectionIndentElement.classList.add("BPT-listItemSelectedIndent")),this._selectionIndentElement},i.prototype.getFirstVisibleRowScrollFraction=function(){return this.scrollTop/this.rowHeight},i.prototype.getVisibleRowsScrollFraction=function(){return this.viewportHeight/this.rowHeight},i.prototype.removeItemContainerByIndex=function(n){var t=this.children[n];t&&t.template&&t.template.isVirtualizingDisabled||(delete this.children[n],t&&this.templateBinder.unbind(t),this.itemContainerGenerator.recycle(n))},i.prototype.removeOrphanElements=function(){var i=new Set,n,t;for(this.children.forEach(function(n){i.add(n.rootElement)}),n=this.content.children.length-1;n>=0;--n)t=this.content.children[n],i.has(t)||this.content.removeChild(t)},i}(n.StackPanel);n.VirtualizingStackPanel=t})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){"use strict";var t=function(n){function t(t){n.call(this,t);this._previousWidth=null;this._previousCharWidth=null;this._rowsCount=null;this.resetRowSpans()}return __extends(t,n),Object.defineProperty(t.prototype,"virtualHeight",{get:function(){return this.updateViewportInfo(this.viewportWidth,this.charWidth,this.charHeight),this.rowHeight*this.rowsCount},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowsCount",{get:function(){return this._rowsCount===null&&this.refreshRowsCount(),this._rowsCount},enumerable:!0,configurable:!0}),t.prototype.allContainersRenderedOverride=function(n){var u=n,o,s,i,t,r,f;if(this._containersToReadjust.length>0){for(i=0;i<this._containersToReadjust.length;i++){var t=this._containersToReadjust[i],r=t.container,e=this._rowSpans[t.index];e?t.scrollHeight=e*this.rowHeight:(o=r.rootElement.scrollHeight,s=Math.ceil(o/this.rowHeight)*this.rowHeight,t.scrollHeight=s)}for(i=0;i<this._containersToReadjust.length;i++)t=this._containersToReadjust[i],r=t.container,r.rootElement.style.top=u*this.rowHeight+"px",r.rootElement.style.height=t.scrollHeight+"px",f=Math.ceil(t.scrollHeight/this.rowHeight),u+=f,this.updateRowSpan(t.index,f);this.updateVirtualHeight()}return u},t.prototype.containerRenderedOverride=function(n,t,i){this._containersToReadjust.push({index:t,container:i,scrollHeight:0});var r=this.getRowSpan(t);return n+r},t.prototype.ensureVisible=function(t,i){for(var r=0;r<2;r++)n.prototype.ensureVisible.call(this,t,i)},t.prototype.getItemRowInfoFromRow=function(n){if(this.itemContainerGenerator.count>0){for(var t=0,r=0,i=1;t<this.itemContainerGenerator.count;t++)if(i=this.getRowSpan(t),r+=i,r>n)break;return t===this.itemContainerGenerator.count&&t--,{index:t,topRow:r-i,rowsSpan:i}}return null},t.prototype.getItemRowInfoFromIndex=function(n){var r,t,i;if(n>=0&&n<this.itemContainerGenerator.count){for(r=0,i=0;i<n;i++)t=this.getRowSpan(i),r+=t;return t=this.getRowSpan(n),{index:n,topRow:r,rowsSpan:t}}return null},t.prototype.invalidate=function(){n.prototype.invalidate.call(this);this.resetRowSpans()},t.prototype.invalidateRowSpan=function(n){var i=this.getRowSpan(n),t;delete this._rowSpans[n];this._rowsCount!==null&&(t=i-1,this._rowsCount-=t)},t.prototype.onItemContainerGeneratorChanged=function(){if(this._itemContainerGeneratorCountChangedEventRegisteration&&(this._itemContainerGeneratorCountChangedEventRegisteration.unregister(),this._itemContainerGeneratorCountChangedEventRegisteration=null),this.itemContainerGenerator){this._itemContainerGeneratorCountChangedEventRegisteration=this.itemContainerGenerator.countChanged.addHandler(this.onItemContainerGeneratorCountChanged.bind(this));this.onItemContainerGeneratorCountChanged({action:2})}},t.prototype.renderCoreOverride=function(){this._containersToReadjust=[];n.prototype.renderCoreOverride.call(this)},t.prototype.scrollToIndex=function(t,i,r){var u,f;for(i===void 0&&(i=0),u=!1,f=0;f<2;f++)n.prototype.scrollToIndex.call(this,t,i,u),u=r},t.prototype.getRowSpan=function(n){return this._rowSpans[n]||1},t.prototype.onItemContainerGeneratorCountChanged=function(n){var t,r,u,i;if(n.rowSpanIndexToInvalidate!==null&&n.rowSpanIndexToInvalidate!==undefined)this.invalidateRowSpan(n.rowSpanIndexToInvalidate);else switch(n.action){case 0:t=[n.newStartingIndex,0];t.push.apply(t,new Array(n.newCount));this._rowSpans.splice.apply(this._rowSpans,t);this._rowsCount!==null&&(this._rowsCount+=n.newCount);break;case 1:for(r=this._rowSpans.splice(n.oldStartingIndex,n.oldCount),u=0,i=0;i<r.length;i++)u+=r[i]||1;this._rowsCount!==null&&(this._rowsCount-=u);break;default:this.resetRowSpans()}},t.prototype.refreshRowsCount=function(){this._rowsCount=this.itemContainerGenerator.count;this._rowSpans.length=this.itemContainerGenerator.count;this._rowsCount=this._rowSpans.reduce(function(n,t){return n+(t||1)-1},this._rowsCount)},t.prototype.resetRowSpans=function(){this._rowsCount=null;this._rowSpans=[]},t.prototype.updateRowSpan=function(n,t){var i,r;this._rowSpans.length!==this.itemContainerGenerator.count&&(F12.Tools.Utility.Assert.failDebugOnly("Detected a count mismatch between datasource ("+this.itemContainerGenerator.count+") and rowspans ("+this._rowSpans.length+")."),this.resetRowSpans(),this.refreshRowsCount());n>=0&&n<this.itemContainerGenerator.count&&(i=this.getRowSpan(n),this._rowSpans[n]=t,this._rowsCount===null?this.refreshRowsCount():(r=t-i,this._rowsCount+=r))},t.prototype.updateViewportInfo=function(n,t){(this._previousWidth!==n||this._previousCharWidth!==t)&&(this._previousWidth=n,this._previousCharWidth=t,this.resetRowSpans())},t}(n.VirtualizingStackPanel);n.VirtualizingMultiRowStackPanel=t})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=function(n){function t(t){n.call(this,t)}return __extends(t,n),t}(n.TemplateControl),u,r;t.ListItemDataTemplate=i,function(n){n[n.Up=-1]="Up";n[n.None=0]="None";n[n.Down=1]="Down"}(t.NextSelectDirection||(t.NextSelectDirection={}));u=t.NextSelectDirection;r=function(r){function u(t){r.call(this,t);this._invalidationDelayer=new n.Delayer;this._selectedItemVisibleIndex=-1;this.onDataItemTemplateChanged()}return __extends(u,r),Object.defineProperty(u.prototype,"ariaLabel",{get:function(){return this.rootElement.getAttribute("aria-label")},set:function(n){this.rootElement.setAttribute("aria-label",n)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"dataSource",{get:function(){return this._dataSource},set:function(n){var t=this;this._dataSource!==n&&(this.maintainSelectionAroundOperation(function(){t._listChangedEventRegistration&&t._listChangedEventRegistration.unregister();t._dataSource=n;t._itemContainerGenerator.setDataSource(t._dataSource);t._dataSource&&t._dataSource.listChanged&&(t._listChangedEventRegistration=t._dataSource.listChanged.addHandler(function(){return t.updateSelectedIndex()}))}),this.panel.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"itemContainerGenerator",{get:function(){return this._itemContainerGenerator},set:function(n){F12.Tools.Utility.Assert.isTrue(!!n,"Expecting a valid itemContainerGenerator");this._itemContainerGenerator=n;this._itemContainerGenerator.setDataSource(this.dataSource);this.panel&&(this.panel.itemContainerGenerator=this._itemContainerGenerator)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"panel",{get:function(){return this._panel},set:function(n){var t=this;this._panel!==n&&(this.maintainSelectionAroundOperation(function(){t._panel&&(t._panel.templateBinder=null,t._panel.itemContainerGenerator=null,t._panel.onScrolled=null,t.rootElement.contains(t._panel.rootElement)&&t.rootElement.removeChild(t._panel.rootElement));t._panel=n;t._panel&&(t._panel.templateBinder=t,t._panel.itemContainerGenerator=t._itemContainerGenerator,t._panel.onScrolled=function(n){if(t.onScrolled)t.onScrolled(n)},t.rootElement.appendChild(t._panel.rootElement))}),this.render(!0))},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"selectedIndex",{get:function(){return this._selectedItemVisibleIndex},set:function(n){n<0?this.selectedItem=null:this.setSelectedItemVisibleIndex(n,0)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"selectedItem",{get:function(){return this._selectedItem},set:function(n){if(this._selectedItem!==n||this._selectedItem&&n&&this._selectedItem.id!==n.id){var t=this.getSelectedItemContainer();t&&(t.isSelected=!1);this._selectedItem=n;this.updateSelectedIndex();this._selectedItemVisibleIndex>=0&&this.panel.ensureVisible(this._selectedItemVisibleIndex);t=this.getSelectedItemContainer(!0);t&&this.focusItemContainer(t);this.onSelectedItemChangedOverride(this._selectedItem);this.selectedItemChanged&&this.selectedItemChanged(this._selectedItem);this.panel.updateIndentLine()}},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"offsetLeft",{get:function(){return this._offsetLeft===null&&(this._offsetLeft=this.rootElement.offsetLeft),this._offsetLeft},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"offsetTop",{get:function(){return this._offsetTop===null&&(this._offsetTop=this.rootElement.offsetTop),this._offsetTop},enumerable:!0,configurable:!0}),u.initialize=function(){n.ObservableHelpers.defineProperty(u,u.DataItemTemplatePropertyName,i,function(n){return n.onDataItemTemplateChanged()})},u.prototype.bind=function(n,t){var r=n.item;if(!n.template){if(!this._dataItemTemplateConstruction)throw new Error("Expecting a data item template type.");n.rootElement.tabIndex=-1;n.template=this._dataItemTemplateConstruction.getNewControl();n.rootElement.appendChild(n.template.rootElement);n.template instanceof i&&(n.template.ownerListControl=this)}n.rootElement.setAttribute("data-id",n.id.toString());this.updateContainerOverride(n,t);n.clicked=this.onItemSelected.bind(this,n);n.contextMenu=this.onItemSelected.bind(this,n);n.isSelected=this._selectedItem&&n.id===this._selectedItem.id},u.prototype.cleanupContainerOverride=function(n){var t=n.template;t&&(t.model=null)},u.prototype.forceFocusToSelectedItem=function(){var n=this.getSelectedItemContainer(),t,i;n&&(t=n.item,t&&(i=this.getVisibleIndexOfItem(t),i>=0&&this.panel.isPartiallyVisible(i)&&n.focus()))},u.prototype.getItemContainerFromItem=function(n,t){var i=this._itemContainerGenerator.getItemContainerFromItemId(n.id);return!i&&t&&(this.scrollToItem(n),i=this._itemContainerGenerator.getItemContainerFromItemId(n.id)),i},u.prototype.getSelectedItemContainer=function(n){return this.selectedItem?this.getItemContainerFromItem(this.selectedItem,n):null},u.prototype.invalidate=function(n){n===void 0&&(n=!0);n&&this.panel.invalidate();this.panel.render();var t=this.panel.virtualHeight>this.panel.viewportHeight;t!==this._panelScrollBarShown&&(this._panelScrollBarShown=t,this.invalidateSizeCache());this.onInvalidated()},u.prototype.invalidateItemRowSpan=function(n){var i=this,u,r,f;n&&this.dataSource&&this.panel instanceof t.VirtualizingMultiRowStackPanel&&((u=this.panel,r=this.dataSource.indexOfItem(n.id),r<0)||(u.invalidateRowSpan(r),f=this._selectedItemVisibleIndex>=0&&this.panel.isPartiallyVisible(this._selectedItemVisibleIndex),this._invalidationDelayer.delay(function(){i.invalidate(!1);f&&i._selectedItemVisibleIndex>=0&&i.panel.ensureVisible(i._selectedItemVisibleIndex)})))},u.prototype.invalidateSizeCache=function(){this._offsetLeft=null;this._offsetTop=null;this.panel.invalidateSizeCache()},u.prototype.onApplyTemplate=function(){r.prototype.onApplyTemplate.call(this);this.rootElement.style.width="100%";this.rootElement.style.height="100%";this.rootElement.tabIndex=0;this.rootElement.addEventListener("keydown",this.onKeyDown.bind(this));this._itemContainerGenerator=new t.ItemContainerGenerator;this.panel=new t.VirtualizingStackPanel;this.invalidateSizeCache()},u.prototype.onInvalidated=function(){},u.prototype.onKeyDownOverride=function(n){var t=!0;switch(n.keyCode){case 38:this._selectedItemVisibleIndex<0?this.setSelectedItemVisibleIndex(0,1):this.selectPreviousItem();break;case 40:this._selectedItemVisibleIndex<0?this.setSelectedItemVisibleIndex(0,1):this.selectNextItem();break;case 33:this.selectPage(-1,-1);break;case 34:this.selectPage(1,1);break;case 36:this.selectHome();break;case 35:this.selectEnd();break;case 93:this.onShowContextMenu();break;case 121:!n.shiftKey||n.ctrlKey||n.altKey||this.onShowContextMenu();break;default:t=!1}return t},u.prototype.onSelectedItemChangedOverride=function(){},u.prototype.onShowContextMenu=function(){},u.prototype.onWindowResize=function(){this.invalidateSizeCache();this.invalidate()},u.prototype.render=function(n){n===void 0&&(n=!0);this.invalidate(n)},u.prototype.scrollToItem=function(n,t){var i=this.getVisibleIndexOfItem(n);i>=0&&this.panel.ensureVisible(i,t)},u.prototype.selectEnd=function(){this._selectedItemVisibleIndex<0||this.setSelectedItemVisibleIndex(this._itemContainerGenerator.count-1,-1)},u.prototype.selectHome=function(){this._selectedItemVisibleIndex<0||this.setSelectedItemVisibleIndex(0,1)},u.prototype.selectPreviousItem=function(){this._selectedItemVisibleIndex<0||this.setSelectedItemVisibleIndex(this._selectedItemVisibleIndex-1,-1)},u.prototype.selectPage=function(n,t){var i,u,r;this._selectedItemVisibleIndex<0||(this.panel.scrollToOffset(this.panel.scrollTop+n*this.panel.viewportRowsCount*this.panel.rowHeight),i=this.panel.getItemRowInfoFromIndex(this._selectedItemVisibleIndex),i&&(u=i.topRow+n*this.panel.viewportRowsCount,r=this.panel.getItemRowInfoFromRow(u),r&&this.setSelectedItemVisibleIndex(r.index,t)))},u.prototype.selectNextItem=function(){this._selectedItemVisibleIndex<0||this.setSelectedItemVisibleIndex(this._selectedItemVisibleIndex+1,1)},u.prototype.unbind=function(n){n.clicked=null;n.rootElement.removeAttribute("aria-label");this.cleanupContainerOverride(n)},u.prototype.updateContainerOverride=function(n){var i=n.item,t=n.template;t&&(t.model=i)},u.prototype.focusItemContainer=function(n){this.setItemContainerAriaLabel(n);n.focus()},u.prototype.getVisibleIndexOfItem=function(n){return this.dataSource?this.dataSource.indexOfItem(n.id):-1},u.prototype.maintainSelectionAroundOperation=function(n){var i=0,t;this._panel&&this._selectedItem&&this._itemContainerGenerator&&(t=this._itemContainerGenerator.getItemContainerFromItemId(this._selectedItem.id),t&&(i=this._panel.getScrollViewportOffset(t)));n();this._selectedItem?(this._selectedItemVisibleIndex=this.getVisibleIndexOfItem(this._selectedItem),this._selectedItemVisibleIndex<0?(this.selectedItem=null,this.panel.scrollToOffset(0,!0)):this.panel.scrollToIndex(this._selectedItemVisibleIndex,-i,!0)):this.panel.scrollToOffset(0,!0)},u.prototype.onDataItemTemplateChanged=function(){this._dataItemTemplateConstruction=null;this._dataItemTemplate&&(this._dataItemTemplateConstruction=n.ControlConstruction.createFromStringOrType(this._dataItemTemplate));this.itemContainerGenerator.reset();this.render(!0)},u.prototype.onKeyDown=function(n){var t=this.onKeyDownOverride(n);t&&(n.preventDefault(),n.stopPropagation())},u.prototype.onItemSelected=function(n,t){var i;i=t&&!t.altKey&&t.ctrlKey&&!t.shiftKey?!n.isSelected:!0;i?(n.item.clickSelectAlternative&&(n=this.getItemContainerFromItem(n.item.clickSelectAlternative,!0)),this.selectedItem=n.item,n.focus()):this.selectedItem=null},u.prototype.setItemContainerAriaLabel=function(n){if(n){var t,i=n.item;i&&this.onGetItemContainerAriaLabel&&(t=this.onGetItemContainerAriaLabel(n));t?n.rootElement.setAttribute("aria-label",t):n.rootElement.removeAttribute("aria-label")}},u.prototype.setSelectedItemVisibleIndex=function(n,t){for(var i=null,r=this._itemContainerGenerator.count,u=!0,f=!1,e=!1,o;u;)if(n<0&&(n=0,t&&(t=1,e=!0)),n>=r&&(n=r-1,t&&(t=-1,f=!0)),u=!1,f&&e||this._selectedItemVisibleIndex>=0&&this._selectedItemVisibleIndex===n)i=this.getSelectedItemContainer();else if(n>=0&&n<r&&(this._itemContainerGenerator.startAt(n),i=this._itemContainerGenerator.getNext(),this._itemContainerGenerator.stop(),i)){if(o=i.item,i.rootElement.parentElement||this._itemContainerGenerator.recycle(n),o.dontKeyboardSelect&&t){n+=t;u=!0;continue}this.selectedItem=o}return f&&e&&F12.Tools.Utility.Assert.fail("All elements in ListControl are not selectable."),i},u.prototype.updateSelectedIndex=function(){this._selectedItemVisibleIndex=this._selectedItem?this.getVisibleIndexOfItem(this._selectedItem):-1},u.DataItemTemplatePropertyName="dataItemTemplate",u}(n.TemplateControl);t.ListControl=r;r.initialize()})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var r=function(n){function t(i){n.call(this,i||"Common.defaultTreeItemDataTemplate");this.indentationInPixels=t.INDENTATION_IN_PIXELS_DEFAULT}return __extends(t,n),t.prototype.onApplyTemplate=function(){n.prototype.onApplyTemplate.call(this);this._expander=this.getNamedElement("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))},t.prototype.collapse=function(){if(this.model&&this.model.hasChildren&&!this._expander.classList.contains(t.COLLAPSED_CSS_CLASS)){this.onExpansionClicked(null);return!0}return!1},t.prototype.expand=function(){if(this.model&&this.model.hasChildren&&!this.model.areChildrenInline&&!this._expander.classList.contains(t.EXPANDED_CSS_CLASS)){this.onExpansionClicked(null);return!0}return!1},t.prototype.onModelChanged=function(){if(n.prototype.onModelChanged.call(this),this._modelPropertyChangedEventRegistration&&(this._modelPropertyChangedEventRegistration.unregister(),this._modelPropertyChangedEventRegistration=null),this.model){var t=this.model;t.propertyChanged&&(this._modelPropertyChangedEventRegistration=t.propertyChanged.addHandler(this.onModelPropertyChanged.bind(this)));this.updateIndentationStyle();this.updateExpanderCss()}},t.prototype.onModelPropertyChangedOverride=function(){},t.prototype.updateExpanderCss=function(){this.model&&this.model.hasChildren&&!this.model.areChildrenInline?(this._expander.classList.remove(t.NO_EXPANDER_CSS_CLASS),this.model.isExpanded?(this._expander.classList.remove(t.COLLAPSED_CSS_CLASS),this._expander.classList.add(t.EXPANDED_CSS_CLASS)):(this._expander.classList.remove(t.EXPANDED_CSS_CLASS),this._expander.classList.add(t.COLLAPSED_CSS_CLASS))):(this._expander.classList.remove(t.EXPANDED_CSS_CLASS),this._expander.classList.remove(t.COLLAPSED_CSS_CLASS),this._expander.classList.add(t.NO_EXPANDER_CSS_CLASS))},t.prototype.onModelPropertyChanged=function(n){switch(n){case"level":this.updateIndentationStyle();break;case"hasChildren":case"isExpanded":case"areChildrenInline":this.model&&this.model.isExpanded&&this.model.areChildrenInline&&this.collapse();this.updateExpanderCss()}this.onModelPropertyChangedOverride(n)},t.prototype.onExpansionClicked=function(n){n&&n.stopImmediatePropagation();this.expansionToggledCallback&&this.expansionToggledCallback()},t.prototype.onRootElementDblClicked=function(n){if(n&&n.srcElement&&n.srcElement===this._expander){n.stopImmediatePropagation();return}this.onExpansionClicked(n)},t.prototype.updateIndentationStyle=function(){this.model&&(this._expander.style.marginLeft=this.model.level*this.indentationInPixels+"px")},t.COLLAPSED_CSS_CLASS="BPT-itemCollapsed",t.INDENTATION_IN_PIXELS_DEFAULT=13,t.EXPANDED_CSS_CLASS="BPT-itemExpanded",t.NO_EXPANDER_CSS_CLASS="BPT-noExpander",t}(t.ListItemDataTemplate),i;t.TreeItemDataTemplate=r;i=function(t){function i(i){t.call(this,i);this.dataItemTemplate=n.Controls.TreeItemDataTemplate;this._onAriaExpandedModifiedHandler=this.onAriaExpandedModified.bind(this)}return __extends(i,t),i.prototype.onApplyTemplate=function(){t.prototype.onApplyTemplate.call(this);this.rootElement.setAttribute("role","tree")},i.prototype.updateContainerOverride=function(n,i){t.prototype.updateContainerOverride.call(this,n,i);var r=n.item,u=n.template;r&&u&&(n.rootElement.removeEventListener("DOMAttrModified",this._onAriaExpandedModifiedHandler),u.expansionToggledCallback=this.onExpansionToggled.bind(this,n,i),r.hasChildren?(n.rootElement.setAttribute("aria-expanded",r.isExpanded?"true":"false"),n.rootElement.addEventListener("DOMAttrModified",this._onAriaExpandedModifiedHandler)):n.rootElement.removeAttribute("aria-expanded"),n.rootElement.setAttribute("role","treeitem"))},i.prototype.onKeyDownOverride=function(n){var e=this,r=!1,f,u,i;switch(n.keyCode){case 39:i=this.getSelectedItemContainer();i&&(f=i.template,u=i.item,!f.expand()&&u.hasChildren&&(this.selectNextItem(),r=!0));break;case 37:i=this.getSelectedItemContainer();i&&(f=i.template,u=i.item,!f.collapse()&&u.level>0&&(this.dataSource.indexOfParent(u.id).done(function(n){n>=0&&(e.selectedIndex=n)}),r=!0));break;case 107:i=this.getSelectedItemContainer();i&&(i.template.expand(),r=!0);break;case 109:i=this.getSelectedItemContainer();i&&(i.template.collapse(),r=!0)}return r||(r=t.prototype.onKeyDownOverride.call(this,n)),r},i.prototype.cleanupContainerOverride=function(n){t.prototype.cleanupContainerOverride.call(this,n);var i=n.template;i&&(i.expansionToggledCallback=null);n.rootElement.removeEventListener("DOMAttrModified",this._onAriaExpandedModifiedHandler)},i.prototype.collapseItem=function(n){var t=this;return this.dataSource.collapseBranch(n).then(function(){return t.afterExpandCollapse()})},i.prototype.expandItem=function(n){var t=this;return this.dataSource.expandBranch(n).then(function(){return t.afterExpandCollapse()})},i.prototype.onAriaExpandedModified=function(n){var t;if(n.attrName==="aria-expanded"){var r=n.target,u=parseInt(r.getAttribute("data-id")),i=this.itemContainerGenerator.getItemContainerFromItemId(u);i&&(t=i.template,n.newValue==="true"?t.expand():t.collapse())}},i.prototype.onExpansionToggled=function(n,t){var i=n.item;this.selectedItem=i;i.isExpanded?this.collapseItem(t).done():this.expandItem(t).done()},i.prototype.afterExpandCollapse=function(){this.invalidate(!1);var n=this.getSelectedItemContainer();n&&n.focus()},i}(t.ListControl);t.TreeListControl=i})(t=n.Controls||(n.Controls={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var f,c,i,e,o,s,l,u,a,r,h,v;(function(n){var t=function(){function t(){}return t.stableReverse=function(n,t){for(var r,u,f=[],i=n.length-1;i>=0;i--){for(r=i-1;r>=0;r--)if(0!==t(n[r],n[i]))break;for(u=r+1;u<=i;u++)f.push(n[u]);i=r+1}for(i=0;i<f.length;i++)n[i]=f[i]},t.defaultComparer=function(n,t,i,r){var f=i[n.index],u=r[n.index];return typeof f=="undefined"||f===null?typeof u=="undefined"||u===null?0:-1:typeof u=="undefined"||u===null?1:f.toString().toLocaleUpperCase().localeCompare(u.toString().toLocaleUpperCase())},t.sortComparer=function(t,i,r,u){for(var f=0;f<t.length;f++){var o=t[f],s=i[f],h=s.comparer||n.TreeNodeSort.defaultComparer,e=h(s,o.order,r,u);if(e===0)continue;else return o.order==="desc"?-e:e}return 0},t}();n.TreeNodeSort=t})(f=t.Utility||(t.Utility={}));c=function(){function n(n,t,i){this.gridData=n;this.expandStates=t;this.toggleFunction=i}return n}();t.TreeInfo=c;i=function(){function n(n,t,i,r,u,f,e,o){this.index=n;this.text=t;this.tooltip=i;this.width=r;this.canSortBy=u;this.getColumnValue=f;this.getCellCSSClass=e;this.comparer=o;this.hasHTMLContent=!1;this.hasMixedContent=!1}return Object.defineProperty(n.prototype,"percentWidth",{get:function(){return this._percentWidth},set:function(n){F12.Tools.Utility.Assert.isTrue(0<=n&&n<=1);this._percentWidth=n},enumerable:!0,configurable:!0}),n.MIN_RESIZE_WIDTH=60,n}();t.ColumnInfo=i;e=function(){function n(n,t){this.index=n;this.order=t}return n}();t.SortOrderInfo=e;o=function(){function n(n,t){this.data=n;this.expandState=t;this.children=[]}return n}();t.TreeNode=o;s=function(){function n(n,t){this.icon=n;this.checkbox=t}return n}();t.GutterOptions=s;l=function(){function n(n,t,i,r,u,f){this.childDataCallback=n;this.columns=t;this.sortOrders=i;this.allowMultiSelect=!1;this.allowSortOnMultiColumns=!1;this.asyncInit=!0;this.autoSort=!0;this.coreCssClass="grid";this.cssClass="";this.expandStates=[];this.extendViewportBy=3;this.gutter=new s;this.header=!1;this.height="100%";this.initialSelection=!1;this.keepSelection=!1;this.payloadSize=200;this.source=null;this.preEditCellCallback=r;this.commitEditCellCallback=u;this.postEditCellCallback=f;this.disableRightClickSelection=!0;this.isGridEnabled=!0;this.prerenderCallback=null;this.onRowToggleCallback=null;this.keyboardEventHandler=null;this.commitOnTab=!1;this.alwaysForceSort=!1}return n}();t.GridOptions=l;u=function(){function n(n,t){this.rowIndex=n;this.dataIndex=t}return n}();t.RowIndexInfo=u;a=function(){function n(n,t){this.width=n;this.height=t}return n}();r=function(){function n(n,t){this.start=n;this.end=t}return n}();t.Range=r;h=function(){function n(n,t,i,r){this.active=n;this.index=t;this.originalWidth=i;this.origin=r}return n}();t.ColumnSizing=h;v=function(s){function c(n,t){s.call(this,n);this._options=t;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=!1;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=!1;this._resetScroll=!1;this._ignoreScroll=!1;this._scrollTop=0;this._scrollLeft=0;this._cancelable=null;this._onAriaExpandedModifiedHandler=this.onAriaExpandedModified.bind(this);this.initialize()}return __extends(c,s),Object.defineProperty(c.prototype,"isVerticalScrollbarVisible",{get:function(){return this._canvasHeight<this._canvas.scrollHeight},enumerable:!0,configurable:!0}),c.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 a(300,400);this._takeMeasurements();this._getChildDataCallback=this._options.childDataCallback||null;this._commitEditCellCallback=this._options.commitEditCellCallback||null;this._options.asyncInit?window.setTimeout(function(){this._attachEvents()}.bind(this),10):this._attachEvents();this.initializeDataSource()},c.prototype.findClosestElement=function(n,t){for(var r=this._element.parentNode,i=n;i&&i!==r;){if(i.msMatchesSelector(t))return i;i=i.parentNode}return i},c.prototype.fireCustomEvent=function(n,t,i){var r=document.createEvent("Event");r.initEvent(t,!0,!0);r.customData=i;n.dispatchEvent(r)},c.prototype.onAriaExpandedModified=function(n){if(n.attrName==="aria-expanded"){var t=this.getRowInfoFromEvent(n,".grid-row");t&&this.tryToggle(n.newValue==="true",!1,t.dataIndex)}},c.prototype.createElementWithClass=function(n,t){var i=document.createElement(n);return t&&(i.className=t),i},c.expand=function(n){var u=[],i,t,r,e,f,o;if(n.length>0){for(i=[],t={level:1,origCount:n.length,remainingCount:n.length},i.push(t),r=0;r<n.length;){for(u.push(t.level),t.remainingCount--;t.remainingCount===0;){if(i.pop(),i.length==0)if(r===n.length-1)break;else throw new Error("invalid descendant counts, nesting not possible");if(e=i[i.length-1],e.remainingCount-=t.origCount,t=e,t.remainingCount<0)throw new Error("invalid descendant counts, cannot convert to indentation levels")}f=Math.abs(n[r]);f>0&&(o={level:u[u.length-1]+1,origCount:f,remainingCount:f},i.push(o),t=o);r++}if(i.length>0)throw new Error("invalid descendant counts, more input expected")}return u},c.addItemsToTree=function(n,t,i,r,u){for(var e,s,h=Math.min(i+r,n.length),f=i;f<h;f++)e=new o(n[f],t[f]),s=Math.abs(e.expandState),s>0&&(c.addItemsToTree(n,t,f+1,s,e),f+=s),u.children.push(e)},c.walkTree=function(n,t){var u,i,r,f;if(t&&(t(n),u=0,i=n.children,i&&(u=i.length)))for(r=0;r<u;r++)f=i[r],c.walkTree(f,t)},c.makeElementUnselectable=function(n){var i,t,r;for(n.setAttribute("unselectable","on"),i=n.querySelectorAll("*"),t=0;t<i.length;t++){r=i[t];switch(r.tagName){case"FRAME":case"IFRAME":case"TEXTAREA":case"INPUT":case"SELECT":break;default:r.setAttribute("unselectable","on")}}},c.toDecimalLocaleString=function(n,t,i){var y=function(n,t,i){for(var r=n.length;r<t;r++)n=i?"0"+n:n+"0";return n},f,c,o,r=n.toString(),u="";if(c=i?i.numberFormat:Sys.CultureInfo.CurrentCulture,o=r.split(/e/i),r=o[0],f=o.length>1?parseInt(o[1],10):0,o=r.split("."),r=o[0],u=o.length>1?o[1]:"",f>0?(u=y(u,f,!1),r+=u.slice(0,f),u=u.substr(f)):f<0&&(f=-f,r=y(r,f+1,!0),u=r.slice(-f,r.length)+u,r=r.slice(0,-f)),u.length>0&&(u=c.NumberDecimalSeparator+u),t===!0){for(var l=c.NumberGroupSizes,a=c.NumberGroupSeparator,s=l[0],v=1,e=r.length-1,h="";e>=0;){if(s===0||s>e)return h.length>0?r.slice(0,e+1)+a+h+u:r.slice(0,e+1)+u;h=h.length>0?r.slice(e-s+1,e+1)+a+h:r.slice(e-s+1,e+1);e-=s;v<l.length&&(s=l[v],v++)}return r.slice(0,e+1)+a+h+u}return r+u},c.convertValueToDisplayString=function(n,t){return n!=null?typeof n=="string"?n:n instanceof Date?n.localeFormat(t||"G"):typeof n=="number"?t?n.localeFormat(t):c.toDecimalLocaleString(n):typeof n=="boolean"?n?"True":"False":n.toString():""},c.prototype._getId=function(){return c.TYPE_NAME},c.prototype.getSelectionCount=function(){return this._selectionCount},Object.defineProperty(c.prototype,"expandedCount",{set:function(n){this._expandedCount=n;this._options.expandedCountChangedCallback&&this._options.expandedCountChangedCallback(this._expandedCount)},enumerable:!0,configurable:!0}),c.prototype.getExpandedCount=function(){return this._expandedCount},c.prototype.getElement=function(){return this._element},c.prototype._enhance=function(){this._buildDom()},c.prototype._buildDom=function(){var n=document.createDocumentFragment(),t=this._options.gutter,i=t&&(t.icon||t.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);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),n.appendChild(this._header));i&&(this._element.classList.add("has-gutter"),this._gutter=document.createElement("div"),this._gutter.className="grid-gutter",this._canvas.appendChild(this._gutter),this._header&&(this._gutterHeader=document.createElement("div"),this._gutterHeader.className="grid-gutter-header",this._header.appendChild(this._gutterHeader)));n.appendChild(this._canvas);this._element.appendChild(n)},c.prototype._attachEvents=function(){var n=this;window.addEventListener("resize",function(t){return n._onContainerResize(t)});this._element.addEventListener("mousedown",function(t){return n._onContainerMouseDown(t)});this._canvas.addEventListener("keydown",function(t){return n._onKeyDown(t)});this._canvas.addEventListener("mousedown",function(t){return n._onRowMouseDown(t)});this._canvas.addEventListener("dblclick",function(t){return n.onEditCell(t)});this._canvas.addEventListener("scroll",function(t){return n._onCanvasScroll(t)});this._canvas.addEventListener("selectstart",function(){return!1});this._header&&(this._header.addEventListener("mousedown",function(t){return n._onHeaderMouseDown(t)}),this._header.addEventListener("mouseup",function(t){return n._onHeaderMouseUp(t)}),this._header.addEventListener("click",function(t){return n._onHeaderClick(t)}),this._header.addEventListener("dblclick",function(t){return n._onHeaderDblClick(t)}));this._gutter&&(this._gutter.addEventListener("click",function(t){return n._onGutterClick(t)}),this._gutter.addEventListener("mouseover",function(t){var i=n.findClosestElement(t.target,".grid-gutter-row");i&&i.classList.add("grid-gutter-row-hover")}),this._gutter.addEventListener("mouseout",function(t){var i=n.findClosestElement(t.target,".grid-gutter-row");i&&i.classList.remove("grid-gutter-row-hover")}))},c.prototype._mergeExpandStates=function(n,t,i){var e=i.length-1,f,r,u;for(t.splice(n+1,1),r=0;r<=e;r++)t.splice(n+r+1,0,i[r]);for(f=0,r=n;r>=0;r--)u=t[r],Math.abs(u)>f?(t[r]=u<0?u-e:u+e,f=0):f++},c.prototype._takeMeasurements=function(){var f=this._options.coreCssClass,n,r,t,i,u;this._options.cssClass&&(f+=" "+this._options.cssClass);n=this.createElementWithClass("div",f);n.style.position="absolute";n.style.left="-5000px";n.style.top="-5000px";n.style.width="1000px";n.style.height="500px";document.body.appendChild(n);r=this.createElementWithClass("div","grid-row grid-row-normal");n.appendChild(r);t=this.createElementWithClass("div","grid-cell");t.style.width="100px";t.innerText="1";r.appendChild(t);this._measurements.rowHeight=r.offsetHeight;this._measurements.cellOffset=t.offsetWidth-100;i=this.createElementWithClass("div");i.style.overflow="hidden";i.style.width="1em";i.style.height="1ex";t.appendChild(i);this._measurements.unitEx=i.offsetHeight;u=this.createElementWithClass("div","grid-gutter");u.appendChild(this.createElementWithClass("div","grid-gutter-row grid-gutter-row-selected"));n.appendChild(u);this._measurements.gutterWidth=this._gutter?u.clientWidth:0;document.body.removeChild(n)},c.prototype.initializeDataSource=function(){if(this._resetScroll){this._ignoreScroll=!0;try{var n=this._canvas;n.scrollTop=0;n.scrollLeft=0;this._scrollLeft=0;this._scrollTop=0;this._resetScroll=!1}finally{this._ignoreScroll=!1}}this.setDataSource(this._options.source,this._options.expandStates,this._options.columns,this._options.sortOrders);this._expandedCount>0?this._options.keepSelection&&this._selectedIndex>=0?this._selectRow(Math.min(this._selectedIndex,this._expandedCount-1)):this._selectRow(this._options.initialSelection!==!1?0:-1):this.setSelectedRowIndex(-1)},c.prototype.setDataSource=function(n,t,i,r,u,f,e){var h=this,s,l,v,o,a;if(this._rowInfoMap={},this._dataSource=n||[],this._count=v=this._dataSource.length,t?(this._expandStates=t,this._indentLevels=c.expand(t)):(this._indentLevels=null,this._expandStates=null),this.expandedCount=v,this._updateRanges(),this._columns=[],i){var y=function(n,t,i,r,u,f,e){return h._drawCell(n,t,i,r,u,f,e)},p=function(n,t){return h._drawHeaderCellValue(n,t)},w=function(n,t,i){return h.getColumnValue(n,t,i)};for(s=0,l=i.length;s<l;s++)o=i[s],o.index=typeof o.index!="undefined"?o.index:String(s),o.canSortBy=o.canSortBy!==!1,o.canMove=o.canMove!==!1,o.width=typeof o.width!="undefined"?o.width:100,o.getCellContents=o.getCellContents||y,o.getHeaderCellContents=o.getHeaderCellContents||p,o.getColumnValue=o.getColumnValue||w,this._columns.push(o)}if(this._sortOrder=[],r)for(s=0,l=r.length;s<l;s++)a=r[s],a.order!=="desc"&&(a.order="asc"),this._sortOrder.push(a);this._clearSelection();this._determineIndentIndex();this._options.asyncInit?window.setImmediate(function(){h._layoutAfterSetDataSource(u,f,e)}):this._layoutAfterSetDataSource(u,f,e)},c.prototype.getDataSource=function(){return this._dataSource},c.prototype._layoutAfterSetDataSource=function(n,t,i){this.layout(undefined,t);this._ensureSelectedIndex(n);i&&this.scrollToBottom(function(){});this._selectRow(n,null,null,t===!0)},c.prototype._adjustForDynamicData=function(n,t,i){var r,u;if(this._options.isGridEnabled){for(this._dataSource.splice(i+1,1),r=0;r<n.length;r++)this._dataSource.splice(i+r+1,0,n[r]);this._mergeExpandStates(i,this._expandStates,t);u=this._dataSource.length;this._count=u;this._indentLevels=this._expandStates?c.expand(this._expandStates):null;this.expandedCount=u;this._updateRanges();this._clearSelection();this._determineIndentIndex();this._layoutAfterSetDataSource(this._getRowIndex(i))}},c.prototype._ensureSelectedIndex=function(n){var t=this._selectedIndex;typeof n=="number"&&(this._selectedIndex=n);this._selectedIndex>=0&&(this._count<=this._selectedIndex&&(this._selectedIndex=this._count-1),this._selectedIndex!==t&&this._addSelection(this._selectedIndex))},c.prototype.getRowInfo=function(n){return this._rows[n]},c.prototype.getRowData=function(n){return this._dataSource[n]},c.prototype.getColumns=function(){return this._columns||[]},c.prototype.getSortOrder=function(){return this._sortOrder||[]},c.prototype.insertAdditionalDynamicData=function(n,t){typeof n!="undefined"&&this._adjustForDynamicData(n.itemsWithPlaceholders,n.expandStates,t-1)},c.prototype._determineIndentIndex=function(){for(var t=this._columns,n=0,i=t.length;n<i;n++)if(t[n].indent){this._indentIndex=n;return}this._indentIndex=0},c.prototype._getDataIndex=function(n){var t,u,r=-1,f=this._visibleRange,i;if(n<0)return-1;for(t=0,u=f.length;t<u;t++)if(i=f[t],r+=i.end-i.start+1,n<=r)return i.end-r+n;return n},c.prototype._getRowIndex=function(n){for(var r=0,f=this._visibleRange,t,i=0,u=f.length;i<u;i++){if(t=f[i],n>=t.start){if(n<=t.end)return r+n-t.start}else break;r+=t.end-t.start+1}return-Math.max(0,r-1)},c.prototype._updateRanges=function(){var n=0,i=0,u=this._count,t=[],f=0,e;if(this._expandStates){while(n<u)e=this._expandStates[n],e<0?(t[t.length]=new r(i,n),f+=n-i+1,n+=1-e,i=n):n++;i<u&&(t[t.length]=new r(i,u-1),f+=u-i)}else f=u,t[t.length]=new r(0,f);this.expandedCount=f;this._visibleRange=t},c.prototype.expandNode=function(n){var r=this,t,i;if(this._options.isGridEnabled){if(this._options.onRowToggleCallback)this._options.onRowToggleCallback(this._dataSource,n,!0);this._dataSource[n+1].isPlaceholder&&this._getChildDataCallback(this._dataSource[n],function(t){typeof t!="undefined"&&r._adjustForDynamicData(t.itemsWithPlaceholders,t.expandStates,n)});this._expandStates&&(t=this._expandStates[n],t<0&&(this._expandStates[n]=-t,this._updateRanges(),i=this._rows[n],i&&(i.isDirty=!0)))}},c.prototype.collapseNode=function(n){var t,i;if(this._options.isGridEnabled){if(this._expandStates&&(t=this._expandStates[n],t>0)){if(this._options.onRowToggleCallback)this._options.onRowToggleCallback(this._dataSource,n,!1);this._expandStates[n]=-t;this._updateRanges();i=this._rows[n];i&&(i.isDirty=!0)}this.layout()}},c.prototype.expandAllNodes=function(){var n=0,f=this._count,t=this._expandStates,i=!1,e=this._rows,r,u;if(t){while(n<f)r=t[n],r<0&&(t[n]=-r,i=!0,u=e[n],u&&(u.isDirty=!0)),n++;i&&this._updateRanges()}return i},c.prototype.collapseAllNodes=function(){var n=0,f=this._count,t=this._expandStates,i=!1,e=this._rows,r,u;if(t){while(n<f)r=t[n],r>0&&(t[n]=-r,i=!0,u=e[n],u&&(u.isDirty=!0)),n++;i&&this._updateRanges()}return i},c.prototype.expandAll=function(){var n=this;this._updateExpansionStateAndRedraw(function(){return n.expandAllNodes})},c.prototype.collapseAll=function(){var n=this;this._updateExpansionStateAndRedraw(function(){return n.collapseAllNodes})},c.prototype._updateExpansionStateAndRedraw=function(n){var i,t=this._selectedIndex;t>=0&&(i=this._getDataIndex(t));n();t>=0&&(this._clearSelection(),this._addSelection(Math.abs(this._getRowIndex(i))));this._layoutContentSpacer();this._redraw();this._notifyForPrerender()},c.prototype.tryToggle=function(n,t,i){var u,r,f;if(!this._expandStates||this._selectedIndex<0||this._expandedCount<=0||(r=typeof i!="undefined"?i:this._getDataIndex(this._selectedIndex),f=this._rows[r],!f))return!1;if(u=this._expandStates[r],u!==0){if(n)if(u<0)this.expandNode(r);else return!1;else if(u>0)this.collapseNode(r);else return!1;return this._clearSelection(),this._addSelection(this._getRowIndex(r),null,null,!0),this._layoutContentSpacer(),this._redraw(),this._notifyForPrerender(),!0}return!1},c.prototype.layoutOnResize=function(){this._onContainerResize(undefined)},c.prototype._getVisibleRowIndices=function(){var n=this._scrollTop,r=n+this._canvasHeight,t=this._expandedCount-1,i=this._measurements.rowHeight;return{first:Math.min(t,Math.max(0,Math.ceil(n/i))),last:Math.min(t,Math.floor(r/i)-1)}},c.prototype._getRowIntoView=function(n,t){if(t)return this._canvas.scrollTop=Math.max(0,Math.min(n||0,this._expandedCount-1))*this._measurements.rowHeight,!0;var u=this._getVisibleRowIndices(),i=u.first,f=u.last,r=f-i;return n<i||n>f?(i=this._selectedIndex>i?Math.max(n-r,0):Math.max(0,Math.min(n+r,this._expandedCount-1)-r),this._canvas.scrollTop=i*this._measurements.rowHeight,!0):!1},c.prototype.getSelectedRowIntoView=function(n){return this._getRowIntoView(this._selectedIndex,n)},c.prototype.cacheRows=function(){},c.prototype._updateViewport=function(n,t){for(var h,l=this._count,o=[],s=[],e=[],a=this._expandStates||[],v=this._expandedCount-1,f=this.getViewPortRanges(),c=Math.max(0,f.start-this._options.payloadSize),y=Math.min(v,f.end+this._options.payloadSize),i=this._getDataIndex(c),p=f.start,r=c;r<=y&&i<l;r++)r<f.start?o[o.length]=new u(r,i):r>f.end?s[s.length]=new u(r,i):(e[e.length]=new u(r,i),p=r,this._lastRenderedDataIndex=i),h=a[i],h<0?i+=1-h:i++;this.measureColumnSize(t);this.cacheRows(o,e,s);this._drawRows(e,n)},c.prototype._cleanUpRows=function(){var t=this._rows,r=this._gutter,i,n;for(i in t)n=t[i],n.row.parentElement&&(n.row.parentElement.removeChild(n.row),delete this._rowInfoMap[n.row.id]),r&&n.gutterRow.parentElement&&n.gutterRow.parentElement.removeChild(n.gutterRow);this._rows={}},c.prototype._drawRows=function(n,t){var w=this._expandStates,b=0,tt=this._indentLevels,v=0,c=this._gutter,it=this._canvas,k,f,y,l,o,p,d,a,u,s,h,nt;for(this._editBoxControl&&(this._editBoxControl.dismiss(),this._editBoxControl=null),y=document.createDocumentFragment(),l=null,c&&(k=this._gutter,l=document.createDocumentFragment()),o=this._rows,p={},this._rows=p,d=n.length,a=0;a<d;a++){var g=n[a],e=g.rowIndex,r=g.dataIndex,i=o[r];i?(f=i.rowIndex!==e,f?(i.rowIndex=e,i.row.id="row_"+this._getId()+"_"+e,this._rowInfoMap[i.row.id]=i):(f=i.isDirty,delete i.isDirty),t&&(f=!0),delete o[r]):(f=!0,u=this.createElementWithClass("div","grid-row grid-row-normal"),u.id="row_"+this._getId()+"_"+e,u.setAttribute("role","row"),y.appendChild(u),s={rowIndex:e,dataIndex:r,row:u},c&&(h=this.createElementWithClass("div","grid-gutter-row grid-gutter-row-normal"),l.appendChild(h),h.id="gtr_"+u.id,this._rowInfoMap[h.id]=s,s.gutterRow=h),this._rowInfoMap[u.id]=s,i=s);p[r]=i;f&&(w&&(b=w[r],v=tt[r],i.row.setAttribute("aria-level",""+v)),this._updateRow(i,e,r,b,v))}for(nt in o)i=o[nt],c&&(delete this._rowInfoMap[i.gutterRow.id],i.gutterRow.parentElement.removeChild(i.gutterRow)),delete this._rowInfoMap[i.row.id],i.row.parentElement.removeChild(i.row);it.appendChild(y);c&&k.appendChild(l)},c.prototype.updateRow=function(n,t){var r=0,u=0,i;typeof t=="undefined"||t<0?t=this._getDataIndex(n):(typeof n=="undefined"||n<0)&&(n=this._getRowIndex(t));i=this._rows[t];i&&(this._expandStates&&(r=this._expandStates[t],u=this._indentLevels[t]),this._updateRow(i,n,t,r,u))},c.prototype._updateRow=function(n,t,i,r,u){var k=this._indentIndex,v,y,h,w,f,p,l,b,a,s;if(this._gutter){var e=this._options.gutter,d=n.gutterRow,o=d.firstElementChild;o.style.top=t*this._measurements.rowHeight+"px";o.style.left="0px";o.style.width=this._measurements.gutterWidth+"px";o.style.height=this._measurements.rowHeight+"px";e.checkbox&&(v=this.createElementWithClass("input","checkbox "+(e.checkbox.cssClass||"")),v.setAttribute("type","checkbox"),y=this.createElementWithClass("div","grid-gutter-cell grid-gutter-checkbox"),y.appendChild(v[0]),o.appendChild(y));e.icon&&(h="grid-gutter-cell grid-gutter-icon ",typeof e.icon.cssClass!="undefined"&&(h+=e.icon.cssClass+" "),typeof e.icon.index!="undefined"&&(h+=(this.getColumnValue(i,e.icon.index,-1)||"")+" "),e.icon.ownerDraw!==!1&&(h+=this._getGutterIconClass(t,i,r,u)||""),w=this.createElementWithClass("div",h),o.appendChild(w));this._drawGutterCell(n,t,i,r,u)}for(f=n.row,f.innerHTML="",f.style.top=t*this._measurements.rowHeight+"px",f.style.left=this._measurements.gutterWidth+"px",f.style.height=this._measurements.rowHeight+"px",f.style.width=isNaN(this._contentSize.width)?"":this._contentSize.width+2+"px",p=this._columns,l=0,b=p.length;l<b;l++)(a=p[l],a.hidden)||(s=a.getCellContents(n,i,r,u,a,k,l),s&&(s.setAttribute("role","gridcell"),s.setAttribute("aria-readonly",!s.classList.contains("grid-cell-editable")+""),f.appendChild(s)));c.makeElementUnselectable(f);this._gutter&&c.makeElementUnselectable(o);this._updateRowSelectionStyle(n,this._selectedRows,this._selectedIndex);f.removeEventListener("DOMAttrModified",this._onAriaExpandedModifiedHandler);r!==0&&(f.setAttribute("aria-expanded",r>0?"true":"false"),f.addEventListener("DOMAttrModified",this._onAriaExpandedModifiedHandler))},c.prototype._getGutterIconClass=function(){return""},c.prototype._drawGutterCell=function(){},c._setTooltip=function(n,t,i){var r={content:t,height:i};n.setAttribute("data-plugin-vs-tooltip",JSON.stringify(r))},c.prototype._drawCell=function(n,t,i,r,u,f,e){var p=u.width||20,w,o=this.createElementWithClass("div","grid-cell"),tt,s,b,h,k,l,d,v,g,nt,y,a;if(o.style.width=isNaN(p)?String(p):p+"px",u.cellDecorator?(tt=this._dataSource[t],u.cellDecorator(o,tt)):(typeof u.hrefIndex!="undefined"&&(w=this.getColumnValue(t,u.hrefIndex,-1)),s=this.getColumnText(t,u,e),b=!1,s.length>c.MAX_CELL_CONTENT_SIZE&&(b=!0,o.setAttribute("grid-edit-value",s),s=s.substr(0,c.MAX_CELL_CONTENT_SIZE)),typeof u.getCellTooltip=="function"?c._setTooltip(o,u.getCellTooltip(t,u.index,e,this._dataSource),c.DEFAULT_TOOLTIP_HEIGHT):u.hasHTMLContent||u.hasMixedContent&&u.getCellCSSClass&&u.getCellCSSClass(t,u.index,e,this._dataSource).indexOf("grid-mixed-cell-html")!==-1||c._setTooltip(o,b?s+"...":s,c.DEFAULT_TOOLTIP_HEIGHT),w?(h=document.createElement("a"),h.setAttribute("href",w),h.setAttribute("tabindex","-1"),h.innerText=s,o.appendChild(h)):s?u.hasHTMLContent||u.hasMixedContent&&u.getCellCSSClass&&u.getCellCSSClass(t,u.index,e,this._dataSource).indexOf("grid-mixed-cell-html")!==-1?o.innerHTML=s:o.innerText=s:o.innerHTML="&nbsp;"),e===f&&r>0&&(k=r*c.INDENT_WIDTH-13,u.indentOffset=k,i!==0&&(l=this.createElementWithClass("div","icon grid-tree-icon"),l.style.left=k+"px",o.appendChild(l),i>0?l.classList.add("icon-tree-expanded"):l.classList.add("icon-tree-collapsed")),o.style.textIndent=r*c.INDENT_WIDTH+"px"),u.hasGlyph&&(d=2,v=u.getGlyphClass(t,u.index,e,this._dataSource),v&&v!==""&&(g=this.createElementWithClass("div",v+" grid-cell-glyph"),g.style.left=r*c.INDENT_WIDTH+d+"px",o.appendChild(g),o.style.textIndent=r*c.INDENT_WIDTH+c.GLYPH_WIDTH+d+"px")),u.getCellCSSClass&&(nt=u.getCellCSSClass(t,u.index,e,this._dataSource),nt))for(y=nt.trim().split(" "),a=0;a<y.length;a++)y[a]&&o.classList.add(y[a]);return u.rowCss&&o.classList.add(u.rowCss),o},c.prototype._drawSplitters=function(){var o=this,i,r,u,f,s,n,e,t;if(this._options.drawRowSplitters&&this._dataSource.length>0){for(i=this._canvas.querySelectorAll(".grid-row-splitter"),n=0;n<i.length;n++)r=i[n],r.parentElement.removeChild(r);if(u=this.getRowInfo(this._lastRenderedDataIndex),f=0,u)for(s=this._canvas.scrollHeight-1+"px",n=0;n<this._columns.length-1;n++)(e=this._columns[n],e.hidden)||(t=this.createElementWithClass("div","grid-row-splitter"),f+=parseInt(u.row.children[n].style.width),t.style.left=f+"px",t.style.height=s,t.setAttribute("grid-splitter-index",""+n),e.fixed||this._columns[n+1].fixed?t.classList.add("fixed"):(t.addEventListener("mousedown",function(n){o._onSplitterMouseDown(n)}),t.addEventListener("dblclick",function(n){o._onSplitterDblClick(n)})),this._canvas.appendChild(t))}},c.prototype._drawHeader=function(){var e=this._columns,h=this._sortOrder,f,i,o,n,t,r,u,s;if(this._header){for(f=document.createDocumentFragment(),i=0,o=e.length;i<o;i++)(n=e[i],n.hidden)||(t=this.createElementWithClass("div","grid-header-column"),c._setTooltip(t,n.tooltip,c.DEFAULT_TOOLTIP_HEIGHT),t.style.width=(n.width||20)+"px",t._data={columnIndex:i,header:!0},r=this.createElementWithClass("div","separator"),n.fixed&&(r.style.cursor="auto"),r._data={columnIndex:i,separator:!0},t.appendChild(r),u=n.getHeaderCellContents(n,i),n.headerCss&&u.classList.add(n.headerCss),n.tooltip&&c._setTooltip(u,n.tooltip,c.DEFAULT_TOOLTIP_HEIGHT),t.appendChild(u),s=this.createElementWithClass("div","sort-handle"),h.forEach(function(i){if(i.index===n.index)return i.order==="asc"?t.classList.add("ascending"):i.order==="desc"&&t.classList.add("descending"),!1}),t.appendChild(s),f.appendChild(t));this._headerCanvas.innerHTML="";this._headerCanvas.appendChild(f);c.makeElementUnselectable(this._header)}},c.prototype._drawHeaderCellValue=function(n,t){var i=document.createElement("div");return i.classList.add("title"),i.innerText=n.text||"",t!==this._indentIndex||typeof this._indentLevels=="undefined"||this._indentLevels===null||i.classList.add("indented-title"),i},c.prototype._layoutContentSpacer=function(){for(var t,r,u,n=0,f=this._columns,i=0,e=f.length;i<e;i++)f[i].hidden||(n+=(f[i].width||20)+this._measurements.cellOffset);n=n+2;t=Math.max(1,this._expandedCount*this._measurements.rowHeight);this._contentSpacer.style.width=n+"px";this._contentSpacer.style.height=t+"px";this._gutter&&(this._gutter.style.height=t+"px");this._ignoreScroll=!0;try{r=Math.max(0,Math.min(this._scrollTop,t-this._canvasHeight));r!==this._scrollTop&&(this._scrollTop=r,this._canvas.scrollTop=r);u=Math.max(0,Math.min(this._scrollLeft,n-this._canvasWidth));u!==this._scrollLeft&&(this._scrollLeft=u,this._canvas.scrollLeft=u)}finally{this._ignoreScroll=!1}this._contentSize.width=n;this._contentSize.height=t},c.prototype._layoutHeader=function(){this._header&&(this._headerCanvas.style.left=this._measurements.gutterWidth-this._scrollLeft+"px");this._gutter&&(this._gutter.style.left=this._scrollLeft+"px")},c.prototype.layout=function(n,t){t===void 0&&(t=!0);this._measureCanvasSize();var i=-1;document.activeElement&&this._canvas.contains(document.activeElement)&&(i=this._selectedIndex);this._cleanUpRows();this._fixScrollPos();this._layoutContentSpacer();this._updateViewport(!1,n);!document.activeElement&&i>=0&&this._addSelection(i,null,null,t);this._layoutHeader();this._drawHeader();this._drawSplitters()},c.prototype._fixScrollPos=function(){var n=this._ignoreScroll;this._ignoreScroll=!0;try{this._canvas.scrollLeft=this._scrollLeft;this._canvas.scrollTop=this._scrollTop}finally{this._ignoreScroll=n}},c.prototype.redraw=function(){this._fixScrollPos();this._redraw(!0)},c.prototype._redraw=function(n){this._layoutHeader();this._updateViewport(n)},c.prototype.getColumnValue=function(n,t){return this._dataSource[n][t]},c.prototype.getColumnText=function(n,t,i){var r,u=t.getColumnValue(n,t.index,i,this._dataSource);return r=typeof u!="string"?c.convertValueToDisplayString(u,t.format):u,t.maxLength=Math.max(t.maxLength||0,r.length),r},c.prototype._getExpandState=function(n){var t=0;return this._expandStates&&typeof this._expandStates[n]=="number"&&(t=this._expandStates[n]),t},c.prototype.getViewPortRanges=function(){var e=this._expandedCount-1,i=this._getVisibleRowIndices(),n=i.first,t=i.last,u,f;return n=Math.max(0,n-this._options.extendViewportBy),t=Math.min(e,t+this._options.extendViewportBy),u=this._getDataIndex(n),f=this._getDataIndex(t),new r(Math.min(u,n),Math.max(f,t))},c.prototype.scrollToBottom=function(n){this._scrollRenderComplete=n;this._canvas.scrollTop+this._canvas.clientHeight>=this._canvas.scrollHeight?this._scrollRenderComplete&&(this._scrollRenderComplete(),this._scrollRenderComplete=null):this._canvas.scrollTop=this._canvas.scrollHeight},c.prototype.setViewState=function(n){this._options.isGridEnabled=n;n?this.rootElement.classList.remove("busy"):this.rootElement.classList.add("busy")},c.prototype._selectRow=function(n,t,i,r){var u=i&&i.ctrl,f=i&&i.shift,e=i&&i.rightClick;u?this._addSelection(n,t,{toggle:!0}):f?(this._clearSelection(),this._addSelectionRange(n,t)):e?this._selectedRows&&this._selectedRows.hasOwnProperty(n)?(this._selectedIndex=n,this._updateAriaAttribute()):(this._clearSelection(),this._addSelection(n,t)):(this._clearSelection(),this._addSelection(n,t,null,r))},c.prototype._selectAll=function(){if(this._count>0&&this._options.allowMultiSelect!==!1){this._clearSelection();this._selectionStart=0;var n=Math.max(0,this._selectedIndex);this._addSelectionRange(this._count-1,undefined,{doNotFireEvent:!0});this._selectedIndex=n;this._updateSelectionStyles();this._selectionChanged()}},c.prototype.getSelectedRowIndex=function(){return this._selectedIndex},c.prototype.setSelectedRowIndex=function(n){this._clearSelection();this._addSelection(n)},c.prototype.getSelectedDataIndex=function(){return this._getDataIndex(this._selectedIndex)},c.prototype.getSelectedDataIndices=function(){var i,n=this._selectedRows,t=[];if(n)for(i in n)t[t.length]=n[i];return t},c.prototype.ensureDataIndexExpanded=function(n){for(var t=this._getRowIndex(n);t<0||n>0&&t===0;)this.expandNode(this._getDataIndex(-t)),t=this._getRowIndex(n);return t},c.prototype.setSelectedDataIndex=function(n,t){var i=t?this.ensureDataIndexExpanded(n):this._getRowIndex(n);this.setSelectedRowIndex(i)},c.prototype.focus=function(n){var t=this,i=function(){var r,n,i;if(document.activeElement!==t._canvas)try{t._selectedIndex>-1&&(r=t._getDataIndex(t._selectedIndex),n=t._rows[r],n&&(i=n.row,i&&i.focus()))}catch(u){}};n?window.setTimeout(function(){i()},n):i()},c.prototype._clearSelection=function(){this._selectionCount=0;this._selectedRows=null},c.prototype._addSelection=function(n,t,i,r){var f=i&&i.keepSelectionStart,e=i&&i.doNotFireEvent,o=i&&i.toggle,u;this._options.allowMultiSelect===!1&&(f=!1,this._clearSelection());this._selectedRows||(this._selectedRows={});n>=0?(u=!0,this._selectedRows.hasOwnProperty(n)?o&&(u=!1,this._selectionCount=Math.max(0,this._selectionCount-1),delete this._selectedRows[n]):this._selectionCount++,typeof t!="number"&&(t=this._getDataIndex(n)),u&&(this._selectedRows[n]=t),this._selectedIndex=n,this._updateAriaAttribute(),(this._selectionStart<0||!f)&&(this._selectionStart=n)):(t=-1,this._selectedIndex=-1);e||(this._updateSelectionStyles(),this._selectionChanged(),r&&this.focus(),this._selectedIndexChanged(this._selectedIndex,t))},c.prototype._addSelectionRange=function(n,t,i){var h=i&&i.doNotFireEvent,o=-1,f,u,s,r,e;if(this._options.allowMultiSelect===!1)this._addSelection(n,t);else{for(this._selectedRows&&(o=this._selectedRows[this._selectedIndex]),this._selectionStart<0&&(this._selectionStart=n),u=Math.min(this._selectionStart,n),s=Math.max(this._selectionStart,n),(typeof t!="number"||u!==n)&&(t=this._getDataIndex(u)),r=u;r<=s;r++)this._addSelection(r,t,{keepSelectionStart:!0,doNotFireEvent:!0}),r===n&&(f=t),e=this._getExpandState(t),e<0?t+=1-e:t++;this._selectedIndex=n;this._updateAriaAttribute();h||(this._updateSelectionStyles(),this._selectionChanged(),o!==f&&this._selectedIndexChanged(this._selectedIndex,f))}},c.prototype._updateAriaAttribute=function(){var i,n,t;this._active&&(i=this._getDataIndex(this._selectedIndex),i>=0&&(n=this.getRowInfo(i),n&&n.row&&(t=n.row.getAttribute("id"),t!==this._activeAriaId&&(this._canvas.setAttribute("aria-activedescendant",t),this._activeAriaId=t))))},c.prototype._updateSelectionStyles=function(){var n=this;this._delayedUpdateCookie&&window.clearTimeout(this._delayedUpdateCookie);this._delayedUpdateCookie=window.setTimeout(function(){var t,u=n._selectedRows,f=n._selectedIndex,i=n._rows,r;for(t in i)r=i[t],n._updateRowSelectionStyle(r,u,f)},10)},c.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}])},c.prototype.selectionChanged=function(){},c.prototype._selectedIndexChanged=function(n,t){this.selectedIndexChanged(n,t);this.fireCustomEvent(this._element,c.EVENT_SELECTED_INDEX_CHANGED,[n,t])},c.prototype.selectedIndexChanged=function(){},c.prototype._updateRowSelectionStyle=function(n,t,i){var f=n.rowIndex,u=n.row,r=n.gutterRow;u.classList.remove("grid-row-selected");u.classList.remove("grid-row-selected-blur");u.classList.remove("grid-row-current");u.setAttribute("tabindex","-1");r&&(r.classList.remove("grid-gutter-row-selected"),r.classList.remove("grid-gutter-row-selected-blur"),r.classList.remove("grid-gutter-row-current"),r.querySelector("input.checkbox").setAttribute("checked",String(!1)));t&&t.hasOwnProperty(f)&&(r&&r.querySelector("input.checkbox").setAttribute("checked",String(!0)),this._active?(u.classList.add("grid-row-selected"),u.setAttribute("tabindex","1"),r&&r.classList.add("grid-gutter-row-selected")):(u.classList.add("grid-row-selected-blur"),u.setAttribute("tabindex","1"),r&&r.classList.add("grid-gutter-row-selected-blur")));f===i&&(u.classList.add("grid-row-current"),r&&r.classList.add("grid-gutter-row-current"))},c.prototype._notifyForPrerender=function(){if(this._options.prerenderCallback){var n=this.getViewPortRanges();this._options.prerenderCallback(n.start,n.end)}},c.prototype.measureColumnSize=function(n){for(var t,r=this._canvas.clientWidth-(this.isVerticalScrollbarVisible?0:17),i=0;i<this._columns.length;i++)t=this._columns[i],t.fixed&&(r-=t.width);if(r>0){if(n)for(i=0;i<this._columns.length;i++)t=this._columns[i],!t.fixed&&t.percentWidth&&(t.percentWidth=t.width/r);for(i=0;i<this._columns.length;i++)t=this._columns[i],!t.fixed&&t.percentWidth&&(t.width=r*t.percentWidth)}},c.prototype._onContainerMouseDown=function(n){var t=n.target;t.classList.contains("grid-edit-box")||this.focus(10)},c.prototype._measureCanvasSize=function(){this._canvasHeight=this._canvas.clientHeight;this._canvasWidth=this._canvas.clientWidth},c.prototype._onContainerResize=function(){var n=this;this._resizeLayoutTimeout||(this._resizeLayoutTimeout=window.setTimeout(function(){n.measureColumnSize(!1);n.layout();n._notifyForPrerender();n._resizeLayoutTimeout=null},200))},c.prototype._setupMoveEvents=function(){var n=this;document.addEventListener("mousemove",function(t){return n._onDocumentMouseMove(t)});document.addEventListener("mouseup",function(t){return n._onDocumentMouseUp(t)})},c.prototype._clearMoveEvents=function(){document.removeEventListener("mousemove",null,!0);document.removeEventListener("mouseup",null,!0)},c.prototype._onDocumentMouseMove=function(n){var t=this._columnSizing;if(t&&t.active===!0){var i=n.pageX-t.origin,r=Math.max(15,t.originalWidth+i),u=this._columns[t.index];u.width=r;this._applyColumnSizing(t.index);this._moveSizingElement(t.index)}},c.prototype._onDocumentMouseUp=function(){var n=this;return window.setImmediate(function(){n._tryFinishColumnSizing(!1)}),!1},c.prototype._onHeaderMouseDown=function(n){var t,i,r;return n.which!==1?!0:(t=this.findClosestElement(n.target,".separator"),t&&t._data&&(i=t._data.columnIndex,r=this._columns[i],!r.fixed)?(this._columnSizing=new h(!0,i,r.width,n.pageX),this._moveSizingElement(i),this._setupMoveEvents(),n.stopImmediatePropagation(),n.preventDefault(),!1):void 0)},c.prototype._onHeaderMouseUp=function(){return!1},c.prototype._onHeaderClick=function(n){var i=this.findClosestElement(n.target,".grid-header-column"),r,u,t;if(i&&!this._columnSizing){if(r=this.findClosestElement(n.target,".separator"),r&&r._data)return!1;i._data&&(u=i._data.columnIndex,t=this._columns[u],t.canSortBy&&!t.fixed&&this._sortBy(t,n.shiftKey,this._options.alwaysForceSort))}},c.prototype._onHeaderDblClick=function(n){var i=this.findClosestElement(n.target,".separator");if(i&&i._data){this._tryFinishColumnSizing(!0);var r=i._data.columnIndex,t=this._columns[r],u=Math.max(t.maxLength||0,3),f=1.1+.7*Math.exp(-u/20),e=t.width;return t.width=(t.indentOffset||0)+Math.round(u*f*this._measurements.unitEx),this._applyColumnSizing(r,e,!0),!1}},c.prototype.getCellContentWidth=function(n){var t,i;return document.createRange&&(t=document.createRange(),n.firstChild&&n.firstChild.nodeType===Node.TEXT_NODE)?(t.selectNodeContents(n.firstChild),i=t.getBoundingClientRect(),parseInt(n.style.textIndent,10)+i.width):n.clientWidth},c.prototype._onSplitterDblClick=function(n){var y=this,t=0,l=n.target,u,a,o,s,r,h;if(l){u=parseInt(l.getAttribute("grid-splitter-index"),10);t=0;for(a in this._rows)o=this._rows[a],o&&(s=this.getCellContentWidth(o.row.children[u]),t=t>s?t:s);r=this._columns[u];h=this._columns[u+1];r.hasGlyph&&(t+=c.GLYPH_WIDTH);var f=r.width-(t+3),v=r.width-f,e=h.width+f;v>=i.MIN_RESIZE_WIDTH&&e>=i.MIN_RESIZE_WIDTH?(r.width-=f,h.width+=f,window.setImmediate(function(){y.layout(!0)})):e<i.MIN_RESIZE_WIDTH&&(v-=i.MIN_RESIZE_WIDTH-e,e=i.MIN_RESIZE_WIDTH)}},c.prototype._onSplitterMouseDown=function(n){var h=this,u,f,t,r,o=function(n){var e=document.querySelector(".grid-row-splitter.active");if(e){var f=n.clientX-u,o=t.width+f,s=r.width-f;o>=i.MIN_RESIZE_WIDTH&&s>=i.MIN_RESIZE_WIDTH&&(e.style.left=e.offsetLeft+f+"px",u=n.clientX,t.width+=f,r.width-=f)}},s=function(){var n=document.querySelector(".grid-row-splitter.active");n&&(n.classList.remove("active"),window.setImmediate(function(){h.layout(!0)}));document.removeEventListener("mousemove",o);document.removeEventListener("mouseup",s)},e;n.button===0&&(e=n.target,f=parseInt(e.getAttribute("grid-splitter-index"),10),t=this._columns[f],r=this._columns[f+1],t.fixed||r.fixed||(e.classList.add("active"),u=n.clientX,document.addEventListener("mousemove",o),document.addEventListener("mouseup",s)))},c.prototype._moveSizingElement=function(n){var r=this._measurements.gutterWidth,t,i;if(!this._sizingElement){if(n<0)return;this._sizingElement=this.createElementWithClass("div","grid-column-sizing");this._canvas.appendChild(this._sizingElement)}if(this._sizingElement.style.height=this._canvas.clientHeight-1+"px",this._sizingElement.style.top=this._scrollTop+"px",n<0)this._sizingElement.style.left="-5000px",this._sizingElement.style.top="-5000px",this._sizingElement.style.height="0px";else{for(t=0;t<=n;)i=this._columns[t++],i.hidden||(r+=i.width);this._sizingElement.style.left=r-1+"px"}},c.prototype._getVisibleColumnIndex=function(n){var t=0,i=0,r=this._columns.length;if(this._columns[n].hidden)return-1;while(t<n)this._columns[t].hidden||i++,t++;return i},c.prototype._applyColumnSizing=function(n,t,i){var e=this._getVisibleColumnIndex(n)+1,r=this._columns[n],u=!1,f;t=t||-1;r&&(u=r.width!==t,f=this.rootElement.querySelector(".grid-header-canvas .grid-header-column:nth-child("+e+")"),f.style.width=r.width+"px");i===!0&&(u&&this.layout(),this._onColumnResize(r))},c.prototype._onColumnResize=function(n){this.fireCustomEvent(this._element,"columnresize",[n])},c.prototype._tryFinishColumnSizing=function(n){var t=this._columnSizing;t&&(t.active===!0&&(n||this._applyColumnSizing(t.index,t.originalWidth,!0),this._moveSizingElement(-1)),this._columnSizing=null,this._clearMoveEvents())},c.prototype._getSortColumns=function(n){for(var r,u,f=this._columns,i=[],t=0,e=n.length;t<e;t++)u=n[t],f.forEach(function(n){if(n.index===u.index)return r=n,!1}),i.push(r);return i},c.prototype._sortBy=function(n,t,i){var r=this._sortOrder.slice(0),o=!1,f,s,u,h;if(n){for(f=0,s=r.length;f<s;f++)if(u=r[f],u.index===n.index){r.splice(f,1);o=!0;break}u=o?new e(u.index,u.order==="asc"?"desc":"asc"):new e(n.index,"asc");t&&this._options.allowSortOnMultiColumns?r.push(u):r=[u]}h=this._getSortColumns(r);this._onSort(r,h,i)},c.prototype._onSort=function(n,t,i){i===void 0&&(i=!1);this.onSort(n,t,i)!==!1&&this.fireCustomEvent(this._element,"sort",[{sortOrder:n,sortColumns:t}])},c.prototype.onSort=function(n,t,i){return i===void 0&&(i=!1),this._options.autoSort&&(this._trySorting(n,t,i),this._sortOrder=n,this.layout()),!0},c.prototype._trySorting=function(n,t,i){var p=this,s,h,l,a,e,v,r,u,y;i===void 0&&(i=!1);t||(t=this._getSortColumns(n));s=[];h=0;for(l in this._selectedRows)u=this._selectedRows[l],a=this._dataSource[u],a&&(s.push(a),h+=parseInt(l));for(e=new o(null,null),c.addItemsToTree(this._dataSource,this._expandStates,0,this._dataSource.length,e),this._sortOrder&&this._sortOrder.length===1&&n.length===1&&this._sortOrder[0]!==n[0]&&this._sortOrder[0].index===n[0].index&&!i?this._sortOrder[0].order!==n[0].order&&c.walkTree(e,function(i){f.TreeNodeSort.stableReverse(i.children,function(i,r){return f.TreeNodeSort.sortComparer(n,t,i.data,r.data)})}):c.walkTree(e,function(i){i.children.sort(function(i,r){return f.TreeNodeSort.sortComparer(n,t,i.data,r.data)})}),this._dataSource=[],this._expandStates=[],r=0;r<e.children.length;r++)c.walkTree(e.children[r],function(n){p._dataSource.push(n.data);p._expandStates.push(n.expandState)});if(this._indentLevels=c.expand(this._expandStates),this._updateRanges(),this._selectionCount>0){for(this._clearSelection(),v=0,r=0;r<s.length;r++)u=this._dataSource.indexOf(s[r]),u>=0&&(y=this._getRowIndex(u),this._addSelection(y,u),v+=y);this._scrollTop+=(v-h)/this._selectionCount*this._measurements.rowHeight}},c.prototype._onCanvasScroll=function(){var n=this._canvas;return this._resetScroll=!0,this._scrollLeft=n.scrollLeft,this._scrollTop=n.scrollTop,this._ignoreScroll||(this._notifyForPrerender(),this._redraw(),this._scrollRenderComplete&&(this._scrollRenderComplete(),this._scrollRenderComplete=null)),!1},c.prototype.getRowInfoFromEvent=function(n,t){var i=this.findClosestElement(n.target,t);return this._rowInfoMap[i.id]},c.prototype._getClickedCell=function(n){return this.findClosestElement(n.target,".grid-cell")},c.prototype._isCellEditing=function(n){return n.querySelectorAll(".grid-edit-box").length===1},c.prototype.createEditBox=function(n,i,r){if(this._options.isGridEnabled){typeof this._options.preEditCellCallback!="undefined"&&this._options.preEditCellCallback(n,i);var f,u=this.getColumns()[i];u.getEditBox&&(f=u.getEditBox(n,u));this._editBoxControl=new t.GridCellEditControl(n,i,r,this,this._options,f);r.innerHTML="";r.appendChild(this._editBoxControl.inputElement);try{this._editBoxControl.inputElement.select();this._editBoxControl.inputElement.focus()}catch(e){}}},c.prototype.onEditCell=function(n){var e=n.target,t,r,i;if(!e.classList.contains("grid-tree-icon")){if(t=this._getClickedCell(n),this._isCellEditing(t))return;if(t&&t.classList.contains("grid-cell-editable")&&(r=this.getRowInfoFromEvent(n,".grid-row"),r)){var u=r.row.children,o=u.length,f=-1;for(i=0;i<o;i++)t===u[i]&&(f=i);this.createEditBox(r.dataIndex,f,t)}}},c.prototype._onRowMouseDown=function(n){var t=this.getRowInfoFromEvent(n,".grid-row"),i;t&&(i=n.target,n.which===1&&i.classList.contains("grid-tree-icon")?this._onToggle(t):n.which===3&&this._options&&this._options.disableRightClickSelection||i.classList.contains("grid-edit-box")||(this._selectRow(t.rowIndex,t.dataIndex,{ctrl:n.ctrlKey,shift:n.shiftKey,rightClick:n.which===3}),this.focus(0)))},c.prototype._onGutterClick=function(n){var t=this.getRowInfoFromEvent(n,".grid-gutter-row");t&&(this._selectedRows&&typeof this._selectedRows[t.rowIndex]=="number"||this._selectRow(t.rowIndex,t.dataIndex))},c.prototype._onBlur=function(n){var t=n.target;if(t.classList.contains("grid-edit-box")){n.stopPropagation();return}this._active=!1;this._updateSelectionStyles()},c.prototype._onFocus=function(n){var t=n.target;if(t.classList.contains("grid-edit-box")){n.stopPropagation();return}this._active=!0;this._updateSelectionStyles();this._updateAriaAttribute()},c.prototype._onKeyDown=function(t){var r={lo:-1,hi:-1},c=n.KeyCodes,l=this._canvas,h,i,e,s,u,f,o;if(!this._options.isGridEnabled)return!1;if(this._copyInProgress)return t.keyCode===27&&this._cancelable&&this._cancelable.cancel(),!1;if(this._count>0&&(r={lo:0,hi:this._expandedCount-1}),this._selectedIndex<0&&this._addSelection(r.lo),this._options.keyboardEventHandler&&this._options.keyboardEventHandler.keys.indexOf(t.key)!==-1&&(h=this._options.keyboardEventHandler.handler(t,this._dataSource,this._getDataIndex(this._selectedIndex)),h))return t.preventDefault(),!1;switch(t.keyCode){case 40:this._clearSelection();this._addSelection(Math.min(this._selectedIndex+1,r.hi),null,null,!0);break;case 38:this._clearSelection();this._addSelection(Math.max(this._selectedIndex-1,r.lo),null,null,!0);break;case 34:this._clearSelection();i=this._getVisibleRowIndices();this._selectedIndex<i.last?this._addSelection(i.last,null,null,!0):(e=i.last-i.first+1,this._addSelection(Math.min(this._selectedIndex+e,r.hi),null,null,!0));break;case 33:this._clearSelection();i=this._getVisibleRowIndices();this._selectedIndex>i.first?this._addSelection(i.first,null,null,!0):(e=i.last-i.first+1,this._addSelection(Math.max(this._selectedIndex-e,r.lo),null,null,!0));break;case 39:this.tryToggle(!0,t.shiftKey);break;case 37:if(!this.tryToggle(!1,t.shiftKey))for(s=this._getDataIndex(this._selectedIndex),u=s-1;u>=0;){if(s-u<=Math.abs(this._expandStates[u])){this._selectRow(this._getRowIndex(u),null,null,!0);break}u--}break;case 36:this._clearSelection();this._addSelection(r.lo,null,null,!0);break;case 35:this._clearSelection();this._addSelection(r.hi,null,null,!0);break;case 113:f=this.getRowInfo(this._getDataIndex(this._selectedIndex));f&&(o=this._getFirstEditableCellIndex(f.row.children),o>=0&&this.createEditBox(f.dataIndex,o,f.row.children[o]));break;default:return!0}return this.getSelectedRowIntoView(),t.preventDefault(),!1},c.prototype._getFirstEditableCellIndex=function(n){for(var t=0;t<n.length;t++)if(n[t].classList.contains("grid-cell-editable"))return t;return-1},c.prototype._onToggle=function(n){if(this._expandStates){var t=this._expandStates[n.dataIndex];t!==0&&(t>0?this.collapseNode(n.dataIndex):t<0&&this.expandNode(n.dataIndex),this._clearSelection(),this._addSelection(Math.min(n.rowIndex,this._expandedCount-1),n.dataIndex,null,!0),this._layoutContentSpacer(),this._redraw(),this._notifyForPrerender())}},c.prototype.getExpandStates=function(){return this._expandStates},c.TYPE_NAME="GridControl",c.MAX_CELL_CONTENT_SIZE=1e3,c.MAX_COPY_SIZE=1e3,c.PAYLOAD_SIZE=200,c.EVENT_SELECTED_INDEX_CHANGED="selectedIndexChanged",c.INDENT_WIDTH=12,c.GLYPH_WIDTH=10,c.DEFAULT_TOOLTIP_HEIGHT=65,c}(n.Controls.Legacy.Control);t.GridControl=v})(t=n.Grid||(n.Grid={}))}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){"use strict";var i=function(){function t(n,t,i,r,u,f){this._dataIndex=n;this._columnIndex=t;this._ignoreCommitCallback=!1;this._gridControl=r;this._options=u;this._editElement=i;this._textValue=i.hasAttribute("grid-edit-value")?i.getAttribute("grid-edit-value"):i.innerText;this._cachedInnerHTML=i.innerHTML;this._inputElement=f||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)}return Object.defineProperty(t.prototype,"inputElement",{get:function(){return this._inputElement},enumerable:!0,configurable:!0}),t.prototype.dismiss=function(){this._editElement.innerHTML=this._cachedInnerHTML;this._editElement.focus();this.notifyPostEdit()},t.prototype.notifyPostEdit=function(){this._inputElement.removeEventListener("keydown",this._keyboardHandler);this._inputElement.removeEventListener("focusout",this._focusHandler);typeof this._options.postEditCellCallback!="undefined"&&this._options.postEditCellCallback(this._dataIndex,this._columnIndex)},t.prototype.keyboardHandler=function(t){var e=this._gridControl.getRowInfo(this._dataIndex),f=this._gridControl.getColumns(),u,i,r;if(t.keyCode===13)return this.commitValue(t),t.stopPropagation(),!1;if(t.keyCode===27)return this.dismiss(),t.stopPropagation(),t.preventDefault(),!1;if(t.keyCode===9){if(this._options.commitOnTab)this.commitValue(t);else if(e){if(u=e.row.children,this._ignoreCommitCallback=!0,this._editElement.innerHTML=this._cachedInnerHTML,this.notifyPostEdit(),i=this._columnIndex,t.shiftKey){while(i>0)if(i--,r=u[i],r.classList.contains("grid-cell-editable")){this._gridControl.createEditBox(this._dataIndex,i,r);break}}else{while(i<f.length-1)if(i++,r=u[i],r.classList.contains("grid-cell-editable")){this._gridControl.createEditBox(this._dataIndex,i,r);break}f.length>0&&i===f.length-1&&u[0].parentElement.focus()}return t.stopPropagation(),!1}}else return t.keyCode===38||t.keyCode===40||t.keyCode===33||t.keyCode===34?!0:(t.stopPropagation(),n.preventIEKeys(t))},t.prototype.focusHandler=function(n){this.commitValue(n)},t.prototype.commitValue=function(n){var t=this._inputElement.value;return this._editElement.innerText=this._ignoreCommitCallback?this._textValue:t,this._options.commitEditCellCallback&&!this._ignoreCommitCallback&&this._options.commitEditCellCallback(t,this._dataIndex,this._columnIndex),this.notifyPostEdit(),n.stopPropagation(),n.preventDefault(),!1},t}();t.GridCellEditControl=i})(t=n.Grid||(n.Grid={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,s,r,u,i,f,e,o,h;(function(n){n[n.IeOnly=0]="IeOnly";n[n.VsOnly=1]="VsOnly";n[n.All=2]="All"})(n.TelemetryEventHost||(n.TelemetryEventHost={}));s=n.TelemetryEventHost,function(n){n[n.Ui=0]="Ui";n[n.KeyboardShortcut=1]="KeyboardShortcut";n[n.ContextMenu=2]="ContextMenu";n[n.Internal=3]="Internal";n[n.Test=4]="Test";n[n.NotSpecified=5]="NotSpecified"}(n.TriggerType||(n.TriggerType={}));r=n.TriggerType;u=function(){function n(){}return n.CONSOLE="Console",n.DEBUGGER="Debugger",n.DOM_EXPLORER="DomExplorer",n.EMULATION="Emulation",n.EXPERIMENTS="Experiments",n.MEMORY="Memory",n.NETWORK="Network",n.PROFILER="Profiler",n.VISUAL_PROFILER="VisualProfiler",n}();n.ToolName=u;i=function(){function n(){}return n.EXECUTE_COMMAND="ExecuteCommand",n.F12_LOAD_END="F12LoadEnd",n.TOOL_LOADED="ToolLoaded",n}();n.TelemetryEventName=i;f=function(){function n(){}return n.prototype.log=function(n,t,i,r){i===void 0&&(i=2);r===void 0&&(r=!0)},n.prototype.logExecuteCommand=function(n,t,i,r){i===void 0&&(i=2);r===void 0&&(r=!0)},n}();n.DoNothingAnalyticsProxy=f;e=function(){function n(n){this._toolName=n;this._selfTestEnabled=t.F12.SelfTest.selfTestEnabled;this._previousCommandName="";this._previousCommandTime=Date.now()}return n.prototype.log=function(n,i,r,u){r===void 0&&(r=2);u===void 0&&(u=!0);r!==1&&(u?t.F12.TelemetryLogger.logAsMeasure(n,i):t.F12.TelemetryLogger.logAsTelemetry(n,i),this._selfTestEnabled&&t.F12.SelfTest.logMessage("Telemetry: "+n+" "+JSON.stringify(i)+" isMeasure: "+u))},n.prototype.logExecuteCommand=function(n,t,u,f){if(u===void 0&&(u=2),f===void 0&&(f=!0),t!==3&&t!==4&&(this._previousCommandName!==n||Date.now()-this._previousCommandTime>1e3)){var e={ToolName:this._toolName,CommandName:n,TriggerType:r[t]};this.log(i.EXECUTE_COMMAND,e,u,f);this._previousCommandName=n;this._previousCommandTime=Date.now()}},n}();n.F12AnalyticsProxy=e;o=function(){function n(n,i){this._proxy=t.Utilities.JSONMarshaler.attachToPublishedObject(n,{},!0);this._toolName=i;this._previousCommandName="";this._previousCommandTime=Date.now()}return n.prototype.log=function(n,t,i,r){i===void 0&&(i=2);r===void 0&&(r=!0);i!==0&&this._proxy._call("reportTelemetryEvent",n,t)},n.prototype.logExecuteCommand=function(n,t,u,f){if(u===void 0&&(u=2),f===void 0&&(f=!0),this._previousCommandName!==n||Date.now()-this._previousCommandTime>1e3){var e={ToolName:this._toolName,CommandName:n,TriggerType:r[t]};this.log(i.EXECUTE_COMMAND,e,u,f);this._previousCommandName=n;this._previousCommandTime=Date.now()}},n}();n.VsAnalyticsProxy=o,function(n){var t=function(){function n(){}return n.FIND_NEXT_OR_PREVIOUS="FindNextOrPrevious",n.DEBUGGER_FIND="DebuggerFind",n.SEARCHBOX_CLEAR="SearchBoxClear",n.UPDATE_SEARCH_NEXT_OR_PREVIOUS="UpdateSearchNextOrPrevious",n}();n.CommandName=t}(h=n.Telemetry||(n.Telemetry={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";(function(n){n[n.Light=0]="Light";n[n.Blue=1]="Blue";n[n.Dark=2]="Dark";n[n.HighContrast=3]="HighContrast";n[n.Unknown=4]="Unknown"})(n.ThemeType||(n.ThemeType={}));var i=n.ThemeType,t=function(){function n(){}return n.getTheme=function(){for(var t,i,r,f=null,e=document.styleSheets,u=0;u<e.length;u++)if(t=e[u],t.cssRules)for(i=0;i<t.cssRules.length;i++)if(r=t.cssRules[i],r.selectorText&&r.selectorText.split(",").indexOf(n.THEME_CSS_SELECTOR)!==-1){f=r.style.color;break}switch(f){case n.LIGHT_THEME_STYLE:return 0;case n.DARK_THEME_STYLE:return 2;case n.BLUE_THEME_STYLE:return 1;case n.HIGH_CONTRAST_THEME_STYLE:return 3;default:return 4}},n.LIGHT_THEME_STYLE="rgb(255, 255, 255)",n.DARK_THEME_STYLE="rgb(0, 0, 0)",n.BLUE_THEME_STYLE="rgb(0, 0, 255)",n.HIGH_CONTRAST_THEME_STYLE="rgb(255, 255, 0)",n.THEME_CSS_SELECTOR=".themeColor",n}();n.ThemeUtilities=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(n){n===void 0&&(n=0);this._nsec=n}return Object.defineProperty(n.prototype,"nsec",{get:function(){return this._nsec},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"msec",{get:function(){return this._nsec/n.NANOSECOND_PER_MILLISECOND},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"sec",{get:function(){return this._nsec/n.NANOSECOND_PER_SECOND},enumerable:!0,configurable:!0}),n.compare=function(n,t){return n.compare(t)},n.fromNanoseconds=function(t){return new n(t)},n.fromMilliseconds=function(t){return new n(t*n.NANOSECOND_PER_MILLISECOND)},n.fromSeconds=function(t){return new n(t*n.NANOSECOND_PER_SECOND)},n.min=function(n,t){return t.greaterThan(n)?n:t},n.max=function(n,t){return n.lessThan(t)?t:n},n.prototype.add=function(t){return new n(this._nsec+t.nsec)},n.prototype.compare=function(n){return this._nsec-n.nsec},n.prototype.equals=function(n){return this._nsec===n.nsec},n.prototype.lessThan=function(n){return this._nsec<n.nsec},n.prototype.greaterThan=function(n){return this._nsec>n.nsec},n.prototype.subtract=function(t){return new n(this._nsec-t.nsec)},n.NANOSECOND_PER_MILLISECOND=1e6,n.NANOSECOND_PER_SECOND=1e9,n.MaxTime=new n(Number.MAX_VALUE),n.OneMillisecond=n.fromMilliseconds(1),n.OneSecond=n.fromSeconds(1),n.Zero=n.fromSeconds(0),n}();n.TimeStamp=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(){}return i.convertFormatString=function(n){for(var t=n,r=0,i;;){if(i="{"+r+"}",t.indexOf(i)===-1)break;while(t.indexOf(i)>=0)t=t.replace(i,"%s");r++}return t},i.getDecimalLocaleString=function(n,r){var u=Math.abs(n).toString(),s=u.split(/e/i),e,f,h;if(u=s[0],e=s.length>1?parseInt(s[1],10):0,s=u.split("."),u=(n<0?"-":"")+s[0],f=s.length>1?s[1]:"",e>0?(f=i.zeroPad(f,e,!1),u+=f.slice(0,e),f=f.substr(e)):e<0&&(e=-e,u=i.zeroPad(u,e+1,!0),f=u.slice(-e,u.length)+f,u=u.slice(0,-e)),h=t.Culture.NumberFormat,h||(h={numberDecimalSeparator:".",numberGroupSizes:[3],numberGroupSeparator:","}),f.length>0&&(f=h.numberDecimalSeparator+f),r){for(var a=h.numberGroupSizes,v=h.numberGroupSeparator,c=a[0],y=1,o=u.length-1,l="";o>=0;){if(c===0||c>o)return l.length>0?u.slice(0,o+1)+v+l+f:u.slice(0,o+1)+f;l=l.length>0?u.slice(o-c+1,o+1)+v+l:u.slice(o-c+1,o+1);o-=c;y<a.length&&(c=a[y],y++)}return u.slice(0,o+1)+v+l+f}return u+f},i.getPrettyPrintSize=function(n){var r=0,u;return Math.abs(n)>i.BYTE_PER_GIGABYTE?(r=n/i.BYTE_PER_GIGABYTE,u=t.Resources.getString("/Common/GigabyteUnits")):Math.abs(n)>i.BYTE_PER_MEGABYTE?(r=n/i.BYTE_PER_MEGABYTE,u=t.Resources.getString("/Common/MegabyteUnits")):Math.abs(n)>i.BYTE_PER_KILLOBYTE?(r=n/i.BYTE_PER_KILLOBYTE,u=t.Resources.getString("/Common/KilobyteUnits")):(r=n,u=t.Resources.getString("/Common/ByteUnits")),i.getDecimalLocaleString(parseFloat(r.toFixed(2)),!0)+" "+u},i.getPrettyPrintTime=function(r,u){var o,f,e,s;return r.nsec===0?(f=0,e=t.Resources.getString("SecondsAbbreviation")):r.lessThan(n.TimeStamp.OneMillisecond)?(f=parseFloat(r.msec.toPrecision(2)),e=t.Resources.getString("MillisecondsAbbreviation")):r.lessThan(n.TimeStamp.OneSecond)?(f=u&&u.roundMillisecondValue?Math.round(r.msec):Math.floor(r.msec*100)/100,e=t.Resources.getString("MillisecondsAbbreviation")):u&&u.showTimeOnly?(s=new Date(r.msec),o=s.toLocaleTimeString()):(f=Math.floor(r.sec*100)/100,e=t.Resources.getString("SecondsAbbreviation")),o||(o=i.getDecimalLocaleString(f,!0)+" "+e),o},i.stripNewLine=function(n){return n.replace(/[\r?\n]/g,"")},i.fileLineColumnFormat=function(n,t,i){return n+" ("+t+","+i+")"},i.fileLineFormat=function(n,t){return n+" ("+t+")"},i.zeroPad=function(n,t,i){for(var r=[],u=n.length;u<t;u++)r.push("0");return i?r.join("")+n:n+r.join("")},i.BYTE_PER_KILLOBYTE=1024,i.BYTE_PER_MEGABYTE=1048576,i.BYTE_PER_GIGABYTE=1073741824,i}();n.FormattingHelpers=i})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=function(){function n(){this._packetCount=0;this._data=""}return n.splitMessage=function(t){for(var u=t.length,f=Math.max(1,Math.ceil(u/n.MAX_MESSAGE_LENGTH)),e=[],i=0;i<f;i++){var r=i*n.MAX_MESSAGE_LENGTH,o=r+Math.min(n.MAX_MESSAGE_LENGTH,u-r),s=t.slice(r,o),h={n:f,data:s};e.push(JSON.stringify(h))}return e},n.prototype.combineMessages=function(n){var t=JSON.parse(n.data),i;t.n>=1?(this._data+=t.data||"",this._packetCount++,this._packetCount===t.n?(i=this._data,this._packetCount=0,this._data="",n.data=i,n.handled=!1):n.handled=!0):n.handled=!0},n.MAX_MESSAGE_LENGTH=32768,n}(),i;n.MessageThrottle=t;i=function(n){function i(t){n.call(this);this._messageHandlers=[];this._port=t}return __extends(i,n),Object.defineProperty(i.prototype,"name",{get:function(){return this._port.name},enumerable:!0,configurable:!0}),i.prototype.initialize=function(){this._port.addEventListener("message",this.onmessage.bind(this))},i.prototype.postMessage=function(n){for(var r=t.splitMessage(n),f,i=0,u=r.length;i<u;i++)f=r[i],this._port.postMessage(f);return!0},i.prototype.addEventListener=function(n,t){if(n!=="message")throw new Error("Invalid event type");this._messageHandlers.push(t)},i.prototype.removeEventListener=function(n,t){if(n!=="message")throw new Error("Invalid event type");for(;;){var i=this._messageHandlers.indexOf(t);if(i===-1)break;this._messageHandlers.splice(i,1)}},i.prototype.onmessage=function(n){var t,i,r;if(this.combineMessages(n),!n.handled)for(t=0,i=this._messageHandlers.length;t<i;t++)r=this._messageHandlers[t],r(n)},i}(t);n.PortThrottler=i}(Common||(Common={}))
//# sourceMappingURL=CommonMerged.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var __extends,Proxy,F12,__rpcLog,Common;(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.isTrue=function(t,i){t||(i=i?"Internal error. "+i:"Internal error. Unexpectedly false.",n.fail(i))},n.isFalse=function(t,i){t&&(i=i?"Internal error. "+i:"Internal error. Unexpectedly true.",n.fail(i))},n.isNull=function(t,i){t!==null&&(i=i?"Internal error. "+i:"Internal error. Unexpectedly not null.",i+=" '"+t+"'",n.fail(i))},n.isUndefined=function(t,i){undefined!==void 0&&(i="Internal error. Unexpectedly undefined has been redefined.",i+=" '"+undefined+"'",n.fail(i));t!==undefined&&(i=i?"Internal error. "+i:"Internal error. Unexpectedly not undefined.",i+=" '"+t+"'",n.fail(i))},n.hasValue=function(t,i){undefined!==void 0&&(i="Internal error. Unexpectedly undefined has been redefined.",i+=" '"+undefined+"'",n.fail(i));(t===null||t===undefined)&&(i=i?"Internal error. "+i:"Internal error. Unexpectedly "+(t===null?"null":"undefined")+".",n.fail(i))},n.areEqual=function(t,i,r){t!==i&&(r=r?"Internal error. "+r:"Internal error. Unexpectedly not equal.",r+=" '"+t+"' !== '"+i+"'.",n.fail(r))},n.areNotEqual=function(t,i,r){t===i&&(r=r?"Internal error. "+r:"Internal error. Unexpectedly equal.",r+=" '"+t+"' === '"+i+"'.",n.fail(r))},n.throws=function(t,i){try{t();i=i?"Internal error. "+i:"Internal error. Unexpectedly didn't throw.";n.fail(i)}catch(r){return}},n.fail=function(t){n.fail_helper(t,!0)},n.reportWatson=function(t){n.fail_helper(t,!1)},n.failDebugOnly=function(t){isDebugBuild&&n.fail(t)},n.fail_helper=function(n,t){var f=new Error((n||"Assert failed.")+"\n"),r,u;try{throw f}catch(i){if(r=typeof Common!="undefined"&&Common&&Common.ErrorHandling,u=typeof Microsoft!="undefined"&&Microsoft&&Microsoft.Plugin&&Microsoft.Plugin.F12&&Microsoft.Plugin.F12.SelfTest,r&&u&&!Microsoft.Plugin.F12.SelfTest.selfTestEnabled&&Common.ErrorHandling.reportErrorGivenStack(i),isDebugBuild||t){i.stack&&(i.description=i.stack);throw i}}},n}();n.Assert=t})(t=n.Utility||(n.Utility={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";function f(){return u(0,!1)}function u(n,u){if(u===void 0&&(u=!1),n in i)return i[n];var e=u,f=t.F12&&t.F12.getRegEntryForF12("FeatureF12"+r[n]);return f!==null&&f!==undefined&&f.length>0&&(e=f.toLowerCase()==="true"&&t.F12.isTargetEdge),i[n]=e,e}function e(n,u,f){f===void 0&&(f=!1);i[n]=u;f&&t.F12&&t.F12.setRegEntryForF12("FeatureF12"+r[n],String(u))}var t=Microsoft.Plugin,i=Object.create(null),r;(function(n){n[n.EditOnIdle=0]="EditOnIdle";n[n.ObjectMutationBreakpoint=1]="ObjectMutationBreakpoint"})(n.Feature||(n.Feature={}));r=n.Feature;n.isEditOnIdleEnabled=f;n.isEnabled=u;n.setEnabledState=e})(t=n.FeatureAvailability||(n.FeatureAvailability={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){"use strict";function e(n,t){return n.then(function(n){return u(function(){return t()})().then(function(){return r(n)})},function(n){return u(function(){return t()})().then(function(){return l(n)})})}function s(n,t,i){return e(n.then(undefined,u(t)),i)}function h(){return new i.Promise(function(n){return setImmediate(n)})}function c(n){return new i.Promise(function(t){return setTimeout(t,n)})}function r(n){return new i.Promise(function(t){return setImmediate(t,n)})}function l(n){if(n instanceof Error&&!("stack"in n))try{throw n}catch(t){n=t}return new i.Promise(function(t,i){return setImmediate(i,n)})}function u(n){if(n)return function(t){return r(t).then(n)}}function a(n){return new i.Promise(function(t,i){var u=0,f=function(){if(u<n.length){var t=n[u++];return r(t()).then(f,i)}};t(f())})}function v(t,r,u){var f=this,e=t();return e?i.Promise.wrap(!0):u<0?i.Promise.wrap(!1):n.Async.sleep(r).then(function(){return f.waitForCondition(t,r,u-r)})}var i=Microsoft.Plugin,o=function(){function n(n){n===void 0&&(n=!1);this._waiters=[];this._signaled=n}return n.prototype.wait=function(){var n=this;return this._signaled?new i.Promise(function(n){setImmediate(n)}):new i.Promise(function(t){return n._waiters.push(t)})},n.prototype.set=function(){var t,n,i,r;if(!this._signaled&&(this._signaled=!0,this._waiters.length>0))for(t=this._waiters.splice(0,this._waiters.length),n=0,i=t.length;n<i;n++)r=t[n],setImmediate(r)},n.prototype.reset=function(){this._signaled=!1},n}(),f;t.ManualResetEvent=o;f=function(){function n(t,i){if(i===void 0&&(i=n.MAX_INT32),this._waiters=[],(t|=0)<0||t>i)throw new RangeError;if((i|=0)<1)throw new RangeError;this._currentCount=t;this._initialCount=t;this._maxCount=i}return Object.defineProperty(n.prototype,"isEmpty",{get:function(){return this._currentCount===this._initialCount},enumerable:!0,configurable:!0}),n.prototype.wait=function(){var n=this;return this._currentCount>0?(this._currentCount--,new i.Promise(function(n){setImmediate(n)})):new i.Promise(function(t){n._waiters.push(t)})},n.prototype.release=function(n){if(n===void 0&&(n=1),(n|=0)<1)throw new RangeError;if(this._maxCount-this._currentCount<n)throw new Error("Semaphore full");while(n-->0)if(this._waiters.length>0){var t=this._waiters.shift();setImmediate(t)}else this._currentCount++},n.MAX_INT32=Math.pow(2,31)-1,n}();t.Semaphore=f;t.tryFinally=e;t.tryCatchFinally=s;t.yieldAsync=h;t.sleep=c;t.iterate=a;t.waitForCondition=v})(t=n.Async||(n.Async={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=function(){function t(n){this._uid=0;this._handlers=[];this._processors=[];this._callbacks={};this._pendingMessages=[];this._pendingTimeout=null;this._traceWriter=n}return Object.defineProperty(t.prototype,"engine",{get:function(){return this._engine},enumerable:!0,configurable:!0}),t.prototype.connect=function(n){this._engine=n},t.prototype.post=function(n){for(var i=[n],o,u,f,s,h,e,t=0,r=this._processors.length;t<r;t++){for(o=this._processors[t],u=[],f=0,s=i.length;f<s;f++)e=i[f],h=o.processor(e),u=u.concat(h);i=u}for(t=0,r=i.length;t<r;t++)e=i[t],this.runSendMessage(e)},t.prototype.loadScript=function(){throw new Error("Not implemented")},t.prototype.runSendMessage=function(){throw new Error("Not implemented")},t.prototype.detach=function(){throw new Error("Not implemented.")},t.prototype.call=function(n,t,i,r){var f=this,h=this.getUid(),s,e,u,o,c,l;if(i&&(this._callbacks[h]={synced:!0,callback:i||null}),s=[],e=[],t)for(u=0;u<t.length;u++)typeof t[u]=="function"?(o=this.getUid(),s.push(o),this._callbacks[o]={synced:!1,callback:t[u]},e[u]={uid:o,type:"callback"}):e[u]=t[u];return c={uid:h,command:n,args:e},l=function(n,i){i&&i(n,t[0]);try{f.post(n)}catch(r){return}},this._pendingMessages.push(c),this._pendingTimeout||(this._pendingTimeout=setTimeout(function(){var n=JSON.stringify(f._pendingMessages);f._pendingTimeout=null;f._pendingMessages=[];l(n,r)},0)),s},t.prototype.onmessage=function(n){var i,r,u,f;this._traceWriter.raiseEvent(405);window.msWriteProfilerMark("ConsoleWindow:BeginOnMessage");try{if(typeof n.engineId=="undefined"&&(n.engineId=t.ENGINE_ID),!this._engine||n.engineId!==this._engine.engineId)return;for(i={engineId:n.engineId,data:n.data,handled:!1},r=0,u=this._handlers.length;r<u;r++)if(f=this._handlers[r],f.handler(i),i.handled)return;this.fireCallbacks(i)}finally{window.msWriteProfilerMark("ConsoleWindow:EndOnMessage");this._traceWriter.raiseEvent(406)}},t.prototype.getUid=function(){return"uid"+(this._uid++).toString(36)},t.prototype.addCallback=function(n,t){this._callbacks[n]=t},t.prototype.addMessageProcessor=function(n,t){this._processors.push({stepName:n,processor:t})},t.prototype.addMessageHandler=function(n,t){this._handlers.push({stepName:n,handler:t})},t.prototype.clearCallbacks=function(){this._callbacks={}},t.prototype.fireCallbacks=function(t){for(var i,u=JSON.parse(t.data),r=0;r<u.length;r++)i=u[r],i&&i.args&&i.args.push(t.engineId),this._callbacks[i.uid]?(this._callbacks[i.uid].callback.apply(this,i.args),this._callbacks[i.uid]&&this._callbacks[i.uid].synced&&delete this._callbacks[i.uid]):i.uid==="scriptError"&&n.ErrorHandling.reportErrorDetails(i.args[0]);return t},t.ENGINE_ID="F12Engine",t}(),i,r,u;n.Channel=t;i=function(n){function t(t,i){n.call(this,i);this._proxy=t;this._proxy.addEventListener("message",this._onmessage=this.onmessage.bind(this))}return __extends(t,n),t.prototype.runSendMessage=function(n){if(this.engine.portName)return this._proxy._post("sendMessage",this.engine.engineId,this.engine.portName,n)},t.prototype.loadScript=function(n){this._proxy._post("loadScript",this.engine.engineId,n)},t.prototype.detach=function(){this._proxy.removeEventListener("message",this._onmessage)},t}(t);n.VSChannel=i;r=function(n){function t(t,i){n.call(this,i);this._external=t;this._external.addEventListener("connect",this._onconnect=this.onConnect.bind(this))}return __extends(t,n),t.prototype.runSendMessage=function(n){this._port.postMessage(n)},t.prototype.loadScript=function(n){this._external.loadScriptInProc(n)},t.prototype.onConnect=function(n){this._port=n;this._port.addEventListener("message",this._onmessage=this.onmessage.bind(this))},t.prototype.detach=function(){this._port.removeEventListener("connect",this._onconnect);this._port.removeEventListener("message",this._onmessage)},t}(t);n.IEChannel=r;u=function(){function n(n,t){this._uid=0;this._handlers=[];this._processors=[];this._callbacks={};this._pendingMessages=[];this._pendingTimeout=null;this._proxy=n;this._proxy.addEventListener("message",this._onmessage=this.onmessage.bind(this));this._traceWriter=t}return n.prototype.connect=function(n){this._engine=n},Object.defineProperty(n.prototype,"engine",{get:function(){return this._engine},enumerable:!0,configurable:!0}),n.prototype.post=function(n){for(var i=[n],o,u,f,s,h,e,t=0,r=this._processors.length;t<r;t++){for(o=this._processors[t],u=[],f=0,s=i.length;f<s;f++)e=i[f],h=o.processor(e),u=u.concat(h);i=u}for(t=0,r=i.length;t<r;t++)e=i[t],this.runSendMessage(e)},n.prototype.loadScript=function(){},n.prototype.runSendMessage=function(n){return this._proxy._post("sendMessage",this._engine.engineId,this._engine.portName,n)},n.prototype.call=function(n,t,i,r){var f=this.getUid(),e,u;i&&(this._callbacks[f]={synced:!0,callback:i||null});e={id:f,method:n,params:t};u=JSON.stringify(e);r&&r(u,t[0]);try{this.post(u)}catch(o){return}return[]},n.prototype.onmessage=function(n){var t,r,i;this._traceWriter.raiseEvent(405);window.msWriteProfilerMark("ConsoleWindow:BeginOnMessage");try{if(t=JSON.parse(n.data),t)if(t.id&&this._callbacks[t.id])this._callbacks[t.id]&&(this._callbacks[t.id].callback.call(this,t),this._callbacks[t.id].synced&&delete this._callbacks[t.id]);else if(t.method)for(r={engineId:n.engineId,data:t,handled:!1},i=0;i<this._handlers.length;i++)if(this._handlers[i].stepName===t.method&&(this._handlers[i].handler(r),r.handled))break}finally{window.msWriteProfilerMark("ConsoleWindow:EndOnMessage");this._traceWriter.raiseEvent(406)}},n.prototype.getUid=function(){return this._uid++},n.prototype.addCallback=function(n,t){this._callbacks[n]=t},n.prototype.addMessageProcessor=function(n,t){this._processors.push({stepName:n,processor:t})},n.prototype.addMessageHandler=function(n,t){this._handlers.push({stepName:n,handler:t})},n.prototype.clearCallbacks=function(){this._callbacks={}},n.prototype.detach=function(){this._proxy.removeEventListener("message",this._onmessage)},n}();n.ChromiumChannel=u}(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(){}return n.registerFocusHandlers=function(i){t.F12&&(n.LastActiveElement=document.head.parentElement,n.LastActiveElement.focus(),t.F12.Communications.registerMethodHandler("showfocus",function(t){return n.showFocus(t,i)}))},n.registerNavigationFrames=function(i){n.NavigationFrames=i;t.F12&&!n.Registered&&(t.F12.addEventListener("navigatesubframes",function(t){return n.navigateFrames(t.isForward,t.useActiveElement)}),n.Registered=!0)},n.enableNavigation=function(){n.Enabled=!0},n.disableNavigation=function(){n.Enabled=!1},n.makeNavigationFrameFromTarget=function(t,i){return n.makeNavigationFrameFromCallback(t,function(){return i})},n.makeNavigationFrameFromCallback=function(n,t){return{container:n,getNavigationTarget:t}},n.navigateFrames=function(t,i){var e=[],h=[],r=-1,a=t?1:-1,o,c,v,u,s,f,l;if(!n.Enabled)return!1;if(!n.navigateFrames||n.navigateFrames.length===0)return!0;for(o=0;o<n.NavigationFrames.length;o++)c=n.NavigationFrames[o],e.push(c.container),h.push(c.getNavigationTarget());if(i){for(v=document.activeElement,s=0;s<e.length;s++)f=e[s],f.contains(v)&&(u?u.contains(f)&&(u=f):u=f);u&&(r=e.indexOf(u)+a)}else r=t?0:n.NavigationFrames.length-1;while(r>=0&&r<h.length){if(l=h[r],l)return l.focus(),!1;r+=a}return!0},n.showFocus=function(i,r){var f=document.head.parentElement,u=document.activeElement,e=n.LastActiveElement,o;if(i)u&&u!==f?u.focus():n.shouldFocus(e)&&e!==f?e.focus():(o=!0,r===t.F12.PluginId.Console&&(o=!1),n.navigateFrames(o,!1));else{u&&u!==f&&(n.LastActiveElement=u);try{f.setActive()}catch(s){}}return!1},n.shouldFocus=function(n){return n&&document.body.contains(n)&&n.style.display!=="none"&&n.style.visibility!=="hidden"&&!n.disabled&&n.tabIndex>=0},n.Enabled=!0,n.Registered=!1,n}();n.NavigationUtilities=i})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(){}return n.addPromiseErrorListener=function(){var t=Microsoft.Plugin;t.Promise.addEventListener("error",function(i){t.F12&&t.F12.SelfTest.selfTestEnabled||!isDebugBuild&&n.ReportedToWatson||i&&i.detail&&i.detail.exception&&(!i.detail.exception.ExceptionType||i.detail.exception.ExceptionType!=="UnexpectedResult")&&(n.reportErrorGivenStack(i.detail.exception),n.ReportedToWatson=!0)})},n.reportErrorGivenStack=function(t){var e=t.message,u,f,i,r;if(!("stack"in t))try{throw t}catch(o){t=o}for(u=t.stack||"",f=u.split("\n"),r=0;r<f.length;r++)if(i=n.StackRegex.exec(f[r]),i)break;if(i){var s=i[3],h=parseInt(i[4],10),c=parseInt(i[5],10);window.reportError(e,s,h,u,c)}},n.reportErrorDetails=function(n){window.reportError(n.message,n.file,n.line,n.additionalInfo,n.column)},n.StackRegex=new RegExp(".* at ([^(]+) (.*/23/([^:]+):([0-9]+):([0-9]+))","gim"),n.ReportedToWatson=!1,n}();n.ErrorHandling=t})(Common||(Common={}));typeof window!="undefined"&&(window.reportError=function(n,t,i,r,u){var f,e;n=n||"";t=t||"";i=i||0;r=r||"";u=u||0;isDebugBuild&&(window.parent.getExternalObj?f=window.parent.getExternalObj():window.external&&(f=window.external),f&&(e=window.errorComponent?window.errorComponent:"Common",console.error([e,n,t,i,u].join("\r\n")),window.errorDisplayHandler&&window.errorDisplayHandler(n,t,i,r,u)));Microsoft&&Microsoft.Plugin&&Microsoft.Plugin.Diagnostics&&Microsoft.Plugin.Diagnostics.reportError&&Microsoft.Plugin.Diagnostics.reportError(n,t,i,r,u)},window.onerror=function(n,t,i){var r=0,u="";return arguments&&(arguments[3]&&typeof arguments[3]=="number"&&(r=arguments[3]),arguments[4]&&arguments[4]instanceof Error&&(u="Error number: "+arguments[4].number+("\r\nStack: "+arguments[4].stack))),window.reportError(n,t,i,u,r),!0});
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";function e(){document.addEventListener("keydown",function(n){return t(n)});document.addEventListener("contextmenu",function(n){return n.preventDefault(),n.stopPropagation(),!1});window.addEventListener("mousewheel",function(n){if(n.ctrlKey)return n.preventDefault(),n.stopPropagation(),!1})}function o(n){return n.shiftKey||n.ctrlKey||n.altKey}function s(n){return n.ctrlKey&&!n.shiftKey&&!n.altKey}function t(n){return n.keyCode===116||n.keyCode===117||n.keyCode===121&&n.shiftKey||n.keyCode===70&&n.ctrlKey?(n.preventDefault(),n.stopPropagation(),!1):!0}var i=function(){function n(){}return n.C="c",n.DEL="Del",n.DOWN="Down",n.END="End",n.ENTER="Enter",n.F10="F10",n.HOME="Home",n.LEFT="Left",n.RIGHT="Right",n.SPACEBAR="Spacebar",n.UP="Up",n}(),r,u,f;n.Keys=i,function(n){n[n.Backspace=8]="Backspace";n[n.Tab=9]="Tab";n[n.Enter=13]="Enter";n[n.Shift=16]="Shift";n[n.Control=17]="Control";n[n.Alt=18]="Alt";n[n.CapsLock=20]="CapsLock";n[n.Escape=27]="Escape";n[n.Space=32]="Space";n[n.PageUp=33]="PageUp";n[n.PageDown=34]="PageDown";n[n.End=35]="End";n[n.Home=36]="Home";n[n.ArrowLeft=37]="ArrowLeft";n[n.ArrowFirst=37]="ArrowFirst";n[n.ArrowUp=38]="ArrowUp";n[n.ArrowRight=39]="ArrowRight";n[n.ArrowDown=40]="ArrowDown";n[n.ArrowLast=40]="ArrowLast";n[n.Insert=45]="Insert";n[n.Delete=46]="Delete";n[n.A=65]="A";n[n.B=66]="B";n[n.C=67]="C";n[n.D=68]="D";n[n.E=69]="E";n[n.F=70]="F";n[n.G=71]="G";n[n.H=72]="H";n[n.I=73]="I";n[n.J=74]="J";n[n.K=75]="K";n[n.L=76]="L";n[n.M=77]="M";n[n.N=78]="N";n[n.O=79]="O";n[n.P=80]="P";n[n.Q=81]="Q";n[n.R=82]="R";n[n.S=83]="S";n[n.T=84]="T";n[n.U=85]="U";n[n.V=86]="V";n[n.W=87]="W";n[n.X=88]="X";n[n.Y=89]="Y";n[n.Z=90]="Z";n[n.ContextMenu=93]="ContextMenu";n[n.Multiply=106]="Multiply";n[n.Plus=107]="Plus";n[n.Minus=109]="Minus";n[n.F1=112]="F1";n[n.F2=113]="F2";n[n.F3=114]="F3";n[n.F4=115]="F4";n[n.F5=116]="F5";n[n.F6=117]="F6";n[n.F7=118]="F7";n[n.F8=119]="F8";n[n.F9=120]="F9";n[n.F10=121]="F10";n[n.F11=122]="F11";n[n.F12=123]="F12";n[n.Comma=188]="Comma";n[n.Period=190]="Period"}(n.KeyCodes||(n.KeyCodes={}));r=n.KeyCodes,function(n){n[n.LeftButton=0]="LeftButton";n[n.MiddleButton=1]="MiddleButton";n[n.RightButton=2]="RightButton"}(n.MouseButtons||(n.MouseButtons={}));u=n.MouseButtons,function(n){n[n.None=0]="None";n[n.Shift=1]="Shift";n[n.Ctrl=2]="Ctrl";n[n.Alt=4]="Alt"}(n.KeyFlags||(n.KeyFlags={}));f=n.KeyFlags;n.blockBrowserAccelerators=e;n.HasAnyOfAltCtrlShiftKeyFlags=o;n.HasOnlyCtrlKeyFlags=s;n.preventIEKeys=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){function e(n,i){u(n,i,t.Paste)}function o(n,i){u(n,i,t.Cut)}function s(n,i){u(n,i,t.Copy)}function h(n){r(n,t.Paste)}function c(n){r(n,t.Cut)}function l(n){r(n,t.Copy)}function u(n,r,u){n.addEventListener("keydown",function(n){return a(n,r,u)});document.body.addEventListener(t[u].toLowerCase(),function(t){for(var f=i||document.activeElement;!!f;){if(f===n)return v(t,r,u);f=f.parentNode}return!0})}function r(n,r){var u,f,e;if(window.clipboardData)u=document.createEvent("Event"),u.keyCode=r,u.ctrlKey=!0,u.initEvent("keydown",!0,!0),n.dispatchEvent(u);else{e=window.getSelection();e.rangeCount===0&&(f=document.createRange(),f.selectNode(y()),e.addRange(f));try{i=n;document.execCommand(t[r])}finally{i=undefined;f&&e.rangeCount>0&&e.removeRange(f)}}}function a(n,t,i){if(n.keyCode===i&&n.ctrlKey&&!n.shiftKey&&!n.altKey){var u=n.target;if(typeof clipboardData!="undefined")return f(clipboardData,t,i,u);if(u)return r(u,i),event.preventDefault(),event.stopPropagation(),!1}return!0}function v(n,t,r){return typeof n.clipboardData!="undefined"?f(n.clipboardData,t,r,i):!0}function f(n,i,r,u){var f=!0,e,o;return r===t.Paste?(e=n.getData("text"),e&&(f=i(e,u))):(o=i(u),o&&(n.setData("text",o),f=!1)),f||(event.preventDefault(),event.stopPropagation()),f}function y(){var n=document.getElementById("clipboardDiv");return n||(n=document.createElement("div"),n.id="clipboardDiv",n.contentEditable="true",document.body.appendChild(n)),n}var t,i;(function(n){n[n.Cut=88]="Cut";n[n.Copy=67]="Copy";n[n.Paste=86]="Paste"})(t||(t={}));n.addPasteListener=e;n.addCutListener=o;n.addCopyListener=s;n.firePasteEvent=h;n.fireCutEvent=c;n.fireCopyEvent=l})(t=n.ClipboardHelper||(n.ClipboardHelper={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(){}return n.changeButtonStatus=function(t,i,r){var u=n.isEnabled(t);i&&!u?(t.classList.remove("toolbarButtonStateDisabled"),t.setAttribute("aria-disabled","false")):!i&&u&&(t.classList.add("toolbarButtonStateDisabled"),t.setAttribute("aria-disabled","true"));typeof r=="boolean"&&(n.IsChangingAriaPressed=!0,r?(t.setAttribute("aria-pressed","true"),t.classList.add("toolbarButtonStateActive")):(t.setAttribute("aria-pressed","false"),t.classList.remove("toolbarButtonStateActive")),n.IsChangingAriaPressed=!1)},n.isEnabled=function(n){return!n.classList.contains("toolbarButtonStateDisabled")},n.isValidEvent=function(t){return(t.type==="click"||t.keyCode===13||t.keyCode===32)&&n.isEnabled(t.currentTarget)},n.setButtonTooltip=function(n,i,r){r===void 0&&(r=!0);var u=r?t.Resources.getString(i):i;n.setAttribute("data-plugin-vs-tooltip",u);n.setAttribute("aria-label",u)},n.setupButton=function(t,i,r,u,f){u===void 0&&(u=!0);f===void 0&&(f=!0);typeof i=="string"&&(n.setButtonTooltip(t,i,f),t.setAttribute("role","button"));r&&(t.addEventListener("click",function(t){return n.onButtonPress(t,r)}),t.addEventListener("keydown",function(t){return n.onButtonPress(t,r)}),t.addEventListener("DOMAttrModified",function(i){!n.IsChangingAriaPressed&&n.isEnabled(t)&&i.attrName==="aria-pressed"&&i.attrChange===i.MODIFICATION&&r(i)}));t.addEventListener("mousedown",n.onButtonMouseDown);t.addEventListener("mouseenter",n.onButtonMouseEnter);t.addEventListener("mouseleave",n.onButtonMouseLeave);t.addEventListener("mouseup",n.onButtonMouseUp);u||n.changeButtonStatus(t,!1)},n.onButtonMouseDown=function(t){var i=t.currentTarget;n.isEnabled(i)?i.classList.add("toolbarButtonMouseDown"):t.stopImmediatePropagation()},n.onButtonMouseEnter=function(t){var i=t.currentTarget;n.isEnabled(i)?i.classList.add("toolbarButtonMouseHover"):(t.preventDefault(),t.stopImmediatePropagation())},n.onButtonMouseLeave=function(n){var t=n.currentTarget;t.classList.remove("toolbarButtonMouseHover");t.classList.remove("toolbarButtonMouseDown")},n.onButtonMouseUp=function(n){var t=n.currentTarget;t.classList.remove("toolbarButtonMouseDown")},n.onButtonPress=function(t,i){n.isValidEvent(t)&&(i(t),t.preventDefault(),t.stopImmediatePropagation())},n}();n.ButtonHelpers=i})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function t(){}return t.escapeRegExp=function(n){return String.prototype.replace.call(n,t.ESCAPE_USER_INPUT_REGEX,"\\$&")},t.escapeRegExpWithWildCard=function(n){return String.prototype.replace.call(n,t.ESCAPE_USER_INPUT_REGEX,function(n){return n==="*"?".*":"\\"+n})},t.wrapInQuotes=function(n){return'"'+String.prototype.replace.call(n,/\\"/g,'"')+'"'},t.unescapeHtml=function(n){if(typeof n!="string"){if(n===null||n===undefined)return"";n=""+n}return String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(n,/&gt;/g,">"),/&lt;/g,"<"),/&apos;/g,"'"),/&quot;/g,'"'),/&amp;/g,"&")},t.escapeHtmlAndPreserveWhitespace=function(t){var f=[t],r,u,i;if(t=t.replace(/(\r\n|\n\r|\r|\n)/g,"\r\n"),r=t.split("\r\n"),r.length>0)for(f=[],u=0;u<r.length;u++)i=r[u],i=n.EncodingUtilities.escapeHtml(i),i="<pre>"+i+"<\/pre>",f.push(i);return f},t.escapeHtml=function(n){if(typeof n!="string"){if(n===null||n===undefined)return"";n=""+n}return String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(n,/&/g,"&amp;"),/"/g,"&quot;"),/'/g,"&apos;"),/</g,"&lt;"),/>/g,"&gt;")},t.replaceSpacesWithNonBreakingSpaceEntities=function(n){return String.prototype.replace.call(n,/ /g," ")},t.replaceLineBreaksWithNonBreakingSpaceEntities=function(n){return String.prototype.replace.call(n,/[\r\n]/g," ")},t.ESCAPE_USER_INPUT_REGEX=/([.+?^=!:${}()|\[\]\/\\])|(\*)/g,t}();n.EncodingUtilities=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";(function(n){n[n.Pass=0]="Pass";n[n.Fail=1]="Fail";n[n.Timeout=2]="Timeout"})(n.SelfTestResult||(n.SelfTestResult={}));var i=n.SelfTestResult,t=function(){function n(n,t,i){this.status=n;this.result=t;this.message=i;this.name="SelfTestError"}return n}();n.SelfTestError=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var r,t,u,i;(function(n){n[n.RelativeOrAbsolute=0]="RelativeOrAbsolute";n[n.Absolute=1]="Absolute";n[n.Relative=2]="Relative"})(n.UriKind||(n.UriKind={}));r=n.UriKind,function(n){n[n.Scheme=1]="Scheme";n[n.Userinfo=2]="Userinfo";n[n.Hostname=4]="Hostname";n[n.Port=8]="Port";n[n.Directory=16]="Directory";n[n.FilenameWithoutExtension=32]="FilenameWithoutExtension";n[n.Extension=64]="Extension";n[n.Filename=n.FilenameWithoutExtension|n.Extension]="Filename";n[n.Pathname=n.Directory|n.Filename]="Pathname";n[n.Search=128]="Search";n[n.Hash=256]="Hash";n[n.StrongPort=512]="StrongPort";n[n.KeepDelimiter=1024]="KeepDelimiter";n[n.AbsoluteUri=n.Scheme|n.Userinfo|n.Hostname|n.Port|n.Pathname|n.Search|n.Hash]="AbsoluteUri";n[n.HostnameAndPort=n.Hostname|n.StrongPort]="HostnameAndPort";n[n.StrongAuthority=n.Userinfo|n.Hostname|n.StrongPort]="StrongAuthority";n[n.Origin=n.Scheme|n.Hostname|n.Port]="Origin";n[n.PathnameAndSearch=n.Pathname|n.Search]="PathnameAndSearch"}(n.UriComponents||(n.UriComponents={}));t=n.UriComponents,function(n){n[n.UriEscaped=1]="UriEscaped";n[n.Unescaped=2]="Unescaped";n[n.SafeUnescaped=3]="SafeUnescaped"}(n.UriFormat||(n.UriFormat={}));u=n.UriFormat;i=function(){function i(){for(var f,r,e,u,n=[],t=0;t<arguments.length;t++)n[+t]=arguments[t];if(n.length>=2&&n[0]instanceof i){if(f=n[0],n[1]instanceof i)r=n[1];else if(n[1]!==null&&n[1]!==undefined)r=new i(String(n[1]),0);else throw new TypeError("Missing required argument: uri.");i.mergeCore(f,r,this)}else if(n.length>=1&&n[0]!==null&&n[0]!==undefined){if(e=String(n[0]),u=1,n.length>=2)if(typeof n[1]=="number")u=n[1];else throw new TypeError("Invalid argument: kind.");i.parseCore(e,u,this)}else throw new TypeError("Argument not optional.")}return Object.defineProperty(i.prototype,"isRooted",{get:function(){return this.isAbsolute||/^\//.test(this.pathname)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isAbsolute",{get:function(){return this._scheme===i.UriSchemeFile&&typeof this._pathname=="string"&&/^[\\/]?\.{1,2}([\\/]|$)/.test(this._pathname)?!1:!!this._scheme},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isFile",{get:function(){return this._scheme===i.UriSchemeFile},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isUnc",{get:function(){return this.isFile&&!!(this._components&4)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isDosPath",{get:function(){return this.isFile&&!this._hostname&&/^\/?[a-z][:|]/i.test(this._pathname)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hasDefaultPort",{get:function(){return this.isAbsolute&&(typeof this._port!="number"||this._scheme===i.UriSchemeHttp&&this._port===80||this._scheme===i.UriSchemeHttps&&this._port===443)?!0:!1},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"raw",{get:function(){return this._raw},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"origin",{get:function(){return this.getComponentsCore(t.Origin,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"authority",{get:function(){return this.getComponentsCore(t.HostnameAndPort,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"protocol",{get:function(){return this.getComponentsCore(1025,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"scheme",{get:function(){return this.getComponentsCore(1,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"userinfo",{get:function(){return this.getComponentsCore(2,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"host",{get:function(){return this.getComponentsCore(t.HostnameAndPort,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hostname",{get:function(){return this.getComponentsCore(4,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pathname",{get:function(){return this.getComponentsCore(t.Pathname,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pathnameAndSearch",{get:function(){return this.getComponentsCore(t.PathnameAndSearch,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"search",{get:function(){return this.getComponentsCore(1152,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hash",{get:function(){return this.getComponentsCore(1280,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"port",{get:function(){return typeof this._port=="number"?this._port:this._scheme===i.UriSchemeHttp?i.DEFAULT_PORT_HTTP:this._scheme===i.UriSchemeHttps?i.DEFAULT_PORT_HTTPS:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"absoluteUri",{get:function(){return this.getComponentsCore(t.AbsoluteUri,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"absolutePath",{get:function(){var n=this.getComponentsCore(t.Pathname|1024,1);return this.isDosPath&&(n=n.substr(1)),n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"localPath",{get:function(){if(this.isUnc||this.isDosPath){var n=this.getComponentsCore(t.Pathname|1024,1);if(n=n.replace(i.PATH_DELIMITER,i.DOS_PATH_DELIMITER),this.isUnc)return i.UNC_ROOT+this.hostname+n;if(this.isDosPath)return n.substr(1)}return""},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"segments",{get:function(){var n=this.getComponentsCore(t.Pathname|1024,1);return n.length>1?(n=n.substr(1),n.split(i.PATH_DELIMITER)):[]},enumerable:!0,configurable:!0}),i.parse=function(n,t){return t===void 0&&(t=1),new i(n,t)},i.tryParse=function(n,t){if(t===void 0&&(t=1),n===null||n===undefined)throw new TypeError("Missing required argument: text.");return i.parseCore(n,t,undefined)},i.tryMerge=function(n,t){if(n===null||n===undefined)throw new TypeError("Missing required argument: baseUri.");if(t===null||t===undefined)throw new TypeError("Missing required argument: uri.");return i.mergeCore(n,t,undefined)},i.create=function(r){var s,l,a,h,v,e,o,c,f,y,u,p;if(r||(r={}),c=!1,f=0,typeof r.keepDelimiter=="boolean"&&(c=r.keepDelimiter),typeof r.scheme=="string"&&(s=n.ToolWindowHelpers.tryDecodeURIComponent(r.scheme.toLowerCase()),f|=1,(s===i.UriSchemeHttp||s===i.UriSchemeHttps)&&(f|=512)),typeof r.userinfo=="string"&&(l=r.userinfo.toLowerCase(),f|=2),typeof r.hostname=="string"&&(a=r.hostname.toLowerCase(),f|=4),typeof r.port=="number"){if(r instanceof i)y=r,h=y._port;else{if(r.port<0)throw new RangeError("Invalid port.");h=r.port}typeof h=="number"&&(f|=520)}return r.pathname&&(v=r.pathname,f|=t.Pathname),r.search&&(e=r.search,!c&&e.length>0&&e.charAt(0)===i.SEARCH_DELIMITER&&(e=e.substr(1)),f|=128),r.hash&&(o=r.hash,!c&&o.length>0&&o.charAt(0)===i.HASH_DELIMITER&&(o=o.substr(1)),f|=256),u=Object.create(i.prototype),u._scheme=s,u._userinfo=l,u._hostname=a,u._port=h,u._pathname=v,u._search=e,u._hash=o,u._components=f,u=new i(u.toString()),typeof r.uri=="string"&&(p=new i(r.uri),u=new i(p,u)),u},i.equals=function(n,t,r){if(r===void 0&&(r=!1),n===t)return!0;if(n===null)return t===null;if(t===null)return!1;if(n===undefined)return t===undefined;if(t===undefined)return!1;var u,f;return u=typeof n=="string"?new i(n,0):n,f=typeof t=="string"?new i(t,0):t,i.stringEquals(u.toString(),f.toString(),r)?!0:u._scheme===f._scheme&&u._userinfo===f._userinfo&&u._hostname===f._hostname&&u.port===f.port&&i.stringEquals(u._pathname,f._pathname,r)&&i.stringEquals(u._search,f._search,r)&&i.stringEquals(u._hash,f._hash,r)?!0:!1},i.compare=function(n,r,u,f,e){if(u===void 0&&(u=t.AbsoluteUri),f===void 0&&(f=1),e===void 0&&(e=!1),typeof u!="number")throw new TypeError("Invalid argument: partsToCompare.");if(typeof f!="number")throw new TypeError("Invalid argument: compareFormat.");if((f&-4)!=0)throw new RangeError("Argument out of range: compareFormat.");return n===r?0:n===null||n===undefined?r===null||r===undefined?0:-1:r===null||r===undefined?1:n.isAbsolute&&r.isAbsolute?i.compareStrings(n.getComponentsCore(u,f),r.getComponentsCore(u,f),e):n.isAbsolute?1:r.isAbsolute?-1:i.compareStrings(n.raw,r.raw,e)},i.getCurrent=function(){return typeof self!="undefined"?new i(self.location.href):new i(".")},i.prototype.getComponents=function(n,t){if(typeof n!="number"||typeof t!="number")throw new TypeError("Invalid argument: components.");if(typeof t!="number")throw new TypeError("Invalid argument: format.");if((t&-4)!=0)throw new RangeError("Argument out of range: format.");return n=i.adjustComponents(n),this.getComponentsCore(n,t)},i.prototype.toString=function(){return this.getComponentsCore(t.AbsoluteUri,3)},i.prototype.toJSON=function(){return this.toString()},i.prototype.isSameOrigin=function(n){if(n===null||n===undefined)throw new TypeError("Missing required argument: uri.");var r=n instanceof i?n:new i(String(n));return this.isAbsolute?this.getComponentsCore(t.Origin,1)===r.getComponentsCore(t.Origin,1):!r.isAbsolute},i.prototype.isBaseOf=function(n){var r;if(n===null||n===undefined)throw new TypeError("Missing required argument: uri.");var e=this.getComponentsCore(t.AbsoluteUri&-257,3),o=this.getComponentsCore(t.AbsoluteUri&-257,3),u=e.split(i.PATH_DELIMITER),f=o.split(i.PATH_DELIMITER);if(u.length>f.length)return!1;for(r=0;r<u.length;r++)if(!i.compareStrings(u[r],f[r],this.isDosPath||this.isUnc||n.isDosPath||n.isUnc))return!1;return!0},i.prototype.makeRelative=function(n){var f;if(n===null||n===undefined)throw new TypeError("Missing required argument: uri.");if(!this.isAbsolute||!n.isAbsolute)throw new URIError("URI not absolute.");if(!this.isSameOrigin(n))return n;var r=n.absolutePath,t=i.computePathDifference(this.absolutePath,r,this.isDosPath||this.isUnc),u=/[:\\/?#]/.exec(t);return u&&u[0]===":"&&(!n.isDosPath||t!==r)&&(t="./"+t),f=t+n.getComponentsCore(384,1),new i(f,2)},i.prototype.equals=function(n,t){return i.equals(this,n,t)},i.stringEquals=function(n,t,i){return i&&typeof n=="string"&&typeof t=="string"&&(n=n.toLowerCase(),t=t.toLowerCase()),n===t},i.compareStrings=function(n,t,i){return i&&typeof n=="string"&&typeof t=="string"&&(n=n.toLowerCase(),t=t.toLowerCase()),n>t?1:n<t?-1:0},i.compareNumbers=function(n,t){return n<t?-1:n>t?1:0},i.formatUserinfo=function(t,r){switch(r){case 1:t=i.escape(t,"?#","%");break;case 2:t=n.ToolWindowHelpers.tryDecodeURIComponent(t);break;case 3:t=i.unescape(t,"@/\\","safe")}return t},i.formatPath=function(t,r){switch(r){case 1:t=i.escape(t,"?#","%");break;case 2:t=n.ToolWindowHelpers.tryDecodeURIComponent(t);break;case 3:t=i.unescape(t,"?#","safe")}return t},i.formatSearch=function(n,t){switch(t){case 1:n=i.escape(n,"#","%");break;case 2:n=i.unescape(n,"#","all");break;case 3:n=i.unescape(n,"#","safe")}return n},i.formatHash=function(n,t){switch(t){case 1:n=i.escape(n,"","%");break;case 2:n=i.unescape(n,"#","all");break;case 3:n=i.unescape(n,"#","safe")}return n},i.escape=function(t,i,r){var u,s,h;if(!t)return t;var f=[],o=0,e="";for(u=0;u<t.length;u++)if(s=t.charAt(u),i.indexOf(s)>-1?e="forced":r.indexOf(s)>-1&&(e="reserved"),e!==""){if(o<u&&f.push(n.ToolWindowHelpers.tryEncodeURI(t.substring(o,u))),o=u+1,e==="forced")f.push(n.ToolWindowHelpers.tryEncodeURIComponent(s));else if(e==="reserved")if(s==="%"){if(u+3<=t.length&&(h=t.substr(u,3),/^%[a-f\d]{2}$/i.test(h))){f.push(h);e="";u+=2;o+=2;continue}f.push(n.ToolWindowHelpers.tryEncodeURIComponent("%"))}else f.push(s);e=""}return o<u&&f.push(n.ToolWindowHelpers.tryEncodeURI(t.substring(o,u))),f.join("")},i.unescape=function(t,i,r){var f,o,e,h;if(!t)return t;for(var c=[],l=0,v=function(t){c.push(n.ToolWindowHelpers.tryEncodeURIComponent(t))},a=function(n,t){c.push(n);u+=t;l=u+1},s=function(){l<u&&c.push(t.substring(l,u));l=u+1},u=0;u<t.length;u++)if(f=t.charAt(u),o=1,f==="%"){if(u+3<=t.length){e=t.substr(u,3);f="";try{/^%[a-f\d]{2}$/i.test(e)&&(h=parseInt("0x"+e.substr(1)),h<128?(o=2,f=decodeURIComponent(e)):h<224&&u+6<=t.length?(e=t.substr(u,6),/^(%[a-f\d]{2}){2}$/i.test(e)&&(o=5,f=decodeURIComponent(e))):h<240&&u+9<=t.length?(e=t.substr(u,9),/^(%[a-f\d]{2}){3}$/i.test(e)&&(o=8,f=decodeURIComponent(e))):h<245&&u+12<=t.length&&(e=t.substr(u,12),/^(%[a-f\d]{2}){4}$/i.test(e)&&(o=11,f=decodeURIComponent(e))))}catch(y){s();a(e,o)}if(r==="all"){if(f.length!==1)continue;s();a(f,o)}else if(f.length!==1)continue;else f==="%"||i.indexOf(f)>-1?u+=2:/^[;/?:@&=+$#%\\\x00-\x17]$/.test(f)?u+=2:(s(),a(f,o))}}else if(r==="all")continue;else i.indexOf(f)>-1&&(s(),v(f));return s(),c.join("")},i.parseCore=function(n,r,u){var o,l,e,a,p,f,w,v,y,h=0,b=n,s,c;if(n=n.trim(),f=n,r!==2){if(i.DosPath.test(n)&&(n="file:///"+n),s=i.UriParser.exec(n),s)o=s[i.SCHEME_INDEX],l=s[i.USERINFO_INDEX],e=s[i.HOSTNAME_INDEX],a=s[i.PORT_INDEX],f=s[i.PATHNAME_INDEX],w=!!s[i.SCHEMESEGMENT_INDEX],v=s[i.SEARCH_INDEX],y=s[i.HASH_INDEX],r=1;else{if(r===1){if(u)throw new URIError;return}r=2}if(!o&&w){if(u)throw new URIError;return}(o||e)&&f&&(f=f.replace(/\\/g,i.PATH_DELIMITER));o&&o.toLowerCase()===i.UriSchemeFile&&(/^\.{1,2}$/.test(e)&&/^([\\/]|$)/.test(f)||/^[a-z]$/i.test(e)&&/^:[\\/]/.test(f)?(f=e+f,e=undefined):e||(/^[\\/]\.{1,2}/.test(f)?f=f.substr(1):/^[\\/]{2,}/.test(f)&&(f=f.replace(/^[\\/]{2,}/,""),c=f.indexOf(i.PATH_DELIMITER),c>-1?(e=f.substr(0,c),f=f.substr(c)):(e=f,f=""))))}return typeof o=="string"&&(o=o.toLowerCase(),h|=1,(o===i.UriSchemeHttp||o===i.UriSchemeHttps)&&(h|=512)),typeof l=="string"&&(h|=2),typeof e=="string"&&(e=e.toLowerCase(),h|=4),typeof a=="string"&&(p=parseInt(a),h|=520),typeof f=="string"&&r!==2&&(f=i.normalizePath(f)),f&&(h|=t.Pathname),typeof v=="string"&&(h|=128),typeof y=="string"&&(h|=256),u||(u=Object.create(i.prototype)),u._scheme=o,u._userinfo=l,u._hostname=e,u._port=p,u._pathname=i.escape(f,"","%"),u._search=v,u._hash=y,u._raw=b,u._components=h,u},i.mergeCore=function(n,r,u){if(!u&&r.isAbsolute)return r;var o,h,c,l,f,s,a,e=0;return r._scheme?(o=r._scheme,h=r._userinfo,c=r._hostname,l=r._port,f=i.normalizePath(r._pathname),s=r._search):(r._hostname?(h=r._userinfo,c=r._hostname,l=r._port,f=i.normalizePath(r._pathname),s=r._search):(r._pathname?(r._pathname.charAt(0)===i.PATH_DELIMITER?f=i.normalizePath(r._pathname):(f=i.mergePath(n._pathname,r._pathname),f=i.normalizePath(f)),s=r._search):(f=n._pathname,s=r._search?r._search:n._search),h=n._userinfo,c=n._hostname,l=n._port),o=n._scheme),a=r._hash,typeof o=="string"&&(e|=1,(o===i.UriSchemeHttp||o===i.UriSchemeHttps)&&(e|=512)),typeof h=="string"&&(e|=2),typeof c=="string"&&(e|=4),typeof l=="number"&&(e|=520),f&&(e|=t.Pathname),typeof s=="string"&&(e|=128),typeof a=="string"&&(e|=256),u||(u=Object.create(i.prototype)),u._scheme=o,u._userinfo=h,u._hostname=c,u._port=l,u._pathname=f,u._search=s,u._hash=a,u._components=e,u._raw=u.toString(),u},i.mergePath=function(n,t){var r=-1;return n&&(r=n.lastIndexOf(i.PATH_DELIMITER)),r>=0?n.substr(0,r+1)+t:t},i.normalizePath=function(n){var t,u,r,f;for(n=n.replace(/^\s+|\s+$/g,""),n=n.replace(/\\+|\/+/g,i.PATH_DELIMITER),t=n.split(/\//g),u=t[0]==="",u&&t.shift(),r=0;r<t.length;){f=t[r];switch(f){case i.CURRENT_DIRECTORY_TOKEN:if(r!==0||u){t.splice(r,1);r===t.length&&t.push("");continue}break;case i.PARENT_DIRECTORY_TOKEN:if(r===0&&u){t.splice(r,1);continue}if(r>=1&&t[r-1]!==i.CURRENT_DIRECTORY_TOKEN&&t[r-1]!==i.PARENT_DIRECTORY_TOKEN){t.splice(--r,2);r===t.length&&t.push("");continue}}r++}return u&&t.unshift(""),t.join(i.PATH_DELIMITER)},i.computePathDifference=function(n,t,r){for(var e=-1,f,u=0;u<n.length&&u<t.length&&i.compareStrings(n.charAt(u),t.charAt(u),r)===0;u++)n.charAt(u)===i.PATH_DELIMITER&&(e=u);if(u===0)return t;if(u===n.length&&u===t.length)return"";for(f=[];u<n.length;u++)n.charAt(u)===i.PATH_DELIMITER&&f.push(i.PARENT_DIRECTORY_TOKEN,i.PATH_DELIMITER);return f.length===0&&t.length-1===e?i.CURRENT_DIRECTORY_TOKEN+i.PATH_DELIMITER:f.join("")+t.substr(e+1)},i.adjustComponents=function(n){return n&512&&(n|=8),n&2&&(n&-1025)!=2&&(n|=4),n&8&&(n&-1537)!=8&&(n|=4),n&t.Origin&&(n&256?n|=t.PathnameAndSearch:n&128?n|=t.Pathname:n&64?n|=48:n&32&&(n|=16)),(n&t.Pathname)==80&&(n|=32),n},i.prototype.getComponentsCore=function(n,r){var u=[],e=!1,f=n&this._components;return f&1&&(u.push(this._scheme),e=this._scheme===i.UriSchemeFile,n!==1&&u.push(i.PROTOCOL_DELIMITER)),(n&1025&&f&(t.StrongAuthority|8)||e)&&u.push(i.SCHEME_DELIMITER),f&(t.StrongAuthority|8)&&(f&2&&(u.push(i.formatUserinfo(this._userinfo,r)),n!==2&&u.push(i.USERINFO_DELIMITER)),f&4&&u.push(this._hostname),f&520&&(u.push(i.PORT_DELIMITER),u.push(this.port.toString()))),n&t.Pathname&&u.push(this.getCanonicalPath(n,r)),f&128&&(n!==128&&u.push(i.SEARCH_DELIMITER),u.push(i.formatSearch(this._search,r))),f&256&&(n!==256&&u.push(i.HASH_DELIMITER),u.push(i.formatHash(this._hash,r))),u.join("")},i.prototype.getCanonicalPath=function(n,r){var u=this._pathname,c=!1,y,o,f,s,l,a,e,h,v;if(n&1024?c=!0:this.isAbsolute&&(this.isFile?c=!0:(this._components&(4|t.Pathname))==(4|t.Pathname)&&(c=!0)),!(this._components&t.Pathname)||u.length===0)return n&16&&c?i.PATH_DELIMITER:"";if(n&16&&(y=u.charAt(0)!==i.PATH_DELIMITER,c&&y&&(u=i.PATH_DELIMITER+u)),o=n&t.Pathname,o===t.Pathname)return i.formatPath(u,r);if(s=u.lastIndexOf(i.PATH_DELIMITER),o&16){if(s===u.length-1?l=i.formatPath(u,r):s>-1&&(l=i.formatPath(u.substr(0,s+1),r)),o===16)return l;f||(f=[]);f.push(l)}if(a=o&t.Filename,a&&s<u.length-1)if(e=s>-1?u.substr(s+1):u,a===t.Filename){if(e=i.formatPath(e,r),o===t.Filename)return e;f||(f=[]);f.push(e)}else if(h=e.lastIndexOf(i.EXTENSION_DELIMITER),a===32){if(v=h===-1?i.formatPath(e,r):h>0?i.formatPath(e.substr(0,h),r):"",o===32)return v;f||(f=[]);f.push(v)}else return h===0?i.formatPath(e,r):h>0?i.formatPath(e.substr(h),r):"";return f?f.join(""):""},i.UriParser=/^(?:([a-z][a-z0-9+.\-]*)[:|])?(?:[\\/]{2}(?:((?:[\w\-._~!$&'()*+,;=:]|%[a-f0-9]{2})*)@)?(\[[^\[\]]+\]|[\w\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\.\-_]*)(?:\:(\d+))?|(?![\\/]{2}))(([^/\\?#]*:)?[^?#]*?)(?:\?([^#]*?))?(?:#(.*?))?$/i,i.DosPath=/^([a-z]\:|[\\/]{2,}[^\\/@:?#]+)[\\/]/i,i.SCHEME_INDEX=1,i.USERINFO_INDEX=2,i.HOSTNAME_INDEX=3,i.PORT_INDEX=4,i.PATHNAME_INDEX=5,i.SCHEMESEGMENT_INDEX=6,i.SEARCH_INDEX=7,i.HASH_INDEX=8,i.SCHEME_DELIMITER="//",i.PATH_DELIMITER="/",i.DOS_PATH_DELIMITER="\\",i.UNC_ROOT="\\\\",i.USERINFO_DELIMITER="@",i.SEARCH_DELIMITER="?",i.HASH_DELIMITER="#",i.CURRENT_DIRECTORY_TOKEN=".",i.PARENT_DIRECTORY_TOKEN="..",i.PROTOCOL_DELIMITER=":",i.PORT_DELIMITER=":",i.EXTENSION_DELIMITER=".",i.DEFAULT_PORT_HTTP=80,i.DEFAULT_PORT_HTTPS=443,i.SchemeDelimiter="://",i.UriSchemeHttp="http",i.UriSchemeHttps="https",i.UriSchemeFile="file",i.UriSchemeData="data",i}();n.Uri=i})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i;(function(n){function l(n,t){n.metadata=t}function o(){function f(n){return function(){var i=arguments;return t.Promise.timeout().then(function(){return t.F12.SelfTest.logMessage("Executing step "+n+"."),u[n].apply(null,i)})}}for(var i,r,u=[],n=0;n<arguments.length;n++)u[+n]=arguments[n];for(i=t.Promise.wrap(null),r=0;r<u.length;r++)i=i.then(f(r));return i}function a(n){var u,i,r,f;for(u in n){i=n[u];for(r in i)r[0]!=="_"&&(f=u+"."+r,t.F12.Communications.registerMethodHandler(e+f,g(i,i[r]),!0))}}function i(n,i,r){var u=r?JSON.stringify(r).slice(1,-1):"";return t.F12.SelfTest.logMessage("Calling "+i+"("+u+") on "+t.F12.PluginId[n]),t.F12.Communications.callMethod(n,e+i,r)}function u(n){try{return i(t.F12.PluginId.Debugger,"Contract.executeOnTargetPage",["("+n.toString()+")();"])}catch(r){return t.Promise.wrap(null)}}function v(n){var t="function () {document.getElementById('testPlayground').innerHTML = \""+n+'";}';return u(t)}function s(){return u(function(){var n=document.getElementById("testPlayground");n.innerHTML=""})}function y(n,i){!f&&t.F12.SelfTest.selfTestEnabled&&(f=!0,n&&n(),w(i))}function p(){return o(function(){return i(t.F12.PluginId.Debugger,"Contract.resume",[!1])},function(){return i(t.F12.PluginId.Debugger,"Contract.removeAllBreakpoints")},function(){return i(t.F12.PluginId.Debugger,"Contract.removeAllWatches")},function(){return s()})}function w(n){if(t.F12.SelfTest.selfTestEnabled){var i=Object.keys(n).reduce(function(t,i){return t.concat(k(i,n[i]))},[]);t.F12.Communications.registerMethodHandler("runSelfTest",b(n),!0);t.F12.Communications.callMethod(t.F12.PluginId.Header,"registerSelfTests",[i])}}function b(n){return function(t,i){function f(n){i(null,n)}try{var r=t.moduleName,u=t.testCaseName;F12.Tools.Utility.Assert.hasValue(n[r],"Unknown module name: "+r);F12.Tools.Utility.Assert.hasValue(n[r][u],"Unknown test name: "+u);n[r][u]().then(function(){return i(!0)},f)}catch(e){f(e)}}}function k(n,t){return Object.keys(t).filter(function(n){return n!=="metadata"}).map(function(i){return d(n,t,i)})}function d(n,i,u){var e=r("priority",i[u],i),f;return typeof e=="undefined"&&(e=c),f=r("timeout",i[u],i),typeof f=="undefined"&&(f=h),{testCaseName:u,name:[t.F12.myPluginName,n,u].join("."),pluginName:t.F12.myPluginName,pluginId:t.F12.PluginId[t.F12.myPluginName],moduleName:n,metadata:{priority:e,timeout:f,disabledWithBug:r("disabledWithBug",i[u],i),requiresTarget:r("requiresTarget",i[u],i),requireFeatureKey:r("requireFeatureKey",i[u],i)}}}function r(n,t,i){return t.metadata&&typeof t.metadata[n]!="undefined"?t.metadata[n]:i.metadata&&typeof i.metadata[n]!="undefined"?i.metadata[n]:void 0}function g(n,t){return function(){for(var u,i,f=[],r=0;r<arguments.length;r++)f[+r]=arguments[r];u=f.pop();i=t.apply(n,f);i&&i.then&&i.done&&i.cancel?i.then(function(n){u(n||!0)},function(n){u(null,n)}):u(i||!0)}}var h=4e3,c=3,e="__$",f;n.setTestMetadata=l;n.joinSerial=o;n.publishModules=a;n.callMethodOn=i;n.runOnTargetPage=u;n.setupTestPage=v;n.cleanupTestPage=s;f=!1;n.initialize=y;n.globalTestCleanup=p})(i=n.SelfTestUtilities||(n.SelfTestUtilities={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(){}return i.initializeToolWindow=function(){document.addEventListener("mousedown",function(){$m(document.body).removeClass("showFocus")},!0);$m(document).bind("contextmenu",function(){return!1});$m(document).bind("keydown",function(n){if(n.keyCode===116||n.keyCode===121&&n.shiftKey)return n.preventDefault(),n.stopPropagation(),!1;n.keyCode===9&&$m(document.body).addClass("showFocus")});$m(".BPT-ToolbarButton").bind("mousedown",function(n){var t=$m(this);t.hasClass("BPT-ToolbarButton-StateDisabled")?n.stopImmediatePropagation():t.addClass("BPT-ToolbarButton-MouseDown")});$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(n){var t=$m(this);t.hasClass("BPT-ToolbarButton-StateDisabled")?(n.preventDefault(),n.stopImmediatePropagation()):t.addClass("BPT-ToolbarButton-MouseHover")});$m(".BPT-ToolbarButton").bind("click keydown",function(n){var t,i;(n.type==="click"||n.keyCode===13||n.keyCode===32)&&(t=$m(this),t.hasClass("BPT-ToolbarButton-StateDisabled")?(n.preventDefault(),n.stopImmediatePropagation()):(i=t.get(0),document.activeElement!==i&&i.focus()))});$m(".BPT-ToolbarToggleButton").bind("click keydown",function(n){var t,i;(n.type==="click"||n.keyCode===13||n.keyCode===32)&&(t=$m(this),t.hasClass("BPT-ToolbarButton-StateDisabled")?(n.preventDefault(),n.stopImmediatePropagation()):(i=t.get(0),document.activeElement!==i&&i.focus(),t.hasClass("BPT-ToolbarToggleButton-StateOn")?(t.removeClass("BPT-ToolbarToggleButton-StateOn"),t.attr("aria-pressed",!1)):(t.addClass("BPT-ToolbarToggleButton-StateOn"),t.attr("aria-pressed",!0))))});$m(".BPT-TabCycle-Horizontal, .BPT-TabCycle-Vertical").children(".BPT-TabCycle-Item").bind("keydown",function(n){if($m(this).parent().hasClass("BPT-TabCycle-Horizontal")&&(n.keyCode===37||n.keyCode===39)||$m(this).parent().hasClass("BPT-TabCycle-Vertical")&&(n.keyCode===38||n.keyCode===40)){var i=$m(this),t=n.keyCode===37||n.keyCode===38?i.prev(".BPT-TabCycle-Item").first():i.next(".BPT-TabCycle-Item").first();t.length>0&&(t.attr("tabindex","1"),t.trigger("focus"),t.trigger("click"),i.removeAttr("tabindex"))}});$m(".BPT-TabCycle-Horizontal, .BPT-TabCycle-Vertical").children(".BPT-TabCycle-Item").bind("mousedown",function(){var t=$m(this).siblings(".BPT-TabCycle-Item").matchAttr("tabindex","1"),n=$m(this);n.length>0&&(n.attr("tabindex","1"),n.trigger("focus"),t.removeAttr("tabindex"))})},i.registerErrorComponent=function(n,t){window.errorComponent=n;window.errorDisplayHandler=t},i.loadString=function(n){for(var i=[],r=1;r<arguments.length;r++)i[r-1]=arguments[r];return i.length===1&&Array.isArray(i[0])&&(i=i[0]),t.Resources.getString.apply(this,["/Common/"+n].concat(i))},i.codeMarker=function(n){t.VS.Internal.CodeMarkers.fire(n)},i.scrollIntoView=function(n,t){if(n&&n.getBoundingClientRect){var i=n.getBoundingClientRect(),r=t.getBoundingClientRect(),u=i.top<r.top,f=i.bottom>r.bottom;if(u||f)return n.scrollIntoView(!0),!0}return!1},i.getSortedObjectProperties=function(t){var i=[];for(var r in t)i.push(r);return i.sort(n.ToolWindowHelpers.naturalSort),i},i.getSortedArrayProperties=function(t,i,r){for(var f=[],e,u=0;u<t.length;u++)f.push({property:t[u][i],realIndex:u});for(f.sort(function(t,i){if(r){if(t.property===r&&i.property===r)return 0;if(t.property===r)return-1;if(i.property===r)return 1}return n.ToolWindowHelpers.naturalSort(t.property,i.property)}),e=[],u=0;u<f.length;u++)e.push(f[u].realIndex);return e},i.naturalSort=function(n,t){var s=/(\d+)|(\D+)/g,i=String(n).toLocaleLowerCase().match(s),r=String(t).toLocaleLowerCase().match(s);if(!i&&r)return-1;if(i&&!r)return 1;if(!i&&!r)return 0;while(i.length>0&&r.length>0){var e=i.shift(),o=r.shift(),u=parseInt(e,10),f=parseInt(o,10);if(isNaN(u)&&isNaN(f)){if(e!==o)return e.localeCompare(o)}else{if(isNaN(u))return 1;if(isNaN(f))return-1;if(u!==f)return u-f}}return i.length-r.length},i.createShortenedUrlText=function(t){var e,h,f;if(!t)return t;if(t instanceof n.Uri)return(e=t,e.scheme==="javascript")?"javascript:<URI>":(h=e.segments,f=h.pop(),f||(f=h.pop()),f?e.hostname||e.scheme!=="about"||(f=e.scheme+":"+f):f=e.hostname,i.tryDecodeURIComponent(f));var l=t,r=l,c="javascript:";if(r.toLowerCase().substr(0,c.length)===c)return"javascript:<URI>";var o=r.indexOf("#"),s=r.indexOf("?"),u=-1;for(o>-1&&s>-1?u=Math.min(o,s):o>-1?u=o:s>-1&&(u=s),u>-1&&(r=r.substring(0,u)),u=Math.max(r.lastIndexOf("/"),r.lastIndexOf("\\"));u!==-1&&u===r.length-1;)r=r.substring(0,r.length-1),u=Math.max(r.lastIndexOf("/"),r.lastIndexOf("\\"));return u>-1&&(r=r.substring(u+1),r=i.tryDecodeURIComponent(r)),r},i.getTruncatedString=function(n,t){if(t===void 0&&(t=20),!n)return n;if(n.length>t){var i=t/2-2;n=n.substr(0,i)+this.loadString("Ellipsis")+n.substr(n.length-i)}return n},i.getTruncatedFileName=function(n,t){return t===void 0&&(t=20),i.getTruncatedString(i.createShortenedUrlText(n),t)},i.createFileLinkText=function(n,t,i,r){var u=n?this.getTruncatedFileName(n,r):"";return t&&(n&&(u+=" "),u+="("+t,i&&(u+=", "+i),u+=")"),u},i.pathCombine=function(n,t){var i=/[\/\\]/,r;return t?this.isAbsoluteUrl(t)||!n?t:t.charAt(0)==="/"&&this.isAbsoluteUrl(n)?this.getRoot(n)+t:n.charAt(n.length-1).match(i)||t.charAt(0).match(i)?n+t:(r=(n+t).lastIndexOf("\\")>=0?"\\":"/",n+r+t):n},i.getRoot=function(n){return n.substring(0,n.indexOf("/",n.indexOf("://")+3))},i.isAbsoluteUrl=function(n){return this.isUncPath(n)||this.pathStartsWithDriveLetter(n)?!0:!n.match(/^file:\/{2,3}\./i)?!!n.match(/^[a-zA-Z][\w\+\-\.]*:/)||this.isDataURI(n):!1},i.isUncPath=function(n){return!!n.match(/^\\\\/)},i.pathStartsWithDriveLetter=function(n){return!!n.match(/^[A-Za-z]:/)},i.isFileURI=function(n){return n.length>5&&n.substr(0,5).toLocaleLowerCase()==="file:"},i.isDataURI=function(n){return n.length>5&&n.substr(0,5).toLocaleLowerCase()==="data:"},i.addFileProtocolIfNeeded=function(t){return(n.ToolWindowHelpers.pathStartsWithDriveLetter(t)||n.ToolWindowHelpers.isUncPath(t))&&!n.ToolWindowHelpers.isFileURI(t)&&(t="file:///"+t),t},i.truncateProtocolFromUrl=function(n){return n.replace(/^[a-zAZ][\w\+\-\.]*:(\/\/)?/g,"")},i.parseBase64DataUriContent=function(n){if(!i.isDataURI(n)||n.indexOf("base64,")===-1)return null;try{return window.atob(n.substr(n.indexOf("base64,")+7))}catch(t){return null}},i.parseDataUriMimeType=function(n){return!i.isDataURI(n)||n.indexOf(";")===-1?null:n.substring(5,n.indexOf(";"))},i.hasSelectedText=function(){var n=window.getSelection().toString();return!!n},i.getSelectedText=function(){return window.getSelection().toString()},i.getTextForClipboard=function(){var n=window.getSelection().toString();return n&&(n=n.replace(/[\r\n]+/g,"\r\n")),n},i.isDarkThemeBackground=function(n){var i,t,r;if(n){while((!i||i==="transparent")&&n&&n.length>0)i=n.css("background-color"),n=n.parent();if(i&&(t=i.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/),t&&t.length===4))return r=(parseInt(t[1],10)*299+parseInt(t[2],10)*587+parseInt(t[3],10)*114)/1e3,r<127}return!1},i.isContextMenuUp=function(){return n.ToolWindowHelpers.ContextMenuIsUp},i.contextMenuUp=function(t){n.ToolWindowHelpers.ContextMenuIsUp=t},i.nodeInDocument=function(n,t){if(t===void 0&&(t=document),n)while(n=n.parentNode)if(n===t)return!0;return!1},i.isFocusGood=function(){var n=document.querySelector(":focus");return n&&n.tagName!=="BODY"},i.fireCustomEvent=function(n,t){var i=document.createEvent("CustomEvent");i.initEvent(t,!0,!0);n.dispatchEvent(i)},i.getExtension=function(n){if(!n)return"";n=this.createShortenedUrlText(n);var t=n.lastIndexOf(".");return t<0?"":n.substr(t).toLowerCase()},i.guessMimeTypeFromUrlExtension=function(n){switch(this.getExtension(n)){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".less":return"text/less";case".sass":case".scss":return"text/scss";case".coffee":return"text/coffeescript";case".cs":return"text/x-csharp";default:return"text/plain"}},i.isNumber=function(n){return typeof n=="number"&&!isNaN(n)},i.stringEndsWith=function(n,t){return n===null||typeof n!="string"?!1:t===null||typeof t!="string"?!1:n.indexOf(t,n.length-t.length)>=0},i.replaceTextInRange=function(n,t,i,r){return n.substring(0,t)+r+n.substring(i,n.length)},i.mirrorInputElementOffScreen=function(n){var t=document.createElement("div"),u,f,r;t.id="toolwindow-offScreenMirrorElement";document.body.appendChild(t);u=window.getComputedStyle(n);for(f in i.TextSizingProps)r=i.TextSizingProps[f],u[r]&&(t.style[r]=u[r]);return t.style.visibility="hidden",t.style.position="absolute",t.style.left="-10000px",t.style.whiteSpace="pre-wrap",t.textContent=n.value||".",t},i.getCharScreenPosition=function(t,i){var u=n.ToolWindowHelpers.mirrorInputElementOffScreen(t),s=u.childNodes[0],o=document.createRange();o.setStart(s,i);o.setEnd(s,i);var r=o.getBoundingClientRect(),f=u.getBoundingClientRect(),e=t.getBoundingClientRect();return u.parentElement.removeChild(u),{left:r.left-f.left+e.left,right:r.right-f.left+e.left,top:r.top-f.top+e.top,bottom:r.bottom-f.bottom+e.bottom,width:r.width,height:r.height}},i.tryDecodeURIComponent=function(n){try{return decodeURIComponent(n)}catch(t){return n}},i.tryEncodeURIComponent=function(n){try{return encodeURIComponent(n)}catch(t){return n}},i.tryEncodeURI=function(n){try{return encodeURI(n)}catch(t){return n}},i.getSelection=function(n){var t=0,i=0;try{t=n.selectionStart}catch(r){}try{i=n.selectionEnd}catch(r){}return{start:t,end:i}},i.ContextMenuIsUp=!1,i.TextSizingProps=["boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize"],i.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},i.AreCodeMarkersEnabled=!1,i}();n.ToolWindowHelpers=i})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
Proxy=function(){function n(n){this._uid=0;this._callbacks={};this._pendingTimeout=null;this.remotePort=null;this._diagnosticsBridge=n}return n.prototype.callRemote=function(n,t,i,r){var f=this,h=this.getUid(),s,e,u,o,c,l;if(i&&(this._callbacks[h]={synced:!0,callback:i||null}),s=[],e=[],t)for(u=0;u<t.length;u++)typeof t[u]=="function"?(o=this.getUid(),s.push(o),this._callbacks[o]={synced:!1,callback:t[u]},e[u]={uid:o,type:"callback"}):e[u]=t[u];return c={uid:h,command:n,args:e},l=function(n,i){if(f.remotePort){i&&i(n,t[0]);try{f.remotePort.postMessage(n)}catch(r){return}}},this._pendingMessages.push(c),this._pendingTimeout||(this._pendingTimeout=setTimeout(function(){var n=JSON.stringify(f._pendingMessages);f._pendingMessages=[];f._pendingTimeout=null;l(n,r)},0)),s},n.prototype.clearCallBacks=function(n){var t=this;n?n.forEach(function(n){delete t._callbacks[n]}):this._callbacks={}},n.prototype.fireCallbacks=function(n){for(var t,r=JSON.parse(n),i=0;i<r.length;i++)t=r[i],this._callbacks[t.uid]?(this._callbacks[t.uid].callback.apply(this,t.args),this._callbacks[t.uid]&&this._callbacks[t.uid].synced&&delete this._callbacks[t.uid]):t.uid==="scriptError"&&window.reportError(t.args[0].message,t.args[0].file,t.args[0].line,t.args[0].additionalInfo)},n.prototype.initializeProxy=function(n,t,i,r,u){var f=this;this._pendingMessages=[];this._onMessageCallback=n;this._onAttachCallback=t;this._onDetachCallback=i||function(){return!1};this._onBreakCallback=r||function(){return!1};this._onRunCallback=u||function(){return!1};this._diagnosticsBridge.addEventListener("attach",function(){return f.onAttach()});this._diagnosticsBridge.addEventListener("break",function(){return f.onBreak()});this._diagnosticsBridge.addEventListener("connect",function(n){return f.onConnect(n)});this._diagnosticsBridge.addEventListener("detach",function(){return f.onDetach()});this._diagnosticsBridge.addEventListener("run",function(){return f.onRun()});this.onAttach()},n.prototype.onAttach=function(){this.hideWarningSection();this._onAttachCallback()},n.prototype.onDetach=function(){this.remotePort&&(this.remotePort.removeEventListener("message",this._onMessageCallback),this.remotePort=null);this._callbacks={};this._pendingMessages=[];this._pendingTimeout=null;this._onDetachCallback();this.postWarning("DiagnosticsDisabled")},n.prototype.onBreak=function(){this._onBreakCallback&&this._onBreakCallback()},n.prototype.onRun=function(){this._onRunCallback&&this._onRunCallback()},n.prototype.onConnect=function(n){var i=this._diagnosticsBridge.createPort(n),t=new Common.PortThrottler(i);t.initialize();this.remotePort=t;this.remotePort.addEventListener("message",this._onMessageCallback)},n.prototype.getUid=function(){return"uid"+(this._uid++).toString(36)},n.prototype.hideWarningSection=function(){$m("#warningSection").hide()},n.prototype.postWarning=function(n){$m("#warningMessageText").text(Common.ToolWindowHelpers.loadString(n));$m("#warningSection").show()},n}();
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,u,f,i,r;(function(n){n[n.Timeline_Zoom_Start=101]="Timeline_Zoom_Start";n[n.Timeline_Zoom_Stop=102]="Timeline_Zoom_Stop";n[n.Timeline_GridSort_Start=103]="Timeline_GridSort_Start";n[n.Timeline_GridSort_Stop=104]="Timeline_GridSort_Stop";n[n.Timeline_LoadGraphs_Start=105]="Timeline_LoadGraphs_Start";n[n.Timeline_LoadGraphs_Stop=106]="Timeline_LoadGraphs_Stop";n[n.Timeline_GridScrolled=107]="Timeline_GridScrolled";n[n.Timeline_GridUpdatedForTimeSelection=108]="Timeline_GridUpdatedForTimeSelection";n[n.Timeline_UserSelectedTimeSlice_Start=109]="Timeline_UserSelectedTimeSlice_Start";n[n.Timeline_UserSelectedTimeSlice_Stop=110]="Timeline_UserSelectedTimeSlice_Stop";n[n.Timeline_GridUpdatedForFilterBackground_Start=111]="Timeline_GridUpdatedForFilterBackground_Start";n[n.Timeline_GridUpdatedForFilterBackground_Stop=112]="Timeline_GridUpdatedForFilterBackground_Stop";n[n.Timeline_GridUpdatedForFilterNetwork_Start=113]="Timeline_GridUpdatedForFilterNetwork_Start";n[n.Timeline_GridUpdatedForFilterNetwork_Stop=114]="Timeline_GridUpdatedForFilterNetwork_Stop";n[n.Timeline_GridUpdatedForFilterMeasures_Start=115]="Timeline_GridUpdatedForFilterMeasures_Start";n[n.Timeline_GridUpdatedForFilterMeasures_Stop=116]="Timeline_GridUpdatedForFilterMeasures_Stop";n[n.Timeline_GridUpdatedForFilterFrames_Start=117]="Timeline_GridUpdatedForFilterFrames_Start";n[n.Timeline_GridUpdatedForFilterFrames_Stop=118]="Timeline_GridUpdatedForFilterFrames_Stop";n[n.Timeline_GridUpdatedForFilterName_Start=119]="Timeline_GridUpdatedForFilterName_Start";n[n.Timeline_GridUpdatedForFilterName_Stop=120]="Timeline_GridUpdatedForFilterName_Stop";n[n.Memory_TakeSnapshot_Start=201]="Memory_TakeSnapshot_Start";n[n.Memory_TakeSnapshot_Stop=202]="Memory_TakeSnapshot_Stop";n[n.Memory_CompareSnapshot_Start=203]="Memory_CompareSnapshot_Start";n[n.Memory_CompareSnapshot_Stop=204]="Memory_CompareSnapshot_Stop";n[n.Memory_ViewSnapshot_Start=205]="Memory_ViewSnapshot_Start";n[n.Memory_ViewSnapshot_Stop=206]="Memory_ViewSnapshot_Stop";n[n.Memory_GridSort_Start=207]="Memory_GridSort_Start";n[n.Memory_GridSort_Stop=208]="Memory_GridSort_Stop";n[n.Memory_DisplayFirstLevelSnapshotData_Start=209]="Memory_DisplayFirstLevelSnapshotData_Start";n[n.Memory_DisplayFirstLevelSnapshotData_Stop=210]="Memory_DisplayFirstLevelSnapshotData_Stop";n[n.Memory_ToolReady_Start=211]="Memory_ToolReady_Start";n[n.Memory_ToolReady_Stop=212]="Memory_ToolReady_Stop";n[n.Memory_GridFilterResponse_Start=213]="Memory_GridFilterResponse_Start";n[n.Memory_GridFilterResponse_Stop=214]="Memory_GridFilterResponse_Stop";n[n.Memory_UpdateObjectReferenceGraph_Start=215]="Memory_UpdateObjectReferenceGraph_Start";n[n.Memory_UpdateObjectReferenceGraph_Stop=216]="Memory_UpdateObjectReferenceGraph_Stop";n[n.Memory_ProcessingSnapshot_Start=217]="Memory_ProcessingSnapshot_Start";n[n.Memory_ProcessingSnapshot_Stop=218]="Memory_ProcessingSnapshot_Stop";n[n.Memory_ProcessingDiffSnapshot_Start=219]="Memory_ProcessingDiffSnapshot_Start";n[n.Memory_ProcessingDiffSnapshot_Stop=220]="Memory_ProcessingDiffSnapshot_Stop";n[n.Debugger_StepOver_Start=301]="Debugger_StepOver_Start";n[n.Debugger_StepInto_Start=302]="Debugger_StepInto_Start";n[n.Debugger_StepOut_Start=303]="Debugger_StepOut_Start";n[n.Debugger_OnBreak_Start=304]="Debugger_OnBreak_Start";n[n.Debugger_OnBreak_Stop=305]="Debugger_OnBreak_Stop";n[n.Debugger_PrettyPrint_Start=306]="Debugger_PrettyPrint_Start";n[n.Debugger_PrettyPrint_Stop=307]="Debugger_PrettyPrint_Stop";n[n.Debugger_CloseDocument_Start=310]="Debugger_CloseDocument_Start";n[n.Debugger_CloseDocument_Stop=311]="Debugger_CloseDocument_Stop";n[n.Debugger_RevealRange_Start=314]="Debugger_RevealRange_Start";n[n.Debugger_RevealRange_Stop=315]="Debugger_RevealRange_Stop";n[n.Debugger_CallstackController_GoTo_Start=316]="Debugger_CallstackController_GoTo_Start";n[n.Debugger_CallstackController_GoTo_Stop=317]="Debugger_CallstackController_GoTo_Stop";n[n.Debugger_BreakpointController_SetAllEnabledStates_Start=318]="Debugger_BreakpointController_SetAllEnabledStates_Start";n[n.Debugger_BreakpointController_SetAllEnabledStates_Stop=319]="Debugger_BreakpointController_SetAllEnabledStates_Stop";n[n.Debugger_EditorWindow_NavigateTo_Start=320]="Debugger_EditorWindow_NavigateTo_Start";n[n.Debugger_EditorWindow_NavigateTo_Stop=321]="Debugger_EditorWindow_NavigateTo_Stop";n[n.Debugger_Editor_SetModel_Start=322]="Debugger_Editor_SetModel_Start";n[n.Debugger_Editor_SetModel_Stop=323]="Debugger_Editor_SetModel_Stop";n[n.Debugger_Editor_CreateModel_Start=324]="Debugger_Editor_CreateModel_Start";n[n.Debugger_Editor_CreateModel_Stop=325]="Debugger_Editor_CreateModel_Stop";n[n.Debugger_Editor_Create_Start=326]="Debugger_Editor_Create_Start";n[n.Debugger_Editor_Create_Stop=327]="Debugger_Editor_Create_Stop";n[n.Debugger_Editor_Layout_Start=328]="Debugger_Editor_Layout_Start";n[n.Debugger_Editor_Layout_Stop=329]="Debugger_Editor_Layout_Stop";n[n.Debugger_Editor_ChangeViewZones_Start=330]="Debugger_Editor_ChangeViewZones_Start";n[n.Debugger_Editor_ChangeViewZones_Stop=331]="Debugger_Editor_ChangeViewZones_Stop";n[n.Debugger_Editor_RevealPosition_Start=332]="Debugger_Editor_RevealPosition_Start";n[n.Debugger_Editor_RevealPosition_Stop=333]="Debugger_Editor_RevealPosition_Stop";n[n.Debugger_Editor_SaveViewState_Start=334]="Debugger_Editor_SaveViewState_Start";n[n.Debugger_Editor_SaveViewState_Stop=335]="Debugger_Editor_SaveViewState_Stop";n[n.Debugger_Editor_RestoreViewState_Start=336]="Debugger_Editor_RestoreViewState_Start";n[n.Debugger_Editor_RestoreViewState_Stop=337]="Debugger_Editor_RestoreViewState_Stop";n[n.Debugger_EditorWindow_CreateDataTipFromPosition_Start=338]="Debugger_EditorWindow_CreateDataTipFromPosition_Start";n[n.Debugger_EditorWindow_CreateDataTipFromPosition_Stop=339]="Debugger_EditorWindow_CreateDataTipFromPosition_Stop";n[n.Debugger_BreakpointController_SetEnabledState_Start=340]="Debugger_BreakpointController_SetEnabledState_Start";n[n.Debugger_BreakpointController_SetEnabledState_Stop=341]="Debugger_BreakpointController_SetEnabledState_Stop";n[n.Debugger_BreakpointController_BreakpointChanged_Start=342]="Debugger_BreakpointController_BreakpointChanged_Start";n[n.Debugger_BreakpointController_BreakpointChanged_Stop=343]="Debugger_BreakpointController_BreakpointChanged_Stop";n[n.Debugger_BreakpointWindow_BreakpointChanged_Start=344]="Debugger_BreakpointWindow_BreakpointChanged_Start";n[n.Debugger_BreakpointWindow_BreakpointChanged_Stop=345]="Debugger_BreakpointWindow_BreakpointChanged_Stop";n[n.Debugger_WatchWindowView_RefreshView_Start=346]="Debugger_WatchWindowView_RefreshView_Start";n[n.Debugger_WatchWindowView_RefreshView_Stop=347]="Debugger_WatchWindowView_RefreshView_Stop";n[n.Debugger_StepDocument_Start=348]="Debugger_StepDocument_Start";n[n.Debugger_ToggleJMC_Start=349]="Debugger_ToggleJMC_Start";n[n.Debugger_ToggleJMC_Stop=350]="Debugger_ToggleJMC_Stop";n[n.Debugger_ToggleCallstackLibraryFrames_Start=351]="Debugger_ToggleCallstackLibraryFrames_Start";n[n.Debugger_ToggleCallstackLibraryFrames_Stop=352]="Debugger_ToggleCallstackLibraryFrames_Stop";n[n.Debugger_SpecifyUrlAsJMCType_Start=353]="Debugger_SpecifyUrlAsJMCType_Start";n[n.Debugger_SpecifyUrlAsJMCType_Stop=354]="Debugger_SpecifyUrlAsJMCType_Stop";n[n.Debugger_Persistence_DataLoad_Start=355]="Debugger_Persistence_DataLoad_Start";n[n.Debugger_Persistence_DataLoad_Stop=356]="Debugger_Persistence_DataLoad_Stop";n[n.Debugger_Persistence_AddBreakpoints_Start=357]="Debugger_Persistence_AddBreakpoints_Start";n[n.Debugger_Persistence_AddBreakpoints_Stop=358]="Debugger_Persistence_AddBreakpoints_Stop";n[n.Debugger_Persistence_AddWatches_Start=359]="Debugger_Persistence_AddWatches_Start";n[n.Debugger_Persistence_AddWatches_Stop=360]="Debugger_Persistence_AddWatches_Stop";n[n.Debugger_Persistence_TabOpen_Start=361]="Debugger_Persistence_TabOpen_Start";n[n.Debugger_Persistence_TabOpen_Stop=362]="Debugger_Persistence_TabOpen_Stop";n[n.Debugger_Persistence_SaveState_Start=363]="Debugger_Persistence_SaveState_Start";n[n.Debugger_Persistence_SaveState_Stop=364]="Debugger_Persistence_SaveState_Stop";n[n.Debugger_SourceMap_ToggleSourceMap_Start=365]="Debugger_SourceMap_ToggleSourceMap_Start";n[n.Debugger_SourceMap_ToggleSourceMap_Stop=366]="Debugger_SourceMap_ToggleSourceMap_Stop";n[n.Debugger_SourceMap_ParseSourceMapAsync_Start=367]="Debugger_SourceMap_ParseSourceMapAsync_Start";n[n.Debugger_SourceMap_ParseSourceMapAsync_Stop=368]="Debugger_SourceMap_ParseSourceMapAsync_Stop";n[n.Debugger_Editor_GetOrCreateMode_Start=369]="Debugger_Editor_GetOrCreateMode_Start";n[n.Debugger_Editor_GetOrCreateMode_Stop=370]="Debugger_Editor_GetOrCreateMode_Stop";n[n.Debugger_OnAddDocuments_Info=371]="Debugger_OnAddDocuments_Info";n[n.Debugger_Intellisense_ListBox_Build_Start=372]="Debugger_Intellisense_ListBox_Build_Start";n[n.Debugger_Intellisense_ListBox_Build_Stop=373]="Debugger_Intellisense_ListBox_Build_Stop";n[n.Debugger_Intellisense_ListBox_Reset_Start=374]="Debugger_Intellisense_ListBox_Reset_Start";n[n.Debugger_Intellisense_ListBox_Reset_Stop=375]="Debugger_Intellisense_ListBox_Reset_Stop";n[n.Debugger_Intellisense_Menu_Filter_Start=376]="Debugger_Intellisense_Menu_Filter_Start";n[n.Debugger_Intellisense_Menu_Filter_Stop=377]="Debugger_Intellisense_Menu_Filter_Stop";n[n.Debugger_Intellisense_Menu_Layout_Start=378]="Debugger_Intellisense_Menu_Layout_Start";n[n.Debugger_Intellisense_Menu_Layout_Stop=379]="Debugger_Intellisense_Menu_Layout_Stop";n[n.Debugger_Intellisense_Provider_Get_Expression_Start=380]="Debugger_Intellisense_Provider_Get_Expression_Start";n[n.Debugger_Intellisense_Provider_Get_Expression_Stop=381]="Debugger_Intellisense_Provider_Get_Expression_Stop";n[n.Debugger_Intellisense_Provider_Update_Start=382]="Debugger_Intellisense_Provider_Update_Start";n[n.Debugger_Intellisense_Provider_Update_Stop=383]="Debugger_Intellisense_Provider_Update_Stop";n[n.Debugger_Intellisense_Provider_Get_Items_Start=384]="Debugger_Intellisense_Provider_Get_Items_Start";n[n.Debugger_Intellisense_Provider_Get_Items_Stop=385]="Debugger_Intellisense_Provider_Get_Items_Stop";n[n.Debugger_AsyncStackProvider_GetFrames_Start=386]="Debugger_AsyncStackProvider_GetFrames_Start";n[n.Debugger_AsyncStackProvider_GetFrames_Stop=387]="Debugger_AsyncStackProvider_GetFrames_Stop";n[n.Debugger_AsyncStackProvider_GetFrames_Timeout=388]="Debugger_AsyncStackProvider_GetFrames_Timeout";n[n.Console_Window_Create_Start=401]="Console_Window_Create_Start";n[n.Console_Window_Create_Stop=402]="Console_Window_Create_Stop";n[n.Console_Attach_Start=403]="Console_Attach_Start";n[n.Console_Attach_Stop=404]="Console_Attach_Stop";n[n.Console_Message_Start=405]="Console_Message_Start";n[n.Console_Message_Stop=406]="Console_Message_Stop";n[n.Console_Input_Start=407]="Console_Input_Start";n[n.Console_Input_Stop=408]="Console_Input_Stop";n[n.Console_Output_Start=409]="Console_Output_Start";n[n.Console_Output_Stop=410]="Console_Output_Stop";n[n.Console_Output_Render_Start=411]="Console_Output_Render_Start";n[n.Console_Output_Render_Stop=412]="Console_Output_Render_Stop";n[n.Console_Item_Toggle_Start=413]="Console_Item_Toggle_Start";n[n.Console_Item_Toggle_Stop=414]="Console_Item_Toggle_Stop";n[n.Console_HtmlLines_Expand_Start=415]="Console_HtmlLines_Expand_Start";n[n.Console_HtmlLines_Expand_Stop=416]="Console_HtmlLines_Expand_Stop";n[n.Console_Context_Menu_Loading_Start=417]="Console_Context_Menu_Loading_Start";n[n.Console_Context_Menu_Loading_Stop=418]="Console_Context_Menu_Loading_Stop";n[n.Console_Scroll_Start=419]="Console_Scroll_Start";n[n.Console_Scroll_Stop=420]="Console_Scroll_Stop";n[n.Console_Intellisense_ListBox_Build_Start=421]="Console_Intellisense_ListBox_Build_Start";n[n.Console_Intellisense_ListBox_Build_Stop=422]="Console_Intellisense_ListBox_Build_Stop";n[n.Console_Intellisense_ListBox_Reset_Start=423]="Console_Intellisense_ListBox_Reset_Start";n[n.Console_Intellisense_ListBox_Reset_Stop=424]="Console_Intellisense_ListBox_Reset_Stop";n[n.Console_Intellisense_Menu_Filter_Start=425]="Console_Intellisense_Menu_Filter_Start";n[n.Console_Intellisense_Menu_Filter_Stop=426]="Console_Intellisense_Menu_Filter_Stop";n[n.Console_Intellisense_Menu_Layout_Start=427]="Console_Intellisense_Menu_Layout_Start";n[n.Console_Intellisense_Menu_Layout_Stop=428]="Console_Intellisense_Menu_Layout_Stop";n[n.Console_Intellisense_Provider_Get_Expression_Start=429]="Console_Intellisense_Provider_Get_Expression_Start";n[n.Console_Intellisense_Provider_Get_Expression_Stop=430]="Console_Intellisense_Provider_Get_Expression_Stop";n[n.Console_Intellisense_Provider_Update_Start=431]="Console_Intellisense_Provider_Update_Start";n[n.Console_Intellisense_Provider_Update_Stop=432]="Console_Intellisense_Provider_Update_Stop";n[n.Console_Intellisense_Provider_Get_Items_Start=433]="Console_Intellisense_Provider_Get_Items_Start";n[n.Console_Intellisense_Provider_Get_Items_Stop=434]="Console_Intellisense_Provider_Get_Items_Stop";n[n.Dom_Window_Create_Start=501]="Dom_Window_Create_Start";n[n.Dom_Window_Create_Stop=502]="Dom_Window_Create_Stop";n[n.Dom_ExpandNode_Start=503]="Dom_ExpandNode_Start";n[n.Dom_ExpandNode_Stop=504]="Dom_ExpandNode_Stop";n[n.Dom_UndoRedo_Start=505]="Dom_UndoRedo_Start";n[n.Dom_UndoRedo_Stop=506]="Dom_UndoRedo_Stop";n[n.Dom_DragDrop_Start=507]="Dom_DragDrop_Start";n[n.Dom_DragDrop_Stop=508]="Dom_DragDrop_Stop";n[n.Dom_AddAttribute_Start=509]="Dom_AddAttribute_Start";n[n.Dom_AddAttribute_Stop=510]="Dom_AddAttribute_Stop";n[n.Dom_Intellisense_Start=511]="Dom_Intellisense_Start";n[n.Dom_Intellisense_Stop=512]="Dom_Intellisense_Stop";n[n.Dom_SelectElement_Start=513]="Dom_SelectElement_Start";n[n.Dom_SelectElement_Stop=514]="Dom_SelectElement_Stop";n[n.Dom_CutElement_Start=515]="Dom_CutElement_Start";n[n.Dom_CutElement_Stop=516]="Dom_CutElement_Stop";n[n.Dom_PasteElement_Start=517]="Dom_PasteElement_Start";n[n.Dom_PasteElement_Stop=518]="Dom_PasteElement_Stop";n[n.Dom_CollapseElement_Start=519]="Dom_CollapseElement_Start";n[n.Dom_CollapseElement_Stop=520]="Dom_CollapseElement_Stop";n[n.Dom_StylesTabLoad_Start=521]="Dom_StylesTabLoad_Start";n[n.Dom_StylesTabLoad_Stop=522]="Dom_StylesTabLoad_Stop";n[n.Dom_StylesTab_Intellisense_Start=523]="Dom_StylesTab_Intellisense_Start";n[n.Dom_StylesTab_Intellisense_Stop=524]="Dom_StylesTab_Intellisense_Stop";n[n.Dom_TreeItemExpand_Start=525]="Dom_TreeItemExpand_Start";n[n.Dom_TreeItemExpand_Stop=526]="Dom_TreeItemExpand_Stop";n[n.Dom_ComputedTabLoad_Start=527]="Dom_ComputedTabLoad_Start";n[n.Dom_ComputedTabLoad_Stop=528]="Dom_ComputedTabLoad_Stop";n[n.Dom_ChangesTabLoad_Start=529]="Dom_ChangesTabLoad_Start";n[n.Dom_ChangesTabLoad_Stop=530]="Dom_ChangesTabLoad_Stop";n[n.Dom_LayoutTabLoad_Start=531]="Dom_LayoutTabLoad_Start";n[n.Dom_LayoutTabLoad_Stop=532]="Dom_LayoutTabLoad_Stop";n[n.Dom_EventsTabLoad_Start=533]="Dom_EventsTabLoad_Start";n[n.Dom_EventsTabLoad_Stop=534]="Dom_EventsTabLoad_Stop";n[n.Dom_TreeItemCollapse_Start=535]="Dom_TreeItemCollapse_Start";n[n.Dom_TreeItemCollapse_Stop=536]="Dom_TreeItemCollapse_Stop";n[n.Dom_Search_Start=537]="Dom_Search_Start";n[n.Dom_Search_Stop=538]="Dom_Search_Stop";n[n.Dom_RemoteInjection_Start=539]="Dom_RemoteInjection_Start";n[n.Dom_RemoteInjection_Stop=540]="Dom_RemoteInjection_Stop";n[n.Dom_EnterEditAsHtml_Start=541]="Dom_EnterEditAsHtml_Start";n[n.Dom_EnterEditAsHtml_Stop=542]="Dom_EnterEditAsHtml_Stop";n[n.Dom_CommitEditAsHtml_Start=543]="Dom_CommitEditAsHtml_Start";n[n.Dom_CommitEditAsHtml_Stop=544]="Dom_CommitEditAsHtml_Stop";n[n.Dom_CommitEditAttribute_Start=545]="Dom_CommitEditAttribute_Start";n[n.Dom_CommitEditAttribute_Stop=546]="Dom_CommitEditAttribute_Stop";n[n.Dom_ShowColorPicker_Start=547]="Dom_ShowColorPicker_Start";n[n.Dom_ShowColorPicker_Stop=548]="Dom_ShowColorPicker_Stop";n[n.Dom_HideColorPicker_Start=549]="Dom_HideColorPicker_Start";n[n.Dom_HideColorPicker_Stop=550]="Dom_HideColorPicker_Stop";n[n.Dom_SetColorUsingColorPicker_Start=551]="Dom_SetColorUsingColorPicker_Start";n[n.Dom_SetColorUsingColorPicker_Stop=552]="Dom_SetColorUsingColorPicker_Stop";n[n.Emulation_Window_Create_Start=601]="Emulation_Window_Create_Start";n[n.Emulation_Window_Create_Stop=602]="Emulation_Window_Create_Stop";n[n.Generic_Debug_1_Start=701]="Generic_Debug_1_Start";n[n.Generic_Debug_1_Stop=702]="Generic_Debug_1_Stop";n[n.Generic_Debug_2_Start=703]="Generic_Debug_2_Start";n[n.Generic_Debug_2_Stop=704]="Generic_Debug_2_Stop";n[n.Generic_Debug_3_Start=705]="Generic_Debug_3_Start";n[n.Generic_Debug_3_Stop=706]="Generic_Debug_3_Stop";n[n.Generic_Debug_4_Start=707]="Generic_Debug_4_Start";n[n.Generic_Debug_4_Stop=708]="Generic_Debug_4_Stop";n[n.Generic_Debug_5_Start=709]="Generic_Debug_5_Start";n[n.Generic_Debug_5_Stop=710]="Generic_Debug_5_Stop";n[n.Generic_Debug_6_Start=711]="Generic_Debug_6_Start";n[n.Generic_Debug_6_Stop=712]="Generic_Debug_6_Stop";n[n.Generic_Debug_7_Start=713]="Generic_Debug_7_Start";n[n.Generic_Debug_7_Stop=714]="Generic_Debug_7_Stop";n[n.Generic_Debug_8_Start=715]="Generic_Debug_8_Start";n[n.Generic_Debug_8_Stop=716]="Generic_Debug_8_Stop";n[n.Generic_Debug_9_Start=717]="Generic_Debug_9_Start";n[n.Generic_Debug_9_Stop=718]="Generic_Debug_9_Stop";n[n.Header_InitializeTabs_Start=801]="Header_InitializeTabs_Start";n[n.Header_InitializeTabs_Stop=802]="Header_InitializeTabs_Stop"})(n.TraceEvents||(n.TraceEvents={}));u=n.TraceEvents,function(n){n[n.Debugger_OpenDocument_Start=308]="Debugger_OpenDocument_Start";n[n.Debugger_OpenDocument_Stop=309]="Debugger_OpenDocument_Stop";n[n.Debugger_SwitchDocument_Start=312]="Debugger_SwitchDocument_Start";n[n.Debugger_SwitchDocument_Stop=313]="Debugger_SwitchDocument_Stop"}(n.TraceEventsWithKey||(n.TraceEventsWithKey={}));f=n.TraceEventsWithKey;i=function(){function n(){}return n.prototype.raiseEvent=function(){},n.prototype.raiseEventWithMessage=function(){},n.prototype.raiseEventWithKey=function(){},n}();n.DefaultTraceWriter=i;r=function(){function n(n){!n&&Microsoft&&t&&(t.F12?n=t.F12.TraceWriter:t.VS&&(n=t.VS.Utilities.createExternalObject("PerformanceTraceExtension","{D76A409F-7234-4B71-9BFD-DEF3DC4CCCA6}")));this._performanceTracer=n}return n.prototype.raiseEventWithKey=function(n,t,i){this._performanceTracer&&this._performanceTracer.raiseEventWithKey(n,t,i)},n.prototype.raiseEventWithMessage=function(n,t){this._performanceTracer&&this._performanceTracer.raiseEvent(n,t)},n.prototype.raiseEvent=function(n){this.raiseEventWithMessage(n,"")},n}();n.TraceWriter=r})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var u=function(){function t(n,t,i,r,u){var f=this;this._ourIdentifier=n;this._nextId=0;this._promiseTable={};this._jsonRpcMethodReceive=t;this._jsonRpcNotificationReceive=i;this._postMessage=r;Date.now||(Date.now=function(){return+new Date});this._startTime=Date.now();u(function(n){f.onMessage(n)})}return t.prototype.jsonRpcMethodCall=function(n,t,r,u,f){var s=this,o=this._ourIdentifier+"|"+this._nextId,e;return this._nextId++,this._promiseTable[o]={completed:r,error:u},e=JSON.stringify({id:o,method:n,params:t}),this.logTraffic(e),i.RandomDelay?(i.queueData(function(){s._postMessage(e,f)},e),!0):this._postMessage(e,f)},t.prototype.jsonRpcNotification=function(n,t,r){var f=this,e=this._ourIdentifier+"|NULL",u=JSON.stringify({id:e,method:n,params:t});this.logTraffic(u);i.RandomDelay?i.queueData(function(){f._postMessage(u,r)},u):this._postMessage(u,r)},t.prototype.logTraffic=function(n){if(isDebugBuild){var t=("  "+(Date.now()-this._startTime)/1e3).slice(-9);__rpcLog.push(t+" | "+n);__rpcLog.length>100&&__rpcLog.shift()}},t.prototype.onMessage=function(t){var f=this,r,u;this.logTraffic(t.data);r=JSON.parse(t.data);u=r.id.split("|");n.Utility.Assert.areEqual(u.length,2);u[1]==="NULL"?u[0]!==this._ourIdentifier&&this._jsonRpcNotificationReceive(r.method,r.params):u[0]===this._ourIdentifier?i.RandomDelay?i.queueData(function(){f.handleReply(r)},t.data):this.handleReply(r):i.RandomDelay?i.queueData(function(){f.handleCall(r)},t.data):this.handleCall(r)},t.prototype.handleReply=function(t){if(!this._promiseTable[t.id]){n.Utility.Assert.failDebugOnly("Can't complete a promise that does not exist in the promise table. Probably a dup reply msg.");return}t.error?(n.Utility.Assert.isUndefined(t.data,"Can't have both data and error"),this._promiseTable[t.id].error(t.error)):this._promiseTable[t.id].completed(t.data);delete this._promiseTable[t.id]},t.prototype.handleCall=function(t){var i=this;this._jsonRpcMethodReceive(t.method,t.params,function(r,u){var f;r!==null&&r!==undefined?(n.Utility.Assert.isUndefined(u,"Can't have both data and error"),f=JSON.stringify({id:t.id,data:r})):(n.Utility.Assert.hasValue(u,"RPC call returned no value, but no error object either"),f=JSON.stringify({id:t.id,error:u}));i._postMessage(f)})},t}(),r,i;t.JsonRPCEndpoint=u;r=function(){function n(n,t){this.callback=n;this.message=t}return n}();t.RpcDelayData=r;i=function(){function n(){}return n.enableDelay=function(t,i){n.RandomDelay=!0;n.CalculateDelayTime=t;n.DelayedMessage=i},n.disableDelay=function(){n.RandomDelay=!1;n.RandomDelayTimeout&&(clearTimeout(n.RandomDelayTimeout),n.RandomDelayTimeout=null,n.clearQueue())},n.queueData=function(t,i){var f=new r(t,i),u;n.DelayedQueue.push(f);n.RandomDelayTimeout||(u=n.CalculateDelayTime(i),n.RandomDelayTimeout=setTimeout(n.fireRandomly,u))},n.fireRandomly=function(){var t=n.DelayedQueue.shift(),i;n.DelayedMessage(t.message);t.callback();n.DelayedQueue.length>0?(i=n.CalculateDelayTime(n.DelayedQueue[0].message),n.RandomDelayTimeout=setTimeout(n.fireRandomly,i)):n.RandomDelayTimeout=null},n.clearQueue=function(){for(var i,t=0;t<n.DelayedQueue.length;t++)i=n.DelayedQueue[t],n.DelayedMessage(i.message),i.callback();n.DelayedQueue=[]},n.RandomDelay=!1,n.DelayedQueue=[],n}();t.RpcDelayHook=i})(t=n.RPC||(n.RPC={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));isDebugBuild&&(__rpcLog=[]);
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(){this._eventCallbacks={}}return n.prototype.addEventListener=function(n,t){var i=this._eventCallbacks[n];i||(this._eventCallbacks[n]=[],i=this._eventCallbacks[n]);i.push(t)},n.prototype.addOneTimeListener=function(n,t){var r=this,i=function(u){r.removeEventListener(n,i);t(u)};this.addEventListener(n,i)},n.prototype.removeEventListener=function(n,t){var i=this._eventCallbacks[n];i&&i.splice(i.indexOf(t),1)},n.prototype.fireEvent=function(n,t){var r,i;if(this._eventCallbacks[n])for(r=this._eventCallbacks[n].slice(0),i=0;i<r.length;i++)r[i](t)},n.prototype.fireEventForFirstListener=function(n,t){if(this._eventCallbacks[n]){var i=this._eventCallbacks[n].slice(0);i.length>0&&i[0](t)}},n}();n.EventHelperObject=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,s,r,u,i,f,e,o,h;(function(n){n[n.IeOnly=0]="IeOnly";n[n.VsOnly=1]="VsOnly";n[n.All=2]="All"})(n.TelemetryEventHost||(n.TelemetryEventHost={}));s=n.TelemetryEventHost,function(n){n[n.Ui=0]="Ui";n[n.KeyboardShortcut=1]="KeyboardShortcut";n[n.ContextMenu=2]="ContextMenu";n[n.Internal=3]="Internal";n[n.Test=4]="Test";n[n.NotSpecified=5]="NotSpecified"}(n.TriggerType||(n.TriggerType={}));r=n.TriggerType;u=function(){function n(){}return n.CONSOLE="Console",n.DEBUGGER="Debugger",n.DOM_EXPLORER="DomExplorer",n.EMULATION="Emulation",n.EXPERIMENTS="Experiments",n.MEMORY="Memory",n.NETWORK="Network",n.PROFILER="Profiler",n.VISUAL_PROFILER="VisualProfiler",n}();n.ToolName=u;i=function(){function n(){}return n.EXECUTE_COMMAND="ExecuteCommand",n.F12_LOAD_END="F12LoadEnd",n.TOOL_LOADED="ToolLoaded",n}();n.TelemetryEventName=i;f=function(){function n(){}return n.prototype.log=function(n,t,i,r){i===void 0&&(i=2);r===void 0&&(r=!0)},n.prototype.logExecuteCommand=function(n,t,i,r){i===void 0&&(i=2);r===void 0&&(r=!0)},n}();n.DoNothingAnalyticsProxy=f;e=function(){function n(n){this._toolName=n;this._selfTestEnabled=t.F12.SelfTest.selfTestEnabled;this._previousCommandName="";this._previousCommandTime=Date.now()}return n.prototype.log=function(n,i,r,u){r===void 0&&(r=2);u===void 0&&(u=!0);r!==1&&(u?t.F12.TelemetryLogger.logAsMeasure(n,i):t.F12.TelemetryLogger.logAsTelemetry(n,i),this._selfTestEnabled&&t.F12.SelfTest.logMessage("Telemetry: "+n+" "+JSON.stringify(i)+" isMeasure: "+u))},n.prototype.logExecuteCommand=function(n,t,u,f){if(u===void 0&&(u=2),f===void 0&&(f=!0),t!==3&&t!==4&&(this._previousCommandName!==n||Date.now()-this._previousCommandTime>1e3)){var e={ToolName:this._toolName,CommandName:n,TriggerType:r[t]};this.log(i.EXECUTE_COMMAND,e,u,f);this._previousCommandName=n;this._previousCommandTime=Date.now()}},n}();n.F12AnalyticsProxy=e;o=function(){function n(n,i){this._proxy=t.Utilities.JSONMarshaler.attachToPublishedObject(n,{},!0);this._toolName=i;this._previousCommandName="";this._previousCommandTime=Date.now()}return n.prototype.log=function(n,t,i,r){i===void 0&&(i=2);r===void 0&&(r=!0);i!==0&&this._proxy._call("reportTelemetryEvent",n,t)},n.prototype.logExecuteCommand=function(n,t,u,f){if(u===void 0&&(u=2),f===void 0&&(f=!0),this._previousCommandName!==n||Date.now()-this._previousCommandTime>1e3){var e={ToolName:this._toolName,CommandName:n,TriggerType:r[t]};this.log(i.EXECUTE_COMMAND,e,u,f);this._previousCommandName=n;this._previousCommandTime=Date.now()}},n}();n.VsAnalyticsProxy=o,function(n){var t=function(){function n(){}return n.FIND_NEXT_OR_PREVIOUS="FindNextOrPrevious",n.DEBUGGER_FIND="DebuggerFind",n.SEARCHBOX_CLEAR="SearchBoxClear",n.UPDATE_SEARCH_NEXT_OR_PREVIOUS="UpdateSearchNextOrPrevious",n}();n.CommandName=t}(h=n.Telemetry||(n.Telemetry={}))})(Common||(Common={}))
//# sourceMappingURL=CommonMinimal.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){"use strict";var t=function(){function n(){}return n.addClasses=function(n,t){for(var r=n?n.split(" "):[],u=t?t.split(" "):[],i=0;i<u.length;i++)r.indexOf(u[i])===-1&&r.push(u[i]);return r.join(" ")},n.removeClasses=function(n,t){for(var r=n?n.split(" "):[],f=t?t.split(" "):[],u=[],i=0;i<r.length;i++)f.indexOf(r[i])===-1&&u.push(r[i]);return u.join(" ")},n}();n.CssUtilities=t})(Common||(Common={}))
//# sourceMappingURL=CssUtilities.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(t,i){var r=this;this._element=t;this._onModifyCallback=i;this._element.addEventListener("contextmenu",function(n){return r.handleContextMenu(n)});this._element instanceof HTMLInputElement&&this._element.addEventListener("keyup",function(n){return r.handleKeyUp(n)});n.ClipboardHelper.addCutListener(this._element,this.onCut.bind(this));n.ClipboardHelper.addCopyListener(this._element,this.onCopy.bind(this));n.ClipboardHelper.addPasteListener(this._element,this.onPaste.bind(this))}return Object.defineProperty(i.prototype,"isActive",{get:function(){return this._isActive},enumerable:!0,configurable:!0}),i.prototype.show=function(i,r){var h=this,e=i,o=r,c,s,u,l,f;this._element instanceof HTMLInputElement&&(e<=0||o<=0)&&(c=n.ToolWindowHelpers.getSelection(this._element),s=n.ToolWindowHelpers.getCharScreenPosition(this._element,c.end),e=s.left,o=s.top);u=[];this._element instanceof HTMLInputElement&&u.push({id:"menuInputBoxCut",type:1,label:t.Resources.getString("/Common/CutMenuText"),accessKey:t.Resources.getString("/Common/AccessKeyCtrlX")});u.push({id:"menuInputBoxCopy",type:1,label:t.Resources.getString("/Common/CopyMenuText"),accessKey:t.Resources.getString("/Common/AccessKeyCtrlC")});this._element instanceof HTMLInputElement&&u.push({id:"menuInputBoxPaste",type:1,label:t.Resources.getString("/Common/PasteMenuText"),accessKey:t.Resources.getString("/Common/AccessKeyCtrlV")});l=function(n,t){h.invokeContextMenu(n,t)};f=t.ContextMenu.create(u,null,null,null,l);f.addEventListener("dismiss",function(){f.dispose();h._isActive=!1});f.attach(this._element);this._isActive=!0;f.show(e,o)},i.prototype.invokeContextMenu=function(t,i){switch(i.id){case"menuInputBoxCut":n.ClipboardHelper.fireCutEvent(this._element);break;case"menuInputBoxPaste":n.ClipboardHelper.firePasteEvent(this._element);break;case"menuInputBoxCopy":n.ClipboardHelper.fireCopyEvent(this._element);this._element.focus()}},i.prototype.onCut=function(){var t=n.ToolWindowHelpers.getSelection(this._element),r=this.getSelectedText(),i=this._element;return i.value=i.value.substring(0,t.start)+i.value.substring(t.end),this._onModifyCallback&&this._onModifyCallback(),this._element.focus(),i.setSelectionRange(t.start,t.start),r},i.prototype.onCopy=function(){return this.getSelectedText()},i.prototype.onPaste=function(t){var r=n.ToolWindowHelpers.getSelection(this._element),i=this._element,u;return i.value=n.ToolWindowHelpers.replaceTextInRange(i.value,r.start,r.end,t),this._onModifyCallback&&this._onModifyCallback(),i.focus(),u=r.start+t.length,setImmediate(function(){return i.setSelectionRange(u,u)}),!1},i.prototype.getSelectedText=function(){var t,r,u,f,i;return this._element instanceof HTMLInputElement?(r=n.ToolWindowHelpers.getSelection(this._element),u=this._element,t=u.value.substring(r.start,r.end)||u.value):(f=window.getSelection(),f.rangeCount===1&&(i=f.getRangeAt(0),i.startContainer.parentNode===this._element&&i.endContainer.parentNode===this._element&&(t=i.toString())),t||(t=this._element.textContent)),t},i.prototype.handleContextMenu=function(n){return this.show(n.clientX,n.clientY),n.stopImmediatePropagation(),n.preventDefault(),!1},i.prototype.handleKeyUp=function(n){if(n.keyCode===121&&n.shiftKey&&!n.ctrlKey&&!n.altKey)return this.show(0,0),n.stopImmediatePropagation(),n.preventDefault(),!1},i}();n.CutCopyPasteContextMenu=i})(Common||(Common={}))
//# sourceMappingURL=CutCopyPasteContextMenu.min.js.map
.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({vs-image-icon-tree-collapsed})]*/
    background-size: 10px 10px;
}

.BPT-DataTree .BPT-DataTreeItem-Expanded > .BPT-DataTreeItem-ExpandIcon {
    background-image: url(''); /*[url({vs-image-icon-tree-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}]*/
}
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){"use strict";var t=function(){function t(){}return t.escapeRegExp=function(n){return String.prototype.replace.call(n,t.ESCAPE_USER_INPUT_REGEX,"\\$&")},t.escapeRegExpWithWildCard=function(n){return String.prototype.replace.call(n,t.ESCAPE_USER_INPUT_REGEX,function(n){return n==="*"?".*":"\\"+n})},t.wrapInQuotes=function(n){return'"'+String.prototype.replace.call(n,/\\"/g,'"')+'"'},t.unescapeHtml=function(n){if(typeof n!="string"){if(n===null||n===undefined)return"";n=""+n}return String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(n,/&gt;/g,">"),/&lt;/g,"<"),/&apos;/g,"'"),/&quot;/g,'"'),/&amp;/g,"&")},t.escapeHtmlAndPreserveWhitespace=function(t){var f=[t],r,u,i;if(t=t.replace(/(\r\n|\n\r|\r|\n)/g,"\r\n"),r=t.split("\r\n"),r.length>0)for(f=[],u=0;u<r.length;u++)i=r[u],i=n.EncodingUtilities.escapeHtml(i),i="<pre>"+i+"<\/pre>",f.push(i);return f},t.escapeHtml=function(n){if(typeof n!="string"){if(n===null||n===undefined)return"";n=""+n}return String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(n,/&/g,"&amp;"),/"/g,"&quot;"),/'/g,"&apos;"),/</g,"&lt;"),/>/g,"&gt;")},t.replaceSpacesWithNonBreakingSpaceEntities=function(n){return String.prototype.replace.call(n,/ /g," ")},t.replaceLineBreaksWithNonBreakingSpaceEntities=function(n){return String.prototype.replace.call(n,/[\r\n]/g," ")},t.ESCAPE_USER_INPUT_REGEX=/([.+?^=!:${}()|\[\]\/\\])|(\*)/g,t}();n.EncodingUtilities=t})(Common||(Common={}))
//# sourceMappingURL=EncodingUtilities.min.js.map
.BPT-HtmlTree-Container:focus {
    outline: 0;
}

.BPT-HTML {
    font-family: "Consolas", Lucida Console, monospace, "Segoe UI Symbol"; /*[{plugin-font-editor} , Lucida Console, monospace, "Segoe UI Symbol"]*/
    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-NewTag {
    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, .BPT-HTML-CData {
    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-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;
}

.BPT-HTML-Punctuation {
    color: TRANSPARENT;             /*[{plugin-font-editor-color}]*/
}

.BPT-HTML-Debug-Uid {
    color: lightgrey;
}
// 
//! Copyright (C) Microsoft. All rights reserved.
//
var isDebugBuild = false;
.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 u,f=window.external.pluginUrl||(u=document.cookie.match(/(?:^|;)\s?pluginUrl=(.*?)(?:;|$)/))&&unescape(u[1])||"plugin.b.js",i=document.getElementsByTagName("script"),n,t,e,r;if(i&&f)for(n=0;n<i.length;n++)if(t=i[n],e=t.src,/(^|\\|\/)plugin.js$/.test(e)){r=document.createElement("script");r.src=f;t.parentElement.insertBefore(r,t.nextSibling);break}})()
//# sourceMappingURL=plugin.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){"use strict";var t=function(){function n(){this._undoLimit=100;this._singleEdit=!1;this._undoActions=0;this._doActions=0;this.reset()}return n.prototype.setTestEditCallbacks=function(n,t){this._testEditCallback=n;this._testUndoCallback=t},n.prototype.setLimit=function(n){this._undoLimit=n},n.prototype.getLimit=function(){return this._undoLimit},n.prototype.reset=function(){this._undoStack=[];this._doStack=[];this._chainingUid=null;this._chainingLevel=0},n.prototype.performEdit=function(n){var t=!1,i;try{t=n.performEdit()}catch(r){t=!1}if(t)if(this._singleEdit){if(i=n,!i.getOldValue||!i.setOldValue)return!1;this._singleEditFirstEdit||(this._singleEditFirstEdit=i);this._singleEditLastEdit=i}else this._pushEdit(n);return this._testEditCallback&&this._testEditCallback(t),t},n.prototype.startSingleEdit=function(){this._singleEdit=!0},n.prototype.endSingleEdit=function(){if(this._singleEdit=!1,this._singleEditFirstEdit){var n=this._singleEditFirstEdit.getOldValue();this._singleEditLastEdit.setOldValue(n);this._singleEditLastEdit.hasValueChanged()&&this._pushEdit(this._singleEditLastEdit)}this._singleEditFirstEdit=undefined;this._singleEditLastEdit=undefined},n.prototype.enableChaining=function(){(this._chainingLevel++,this._chainingLevel>1)||(this._chainingUid=remoteHelpers.getUid())},n.prototype.disableChaining=function(){if(this._chainingLevel>0&&(this._chainingLevel--,this._chainingLevel===0)){var n=this._peek(this._undoStack),t=n&&n.chainingUid===this._chainingUid;this._chainingUid=null;t&&(this._undoActions++,this._checkIfOverLimit())}},n.prototype.undo=function(){var t=!0,n,i;try{if(this.somethingToUndo()){if(n=this._undoStack.pop(),n.performUndo())for(this._doStack.push(n);this.somethingToUndo()&&n.chainingUid;){if(i=this._undoStack.pop(),i.chainingUid!==n.chainingUid){this._undoStack.push(i);break}if(n=i,n.performUndo())this._doStack.push(n);else{this.reset();t=!1;break}}else this.reset(),t=!1;this._undoActions--;this._doActions++}}catch(r){t=!1}return this._testUndoCallback&&this._testUndoCallback(t),t},n.prototype.performNextEdit=function(){var t=!0,n,i;try{if(this.somethingToDo()){if(n=this._doStack.pop(),n.performEdit(!0))for(this._undoStack.push(n);this.somethingToDo()&&n.chainingUid;){if(i=this._doStack.pop(),i.chainingUid!==n.chainingUid){this._doStack.push(i);break}if(n=i,n.performEdit(!0))this._undoStack.push(n);else{this.reset();t=!1;break}}else this.reset(),t=!1;this._undoActions++;this._doActions--}}catch(r){t=!1}return this._testEditCallback&&this._testEditCallback(t),t},n.prototype.somethingToUndo=function(){return this._undoStack.length>0},n.prototype.somethingToDo=function(){return this._doStack.length>0},n.prototype._pushEdit=function(n){n.chainingUid=this._chainingUid;this._undoStack.push(n);this._doStack=[];this._doActions=0;this._chainingUid||(this._undoActions++,this._checkIfOverLimit())},n.prototype._checkIfOverLimit=function(){while(this._doActions+this._undoActions>this._undoLimit){var n=this._undoStack[0];if(n.chainingUid)while(this._undoStack.length>0&&this._undoStack[0].chainingUid===n.chainingUid)this._undoStack.shift();else this._undoStack.shift();this._undoActions--}},n.prototype._peek=function(n){var t=n.pop();return n.push(t),t},n}();n.EditStack=t})(Common||(Common={}))
//# sourceMappingURL=remoteEditStack.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var htmlTreeHelpers,errorHandler,Common;(function(n){"use strict";var e,u,t,i,r,f;(function(n){n[n.Previous=-1]="Previous";n[n.Next=1]="Next"})(n.Direction||(n.Direction={}));e=n.Direction;u=function(){function u(n){this.pendingMessages=[];this.pendingMessagesMap={};this.pendingTimeout=!1;this.port=null;this.portId=0;this.portReady=!1;this.onDetachCallback=null;this.initializeDocumentMaxTries=15;this.initializeDocumentTries=0;this.childrenElementLimit=200;this.uid=0;this.isEvalModified=!1;this.isExecScriptModified=!1;this._messageHandlers=n}return u.getJMCScriptUrl=function(n){return u.JMC_SCRIPT_URL.replace("{0}",n)},u.encounteredException=function(){},u.addListener=function(n,t,i,r){u.getDocumentMode()>=9?r?n.addEventListener(t,i,r):n.addEventListener(t,i):typeof n.addEventListener=="function"?n.addEventListener(t,i):n.attachEvent("on"+t,i)},u.addSafeListener=function(t,i,r,f,e){var o=u.createSafeFunction(t,f);return n.RemoteHelpers.addListener(i,r,o,e),o},u.removeListener=function(n,t,i,r){u.getDocumentMode()>=9?r?n.removeEventListener(t,i,r):n.removeEventListener(t,i):typeof n.removeEventListener=="function"?n.removeEventListener(t,i):n.detachEvent("on"+t,i)},u.getDefaultView=function(n){return n?typeof n.defaultView!="undefined"?n.defaultView:n.parentWindow:null},u.isElement=function(n,t){return n&&t?typeof n.Element=="object"?t instanceof n.Element:typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string":!1},u.getEventTarget=function(n){return u.getDocumentMode()>=9?n.target:n.srcElement},u.getComputedStyle=function(n,t){var r,f,o,h,c,e,i,s;if(u.getDocumentMode()>=9){for(r=n.getComputedStyle(t),f={},i=0;i<r.length;i++)o=r[i],h=r.getPropertyValue(o),f[o]=h;return f.getPropertyValue=function(n){return this[n]},f}for(c=t.currentStyle,e={},i=0;i<u.COMPUTED_PROPERTIES_IN_IE8.length;i++)(s=c.getAttribute(u.COMPUTED_PROPERTIES_IN_IE8[i]),s)&&(e[u.javascriptToCssName(u.COMPUTED_PROPERTIES_IN_IE8[i])]=s);return e.getPropertyValue=function(n){return this[n]},e},u.getPageOffset=function(n){var t=u.getDefaultView(n);return u.getDocumentMode()>=9?{x:t.pageXOffset,y:t.pageYOffset}:{x:t.document.body.scrollLeft,y:t.document.body.scrollTop}},u.getRuleForStyleObject=function(n,t){return u.searchStyleSheetForStyleObject(t.ownerDocument.styleSheets,n)},u.getRuleForStyleObjectByDocument=function(n,t){return u.searchStyleSheetForStyleObject(t.styleSheets,n)},u.getDocumentMode=function(){var n=browser.documentMode;if(browser.documentMode===0)try{n=browser.defaultDocumentMode}catch(t){n=8e4}return n/1e4},u.getIsLeftMouseButton=function(n){return u.getDocumentMode()>=9?n===0:n===1},u.eventHandled=function(n){return u.getDocumentMode()>=9?(n.stopPropagation(),n.preventDefault(),!1):(n.cancelBubble=!0,!1)},u.getLeafTextContentPreview=function(n,t){var f,i,r;return t===void 0&&(t=30),n&&(i=u.getLeafTextContent(n),i!==null&&i!==undefined&&(r=!0,i=i.trim(),i.length>t&&(i=i.substr(0,t)+"…",r=!1),f={isComplete:r,text:i})),f},u.getLeafTextContentPreviewText=function(n,t){t===void 0&&(t=30);var i,r=u.getLeafTextContentPreview(n,t);return r&&(i=r.text),i},u.getLeafTextContent=function(t){if(t.childNodes){if(t.tagName==="IFRAME")return;if(t.childNodes.length>1)return;if(t.childNodes.length===1){var i=t.childNodes[0];if(i.tagName==="IFRAME"||i.childNodes&&i.childNodes.length>0)return}}return n.RemoteHelpers.getTextContent(t)},u.getTextContent=function(n){var t=u.getDocumentMode();if(t!==9||n.nodeType!==n.COMMENT_NODE||!(n.length<0))return t>=9?n.nodeType===n.COMMENT_NODE||n.nodeType===n.TEXT_NODE?n.data:n.childNodes&&n.childNodes.length===1&&n.childNodes[0].nodeType===n.TEXT_NODE?n.childNodes[0].data:n.textContent:n.innerText?n.innerText:typeof n.data=="string"?n.data:void 0},u.setTextContent=function(n,t){u.getDocumentMode()<9?n.innerText=t:n.textContent=t},u.getDocumentTypeNodeText=function(n){var t="";return n.nodeType!==n.DOCUMENT_TYPE_NODE?t:(t="<!DOCTYPE "+n.nodeName,n.publicId?(t+=' PUBLIC "'+n.publicId+'"',n.systemId&&(t+=' "'+n.systemId+'"')):n.systemId&&(t+=' SYSTEM "'+n.systemId+'"'),n.internalSubset&&(t+=" ["+n.internalSubset+"]"),t+">")},u.isWindow=function(n){if(u.getDocumentMode()>8)return Object.prototype.toString.call(n)==="[object Window]";try{return n&&n.toString&&n.toString()==="[object Window]"}catch(t){return!1}},u.isCrossSiteWindow=function(n,t){try{var i=n.Object.getOwnPropertyNames(t)}catch(r){return!0}return!1},u.getValidWindow=function(n,t){try{if(u.isWindow(t)){var i=t;if(u.isCrossSiteWindow(n,t)&&(i=dom.getCrossSiteWindow(n,t)),i&&i.document)return{isValid:!0,window:i}}}catch(r){}return{isValid:!1,window:null}},u.originForWindow=function(t){return t&&t.location&&t.location.protocol&&t.location.host?n.EncodingUtilities.escapeHtml(t.location.protocol+"//"+t.location.host):null},u.createSafeFunction=function(n,t){var i,r,f;return u.getDocumentMode()<9?browser.createSafeFunction(n,t):(i=browser.createSafeFunction(n,function(n){F12.Tools.Utility.Assert.failDebugOnly(n.message||n.description||"Unknown Error")}),n.__BROWSERTOOLS_CONSOLE_SAFEFUNC||(r=function(n,t){return function __BROWSERTOOLS_CONSOLE_SAFEFUNC(){try{return n(arguments)}catch(i){t(i)}}},f="window.__BROWSERTOOLS_CONSOLE_SAFEFUNC = "+r.toString(),u.executeScript(f,n,!0)),n.__BROWSERTOOLS_CONSOLE_SAFEFUNC(browser.createSafeFunction(n,function(i){return t.apply(n,i)}),i))},u.executeScript=function(n,t,i){var r,f;typeof diagnosticsScript!="undefined"&&diagnosticsScript.debugEval&&u.getDocumentMode()>8?(r=diagnosticsScript.debugEval.bind(t),r(n,i)):(f=JSON.stringify(n).slice(1,-1),browser.executeScript(f+(i?u.getJMCScriptUrl("library"):""),t))},u.getWindowIterator=function(n){return new t([n],function(n){for(var i,r=[],t=0;t<n.frames.length;t++)(i=u.getValidWindow(n,n.frames[t]),i.isValid)&&r.push(i.window);return r})},u.getStyleSheetIterator=function(n,i){var u=[n],r;if(!i)for(r=0;r<n.imports.length;r++)u.push(n.imports[r]);return new t(u,function(n){var r,t;if(!i||!n.imports)return null;for(r=[],t=0;t<n.imports.length;t++)r.push(n.imports[t]);return r})},u.prototype.useTimeout=function(){return toolUI.getBreakFlags()===0},u.prototype.isDiagnosticsOM=function(){return typeof browser!="undefined"},u.prototype.isDiagnosticsOMVersionSupported=function(){return typeof diagnostics!="undefined"&&typeof browser!="undefined"&&typeof emulation!="undefined"&&typeof emulation.geoLocation!="undefined"},u.prototype.initialize=function(t,u,f,e){var o,s;errorHandler=new r;htmlTreeHelpers=new i;errorHandler.initializeListeners();mainBrowser&&mainBrowser.document&&(o=n.RemoteHelpers.getDefaultView(mainBrowser.document),o&&remoteHelpers.initializeScriptEngines(o));remoteHelpers._windowShouldHave=f;typeof browser!="undefined"&&n.RemoteHelpers.addListener(browser,"documentComplete",remoteHelpers.onDocumentComplete);remoteHelpers.onDetachCallback=e;n.RemoteHelpers.addListener(toolUI,"detach",remoteHelpers.onDetach);n.RemoteHelpers.addListener(toolUI,"breakpointhit",remoteHelpers.onBreak);remoteHelpers.portId++;s=new n.PortThrottler(toolUI.createPort(t+remoteHelpers.portId));s.initialize();remoteHelpers.port=s;remoteHelpers.port&&(remoteHelpers.port.addEventListener("message",remoteHelpers.processMessages),toolUI.connect(remoteHelpers.port),u());remoteHelpers._handshakeCallback=u},u.prototype.initializeScriptEngines=function(n){var t,r,i;if(n){if(n.document&&n.document.scripts&&n.document.scripts.length===0)try{browser.executeScript(u.getJMCScriptUrl("library"),n)}catch(f){}try{if(n.frames)for(t=0;t<n.frames.length;t++)r=n.frames[t],i=u.getValidWindow(n,r),i.isValid&&remoteHelpers.initializeScriptEngines(i.window)}catch(f){}}},u.prototype.onDocumentComplete=function(t){var i,r;if(remoteHelpers._windowShouldHave&&(i=null,t)){t.browserOrWindow&&(t=t.browserOrWindow);try{t.document&&(i=t.document)}catch(f){}if(!i)try{t.Document&&(i=t.Document)}catch(f){}if(r=n.RemoteHelpers.getDefaultView(i),!i||r[remoteHelpers._windowShouldHave])return;try{browser.executeScript(u.getJMCScriptUrl("library"),r)}catch(e){}}},u.prototype.onDetach=function(){remoteHelpers.uid=0;remoteHelpers.pendingMessages=[];remoteHelpers.pendingMessagesMap={};remoteHelpers.pendingTimeout=!1;remoteHelpers.isEvalModified=!1;remoteHelpers.isExecScriptModified=!1;remoteHelpers.onDetachCallback&&remoteHelpers.onDetachCallback()},u.prototype.onBreak=function(){remoteHelpers.postAllMessages()},u.prototype.getUid=function(){return"uid"+(remoteHelpers.uid++).toString(36)},u.prototype.processMessages=function(n){var o,e,f,u,t,i,r;if(n.data==="InitializeDocument"){remoteHelpers._handshakeCallback();return}o=function remoteHelpers$processMessages$createVSPostFunction(n){return function remoteHelpers$processMessages$createVSPostFunction$createdFunction(t,i,r){var u=r?!1:!0;remoteHelpers.postObject({uid:n,args:[t]},i,u)}};try{e=JSON.parse(n.data)}catch(s){return}for(f=0;f<e.length;f++)if(u=e[f],remoteHelpers._messageHandlers[u.command]){for(t=u.args,i=0;i<t.length;i++)t[i]&&t[i].type==="callback"&&(t[i]=o(t[i].uid));if(r=remoteHelpers._messageHandlers[u.command].apply(remoteHelpers,t),r&&r.suppressPostObject)continue;remoteHelpers.postObject({uid:u.uid,args:r!==undefined?[r]:r})}},u.prototype.postObject=function(n,t,i){t?remoteHelpers.pendingMessagesMap[t]=n:remoteHelpers.pendingMessages.push(n);remoteHelpers.useTimeout()&&i?remoteHelpers.pendingTimeout||(diagnostics.setTimeout(remoteHelpers.postAllMessages,50),remoteHelpers.pendingTimeout=!0):remoteHelpers.postAllMessages()},u.prototype.postAllMessages=function(){var t,n;for(t in remoteHelpers.pendingMessagesMap)remoteHelpers.pendingMessages.push(remoteHelpers.pendingMessagesMap[t]);if(remoteHelpers.pendingMessages.length>0){n="";try{n=JSON.stringify(remoteHelpers.pendingMessages)}catch(i){errorHandler.handleError(i.toString(),"remoteHelpers.js",null)}if(remoteHelpers.pendingMessages=[],remoteHelpers.pendingMessagesMap={},remoteHelpers.pendingTimeout=!1,n.length>0)try{remoteHelpers.port.postMessage(n)}catch(i){}}},u.searchStyleSheetForStyleObject=function(t,i){for(var r,o,f,e=0;e<t.length;e++){r=t[e];try{if((o=r.cssRules?r.cssRules:r.rules,o&&(f=u.searchRuleListForStyleObject(o,i),f))||r.imports&&r.imports.length&&(f=u.searchStyleSheetForStyleObject(r.imports,i),f))return f}catch(s){n.RemoteHelpers.encounteredException(s)}}},u.searchRuleListForStyleObject=function(n,t){for(var i,r=0;r<n.length;r++)if(i=n[r],i.cssRules){if(i=u.searchRuleListForStyleObject(i.cssRules,t),i)return i}else if(i.style===t)return i},u.javascriptToCssName=function(n){if(n==="styleFloat")return"float";var t=n.replace(/[A-Z]/g,function(n){return"-"+n.substring(0).toLowerCase()});return t.indexOf("ms-")===0&&(t="-ms-"+t.substr(3)),t},u.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"],u.JMC_SCRIPT_URL="\\r\\n//# sourceURL=browsertools://browsertools.{0}.js",u.FailedEventAddCount=0,u.FailedEvents={},u.EventsWhereWeWantToProcessOnCapture={},u}();n.RemoteHelpers=u;t=function(){function n(n,t){this._q=n;this._moreItems=t}return n.prototype.hasNext=function(){return this._q.length>0},n.prototype.next=function(){if(!this.hasNext())return null;var n=this._q.pop(),t=this._moreItems(n);return t&&(this._q=this._q.concat(t)),n},n}();n.Iterator=t;i=function(){function t(){}return t.isEmptyTextElement=function(t){if(t.tagName)return!1;var i=n.RemoteHelpers.getLeafTextContent(t);return typeof i!="string"?!1:!/\S/.test(i)},t.prototype.hasSpecialValueAttribute=function(n){switch(n.nodeName){case"INPUT":case"FORM":case"SELECT":case"OPTION":case"TEXTAREA":return!0}return!1},t.prototype.isElementAccessible=function(n){var t=null,i=null;try{i=n.nodeName;t=typeof n}catch(r){return!1}return t==="object"},t}();n.HtmlTreeHelpers=i;r=function(){function t(){}return t.addErrorAdditionalInfo=function(n){var i,t;try{throw new Error("Get Callstack")}catch(r){i=r.stack}t=[];try{t.push("Callstack:\r\n"+i);t.push("BreakFlags: "+toolUI.getBreakFlags());t.push("IsEvalModified: "+remoteHelpers.isEvalModified);t.push("IsExecScriptModified: "+remoteHelpers.isExecScriptModified)}catch(u){}n.additionalInfo=t.join("\r\n\r\n")},t.prototype.initializeListeners=function(){n.RemoteHelpers.addListener(toolUI,"scripterror",this.onScriptError.bind(this));n.RemoteHelpers.addListener(toolUI,"detach",this.onDetach.bind(this))},t.prototype.handleError=function(n,t,i,r){this.onScriptError({message:n,file:t,line:i,column:r})},t.prototype.onDetach=function(){n.RemoteHelpers.removeListener(toolUI,"scripterror",this.onScriptError)},t.prototype.onScriptError=function(n){if(remoteHelpers&&remoteHelpers.port){t.addErrorAdditionalInfo(n);var i=JSON.stringify([{uid:"scriptError",args:[n]}]);try{remoteHelpers.port.postMessage(i)}catch(r){}}},t}();n.ErrorHandlers=r;f=function(){function n(){}return n.propertyEvaluationFunction=function(t,i){var r,u;return t.location.protocol.indexOf("http")>=0?(r=n.HttpObjectWatchList.lastIndexOf(Object.prototype.toString.call(i)),u=n.HttpPropertyIgnorelist[r]):t.location.protocol.indexOf("ms-appx")>=0&&(r=n.FileObjectWatchList.lastIndexOf(Object.prototype.toString.call(i)),u=n.FilePropertyIgnorelist[r]),u?function(n,t){if(!(u.lastIndexOf(t)>=0))try{return n[t]}catch(i){return i.toString()}}:function(n,t){return n[t]}},n.HttpObjectWatchList=["[object Window]"],n.HttpPropertyIgnorelist=[["indexedDB","msIndexedDB"]],n.FileObjectWatchList=["[object Window]"],n.FilePropertyIgnorelist=[["clipboardData"]],n}();n.PropertyEvaluationIgnoreList=f})(Common||(Common={}))
//# sourceMappingURL=remoteHelpers.min.js.map
var Common;(function(n){"use strict";(function(n){n[n.None=0]="None";n[n.Trident=1]="Trident";n[n.Chromium=2]="Chromium"})(n.TargetEngineKind||(n.TargetEngineKind={}));var t=n.TargetEngineKind})(Common||(Common={}))
//# sourceMappingURL=targetEngineKind.min.js.map
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,
.BPT-IELink {
    border: 1px solid transparent;
    color: TRANSPARENT; /*[{plugin-link-color}]*/ /*EnvironmentColors.CommandBarMenuLinkTextColorKey*/
    cursor: pointer;
}

.BPT-FileLink:hover,
.BPT-HelpLink:hover,
.BPT-IELink: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}]*/
}
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){"use strict";var t=Microsoft.Plugin,u,f,i,r;(function(n){n[n.Timeline_Zoom_Start=101]="Timeline_Zoom_Start";n[n.Timeline_Zoom_Stop=102]="Timeline_Zoom_Stop";n[n.Timeline_GridSort_Start=103]="Timeline_GridSort_Start";n[n.Timeline_GridSort_Stop=104]="Timeline_GridSort_Stop";n[n.Timeline_LoadGraphs_Start=105]="Timeline_LoadGraphs_Start";n[n.Timeline_LoadGraphs_Stop=106]="Timeline_LoadGraphs_Stop";n[n.Timeline_GridScrolled=107]="Timeline_GridScrolled";n[n.Timeline_GridUpdatedForTimeSelection=108]="Timeline_GridUpdatedForTimeSelection";n[n.Timeline_UserSelectedTimeSlice_Start=109]="Timeline_UserSelectedTimeSlice_Start";n[n.Timeline_UserSelectedTimeSlice_Stop=110]="Timeline_UserSelectedTimeSlice_Stop";n[n.Timeline_GridUpdatedForFilterBackground_Start=111]="Timeline_GridUpdatedForFilterBackground_Start";n[n.Timeline_GridUpdatedForFilterBackground_Stop=112]="Timeline_GridUpdatedForFilterBackground_Stop";n[n.Timeline_GridUpdatedForFilterNetwork_Start=113]="Timeline_GridUpdatedForFilterNetwork_Start";n[n.Timeline_GridUpdatedForFilterNetwork_Stop=114]="Timeline_GridUpdatedForFilterNetwork_Stop";n[n.Timeline_GridUpdatedForFilterMeasures_Start=115]="Timeline_GridUpdatedForFilterMeasures_Start";n[n.Timeline_GridUpdatedForFilterMeasures_Stop=116]="Timeline_GridUpdatedForFilterMeasures_Stop";n[n.Timeline_GridUpdatedForFilterFrames_Start=117]="Timeline_GridUpdatedForFilterFrames_Start";n[n.Timeline_GridUpdatedForFilterFrames_Stop=118]="Timeline_GridUpdatedForFilterFrames_Stop";n[n.Timeline_GridUpdatedForFilterName_Start=119]="Timeline_GridUpdatedForFilterName_Start";n[n.Timeline_GridUpdatedForFilterName_Stop=120]="Timeline_GridUpdatedForFilterName_Stop";n[n.Memory_TakeSnapshot_Start=201]="Memory_TakeSnapshot_Start";n[n.Memory_TakeSnapshot_Stop=202]="Memory_TakeSnapshot_Stop";n[n.Memory_CompareSnapshot_Start=203]="Memory_CompareSnapshot_Start";n[n.Memory_CompareSnapshot_Stop=204]="Memory_CompareSnapshot_Stop";n[n.Memory_ViewSnapshot_Start=205]="Memory_ViewSnapshot_Start";n[n.Memory_ViewSnapshot_Stop=206]="Memory_ViewSnapshot_Stop";n[n.Memory_GridSort_Start=207]="Memory_GridSort_Start";n[n.Memory_GridSort_Stop=208]="Memory_GridSort_Stop";n[n.Memory_DisplayFirstLevelSnapshotData_Start=209]="Memory_DisplayFirstLevelSnapshotData_Start";n[n.Memory_DisplayFirstLevelSnapshotData_Stop=210]="Memory_DisplayFirstLevelSnapshotData_Stop";n[n.Memory_ToolReady_Start=211]="Memory_ToolReady_Start";n[n.Memory_ToolReady_Stop=212]="Memory_ToolReady_Stop";n[n.Memory_GridFilterResponse_Start=213]="Memory_GridFilterResponse_Start";n[n.Memory_GridFilterResponse_Stop=214]="Memory_GridFilterResponse_Stop";n[n.Memory_UpdateObjectReferenceGraph_Start=215]="Memory_UpdateObjectReferenceGraph_Start";n[n.Memory_UpdateObjectReferenceGraph_Stop=216]="Memory_UpdateObjectReferenceGraph_Stop";n[n.Memory_ProcessingSnapshot_Start=217]="Memory_ProcessingSnapshot_Start";n[n.Memory_ProcessingSnapshot_Stop=218]="Memory_ProcessingSnapshot_Stop";n[n.Memory_ProcessingDiffSnapshot_Start=219]="Memory_ProcessingDiffSnapshot_Start";n[n.Memory_ProcessingDiffSnapshot_Stop=220]="Memory_ProcessingDiffSnapshot_Stop";n[n.Debugger_StepOver_Start=301]="Debugger_StepOver_Start";n[n.Debugger_StepInto_Start=302]="Debugger_StepInto_Start";n[n.Debugger_StepOut_Start=303]="Debugger_StepOut_Start";n[n.Debugger_OnBreak_Start=304]="Debugger_OnBreak_Start";n[n.Debugger_OnBreak_Stop=305]="Debugger_OnBreak_Stop";n[n.Debugger_PrettyPrint_Start=306]="Debugger_PrettyPrint_Start";n[n.Debugger_PrettyPrint_Stop=307]="Debugger_PrettyPrint_Stop";n[n.Debugger_CloseDocument_Start=310]="Debugger_CloseDocument_Start";n[n.Debugger_CloseDocument_Stop=311]="Debugger_CloseDocument_Stop";n[n.Debugger_RevealRange_Start=314]="Debugger_RevealRange_Start";n[n.Debugger_RevealRange_Stop=315]="Debugger_RevealRange_Stop";n[n.Debugger_CallstackController_GoTo_Start=316]="Debugger_CallstackController_GoTo_Start";n[n.Debugger_CallstackController_GoTo_Stop=317]="Debugger_CallstackController_GoTo_Stop";n[n.Debugger_BreakpointController_SetAllEnabledStates_Start=318]="Debugger_BreakpointController_SetAllEnabledStates_Start";n[n.Debugger_BreakpointController_SetAllEnabledStates_Stop=319]="Debugger_BreakpointController_SetAllEnabledStates_Stop";n[n.Debugger_EditorWindow_NavigateTo_Start=320]="Debugger_EditorWindow_NavigateTo_Start";n[n.Debugger_EditorWindow_NavigateTo_Stop=321]="Debugger_EditorWindow_NavigateTo_Stop";n[n.Debugger_Editor_SetModel_Start=322]="Debugger_Editor_SetModel_Start";n[n.Debugger_Editor_SetModel_Stop=323]="Debugger_Editor_SetModel_Stop";n[n.Debugger_Editor_CreateModel_Start=324]="Debugger_Editor_CreateModel_Start";n[n.Debugger_Editor_CreateModel_Stop=325]="Debugger_Editor_CreateModel_Stop";n[n.Debugger_Editor_Create_Start=326]="Debugger_Editor_Create_Start";n[n.Debugger_Editor_Create_Stop=327]="Debugger_Editor_Create_Stop";n[n.Debugger_Editor_Layout_Start=328]="Debugger_Editor_Layout_Start";n[n.Debugger_Editor_Layout_Stop=329]="Debugger_Editor_Layout_Stop";n[n.Debugger_Editor_ChangeViewZones_Start=330]="Debugger_Editor_ChangeViewZones_Start";n[n.Debugger_Editor_ChangeViewZones_Stop=331]="Debugger_Editor_ChangeViewZones_Stop";n[n.Debugger_Editor_RevealPosition_Start=332]="Debugger_Editor_RevealPosition_Start";n[n.Debugger_Editor_RevealPosition_Stop=333]="Debugger_Editor_RevealPosition_Stop";n[n.Debugger_Editor_SaveViewState_Start=334]="Debugger_Editor_SaveViewState_Start";n[n.Debugger_Editor_SaveViewState_Stop=335]="Debugger_Editor_SaveViewState_Stop";n[n.Debugger_Editor_RestoreViewState_Start=336]="Debugger_Editor_RestoreViewState_Start";n[n.Debugger_Editor_RestoreViewState_Stop=337]="Debugger_Editor_RestoreViewState_Stop";n[n.Debugger_EditorWindow_CreateDataTipFromPosition_Start=338]="Debugger_EditorWindow_CreateDataTipFromPosition_Start";n[n.Debugger_EditorWindow_CreateDataTipFromPosition_Stop=339]="Debugger_EditorWindow_CreateDataTipFromPosition_Stop";n[n.Debugger_BreakpointController_SetEnabledState_Start=340]="Debugger_BreakpointController_SetEnabledState_Start";n[n.Debugger_BreakpointController_SetEnabledState_Stop=341]="Debugger_BreakpointController_SetEnabledState_Stop";n[n.Debugger_BreakpointController_BreakpointChanged_Start=342]="Debugger_BreakpointController_BreakpointChanged_Start";n[n.Debugger_BreakpointController_BreakpointChanged_Stop=343]="Debugger_BreakpointController_BreakpointChanged_Stop";n[n.Debugger_BreakpointWindow_BreakpointChanged_Start=344]="Debugger_BreakpointWindow_BreakpointChanged_Start";n[n.Debugger_BreakpointWindow_BreakpointChanged_Stop=345]="Debugger_BreakpointWindow_BreakpointChanged_Stop";n[n.Debugger_WatchWindowView_RefreshView_Start=346]="Debugger_WatchWindowView_RefreshView_Start";n[n.Debugger_WatchWindowView_RefreshView_Stop=347]="Debugger_WatchWindowView_RefreshView_Stop";n[n.Debugger_StepDocument_Start=348]="Debugger_StepDocument_Start";n[n.Debugger_ToggleJMC_Start=349]="Debugger_ToggleJMC_Start";n[n.Debugger_ToggleJMC_Stop=350]="Debugger_ToggleJMC_Stop";n[n.Debugger_ToggleCallstackLibraryFrames_Start=351]="Debugger_ToggleCallstackLibraryFrames_Start";n[n.Debugger_ToggleCallstackLibraryFrames_Stop=352]="Debugger_ToggleCallstackLibraryFrames_Stop";n[n.Debugger_SpecifyUrlAsJMCType_Start=353]="Debugger_SpecifyUrlAsJMCType_Start";n[n.Debugger_SpecifyUrlAsJMCType_Stop=354]="Debugger_SpecifyUrlAsJMCType_Stop";n[n.Debugger_Persistence_DataLoad_Start=355]="Debugger_Persistence_DataLoad_Start";n[n.Debugger_Persistence_DataLoad_Stop=356]="Debugger_Persistence_DataLoad_Stop";n[n.Debugger_Persistence_AddBreakpoints_Start=357]="Debugger_Persistence_AddBreakpoints_Start";n[n.Debugger_Persistence_AddBreakpoints_Stop=358]="Debugger_Persistence_AddBreakpoints_Stop";n[n.Debugger_Persistence_AddWatches_Start=359]="Debugger_Persistence_AddWatches_Start";n[n.Debugger_Persistence_AddWatches_Stop=360]="Debugger_Persistence_AddWatches_Stop";n[n.Debugger_Persistence_TabOpen_Start=361]="Debugger_Persistence_TabOpen_Start";n[n.Debugger_Persistence_TabOpen_Stop=362]="Debugger_Persistence_TabOpen_Stop";n[n.Debugger_Persistence_SaveState_Start=363]="Debugger_Persistence_SaveState_Start";n[n.Debugger_Persistence_SaveState_Stop=364]="Debugger_Persistence_SaveState_Stop";n[n.Debugger_SourceMap_ToggleSourceMap_Start=365]="Debugger_SourceMap_ToggleSourceMap_Start";n[n.Debugger_SourceMap_ToggleSourceMap_Stop=366]="Debugger_SourceMap_ToggleSourceMap_Stop";n[n.Debugger_SourceMap_ParseSourceMapAsync_Start=367]="Debugger_SourceMap_ParseSourceMapAsync_Start";n[n.Debugger_SourceMap_ParseSourceMapAsync_Stop=368]="Debugger_SourceMap_ParseSourceMapAsync_Stop";n[n.Debugger_Editor_GetOrCreateMode_Start=369]="Debugger_Editor_GetOrCreateMode_Start";n[n.Debugger_Editor_GetOrCreateMode_Stop=370]="Debugger_Editor_GetOrCreateMode_Stop";n[n.Debugger_OnAddDocuments_Info=371]="Debugger_OnAddDocuments_Info";n[n.Debugger_Intellisense_ListBox_Build_Start=372]="Debugger_Intellisense_ListBox_Build_Start";n[n.Debugger_Intellisense_ListBox_Build_Stop=373]="Debugger_Intellisense_ListBox_Build_Stop";n[n.Debugger_Intellisense_ListBox_Reset_Start=374]="Debugger_Intellisense_ListBox_Reset_Start";n[n.Debugger_Intellisense_ListBox_Reset_Stop=375]="Debugger_Intellisense_ListBox_Reset_Stop";n[n.Debugger_Intellisense_Menu_Filter_Start=376]="Debugger_Intellisense_Menu_Filter_Start";n[n.Debugger_Intellisense_Menu_Filter_Stop=377]="Debugger_Intellisense_Menu_Filter_Stop";n[n.Debugger_Intellisense_Menu_Layout_Start=378]="Debugger_Intellisense_Menu_Layout_Start";n[n.Debugger_Intellisense_Menu_Layout_Stop=379]="Debugger_Intellisense_Menu_Layout_Stop";n[n.Debugger_Intellisense_Provider_Get_Expression_Start=380]="Debugger_Intellisense_Provider_Get_Expression_Start";n[n.Debugger_Intellisense_Provider_Get_Expression_Stop=381]="Debugger_Intellisense_Provider_Get_Expression_Stop";n[n.Debugger_Intellisense_Provider_Update_Start=382]="Debugger_Intellisense_Provider_Update_Start";n[n.Debugger_Intellisense_Provider_Update_Stop=383]="Debugger_Intellisense_Provider_Update_Stop";n[n.Debugger_Intellisense_Provider_Get_Items_Start=384]="Debugger_Intellisense_Provider_Get_Items_Start";n[n.Debugger_Intellisense_Provider_Get_Items_Stop=385]="Debugger_Intellisense_Provider_Get_Items_Stop";n[n.Debugger_AsyncStackProvider_GetFrames_Start=386]="Debugger_AsyncStackProvider_GetFrames_Start";n[n.Debugger_AsyncStackProvider_GetFrames_Stop=387]="Debugger_AsyncStackProvider_GetFrames_Stop";n[n.Debugger_AsyncStackProvider_GetFrames_Timeout=388]="Debugger_AsyncStackProvider_GetFrames_Timeout";n[n.Console_Window_Create_Start=401]="Console_Window_Create_Start";n[n.Console_Window_Create_Stop=402]="Console_Window_Create_Stop";n[n.Console_Attach_Start=403]="Console_Attach_Start";n[n.Console_Attach_Stop=404]="Console_Attach_Stop";n[n.Console_Message_Start=405]="Console_Message_Start";n[n.Console_Message_Stop=406]="Console_Message_Stop";n[n.Console_Input_Start=407]="Console_Input_Start";n[n.Console_Input_Stop=408]="Console_Input_Stop";n[n.Console_Output_Start=409]="Console_Output_Start";n[n.Console_Output_Stop=410]="Console_Output_Stop";n[n.Console_Output_Render_Start=411]="Console_Output_Render_Start";n[n.Console_Output_Render_Stop=412]="Console_Output_Render_Stop";n[n.Console_Item_Toggle_Start=413]="Console_Item_Toggle_Start";n[n.Console_Item_Toggle_Stop=414]="Console_Item_Toggle_Stop";n[n.Console_HtmlLines_Expand_Start=415]="Console_HtmlLines_Expand_Start";n[n.Console_HtmlLines_Expand_Stop=416]="Console_HtmlLines_Expand_Stop";n[n.Console_Context_Menu_Loading_Start=417]="Console_Context_Menu_Loading_Start";n[n.Console_Context_Menu_Loading_Stop=418]="Console_Context_Menu_Loading_Stop";n[n.Console_Scroll_Start=419]="Console_Scroll_Start";n[n.Console_Scroll_Stop=420]="Console_Scroll_Stop";n[n.Console_Intellisense_ListBox_Build_Start=421]="Console_Intellisense_ListBox_Build_Start";n[n.Console_Intellisense_ListBox_Build_Stop=422]="Console_Intellisense_ListBox_Build_Stop";n[n.Console_Intellisense_ListBox_Reset_Start=423]="Console_Intellisense_ListBox_Reset_Start";n[n.Console_Intellisense_ListBox_Reset_Stop=424]="Console_Intellisense_ListBox_Reset_Stop";n[n.Console_Intellisense_Menu_Filter_Start=425]="Console_Intellisense_Menu_Filter_Start";n[n.Console_Intellisense_Menu_Filter_Stop=426]="Console_Intellisense_Menu_Filter_Stop";n[n.Console_Intellisense_Menu_Layout_Start=427]="Console_Intellisense_Menu_Layout_Start";n[n.Console_Intellisense_Menu_Layout_Stop=428]="Console_Intellisense_Menu_Layout_Stop";n[n.Console_Intellisense_Provider_Get_Expression_Start=429]="Console_Intellisense_Provider_Get_Expression_Start";n[n.Console_Intellisense_Provider_Get_Expression_Stop=430]="Console_Intellisense_Provider_Get_Expression_Stop";n[n.Console_Intellisense_Provider_Update_Start=431]="Console_Intellisense_Provider_Update_Start";n[n.Console_Intellisense_Provider_Update_Stop=432]="Console_Intellisense_Provider_Update_Stop";n[n.Console_Intellisense_Provider_Get_Items_Start=433]="Console_Intellisense_Provider_Get_Items_Start";n[n.Console_Intellisense_Provider_Get_Items_Stop=434]="Console_Intellisense_Provider_Get_Items_Stop";n[n.Dom_Window_Create_Start=501]="Dom_Window_Create_Start";n[n.Dom_Window_Create_Stop=502]="Dom_Window_Create_Stop";n[n.Dom_ExpandNode_Start=503]="Dom_ExpandNode_Start";n[n.Dom_ExpandNode_Stop=504]="Dom_ExpandNode_Stop";n[n.Dom_UndoRedo_Start=505]="Dom_UndoRedo_Start";n[n.Dom_UndoRedo_Stop=506]="Dom_UndoRedo_Stop";n[n.Dom_DragDrop_Start=507]="Dom_DragDrop_Start";n[n.Dom_DragDrop_Stop=508]="Dom_DragDrop_Stop";n[n.Dom_AddAttribute_Start=509]="Dom_AddAttribute_Start";n[n.Dom_AddAttribute_Stop=510]="Dom_AddAttribute_Stop";n[n.Dom_Intellisense_Start=511]="Dom_Intellisense_Start";n[n.Dom_Intellisense_Stop=512]="Dom_Intellisense_Stop";n[n.Dom_SelectElement_Start=513]="Dom_SelectElement_Start";n[n.Dom_SelectElement_Stop=514]="Dom_SelectElement_Stop";n[n.Dom_CutElement_Start=515]="Dom_CutElement_Start";n[n.Dom_CutElement_Stop=516]="Dom_CutElement_Stop";n[n.Dom_PasteElement_Start=517]="Dom_PasteElement_Start";n[n.Dom_PasteElement_Stop=518]="Dom_PasteElement_Stop";n[n.Dom_CollapseElement_Start=519]="Dom_CollapseElement_Start";n[n.Dom_CollapseElement_Stop=520]="Dom_CollapseElement_Stop";n[n.Dom_StylesTabLoad_Start=521]="Dom_StylesTabLoad_Start";n[n.Dom_StylesTabLoad_Stop=522]="Dom_StylesTabLoad_Stop";n[n.Dom_StylesTab_Intellisense_Start=523]="Dom_StylesTab_Intellisense_Start";n[n.Dom_StylesTab_Intellisense_Stop=524]="Dom_StylesTab_Intellisense_Stop";n[n.Dom_TreeItemExpand_Start=525]="Dom_TreeItemExpand_Start";n[n.Dom_TreeItemExpand_Stop=526]="Dom_TreeItemExpand_Stop";n[n.Dom_ComputedTabLoad_Start=527]="Dom_ComputedTabLoad_Start";n[n.Dom_ComputedTabLoad_Stop=528]="Dom_ComputedTabLoad_Stop";n[n.Dom_ChangesTabLoad_Start=529]="Dom_ChangesTabLoad_Start";n[n.Dom_ChangesTabLoad_Stop=530]="Dom_ChangesTabLoad_Stop";n[n.Dom_LayoutTabLoad_Start=531]="Dom_LayoutTabLoad_Start";n[n.Dom_LayoutTabLoad_Stop=532]="Dom_LayoutTabLoad_Stop";n[n.Dom_EventsTabLoad_Start=533]="Dom_EventsTabLoad_Start";n[n.Dom_EventsTabLoad_Stop=534]="Dom_EventsTabLoad_Stop";n[n.Dom_TreeItemCollapse_Start=535]="Dom_TreeItemCollapse_Start";n[n.Dom_TreeItemCollapse_Stop=536]="Dom_TreeItemCollapse_Stop";n[n.Dom_Search_Start=537]="Dom_Search_Start";n[n.Dom_Search_Stop=538]="Dom_Search_Stop";n[n.Dom_RemoteInjection_Start=539]="Dom_RemoteInjection_Start";n[n.Dom_RemoteInjection_Stop=540]="Dom_RemoteInjection_Stop";n[n.Dom_EnterEditAsHtml_Start=541]="Dom_EnterEditAsHtml_Start";n[n.Dom_EnterEditAsHtml_Stop=542]="Dom_EnterEditAsHtml_Stop";n[n.Dom_CommitEditAsHtml_Start=543]="Dom_CommitEditAsHtml_Start";n[n.Dom_CommitEditAsHtml_Stop=544]="Dom_CommitEditAsHtml_Stop";n[n.Dom_CommitEditAttribute_Start=545]="Dom_CommitEditAttribute_Start";n[n.Dom_CommitEditAttribute_Stop=546]="Dom_CommitEditAttribute_Stop";n[n.Dom_ShowColorPicker_Start=547]="Dom_ShowColorPicker_Start";n[n.Dom_ShowColorPicker_Stop=548]="Dom_ShowColorPicker_Stop";n[n.Dom_HideColorPicker_Start=549]="Dom_HideColorPicker_Start";n[n.Dom_HideColorPicker_Stop=550]="Dom_HideColorPicker_Stop";n[n.Dom_SetColorUsingColorPicker_Start=551]="Dom_SetColorUsingColorPicker_Start";n[n.Dom_SetColorUsingColorPicker_Stop=552]="Dom_SetColorUsingColorPicker_Stop";n[n.Emulation_Window_Create_Start=601]="Emulation_Window_Create_Start";n[n.Emulation_Window_Create_Stop=602]="Emulation_Window_Create_Stop";n[n.Generic_Debug_1_Start=701]="Generic_Debug_1_Start";n[n.Generic_Debug_1_Stop=702]="Generic_Debug_1_Stop";n[n.Generic_Debug_2_Start=703]="Generic_Debug_2_Start";n[n.Generic_Debug_2_Stop=704]="Generic_Debug_2_Stop";n[n.Generic_Debug_3_Start=705]="Generic_Debug_3_Start";n[n.Generic_Debug_3_Stop=706]="Generic_Debug_3_Stop";n[n.Generic_Debug_4_Start=707]="Generic_Debug_4_Start";n[n.Generic_Debug_4_Stop=708]="Generic_Debug_4_Stop";n[n.Generic_Debug_5_Start=709]="Generic_Debug_5_Start";n[n.Generic_Debug_5_Stop=710]="Generic_Debug_5_Stop";n[n.Generic_Debug_6_Start=711]="Generic_Debug_6_Start";n[n.Generic_Debug_6_Stop=712]="Generic_Debug_6_Stop";n[n.Generic_Debug_7_Start=713]="Generic_Debug_7_Start";n[n.Generic_Debug_7_Stop=714]="Generic_Debug_7_Stop";n[n.Generic_Debug_8_Start=715]="Generic_Debug_8_Start";n[n.Generic_Debug_8_Stop=716]="Generic_Debug_8_Stop";n[n.Generic_Debug_9_Start=717]="Generic_Debug_9_Start";n[n.Generic_Debug_9_Stop=718]="Generic_Debug_9_Stop";n[n.Header_InitializeTabs_Start=801]="Header_InitializeTabs_Start";n[n.Header_InitializeTabs_Stop=802]="Header_InitializeTabs_Stop"})(n.TraceEvents||(n.TraceEvents={}));u=n.TraceEvents,function(n){n[n.Debugger_OpenDocument_Start=308]="Debugger_OpenDocument_Start";n[n.Debugger_OpenDocument_Stop=309]="Debugger_OpenDocument_Stop";n[n.Debugger_SwitchDocument_Start=312]="Debugger_SwitchDocument_Start";n[n.Debugger_SwitchDocument_Stop=313]="Debugger_SwitchDocument_Stop"}(n.TraceEventsWithKey||(n.TraceEventsWithKey={}));f=n.TraceEventsWithKey;i=function(){function n(){}return n.prototype.raiseEvent=function(){},n.prototype.raiseEventWithMessage=function(){},n.prototype.raiseEventWithKey=function(){},n}();n.DefaultTraceWriter=i;r=function(){function n(n){!n&&Microsoft&&t&&(t.F12?n=t.F12.TraceWriter:t.VS&&(n=t.VS.Utilities.createExternalObject("PerformanceTraceExtension","{D76A409F-7234-4B71-9BFD-DEF3DC4CCCA6}")));this._performanceTracer=n}return n.prototype.raiseEventWithKey=function(n,t,i){this._performanceTracer&&this._performanceTracer.raiseEventWithKey(n,t,i)},n.prototype.raiseEventWithMessage=function(n,t){this._performanceTracer&&this._performanceTracer.raiseEvent(n,t)},n.prototype.raiseEvent=function(n){this.raiseEventWithMessage(n,"")},n}();n.TraceWriter=r})(Common||(Common={}))
//# sourceMappingURL=trace.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){"use strict";var r,t,u,i;(function(n){n[n.RelativeOrAbsolute=0]="RelativeOrAbsolute";n[n.Absolute=1]="Absolute";n[n.Relative=2]="Relative"})(n.UriKind||(n.UriKind={}));r=n.UriKind,function(n){n[n.Scheme=1]="Scheme";n[n.Userinfo=2]="Userinfo";n[n.Hostname=4]="Hostname";n[n.Port=8]="Port";n[n.Directory=16]="Directory";n[n.FilenameWithoutExtension=32]="FilenameWithoutExtension";n[n.Extension=64]="Extension";n[n.Filename=n.FilenameWithoutExtension|n.Extension]="Filename";n[n.Pathname=n.Directory|n.Filename]="Pathname";n[n.Search=128]="Search";n[n.Hash=256]="Hash";n[n.StrongPort=512]="StrongPort";n[n.KeepDelimiter=1024]="KeepDelimiter";n[n.AbsoluteUri=n.Scheme|n.Userinfo|n.Hostname|n.Port|n.Pathname|n.Search|n.Hash]="AbsoluteUri";n[n.HostnameAndPort=n.Hostname|n.StrongPort]="HostnameAndPort";n[n.StrongAuthority=n.Userinfo|n.Hostname|n.StrongPort]="StrongAuthority";n[n.Origin=n.Scheme|n.Hostname|n.Port]="Origin";n[n.PathnameAndSearch=n.Pathname|n.Search]="PathnameAndSearch"}(n.UriComponents||(n.UriComponents={}));t=n.UriComponents,function(n){n[n.UriEscaped=1]="UriEscaped";n[n.Unescaped=2]="Unescaped";n[n.SafeUnescaped=3]="SafeUnescaped"}(n.UriFormat||(n.UriFormat={}));u=n.UriFormat;i=function(){function i(){for(var f,r,e,u,n=[],t=0;t<arguments.length;t++)n[+t]=arguments[t];if(n.length>=2&&n[0]instanceof i){if(f=n[0],n[1]instanceof i)r=n[1];else if(n[1]!==null&&n[1]!==undefined)r=new i(String(n[1]),0);else throw new TypeError("Missing required argument: uri.");i.mergeCore(f,r,this)}else if(n.length>=1&&n[0]!==null&&n[0]!==undefined){if(e=String(n[0]),u=1,n.length>=2)if(typeof n[1]=="number")u=n[1];else throw new TypeError("Invalid argument: kind.");i.parseCore(e,u,this)}else throw new TypeError("Argument not optional.")}return Object.defineProperty(i.prototype,"isRooted",{get:function(){return this.isAbsolute||/^\//.test(this.pathname)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isAbsolute",{get:function(){return this._scheme===i.UriSchemeFile&&typeof this._pathname=="string"&&/^[\\/]?\.{1,2}([\\/]|$)/.test(this._pathname)?!1:!!this._scheme},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isFile",{get:function(){return this._scheme===i.UriSchemeFile},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isUnc",{get:function(){return this.isFile&&!!(this._components&4)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isDosPath",{get:function(){return this.isFile&&!this._hostname&&/^\/?[a-z][:|]/i.test(this._pathname)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hasDefaultPort",{get:function(){return this.isAbsolute&&(typeof this._port!="number"||this._scheme===i.UriSchemeHttp&&this._port===80||this._scheme===i.UriSchemeHttps&&this._port===443)?!0:!1},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"raw",{get:function(){return this._raw},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"origin",{get:function(){return this.getComponentsCore(t.Origin,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"authority",{get:function(){return this.getComponentsCore(t.HostnameAndPort,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"protocol",{get:function(){return this.getComponentsCore(1025,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"scheme",{get:function(){return this.getComponentsCore(1,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"userinfo",{get:function(){return this.getComponentsCore(2,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"host",{get:function(){return this.getComponentsCore(t.HostnameAndPort,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hostname",{get:function(){return this.getComponentsCore(4,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pathname",{get:function(){return this.getComponentsCore(t.Pathname,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pathnameAndSearch",{get:function(){return this.getComponentsCore(t.PathnameAndSearch,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"search",{get:function(){return this.getComponentsCore(1152,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hash",{get:function(){return this.getComponentsCore(1280,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"port",{get:function(){return typeof this._port=="number"?this._port:this._scheme===i.UriSchemeHttp?i.DEFAULT_PORT_HTTP:this._scheme===i.UriSchemeHttps?i.DEFAULT_PORT_HTTPS:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"absoluteUri",{get:function(){return this.getComponentsCore(t.AbsoluteUri,1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"absolutePath",{get:function(){var n=this.getComponentsCore(t.Pathname|1024,1);return this.isDosPath&&(n=n.substr(1)),n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"localPath",{get:function(){if(this.isUnc||this.isDosPath){var n=this.getComponentsCore(t.Pathname|1024,1);if(n=n.replace(i.PATH_DELIMITER,i.DOS_PATH_DELIMITER),this.isUnc)return i.UNC_ROOT+this.hostname+n;if(this.isDosPath)return n.substr(1)}return""},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"segments",{get:function(){var n=this.getComponentsCore(t.Pathname|1024,1);return n.length>1?(n=n.substr(1),n.split(i.PATH_DELIMITER)):[]},enumerable:!0,configurable:!0}),i.parse=function(n,t){return t===void 0&&(t=1),new i(n,t)},i.tryParse=function(n,t){if(t===void 0&&(t=1),n===null||n===undefined)throw new TypeError("Missing required argument: text.");return i.parseCore(n,t,undefined)},i.tryMerge=function(n,t){if(n===null||n===undefined)throw new TypeError("Missing required argument: baseUri.");if(t===null||t===undefined)throw new TypeError("Missing required argument: uri.");return i.mergeCore(n,t,undefined)},i.create=function(r){var s,l,a,h,v,e,o,c,f,y,u,p;if(r||(r={}),c=!1,f=0,typeof r.keepDelimiter=="boolean"&&(c=r.keepDelimiter),typeof r.scheme=="string"&&(s=n.ToolWindowHelpers.tryDecodeURIComponent(r.scheme.toLowerCase()),f|=1,(s===i.UriSchemeHttp||s===i.UriSchemeHttps)&&(f|=512)),typeof r.userinfo=="string"&&(l=r.userinfo.toLowerCase(),f|=2),typeof r.hostname=="string"&&(a=r.hostname.toLowerCase(),f|=4),typeof r.port=="number"){if(r instanceof i)y=r,h=y._port;else{if(r.port<0)throw new RangeError("Invalid port.");h=r.port}typeof h=="number"&&(f|=520)}return r.pathname&&(v=r.pathname,f|=t.Pathname),r.search&&(e=r.search,!c&&e.length>0&&e.charAt(0)===i.SEARCH_DELIMITER&&(e=e.substr(1)),f|=128),r.hash&&(o=r.hash,!c&&o.length>0&&o.charAt(0)===i.HASH_DELIMITER&&(o=o.substr(1)),f|=256),u=Object.create(i.prototype),u._scheme=s,u._userinfo=l,u._hostname=a,u._port=h,u._pathname=v,u._search=e,u._hash=o,u._components=f,u=new i(u.toString()),typeof r.uri=="string"&&(p=new i(r.uri),u=new i(p,u)),u},i.equals=function(n,t,r){if(r===void 0&&(r=!1),n===t)return!0;if(n===null)return t===null;if(t===null)return!1;if(n===undefined)return t===undefined;if(t===undefined)return!1;var u,f;return u=typeof n=="string"?new i(n,0):n,f=typeof t=="string"?new i(t,0):t,i.stringEquals(u.toString(),f.toString(),r)?!0:u._scheme===f._scheme&&u._userinfo===f._userinfo&&u._hostname===f._hostname&&u.port===f.port&&i.stringEquals(u._pathname,f._pathname,r)&&i.stringEquals(u._search,f._search,r)&&i.stringEquals(u._hash,f._hash,r)?!0:!1},i.compare=function(n,r,u,f,e){if(u===void 0&&(u=t.AbsoluteUri),f===void 0&&(f=1),e===void 0&&(e=!1),typeof u!="number")throw new TypeError("Invalid argument: partsToCompare.");if(typeof f!="number")throw new TypeError("Invalid argument: compareFormat.");if((f&-4)!=0)throw new RangeError("Argument out of range: compareFormat.");return n===r?0:n===null||n===undefined?r===null||r===undefined?0:-1:r===null||r===undefined?1:n.isAbsolute&&r.isAbsolute?i.compareStrings(n.getComponentsCore(u,f),r.getComponentsCore(u,f),e):n.isAbsolute?1:r.isAbsolute?-1:i.compareStrings(n.raw,r.raw,e)},i.getCurrent=function(){return typeof self!="undefined"?new i(self.location.href):new i(".")},i.prototype.getComponents=function(n,t){if(typeof n!="number"||typeof t!="number")throw new TypeError("Invalid argument: components.");if(typeof t!="number")throw new TypeError("Invalid argument: format.");if((t&-4)!=0)throw new RangeError("Argument out of range: format.");return n=i.adjustComponents(n),this.getComponentsCore(n,t)},i.prototype.toString=function(){return this.getComponentsCore(t.AbsoluteUri,3)},i.prototype.toJSON=function(){return this.toString()},i.prototype.isSameOrigin=function(n){if(n===null||n===undefined)throw new TypeError("Missing required argument: uri.");var r=n instanceof i?n:new i(String(n));return this.isAbsolute?this.getComponentsCore(t.Origin,1)===r.getComponentsCore(t.Origin,1):!r.isAbsolute},i.prototype.isBaseOf=function(n){var r;if(n===null||n===undefined)throw new TypeError("Missing required argument: uri.");var e=this.getComponentsCore(t.AbsoluteUri&-257,3),o=this.getComponentsCore(t.AbsoluteUri&-257,3),u=e.split(i.PATH_DELIMITER),f=o.split(i.PATH_DELIMITER);if(u.length>f.length)return!1;for(r=0;r<u.length;r++)if(!i.compareStrings(u[r],f[r],this.isDosPath||this.isUnc||n.isDosPath||n.isUnc))return!1;return!0},i.prototype.makeRelative=function(n){var f;if(n===null||n===undefined)throw new TypeError("Missing required argument: uri.");if(!this.isAbsolute||!n.isAbsolute)throw new URIError("URI not absolute.");if(!this.isSameOrigin(n))return n;var r=n.absolutePath,t=i.computePathDifference(this.absolutePath,r,this.isDosPath||this.isUnc),u=/[:\\/?#]/.exec(t);return u&&u[0]===":"&&(!n.isDosPath||t!==r)&&(t="./"+t),f=t+n.getComponentsCore(384,1),new i(f,2)},i.prototype.equals=function(n,t){return i.equals(this,n,t)},i.stringEquals=function(n,t,i){return i&&typeof n=="string"&&typeof t=="string"&&(n=n.toLowerCase(),t=t.toLowerCase()),n===t},i.compareStrings=function(n,t,i){return i&&typeof n=="string"&&typeof t=="string"&&(n=n.toLowerCase(),t=t.toLowerCase()),n>t?1:n<t?-1:0},i.compareNumbers=function(n,t){return n<t?-1:n>t?1:0},i.formatUserinfo=function(t,r){switch(r){case 1:t=i.escape(t,"?#","%");break;case 2:t=n.ToolWindowHelpers.tryDecodeURIComponent(t);break;case 3:t=i.unescape(t,"@/\\","safe")}return t},i.formatPath=function(t,r){switch(r){case 1:t=i.escape(t,"?#","%");break;case 2:t=n.ToolWindowHelpers.tryDecodeURIComponent(t);break;case 3:t=i.unescape(t,"?#","safe")}return t},i.formatSearch=function(n,t){switch(t){case 1:n=i.escape(n,"#","%");break;case 2:n=i.unescape(n,"#","all");break;case 3:n=i.unescape(n,"#","safe")}return n},i.formatHash=function(n,t){switch(t){case 1:n=i.escape(n,"","%");break;case 2:n=i.unescape(n,"#","all");break;case 3:n=i.unescape(n,"#","safe")}return n},i.escape=function(t,i,r){var u,s,h;if(!t)return t;var f=[],o=0,e="";for(u=0;u<t.length;u++)if(s=t.charAt(u),i.indexOf(s)>-1?e="forced":r.indexOf(s)>-1&&(e="reserved"),e!==""){if(o<u&&f.push(n.ToolWindowHelpers.tryEncodeURI(t.substring(o,u))),o=u+1,e==="forced")f.push(n.ToolWindowHelpers.tryEncodeURIComponent(s));else if(e==="reserved")if(s==="%"){if(u+3<=t.length&&(h=t.substr(u,3),/^%[a-f\d]{2}$/i.test(h))){f.push(h);e="";u+=2;o+=2;continue}f.push(n.ToolWindowHelpers.tryEncodeURIComponent("%"))}else f.push(s);e=""}return o<u&&f.push(n.ToolWindowHelpers.tryEncodeURI(t.substring(o,u))),f.join("")},i.unescape=function(t,i,r){var f,o,e,h;if(!t)return t;for(var c=[],l=0,v=function(t){c.push(n.ToolWindowHelpers.tryEncodeURIComponent(t))},a=function(n,t){c.push(n);u+=t;l=u+1},s=function(){l<u&&c.push(t.substring(l,u));l=u+1},u=0;u<t.length;u++)if(f=t.charAt(u),o=1,f==="%"){if(u+3<=t.length){e=t.substr(u,3);f="";try{/^%[a-f\d]{2}$/i.test(e)&&(h=parseInt("0x"+e.substr(1)),h<128?(o=2,f=decodeURIComponent(e)):h<224&&u+6<=t.length?(e=t.substr(u,6),/^(%[a-f\d]{2}){2}$/i.test(e)&&(o=5,f=decodeURIComponent(e))):h<240&&u+9<=t.length?(e=t.substr(u,9),/^(%[a-f\d]{2}){3}$/i.test(e)&&(o=8,f=decodeURIComponent(e))):h<245&&u+12<=t.length&&(e=t.substr(u,12),/^(%[a-f\d]{2}){4}$/i.test(e)&&(o=11,f=decodeURIComponent(e))))}catch(y){s();a(e,o)}if(r==="all"){if(f.length!==1)continue;s();a(f,o)}else if(f.length!==1)continue;else f==="%"||i.indexOf(f)>-1?u+=2:/^[;/?:@&=+$#%\\\x00-\x17]$/.test(f)?u+=2:(s(),a(f,o))}}else if(r==="all")continue;else i.indexOf(f)>-1&&(s(),v(f));return s(),c.join("")},i.parseCore=function(n,r,u){var o,l,e,a,p,f,w,v,y,h=0,b=n,s,c;if(n=n.trim(),f=n,r!==2){if(i.DosPath.test(n)&&(n="file:///"+n),s=i.UriParser.exec(n),s)o=s[i.SCHEME_INDEX],l=s[i.USERINFO_INDEX],e=s[i.HOSTNAME_INDEX],a=s[i.PORT_INDEX],f=s[i.PATHNAME_INDEX],w=!!s[i.SCHEMESEGMENT_INDEX],v=s[i.SEARCH_INDEX],y=s[i.HASH_INDEX],r=1;else{if(r===1){if(u)throw new URIError;return}r=2}if(!o&&w){if(u)throw new URIError;return}(o||e)&&f&&(f=f.replace(/\\/g,i.PATH_DELIMITER));o&&o.toLowerCase()===i.UriSchemeFile&&(/^\.{1,2}$/.test(e)&&/^([\\/]|$)/.test(f)||/^[a-z]$/i.test(e)&&/^:[\\/]/.test(f)?(f=e+f,e=undefined):e||(/^[\\/]\.{1,2}/.test(f)?f=f.substr(1):/^[\\/]{2,}/.test(f)&&(f=f.replace(/^[\\/]{2,}/,""),c=f.indexOf(i.PATH_DELIMITER),c>-1?(e=f.substr(0,c),f=f.substr(c)):(e=f,f=""))))}return typeof o=="string"&&(o=o.toLowerCase(),h|=1,(o===i.UriSchemeHttp||o===i.UriSchemeHttps)&&(h|=512)),typeof l=="string"&&(h|=2),typeof e=="string"&&(e=e.toLowerCase(),h|=4),typeof a=="string"&&(p=parseInt(a),h|=520),typeof f=="string"&&r!==2&&(f=i.normalizePath(f)),f&&(h|=t.Pathname),typeof v=="string"&&(h|=128),typeof y=="string"&&(h|=256),u||(u=Object.create(i.prototype)),u._scheme=o,u._userinfo=l,u._hostname=e,u._port=p,u._pathname=i.escape(f,"","%"),u._search=v,u._hash=y,u._raw=b,u._components=h,u},i.mergeCore=function(n,r,u){if(!u&&r.isAbsolute)return r;var o,h,c,l,f,s,a,e=0;return r._scheme?(o=r._scheme,h=r._userinfo,c=r._hostname,l=r._port,f=i.normalizePath(r._pathname),s=r._search):(r._hostname?(h=r._userinfo,c=r._hostname,l=r._port,f=i.normalizePath(r._pathname),s=r._search):(r._pathname?(r._pathname.charAt(0)===i.PATH_DELIMITER?f=i.normalizePath(r._pathname):(f=i.mergePath(n._pathname,r._pathname),f=i.normalizePath(f)),s=r._search):(f=n._pathname,s=r._search?r._search:n._search),h=n._userinfo,c=n._hostname,l=n._port),o=n._scheme),a=r._hash,typeof o=="string"&&(e|=1,(o===i.UriSchemeHttp||o===i.UriSchemeHttps)&&(e|=512)),typeof h=="string"&&(e|=2),typeof c=="string"&&(e|=4),typeof l=="number"&&(e|=520),f&&(e|=t.Pathname),typeof s=="string"&&(e|=128),typeof a=="string"&&(e|=256),u||(u=Object.create(i.prototype)),u._scheme=o,u._userinfo=h,u._hostname=c,u._port=l,u._pathname=f,u._search=s,u._hash=a,u._components=e,u._raw=u.toString(),u},i.mergePath=function(n,t){var r=-1;return n&&(r=n.lastIndexOf(i.PATH_DELIMITER)),r>=0?n.substr(0,r+1)+t:t},i.normalizePath=function(n){var t,u,r,f;for(n=n.replace(/^\s+|\s+$/g,""),n=n.replace(/\\+|\/+/g,i.PATH_DELIMITER),t=n.split(/\//g),u=t[0]==="",u&&t.shift(),r=0;r<t.length;){f=t[r];switch(f){case i.CURRENT_DIRECTORY_TOKEN:if(r!==0||u){t.splice(r,1);r===t.length&&t.push("");continue}break;case i.PARENT_DIRECTORY_TOKEN:if(r===0&&u){t.splice(r,1);continue}if(r>=1&&t[r-1]!==i.CURRENT_DIRECTORY_TOKEN&&t[r-1]!==i.PARENT_DIRECTORY_TOKEN){t.splice(--r,2);r===t.length&&t.push("");continue}}r++}return u&&t.unshift(""),t.join(i.PATH_DELIMITER)},i.computePathDifference=function(n,t,r){for(var e=-1,f,u=0;u<n.length&&u<t.length&&i.compareStrings(n.charAt(u),t.charAt(u),r)===0;u++)n.charAt(u)===i.PATH_DELIMITER&&(e=u);if(u===0)return t;if(u===n.length&&u===t.length)return"";for(f=[];u<n.length;u++)n.charAt(u)===i.PATH_DELIMITER&&f.push(i.PARENT_DIRECTORY_TOKEN,i.PATH_DELIMITER);return f.length===0&&t.length-1===e?i.CURRENT_DIRECTORY_TOKEN+i.PATH_DELIMITER:f.join("")+t.substr(e+1)},i.adjustComponents=function(n){return n&512&&(n|=8),n&2&&(n&-1025)!=2&&(n|=4),n&8&&(n&-1537)!=8&&(n|=4),n&t.Origin&&(n&256?n|=t.PathnameAndSearch:n&128?n|=t.Pathname:n&64?n|=48:n&32&&(n|=16)),(n&t.Pathname)==80&&(n|=32),n},i.prototype.getComponentsCore=function(n,r){var u=[],e=!1,f=n&this._components;return f&1&&(u.push(this._scheme),e=this._scheme===i.UriSchemeFile,n!==1&&u.push(i.PROTOCOL_DELIMITER)),(n&1025&&f&(t.StrongAuthority|8)||e)&&u.push(i.SCHEME_DELIMITER),f&(t.StrongAuthority|8)&&(f&2&&(u.push(i.formatUserinfo(this._userinfo,r)),n!==2&&u.push(i.USERINFO_DELIMITER)),f&4&&u.push(this._hostname),f&520&&(u.push(i.PORT_DELIMITER),u.push(this.port.toString()))),n&t.Pathname&&u.push(this.getCanonicalPath(n,r)),f&128&&(n!==128&&u.push(i.SEARCH_DELIMITER),u.push(i.formatSearch(this._search,r))),f&256&&(n!==256&&u.push(i.HASH_DELIMITER),u.push(i.formatHash(this._hash,r))),u.join("")},i.prototype.getCanonicalPath=function(n,r){var u=this._pathname,c=!1,y,o,f,s,l,a,e,h,v;if(n&1024?c=!0:this.isAbsolute&&(this.isFile?c=!0:(this._components&(4|t.Pathname))==(4|t.Pathname)&&(c=!0)),!(this._components&t.Pathname)||u.length===0)return n&16&&c?i.PATH_DELIMITER:"";if(n&16&&(y=u.charAt(0)!==i.PATH_DELIMITER,c&&y&&(u=i.PATH_DELIMITER+u)),o=n&t.Pathname,o===t.Pathname)return i.formatPath(u,r);if(s=u.lastIndexOf(i.PATH_DELIMITER),o&16){if(s===u.length-1?l=i.formatPath(u,r):s>-1&&(l=i.formatPath(u.substr(0,s+1),r)),o===16)return l;f||(f=[]);f.push(l)}if(a=o&t.Filename,a&&s<u.length-1)if(e=s>-1?u.substr(s+1):u,a===t.Filename){if(e=i.formatPath(e,r),o===t.Filename)return e;f||(f=[]);f.push(e)}else if(h=e.lastIndexOf(i.EXTENSION_DELIMITER),a===32){if(v=h===-1?i.formatPath(e,r):h>0?i.formatPath(e.substr(0,h),r):"",o===32)return v;f||(f=[]);f.push(v)}else return h===0?i.formatPath(e,r):h>0?i.formatPath(e.substr(h),r):"";return f?f.join(""):""},i.UriParser=/^(?:([a-z][a-z0-9+.\-]*)[:|])?(?:[\\/]{2}(?:((?:[\w\-._~!$&'()*+,;=:]|%[a-f0-9]{2})*)@)?(\[[^\[\]]+\]|[\w\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\.\-_]*)(?:\:(\d+))?|(?![\\/]{2}))(([^/\\?#]*:)?[^?#]*?)(?:\?([^#]*?))?(?:#(.*?))?$/i,i.DosPath=/^([a-z]\:|[\\/]{2,}[^\\/@:?#]+)[\\/]/i,i.SCHEME_INDEX=1,i.USERINFO_INDEX=2,i.HOSTNAME_INDEX=3,i.PORT_INDEX=4,i.PATHNAME_INDEX=5,i.SCHEMESEGMENT_INDEX=6,i.SEARCH_INDEX=7,i.HASH_INDEX=8,i.SCHEME_DELIMITER="//",i.PATH_DELIMITER="/",i.DOS_PATH_DELIMITER="\\",i.UNC_ROOT="\\\\",i.USERINFO_DELIMITER="@",i.SEARCH_DELIMITER="?",i.HASH_DELIMITER="#",i.CURRENT_DIRECTORY_TOKEN=".",i.PARENT_DIRECTORY_TOKEN="..",i.PROTOCOL_DELIMITER=":",i.PORT_DELIMITER=":",i.EXTENSION_DELIMITER=".",i.DEFAULT_PORT_HTTP=80,i.DEFAULT_PORT_HTTPS=443,i.SchemeDelimiter="://",i.UriSchemeHttp="http",i.UriSchemeHttps="https",i.UriSchemeFile="file",i.UriSchemeData="data",i}();n.Uri=i})(Common||(Common={}))
//# sourceMappingURL=uri.min.js.map
/*
 * 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;
        }

/* 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;
}

    /* Disable "x" in input boxes. */
    .BPT-SearchBox::-ms-clear {
        display: none;
    }

    .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;
    margin-right: 6px;
}

    .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-SearchBox-Border .BPT-Search-Button {
    display: inline-block;
    position: absolute;
}

    .BPT-SearchBox-Border .BPT-Search-Button:not([disabled]):hover div {
        background-position-x: -16px;
    }

    .BPT-SearchBox-Border .BPT-Search-Button[disabled] div {
        visibility: hidden;
    }

    .BPT-SearchBox-Border .BPT-Search-Button .BPT-Search-Next {
        background-image: url(""); /*[url({plugin-common-image-find-next})]*/
        background-repeat: no-repeat;
        background-position: 0 0;
        background-size: 48px 16px;
        display: inline-block;
        width: 16px;
        height: 16px;
    }

    .BPT-SearchBox-Border .BPT-Search-Button .BPT-Search-Previous {
        background-image: url(""); /*[url({plugin-common-image-find-previous})]*/
        background-repeat: no-repeat;
        background-position: 0 0;
        background-size: 48px 16px;
        display: inline-block;
        width: 16px;
        height: 16px;
    }

/*
 *  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;
}
     body.xamlWindow .colorPicker {
        width: 204px;
    }

    .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 */
    }

     body.xamlWindow .colorPicker .colorPalettePanel {
        width: 160px; /* 6 * 20px squares + 10 * 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})]*/
        }

/*
 *   TabControl styles
 */

.BPT-tabControl {
    height: 100%;
    display: -ms-grid;
    -ms-grid-columns: 1fr;
    -ms-grid-rows: auto 1fr;
    box-sizing: border-box;
    width: 100%;
}

    .BPT-tabControl > .tabHeader {
        -ms-grid-column: 1;
        -ms-grid-columns: auto 1fr auto;
        -ms-grid-row: 1;
        background-color: TRANSPARENT; /*[{plugin-contextmenu-background-color}]*/
        border-bottom: 1px solid #cccedb; /*[1px solid {plugin-border-color}]*/
        display: -ms-grid;
        overflow: visible;
    }

        .BPT-tabControl > .tabHeader * {
            overflow: visible;
        }

        .BPT-tabControl > .tabHeader > .beforeBarContainer {
            -ms-grid-column: 1;
            -ms-grid-row: 1;
            box-sizing: border-box;
        }

        .BPT-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;
        }

        .BPT-tabControl > .tabHeader > .tabBarContainerLeftAlign {
            -ms-grid-column-align: start;
        }

        .BPT-tabControl > .tabHeader > .afterBarContainer {
            -ms-grid-column: 3;
            -ms-grid-row: 1;
            box-sizing: border-box;
        }

    .BPT-tabControl ul.tabBar {
        list-style-type: none;
        margin: 0;
        margin-right: 20px;
        padding: 0;
        cursor: default;
    }

        .BPT-tabControl ul.tabBar li {
            border: 1px solid transparent;
            color: black; /*[{plugin-color}]*/
            display: inline-block;
            font-size: 100%;
            font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/
            padding: 5px 14px 5px 14px;
            position: relative;
            top: 1px;
        }

            .BPT-tabControl ul.tabBar li.disabled {
                color: black; /*[{plugin-color rgba(0.5)}]*/
            }

            .BPT-tabControl ul.tabBar li:hover:not(.disabled) {
                background-color: lightgray; /*[{plugin-contextmenu-hover-color}]*/
                color: black; /*[{plugin-contextmenu-hover-text-color}]*/
                cursor: pointer;
            }

            .BPT-tabControl ul.tabBar li:focus:not(.disabled) {
                outline: 1px dotted TRANSPARENT; /*[1px dotted {plugin-color}]*/
            }

            .BPT-tabControl ul.tabBar li.active:not(.disabled) {
                background-color: transparent; /*[{plugin-background-color}]*/
                border: 1px solid #cccedb; /*[1px solid {plugin-border-color}]*/
                border-bottom-color: transparent; /*[{plugin-background-color}]*/
                color: #007acc; /*[{plugin-link-color}]*/
            }

    .BPT-tabControl > .tabContentPane {
        -ms-grid-column: 1;
        -ms-grid-column-span: 3;
        -ms-grid-row: 2;
        box-sizing: border-box;
        position: relative;
    }

        .BPT-tabControl > .tabContentPane > .tabItemContent {
            position: absolute;
            visibility: hidden;
        }

        .BPT-tabControl > .tabContentPane > .active {
            visibility: visible;
        }

.BPT-tabItem {
    width: 100%;
    height: 100%;
}

/*
 *   SourceInfo
 */

.BPT-sourceInfoTooltip {
    -ms-grid-columns: auto 5px auto;
    -ms-grid-rows: 4;
    display: -ms-grid;
    width: 237px;
}

    .BPT-sourceInfoTooltip .sourceInfoNameLabel {
        -ms-grid-column: 1;
        -ms-grid-row: 1;
    }

    .BPT-sourceInfoTooltip .sourceInfoName {
        -ms-grid-column: 3;
        -ms-grid-row: 1;
        word-break: break-all;
    }

    .BPT-sourceInfoTooltip .sourceInfoFileLabel {
        -ms-grid-column: 1;
        -ms-grid-row: 2;
    }

    .BPT-sourceInfoTooltip .sourceInfoFile {
        -ms-grid-column: 3;
        -ms-grid-row: 2;
        word-break: break-all;
    }

    .BPT-sourceInfoTooltip .sourceInfoLineLabel {
        -ms-grid-column: 1;
        -ms-grid-row: 3;
    }

    .BPT-sourceInfoTooltip .sourceInfoLine {
        -ms-grid-column: 3;
        -ms-grid-row: 3;
        word-break: break-all;
    }

    .BPT-sourceInfoTooltip .sourceInfoColumnLabel {
        -ms-grid-column: 1;
        -ms-grid-row: 4;
    }

    .BPT-sourceInfoTooltip .sourceInfoColumn {
        -ms-grid-column: 3;
        -ms-grid-row: 4;
        word-break: break-all;
    }

/*
 *  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;
}

.themeColor {
    color: TRANSPARENT; /*[{plugin-theme-color}]*/
}
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,r=function(){function n(n){if(this._proxy=n,!this._proxy)throw new Error(t.Resources.getErrorString("JSPerf.1055"))}return n.prototype.startSession=function(n,r,u){var f=this;return new t.Promise(function(t,e){f._proxy.startSession(n,r,u,function(n){t(new i(n))},function(n){e&&e(new Error(n.toString()))})})},n.prototype.stopCollection=function(){this._proxy.stopCollection()},n}(),i;n.F12EtwDataCollector=r;i=function(){function n(n){this._proxy=n}return n.prototype.stop=function(){var n=this;return new t.Promise(function(t,i){n._proxy.stop(function(n){t(n)},function(n){i&&i(new Error("Error: "+n))})})},n.prototype.getGraphDataUpdate=function(n){var i=this;return new t.Promise(function(t,r){i._proxy.getGraphDataUpdate(n,function(n){t(n)},function(n){r&&r(new Error("Error: "+n))})})},n.prototype.sendStringToCollectionAgent=function(n){var i=this;return new t.Promise(function(t,r){i._proxy.sendStringToCollectionAgent(n,function(n){t(n)},function(n){r&&r(new Error("Error: "+n))})})},n.prototype.addEventListener=function(n,t){this._proxy.addEventListener(n,t)},n.prototype.removeEventListener=function(n,t){this._proxy.removeEventListener(n,t)},n.prototype.isEventListenerAttached=function(n,t){return this._proxy.isEventListenerAttached(n,t)},n.prototype.removeAllEventListeners=function(){this._proxy.removeAllEventListeners()},n}();n.F12EtwDataCollectorSession=i})(t=n.Data||(n.Data={}))})(Common||(Common={}))
//# sourceMappingURL=EtwDataCollector.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(t){"use strict";var i=function(){function t(n,t,i,r,u,f){this._dataIndex=n;this._columnIndex=t;this._ignoreCommitCallback=!1;this._gridControl=r;this._options=u;this._editElement=i;this._textValue=i.hasAttribute("grid-edit-value")?i.getAttribute("grid-edit-value"):i.innerText;this._cachedInnerHTML=i.innerHTML;this._inputElement=f||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)}return Object.defineProperty(t.prototype,"inputElement",{get:function(){return this._inputElement},enumerable:!0,configurable:!0}),t.prototype.dismiss=function(){this._editElement.innerHTML=this._cachedInnerHTML;this._editElement.focus();this.notifyPostEdit()},t.prototype.notifyPostEdit=function(){this._inputElement.removeEventListener("keydown",this._keyboardHandler);this._inputElement.removeEventListener("focusout",this._focusHandler);typeof this._options.postEditCellCallback!="undefined"&&this._options.postEditCellCallback(this._dataIndex,this._columnIndex)},t.prototype.keyboardHandler=function(t){var e=this._gridControl.getRowInfo(this._dataIndex),f=this._gridControl.getColumns(),u,i,r;if(t.keyCode===13)return this.commitValue(t),t.stopPropagation(),!1;if(t.keyCode===27)return this.dismiss(),t.stopPropagation(),t.preventDefault(),!1;if(t.keyCode===9){if(this._options.commitOnTab)this.commitValue(t);else if(e){if(u=e.row.children,this._ignoreCommitCallback=!0,this._editElement.innerHTML=this._cachedInnerHTML,this.notifyPostEdit(),i=this._columnIndex,t.shiftKey){while(i>0)if(i--,r=u[i],r.classList.contains("grid-cell-editable")){this._gridControl.createEditBox(this._dataIndex,i,r);break}}else{while(i<f.length-1)if(i++,r=u[i],r.classList.contains("grid-cell-editable")){this._gridControl.createEditBox(this._dataIndex,i,r);break}f.length>0&&i===f.length-1&&u[0].parentElement.focus()}return t.stopPropagation(),!1}}else return t.keyCode===38||t.keyCode===40||t.keyCode===33||t.keyCode===34?!0:(t.stopPropagation(),n.preventIEKeys(t))},t.prototype.focusHandler=function(n){this.commitValue(n)},t.prototype.commitValue=function(n){var t=this._inputElement.value;return this._editElement.innerText=this._ignoreCommitCallback?this._textValue:t,this._options.commitEditCellCallback&&!this._ignoreCommitCallback&&this._options.commitEditCellCallback(t,this._dataIndex,this._columnIndex),this.notifyPostEdit(),n.stopPropagation(),n.preventDefault(),!1},t}();t.GridCellEditControl=i})(t=n.Grid||(n.Grid={}))})(Common||(Common={}))
//# sourceMappingURL=gridCellEditControl.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var __extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},Common;(function(n){var t;(function(t){"use strict";var f,c,i,e,o,s,l,u,a,r,h,v;(function(n){var t=function(){function t(){}return t.stableReverse=function(n,t){for(var r,u,f=[],i=n.length-1;i>=0;i--){for(r=i-1;r>=0;r--)if(0!==t(n[r],n[i]))break;for(u=r+1;u<=i;u++)f.push(n[u]);i=r+1}for(i=0;i<f.length;i++)n[i]=f[i]},t.defaultComparer=function(n,t,i,r){var f=i[n.index],u=r[n.index];return typeof f=="undefined"||f===null?typeof u=="undefined"||u===null?0:-1:typeof u=="undefined"||u===null?1:f.toString().toLocaleUpperCase().localeCompare(u.toString().toLocaleUpperCase())},t.sortComparer=function(t,i,r,u){for(var f=0;f<t.length;f++){var o=t[f],s=i[f],h=s.comparer||n.TreeNodeSort.defaultComparer,e=h(s,o.order,r,u);if(e===0)continue;else return o.order==="desc"?-e:e}return 0},t}();n.TreeNodeSort=t})(f=t.Utility||(t.Utility={}));c=function(){function n(n,t,i){this.gridData=n;this.expandStates=t;this.toggleFunction=i}return n}();t.TreeInfo=c;i=function(){function n(n,t,i,r,u,f,e,o){this.index=n;this.text=t;this.tooltip=i;this.width=r;this.canSortBy=u;this.getColumnValue=f;this.getCellCSSClass=e;this.comparer=o;this.hasHTMLContent=!1;this.hasMixedContent=!1}return Object.defineProperty(n.prototype,"percentWidth",{get:function(){return this._percentWidth},set:function(n){F12.Tools.Utility.Assert.isTrue(0<=n&&n<=1);this._percentWidth=n},enumerable:!0,configurable:!0}),n.MIN_RESIZE_WIDTH=60,n}();t.ColumnInfo=i;e=function(){function n(n,t){this.index=n;this.order=t}return n}();t.SortOrderInfo=e;o=function(){function n(n,t){this.data=n;this.expandState=t;this.children=[]}return n}();t.TreeNode=o;s=function(){function n(n,t){this.icon=n;this.checkbox=t}return n}();t.GutterOptions=s;l=function(){function n(n,t,i,r,u,f){this.childDataCallback=n;this.columns=t;this.sortOrders=i;this.allowMultiSelect=!1;this.allowSortOnMultiColumns=!1;this.asyncInit=!0;this.autoSort=!0;this.coreCssClass="grid";this.cssClass="";this.expandStates=[];this.extendViewportBy=3;this.gutter=new s;this.header=!1;this.height="100%";this.initialSelection=!1;this.keepSelection=!1;this.payloadSize=200;this.source=null;this.preEditCellCallback=r;this.commitEditCellCallback=u;this.postEditCellCallback=f;this.disableRightClickSelection=!0;this.isGridEnabled=!0;this.prerenderCallback=null;this.onRowToggleCallback=null;this.keyboardEventHandler=null;this.commitOnTab=!1;this.alwaysForceSort=!1}return n}();t.GridOptions=l;u=function(){function n(n,t){this.rowIndex=n;this.dataIndex=t}return n}();t.RowIndexInfo=u;a=function(){function n(n,t){this.width=n;this.height=t}return n}();r=function(){function n(n,t){this.start=n;this.end=t}return n}();t.Range=r;h=function(){function n(n,t,i,r){this.active=n;this.index=t;this.originalWidth=i;this.origin=r}return n}();t.ColumnSizing=h;v=function(s){function c(n,t){s.call(this,n);this._options=t;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=!1;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=!1;this._resetScroll=!1;this._ignoreScroll=!1;this._scrollTop=0;this._scrollLeft=0;this._cancelable=null;this._onAriaExpandedModifiedHandler=this.onAriaExpandedModified.bind(this);this.initialize()}return __extends(c,s),Object.defineProperty(c.prototype,"isVerticalScrollbarVisible",{get:function(){return this._canvasHeight<this._canvas.scrollHeight},enumerable:!0,configurable:!0}),c.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 a(300,400);this._takeMeasurements();this._getChildDataCallback=this._options.childDataCallback||null;this._commitEditCellCallback=this._options.commitEditCellCallback||null;this._options.asyncInit?window.setTimeout(function(){this._attachEvents()}.bind(this),10):this._attachEvents();this.initializeDataSource()},c.prototype.findClosestElement=function(n,t){for(var r=this._element.parentNode,i=n;i&&i!==r;){if(i.msMatchesSelector(t))return i;i=i.parentNode}return i},c.prototype.fireCustomEvent=function(n,t,i){var r=document.createEvent("Event");r.initEvent(t,!0,!0);r.customData=i;n.dispatchEvent(r)},c.prototype.onAriaExpandedModified=function(n){if(n.attrName==="aria-expanded"){var t=this.getRowInfoFromEvent(n,".grid-row");t&&this.tryToggle(n.newValue==="true",!1,t.dataIndex)}},c.prototype.createElementWithClass=function(n,t){var i=document.createElement(n);return t&&(i.className=t),i},c.expand=function(n){var u=[],i,t,r,e,f,o;if(n.length>0){for(i=[],t={level:1,origCount:n.length,remainingCount:n.length},i.push(t),r=0;r<n.length;){for(u.push(t.level),t.remainingCount--;t.remainingCount===0;){if(i.pop(),i.length==0)if(r===n.length-1)break;else throw new Error("invalid descendant counts, nesting not possible");if(e=i[i.length-1],e.remainingCount-=t.origCount,t=e,t.remainingCount<0)throw new Error("invalid descendant counts, cannot convert to indentation levels")}f=Math.abs(n[r]);f>0&&(o={level:u[u.length-1]+1,origCount:f,remainingCount:f},i.push(o),t=o);r++}if(i.length>0)throw new Error("invalid descendant counts, more input expected")}return u},c.addItemsToTree=function(n,t,i,r,u){for(var e,s,h=Math.min(i+r,n.length),f=i;f<h;f++)e=new o(n[f],t[f]),s=Math.abs(e.expandState),s>0&&(c.addItemsToTree(n,t,f+1,s,e),f+=s),u.children.push(e)},c.walkTree=function(n,t){var u,i,r,f;if(t&&(t(n),u=0,i=n.children,i&&(u=i.length)))for(r=0;r<u;r++)f=i[r],c.walkTree(f,t)},c.makeElementUnselectable=function(n){var i,t,r;for(n.setAttribute("unselectable","on"),i=n.querySelectorAll("*"),t=0;t<i.length;t++){r=i[t];switch(r.tagName){case"FRAME":case"IFRAME":case"TEXTAREA":case"INPUT":case"SELECT":break;default:r.setAttribute("unselectable","on")}}},c.toDecimalLocaleString=function(n,t,i){var y=function(n,t,i){for(var r=n.length;r<t;r++)n=i?"0"+n:n+"0";return n},f,c,o,r=n.toString(),u="";if(c=i?i.numberFormat:Sys.CultureInfo.CurrentCulture,o=r.split(/e/i),r=o[0],f=o.length>1?parseInt(o[1],10):0,o=r.split("."),r=o[0],u=o.length>1?o[1]:"",f>0?(u=y(u,f,!1),r+=u.slice(0,f),u=u.substr(f)):f<0&&(f=-f,r=y(r,f+1,!0),u=r.slice(-f,r.length)+u,r=r.slice(0,-f)),u.length>0&&(u=c.NumberDecimalSeparator+u),t===!0){for(var l=c.NumberGroupSizes,a=c.NumberGroupSeparator,s=l[0],v=1,e=r.length-1,h="";e>=0;){if(s===0||s>e)return h.length>0?r.slice(0,e+1)+a+h+u:r.slice(0,e+1)+u;h=h.length>0?r.slice(e-s+1,e+1)+a+h:r.slice(e-s+1,e+1);e-=s;v<l.length&&(s=l[v],v++)}return r.slice(0,e+1)+a+h+u}return r+u},c.convertValueToDisplayString=function(n,t){return n!=null?typeof n=="string"?n:n instanceof Date?n.localeFormat(t||"G"):typeof n=="number"?t?n.localeFormat(t):c.toDecimalLocaleString(n):typeof n=="boolean"?n?"True":"False":n.toString():""},c.prototype._getId=function(){return c.TYPE_NAME},c.prototype.getSelectionCount=function(){return this._selectionCount},Object.defineProperty(c.prototype,"expandedCount",{set:function(n){this._expandedCount=n;this._options.expandedCountChangedCallback&&this._options.expandedCountChangedCallback(this._expandedCount)},enumerable:!0,configurable:!0}),c.prototype.getExpandedCount=function(){return this._expandedCount},c.prototype.getElement=function(){return this._element},c.prototype._enhance=function(){this._buildDom()},c.prototype._buildDom=function(){var n=document.createDocumentFragment(),t=this._options.gutter,i=t&&(t.icon||t.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);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),n.appendChild(this._header));i&&(this._element.classList.add("has-gutter"),this._gutter=document.createElement("div"),this._gutter.className="grid-gutter",this._canvas.appendChild(this._gutter),this._header&&(this._gutterHeader=document.createElement("div"),this._gutterHeader.className="grid-gutter-header",this._header.appendChild(this._gutterHeader)));n.appendChild(this._canvas);this._element.appendChild(n)},c.prototype._attachEvents=function(){var n=this;window.addEventListener("resize",function(t){return n._onContainerResize(t)});this._element.addEventListener("mousedown",function(t){return n._onContainerMouseDown(t)});this._canvas.addEventListener("keydown",function(t){return n._onKeyDown(t)});this._canvas.addEventListener("mousedown",function(t){return n._onRowMouseDown(t)});this._canvas.addEventListener("dblclick",function(t){return n.onEditCell(t)});this._canvas.addEventListener("scroll",function(t){return n._onCanvasScroll(t)});this._canvas.addEventListener("selectstart",function(){return!1});this._header&&(this._header.addEventListener("mousedown",function(t){return n._onHeaderMouseDown(t)}),this._header.addEventListener("mouseup",function(t){return n._onHeaderMouseUp(t)}),this._header.addEventListener("click",function(t){return n._onHeaderClick(t)}),this._header.addEventListener("dblclick",function(t){return n._onHeaderDblClick(t)}));this._gutter&&(this._gutter.addEventListener("click",function(t){return n._onGutterClick(t)}),this._gutter.addEventListener("mouseover",function(t){var i=n.findClosestElement(t.target,".grid-gutter-row");i&&i.classList.add("grid-gutter-row-hover")}),this._gutter.addEventListener("mouseout",function(t){var i=n.findClosestElement(t.target,".grid-gutter-row");i&&i.classList.remove("grid-gutter-row-hover")}))},c.prototype._mergeExpandStates=function(n,t,i){var e=i.length-1,f,r,u;for(t.splice(n+1,1),r=0;r<=e;r++)t.splice(n+r+1,0,i[r]);for(f=0,r=n;r>=0;r--)u=t[r],Math.abs(u)>f?(t[r]=u<0?u-e:u+e,f=0):f++},c.prototype._takeMeasurements=function(){var f=this._options.coreCssClass,n,r,t,i,u;this._options.cssClass&&(f+=" "+this._options.cssClass);n=this.createElementWithClass("div",f);n.style.position="absolute";n.style.left="-5000px";n.style.top="-5000px";n.style.width="1000px";n.style.height="500px";document.body.appendChild(n);r=this.createElementWithClass("div","grid-row grid-row-normal");n.appendChild(r);t=this.createElementWithClass("div","grid-cell");t.style.width="100px";t.innerText="1";r.appendChild(t);this._measurements.rowHeight=r.offsetHeight;this._measurements.cellOffset=t.offsetWidth-100;i=this.createElementWithClass("div");i.style.overflow="hidden";i.style.width="1em";i.style.height="1ex";t.appendChild(i);this._measurements.unitEx=i.offsetHeight;u=this.createElementWithClass("div","grid-gutter");u.appendChild(this.createElementWithClass("div","grid-gutter-row grid-gutter-row-selected"));n.appendChild(u);this._measurements.gutterWidth=this._gutter?u.clientWidth:0;document.body.removeChild(n)},c.prototype.initializeDataSource=function(){if(this._resetScroll){this._ignoreScroll=!0;try{var n=this._canvas;n.scrollTop=0;n.scrollLeft=0;this._scrollLeft=0;this._scrollTop=0;this._resetScroll=!1}finally{this._ignoreScroll=!1}}this.setDataSource(this._options.source,this._options.expandStates,this._options.columns,this._options.sortOrders);this._expandedCount>0?this._options.keepSelection&&this._selectedIndex>=0?this._selectRow(Math.min(this._selectedIndex,this._expandedCount-1)):this._selectRow(this._options.initialSelection!==!1?0:-1):this.setSelectedRowIndex(-1)},c.prototype.setDataSource=function(n,t,i,r,u,f,e){var h=this,s,l,v,o,a;if(this._rowInfoMap={},this._dataSource=n||[],this._count=v=this._dataSource.length,t?(this._expandStates=t,this._indentLevels=c.expand(t)):(this._indentLevels=null,this._expandStates=null),this.expandedCount=v,this._updateRanges(),this._columns=[],i){var y=function(n,t,i,r,u,f,e){return h._drawCell(n,t,i,r,u,f,e)},p=function(n,t){return h._drawHeaderCellValue(n,t)},w=function(n,t,i){return h.getColumnValue(n,t,i)};for(s=0,l=i.length;s<l;s++)o=i[s],o.index=typeof o.index!="undefined"?o.index:String(s),o.canSortBy=o.canSortBy!==!1,o.canMove=o.canMove!==!1,o.width=typeof o.width!="undefined"?o.width:100,o.getCellContents=o.getCellContents||y,o.getHeaderCellContents=o.getHeaderCellContents||p,o.getColumnValue=o.getColumnValue||w,this._columns.push(o)}if(this._sortOrder=[],r)for(s=0,l=r.length;s<l;s++)a=r[s],a.order!=="desc"&&(a.order="asc"),this._sortOrder.push(a);this._clearSelection();this._determineIndentIndex();this._options.asyncInit?window.setImmediate(function(){h._layoutAfterSetDataSource(u,f,e)}):this._layoutAfterSetDataSource(u,f,e)},c.prototype.getDataSource=function(){return this._dataSource},c.prototype._layoutAfterSetDataSource=function(n,t,i){this.layout(undefined,t);this._ensureSelectedIndex(n);i&&this.scrollToBottom(function(){});this._selectRow(n,null,null,t===!0)},c.prototype._adjustForDynamicData=function(n,t,i){var r,u;if(this._options.isGridEnabled){for(this._dataSource.splice(i+1,1),r=0;r<n.length;r++)this._dataSource.splice(i+r+1,0,n[r]);this._mergeExpandStates(i,this._expandStates,t);u=this._dataSource.length;this._count=u;this._indentLevels=this._expandStates?c.expand(this._expandStates):null;this.expandedCount=u;this._updateRanges();this._clearSelection();this._determineIndentIndex();this._layoutAfterSetDataSource(this._getRowIndex(i))}},c.prototype._ensureSelectedIndex=function(n){var t=this._selectedIndex;typeof n=="number"&&(this._selectedIndex=n);this._selectedIndex>=0&&(this._count<=this._selectedIndex&&(this._selectedIndex=this._count-1),this._selectedIndex!==t&&this._addSelection(this._selectedIndex))},c.prototype.getRowInfo=function(n){return this._rows[n]},c.prototype.getRowData=function(n){return this._dataSource[n]},c.prototype.getColumns=function(){return this._columns||[]},c.prototype.getSortOrder=function(){return this._sortOrder||[]},c.prototype.insertAdditionalDynamicData=function(n,t){typeof n!="undefined"&&this._adjustForDynamicData(n.itemsWithPlaceholders,n.expandStates,t-1)},c.prototype._determineIndentIndex=function(){for(var t=this._columns,n=0,i=t.length;n<i;n++)if(t[n].indent){this._indentIndex=n;return}this._indentIndex=0},c.prototype._getDataIndex=function(n){var t,u,r=-1,f=this._visibleRange,i;if(n<0)return-1;for(t=0,u=f.length;t<u;t++)if(i=f[t],r+=i.end-i.start+1,n<=r)return i.end-r+n;return n},c.prototype._getRowIndex=function(n){for(var r=0,f=this._visibleRange,t,i=0,u=f.length;i<u;i++){if(t=f[i],n>=t.start){if(n<=t.end)return r+n-t.start}else break;r+=t.end-t.start+1}return-Math.max(0,r-1)},c.prototype._updateRanges=function(){var n=0,i=0,u=this._count,t=[],f=0,e;if(this._expandStates){while(n<u)e=this._expandStates[n],e<0?(t[t.length]=new r(i,n),f+=n-i+1,n+=1-e,i=n):n++;i<u&&(t[t.length]=new r(i,u-1),f+=u-i)}else f=u,t[t.length]=new r(0,f);this.expandedCount=f;this._visibleRange=t},c.prototype.expandNode=function(n){var r=this,t,i;if(this._options.isGridEnabled){if(this._options.onRowToggleCallback)this._options.onRowToggleCallback(this._dataSource,n,!0);this._dataSource[n+1].isPlaceholder&&this._getChildDataCallback(this._dataSource[n],function(t){typeof t!="undefined"&&r._adjustForDynamicData(t.itemsWithPlaceholders,t.expandStates,n)});this._expandStates&&(t=this._expandStates[n],t<0&&(this._expandStates[n]=-t,this._updateRanges(),i=this._rows[n],i&&(i.isDirty=!0)))}},c.prototype.collapseNode=function(n){var t,i;if(this._options.isGridEnabled){if(this._expandStates&&(t=this._expandStates[n],t>0)){if(this._options.onRowToggleCallback)this._options.onRowToggleCallback(this._dataSource,n,!1);this._expandStates[n]=-t;this._updateRanges();i=this._rows[n];i&&(i.isDirty=!0)}this.layout()}},c.prototype.expandAllNodes=function(){var n=0,f=this._count,t=this._expandStates,i=!1,e=this._rows,r,u;if(t){while(n<f)r=t[n],r<0&&(t[n]=-r,i=!0,u=e[n],u&&(u.isDirty=!0)),n++;i&&this._updateRanges()}return i},c.prototype.collapseAllNodes=function(){var n=0,f=this._count,t=this._expandStates,i=!1,e=this._rows,r,u;if(t){while(n<f)r=t[n],r>0&&(t[n]=-r,i=!0,u=e[n],u&&(u.isDirty=!0)),n++;i&&this._updateRanges()}return i},c.prototype.expandAll=function(){var n=this;this._updateExpansionStateAndRedraw(function(){return n.expandAllNodes})},c.prototype.collapseAll=function(){var n=this;this._updateExpansionStateAndRedraw(function(){return n.collapseAllNodes})},c.prototype._updateExpansionStateAndRedraw=function(n){var i,t=this._selectedIndex;t>=0&&(i=this._getDataIndex(t));n();t>=0&&(this._clearSelection(),this._addSelection(Math.abs(this._getRowIndex(i))));this._layoutContentSpacer();this._redraw();this._notifyForPrerender()},c.prototype.tryToggle=function(n,t,i){var u,r,f;if(!this._expandStates||this._selectedIndex<0||this._expandedCount<=0||(r=typeof i!="undefined"?i:this._getDataIndex(this._selectedIndex),f=this._rows[r],!f))return!1;if(u=this._expandStates[r],u!==0){if(n)if(u<0)this.expandNode(r);else return!1;else if(u>0)this.collapseNode(r);else return!1;return this._clearSelection(),this._addSelection(this._getRowIndex(r),null,null,!0),this._layoutContentSpacer(),this._redraw(),this._notifyForPrerender(),!0}return!1},c.prototype.layoutOnResize=function(){this._onContainerResize(undefined)},c.prototype._getVisibleRowIndices=function(){var n=this._scrollTop,r=n+this._canvasHeight,t=this._expandedCount-1,i=this._measurements.rowHeight;return{first:Math.min(t,Math.max(0,Math.ceil(n/i))),last:Math.min(t,Math.floor(r/i)-1)}},c.prototype._getRowIntoView=function(n,t){if(t)return this._canvas.scrollTop=Math.max(0,Math.min(n||0,this._expandedCount-1))*this._measurements.rowHeight,!0;var u=this._getVisibleRowIndices(),i=u.first,f=u.last,r=f-i;return n<i||n>f?(i=this._selectedIndex>i?Math.max(n-r,0):Math.max(0,Math.min(n+r,this._expandedCount-1)-r),this._canvas.scrollTop=i*this._measurements.rowHeight,!0):!1},c.prototype.getSelectedRowIntoView=function(n){return this._getRowIntoView(this._selectedIndex,n)},c.prototype.cacheRows=function(){},c.prototype._updateViewport=function(n,t){for(var h,l=this._count,o=[],s=[],e=[],a=this._expandStates||[],v=this._expandedCount-1,f=this.getViewPortRanges(),c=Math.max(0,f.start-this._options.payloadSize),y=Math.min(v,f.end+this._options.payloadSize),i=this._getDataIndex(c),p=f.start,r=c;r<=y&&i<l;r++)r<f.start?o[o.length]=new u(r,i):r>f.end?s[s.length]=new u(r,i):(e[e.length]=new u(r,i),p=r,this._lastRenderedDataIndex=i),h=a[i],h<0?i+=1-h:i++;this.measureColumnSize(t);this.cacheRows(o,e,s);this._drawRows(e,n)},c.prototype._cleanUpRows=function(){var t=this._rows,r=this._gutter,i,n;for(i in t)n=t[i],n.row.parentElement&&(n.row.parentElement.removeChild(n.row),delete this._rowInfoMap[n.row.id]),r&&n.gutterRow.parentElement&&n.gutterRow.parentElement.removeChild(n.gutterRow);this._rows={}},c.prototype._drawRows=function(n,t){var w=this._expandStates,b=0,tt=this._indentLevels,v=0,c=this._gutter,it=this._canvas,k,f,y,l,o,p,d,a,u,s,h,nt;for(this._editBoxControl&&(this._editBoxControl.dismiss(),this._editBoxControl=null),y=document.createDocumentFragment(),l=null,c&&(k=this._gutter,l=document.createDocumentFragment()),o=this._rows,p={},this._rows=p,d=n.length,a=0;a<d;a++){var g=n[a],e=g.rowIndex,r=g.dataIndex,i=o[r];i?(f=i.rowIndex!==e,f?(i.rowIndex=e,i.row.id="row_"+this._getId()+"_"+e,this._rowInfoMap[i.row.id]=i):(f=i.isDirty,delete i.isDirty),t&&(f=!0),delete o[r]):(f=!0,u=this.createElementWithClass("div","grid-row grid-row-normal"),u.id="row_"+this._getId()+"_"+e,u.setAttribute("role","row"),y.appendChild(u),s={rowIndex:e,dataIndex:r,row:u},c&&(h=this.createElementWithClass("div","grid-gutter-row grid-gutter-row-normal"),l.appendChild(h),h.id="gtr_"+u.id,this._rowInfoMap[h.id]=s,s.gutterRow=h),this._rowInfoMap[u.id]=s,i=s);p[r]=i;f&&(w&&(b=w[r],v=tt[r],i.row.setAttribute("aria-level",""+v)),this._updateRow(i,e,r,b,v))}for(nt in o)i=o[nt],c&&(delete this._rowInfoMap[i.gutterRow.id],i.gutterRow.parentElement.removeChild(i.gutterRow)),delete this._rowInfoMap[i.row.id],i.row.parentElement.removeChild(i.row);it.appendChild(y);c&&k.appendChild(l)},c.prototype.updateRow=function(n,t){var r=0,u=0,i;typeof t=="undefined"||t<0?t=this._getDataIndex(n):(typeof n=="undefined"||n<0)&&(n=this._getRowIndex(t));i=this._rows[t];i&&(this._expandStates&&(r=this._expandStates[t],u=this._indentLevels[t]),this._updateRow(i,n,t,r,u))},c.prototype._updateRow=function(n,t,i,r,u){var k=this._indentIndex,v,y,h,w,f,p,l,b,a,s;if(this._gutter){var e=this._options.gutter,d=n.gutterRow,o=d.firstElementChild;o.style.top=t*this._measurements.rowHeight+"px";o.style.left="0px";o.style.width=this._measurements.gutterWidth+"px";o.style.height=this._measurements.rowHeight+"px";e.checkbox&&(v=this.createElementWithClass("input","checkbox "+(e.checkbox.cssClass||"")),v.setAttribute("type","checkbox"),y=this.createElementWithClass("div","grid-gutter-cell grid-gutter-checkbox"),y.appendChild(v[0]),o.appendChild(y));e.icon&&(h="grid-gutter-cell grid-gutter-icon ",typeof e.icon.cssClass!="undefined"&&(h+=e.icon.cssClass+" "),typeof e.icon.index!="undefined"&&(h+=(this.getColumnValue(i,e.icon.index,-1)||"")+" "),e.icon.ownerDraw!==!1&&(h+=this._getGutterIconClass(t,i,r,u)||""),w=this.createElementWithClass("div",h),o.appendChild(w));this._drawGutterCell(n,t,i,r,u)}for(f=n.row,f.innerHTML="",f.style.top=t*this._measurements.rowHeight+"px",f.style.left=this._measurements.gutterWidth+"px",f.style.height=this._measurements.rowHeight+"px",f.style.width=isNaN(this._contentSize.width)?"":this._contentSize.width+2+"px",p=this._columns,l=0,b=p.length;l<b;l++)(a=p[l],a.hidden)||(s=a.getCellContents(n,i,r,u,a,k,l),s&&(s.setAttribute("role","gridcell"),s.setAttribute("aria-readonly",!s.classList.contains("grid-cell-editable")+""),f.appendChild(s)));c.makeElementUnselectable(f);this._gutter&&c.makeElementUnselectable(o);this._updateRowSelectionStyle(n,this._selectedRows,this._selectedIndex);f.removeEventListener("DOMAttrModified",this._onAriaExpandedModifiedHandler);r!==0&&(f.setAttribute("aria-expanded",r>0?"true":"false"),f.addEventListener("DOMAttrModified",this._onAriaExpandedModifiedHandler))},c.prototype._getGutterIconClass=function(){return""},c.prototype._drawGutterCell=function(){},c._setTooltip=function(n,t,i){var r={content:t,height:i};n.setAttribute("data-plugin-vs-tooltip",JSON.stringify(r))},c.prototype._drawCell=function(n,t,i,r,u,f,e){var p=u.width||20,w,o=this.createElementWithClass("div","grid-cell"),tt,s,b,h,k,l,d,v,g,nt,y,a;if(o.style.width=isNaN(p)?String(p):p+"px",u.cellDecorator?(tt=this._dataSource[t],u.cellDecorator(o,tt)):(typeof u.hrefIndex!="undefined"&&(w=this.getColumnValue(t,u.hrefIndex,-1)),s=this.getColumnText(t,u,e),b=!1,s.length>c.MAX_CELL_CONTENT_SIZE&&(b=!0,o.setAttribute("grid-edit-value",s),s=s.substr(0,c.MAX_CELL_CONTENT_SIZE)),typeof u.getCellTooltip=="function"?c._setTooltip(o,u.getCellTooltip(t,u.index,e,this._dataSource),c.DEFAULT_TOOLTIP_HEIGHT):u.hasHTMLContent||u.hasMixedContent&&u.getCellCSSClass&&u.getCellCSSClass(t,u.index,e,this._dataSource).indexOf("grid-mixed-cell-html")!==-1||c._setTooltip(o,b?s+"...":s,c.DEFAULT_TOOLTIP_HEIGHT),w?(h=document.createElement("a"),h.setAttribute("href",w),h.setAttribute("tabindex","-1"),h.innerText=s,o.appendChild(h)):s?u.hasHTMLContent||u.hasMixedContent&&u.getCellCSSClass&&u.getCellCSSClass(t,u.index,e,this._dataSource).indexOf("grid-mixed-cell-html")!==-1?o.innerHTML=s:o.innerText=s:o.innerHTML="&nbsp;"),e===f&&r>0&&(k=r*c.INDENT_WIDTH-13,u.indentOffset=k,i!==0&&(l=this.createElementWithClass("div","icon grid-tree-icon"),l.style.left=k+"px",o.appendChild(l),i>0?l.classList.add("icon-tree-expanded"):l.classList.add("icon-tree-collapsed")),o.style.textIndent=r*c.INDENT_WIDTH+"px"),u.hasGlyph&&(d=2,v=u.getGlyphClass(t,u.index,e,this._dataSource),v&&v!==""&&(g=this.createElementWithClass("div",v+" grid-cell-glyph"),g.style.left=r*c.INDENT_WIDTH+d+"px",o.appendChild(g),o.style.textIndent=r*c.INDENT_WIDTH+c.GLYPH_WIDTH+d+"px")),u.getCellCSSClass&&(nt=u.getCellCSSClass(t,u.index,e,this._dataSource),nt))for(y=nt.trim().split(" "),a=0;a<y.length;a++)y[a]&&o.classList.add(y[a]);return u.rowCss&&o.classList.add(u.rowCss),o},c.prototype._drawSplitters=function(){var o=this,i,r,u,f,s,n,e,t;if(this._options.drawRowSplitters&&this._dataSource.length>0){for(i=this._canvas.querySelectorAll(".grid-row-splitter"),n=0;n<i.length;n++)r=i[n],r.parentElement.removeChild(r);if(u=this.getRowInfo(this._lastRenderedDataIndex),f=0,u)for(s=this._canvas.scrollHeight-1+"px",n=0;n<this._columns.length-1;n++)(e=this._columns[n],e.hidden)||(t=this.createElementWithClass("div","grid-row-splitter"),f+=parseInt(u.row.children[n].style.width),t.style.left=f+"px",t.style.height=s,t.setAttribute("grid-splitter-index",""+n),e.fixed||this._columns[n+1].fixed?t.classList.add("fixed"):(t.addEventListener("mousedown",function(n){o._onSplitterMouseDown(n)}),t.addEventListener("dblclick",function(n){o._onSplitterDblClick(n)})),this._canvas.appendChild(t))}},c.prototype._drawHeader=function(){var e=this._columns,h=this._sortOrder,f,i,o,n,t,r,u,s;if(this._header){for(f=document.createDocumentFragment(),i=0,o=e.length;i<o;i++)(n=e[i],n.hidden)||(t=this.createElementWithClass("div","grid-header-column"),c._setTooltip(t,n.tooltip,c.DEFAULT_TOOLTIP_HEIGHT),t.style.width=(n.width||20)+"px",t._data={columnIndex:i,header:!0},r=this.createElementWithClass("div","separator"),n.fixed&&(r.style.cursor="auto"),r._data={columnIndex:i,separator:!0},t.appendChild(r),u=n.getHeaderCellContents(n,i),n.headerCss&&u.classList.add(n.headerCss),n.tooltip&&c._setTooltip(u,n.tooltip,c.DEFAULT_TOOLTIP_HEIGHT),t.appendChild(u),s=this.createElementWithClass("div","sort-handle"),h.forEach(function(i){if(i.index===n.index)return i.order==="asc"?t.classList.add("ascending"):i.order==="desc"&&t.classList.add("descending"),!1}),t.appendChild(s),f.appendChild(t));this._headerCanvas.innerHTML="";this._headerCanvas.appendChild(f);c.makeElementUnselectable(this._header)}},c.prototype._drawHeaderCellValue=function(n,t){var i=document.createElement("div");return i.classList.add("title"),i.innerText=n.text||"",t!==this._indentIndex||typeof this._indentLevels=="undefined"||this._indentLevels===null||i.classList.add("indented-title"),i},c.prototype._layoutContentSpacer=function(){for(var t,r,u,n=0,f=this._columns,i=0,e=f.length;i<e;i++)f[i].hidden||(n+=(f[i].width||20)+this._measurements.cellOffset);n=n+2;t=Math.max(1,this._expandedCount*this._measurements.rowHeight);this._contentSpacer.style.width=n+"px";this._contentSpacer.style.height=t+"px";this._gutter&&(this._gutter.style.height=t+"px");this._ignoreScroll=!0;try{r=Math.max(0,Math.min(this._scrollTop,t-this._canvasHeight));r!==this._scrollTop&&(this._scrollTop=r,this._canvas.scrollTop=r);u=Math.max(0,Math.min(this._scrollLeft,n-this._canvasWidth));u!==this._scrollLeft&&(this._scrollLeft=u,this._canvas.scrollLeft=u)}finally{this._ignoreScroll=!1}this._contentSize.width=n;this._contentSize.height=t},c.prototype._layoutHeader=function(){this._header&&(this._headerCanvas.style.left=this._measurements.gutterWidth-this._scrollLeft+"px");this._gutter&&(this._gutter.style.left=this._scrollLeft+"px")},c.prototype.layout=function(n,t){t===void 0&&(t=!0);this._measureCanvasSize();var i=-1;document.activeElement&&this._canvas.contains(document.activeElement)&&(i=this._selectedIndex);this._cleanUpRows();this._fixScrollPos();this._layoutContentSpacer();this._updateViewport(!1,n);!document.activeElement&&i>=0&&this._addSelection(i,null,null,t);this._layoutHeader();this._drawHeader();this._drawSplitters()},c.prototype._fixScrollPos=function(){var n=this._ignoreScroll;this._ignoreScroll=!0;try{this._canvas.scrollLeft=this._scrollLeft;this._canvas.scrollTop=this._scrollTop}finally{this._ignoreScroll=n}},c.prototype.redraw=function(){this._fixScrollPos();this._redraw(!0)},c.prototype._redraw=function(n){this._layoutHeader();this._updateViewport(n)},c.prototype.getColumnValue=function(n,t){return this._dataSource[n][t]},c.prototype.getColumnText=function(n,t,i){var r,u=t.getColumnValue(n,t.index,i,this._dataSource);return r=typeof u!="string"?c.convertValueToDisplayString(u,t.format):u,t.maxLength=Math.max(t.maxLength||0,r.length),r},c.prototype._getExpandState=function(n){var t=0;return this._expandStates&&typeof this._expandStates[n]=="number"&&(t=this._expandStates[n]),t},c.prototype.getViewPortRanges=function(){var e=this._expandedCount-1,i=this._getVisibleRowIndices(),n=i.first,t=i.last,u,f;return n=Math.max(0,n-this._options.extendViewportBy),t=Math.min(e,t+this._options.extendViewportBy),u=this._getDataIndex(n),f=this._getDataIndex(t),new r(Math.min(u,n),Math.max(f,t))},c.prototype.scrollToBottom=function(n){this._scrollRenderComplete=n;this._canvas.scrollTop+this._canvas.clientHeight>=this._canvas.scrollHeight?this._scrollRenderComplete&&(this._scrollRenderComplete(),this._scrollRenderComplete=null):this._canvas.scrollTop=this._canvas.scrollHeight},c.prototype.setViewState=function(n){this._options.isGridEnabled=n;n?this.rootElement.classList.remove("busy"):this.rootElement.classList.add("busy")},c.prototype._selectRow=function(n,t,i,r){var u=i&&i.ctrl,f=i&&i.shift,e=i&&i.rightClick;u?this._addSelection(n,t,{toggle:!0}):f?(this._clearSelection(),this._addSelectionRange(n,t)):e?this._selectedRows&&this._selectedRows.hasOwnProperty(n)?(this._selectedIndex=n,this._updateAriaAttribute()):(this._clearSelection(),this._addSelection(n,t)):(this._clearSelection(),this._addSelection(n,t,null,r))},c.prototype._selectAll=function(){if(this._count>0&&this._options.allowMultiSelect!==!1){this._clearSelection();this._selectionStart=0;var n=Math.max(0,this._selectedIndex);this._addSelectionRange(this._count-1,undefined,{doNotFireEvent:!0});this._selectedIndex=n;this._updateSelectionStyles();this._selectionChanged()}},c.prototype.getSelectedRowIndex=function(){return this._selectedIndex},c.prototype.setSelectedRowIndex=function(n){this._clearSelection();this._addSelection(n)},c.prototype.getSelectedDataIndex=function(){return this._getDataIndex(this._selectedIndex)},c.prototype.getSelectedDataIndices=function(){var i,n=this._selectedRows,t=[];if(n)for(i in n)t[t.length]=n[i];return t},c.prototype.ensureDataIndexExpanded=function(n){for(var t=this._getRowIndex(n);t<0||n>0&&t===0;)this.expandNode(this._getDataIndex(-t)),t=this._getRowIndex(n);return t},c.prototype.setSelectedDataIndex=function(n,t){var i=t?this.ensureDataIndexExpanded(n):this._getRowIndex(n);this.setSelectedRowIndex(i)},c.prototype.focus=function(n){var t=this,i=function(){var r,n,i;if(document.activeElement!==t._canvas)try{t._selectedIndex>-1&&(r=t._getDataIndex(t._selectedIndex),n=t._rows[r],n&&(i=n.row,i&&i.focus()))}catch(u){}};n?window.setTimeout(function(){i()},n):i()},c.prototype._clearSelection=function(){this._selectionCount=0;this._selectedRows=null},c.prototype._addSelection=function(n,t,i,r){var f=i&&i.keepSelectionStart,e=i&&i.doNotFireEvent,o=i&&i.toggle,u;this._options.allowMultiSelect===!1&&(f=!1,this._clearSelection());this._selectedRows||(this._selectedRows={});n>=0?(u=!0,this._selectedRows.hasOwnProperty(n)?o&&(u=!1,this._selectionCount=Math.max(0,this._selectionCount-1),delete this._selectedRows[n]):this._selectionCount++,typeof t!="number"&&(t=this._getDataIndex(n)),u&&(this._selectedRows[n]=t),this._selectedIndex=n,this._updateAriaAttribute(),(this._selectionStart<0||!f)&&(this._selectionStart=n)):(t=-1,this._selectedIndex=-1);e||(this._updateSelectionStyles(),this._selectionChanged(),r&&this.focus(),this._selectedIndexChanged(this._selectedIndex,t))},c.prototype._addSelectionRange=function(n,t,i){var h=i&&i.doNotFireEvent,o=-1,f,u,s,r,e;if(this._options.allowMultiSelect===!1)this._addSelection(n,t);else{for(this._selectedRows&&(o=this._selectedRows[this._selectedIndex]),this._selectionStart<0&&(this._selectionStart=n),u=Math.min(this._selectionStart,n),s=Math.max(this._selectionStart,n),(typeof t!="number"||u!==n)&&(t=this._getDataIndex(u)),r=u;r<=s;r++)this._addSelection(r,t,{keepSelectionStart:!0,doNotFireEvent:!0}),r===n&&(f=t),e=this._getExpandState(t),e<0?t+=1-e:t++;this._selectedIndex=n;this._updateAriaAttribute();h||(this._updateSelectionStyles(),this._selectionChanged(),o!==f&&this._selectedIndexChanged(this._selectedIndex,f))}},c.prototype._updateAriaAttribute=function(){var i,n,t;this._active&&(i=this._getDataIndex(this._selectedIndex),i>=0&&(n=this.getRowInfo(i),n&&n.row&&(t=n.row.getAttribute("id"),t!==this._activeAriaId&&(this._canvas.setAttribute("aria-activedescendant",t),this._activeAriaId=t))))},c.prototype._updateSelectionStyles=function(){var n=this;this._delayedUpdateCookie&&window.clearTimeout(this._delayedUpdateCookie);this._delayedUpdateCookie=window.setTimeout(function(){var t,u=n._selectedRows,f=n._selectedIndex,i=n._rows,r;for(t in i)r=i[t],n._updateRowSelectionStyle(r,u,f)},10)},c.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}])},c.prototype.selectionChanged=function(){},c.prototype._selectedIndexChanged=function(n,t){this.selectedIndexChanged(n,t);this.fireCustomEvent(this._element,c.EVENT_SELECTED_INDEX_CHANGED,[n,t])},c.prototype.selectedIndexChanged=function(){},c.prototype._updateRowSelectionStyle=function(n,t,i){var f=n.rowIndex,u=n.row,r=n.gutterRow;u.classList.remove("grid-row-selected");u.classList.remove("grid-row-selected-blur");u.classList.remove("grid-row-current");u.setAttribute("tabindex","-1");r&&(r.classList.remove("grid-gutter-row-selected"),r.classList.remove("grid-gutter-row-selected-blur"),r.classList.remove("grid-gutter-row-current"),r.querySelector("input.checkbox").setAttribute("checked",String(!1)));t&&t.hasOwnProperty(f)&&(r&&r.querySelector("input.checkbox").setAttribute("checked",String(!0)),this._active?(u.classList.add("grid-row-selected"),u.setAttribute("tabindex","1"),r&&r.classList.add("grid-gutter-row-selected")):(u.classList.add("grid-row-selected-blur"),u.setAttribute("tabindex","1"),r&&r.classList.add("grid-gutter-row-selected-blur")));f===i&&(u.classList.add("grid-row-current"),r&&r.classList.add("grid-gutter-row-current"))},c.prototype._notifyForPrerender=function(){if(this._options.prerenderCallback){var n=this.getViewPortRanges();this._options.prerenderCallback(n.start,n.end)}},c.prototype.measureColumnSize=function(n){for(var t,r=this._canvas.clientWidth-(this.isVerticalScrollbarVisible?0:17),i=0;i<this._columns.length;i++)t=this._columns[i],t.fixed&&(r-=t.width);if(r>0){if(n)for(i=0;i<this._columns.length;i++)t=this._columns[i],!t.fixed&&t.percentWidth&&(t.percentWidth=t.width/r);for(i=0;i<this._columns.length;i++)t=this._columns[i],!t.fixed&&t.percentWidth&&(t.width=r*t.percentWidth)}},c.prototype._onContainerMouseDown=function(n){var t=n.target;t.classList.contains("grid-edit-box")||this.focus(10)},c.prototype._measureCanvasSize=function(){this._canvasHeight=this._canvas.clientHeight;this._canvasWidth=this._canvas.clientWidth},c.prototype._onContainerResize=function(){var n=this;this._resizeLayoutTimeout||(this._resizeLayoutTimeout=window.setTimeout(function(){n.measureColumnSize(!1);n.layout();n._notifyForPrerender();n._resizeLayoutTimeout=null},200))},c.prototype._setupMoveEvents=function(){var n=this;document.addEventListener("mousemove",function(t){return n._onDocumentMouseMove(t)});document.addEventListener("mouseup",function(t){return n._onDocumentMouseUp(t)})},c.prototype._clearMoveEvents=function(){document.removeEventListener("mousemove",null,!0);document.removeEventListener("mouseup",null,!0)},c.prototype._onDocumentMouseMove=function(n){var t=this._columnSizing;if(t&&t.active===!0){var i=n.pageX-t.origin,r=Math.max(15,t.originalWidth+i),u=this._columns[t.index];u.width=r;this._applyColumnSizing(t.index);this._moveSizingElement(t.index)}},c.prototype._onDocumentMouseUp=function(){var n=this;return window.setImmediate(function(){n._tryFinishColumnSizing(!1)}),!1},c.prototype._onHeaderMouseDown=function(n){var t,i,r;return n.which!==1?!0:(t=this.findClosestElement(n.target,".separator"),t&&t._data&&(i=t._data.columnIndex,r=this._columns[i],!r.fixed)?(this._columnSizing=new h(!0,i,r.width,n.pageX),this._moveSizingElement(i),this._setupMoveEvents(),n.stopImmediatePropagation(),n.preventDefault(),!1):void 0)},c.prototype._onHeaderMouseUp=function(){return!1},c.prototype._onHeaderClick=function(n){var i=this.findClosestElement(n.target,".grid-header-column"),r,u,t;if(i&&!this._columnSizing){if(r=this.findClosestElement(n.target,".separator"),r&&r._data)return!1;i._data&&(u=i._data.columnIndex,t=this._columns[u],t.canSortBy&&!t.fixed&&this._sortBy(t,n.shiftKey,this._options.alwaysForceSort))}},c.prototype._onHeaderDblClick=function(n){var i=this.findClosestElement(n.target,".separator");if(i&&i._data){this._tryFinishColumnSizing(!0);var r=i._data.columnIndex,t=this._columns[r],u=Math.max(t.maxLength||0,3),f=1.1+.7*Math.exp(-u/20),e=t.width;return t.width=(t.indentOffset||0)+Math.round(u*f*this._measurements.unitEx),this._applyColumnSizing(r,e,!0),!1}},c.prototype.getCellContentWidth=function(n){var t,i;return document.createRange&&(t=document.createRange(),n.firstChild&&n.firstChild.nodeType===Node.TEXT_NODE)?(t.selectNodeContents(n.firstChild),i=t.getBoundingClientRect(),parseInt(n.style.textIndent,10)+i.width):n.clientWidth},c.prototype._onSplitterDblClick=function(n){var y=this,t=0,l=n.target,u,a,o,s,r,h;if(l){u=parseInt(l.getAttribute("grid-splitter-index"),10);t=0;for(a in this._rows)o=this._rows[a],o&&(s=this.getCellContentWidth(o.row.children[u]),t=t>s?t:s);r=this._columns[u];h=this._columns[u+1];r.hasGlyph&&(t+=c.GLYPH_WIDTH);var f=r.width-(t+3),v=r.width-f,e=h.width+f;v>=i.MIN_RESIZE_WIDTH&&e>=i.MIN_RESIZE_WIDTH?(r.width-=f,h.width+=f,window.setImmediate(function(){y.layout(!0)})):e<i.MIN_RESIZE_WIDTH&&(v-=i.MIN_RESIZE_WIDTH-e,e=i.MIN_RESIZE_WIDTH)}},c.prototype._onSplitterMouseDown=function(n){var h=this,u,f,t,r,o=function(n){var e=document.querySelector(".grid-row-splitter.active");if(e){var f=n.clientX-u,o=t.width+f,s=r.width-f;o>=i.MIN_RESIZE_WIDTH&&s>=i.MIN_RESIZE_WIDTH&&(e.style.left=e.offsetLeft+f+"px",u=n.clientX,t.width+=f,r.width-=f)}},s=function(){var n=document.querySelector(".grid-row-splitter.active");n&&(n.classList.remove("active"),window.setImmediate(function(){h.layout(!0)}));document.removeEventListener("mousemove",o);document.removeEventListener("mouseup",s)},e;n.button===0&&(e=n.target,f=parseInt(e.getAttribute("grid-splitter-index"),10),t=this._columns[f],r=this._columns[f+1],t.fixed||r.fixed||(e.classList.add("active"),u=n.clientX,document.addEventListener("mousemove",o),document.addEventListener("mouseup",s)))},c.prototype._moveSizingElement=function(n){var r=this._measurements.gutterWidth,t,i;if(!this._sizingElement){if(n<0)return;this._sizingElement=this.createElementWithClass("div","grid-column-sizing");this._canvas.appendChild(this._sizingElement)}if(this._sizingElement.style.height=this._canvas.clientHeight-1+"px",this._sizingElement.style.top=this._scrollTop+"px",n<0)this._sizingElement.style.left="-5000px",this._sizingElement.style.top="-5000px",this._sizingElement.style.height="0px";else{for(t=0;t<=n;)i=this._columns[t++],i.hidden||(r+=i.width);this._sizingElement.style.left=r-1+"px"}},c.prototype._getVisibleColumnIndex=function(n){var t=0,i=0,r=this._columns.length;if(this._columns[n].hidden)return-1;while(t<n)this._columns[t].hidden||i++,t++;return i},c.prototype._applyColumnSizing=function(n,t,i){var e=this._getVisibleColumnIndex(n)+1,r=this._columns[n],u=!1,f;t=t||-1;r&&(u=r.width!==t,f=this.rootElement.querySelector(".grid-header-canvas .grid-header-column:nth-child("+e+")"),f.style.width=r.width+"px");i===!0&&(u&&this.layout(),this._onColumnResize(r))},c.prototype._onColumnResize=function(n){this.fireCustomEvent(this._element,"columnresize",[n])},c.prototype._tryFinishColumnSizing=function(n){var t=this._columnSizing;t&&(t.active===!0&&(n||this._applyColumnSizing(t.index,t.originalWidth,!0),this._moveSizingElement(-1)),this._columnSizing=null,this._clearMoveEvents())},c.prototype._getSortColumns=function(n){for(var r,u,f=this._columns,i=[],t=0,e=n.length;t<e;t++)u=n[t],f.forEach(function(n){if(n.index===u.index)return r=n,!1}),i.push(r);return i},c.prototype._sortBy=function(n,t,i){var r=this._sortOrder.slice(0),o=!1,f,s,u,h;if(n){for(f=0,s=r.length;f<s;f++)if(u=r[f],u.index===n.index){r.splice(f,1);o=!0;break}u=o?new e(u.index,u.order==="asc"?"desc":"asc"):new e(n.index,"asc");t&&this._options.allowSortOnMultiColumns?r.push(u):r=[u]}h=this._getSortColumns(r);this._onSort(r,h,i)},c.prototype._onSort=function(n,t,i){i===void 0&&(i=!1);this.onSort(n,t,i)!==!1&&this.fireCustomEvent(this._element,"sort",[{sortOrder:n,sortColumns:t}])},c.prototype.onSort=function(n,t,i){return i===void 0&&(i=!1),this._options.autoSort&&(this._trySorting(n,t,i),this._sortOrder=n,this.layout()),!0},c.prototype._trySorting=function(n,t,i){var p=this,s,h,l,a,e,v,r,u,y;i===void 0&&(i=!1);t||(t=this._getSortColumns(n));s=[];h=0;for(l in this._selectedRows)u=this._selectedRows[l],a=this._dataSource[u],a&&(s.push(a),h+=parseInt(l));for(e=new o(null,null),c.addItemsToTree(this._dataSource,this._expandStates,0,this._dataSource.length,e),this._sortOrder&&this._sortOrder.length===1&&n.length===1&&this._sortOrder[0]!==n[0]&&this._sortOrder[0].index===n[0].index&&!i?this._sortOrder[0].order!==n[0].order&&c.walkTree(e,function(i){f.TreeNodeSort.stableReverse(i.children,function(i,r){return f.TreeNodeSort.sortComparer(n,t,i.data,r.data)})}):c.walkTree(e,function(i){i.children.sort(function(i,r){return f.TreeNodeSort.sortComparer(n,t,i.data,r.data)})}),this._dataSource=[],this._expandStates=[],r=0;r<e.children.length;r++)c.walkTree(e.children[r],function(n){p._dataSource.push(n.data);p._expandStates.push(n.expandState)});if(this._indentLevels=c.expand(this._expandStates),this._updateRanges(),this._selectionCount>0){for(this._clearSelection(),v=0,r=0;r<s.length;r++)u=this._dataSource.indexOf(s[r]),u>=0&&(y=this._getRowIndex(u),this._addSelection(y,u),v+=y);this._scrollTop+=(v-h)/this._selectionCount*this._measurements.rowHeight}},c.prototype._onCanvasScroll=function(){var n=this._canvas;return this._resetScroll=!0,this._scrollLeft=n.scrollLeft,this._scrollTop=n.scrollTop,this._ignoreScroll||(this._notifyForPrerender(),this._redraw(),this._scrollRenderComplete&&(this._scrollRenderComplete(),this._scrollRenderComplete=null)),!1},c.prototype.getRowInfoFromEvent=function(n,t){var i=this.findClosestElement(n.target,t);return this._rowInfoMap[i.id]},c.prototype._getClickedCell=function(n){return this.findClosestElement(n.target,".grid-cell")},c.prototype._isCellEditing=function(n){return n.querySelectorAll(".grid-edit-box").length===1},c.prototype.createEditBox=function(n,i,r){if(this._options.isGridEnabled){typeof this._options.preEditCellCallback!="undefined"&&this._options.preEditCellCallback(n,i);var f,u=this.getColumns()[i];u.getEditBox&&(f=u.getEditBox(n,u));this._editBoxControl=new t.GridCellEditControl(n,i,r,this,this._options,f);r.innerHTML="";r.appendChild(this._editBoxControl.inputElement);try{this._editBoxControl.inputElement.select();this._editBoxControl.inputElement.focus()}catch(e){}}},c.prototype.onEditCell=function(n){var e=n.target,t,r,i;if(!e.classList.contains("grid-tree-icon")){if(t=this._getClickedCell(n),this._isCellEditing(t))return;if(t&&t.classList.contains("grid-cell-editable")&&(r=this.getRowInfoFromEvent(n,".grid-row"),r)){var u=r.row.children,o=u.length,f=-1;for(i=0;i<o;i++)t===u[i]&&(f=i);this.createEditBox(r.dataIndex,f,t)}}},c.prototype._onRowMouseDown=function(n){var t=this.getRowInfoFromEvent(n,".grid-row"),i;t&&(i=n.target,n.which===1&&i.classList.contains("grid-tree-icon")?this._onToggle(t):n.which===3&&this._options&&this._options.disableRightClickSelection||i.classList.contains("grid-edit-box")||(this._selectRow(t.rowIndex,t.dataIndex,{ctrl:n.ctrlKey,shift:n.shiftKey,rightClick:n.which===3}),this.focus(0)))},c.prototype._onGutterClick=function(n){var t=this.getRowInfoFromEvent(n,".grid-gutter-row");t&&(this._selectedRows&&typeof this._selectedRows[t.rowIndex]=="number"||this._selectRow(t.rowIndex,t.dataIndex))},c.prototype._onBlur=function(n){var t=n.target;if(t.classList.contains("grid-edit-box")){n.stopPropagation();return}this._active=!1;this._updateSelectionStyles()},c.prototype._onFocus=function(n){var t=n.target;if(t.classList.contains("grid-edit-box")){n.stopPropagation();return}this._active=!0;this._updateSelectionStyles();this._updateAriaAttribute()},c.prototype._onKeyDown=function(t){var r={lo:-1,hi:-1},c=n.KeyCodes,l=this._canvas,h,i,e,s,u,f,o;if(!this._options.isGridEnabled)return!1;if(this._copyInProgress)return t.keyCode===27&&this._cancelable&&this._cancelable.cancel(),!1;if(this._count>0&&(r={lo:0,hi:this._expandedCount-1}),this._selectedIndex<0&&this._addSelection(r.lo),this._options.keyboardEventHandler&&this._options.keyboardEventHandler.keys.indexOf(t.key)!==-1&&(h=this._options.keyboardEventHandler.handler(t,this._dataSource,this._getDataIndex(this._selectedIndex)),h))return t.preventDefault(),!1;switch(t.keyCode){case 40:this._clearSelection();this._addSelection(Math.min(this._selectedIndex+1,r.hi),null,null,!0);break;case 38:this._clearSelection();this._addSelection(Math.max(this._selectedIndex-1,r.lo),null,null,!0);break;case 34:this._clearSelection();i=this._getVisibleRowIndices();this._selectedIndex<i.last?this._addSelection(i.last,null,null,!0):(e=i.last-i.first+1,this._addSelection(Math.min(this._selectedIndex+e,r.hi),null,null,!0));break;case 33:this._clearSelection();i=this._getVisibleRowIndices();this._selectedIndex>i.first?this._addSelection(i.first,null,null,!0):(e=i.last-i.first+1,this._addSelection(Math.max(this._selectedIndex-e,r.lo),null,null,!0));break;case 39:this.tryToggle(!0,t.shiftKey);break;case 37:if(!this.tryToggle(!1,t.shiftKey))for(s=this._getDataIndex(this._selectedIndex),u=s-1;u>=0;){if(s-u<=Math.abs(this._expandStates[u])){this._selectRow(this._getRowIndex(u),null,null,!0);break}u--}break;case 36:this._clearSelection();this._addSelection(r.lo,null,null,!0);break;case 35:this._clearSelection();this._addSelection(r.hi,null,null,!0);break;case 113:f=this.getRowInfo(this._getDataIndex(this._selectedIndex));f&&(o=this._getFirstEditableCellIndex(f.row.children),o>=0&&this.createEditBox(f.dataIndex,o,f.row.children[o]));break;default:return!0}return this.getSelectedRowIntoView(),t.preventDefault(),!1},c.prototype._getFirstEditableCellIndex=function(n){for(var t=0;t<n.length;t++)if(n[t].classList.contains("grid-cell-editable"))return t;return-1},c.prototype._onToggle=function(n){if(this._expandStates){var t=this._expandStates[n.dataIndex];t!==0&&(t>0?this.collapseNode(n.dataIndex):t<0&&this.expandNode(n.dataIndex),this._clearSelection(),this._addSelection(Math.min(n.rowIndex,this._expandedCount-1),n.dataIndex,null,!0),this._layoutContentSpacer(),this._redraw(),this._notifyForPrerender())}},c.prototype.getExpandStates=function(){return this._expandStates},c.TYPE_NAME="GridControl",c.MAX_CELL_CONTENT_SIZE=1e3,c.MAX_COPY_SIZE=1e3,c.PAYLOAD_SIZE=200,c.EVENT_SELECTED_INDEX_CHANGED="selectedIndexChanged",c.INDENT_WIDTH=12,c.GLYPH_WIDTH=10,c.DEFAULT_TOOLTIP_HEIGHT=65,c}(n.Controls.Legacy.Control);t.GridControl=v})(t=n.Grid||(n.Grid={}))})(Common||(Common={}))
//# sourceMappingURL=gridControl.min.js.map
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({vs-image-icon-tree-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({vs-image-icon-tree-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 .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 .grid-canvas .grid-row-splitter {
        cursor: e-resize;
        width: 3px;
        position: absolute;
        z-index: 10;
        height: 100%
    }

    .grid .grid-canvas .grid-row-splitter.active {
        border-left: 3px solid #E5E6ED; /*[3px solid {plugin-debugger-grid-active-splitter-color}]*/
    }

    .grid .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;
    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;
    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 {
        background-color: rgb(242, 247, 253); /*[{plugin-treeview-content-mouseover-background-color}]*/
    }

    .grid-row:hover,
    .gird-row:hover a,
    .grid-row:hover a:link,
    .grid-row:hover a:visited,
    .grid-row:hover a:focus {
        color: rgb(0, 0, 0); /*[{plugin-treeview-content-mouseover-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 {
    background-color: rgb(230, 230, 230); /*[{plugin-treeview-content-inactive-selected-background-color}]*/
}

.grid-row-selected-blur,
.grid-row-selected-blur a {
    color: rgb(0, 0, 0); /*[{plugin-treeview-content-inactive-selected-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;
    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;
    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;
        }
�PNG


IHDR�a	pHYs���+4IDATx�c��}��Ʀ�NNN�x�@8�p��l#(D�єHqv�U��sҽ
IEND�B`��PNG


IHDRJ~�s	pHYs���+ cHRMz%������u0�`:�o�_�F�IDATx�c`�&����?��_�~
	��?�(�g�2����H3���=��7�h�7:���>FX;�5�[flp?HA;ܼG`M�wa�d�9��������>@!��;�̟�*
�v�������T;��i�qف�|lv�5�̇ف�kہ�S�$k���/��IEND�B`��PNG


IHDRp,�r�	pHYs��j։	gAMA���aBPLTETTT___ttt������������������������������������r��f��D��-�!x�����IDATx����� P�SD���"m3�^n]b��}��J/Z�'+���@
4��������M����*�.�����z�u�	�"{�Ҷ�L�M^�w����ϋuD��{-z��E�>4,���@��fJI���SJg��jbQ�W�b1�7ksH�)�sH�)�a�IK�L�Ҥ���X48��8�e�m�?����i��{~�{���<�/��h���z�K���ҫUIEND�B`��PNG


IHDRl�ΤPLTEg��H]��tRNS@��fIDATx�c@,|��
��
���1IEND�B`��PNG


IHDR
 0� �gAMA���a	pHYs��jA�[ �IDATx���������������rz�9b��M�u��&�p�&rr ʑ,�H ��A��Xd&L����D9K�,-����|�5{Xs�ϩ:5}�{�����sN��O����������������������9s���%*C��&999�k׮[^|��d/��p�ڴisUjjj����׮]�������_B��}�ԩSU�vQ=�Z�|�	����@ͩB��**gϞmp���l���<����@5m	m`����!�lj�S��)�~���]h7���ڭ�/�m���f�T�{f�Y��8�.L�-��R��,T�ݥ�����G�uj+��.���v�J"�G�G�w.[�������{�s�rD:��P���wl�o�ۋU5��A<��ĉO͟?�&M*�V�Z�x�
����LKKk7gΜ�U�Va�ԩ��֭;�+�dir���Pnݺ5fϞ
ѦA�<����/ܻ�NO�8�D�PϤ1g�A����}��^P��@�9��6�}������1~��Z��k�~�r s�ܞ�!.O���y��/:'%���p�Z�w}�T�e�ú.8��/5�����6ª��T�,[��ٳ�>ۻ�pq�/ߛ��k#Pg�b���J�~�݅vS�v���.<����1�MeXf�����)-�.,�t+��g�P�{v�����/�d׮]�n�!���oΑ�1B��f���O��9M�]�r�6�;����G�w9L۳�y?��,��/�nίZ��F�pk������j������J��������hq�	���~&����n�?��k�*���[�8����Z��JL�q��H���G�=b*���c�*��~��c`��9}%~bY&�Ѷ�~}%P����ߨ6�.��i߾��.�g0߅w�ǙY�z�Z��w	2�� 7�����7jl�a'��+�i�
g̘�E����U\�z�T��*�{���ÇO��O.]��u�p�Bt���W�X��o�_��WȮ*�̳�݌�s���>�
�p�n?�^|`QN�n(\�4�X��1ɲ�����o�����y׳e@�y��i`	��8>��z���\^�I�'���S��aT=ڦX��XnSO���P���g{�d�T0.:�.`'���?ݻ��B��a��p8ZB\�f�>L����ݱElk�-ﯖK6��V��%���ᡭ�&|h?���U���@˱���&��<�1�v����{�������c㸟Ή�Z�j������,�r96�; &n�Q���|n9��G9v6��ȻJtz��`�L�p{�����.����#��7�%����0�S~��i�ę��s�~��/@ѕ1��P%m�o���8� �h���7##����N��2�<�֏�:��[�~�i0�5;(c�FΝ઺c9����T��;.�H�0��^�;p��k0t�W��mze�����g}����O>4����3��L3��y?��	!C�s�+�Yn{$ľ���«��%�!ؖ�/F�_��rk��sׂ�t�|{��W_��M,�5!D/"b�O<��;�Ջ���W_}u��!��SRR��r�-��۫;�|�Z=x���DA�2m��6��+��/���HJg�Ϫ�0f�z
��=b���UQQI���@E���i��i���{��-	�Z�ʴ�?_ �\�ß�Ѣ]�/�$~�*����
EM�4�9�:����	�I�u�cN�sœ�~eYI�I�!>�'��o��v�j���TY��o�%X�
E�C�v��$�!�C�y�H��S'OI�1�k�`G���	�����!�/p(�(s�i��ƺ��v{�m��T��-m�O����,Tn�ϱ	�GV?D���m���s&|�?>�H��D:�x�2.:�x�Y��j���܃���_N����a�qf��(�$�F=���_��V@~�50�au���&�Heڥ;
��U�9�q��W3��	��8t�Ρ����H�P �8!���|(�̩K�2y(���l@�>cQZv�w°���Ç����P��FAT�ϦD>l۶�Nh7�V-[I$D���҇Oš�u��Z���#'C���0jDFH���p�#�S!�a���=rMժU�F�ufڴi�29r��ݻ��0a¾��l0��/�$|x�ꫯ��|x�K�mw�̉�
M(�;�Y�r��(�P��<9��֒�b�DYv�����J���)��|x�ӓ��g�C�~�|ةP�E�‡�̆��8b�'��j<ZY ��ET�
#���k�w2������0��̕P�mנ�s�u-�i�ǫ6� |�h�[v�G@$��t뿐��J{�6}ˢ�5����������g�ȇ�
�(6��Gv_gF��2[mM.�1�U��j�#Qb�R֕w�#a�ֵ��̏Vv)QD�U1��G�w�s�J$D�~k����/7n����/�5C%;�߇�ݪa��o�G88�/J�dC��q~�f>��OU(����EwC�@�~#�4\�a>����S�fˬ���?nٌ~8n�T�/)������р�.�]@�_���{xoy�c�/�Ȭ%�][$����q@�p���ƨ�"d���!��剂���Q�CQ~v†��gJK�@9w�<��]���!�@$�%�U�<�k�{O>��Ԕ)S��:u*�̙�Y�fa���7nƎ�}�.]N_��3������\������DA�2�<��m=���
�ϥ�3��}PbR�R1�C?�(y����J�
��#�9iN�5�ȇ�n,��ȇ��Ɖ�y�f�]&hH�0\���k��p|8� ����Y4��e�k�)�H�y���8i	>��~=2H�P�y6�����`X���a�x�aބСDB<y� �_�,�o��ItB`��.����?�;4Y�
yv�f��T���\�F@�ůpp�_�ձ@L4�����6Sm�M�����8p �Xo�&*�1�6�/ۼ����G�{bπװ7����I{���s6�R�a2�2�Ci�����b,�A��`6��m6���@����"�˘�2ֱ5Z�	�0����/�[�U��c�ܤ�"�C
AD��=��?&u���IA�ֽq�q��%�������h�&��u*:|��hF?��� �ypB�>�-� vV����	h�5�N�=�L���uK���������f��P�Gy�Kjj�!���G�=СCP5jt܋|8٫�{O�g((Q�e�Ҕ(�T���2���p���v�AN^��Y�[x�:"i(pQ����%�>v����yT/#���E|�v/�*7�s�f�E�P�s��b����0�>�e��-�y���^m�G0SŎc�_�Z�<L7��e�tg����K�l�����
�!�w$Px��V��h��$����:	��Ķ�`��hB��̶q�لL>�)T�@a]ޣV��9���
�G�P:��pe����T��;��[\��{�>%0����o�W�g���2I�t׾��j?�����Y
"g��dz3�
�>����ʹ��l�@L��I?LD��{�Yu����@�0w�0꡿�y,c�3�`�q�ь~(ϭ@Ѻ�U}����l���(c>�>[��>_������]�X�.�_l�C� ����C�b��V�8�
Z&�z說f��x�� t��P�XQ�e�t%����� *��;��5߬å���[��+�~�.�W�@6C�.��"5kּ�U�Vk���Y�fx뭷��|�W^ye�W�
W��p@�GA������grm>�b�%i�i� ����z1�ym��2�%`/XhO�O�Q�b_	@%�(B��(��Y�r�4��;O���#؝�
 �!D?|h�(�r�E�h�:\,�=�W�_���]D�E��2�c�n�O�7�Y@�.~N�s����w!J�3�_1�����;�c�M5�"�-�sh�Bd��.�C����
�����^�C�̴�! �N�:M�����‡�Զ�S��2���#eL�D���6�3Z��f*�}l��*�A8Оum�}�L� �k�v���.�E9�A���T�U	{F�ʹ��q2�nWDW�p}Hle��mM9��W�x4��9�um��(���r�~ ���KP��X����9ޟ�þ;��'�Sp}�?��	���U�v�0��x�#"�NCPA�bL{9l�u�~�QD�_$pW۶�B�U t�\�-g��G�#^��0[" ��~�@\�t�-#G����{�$x��;�>�-[���_���/��馛nT1�`�|P9`R��.�W��e���~��Kb��i�`��=�N�CWc�qP@İaÐS%$�!(,[��^]�������q�M#*�s�vC��#X�uC�*�~�BW4gL�0q2…EH�w@�񝎹D��f+�_yw<�E�]�{�|���r��@4�yN"Z ���!���vѷ��WɋZ���?����l��h;f�h����E����6���㧝J̦�r�.�<�X�����x��/Q��8��0�{���3;W�R2�U��R	Dz?�xr���
 �vl�e��H�u�4�k��|�X1�e̳�f3
�?�+�óm��C���#��Qd�]����V�L�z�y�P��H��?�al1�H�~�^�����G?���(�
 ^>���/�g��D����鈱8u�4�ɹs�1,s<��]�KlDQ=���eʔ)7O�8qh�>}����������~�W�AD�����҃���7+�X��؈	@44�B�!�HA^�#��4t�!D׎^&xHՈ�~���~�rl=��a�e_��-߁�m'!d��J8��F>�#�c	Y�h�J��⌶?���t:��"���uX���"!�����<]0�u��>�
!ZO�}G{�M�%�U�����<����������̨iq�̺z[���H�9b+@���#��o?m��}Gٷy�g�d���\��1U"J�
�c+����xi8@���#�ı�;P����{��;�=ʹ��٩�O�ʱ5@�|k_V��h��m ��qѩ��?t��!�o؄CG� �L3O�D� &g���o�^3W`��S�b{	�>����F�b�f�����eFL8�(�.���bA��f^���f���#�Q��/����hs������g`�/B8a~�7�~��v1|��T�!Do2��ѣG�=���a%h�#�==�Ǽ��4mڔG0�N�:�ܹsi�ڵ^w�u�� �h����xC��.�9�'ADFC�����a'�l���x�$>T	���Ҧ�"|wTB�Qu~�Ųh��88�|>�Ѭ�a#p�]+,|����X���՗�m�H���=��vD��.̳g��6��#����m8��L���/]*�h�����
 �ޫb�~dl���#�]�ߤ?����#"�i��Ȩ��@�<��.s�
v�MD��3����3"���E�F���]��MSg��G0�W��7��lwN�J��(�wvv�'�e�����(����S1�mw�/�s)��Q���Թ2lڒG�0��صGک�J���O��6
b�臼��	�����$���*4�h���gɣ��ЯFATQ��x���z�Ǿ�N��s��F@�
a��a���%���9��r�2�^���*U�̺�+x��nݺ���5�?�<^{�5t�Сԫ?ܻ����7�"��y���L�e2�b3|X|`��~����x�ޝܵZQ�TT����{|�k��k���������B {'�h0?����ށ��
����"�‡	rK�7D4���{x�m�.9�N��?�Kp�0m��$ɂ�<˲@�2u^&O�i�G�� 8��j�Q��]x�D��{����l���Bd�(����m��V�|?ޫ⏗K��
�g^�u���:���/œ���2�����F�9x�M�wsL��-…l�o��tF�`��67��.�t��d���<���a���{7�t��������(�l
ʱ�T@�zt=���_@,G��G,{��k>r�o�2mFDTQ�B��ع"l�h�y�
>|�gw��gMVXQ|�H������1�(�
 ��>tn����&�>	]���!��f*ӑ��!C�k֬�]F۶mѥK����zj�W�˯��;7n�I�N��2
bժUѰaC�����{�i����C�R�e'�p�D�EJ�CF>��Z%l�>�z,�������!D�UT�w��IJBPcF@����x���
�(��}�x�w�lHeZԟ��mZ�����,����2����(ƣue��4�X�@�!�b�Q ��ǣ���mk�<��h�&
 �����q�V���
 �/�S����mv�~3~�4	���Ǻ�]y
�
 �s2�t<e6DM8p�-2�� �DN���X��������{˘�+�z��T��2��=�\�ly!tro�[q⛱��~7��T��nw���?���:(L�;:����VYDcB� �{@�Ç�
D@T��츨#�¸�����=A‡��� y~q�ޣH=0ef�
��F�CQD���a��_AdӖmHI�+DX�1��N��4t&5r�]���ڣG�3x/��?��/y������~�
��4��_�>�t�"���j�LD�r�,d����1��Db� ��qBT�PE�i��s,,�?u;��O��tn>0;�����| �q�aN@2a�	���*�O���a4e��6ER�nrN���T��'aХ_i�����(�1,�(�hؚ�ǣ�Ǎ������29�bb�_	FS֑���M�DyNԐ
���o�h$��5Ʊ�,c~�_�KQ}�tTƟ�dz��7
�|R�]�O����{��F�C���#��f��4����+�q�S�‰Ի	�$�2�w��Cm*��Q�ve4����VF��*��fh��:��!
|(W�WΖ~8|����k�#��8����_�w��BY!z�?�ax
2
�Οk+�‡���<f��e����g_�敟q��y�����w
 �T�^���>�hLzzzI�j�VyY�y�|�	���͛O�ӧO��>��e���k�	+��s�$ZY��Ȇ&|m�*�f��y3'Y���VQQq�mذu��X�U��X�S�����|�X��G/>t@#�c$5��*b(�h�õk��C�ebX�hCpI�F�2��	`��>�_��2���X��e��ŋ���5S�(����G+�_t�2,��R�F������&m��#�LK��W��B|*�m�	�"5!�o��߅ʴ��?�c=!�p�Dz�;��z%t�BF5�GY��T R�!D��k�p��|�����h夹I~�y`��?��	<�O$��(��:^���ˁ[�Ǯ�=��;�Ge�,�x�4����{�>dt����>*5jԨ|�}��8�ףA�7�|�C��{o/I��:�x+��w�K�He�lSb����/��ZEEE�y������4k��G���c�c�fR&���&-2<�p(
�!�8�g�����2�w�I�^1�Ma��Xm���¾���.@��R_>xQ��}]EE7����q�ޘ9=�8:�e!����\�!	�����_E�GY��U�&��)}?Aۮi3#�ʙ߮[XO��=8&ҿ��e{(ӳ�[��IEND�B`��PNG


IHDR  D���	pHYs���+BPLTE���������������������������������l`�i\�[M�wl�������"��AP	tRNS 0P`�����Aa�IDATxڕS�� CQ n*������@�n����J+DE?*d����[��zGt�p�K���ؐ��Z^���F��HD�2X�x�љ+��0�����B����\�_aنƼ%��������/���v9�Uz1�ҞvM�`1&�����%�"����$ѻ�>������J0&�g��b[�~�?r���c�/�z����l�4�@0�IEND�B`��PNG


IHDR@@`�U�IDATx���� ӂ-�[H�`�`�B�`���3�$09b&y�	��yr:	!�B!��@1~$f�{&��805�����o�D��Qu��1��o�KB�J��)�}F��鳺������\X�4�V�3n82�uj`��;Z����Z��XX�n�.�X��~G+�ٸ"�� �_���jnR����D÷�F�����H�woD{���H�@44�V��L���
���7�|��B!��+k�|
IEND�B`��PNG


IHDR `|"p�gAMA���asRGB���	pHYs���o�d�IDATx���eIſowc'��^6�n�m��7
�V��Q�`�c۶m�����W��:�In�n���^�����R�~�>��~H���o�17w�'}������������/(�/,,Lnjj�M@yy�C0ꆑ9���KJ�k	G3���$� Q`��b�=�!}�\aQ��0
�	bsss=FVl`G�Bɦh<:��Ƽ��$C�v	+TT\<����^M�hwK2*����_LL�U�2�^Bt3N��VP�3X���
b>������~�q�����ȗ�#?�E��%���Sf��BU
��H�T8���^<��,���'4����E��Ja�h�q�1�J�M���Y
PZVV�z �1݆T<H�ap����"ޥ
�A�џ�|Mmm�J? ��%��sU���`���P���n�d�<B�%:����=�mA4Ʊ���~�]�h\ �I�D�����sU�Q�0!=A����'JJK�Qx�0�H�m�N��z(R�;����q�e���#�M�	�O�n���TQ��|N�n�ت���9R��jZ^����~�1������X�̫)5��oT�}/�����9f^
鋰i��M\�i���װ���W�c��̊q9�h<:�"DF��lC�va���v.���yM��p��V7a��@���r��]ͬj�P�@�c��z�J�
/VH��\h�Q�2+�3f8;�T,V`:��O9�����z�/��K�
�����U�TX4�{o��	����-�eW�b��iT����~V
��vG�p-�b\��	�F��A���:W����ؐ��#t0K�4��z��3�LpL;kU%|�ђ�ې�'@^�i�
λu��x�tԛ��e<�t�����át���8����a�w�~�M
������/�{�|l����0}&���mzmx-�i���߆�dP�A(R�;���X�0jԨ;�;�R�W���1ϓ�ڠ��I|v��~��]�z�/^,�~ ?�n��y����Z��L
��
+}�
���|~��0
�	b�N��Ȋ
��Z(��GgX���r��p�%�\�?�3ab���p��-ɨ�P(���7�T�p��n� ��>8f�"n;��`g�"��|/`�6�!��6���#_Ž��%j���R�}���,���8�p�%�;��v�ldٕ%=�	����	��
�0l��8��l%ئ��Ǭ�����mH���`p����"�?�A�џ�|����j�=�f�e�ܤ��?��Qx�I��#�_�����a�Dc����֒&��lR0�`�šn�\DU���� �`h����P���V/��v2�|ԛ@���i������O9p+��IEND�B`��PNG


IHDR @ލk	pHYs��~�sBIT��O�lPLTE��������������������������������������������������������������������������������������������������������RtRNS@��f�IDATxڍ���@���թ����`��&��}'s1'DeϚ��F4C�W~��\�u�5X�T�X�����iRU˼�<���;�h������۝ԥ1���cnS���3ѩ��:nϞ�	CaS�3�N�h
�u�\�IEND�B`��PNG


IHDR `K���	pHYs���+�PLTETTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT����������������������������������������������'�'�'�'�'�'�'�'�'�'�'�'�'�'�'�'`2��.tRNS 0P`p����������Ͽ����p`P0  0@P`p��������$��sRGB��, cHRMz&�����u0�`:�p��Q<;IDATx��Rۖ�@� �d�ʪ++�����en�t�ż�䜤������j���T�ZYd\��D�����I�ꋂW�����n�EGn�Xk������_�1V���exb)��T
;���E$)땇.��L.�@?SI��9N��I�tB-#�Ѝs���R+�G1NŴ2��ց�:xmԬU`����ԐJ\%��)�� �����J R�	l� ��#�ur*�(	��g��T��L�g�r�'u	�	3������{�5�g{^]԰�t'��� ��'c�f�z�O��A0(��
0��L�]��B���s����?�QKq�QR��Kp�˧gM�_�!�M�|qX5��l�o��X
���H�����c�~����᳝�\
�T���U��˦��y_Ҫ1�)���䵇���Z�U	�{{�]T��+�#�ٵ��y���j)^[J��RZ�Ѷ|���*�]��Rb.�����;$B�kC%_H�
n�W<�{֔�Qr����.���m��[]�[,�m~p$н)���󘣟��c�z�l�7W@�/�?\�zZ�"��IEND�B`��PNG


IHDR` ��f	pHYs��(J�gAMA���aPLTEz̲������tRNS@��fiIDATx���
 BQ��wv���I��𒪸�d�W���>���`��0A@�  @ ��@{E�Cn_�CkWE���u]�p&�7�K��!#IEND�B`��PNG


IHDR` �`g	pHYs���o�dgAMA���aPLTEz̲������tRNS@��fsRGB���gIDATx��ӱ� CQ�L����ߍ�w��u.t/�3ss4�l����PxY
F!! `! `! `�
�'Շ~�~5���׻��n��.iY�y�IEND�B`��PNG


IHDR$l�gAMA���asRGB��, cHRMz&�����u0�`:�p��Q<	pHYs����k�MIDATx���ǍAFa��h2����M$��lk"`B�@{�zdV�w)D�L���k����>|���;�X���իa��z��}��ru���C�l*�I�J�:T�סR��WR:<�$upBI�ARI��AV)�BT�:6�J^�Q�� *y/D%��b%�#�z9*%�%�㕔�+I�W:^�JR�QI�Q��J�>}�� �m�'k�6Ik���|<ܮ�/��#h9]�V�s��jܦ�Ԑ�Ϡ��*��P)_�J�:T�סR���u���9�|�}^����	����	���Љ��R�#���ul�������AT�:>�J^�Q���JRG�x�%�㕼�*y�P:6�JR�Q���sJ�IZa�$9�CaT�[N7	�C����O�W�_���;�X�T�u�߂JZu����RB���J�:Z	AV�+!��x%Y�� ���tpJ�g��)%]�Q�QG�ATrA��AEQGAI=P�DD�8(��A��XǮ��.�1+A���J�:^	AJ��~)�Rbu�D%��I*�N��߃��� Irжk�5u��5��j��
VŘ;�rvIEND�B`��PNG


IHDR'�ՆiIDATx�c` ��'Z!��=J�
AJ�P��8�����V
QW�OP�g J�TW�,.@X�}��!��c�����2�B�)$B<
	�\a5������J�[IEND�B`��PNG


IHDR'�ՆRIDATxڭ�
PK�(Ζt'�hiI��sJwٌ8Z��l��`�
D���Z&M����(5!��Zۢ�XD�Gжhy��UMSJ�bϵ�IEND�B`��PNG


IHDR w}YsBIT|d�	pHYs��~�9IDATx�c�����bΨfΜ����0OO�������Q�:`���P<�͟/#��Y!IEND�B`��PNG


IHDR @ލk	pHYs��~�sBIT��O�	PLTEIII����Y'tRNS@��fIDATx�c`�0����(
l=R��IEND�B`��PNG


IHDR�0��gAMA���a	pHYs����rI3<IDATx��1���f�𫎽���H��{���^/�{y�
��"5rO�db�1��-�0r��Es:�!�x�`5�������g`��Ey�wGF�ULӳ��2QVDFWW���uUVV�WR&��3G���k�
:t�Ь���R��mu��ݖ�^�&�^���o�7l� �*������~����H��Z��+���R�[�����{i?��~�߀�64�_�������}�YT��o}�ub��o���sʝ�.�^tF�����Յ��
��k��u�����e���z��@�o��Ę�x���-��}�O��6rV��6�G�)�X��7��v�,*�S��(Н�n$��j��H���رc'�{r
en��4]���B������0�.��L/�?��L}��ߑT(k�)�#U�5q���5��"OY{{� =?��7R���)R$+m�q�|�y��έF�I�?d:Vo'����1�"����WaO�v���k+��9��L�U�t��o�)s��d�pK�͑b�o�H�"E����O.�;X@5�/�m�"��?�W��Q�FIZ�9���ֿ��݂�w�Z׷�}�4i��x��\��� 1�H���X`���.�ԟ��7;~�xQ}�Sfm�!��E�.��2e��{�ZG8r.�s�����}�G��� hmhV��,l��v�X\��r��~��/V��ƭ[�ʭ�ޚ���\����{��E���NlKW=ɧ���eA�ڵk�Y���z��P�5���#�K-�Ȼ2d��ٳ���h�C��6��3��G���%�?��T(�i�qhO�`y���AK�3��
��?�L���F[���9�\��o棊�H�"5�G~饗j���ף�����{��s�x�[�{7��Q>���j��ٲp�BY�l��[�N|�A�?���^_�]r�c��?����SK�/�<Q.[{�ܲ�<�̋��d�0y}�p9<�Rys�eB�}�#�o���Y�#�
��F�)��B^���e�ʕ5���Å�'ȃ.��B����۵��Yz��ű�_$k�JuG���&��Vu.��'���X���W�1g�q���qx>��1@���̵=��o�[��O
�>6��r?�9|t�W�'���'�� ��
��i�yʸ�~��/q��K�Ќ���"E�)Ra綿֓���F���Q���'����]�0�#+�(��O>)*�S�u�Fs���G�>GN�ݹw��,�_�;Z���	��6�\��߿��)��ر������v���o,.����aKx��~���o�kq����3�-�C�BZ�k�ïR����^7��bl�u�+ʹ�}V��miA}B�;��r�iI���+T۞|E��.@�+D�	x�{��<׸�R�
�Ѝw�~��
'cɘ�R�1{�\�m�d�Dž=���:�m����(�@�n6����`�3��;�~	���e�(��H�"a�$����zh�o@��w��l[���)�)'�}��r���bA�g���?l�P�ܽY��
��?�`krܸq�<��C�X���N�v�F�����ų�`
]��Ȣߑ�W��|��j�1ɛ���O��=z�P�o�l��H1�{��@\wѱ��
�+�U�U�Vq� X�!귢?�M�пr[9�h���>v#L�sl�WM�������b��iy�Xw��}��c�_d=��!E������Q���sQn���:��S{��j�7F���}�c.�c���J7N�8*`yڸ;����R�U�c+��Wg|��7�R	V��7�_�P�5��s>+�'Ħ��z��)R�H������@yS��
��:�N�Z�n��w�g�Eu�ȹ�:���r���`��ѹ�/x@X���w[�TW�;%�^@,����ȑ-@�Y`���b}A�
:f,
>4���!y���;
i���ɑs�R��~~g������e�B���גwާ8
;`��`h�b�;��n�AR���0��S��_`�u����� �_}'7�|�����Q���x����o�z}J�'9�6~��ޭp�)�J�<�/���ƽ��A`�0����C^ARH͐�v�(+�?�ݧ�cS�џ�@`�Y�8o��qX4��,�jp�	�K#䭍ߵ�:TfL����)���=os�.Ƌ�'�m�"E�����%���6F|e�qT�T��q��uߛ�EG|Y����i�{�w뫌{-�@�:�Dyn�ttm�{`-Y�D,X mmm�}�vw���%9a�vyף{��Eo�`]��4��rQ���o�`��L�T��>.?{�Y(��X�IѢq�k�ca���,�b��z�)t��DTgʅ�޷��Tx�G���Y���y�y� ���D���пz����\B���o�c�����I7`�z���p^�����G��Đ��]5ژ�K��Ӫ�7�Uߦ 2�~6P}ğ؊�0`��|bYb�=�
�b������S�9JޞZ��k��X7�ҍ���?�nh���q����	��Rwww-�8=�W���d���_�h*�`�Y`���X������~8|u������WGa5E���,���Y�]!�*��g�=-�`U�]���,t��[M�"Er�:6wʽ�<N��?c��"����Y��u��wm�uҨZ�T�:k�(�e�"���n�#j�;`�}�~�����H���ν�%��o���nZ�S��>�_�,
���jk[�$�lXߡ~���eV��yR8����8�w�����.-,�Ol�
;� O���4w��w�V�{�젫v����"E�4
�C�|I@�`�%X�b���Y�����E�U��6X�4���`em�Ӆ<^'�
2�?�a%��~	�Z�՘�Q�W@st��ׅ�ci��ؐ���{,���:{���Sz��Z�=��e~��m���k-Z��^��͟�r��w��,�y��s�|��xO�}�^�-�v��ܫs��"E����[�mn�爂����>ע�:Gʑ�"x/���x�X$B�[�Ѩz�R���������a�n��-w�/<�Q���+�'{�����{�r���m[?+�������"�
��yy㙛�2�	��\�V��X�~\�@񎎎5(������7ux�F97���Q����;�se�o�~�2K};��A*�n �9sx�76��1J)�����]ۙ�2�L�S{{� ���yʸf�ߥ�+�bGΫ�7�Ÿ<�˗��?�±�m	@,Y���{<�4�&ʏGVğD�F���^W�>K�\�
��|�dy_`���j���U�<`���R'r�U>�[��/�E}s�[y��,*�Y�bW��?m�4y��%�<|�9��r���+�����y��疍{�����2K�A
��}�	H�9�o����������T�n4�P,-W�ܱ�"K��>P�QW����k��xM�q{ZE~�O�]~pϘ�!X��K�
̫�,�d0��\�8�C��(+�� ���:9���v,@4T����s�cv��9�J::w���v��.T�>U�|�J�|z-XE)X�A�ȑ-��\r�%.X��
P�`U�s��i�pT�5s�k
�tg�|���tg-��w���h�W!X���׎��.|�g0��C
����|��[���������P�!X��d�eZ��)�3=O-(�Q�8+��C�5b�,�ڢ<����M����v�����Hr蕥~�m�3���!O����;ˊ��a�B�/2A��Z�?�g��3��ӻ�>������NY��!������c-�Ϙ>�0/���w��_�υr��^�r=���������چ��cǎ����}�ʸq�d܏���O�	�O��'�<(>� �\&5
t���9�)�?��'�t㼺̗����uY�K���9`3�"e�K�c*��g�����́��Kg*p�2Y4�}�;�^��,��9��R���Fu��Y@e6ѯ�M��Z���&`�&��ݛ��Ņ;j?����i|Y����Vpc? �?�%x�|dƛrي�����r�ܾu���q�L�?ٝ� ӚE&}Nd�0���ۋ�Xx�򅧮�����4v#_�C�=V��SO�K/���z�uB]jÇ��4�@};��V�?�]-�h�w�_�1��cH�=��)X�#6Q^���y`�0}�>}����=�-�m�i�l�K�h��PF��=V7��!ߵB�8�
��n�a�P��B�����n��~
�:K�E�#��
y!f"�O"~#][�h���g�_m5wU�
�C>��k�KX�o���;���,��b�����"}�p���ca��k��{J9��_����o1�JE��8�*RmgY������t��Oߜ5��h�v%�����'�v�~~���x}��)�E���BZ�!�Dz�?%X��f����J�?)����f���+����F$n����U�/�
w��ѭlB��I�" I�@�[��`񻴿�G8Wa�5e�t�B�Z-�+�FiW�)+��L�4�M���=f0)W,���;�^�|���ջ/1
�� X�ixE�?�|E�
�sݪ�YS��,@*_l
��;���{ѕ#�ˁ��.X��g���`�'��v3&2p�
~��X�!����nC�#L@��5x��W@4cN�2�T��
�7o���ܴ�

�����NX�A{z�� D���"#f�?e��^~c
 �
�i]rP:&&O�^�Y	�?��b�"I�����W�w'B�v��
��G�
m�I�B|��N�WyP����Tԏ�us��G����3��!Xvq�P`�+dݺu�q�F��씮�.�Swd�޽�eǎ�e�ioo`1��X�'�%���U�0m����n��r�W��o��˕u���-��~�Ź��5���^ b`!�W�,�:E�~q�ܲ�<�N��r_�-��������S���gj�ˤ�;dԎf�}�@,\`?�Ey��቗�L!2�K"O�,2�v��߬˷D^��3���oy��"�oba���S�7�~O��G�P9�ʮ�9��eY�TR����}p�����~���8���u(Xȩ�N���NG����[��o߾ݭ����ސ�~��~~5��V���+y�R�!X��h��`5���	�\(w�R�ʕ+�`Y`�Ba}�C��=	����il���z���2�	Y�z�D���U��d5���A���}�X(ۧp�����D���z��ԉ
��ŀ�q@%����ɠ9l(�s���?��
�H��Ҏ���\��]�:�*�`Y��k�혃_���w��r�NU� �e�m�����G�y8����1~q�	*���s��T�3��~�X��W����[�c��r�����7=[`���H5����e��W�>���E�2o�U���t�2�X�t�@j�aF�R ��N�5���X��e��`U	q�(��TT�eh-w��y��LJ
�+0�
��3	VE�/�X�x`�L_�VtK�C=g�E=97�8�o8}�e��s-_@k|����o�X,R�X�D�;)��4K�Q��3!�y6&��@���b�<�[V���W߽�B�Xy���Y+�`Y%����~��9�\��R���8�I�<�����1����Z�Ŵ�Z�s`��!--?`I��"־����Y���	t;TmN����P���'A婏-��)����?c�q���X��L��� J�,�n���Bh�\�4V�|���
�B��������	p2��|˅������?W���dǬ>���Ƌ�=V����������+/�0h;���*�Sn+(�F��!���ûtË��w�=��`�|�r�3g�,]��~I�*ٶm�l޼h��;w�̛7���S���p���]��i5��ӯ��f�)~᰼����3ޔ��߯ʠGk����w�n���6��r��rڲ?��k�QFt�!w�<\Fu]/��"�����m��W6B���>9}�;��?d`�֏.���>Y䞳D�Z��sE��.�D��'}F�sDF�*o��1y��Ͽs�I��B���hx�)�m��d�]	H�p;�
�cg��K��+��Q�c�|nx�l�`�|o�w�w���]�K�,qm?|��=��+W·�p�5�
�U���9$�K.��$����Q���y�muH㯤,�}&f7`K�-��Ϋ����h��V}?�kN����T*��S�O�zӈB��
�p�'���y� u�>�˗ِ'�|@�?�?���%���q����Ƴn��9 �z�|�$��'�Q�oy[|���Q��"�^^ƽ����j-��\�V����7L,U��C�qYA��-��!��`ª\�`��(�-��~A˭��%�_��'�o���ᳳ��!X��4��5#fAp�t�cn9��r+,�`��b��=�.R��9/�굉T�}���}\�H@�ف�U�BA4�'0����̎I6H���<%�4�;�샣��Cw�IEH)}^=��ڤ�����=�h�,*+ RL�r4
��t����<�o�K�+���c$�^V���ͦ�B^�9|��$O�s�@��Rɯ�`l�$)�\��)\��ҼVa�d^�����e\��Fo�+����_�׳����$мIV�J�ֿc�AE{�}��{���������4��ч�ɹ�;ѓ#��t�K� o,5��?AI��E�+����|7�����QU�p���I	�y���ez+LIJ�>��m��#��k��Q}�QK}UZי��7�Z�f�,[�L֭['�6m��_~hG��g��ӟ�T؉��g�5���3���)��'ʇ~�w�a���?�?{���'O�!�l�?~�&8�K~�ލ��Y)������>'�{�\��,�k�E2��K@+8��_)�o*�l8
�������of�9m���,�D������P�ϋ<�9"��}��N��G卯�_\y���ϚX ���9l��8�Z�O���$U2����'3�hLD�/��¯���'o/`��𩸶>�//���.:ӵ���w.3g?��ֹ�<v�[����:*y�E��~��5�,�<.�M�Ɍ9R���;]�g9i��ꮾ�T�n[�'��W�ojC�k����5��vg��_*`q��������y�~�gW
�������Ŀ����Y(�
��şD�F^���Nt/�g��u��\���a�^�RI��zS�����t��*��G4^�kkN����
����8��pф�.5�_!��,�������~��������}���x����SfE_ �|l�u'�C�,t�@��w],��sF�'I"��cP������k���v�\����23�'�Da�	"��H����Z�r���O7�����P3�i�& %%�#�)�@;	���*�[`!�A���A�ht�*�W�]\W���ߪ� �kW��9�	���+�� X&'P��ċOVp���l���*˫x`w`�T:w��\�s�ul�����U�V��t#�Q�������|��6��m�P�|�wl;�0;Ǿ���oX�=Z����'��}�̴�`3��XF'��@B��ḁ6?��tC~c%]W	����r�Y��Ȭ�I������;V)+3he~E��2�Ռ�3����r��[�5�p���بj�iW��ф��[�͛7Kgg�tuuI��]��k�l߾M:�vʖ��M�6������e�…L�Kkk�!��>9o�n9��W����: ���3��7��?}U>>�G>���h����:9c�
9}�*3���n��]_��wG��%��+S�|_�[��E��Bn�4L�i"�-���5�]��X�]/��WD��E����k�2B��<Z�����By���IO~�s��,�y�`��}��E<��X$�>�{X�X��"e2�[�Nu������m��7g?tw#�s�N�_�K�̙@Ӽ��O��W��W.�}@.��S�?�E.��z9�5r�#���
���&�v����B�fͧe��3��ϴo?�s�ȏoy�+r���1�ȁ:���7.4e?��~��5��E��j���^���>�}V���u�`)x��n�����Q���
��a穟B}�5,���X�SZ��T]=�̷�Y�X�L�JQ�����?�%X�%W
�"�/E���N�g�;�|xG ����9�$�74%>�B�\7�R�
%��>x/�/�`'|�8�yk����1��;�Q7�"6U�
�&�2�y�?�^�0��?X%b��/��Z�����+|t�Y���~��!X½�&���}�:�����K��&�q���>ˀ������
?��#uf�ji�ʕ���9��?(-�F��QN,�4�| �A�*�;�W#3,r�w�
pT<G��>���G�߰N
䋒(�{��U�An�mXߡe�)�iz2A��V�y*��
���л`�5�N�lL}���G�p��=j�r?���+�)x`|�v�\��O(�#�����g5
���
+��<X1��+�A��+��(��wk�;.
>,؉���ΛC:T�ka ���C�d;��'�*�A���
(Z�����(!O�����x���+�<:s̓���y˄EJ�[�?�g�ʃ�J���[+���,��=��r}��W@���'j5���F��u5�g	�9��hG��\����6t�ر�Q�Lj�t��s�X4!W=+M�>/M7̓����TK��93i��2V�˯=��<X�Kg* �c�wL5�)�([^@xcro,����{@t�s.�i�e̿�a���W���6��Î;���AV�^�<��A�ೋ{䝭�ɠ���Y5W�����;���˕�O~��~�'os��O��S�l�~� �����i�9W9v�U�c�/�Xl/�b���SO��wz������?�Q�:�N���,Y�j����F �2�퐖��[�
�7�4�'���PƵ4FȄ��
V��.�d��m�(�*}�=�k��F��os�!X�������(�SV�ʿ]���Ϥ:��U�/�£T(��~j�G-k���J�^�>6�)�
!O׼��+�|����4Y���Tn_:k�3��|�����+|t�k�b�z7��,�|~�=½����b���6��e�X��>���'X�@R3E�;���3\ó9�j�u�~��~���7������xuB���v���Iv�����x���Ho�����,�[y`�B��#[tC�S�5�,t�a�e�4��ř)�J�X��:q������,9rN9��[��H��\���ރ�@��	S�W:q*\‶V�5�b}�`�O����7v���b�UL`(�����h�X(�x�"��k����*ON_����`��i�(���[O,�>i�X��L�g��������
��<�џ2�0)����e��$H�o��˩��9�jY��\W��l�t�X�?���3��"�H�"��
,+��g�17����
�ן�]v�����/	�`�5k��…9
e^�n��9{d�#5��	����ʼ���_�k6�&�X�Wr�/
e^�n%�]/�ݓ�o|Dޘp�P�͖�WB[j	�b�/{ASx���qL�=ڜ�e�B�������7L�B�I:w�y�m��������8��'&�2�7>O��FB�K��9�`
XT�>�rU(�ý����*9��,o>��/��_6�Bir�܋�c�j �$�7��Q�⼢o7��!X
"���jCk��C���5+�F�gr�\�e���8c�V��[�F
<$O׼�?m�4`	����W����τ��/��]|tV�v�?D!X��\��{cӋ��Ko�߼�R��X��%���%G�g���q� R��K:��~%���7�W���EӴ>`����E�H����^���C�hA\��I��OГcc��xtT�Y�Aw��ȱd��`x��?�U��f�B ��A;أH���:e�@�8ϯ�~�񎺯�y��N�r�܁n�.��_k�}z$
�(�&���o�4h���`9�;m�4=�P�{�:~8��?�T� ����R��M�2%]��;�%�>���X ��Q�B^�W9T�r0>�<:_�d-�0b��~`ݶ`����8�o��@z����җ)+���pߨu����m�w��HV�c)R��A+���6���z�ZX��:QZWLC�6����X��Jf̘!�-r����w�����M�X��r�+y�_��W~�k����}X^��=�;�j�,|�Ǻ�%R�)�8��o����>����R��2�?L�<�ϱ�'����4��u΂#~r�8B>�ƽ��`y�hc��4���=��?X��[`y�?��,ƟD�F^�&v2��!X���6�Q�u�Z�9)�<J�
�ci�\�Iu�G�m=z���6#��x���?����ebu�B���/�6|n)�
��9���nh��w�rᘝk�c��,�z/뿸nM�`�F�e����#��9�c�j��em2z�}�@�'�+�z���{1-9�T�����Ix��S��x�	z�'ֱ�5�/*�.��^�V�hW�e']8N9���%���Uc�>����9�\�>�0�\��yY쥁9�)�@���������.Tm�RVu�RO���񝸫;�2��G���|�ye9ӓ�Vl�Y]��}��R��\��L��R!����yʸ�lB�0��i�!�*�ʅ{��X��O�%�Pw}����]�s�u��mL�H�"Ez��,�~8�� Ӆ�,�j�&�
�0TV��ZXॾ6���+W���{x�;�Y��wG��߸k�}p�;ֈ�O��?|�I�.:�k�e�{û�v��I�;�y`5h��H�s^����l��+,��<y�.ē��f��5�^8�F_�1��&��-B@	��A�p�{��+��>��#7�-[R���*\H�5�"�
V�/��O�C����'�,{�\(���.�_��}=yk����;<�t.X��?潼��"���8,���2x��5T����kS�<>8|q\��e���`QƵXo5n �%�۱�7�B��s��"E����h���o�"��g���:�C��ZX���<�9���ӝ���{нq��XO�۱J��p>�'rN[�	�kaG���pN�.j��S��9�`�Fj�������g��J��W��cݡ���a��S�x�6&��pM�����9��Y�A�#[_!�2�59K�XY����#�g���(�UW�~.^��wuʨ�0KmM����)R��ay}�\����"�#��j�n��׼��Z�|�̝;W�}�Y|��X�>�A>�/��S����&���Z��`���g�����Q�y����K�����X���<��,�'�B�&>��S�𫺜�a.&�]�T<7��L6:�'��4�3�ϑhgho��4B��%]DK^(Ӷ(d1�b#��������@G�k��"�����^)⯪`��ݶ����ձ/>7|o���ï2֡];e�UÀ^!�2��+K)X܎���"E�)Ry��uQ���Kr�<�c@tWhW�G�)�ϭ1��dz���KD�i`�C�� t}��_5�_�8�3�����x��&�E�u��k���Z�Pv<�,�|֟��"0<�^ɇ�)R�H�"Ez��mj3;`M��d2��4/��*ʼ��k���R���S^�BY��"U���xu����R�g�H��b�Z��7�s����A�=,V"yʸv�>w������ju�8��?�<03R|��,�_�-|mGƼ�o&$y[з�,����zv���U@%�IEND�B`��PNG


IHDR w}YsBIT|d�	pHYs��~��IDATxڥ�o;9��nj�s�����2��.�e�w~V��RnGz�{~�oL�X�N5����o�����	ܓ�j�p�ۇPRV��`
�<B^�w�� �J���5"Wq���a���wP�ҋ����a���w�]�ڶ>
;�rxP�
�x�뼌)�ݥx�o,����T�t6�ӍL6e�mN��%EnIi
��|<�f���k��M�#�m��'����1S�E�	ԉ�(N��$�|���~,��������𶼞�/ڎA[3��SI�ؑL������aim��|Tl��p:oj�BEc:F��pv~���4t�b�l���?6+���<��P)���)輚���ɫ~�7}�ßp�}����	�+�auB٦�?�6�јK����٧j`e�|/��x��?ro��i�`����\��p���y�X�y��+h�Z��j�G8���qT	���Ny
K�����Z`��e��
�[6�XpÓ�+�^hd�(B�0W]�bޘ��WEG4^����2I�兼����2��U\1������y�xWшT&{������.@��m�KK��xW.�J��݇"1��m�b^P�=�3�O��H�TR!����p �+�{Ε3����kd5����Yn�g��AF���3�?���N8<>J�lcsx��Z��;�**���d�ޗ�Z���s�Sd9oIEND�B`��PNG


IHDRp,�r�	pHYs���o�dgAMA���a�PLTE�������������������������������������������������������������������ط�ο��������������������������������������}��vz}tuuijj_``UVV!x�I��O��[��a�у��Mb�sRGB���hIDATx��۶�0�i#����nz�"���Zs�1������k�g�b��ff��y3W<syw����A���K��m��L�i
\����0�Rś+7��L`;F�덛� �s��NF�j��X��D��8Ui�)\3��'`�Q}�����#�Z�j	d��gJ��>ځ�TO�����c�<��O��76��X�Ŏf�����@*d�������}O;_�N�@�I,��؇��3����=4��|V��X�ܴ
�mF?(m�@.���~R��	��2<h�o��	p�2/`!�^�X�%���w�s\v �:Ho�ė��L`��s��O�,��N2p�O�$�Ҍ�IR0�:?�����d&0�$�HQ�i��HQ�iz��
���)1`nk�g���3��3���nM�oD~�;��fÙ`{b�-��b�U!�
\-rY56�J��A"?�����c���}�QKO���m/>�n�k�
<'��8�������"-�QJ˘��6_��n_�t�}�b��#ʲ]q��K��.���K����W|T���:2��p�=6l������Բu*����b����ɤ�IEND�B`��PNG


IHDR `|"p�	pHYs���+IDATx��[kA�������TQD�7h[7��4�	�P��-��x#�**Ԉ� Ro��NE�"�wE,�`�>_�������L2D2�2lv�{����L���Zn�L&���Ԙc�azI���HkB�	q�Wi��5B��F��#DS�R	�Et�Pڈ��:���3�˽u�%t�$Z3�O��O���o����'0�&��[����QY��G���n�b�b>�n��h���o2�8��C̗��՘ߐg��j�����r�S�[�ΞC+��Px�L�'� c����5�_Nw,���!t�1�~8tw��/9�.�C�ϣ�3�r�4w �B�ez-WMyط�G�ZW����3c�r��#H��7(2@s���W��ejk�s5Ӗ׬����[,�D��x8n��Q[�E�[�~&�E�6��6�4]r�
�̾O][lӪv���_�F?2��������GU�Xk����haɸG>C?L�|���;�.j�R5��(v������v����DG�z�5݄ΚlH��Bc�d��`�'$�aY
T��[vɘ�t�)��z	�i���|��|�>Ԋ6���z���}��U�Ӕ���|���i��? �>@���2|�‰��ǡV7|cc>@;>��?>��`��|s+>�<tK�yY>@�I5N�8_>@�H>�;>���| ¼��`�pf�z-W�>@������:����3�/�&�=��fԑ`�Z>�j��
���!��Ŝ�BgM6$N���|�V|s{>@#>��[>@�X|����ـߖ�=L#�|���!��B� �|���N�2�.7|cc>@;>��?>��`��|s+>�<tK�yY>@�I5N�8_>@�H>�;>���| ¼��`�pf�z-W�>@������:����3�/�&�=��fԑ`�Z>�j��
���!��Ŝ�BgM6$N���|�V|s{>@#>��[>@�X|����f��`�4IEND�B`��PNG


IHDR w}YgAMA���asRGB���	pHYs��~�XIDATx�c�����bΨfΜ����0OO�������#� (
� �s�B��0>����::{|90�x��tF��IEND�B`��PNG


IHDRP0p��	pHYs���o�dgAMA���a�PLTE&&&$$$&&&���������������������������������������������������������������������������������YYYBBB&&&'=U������������������������������������������������������w��tRNS;EwfN>4.)?e��sRGB���[IDATx���n�0i蝞�4!$M������T�Xԙg�F��`��sZ����qZ��à�s��g�vѽ>�B��C��_뷗�ϻۛ�J{>[�ޜO��|�'\�1�a:)��St+VtoΧ4h�8�
:�\���):(
E�����RV��*��iܙ��⪐�g������t�,�%W>���)U
��nz
�:���=(h.��'�Ӓ�Ԃ���mOa�0w�d����bW��������\+��{\b�{��ޜP�i#υ=�W���3�	m����S_�fP�M;���w��[��=t8ly�0��[^�4��8+��;�|���
�n���3ԝ?M�7�F2�I0
IEND�B`��PNG


IHDR@ �C��	pHYs����k�gAMA���aEPLTE��������������������������������������������������u��K��0��"y���x�tRNS 0@`p�����c4���IDATx���C0F�R���Z��R:.:#w�q�l����~c]&H��C|O*����3�Rɇ�Q�<�3~,����<�Ӑ~��Z��%C�7������2�>ru���m��`�su
��_��r�5
t�Az��A"��#���+�Y-��%RO�FE��AbQ~��\[Q�5L�1L����q��<�\�򹂓��D��A�[IEND�B`��PNG


IHDR `K���	pHYs��]PLTEUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU"y�"y�"y�"y�"y�"y�"y�"y�"y�"y�������������������������������Wp��tRNS 0@������Ͽ���@0  0@�����*Bd� cHRMz%������u0�`:�o�_�F.IDATx�ݓ�� E�9u0uNtN�C�(�K��Տ�B[ �4��"�s5�C��"�f�:"��=��2+;�"�4�+.x̗��<��4@�J�K�>3_ٞ6ϰ�8@��o~�?Q�������8pM�pCǀ��h�A�P[�;؍!��M�y��c~��W��JU_���Y�����y�]���~��F�<��|']@"�D�H�4t���d�����=h�Y�n���_x̯Y�i��:tJoU_r��9����y�]���~��/�_.�Ȯ��IEND�B`��PNG


IHDR `|"p�	pHYs���+ cHRMz%������u0�`:�o�_�F�IDATx���KTm�S�M%)�-T�(��1��E9B?�.ZD�"pa?����muWB���}s7A�@�Zn�Zd�
�.�<s���gs���/���<���s�y�sg:�����tA0�8��@V#����
�cY�8����^��&�8�����cK��Jop?Rϙ��=o�T-��/�$��v	Xi�<ƹ_�O�;�@���1��Woy�I�i�6�[��7���p!��10��e�om򦑪�"�yQҖ	"`�tނ��R\6�#�[���y%c���q)�s�읦;)��)”��I��Q��g9�)p���`�g�/q�����l�C��솷��!)X�yk���نcQ[y�@;x��y�Z	�n�&E��T�B�	dz�9K~��w	H=�W��� �j+lp�\�Hk]���%RP�����J��u�T0�W��1j'L�ن���f���Z�s���T�����a���
\�����r����v&�X{@���W¨V��9f�#:��,��G���?@0�-��`T�s��;fCa�9�eugvWg�_<j�C�[@R_bHW  +�O�k���9dw�iH���T�I����$�\WMW���*(��p!�6�@�"����
���	dI��+�����<���:����
8�@׀�l�s�[�T-f�KM"�����	Iγ��R��"�Dw4.�V�р�l�4E�#��&�&���^EQ"�Y� ǘ0����M���;d��(�3:ݩN�tނ����ບ�J �o�x�9sg+�bTL���w��dp�]��`�$�-��@���$0,�r9�<�|#�iD��%p������pIAvEV���<�D`���m8��!��|�bv���<�6L��9�'�'�n+-���M�b�zpϫ|���œO��~��~§ih'����K!���w�Š��-l�J�f�]\37��Z��r��zD##��7�!/᮪S��X���A�Қ�
u�SS
�앂cU�2+�vsZ�~�j��	�ˠ�������i������0�|���e�3�2���-/<�H�C�K	� BnYa!�`�)x���I�!�fRS!&�RC��~�(iF��?pp�rgձ�r�����U�ׇF�+�m�AN��#��NpK�Y��n`$o��z!.p�����U۫��`[Ȩ�[�T-��/q>	�a� D���n3�A��%�G�h5���7BR�H���5����0����e�����ɛ!2�2?S5^lA��8�x�u�����C�� �J�e��3��<��;Mw�)�Ԟ8�'Y�x�TF`Xr8�s�&0���3�/�ܿ�_yn��ۊ�5�-`���[1��	w�� ���c��8?�Y;x�4
�]pۘ7Y��NrJ
7z"���s+ކ�G�BdK�c���ySl�a�*�?�"��_���";/�u�f���h;'�{�����Q~�-r�(��CW�_͹چ�"�	��z�0��?��&r߸�9��/�r��_#DO5�����]�^P�j/�|@ڵ���T����(�KH�-��8��Vi��o<��3�i��e�5��b��<�DHt��8~-�Ys�;�4$�Lj*ĤH�ފI��Ռ�>����H����͏��n�4��ЕIEND�B`��PNG


IHDR\Y�6'	pHYs��(J�gAMA���aPLTE������x�oSIDATx�c`���O480�x0*��׬bga�QIEND�B`��PNG


IHDR:���	pHYs����k�gAMA���aIDATx�c8��F3�!����w�߁�5�IEND�B`��PNG


IHDR$l�	pHYs���+�IDATx���ͩ�0`K�yX�%�q?m�]:��,!%XBJH	�(��l2��s�l��cn~�v�D�Y��o�]O_͆�a�*�Ň�=%�IX�1������msu�
��604�)D�ў3(�q�@u�>J�-@���'��7�Ÿi��c���/�o�nߍ
�AFަh�@~�8P�@�BX'"�H$�$��_�7qծ��f�ý0O��C��$��\�k���6��:�A�T�����h���g ��O%���d�ݓB՛P��4��1�	qm�c��J��	��Ɔ� #oS�F �]�
A���u"�D"�H�|��f ����l8�9橢Z|(��S���u3��{m^�f0W�� �p�jC3�BP�9�R�$P�����!���{R�z*����;9&:!�
�rL�V�0����0d�mJ���෋�!H�1�ND"�H��4ȴ[IEND�B`��PNG


IHDR\�E33gAMA���a	pHYs��(J��IDATx��R�
�0<��Q:AE�_\X���sI���?=�������	��@ ���n�^"e����֛=/f�Y2ڌ&Qj����T�P�n��E�Pz�?Q 矧��J;J��w�U�,��߭���������)f�a�Di��21㞿�u�$�n?�o����h	��]��R6��� (�P)(� (��߇�>mV����IEND�B`��PNG


IHDR\�E33gAMA���a	pHYs��(J�qIDATx��۵1Џ���=�b���z�{͹Ǔ+uz��(��j����(��g��<�G<��~rW����0���3%���� Q$
�D�(@�Hn��(),�CY��|IEND�B`��PNG


IHDR\�E33	pHYs��(J�gAMA���a�IDATx���_
@0�)��(�7P.@��`��RߗX��F��AV�mX��	�����8��R��T8<y�d[�t'������SM��;���~���w>����+�� �@(B
�PR��X)Qu��,��IEND�B`��PNG


IHDR$l�	pHYs���+�IDATx��ύ!�]� V�%�5��e�0�ܐR�o�Dʜr�Hn`�)�� Br�zH��ow�
O�$�c��{�1�C��{<<<0��AdA>��4�߾6� B�@^�0j�#H%^��A��g��
�$��(7꓃�)��������-@*��˦
m ��a50���D_����V	d���t0&`$�CvK���ms|ii<-�W.�4&_CpI���
t�Ĉ6�~�o�)EQ��{o����85�Af�8�S�xns-�
�%��E�Z�$�3v�X�S\&�.J��c�1��/'~g2��ڴo)�?�FN-
@�ęL�� M��J
�`E�4>���=z��q�~` :�Ȃ����>[��@�ad*�2 I/<�Td
�K�8%�8�ȉ��1�A'��
�L�N���x �;F�r ��Mk(�� 
��1����Ld�\��+�p�i�;F��h�;FW7�K�^X�P
t����y/���
�J�l$A� l� �@�Ȕ��iM��\4&�&`�8] QZ�:u$rǸ"/��~�l���ma�����D0dA�n��$ȂD�Z�#�\O�0^4�Ah��	(����������M�s��4)�#�GiZgn��ՏJi��~�أG�=\<>�a :�Ȃ|fQhr�}m@�����a� G�J�p
�K�8%�8��IP9#2Pn�'�S��%>{���[�T�!ǗM�
@��j`�剾dM':Q��$f+�`L�HB�어��M#����x&ZT�\*iL���Pt���m�W��ߔ%6R��>�3�ަ�yυqj.���q$r�����ZK⣋��zI�g�ڱ��L]�j];ƌc�_N��d��i�R�o���Z��3�B�@�ԙ���i|��{�p��!���IEND�B`�.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}]*/
}
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(t){"use strict";var i=function(){function t(n){this._context=n}return t.evaluateProperty=function(n,i,r,u){var f=function(n,i){if(n)try{var u=t.getPagePropertyDescriptor(r,n,i);return u?u:f(r.Object.getPrototypeOf(n),i)}catch(e){return e.name==="TypeError"?{}:void 0}return n},e=function(n,t,i){if(i){if(typeof i.value!="undefined"&&i.value!==null)return i.value;var f=typeof n;if(f!=="object"&&f!=="function"&&(n=new r.Object(n)),i.isSafeGet)return u(n,t)}return};return n&&e(n,i,f(n,i))},t.getObjectContextPropertiesNames=function(t){var r=[],u,f,e,i,o;if(t.object!==null&&t.object!==undefined)for(u=typeof t.object,u!=="object"&&u!=="function"&&(t.object=new t.windowContext.Object(t.object)),f=n.RemoteHelpers.getValidWindow(t.windowContext,t.object),f.isValid&&(t.object=t.windowContext=f.window),e=t.windowContext.Object.getOwnPropertyNames(t.object),e&&(r=e),i=t.windowContext.Object.getPrototypeOf(t.object);i;)o=t.windowContext.Object.getOwnPropertyNames(i),r=Array.prototype.concat.call(r,o),i=t.windowContext.Object.getPrototypeOf(i);return r},t.prototype.getIntellisenseItemsForExpression=function(n){return this.getIntellisenseItemsForExpressionUsingWindowContext(n,this._context.currentWindowContext,this._context.currentWindowContext.window,[])},t.prototype.getIntellisenseItemsForExpressionUsingWindowContext=function(n,i,r,u){var f=this.getObjectContextForExpressionUsingEvaluator(n,i,r,t.evaluateProperty),e=n.length===0&&i===r;return this.getIntellisenseItemsForObjectContext(f,t.getObjectContextPropertiesNames,e,u)},t.getPagePropertyDescriptor=function(t,i,r){var u=function(n,t){var i,r;try{window.__BROWSERTOOLS_CONSOLE_INTELLISENSE_DESCRIPTOR=null;i=Object.getOwnPropertyDescriptor(n,t);i&&(r=!1,i.get&&/\[native code\]/.test(i.get.toString())?r=!0:typeof i.get=="undefined"&&(r=!0),window.__BROWSERTOOLS_CONSOLE_INTELLISENSE_DESCRIPTOR={value:i.value,isSafeGet:r})}catch(u){}};try{return n.RemoteHelpers.executeScript("window.__BROWSERTOOLS_CONSOLE_INTELLISENSE_GET_DESCRIPTOR = "+u.toString(),t,!0),t.__BROWSERTOOLS_CONSOLE_INTELLISENSE_GET_DESCRIPTOR(i,r),t.__BROWSERTOOLS_CONSOLE_INTELLISENSE_DESCRIPTOR}catch(f){return new t.Object(null)}},t.prototype.getObjectContextForExpressionUsingEvaluator=function(t,i,r,u){for(var s,o,e=t.split("."),f=0;f<e.length&&e[f].length>0;++f)s=n.PropertyEvaluationIgnoreList.propertyEvaluationFunction(i,r),r=u(r,e[f],i,s),o=n.RemoteHelpers.getValidWindow(i,r),o.isValid&&(r=i=o.window);return{object:r,windowContext:i}},t.prototype.elementHasId=function(n){return Object.getOwnPropertyDescriptor(n,"id")?!1:typeof n.id!="string"?!1:n.id!==""},t.prototype.getGlobalElementNames=function(n){var t=this,i=n.windowContext.document.querySelectorAll("[id]"),r=Array.prototype.filter.call(i,function(n){return t.elementHasId(n)});return Array.prototype.map.call(r,function(n){return""+n.id})},t.prototype.getIntellisenseItemsForObjectContext=function(n,i,r,u){var e=i(n),o,h,s,f;for(r&&(e=Array.prototype.concat.call(e,t.JSKeywords),e=Array.prototype.concat.call(e,u),e=Array.prototype.concat.call(e,this.getGlobalElementNames(n))),o=[],f=0,h=e.length;f<h;f++)String.prototype.match.call(e[f],/^\d/)||o.push({name:e[f],info:""});for(s=function(n,t){return n<t?-1:n>t?1:0},o=Array.prototype.sort.call(o,function(n,t){var i=s(n.name.toLowerCase(),t.name.toLowerCase());return i===0?s(t.name,n.name):i}),f=1;f<o.length;)o[f-1].name===o[f].name?o.splice(f,1):f++;return{choices:o}},t.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","$","$$"],t}();t.IntellisenseRemoteHelpers=i})(t=n.Intellisense||(n.Intellisense={}))})(Common||(Common={}))
//# sourceMappingURL=intellisenseRemoteHelpers.min.js.map
.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;
}

.BPT-listItemSelectedIndent {
    border-left: 1px solid transparent;
    border-left-color: TRANSPARENT;         /*[{plugin-font-editor-collapse-adornment-color}]*/
    display: block;
    position: absolute;
    width: 1px;
    z-index: 100;
}
.listview {
    position: relative;
    border: 1px solid transparent;
    overflow: auto;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    -ms-user-select: none;
    white-space: nowrap;
}

.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;
    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;
    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({vs-image-icon-tree-collapsed}) no-repeat center center]*/
    background-size: 10px 10px;
}

.listview-icon-tree-expanded {
    background: url('') no-repeat center center; /*[url({vs-image-icon-tree-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}]*/
}
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(t){"use strict";var i=function(){function n(n){this._context=n}return n.getNamedPropertiesHelper=function(n){var t=n,i=Object.getOwnPropertyNames(t),r=Object.keys(t),i=i.filter(function(n){var t=r.indexOf(n);return t!==-1&&(isNaN(n)||n<0)});return i},n.prototype.getNamedProperties=function(t){return n.getNamedPropertiesHelper(t)},n.prototype.getAllPropertyNames=function(n,i){var r,u,f;if(i===void 0&&(i=!1),r=[],n)for(u=this._context.currentWindowContext.Object.getOwnPropertyNames(n),u&&(r=Array.prototype.concat.call(r,u)),f=this._context.currentWindowContext.Object.getPrototypeOf(n);f&&!i;)u=Object.getOwnPropertyNames(f),r=Array.prototype.concat.call(r,u),f=this._context.currentWindowContext.Object.getPrototypeOf(f);return Array.prototype.sort.call(r,t.TreeViewUtils.propertyNameCompare)},n.prototype.hasMembers=function(n){for(var t=n,i;t&&t!=="undefined";){if(i=this._context.currentWindowContext.Object.getOwnPropertyNames(t),i&&i!=="undefined"&&i.length>0)return!0;t=this._context.currentWindowContext.Object.getPrototypeOf(t)}return!1},n}(),r,u;t.TreeViewRemoteObjectExplorer=i;r=function(){function n(){}return n.prototype.getAllPropertyNames=function(n){var i=[];for(var r in n)i.push(r.toString());return i.sort(t.TreeViewUtils.propertyNameCompare)},n.prototype.getNamedProperties=function(n){return i.getNamedPropertiesHelper(n)},n.prototype.hasMembers=function(n){var t=n;for(var i in n)return!0;return!1},n}();t.TreeViewDirectObjectExplorer=r;u=function(){function i(n,t){this._maxItemTraverseCount=500;this._maxUngroupArraySize=50;this._arrayGroupSize=10;this._context=n;this._treeViewObjectExplorer=t}return i.prototype.createOutputObject=function(i,r,u,f){var e=n.ObjectView.TreeViewUtils.getDetailedTypeOf(r,this._context.constructors),h,l,o,s,a,v,p,c,y,w,b;if(u!==undefined&&!f)if(r=r[u],r)e=n.ObjectView.TreeViewUtils.getDetailedTypeOf(r,this._context.constructors);else return null;if(l=!this.isEmpty(r),l){if(h=this.createName(r,e),h==="[object Window]"&&n.RemoteHelpers.isCrossSiteWindow(this._context.currentWindowContext,r))try{a=dom.getCrossSiteWindow(this._context.currentWindowContext,r);a&&(r=a)}catch(k){o=[{propertyName:"error",propertyValue:this.createExceptionValue({message:"Access denied."})}]}o||(s=remoteHelpers.getUid(),this._context.resultMap[s]=r,o=e==="array"?this.createArrayObject(s,r,u,f):this.createValue(r,s,f))}else h=null,o=this.createValue(r);if(v=this._context.getHtmlViewableTypeName(r),p=v!==null&&v!=="AttributeNode",r){y=!1;try{y=r.toString&&r.toString()!=="[object]"&&r.toString.toString().indexOf("[native code]")===-1}catch(k){}y?c=n.EncodingUtilities.escapeHtml(r.toString()):e==="array"&&r.length>this._maxUngroupArraySize?(w=r.slice(0,this._maxUngroupArraySize),b=this.createArrayObject("fakeId",w,u),c=t.TreeViewValueStringBuilder.createValueString(b,e,!0)):c=t.TreeViewValueStringBuilder.createValueString(o,e)}return{inputId:i,consoleType:"consoleItemOutput",detailedType:e,isExpandable:l,isHtmlViewableType:p,name:h,value:o,valueString:c,uid:s}},i.prototype.createArrayObject=function(n,t,i,r){var y=!1,c,u,f,e,a,s,v,h,l,o;if(r&&i&&i.indexOf(":")!==-1?(a=i.split(":",2),f=parseInt(a[0],10),e=parseInt(a[1],10)+1,c=e-f,y=!0):(c=t.length,f=0,e=c,i=null),c<=this._maxUngroupArraySize){if(u=this.createValue(t.slice(f,e),n,!1,!0),u=u.filter(function(n){return!isNaN(parseInt(n.propertyName,10))}),y||e-f!==u.length)for(s=0;f<e;)v=typeof t[f],v==="object"?u[s].propertyValue.value=n+":"+f.toString():v==="undefined"&&u.splice(s,0,{propertyName:String(s),propertyValue:{detailedType:"undefined",isExpandable:!1,isHtmlViewableType:!1,name:String(s),value:undefined}}),u[s++].propertyName=String(f++)}else{for(h=this._arrayGroupSize;h*h<c;)h*=h;for(u=[],l=f,o=f;o<e;)o+=h,o=o<e?o:e,u.push({propertyName:"["+l+"..."+(o-1)+"]",propertyValue:{detailedType:"array",isExpandable:!0,isHtmlViewableType:!1,name:null,value:n+"#internal:"+l+":"+(o-1)}}),l=o}return u=this.addPropertiesToOutputObject(u,t,n,!1,!0,!0),i||u.push({propertyName:"length",propertyValue:{detailedType:"string",isExpandable:!1,isHtmlViewableType:!1,name:"length",value:String(t.length)}}),u},i.prototype.createValue=function(t,i,r,u){var f,e,o;return(r===void 0&&(r=!1),u===void 0&&(u=!1),t===null)?null:(f=this.isEmpty(t),f)?(e=n.ObjectView.TreeViewUtils.getDetailedTypeOf(t,this._context.constructors),this.createName(t,e)):(o=[],this.addPropertiesToOutputObject(o,t,i,r,u,!1))},i.prototype.addPropertiesToOutputObject=function(r,u,f,e,o,s){var w,k,c,p,l;e===void 0&&(e=!1);o===void 0&&(o=!1);s===void 0&&(s=!1);w=!1;k=n.ObjectView.TreeViewUtils.getDetailedTypeOf(u,this._context.constructors);try{var a=s?this._treeViewObjectExplorer.getNamedProperties(u):this._treeViewObjectExplorer.getAllPropertyNames(u,o),h,g=a.length,nt=n.PropertyEvaluationIgnoreList.propertyEvaluationFunction(this._context.currentWindowContext,u);for(c=0;c<g;c++)try{if(c>0&&a[c]===a[c-1])continue;h=""+a[c];var v=nt(u,a[c]),y=n.ObjectView.TreeViewUtils.getDetailedTypeOf(v,this._context.constructors),b=null;w=w||y==="function";p=!this.isEmpty(v);p&&(b=this.createName(u[h],y),b==="null"&&(p=!1));var d=this._context.getHtmlViewableTypeName(v),tt=d!==null&&d!=="AttributeNode",it=e&&y==="function"||!e&&y!=="function"||k==="array";it&&(l={detailedType:y,isExpandable:p,isHtmlViewableType:tt,name:b,value:p?f+":"+h:this.createValue(v,undefined,!1),valueString:null},l.valueString=l.isExpandable?t.TreeViewValueStringBuilder.createPropertyValueString(l,v):t.TreeViewValueStringBuilder.formatPropertyValueString(l.value),i.EmptyOrHeadingTrailingWhiteSpaceRegEx.test(h)&&(h='"'+h+'"'),r.push({propertyName:h,propertyValue:l}))}catch(rt){r.push({propertyName:h,propertyValue:this.createExceptionValue(rt)});continue}e||!w||s||r.push({propertyName:"[functions]",propertyValue:{detailedType:"internal",isExpandable:!0,isHtmlViewableType:!1,name:" ",isInternalProperty:!0,value:f+"#internal:[functions]"}})}catch(ut){r.push({propertyName:"0",propertyValue:this.createExceptionValue(ut)})}return r},i.prototype.isEmpty=function(n){if(n===null)return!0;var t=typeof n;if(t==="object"||t==="function")try{if(this._treeViewObjectExplorer.hasMembers(n))return!1}catch(i){return!1}return!0},i.prototype.createName=function(t,i){i||(i=n.ObjectView.TreeViewUtils.getDetailedTypeOf(t,this._context.constructors));switch(i){case"boolean":return""+t;case"date":return"[date] "+t;case"function":return""+t;case"null":return"null";case"number":return""+t;case"regex":return"[regex] "+t;case"string":return'"'+t.slice(0,1024)+'"';case"undefined":return"undefined";case"array":return this.isEmpty(t)?n.ObjectView.TreeViewUtils.ConsoleUITypeStrings.arrayName:this.getPrototypeName(t);case"object":case"htmlElement":return this.isEmpty(t)?n.ObjectView.TreeViewUtils.ConsoleUITypeStrings.objectName:this.getPrototypeName(t);default:return""+t}},i.prototype.getPrototypeName=function(n){var t;try{t=Object.prototype.toString.call(n)}catch(i){t=null}return t},i.prototype.createExceptionValue=function(t){var r=t.message||t.description,i="<"+r.trim()+">";return i==="<>"&&(i="<Access denied.>"),{detailedType:"exception",isExpandable:!1,value:i,valueString:n.EncodingUtilities.escapeHtml(i)}},i.EmptyOrHeadingTrailingWhiteSpaceRegEx=/^$|^\s|\s$/,i}();t.TreeViewRemoteHelpers=u})(t=n.ObjectView||(n.ObjectView={}))})(Common||(Common={}))
//# sourceMappingURL=treeViewRemoteHelpers.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(t){"use strict";var u=function(){function t(){}return t.getDetailedTypeOf=function(n,t){var r,i;if(n===undefined)return"undefined";if(r=typeof n,r==="object"&&t){if(n)for(i=0;i<t.length;i++){var u=t[i]&&t[i].array?t[i].array:[].constructor,f=t[i]&&t[i].date?t[i].date:(new Date).constructor,e=t[i]&&t[i].regex?t[i].regex:new RegExp("").constructor;try{if(n.constructor===u)return"array";if(n.constructor===f)return"date";if(n.constructor===e)return"regex"}catch(o){}}else return"null";return"object"}return r},t.getVisibleHtmlElementText=function(n){if($m(n).is(":visible")){if(n.nodeType===3)return n.nodeValue;for(var r="",i=0;n.childNodes[i];)r+=t.getVisibleHtmlElementText(n.childNodes[i]),i++;return r}return""},t.createPadding=function(n,t){var i,r;if(n===0)return"";for(i="",r=0;r<n;r++)i+=t;return i},t.getIndentedObjectString=function(t,i,r,u,f,e){var v="",h=""+t,l,o,a,c,y,s,p,w;if(/\S/.test(h))if(l=0,o=[],i==="string")e&&(h=n.EncodingUtilities.escapeHtml(h)),v=h.replace(/(\r\n|\n\r|\r|\n)/g,f);else{for(a=h.replace(/^\s+|\s+$/g,"").split(/[\r\n]+/),c=0;c<a.length;c++)if(a[c]!==""){if(y="",s=a[c],e&&(s=n.EncodingUtilities.escapeHtml(s)),s=s.replace(/^\s+|\s+$/g,""),i==="function"){for(/^\}/.test(s)&&l--,p=0;p<l;p++)y+=u;/\{$/.test(s)&&l++}o.push(y+s)}w=f;i==="function"&&o.length===3&&(o[1]=o[1].replace(/^(&nbsp;)+/,"").replace(/^\s+|\s+$/g,""),o[2]=o[2].replace(/^\s+|\s+$/g,""),w=" ");v=o.join(w)}return v},t.propertyNameCompare=function(n,i){var f,e,r,u;return isNaN(f=parseInt(n,10))||isNaN(e=parseInt(i,10))?(r=n.toLowerCase(),u=i.toLowerCase(),r===u?t.stringValueCompare(n,i):t.stringValueCompare(r,u)):f-e},t.stringValueCompare=function(n,t){return n<t?-1:n>t?1:0},t.ConsoleNotifyType={assert:"consoleItemError",error:"consoleItemError",info:"consoleItemInfo",log:"consoleItemLog",warn:"consoleItemWarn",internalMessage:"internalMessage"},t.ConsoleInternalMessage={startGroup:"startGroup",startGroupCollapsed:"startGroupCollapsed",endGroup:"endGroup",displayTraceStyles:"displayTraceStyles"},t.ConsoleUITypeStrings={functionName:"[function]",objectName:"[object]",arrayName:"[array]",emptyArray:" [ ]",emptyObject:" { }",expandableArray:" [...]",expandableObject:" {...}"},t.ConsoleFilterId={all:-1,error:0,warning:1,message:2,log:3},t}(),i,r;t.TreeViewUtils=u;i=function(){function t(){}return t.createValueString=function(n,i,r){var u;if(r===void 0&&(r=!1),n&&typeof n=="object"){var e,h=!0,o="<span>",s,f="<\/span>";switch(i){case"object":o=o+"{";s=!0;f="}"+f;break;case"array":o=o+"[";s=!1;f="]"+f;n=n.filter(function(n){return!isNaN(parseInt(n.propertyName,10))});break;default:return}for(e=o,u=0;u<n.length;u++)if(n[u].propertyName.substr(0,2)!=="__"&&n[u].propertyName!=="[functions]"&&(h||(e+=", "),h=!1,s&&(e+=t.createPropertyNameToken(n[u]),e+=": "),e+=t.createPropertyValueToken(n[u]),u>20)){r=!0;break}return r&&(f=" ..."+f),e+f}},t.createPropertyValueString=function(t,i){var r,u;try{switch(t.detailedType){case"array":if(r=t.value.indexOf(":"),r!==-1)return"Array["+n.EncodingUtilities.escapeHtml(i.length)+"]";case"object":if(r=t.name.indexOf(" "),r!==-1)return u=n.EncodingUtilities.escapeHtml(t.name.substr(r+1,t.name.length-r-2)),u+" {...}"}}catch(f){}return t.detailedType},t.formatPropertyValueString=function(t){if(t&&typeof t=="string"){var i=t.length>15?t.substr(0,12)+'..."':t;return i=String.prototype.replace.call(i,/(\r\n|\n\r|\r|\n)/g,"  "),n.EncodingUtilities.escapeHtml(i)}return t},t.createPropertyValueToken=function(n){var t;switch(n.propertyValue.detailedType){case"undefined":t="valueStringToken-Undefined";break;case"null":t="valueStringToken-Null";break;case"boolean":t="valueStringToken-Boolean";break;case"number":t="valueStringToken-Number";break;case"string":t="valueStringToken-String";break;case"function":t="valueStringToken-Function";break;case"array":t="valueStringToken-Array";break;case"object":t="valueStringToken-Object";break;default:t="valueStringToken-Default"}return"<span class ='"+t+"'>"+n.propertyValue.valueString+"<\/span>"},t.createPropertyNameToken=function(t){var i=n.EncodingUtilities.escapeHtml(t.propertyName);return"<span class ='valueStringToken-PropertyName'>"+i+"<\/span>"},t}();t.TreeViewValueStringBuilder=i;r=function(){function n(){}return n.formatConsoleMessage=function(){for(var r,t=[],u=0;u<arguments.length;u++)t[+u]=arguments[u];var i=0,e=n.convertToString(t[i++]),o=function(r){if(i>=t.length)return r;switch(r){case"%%":return"%";case"%d":case"%i":return n.convertToInteger(t[i++]);case"%f":return n.convertToNumber(t[i++]);case"%s":return n.convertToString(t[i++]);case"%b":return n.convertToBase(t[i++],2);case"%x":case"%X":return n.convertToBase(t[i++],16);case"%E":case"%e":return n.convertToExponential(t[i++]);default:return r}},f=e.replace(/%%|%([sbxXideEfF])/g,o);for(r=i;r<t.length;r++)f=f.length>0?f+" "+n.convertToString(t[r]):n.convertToString(t[r]);return f.slice(0,1024)},n.convertToString=function(n){var t;try{n===undefined||n===null?t=String(n):(t=n.toString(),typeof t!="string"&&(t="[object Object]"))}catch(i){t="[object Object]"}return t},n.convertToInteger=function(t){var i=n.convertToNumber(t);return isNaN(i)?i.toString():Math.round(i-i%1).toString()},n.convertToBase=function(t,i){var r=n.convertToNumber(t),u;return isNaN(r)?r.toString():(u={"2":"0b","8":"0","16":"0x"}[i]||"",u.toString()+(r<0?(r>>>0).toString(i):r.toString(i)))},n.convertToExponential=function(t){var i=n.convertToNumber(t);return isNaN(i)?i.toString():i.toExponential()},n.convertToNumber=function(t){return isNaN(t)||t===null?Number(n.convertToString(t)):Number(t)},n}();t.TreeViewStringFormatter=r})(t=n.ObjectView||(n.ObjectView={}))})(Common||(Common={}))
//# sourceMappingURL=treeViewUtilities.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var F12,__rpcLog;(function(n){var t;(function(n){var t;(function(t){"use strict";var u=function(){function t(n,t,i,r,u){var f=this;this._ourIdentifier=n;this._nextId=0;this._promiseTable={};this._jsonRpcMethodReceive=t;this._jsonRpcNotificationReceive=i;this._postMessage=r;Date.now||(Date.now=function(){return+new Date});this._startTime=Date.now();u(function(n){f.onMessage(n)})}return t.prototype.jsonRpcMethodCall=function(n,t,r,u,f){var s=this,o=this._ourIdentifier+"|"+this._nextId,e;return this._nextId++,this._promiseTable[o]={completed:r,error:u},e=JSON.stringify({id:o,method:n,params:t}),this.logTraffic(e),i.RandomDelay?(i.queueData(function(){s._postMessage(e,f)},e),!0):this._postMessage(e,f)},t.prototype.jsonRpcNotification=function(n,t,r){var f=this,e=this._ourIdentifier+"|NULL",u=JSON.stringify({id:e,method:n,params:t});this.logTraffic(u);i.RandomDelay?i.queueData(function(){f._postMessage(u,r)},u):this._postMessage(u,r)},t.prototype.logTraffic=function(n){if(isDebugBuild){var t=("  "+(Date.now()-this._startTime)/1e3).slice(-9);__rpcLog.push(t+" | "+n);__rpcLog.length>100&&__rpcLog.shift()}},t.prototype.onMessage=function(t){var f=this,r,u;this.logTraffic(t.data);r=JSON.parse(t.data);u=r.id.split("|");n.Utility.Assert.areEqual(u.length,2);u[1]==="NULL"?u[0]!==this._ourIdentifier&&this._jsonRpcNotificationReceive(r.method,r.params):u[0]===this._ourIdentifier?i.RandomDelay?i.queueData(function(){f.handleReply(r)},t.data):this.handleReply(r):i.RandomDelay?i.queueData(function(){f.handleCall(r)},t.data):this.handleCall(r)},t.prototype.handleReply=function(t){if(!this._promiseTable[t.id]){n.Utility.Assert.failDebugOnly("Can't complete a promise that does not exist in the promise table. Probably a dup reply msg.");return}t.error?(n.Utility.Assert.isUndefined(t.data,"Can't have both data and error"),this._promiseTable[t.id].error(t.error)):this._promiseTable[t.id].completed(t.data);delete this._promiseTable[t.id]},t.prototype.handleCall=function(t){var i=this;this._jsonRpcMethodReceive(t.method,t.params,function(r,u){var f;r!==null&&r!==undefined?(n.Utility.Assert.isUndefined(u,"Can't have both data and error"),f=JSON.stringify({id:t.id,data:r})):(n.Utility.Assert.hasValue(u,"RPC call returned no value, but no error object either"),f=JSON.stringify({id:t.id,error:u}));i._postMessage(f)})},t}(),r,i;t.JsonRPCEndpoint=u;r=function(){function n(n,t){this.callback=n;this.message=t}return n}();t.RpcDelayData=r;i=function(){function n(){}return n.enableDelay=function(t,i){n.RandomDelay=!0;n.CalculateDelayTime=t;n.DelayedMessage=i},n.disableDelay=function(){n.RandomDelay=!1;n.RandomDelayTimeout&&(clearTimeout(n.RandomDelayTimeout),n.RandomDelayTimeout=null,n.clearQueue())},n.queueData=function(t,i){var f=new r(t,i),u;n.DelayedQueue.push(f);n.RandomDelayTimeout||(u=n.CalculateDelayTime(i),n.RandomDelayTimeout=setTimeout(n.fireRandomly,u))},n.fireRandomly=function(){var t=n.DelayedQueue.shift(),i;n.DelayedMessage(t.message);t.callback();n.DelayedQueue.length>0?(i=n.CalculateDelayTime(n.DelayedQueue[0].message),n.RandomDelayTimeout=setTimeout(n.fireRandomly,i)):n.RandomDelayTimeout=null},n.clearQueue=function(){for(var i,t=0;t<n.DelayedQueue.length;t++)i=n.DelayedQueue[t],n.DelayedMessage(i.message),i.callback();n.DelayedQueue=[]},n.RandomDelay=!1,n.DelayedQueue=[],n}();t.RpcDelayHook=i})(t=n.RPC||(n.RPC={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));isDebugBuild&&(__rpcLog=[])
//# sourceMappingURL=rpc.min.js.map
.resourceGrid {
    display: flex;
    flex-flow: column;
}

.resourceGrid * {
    box-sizing: content-box;
}

/* Prevent scrollbar appearing during resize */
.resourceGrid .slick-viewport {
    overflow-x: hidden !important;
}

.resourceGrid .slick-header-column {
    background: TRANSPARENT; /*[{plugin-resources-grid-cell-odd-background-color}]*/
    border: none !important;
    border-left: 1px solid TRANSPARENT !important; /*[1px solid {plugin-resources-grid-vborder} !important]*/
}

    .resourceGrid .slick-header-column.slick-header-column-active,
    .resourceGrid .slick-header-column.slick-header-column-active + .slick-header-column {
        /* Ensure the cursor is still the resize style during resize when it is not directly on top of the resize handle */
        cursor: col-resize;
    }

.resourceGrid .slick-header-columns {
    border-top: 1px solid TRANSPARENT !important; /*[1px solid {plugin-resources-grid-header-hborder} !important]*/
    border-bottom: 1px solid TRANSPARENT !important; /*[1px solid {plugin-resources-grid-header-hborder} !important]*/
}

.resourceGrid .slick-row.odd {
    background: TRANSPARENT; /*[{plugin-resources-grid-cell-odd-background-color}]*/
}

.resourceGrid .slick-row.even {
    background: TRANSPARENT; /*[{plugin-resources-grid-cell-even-background-color}]*/
}

.resourceGrid .slick-row.ui-state-active,
.resourceGrid .slick-row.active,
.resourceGrid .slick-cell.selected {
  background: TRANSPARENT; /*[{plugin-resources-grid-active-row-background}]*/
}

.resourceGrid .resourceGrid-cell-text {
    overflow: hidden;
    text-overflow: ellipsis;
    height: inherit;
}

.resourceGrid .slick-cell {
    border: none;
    border-left: 1px solid TRANSPARENT; /*[1px solid {plugin-resources-grid-vborder}]*/
    border-bottom: 1px solid TRANSPARENT; /*[1px solid {plugin-resources-grid-hborder}]*/
    overflow: hidden;
}

    /* Shift read-mode text down to be centered vertically */
    .resourceGrid .slick-cell:not(.editable) {
        padding-top: 2px;
        padding-bottom: 0px;
    }

    .resourceGrid .slick-cell.active {
        border: none;
        outline: 1px solid TRANSPARENT; /*[1px solid {plugin-resources-grid-active-cell-border}]*/
        border: none !important;
        margin-left: 1px;

        background: TRANSPARENT; /*[{plugin-resources-grid-active-cell-background}]*/
        z-index: 2;
        white-space: pre;
    }

        @media screen and (-ms-high-contrast: active) {
            .resourceGrid .slick-cell.active {
                text-decoration: underline;
                background: TRANSPARENT; /*[{plugin-resources-grid-active-cell-background rgba(.18)}]*/
                outline-width: 3px;
            }
        }

        .resourceGrid .slick-cell.active.editable {
            background: TRANSPARENT; /*[{plugin-resources-grid-editable-cell-background}]*/

            /* Shift text up to be centered vertically */
            padding-top: 0px;
        }

        .resourceGrid .slick-cell.active.editable input.editor-text {
            width: 100%;
            height: 100%;
            border: none !important;
            margin: 0;
            padding: 0;
            outline: none;
        }

.resourceGrid .resourceGrid-title {
    margin: 5px;
    white-space: nowrap;
    flex: 0 0 auto;
    cursor: default;
}

.resourceGrid .resourceGrid-grid {
    height: 100%;
    flex: 0 1 auto;
}(function(n){function r(){var n=!1,t=!1;this.stopPropagation=function(){n=!0};this.isPropagationStopped=function(){return n};this.stopImmediatePropagation=function(){t=!0};this.isImmediatePropagationStopped=function(){return t}}function e(){var n=[];this.subscribe=function(t){n.push(t)};this.unsubscribe=function(t){for(var i=n.length-1;i>=0;i--)n[i]===t&&n.splice(i,1)};this.notify=function(t,i,u){var e,f;for(i=i||new r,u=u||this,f=0;f<n.length&&!(i.isPropagationStopped()||i.isImmediatePropagationStopped());f++)e=n[f].call(u,i,t);return e}}function o(){var n=[];this.subscribe=function(t,i){return n.push({event:t,handler:i}),t.subscribe(i),this};this.unsubscribe=function(t,i){for(var r=n.length;r--;)if(n[r].event===t&&n[r].handler===i){n.splice(r,1);t.unsubscribe(i);return}return this};this.unsubscribeAll=function(){for(var t=n.length;t--;)n[t].event.unsubscribe(n[t].handler);return n=[],this}}function s(n,t,i,r){i===undefined&&r===undefined&&(i=n,r=t);this.fromRow=Math.min(n,i);this.fromCell=Math.min(t,r);this.toRow=Math.max(n,i);this.toCell=Math.max(t,r);this.isSingleRow=function(){return this.fromRow==this.toRow};this.isSingleCell=function(){return this.fromRow==this.toRow&&this.fromCell==this.toCell};this.contains=function(n,t){return n>=this.fromRow&&n<=this.toRow&&t>=this.fromCell&&t<=this.toCell};this.toString=function(){return this.isSingleCell()?"("+this.fromRow+":"+this.fromCell+")":"("+this.fromRow+":"+this.fromCell+" - "+this.toRow+":"+this.toCell+")"}}function t(){this.__nonDataRow=!0}function i(){this.__group=!0;this.level=0;this.count=0;this.value=null;this.title=null;this.collapsed=!1;this.totals=null;this.rows=[];this.groups=null;this.groupingKey=null}function u(){this.__groupTotals=!0;this.group=null;this.initialized=!1}function f(){var n=null;this.isActive=function(t){return t?n===t:n!==null};this.activate=function(t){if(t!==n){if(n!==null)throw"SlickGrid.EditorLock.activate: an editController is still active, can't activate another editController";if(!t.commitCurrentEdit)throw"SlickGrid.EditorLock.activate: editController must implement .commitCurrentEdit()";if(!t.cancelCurrentEdit)throw"SlickGrid.EditorLock.activate: editController must implement .cancelCurrentEdit()";n=t}};this.deactivate=function(t){if(n!==t)throw"SlickGrid.EditorLock.deactivate: specified editController is not the currently active one";n=null};this.commitCurrentEdit=function(){return n?n.commitCurrentEdit():!0};this.cancelCurrentEdit=function(){return n?n.cancelCurrentEdit():!0}}n.ui={keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}};n.extend(!0,window,{Slick:{Event:e,EventData:r,EventHandler:o,Range:s,NonDataRow:t,Group:i,GroupTotals:u,EditorLock:f,GlobalEditorLock:new f}});i.prototype=new t;i.prototype.equals=function(n){return this.value===n.value&&this.count===n.count&&this.collapsed===n.collapsed&&this.title===n.title};u.prototype=new t})(jQuery)
//# sourceMappingURL=slick.core.min.js.map
(function(n){function t(t){function fi(){ot=!0}function ei(){ot=!1;e()}function oi(n){f=n}function si(n){rt=n}function d(n){var i,t,u;for(n=n||0,t=n,u=r.length;t<u;t++){if(i=r[t][c],i===undefined)throw"Each data element must implement a unique 'id' property";s[i]=t}}function hi(){for(var t,n=0,i=r.length;n<i;n++)if(t=r[n][c],t===undefined||s[t]!==n)throw"Each data element must implement a unique 'id' property"}function ci(){return r}function li(n,t){t!==undefined&&(c=t);r=h=n;s={};d();hi();e()}function ai(n){n.pageSize!=undefined&&(u=n.pageSize,l=u?Math.min(l,Math.max(0,Math.ceil(a/u)-1)):0);n.pageNum!=undefined&&(l=Math.min(n.pageNum,Math.max(0,Math.ceil(a/u)-1)));ht.notify(ct(),null,g);e()}function ct(){var n=u?Math.max(1,Math.ceil(a/u)):1;return{pageSize:u,pageNum:l,totalRows:a,totalPages:n}}function kt(n,t){nt=t;it=n;tt=null;t===!1&&r.reverse();r.sort(n);t===!1&&r.reverse();s={};d();e()}function dt(n,t){nt=t;tt=n;it=null;var i=Object.prototype.toString;Object.prototype.toString=typeof n=="function"?n:function(){return this[n]};t===!1&&r.reverse();r.sort();Object.prototype.toString=i;t===!1&&r.reverse();s={};d();e()}function vi(){it?kt(it,nt):tt&&dt(tt,nt)}function yi(n){v=n;t.inlineFilters&&(vt=br(),yt=kr());e()}function pi(){return i}function ut(r){var f,u,o;for(t.groupItemMetadataProvider||(t.groupItemMetadataProvider=new Slick.Data.GroupItemMetadataProvider),w=[],k=[],r=r||[],i=r instanceof Array?r:[r],f=0;f<i.length;f++){for(u=i[f]=n.extend(!0,{},ui,i[f]),u.getterIsAFn=typeof u.getter=="function",u.compiledAccumulators=[],o=u.aggregators.length;o--;)u.compiledAccumulators[o]=wr(u.aggregators[o]);k[f]={}}e()}function wi(n,t,i){if(n==null){ut([]);return}ut({getter:n,formatter:t,comparer:i})}function bi(n,t){if(!i.length)throw new Error("At least one grouping must be specified before calling setAggregators().");i[0].aggregators=n;i[0].aggregateCollapsed=t;ut(i)}function ki(n){return r[n]}function di(n){return s[n]}function lt(){if(!p){p={};for(var n=0,t=o.length;n<t;n++)p[o[n][c]]=n}}function gi(n){return lt(),p[n]}function nr(n){return r[s[n]]}function tr(n){var i=[],t,u,r;for(lt(),t=0,u=n.length;t<u;t++)r=p[n[t]],r!=null&&(i[i.length]=r);return i}function ir(n){for(var i=[],t=0,r=n.length;t<r;t++)n[t]<o.length&&(i[i.length]=o[n[t]][c]);return i}function rr(n,t){if(s[n]===undefined||n!==t[c])throw"Invalid or non-matching id";r[s[n]]=t;b||(b={});b[n]=!0;e()}function ur(n,t){r.splice(n,0,t);d(n);e()}function fr(n){r.push(n);d(r.length-1);e()}function er(n){var t=s[n];if(t===undefined)throw"Invalid id";delete s[n];r.splice(t,1);d(t);e()}function or(){return o.length}function sr(n){var t=o[n],r;return t&&t.__group&&t.totals&&!t.totals.initialized?(r=i[t.level],r.displayTotalsRow||(et(t.totals),t.title=r.formatter?r.formatter(t):t.value)):t&&t.__groupTotals&&!t.initialized&&et(t),t}function hr(n){var i=o[n];return i===undefined?null:i.__group?t.groupItemMetadataProvider.getGroupRowMetadata(i):i.__groupTotals?t.groupItemMetadataProvider.getTotalsRowMetadata(i):null}function gt(n,t){if(n==null)for(var r=0;r<i.length;r++)k[r]={},i[r].collapsed=t;else k[n]={},i[n].collapsed=t;e()}function cr(n){gt(n,!0)}function lr(n){gt(n,!1)}function ft(n,t,r){k[n][t]=i[n].collapsed^r;e()}function ar(){var n=Array.prototype.slice.call(arguments),t=n[0];n.length==1&&t.indexOf(y)!=-1?ft(t.split(y).length-1,t,!0):ft(n.length-1,n.join(y),!0)}function vr(){var n=Array.prototype.slice.call(arguments),t=n[0];n.length==1&&t.indexOf(y)!=-1?ft(t.split(y).length-1,t,!1):ft(n.length-1,n.join(y),!1)}function yr(){return w}function ni(n,t){for(var r,f,e=[],h={},c,o=t?t.level+1:0,s=i[o],u=0,l=s.predefinedValues.length;u<l;u++)f=s.predefinedValues[u],r=h[f],r||(r=new Slick.Group,r.value=f,r.level=o,r.groupingKey=(t?t.groupingKey+y:"")+f,e[e.length]=r,h[f]=r);for(u=0,l=n.length;u<l;u++)c=n[u],f=s.getterIsAFn?s.getter(c):c[s.getter],r=h[f],r||(r=new Slick.Group,r.value=f,r.level=o,r.groupingKey=(t?t.groupingKey+y:"")+f,e[e.length]=r,h[f]=r),r.rows[r.count++]=c;if(o<i.length-1)for(u=0;u<e.length;u++)r=e[u],r.groups=ni(r.rows,r);return e.sort(i[o].comparer),e}function et(n){var t=n.group,r=i[t.level],o=t.level==i.length,u,f=r.aggregators.length,e;if(!o&&r.aggregateChildGroups)for(e=t.groups.length;e--;)t.groups[e].initialized||et(t.groups[e]);while(f--)u=r.aggregators[f],u.init(),!o&&r.aggregateChildGroups?r.compiledAccumulators[f].call(u,t.groups):r.compiledAccumulators[f].call(u,t.rows),u.storeResult(n);n.initialized=!0}function pr(n){var r=i[n.level],t=new Slick.GroupTotals;t.group=n;n.totals=t;r.lazyTotalsCalculation||et(t)}function ti(n,t){t=t||0;for(var u=i[t],e=u.collapsed,o=k[t],f=n.length,r;f--;)(r=n[f],!r.collapsed||u.aggregateCollapsed)&&(r.groups&&ti(r.groups,t+1),u.aggregators.length&&(u.aggregateEmpty||r.rows.length||r.groups&&r.groups.length)&&pr(r),r.collapsed=e^o[r.groupingKey],r.title=u.formatter?u.formatter(r):r.value)}function ii(n,t){var f,c,e,l;t=t||0;var h=i[t],u=[],o,s=0,r;for(f=0,c=n.length;f<c;f++){if(r=n[f],u[s++]=r,!r.collapsed)for(o=r.groups?ii(r.groups,t+1):r.rows,e=0,l=o.length;e<l;e++)u[s++]=o[e];r.totals&&h.displayTotalsRow&&(!r.collapsed||h.aggregateCollapsed)&&(u[s++]=r.totals)}return u}function at(n){var t=n.toString().match(/^function[^(]*\(([^)]*)\)\s*{([\s\S]*)}$/);return{params:t[1].split(","),body:t[2]}}function wr(n){var t=at(n.accumulate),i=new Function("_items","for (var "+t.params[0]+", _i=0, _il=_items.length; _i<_il; _i++) {"+t.params[0]+" = _items[_i]; "+t.body+"}");return i.displayName=i.name="compiledAccumulatorLoop",i}function br(){var i=at(v),r=i.body.replace(/return\s*(false|!1)\s*([;}]|$)/gi,"{ continue _coreloop; }$2").replace(/return\s*(true|!0)\s*([;}]|$)/gi,"{ _retval[_idx++] = $item$; continue _coreloop; }$2").replace(/return ([^;}]+?)\s*([;}]|$)/gi,"{ if ($1) { _retval[_idx++] = $item$; }; continue _coreloop; }$2"),n="var _retval = [], _idx = 0; var $item$, $args$ = _args; _coreloop: for (var _i = 0, _il = _items.length; _i < _il; _i++) { $item$ = _items[_i]; $filter$; } return _retval; ",t;return n=n.replace(/\$filter\$/gi,r),n=n.replace(/\$item\$/gi,i.params[0]),n=n.replace(/\$args\$/gi,i.params[1]),t=new Function("_items,_args",n),t.displayName=t.name="compiledFilter",t}function kr(){var i=at(v),r=i.body.replace(/return\s*(false|!1)\s*([;}]|$)/gi,"{ continue _coreloop; }$2").replace(/return\s*(true|!0)\s*([;}]|$)/gi,"{ _cache[_i] = true;_retval[_idx++] = $item$; continue _coreloop; }$2").replace(/return ([^;}]+?)\s*([;}]|$)/gi,"{ if ((_cache[_i] = $1)) { _retval[_idx++] = $item$; }; continue _coreloop; }$2"),n="var _retval = [], _idx = 0; var $item$, $args$ = _args; _coreloop: for (var _i = 0, _il = _items.length; _i < _il; _i++) { $item$ = _items[_i]; if (_cache[_i]) { _retval[_idx++] = $item$; continue _coreloop; } $filter$; } return _retval; ",t;return n=n.replace(/\$filter\$/gi,r),n=n.replace(/\$item\$/gi,i.params[0]),n=n.replace(/\$args\$/gi,i.params[1]),t=new Function("_items,_args,_cache",n),t.displayName=t.name="compiledFilterWithCaching",t}function dr(n,t){for(var r=[],u=0,i=0,f=n.length;i<f;i++)v(n[i],t)&&(r[u++]=n[i]);return r}function gr(n,t,i){for(var f=[],e=0,u,r=0,o=n.length;r<o;r++)u=n[r],i[r]?f[e++]=u:v(u,t)&&(f[e++]=u,i[r]=!0);return f}function nu(n){var i,e,r;return v?(i=t.inlineFilters?vt:dr,e=t.inlineFilters?yt:gr,f.isFilterNarrowing?h=i(h,rt):f.isFilterExpanding?h=e(n,rt,pt):f.isFilterUnchanged||(h=i(n,rt))):h=u?n:n.concat(),u?(h.length<l*u&&(l=Math.floor(h.length/u)),r=h.slice(u*l,u*l+u)):r=h,{totalRows:h.length,rows:r}}function tu(n,t){var r,e,s,o=[],h=0,l=t.length,u,a;for(f&&f.ignoreDiffsBefore&&(h=Math.max(0,Math.min(t.length,f.ignoreDiffsBefore))),f&&f.ignoreDiffsAfter&&(l=Math.min(t.length,Math.max(0,f.ignoreDiffsAfter))),u=h,a=n.length;u<l;u++)u>=a?o[o.length]=u:(r=t[u],e=n[u],(i.length&&(s=r.__nonDataRow||e.__nonDataRow)&&r.__group!==e.__group||r.__group&&!r.equals(e)||s&&(r.__groupTotals||e.__groupTotals)||r[c]!=e[c]||b&&b[r[c]])&&(o[o.length]=u));return o}function ri(n){var r,t,u;return p=null,(f.isFilterNarrowing!=st.isFilterNarrowing||f.isFilterExpanding!=st.isFilterExpanding)&&(pt=[]),r=nu(n),a=r.totalRows,t=r.rows,w=[],i.length&&(w=ni(t),w.length&&(ti(w),t=ii(w))),u=tu(o,t),o=t,u}function e(){if(!ot){var t=o.length,i=a,n=ri(r,v);u&&a<l*u&&(l=Math.max(0,Math.ceil(a/u)-1),n=ri(r,v));b=null;st=f;f={};i!=a&&ht.notify(ct(),null,g);t!=o.length&&wt.notify({previous:t,current:o.length},null,g);n.length>0&&bt.notify({rows:n},null,g)}}function iu(t,i,r){function o(n){f.join(",")!=n.join(",")&&(f=n,s.notify({grid:t,ids:f},new Slick.EventData,u))}function h(){if(f.length>0){e=!0;var n=u.mapIdsToRows(f);i||o(u.mapRowsToIds(n));t.setSelectedRows(n);e=!1}}var u=this,e,f=u.mapRowsToIds(t.getSelectedRows()),s=new Slick.Event;return t.onSelectedRowsChanged.subscribe(function(){var i,s;e||(i=u.mapRowsToIds(t.getSelectedRows()),r&&t.getOptions().multiSelect?(s=n.grep(f,function(n){return u.getRowById(n)===undefined}),o(s.concat(i))):o(i))}),this.onRowsChanged.subscribe(h),this.onRowCountChanged.subscribe(h),s}function ru(n,t){function u(n){var t,r;i={};for(t in n)r=o[t][c],i[r]=n[t]}function f(){var u,f,e;if(i){r=!0;lt();u={};for(f in i)e=p[f],e!=undefined&&(u[e]=i[f]);n.setCellCssStyles(t,u);r=!1}}var i,r;u(n.getCellCssStyles(t));n.onCellCssStylesChanged.subscribe(function(n,i){r||t==i.key&&i.hash&&u(i.hash)});this.onRowsChanged.subscribe(f);this.onRowCountChanged.subscribe(f)}var g=this,c="id",r=[],o=[],s={},p=null,v=null,b=null,ot=!1,nt=!0,tt,it,f={},st={},rt,h=[],vt,yt,pt=[],ui={getter:null,formatter:null,comparer:function(n,t){return n.value-t.value},predefinedValues:[],aggregators:[],aggregateEmpty:!1,aggregateCollapsed:!1,aggregateChildGroups:!1,collapsed:!1,displayTotalsRow:!0,lazyTotalsCalculation:!1},i=[],w=[],k=[],y=":|:",u=0,l=0,a=0,wt=new Slick.Event,bt=new Slick.Event,ht=new Slick.Event;t=n.extend(!0,{},{groupItemMetadataProvider:null,inlineFilters:!1},t);n.extend(this,{beginUpdate:fi,endUpdate:ei,setPagingOptions:ai,getPagingInfo:ct,getItems:ci,setItems:li,setFilter:yi,sort:kt,fastSort:dt,reSort:vi,setGrouping:ut,getGrouping:pi,groupBy:wi,setAggregators:bi,collapseAllGroups:cr,expandAllGroups:lr,collapseGroup:ar,expandGroup:vr,getGroups:yr,getIdxById:di,getRowById:gi,getItemById:nr,getItemByIdx:ki,mapRowsToIds:ir,mapIdsToRows:tr,setRefreshHints:oi,setFilterArgs:si,refresh:e,updateItem:rr,insertItem:ur,addItem:fr,deleteItem:er,syncGridSelection:iu,syncGridCellCssStyles:ru,getLength:or,getItem:sr,getItemMetadata:hr,onRowCountChanged:wt,onRowsChanged:bt,onPagingInfoChanged:ht})}function i(n){this.field_=n;this.init=function(){this.count_=0;this.nonNullCount_=0;this.sum_=0};this.accumulate=function(n){var t=n[this.field_];this.count_++;t!=null&&t!==""&&t!==NaN&&(this.nonNullCount_++,this.sum_+=parseFloat(t))};this.storeResult=function(n){n.avg||(n.avg={});this.nonNullCount_!=0&&(n.avg[this.field_]=this.sum_/this.nonNullCount_)}}function r(n){this.field_=n;this.init=function(){this.min_=null};this.accumulate=function(n){var t=n[this.field_];t!=null&&t!==""&&t!==NaN&&(this.min_==null||t<this.min_)&&(this.min_=t)};this.storeResult=function(n){n.min||(n.min={});n.min[this.field_]=this.min_}}function u(n){this.field_=n;this.init=function(){this.max_=null};this.accumulate=function(n){var t=n[this.field_];t!=null&&t!==""&&t!==NaN&&(this.max_==null||t>this.max_)&&(this.max_=t)};this.storeResult=function(n){n.max||(n.max={});n.max[this.field_]=this.max_}}function f(n){this.field_=n;this.init=function(){this.sum_=null};this.accumulate=function(n){var t=n[this.field_];t!=null&&t!==""&&t!==NaN&&(this.sum_+=parseFloat(t))};this.storeResult=function(n){n.sum||(n.sum={});n.sum[this.field_]=this.sum_}}n.extend(!0,window,{Slick:{Data:{DataView:t,Aggregators:{Avg:i,Min:r,Max:u,Sum:f}}}})})(jQuery)
//# sourceMappingURL=slick.dataview.min.js.map
(function(n){function t(t){var i,r,u=this;this.init=function(){i=n("<INPUT type=text class='editor-text' />").appendTo(t.container).bind("keydown.nav",function(t){(t.keyCode===n.ui.keyCode.LEFT||t.keyCode===n.ui.keyCode.RIGHT)&&t.stopImmediatePropagation()}).focus().select()};this.destroy=function(){i.remove()};this.focus=function(){i.focus()};this.getValue=function(){return i.val()};this.setValue=function(n){i.val(n)};this.loadValue=function(n){r=n[t.column.field]||"";i.val(r);i[0].defaultValue=r;i.select()};this.serializeValue=function(){return i.val()};this.applyValue=function(n,i){n[t.column.field]=i};this.isValueChanged=function(){return!(i.val()==""&&r==null)&&i.val()!=r};this.validate=function(){if(t.column.validator){var n=t.column.validator(i.val());if(!n.valid)return n}return{valid:!0,msg:null}};this.init()}function i(t){var i,r,u=this;this.init=function(){i=n("<INPUT type=text class='editor-text' />");i.bind("keydown.nav",function(t){(t.keyCode===n.ui.keyCode.LEFT||t.keyCode===n.ui.keyCode.RIGHT)&&t.stopImmediatePropagation()});i.appendTo(t.container);i.focus().select()};this.destroy=function(){i.remove()};this.focus=function(){i.focus()};this.loadValue=function(n){r=n[t.column.field];i.val(r);i[0].defaultValue=r;i.select()};this.serializeValue=function(){return parseInt(i.val(),10)||0};this.applyValue=function(n,i){n[t.column.field]=i};this.isValueChanged=function(){return!(i.val()==""&&r==null)&&i.val()!=r};this.validate=function(){return isNaN(i.val())?{valid:!1,msg:"Please enter a valid integer"}:{valid:!0,msg:null}};this.init()}function r(t){var i,r,f=this,u=!1;this.init=function(){i=n("<INPUT type=text class='editor-text' />");i.appendTo(t.container);i.focus().select();i.datepicker({showOn:"button",buttonImageOnly:!0,buttonImage:"../images/calendar.gif",beforeShow:function(){u=!0},onClose:function(){u=!1}});i.width(i.width()-18)};this.destroy=function(){n.datepicker.dpDiv.stop(!0,!0);i.datepicker("hide");i.datepicker("destroy");i.remove()};this.show=function(){u&&n.datepicker.dpDiv.stop(!0,!0).show()};this.hide=function(){u&&n.datepicker.dpDiv.stop(!0,!0).hide()};this.position=function(t){u&&n.datepicker.dpDiv.css("top",t.top+30).css("left",t.left)};this.focus=function(){i.focus()};this.loadValue=function(n){r=n[t.column.field];i.val(r);i[0].defaultValue=r;i.select()};this.serializeValue=function(){return i.val()};this.applyValue=function(n,i){n[t.column.field]=i};this.isValueChanged=function(){return!(i.val()==""&&r==null)&&i.val()!=r};this.validate=function(){return{valid:!0,msg:null}};this.init()}function u(t){var i,r,u=this;this.init=function(){i=n("<SELECT tabIndex='0' class='editor-yesno'><OPTION value='yes'>Yes<\/OPTION><OPTION value='no'>No<\/OPTION><\/SELECT>");i.appendTo(t.container);i.focus()};this.destroy=function(){i.remove()};this.focus=function(){i.focus()};this.loadValue=function(n){i.val((r=n[t.column.field])?"yes":"no");i.select()};this.serializeValue=function(){return i.val()=="yes"};this.applyValue=function(n,i){n[t.column.field]=i};this.isValueChanged=function(){return i.val()!=r};this.validate=function(){return{valid:!0,msg:null}};this.init()}function f(t){var i,r,u=this;this.init=function(){i=n("<INPUT type=checkbox value='true' class='editor-checkbox' hideFocus>");i.appendTo(t.container);i.focus()};this.destroy=function(){i.remove()};this.focus=function(){i.focus()};this.loadValue=function(n){r=!!n[t.column.field];r?i.prop("checked",!0):i.prop("checked",!1)};this.serializeValue=function(){return i.prop("checked")};this.applyValue=function(n,i){n[t.column.field]=i};this.isValueChanged=function(){return this.serializeValue()!==r};this.validate=function(){return{valid:!0,msg:null}};this.init()}function e(t){var i,r,u,f=this;this.init=function(){i=n("<INPUT type=text class='editor-percentcomplete' />");i.width(n(t.container).innerWidth()-25);i.appendTo(t.container);r=n("<div class='editor-percentcomplete-picker' />").appendTo(t.container);r.append("<div class='editor-percentcomplete-helper'><div class='editor-percentcomplete-wrapper'><div class='editor-percentcomplete-slider' /><div class='editor-percentcomplete-buttons' /><\/div><\/div>");r.find(".editor-percentcomplete-buttons").append("<button val=0>Not started<\/button><br/><button val=50>In Progress<\/button><br/><button val=100>Complete<\/button>");i.focus().select();r.find(".editor-percentcomplete-slider").slider({orientation:"vertical",range:"min",value:u,slide:function(n,t){i.val(t.value)}});r.find(".editor-percentcomplete-buttons button").bind("click",function(){i.val(n(this).attr("val"));r.find(".editor-percentcomplete-slider").slider("value",n(this).attr("val"))})};this.destroy=function(){i.remove();r.remove()};this.focus=function(){i.focus()};this.loadValue=function(n){i.val(u=n[t.column.field]);i.select()};this.serializeValue=function(){return parseInt(i.val(),10)||0};this.applyValue=function(n,i){n[t.column.field]=i};this.isValueChanged=function(){return!(i.val()==""&&u==null)&&(parseInt(i.val(),10)||0)!=u};this.validate=function(){return isNaN(parseInt(i.val(),10))?{valid:!1,msg:"Please enter a valid positive number"}:{valid:!0,msg:null}};this.init()}function o(t){var i,r,u,f=this;this.init=function(){var u=n("body");r=n("<DIV style='z-index:10000;position:absolute;background:white;padding:5px;border:3px solid gray; -moz-border-radius:10px; border-radius:10px;'/>").appendTo(u);i=n("<TEXTAREA hidefocus rows=5 style='backround:white;width:250px;height:80px;border:0;outline:0'>").appendTo(r);n("<DIV style='text-align:right'><BUTTON>Save<\/BUTTON><BUTTON>Cancel<\/BUTTON><\/DIV>").appendTo(r);r.find("button:first").bind("click",this.save);r.find("button:last").bind("click",this.cancel);i.bind("keydown",this.handleKeyDown);f.position(t.position);i.focus().select()};this.handleKeyDown=function(i){i.which==n.ui.keyCode.ENTER&&i.ctrlKey?f.save():i.which==n.ui.keyCode.ESCAPE?(i.preventDefault(),f.cancel()):i.which==n.ui.keyCode.TAB&&i.shiftKey?(i.preventDefault(),t.grid.navigatePrev()):i.which==n.ui.keyCode.TAB&&(i.preventDefault(),t.grid.navigateNext())};this.save=function(){t.commitChanges()};this.cancel=function(){i.val(u);t.cancelChanges()};this.hide=function(){r.hide()};this.show=function(){r.show()};this.position=function(n){r.css("top",n.top-5).css("left",n.left-5)};this.destroy=function(){r.remove()};this.focus=function(){i.focus()};this.loadValue=function(n){i.val(u=n[t.column.field]);i.select()};this.serializeValue=function(){return i.val()};this.applyValue=function(n,i){n[t.column.field]=i};this.isValueChanged=function(){return!(i.val()==""&&u==null)&&i.val()!=u};this.validate=function(){return{valid:!0,msg:null}};this.init()}n.extend(!0,window,{Slick:{Editors:{Text:t,Integer:i,Date:r,YesNoSelect:u,Checkbox:f,PercentComplete:e,LongText:o}}})})(jQuery)
//# sourceMappingURL=slick.editors.min.js.map
(function(n){function t(n,t,i){return i==null||i===""?"-":i<50?"<span style='color:red;font-weight:bold;'>"+i+"%<\/span>":"<span style='color:green'>"+i+"%<\/span>"}function i(n,t,i){if(i==null||i==="")return"";var r;return r=i<30?"red":i<70?"silver":"green","<span class='percent-complete-bar' style='background:"+r+";width:"+i+"%'><\/span>"}function r(n,t,i){return i?"Yes":"No"}function u(n,t,i){return i?"<img src='../images/tick.png'>":""}n.extend(!0,window,{Slick:{Formatters:{PercentComplete:t,PercentCompleteBar:i,YesNo:r,Checkmark:u}}})})(jQuery)
//# sourceMappingURL=slick.formatters.min.js.map
/*
IMPORTANT:
In order to preserve the uniform grid appearance, all cell styles need to have padding, margin and border sizes.
No built-in (selected, editable, highlight, flashing, invalid, loading, :focus) or user-specified CSS
classes should alter those!
*/

.slick-header.ui-state-default, .slick-headerrow.ui-state-default {
  width: 100%;
  overflow: hidden;
  border-left: 0px;
}

.slick-header-columns, .slick-headerrow-columns {
  position: relative;
  white-space: nowrap;
  cursor: default;
  overflow: hidden;
}

.slick-header-column.ui-state-default {
  position: relative;
  display: inline-block;
  overflow: hidden;
  -o-text-overflow: ellipsis;
  text-overflow: ellipsis;
  height: 16px;
  line-height: 16px;
  margin: 0;
  padding: 4px;
  border-right: 1px solid silver;
  border-left: 0px;
  border-top: 0px;
  border-bottom: 0px;
  float: left;
}

.slick-headerrow-column.ui-state-default {
  padding: 4px;
}

.slick-header-column-sorted {
  font-style: italic;
}

.slick-sort-indicator {
  display: inline-block;
  width: 8px;
  height: 5px;
  margin-left: 4px;
  margin-top: 6px;
  float: left;
}

.slick-sort-indicator-desc {
  background: url(images/sort-desc.gif);
}

.slick-sort-indicator-asc {
  background: url(images/sort-asc.gif);
}

.slick-resizable-handle {
  position: absolute;
  font-size: 0.1px;
  display: block;
  cursor: col-resize;
  width: 4px;
  right: 0px;
  top: 0;
  height: 100%;
}

.slick-sortable-placeholder {
  background: silver;
}

/* f12 change to prevent grid-canvas name conflict */
.slick-viewport .grid-canvas {
  position: relative;
  outline: 0;
}

.slick-row.ui-widget-content, .slick-row.ui-state-active {
  position: absolute;
  border: 0px;
  width: 100%;
}

.slick-cell, .slick-headerrow-column {
  position: absolute;
  border: 1px solid transparent;
  border-right: 1px dotted silver;
  border-bottom-color: silver;
  overflow: hidden;
  -o-text-overflow: ellipsis;
  text-overflow: ellipsis;
  vertical-align: middle;
  z-index: 1;
  padding: 1px 2px 2px 1px;
  margin: 0;
  white-space: nowrap;
  cursor: default;
}

.slick-group {
}

.slick-group-toggle {
  display: inline-block;
}

.slick-cell.highlighted {
  background: lightskyblue;
  background: rgba(0, 0, 255, 0.2);
  -webkit-transition: all 0.5s;
  -moz-transition: all 0.5s;
  -o-transition: all 0.5s;
  transition: all 0.5s;
}

.slick-cell.flashing {
  border: 1px solid red !important;
}

.slick-cell.editable {
  z-index: 11;
  overflow: visible;
  background: white;
  border-color: black;
  border-style: solid;
}

.slick-cell:focus {
  outline: none;
}

.slick-reorder-proxy {
  display: inline-block;
  background: blue;
  opacity: 0.15;
  filter: alpha(opacity = 15);
  cursor: move;
}

.slick-reorder-guide {
  display: inline-block;
  height: 2px;
  background: blue;
  opacity: 0.7;
  filter: alpha(opacity = 70);
}

.slick-selection {
  z-index: 10;
  position: absolute;
  border: 2px dashed black;
}
/**
 * @license
 * (c) 2009-2013 Michael Leibman
 * michael{dot}leibman{at}gmail{dot}com
 * http://github.com/mleibman/slickgrid
 *
 * Distributed under MIT license.
 * All rights reserved.
 *
 * SlickGrid v2.2
 *
 * NOTES:
 *     Cell/row DOM manipulations are done directly bypassing jQuery's DOM manipulation methods.
 *     This increases the speed dramatically, but can only be done safely because there are no event handlers
 *     or data associated with any cell/row DOM nodes.  Cell editors must make sure they implement .destroy()
 *     and do proper cleanup.
 */
if(typeof jQuery=="undefined")throw"SlickGrid requires jquery module to be loaded";if(!jQuery.fn.drag)throw"SlickGrid requires jquery.event.drag module to be loaded";if(typeof Slick=="undefined")throw"slick.core.js not loaded";(function(n){function r(r,u,f,e){function ns(){var o,u;if(y=n(r),y.length<1)throw new Error("SlickGrid requires a valid container, "+r+" does not exist in the DOM.");for(i=i||os(),t=t||fs(),e=n.extend({},ko,e),se(),su.width=e.defaultColumnWidth,fr={},o=0;o<f.length;o++)u=f[o]=n.extend({},su,f[o]),fr[u.id]=o,u.minWidth&&u.width<u.minWidth&&(u.width=u.minWidth),u.maxWidth&&u.width>u.maxWidth&&(u.width=u.maxWidth);if(e.enableColumnReorder&&!n.fn.sortable)throw new Error("SlickGrid's 'enableColumnReorder = true' option requires jquery-ui.sortable module to be loaded");ar={commitCurrentEdit:hl,cancelCurrentEdit:cl};y.empty().css("overflow","hidden").css("outline",0).addClass(ft).addClass("ui-widget");/relative|absolute|fixed/.test(y.css("position"))||y.css("position","relative");wi=n("<div class='slick-header ui-state-default' style='overflow:hidden;position:relative;' />").appendTo(y);w=n("<div class='slick-header-columns' style='left:-1000px' />").appendTo(wi);w.width(ku());yt=n("<div class='slick-headerrow ui-state-default' style='overflow:hidden;position:relative;' />").appendTo(y);oi=n("<div class='slick-headerrow-columns' />").appendTo(yt);af=n("<div style='display:block;height:1px;position:absolute;top:0;left:0;'><\/div>").css("width",ne()+t.width+"px").appendTo(yt);si=n("<div class='slick-top-panel-scroller ui-state-default' style='overflow:hidden;position:relative;' />").appendTo(y);vf=n("<div class='slick-top-panel' style='width:10000px' />").appendTo(si);e.showTopPanel||si.hide();e.showHeaderRow||yt.hide();k=n("<div class='slick-viewport' style='width:100%;overflow:auto;outline:0;position:relative;;'>").appendTo(y);k.css("overflow-y",e.autoHeight?"hidden":"auto");nt=n("<div class='grid-canvas' />").appendTo(k);e.explicitInitialization||df()}function df(){vt||(vt=!0,et=parseFloat(n.css(y[0],"width",!0)),ps(),es(w),e.enableTextSelectionOnCells||k.bind("selectstart.ui",function(t){return n(t.target).is("input,textarea")}),rf(),te(),vs(),re(),gt(),ss(),y.bind("resize.slickgrid",gt),k.bind("scroll",hr),wi.bind("contextmenu",vc).bind("click",yc).delegate(".slick-header-column","mouseenter",lc).delegate(".slick-header-column","mouseleave",ac),yt.bind("scroll",kh),nt.bind("keydown",oc).bind("click",sc).bind("dblclick",cc).bind("contextmenu",hc).bind("draginit",rc).bind("dragstart",{distance:3},uc).bind("drag",fc).bind("dragend",ec).delegate(".slick-cell","mouseenter",pc).delegate(".slick-cell","mouseleave",wc),navigator.userAgent.toLowerCase().match(/webkit/)&&navigator.userAgent.toLowerCase().match(/macintosh/)&&nt.bind("mousewheel",ic))}function ts(n){ti.unshift(n);n.init(o)}function gf(n){for(var t=ti.length;t>=0;t--)if(ti[t]===n){ti[t].destroy&&ti[t].destroy();ti.splice(t,1);break}}function is(n){ot&&(ot.onSelectedRangesChanged.unsubscribe(ee),ot.destroy&&ot.destroy());ot=n;ot&&(ot.init(o),ot.onSelectedRangesChanged.subscribe(ee))}function rs(){return ot}function us(){return nt[0]}function fs(){var t=n("<div style='position:absolute; top:-10000px; left:-10000px; width:100px; height:100px; overflow:scroll;'><\/div>").appendTo("body"),i={width:t.width()-t[0].clientWidth,height:t.height()-t[0].clientHeight};return t.remove(),i}function ku(){for(var r,n=0,i=0,u=f.length;i<u;i++)r=f[i].width,n+=r;return n+=t.width,Math.max(n,et)+1e3}function ne(){for(var r=di?et-t.width:et,n=0,i=f.length;i--;)n+=f[i].width;return e.fullWidthRows?Math.max(n,r):n}function du(n){var i=pt;pt=ne();pt!=i&&(nt.width(pt),oi.width(pt),w.width(ku()),lu=pt>et-t.width);af.width(pt+(di?t.width:0));(pt!=i||n)&&tf()}function es(n){n&&n.jquery&&n.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return!1})}function os(){for(var i=1e6,u=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,r=n("<div style='display:none' />").appendTo(document.body),t;;)if(t=i*2,r.css("height",t),t>u||r.height()!==t)break;else i=t;return r.remove(),i}function ss(){for(var t=nt[0],i;(t=t.parentNode)!=document.body&&t!=null;)(t==k[0]||t.scrollWidth!=t.clientWidth||t.scrollHeight!=t.clientHeight)&&(i=n(t),hi=hi?hi.add(i):i,i.bind("scroll."+ft,ro))}function hs(){hi&&(hi.unbind("scroll."+ft),hi=null)}function cs(n,t,i){var r,e,u;vt&&(r=kt(n),r!=null)&&(e=f[r],u=w.children().eq(r),u&&(t!==undefined&&(f[r].name=t),i!==undefined&&(f[r].toolTip=i),h(o.onBeforeHeaderCellDestroy,{node:u[0],column:e}),u.attr("title",i||"").children().eq(0).html(t),h(o.onHeaderCellRendered,{node:u[0],column:e})))}function ls(){return oi[0]}function as(n){var i=kt(n),t=oi.children().eq(i);return t&&t[0]}function te(){function s(){n(this).addClass("ui-state-hover")}function c(){n(this).removeClass("ui-state-hover")}var i,t,r,u;for(w.find(".slick-header-column").each(function(){var t=n(this).data("column");t&&h(o.onBeforeHeaderCellDestroy,{node:this,column:t})}),w.empty(),w.width(ku()),oi.find(".slick-headerrow-column").each(function(){var t=n(this).data("column");t&&h(o.onBeforeHeaderRowCellDestroy,{node:this,column:t})}),oi.empty(),i=0;i<f.length;i++){if(t=f[i],r=n("<div class='ui-state-default slick-header-column' />").html("<span class='slick-column-name'>"+t.name+"<\/span>").width(t.width-ci).attr("id",""+ft+t.id).attr("title",t.toolTip||"").data("column",t).addClass(t.headerCssClass||"").appendTo(w),e.enableColumnReorder||t.sortable)r.on("mouseenter",s).on("mouseleave",c);t.sortable&&(r.addClass("slick-header-sortable"),r.append("<span class='slick-sort-indicator' />"));h(o.onHeaderCellRendered,{node:r[0],column:t});e.showHeaderRow&&(u=n("<div class='ui-state-default slick-headerrow-column l"+i+" r"+i+"'><\/div>").data("column",t).appendTo(oi),h(o.onHeaderRowCellRendered,{node:u[0],column:t}))}br(it);ie();e.enableColumnReorder&&ys()}function vs(){w.click(function(t){var s,r,i,u;if((t.metaKey=t.metaKey||t.ctrlKey,!n(t.target).hasClass("slick-resizable-handle"))&&(s=n(t.target).closest(".slick-header-column"),s.length)&&(r=s.data("column"),r.sortable)){if(!d().commitCurrentEdit())return;for(i=null,u=0;u<it.length;u++)if(it[u].columnId==r.id){i=it[u];i.sortAsc=!i.sortAsc;break}t.metaKey&&e.multiColumnSort?i&&it.splice(u,1):((t.shiftKey||t.metaKey)&&e.multiColumnSort||(it=[]),i?it.length==0&&it.push(i):(i={columnId:r.id,sortAsc:r.defaultSortAsc},it.push(i)));br(it);e.multiColumnSort?h(o.onSort,{multiColumnSort:!0,sortCols:n.map(it,function(n){return{sortCol:f[kt(n.columnId)],sortAsc:n.sortAsc}})},t):h(o.onSort,{multiColumnSort:!1,sortCol:r,sortAsc:i.sortAsc},t)}})}function ys(){w.filter(":ui-sortable").sortable("destroy");w.sortable({containment:"parent",distance:3,axis:"x",cursor:"default",tolerance:"intersection",helper:"clone",placeholder:"slick-sortable-placeholder ui-state-default slick-header-column",start:function(t,i){i.placeholder.width(i.helper.outerWidth()-ci);n(i.helper).addClass("slick-header-column-active")},beforeStop:function(t,i){n(i.helper).removeClass("slick-header-column-active")},stop:function(t){var r,u,i;if(!d().commitCurrentEdit()){n(this).sortable("cancel");return}for(r=w.sortable("toArray"),u=[],i=0;i<r.length;i++)u.push(f[kt(r[i].replace(ft,""))]);oe(u);h(o.onColumnsReordered,{});t.stopPropagation();ie()}})}function ie(){var v,i,t,u,r,c,l,s,a;(r=w.children(),r.find(".slick-resizable-handle").remove(),r.each(function(n){f[n].resizable&&(s===undefined&&(s=n),a=n)}),s!==undefined)&&r.each(function(y,p){y<s||e.forceFitColumns&&y>=a||(v=n(p),n("<div class='slick-resizable-handle' />").appendTo(p).bind("dragstart",function(o){var a,s,v,h;if(!d().commitCurrentEdit())return!1;if(u=o.pageX,n(this).parent().addClass("slick-header-column-active"),a=null,s=null,r.each(function(t,i){f[t].previousWidth=n(i).outerWidth()}),e.forceFitColumns)for(a=0,s=0,i=y+1;i<r.length;i++)t=f[i],t.resizable&&(s!==null&&(t.maxWidth?s+=t.maxWidth-t.previousWidth:s=null),a+=t.previousWidth-Math.max(t.minWidth||0,ni));for(v=0,h=0,i=0;i<=y;i++)t=f[i],t.resizable&&(h!==null&&(t.maxWidth?h+=t.maxWidth-t.previousWidth:h=null),v+=t.previousWidth-Math.max(t.minWidth||0,ni));a===null&&(a=1e5);v===null&&(v=1e5);s===null&&(s=1e5);h===null&&(h=1e5);l=u+Math.min(a,h);c=u-Math.min(v,s)}).bind("drag",function(n){var s,h=Math.min(l,Math.max(c,n.pageX))-u,o;if(h<0){for(o=h,i=y;i>=0;i--)t=f[i],t.resizable&&(s=Math.max(t.minWidth||0,ni),o&&t.previousWidth+o<s?(o+=t.previousWidth-s,t.width=s):(t.width=t.previousWidth+o,o=0));if(e.forceFitColumns)for(o=-h,i=y+1;i<r.length;i++)t=f[i],t.resizable&&(o&&t.maxWidth&&t.maxWidth-t.previousWidth<o?(o-=t.maxWidth-t.previousWidth,t.width=t.maxWidth):(t.width=t.previousWidth+o,o=0))}else{for(o=h,i=y;i>=0;i--)t=f[i],t.resizable&&(o&&t.maxWidth&&t.maxWidth-t.previousWidth<o?(o-=t.maxWidth-t.previousWidth,t.width=t.maxWidth):(t.width=t.previousWidth+o,o=0));if(e.forceFitColumns)for(o=-h,i=y+1;i<r.length;i++)t=f[i],t.resizable&&(s=Math.max(t.minWidth||0,ni),o&&t.previousWidth+o<s?(o+=t.previousWidth-s,t.width=s):(t.width=t.previousWidth+o,o=0))}fe();e.syncColumnCellResize&&tf()}).bind("dragend",function(){var u;for(n(this).parent().removeClass("slick-header-column-active"),i=0;i<r.length;i++)t=f[i],u=n(r[i]).outerWidth(),t.previousWidth!==u&&t.rerenderOnResize&&li();du(!0);ut();h(o.onColumnsResized,{})}))})}function gu(t){var i=0;return n.each(["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],function(n,r){i+=parseFloat(t.css(r))||0}),i}function ps(){var t,r=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],i;t=n("<div class='ui-state-default slick-header-column' style='visibility:hidden'>-<\/div>").appendTo(w);ci=yf=0;t.css("box-sizing")!="border-box"&&t.css("-moz-box-sizing")!="border-box"&&t.css("-webkit-box-sizing")!="border-box"&&(n.each(r,function(n,i){ci+=parseFloat(t.css(i))||0}),n.each(u,function(n,i){yf+=parseFloat(t.css(i))||0}));t.remove();i=n("<div class='slick-row' />").appendTo(nt);t=n("<div class='slick-cell' id='' style='visibility:hidden'>-<\/div>").appendTo(i);au=vu=0;t.css("box-sizing")!="border-box"&&t.css("-moz-box-sizing")!="border-box"&&t.css("-webkit-box-sizing")!="border-box"&&(n.each(r,function(n,i){au+=parseFloat(t.css(i))||0}),n.each(u,function(n,i){vu+=parseFloat(t.css(i))||0}));i.remove();ni=Math.max(ci,au)}function re(){var r,t,i;for(bi=n("<style type='text/css' rel='stylesheet' />").appendTo(n("head")),r=e.rowHeight-vu,t=["."+ft+" .slick-header-column { left: 1000px; }","."+ft+" .slick-top-panel { height:"+e.topPanelHeight+"px; }","."+ft+" .slick-headerrow-columns { height:"+e.headerRowHeight+"px; }","."+ft+" .slick-cell { height:"+r+"px; }","."+ft+" .slick-row { height:"+e.rowHeight+"px; }"],i=0;i<f.length;i++)t.push("."+ft+" .l"+i+" { }"),t.push("."+ft+" .r"+i+" { }");bi[0].styleSheet?bi[0].styleSheet.cssText=t.join(" "):bi[0].appendChild(document.createTextNode(t.join(" ")))}function ws(n){var r,u,i,f,t,e;if(!ki){for(r=document.styleSheets,t=0;t<r.length;t++)if((r[t].ownerNode||r[t].owningElement)==bi[0]){ki=r[t];break}if(!ki)throw new Error("Cannot find stylesheet.");for(hu=[],cu=[],u=ki.cssRules||ki.rules,t=0;t<u.length;t++)e=u[t].selectorText,(i=/\.l\d+/.exec(e))?(f=parseInt(i[0].substr(2,i[0].length-2),10),hu[f]=u[t]):(i=/\.r\d+/.exec(e))&&(f=parseInt(i[0].substr(2,i[0].length-2),10),cu[f]=u[t])}return{left:hu[n],right:cu[n]}}function ue(){bi.remove();ki=null}function bs(){d().cancelCurrentEdit();h(o.onBeforeDestroy,{});for(var n=ti.length;n--;)gf(ti[n]);e.enableColumnReorder&&w.filter(":ui-sortable").sortable("destroy");hs();y.unbind(".slickgrid");ue();nt.unbind("draginit dragstart dragend drag");y.empty().removeClass(ft)}function h(n,t,i){return i=i||new Slick.EventData,t=t||{},t.grid=o,n.notify(t,i,o)}function d(){return e.editorLock}function ks(){return ar}function kt(n){return fr[n]}function nf(){for(var r,u=[],l=0,i=0,e,o=di?et-t.width:et,p,h,a,s,w,c,v,y,n=0;n<f.length;n++)r=f[n],u.push(r.width),i+=r.width,r.resizable&&(l+=r.width-Math.max(r.minWidth,ni));for(e=i;i>o&&l;){for(p=(i-o)/l,n=0;n<f.length&&i>o;n++)(r=f[n],h=u[n],!r.resizable||h<=r.minWidth||h<=ni)||(a=Math.max(r.minWidth,ni),s=Math.floor(p*(h-a))||1,s=Math.min(s,h-a),i-=s,l-=s,u[n]-=s);if(e<=i)break;e=i}for(e=i;i<o;){for(w=o/i,n=0;n<f.length&&i<o;n++)r=f[n],c=u[n],v=!r.resizable||r.maxWidth<=c?0:Math.min(Math.floor(w*c)-c,r.maxWidth-c||1e6)||1,i+=v,u[n]+=v;if(e>=i)break;e=i}for(y=!1,n=0;n<f.length;n++)f[n].rerenderOnResize&&f[n].width!=u[n]&&(y=!0),f[n].width=u[n];fe();du(!0);y&&(li(),ut())}function fe(){var i;if(vt){for(var t=0,r=w.children(),u=r.length;t<u;t++)i=n(r[t]),i.width()!==f[t].width-ci&&i.width(f[t].width-ci);rf()}}function tf(){for(var t=0,r,i,n=0;n<f.length;n++)r=f[n].width,i=ws(n),i.left.style.left=t+"px",i.right.style.right=pt-t-r+"px",t+=f[n].width}function ds(n,t){br([{columnId:n,sortAsc:t}])}function br(t){it=t;var i=w.children();i.removeClass("slick-header-column-sorted").find(".slick-sort-indicator").removeClass("slick-sort-indicator-asc slick-sort-indicator-desc");n.each(it,function(n,t){t.sortAsc==null&&(t.sortAsc=!0);var r=kt(t.columnId);r!=null&&i.eq(r).addClass("slick-header-column-sorted").find(".slick-sort-indicator").addClass(t.sortAsc?"slick-sort-indicator-asc":"slick-sort-indicator-desc")})}function gs(){return it}function ee(n,t){var u,r,i,s;for(pu=[],u={},r=0;r<t.length;r++)for(i=t[r].fromRow;i<=t[r].toRow;i++)for(u[i]||(pu.push(i),u[i]={}),s=t[r].fromCell;s<=t[r].toCell;s++)po(i,s)&&(u[i][f[s].id]=e.selectedCellCssClass);be(e.selectedCellCssClass,u);h(o.onSelectedRowsChanged,{rows:bo()},n)}function nh(){return f}function rf(){var t,n,i;for(tr=[],ir=[],t=0,n=0,i=f.length;n<i;n++)tr[n]=t,ir[n]=t+f[n].width,t+=f[n].width}function oe(t){var r,i;for(f=t,fr={},r=0;r<f.length;r++)i=f[r]=n.extend({},su,f[r]),fr[i.id]=r,i.minWidth&&i.width<i.minWidth&&(i.width=i.minWidth),i.maxWidth&&i.width>i.maxWidth&&(i.width=i.maxWidth);rf();vt&&(li(),te(),ue(),re(),gt(),tf(),hr())}function th(){return e}function ih(t){d().commitCurrentEdit()&&(bt(),e.enableAddRow!==t.enableAddRow&&ve(rt()),e=n.extend(e,t),se(),k.css("overflow-y",e.autoHeight?"hidden":"auto"),ut())}function se(){e.autoHeight&&(e.leaveSpaceForNewRows=!1)}function rh(n,t){u=n;li();tu();t&&ri(0)}function uh(){return u}function rt(){return u.getLength?u.getLength():u.length}function dt(){return rt()+(e.enableAddRow?1:0)}function wt(n){return u.getItem?u.getItem(n):u[n]}function fh(){return vf[0]}function eh(n){e.showTopPanel!=n&&(e.showTopPanel=n,n?si.slideDown("fast",gt):si.slideUp("fast",gt))}function oh(n){e.showHeaderRow!=n&&(e.showHeaderRow=n,n?yt.slideDown("fast",gt):yt.slideUp("fast",gt))}function sh(){return y.get(0)}function uf(n){return e.rowHeight*n-g}function kr(n){return Math.floor((n+g)/e.rowHeight)}function ri(n){var r,i,u;n=Math.max(n,0);n=Math.min(n,lt-b+(lu?t.height:0));r=g;fi=Math.min(pi-1,Math.floor(n/yi));g=Math.round(fi*lr);i=n-g;g!=r&&(u=iu(i),le(u),bh());nr!=i&&(ei=nr+r<i+g?1:-1,k[0].scrollTop=yr=p=nr=i,h(o.onViewportChanged,{}))}function hh(n,t,i){return i==null?"":(i+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function dr(n,t){var i=u.getItemMetadata&&u.getItemMetadata(n),r=i&&i.columns&&(i.columns[t.id]||i.columns[kt(t.id)]);return r&&r.formatter||i&&i.formatter||t.formatter||e.formatterFactory&&e.formatterFactory.getFormatter(t)||e.defaultFormatter}function he(n,t){var r=f[t],o=u.getItemMetadata&&u.getItemMetadata(n),i=o&&o.columns;return i&&i[r.id]&&i[r.id].editor!==undefined?i[r.id].editor:i&&i[t]&&i[t].editor!==undefined?i[t].editor:r.editor||e.editorFactory&&e.editorFactory.getEditor(r)}function gr(n,t){return e.dataItemColumnValueExtractor?e.dataItemColumnValueExtractor(n,t):n[t.field]}function ch(n,t,i,r){var a=wt(t),w=t<r&&!a,v="slick-row"+(w?" loading":"")+(t===s?" active":"")+(t%2==1?" odd":" even"),h,c,p,o,l,y;for(a||(v+=" "+e.addNewRowCssClass),h=u.getItemMetadata&&u.getItemMetadata(t),h&&h.cssClasses&&(v+=" "+h.cssClasses),n.push("<div class='ui-widget-content "+v+"' style='top:"+uf(t)+"px'>"),o=0,l=f.length;o<l;o++){if(p=f[o],c=1,h&&h.columns&&(y=h.columns[p.id]||h.columns[o],c=y&&y.colspan||1,c==="*"&&(c=l-o)),ir[Math.min(l-1,o+c-1)]>i.leftPx){if(tr[o]>i.rightPx)break;ce(n,t,o,c,a)}c>1&&(o+=c-1)}n.push("<\/div>")}function ce(n,t,i,r,u){var e=f[i],h="slick-cell l"+i+" r"+Math.min(f.length-1,i+r-1)+(e.cssClass?" "+e.cssClass:""),o,c;t===s&&i===v&&(h+=" active");for(o in st)st[o][t]&&st[o][t][e.id]&&(h+=" "+st[o][t][e.id]);n.push("<div class='"+h+"'>");u&&(c=gr(u,e),n.push(dr(t,e)(t,i,c,e,u)));n.push("<\/div>");a[t].cellRenderQueue.push(i);a[t].cellColSpans[i]=r}function le(n){for(var t in a)(t=parseInt(t,10))!==s&&(t<n.top||t>n.bottom)&&nu(t)}function lh(){tu();li();ut()}function li(){c&&bt();for(var n in a)nu(n)}function nu(n){var t=a[n];t&&(wr==t.rowNode?(t.rowNode.style.display="none",sr=wr):nt[0].removeChild(t.rowNode),delete a[n],delete ii[n],yu--,kf++)}function ae(n){var t,i;if(n&&n.length)for(ei=0,t=0,i=n.length;t<i;t++)c&&s===n[t]&&bt(),a[n[t]]&&nu(n[t])}function ve(n){ae([n])}function ah(n,t){var u=ht(n,t),r,i;u&&(r=f[t],i=wt(n),c&&s===n&&v===t?c.loadValue(i):(u.innerHTML=i?dr(n,r)(n,t,gr(i,r),r,i):"",ef(n)))}function ff(n){var r=a[n],i,t,u,e;if(r){ru(n);i=wt(n);for(t in r.cellNodesByColumnIdx)r.cellNodesByColumnIdx.hasOwnProperty(t)&&(t=t|0,u=f[t],e=r.cellNodesByColumnIdx[t],n===s&&t===v&&c?c.loadValue(i):e.innerHTML=i?dr(n,u)(n,t,gr(i,u),u,i):"");ef(n)}}function vh(){return parseFloat(n.css(y[0],"height",!0))-parseFloat(n.css(y[0],"paddingTop",!0))-parseFloat(n.css(y[0],"paddingBottom",!0))-parseFloat(n.css(wi[0],"height"))-gu(wi)-(e.showTopPanel?e.topPanelHeight+gu(si):0)-(e.showHeaderRow?e.headerRowHeight+gu(yt):0)}function gt(){vt&&(b=e.autoHeight?e.rowHeight*dt():vh(),vr=Math.ceil(b/e.rowHeight),et=parseFloat(n.css(y[0],"width",!0)),e.autoHeight||k.height(b),e.forceFitColumns&&nf(),tu(),hr(),ur=-1,ut())}function tu(){var n,r,u,h;if(vt){var f=dt(),o=f+(e.leaveSpaceForNewRows?vr-1:0),c=di;di=!e.autoHeight&&o*e.rowHeight>b;bt();n=f-1;for(r in a)r>=n&&nu(r);l&&s>n&&hf();u=at;lt=Math.max(e.rowHeight*o,b-t.height);lt<i?(at=yi=lt,pi=1,lr=0):(at=i,yi=at/100,pi=Math.floor(lt/yi),lr=(lt-at)/(pi-1));at!==u&&(nt.css("height",at),p=k[0].scrollTop);h=p+g<=lt-b;lt==0||p==0?fi=g=0:h?ri(p+g):ri(lt-b);at!=u&&e.autoHeight&&gt();e.forceFitColumns&&c!=di&&nf();du(!1)}}function iu(n,t){return n==null&&(n=p),t==null&&(t=tt),{top:kr(n),bottom:kr(n+b)+1,leftPx:t,rightPx:t+et}}function ye(n,t){var i=iu(n,t),u=Math.round(b/e.rowHeight),r=3;return ei==-1?(i.top-=u,i.bottom+=r):ei==1?(i.top-=r,i.bottom+=u):(i.top-=r,i.bottom+=r),i.top=Math.max(0,i.top),i.bottom=Math.min(dt()-1,i.bottom),i.leftPx-=et,i.rightPx+=et,i.leftPx=Math.max(0,i.leftPx),i.rightPx=Math.min(pt,i.rightPx),i}function ru(n){var t=a[n],i,r;if(t&&t.cellRenderQueue.length)for(i=t.rowNode.lastChild;t.cellRenderQueue.length;)r=t.cellRenderQueue.pop(),t.cellNodesByColumnIdx[r]=i,i=i.previousSibling}function yh(n,t){var h=0,r=a[t],e=[],i,o,u;for(i in r.cellNodesByColumnIdx)r.cellNodesByColumnIdx.hasOwnProperty(i)&&(i=i|0,o=r.cellColSpans[i],(tr[i]>n.rightPx||ir[Math.min(f.length-1,i+o-1)]<n.leftPx)&&(t==s&&i==v||e.push(i)));while((u=e.pop())!=null)r.rowNode.removeChild(r.cellNodesByColumnIdx[u]),delete r.cellColSpans[u],delete r.cellNodesByColumnIdx[u],ii[t]&&delete ii[t][u],h++}function ph(n){for(var o,w,t,h,l,v,b,y,k,e,c=[],p=[],s,d=0,i,r=n.top,g=n.bottom;r<=g;r++)if(e=a[r],e){for(ru(r),yh(n,r),s=0,o=u.getItemMetadata&&u.getItemMetadata(r),o=o&&o.columns,w=wt(r),t=0,h=f.length;t<h;t++){if(tr[t]>n.rightPx)break;if((i=e.cellColSpans[t])!=null){t+=i>1?i-1:0;continue}i=1;o&&(l=o[f[t].id]||o[t],i=l&&l.colspan||1,i==="*"&&(i=h-t));ir[Math.min(h-1,t+i-1)]>n.leftPx&&(ce(c,r,t,i,w),s++);t+=i>1?i-1:0}s&&(d+=s,p.push(r))}if(c.length)for(v=document.createElement("div"),v.innerHTML=c.join("");(b=p.pop())!=null;)for(e=a[b];(k=e.cellRenderQueue.pop())!=null;)y=v.lastChild,e.rowNode.appendChild(y),e.cellNodesByColumnIdx[k]=y}function wh(n){for(var u,o=nt[0],f=[],i=[],e=!1,h=rt(),t=n.top,r=n.bottom;t<=r;t++)a[t]||(yu++,i.push(t),a[t]={rowNode:null,cellColSpans:[],cellNodesByColumnIdx:[],cellRenderQueue:[]},ch(f,t,n,h),l&&s===t&&(e=!0),bf++);if(i.length){for(u=document.createElement("div"),u.innerHTML=f.join(""),t=0,r=i.length;t<r;t++)a[i[t]].rowNode=o.appendChild(u.firstChild);e&&(l=ht(s,v))}}function pe(){e.enableAsyncPostRender&&(clearTimeout(bu),bu=setTimeout(we,e.asyncPostRenderDelay))}function ef(n){delete ii[n];or=Math.min(or,n);er=Math.max(er,n);pe()}function bh(){for(var n in a)a[n].rowNode.style.top=uf(n)+"px"}function ut(){if(vt){var t=iu(),n=ye();le(n);ur!=tt&&ph(n);wh(n);or=t.top;er=Math.min(dt()-1,t.bottom);pe();yr=p;ur=tt;pr=null}}function kh(){var n=yt[0].scrollLeft;n!=k[0].scrollLeft&&(k[0].scrollLeft=n)}function hr(){var n,t,i;p=k[0].scrollTop;tt=k[0].scrollLeft;n=Math.abs(p-nr);t=Math.abs(tt-wf);t&&(wf=tt,wi[0].scrollLeft=tt,si[0].scrollLeft=tt,yt[0].scrollLeft=tt);n&&(ei=nr<p?1:-1,nr=p,n<b?ri(p+g):(i=g,fi=at==b?0:Math.min(pi-1,Math.floor(p*((lt-b)/(at-b))*(1/yi))),g=Math.round(fi*lr),i!=g&&li()));(t||n)&&(pr&&clearTimeout(pr),(Math.abs(yr-p)>20||Math.abs(ur-tt)>20)&&(e.forceSyncScrolling||Math.abs(yr-p)<b&&Math.abs(ur-tt)<et?ut():pr=setTimeout(ut,50),h(o.onViewportChanged,{})));h(o.onScroll,{scrollLeft:tt,scrollTop:p})}function we(){for(var o=rt(),n,i,t,r,u;or<=er;)if(n=ei>=0?or++:er--,i=a[n],i&&!(n>=o)){ii[n]||(ii[n]={});ru(n);for(t in i.cellNodesByColumnIdx)i.cellNodesByColumnIdx.hasOwnProperty(t)&&(t=t|0,r=f[t],r.asyncPostRender&&!ii[n][t]&&(u=i.cellNodesByColumnIdx[t],u&&r.asyncPostRender(u,n,wt(n),r),ii[n][t]=!0));bu=setTimeout(we,e.asyncPostRenderDelay);return}}function of(t,i){var e,r,u,f;for(var o in a){if(f=i&&i[o],u=t&&t[o],f)for(r in f)u&&f[r]==u[r]||(e=ht(o,kt(r)),e&&n(e).removeClass(f[r]));if(u)for(r in u)f&&f[r]==u[r]||(e=ht(o,kt(r)),e&&n(e).addClass(u[r]))}}function dh(n,t){if(st[n])throw"addCellCssStyles: cell CSS hash with key '"+n+"' already exists.";st[n]=t;of(t,null);h(o.onCellCssStylesChanged,{key:n,hash:t})}function gh(n){st[n]&&(of(null,st[n]),delete st[n],h(o.onCellCssStylesChanged,{key:n,hash:null}))}function be(n,t){var i=st[n];st[n]=t;of(t,i);h(o.onCellCssStylesChanged,{key:n,hash:t})}function nc(n){return st[n]}function tc(t,i,r){if(r=r||100,a[t]){var u=n(ht(t,i));function f(n){n&&setTimeout(function(){u.queue(function(){u.toggleClass(e.cellFlashingCssClass).dequeue();f(n-1)})},r)}f(4)}}function ic(t){var i=n(t.target).closest(".slick-row")[0];i!=wr&&(sr&&sr!=i&&(nt[0].removeChild(sr),sr=null),wr=i)}function rc(n,t){var i=cr(n),r;return!i||!sf(i.row,i.cell)?!1:(r=h(o.onDragInit,t,n),n.isImmediatePropagationStopped())?r:!1}function uc(n,t){var i=cr(n),r;return!i||!sf(i.row,i.cell)?!1:(r=h(o.onDragStart,t,n),n.isImmediatePropagationStopped())?r:!1}function fc(n,t){return h(o.onDrag,t,n)}function ec(n,t){h(o.onDragEnd,t,n)}function oc(n){h(o.onKeyDown,{row:s,cell:v},n);var t=n.isImmediatePropagationStopped();if(!t)if(n.shiftKey||n.altKey||n.ctrlKey)n.which!=9||!n.shiftKey||n.ctrlKey||n.altKey||(t=yo());else if(n.which==27){if(!d().isActive())return;to()}else n.which==34?(eo(),t=!0):n.which==33?(oo(),t=!0):n.which==37?t=lo():n.which==39?t=co():n.which==38?t=ao():n.which==40?t=ou():n.which==9?t=vo():n.which==13&&(e.editable&&(c?s===rt()?ou():no():d().commitCurrentEdit()&&fu()),t=!0);if(t){n.stopPropagation();n.preventDefault();try{n.originalEvent.keyCode=0}catch(i){}}}function sc(t){c||(t.target!=document.activeElement||n(t.target).hasClass("slick-cell"))&&ui();var i=cr(t);i&&(c===null||s!=i.row||v!=i.cell)&&((h(o.onClick,{row:i.row,cell:i.cell},t),t.isImmediatePropagationStopped())||(v!=i.cell||s!=i.row)&&ct(i.row,i.cell)&&(!d().isActive()||d().commitCurrentEdit())&&(cf(i.row,!1),ai(ht(i.row,i.cell)),ui()))}function hc(t){var i=n(t.target).closest(".slick-cell",nt);i.length!==0&&(l!==i[0]||c===null)&&h(o.onContextMenu,{},t)}function cc(n){var t=cr(n);t&&(c===null||s!=t.row||v!=t.cell)&&((h(o.onDblClick,{row:t.row,cell:t.cell},n),n.isImmediatePropagationStopped())||e.editable&&wo(t.row,t.cell,!0))}function lc(t){h(o.onHeaderMouseEnter,{column:n(this).data("column")},t)}function ac(t){h(o.onHeaderMouseLeave,{column:n(this).data("column")},t)}function vc(t){var i=n(t.target).closest(".slick-header-column",".slick-header-columns"),r=i&&i.data("column");h(o.onHeaderContextMenu,{column:r},t)}function yc(t){var i=n(t.target).closest(".slick-header-column",".slick-header-columns"),r=i&&i.data("column");r&&h(o.onHeaderClick,{column:r},t)}function pc(n){h(o.onMouseEnter,{},n)}function wc(n){h(o.onMouseLeave,{},n)}function sf(n,t){return!(n<0||n>=rt()||t<0||t>=f.length)}function bc(n,t){for(var e=kr(t),i=0,u=0,r=0;r<f.length&&u<n;r++)u+=f[r].width,i++;return i<0&&(i=0),{row:e,cell:i-1}}function ke(n){var t=/l\d+/.exec(n.className);if(!t)throw"getCellFromNode: cannot get cell - "+n.className;return parseInt(t[0].substr(1,t[0].length-1),10)}function de(n){for(var t in a)if(a[t].rowNode===n)return t|0;return null}function cr(t){var i=n(t.target).closest(".slick-cell",nt),r,u;return i.length?(r=de(i[0].parentNode),u=ke(i[0]),r==null||u==null?null:{row:r,cell:u}):null}function kc(n,t){var i,o;if(!sf(n,t))return null;var u=uf(n),s=u+e.rowHeight-1,r=0;for(i=0;i<t;i++)r+=f[i].width;return o=r+f[t].width,{top:u,left:r,bottom:s,right:o}}function hf(){ai(null,!1)}function ui(){n(l).focus()}function uu(n,t,i){cf(n,i);var u=vi(n,t),r=tr[t],f=ir[t+(u>1?u-1:0)],e=tt+et;r<tt?(k.scrollLeft(r),hr(),ut()):f>e&&(k.scrollLeft(Math.min(r,f-k[0].clientWidth)),hr(),ut())}function ai(t,i){var r,u;l!==null&&(bt(),n(l).removeClass("active"),a[s]&&n(a[s].rowNode).removeClass("active"));r=l!==t;n(l).removeAttr("tabindex");u=document.activeElement==null||document.activeElement==l;l=t;l!=null?(s=de(l.parentNode),v=gi=ke(l),i==null&&(i=s==rt()||e.autoEdit),n(l).addClass("active"),n(a[s].rowNode).addClass("active"),n(l).attr("tabindex","1"),u&&(n(l).focus(),n(l).focus()),e.editable&&i&&ge(s,v)&&(clearTimeout(wu),e.asyncEditorLoading?wu=setTimeout(function(){fu()},e.asyncEditorLoadDelay):fu())):s=v=null;r&&h(o.onActiveCellChanged,uo())}function dc(){if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(t){}else if(window.getSelection){var n=window.getSelection();n&&n.removeAllRanges&&n.removeAllRanges()}}function ge(n,t){var i=rt();return n<i&&!wt(n)?!1:f[t].cannotTriggerInsert&&n>=i?!1:he(n,t)?!0:!1}function bt(){var t,i,r;c&&(h(o.onBeforeCellEditorDestroy,{editor:c}),c.destroy(),c=null,l&&(t=wt(s),n(l).removeClass("editable invalid"),t&&(i=f[v],r=dr(s,i),l.innerHTML=r(s,v,gr(t,i),i,t),ef(s))),navigator.userAgent.toLowerCase().match(/msie/)&&dc(),d().deactivate(ar))}function fu(t){if(l){if(!e.editable)throw"Grid : makeActiveCellEditable : should never get called when options.editable is false";if(clearTimeout(wu),ge(s,v)){var r=f[v],i=wt(s);if(h(o.onBeforeEditCell,{row:s,cell:v,item:i,column:r})===!1){ui();return}d().activate(ar);n(l).addClass("editable");t||(l.innerHTML="");c=new(t||he(s,v))({grid:o,gridPosition:eu(y[0]),position:eu(l),container:l,column:r,item:i||{},commitChanges:no,cancelChanges:to});i&&c.loadValue(i);pf=c.serializeValue();c.position&&ro()}}}function no(){d().commitCurrentEdit()&&(ui(),e.autoEdit&&ou())}function to(){d().cancelCurrentEdit()&&ui()}function eu(t){var i={top:t.offsetTop,left:t.offsetLeft,bottom:0,right:0,width:n(t).outerWidth(),height:n(t).outerHeight(),visible:!0},r;for(i.bottom=i.top+i.height,i.right=i.left+i.width,r=t.offsetParent;(t=t.parentNode)!=document.body;)i.visible&&t.scrollHeight!=t.offsetHeight&&n(t).css("overflowY")!="visible"&&(i.visible=i.bottom>t.scrollTop&&i.top<t.scrollTop+t.clientHeight),i.visible&&t.scrollWidth!=t.offsetWidth&&n(t).css("overflowX")!="visible"&&(i.visible=i.right>t.scrollLeft&&i.left<t.scrollLeft+t.clientWidth),i.left-=t.scrollLeft,i.top-=t.scrollTop,t===r&&(i.left+=t.offsetLeft,i.top+=t.offsetTop,r=t.offsetParent),i.bottom=i.top+i.height,i.right=i.left+i.width;return i}function io(){return eu(l)}function gc(){return eu(y[0])}function ro(){if(l&&(h(o.onActiveCellPositionChanged,{}),c)){var n=io();c.show&&c.hide&&(n.visible?c.show():c.hide());c.position&&c.position(n)}}function nl(){return c}function uo(){return l?{row:s,cell:v}:null}function tl(){return l}function cf(n,i){var r=n*e.rowHeight,u=(n+1)*e.rowHeight-b+(lu?t.height:0);(n+1)*e.rowHeight>p+b+g?(ri(i?r:u),ut()):n*e.rowHeight<p+g&&(ri(i?u:r),ut())}function il(n){ri(n*e.rowHeight);ut()}function fo(n){var f=n*vr,t,r;if(ri((kr(p)+f)*e.rowHeight),ut(),e.enableCellNavigation&&s!=null){t=s+f;r=dt();t>=r&&(t=r-1);t<0&&(t=0);for(var i=0,u=null,o=gi;i<=gi;)ct(t,i)&&(u=i),i+=vi(t,i);u!==null?(ai(ht(t,u)),gi=o):hf()}}function eo(){fo(1)}function oo(){fo(-1)}function vi(n,t){var i=u.getItemMetadata&&u.getItemMetadata(n),r,e;return!i||!i.columns?1:(r=i.columns[f[t].id]||i.columns[t],e=r&&r.colspan,e==="*"?f.length-t:e||1)}function so(n){for(var t=0;t<f.length;){if(ct(n,t))return t;t+=vi(n,t)}return null}function rl(n){for(var t=0,i=null;t<f.length;)ct(n,t)&&(i=t),t+=vi(n,t);return i}function lf(n,t){if(t>=f.length)return null;do t+=vi(n,t);while(t<f.length&&!ct(n,t));return t<f.length?{row:n,cell:t,posX:t}:null}function ho(n,t){var r,i,u;if(t<=0||(r=so(n),r===null||r>=t))return null;for(i={row:n,cell:r,posX:r};;){if(u=lf(i.row,i.cell,i.posX),!u)return null;if(u.cell>=t)return i;i=u}}function ul(n,t,i){for(var r,u=dt();;){if(++n>=u)return null;for(r=t=0;t<=i;)r=t,t+=vi(n,t);if(ct(n,r))return{row:n,cell:r,posX:i}}}function fl(n,t,i){for(var r;;){if(--n<0)return null;for(r=t=0;t<=i;)r=t,t+=vi(n,t);if(ct(n,r))return{row:n,cell:r,posX:i}}}function el(n,t,i){var u,r,f;if(n==null&&t==null&&(n=t=i=0,ct(n,t)))return{row:n,cell:t,posX:t};if(u=lf(n,t,i),u)return u;for(r=null,f=dt();++n<f;)if(r=so(n),r!==null)return{row:n,cell:r,posX:r};return null}function ol(n,t,i){if(n==null&&t==null&&(n=dt()-1,t=i=f.length-1,ct(n,t)))return{row:n,cell:t,posX:t};for(var r,u;!r;){if(r=ho(n,t,i),r)break;if(--n<0)return null;t=0;u=rl(n);u!==null&&(r={row:n,cell:u,posX:u})}return r}function co(){return rr("right")}function lo(){return rr("left")}function ou(){return rr("down")}function ao(){return rr("up")}function vo(){return rr("next")}function yo(){return rr("prev")}function rr(n){var i,r;if(!e.enableCellNavigation||!l&&n!="prev"&&n!="next")return!1;if(!d().commitCurrentEdit())return!0;ui();i={up:-1,down:1,left:-1,right:1,prev:-1,next:1};go=i[n];var u={up:fl,down:ul,left:ho,right:lf,prev:ol,next:el},f=u[n],t=f(s,v,gi);return t?(r=t.row==rt(),uu(t.row,t.cell,!r),ai(ht(t.row,t.cell)),gi=t.posX,!0):(ai(ht(s,v)),!1)}function ht(n,t){return a[n]?(ru(n),a[n].cellNodesByColumnIdx[t]):null}function sl(n,t){vt&&(n>rt()||n<0||t>=f.length||t<0||e.enableCellNavigation&&(uu(n,t,!1),ai(ht(n,t),!1)))}function ct(n,t){var r,i;return!e.enableCellNavigation||n>=dt()||n<0||t>=f.length||t<0?!1:(r=u.getItemMetadata&&u.getItemMetadata(n),r&&typeof r.focusable=="boolean")?r.focusable:(i=r&&r.columns,i&&i[f[t].id]&&typeof i[f[t].id].focusable=="boolean")?i[f[t].id].focusable:i&&i[t]&&typeof i[t].focusable=="boolean"?i[t].focusable:f[t].focusable}function po(n,t){var i,r;return n>=rt()||n<0||t>=f.length||t<0?!1:(i=u.getItemMetadata&&u.getItemMetadata(n),i&&typeof i.selectable=="boolean")?i.selectable:(r=i&&i.columns&&(i.columns[f[t].id]||i.columns[t]),r&&typeof r.selectable=="boolean")?r.selectable:f[t].selectable}function wo(n,t,i){if(vt&&ct(n,t)&&d().commitCurrentEdit()){uu(n,t,!1);var r=ht(n,t);ai(r,i||n===rt()||e.autoEdit);c||ui()}}function hl(){var t=wt(s),i=f[v],r,u,a;if(c){if(c.isValueChanged())return r=c.validate(),r.valid?(s<rt()?(u={row:s,cell:v,editor:c,serializedValue:c.serializeValue(),prevSerializedValue:pf,execute:function(){this.editor.applyValue(t,this.serializedValue);ff(this.row);h(o.onCellChange,{row:s,cell:v,item:t})},undo:function(){this.editor.applyValue(t,this.prevSerializedValue);ff(this.row);h(o.onCellChange,{row:s,cell:v,item:t})}},e.editCommandHandler?(bt(),e.editCommandHandler(t,i,u)):(u.execute(),bt())):(a={},c.applyValue(a,c.serializeValue()),bt(),h(o.onAddNewRow,{item:a,column:i})),!d().isActive()):(n(l).removeClass("invalid"),n(l).width(),n(l).addClass("invalid"),h(o.onValidationError,{editor:c,cellNode:l,validationResults:r,row:s,cell:v,column:i}),c.focus(),!1);bt()}return!0}function cl(){return bt(),!0}function ll(n){for(var i=[],r=f.length-1,t=0;t<n.length;t++)i.push(new Slick.Range(n[t],0,n[t],r));return i}function bo(){if(!ot)throw"Selection model is not set";return pu}function al(n){if(!ot)throw"Selection model is not set";ot.setSelectedRanges(ll(n))}var ko={explicitInitialization:!1,rowHeight:25,defaultColumnWidth:80,enableAddRow:!1,leaveSpaceForNewRows:!1,editable:!1,autoEdit:!0,enableCellNavigation:!0,enableColumnReorder:!0,asyncEditorLoading:!1,asyncEditorLoadDelay:100,forceFitColumns:!1,enableAsyncPostRender:!1,asyncPostRenderDelay:50,autoHeight:!1,editorLock:Slick.GlobalEditorLock,showHeaderRow:!1,headerRowHeight:25,showTopPanel:!1,topPanelHeight:25,formatterFactory:null,editorFactory:null,cellFlashingCssClass:"flashing",selectedCellCssClass:"selected",multiSelect:!0,enableTextSelectionOnCells:!1,dataItemColumnValueExtractor:null,fullWidthRows:!1,multiColumnSort:!1,defaultFormatter:hh,forceSyncScrolling:!1,addNewRowCssClass:"new-row"},su={name:"",resizable:!0,sortable:!1,minWidth:30,rerenderOnResize:!1,headerCssClass:null,defaultSortAsc:!0,focusable:!0,selectable:!0},lt,at,yi,pi,lr,fi=0,g=0,ei=1,vt=!1,y,ft="slickgrid_"+Math.round(1e6*Math.random()),o=this,wi,w,oi,yt,af,si,vf,k,nt,bi,hi,ki,hu,cu,b,et,pt,lu,di,ci=0,yf=0,au=0,vu=0,ni,go=1,gi,s,v,l=null,c=null,pf,ar,a={},yu=0,vr,nr=0,p=0,yr=0,ur=0,wf=0,tt=0,ot,pu=[],ti=[],st={},fr={},it=[],tr=[],ir=[],wu=null,pr=null,bu=null,ii={},er=null,or=null,bf=0,kf=0,wr,sr;this.debug=function(){var n="";n+="\ncounter_rows_rendered:  "+bf;n+="\ncounter_rows_removed:  "+kf;n+="\nrenderedRows:  "+yu;n+="\nnumVisibleRows:  "+vr;n+="\nmaxSupportedCssHeight:  "+i;n+="\nn(umber of pages):  "+pi;n+="\n(current) page:  "+fi;n+="\npage height (ph):  "+yi;n+="\nvScrollDir:  "+ei;alert(n)};this.eval=function(n){return eval(n)};n.extend(this,{slickGridVersion:"2.1",onScroll:new Slick.Event,onSort:new Slick.Event,onHeaderMouseEnter:new Slick.Event,onHeaderMouseLeave:new Slick.Event,onHeaderContextMenu:new Slick.Event,onHeaderClick:new Slick.Event,onHeaderCellRendered:new Slick.Event,onBeforeHeaderCellDestroy:new Slick.Event,onHeaderRowCellRendered:new Slick.Event,onBeforeHeaderRowCellDestroy:new Slick.Event,onMouseEnter:new Slick.Event,onMouseLeave:new Slick.Event,onClick:new Slick.Event,onDblClick:new Slick.Event,onContextMenu:new Slick.Event,onKeyDown:new Slick.Event,onAddNewRow:new Slick.Event,onValidationError:new Slick.Event,onViewportChanged:new Slick.Event,onColumnsReordered:new Slick.Event,onColumnsResized:new Slick.Event,onCellChange:new Slick.Event,onBeforeEditCell:new Slick.Event,onBeforeCellEditorDestroy:new Slick.Event,onBeforeDestroy:new Slick.Event,onActiveCellChanged:new Slick.Event,onActiveCellPositionChanged:new Slick.Event,onDragInit:new Slick.Event,onDragStart:new Slick.Event,onDrag:new Slick.Event,onDragEnd:new Slick.Event,onSelectedRowsChanged:new Slick.Event,onCellCssStylesChanged:new Slick.Event,registerPlugin:ts,unregisterPlugin:gf,getColumns:nh,setColumns:oe,getColumnIndex:kt,updateColumnHeader:cs,setSortColumn:ds,setSortColumns:br,getSortColumns:gs,autosizeColumns:nf,getOptions:th,setOptions:ih,getData:uh,getDataLength:rt,getDataItem:wt,setData:rh,getSelectionModel:rs,setSelectionModel:is,getSelectedRows:bo,setSelectedRows:al,getContainerNode:sh,render:ut,invalidate:lh,invalidateRow:ve,invalidateRows:ae,invalidateAllRows:li,updateCell:ah,updateRow:ff,getViewport:iu,getRenderedRange:ye,resizeCanvas:gt,updateRowCount:tu,scrollRowIntoView:cf,scrollRowToTop:il,scrollCellIntoView:uu,getCanvasNode:us,focus:ui,getCellFromPoint:bc,getCellFromEvent:cr,getActiveCell:uo,setActiveCell:sl,getActiveCellNode:tl,getActiveCellPosition:io,resetActiveCell:hf,editActiveCell:fu,getCellEditor:nl,getCellNode:ht,getCellNodeBox:kc,canCellBeSelected:po,canCellBeActive:ct,navigatePrev:yo,navigateNext:vo,navigateUp:ao,navigateDown:ou,navigateLeft:lo,navigateRight:co,navigatePageUp:oo,navigatePageDown:eo,gotoCell:wo,getTopPanel:fh,setTopPanelVisibility:eh,setHeaderRowVisibility:oh,getHeaderRow:ls,getHeaderRowColumn:as,getGridPosition:gc,flashCell:tc,addCellCssStyles:dh,setCellCssStyles:be,removeCellCssStyles:gh,getCellCssStyles:nc,init:df,destroy:bs,getEditorLock:d,getEditController:ks});ns()}n.extend(!0,window,{Slick:{Grid:r}});var t,i})(jQuery)
//# sourceMappingURL=slick.grid.min.js.map
(function(n){function t(t){function y(r){h=n.extend(!0,{},v,t);i=r;f.subscribe(i.onActiveCellChanged,o(d));f.subscribe(i.onKeyDown,o(g));f.subscribe(i.onClick,o(nt))}function p(){f.unsubscribeAll()}function o(n){return function(){e||(e=!0,n.apply(this,arguments),e=!1)}}function c(n){for(var i,r=[],t=0;t<n.length;t++)for(i=n[t].fromRow;i<=n[t].toRow;i++)r.push(i);return r}function s(n){for(var r=[],u=i.getColumns().length-1,t=0;t<n.length;t++)r.push(new Slick.Range(n[t],0,n[t],u));return r}function w(n,t){for(var r=[],i=n;i<=t;i++)r.push(i);for(i=t;i<n;i++)r.push(i);return r}function l(){return c(r)}function b(n){u(s(n))}function u(n){r=n;a.onSelectedRangesChanged.notify(r)}function k(){return r}function d(n,t){h.selectActiveRow&&t.row!=null&&u([new Slick.Range(t.row,0,t.row,i.getColumns().length-1)])}function g(n){var e=i.getActiveCell(),t,f,o,h;!e||!n.shiftKey||n.ctrlKey||n.altKey||n.metaKey||n.which!=38&&n.which!=40||(t=l(),t.sort(function(n,t){return n-t}),t.length||(t=[e.row]),f=t[0],o=t[t.length-1],h=n.which==40?e.row>f||f==o?++o:++f:e.row>f?--o:--f,h>=0&&h<i.getDataLength()&&(i.scrollRowIntoView(h),i.setActiveCell(h,e.cell),r=s(w(f,o)),u(r)),n.preventDefault(),n.stopPropagation())}function nt(t){var f=i.getCellFromEvent(t),e,l,o;if(!f||!i.canCellBeActive(f.row,f.cell)||!i.getOptions().multiSelect||!t.ctrlKey&&!t.shiftKey&&!t.metaKey)return!1;if(e=c(r),l=n.inArray(f.row,e),l===-1&&(t.ctrlKey||t.metaKey))e.push(f.row),i.setActiveCell(f.row,f.cell);else if(l!==-1&&(t.ctrlKey||t.metaKey))e=n.grep(e,function(n){return n!==f.row}),i.setActiveCell(f.row,f.cell);else if(e.length&&t.shiftKey){var h=e.pop(),a=Math.min(f.row,h),v=Math.max(f.row,h);for(e=[],o=a;o<=v;o++)o!==h&&e.push(o);e.push(h);i.setActiveCell(f.row,f.cell)}return r=s(e),u(r),t.stopImmediatePropagation(),!0}var i,r=[],a=this,f=new Slick.EventHandler,e,h,v={selectActiveRow:!0};n.extend(this,{getSelectedRows:l,setSelectedRows:b,getSelectedRanges:k,setSelectedRanges:u,init:y,destroy:p,onSelectedRangesChanged:new Slick.Event})}n.extend(!0,window,{Slick:{RowSelectionModel:t}})})(jQuery)
//# sourceMappingURL=slick.rowselectionmodel.min.js.map
/*! 
 * jquery.event.drag - v 2.2
 * Copyright (c) 2010 Three Dub Media - http://threedubmedia.com
 * Open Source MIT License - http://threedubmedia.com/code/license
 */
;(function($){$.fn.drag=function(str,arg,opts){var type=typeof str=="string"?str:"",fn=$.isFunction(str)?str:$.isFunction(arg)?arg:null;if(type.indexOf("drag")!==0)type="drag"+type;opts=(str==fn?arg:opts)||{};return fn?this.bind(type,opts,fn):this.trigger(type)};var $event=$.event,$special=$event.special,drag=$special.drag={defaults:{which:1,distance:0,not:':input',handle:null,relative:false,drop:true,click:false},datakey:"dragdata",noBubble:true,add:function(obj){var data=$.data(this,drag.datakey),opts=obj.data||{};data.related+=1;$.each(drag.defaults,function(key,def){if(opts[key]!==undefined)data[key]=opts[key]})},remove:function(){$.data(this,drag.datakey).related-=1},setup:function(){if($.data(this,drag.datakey))return;var data=$.extend({related:0},drag.defaults);$.data(this,drag.datakey,data);$event.add(this,"touchstart mousedown",drag.init,data);if(this.attachEvent)this.attachEvent("ondragstart",drag.dontstart)},teardown:function(){var data=$.data(this,drag.datakey)||{};if(data.related)return;$.removeData(this,drag.datakey);$event.remove(this,"touchstart mousedown",drag.init);drag.textselect(true);if(this.detachEvent)this.detachEvent("ondragstart",drag.dontstart)},init:function(event){if(drag.touched)return;var dd=event.data,results;if(event.which!=0&&dd.which>0&&event.which!=dd.which)return;if($(event.target).is(dd.not))return;if(dd.handle&&!$(event.target).closest(dd.handle,event.currentTarget).length)return;drag.touched=event.type=='touchstart'?this:null;dd.propagates=1;dd.mousedown=this;dd.interactions=[drag.interaction(this,dd)];dd.target=event.target;dd.pageX=event.pageX;dd.pageY=event.pageY;dd.dragging=null;results=drag.hijack(event,"draginit",dd);if(!dd.propagates)return;results=drag.flatten(results);if(results&&results.length){dd.interactions=[];$.each(results,function(){dd.interactions.push(drag.interaction(this,dd))})}dd.propagates=dd.interactions.length;if(dd.drop!==false&&$special.drop)$special.drop.handler(event,dd);drag.textselect(false);if(drag.touched)$event.add(drag.touched,"touchmove touchend",drag.handler,dd);else $event.add(document,"mousemove mouseup",drag.handler,dd);if(!drag.touched||dd.live)return false},interaction:function(elem,dd){var offset=$(elem)[dd.relative?"position":"offset"]()||{top:0,left:0};return{drag:elem,callback:new drag.callback,droppable:[],offset:offset}},handler:function(event){var dd=event.data;switch(event.type){case!dd.dragging&&'touchmove':event.preventDefault();case!dd.dragging&&'mousemove':if(Math.pow(event.pageX-dd.pageX,2)+Math.pow(event.pageY-dd.pageY,2)<Math.pow(dd.distance,2))break;event.target=dd.target;drag.hijack(event,"dragstart",dd);if(dd.propagates)dd.dragging=true;case'touchmove':event.preventDefault();case'mousemove':if(dd.dragging){drag.hijack(event,"drag",dd);if(dd.propagates){if(dd.drop!==false&&$special.drop)$special.drop.handler(event,dd);break}event.type="mouseup"}case'touchend':case'mouseup':default:if(drag.touched)$event.remove(drag.touched,"touchmove touchend",drag.handler);else $event.remove(document,"mousemove mouseup",drag.handler);if(dd.dragging){if(dd.drop!==false&&$special.drop)$special.drop.handler(event,dd);drag.hijack(event,"dragend",dd)}drag.textselect(true);if(dd.click===false&&dd.dragging)$.data(dd.mousedown,"suppress.click",(new Date).getTime()+5);dd.dragging=drag.touched=false;break}},hijack:function(event,type,dd,x,elem){if(!dd)return;var orig={event:event.originalEvent,type:event.type},mode=type.indexOf("drop")?"drag":"drop",result,i=x||0,ia,$elems,callback,len=!isNaN(x)?x:dd.interactions.length;event.type=type;event.originalEvent=null;dd.results=[];do if(ia=dd.interactions[i]){if(type!=="dragend"&&ia.cancelled)continue;callback=drag.properties(event,dd,ia);ia.results=[];$(elem||ia[mode]||dd.droppable).each(function(p,subject){callback.target=subject;event.isPropagationStopped=function(){return false};result=subject?$event.dispatch.call(subject,event,callback):null;if(result===false){if(mode=="drag"){ia.cancelled=true;dd.propagates-=1}if(type=="drop"){ia[mode][p]=null}}else if(type=="dropinit")ia.droppable.push(drag.element(result)||subject);if(type=="dragstart")ia.proxy=$(drag.element(result)||ia.drag)[0];ia.results.push(result);delete event.result;if(type!=="dropinit")return result});dd.results[i]=drag.flatten(ia.results);if(type=="dropinit")ia.droppable=drag.flatten(ia.droppable);if(type=="dragstart"&&!ia.cancelled)callback.update()}while(++i<len);event.type=orig.type;event.originalEvent=orig.event;return drag.flatten(dd.results)},properties:function(event,dd,ia){var obj=ia.callback;obj.drag=ia.drag;obj.proxy=ia.proxy||ia.drag;obj.startX=dd.pageX;obj.startY=dd.pageY;obj.deltaX=event.pageX-dd.pageX;obj.deltaY=event.pageY-dd.pageY;obj.originalX=ia.offset.left;obj.originalY=ia.offset.top;obj.offsetX=obj.originalX+obj.deltaX;obj.offsetY=obj.originalY+obj.deltaY;obj.drop=drag.flatten((ia.drop||[]).slice());obj.available=drag.flatten((ia.droppable||[]).slice());return obj},element:function(arg){if(arg&&(arg.jquery||arg.nodeType==1))return arg},flatten:function(arr){return $.map(arr,function(member){return member&&member.jquery?$.makeArray(member):member&&member.length?drag.flatten(member):member})},textselect:function(bool){$(document)[bool?"unbind":"bind"]("selectstart",drag.dontstart).css("MozUserSelect",bool?"":"none");document.unselectable=bool?"off":"on"},dontstart:function(){return false},callback:function(){}};drag.callback.prototype={update:function(){if($special.drop&&this.available.length)$.each(this.available,function(i){$special.drop.locate(this,i)})}};var $dispatch=$event.dispatch;$event.dispatch=function(event){if($.data(this,"suppress."+event.type)-(new Date).getTime()>0){$.removeData(this,"suppress."+event.type);return}return $dispatch.apply(this,arguments)};var touchHooks=$event.fixHooks.touchstart=$event.fixHooks.touchmove=$event.fixHooks.touchend=$event.fixHooks.touchcancel={props:"clientX clientY pageX pageY screenX screenY".split(" "),filter:function(event,orig){if(orig){var touched=(orig.touches&&orig.touches[0])||(orig.changedTouches&&orig.changedTouches[0])||null;if(touched)$.each(touchHooks.props,function(i,prop){event[prop]=touched[prop]})}return event}};$special.draginit=$special.dragstart=$special.dragend=drag})(jQuery)
//# sourceMappingURL=jquery.event.drag-2.2.js.map
/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)
},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ib={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))
},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \t]*([^\r\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\/\//,mc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\[\]$/,yc=/\r?\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\r\n")}}):{name:b.name,value:c.replace(yc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Ic=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Jc})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Lc=a.jQuery,Mc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Mc),b&&a.jQuery===n&&(a.jQuery=Lc),n},typeof b===U&&(a.jQuery=a.$=n),n});
.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;
}//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function r(n){n===void 0&&(n=t.FormatServiceHelper.DefaultServices);this._services=n;this.options=new t.FormatterOptions}return Object.defineProperty(r.prototype,"canFormat",{get:function(){return this.sourceText&&this.sourceText.text&&this.sourceText.text.trim().length>0},enumerable:!0,configurable:!0}),r.supportsMimeType=function(n){return n?n.toLowerCase()==="text/css":!1},r.prototype.updateOptions=function(n){this.options.prettyPrint=n.prettyPrint;this.options.sourcemapSupport=n.sourcemapSupport},r.prototype.setDocument=function(n,r,u,f,e){return this.sourceText=new t.PositionOffsetMapper(n),this.options.prettyPrint&&e&&(this._prettyPrintPromise=this.startPrettyPrinting()),i.Promise.as(null)},r.prototype.getFormattedText=function(){return this.options.prettyPrint?(this._prettyPrintPromise=this._prettyPrintPromise||this.startPrettyPrinting(),this._prettyPrintPromise):i.Promise.as(this.sourceText)},r.prototype.startPrettyPrinting=function(){var r=this;return new i.Promise(function(i){window.setImmediate(function(){var f=t.FormatServiceHelper.getWorkerServices(new n.Uri("css/CssFormatWorker.js"),r._services),u=new Worker(f.path);u.onmessage=function(n){var f=n.data,e=new t.OffsetTextMapping(f.text,f.mappings,r.sourceText.text);u.terminate();i(e);r._prettyPrintPromise=null};u.onerror=function(n){u.terminate();r._prettyPrintPromise=null;throw new Error(n)};u.postMessage({services:f.services,text:r.sourceText.text})})})},r}();t.CssFormatter=r})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=CssFormatter.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(n){"use strict";onmessage=function(n){var i=n.data,r=i.services,e=i.text,u,f;importScripts(r.formatterRoot+"FormattedTextMapping.js",r.formatterRoot+"css/CssParser.js",r.formatterRoot+"css/CssEmitter.js");u=new t(i.text);f=u.processSource();this.postMessage(f);this.close()};var t=function(){function t(n,t){t===void 0&&(t=0);this.sourceText=n;this._initialIndentationDepth=t}return t.prototype.processSource=function(){var i=new n.CssParser(this.sourceText),r=i.parseCss(),t=new n.CssEmitter(this._initialIndentationDepth),u=t.outputCss(r);return new n.OffsetTextMapping(u,t.mappings,this.sourceText)},t}();n.CssFormatWorker=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=CssFormatWorker.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(n){"use strict";var i=function(){function n(n){this._rootNodes=[];this._text=n}return n.prototype.parseCss=function(){for(this._inComment=!1,this._currentQuotationMark="",this._nextCharIsEscaped=!1,this._lastCheckpoint=0,this._state=0,this._currentRuleset=null,this._currentDeclaration=null,this._currentMediaQuery=null,this._index=0;this._index<this._text.length;this._index++)this.handleQuoteCharacter()||this.handleCommentCharacter()||this.handleLeadingWhitespace()||this.handleMediaQueryStart()||this.handleMediaQueryOpenBracket()||this.handleMediaQueryCloseBracket()||this.handleSelectorOpenBracket()||this.handlePropertyColon()||this.handleValueSemicolon()||this.handleSelectorCloseBracket();return this.handleIncompleteBlocks(),this._rootNodes},n.prototype.handleMediaQueryStart=function(){return this._state===0&&!this._currentMediaQuery&&this._lastCheckpoint>=this._index&&this._text[this._index]==="@"&&this._text.substr(this._index,7).toLowerCase()==="@media "?(this._state=1,!0):!1},n.prototype.handleMediaQueryOpenBracket=function(){if(this._state===1&&this._text[this._index]==="{"){var n=this._text.substring(this._lastCheckpoint,this._index);return this._currentMediaQuery={originalOffset:this._lastCheckpoint,query:n,rulesets:[]},this._lastCheckpoint=this._index+1,this._state=0,!0}return!1},n.prototype.handleMediaQueryCloseBracket=function(){return this._state===0&&this._text[this._index]==="}"&&this._currentMediaQuery?(this._lastCheckpoint=this._index+1,this._state=0,this._rootNodes.push(this._currentMediaQuery),this._currentMediaQuery=null,!0):!1},n.prototype.handleSelectorOpenBracket=function(){if(this._state===0&&this._text[this._index]==="{"){var n=this._text.substring(this._lastCheckpoint,this._index);return this._currentRuleset={originalOffset:this._lastCheckpoint,selector:n,declarations:[]},this._lastCheckpoint=this._index+1,this._state=2,!0}return!1},n.prototype.handlePropertyColon=function(){if(this._state===2&&this._text[this._index]===":"){var n=this._text.substring(this._lastCheckpoint,this._index);return this._currentDeclaration={originalOffset:this._lastCheckpoint,property:n,value:""},this._lastCheckpoint=this._index+1,this._state=3,!0}return!1},n.prototype.handleValueSemicolon=function(){if(this._state===3&&this._text[this._index]===";"){var n=this._text.substring(this._lastCheckpoint,this._index);return this._currentDeclaration.value=n,this._currentRuleset.declarations.push(this._currentDeclaration),this._currentDeclaration=null,this._lastCheckpoint=this._index+1,this._state=2,!0}return!1},n.prototype.handleSelectorCloseBracket=function(){var n,t;if(this._text[this._index]==="}"){if(this._state===2)return n={originalOffset:this._lastCheckpoint,property:this._text.substring(this._lastCheckpoint,this._index),value:null},n.property.trim()&&this._currentRuleset.declarations.push(n),this._lastCheckpoint=this._index+1,this._state=0,this._currentMediaQuery?this._currentMediaQuery.rulesets.push(this._currentRuleset):this._rootNodes.push(this._currentRuleset),this._currentRuleset=null,!0;if(this._state===3)return t=this._text.substring(this._lastCheckpoint,this._index),this._currentDeclaration.value=t,this._currentDeclaration.isMissingSemicolon=!0,this._currentRuleset.declarations.push(this._currentDeclaration),this._currentDeclaration=null,this._lastCheckpoint=this._index+1,this._state=0,this._currentMediaQuery?this._currentMediaQuery.rulesets.push(this._currentRuleset):this._rootNodes.push(this._currentRuleset),this._currentRuleset=null,!0}return!1},n.prototype.handleIncompleteBlocks=function(){if(this._currentMediaQuery?this._lastCheckpoint=this._currentMediaQuery.originalOffset:this._currentRuleset&&(this._lastCheckpoint=this._currentRuleset.originalOffset),this._lastCheckpoint<this._text.length-1){var n={selector:this._text.substr(this._lastCheckpoint),originalOffset:this._lastCheckpoint,declarations:null};this._rootNodes.push(n)}},n.prototype.handleCommentCharacter=function(){if(this._text.substr(this._index,2)==="/*"){var n=this._text.indexOf("*/",this._index);return n===-1&&(n=this._text.length),this._index=n+2-1,!0}return!1},n.prototype.handleQuoteCharacter=function(){return this._currentQuotationMark?(this._nextCharIsEscaped?this._nextCharIsEscaped=!1:this._text[this._index]===this._currentQuotationMark?this._currentQuotationMark="":this._text[this._index]==="\\"&&(this._nextCharIsEscaped=!0),!0):this._text[this._index]==='"'||this._text[this._index]==="'"?(this._currentQuotationMark=this._text[this._index],!0):!1},n.prototype.handleLeadingWhitespace=function(){return this._lastCheckpoint===this._index&&this._text[this._index].trim().length===0?(this._lastCheckpoint++,!0):!1},n}(),t;n.CssParser=i,function(n){n[n.Selector=0]="Selector";n[n.Media=1]="Media";n[n.Property=2]="Property";n[n.Value=3]="Value"}(t||(t={}))})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=CssParser.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(n){"use strict";var t=function(){function n(n){this._initialIndentationDepth=n;this.mappings=[]}return n.prototype.outputCss=function(n){var t="",r,i;for(r in n)i=n[r],t=i.query?t+this.outputMediaQuery(i,this._initialIndentationDepth,t.length):t+this.outputRuleset(i,this._initialIndentationDepth,t.length);return t},n.prototype.outputMediaQuery=function(n,t,i){var r,u;this.mappings.push({originalOffset:n.originalOffset,mappedOffset:i+this.indent(t).length});r=this.indent(t)+n.query+"{\n";for(u in n.rulesets)r+=this.outputRuleset(n.rulesets[u],t+1,i+r.length);return r+(this.indent(t)+"}\n\n")},n.prototype.outputRuleset=function(n,t,i){var r,u;if(this.mappings.push({originalOffset:n.originalOffset,mappedOffset:i+this.indent(t).length}),r=this.indent(t)+n.selector,n.declarations){r=r+" {\n";for(u in n.declarations)r+=this.outputAttributeNode(n.declarations[u],t+1,i+r.length);r+=this.indent(t)+"}\n\n"}return r},n.prototype.outputAttributeNode=function(n,t,i){this.mappings.push({originalOffset:n.originalOffset,mappedOffset:i+this.indent(t).length});var r=this.indent(t)+n.property;return n.value&&(r=r+": "+n.value+(n.isMissingSemicolon?"\n":";\n")),r},n.prototype.indent=function(n){return new Array(1+n*2).join(" ")},n}();n.CssEmitter=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=CssEmitter.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function r(n){n===void 0&&(n=t.FormatServiceHelper.DefaultServices);this.options={};this._services=n;this.options=new t.FormatterOptions}return Object.defineProperty(r.prototype,"canFormat",{get:function(){return this.sourceText&&this.sourceText.text&&this.sourceText.text.trim().length>0},enumerable:!0,configurable:!0}),r.supportsMimeType=function(n){if(n){var t=n.toLowerCase();return t==="text/html"||t==="application/xml"||t.lastIndexOf("+xml")===t.length-4}return!1},r.prototype.updateOptions=function(n){this.options.updateAllOptions(n)},r.prototype.setDocument=function(n,r,u,f,e){return this.sourceText=new t.PositionOffsetMapper(n),this.options.prettyPrint&&e&&(this._prettyPrintPromise=this.startPrettyPrint()),i.Promise.as(null)},r.prototype.getFormattedText=function(){return this.options.prettyPrint?(this._prettyPrintPromise=this._prettyPrintPromise||this.startPrettyPrint(),this._prettyPrintPromise):i.Promise.as(this.sourceText)},r.prototype.startPrettyPrint=function(){var r=this;return new i.Promise(function(i){window.setImmediate(function(){var f=t.FormatServiceHelper.getWorkerServices(new n.Uri("Html/HtmlFormatWorker.js"),r._services),u=new Worker(f.path);u.onmessage=function(n){var f=JSON.parse(n.data),e=new t.OffsetTextMapping(f.text,f.mappings,r.sourceText.text);u.terminate();i(e);r._prettyPrintPromise=null};u.onerror=function(){u.terminate();i(r.sourceText);r._prettyPrintPromise=null};u.postMessage({services:f.services,text:r.sourceText.text})})})},r}();t.HtmlFormatter=r})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=HtmlFormatter.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(n){"use strict";onmessage=function(n){var r=n.data,i=r.services,e=r.text,u,f;importScripts(i.formatterRoot+"workerMessaging.js",i.formatterRoot+"sourcemapMappings.js",i.formatterRoot+"sourceSpan.js",i.formatterRoot+"formattedTextMapping.js",i.formatterRoot+"StateMachine.js",i.formatterRoot+"html/HtmlTokenizer.js",i.formatterRoot+"html/HtmlParser.js",i.formatterRoot+"html/HtmlEmitter.js");u=new t(e,i);f=u.processSource();this.postMessage(JSON.stringify(f));this.close()};var t=function(){function t(n,t){this._text=n;this._services=t;this._mappings=[]}return t.prototype.processSource=function(){var t=new n.Html.HtmlEmitter(this._services);return t.emit(this._text)},t}();n.HtmlFormatWorker=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=HtmlFormatWorker.min.js.map
var __extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},Common;
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";function i(n){return isNaN(n)}function p(n){return n===47||r(n)}function o(n){return n>=97&&n<=122||n>=65&&n<=90||n>=48&&n<=57}function f(n){return isFinite(n)&&!r(n)&&n!==62}function u(n){return!f(n)}function h(n){return isFinite(n)&&!r(n)&&n!==61&&n!==62&&n!==47}function c(n){return isFinite(n)&&!r(n)&&n!==62}function r(n){return n===32||n===9||n===12||n===13||n===10}function w(n){return v.test(n)}function b(n){return y.test(n)}function e(n){return n>=97&&n<=122?n-32:n<128?n:n in s?s[n]:s[n]=String.fromCharCode(n).toUpperCase().charCodeAt(0)}function k(n,t,i){function s(){return o<h?n.charCodeAt(f+o++):NaN}for(var f=i&&typeof i.pos=="number"?i.pos:0,h=i&&typeof i.len=="number"?i.len:n.length-f,c=i&&i.ignoreCase,o=0,u=s(),r=0;r<t.length;r++){if(c?e(u)!==e(t[r]):u!==t[r])return!1;r<t.length-1&&(u=s())}return!0}var l=function(n){function t(t){n.call(this);this._pos=0;this._contentPos=0;this._tokenQueue=[];this._isInRawTag=!1;this._isInTagAttributes=!1;this._source=t;this.pushStates(this.stateScanTrivia,this.stateScanDocumentSyntax)}return __extends(t,n),t.prototype.next=function(){while(this.runUntil(this.markSendTokens))if(this._tokenQueue.length){this.collapseRuns();var n=this._tokenQueue.shift();return this._tokenQueue.length&&this.pushState(this.markSendTokens),{value:n,done:!1}}return{done:!0}},t.prototype.readChar=function(){return this._source.charCodeAt(this._pos++)},t.prototype.enqueueToken=function(n){this._isInRawTag||(this._tokenQueue.push(n),this._contentPos=this._pos)},t.prototype.enqueueContent=function(n){!this._isInRawTag&&n>this._contentPos&&this.enqueueToken(this.createToken(16,this._contentPos,n))},t.prototype.enqueueTrivia=function(n){!this._isInRawTag&&n>this._contentPos&&this.enqueueToken(this.createToken(17,this._contentPos,n))},t.prototype.collapseRuns=function(){var r,n,i,u,t;do for(r=this._tokenQueue.length,n=r-1;n>=0;)i=this._tokenQueue[n],i.kind===17?n>0&&(t=this._tokenQueue[n-1],t.kind===17?(t.end=i.end,this._tokenQueue.splice(n,1)):t.kind===16&&n<this._tokenQueue.length-1&&(u=this._tokenQueue[n+1],u.kind===16&&(t.end=u.end,this._tokenQueue.splice(n,2)))):i.kind===16&&n>0&&(t=this._tokenQueue[n-1],t.kind===16&&(t.end=i.end,this._tokenQueue.splice(n,1))),n--;while(this._tokenQueue.length!==r)},t.prototype.markSendTokens=function(){},t.prototype.stateScanDocumentSyntax=function(){var n=this._pos,t=this.readChar();if(i(t)){this.enqueueContent(n);this.enqueueToken(this.createToken(18,n,n));this.pushStates(this.markSendTokens,this.stop);return}this.pushState(this.stateScanDocumentSyntax);t===60?(t=this.readChar(),this.lookaheadOpenProcessingInstruction(t)?(this.enqueueContent(n),this.enqueueToken(this.createToken(4,n,n+2)),this.enqueueToken(this.createToken(10,n+2,this._pos)),this.pushStates(this.markSendTokens,this.stateScanTrivia,this.stateScanProcessingInstructionSyntax)):t===33?(t=this.readChar(),this.lookaheadMinusMinus(t)?(this.enqueueContent(n),this.enqueueToken(this.createToken(0,n,this._pos)),this.pushStates(this.markSendTokens,this.stateScanCommentSyntax)):this.lookaheadOpenCharacterData(t)?(this.enqueueContent(n),this.enqueueToken(this.createToken(2,n,this._pos)),this.pushStates(this.markSendTokens,this.stateScanCharacterDataSyntax)):this.lookaheadDocumentType(t)&&(this.enqueueContent(n),this.enqueueToken(this.createToken(6,n,this._pos)),this.pushStates(this.markSendTokens,this.stateScanTrivia,this.stateScanDocumentTypeSyntax))):this.lookaheadScript(t)?(this.enqueueContent(n),this.enqueueToken(this.createToken(8,n,n+1)),this.enqueueToken(this.createToken(10,n+1,this._pos)),this.pushStates(this.markSendTokens,this.stateEnterTagAttributes,this.stateScanTrivia,this.stateScanTagSyntax,this.stateExitTagAttributes,this.stateEnterRawTag,this.stateScanScriptSyntax,this.stateExitRawTag)):this.lookaheadStyle(t)?(this.enqueueContent(n),this.enqueueToken(this.createToken(8,n,n+1)),this.enqueueToken(this.createToken(10,n+1,this._pos)),this.pushStates(this.markSendTokens,this.stateEnterTagAttributes,this.stateScanTrivia,this.stateScanTagSyntax,this.stateExitTagAttributes,this.stateEnterRawTag,this.stateScanStyleSyntax,this.stateExitRawTag)):this.lookaheadTitle(t)?(this.enqueueContent(n),this.enqueueToken(this.createToken(8,n,n+1)),this.enqueueToken(this.createToken(10,n+1,this._pos)),this.pushStates(this.markSendTokens,this.stateEnterTagAttributes,this.stateScanTrivia,this.stateScanTagSyntax,this.stateExitTagAttributes,this.stateEnterRawTag,this.stateScanTitleSyntax,this.stateExitRawTag)):this.lookaheadTextarea(t)?(this.enqueueContent(n),this.enqueueToken(this.createToken(8,n,n+1)),this.enqueueToken(this.createToken(10,n+1,this._pos)),this.pushStates(this.markSendTokens,this.stateEnterTagAttributes,this.stateScanTrivia,this.stateScanTagSyntax,this.stateExitTagAttributes,this.stateEnterRawTag,this.stateScanTextAreaSyntax,this.stateExitRawTag)):this.lookaheadRun(t,o,f)?(this.enqueueContent(n),this.enqueueToken(this.createToken(8,n,n+1)),this.enqueueToken(this.createToken(10,n+1,this._pos)),this.pushStates(this.markSendTokens,this.stateEnterTagAttributes,this.stateScanTrivia,this.stateScanTagSyntax,this.stateExitTagAttributes)):t===47&&this.lookaheadRun(this.readChar(),o,f)&&(this.enqueueContent(n),this.enqueueToken(this.createToken(9,n,n+2)),this.enqueueToken(this.createToken(10,n+2,this._pos)),this.pushStates(this.markSendTokens,this.stateEnterTagAttributes,this.stateScanTrivia,this.stateScanTagSyntax,this.stateExitTagAttributes))):this.lookaheadRun(t,r)&&(this.enqueueContent(n),this.enqueueToken(this.createToken(17,n,this._pos)))},t.prototype.stateScanCommentSyntax=function(){var n=this._pos,t=this.readChar();i(t)?(this.enqueueContent(n),this.enqueueToken(this.createToken(18,n,n)),this.pushStates(this.markSendTokens,this.stop)):this.lookaheadCloseComment(t)?(this.enqueueContent(n),this.enqueueToken(this.createToken(1,n,this._pos)),this.pushStates(this.markSendTokens,this.stateScanTrivia)):this.pushState(this.stateScanCommentSyntax)},t.prototype.stateScanCharacterDataSyntax=function(){var n=this._pos,t=this.readChar();i(t)?(this.enqueueContent(n),this.enqueueToken(this.createToken(18,n,n)),this.pushStates(this.markSendTokens,this.stop)):this.lookaheadCloseCharacterData(t)?(this.enqueueContent(n),this.enqueueToken(this.createToken(3,n,this._pos)),this.pushStates(this.markSendTokens,this.stateScanTrivia)):this.pushState(this.stateScanCharacterDataSyntax)},t.prototype.stateScanProcessingInstructionSyntax=function(){var n=this._pos,t=this.readChar();i(t)?(this.enqueueContent(n),this.enqueueToken(this.createToken(18,n,n)),this.pushStates(this.markSendTokens,this.stop)):this.lookaheadCloseProcessingInstruction(t)?(this.enqueueContent(n),this.enqueueToken(this.createToken(5,n,this._pos)),this.pushStates(this.markSendTokens,this.stateScanTrivia)):this.pushState(this.stateScanProcessingInstructionSyntax)},t.prototype.stateScanDocumentTypeSyntax=function(){var n=this._pos,t=this.readChar();i(t)?(this.enqueueContent(n),this.enqueueToken(this.createToken(18,n,n)),this.pushStates(this.markSendTokens,this.stop)):t===62?(this.enqueueContent(n),this.enqueueToken(this.createToken(7,n,this._pos)),this.pushStates(this.markSendTokens,this.stateScanTrivia)):this.pushState(this.stateScanDocumentTypeSyntax)},t.prototype.stateEnterTagAttributes=function(){this._isInTagAttributes=!0},t.prototype.stateExitTagAttributes=function(){this._isInTagAttributes=!1},t.prototype.stateEnterRawTag=function(){this._isInRawTag=!0},t.prototype.stateExitRawTag=function(){this._isInRawTag=!1;this.enqueueContent(this._pos);this.pushState(this.markSendTokens)},t.prototype.stateScanScriptSyntax=function(){var r=this,n=this._pos,t=this.readChar();i(t)?(this._isInRawTag=!1,this.enqueueContent(n),this.enqueueToken(this.createToken(18,n,n)),this.pushStates(this.markSendTokens,this.stop)):this.lookaheadOpenComment(t)?this.pushStates(this.stateScanScriptCommentSyntax,this.stateScanScriptSyntax):this.lookaheadOpenEndTag(t,function(n){return r.lookaheadScript(n)})?this._pos=n:this.pushState(this.stateScanScriptSyntax)},t.prototype.stateScanScriptCommentSyntax=function(){var r=this,n=this._pos,t=this.readChar();i(t)?(this._isInRawTag=!1,this.enqueueContent(n),this.enqueueToken(this.createToken(18,n,n)),this.pushStates(this.markSendTokens,this.stop)):this.lookaheadOpenStartTag(t,function(n){return r.lookaheadScript(n)})?this.pushStates(this.stateEnterTagAttributes,this.stateScanTrivia,this.stateScanTagSyntax,this.stateExitTagAttributes,this.stateScanScriptSyntax,this.stateScanScriptCommentSyntax):this.lookaheadOpenEndTag(t,function(n){return r.lookaheadScript(n)})?this._pos=n:this.lookaheadCloseComment(t)||this.pushState(this.stateScanScriptCommentSyntax)},t.prototype.stateScanStyleSyntax=function(){var r=this,n=this._pos,t=this.readChar();i(t)?(this._isInRawTag=!1,this.enqueueContent(n),this.enqueueToken(this.createToken(18,n,n)),this.pushStates(this.markSendTokens,this.stop)):this.lookaheadOpenComment(t)?this.pushStates(this.stateScanStyleCommentSyntax,this.stateScanStyleSyntax):this.lookaheadOpenEndTag(t,function(n){return r.lookaheadStyle(n)})?this._pos=n:this.pushState(this.stateScanStyleSyntax)},t.prototype.stateScanStyleCommentSyntax=function(){var r=this,n=this._pos,t=this.readChar();i(t)?(this._isInRawTag=!1,this.enqueueContent(n),this.enqueueToken(this.createToken(18,n,n)),this.pushStates(this.markSendTokens,this.stop)):this.lookaheadOpenEndTag(t,function(n){return r.lookaheadStyle(n)})?this._pos=n:this.lookaheadCloseComment(t)||this.pushState(this.stateScanStyleCommentSyntax)},t.prototype.stateScanTitleSyntax=function(){var r=this,n=this._pos,t=this.readChar();i(t)?(this._isInRawTag=!1,this.enqueueContent(n),this.enqueueToken(this.createToken(18,n,n)),this.pushStates(this.markSendTokens,this.stop)):this.lookaheadOpenEndTag(t,function(n){return r.lookaheadTitle(n)})?this._pos=n:this.pushState(this.stateScanTitleSyntax)},t.prototype.stateScanTextAreaSyntax=function(){var r=this,n=this._pos,t=this.readChar();i(t)?(this._isInRawTag=!1,this.enqueueContent(n),this.enqueueToken(this.createToken(18,n,n)),this.pushStates(this.markSendTokens,this.stop)):this.lookaheadOpenEndTag(t,function(n){return r.lookaheadTextarea(n)})?this._pos=n:this.pushState(this.stateScanTextAreaSyntax)},t.prototype.stateScanTagSyntax=function(){var n=this._pos,t=this.readChar();i(t)?(this.enqueueToken(this.createToken(18,n,n)),this.pushStates(this.markSendTokens,this.stop)):this.lookaheadRun(t,h)?(this.enqueueToken(this.createToken(12,n,this._pos)),this.pushStates(this.markSendTokens,this.stateScanTrivia,this.stateScanAttributeSyntax,this.stateScanTagSyntax)):this.lookaheadCloseStartOrEndTag(t)?(this.enqueueToken(this.createToken(11,n,this._pos)),this.pushStates(this.markSendTokens,this.stateExitTagAttributes,this.stateScanTrivia)):(this.enqueueToken(this.createToken(17,n,this._pos)),this.pushStates(this.markSendTokens,this.stateScanTagSyntax))},t.prototype.stateScanAttributeSyntax=function(){var n=this._pos,t=this.readChar();i(t)?(this.enqueueToken(this.createToken(18,n,n)),this.pushStates(this.markSendTokens,this.stop)):t===61?(this.enqueueToken(this.createToken(14,n,this._pos)),this.pushStates(this.markSendTokens,this.stateScanTrivia,this.stateScanAttributeValueAssignmentSyntax)):(this._pos=n,this.pushState(this.stateScanTrivia))},t.prototype.stateScanAttributeValueAssignmentSyntax=function(){var n=this._pos,t=this.readChar();i(t)?(this.enqueueToken(this.createToken(18,n,n)),this.pushStates(this.markSendTokens,this.stop)):this.lookaheadCloseStartOrEndTag(t)?(this._pos=n,this.pushState(this.stateScanTrivia)):(t===34||t===39?(this._contentPos=n,this._quoteChar=t):this._pos=n,this.pushStates(this.stateScanAttributeValueSyntax))},t.prototype.stateScanAttributeValueSyntax=function(){var n=this._pos,t=this.readChar();i(t)?(this.enqueueToken(this.createToken(18,n,n)),this.pushStates(this.markSendTokens,this.stop)):this._quoteChar?t===this._quoteChar?(this._quoteChar=undefined,this.enqueueToken(this.createToken(13,this._contentPos,this._pos)),this.pushStates(this.markSendTokens,this.stateScanTrivia)):this.pushState(this.stateScanAttributeValueSyntax):this.lookaheadRun(t,c)?(this.enqueueToken(this.createToken(13,n,this._pos)),this.pushStates(this.markSendTokens,this.stateScanTrivia)):(this._pos=n,this.pushState(this.stateScanTrivia))},t.prototype.stateScanTrivia=function(){var n=this._pos,t=this.readChar();i(t)?(this.enqueueTrivia(n),this.enqueueToken(this.createToken(18,n,n)),this.pushStates(this.markSendTokens,this.stop)):this.lookaheadRun(t,this._isInTagAttributes?p:r)?this.pushState(this.stateScanTrivia):(this._pos=n,this.enqueueTrivia(n),this.pushState(this.markSendTokens))},t.prototype.lookaheadRun=function(n,t,i){if(i===void 0&&(i=t),t(n)){for(var r=this._pos;i(this.readChar());)r=this._pos;return this._pos=r,!0}return!1},t.prototype.lookahead=function(n,t,i){var u,r,f;for(i===void 0&&(i={}),u=this._pos,r=0;r<t.length;r++){if(i.ignoreCase?e(n)!==e(t[r]):n!==t[r])return this._pos=u,!1;r<t.length-1&&(n=this.readChar())}if(i.rest){if(f=this._pos,!i.rest(this.readChar()))return this._pos=u,!1;this._pos=f}return!0},t.prototype.lookaheadOpenProcessingInstruction=function(n){return n===63&&this.lookaheadRun(this.readChar(),o,f)},t.prototype.lookaheadCloseProcessingInstruction=function(n){return this.lookahead(n,[63,62])},t.prototype.lookaheadOpenCharacterData=function(n){return this.lookahead(n,[91,67,68,65,84,65,91],{ignoreCase:!0})},t.prototype.lookaheadCloseCharacterData=function(n){return this.lookahead(n,[93,93,62])},t.prototype.lookaheadMinusMinus=function(n){return this.lookahead(n,[45,45])},t.prototype.lookaheadOpenComment=function(n){return this.lookahead(n,[60,33,45,45])},t.prototype.lookaheadCloseComment=function(n){return this.lookahead(n,[45,45,62])},t.prototype.lookaheadDocumentType=function(n){return this.lookahead(n,[68,79,67,84,89,80,69],{ignoreCase:!0,then:u})},t.prototype.lookaheadScript=function(n){return this.lookahead(n,[83,67,82,73,80,84],{ignoreCase:!0,then:u})},t.prototype.lookaheadStyle=function(n){return this.lookahead(n,[83,84,89,76,69],{ignoreCase:!0,then:u})},t.prototype.lookaheadTitle=function(n){return this.lookahead(n,[84,73,84,76,69],{ignoreCase:!0,then:u})},t.prototype.lookaheadTextarea=function(n){return this.lookahead(n,[84,69,88,84,65,82,69,65],{ignoreCase:!0,then:u})},t.prototype.lookaheadOpenStartTag=function(n,t){return n===60&&t(this.readChar())},t.prototype.lookaheadOpenEndTag=function(n,t){return this.lookahead(n,[60,47])&&t(this.readChar())},t.prototype.lookaheadCloseStartOrEndTag=function(n){return n===62||this.lookahead(n,[47,62])},t.prototype.lookaheadZeroWidth=function(n){var t=this._pos,i=this.readChar(),r=n(i);return this._pos=t,r},t.prototype.createToken=function(n,t,i){var r=Object.create?Object.create(null):{};return r.kind=n,r.pos=t,r.end=i,r},t}(n.StateMachine),a;t.HtmlTokenizer=l,function(n){n[n.OpenComment=0]="OpenComment";n[n.CloseComment=1]="CloseComment";n[n.OpenCharacterData=2]="OpenCharacterData";n[n.CloseCharacterData=3]="CloseCharacterData";n[n.OpenProcessingInstruction=4]="OpenProcessingInstruction";n[n.CloseProcessingInstruction=5]="CloseProcessingInstruction";n[n.OpenDocumentType=6]="OpenDocumentType";n[n.CloseDocumentType=7]="CloseDocumentType";n[n.OpenStartTag=8]="OpenStartTag";n[n.OpenEndTag=9]="OpenEndTag";n[n.TagName=10]="TagName";n[n.CloseTag=11]="CloseTag";n[n.AttributeName=12]="AttributeName";n[n.AttributeValue=13]="AttributeValue";n[n.Equals=14]="Equals";n[n.Slash=15]="Slash";n[n.Content=16]="Content";n[n.Trivia=17]="Trivia";n[n.EOF=18]="EOF"}(t.TokenKind||(t.TokenKind={}));a=t.TokenKind,function(n){n[n.Null=0]="Null";n[n.Tab=9]="Tab";n[n.LineFeed=10]="LineFeed";n[n.VerticalTab=12]="VerticalTab";n[n.CarriageReturn=13]="CarriageReturn";n[n.Space=32]="Space";n[n.Exclamation=33]="Exclamation";n[n.DoubleQuote=34]="DoubleQuote";n[n.SingleQuote=39]="SingleQuote";n[n.Minus=45]="Minus";n[n.Dot=46]="Dot";n[n.Slash=47]="Slash";n[n.Digit0=48]="Digit0";n[n.Digit1=49]="Digit1";n[n.Digit2=50]="Digit2";n[n.Digit3=51]="Digit3";n[n.Digit4=52]="Digit4";n[n.Digit5=53]="Digit5";n[n.Digit6=54]="Digit6";n[n.Digit7=55]="Digit7";n[n.Digit8=56]="Digit8";n[n.Digit9=57]="Digit9";n[n.Colon=58]="Colon";n[n.LessThan=60]="LessThan";n[n.Equals=61]="Equals";n[n.GreaterThan=62]="GreaterThan";n[n.Question=63]="Question";n[n.UpperA=65]="UpperA";n[n.UpperB=66]="UpperB";n[n.UpperC=67]="UpperC";n[n.UpperD=68]="UpperD";n[n.UpperE=69]="UpperE";n[n.UpperF=70]="UpperF";n[n.UpperG=71]="UpperG";n[n.UpperH=72]="UpperH";n[n.UpperI=73]="UpperI";n[n.UpperJ=74]="UpperJ";n[n.UpperK=75]="UpperK";n[n.UpperL=76]="UpperL";n[n.UpperM=77]="UpperM";n[n.UpperN=78]="UpperN";n[n.UpperO=79]="UpperO";n[n.UpperP=80]="UpperP";n[n.UpperQ=81]="UpperQ";n[n.UpperR=82]="UpperR";n[n.UpperS=83]="UpperS";n[n.UpperT=84]="UpperT";n[n.UpperU=85]="UpperU";n[n.UpperV=86]="UpperV";n[n.UpperW=87]="UpperW";n[n.UpperX=88]="UpperX";n[n.UpperY=89]="UpperY";n[n.UpperZ=90]="UpperZ";n[n.OpenBracket=91]="OpenBracket";n[n.CloseBracket=93]="CloseBracket";n[n.Underscore=95]="Underscore";n[n.GraveAccent=96]="GraveAccent";n[n.LowerA=97]="LowerA";n[n.LowerB=98]="LowerB";n[n.LowerC=99]="LowerC";n[n.LowerD=100]="LowerD";n[n.LowerE=101]="LowerE";n[n.LowerF=102]="LowerF";n[n.LowerG=103]="LowerG";n[n.LowerH=104]="LowerH";n[n.LowerI=105]="LowerI";n[n.LowerJ=106]="LowerJ";n[n.LowerK=107]="LowerK";n[n.LowerL=108]="LowerL";n[n.LowerM=109]="LowerM";n[n.LowerN=110]="LowerN";n[n.LowerO=111]="LowerO";n[n.LowerP=112]="LowerP";n[n.LowerQ=113]="LowerQ";n[n.LowerR=114]="LowerR";n[n.LowerS=115]="LowerS";n[n.LowerT=116]="LowerT";n[n.LowerU=117]="LowerU";n[n.LowerV=118]="LowerV";n[n.LowerW=119]="LowerW";n[n.LowerX=120]="LowerX";n[n.LowerY=121]="LowerY";n[n.LowerZ=122]="LowerZ"}(t.CharacterCodes||(t.CharacterCodes={}));var d=t.CharacterCodes,v=/^(area|b(ase|r)|col|embed|hr|i(mg|nput)|keygen|link|meta|param|source|track|wbr)$/i,y=/^(a(bbr|udio|rea)?|b(d[io]|r|utton)?|c(ite|ode)|d(ata|el|fn)|em(bed)?|i(mg|n(put|s))|label|k(bd|eygen)|m(a(p|rk|th)|eter)|o(utput)|progress|q|ruby|s(amp|elect|mall|pan|trong|u[bp]|vg)?|time|u|var|wbr|#text)$/i,s=Object.create?Object.create(null):{};t.isTagNameStartChar=o;t.isTagNameChar=f;t.isNonTagNameChar=u;t.isAttributeNameChar=h;t.isUnquotedAttributeValueChar=c;t.isWhitespaceChar=r;t.isVoidTag=w;t.isPhrasingContent=b;t.toUpperChar=e;t.lookahead=k})(t=n.Html||(n.Html={}))})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=HtmlTokenizer.min.js.map
var __extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},Common;
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(n){function i(){n.apply(this,arguments)}return __extends(i,n),i.prototype.parse=function(n){this._raw=n;this._nodeStack=[];this._skipTrivia=!0;this._tokenizer=new t.HtmlTokenizer(this._raw);this.read();var i=this.createNode(0);return i.nodeName="#document",this._currentDocument=i,this._currentNode=i,this.refreshCurrentNode(),this.pushState(this.stateParseDocument),this.run(),this._currentDocument},i.prototype.pushNode=function(n){this._nodeStack.push(this._currentNode);this._currentNode=n;this.refreshCurrentNode()},i.prototype.popNode=function(n){var t=this._currentNode;return this._currentNode=this._nodeStack.pop(),n||this.refreshCurrentNode(),t},i.prototype.refreshCurrentNode=function(){var n,t;this._currentNode&&(this._currentNode.kind===0?n=this._currentNode:this._currentNode.kind===4&&(t=this._currentNode,n=this._currentNode));this._currentElement=t;this._currentContainer=n},i.prototype.skipUntil=function(n){while(this._currentToken.kind!==18&&this._currentToken.kind!==n)this.read()},i.prototype.createNode=function(n){var t=Object.create?Object.create(null):{};return t.kind=n,(n===0||n===4)&&(t.childNodes=[]),n===4&&(t.attributes=[]),t},i.prototype.read=function(){for(;;){if(this._eofToken)return this._eofToken;var t=this._tokenizer.next(),n;if(n=t.done?{kind:18,pos:this._raw.length,end:this._raw.length}:t.value,!this._skipTrivia||n.kind!==17)return n.kind===18&&(this._eofToken=n),this._currentToken=n,n}},i.prototype.stateParseDocument=function(){this.pushState(this.stateParseDocument);switch(this._currentToken.kind){case 18:this.stop();break;case 6:this.pushState(this.stateParseDocumentType);break;case 4:this.pushState(this.stateParseProcessingInstruction);break;case 0:this.pushState(this.stateParseComment);break;case 2:this.pushState(this.stateParseCharacterData);break;case 8:this.pushState(this.stateBeginParseStartElement);break;case 9:this.pushState(this.stateParseEndElement);break;case 16:this.pushState(this.stateParseText);break;case 17:default:this.read()}},i.prototype.stateParseDocumentType=function(){var n=this.createNode(1);n.nodeName="doctype";n.parentNode=this._currentNode;this._currentToken.kind===6&&(n.openToken=this._currentToken,this.read());this._currentToken.kind===16&&(n.content=this._currentToken,this.read());this._currentToken.kind===7&&(n.closeToken=this._currentToken,this.read());this.appendChild(n)},i.prototype.stateParseProcessingInstruction=function(){var n=this.createNode(2);this._currentToken.kind===4&&(n.openToken=this._currentToken,this.read());this._currentToken.kind===10&&(n.name=this._currentToken,n.nodeName=this.getNodeName(this._currentToken),this.read());this._currentToken.kind===16&&(n.content=this._currentToken,this.read());this._currentToken.kind===5&&(n.closeToken=this._currentToken,this.read());this.appendChild(n)},i.prototype.stateParseComment=function(){var n=this.createNode(3);n.nodeName="#comment";this._currentToken.kind===0&&(n.openToken=this._currentToken,this.read());this._currentToken.kind===16&&(n.content=this._currentToken,this.read());this._currentToken.kind===1&&(n.closeToken=this._currentToken,this.read());this.appendChild(n)},i.prototype.stateParseCharacterData=function(){var n=this.createNode(7);n.nodeName="#text";this._currentToken.kind===2&&(n.openToken=this._currentToken,this.read());this._currentToken.kind===16&&(n.text=this._currentToken,this.read());this._currentToken.kind===3&&(n.closeToken=this._currentToken,this.read());this.appendChild(n)},i.prototype.stateParseText=function(){var n=this.createNode(6);n.nodeName="#text";this._currentToken.kind===16&&(n.text=this._currentToken,this.read());this.appendChild(n)},i.prototype.stateBeginParseStartElement=function(){var n=this.createNode(4);return this._currentToken.kind===8&&(n.startTagOpenToken=this._currentToken,this.read()),this._currentToken.kind===10&&(n.startTagName=this._currentToken,n.nodeName=this.getNodeName(this._currentToken),n.nodeName==="script"&&(this._inScriptElement=!0),this.read()),this._currentElement&&(n.nodeName==="body"&&this.isDescendantOf("head")?this.popMatchingElement("head"):this._currentElement.nodeName==="li"&&n.nodeName==="li"?this.popNode():this._currentElement.nodeName==="rtc"&&/^(r(b|tc|p))$/i.test(n.nodeName)?this.popNode():this._currentElement.nodeName==="optgroup"&&n.nodeName==="optgroup"?this.popNode():this._currentElement.nodeName==="option"&&/^(opt(group|ion))$/i.test(n.nodeName)?this.popNode():this._currentElement.nodeName==="tr"&&n.nodeName==="tr"?this.popNode():this._currentElement.nodeName!=="p"||t.isPhrasingContent(n.nodeName)?/^(d[td])$/i.test(n.nodeName)&&/^(d[td])$/i.test(this._currentElement.nodeName)?this.popNode():/^(r(b|t|p))$/i.test(this._currentElement.nodeName)&&/^(r(b|tc?|p))$/i.test(n.nodeName)?this.popNode():/^(t(body|foot|head))$/i.test(this._currentElement.nodeName)&&/^(t(body|foot|head))$/i.test(n.nodeName)?this.popNode():/^t[hd]$/i.test(this._currentElement.nodeName)&&/^t[hd]$/i.test(n.nodeName)&&this.popNode():this.popNode()),this.appendChild(n),this.pushNode(n),this.pushStates(this.stateParseTagAttributes,this.stateEndParseStartElement)},i.prototype.stateEndParseStartElement=function(){var n=this._currentElement;this._currentToken.kind===15&&(n.startTagSlashToken=this._currentToken,this.read());this._currentToken.kind===11&&(n.startTagCloseToken=this._currentToken,this.read());t.isVoidTag(n.nodeName)&&this.popNode()},i.prototype.stateParseEndElement=function(){var i,n,t;this._inScriptElement=!1;this._currentToken.kind===9&&(i=this._currentToken,this.read());this._currentToken.kind===10&&(t=this.getNodeName(this._currentToken),n=this.popMatchingElement(t),n||(n=this.createNode(4),n.nodeName=t,this.appendChild(n)),n.endTagOpenToken=i,n.endTagName=this._currentToken,this.read());this.skipUntil(11);(this._currentToken.kind===11||this._currentToken.kind===18)&&(n&&(n.endTagCloseToken=this._currentToken),this.read())},i.prototype.stateParseTagAttributes=function(){var n;if(this._currentToken.kind!==18&&this._currentToken.kind!==11&&this._currentToken.kind===12){if(n=this.createNode(5),n.name=this._currentToken,n.nodeName=this.getNodeName(this._currentToken),this.read(),this._currentToken.kind===14&&(n.equalsToken=this._currentToken,this.read(),this._currentToken.kind===13&&(n.value=this._currentToken,this.read(),this._inScriptElement&&n.name.end-n.name.pos==4&&n.value.end-n.value.pos>0))){var i=n.name.pos,r=n.name.end-i;t.lookahead(this._raw,[84,89,80,69],{pos:i,len:r,ignoreCase:!0})&&(this._currentNode.type=this.getAttributeValue(n.value))}return this.addAttribute(n),this.pushStates(this.stateParseTagAttributes)}},i.prototype.popMatchingElement=function(n){var t=this._currentNode,i,r;if(this.hasTagName(t,n))return this.popNode(),t;for(i=this._nodeStack.length-1;i>=0;i--)if(t=this._nodeStack[i],this.hasTagName(t,n)){for(r=this._nodeStack.length-1;r>=i;r--)this.popNode(!0);return this.popNode(!0),this.refreshCurrentNode(),t}},i.prototype.appendChild=function(n){this._currentNode.firstChild||(this._currentNode.firstChild=n);this._currentNode.lastChild&&(n.previousSibling=this._currentNode.lastChild,this._currentNode.lastChild.nextSibling=n);n.parentNode=this._currentNode;this._currentNode.lastChild=n;this._currentContainer.childNodes.push(n)},i.prototype.addAttribute=function(n){var t=this._currentNode;t.firstAttribute||(t.firstAttribute=n);t.lastAttribute&&(n.previousSibling=t.lastAttribute,t.lastAttribute.nextSibling=n);n.parentNode=t;t.lastAttribute=n;t.attributes.push(n)},i.prototype.hasTagName=function(n,t){return n&&n.kind===4&&n.nodeName===t},i.prototype.getNodeName=function(n){if(n.kind===10)return this._raw.substring(n.pos,n.end).toLowerCase()},i.prototype.getAttributeValue=function(n){var f,u;if(n.kind===13){var t=n.pos,i=n.end,r=this._raw.charCodeAt(t);(r===34||r===39)&&(t++,f=this._raw.charCodeAt(i-1),f===r&&i--);u=this._raw.substring(t,i);try{return decodeURIComponent(u)}catch(e){return u}}},i.prototype.isDescendantOf=function(n){var t,i;if(this._currentElement.nodeName===n)return!0;for(t=this._nodeStack.length-1;t>=0;t--)if(i=this._nodeStack[t],i.kind===4&&i.nodeName===n)return!0;return!1},i}(n.StateMachine),r;t.HtmlParser=i,function(n){n[n.Document=0]="Document";n[n.DocumentType=1]="DocumentType";n[n.ProcessingInstruction=2]="ProcessingInstruction";n[n.Comment=3]="Comment";n[n.Element=4]="Element";n[n.Attribute=5]="Attribute";n[n.Text=6]="Text";n[n.CharacterData=7]="CharacterData"}(t.NodeKind||(t.NodeKind={}));r=t.NodeKind})(t=n.Html||(n.Html={}))})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=HtmlParser.min.js.map
var __extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},Common;
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(i){"use strict";function f(i,r,u){var f,o,e,s;return i=i.replace(/\s+$/,""),typeof n.FormatService.FormatWorker=="undefined"&&importScripts(u.formatterRoot+"formatWorker.js"),f=new t.WorkerSendMessage,f.source=i,f.mimeType=r||"text/javascript",f.commonUrl=u.commonRoot,f.loader=u.editorRoot,f.typescriptServices=u.editorRoot+"languages/typescript/lib/",o=new t.OffsetTextMapping(i,[],i),e=new t.FormatWorker(f,u.formatterRoot),e.processSource(),e.error||!e.formattedText?o:(s=e.generatedSourceSpans.map(function(n){return new t.SourceSpan(n.data)}),new t.FormattedTextMapping(2,e.formattedText,o,s))}function e(i,r,u){i=i.replace(/\s+$/,"");typeof n.FormatService.CssParser=="undefined"&&importScripts(u.formatterRoot+"css/CssParser.js",u.formatterRoot+"css/CssEmitter.js");var e=new t.CssParser(i),o=e.parseCss(),f=new t.CssEmitter(r),s=f.outputCss(o);return new t.OffsetTextMapping(s,f.mappings,i)}function r(n){var t=n.text;return n.kind===6&&n.parentNode&&/^(li|d[td]|r([bp]|tc?)|t([dh]|itle))$/i.test(n.parentNode.nodeName)&&!n.previousSibling&&!n.nextSibling&&(!t||t.end-t.pos<=128)}var u=function(n){function u(t){n.call(this);this._services=t}return __extends(u,n),u.prototype.emit=function(n){var r,u;return this._raw=n,this._pos=0,this._newlineRequested=!1,this._spaceRequested=!1,this._builder=[],this._nodeStack=[],this._indexStack=[],this._offsets=[],this._currentIndex=0,r=new i.HtmlParser,this._currentNode=r.parse(n),this.refreshCurrentNode(),this.pushState(this.stateEmitNode),this.run(),u=this._builder.join(""),new t.OffsetTextMapping(u,this._offsets,n)},u.prototype.stateEmitNode=function(){switch(this._currentNode.kind){case 0:this.pushState(this.stateEmitChildren);break;case 1:this.pushState(this.stateEmitDocumentType);break;case 2:this.pushState(this.stateEmitProcessingInstruction);break;case 3:this.pushState(this.stateEmitComment);break;case 7:this.pushState(this.stateEmitCharacterData);break;case 6:this.pushState(this.stateEmitText);break;case 4:this.pushState(this.stateEmitElement)}},u.prototype.stateEmitElementContent=function(){this._currentNode.nodeName==="script"?this._currentNode.firstChild&&(this.pushNode(this._currentNode.firstChild),this.pushStates(this.stateEmitScriptContent,this.popNode)):this._currentNode.nodeName==="style"?this._currentNode.firstChild&&(this.pushNode(this._currentNode.firstChild),this.pushStates(this.stateEmitStyleContent,this.popNode)):this.pushState(this.stateEmitChildren)},u.prototype.stateEmitScriptContent=function(){var n=this._currentNode,s=n.parentNode,e,i,o,r,t,u;if(n.text)for(e=n.text.pos,i=f(this.getTokenText(n.text),s.type,this._services),this.emitRaw("\n"),o=this._pos,this.emitRaw(i.text),r=i.getOffsetMappings(),t=0;t<r.length;t++)u=r[t],this.trackOffset(e+u.originalOffset,o+u.mappedOffset)},u.prototype.stateEmitStyleContent=function(){var t=this._currentNode,f,i,o,r,n,u;if(t.text)for(f=t.text.pos,i=e(this.getTokenText(t.text),this._nodeStack.length-1,this._services),this.emitRaw("\n"),o=this._pos,this.emitRaw(i.text),r=i.getOffsetMappings(),n=0;n<r.length;n++)u=r[n],this.trackOffset(f+u.originalOffset,o+u.mappedOffset)},u.prototype.stateEmitChildren=function(){if(this._currentIndex<this._currentContainer.childNodes.length){var n=this._currentContainer.childNodes[this._currentIndex];return this.pushNode(n),this.pushStates(this.stateEmitNode,this.stateEndEmitChild,this.stateEmitChildren)}},u.prototype.stateEndEmitChild=function(){this.popNode();this._currentIndex++},u.prototype.stateEmitDocumentType=function(){var n=this._currentNode;this.requestNewline();this.emitToken(n.openToken);this.requestSpace();this.emitToken(n.content);this.requestSpaceIfNeeded(n.closeToken);this.emitToken(n.closeToken);this.requestNewline()},u.prototype.stateEmitProcessingInstruction=function(){var n=this._currentNode;this.requestNewline();this.emitToken(n.openToken);this.requestSpace();this.emitToken(n.content);this.requestSpaceIfNeeded(n.closeToken);this.emitToken(n.closeToken);this.requestNewline()},u.prototype.stateEmitComment=function(){var n=this._currentNode;this.requestNewline();this.emitToken(n.openToken);this.requestSpaceIfNeeded(n.content);this.emitToken(n.content);this.requestSpaceIfNeeded(n.closeToken);this.emitToken(n.closeToken);this.requestNewline()},u.prototype.stateEmitCharacterData=function(){var n=this._currentNode;this.emitToken(n.openToken);this.emitToken(n.text);this.emitToken(n.closeToken)},u.prototype.stateEmitText=function(){var n=this._currentNode,f=this.peekParentElement(),t=!1,u=!1;n.parentNode&&!i.isPhrasingContent(n.parentNode.nodeName)&&(n.previousSibling||n.nextSibling||!r(n))&&(n.previousSibling&&!i.isPhrasingContent(n.previousSibling.nodeName)&&(t=!0),n.nextSibling&&!i.isPhrasingContent(n.nextSibling.nodeName)&&(u=!0));t&&this.requestNewline();this.emitToken(n.text);u&&this.requestNewline()},u.prototype.stateEmitElement=function(){this.pushStates(this.stateBeginEmitElement,this.stateEmitElementContent,this.stateEndEmitElement)},u.prototype.stateBeginEmitElement=function(){var n=this._currentNode,u,f,e,t;if(n.startTagOpenToken){if(u=!1,i.isPhrasingContent(n.nodeName)?n.previousSibling&&!i.isPhrasingContent(n.previousSibling.nodeName)?u=!0:n.nodeName==="a"&&n.parentNode.childNodes.every(function(n){return n.nodeName==="a"})&&(u=!0):u=!0,f=!1,n.firstChild&&(i.isPhrasingContent(n.nodeName)||r(n.firstChild)?i.isPhrasingContent(n.firstChild.nodeName)||(i.isPhrasingContent(n.nodeName)&&(u=!0),f=!0):f=!0),u&&this.requestNewline(),this.emitToken(n.startTagOpenToken),this.emitToken(n.startTagName),n.attributes.length>0)for(e=0;e<n.attributes.length;e++)t=n.attributes[e],this.emitLeadingTrivia(t.name),this.requestSpaceIfNeeded(t.name),this.emitToken(t.name),t.equalsToken&&(this.emitLeadingTrivia(t.equalsToken),this.emitToken(t.equalsToken),t.value&&(this.emitLeadingTrivia(t.value),this.emitToken(t.value)));this.emitLeadingTrivia(n.startTagCloseToken);this.emitToken(n.startTagCloseToken);f&&this.requestNewline()}},u.prototype.stateEndEmitElement=function(){var t=!1,n=this._currentNode,u;n.endTagOpenToken&&(u=!1,n.lastChild&&(i.isPhrasingContent(n.nodeName)||r(n.lastChild)?i.isPhrasingContent(n.lastChild.nodeName)||(i.isPhrasingContent(n.nodeName)&&(t=!0),u=!0):u=!0),u&&this.requestNewline(),this.emitToken(n.endTagOpenToken),this.emitToken(n.endTagName),this.emitLeadingTrivia(n.endTagCloseToken),this.emitToken(n.endTagCloseToken));i.isPhrasingContent(n.nodeName)?n.nextSibling&&!i.isPhrasingContent(n.nextSibling.nodeName)?t=!0:n.nodeName==="br"?t=!0:n.nodeName==="a"&&n.parentNode.childNodes.every(function(n){return n.nodeName==="a"})&&(t=!0):t=!0;t&&this.requestNewline()},u.prototype.pushNode=function(n){this._nodeStack.push(this._currentNode);this._indexStack.push(this._currentIndex);this._currentNode=n;this._currentIndex=0;this.refreshCurrentNode()},u.prototype.popNode=function(){var n=this._currentNode;return this._currentNode=this._nodeStack.pop(),this._currentIndex=this._indexStack.pop(),this.refreshCurrentNode(),n},u.prototype.peekParentElement=function(){if(this._nodeStack.length){var n=this._nodeStack[this._nodeStack.length-1];if(n.kind===4)return n}},u.prototype.refreshCurrentNode=function(){var t,i,n=this._currentNode;n&&((n.kind===0||n.kind===4)&&(t=n),n.kind===4&&(i=n));this._currentContainer=t;this._currentElement=i},u.prototype.requestNewline=function(){this._newlineRequested=!0},u.prototype.requestSpace=function(){this._spaceRequested=!0},u.prototype.requestSpaceIfNeeded=function(n){this._lastTokenForSpacing&&n&&n.pos>this._lastTokenForSpacing.end&&this.requestSpace()},u.prototype.getTokenText=function(n){return this._raw.substring(n.pos,n.end)},u.prototype.emitToken=function(n){this.emitTokenOrText(n,undefined)},u.prototype.emitText=function(n){this.emitTokenOrText(undefined,n)},u.prototype.trackOffset=function(n,i){var r=!1;if(this._offsets.length===0)r=!0;else{var u=this._offsets[this._offsets.length-1],f=u.mappedOffset-u.originalOffset,e=i-n;f!==e&&(r=!0)}r&&this._offsets.push(new t.OffsetMappingPair(n,i))},u.prototype.emitTokenOrText=function(n,t){if(n||t){if(this._newlineRequested){if(this._builder.length){var i=this._builder[this._builder.length-1],r=i.charCodeAt(i.length-1);r!==13&&r!==10&&(this._builder.push("\n"),this._pos++);this._builder.push(Array(this._nodeStack.length).join("  "));this._pos+=(this._nodeStack.length-1)*2}}else this._spaceRequested&&this._builder.length&&(this._builder.push(" "),this._pos+=1);n&&(this.trackOffset(n.pos,this._pos),t=this.getTokenText(n),this._lastToken=n);this._newlineRequested=!1;this._spaceRequested=!1;this._builder.push(t);this._lastTokenForSpacing=n;this._pos+=t.length}},u.prototype.emitRaw=function(n){this._builder.push(n);this._pos+=n.length;this._lastTokenForSpacing=undefined},u.prototype.emitLeadingTrivia=function(n){var r,u,t,f;if(this._lastToken&&n){for(r=-1,t=this._lastToken.end;t<n.pos;t++)if(!i.isWhitespaceChar(this._raw.charCodeAt(t))){r=t;break}for(u=-1,t=n.pos-1;t>=r;t--)if(!i.isWhitespaceChar(this._raw.charCodeAt(t))){u=t+1;break}r>-1&&(f={kind:17,pos:r,end:u},this.requestSpaceIfNeeded(f),this.emitToken(f))}},u}(t.StateMachine);i.HtmlEmitter=u})(i=t.Html||(t.Html={}))})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=HtmlEmitter.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(n){"use strict";var u=function(){function t(n,i,r,u,f){F12.Tools.Utility.Assert.isTrue(n===2||n===1,"Invalid sourceType");F12.Tools.Utility.Assert.hasValue(u&&u.length,"sourceSpans are required");this.sourceType=n;this.text=i;this._originalText=r;this._sourceSpans=u;this.errorMessage=f||r.errorMessage;this._formattedOffsets=t.calculateLineOffsets(i)}return t.calculateLineOffsets=function(n){var r=0,i=[],t;if(i[r]=0,n)for(t=0;t<n.length;t++)n.charAt(t)==="\n"&&(i[++r]=t+1);return i},t.prototype.getOffsetMappings=function(){for(var n,i=[],r=this._sourceSpans[0].sourcemap.allMappings,t=0;t<r.length;t++)n=r[t],i.push({originalOffset:this._originalText.positionToOffset({line:n.sourceLine,column:n.sourceColumn,file:0}),mappedOffset:this.positionToOffset({line:n.generatedLine,column:n.generatedColumn,file:0})});return i},t.prototype.getOriginalPosition=function(n){var t=this.getOriginalOffset(n);return this._originalText.getOriginalPosition(this._originalText.offsetToPosition(t))},t.prototype.getMappedPosition=function(t){var i,e,u,r,f;if(t=this._originalText.getMappedPosition(t),i=this._originalText.positionToOffset(t),e=this._originalText.text.length,e===0)return new n.Position(0,0);for(i<0&&(i=0),i>=e&&(i=e-1),r=0;r<this._sourceSpans.length;r++)if(this._sourceSpans[r].start<=i&&this._sourceSpans[r].end>=i){u=this._sourceSpans[r];break}return F12.Tools.Utility.Assert.isTrue(r<this._sourceSpans.length,"Could not find source code for offset"),f=u.getPosition(i-u.start),u.sourcemap&&(f=u.sourcemap.getGeneratedPosition(f)),f.line+=u.generatedLineOffset,f},t.prototype.positionToOffset=function(n){return this._formattedOffsets[n.line]+n.column},t.prototype.offsetToPosition=function(t){for(var i=0;i<this._formattedOffsets.length;i++)if(this._formattedOffsets[i]>t)break;return i--,new n.Position(i,t-this._formattedOffsets[i],0)},t.prototype.getOriginalOffset=function(t){var i,r,u;if(this._originalText.text.length===0)return 0;for(i=new n.Position(t.line,t.column,t.file),r=0;r<this._sourceSpans.length-1;r++)if(i.line<this._sourceSpans[r+1].generatedLineOffset)break;return u=this._sourceSpans[r],i.line-=u.generatedLineOffset,u.sourcemap&&(i=u.sourcemap.getOriginalPosition(i)),u.getOffset(i)},t}(),i,r,t;n.FormattedTextMapping=u;i=function(){function n(n,t){this.originalOffset=n;this.mappedOffset=t}return n}();n.OffsetMappingPair=i;r=function(){function n(n,i,r){this.text=n;this.mappings=i;this._originalTextMapper=new t(r);this._mappedTextMapper=new t(n)}return n.prototype.getOriginalPosition=function(n){for(var r,i=this._mappedTextMapper.positionToOffset(n),t=this.mappings.length-1;t>=0;t--)if(i>=this.mappings[t].mappedOffset)return r=i-this.mappings[t].mappedOffset,this._originalTextMapper.offsetToPosition(this.mappings[t].originalOffset+r);return this._mappedTextMapper.offsetToPosition(0)},n.prototype.getMappedPosition=function(n){for(var r,i=this._originalTextMapper.positionToOffset(n),t=this.mappings.length-1;t>=0;t--)if(i>=this.mappings[t].originalOffset)return r=i-this.mappings[t].originalOffset,this._mappedTextMapper.offsetToPosition(this.mappings[t].mappedOffset+r);return this._mappedTextMapper.offsetToPosition(0)},n.prototype.positionToOffset=function(n){return this._mappedTextMapper.positionToOffset(n)},n.prototype.offsetToPosition=function(n){return this._mappedTextMapper.offsetToPosition(n)},n.prototype.getOffsetMappings=function(){return this.mappings},n}();n.OffsetTextMapping=r;t=function(){function n(n){this.text=n||"";this._newlineOffsets=[0];for(var t;;)if(t=n.indexOf("\n",t+1),t>-1)this._newlineOffsets.push(t+1);else break}return n.prototype.positionToOffset=function(n){if(!n)return 0;var t=n.line;return t>=this._newlineOffsets.length&&(t=Math.max(0,this._newlineOffsets.length-1)),this._newlineOffsets[t]+n.column},n.prototype.offsetToPosition=function(n){n=Math.max(n,0);for(var t=this._newlineOffsets.length-1;t>=0;t--)if(this._newlineOffsets[t]<=n)return{line:t,column:n-this._newlineOffsets[t],file:0};return{line:0,column:n,file:0}},n.prototype.getOriginalPosition=function(n){return n},n.prototype.getMappedPosition=function(n){return n},n.prototype.getOffsetMappings=function(){return[]},n}();n.PositionOffsetMapper=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=FormattedTextMapping.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(t){"use strict";var i=function(){function i(n){n===void 0&&(n=t.FormatServiceHelper.DefaultServices);this._options=null;this._sourceText=null;this._sourceInfo=null;this._options=new t.FormatterOptions;this._canBePrettyPrinted=!0;this._prettyPrintPromise=null}return Object.defineProperty(i.prototype,"canFormat",{get:function(){return this._canBePrettyPrinted},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sourceText",{get:function(){return this._sourceText},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"options",{get:function(){return this._options},enumerable:!0,configurable:!0}),i.prototype.updateOptions=function(n){this._options.updateAllOptions(n)},i.prototype.setDocument=function(n,i,r,u,f){var e=this;return F12.Tools.Utility.Assert.hasValue(n,"source does not have a value."),new Microsoft.Plugin.Promise(function(i){e._sourceText=new t.UnmappedTextMapping(n);e._sourceInfo={name:"",mimeType:r,sourceType:2};e._canBePrettyPrinted=n.length>0&&!/^[\s;]+$/.test(n);e._prettyPrintPromise&&(e._prettyPrintPromise.cancel(),e._prettyPrintPromise=null);f&&e._canBePrettyPrinted&&e.formatSource(e._options.forceChunking);i(e._sourceInfo)})},i.prototype.getFormattedText=function(n){F12.Tools.Utility.Assert.isTrue(!!this.sourceText,"Must call setDocument first");n=n||this._options;var t=n.prettyPrint&&this._canBePrettyPrinted?2:0;return t===2?(this._prettyPrintPromise||this.formatSource(n.forceChunking),F12.Tools.Utility.Assert.hasValue(this._prettyPrintPromise,"No pretty print promise."),this._prettyPrintPromise):Microsoft.Plugin.Promise.as(this._sourceText)},i.prototype.formatSource=function(i){var r=this,u=null,f;(F12.Tools.Utility.Assert.isTrue(this._canBePrettyPrinted,"Source cannot be pretty printed."),this._prettyPrintPromise)||(f=function(){u&&u.terminate()},this._prettyPrintPromise=new Microsoft.Plugin.Promise(function(e){window.setImmediate(function(){var c=t.FormatServiceHelper.getWorkerServices(new n.Uri("formatWorker.js"),r._services),s,h,o;u=new Worker(c.path);s=null;u.onerror=function(){r._canBePrettyPrinted=!1;s=n.ToolWindowHelpers.loadString("FormatterInternalError");f();e(new t.UnmappedTextMapping(r._sourceText.text,s));return};h=[];u.onmessage=function(i){var c,y,o,v,l,a,u,p;if(i.error&&F12.Tools.Utility.Assert.failDebugOnly(i.errorMessage),typeof i.data.generatedSourceSpanIndex!="undefined"){for(c=i.data,h[c.generatedSourceSpanIndex]||(h[c.generatedSourceSpanIndex]=[]),y=h[c.generatedSourceSpanIndex],u=0;u<c.mappings.length;u++)y.push(c.mappings[u]);return}if(o=i.data,r._canBePrettyPrinted=o.canBePrettyPrinted,v=null,r._canBePrettyPrinted){for(l=o.generatedSourceSpanData,a=[],u=0;u<l.length;u++)h[u]&&(F12.Tools.Utility.Assert.isNull(l[u].mappings),l[u].mappings=h[u]),p=new t.SourceSpan(l[u]),a.push(p);o.error&&(s=n.ToolWindowHelpers.loadString(a.length>1?"FormatterEmbededJSInternalError":"FormatterInternalError"),o.errorMessage.length>0&&(s+="\n",s+=o.errorMessage));v=new t.FormattedTextMapping(2,o.formattedText,r._sourceText,a,s)}f();e(v||r.sourceText)};o=new t.WorkerSendMessage;o.source=r._sourceText.text;o.mimeType=r._sourceInfo.mimeType;o.commonUrl=c.services.commonRoot;o.loader=c.services.editorRoot;o.typescriptServices=c.services.editorRoot+"languages/typescript/lib/";o.forceResponseChunking=i;u.postMessage(o)})},f))},i}();t.ScriptFormatter=i})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=Formatter.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(n){"use strict";var t=function(){function n(){this._stateStack=[]}return n.prototype.pushState=function(n){this._stateStack.push(n)},n.prototype.pushStates=function(){for(var t=[],n=0;n<arguments.length;n++)t[+n]=arguments[n];while(t.length)this.pushState(t.pop())},n.prototype.popState=function(){return this._stateStack.pop()},n.prototype.run=function(){while(this.runOne());},n.prototype.runUntil=function(n){for(var t;t=this._stateStack.pop();)if(t.call(this),t===n)return!0;return!1},n.prototype.runOne=function(){var n;return(n=this._stateStack.pop())?(n.call(this),!0):!1},n.prototype.stop=function(){this._stateStack.length=0},n}();n.StateMachine=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=StateMachine.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(n){"use strict";var t=function(){function n(){this._prettyPrint=!1;this._sourcemapSupport=!1}return Object.defineProperty(n.prototype,"sourcemapSupport",{get:function(){return this._sourcemapSupport},set:function(n){this._sourcemapSupport=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"prettyPrint",{get:function(){return this._prettyPrint},set:function(n){this._prettyPrint=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"forceChunking",{get:function(){return this._forceChunking},set:function(n){this._forceChunking=n},enumerable:!0,configurable:!0}),n.prototype.updateAllOptions=function(n){this.prettyPrint=n.prettyPrint||!1;this.sourcemapSupport=n.sourcemapSupport||!1;this.forceChunking=n.forceChunking},n}();n.FormatterOptions=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=FormatterOptions.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(n){"use strict";(function(n){n[n.Original=0]="Original";n[n.Sourcemap=1]="Sourcemap";n[n.PrettyPrint=2]="PrettyPrint"})(n.SourceType||(n.SourceType={}));var t=n.SourceType})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=IFormatService.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i){n?(F12.Tools.Utility.Assert.isTrue(n>=0,"Invalid line number: "+n.toString()),this._line=n):this._line=0;t?(F12.Tools.Utility.Assert.isTrue(t>=0,"Invalid column: "+t.toString()),this._column=t):this._column=0;i?(F12.Tools.Utility.Assert.isTrue(i>=0,"Invalid file: "+i.toString()),this._file=i):this._file=0}return Object.defineProperty(n.prototype,"line",{get:function(){return this._line},set:function(n){F12.Tools.Utility.Assert.isTrue(n>=0,"Invalid line number: "+n.toString());this._line=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"column",{get:function(){return this._column},set:function(n){F12.Tools.Utility.Assert.isTrue(n>=0,"Invalid column: "+n.toString());this._column=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"file",{get:function(){return this._file},set:function(n){F12.Tools.Utility.Assert.isTrue(n>=0,"Invalid file: "+n.toString());this._file=n},enumerable:!0,configurable:!0}),n.EMPTY_POSITION=new n,n}();n.Position=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=position.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(n){"use strict";var t=function(){function t(t){this._start=t.start;this._end=t.end;this._lineOffsets=t.lineOffsets;this._generatedLineOffset=t.generatedLineOffset;this._sourcemap=new n.SourcemapMappings(t.mappings,[]);this._length=t.length}return Object.defineProperty(t.prototype,"start",{get:function(){return this._start},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this._end},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"generatedLineOffset",{get:function(){return this._generatedLineOffset},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sourcemap",{get:function(){return this._sourcemap},enumerable:!0,configurable:!0}),t.prototype.getPosition=function(t){var r,i,u,f;for(F12.Tools.Utility.Assert.isTrue(t>=0,"Negative offset"),F12.Tools.Utility.Assert.isTrue(this._lineOffsets.length>=1,"Need to call calculateLineOffsets first"),t=Math.min(t,this._length-1),r=this._lineOffsets.length-1,i=0;i<r;)u=i+r>>1,this._lineOffsets[u]<t?i=u+1:r=u;return i>0&&i<this._lineOffsets.length&&this._lineOffsets[i]>t&&(i=i-1),f=t-this._lineOffsets[i],F12.Tools.Utility.Assert.isTrue(f>=0,"Calculated negative column"),new n.Position(i,f)},t.prototype.getOffset=function(n){F12.Tools.Utility.Assert.isTrue(this._lineOffsets.length>=1,"Need to call calculateLineOffsets first");F12.Tools.Utility.Assert.isTrue(n.line>=0,"Line outside of range");F12.Tools.Utility.Assert.isTrue(n.column>=0,"Column outside of range");var t;return n.line>=this._lineOffsets.length?t=Math.max(0,this._length-1):(t=this._lineOffsets[n.line]+n.column,n.line<this._lineOffsets.length-1&&t>=this._lineOffsets[n.line+1]&&(t=this._lineOffsets[n.line+1]-1),t>=this._length&&(t=Math.max(0,this._length-1))),t+this._start},t}();n.SourceSpan=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=sourceSpan.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(n){"use strict";var t=function(){function t(t,i){this.text=t;this.errorMessage=i;var r=new n.SourceSpanBuilder(0,t.length);r.calculateLineOffsets(t);this._sourceSpan=new n.SourceSpan(r.data)}return t.prototype.getOriginalPosition=function(n){return n},t.prototype.getMappedPosition=function(n){return n},t.prototype.positionToOffset=function(n){return this.text.length===0?0:this._sourceSpan.getOffset(n)},t.prototype.offsetToPosition=function(t){return this.text.length===0?n.Position.EMPTY_POSITION:this._sourceSpan.getPosition(Math.min(this.text.length,Math.max(0,t)))},t.prototype.getOffsetMappings=function(){return[]},t}();n.UnmappedTextMapping=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=UnmappedTextMapping.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(n){"use strict";typeof importScripts=="function"&&typeof document=="undefined"&&(onmessage=function(t){importScripts("sourcemapParser.js","sourcemapMappings.js","workerMessaging.js","base64.js");var f=t.data.content,i,r,u;i=n.SourcemapParser.parseMapContent(f);i&&i.version===3&&(r=n.SourcemapParser.calculateMappings(i),u=n.SourcemapParser.calculateScopeSegments(i),n.SourcemapParser.calculateLocalsMapping(i,u));r?this.postMessage({id:t.data.id,sourcemapMappings:r,urls:i.sources,sourceRoot:i.sourceRoot,sourcesContent:i.sourcesContent,version:i.version,sourceMediaTypes:i.x_ms_sourceMediaTypes,mediaTypes:i.x_ms_mediaTypes,sourceScopes:u}):this.postMessage({id:t.data.id,sourcemapMappings:null,urls:[],sourceRoot:"",sourcesContent:[],version:i&&i.version,sourceMediaTypes:null,mediaTypes:null,sourceScopes:null})})})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=SourceMapParserWorker.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(n){"use strict";var i=function(){function t(n,i){if(i===void 0&&(i=""),this._source=n.source,this._mimeType=n.mimeType,this._generatedSourceSpans=[],this._canBePrettyPrinted=!1,this._error=!1,this._firstCompilerError="",!t.ScriptsImported&&typeof importScripts=="function"){t.ScriptsImported=!0;try{importScripts(n.commonUrl+"assert.js");importScripts(n.loader+"loader.js");importScripts(n.typescriptServices+"typescriptServices.js")}catch(r){importScripts(n.commonUrl.substr(3)+"assert.js");importScripts(n.loader.substr(3)+"loader.js");importScripts(n.typescriptServices.substr(3)+"typescriptServices.js")}importScripts(i+"sourceSpanBuilder.js");importScripts(i+"sourcemapParser.js");importScripts(i+"workerMessaging.js");importScripts(i+"htmlScriptFinder.js");importScripts(i+"base64.js")}}return Object.defineProperty(t.prototype,"formattedText",{get:function(){return this._formattedText},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"canBePrettyPrinted",{get:function(){return this._canBePrettyPrinted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"generatedSourceSpans",{get:function(){return this._generatedSourceSpans},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"error",{get:function(){return this._error},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstCompilerError",{get:function(){return this._firstCompilerError},enumerable:!0,configurable:!0}),t.prototype.getNumLines=function(n){for(var i=0,t=0;t<n.length;t++)n[t]==="\n"&&++i;return i},t.prototype.parseSource=function(t,i){if(n.HTMLScriptFinder.isSupportedScript(i))this._generatedSourceSpans.push(new n.SourceSpanBuilder(0,t.length,!0)),this._canBePrettyPrinted=!0;else if(i==="text/html")try{var r=new n.HTMLScriptFinder(t);r.sourceSpans.length>1&&(this._generatedSourceSpans=r.sourceSpans,this._canBePrettyPrinted=!0)}catch(u){}},t.prototype.formatJavaScript=function(t){var r,e,i,v,o,u,w,b,c,d,g,h,p;if(t.length!==0)for(F12.Tools.Utility.Assert.isTrue(this._canBePrettyPrinted),F12.Tools.Utility.Assert.isTrue(this._generatedSourceSpans.length>0),r=0,e=0,this._generatedSourceSpans[0].generatedLineOffset=r,this._formattedText="";;){if(i=this._generatedSourceSpans[e],i.isScript||(i.generatedLineOffset+=r,v=t.slice(i.start,i.end+1),r+=i.calculateLineOffsets(v),this._formattedText+=v,++e<this._generatedSourceSpans.length&&(this._formattedText+="\n",++r)),e===this._generatedSourceSpans.length)return;i=this._generatedSourceSpans[e];F12.Tools.Utility.Assert.isTrue(i.isScript);i.generatedLineOffset+=r;o=!1;try{c=require("vs/languages/typescript/lib/typescriptServices");u=t.slice(i.start,i.end+1);w=i.calculateLineOffsets(u);u.charAt(u.length-1)!=="\n"&&(u+="\r\n");var y="input",f,s,l,nt={getSourceFile:function(n,t){return n===y+".ts"?l=c.createSourceFile(n,u,t,"0"):c.createSourceFile(n,"",t,"0")},writeFile:function(n,t){n===y+".js"?f=t:s=t},getDefaultLibFilename:function(){return""},useCaseSensitiveFileNames:function(){return!1},getCanonicalFileName:function(n){return n},getCurrentDirectory:function(){return""},getNewLine:function(){return"\r\n"}},k=c.createProgram([y+".ts"],{sourceMap:!0,noLib:!0,removeComments:!1},nt),a=k.getDiagnostics(l);a.length||(d=k.getTypeChecker(!0),d.emitFiles(l));o=!!(f&&s)}catch(tt){b=tt.message;o=!1}finally{if(o){try{s.indexOf(")]}")===0&&(s=s.slice(3));g=JSON.parse(s)}catch(it){}i._mappings=n.SourcemapParser.calculateMappings(g);i._mappings||(o=!1)}o?(h=f.lastIndexOf("//# sourceMappingURL=input.js.map"),f[h-1]==="\n"&&f[h-2]==="\n"&&--h,p=h!==-1?f.slice(0,h):f,r+=this.getNumLines(p),this._formattedText+=p):(r+=w,this._formattedText+=u,this._error=!0,this._firstCompilerError="Error: "+(a&&a[0]&&a[0].messageText||b))}if(++e===this._generatedSourceSpans.length)return}},t.prototype.processSource=function(){this.parseSource(this._source,this._mimeType);this._canBePrettyPrinted&&this.formatJavaScript(this._source)},t.ScriptsImported=!1,t}(),r,t;n.FormatWorker=i;r=1e3;t=2e5;onmessage=function(u){var a=this,l=u.data,s=new i(l),f,h,v,c,e,o,y;for(s.processSource(),f=new n.WorkerResponseMessage,f.formattedText=s.formattedText,f.canBePrettyPrinted=s.canBePrettyPrinted,f.error=s.error,f.errorMessage=s.firstCompilerError,h=s.generatedSourceSpans,f.generatedSourceSpanData=[],v=0,e=0;e<h.length;e++)h[e].data.mappings&&(v+=h[e].data.mappings.length),f.generatedSourceSpanData.push(h[e].data);if(l.forceResponseChunking===!1||!l.forceResponseChunking&&v<t){this.postMessage(f);this.close();return}for(c=[],e=0;e<h.length;e++)c.push(f.generatedSourceSpanData[e].mappings),f.generatedSourceSpanData[e].mappings=null;o=0;y=function(){var i,u;o<c.length?(c[o]?(i=new n.WorkerMappingSubsetResponseMessage,i.generatedSourceSpanIndex=o,u=l.forceResponseChunking?r:t,i.mappings=c[o].splice(0,u),a.postMessage(i),c[o].length||o++):o++,setTimeout(y,0)):(a.postMessage(f),a.close())};setTimeout(y,0)}})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=formatWorker.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(n){"use strict";var t=function(){function t(n,t){var i=this;this.urls=t;this._fileMappings=[];this._allMappings=[];n&&n.forEach(function(n){i._fileMappings[n.file]||(i._fileMappings[n.file]=[]);i._fileMappings[n.file].push(n);i._allMappings.push(n)});this._fileMappings.forEach(function(n){n.sort(function(n,t){return n.sourceLine!==t.sourceLine?n.sourceLine-t.sourceLine:n.sourceColumn!==t.sourceColumn?n.sourceColumn-t.sourceColumn:n.generatedLine!==t.generatedLine?n.generatedLine-t.generatedLine:n.generatedColumn-t.generatedColumn})})}return Object.defineProperty(t.prototype,"allMappings",{get:function(){return this._allMappings},enumerable:!0,configurable:!0}),t.binarySearch=function(n,t,i){for(var r=n.length-1,e=0,u,o,f;e<=r;)if(u=e+r>>1,o=i(n[u],t.line,t.column),o>0)e=u+1;else if(o<0)r=u-1;else{r=u;break}for(f=Math.max(Math.min(n.length-1,r),0);f+1<n.length&&i(n[f+1],t.line,t.column)===0;)f++;return f},t.binaryCompareSource=function(n,t,i){return n.sourceLine===t?i-n.sourceColumn:t-n.sourceLine},t.binaryCompareGenerated=function(n,t,i){return n.generatedLine===t?i-n.generatedColumn:t-n.generatedLine},t.prototype.isValid=function(){return this._fileMappings&&this._fileMappings.length>0},t.prototype.hasOriginalPosition=function(i){var e=new n.Position(i.line,i.column,i.file),r=this._allMappings,u,f;return r.length>0?(u=t.binarySearch(r,e,t.binaryCompareGenerated),f=r[u],i.line===f.generatedLine):!0},t.prototype.getOriginalPosition=function(i){var r=new n.Position(i.line,i.column,i.file),u=this._allMappings,f;return u.length>0&&(f=t.binarySearch(u,r,t.binaryCompareGenerated),r.line=Math.max(u[f].sourceLine,0),r.column=Math.max(u[f].sourceColumn,0),r.file=Math.min(Math.max(u[f].file,0),this._fileMappings.length-1)),r},t.prototype.getGeneratedPosition=function(i){var r=new n.Position(i.line,i.column,i.file),u=this._fileMappings[r.file],f;return u&&u.length>0&&(f=t.binarySearch(u,r,t.binaryCompareSource),r.line=Math.max(u[f].generatedLine,0),r.column=Math.max(u[f].generatedColumn,0)),r},t}();n.SourcemapMappings=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=sourcemapMappings.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.encode=function(t){if(t<64&&t>=0)return n.EncodedValues.charAt(t);throw TypeError(t+": not a 64 based value")},n.decodeChar=function(t){if(t.length===1)return n.EncodedValues.indexOf(t);throw TypeError("'"+t+"' must have length 1")},n.EncodedValues="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n}(),i=function(){function n(){}return n.encode=function(i){var r,u;if(i===null||typeof i===n.UndefinedType)return null;i=i<0?(-i<<1)+1:i<<1;r="";do u=i&31,i=i>>5,i>0&&(u=u|32),r=r+t.encode(u);while(i>0);return r},n.decode=function(n,i){for(var u,f=0,e=!1,o=0,r=i;r<n.length;r++){if(u=t.decodeChar(n[r]),r===i){if(u===-1)return null;(u&1)==1&&(e=!0);f=u>>1&15}else f=f|(u&31)<<o;if(o+=r===i?4:5,(u&32)!=32)return{value:e?-f:f,charsRead:r-i+1}}},n.UndefinedType="undefined",n}();n.Base64VLQFormat=i})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=Base64.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(n){"use strict";var t=function(){function t(n){F12.Tools.Utility.Assert.hasValue(n,"Need to set a valid source");this._source=n;this._sourceSpans=null;this._earlyEnd=!1}return Object.defineProperty(t.prototype,"sourceSpans",{get:function(){return this._sourceSpans===null&&this.findScriptTags(),this._sourceSpans},enumerable:!0,configurable:!0}),t.isSupportedScript=function(n,t){var i=n?n.toLocaleLowerCase():"",r=t?t.toLocaleLowerCase():"";return!i&&!r||i==="text/javascript"||i==="text/jscript"||i==="application/javascript"||i==="application/x-javascript"||i==="text/ecmascript"||r==="javascript"||r==="jscript"||r==="ecmascript"},t.prototype.findScriptTags=function(){this._index=0;this._sourceSpans=[];this._htmlStart=0;var t=this._source;do if(t[this._index]==="<"){if(this._index+1>=t.length)break;t[this._index+1]==="!"?this._index+3<this._source.length&&this._source[this._index+2]==="-"&&this._source[this._index+3]==="-"?this.parseComment():this.parseTag():t[this._index+1]==="?"?this.parseTag():(t[this._index+1].match(/[a-zA-Z]/)||t[this._index+1]==="_"||t[this._index+1]==="/"&&this._index+2<t.length&&(t[this._index+2].match(/a-zA-Z/)||t[this._index+2]==="_"))&&this.parseTag()}while(++this._index<t.length);this._earlyEnd||this._sourceSpans.push(new n.SourceSpanBuilder(this._htmlStart,this._source.length-1,!1))},t.prototype.parseComment=function(){for(F12.Tools.Utility.Assert.areEqual(this._source[this._index],"<"),F12.Tools.Utility.Assert.areEqual(this._source[this._index+1],"!"),F12.Tools.Utility.Assert.areEqual(this._source[this._index+2],"-"),F12.Tools.Utility.Assert.areEqual(this._source[this._index+3],"-"),this._index+=3;++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}},t.prototype.parseTag=function(){var u;F12.Tools.Utility.Assert.areEqual(this._source[this._index],"<");u=!1;this._index+1<this._source.length&&(this._source[this._index+1]==="/"||this._source[this._index+1]==="!"||this._source[this._index+1]==="?")&&(u=!0);for(var r=!1,s=!1,t=!1,i=!1,o,f="",e="",n;++this._index<this._source.length;)switch(this._source[this._index]){case">":(this._source[this._index-1]==="/"||this._source[this._index-1]==="?")&&(u=!0);u||o&&o.toLowerCase()==="script"&&(++this._index,this.findScriptEnd(f,e));return;case'"':n=this.parseQuotedValue('"');r=!1;t&&(f=n,t=!1);i&&(e=n,i=!1);break;case"'":n=this.parseQuotedValue("'");r=!1;t&&(f=n,t=!1);i&&(e=n,i=!1);break;case"=":r=!0;break;default:r&&!this._source[this._index].match(/\s/)?(n=this.parsePropertyValue(),r=!1,t&&(f=n,t=!1),i&&(e=n,i=!1)):(this._source[this._index].match(/[a-zA-Z]/)||this._source[this._index]==="_")&&(s?(n=this.parseAttribute(),n.toLowerCase()==="type"?t=!0:n.toLowerCase()!=="language"||t||(i=!0)):(o=this.parseElement(),s=!0))}},t.prototype.findScriptEnd=function(i,r){var f=this._index,s=t.isSupportedScript(i,r),o="<\/script",e,u;do if(this._source[this._index]==="<"&&this._index+o.length<this._source.length&&this._source.substr(this._index,o.length).toLowerCase()===o){this._index-=1;e=this._index;s&&f<e&&(u=new n.SourceSpanBuilder(this._htmlStart,f-1,!1),this._sourceSpans.push(u),this._htmlStart=e+1,u=new n.SourceSpanBuilder(f,e,!0),this._sourceSpans.push(u));break}while(++this._index<this._source.length);this._index===this._source.length&&s&&(u=new n.SourceSpanBuilder(this._htmlStart,f-1,!1),this._sourceSpans.push(u),u=new n.SourceSpanBuilder(f,this._index-1,!0),this._sourceSpans.push(u),this._earlyEnd=!0)},t.prototype.parseQuotedValue=function(n){F12.Tools.Utility.Assert.isTrue(n==='"'||n==="'","Invalid quote type");F12.Tools.Utility.Assert.areEqual(this._source[this._index],n);for(var t="";++this._index<this._source.length;){if(this._source[this._index]===n)return t;this._source[this._index]==="\n"||(t+=this._source[this._index])}return F12.Tools.Utility.Assert.fail("Should not be here"),null},t.prototype.parsePropertyValue=function(){var n="";do switch(this._source[this._index]){case">":return this._index--,n;default:if(this._source[this._index].match(/\s/))return this._index--,n;n+=this._source[this._index]}while(++this._index<this._source.length);return F12.Tools.Utility.Assert.fail("Should not be here"),n},t.prototype.parseElement=function(){F12.Tools.Utility.Assert.isTrue(this._source[this._index].match(/[a-zA-Z_]/),"Non alpha or underscore character");var n="";for(n+=this._source[this._index];++this._index<this._source.length;)switch(this._source[this._index]){case":":n+=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]==="-")n+=this._source[this._index];else return this._index--,n}return F12.Tools.Utility.Assert.fail("Should not be here"),n},t.prototype.parseAttribute=function(){F12.Tools.Utility.Assert.isTrue(this._source[this._index].match(/[a-zA-Z_]/),"Non alpha or underscore character");var n="";for(n+=this._source[this._index];++this._index<this._source.length;)switch(this._source[this._index]){case".":n+=this._source[this._index];break;case":":n+=this._source[this._index];break;case"-":case"_":n+=this._source[this._index];break;default:if(this._source[this._index].match(/[a-zA-Z0-9]/))n+=this._source[this._index];else return this._index--,n}return F12.Tools.Utility.Assert.fail("Should not be here"),n},t}();n.HTMLScriptFinder=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=htmlScriptFinder.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(n){"use strict";var t=function(){function t(){}return t.calculateMappings=function(i){var h=[],e,f;if(!i||i.version!==3||!i.mappings||typeof i.mappings!="string"||!i.sources||i.sources.length===0)return null;var a=i.sources.length,o=new n.SourcemapMapping,l=0,u=i.mappings;u.length===0&&(e=new n.SourcemapMapping,h.push(e));for(var c=0,r=0,s=u.length;r<s;)if(u.charAt(r)===t.ScopeOrLineDelimiter)l++,r++,o.generatedColumn=0;else if(u.charAt(r)===t.SegmentDelimiter)r++;else{if(e=new n.SourcemapMapping,e.generatedLine=l,f=n.Base64VLQFormat.decode(u,r),e.generatedColumn=o.generatedColumn+f.value,o.generatedColumn=e.generatedColumn,r+=f.charsRead,r<s&&u.charAt(r)!==t.ScopeOrLineDelimiter&&u.charAt(r)!==t.SegmentDelimiter){if(f=n.Base64VLQFormat.decode(u,r),c+=f.value,c>a)return null;r+=f.charsRead}e.file=c;r<s&&u.charAt(r)!==t.ScopeOrLineDelimiter&&u.charAt(r)!==t.SegmentDelimiter&&(f=n.Base64VLQFormat.decode(u,r),e.sourceLine=f.value+o.sourceLine,o.sourceLine=e.sourceLine,r+=f.charsRead);r<s&&u.charAt(r)!==t.ScopeOrLineDelimiter&&u.charAt(r)!==t.SegmentDelimiter&&(f=n.Base64VLQFormat.decode(u,r),e.sourceColumn=f.value+o.sourceColumn,o.sourceColumn=e.sourceColumn,r+=f.charsRead);r<s&&u.charAt(r)!==t.ScopeOrLineDelimiter&&u.charAt(r)!==t.SegmentDelimiter&&(f=n.Base64VLQFormat.decode(u,r),r+=f.charsRead);h.push(e)}return h},t.calculateScopeSegments=function(i){var o,s,f,h;if(i&&i.version===3&&typeof i.x_ms_scopes=="string"&&i.x_ms_scopes.length!==0){for(var e=i.x_ms_scopes,u=0,v=e.length,r,c=[],l=0,a=0;u<v;){if(o=n.Base64VLQFormat.decode(e,u),!o)return;if(u+=o.charsRead,s=n.Base64VLQFormat.decode(e,u),!s)return;if(u+=s.charsRead,f=new n.SourceScopeSegment(l+o.value,a+s.value),l=f.line,a=f.column,h=e.charAt(u++),h===t.StartScopeSegmentDelimiter)r=new n.SourceScope(f,r),c.push(r);else if(h===t.EndScopeSegmentDelimiter){if(!r||!r.startSegment||r.endSegment)return;r.endSegment=f;r=r.parentScope}else return}if(!r)return c}},t.calculateLocalsMapping=function(i,r){var e,o,l;if(i&&i.version===3&&i.names&&i.names.length!==0&&typeof i.x_ms_locals=="string"&&i.x_ms_scopes.length!==0&&r&&r.length!==0)for(var s=i.names,f=i.x_ms_locals,y=f.length,a=0,h=r[a],u=0,v=f.length,c=0;u<v;){if(e=n.Base64VLQFormat.decode(f,u),!e)return;if(u+=e.charsRead,o=n.Base64VLQFormat.decode(f,u),o?(h.localsMap[s[c+=e.value]]=s[c+=o.value],u+=o.charsRead):h.localsMap[s[c+=e.value]]=null,u>=v)break;if(l=f.charAt(u++),l===t.ScopeOrLineDelimiter)h=r[++a];else if(l!==t.SegmentDelimiter)return}},t.parseMapContent=function(n){var i=null,t;try{n.substr(0,4)===")]}'"&&(t=n.indexOf("\n"),t>=0&&(n=n.slice(t+1)));i=JSON.parse(n)}catch(r){}return i},t.StartScopeSegmentDelimiter=">",t.EndScopeSegmentDelimiter="<",t.SegmentDelimiter=",",t.ScopeOrLineDelimiter=";",t}();n.SourcemapParser=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=sourcemapParser.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(n){"use strict";var t=function(){function t(t,i,r){F12.Tools.Utility.Assert.isTrue(t>=0,"Invalid start offset: "+t.toString());F12.Tools.Utility.Assert.isTrue(i>=t,"Invalid end offset: "+i.toString());this._data=new n.SourceSpanData;this._data.start=t;this._data.end=i;this._isScript=r;this._data.lineOffsets=[];this._data.generatedLineOffset=0;this._data.length=0;this._data.mappings=[]}return Object.defineProperty(t.prototype,"_mappings",{get:function(){return this._data.mappings},set:function(n){this._data.mappings=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"start",{get:function(){return this._data.start},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this._data.end},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isScript",{get:function(){return this._isScript},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"generatedLineOffset",{get:function(){return this._data.generatedLineOffset},set:function(n){F12.Tools.Utility.Assert.isTrue(n>=0,"offset is negative");this._data.generatedLineOffset=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lineOffsets",{get:function(){return this._data.lineOffsets},enumerable:!0,configurable:!0}),t.prototype.calculateLineOffsets=function(n){var i=0,t;for(this._data.lineOffsets=[],this._data.lineOffsets[i]=0,this._data.length=n.length,t=0;t<n.length;t++)n.charAt(t)==="\n"&&(this._data.lineOffsets[++i]=t+1);return i},t}();n.SourceSpanBuilder=t})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=sourceSpanBuilder.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var Common;(function(n){var t;(function(n){"use strict";var o=function(){function n(){this.generatedColumn=0;this.generatedLine=0;this.sourceColumn=0;this.sourceLine=0;this.file=0}return n}(),t,i,r,u,f,e;n.SourcemapMapping=o;t=function(){function n(n,t){this.line=n;this.column=t}return n}();n.SourceScopeSegment=t;i=function(){function n(n,t){t===void 0&&(t=null);this.startSegment=n;this.parentScope=t;this.initializeLocalsMap()}return Object.defineProperty(n.prototype,"parentScope",{get:function(){return this._parentScope},set:function(n){this._parentScope=n;this.initializeLocalsMap()},enumerable:!0,configurable:!0}),n.prototype.initializeLocalsMap=function(){this.localsMap=this.parentScope?Object.create(this.parentScope.localsMap):Object.create(null)},n}();n.SourceScope=i;r=function(){function n(){}return n}();n.SourceSpanData=r;u=function(){function n(){}return n}();n.WorkerSendMessage=u;f=function(){function n(){}return n}();n.WorkerResponseMessage=f;e=function(){function n(){}return n}();n.WorkerMappingSubsetResponseMessage=e})(t=n.FormatService||(n.FormatService={}))})(Common||(Common={}))
//# sourceMappingURL=workerMessaging.min.js.map
//
//! Copyright (C) Microsoft. All rights reserved.
//
/// <reference path="../../../../internalapis/bptoob/inc/1.00/Plugin.d.ts" />
// This file is created partly by copying the .d.ts file at http://monacotools/doc#Editor_TypeScript_API.
// That file has some mistakes and omissions, so this file is also edited by hand as needed.
// Some methods were commented out to introduce cut-off points
// in order to not bring in our entire TypeScript universe
// Define this as a separate module so it doesn't conflict with the actual Monaco module
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;
    var EndOfLinePreference = (function () {
        function EndOfLinePreference() {
        }
        EndOfLinePreference.TextDefined = 0;
        EndOfLinePreference.LF = 1;
        EndOfLinePreference.CRLF = 2;
        return EndOfLinePreference;
    })();
    MonacoDefinitions.EndOfLinePreference = EndOfLinePreference;
    var EventType = (function () {
        function EventType() {
        }
        EventType.ModelContentChanged = 'contentChanged';
        EventType.MouseMove = 'mousemove';
        return EventType;
    })();
    MonacoDefinitions.EventType = EventType;
})(MonacoDefinitions || (MonacoDefinitions = {}));
#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;
    }

.f12Glyph {
    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)}]*/
        border: TRANSPARENT solid 1px; /*[{plugin-tab-header-hover-background-color} solid 1px]*/
    }

    .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 .cursorDecoration {
        background-color: TRANSPARENT;
    }

    .monaco-editor.vs .cursorGlyph {
        background-color: TRANSPARENT;
        background-image: url("Cursor/images/currentLocationArrow.png"); /*[url({f12-debugger-image-cursor})]*/
        background-position-y: 2px;
        background-size: 14px 14px;
        margin-left: 2px;
    }

    .monaco-editor.vs .cursorGlyph.breakpointGlyph {
        background-color: TRANSPARENT;
        background-image: url("Cursor/images/currentLocationArrow.png"), url("Breakpoints/images/breakpointGlyph.png"); /*[url({f12-debugger-image-cursor}), url({f12-debugger-image-breakpoint})]*/
        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 .textSpotlightDecoration {
        background-color: TRANSPARENT; /*[{plugin-font-editor-text-spotlight-background-color}]*/
    }

    .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;
        }

/* Monaco editor overrides */
.monaco-editor.vs,
.monaco-editor.vs .zone-widget .monaco-editor.vs {
    font-family: Consolas, Nimsum, Monaco, Menlo, Consolas, "Droid Sans Mono", "Inconsolata", "Courier New", monospace; /*[{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: none !important;
        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 GoToLinePrompt */
    .monaco-editor.vs .quick-open-widget {
        background: TRANSPARENT; /*[{monaco-gotoline-background-color}]*/
    }

    .monaco-editor.vs .monaco-vtree.focused .rows > .row.focused:not(.highlighted) {
        background-color: TRANSPARENT; /*[{monaco-gotoline-focused-background-color}]*/
    }

    .monaco-editor.vs .monaco-vtree.focused .rows > .row.selected:not(.highlighted) {
        background-color: TRANSPARENT; /*[{monaco-gotoline-selected-background-color}]*/
    }

    .monaco-editor.vs .monaco-vtree .rows > .row:hover:not(.highlighted):not(.selected):not(.focused) {
        background-color: TRANSPARENT; /*[{monaco-gotoline-hover-background-color}]*/
    }

.monaco-editor .view-overlays.focused .selected-text {
    background: TRANSPARENT !important; /*[{plugin-editor-selected-text-focus-background-color} !important]*/
}

.monaco-editor .view-overlays .selected-text {
    background: TRANSPARENT !important; /*[{plugin-editor-selected-text-background-color} !important]*/
}

@media screen and (-ms-high-contrast: active) {
    .monaco-editor .view-overlays.focused .selected-text,
    .monaco-editor .view-overlays .selected-text,
    .monaco-editor .quick-open-widget .quick-open-tree .row.focused {
        border: TRANSPARENT solid 1px; /*[{plugin-tab-header-hover-background-color} solid 1px]*/
    }
}

.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("../common/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("../common/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("../common/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("../common/editor/vs/base/ui/scrollbar/impl/arrow-right.png"); /*[url({f12-debugger-image-editor-scroll-arrow-right})]*/
}

.monaco-editor.vs .lineHighlight {
    border: solid 1px TRANSPARENT; /*[solid 1px {plugin-highlight-border-color}]*/
}

.monaco-editor.vs .wordHighlight {
    background-color: TRANSPARENT; /*[{plugin-word-highlight-color rgba(0.35)}]*/
    border: solid 1px TRANSPARENT; /*[solid 1px {plugin-highlight-border-color}]*/
    animation-name: wordHighlightFadeIn;
    animation-duration: 0.2s;
}

@keyframes wordHighlightFadeIn {
    from {
        background-color: TRANSPARENT; /*[{plugin-font-editor-background-color}]*/
        border: solid 1px TRANSPARENT; /*[solid 1px {plugin-font-editor-background-color}]*/
    }

    to {
        background-color: TRANSPARENT; /*[{plugin-word-highlight-color rgba(0.35)}]*/
        border: solid 1px TRANSPARENT; /*[solid 1px {plugin-highlight-border-color}]*/
    }
}

.monaco-editor.vs .wordHighlightStrong {
    background-color: TRANSPARENT; /*[{plugin-word-highlight-strong-color rgba(0.7)}]*/
    border: dashed 1px TRANSPARENT; /*[dashed 1px {plugin-highlight-border-color}]*/
    animation-name: wordHighlightStrongFadeIn;
    animation-duration: 0.2s;
}

@keyframes wordHighlightStrongFadeIn {
    from {
        background-color: TRANSPARENT; /*[{plugin-font-editor-background-color}]*/
        border: dashed 1px TRANSPARENT; /*[dashed 1px {plugin-font-editor-background-color}]*/
    }

    to {
        background-color: TRANSPARENT; /*[{plugin-word-highlight-strong-color rgba(0.7)}]*/
        border: dashed 1px TRANSPARENT; /*[dashed 1px {plugin-highlight-border-color}]*/
    }
}

.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.xml {
        color: TRANSPARENT; /*[{plugin-font-editor-html-element-color}]*/
    }

    .monaco-editor.vs .token.attribute.value.xml {
        color: TRANSPARENT; /*[{plugin-font-editor-html-tag-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 r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);r.prototype=t.prototype,e.prototype=new r},_cssPluginGlobal=this,CSSLoaderPlugin;!function(e){var t=_cssPluginGlobal,r=function(){function e(){this._pendingLoads=0}return e.prototype.attachListeners=function(e,t,r,n){var o=function(){t.removeEventListener("load",i),t.removeEventListener("error",s)},i=function(){o(),r()},s=function(e){o(),n(e)};t.addEventListener("load",i),t.addEventListener("error",s)},e.prototype._onLoad=function(e,t){this._pendingLoads--,t()},e.prototype._onLoadError=function(e,t,r){this._pendingLoads--,t(r)},e.prototype._insertLinkNode=function(e){this._pendingLoads++;var t=document.head||document.getElementsByTagName("head")[0],r=t.getElementsByTagName("link")||document.head.getElementsByTagName("script");r.length>0?t.insertBefore(e,r[r.length-1]):t.appendChild(e)},e.prototype.createLinkTag=function(e,t,r,n){var o=this,i=document.createElement("link");i.setAttribute("rel","stylesheet"),i.setAttribute("type","text/css"),i.setAttribute("data-name",e);var s=function(){return o._onLoad(e,r)},a=function(t){return o._onLoadError(e,n,t)};return this.attachListeners(e,i,s,a),i.setAttribute("href",t),i},e.prototype._linkTagExists=function(e,t){var r,n,o,i,s=document.getElementsByTagName("link");for(r=0,n=s.length;n>r;r++)if(o=s[r].getAttribute("data-name"),i=s[r].getAttribute("href"),o===e||i===t)return!0;return!1},e.prototype.load=function(e,t,r,n){if(this._linkTagExists(e,t))return r(),void 0;var o=this.createLinkTag(e,t,r,n);this._insertLinkNode(o)},e}(),n=function(e){function t(){e.call(this),this._blockedLoads=[],this._mergeStyleSheetsTimeout=-1}return __extends(t,e),t.prototype.load=function(e,t,r,n){if(this._linkTagExists(e,t))return r(),void 0;var o=this.createLinkTag(e,t,r,n);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,r){e.prototype._onLoad.call(this,t,r),this._handleBlocked()},t.prototype._onLoadError=function(t,r,n){e.prototype._onLoadError.call(this,t,r,n),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,r,n){for(var o=n.rules.length-1;o>=0;o--)t.insertRule(a.rewriteUrls(r,e,n.rules[o].cssText),0)},t.prototype._mergeStyleSheets=function(){this._mergeStyleSheetsTimeout=-1;var e,t=this._blockedLoads.length,r=document.getElementsByTagName("link"),n=r.length,o=[];for(e=0;n>e;e++)("loaded"===r[e].readyState||"complete"===r[e].readyState)&&o.push({linkNode:r[e],rulesLength:r[e].styleSheet.rules.length});var i=o.length,s=Math.min(Math.floor(i/2),t);o.sort(function(e,t){return t.rulesLength-e.rulesLength});var a,u;for(e=0;s>e;e++)a=o.length-1-e,u=e%(o.length-s),this._mergeStyleSheet(o[u].linkNode.href,o[u].linkNode.styleSheet,o[a].linkNode.href,o[a].linkNode.styleSheet),o[a].linkNode.parentNode.removeChild(o[a].linkNode),n--;for(var l=this._styleSheetCount();31>l&&this._blockedLoads.length>0;)this._insertLinkNode(this._blockedLoads.shift()),l++},t}(r),o=function(e){function t(){e.call(this)}return __extends(t,e),t.prototype.attachListeners=function(e,t,r){t.onload=function(){t.onload=null,r()}},t}(n),i=function(){function e(){this.fs=require.nodeRequire("fs")}return e.prototype.load=function(t,r,n){var o=this.fs.readFileSync(r,"utf8");o.charCodeAt(0)===e.BOM_CHAR_CODE&&(o=o.substring(1)),n(o)},e.BOM_CHAR_CODE=65279,e}(),s=function(){function e(e){this.cssLoader=e}return e.prototype.load=function(t,r,n,o){o=o||{};var i=r.toUrl(t+".css");this.cssLoader.load(t,i,function(r){o.isBuild&&(e.BUILD_MAP[t]=r),n({})},function(){"function"==typeof n.error&&n.error("Could not find "+i+" or it was empty")})},e.prototype.write=function(r,n,o){var i=o.getEntryPoint();t.entryPoints=t.entryPoints||{},t.entryPoints[i]=t.entryPoints[i]||[],t.entryPoints[i].push({moduleName:n,contents:e.BUILD_MAP[n]}),o.asModule(r+"!"+n,"define(['vs/css!"+i+"'], {});")},e.prototype.writeFile=function(e,r,n,o){if(t.entryPoints&&t.entryPoints.hasOwnProperty(r)){for(var i=n.toUrl(r+".css"),s=["/*---------------------------------------------------------"," * Copyright (C) Microsoft Corporation. All rights reserved."," *--------------------------------------------------------*/"],u=t.entryPoints[r],l=0;l<u.length;l++)s.push(a.rewriteUrls(u[l].moduleName,r,u[l].contents));o(i,s.join("\r\n"))}},e.BUILD_MAP={},e}();e.CSSPlugin=s;var a=function(){function e(){}return e.startsWith=function(e,t){return e.length>=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,r){function n(t,r){return e.startsWith(t,r)?Math.max(r.length,t.indexOf("/",r.length)):0}function o(e,t){if("./"!==t){if("../"===t){var r=e.length>0?e[e.length-1]:null;if(r&&"/"===r)return;if(r&&"../"!==r)return e.pop(),void 0}e.push(t)}}function i(e,t){for(;t.length>0;){var r=t.indexOf("/"),n=r>=0?t.substring(0,r+1):t;t=r>=0?t.substring(r+1):"",o(e,n)}}var s=0;s=s||n(t,"//"),s=s||n(t,"http://"),s=s||n(t,"https://");var a=[];return i(a,t.substr(s)),r.length>0&&"/"===r.charAt(0)&&(a=[]),i(a,r),t.substring(0,s)+a.join("")},e.commonPrefix=function(e,t){for(var r=Math.min(e.length,t.length),n=0;r>n&&e.charCodeAt(n)===t.charCodeAt(n);n++);return e.substring(0,n)},e.commonFolderPrefix=function(t,r){var n=e.commonPrefix(t,r),o=n.lastIndexOf("/");return-1===o?"":n.substring(0,o+1)},e.relativePath=function(t,r){if(e.startsWith(r,"/")||e.startsWith(r,"http://")||e.startsWith(r,"https://"))return r;var n=e.commonFolderPrefix(t,r);t=t.substr(n.length),r=r.substr(n.length);for(var o=t.split("/").length,i="",s=1;o>s;s++)i+="../";return i+r},e.rewriteUrls=function(t,r,n){return n.replace(/url\(\s*([^\)]+)\s*\)?/g,function(){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];var i=n[0];for(('"'===i.charAt(0)||"'"===i.charAt(0))&&(i=i.substring(1));i.length>0&&(" "===i.charAt(i.length-1)||"	"===i.charAt(i.length-1));)i=i.substring(0,i.length-1);if(('"'===i.charAt(i.length-1)||"'"===i.charAt(i.length-1))&&(i=i.substring(0,i.length-1)),!e.startsWith(i,"data:")&&!e.startsWith(i,"http://")&&!e.startsWith(i,"https://")){var s=e.joinPaths(e.pathOf(t),i);i=e.relativePath(r,s)}return"url("+i+")"})},e}();e.Utilities=a,function(){var e=null,t="undefined"!=typeof process&&"undefined"!=typeof process.versions&&"undefined"!=typeof process.versions["atom-shell"];e="undefined"!=typeof process&&process.versions&&process.versions.node&&!t?new i:navigator.userAgent.indexOf("MSIE 9")>=0?new n:navigator.userAgent.indexOf("MSIE 8")>=0?new o:new r,define("vs/css",new s(e))}()}(CSSLoaderPlugin||(CSSLoaderPlugin={}));/*!---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
"use strict";var _amdLoaderGlobal=this,define,AMDLoader;!function(e){function t(){p="function"==typeof E.importScripts,d="undefined"!=typeof process&&"undefined"!=typeof process.versions&&"undefined"!=typeof process.versions["atom-shell"],h="undefined"!=typeof module&&!!module.exports,m=p?new g(new y):h?new g(new _):new g(new v),f=new u(m),m.setModuleManager(f)}function n(){h||(E.console||(E.console={}),E.console.log||(E.console.log=function(){}),E.console.warn||(E.console.warn=E.console.log),E.console.error||(E.console.error=E.console.log))}function r(){p||h||(window.onload=function(){var e,t,n,r=document.getElementsByTagName("script");for(e=0,t=r.length;t>e&&!(n=r[e].getAttribute("data-main"));e++);n&&f.defineModule(o.generateAnonymousModule(),[n],null,null,new c(new a,""))})}function i(){t(),n(),r(),h&&(E.nodeRequire=E.require),h&&!d?module.exports=T:("undefined"!=typeof E.require&&"function"!=typeof E.require&&T.config(E.require),d?define=function(){b.apply(null,arguments)}:E.define=b,E.require=T,E.require.__$__nodeRequire=E.nodeRequire)}var o=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.containsQueryString=function(e){return e.indexOf("?")>=0},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}(),s=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),e.detail&&e.detail.stack&&console.error(e.detail.stack),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),e.detail&&e.detail.stack&&console.error(e.detail.stack),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={}),"object"!=typeof e.config&&(e.config={}),"undefined"==typeof e.catchError&&(e.catchError=p),"string"!=typeof e.urlArgs&&(e.urlArgs=""),"function"!=typeof e.onError&&(e.onError=t),"object"==typeof e.ignoreDuplicateModules&&o.isArray(e.ignoreDuplicateModules)||(e.ignoreDuplicateModules=[]),e.baseUrl.length>0&&(o.endsWith(e.baseUrl,"/")||(e.baseUrl+="/")),e},e.mergeConfigurationOptions=function(t,n){void 0===t&&(t=null),void 0===n&&(n=null);var r=o.recursiveClone(n||{});return o.forEachProperty(t,function(e,t){"bundles"===e&&"undefined"!=typeof r.bundles?o.isArray(t)?r.bundles=r.bundles.concat(t):o.forEachProperty(t,function(e,t){var n={location:e,modules:t};r.bundles.push(n)}):"ignoreDuplicateModules"===e&&"undefined"!=typeof r.ignoreDuplicateModules?r.ignoreDuplicateModules=r.ignoreDuplicateModules.concat(t):"paths"===e&&"undefined"!=typeof r.paths?o.forEachProperty(t,function(e,t){return r.paths[e]=t}):"shim"===e&&"undefined"!=typeof r.shim?o.forEachProperty(t,function(e,t){return r.shim[e]=t}):"config"===e&&"undefined"!=typeof r.config?o.forEachProperty(t,function(e,t){return r.config[e]=t}):r[e]=o.recursiveClone(t)}),e.validateConfigurationOptions(r)},e}();e.ConfigurationOptionsUtil=s;var a=function(){function e(e){if(this.options=s.mergeConfigurationOptions(e),this._createIgnoreDuplicateModulesMap(),this._createSortedPathsRules(),this._createShimModules(),this._createOverwriteModuleIdToPath(),""===this.options.baseUrl){if(h&&this.options.nodeRequire&&this.options.nodeRequire.main&&this.options.nodeRequire.main.filename){var t=this.options.nodeRequire.main.filename,n=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));this.options.baseUrl=t.substring(0,n+1)}if(h&&this.options.nodeMain){var t=this.options.nodeMain,n=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));this.options.baseUrl=t.substring(0,n+1)}}}return e.prototype._createOverwriteModuleIdToPath=function(){this.overwriteModuleIdToPath={};for(var e=0;e<this.options.bundles.length;e++){var t=this.options.bundles[e],n=t.location;if(t.modules)for(var r=0;r<t.modules.length;r++)this.overwriteModuleIdToPath[t.modules[r]]=n}},e.prototype._createIgnoreDuplicateModulesMap=function(){this.ignoreDuplicateModulesMap={};for(var e=0;e<this.options.ignoreDuplicateModules.length;e++)this.ignoreDuplicateModulesMap[this.options.ignoreDuplicateModules[e]]=!0},e.prototype._createSortedPathsRules=function(){var e=this;this.sortedPathsRules=[],o.forEachProperty(this.options.paths,function(t,n){o.isArray(n)?e.sortedPathsRules.push({from:t,to:n}):e.sortedPathsRules.push({from:t,to:[n]})}),this.sortedPathsRules.sort(function(e,t){return t.from.length-e.from.length})},e.prototype._ensureShimModule1=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];this.shimModules.hasOwnProperty(r)||this._ensureShimModule1(r,[])}this.shimModules[e]={dependencies:t,callback:null}},e.prototype._ensureShimModule2=function(e,t){this.shimModules[e]={dependencies:t.deps||[],callback:function(){for(var e=[],n=0;n<arguments.length;n++)e[n-0]=arguments[n];if("function"==typeof t.init){var r=t.init.apply(E,e);if("undefined"!=typeof r)return r}if("function"==typeof t.exports)return t.exports.apply(E,e);if("string"==typeof t.exports){for(var i=t.exports.split("."),o=E,s=0;s<i.length;s++)o&&(o=o[i[s]]);return o}return t.exports||{}}}},e.prototype._createShimModules=function(){var e=this;this.shimModules={},o.forEachProperty(this.options.shim,function(t,n){return n?o.isArray(n)?(e._ensureShimModule1(t,n),void 0):(e._ensureShimModule2(t,n),void 0):void 0})},e.prototype.cloneAndMerge=function(t){return new e(s.mergeConfigurationOptions(t,this.options))},e.prototype.getOptionsLiteral=function(){return this.options},e.prototype._applyPaths=function(e){for(var t,n=0,r=this.sortedPathsRules.length;r>n;n++)if(t=this.sortedPathsRules[n],o.startsWith(e,t.from)){for(var i=[],s=0,a=t.to.length;a>s;s++)i.push(t.to[s]+e.substr(t.from.length));return i}return[e]},e.prototype._addUrlArgsToUrl=function(e){var t=e.indexOf("?")>=0;return t?e+"&"+this.options.urlArgs:e+"?"+this.options.urlArgs},e.prototype._addUrlArgsIfNecessaryToUrl=function(e){return this.options.urlArgs?this._addUrlArgsToUrl(e):e},e.prototype._addUrlArgsIfNecessaryToUrls=function(e){if(this.options.urlArgs)for(var t=0,n=e.length;n>t;t++)e[t]=this._addUrlArgsToUrl(e[t]);return e},e.prototype.moduleIdToPaths=function(e){var t=e;this.overwriteModuleIdToPath.hasOwnProperty(t)&&(t=this.overwriteModuleIdToPath[t]);var n;if(o.endsWith(t,".js")||o.isAbsolutePath(t))n=[t];else{n=this._applyPaths(t);for(var r=0,i=n.length;i>r;r++)o.isAbsolutePath(n[r])||(n[r]=this.options.baseUrl+n[r]),o.endsWith(n[r],".js")||o.containsQueryString(n[r])||(n[r]=n[r]+".js")}return this._addUrlArgsIfNecessaryToUrls(n)},e.prototype.requireToUrl=function(e){var t=e;return o.isAbsolutePath(t)||(t=this._applyPaths(t)[0],o.isAbsolutePath(t)||(t=this.options.baseUrl+t)),this._addUrlArgsIfNecessaryToUrl(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.getConfigForModule=function(e){return this.options.config?this.options.config[e]:void 0},e.prototype.shouldCatchError=function(){return this.options.catchError},e.prototype.onError=function(e){this.options.onError(e)},e}();e.Configuration=a;var c=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;n<t.length;n++)"."===t[n]||""===t[n]?(t.splice(n,1),n--):n>0&&".."===t[n]&&".."!==t[n-1]&&(t.splice(n-1,2),n-=2);return t.join("/")},e.prototype.resolveModule=function(e){var t=e;return o.isAbsolutePath(t)||(o.startsWith(t,"./")||o.startsWith(t,"../"))&&(t=this._normalizeModuleId(this.fromModulePath+t)),t},e.prototype.moduleIdToPaths=function(e){var t=this._config.moduleIdToPaths(e);return h&&-1===e.indexOf("/")&&t.push("node|"+this.fromModulePath+"|"+e),t},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=c;var l=function(){function e(e,t,n,r,i,o){this._id=e,this._dependencies=t,this._dependenciesValues=[],this._callback=n,this._errorback=r,this._moduleIdResolver=i,this._exports={},this._exportsPassedIn=!1,this._config=o,this._digestDependencies(),0===this._unresolvedDependenciesCount&&this._complete()}return e.prototype._digestDependencies=function(){var e=this;this._unresolvedDependenciesCount=this._dependencies.length,this._managerDependencies=[],this._managerDependenciesMap={};var t,n,r;for(t=0,n=this._dependencies.length;n>t;t++)if(r=this._dependencies[t])if("exports"===r)this._exportsPassedIn=!0,this._dependenciesValues[t]=this._exports,this._unresolvedDependenciesCount--;else if("module"===r)this._dependenciesValues[t]={id:this._id,config:function(){return e._config}},this._unresolvedDependenciesCount--;else if("require"===r)this.addManagerDependency(r,t);else{var i=r.indexOf("!");if(i>=0){var o=r.substring(0,i),s=r.substring(i+1,r.length);r=this._moduleIdResolver.resolveModule(o)+"!"+s}else r=this._moduleIdResolver.resolveModule(r);this.addManagerDependency(r,t)}else console.warn("Please check module "+this._id+", the dependency list looks broken"),this._dependenciesValues[t]=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,t=null;if(this._moduleIdResolver.shouldCatchError())try{t=this._callback.apply(E,this._dependenciesValues)}catch(n){e=n}else t=this._callback.apply(E,this._dependenciesValues);return{returnedValue:t,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&&!o.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=l;var u=function(){function e(e){this._config=new a,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(void 0===i&&(i=new c(this._config,e)),this._modules.hasOwnProperty(e))return this._config.isDuplicateMessageIgnoredFor(e)||console.warn("Duplicate definition of module '"+e+"'"),void 0;var o=this._config.getConfigForModule(e),s=new l(e,t,n,r,i,o);this._modules[e]=s,this._resolve(s)},e.prototype._relativeRequire=function(e,t,n,r){return"string"==typeof t?this.synchronousRequire(t,e):(this.defineModule(o.generateAnonymousModule(),t,n,r,e),void 0)},e.prototype.synchronousRequire=function(e,t){void 0===t&&(t=new c(this._config,e));var n=t.resolveModule(e),r=n.indexOf("!");if(r>=0){var i=n.substring(0,r),o=n.substring(r+1,n.length),s={};this._modules.hasOwnProperty(i)&&(s=this._modules[i]);var a=function(e){return t.resolveModule(e)};o="function"==typeof s.normalize?s.normalize(o,a):a(o),n=i+"!"+o}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 l=this._modules[n];if(!l.isComplete())throw new Error("Check dependency list! Synchronous require cannot resolve module '"+n+"'. This module has not been resolved completely yet.");return l.getExports()},e.prototype.configure=function(e,t){this._config=t?new a(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!"),console.warn(t.callback)):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={},o=!1,s=[];for(s.push(e),i[e]=!0;s.length>0;)if(n=s.shift(),this._modules[n]&&(o=this._modules[n].onDependencyError(r)||o),this._inverseDependencies[n])for(var a=0,c=this._inverseDependencies[n].length;c>a;a++)i.hasOwnProperty(this._inverseDependencies[n][a])||(s.push(this._inverseDependencies[n][a]),i[this._inverseDependencies[n][a]]=!0);o||this._config.onError(r)},e.prototype._onModuleComplete=function(e,t){var n,r,i,s;if(delete this._dependencies[e],this._inverseDependencies.hasOwnProperty(e)){var a=this._inverseDependencies[e];for(delete this._inverseDependencies[e],n=0,r=a.length;r>n;n++)i=a[n],s=this._modules[i],s.resolveDependency(e,t),s.isComplete()&&this._onModuleComplete(i,s.getExports())}if(this._inversePluginDependencies.hasOwnProperty(e)){var c=this._inversePluginDependencies[e];for(delete this._inversePluginDependencies[e],n=0,r=c.length;r>n;n++){var l=c[n].moduleId,u=this._modules[l];this._resolvePluginDependencySync(l,c[n].dependencyId,t),u.isComplete()&&this._onModuleComplete(l,u.getExports())}}o.isAnonymousModule(e)?(delete this._modules[e],delete this._dependencies[e]):this._modules[e].cleanUp()},e.prototype._hasDependencyPath=function(e,t){var n,r,i,o,s,a={},c=[];for(c.push(e),a[e]=!0;c.length>0;)if(i=c.shift(),this._dependencies.hasOwnProperty(i))for(o=this._dependencies[i],n=0,r=o.length;r>n;n++){if(s=o[n],s===t)return!0;a.hasOwnProperty(s)||(a[s]=!0,c.push(s))}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],o=0,s=i.length;s>o;o++)if(r=this._findCyclePath(i[o],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],o=i.getModuleIdResolver(),s=t.indexOf("!"),a=t.substring(0,s),c=t.substring(s+1,t.length),l=function(e){return o.resolveModule(e)};if(c="function"==typeof n.normalize?n.normalize(c,l):l(c),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(c,this._createRequire(o),u,this._config.getOptionsLiteral())}else{var p=t;t=a+"!"+c,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(c,r._createRequire(o),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 r=this._config.getShimmedModuleDefine(t);r.dependencies.length>0?this.defineModule(o.generateAnonymousModule(),r.dependencies,function(){return n(t)},null,new c(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 o,s=this._modules.hasOwnProperty(t)?this._modules[t]:null;s&&s.isExportsPassedIn()&&(o=s.getExports()),r.resolveDependency(t,o)}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++;var r=e.moduleIdToPaths(t),i=-1,o=function(e){i++,i>=r.length?n._onLoadError(t,e):n._scriptLoader.load(r[i],function(){return n._onLoad(t)},o)};o(null)},e.prototype._resolve=function(e){var t,n,r,i,o,s,a=this;r=e.getId(),i=e.getDependencies(),s=e.getModuleIdResolver(),this._dependencies[r]=[];var c=function(e){return a._loadModule(s,e)};for(t=0,n=i.length;n>t;t++)o=i[t],"require"!==o?o.indexOf("!")>=0?this._resolvePluginDependency(r,o):this._resolveDependency(r,o,c):e.resolveDependency(o,this._createRequire(s));e.isComplete()&&this._onModuleComplete(r,e.getExports())},e}();e.ModuleManager=u;var p,d,h,m,f,g=function(){function e(e){this.actualScriptLoader=e,this.callbackMap={}}return e.prototype.setModuleManager=function(e){this.actualScriptLoader.setModuleManager(e)},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<t.length;n++)t[n].callback()},e.prototype.triggerErrorback=function(e,t){var n=this.callbackMap[e];delete this.callbackMap[e];for(var r=0;r<n.length;r++)n[r].errorback(t)},e}(),v=function(){function e(){}return e.prototype.attachListenersV1=function(e,t,n){var r=function(){e.detachEvent("onreadystatechange",i),e.addEventListener&&e.removeEventListener("error",o)},i=function(){("loaded"===e.readyState||"complete"===e.readyState)&&(r(),t())},o=function(e){r(),n(e)};e.attachEvent("onreadystatechange",i),e.addEventListener&&e.addEventListener("error",o)},e.prototype.attachListenersV2=function(e,t,n){var r=function(){e.removeEventListener("load",i),e.removeEventListener("error",o)},i=function(){r(),t()},o=function(e){r(),n(e)};e.addEventListener("load",i),e.addEventListener("error",o)},e.prototype.setModuleManager=function(){},e.prototype.load=function(e,t,n){var r=document.createElement("script");r.setAttribute("async","async"),r.setAttribute("type","text/javascript"),E.attachEvent?this.attachListenersV1(r,t,n):this.attachListenersV2(r,t,n),r.setAttribute("src",e),document.getElementsByTagName("head")[0].appendChild(r)},e}(),y=function(){function e(){this.loadCalls=[],this.loadTimeout=-1}return e.prototype.setModuleManager=function(){},e.prototype.load=function(e,t,n){var r=this;this.loadCalls.push({scriptSrc:e,callback:t,errorback:n}),navigator.userAgent.indexOf("Firefox")>=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(o){for(i=!0,t=0;n>t;t++)e[t].errorback(o)}if(!i)for(t=0;n>t;t++)e[t].callback()},e}(),_=function(){function e(){this._initialized=!1}return e.prototype.setModuleManager=function(e){this._moduleManager=e},e.prototype._init=function(e){this._initialized||(this._initialized=!0,this._fs=e("fs"),this._vm=e("vm"),this._path=e("path"))},e.prototype.load=function(t,n,r){var i=this,o=this._moduleManager.getConfigurationOptions(),s=o.nodeRequire||E.nodeRequire;if(this._init(s),/^node\|/.test(t)){var a=t.split("|"),c=null;try{c=s(a[2])}catch(l){return r(l),void 0}this._moduleManager.enqueueDefineAnonymousModule([],function(){return c}),n()}else/^file:\/\//.test(t)&&(t=t.substr(7)),this._fs.readFile(t,{encoding:"utf8"},function(o,s){if(o)return r(o),void 0;var a=i._path.normalize(t);if(d){var c=a.match(/^([a-z])\:(.*)/);c&&(a=c[1].toUpperCase()+":"+c[2]),a="file:///_MAIN:"+a.replace(/\\/g,"/")}var l,u="(function (require, define, __filename, __dirname) { ",p="\n});";l=s.charCodeAt(0)===e._BOM?u+s.substring(1)+p:u+s+p;var h=i._vm.runInThisContext(l,a,!0);h.call(E,T,b,a,i._path.dirname(t)),n()})},e._BOM=65279,e}(),b=function(){function e(e,t,n){"string"!=typeof e&&(n=t,t=e,e=null),"object"==typeof t&&o.isArray(t)||(n=t,t=null),t||(t=["require","exports","module"]),e?f.enqueueDefineModule(e,t,n):f.enqueueDefineAnonymousModule(t,n)}return e.amd={jQuery:!0},e}(),T=function(){function e(){if(1===arguments.length){if(arguments[0]instanceof Object&&!o.isArray(arguments[0]))return e.config(arguments[0]),void 0;if("string"==typeof arguments[0])return f.synchronousRequire(arguments[0])}if((2===arguments.length||3===arguments.length)&&o.isArray(arguments[0]))return f.defineModule(o.generateAnonymousModule(),arguments[0],arguments[1],arguments[2]),void 0;throw new Error("Unrecognized require call")}return e.config=function(e,t){void 0===t&&(t=!1),f.configure(e,t)},e.getConfig=function(){return f.getConfigurationOptions()},e.reset=function(){f=new u(m),m.setModuleManager(f)},e}(),E=_amdLoaderGlobal;"function"==typeof E.define&&E.define.amd||i()}(AMDLoader||(AMDLoader={})),/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
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<arguments.length-2;i++)r[i]=arguments[i+2];return t(n,r)}var i=e.Plugin&&e.Plugin.Resources?e.Plugin.Resources:void 0,o="i-default";define("vs/nls",{load:function(e,s,a,c){if(c=c||{},!e||0===e.length||c.isBuild)a({localize:r});else{var l;if(i)l=".nls.keys",s([e+l],function(e){a({localize:function(t,n){if(!e[t])return"NLS error: unkown key "+t;var r=e[t].keys;if(n>=r.length)return"NLS error unknow index "+n;var o=r[n],s=[];s[0]=t+"_"+o;for(var a=0;a<arguments.length-2;a++)s[a+1]=arguments[a+2];return i.getString.apply(i,s)}})});else{var u=c["vs/nls"]||{},p=u.availableLanguages?n(u.availableLanguages,e):null;l=".nls",null!==p&&p!==o&&(l=l+"."+p),/*s([e+l],function(e){*/a({localize:function(n,r){var e = []; for(var i=[],o=0;o<arguments.length-2;o++)i[o]=arguments[o+2];if(!e[n])return"NLS error: unkown key "+n;var s=e[n];return r>=s.length?"NLS error unknow index "+r:t(s[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",o),t.removeEventListener("error",s)},o=function(){i(),n()},s=function(e){i(),r(e)};t.addEventListener("load",o),t.addEventListener("error",s)},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,o=document.createElement("link");o.setAttribute("rel","stylesheet"),o.setAttribute("type","text/css"),o.setAttribute("data-name",e);var s=function(){return i._onLoad(e,n)},a=function(t){return i._onLoadError(e,r,t)};return this.attachListeners(e,o,s,a),o.setAttribute("href",t),o},e.prototype._linkTagExists=function(e,t){var n,r,i,o,s=document.getElementsByTagName("link");for(n=0,r=s.length;r>n;n++)if(i=s[n].getAttribute("data-name"),o=s[n].getAttribute("href"),i===e||o===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 o=i.length,s=Math.min(Math.floor(o/2),t);i.sort(function(e,t){return t.rulesLength-e.rulesLength});var a,c;for(e=0;s>e;e++)a=i.length-1-e,c=e%(i.length-s),this._mergeStyleSheet(i[c].linkNode.href,i[c].linkNode.styleSheet,i[a].linkNode.href,i[a].linkNode.styleSheet),i[a].linkNode.parentNode.removeChild(i[a].linkNode),r--;for(var l=this._styleSheetCount();31>l&&this._blockedLoads.length>0;)this._insertLinkNode(this._blockedLoads.shift()),l++},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),o=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}(),s=function(){function e(e){this.cssLoader=e}return e.prototype.load=function(t,n,r,i){i=i||{};var o=n.toUrl(t+".css");this.cssLoader.load(t,o,function(n){i.isBuild&&(e.BUILD_MAP[t]=n),r({})},function(){"function"==typeof r.error&&r.error("Could not find "+o+" or it was empty")})},e.prototype.write=function(n,r,i){var o=i.getEntryPoint();t.entryPoints=t.entryPoints||{},t.entryPoints[o]=t.entryPoints[o]||[],t.entryPoints[o].push({moduleName:r,contents:e.BUILD_MAP[r]}),i.asModule(n+"!"+r,"define(['vs/css!"+o+"'], {});")},e.prototype.writeFile=function(e,n,r,i){if(t.entryPoints&&t.entryPoints.hasOwnProperty(n)){for(var o=r.toUrl(n+".css"),s=["/*---------------------------------------------------------"," * Copyright (C) Microsoft Corporation. All rights reserved."," *--------------------------------------------------------*/"],c=t.entryPoints[n],l=0;l<c.length;l++)s.push(a.rewriteUrls(c[l].moduleName,n,c[l].contents));i(o,s.join("\r\n"))}},e.BUILD_MAP={},e}();e.CSSPlugin=s;var a=function(){function e(){}return e.startsWith=function(e,t){return e.length>=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 o(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 s=0;s=s||r(t,"//"),s=s||r(t,"http://"),s=s||r(t,"https://");var a=[];return o(a,t.substr(s)),n.length>0&&"/"===n.charAt(0)&&(a=[]),o(a,n),t.substring(0,s)+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,o="",s=1;i>s;s++)o+="../";return o+n},e.rewriteUrls=function(t,n,r){return r.replace(/url\(\s*([^\)]+)\s*\)?/g,function(){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var o=r[0];for(('"'===o.charAt(0)||"'"===o.charAt(0))&&(o=o.substring(1));o.length>0&&(" "===o.charAt(o.length-1)||"	"===o.charAt(o.length-1));)o=o.substring(0,o.length-1);if(('"'===o.charAt(o.length-1)||"'"===o.charAt(o.length-1))&&(o=o.substring(0,o.length-1)),!e.startsWith(o,"data:")&&!e.startsWith(o,"http://")&&!e.startsWith(o,"https://")){var s=e.joinPaths(e.pathOf(t),o);o=e.relativePath(n,s)}return"url("+o+")"})},e}();e.Utilities=a,function(){var e=null,t="undefined"!=typeof process&&"undefined"!=typeof process.versions&&"undefined"!=typeof process.versions["atom-shell"];e="undefined"!=typeof process&&process.versions&&process.versions.node&&!t?new o:navigator.userAgent.indexOf("MSIE 9")>=0?new r:navigator.userAgent.indexOf("MSIE 8")>=0?new i:new n,define("vs/css",new s(e))}()}(CSSLoaderPlugin||(CSSLoaderPlugin={}));var TextLoaderPlugin;!function(e){function t(e,t){var n=65279,r=e.readFileSync(t,"utf8");return r.charCodeAt(0)===n&&(r=r.substring(1)),r}var n=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||0===i.status&&i.responseText&&i.responseText.length>0?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}(),r=function(){function e(){this.fs=require.nodeRequire("fs")}return e.prototype.load=function(e,n,r){r(t(this.fs,n))},e}(),i=function(){function e(e){this.textLoader=e}return e.prototype.load=function(t,n,r,i){i=i||{};var o=i["vs/text"]||{},s=o.paths||{},a=t;for(var c in s)s.hasOwnProperty(c)&&0===t.indexOf(c)&&(a=s[c]+t.substr(c.length));var l=n.toUrl(a);this.textLoader.load(t,l,function(n){i.isBuild&&(e.BUILD_MAP[t]=n),r(n)},function(){"function"==typeof r.error&&r.error("Could not find "+l)})},e.prototype.write=function(t,n,r){if(e.BUILD_MAP.hasOwnProperty(n)){var i=o.escapeText(e.BUILD_MAP[n]);r('define("'+t+"!"+n+'", function () { return "'+i+'"; });')}},e.BUILD_MAP={},e}();e.TextPlugin=i;var o=function(){function e(){}return e.escapeText=function(e){for(var t,n="\b".charCodeAt(0),r="\f".charCodeAt(0),i="\n".charCodeAt(0),o=0,s="\r".charCodeAt(0),a="	".charCodeAt(0),c="".charCodeAt(0),l="\\".charCodeAt(0),u='"'.charCodeAt(0),p=0,d=null,h=[],m=0,f=e.length;f>m;m++){switch(t=e.charCodeAt(m)){case n:d="\\b";break;case r:d="\\f";break;case i:d="\\n";break;case o:d="\\0";break;case s:d="\\r";break;case a:d="\\t";break;case c:d="\\v";break;case l:d="\\\\";break;case u:d='\\"'}null!==d&&(h.push(e.substring(p,m)),h.push(d),p=m+1,d=null)}return h.push(e.substring(p,f)),h.join("")},e}();e.Utilities=o,function(){var e=null,t="undefined"!=typeof process&&"undefined"!=typeof process.versions&&"undefined"!=typeof process.versions["atom-shell"];e="undefined"!=typeof process&&process.versions&&process.versions.node&&!t?new r:new n,define("vs/text",new i(e))}()}(TextLoaderPlugin||(TextLoaderPlugin={})),define("vs/native",{load:function(e,t,n){var r=!0;if(r){var i=e;t([i],n,n.onError)}else{self.MonacoEnvironment.appRoot||n.onError(new Error("missing appRoot")),self.require.__$__nodeRequire||n.onError(new Error("missing __$__nodeRequire"));try{var o=self.require.__$__nodeRequire(self.MonacoEnvironment.appRoot+"/"+e)}catch(s){n.onError(s)}n(o)}}});!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<arguments.length-2;i++)r[i]=arguments[i+2];return t(n,r)}var i=e.Plugin&&e.Plugin.Resources?e.Plugin.Resources:void 0,o="i-default";define("vs/nls",{load:function(e,s,a,c){if(c=c||{},!e||0===e.length||c.isBuild)a({localize:r});else{var l;if(i)l=".nls.keys",s([e+l],function(e){a({localize:function(t,n){if(!e[t])return"NLS error: unkown key "+t;var r=e[t].keys;if(n>=r.length)return"NLS error unknow index "+n;var o=r[n],s=[];s[0]=t+"_"+o;for(var a=0;a<arguments.length-2;a++)s[a+1]=arguments[a+2];return i.getString.apply(i,s)}})});else{var u=c["vs/nls"]||{},p=u.availableLanguages?n(u.availableLanguages,e):null;l=".nls",null!==p&&p!==o&&(l=l+"."+p),s([e+l],function(e){a({localize:function(n,r){for(var i=[],o=0;o<arguments.length-2;o++)i[o]=arguments[o+2];if(!e[n])return"NLS error: unkown key "+n;var s=e[n];return r>=s.length?"NLS error unknow index "+r:t(s[r],i)}})})}}},localize:r})}(this);"use strict";define("vs/native",{load:function(e,t,n){var r=!0;if(r){var i=e;t([i],n,n.onError)}else{self.MonacoEnvironment.appRoot||n.onError(new Error("missing appRoot")),self.require.__$__nodeRequire||n.onError(new Error("missing __$__nodeRequire"));try{var o=self.require.__$__nodeRequire(self.MonacoEnvironment.appRoot+"/"+e)}catch(s){n.onError(s)}n(o)}}});"use strict";var TextLoaderPlugin;!function(e){function t(e,t){var n=65279,r=e.readFileSync(t,"utf8");return r.charCodeAt(0)===n&&(r=r.substring(1)),r}var n=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||0===i.status&&i.responseText&&i.responseText.length>0?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}(),r=function(){function e(){this.fs=require.nodeRequire("fs")}return e.prototype.load=function(e,n,r){r(t(this.fs,n))},e}(),i=function(){function e(e){this.textLoader=e}return e.prototype.load=function(t,n,r,i){i=i||{};var o=i["vs/text"]||{},s=o.paths||{},a=t;for(var c in s)s.hasOwnProperty(c)&&0===t.indexOf(c)&&(a=s[c]+t.substr(c.length));var l=n.toUrl(a);this.textLoader.load(t,l,function(n){i.isBuild&&(e.BUILD_MAP[t]=n),r(n)},function(){"function"==typeof r.error&&r.error("Could not find "+l)})},e.prototype.write=function(t,n,r){if(e.BUILD_MAP.hasOwnProperty(n)){var i=o.escapeText(e.BUILD_MAP[n]);r('define("'+t+"!"+n+'", function () { return "'+i+'"; });')}},e.BUILD_MAP={},e}();e.TextPlugin=i;var o=function(){function e(){}return e.escapeText=function(e){for(var t,n="\b".charCodeAt(0),r="\f".charCodeAt(0),i="\n".charCodeAt(0),o=0,s="\r".charCodeAt(0),a="	".charCodeAt(0),c="".charCodeAt(0),l="\\".charCodeAt(0),u='"'.charCodeAt(0),p=0,d=null,h=[],m=0,f=e.length;f>m;m++){switch(t=e.charCodeAt(m)){case n:d="\\b";break;case r:d="\\f";break;case i:d="\\n";break;case o:d="\\0";break;case s:d="\\r";break;case a:d="\\t";break;case c:d="\\v";break;case l:d="\\\\";break;case u:d='\\"'}null!==d&&(h.push(e.substring(p,m)),h.push(d),p=m+1,d=null)}return h.push(e.substring(p,f)),h.join("")},e}();e.Utilities=o,function(){var e=null,t="undefined"!=typeof process&&"undefined"!=typeof process.versions&&"undefined"!=typeof process.versions["atom-shell"];e="undefined"!=typeof process&&process.versions&&process.versions.node&&!t?new r:new n,define("vs/text",new i(e))}()}(TextLoaderPlugin||(TextLoaderPlugin={}));/*!---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
!function(){"use strict";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(r){self.postMessage(e.marshallObject(r))});for(self.onmessage=function(s){r.onmessage(e.demarshallObject(s.data))};s.length>0;)self.onmessage(s.shift())})}();<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<html>
<head>
	<script type="text/javascript">
		
		// Load native modules before the loader overwrites `require`
		var remote = require('remote');
		var ipc = require('ipc');
		var path = require('path');
		
	</script>
	<script type="text/javascript" src="../../loader.js"></script>	
	<script type="text/javascript">
		function hideWorker() {
			var currentWindow = remote.getCurrentWindow();
			if (currentWindow) {
				currentWindow.hide();
				currentWindow.closeDevTools();
			}
		}
		
		process.on('uncaughtException', function(err) {
			console.error('[uncaught exception]: ', err);
			if (err && err.stack) {
				console.log(err.stack);				
			}
			var currentWindow = remote.getCurrentWindow();
			currentWindow.show();
			currentWindow.openDevTools();
		});
		
		var root = path.resolve(path.join(__dirname, '..', '..', '..', '..'));
		require.config({
			paths: {
				'vs': 'client/vs'
			},
			baseUrl: root,
			catchError: true
		});
		window.isProcessWorker = true;
		
		function initializeWorker(payload) {
			var mainPid = payload.pid;
			setInterval(function() {
				try {
					// throws an exception if the main process doesn't exist anymore.
					process.kill(mainPid, 0);				
				} catch(e) {
					process.exit();					
				}
			}, 1000);
		}
		
		var beforeReadyMessages = [];
		var beforeReadyListener = function (msg) {
			beforeReadyMessages.push(msg);
		};
		var id = 'ProcessWorker-' + remote.getCurrentWindow().id;
		ipc.on(id, beforeReadyListener);
		
		require(['vs/base/worker/workerServer'], function(ws) {
			var workerServer = new ws.WorkerServer(function (msg) {
				ipc.send(id, ws.marshallObject(msg));
			});
			ipc.removeListener(id, beforeReadyListener);
			ipc.on(id, function(data) {
				var msg = ws.demarshallObject(data);
				if (msg.type === '$workerInitialize') {
					initializeWorker(msg.payload);
				} else {			
					workerServer.onmessage(msg)
				}
			});
			for(var i = 0; i < beforeReadyMessages.length; i++) {
				var msg = ws.demarshallObject(beforeReadyMessages[i]);
				if (msg.type === '$workerInitialize') {
					initializeWorker(msg.payload);
				} else {			
					workerServer.onmessage(msg);
				}
			}
			beforeReadyMessages = null;
		});
	</script>
</head>
<body>
	<h2>Separate process worker</h2>
	<input type="button" value="Hide Worker" onclick="hideWorker();">
</body>
</html><!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<html>
<head>
	
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	
	<script type="text/javascript">
		var beforeReadyMessages = [];
		var beforeReadyListener = function (message) {
			beforeReadyMessages.push(message.data);
		};
		if (window.attachEvent) {
			window.attachEvent('onmessage', beforeReadyListener);
		} else {
			window.onmessage = beforeReadyListener;
		}
	</script>
	<script type="text/javascript" src="../../loader.js"></script>
	<script>
	require.config({
		baseUrl: '../../../',
		catchError: true
	});
	
	require(['vs/base/worker/workerServer'], function(ws) {
		var workerServer = new ws.WorkerServer(function (msg) {
			window.parent.postMessage(ws.marshallObject(msg), '*'); 
		});
		window.isEmulatedWorker = true;
		
		var readyListener = function (ev) {
			workerServer.onmessage(ws.demarshallObject(ev.data));
		};
		if (window.attachEvent) {
			window.detachEvent('onmessage', beforeReadyListener);
			window.attachEvent('onmessage', readyListener);
		} else {
			window.onmessage = readyListener;
		}
		while(beforeReadyMessages.length > 0) {
			readyListener({ data: beforeReadyMessages.shift() });	
		}
	});
	</script>
</head>
<body>
	<div>compatibility worker iframe</div>
</body>
</html>
/*---------------------------------------------------------
 * 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="undefined"!=typeof process&&"function"==typeof process.nextTick?function(e){return process.nextTick(e)}:function(e){return setTimeout(e,0)})}(this),function(e,r){"use strict";function t(e,t){var n,i,o,s=Object.keys(t);for(i=0,o=s.length;o>i;i++){var a=s[i],u=95!==a.charCodeAt(0),c=t[a];!c||"object"!=typeof c||c.value===r&&"function"!=typeof c.get&&"function"!=typeof c.set?u?e[a]=c:(n=n||{},n[a]={value:c,enumerable:u,configurable:!0,writable:!0}):(c.enumerable===r&&(c.enumerable=u),n=n||{},n[a]=c)}n&&Object.defineProperties(e,n)}!function(r){function n(e,r,n){for(var i=e,o=r.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 n&&t(i,n),i}function i(r,t){return n(e,r,t)}e[r]||(e[r]=Object.create(Object.prototype));var o=e[r];o.Namespace||(o.Namespace=Object.create(Object.prototype)),Object.defineProperties(o.Namespace,{defineWithParent:{value:n,writable:!0,enumerable:!0,configurable:!0},define:{value:i,writable:!0,enumerable:!0,configurable:!0}})}("WinJS"),function(e){function r(r,n,i){return r=r||function(){},e.Utilities.markSupportedForProcessing(r),n&&t(r.prototype,n),i&&t(r,i),r}function n(n,i,o,s){if(n){i=i||function(){};var a=n.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&&t(i.prototype,o),s&&t(i,s),i}return r(i,o,s)}function i(e){e=e||function(){};var r,n;for(r=1,n=arguments.length;n>r;r++)t(e.prototype,arguments[r]);return e}e.Namespace.define("WinJS.Class",{define:r,derive:n,mix:i})}(e.WinJS)}(this),function(e,r){"use strict";function t(e){return e}function n(e,r,t){return e.split(".").reduce(function(e,r){return e?t(e[r]):null},r)}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}'"};r.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:n,getMember:function(r,i){return r?n(r,i||e,t):null},ready:function(t,n){return new r.Promise(function(i,o){function s(){if(t)try{t(),i()}catch(e){o(e)}else i()}var a=r.Utilities.testReadyState;a||(a=e.document?document.readyState:"complete"),"complete"===a||e.document&&null!==document.body?n?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(t){var n=!0;switch(n=n&&!(t===e),n=n&&!(t===e.location),n=n&&!(t instanceof HTMLIFrameElement),n=n&&!("function"==typeof t&&!t.supportedForProcessing),e.frames.length){case 0:break;case 1:n=n&&!(t===e.frames[0]);break;default:for(var i=0,s=e.frames.length;n&&s>i;i++)n=n&&!(t===e.frames[i])}if(n)return t;throw new r.ErrorFromName("WinJS.Utilities.requireSupportedForProcessing",r.Resources._formatString(o.notSupportedForProcessing,t))},configurable:!1,writable:!1,enumerable:!0}}),r.Namespace.define("WinJS",{validation:!1,strictProcessing:{value:function(){},configurable:!1,writable:!1,enumerable:!1}})}(this,this.WinJS),function(e){"use strict";function r(e,r,t){var n=e;return"function"==typeof n&&(n=n()),(t&&o.test(t)?"":t?t+": ":"")+(r?r.replace(i,":")+": ":"")+n}function t(r,t,n){var i=e.Utilities.formatLog(r,t,n);console[n&&o.test(n)?n:"log"](i)}function n(e){return e.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&")}var i=/\s+/g,o=/^(error|warn|info|log)$/;e.Namespace.define("WinJS.Utilities",{startLog:function(r){r=r||{},"string"==typeof r&&(r={tags:r});var o=r.type&&new RegExp("^("+n(r.type).replace(i," ").split(" ").join("|")+")$"),s=r.excludeTags&&new RegExp("(^|\\s)("+n(r.excludeTags).replace(i," ").split(" ").join("|")+")(\\s|$)","i"),a=r.tags&&new RegExp("(^|\\s)("+n(r.tags).replace(i," ").split(" ").join("|")+")(\\s|$)","i"),u=r.action||t;if(!(o||s||a||e.log))return e.log=u,void 0;var c=function(e,r,t){o&&!o.test(t)||s&&s.test(r)||a&&!a.test(r)||u(e,r,t),c.next&&c.next(e,r,t)};c.next=e.log,e.log=c},stopLog:function(){delete e.log},formatLog:r})}(this.WinJS),function(e){"use strict";function r(e){var r="_on"+e+"state";return{get:function(){var e=this[r];return e&&e.userHandler},set:function(t){var n=this[r];t?(n||(n={wrapper:function(e){return n.userHandler(e)},userHandler:t},Object.defineProperty(this,r,{value:n,enumerable:!1,writable:!0,configurable:!0}),this.addEventListener(e,n.wrapper,!1)),n.userHandler=t):n&&(this.removeEventListener(e,n.wrapper,!1),this[r]=null)},enumerable:!0}}function t(){for(var e={},t=0,n=arguments.length;n>t;t++){var i=arguments[t];e["on"+i]=r(i)}return e}var n=e.Class.define(function(e,r,t){this.detail=r,this.target=t,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,r,t){t=t||!1,this._listeners=this._listeners||{};for(var n=this._listeners[e]=this._listeners[e]||[],i=0,o=n.length;o>i;i++){var s=n[i];if(s.useCapture===t&&s.listener===r)return}n.push({listener:r,useCapture:t})},dispatchEvent:function(e,r){var t=this._listeners&&this._listeners[e];if(t){var i=new n(e,r,this);t=t.slice(0,t.length);for(var o=0,s=t.length;s>o&&!i._stopImmediatePropagationCalled;o++)t[o].listener(i);return i.defaultPrevented||!1}return!1},removeEventListener:function(e,r,t){t=t||!1;var n=this._listeners&&this._listeners[e];if(n)for(var i=0,o=n.length;o>i;i++){var s=n[i];if(s.listener===r&&s.useCapture===t){n.splice(i,1),0===n.length&&delete this._listeners[e];break}}}};e.Namespace.define("WinJS.Utilities",{_createEventProperty:r,createEventProperties:t,eventMixin:i})}(this.WinJS),function(e,r,t){"use strict";var n,i=!1,o="contextchanged",s=r.Class.mix(r.Class.define(null,{},{supportedForProcessing:!1}),r.Utilities.eventMixin),a=new s,u={malformedFormatStringInput:"Malformed, did you mean to escape your '{0}'?"};r.Namespace.define("WinJS.Resources",{addEventListener:function(e,t,n){if(r.Utilities.hasWinRT&&!i&&e===o)try{Windows.ApplicationModel.Resources.Core.ResourceManager.current.defaultContext.qualifierValues.addEventListener("mapchanged",function(e){r.Resources.dispatchEvent(o,{qualifier:e.key,changed:e.target[e.key]})},!1),i=!0}catch(s){}a.addEventListener(e,t,n)},removeEventListener:a.removeEventListener.bind(a),dispatchEvent:a.dispatchEvent.bind(a),_formatString:function(e){var t=arguments;return t.length>1&&(e=e.replace(/({{)|(}})|{(\d+)}|({)|(})/g,function(e,n,i,o,s,a){if(s||a)throw r.Resources._formatString(u.malformedFormatStringInput,s||a);return n&&"{"||i&&"}"||t[(0|o)+1]})),e},_getStringWinRT:function(e){if(!n){var r=Windows.ApplicationModel.Resources.Core.ResourceManager.current.mainResourceMap;try{n=r.getSubtree("Resources")}catch(i){}n||(n=r)}var o,s,a;try{a=n.getValue(e),a&&(o=a.valueAsString,o===t&&(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(r){var t=e.strings&&e.strings[r];return"string"==typeof t&&(t={value:t}),t||{value:r,empty:!0}}}),Object.defineProperties(r.Resources,r.Utilities.createEventProperties(o));var c;r.Resources.getString=function(e){return(c=c||(r.Utilities.hasWinRT?r.Resources._getStringWinRT:r.Resources._getStringJS))(e)}}(this,this.WinJS),function(e,r,t){"use strict";function n(){}function i(e,r){var t;t=r&&"object"==typeof r&&"function"==typeof r.then?A:j,e._value=r,e._setState(t)}function o(e,r,t,n,i,o){return{exception:e,error:r,promise:t,handler:o,id:n,parent:i}}function s(e,r,t,n){var i=t._isException,s=t._errorId;return o(i?r:null,i?null:r,e,s,t,n)}function a(e,r,t){var n=t._isException,i=t._errorId;return g(e,i,n),o(n?r:null,n?null:r,e,i,t)}function u(e,r){var t=++U;return g(e,t),o(null,r,e,t)}function c(e,r){var t=++U;return g(e,t,!0),o(r,null,e,t)}function l(e,r,t,n){v(e,{c:r,e:t,p:n})}function f(e,r,t,n){e._value=r,h(e,r,t,n),e._setState(z)}function p(e,r){var t=e._value,n=e._listeners;if(n){e._listeners=null;var i,o;for(i=0,o=Array.isArray(n)?n.length:1;o>i;i++){var s=1===o?n:n[i],a=s.c,u=s.promise;if(u){try{u._setCompleteValue(a?a(t):t)}catch(c){u._setExceptionValue(c)}u._state!==A&&u._listeners&&r.push(u)}else J.prototype.done.call(e,a)}}}function d(e,r){var t=e._value,n=e._listeners;if(n){e._listeners=null;var i,o;for(i=0,o=Array.isArray(n)?n.length:1;o>i;i++){var a=1===o?n:n[i],u=a.e,c=a.promise;if(c){try{u?(u.handlesOnError||h(c,t,s,e,u),c._setCompleteValue(u(t))):c._setChainedErrorValue(t,e)}catch(l){c._setExceptionValue(l)}c._state!==A&&c._listeners&&r.push(c)}else V.prototype.done.call(e,null,u)}}}function h(e,r,t,n,i){if(P._listeners[x]){if(r instanceof Error&&r.message===T)return;P.dispatchEvent(x,t(e,r,n,i))}}function m(e,r){var t=e._listeners;if(t){var n,i;for(n=0,i=Array.isArray(t)?t.length:1;i>n;n++){var o=1===i?t:t[n],s=o.p;if(s)try{s(r)}catch(a){}o.c||o.e||!o.promise||o.promise._progress(r)}}}function v(e,r){var t=e._listeners;t?(t=Array.isArray(t)?t:[t],t.push(r)):t=r,e._listeners=t}function g(e,r,t){e._isException=t||!1,e._errorId=r}function _(e,r,t,n){e._value=r,h(e,r,t,n),e._setState(N)}function b(e,r){var t;t=r&&"object"==typeof r&&"function"==typeof r.then?A:I,e._value=r,e._setState(t)}function y(e,r,t,n){var i=new q(e);return v(e,{promise:i,c:r,e:t,p:n}),i}function E(e){var t;return new r.Promise(function(r){e?t=setTimeout(r,e):setImmediate(r)},function(){t&&clearTimeout(t)})}function S(e,r){var t=function(){r.cancel()},n=function(){e.cancel()};return e.then(t),r.then(n,n),r}e.Debug&&(e.Debug.setNonUserCodeExceptions=!0);var w=r.Class.mix(r.Class.define(null,{},{supportedForProcessing:!1}),r.Utilities.eventMixin),P=new w;P._listeners={};var x="error",T="Canceled",O=!1,k={promise:1,thenPromise:2,errorPromise:4,exceptionPromise:8,completePromise:16};k.all=k.promise|k.thenPromise|k.errorPromise|k.exceptionPromise|k.completePromise;var C,M,A,L,W,R,j,I,z,N,U=1;C={name:"created",enter:function(e){e._setState(M)},cancel:n,done:n,then:n,_completed:n,_error:n,_notify:n,_progress:n,_setCompleteValue:n,_setErrorValue:n},M={name:"working",enter:n,cancel:function(e){e._setState(W)},done:l,then:y,_completed:i,_error:f,_notify:n,_progress:m,_setCompleteValue:b,_setErrorValue:_},A={name:"waiting",enter:function(e){var r=e._value,t=function(n){r._errorId?e._chainedError(n,r):(h(e,n,s,r,t),e._error(n))};t.handlesOnError=!0,r.then(e._completed.bind(e),t,e._progress.bind(e))},cancel:function(e){e._setState(L)},done:l,then:y,_completed:i,_error:f,_notify:n,_progress:m,_setCompleteValue:b,_setErrorValue:_},L={name:"waiting_canceled",enter:function(e){e._setState(R);var r=e._value;r.cancel&&r.cancel()},cancel:n,done:l,then:y,_completed:i,_error:f,_notify:n,_progress:m,_setCompleteValue:b,_setErrorValue:_},W={name:"canceled",enter:function(e){e._setState(R),e._cancelAction()},cancel:n,done:l,then:y,_completed:i,_error:f,_notify:n,_progress:m,_setCompleteValue:b,_setErrorValue:_},R={name:"canceling",enter:function(e){var r=new Error(T);r.name=r.message,e._value=r,e._setState(z)},cancel:n,done:n,then:n,_completed:n,_error:n,_notify:n,_progress:n,_setCompleteValue:n,_setErrorValue:n},j={name:"complete_notify",enter:function(e){if(e.done=J.prototype.done,e.then=J.prototype.then,e._listeners)for(var r,t=[e];t.length;)r=t.pop(),r._state._notify(r,t);e._setState(I)},cancel:n,done:null,then:null,_completed:n,_error:n,_notify:p,_progress:n,_setCompleteValue:n,_setErrorValue:n},I={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:p,_progress:n,_setCompleteValue:n,_setErrorValue:n},z={name:"error_notify",enter:function(e){if(e.done=V.prototype.done,e.then=V.prototype.then,e._listeners)for(var r,t=[e];t.length;)r=t.pop(),r._state._notify(r,t);e._setState(N)},cancel:n,done:null,then:null,_completed:n,_error:n,_notify:d,_progress:n,_setCompleteValue:n,_setErrorValue:n},N={name:"error",enter:function(e){e.done=V.prototype.done,e.then=V.prototype.then,e._cleanupAction()},cancel:n,done:null,then:null,_completed:n,_error:n,_notify:d,_progress:n,_setCompleteValue:n,_setErrorValue:n};var H,F=r.Class.define(null,{_listeners:null,_nextState:null,_state:null,_value:null,cancel:function(){this._state.cancel(this),this._run()},done:function(e,r,t){this._state.done(this,e,r,t)},then:function(e,r,t){return this._state.then(this,e,r,t)},_chainedError:function(e,r){var t=this._state._error(this,e,a,r);return this._run(),t},_completed:function(e){var r=this._state._completed(this,e);return this._run(),r},_error:function(e){var r=this._state._error(this,e,u);return this._run(),r},_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,r){var t=this._state._setErrorValue(this,e,a,r);return this._run(),t},_setExceptionValue:function(e){var r=this._state._setErrorValue(this,e,c);return this._run(),r},_run:function(){for(;this._nextState;)this._state=this._nextState,this._nextState=null,this._state.enter(this)}},{supportedForProcessing:!1}),q=r.Class.derive(F,function(e){O&&(O===!0||O&k.thenPromise)&&(this._stack=r.Promise._getStack()),this._creator=e,this._setState(C),this._run()},{_creator:null,_cancelAction:function(){this._creator&&this._creator.cancel()},_cleanupAction:function(){this._creator=null}},{supportedForProcessing:!1}),V=r.Class.define(function(e){O&&(O===!0||O&k.errorPromise)&&(this._stack=r.Promise._getStack()),this._value=e,h(this,e,u)},{cancel:function(){},done:function(e,r){var t=this._value;if(r)try{r.handlesOnError||h(null,t,s,this,r);var n=r(t);return n&&"object"==typeof n&&"function"==typeof n.done&&n.done(),void 0}catch(i){t=i}t instanceof Error&&t.message===T||setImmediate(function(){throw t})},then:function(e,r){if(!r)return this;var t,n=this._value;try{r.handlesOnError||h(null,n,s,this,r),t=new J(r(n))}catch(i){t=i===n?this:new D(i)}return t}},{supportedForProcessing:!1}),D=r.Class.derive(V,function(e){O&&(O===!0||O&k.exceptionPromise)&&(this._stack=r.Promise._getStack()),this._value=e,h(this,e,c)},{},{supportedForProcessing:!1}),J=r.Class.define(function(e){if(O&&(O===!0||O&k.completePromise)&&(this._stack=r.Promise._getStack()),e&&"object"==typeof e&&"function"==typeof e.then){var t=new q(null);return t._setCompleteValue(e),t}this._value=e},{cancel:function(){},done:function(e){if(e)try{var r=e(this._value);r&&"object"==typeof r&&"function"==typeof r.done&&r.done()}catch(t){setImmediate(function(){throw t})}},then:function(e){try{var r=e?e(this._value):this._value;return r===this._value?this:new J(r)}catch(t){return new D(t)}}},{supportedForProcessing:!1}),$=r.Class.derive(F,function(e,t){O&&(O===!0||O&k.promise)&&(this._stack=r.Promise._getStack()),this._oncancel=t,this._setState(C),this._run();try{var n=this._completed.bind(this),i=this._error.bind(this),o=this._progress.bind(this);e(n,i,o)}catch(s){this._setExceptionValue(s)}},{_oncancel:null,_cancelAction:function(){if(!this._oncancel)throw new Error("Promise did not implement oncancel");try{this._oncancel()}catch(e){{e.message,e.stack}P.dispatchEvent("error",e)}},_cleanupAction:function(){this._oncancel=null}},{addEventListener:function(e,r,t){P.addEventListener(e,r,t)},any:function(e){return new $(function(t,n){{var i=Object.keys(e);Array.isArray(e)?[]:{}}0===i.length&&t();var o=0;i.forEach(function(s){$.as(e[s]).then(function(){t({key:s,value:e[s]})},function(a){return a instanceof Error&&a.name===T?(++o===i.length&&t(r.Promise.cancel),void 0):(n({key:s,value:e[s]}),void 0)})})},function(){var r=Object.keys(e);r.forEach(function(r){var t=$.as(e[r]);"function"==typeof t.cancel&&t.cancel()})})},as:function(e){return e&&"object"==typeof e&&"function"==typeof e.then?e:new J(e)},cancel:{get:function(){return H=H||new V(new r.ErrorFromName(T))}},dispatchEvent:function(e,r){return P.dispatchEvent(e,r)},is:function(e){return e&&"object"==typeof e&&"function"==typeof e.then},join:function(e){return new $(function(n,i,o){var s=Object.keys(e),a=Array.isArray(e)?[]:{},u=Array.isArray(e)?[]:{},c=0,l=s.length,f=function(e){if(0===--l){var t=Object.keys(a).length;if(0===t)n(u);else{var c=0;s.forEach(function(e){var r=a[e];r instanceof Error&&r.name===T&&c++}),c===t?n(r.Promise.cancel):i(a)}}else o({Key:e,Done:!0})};return s.forEach(function(r){var n=e[r];n===t?c++:$.then(n,function(e){u[r]=e,f(r)},function(e){a[r]=e,f(r)})}),l-=c,0===l?(n(u),void 0):void 0},function(){Object.keys(e).forEach(function(r){var t=$.as(e[r]);"function"==typeof t.cancel&&t.cancel()})})},removeEventListener:function(e,r,t){P.removeEventListener(e,r,t)},supportedForProcessing:!1,then:function(e,r,t,n){return $.as(e).then(r,t,n)},thenEach:function(e,r,t,n){var i=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(o){i[o]=$.as(e[o]).then(r,t,n)}),$.join(i)},timeout:function(e,r){var t=E(e);return r?S(t,r):t},wrap:function(e){return new J(e)},wrapError:function(e){return new V(e)},_veryExpensiveTagWithStack:{get:function(){return O},set:function(e){O=e}},_veryExpensiveTagWithStack_tag:k,_getStack:function(){if(Debug.debuggerEnabled)try{throw new Error}catch(e){return e.stack}}});Object.defineProperties($,r.Utilities.createEventProperties(x));var G=r.Class.derive(F,function(e){this._oncancel=e,this._setState(C),this._run()},{_cancelAction:function(){this._oncancel&&this._oncancel()},_cleanupAction:function(){this._oncancel=null}},{supportedForProcessing:!1}),B=r.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});r.Namespace.define("WinJS",{Promise:$,_Signal:B})}(this,this.WinJS),function(e,r){"use strict";r.Namespace.define("WinJS",{ErrorFromName:r.Class.derive(Error,function(e,r){this.name=e,this.message=r||e},{},{supportedForProcessing:!1})})}(this,this.WinJS),function(e){"use strict";e.Namespace.define("WinJS",{xhr:function(r){var t;return new e.Promise(function(e,n,i){t=new XMLHttpRequest,t.onreadystatechange=function(){t._canceled||(4===t.readyState?(t.status>=200&&t.status<300||1223===t.status?e(t):n(t),t.onreadystatechange=function(){}):i(t))},t.open(r.type||"GET",r.url,!0,r.user,r.password),t.responseType=r.responseType||"",Object.keys(r.headers||{}).forEach(function(e){t.setRequestHeader(e,r.headers[e])}),r.customRequestInitializer&&r.customRequestInitializer(t),t.send(r.data)},function(){t._canceled=!0,t.abort()})}})}(this.WinJS),function(e,r){"use strict";var t,n,i,o,s,a,u={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,r){e.innerHTML=r},i=o=function(e,r){e.outerHTML=r},s=a=function(e,r,t){e.insertAdjacentHTML(r,t)};var c=e.MSApp;if(c)n=function(e,r){c.execUnsafeLocalFunction(function(){e.innerHTML=r})},o=function(e,r){c.execUnsafeLocalFunction(function(){e.outerHTML=r})},a=function(e,r,t){c.execUnsafeLocalFunction(function(){e.insertAdjacentHTML(r,t)})};else if(e.msIsStaticHTML){var l=function(t){if(!e.msIsStaticHTML(t))throw new r.ErrorFromName("WinJS.Utitilies.NonStaticHTML",u.nonStaticHTML)};t=function(e,r){l(r),e.innerHTML=r},i=function(e,r){l(r),e.outerHTML=r},s=function(e,r,t){l(t),e.insertAdjacentHTML(r,t)}}r.Namespace.define("WinJS.Utilities",{setInnerHTML:t,setInnerHTMLUnsafe:n,setOuterHTML:i,setOuterHTMLUnsafe:o,insertAdjacentHTML:s,insertAdjacentHTMLUnsafe:a})}(this,this.WinJS)),function(e){"undefined"==typeof exports&&"function"==typeof define&&define.amd?define("vs/base/lib/raw.winjs.base",e.WinJS):module.exports=e.WinJS}(this),define("vs/base/types",["require","exports"],function(e,r){function t(e){return Array.isArray?Array.isArray(e):e&&"number"==typeof e.length&&e.constructor===Array?!0:!1}function n(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 a(e)||null===e}function c(e){if(!i(e))return!1;for(var r in e)if(h.call(e,r))return!1;return!0}function l(e){return"[object Function]"===Object.prototype.toString.call(e)}function f(){for(var e=[],r=0;r<arguments.length;r++)e[r-0]=arguments[r];return e&&e.length>0&&e.every(function(e){return l(e)})}function p(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];var n=Object.create(e.prototype);return e.apply(n,r),n}function d(e){var r=!1,t=null;return function(){for(var n=[],i=0;i<arguments.length;i++)n[i-0]=arguments[i];return r||(r=!0,t=e.apply(self,n)),t}}r.isArray=t,r.isString=n,r.isObject=i,r.isNumber=o,r.isBoolean=s,r.isUndefined=a,r.isUndefinedOrNull=u;var h=Object.prototype.hasOwnProperty;r.isEmptyObject=c,r.isFunction=l,r.areFunctions=f,r.create=p,r.runOnce=d}),define("vs/base/objects",["require","exports","./types"],function(e,r,t){function n(e){if(!e||"object"!=typeof e)return e;var r=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(t){r[t]=e[t]&&"object"==typeof e[t]?n(e[t]):e[t]}),r}function i(e){if(!e||"object"!=typeof e)return e;var r=Array.isArray(e)?[]:{};return Object.getOwnPropertyNames(e).forEach(function(t){r[t]=e[t]&&"object"==typeof e[t]?i(e[t]):e[t]}),r}function o(e,r){if(t.isUndefinedOrNull(e))return e;var n=r(e);if("undefined"!=typeof n)return n;if(t.isArray(e)){for(var i=[],s=0;s<e.length;s++)i.push(o(e[s],r));return i}if(t.isObject(e)){var a={};for(var u in e)m.call(e,u)&&(a[u]=o(e[u],r));return a}return e}function s(e,r,n){return void 0===n&&(n=!0),t.isObject(e)?(t.isObject(r)&&Object.keys(r).forEach(function(i){i in e?n&&(t.isObject(e[i])&&t.isObject(r[i])?s(e[i],r[i],n):e[i]=r[i]):e[i]=r[i]}),e):r}function a(e,r){return s(n(r),e||{})}function u(e,r){if(e===r)return!0;if(null===e||void 0===e||null===r||void 0===r)return!1;if(typeof e!=typeof r)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(r))return!1;var t,n;if(Array.isArray(e)){if(e.length!==r.length)return!1;for(t=0;t<e.length;t++)if(!u(e[t],r[t]))return!1}else{var i=[];for(n in e)i.push(n);i.sort();var o=[];for(n in r)o.push(n);if(o.sort(),!u(i,o))return!1;for(t=0;t<i.length;t++)if(!u(e[i[t]],r[i[t]]))return!1}return!0}function c(e,r,t){"undefined"==typeof e[r]&&(e[r]=t)}function l(e){for(var r={},t=0;t<e.length;++t)r[e[t]]=!0;return r}function f(e,r){void 0===r&&(r=!1),r&&(e=e.map(function(e){return e.toLowerCase()}));var t=l(e);return r?function(e){return void 0!==t[e.toLowerCase()]&&t.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==t[e]&&t.hasOwnProperty(e)}}function p(e,r){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);r=r||function(){};var n=e.prototype,i=r.prototype;r.prototype=Object.create(n);for(var t in i)i.hasOwnProperty(t)&&Object.defineProperty(r.prototype,t,Object.getOwnPropertyDescriptor(i,t));Object.defineProperty(r.prototype,"constructor",{value:r,writable:!0,configurable:!0,enumerable:!0})}function d(e){var r=[];return JSON.stringify(e,function(e,n){if(t.isObject(n)||Array.isArray(n)){if(-1!==r.indexOf(n))return"[Circular]";r.push(n)}return n})}var h=function(){function e(e,r){this.first=e,this.second=r}return e}();r.Tuple=h,r.clone=n,r.deepClone=i;var m=Object.prototype.hasOwnProperty;r.cloneAndChange=o,r.mixin=s,r.withDefaults=a,r.equals=u,r.ensureProperty=c,r.arrayToHash=l,r.createKeywordMatcher=f,r.derive=p,r.safeStringify=d}),define("vs/base/env",["require","exports","vs/base/types"],function(e,r,t){function n(){{var e=3;self.has||function(){return!1}}e=2;var r=location.search.match(/monaco-workers=(\d+)/i);return r&&(e=parseInt(r[1],10)),i("workersCount",e)}function i(e,r){return void 0===r&&(r=!1),self.MonacoEnvironment&&self.MonacoEnvironment.hasOwnProperty(e)?self.MonacoEnvironment[e]:r}function o(){return v}function s(){return"undefined"!=typeof self.Worker}function a(){return!d.document&&"undefined"!=typeof self.importScripts}function u(){return self.isEmulatedWorker}function c(){return self.isProcessWorker}function l(){return d.parent!==d}function f(){return m}function p(e){m=e}var d=self,h=navigator.userAgent,m=!!d.isTest,v=d.document&&d.document.URL.match(/[^\?]*\?[^\#]*pseudo=true/),g=h.indexOf("Trident")>=0&&h.indexOf("MSIE")<0,_=h.indexOf("MSIE 10")>=0,b=h.indexOf("MSIE 9")>=0,y=h.indexOf("Firefox")>=0,E=!1;r.browser={isOpera:h.indexOf("Opera")>=0,isIE11orEarlier:g||_||b,isIE11:g,isIE10orEarlier:_||b,isIE10orLater:g||_,isIE10:_,isIE9:b,isFirefox:y,isWebKit:h.indexOf("AppleWebKit")>=0,isChrome:h.indexOf("Chrome")>=0,isSafari:-1===h.indexOf("Chrome")&&h.indexOf("Safari")>=0,isIPad:h.indexOf("iPad")>=0,canUseTranslate3d:!b&&!y,canPushState:function(){return!E&&d.history&&d.history.pushState},disablePushState:function(){E=!0},hasCSSAnimationSupport:function(){if(this._hasCSSAnimationSupport===!0||this._hasCSSAnimationSupport===!1)return this._hasCSSAnimationSupport;if(!d.document)return!1;for(var e=!1,r=d.document.createElement("div"),n=["animationName","webkitAnimationName","msAnimationName","MozAnimationName","OAnimationName"],i=0;i<n.length;i++){var o=n[i];if(!t.isUndefinedOrNull(r.style[o])||r.style.hasOwnProperty(o)){e=!0;break}}return this._hasCSSAnimationSupport=e?!0:!1,this._hasCSSAnimationSupport},canPlayVideo:function(e){if(!d.document)return!1;var r=d.document.createElement("video");if(r.canPlayType){var t=r.canPlayType(e);return"maybe"===t||"probably"===t}return!1},canPlayAudio:function(e){if(!d.document)return!1;var r=d.document.createElement("audio");if(r.canPlayType){var t=r.canPlayType(e);return"maybe"===t||"probably"===t}return!1}},function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"}(r.Platform||(r.Platform={}));var S=r.Platform;r.platform=S.Web;var w=i("platform",null);w&&("darwin"===w?r.platform=S.Mac:"win32"===w?r.platform=S.Windows:("linux"===w||"freebsd"===w)&&(r.platform=S.Linux)),r.isWindows=h.indexOf("Windows")>=0&&r.platform===S.Web||r.platform===S.Windows,r.isMacintosh=h.indexOf("Macintosh")>=0&&r.platform===S.Web||r.platform===S.Mac,r.isLinux=h.indexOf("Linux")>=0&&r.platform===S.Web||r.platform===S.Linux,r.isNative=r.platform!==S.Web,r.isWeb=!r.isNative,r.applicationName=i("applicationName",null),r.workersCount=1,r.enableUpload=i("enableUpload"),r.enableDownloadWorkspace=i("enableDownloadWorkspace"),r.enableSearch=i("enableSearch"),r.enableBuild=i("enableBuild"),r.enableGit=i("enableGit"),r.enableConsole=i("enableConsole"),r.enableNativeConsole=i("enableNativeConsole"),r.enableOutput=i("enableOutput"),r.enableQuickStart=i("enableQuickStart"),r.enableTestCoverage=i("enableTestCoverage"),r.enableFeedback=i("enableFeedback"),r.enablePerformanceEvents=i("enablePerformanceEvents"),r.enableTelemetry=i("enableTelemetry"),r.enablePrivateTelemetry=i("enablePrivateTelemetry"),r.enableMonacoTelemetryPipeLine=i("enableMonacoTelemetryPipeLine"),r.appInsightsInstrumentationKey=i("appInsightsInstrumentationKey"),r.enableTestViewlet=i("enableTestViewlet"),r.enableDebug=i("enableDebug"),r.enablePluginHost=i("enablePluginHost"),r.enableGlobalCSSRuleChecker=i("enableGlobalCSSRuleChecker"),r.enableNLSWarnings=i("enableNLSWarnings"),r.enableEditorLanguageServiceIndicator=i("enableEditorLanguageServiceIndicator"),r.enablePerformanceTools=i("enablePerformanceTools"),r.enableRunWorkspace=i("enableRunWorkspace"),r.enableJavaScriptRewriting=i("enableJavaScriptRewriting"),r.enableTypeScriptServiceMode=i("enableTypeScriptServiceMode"),r.enableEnhancedEditorTheme=i("enableEnhancedEditorTheme"),r.enableNativeReload=i("enableNativeReload"),r.runFromAzure=i("runFromAzure"),r.enableTFSConnection=i("enableTFSConnection"),r.portalLink=i("portalLink",null),r.version=i("version",null),r.hideDerivedResources=i("hideDerivedResources"),r.isCaseSensitiveFs=r.isLinux,r.enableAzurePortalNavigation=i("enableAzurePortalNavigation"),r.privacyLink=i("privacyLink",null),r.supportLink=i("supportLink",null),r.legalLink=i("legalLink",null),r.videosLink=i("videosLink",null),r.azureWebSiteName=i("azureWebSiteName",null),r.azureWebSiteComputeMode=i("azureWebSiteComputeMode",null),r.azureWebSiteMode=i("azureWebSiteMode",null),r.azureWebSiteScmType=i("azureWebSiteScmType",null),r.azureWebSiteAppsettingScmType=i("azureWebSiteAppsettingScmType",null),r.azureWebSiteProjectType=i("azureWebSiteProjectType",null),r.azureWebSiteForZumo=i("azureWebSiteForZumo",null),r.azurePortalLink=i("azurePortalLink",null),r.azureWebSiteTryMode=i("azureWebSiteTryMode",!1),r.tryAzureLink=i("tryAzureLink",null),r.tryAzureSignUpLink=i("tryAzureSignUpLink",null),r.tryAzureLifeTimeInMinutes=i("tryAzureLifeTimeInMinutes",null),r.tryAzureLastModifiedUTC=i("tryAzureLastModifiedUTC",null),r.logWorkerMessages=!1,r.appRoot=i("appRoot",null),r.standaloneEditorTelemetryEndpoint=i("telemetryEndpoint",null),r.getCrossOriginWorkerScriptUrl=i("getWorkerUrl",null),r.isPseudoLanguage=o,r.hasWebWorkerSupport=s,r.isInWebWorker=a,r.isInEmulatedWebWorker=u,r.isInProcessWorker=c,r.isInIframe=l,r.isTesting=f,r.setTesting=p}),define("vs/base/strings",["require","exports","vs/nls!vs/base/worker/workerServer"],function(e,r,t){function n(e,r,t){void 0===t&&(t="0");for(var n=""+e,i=[n],o=n.length;r>o;o++)i.push(t);return i.reverse().join("")}function i(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];return 0===r.length?e:e.replace(F,function(e,t){var n=parseInt(t,10);return isNaN(n)||0>n||n>=r.length?e:r[n]})}function o(e){return e||(e=new Date),t.localize("vs_base_strings",0,n(e.getMonth()+1,2),n(e.getDate(),2),n(e.getFullYear(),4),n(e.getHours(),2),n(e.getMinutes(),2),n(e.getSeconds(),2))}function s(e){return e||(e=new Date),t.localize("vs_base_strings",1,n(e.getHours(),2),n(e.getMinutes(),2),n(e.getSeconds(),2))}function a(e){return e.replace(/[<|>|&]/g,function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return e}})}function u(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}function c(e,r,t){return e.replace(new RegExp(u(r.toString()),"g"),t)}function l(e,r){void 0===r&&(r=" ");var t=f(e,r);return p(t,r)}function f(e,r){if(!e||!r)return e;var t=r.length;if(0===t||0===e.length)return e;for(var n=0,i=-1;(i=e.indexOf(r,n))===n;)n+=t;return e.substring(n)}function p(e,r){if(!e||!r)return e;var t=r.length,n=e.length;if(0===t||0===n)return e;for(var i=n,o=-1;;){if(o=e.lastIndexOf(r,i-1),-1===o||o+t!==i)break;if(0===o)return"";i=o}return e.substring(0,i)}function d(e){return e.replace(/(^\s+|\s+$)/g,"")}function h(e){return e.replace(/\s+/g," ")}function m(e){var r=(new Date).getTime(),n=(r-e)/1e3;if(60>n)return t.localize("vs_base_strings",2,Math.floor(n));
var i=n/60;if(60>i)return t.localize("vs_base_strings",3,Math.floor(i));var o=i/60;if(24>o)return t.localize("vs_base_strings",4,Math.floor(o));var s=o/24;return t.localize("vs_base_strings",5,Math.floor(s))}function v(e){var r=(new Date).getTime(),n=(r-e)/1e3;if(60>n)return t.localize("vs_base_strings",6);var i=n/60;if(60>i)return 1===Math.floor(i)?t.localize("vs_base_strings",7):t.localize("vs_base_strings",8,Math.floor(i));var o=i/60;if(24>o)return 1===Math.floor(o)?t.localize("vs_base_strings",9):t.localize("vs_base_strings",10,Math.floor(o));var s=o/24;return 1===Math.floor(s)?t.localize("vs_base_strings",11):s>6&&8>s?t.localize("vs_base_strings",12):s>30&&40>s?t.localize("vs_base_strings",13):t.localize("vs_base_strings",14,Math.floor(s))}function g(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function _(e,r){if(e=e||"",r=r||"",e.length<r.length)return!1;for(var t=0;t<r.length;t++)if(e[t]!==r[t])return!1;return!0}function b(e,r){var t=e.length-r.length;return t>0?e.lastIndexOf(r)===e.length-r.length:0===t?e===r:!1}function y(e,r,t,n){return void 0===n&&(n=""),e.substring(0,r)+n+e.substring(r+t)}function E(e,r,t,n){if(""===e)throw new Error("Cannot create regex from empty string");r||(e=e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")),n&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var i="g";return t||(i+="i"),new RegExp(e,i)}function S(e){var r=e.exec("");return r&&0===e.lastIndex}function w(e,r){if(!e)return e;if(r){for(var t=e.split("/"),n=0,i=t.length;i>n;n++)t[n]=encodeURIComponent(t[n]);return t.join("/")}return encodeURIComponent(e)}function P(e){return/^\w[\w.]*$/.test(e)}function x(e){return!e||!e.trim()}function T(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}function O(e,r,t){return r&&(e="^"+e),t&&(e+="$"),e}function k(e,r){if(S(new RegExp(e,r)))throw new Error("Regular expression /"+e+"/g results in infinitive matches")}function C(e){return e?(0===e.indexOf("/")&&(e=e.substring(1)),w(e,!0)):""}function M(e,r){return"["+e+"m"+r+""}function A(e){for(var r=0,t=e.length;t>r;r++)if(" "!==e.charAt(r)&&"	"!==e.charAt(r))return r;return-1}function L(e){for(var r=0,t=e.length;t>r;r++)if(" "!==e.charAt(r)&&"	"!==e.charAt(r))return e.substring(0,r);return e}function W(e){for(var r=e.length-1;r>=0;r--)if(" "!==e.charAt(r)&&"	"!==e.charAt(r))return r;return-1}function R(e,r){return e.localeCompare(r)}function j(e){return e>=97&&122>=e||e>=65&&90>=e}function I(e,r){var t=e.length,n=r.length;if(t!==n)return!1;for(var i=0;t>i;i++){var o=e.charCodeAt(i),s=r.charCodeAt(i);if(o!==s)if(j(o)&&j(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 z(e,r){var t,n=Math.min(e.length,r.length);for(t=0;n>t;t++)if(e.charCodeAt(t)!==r.charCodeAt(t))return t;return n}function N(e,r,t){void 0===t&&(t=4);var n=Math.abs(e.length-r.length);if(n>t)return 0;var i,o,s=[],a=[];for(i=0;i<r.length+1;++i)a.push(0);for(i=0;i<e.length+1;++i)s.push(a);for(i=1;i<e.length+1;++i)for(o=1;o<r.length+1;++o)s[i][o]=e[i-1]===r[o-1]?s[i-1][o-1]+1:Math.max(s[i-1][o],s[i][o-1]);return s[e.length][r.length]-Math.sqrt(n)}function U(e){for(var r,t=/\r\n|\r|\n/g,n=[0];r=t.exec(e);)n.push(t.lastIndex);return n}function H(e,t){if(e.length<t)return e;for(var n=e.split(/\b/),i=0,o=n.length-1;o>=0;o--)if(i+=n[o].length,i>t){n.splice(0,o);break}return n.join(r.empty).replace(/^\s/,r.empty)}r.empty="",r.pad=n;var F=/{(\d+)}/g;r.format=i,r.formatDate=o,r.formatTime=s,r.escape=a,r.escapeRegExpCharacters=u,r.replaceAll=c,r.trim=l,r.ltrim=f,r.rtrim=p,r.trimWhitespace=d,r.normalize=h,r.conciseformatDiff=m,r.verboseformatDiff=v,r.convertSimple2RegExpPattern=g,r.startsWith=_,r.endsWith=b,r.splice=y,r.createRegExp=E,r.regExpLeadsToEndlessLoop=S,r.encodeURIPart=w,r.isCamelCasePattern=P,r.isFalsyOrWhitespace=x,r.toRegExpPattern=T,r.anchorPattern=O,r.assertRegExp=k,r.normalizePath=C,r.colorize=M,r.firstNonWhitespaceIndex=A,r.getLeadingWhitespace=L,r.lastNonWhitespaceIndex=W,r.localeCompare=R,r.equalsIgnoreCase=I,r.commonPrefixLength=z,r.difference=N,r.computeLineStarts=U,r.lcut=H}),define("vs/base/errors",["require","exports","vs/nls!vs/base/worker/workerServer","vs/base/objects","vs/base/env","vs/base/types","vs/base/strings"],function(e,r,t,n,i,o,s){function a(e){r.errorHandler.setUnexpectedErrorHandler(e)}function u(e){d(e)||r.errorHandler.onUnexpectedError(e)}function c(e,r){var t=new E(e);return r?t.verboseMessage:t.message}function l(e,r){return r&&e.message&&(e.stack||e.stacktrace)?t.localize("vs_base_errors",7,e.message,e.stack||e.stacktrace):e.message?e.message:t.localize("vs_base_errors",8)}function f(e,r){if(void 0===r&&(r=!1),!e)return t.localize("vs_base_errors",9);if(o.isString(e))return e;if(!o.isUndefinedOrNull(e.status))return c(e,r);if(e.detail){var n=e.detail;if(n.error){if(n.error&&!o.isUndefinedOrNull(n.error.status))return c(n.error,r);if(!o.isArray(n.error))return l(n.error,r);for(var i=0;i<n.error.length;i++)if(n.error[i]&&!o.isUndefinedOrNull(n.error[i].status))return c(n.error[i],r)}if(n.exception)return o.isUndefinedOrNull(n.exception.status)?l(n.exception,r):c(n.exception,r)}return e.stack?l(e,r):e.message?e.message:t.localize("vs_base_errors",10)}function p(e){if(e)if(o.isArray(e)){for(var r=0;r<e.length;r++)if(e[r]&&e[r].status)return e[r].status}else if(e.status)return e.status;return-1}function d(e){return e instanceof Error&&e.name===S&&e.message===S}function h(){var e=new Error(S);return e.name=e.message,e}function m(){return new Error(t.localize("vs_base_errors",11))}function v(e){return e?new Error(t.localize("vs_base_errors",12,e)):new Error(t.localize("vs_base_errors",13))}function g(e){return e?new Error(t.localize("vs_base_errors",14,e)):new Error(t.localize("vs_base_errors",15))}function _(){return i.isWeb?new Error(t.localize("vs_base_errors",16)):new Error(t.localize("vs_base_errors",17))}function b(e,r){void 0===r&&(r=null);var t=new Error(e);return r&&(t.actions=r),t}var y=function(){function e(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(function(){if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e},0)}}return e.prototype.addListener=function(e){var r=this;return this.listeners.push(e),function(){r._removeListener(e)}},e.prototype.emit=function(e){this.listeners.forEach(function(r){r(e)})},e.prototype._removeListener=function(e){this.listeners.splice(this.listeners.indexOf(e),1)},e.prototype.setUnexpectedErrorHandler=function(e){this.unexpectedErrorHandler=e},e.prototype.getUnexpectedErrorHandler=function(){return this.unexpectedErrorHandler},e.prototype.onUnexpectedError=function(e){this.unexpectedErrorHandler(e),this.emit(e)},e}();r.ErrorHandler=y,r.errorHandler=new y,r.setUnexpectedErrorHandler=a,r.onUnexpectedError=u;var E=function(){function e(e){this.status=e.status,this.statusText=e.statusText,this.name="ConnectionError";try{this.responseText=e.responseText}catch(r){this.responseText=""}if(this.errorMessage=null,this.errorCode=null,this.errorObject=null,this.responseText)try{var t=JSON.parse(this.responseText);this.errorMessage=t.message,this.errorCode=t.code,this.errorObject=t}catch(n){}}return Object.defineProperty(e.prototype,"message",{get:function(){return this.connectionErrorToMessage(this,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"verboseMessage",{get:function(){return this.connectionErrorToMessage(this,!0)},enumerable:!0,configurable:!0}),e.prototype.connectionErrorDetailsToMessage=function(e,r){var n=e.errorCode,i=e.errorMessage;return null!==n&&null!==i?t.localize("vs_base_errors",0,s.rtrim(i,"."),n):null!==i?i:r&&null!==e.responseText?e.responseText:null},e.prototype.connectionErrorToMessage=function(e,r){var n=this.connectionErrorDetailsToMessage(e,r);return 401===e.status?null!==n?t.localize("vs_base_errors",1,n):t.localize("vs_base_errors",2):n?n:e.status>0&&null!==e.statusText?r&&null!==e.responseText&&e.responseText.length>0?t.localize("vs_base_errors",3,e.statusText,e.status,e.responseText):t.localize("vs_base_errors",4,e.statusText,e.status):r&&null!==e.responseText&&e.responseText.length>0?t.localize("vs_base_errors",5,e.responseText):t.localize("vs_base_errors",6)},e}();r.ConnectionError=E,n.derive(Error,E),r.toErrorMessage=f,r.getHttpStatus=p;var S="Canceled";r.isPromiseCanceledError=d,r.canceled=h,r.notImplemented=m,r.illegalArgument=v,r.illegalState=g,r.loaderError=_,r.error=b}),define("vs/base/lib/winjs.base",["./raw.winjs.base","vs/base/errors","vs/base/env"],function(e,r,t){"use strict";function n(e){if(!t.isNative){var n=e.detail,i=n.id;if(n.parent)return n.handler&&s&&delete s[i],void 0;s[i]=n,1===Object.keys(s).length&&setTimeout(function(){var e=s;s={},Object.keys(e).forEach(function(t){var n=e[t];n.exception?r.onUnexpectedError(n.exception):n.error&&r.onUnexpectedError(n.error),console.log("WARNING: Promise with no error callback:"+n.id),console.log(n),n.exception&&console.log(n.exception.stack)})},0)}}function i(e,r,t){var n,i,s,a=new o.Promise(function(e,r,t){n=e,i=r,s=t},function(){e.cancel()});return e.then(function(e){r&&r(e),n(e)},function(e){t&&t(e),i(e)},s),a}var o=e,s={};return o.Promise.addEventListener("error",n),{decoratePromise:i,Class:o.Class,xhr:o.xhr,Promise:o.Promise,TPromise:o.Promise,PPromise:o.Promise,Utilities:o.Utilities}}),define("vs/base/worker/marshalling",["require","exports","vs/base/objects","vs/base/types"],function(e,r,t,n){function i(e){a.push(e)}function o(e){return t.cloneAndChange(e,function(e){if("object"==typeof e)for(var r=0;r<a.length;r++){var t=a[r];if(t.canSerialize(e))return t.serialize(e,o)}return void 0})}function s(e){return t.cloneAndChange(e,function(e){if(n.isObject(e))for(var r=0;r<a.length;r++){var t=a[r];if(t.canDeserialize(e))return t.deserialize(e,s)}return void 0})}var a=[];r.registerMarshallingContribution=i,r.serialize=o,r.deserialize=s,i({canSerialize:function(e){return e instanceof RegExp},serialize:function(e){var r="";return e.global?r+="g":e.ignoreCase?r+="i":e.multiline&&(r+="m"),{$isRegExp:!0,source:e.source,flags:r}},canDeserialize:function(e){return e.$isRegExp},deserialize:function(e){return new RegExp(e.source,e.flags)}})}),define("vs/base/remote/remote",["require","exports","vs/base/types"],function(e,r,t){function n(e){if(t.isUndefinedOrNull(e))return null;if(t.isArray(e)){for(var r={items:[]},i=0;i<e.length;i++)r.items.push(n(e[i]));return r}if(t.isObject(e)){var o={methods:[],props:{}};for(var s in e)"function"==typeof e[s]?o.methods.push(s):a.call(e,s)&&(o.props[s]=n(e[s]));return o}var u={value:e};return u}function i(e,r){return o(e,r.proxyId,"",r.desc)}function o(e,r,t,n){if(!n)return null;if(n.items){for(var i=[],u=n.items,c=0;c<u.length;c++)i[c]=o(e,r,t+"["+c+"].",u[c]);return i}if(n.methods){for(var l={},f=n.methods,p=0;p<f.length;p++)l[f[p]]=s(e,r,t+f[p]);var d=n.props;for(var h in d)a.call(d,h)&&(l[h]=o(e,r,t+h+".",d[h]));return l}return n.value}function s(e,r,t){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i-0]=arguments[i];return e.callOnRemote(r,t,n)}}var a=Object.prototype.hasOwnProperty;r.createDescriptor=n,r.createProxy=i}),define("vs/base/worker/workerProtocol",["require","exports","vs/base/lib/winjs.base","vs/base/worker/marshalling","vs/base/remote/remote"],function(e,r,t,n,i){function o(e){return JSON.stringify(n.serialize(e))}function s(e){return n.deserialize(JSON.parse(e))}function a(e){var r={};return e.stacktrace?r.stack=e.stacktrace:e.stack&&(r.stack=e.stack),r.message=e.toString(),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"},r.marshallObject=o,r.demarshallObject=s,r.transformError=a;var u=function(){function e(e){this._requester=e,this._handlers={},this._lastGeneratedId=0}return e.prototype.callOnRemote=function(e,r,t){return this._requester.request("_proxyObj",{proxyId:e,path:r,args:t})},e.prototype.registerHandler=function(e,r){this._handlers[e]=r},e.prototype.handleMessage=function(e){var r=this._handlers[e.proxyId];return this._invokeHandler(r[e.path],r,e.args)},e.prototype._invokeHandler=function(e,r,n){try{return t.Promise.as(e.apply(r,this._createProxiesIfNecessary(n)))}catch(i){return t.Promise.wrapError(i)}},e.prototype._createProxiesIfNecessary=function(e){if(!e||0===e.length)return e;for(var r=0,t=e.length;t>r;r++)e[r]=this._createProxyIfNecessary(e[r]);return e},e.prototype._createProxyIfNecessary=function(e){return e&&e.$isProxyDescriptor?i.createProxy(this,e):e},e.prototype.createProxy=function(e){var r="$"+String(++this._lastGeneratedId);return this._handlers[r]=e,{$isProxyDescriptor:!0,proxyId:r,desc:i.createDescriptor(e)}},e}();r.RemoteCom=u}),define("vs/base/worker/workerServer",["require","exports","vs/base/lib/winjs.base","vs/base/worker/workerProtocol","vs/base/errors"],function(e,r,t,n,i){function o(e){return new s(e)}var s=function(){function r(e){this._postMessage=e,this._workerId=0,this._requestHandler=null,this._lastReq=0,this._awaitedReplies={},this._bindConsole(),this._remoteCom=new n.RemoteCom(this)}return r.prototype.getRemoteCom=function(){return this._remoteCom},r.prototype._bindConsole=function(){self.console={log:this._sendPrintMessage.bind(this,n.PrintType.LOG),debug:this._sendPrintMessage.bind(this,n.PrintType.DEBUG),info:this._sendPrintMessage.bind(this,n.PrintType.INFO),warn:this._sendPrintMessage.bind(this,n.PrintType.WARN),error:this._sendPrintMessage.bind(this,n.PrintType.ERROR)},i.setUnexpectedErrorHandler(function(e){self.console.error(e)})},r.prototype._sendPrintMessage=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];var i=r.map(function(e){return e instanceof Error?n.transformError(e):e}),o={monacoWorker:!0,from:this._workerId,req:"0",type:n.MessageType.PRINT,level:e,payload:1===i.length?i[0]:i};this._postMessage(o)},r.prototype._sendReply=function(e,r,t){var i={monacoWorker:!0,from:this._workerId,req:"0",id:e,type:n.MessageType.REPLY,action:r,payload:t instanceof Error?n.transformError(t):t};this._postMessage(i)},r.prototype.request=function(e,r){if("$"===e.charAt(0))throw new Error("Illegal requestName: "+e);var n=String(++this._lastReq),i={monacoWorker:!0,from:this._workerId,req:n,type:e,payload:r},o={c:null,e:null,p:null},s=new t.Promise(function(e,r,t){o.c=e,o.e=r,o.p=t});return this._awaitedReplies[n]=o,this._postMessage(i),s},r.prototype.loadModule=function(r,t,n){e([r],function(){for(var e=[],r=0;r<arguments.length;r++)e[r-0]=arguments[r];t(e[0])},n)},r.prototype.onmessage=function(e){var r=this;if(e.type===n.MessageType.REPLY){var t=e;if(!t.seq||!this._awaitedReplies.hasOwnProperty(t.seq))return console.error("Worker received unexpected reply from main thread",e),void 0;var i=this._awaitedReplies[t.seq];return delete this._awaitedReplies[t.seq],t.err?i.e(t.err):i.c(t.payload),void 0}var o=this._sendReply.bind(this,e.id,n.ReplyType.COMPLETE),s=this._sendReply.bind(this,e.id,n.ReplyType.ERROR),a=this._sendReply.bind(this,e.id,n.ReplyType.PROGRESS);switch(e.type){case n.MessageType.INITIALIZE:this._workerId=e.payload.id;var u=e.payload.loaderConfiguration;u&&("undefined"!=typeof u.baseUrl&&delete u.baseUrl,"undefined"!=typeof u.paths&&"undefined"!=typeof u.paths.vs&&delete u.paths.vs,u.catchError=!0,self.require.config(u));var c=e.payload.MonacoEnvironment;c&&(self.MonacoEnvironment=c),this.loadModule(e.payload.moduleId,function(e){r._requestHandler=e.value,o()},s);break;default:this._handleMessage(e,o,s,a)}},r.prototype._handleMessage=function(e,r,t,i){if("_proxyObj"===e.type)return this._remoteCom.handleMessage(e.payload).then(r,t,i),void 0;if(!this._requestHandler)return t("Request handler not loaded"),void 0;if(e.type in this._requestHandler&&"function"==typeof this._requestHandler[e.type])try{this._requestHandler[e.type].call(this._requestHandler,this,r,t,i,e.payload)}catch(o){t(n.transformError(o))}else this._requestHandler.request(this,r,t,i,e)},r}();r.WorkerServer=s,r.create=o,r.marshallObject=n.marshallObject,r.demarshallObject=n.demarshallObject});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/base/worker/workerServer.nls.keys",[],{vs_base_strings:{path:"vs/base/strings.js",keys:["format.date","format.time","diff.seconds","diff.minutes","diff.hours","diff.days","diff.seconds.verbose","diff.minute.verbose","diff.minutes.verbose","diff.hour.verbose","diff.hours.verbose","diff.days.yesterday","diff.days.week","diff.days.month","diff.days.verbose"]},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.defaultMessage","error.defaultMessage","error.defaultMessage","notImplementedError","illegalArgumentError","illegalArgumentError2","illegalStateError","illegalStateError2","loaderError","loaderErrorNative"]}});�PNG


IHDR���	pHYs����k�gAMA���a;IDATx�c`������Y"n^��B$�´�I@�,a!�P�$P��0��6%�3��-IEND�B`��PNG


IHDR���	pHYs����k�gAMA���a#IDATx�c`��,�����GMA��=��=�,��2�%��G��IEND�B`��PNG


IHDR���	pHYs����k�gAMA���a!IDATx�c`�����{gIS�{@�{Ĩ�PM=%�y̮5IEND�B`��PNG


IHDR���	pHYs����k�gAMA���a9IDATx�c`��,���Yb
������P$���yH0A0,a�aP����>�%�{���IEND�B`�<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><style type="text/css">.st0{opacity:0;fill:#F6F6F6;} .st1{fill:#F6F6F6;} .st2{fill:#424242;}</style><g id="outline"><rect class="st0" width="16" height="16"/><path class="st1" d="M14.176 5.592c-.555-.6-1.336-.904-2.322-.904-.258 0-.521.024-.784.072-.246.044-.479.101-.7.169-.228.07-.432.147-.613.229-.22.099-.389.196-.512.284l-.419.299v2.701c-.086.108-.162.223-.229.344l-2.45-6.354h-2.394l-3.753 9.804v.598h3.025l.838-2.35h2.167l.891 2.35h3.237l-.001-.003c.305.092.633.15.993.15.344 0 .671-.049.978-.146h2.853v-4.903c-.001-.975-.271-1.763-.805-2.34z"/></g><g id="icon_x5F_bg"><path class="st2" d="M7.611 11.834l-.891-2.35h-3.562l-.838 2.35h-1.095l3.217-8.402h1.02l3.24 8.402h-1.091zm-2.531-6.814l-.044-.135-.038-.156-.029-.152-.024-.126h-.023l-.021.126-.032.152-.038.156-.044.135-1.307 3.574h2.918l-1.318-3.574z"/><path class="st2" d="M13.02 11.834v-.938h-.023c-.199.352-.456.62-.771.806s-.673.278-1.075.278c-.313 0-.588-.045-.826-.135s-.438-.212-.598-.366-.281-.338-.363-.551-.124-.442-.124-.688c0-.262.039-.502.117-.721s.198-.412.36-.58.367-.308.615-.419.544-.19.888-.237l1.811-.252c0-.273-.029-.507-.088-.7s-.143-.351-.252-.472-.241-.21-.396-.267-.325-.085-.513-.085c-.363 0-.714.064-1.052.193s-.638.31-.904.54v-.984c.082-.059.196-.121.343-.188s.312-.128.495-.185.378-.104.583-.141.407-.056.606-.056c.699 0 1.229.194 1.588.583s.539.942.539 1.661v3.902h-.96zm-1.454-2.83c-.273.035-.498.085-.674.149s-.313.144-.41.237-.165.205-.202.334-.055.276-.055.44c0 .141.025.271.076.393s.124.227.22.316.215.16.357.211.308.076.495.076c.242 0 .465-.045.668-.135s.378-.214.524-.372.261-.344.343-.557.123-.442.123-.688v-.609l-1.465.205z"/></g></svg><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><polygon fill="#F6F6F6" points="13.64,7.396 12.169,2.898 10.706,3.761 11.087,2 6.557,2 6.936,3.762 5.473,2.898 4,7.396 5.682,7.554 4.513,8.561 5.013,9 2,9 2,14 7,14 7,10.747 7.978,11.606 8.82,9.725 9.661,11.602 13.144,8.562 11.968,7.554"/><g fill="#424242"><path d="M12.301 6.518l-2.772.262 2.086 1.788-1.594 1.392-1.201-2.682-1.201 2.682-1.583-1.392 2.075-1.788-2.771-.262.696-2.126 2.358 1.392-.599-2.784h2.053l-.602 2.783 2.359-1.392.696 2.127z"/><rect x="3" y="10" width="3" height="3"/></g></svg><?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" width="16" height="16"><g transform="translate(0,-48)"><path d="m 8.0078107,49 a 1.3623247,1.3618762 0 0 0 -0.1327821,0.0078 1.3623247,1.3618762 0 0 0 -1.0935,0.749582 L 1.1421931,61.032348 A 1.3623247,1.3618762 0 0 0 2.3606644,63 l 11.2786716,0 a 1.3623247,1.3618762 0 0 0 1.218471,-1.967652 L 9.2184714,49.75739 A 1.3623247,1.3618762 0 0 0 8.0078107,49 z" style="fill:#ffcc00;" /><path d="m 7.5372151,58.862661 -0.4276365,-4.356944 0,-2.014501 1.7808428,0 0,2.014501 -0.4217786,4.356944 z" style="fill:#000000;" /><path d="m 7.179875,61.076269 0,-1.645566 1.6461079,0 0,1.645566 z" style="fill:#000000;" /></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><style type="text/css">.st0{opacity:0;fill:#F6F6F6;} .st1{fill:#F6F6F6;} .st2{fill:#424242;}</style><g id="outline"><rect class="st0" width="16" height="16"/><path class="st1" d="M16 4.022v-3.022h-16.014v3.022h3.046l-3.043 7.945h-.004v.01l.015 1.023h-.014v1.991h16.014v-3.023h-1v-7.946h1zm-5.914 5.301c0 .233-.023.441-.066.595-.047.164-.099.247-.127.284l-.078.069-.151.026-.115-.017-.139-.137c-.031-.078-.112-.332-.112-.566 0-.254.091-.561.126-.656l.069-.141.109-.082.178-.027c.077 0 .117.014.177.056l.087.179.051.237-.009.18zm-3.695-5.301v2.893l-1.116-2.893h1.116zm-3.026 7.02h1.573l.351.926h-2.254l.33-.926zm8.635-4.354c-.206-.2-.431-.38-.695-.512-.396-.198-.853-.298-1.355-.298-.215 0-.423.02-.621.058v-1.914h2.671v2.666z"/></g><g id="icon_x5F_bg"><rect x="13" y="4" class="st2" width="1" height="8"/><path class="st2" d="M11.225 8.387c-.078-.299-.199-.562-.36-.786s-.365-.401-.609-.53-.534-.193-.866-.193c-.198 0-.38.024-.547.073-.165.049-.316.117-.453.205-.136.088-.257.194-.365.318l-.179.258v-3.154h-.893v7.422h.893v-.575l.126.175c.087.102.189.19.304.269.117.078.249.14.398.186.149.046.314.068.498.068.353 0 .666-.071.937-.212.272-.143.499-.338.682-.586.183-.25.321-.543.414-.879.093-.338.14-.703.14-1.097-.001-.342-.04-.663-.12-.962zm-1.479-.607c.151.071.282.176.39.314.109.14.194.313.255.517.051.174.082.371.089.587l-.007.125c0 .327-.033.62-.1.869-.067.246-.161.453-.278.614-.117.162-.26.285-.421.366-.322.162-.76.166-1.069.015-.153-.075-.286-.175-.393-.296-.085-.096-.156-.216-.218-.367 0 0-.179-.447-.179-.947 0-.5.179-1.002.179-1.002.062-.177.136-.318.224-.43.114-.143.256-.259.424-.345.168-.086.365-.129.587-.129.19 0 .364.037.517.109z"/><rect x=".987" y="2" class="st2" width="14.013" height="1.023"/><rect x=".987" y="12.968" class="st2" width="14.013" height="1.023"/><path class="st2" d="M1.991 12.031l.728-2.031h2.219l.778 2.031h1.082l-2.485-7.158h-.941l-2.441 7.086-.025.072h1.085zm1.827-5.609h.022l.914 2.753h-1.841l.905-2.753z"/></g></svg><svg version="1" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#fff" d="M8 1c-3.866 0-7 3.135-7 7s3.134 7 7 7 7-3.135 7-7-3.134-7-7-7zm1 12h-2v-2h2v2zm2-6c0 1.104-.897 2-2 2v1h-2v-1c0-1.104.897-2 2-2v-1.797c-.159-.088-.505-.203-1-.203s-.841.115-1 .203v.797h-2v-1c0-1.158 1.262-2 3-2s3 .842 3 2v2z"/></svg><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path fill="#fff" d="M15 0l-7.938 7.938-5.062-3.938-2 1v10l2 1 5.063-3.938 7.937 7.938 5-2v-16l-5-2zm-13 13v-6l3 3-3 3zm7.714-3l5.286-4.111v8.223l-5.286-4.112z"/></svg><svg version="1" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#fff" d="M12.714 9.602c-.07.207-.15.408-.246.602l1.017 2.139c-.335.424-.718.807-1.142 1.143l-2.14-1.018c-.193.097-.394.176-.601.246l-.795 2.236c-.265.031-.534.05-.807.05-.272 0-.541-.019-.806-.051l-.795-2.234c-.207-.072-.408-.15-.602-.248l-2.14 1.018c-.424-.336-.807-.719-1.143-1.143l1.017-2.139c-.094-.193-.175-.394-.245-.601l-2.236-.795c-.03-.266-.05-.534-.05-.807s.02-.543.05-.807l2.236-.796c.07-.208.15-.407.246-.601l-1.016-2.138c.336-.424.719-.807 1.143-1.143l2.14 1.016c.193-.096.394-.175.602-.246l.795-2.236c.263-.029.532-.049.804-.049.273 0 .542.02.808.051l.795 2.236c.207.07.407.151.601.246l2.14-1.018c.424.336.807.719 1.142 1.143l-1.017 2.139c.096.193.176.393.246.601l2.236.796c.029.263.049.533.049.806s-.02.541-.05.807l-2.236.795zm-4.714-4.602c-1.657 0-3 1.342-3 3 0 1.656 1.343 3 3 3s3-1.344 3-3c0-1.658-1.343-3-3-3zm0 1.5c-.829 0-1.5.672-1.5 1.5s.671 1.5 1.5 1.5 1.5-.672 1.5-1.5-.671-1.5-1.5-1.5z"/></svg><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g fill="#F6F6F6"><circle cx="3.5" cy="7.5" r="2.5"/><circle cx="8.5" cy="7.5" r="2.5"/><circle cx="13.5" cy="7.5" r="2.5"/></g><g fill="#424242"><circle cx="3.5" cy="7.5" r="1.5"/><circle cx="8.5" cy="7.5" r="1.5"/><circle cx="13.5" cy="7.5" r="1.5"/></g></svg><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g fill="#262626"><circle cx="3.5" cy="7.5" r="2.5"/><circle cx="8.5" cy="7.5" r="2.5"/><circle cx="13.5" cy="7.5" r="2.5"/></g><g fill="#C5C5C5"><circle cx="3.5" cy="7.5" r="1.5"/><circle cx="8.5" cy="7.5" r="1.5"/><circle cx="13.5" cy="7.5" r="1.5"/></g></svg>/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
/*---------------------------------------------------------
 * 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 .detected-link {
	text-decoration: underline;
}
.monaco-editor .detected-link-active {
	text-decoration: underline;
	cursor: pointer;
	color: blue !important;
}
.monaco-editor.vs-dark  .detected-link-active {
	color: #4E94CE !important;
}
/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
.hidden {
	display: none !important;
	visibility: hidden !important;
}
.builder-visible {
	display: inherit;
	visibility: visible;
}

/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
 
.monaco-highlighted-label > span {
	opacity: 0.6;
}
.monaco-highlighted-label > .highlight {
	opacity: 1;
}

/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
.monaco-action-bar {
	text-align: center;
	overflow: hidden;
	white-space: nowrap;
}
.monaco-action-bar .actions-container {
	display: inline-block;
	margin: 0 auto;
	padding: 0;
	width: 100%;
}
.monaco-action-bar .action-item {
	cursor: pointer;
	display: inline-block;
	-ms-transition: -ms-transform 100ms ease;
	-webkit-transition: -webkit-transform 100ms ease;
	-moz-transition: -moz-transform 100ms ease;
	-o-transition: -o-transform 100ms ease;
	transition: transform 100ms ease;
}
.monaco-action-bar .action-item.disabled {
	cursor: default;
}
.monaco-action-bar .action-item.active {
	-ms-transform: translate(0, -3px);
	-webkit-transform: translate(0, -3px);
	-moz-transform: translate(0, -3px);
	-o-transform: translate(0, -3px);
	transform: translate(0, -3px);
}
.monaco-action-bar .action-item .icon {
	display: inline-block;
}
.monaco-action-bar .action-label {
	font-size: 12px;
	margin-right: 0.3em;
}
.monaco-action-bar:focus {
	outline: 0;
}
.monaco-action-bar .action-label:focus {
	outline: 0;
}
.monaco-action-bar .action-item.disabled .action-label,
.monaco-action-bar .action-item.disabled .action-label:hover {
	opacity: 0.4;
}
.monaco-action-bar.vertical {
	text-align: left;
}
.monaco-action-bar.vertical .action-item {
	padding-bottom: 0.1em;
	display: block;
}
.monaco-action-bar.vertical .action-label.separator {
	display: block;
	border-bottom: 1px solid #bbb;
	padding-top: 1px;
	margin-left: .8em;
	margin-right: .8em;
}
.monaco-action-bar.vertical .action-item.active {
	-ms-transform: translate(5px, 0);
	-webkit-transform: translate(5px, 0);
	-moz-transform: translate(5px, 0);
	-o-transform: translate(5px, 0);
	transform: translate(5px, 0);
}
.secondary-actions .monaco-action-bar .action-label {
	margin-left: 6px;
}
.monaco-action-bar .action-item .progress-item .label {
	padding: 0.7em;
	background-color: #1382CE;
	display: inline-block;
	vertical-align: top;
	cursor: pointer;
}
.monaco-action-bar .action-item .progress-item .tag {
	display: inline-block;
	vertical-align: top;
	padding: 0.7em 0;
	color: white;
	font-weight: bold;
	text-align: center;
	overflow: hidden;
	width: 0;
	transition: width 200ms;
	-webkit-transition: width 200ms;
	-o-transition: width 200ms;
	-moz-transition: width 200ms;
	-ms-transition: width 200ms;
}
.monaco-action-bar .action-item .progress-item .tag.active {
	width: 1.5em;
}
.monaco-action-bar .action-item .progress-item .tag.progress {
	background-color: gray;
}
.monaco-action-bar .action-item .progress-item .tag.done {
	background-color: green;
}
.monaco-action-bar .progress-item .tag.error {
	background-color: #C33;
}
.monaco-actions-widget {
	position: relative;
}
.monaco-actions-widget .more {
	position: absolute;
	top: 0;
	right: 1em;
	font-weight: bold;
	cursor: pointer;
	display: none;
}
.monaco-actions-widget .more.active {
	-ms-transform: translate(0, -3px);
	-webkit-transform: translate(0, -3px);
	-moz-transform: translate(0, -3px);
	-o-transform: translate(0, -3px);
	transform: translate(0, -3px);
}
.monaco-actions-widget .primary {
	display: none;
}
.monaco-actions-widget.hasPrimary .primary {
	display: inherit;
}
.monaco-actions-widget.hasSecondary .more {
	display: inherit;
}
.monaco-actions-widget .secondary.monaco-action-bar {
	display: none;
}
.monaco-actions-widget.more .secondary.monaco-action-bar {
	display: inherit;
}
/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
.monaco-vtree .row > .content.actions {
	position: relative;
}
.monaco-vtree .row > .content.actions .action-item {
	margin: 0;
}
.monaco-vtree .row > .content.actions > .primary-action-bar {
	line-height: 1em;
}
.monaco-vtree .row > .content.actions > .primary-action-bar {
	display: none;
	position: absolute;
	right: 0;
	top: 0;
	padding: 0 1em 0 0.4em;
}
.monaco-vtree .row:hover:not(.highlighted) > .content.actions > .primary-action-bar,
.monaco-vtree .row > .content.actions.more > .primary-action-bar {
	display: inherit;
}
.monaco-vtree .row > .content.actions > .primary-action-bar .action-label {
	margin-right: 0.2em;
	margin-top: 4px;
	background-repeat: no-repeat;
	width: 16px;
	height: 16px;
}
.monaco-vtree.bare .row > .content.actions > .primary-action-bar {
	color: inherit !important;
	background-color: inherit !important;
}
.monaco-vtree.focused .row.focused:not(.highlighted) > .content.actions > .primary-action-bar 	{ background-color: #DCEBFC; }	
.monaco-vtree.focused .row.selected:not(.highlighted) > .content.actions > .primary-action-bar 	{ background-color: #3399FF; color: white; }
.monaco-vtree .row.focused:not(.highlighted) > .content.actions > .primary-action-bar 			{ background-color: #eaeaea; }
.monaco-vtree .row.selected:not(.highlighted) > .content.actions > .primary-action-bar  		{ background-color: #CCCEDB; }
.monaco-vtree .row:hover:not(.highlighted):not(.selected):not(.focused) > .content.actions > .primary-action-bar  			{ background-color: #F0F0F0; }
.monaco-vtree .row.drop-target > .content.actions > .primary-action-bar							{ background-color: #DDECFF; }
.monaco-vtree .row > .content.actions.more > .primary-action-bar		  						{ background-color: #F6F6F6; } 
.vs-dark .monaco-vtree.focused .row.focused:not(.highlighted) > .content.actions > .primary-action-bar 		{ background-color: #073655; }	
.vs-dark .monaco-vtree.focused .row.selected:not(.highlighted) > .content.actions > .primary-action-bar 	{ background-color: #0E639C; color: white; }
.vs-dark .monaco-vtree .row.focused:not(.highlighted) > .content.actions > .primary-action-bar 				{ background-color: #2f3334; }
.vs-dark .monaco-vtree .row.selected:not(.highlighted) > .content.actions > .primary-action-bar  			{ background-color: #3F3F46; }
.vs-dark .monaco-vtree .row:hover:not(.highlighted):not(.selected):not(.focused) > .content.actions > .primary-action-bar  				{ background-color: #2A2D2E; }
.vs-dark .monaco-vtree .row.drop-target > .content.actions > .primary-action-bar							{ background-color: #383B3D; }
.vs-dark .monaco-vtree .row > .content.actions.more > .primary-action-bar		  							{ background-color: #252526; } 
.hc-black .monaco-vtree.focused .row.focused:not(.highlighted) > .content.actions > .primary-action-bar,
.hc-black .monaco-vtree.focused .row.selected:not(.highlighted) > .content.actions > .primary-action-bar,
.hc-black .monaco-vtree .row.focused:not(.highlighted) > .content.actions > .primary-action-bar,
.hc-black .monaco-vtree .row.selected:not(.highlighted) > .content.actions > .primary-action-bar,
.hc-black .monaco-vtree .row:hover:not(.highlighted):not(.selected):not(.focused) > .content.actions > .primary-action-bar,
.hc-black .monaco-vtree .row.drop-target > .content.actions > .primary-action-bar,
.hc-black .monaco-vtree .row > .content.actions.more > .primary-action-bar {
	background-color: #000;
}
/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
 
.context-view {
	position: absolute;
	z-index: 1000;
}
.context-view .tooltip {
	padding: 10px;
	position: relative;
	margin-top: 8px;
	margin-right: 8px;
	max-width: 350px;
	
	-webkit-animation: fadeIn 0.15s linear;
	-o-animation: fadeIn 0.15s linear;
	-moz-animation: fadeIn 0.15s linear;
	-ms-animation: fadeIn 0.15s linear;
	animation: fadeIn 0.15s linear;
}
.context-view .tooltip:before,
.context-view .tooltip:after {
	content: '';
	position: absolute;
	border-color: transparent;
	border-style: solid;
}
	
.context-view.bottom.right .tooltip:before {
	top: -12px;
	right: 12px;
}
.context-view.bottom.right .tooltip:after {
	top: -9px;
	right: 13px;
}
/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
.monaco-inputbox {
    position: relative;
    display: inline-block;
    padding: 0;
	-webkit-box-sizing:	border-box;
	-o-box-sizing:		border-box;
	-moz-box-sizing:	border-box;
	-ms-box-sizing:		border-box;
	box-sizing:			border-box;
	font-family: "Segoe UI","HelveticaNeue-Light", sans-serif;
    line-height: auto !important;
    
	
    font-size: inherit;
}
.monaco-inputbox > .wrapper > .placeholder-shim,
.monaco-inputbox > .wrapper > .input {
	
	
    padding: 4px;
}
.monaco-inputbox > .wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}
.monaco-inputbox > .wrapper > .input {
    display: inline-block;
	-webkit-box-sizing:	border-box;
	-o-box-sizing:		border-box;
	-moz-box-sizing:	border-box;
	-ms-box-sizing:		border-box;
	box-sizing:			border-box;
    width: 100%;
    height: 100%;
    line-height: inherit;
    border: none;
    font-family: inherit;
    font-size: inherit;
}
.monaco-inputbox > .wrapper > .input:focus {
	outline: none;
}
.monaco-inputbox > .wrapper > .placeholder-shim {
    position: absolute;
    display: inline-block;
	-webkit-box-sizing:	border-box;
	-o-box-sizing:		border-box;
	-moz-box-sizing:	border-box;
	-ms-box-sizing:		border-box;
	box-sizing:			border-box;
	z-index: 1;
    margin-left: 0;
    margin-top: 0;
    width: 100%;
    height: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
	opacity: 0.5;
	cursor: text;
}
.monaco-inputbox-container {
	text-align: right;
}
.monaco-inputbox-container .monaco-inputbox-message {
	display: inline-block;
	overflow: hidden;
	text-align: left;
	width: 100%;
	-webkit-box-sizing:	border-box;
	-o-box-sizing:		border-box;
	-moz-box-sizing:	border-box;
	-ms-box-sizing:		border-box;
	box-sizing:			border-box;
	padding: 0.4em;
	font-size: 12px;
	line-height: 17px;
	min-height: 34px;
	margin-top: -1px;
}
.monaco-inputbox.idle {
	border: 1px solid transparent;
}
.monaco-inputbox.info {
	border: 1px solid #009CCC;
}
.monaco-inputbox-container .monaco-inputbox-message.info {
	background: #D6ECF2;
	border: 1px solid #009CCC;
}
.monaco-inputbox.warning {
	border: 1px solid #F2CB1D;
}
.monaco-inputbox-container .monaco-inputbox-message.warning {
	background: #F6F5D2;
	border: 1px solid #F2CB1D;
}
.monaco-inputbox.error {
	border: 1px solid #E51400;
}
.monaco-inputbox-container .monaco-inputbox-message.error {
	background: #f2dede;
	border: 1px solid #E51400;
}
.vs-dark .monaco-inputbox.info {
	border-color: #55AAFF;
}
.vs-dark .monaco-inputbox-container .monaco-inputbox-message.info {
	background-color: #063B49;
	border-color: #55AAFF;
}
.vs-dark .monaco-inputbox.warning {
	border-color: #B89500;
}
.vs-dark .monaco-inputbox-container .monaco-inputbox-message.warning {
	background-color: #352A05;
	border-color: #B89500;
}
.vs-dark .monaco-inputbox.error {
	border-color: #BE1100;
}
.vs-dark .monaco-inputbox-container .monaco-inputbox-message.error {
	background-color: #5A1D1D;
	border-color: #BE1100;
}
.hc-black .monaco-inputbox.idle {
	border: 1px solid #6FC3DF;
}
.hc-black .monaco-inputbox-container .monaco-inputbox-message.info {
	background-color: #000;
	border-color: #6FC3DF;
}
.hc-black .monaco-inputbox.warning {
	border-color: #B89500;
}
.hc-black .monaco-inputbox-container .monaco-inputbox-message.warning {
	background-color: #000;
	border-color: #B89500;
}
.hc-black .monaco-inputbox.error {
	border-color: #BE1100;
}
.hc-black .monaco-inputbox-container .monaco-inputbox-message.error {
	background-color: #000;
	border-color: #BE1100;
}
/*---------------------------------------------------------
 * 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;
}
.monaco-scrollable-element > .invisible.fade {
	-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-vtree {
	height: 100%;
	width: 100%;
	white-space: nowrap;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: -moz-none;
	-ms-user-select: none;
	-o-user-select: none;
	user-select: none;
}
.monaco-vtree:focus {
	outline: 0;
}
.monaco-vtree > .monaco-scrollable-element {
	height: 100%;
}
.monaco-vtree > .monaco-scrollable-element > .monaco-vtree-wrapper {
	height: 100%;
	width: 100%;
	position: relative;
}
.monaco-vtree .rows {
	position: absolute;
	width: 100%;
}
.monaco-vtree .rows > .row {
	-moz-box-sizing:	border-box;
	-o-box-sizing:		border-box;
	-ms-box-sizing:		border-box;
	box-sizing:			border-box;
	cursor: pointer;
	overflow: hidden;
	width: 100%;
    touch-action: none;
}
.monaco-vtree .rows > .row > .content {
	position: relative;
	-moz-transition:	opacity 0.15s ease-out;
	-webkit-transition:	opacity 0.15s ease-out;
	-ms-transition:		opacity 0.15s ease-out;
	-o-transition:		opacity 0.15s ease-out;
	transition:			opacity 0.15s ease-out;
}
.monaco-vtree .rows > .row.has-children > .content:before,
.monaco-vtree .rows > .row.has-children > .content:after {
	position: absolute;
	display: block;
	content: "";
	width: 0;
	height: 0;
	border-style: solid;
}
.monaco-vtree .rows > .row.has-children > .content:before {
	border-width: 4px;	
	border-left-width: 5px;
	top: 8px;
	left: -10px;
}
.monaco-vtree .rows > .row.has-children > .content:after {
	border-width: 2px;	
	border-left-width: 2px;
	top: 10px;
	left: -9px;
}
.monaco-vtree .rows > .row.expanded > .content:before {
	border-width: 6px 6px 0 5px;
	top: 9px;
	left: -16px;
}
.monaco-vtree .rows > .row.expanded > .content:after {
	border-width: 0;
}
.monaco-vtree .rows > .row.selected.expanded > .content:before {
	border-left-width: 5px;
}
.monaco-vtree.focused .rows > .row.selected.expanded > .content:before {
	border-left-width: 5px;
}
.monaco-vtree .rows > .row.has-children.loading > .content:before {
	background: url(../base/ui/widgets/tree/loading.svg) 50% 50% no-repeat;
	width: 10px;
	height: 10px;
	border: none;
	top: 7px;
	left: -12px;
}
.monaco-vtree .rows > .row.has-children.loading > .content:after {
	background: none;
}
.monaco-vtree.highlighted .rows > .row:not(.highlighted) {
	opacity: 0.3;
}
.monaco-vtree .rows > .row.fake {
	position: absolute;
	visibility: hidden;
	top: -1000px;
	left: -1000px;
	z-index: -100;
}
.monaco-vtree.bare .monaco-vtree-wrapper.drop-target,
.monaco-vtree.bare .row {
	color: inherit !important;
	background-color: inherit !important;
}
.monaco-vtree.focused .rows > .row.focused:not(.highlighted) 	{ background-color: #DCEBFC; }	
.monaco-vtree.focused .rows > .row.selected:not(.highlighted) 	{ background-color: #3399FF; color: white; }
.monaco-vtree .rows > .row.focused:not(.highlighted) 			{ background-color: #eaeaea; }
.monaco-vtree .rows > .row.selected:not(.highlighted)  			{ background-color: #CCCEDB; }
.monaco-vtree .rows > .row:hover:not(.highlighted):not(.selected):not(.focused)  { background-color: #F0F0F0; }
.monaco-vtree .monaco-vtree-wrapper.drop-target,
.monaco-vtree .rows > .row.drop-target							{ background-color: #DDECFF !important; color: inherit !important; }
.monaco-vtree .rows > .row.has-children > .content:before					{ border-color: transparent; border-left-color: #A6A6A6; }
.monaco-vtree .rows > .row.has-children > .content:after					{ border-color: transparent; border-left-color: #F6F6F6; }
.monaco-vtree.focused .rows > .row.selected.has-children > .content:before	{ border-left-color: white; }
.monaco-vtree .rows > .row.selected.has-children > .content:before			{ border-left-color: #646465; }
.monaco-vtree .rows > .row.has-children:hover:not(.selected):not(.focused) > .content:after				{ border-left-color: #f0f0f0; }
.monaco-vtree .rows > .row.selected.has-children > .content:after			{ border-left-color: #CCCEDB; }
.monaco-vtree.focused .rows > .row.selected.has-children > .content:after	{ border-left-color: #3399FF; }
.monaco-vtree .rows > .row.expanded > .content:before						{ border-color: transparent; border-right-color: #646465; }
.monaco-vtree .rows > .row.expanded > .content:after						{ border-color: transparent; }
.monaco-vtree .rows > .row.selected.expanded > .content:before				{ border-left-color: transparent; }
.monaco-vtree.focused .rows > .row.selected.expanded > .content:before		{ border-right-color: white; border-left-color: transparent; }
.vs-dark .monaco-vtree.focused .row.focused:not(.highlighted) 	{ background-color: #073655; }
.vs-dark .monaco-vtree.focused .row.selected:not(.highlighted)	{ background-color: #0E639C; color: white; }
.vs-dark .monaco-vtree .row.focused:not(.highlighted) 			{ background-color: #2f3334; }
.vs-dark .monaco-vtree .row.selected:not(.highlighted)			{ background-color: #3F3F46; }
.vs-dark .monaco-vtree .row:hover:not(.highlighted):not(.selected):not(.focused) 			{ background-color: #2A2D2E; }
.vs-dark .monaco-vtree-wrapper.drop-target,
.vs-dark .monaco-vtree .row.drop-target							{ background-color: #383B3D !important; color: inherit !important; }
.vs-dark .monaco-vtree .rows > .row.has-children > .content:before						{ border-left-color: #D4D4D4; }
.vs-dark .monaco-vtree .rows > .row.has-children > .content:after						{ border-left-color: #252526; }
.vs-dark .monaco-vtree .rows > .row.expanded > .content:before							{ border-left-color: transparent; border-right-color: #D4D4D4; }
.vs-dark .monaco-vtree .rows > .row.has-children:hover:not(.selected):not(.focused) > .content:after	{ border-left-color: #2A2D2E; }
.hc-black .monaco-vtree .rows > .row 														{ background: none !important; }
.hc-black .monaco-vtree.focused .rows > .row.focused:not(.highlighted) 						{ border: 1px dotted #DF740C; }	
.hc-black .monaco-vtree.focused .rows > .row.selected:not(.highlighted) 					{ border: 1px solid #DF740C; }
.hc-black .monaco-vtree .rows > .row.focused:not(.highlighted) 								{ border: 1px dotted #DF740C; }
.hc-black .monaco-vtree .rows > .row.selected:not(.highlighted)  							{ border: 1px solid #DF740C; }
.hc-black .monaco-vtree .rows > .row:hover:not(.highlighted):not(.selected):not(.focused)  	{ border: 1px dashed #DF740C; }
.hc-black .monaco-vtree .monaco-vtree-wrapper.drop-target,
.hc-black .monaco-vtree .rows > .row.drop-target											{ background: none !important; border: 1px dashed #DF740C; }
.hc-black .monaco-vtree .rows > .row.has-children > .content:before	{ 
	border: none;
	content: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTYgNHY4bDQtNC00LTR6bTEgMi40MTRsMS41ODYgMS41ODYtMS41ODYgMS41ODZ2LTMuMTcyeiIvPjwvc3ZnPg==);
	top: 2px;
	left: -16px;
}
.hc-black .monaco-vtree .rows > .row.has-children > .content:after	{ 
	border: none; 
}
.hc-black .monaco-vtree .rows > .row.expanded > .content:before {
	border: none;
	content: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTExIDEwLjA3aC01LjY1Nmw1LjY1Ni01LjY1NnY1LjY1NnoiLz48L3N2Zz4=);
	top: 3px;
}

/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
.progress-container {
	width: 100%;
	height: 5px;	
}
.progress-container .progress-bit {
	width: 2%;
	height: 5px;
	position: absolute;
	left: 0;
	display: none;
	background-color: #0E70C0;
}
.progress-container.active .progress-bit {
	display: inherit;
}
.progress-container.discrete .progress-bit {
	left: 0;
	transition: width 100ms linear;
	-webkit-transition: width 100ms linear;
	-o-transition: width 100ms linear;
	-moz-transition: width 100ms linear;
	-ms-transition: width 100ms linear;
}
.progress-container.discrete.done .progress-bit {
	width: 100%;
}
.progress-container.infinite .progress-bit {
	animation-name: progress;
	animation-duration: 4s;
	animation-iteration-count: infinite;
	animation-timing-function: linear;
	-ms-animation-name: progress;
	-ms-animation-duration: 4s;
	-ms-animation-iteration-count: infinite;
	-ms-animation-timing-function: linear;
	-webkit-animation-name: progress;
	-webkit-animation-duration: 4s;
	-webkit-animation-iteration-count: infinite;
	-webkit-animation-timing-function: linear;
	-moz-animation-name: progress;
	-moz-animation-duration: 4s;
	-moz-animation-iteration-count: infinite;
	-moz-animation-timing-function: linear;
}
.progress-container.infinite.done .progress-bit {
	transition: opacity 200ms linear;
	-webkit-transition: opacity 200ms linear;
	-o-transition: opacity 200ms linear;
	-moz-transition: opacity 200ms linear;
	-ms-transition: opacity 200ms linear;
}
@keyframes progress { from { left: 0; width: 2%; }	50% { left: 50%; width: 5%; } to { left: 98%; width: 2%; } }
@-ms-keyframes progress { from { left: 0; width: 2%; }	50% { left: 50%; width: 5%; } to { left: 98%; width: 2%; } }
@-webkit-keyframes progress { from { left: 0; width: 2%; }	50% { left: 50%; width: 5%; } to { left: 98%; width: 2%; } }
@-moz-keyframes progress { from { left: 0; width: 2%; }	50% { left: 50%; width: 5%; } to { left: 98%; width: 2%; } }

/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
 
.quick-open-widget {
	position: absolute;
	width: 600px;
	z-index: 1000;
	padding-bottom: 6px;
	left: 50%;
	margin-left: -300px;
}
.quick-open-widget .progress-container {
	position: absolute;
	left: 0;
	top: 38px;
	z-index: 1;
	height: 2px;
}
.quick-open-widget .progress-container .progress-bit {
	height: 2px;
}
.quick-open-widget .quick-open-input {
	width: 588px;
	border: none;
	margin: 6px;
	outline: 0;
}
.quick-open-widget .quick-open-input .monaco-inputbox {
	width: 100%;
}
.quick-open-widget .quick-open-tree {
	line-height: 1.8em;
	height: 0; 
}
.quick-open-widget .quick-open-tree.transition {
	-webkit-transition:	height 100ms ease-in;
	-ms-transition:		height 100ms ease-in;
	-moz-transition:	height 100ms ease-in;
	-khtml-transition:	height 100ms ease-in;
	-o-transition:		height 100ms ease-in;
	transition:			height 100ms ease-in;
}
.quick-open-widget .quick-open-tree .quick-open-entry {
	overflow: hidden;
	text-overflow: ellipsis;
}
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon {
	overflow: hidden;
	width: 16px;
	height: 16px;
	margin-right: 4px;
	display: inline-block;
	vertical-align: middle;
}
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-help-entry-label {
	float: left;
	width: 16px;
	text-align: center;
}
.quick-open-widget .quick-open-tree .quick-open-entry .monaco-highlighted-label span {
	opacity: 1;
}
.quick-open-widget .quick-open-tree .quick-open-entry-meta {
	opacity: 0.7;
}
.quick-open-widget .quick-open-tree .quick-open-entry-description {
	opacity: 0.7;
	margin-left: 0.5em;
	font-size: 0.9em;
}
.quick-open-widget .quick-open-tree .results-group {
	float: right;
    opacity: 0.6;
    margin-right: 18px;
}
.quick-open-widget .quick-open-tree .results-group-separator {
	border-top-width: 1px;
	border-top-style: solid;
    box-sizing: border-box;
	margin-left: -11px;
	padding-left: 11px;
}
.quick-open-widget {
	background-color: #F6F6F6;
	box-shadow: 0 2px 8px #A8A8A8;
}
.quick-open-widget.no-shadow {
	box-shadow: none;
	border: 1px solid #E6E6E6;
}
.vs-dark .quick-open-widget {
	background-color: #252526;
	box-shadow: 0 2px 8px #000;
}
.vs-dark .quick-open-widget.no-shadow {
	box-shadow: none;
	border: 1px solid #000;
}
.vs-dark .quick-open-widget input { 
	background-color: #3C3C3C; 
	color: inherit;
}
.hc-black .quick-open-widget input { 
	background-color: #000; 
	color: inherit;
}
.monaco .quick-open-widget {
	background-color: #F9F9F9;
}
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-help-entry-label {
	color: #007ACC;
}
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-help-entry-label {
	color: #0097FB;
}
.quick-open-widget .quick-open-tree .results-group {
	color: #007ACC;
}
.vs-dark .quick-open-widget .quick-open-tree .results-group {
	color: #0097FB;
}
.quick-open-widget .quick-open-tree .results-group-separator {
	border-top-color: #CCCEDB;
}
.vs-dark .quick-open-widget .quick-open-tree .results-group-separator {
	border-top-color: #3F3F46;
}
.quick-open-widget .quick-open-tree .quick-open-entry .monaco-highlighted-label .highlight {
	color: #007ACC;
	font-weight: bold;
}
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .monaco-highlighted-label .highlight {
	color: #0097FB;
}
.hc-black .quick-open-widget {
	border: 2px solid #6FC3DF;
	background-color: #0C141F;
	color: #fff;
	box-shadow: none;
}
.hc-black .quick-open-widget .monaco-vtree.focused .row.focused:not(.highlighted) > .content.actions > .primary-action-bar,
.hc-black .quick-open-widget .monaco-vtree.focused .row.selected:not(.highlighted) > .content.actions > .primary-action-bar,
.hc-black .quick-open-widget .monaco-vtree .row.focused:not(.highlighted) > .content.actions > .primary-action-bar,
.hc-black .quick-open-widget .monaco-vtree .row.selected:not(.highlighted) > .content.actions > .primary-action-bar,
.hc-black .quick-open-widget .monaco-vtree .row:hover:not(.highlighted):not(.selected):not(.focused) > .content.actions > .primary-action-bar,
.hc-black .quick-open-widget .monaco-vtree .row.drop-target > .content.actions > .primary-action-bar,
.hc-black .quick-open-widget .monaco-vtree .row > .content.actions.more > .primary-action-bar {
	background-color: #0C141F;
}
/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
.quick-open-widget {
	font-family: 'Segoe WPC', 'Segoe UI', HelveticaNeue-Light, sans-serif;
	font-size: 13px;
}
/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
.quick-open-widget {
	font-family: 'Segoe WPC', 'Segoe UI', HelveticaNeue-Light, sans-serif;
	font-size: 13px;
}
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon,
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon {
	background-image: url(contrib/quickOpen/symbol-sprite.svg);
	background-repeat: no-repeat;
}
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.method,
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.function,
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.constructor		{ background-position: 0 -4px; }
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable 			{ background-position: -22px -4px; }
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class 				{ background-position: -43px -3px; }
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface 			{ background-position: -63px -4px; }
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module 			{ background-position: -82px -4px; }
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property 			{ background-position: -102px -3px; }
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum		 		{ background-position: -122px -3px; }
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule		 		{ background-position: -242px -4px; }
.quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file		 		{ background-position: -262px -4px; }
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.method,
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.function,
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.constructor 	{ background-position: 0 -24px; }
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable 		{ background-position: -22px -24px; }
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class 		{ background-position: -43px -23px; }
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface 	{ background-position: -63px -24px; }
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module 		{ background-position: -82px -24px; }
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property 		{ background-position: -102px -23px; }
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum		 	{ background-position: -122px -23px; }
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule		 	{ background-position: -242px -24px; }
.vs-dark .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file		 	{ background-position: -262px -24px; }
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon {
	background: none;
	display: inline;
}
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon:before {
	height: 16px;
	width: 16px;
	display: inline-block;
}
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.method:before,
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.function:before,
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.constructor:before { 
	content: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0IxODBENyIgZD0iTTUuNSAzbC00LjUgMi44NTd2NC4yODVsNC41IDIuODU4IDQuNS0yLjg1N3YtNC4yODZsLTQuNS0yLjg1N3ptLS41IDguNDk4bC0zLTEuOTA1di0yLjgxNmwzIDEuOTA1djIuODE2em0tMi4zNTgtNS40OThsMi44NTgtMS44MTUgMi44NTggMS44MTUtMi44NTggMS44MTUtMi44NTgtMS44MTV6bTYuMzU4IDMuNTkzbC0zIDEuOTA1di0yLjgxNWwzLTEuOTA1djIuODE1eiIvPjwvc3ZnPg==); 
	margin-left: 2px;
}
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.field:before,
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.variable:before { 
	content: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iIzc1QkVGRiIgZD0iTTEgNnY0bDQgMiA2LTN2LTRsLTQtMi02IDN6bTQgMWwtMi0xIDQtMiAyIDEtNCAyeiIvPjwvc3ZnPg==); 
	margin-left: 2px;
}
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.class:before { 
	content: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBvbHlnb24gZmlsbD0iI0U4QUI1MyIgcG9pbnRzPSIxMS45OTgsMTEuMDAyIDksMTEgOSw3IDExLDcgMTAsOCAxMiwxMCAxNSw3IDEzLDUgMTIsNiA3LDYgOSw0IDYsMSAxLDYgNCw5IDYsNyA4LDcgOCwxMiAxMSwxMiAxMCwxMyAxMiwxNSAxNSwxMiAxMywxMCIvPjwvc3ZnPg==); 
}
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.interface:before { 
	content: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iIzc1QkVGRiIgZD0iTTExLjUgNGMtMS43NTkgMC0zLjIwNCAxLjMwOC0zLjQ0OSAzaC0zLjEyMmMtLjIyMy0uODYxLS45OTgtMS41LTEuOTI5LTEuNS0xLjEwNCAwLTIgLjg5NS0yIDIgMCAxLjEwNC44OTYgMiAyIDIgLjkzMSAwIDEuNzA2LS42MzkgMS45MjktMS41aDMuMTIyYy4yNDUgMS42OTEgMS42OSAzIDMuNDQ5IDMgMS45MyAwIDMuNS0xLjU3IDMuNS0zLjUgMC0xLjkzMS0xLjU3LTMuNS0zLjUtMy41em0wIDVjLS44MjcgMC0xLjUtLjY3NC0xLjUtMS41IDAtLjgyOC42NzMtMS41IDEuNS0xLjVzMS41LjY3MiAxLjUgMS41YzAgLjgyNi0uNjczIDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==); 
}
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.module:before { 
	content: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTkgMTF2LTFjMC0uODM0LjQ5Ni0xLjczOCAxLTItLjUwNC0uMjctMS0xLjE2OC0xLTJ2LTFjMC0uODQtLjU4NC0xLTEtMXYtMWMyLjA4MyAwIDIgMS4xNjYgMiAydjFjMCAuOTY5LjcwMy45OCAxIDF2MmMtLjMyMi4wMi0xIC4wNTMtMSAxdjFjMCAuODM0LjA4MyAyLTIgMnYtMWMuODMzIDAgMS0xIDEtMXptLTYgMHYtMWMwLS44MzQtLjQ5Ni0xLjczOC0xLTIgLjUwNC0uMjcgMS0xLjE2OCAxLTJ2LTFjMC0uODQuNTg0LTEgMS0xdi0xYy0yLjA4MyAwLTIgMS4xNjYtMiAydjFjMCAuOTY5LS43MDMuOTgtMSAxdjJjLjMyMi4wMiAxIC4wNTMgMSAxdjFjMCAuODM0LS4wODMgMiAyIDJ2LTFjLS44MzMgMC0xLTEtMS0xeiIvPjwvc3ZnPg==);
	margin-left: 2px;
}
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.property:before	{ 
	content: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTEyLjA5IDQuMzU5bC0yLjY0MSAyLjY0MS0yLTIgMi42NDEtMi42NDFjLS41MDItLjIyNi0xLjA1NS0uMzU5LTEuNjQxLS4zNTktMi4yMDkgMC00IDEuNzkxLTQgNCAwIC41ODYuMTMzIDEuMTM5LjM1OSAxLjY0bC0zLjM1OSAzLjM2cy0xIDEgMCAyaDJsMy4zNTktMy4zNmMuNTAzLjIyNiAxLjA1NS4zNiAxLjY0MS4zNiAyLjIwOSAwIDQtMS43OTEgNC00IDAtLjU4Ni0uMTMzLTEuMTM5LS4zNTktMS42NDF6Ii8+PC9zdmc+); 
	margin-left: 1px;
}
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.value:before,
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.enum:before	{ 
	content: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PGcgZmlsbD0iIzc1QkVGRiI+PHBhdGggZD0iTTEyIDNoLTRsLTEgMXYyaDV2MWgtMnYxaDJsMS0xdi0zbC0xLTF6bTAgMmgtNHYtMWg0djF6TTMgMTJoNnYtNWgtNnY1em0xLTNoNHYxaC00di0xeiIvPjwvZz48L3N2Zz4=); 
}
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.rule:before { 
	content: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTEwIDVoLTh2LTJoOHYyem0wIDFoLTZ2MWg2di0xem0wIDJoLTZ2MWg2di0xeiIvPjwvc3ZnPg==); 
}
.hc-black .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.file:before { 
	content: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZmlsbD0iI0M1QzVDNSIgZD0iTTkuNjc2IDJoLTYuNjc2djEyaDEwdi05bC0zLjMyNC0zem0yLjMyNCAxMWgtOHYtMTBoNXYzaDN2N3oiLz48L3N2Zz4=); 
}
/*---------------------------------------------------------
 * 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 .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-editor .current-line {
	position: absolute;
	left: 0;
}
/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
.monaco-editor .lines-content .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 .lines-content .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-workbench-container .monaco-editor .glyph-margin {
	background: white;
}
.monaco-editor .margin-view-overlays .cgmr {
	position: absolute;
}
/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
.monaco-editor .lines-decorations {
	position: absolute;
	top: 0;
	background: white;
}
.monaco-editor .margin-view-overlays .cldr {
	position: absolute;
}
/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
.monaco-editor .margin-view-overlays .line-numbers {
	position: absolute;
	text-align: right;
	cursor: default;
}
/*---------------------------------------------------------
 * 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 {
	position: absolute;
	top: 0;
}
.monaco-editor .view-overlays > .static {
	position: absolute;
	top: 0;
}
.monaco-editor .inputarea {
	
	width: 1px;
	height: 1px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	position: absolute;
	outline: none;
	resize: none;
	border: none;
	overflow: hidden;
}
.monaco-editor.ff .inputarea,
.monaco-editor.ie .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;
}
.monaco-editor .lines-content,
.monaco-editor .view-line,
.monaco-editor .view-line > span,
.monaco-editor .view-line > span > span,
.monaco-editor .view-lines {
	-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,
.monaco-editor.ie .view-line,
.monaco-editor.ie .view-line > span,
.monaco-editor.ie .view-line > span > span,
.monaco-editor.ie .view-lines {
	-ms-user-select: none;
	user-select: none;
}
.monaco-editor .view-lines {
	cursor: text;
	white-space: nowrap;
}
.monaco-editor .view-line {
	position: absolute;
	width: 100%;
}
.margin-view-overlays > .view-line {
	width: 100%;
}
.monaco-editor .view-layer-line {
	position: relative;
	overflow: visible;
	width: 100%;
}
.monaco-editor .redsquiggly {
	background: url(css/red-squiggly.svg) repeat-x bottom left;
}
.monaco-editor .greensquiggly {
	background: url(css/green-squiggly.svg) 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 .token							{ color: #000000; }
.monaco-editor .token.whitespace				{ color: rgba(51, 51, 51, 0.2) !important; }
.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; }
.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.predefined.ruby           { color: #0000FF; }
.monaco-editor .token.emphasis       			{ font-style: italic;}
.monaco-editor .token.strong         			{ font-weight: bold; }
.monaco-editor .token.header         			{ color: navy ;}
.monaco-editor .token.string.key				{ color: #A31515; }
.monaco-editor .token.string.value				{ color: #0451A5; }
.monaco-editor .token.type						{ color: #008080; }
.monaco-editor .token.identifier.method			{ color: #e07000; }
.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.vs-dark .token							{ color: #D4D4D4; }
.monaco-editor.vs-dark .token.whitespace				{ color: rgba(227, 228, 226, 0.16) !important; }
.monaco-editor.vs-dark .token.comment					{ color: #929292; }
.monaco-editor.vs-dark .token.comment.doc				{ color: #608B4E; }
.monaco-editor.vs-dark .token.number					{ color: #B5CEA8; }
.monaco-editor.vs-dark .token.number.hex				{ color: #5BB498; }
.monaco-editor.vs-dark .token.string					{ color: #CE9178; }
.monaco-editor.vs-dark .token.regexp					{ color: #B46695; }
.monaco-editor.vs-dark .token.string.escape			    { color: #CE9178; }
.monaco-editor.vs-dark .token.delimiter					{ color: #DCDCDC; }
.monaco-editor.vs-dark .token.keyword					{ color: #4E94CE; }
.monaco-editor.vs-dark .token.info-token				{ color: #6796e6; }
.monaco-editor.vs-dark .token.warn-token				{ color: #cd9731; }
.monaco-editor.vs-dark .token.error-token				{ color: #f44747; }
.monaco-editor.vs-dark .token.debug-token				{ color: #b267e6; }
.monaco-editor.vs-dark .token.meta						{ color: #BD5050; }
.monaco-editor.vs-dark .token.key						{ color: #9CDCFE; }
.monaco-editor.vs-dark .token.variable					{ color: #74B0DF; }
.monaco-editor.vs-dark .token.attribute.name			{ color: #9CDCFE; }
.monaco-editor.vs-dark .token.attribute.value			{ color: #CE9178; }
.monaco-editor.vs-dark .token.keyword.flow				{ color: #C586C0; }
.monaco-editor.vs-dark .token.keyword.datatype			{ color: #4E94CE; }
.monaco-editor.vs-dark .token.tag						{ color: #D7BA7D; }
.monaco-editor.vs-dark .token.type						{ color: #3DC9B0; }
.monaco-editor.vs-dark .token.tag.html					{ color: #569CD6; }
.monaco-editor.vs-dark .token.delimiter.html			{ color: #808080; }
.monaco-editor.vs-dark .token.meta.content.html			{ color: #9CDCFE; }
.monaco-editor.vs-dark .token.meta.html					{ color: #569CD6; }
.monaco-editor.vs-dark .token.tag.xml					{ color: #569CD6; }
.monaco-editor.vs-dark .token.delimiter.xml				{ color: #808080; }
.monaco-editor.vs-dark .token.meta.content.xml			{ color: #9CDCFE; }
.monaco-editor.vs-dark .token.meta.xml					{ color: #569CD6; }
.monaco-editor.vs-dark .token.attribute.name.css			{ color: #9CDCFE; }
.monaco-editor.vs-dark .token.attribute.value.css		{ color: #C8C8C8; }
.monaco-editor.vs-dark .token.delimiter.css				{ color: #DCDCDC; }
.monaco-editor.vs-dark .token.vs						{ color: #608B4E; }
.monaco-editor.vs-dark .token.tag.vs					{ color: #949494; }
.monaco-editor.vs-dark .token.delimiter.vs				{ color: #585858; }
.monaco-editor.vs-dark .token.attribute.name.vs			{ color: #949494; }
.monaco-editor.vs-dark .token.attribute.value.vs		{ color: #C4C4C4; }
.monaco-editor.vs-dark .token.meta.java					{ color: #cc6666; }
.monaco-editor.vs-dark .token.tag.jade						{ color: #569CD6; }
.monaco-editor.vs-dark .token.tag.id.jade,
.monaco-editor.vs-dark .token.tag.class.jade				{ color: #4F76AC; }
.monaco-editor.vs-dark .token.interpolation.jade 			{ color: magenta; }
.monaco-editor.vs-dark .token.interpolation.delimiter.jade 	{ color: magenta; }
.monaco-editor.vs-dark .token.predefined.ruby           	{ color: #4E94CE; }
.monaco-editor.hc-white .token							{ color: #000; }
.monaco-editor.hc-white .token.whitespace				{ color: #0000FF !important; }
.monaco-editor.hc-white .token.comment					{ color: #008000; }
.monaco-editor.hc-white .token.number						{ color: #000; }
.monaco-editor.hc-white .token.string						{ color: #A31515; }
.monaco-editor.hc-white .token.delimiter					{ color: #0000FF; }
.monaco-editor.hc-white .token.keyword					{ color: #0000FF; }
.monaco-editor.hc-white .token.info-token					{ color: #6796e6; }
.monaco-editor.hc-white .token.warn-token					{ color: #008000; }
.monaco-editor.hc-white .token.error-token				{ color: #FF0000; }
.monaco-editor.hc-white .token.debug-token				{ color: #b267e6; }
.monaco-editor.hc-white .token.attribute.name				{ color: #FF0000; }
.monaco-editor.hc-white .token.attribute.value			{ color: #0000FF; }
.monaco-editor.hc-white .token.tag.html					{ color: #800000; }
.monaco-editor.hc-white .token.delimiter.html				{ color: #0000FF; }
.monaco-editor.hc-white .token.meta.content.html			{ color: #FF0000; }
.monaco-editor.hc-white .token.meta.html					{ color: #569CD6; }
.monaco-editor.hc-white .token.tag.xml					{ color: #800000; }
.monaco-editor.hc-white .token.delimiter.xml				{ color: #0000FF; }
.monaco-editor.hc-white .token.meta.content.xml			{ color: #FF0000; }
.monaco-editor.hc-white .token.meta.xml					{ color: #569CD6; }
.monaco-editor.hc-white .token.attribute.name.css			{ color: #FF0000; }
.monaco-editor.hc-white .token.attribute.value.css		{ color: #0000FF; }
.monaco-editor.hc-white .token.tag.css					{ color: #800000; }
.monaco-editor.hc-white .token.delimiter.css				{ color: #000; }
.monaco-editor.hc-white .token.vs							{ color: #000; }
.monaco-editor.hc-white .token.meta.java					{ color: #cc6666; }
.monaco-editor.hc-black .token							{ color: #FFFFFF; }
.monaco-editor.hc-black .token.whitespace				{ color: #FFFF00 !important; }
.monaco-editor.hc-black .token.meta						{ color: #569CD6; }
.monaco-editor.hc-black .token.keyword					{ color: #1AEBFF; }
.monaco-editor.hc-black .token.key						{ color: #9CDCFE; }
.monaco-editor.hc-black .token.variable					{ color: #1AEBFF; }
.monaco-editor.hc-black .token.variable.predefined		{ color: #1AEBFF; }
.monaco-editor.hc-black .token.constant					{ color: #dd0000; }
.monaco-editor.hc-black .token.comment					{ color: #008000; }
.monaco-editor.hc-black .token.literal					{ color: #FFFFFF; }
.monaco-editor.hc-black .token.literal.hex				{ color: #FFFFFF; }
.monaco-editor.hc-black .token.number					{ color: #FFFFFF; }
.monaco-editor.hc-black .token.number.hex				{ color: #FFFFFF; }
.monaco-editor.hc-black .token.number.octal				{ color: #FFFFFF; }
.monaco-editor.hc-black .token.number.binary				{ color: #FFFFFF; }
.monaco-editor.hc-black .token.regexp					{ color: #C0C0C0; }
.monaco-editor.hc-black .token.string					{ color: #C0C0C0; }
.monaco-editor.hc-black .token.string.escape				{ color: #C0C0C0; }
.monaco-editor.hc-black .token.delimiter					{ color: #FFFF00; }
.monaco-editor.hc-black .token.info-token				{ color: #6796e6; }
.monaco-editor.hc-black .token.warn-token				{ color: #008000; }
.monaco-editor.hc-black .token.error-token				{ color: #FF0000; }
.monaco-editor.hc-black .token.debug-token				{ color: #b267e6; }
.monaco-editor.hc-black .token.attribute.name			{ color: #569CD6; }
.monaco-editor.hc-black .token.attribute.value			{ color: #3FF23F; }
.monaco-editor.hc-black .token.tag						{ color: #FFA500; }
.monaco-editor.hc-black .token.tag.html					{ color: #1AEBFF; }
.monaco-editor.hc-black .token.delimiter.html			{ color: #FFFF00; }
.monaco-editor.hc-black .token.meta.content.html			{ color: #1AEBFF; }
.monaco-editor.hc-black .token.meta.html					{ color: #569CD6; }
.monaco-editor.hc-black .token.tag.xml					{ color: #1AEBFF; }
.monaco-editor.hc-black .token.delimiter.xml				{ color: #FFFF00; }
.monaco-editor.hc-black .token.meta.content.xml			{ color: #1AEBFF; }
.monaco-editor.hc-black .token.meta.xml					{ color: #569CD6; }
.monaco-editor.hc-black .token.attribute.name.css		{ color: #569CD6; }
.monaco-editor.hc-black .token.attribute.value.css		{ color: #3FF23F; }
.monaco-editor.hc-black .token.delimiter.css				{ color: #FFFF00; }
.monaco-editor.hc-black .token.vs						{ color: #FFFFFF; }
.monaco-editor.hc-black .token.meta.java					{ color: #569CD6; }

/*---------------------------------------------------------
 * 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: #fffffe; 
}
.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 {
	color: #2B91AF;
}
.monaco-editor .lineHighlight {
	background-color: rgba(253, 255, 0, 0.2);
}
.monaco-editor .view-overlays.focused .selected-text {
	background: #ADD6FF !important;
}
.monaco-editor .view-overlays .selected-text {
	background: #E5EBF1 !important;
}
.monaco-diff-editor .diffOverview {
	background-color: #f9f7f7;
}
.monaco-editor .wordHighlight {
	background-color: rgba(87, 87, 87, 0.25);
}
.monaco-editor .wordHighlightStrong {
	background-color: rgba(14, 99, 156, 0.25);
}
.monaco-editor .selectionHighlight {
	background-color: rgba(173, 214, 255, 0.3);
}
.monaco-editor .valueSetReplacement {
	outline: solid 2px #888;
}
.monaco-editor .focus-mode {
	background-color: #FFFFFF;
	opacity: 0.333;
}

/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
.monaco-sash {
	position: absolute;
	z-index: 100;
    touch-action: none;
}
.monaco-sash.vertical {
	cursor: ew-resize;
	height: 100%;
	top: 0;
}
.monaco-sash.horizontal {
	cursor: ns-resize;
	width: 100%;
	left: 0;
}
.monaco-sash.disabled {
	cursor: default;
}
/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
.monaco-diff-editor .diffOverview {
	z-index: 99;
}
.monaco-diff-editor .diffViewport {
	box-shadow: inset 0px 0px 1px 0px #B9B9B9;
	background: rgba(148, 148, 148, 0.19);
}
.monaco-diff-editor.vs-dark {
	background: #1E1E1E;
}
.monaco-scrollable-element.modified-in-monaco-diff-editor .scrollbar {
	background: rgba(0,0,0,0);
}
.monaco-scrollable-element.modified-in-monaco-diff-editor .slider {
	z-index: 100;
}
.modified-in-monaco-diff-editor .slider.active {
	background: rgba(171, 171, 171, .4);
}
.monaco-diff-editor.side-by-side .editor.modified {
	box-shadow: -6px 0 5px -5px #DDD;
}
.monaco-diff-editor.side-by-side.vs-dark .editor.modified {
	box-shadow: -6px 0 5px -5px black;
}
.monaco-editor .line-delete, .monaco-editor .char-delete {
	background: rgba(255, 0, 0, 0.2);
}
.monaco-editor .line-insert, .monaco-editor .char-insert {
	background: rgba(155, 185, 85, 0.2);
}
.monaco-editor .diagonal-fill {
	background: url(diff/diagonal-fill.png);
}
.monaco-editor.vs-dark .diagonal-fill {
	opacity: 0.2;
}
.monaco-editor .view-zones .view-lines .view-line span {
	display: inline-block;
}
.monaco-diff-editor.hc-black {
	background: #000;
}
/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
.monaco-menu .monaco-action-bar.vertical {
	margin-left: 0;
}
.monaco-menu .monaco-action-bar.vertical .actions-container {
	display: block;
}
.monaco-menu .monaco-action-bar.vertical .action-item {
	padding: 0;
	-ms-transform: none;
	-webkit-transform: none;
	-moz-transform: none;
	-o-transform: none;
	transform: none;
	display: -ms-flexbox;
	display: flex;
}
.monaco-menu .monaco-action-bar.vertical .action-item.active {
	-ms-transform: none;
	-webkit-transform: none;
	-moz-transform: none;
	-o-transform: none;
	transform: none;
}
.monaco-menu .monaco-action-bar.vertical .action-item.focused {
	background-color: #E4E4E4;
}
.monaco-menu .monaco-action-bar.vertical .action-item:hover:not(.disabled) {
	background-color: #EEE;
}
.monaco-menu .monaco-action-bar.vertical .action-label {
	-ms-flex: 1 1 auto;
	flex: 1 1 auto;
	text-decoration: none;
	padding: 0.8em 1em;
	line-height: 1.1em;
	background: none;
}
.monaco-menu .monaco-action-bar.vertical .keybinding {
	display: inline-block;
	-ms-flex: 2 1 auto;
	flex: 2 1 auto;
	opacity: 0.7;
	padding: 0.8em 1em;
	line-height: 1.1em;
	font-size: 12px;
	text-align: right;
}
.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding {
	opacity: 0.4;
}
.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {
	display: inline-block;
	-webkit-box-sizing:	border-box;
	-o-box-sizing:		border-box;
	-moz-box-sizing:	border-box;
	-ms-box-sizing:		border-box;
	box-sizing:			border-box;
	margin: 0;
}
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
	padding: 0.5em 0 0 0;
	margin-bottom: 0.5em;
	width: 100%;
}
.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {
	padding: 0.7em 1em 0.1em 1em;
	font-weight: bold;
	opacity: 1;
}
.monaco-menu .monaco-action-bar.vertical .action-label:hover {
	color: inherit;
}
.context-view.monaco-menu-container {	
	font-family: "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", sans-serif;
	outline: 0;
	box-shadow: 0 2px 8px #A8A8A8;
	border: none;
	color: #646465;
	background-color: white;
	-webkit-animation: fadeIn 0.083s linear;
	-o-animation: fadeIn 0.083s linear;
	-moz-animation: fadeIn 0.083s linear;
	-ms-animation: fadeIn 0.083s linear;
	animation: fadeIn 0.083s linear;
}
.ie.ie9 .context-view.monaco-menu-container {
	box-shadow: 0 2px 8px 2px #A8A8A8;
}	
.context-view.monaco-menu-container :focus {	
	outline: 0;
}
.vs-dark .monaco-menu .monaco-action-bar.vertical .action-item.focused {
	background-color: #4B4C4D;
}
.vs-dark .monaco-menu .monaco-action-bar.vertical .action-item:hover:not(.disabled) {
	background-color: #3A3A3A;
}
.vs-dark .context-view.monaco-menu-container {	
	box-shadow: 0 2px 8px #000;
	color: #BBB;
	background-color: #2D2F31; 
}
.hc-black .context-view.monaco-menu-container {	
	border: 2px solid #6FC3DF;
	color: white;
	background-color: #0C141F;
	box-shadow: none;
}
.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused {
	background: none;
	border: 1px dotted #DF740C;
}
.hc-black .monaco-menu .monaco-action-bar.vertical .action-item:hover:not(.disabled) {
	background: none;
	border: 1px dashed #DF740C;
}
/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
 
.context-view .monaco-menu {
	min-width: 130px;
}

/*---------------------------------------------------------
 * 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-editor .monaco-editor-hover .typeInfo.ts .ts-symbol {
	color: #000000;
}
.monaco-editor .monaco-editor-hover .typeInfo.ts .ts-symbol .punctuation,
.monaco-editor .monaco-editor-hover .typeInfo.ts .ts-symbol .text {
	color: #008080;
}
.monaco-editor .monaco-editor-hover .typeInfo.ts .ts-symbol .keyword {
	color: #0000FF;
}
.monaco-editor.vs-dark .monaco-editor-hover .typeInfo.ts .ts-symbol {
	color: #D4D4D4;
}
.monaco-editor.vs-dark .monaco-editor-hover .typeInfo.ts .ts-symbol .punctuation,
.monaco-editor.vs-dark .monaco-editor-hover .typeInfo.ts .ts-symbol .text {
	color: #DCDCDC;
}
.monaco-editor.vs-dark .monaco-editor-hover .typeInfo.ts .ts-symbol .keyword {
	color: #4E94CE;
}
/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
"use strict";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=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return{dispose:function(){return n(e)}}}function r(e){return{dispose:function(){return n(e)}}}function o(e){return{dispose:function(){return e()}}}function s(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return r(e.map(o))}function a(e){if(e){if("function"==typeof e)return e(),null;if(Array.isArray(e)){for(;e.length>0;)e.pop()();return e}return null}return null}t.disposeAll=n,t.combinedDispose=i,t.combinedDispose2=r,t.fnToDisposable=o,t.toDisposable=s,t.cAll=a;var u=function(){function e(e){this._prefix=e,this._lastId=0}return e.prototype.generate=function(){return this._prefix+ ++this._lastId},e}();t.IdGenerator=u}),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/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 a(e)||null===e}function l(e){if(!r(e))return!1;for(var t in e)if(f.call(e,t))return!1;return!0}function c(e){return"[object Function]"===Object.prototype.toString.call(e)}function d(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return e&&e.length>0&&e.every(function(e){return c(e)})}function h(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=Object.create(e.prototype);return e.apply(i,t),i}function p(e){var t=!1,n=null;return function(){for(var i=[],r=0;r<arguments.length;r++)i[r-0]=arguments[r];return t||(t=!0,n=e.apply(self,i)),n}}t.isArray=n,t.isString=i,t.isObject=r,t.isNumber=o,t.isBoolean=s,t.isUndefined=a,t.isUndefinedOrNull=u;var f=Object.prototype.hasOwnProperty;t.isEmptyObject=l,t.isFunction=c,t.areFunctions=d,t.create=h,t.runOnce=p}),define("vs/base/env",["require","exports","vs/base/types"],function(e,t,n){function i(){{var e=3;self.has||function(){return!1}}e=2;var t=location.search.match(/monaco-workers=(\d+)/i);return t&&(e=parseInt(t[1],10)),r("workersCount",e)}function r(e,t){return void 0===t&&(t=!1),self.MonacoEnvironment&&self.MonacoEnvironment.hasOwnProperty(e)?self.MonacoEnvironment[e]:t}function o(){return m}function s(){return"undefined"!=typeof self.Worker}function a(){return!p.document&&"undefined"!=typeof self.importScripts}function u(){return self.isEmulatedWorker}function l(){return self.isProcessWorker}function c(){return p.parent!==p}function d(){return g}function h(e){g=e}var p=self,f=navigator.userAgent,g=!!p.isTest,m=p.document&&p.document.URL.match(/[^\?]*\?[^\#]*pseudo=true/),v=f.indexOf("Trident")>=0&&f.indexOf("MSIE")<0,y=f.indexOf("MSIE 10")>=0,_=f.indexOf("MSIE 9")>=0,b=f.indexOf("Firefox")>=0,w=!1;t.browser={isOpera:f.indexOf("Opera")>=0,isIE11orEarlier:v||y||_,isIE11:v,isIE10orEarlier:y||_,isIE10orLater:v||y,isIE10:y,isIE9:_,isFirefox:b,isWebKit:f.indexOf("AppleWebKit")>=0,isChrome:f.indexOf("Chrome")>=0,isSafari:-1===f.indexOf("Chrome")&&f.indexOf("Safari")>=0,isIPad:f.indexOf("iPad")>=0,canUseTranslate3d:!_&&!b,canPushState:function(){return!w&&p.history&&p.history.pushState},disablePushState:function(){w=!0},hasCSSAnimationSupport:function(){if(this._hasCSSAnimationSupport===!0||this._hasCSSAnimationSupport===!1)return this._hasCSSAnimationSupport;if(!p.document)return!1;for(var e=!1,t=p.document.createElement("div"),i=["animationName","webkitAnimationName","msAnimationName","MozAnimationName","OAnimationName"],r=0;r<i.length;r++){var o=i[r];if(!n.isUndefinedOrNull(t.style[o])||t.style.hasOwnProperty(o)){e=!0;break}}return this._hasCSSAnimationSupport=e?!0:!1,this._hasCSSAnimationSupport},canPlayVideo:function(e){if(!p.document)return!1;var t=p.document.createElement("video");if(t.canPlayType){var n=t.canPlayType(e);return"maybe"===n||"probably"===n}return!1},canPlayAudio:function(e){if(!p.document)return!1;var t=p.document.createElement("audio");if(t.canPlayType){var n=t.canPlayType(e);return"maybe"===n||"probably"===n}return!1}},function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"}(t.Platform||(t.Platform={}));var C=t.Platform;t.platform=C.Web;var E=r("platform",null);E&&("darwin"===E?t.platform=C.Mac:"win32"===E?t.platform=C.Windows:("linux"===E||"freebsd"===E)&&(t.platform=C.Linux)),t.isWindows=f.indexOf("Windows")>=0&&t.platform===C.Web||t.platform===C.Windows,t.isMacintosh=f.indexOf("Macintosh")>=0&&t.platform===C.Web||t.platform===C.Mac,t.isLinux=f.indexOf("Linux")>=0&&t.platform===C.Web||t.platform===C.Linux,t.isNative=t.platform!==C.Web,t.isWeb=!t.isNative,t.applicationName=r("applicationName",null),t.workersCount=1,t.enableUpload=r("enableUpload"),t.enableDownloadWorkspace=r("enableDownloadWorkspace"),t.enableSearch=r("enableSearch"),t.enableBuild=r("enableBuild"),t.enableGit=r("enableGit"),t.enableConsole=r("enableConsole"),t.enableNativeConsole=r("enableNativeConsole"),t.enableOutput=r("enableOutput"),t.enableQuickStart=r("enableQuickStart"),t.enableTestCoverage=r("enableTestCoverage"),t.enableFeedback=r("enableFeedback"),t.enablePerformanceEvents=r("enablePerformanceEvents"),t.enableTelemetry=r("enableTelemetry"),t.enablePrivateTelemetry=r("enablePrivateTelemetry"),t.enableMonacoTelemetryPipeLine=r("enableMonacoTelemetryPipeLine"),t.appInsightsInstrumentationKey=r("appInsightsInstrumentationKey"),t.enableTestViewlet=r("enableTestViewlet"),t.enableDebug=r("enableDebug"),t.enablePluginHost=r("enablePluginHost"),t.enableGlobalCSSRuleChecker=r("enableGlobalCSSRuleChecker"),t.enableNLSWarnings=r("enableNLSWarnings"),t.enableEditorLanguageServiceIndicator=r("enableEditorLanguageServiceIndicator"),t.enablePerformanceTools=r("enablePerformanceTools"),t.enableRunWorkspace=r("enableRunWorkspace"),t.enableJavaScriptRewriting=r("enableJavaScriptRewriting"),t.enableTypeScriptServiceMode=r("enableTypeScriptServiceMode"),t.enableEnhancedEditorTheme=r("enableEnhancedEditorTheme"),t.enableNativeReload=r("enableNativeReload"),t.runFromAzure=r("runFromAzure"),t.enableTFSConnection=r("enableTFSConnection"),t.portalLink=r("portalLink",null),t.version=r("version",null),t.hideDerivedResources=r("hideDerivedResources"),t.isCaseSensitiveFs=t.isLinux,t.enableAzurePortalNavigation=r("enableAzurePortalNavigation"),t.privacyLink=r("privacyLink",null),t.supportLink=r("supportLink",null),t.legalLink=r("legalLink",null),t.videosLink=r("videosLink",null),t.azureWebSiteName=r("azureWebSiteName",null),t.azureWebSiteComputeMode=r("azureWebSiteComputeMode",null),t.azureWebSiteMode=r("azureWebSiteMode",null),t.azureWebSiteScmType=r("azureWebSiteScmType",null),t.azureWebSiteAppsettingScmType=r("azureWebSiteAppsettingScmType",null),t.azureWebSiteProjectType=r("azureWebSiteProjectType",null),t.azureWebSiteForZumo=r("azureWebSiteForZumo",null),t.azurePortalLink=r("azurePortalLink",null),t.azureWebSiteTryMode=r("azureWebSiteTryMode",!1),t.tryAzureLink=r("tryAzureLink",null),t.tryAzureSignUpLink=r("tryAzureSignUpLink",null),t.tryAzureLifeTimeInMinutes=r("tryAzureLifeTimeInMinutes",null),t.tryAzureLastModifiedUTC=r("tryAzureLastModifiedUTC",null),t.logWorkerMessages=!1,t.appRoot=r("appRoot",null),t.standaloneEditorTelemetryEndpoint=r("telemetryEndpoint",null),t.getCrossOriginWorkerScriptUrl=r("getWorkerUrl",null),t.isPseudoLanguage=o,t.hasWebWorkerSupport=s,t.isInWebWorker=a,t.isInEmulatedWebWorker=u,t.isInProcessWorker=l,t.isInIframe=c,t.isTesting=d,t.setTesting=h}),define("vs/base/objects",["require","exports","./types"],function(e,t,n){function i(e){if(!e||"object"!=typeof e)return e;var t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(n){t[n]=e[n]&&"object"==typeof e[n]?i(e[n]):e[n]}),t}function r(e){if(!e||"object"!=typeof e)return e;var t=Array.isArray(e)?[]:{};return Object.getOwnPropertyNames(e).forEach(function(n){t[n]=e[n]&&"object"==typeof e[n]?r(e[n]):e[n]}),t}function o(e,t){if(n.isUndefinedOrNull(e))return e;var i=t(e);if("undefined"!=typeof i)return i;if(n.isArray(e)){for(var r=[],s=0;s<e.length;s++)r.push(o(e[s],t));return r}if(n.isObject(e)){var a={};for(var u in e)g.call(e,u)&&(a[u]=o(e[u],t));return a}return e}function s(e,t,i){return void 0===i&&(i=!0),n.isObject(e)?(n.isObject(t)&&Object.keys(t).forEach(function(r){r in e?i&&(n.isObject(e[r])&&n.isObject(t[r])?s(e[r],t[r],i):e[r]=t[r]):e[r]=t[r]}),e):t}function a(e,t){return s(i(t),e||{})}function u(e,t){if(e===t)return!0;if(null===e||void 0===e||null===t||void 0===t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;var n,i;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!u(e[n],t[n]))return!1}else{var r=[];for(i in e)r.push(i);r.sort();var o=[];for(i in t)o.push(i);if(o.sort(),!u(r,o))return!1;for(n=0;n<r.length;n++)if(!u(e[r[n]],t[r[n]]))return!1}return!0}function l(e,t,n){"undefined"==typeof e[t]&&(e[t]=n)}function c(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=!0;return t}function d(e,t){void 0===t&&(t=!1),t&&(e=e.map(function(e){return e.toLowerCase()}));var n=c(e);return t?function(e){return void 0!==n[e.toLowerCase()]&&n.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==n[e]&&n.hasOwnProperty(e)}}function h(e,t){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t=t||function(){};var i=e.prototype,r=t.prototype;t.prototype=Object.create(i);for(var n in r)r.hasOwnProperty(n)&&Object.defineProperty(t.prototype,n,Object.getOwnPropertyDescriptor(r,n));Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,configurable:!0,enumerable:!0})}function p(e){var t=[];return JSON.stringify(e,function(e,i){if(n.isObject(i)||Array.isArray(i)){if(-1!==t.indexOf(i))return"[Circular]";t.push(i)}return i})}var f=function(){function e(e,t){this.first=e,this.second=t}return e}();t.Tuple=f,t.clone=i,t.deepClone=r;var g=Object.prototype.hasOwnProperty;t.cloneAndChange=o,t.mixin=s,t.withDefaults=a,t.equals=u,t.ensureProperty=l,t.arrayToHash=c,t.createKeywordMatcher=d,t.derive=h,t.safeStringify=p}),define("vs/base/strings",["require","exports","vs/nls!vs/editor/editor.main"],function(e,t,n){function i(e,t,n){void 0===n&&(n="0");for(var i=""+e,r=[i],o=i.length;t>o;o++)r.push(n);return r.reverse().join("")}function r(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return 0===t.length?e:e.replace(z,function(e,n){var i=parseInt(n,10);return isNaN(i)||0>i||i>=t.length?e:t[i]})}function o(e){return e||(e=new Date),n.localize("vs_base_strings",0,i(e.getMonth()+1,2),i(e.getDate(),2),i(e.getFullYear(),4),i(e.getHours(),2),i(e.getMinutes(),2),i(e.getSeconds(),2))}function s(e){return e||(e=new Date),n.localize("vs_base_strings",1,i(e.getHours(),2),i(e.getMinutes(),2),i(e.getSeconds(),2))}function a(e){return e.replace(/[<|>|&]/g,function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return e}})}function u(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}function l(e,t,n){return e.replace(new RegExp(u(t.toString()),"g"),n)}function c(e,t){void 0===t&&(t=" ");var n=d(e,t);return h(n,t)}function d(e,t){if(!e||!t)return e;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 h(e,t){if(!e||!t)return e;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 p(e){return e.replace(/(^\s+|\s+$)/g,"")}function f(e){return e.replace(/\s+/g," ")}function g(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 m(e){var t=(new Date).getTime(),i=(t-e)/1e3;if(60>i)return n.localize("vs_base_strings",6);var r=i/60;if(60>r)return 1===Math.floor(r)?n.localize("vs_base_strings",7):n.localize("vs_base_strings",8,Math.floor(r));var o=r/60;if(24>o)return 1===Math.floor(o)?n.localize("vs_base_strings",9):n.localize("vs_base_strings",10,Math.floor(o));var s=o/24;return 1===Math.floor(s)?n.localize("vs_base_strings",11):s>6&&8>s?n.localize("vs_base_strings",12):s>30&&40>s?n.localize("vs_base_strings",13):n.localize("vs_base_strings",14,Math.floor(s))}function v(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function y(e,t){if(e=e||"",t=t||"",e.length<t.length)return!1;for(var n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function _(e,t){var n=e.length-t.length;return n>0?e.lastIndexOf(t)===e.length-t.length:0===n?e===t:!1}function b(e,t,n,i){return void 0===i&&(i=""),e.substring(0,t)+i+e.substring(t+n)}function w(e,t,n,i){if(""===e)throw new Error("Cannot create regex from empty string");t||(e=e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")),i&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var r="g";return n||(r+="i"),new RegExp(e,r)}function C(e){var t=e.exec("");return t&&0===e.lastIndex}function E(e,t){if(!e)return e;if(t){for(var n=e.split("/"),i=0,r=n.length;r>i;i++)n[i]=encodeURIComponent(n[i]);return n.join("/")}return encodeURIComponent(e)}function S(e){return/^\w[\w.]*$/.test(e)}function T(e){return!e||!e.trim()}function L(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}function x(e,t,n){return t&&(e="^"+e),n&&(e+="$"),e}function M(e,t){if(C(new RegExp(e,t)))throw new Error("Regular expression /"+e+"/g results in infinitive matches")}function N(e){return e?(0===e.indexOf("/")&&(e=e.substring(1)),E(e,!0)):""}function k(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 O(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 R(e,t){return 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){var n,i=Math.min(e.length,t.length);for(n=0;i>n;n++)if(e.charCodeAt(n)!==t.charCodeAt(n))return n;return i}function H(e,t,n){void 0===n&&(n=4);var i=Math.abs(e.length-t.length);if(i>n)return 0;var r,o,s=[],a=[];for(r=0;r<t.length+1;++r)a.push(0);for(r=0;r<e.length+1;++r)s.push(a);for(r=1;r<e.length+1;++r)for(o=1;o<t.length+1;++o)s[r][o]=e[r-1]===t[o-1]?s[r-1][o-1]+1:Math.max(s[r-1][o],s[r][o-1]);return s[e.length][t.length]-Math.sqrt(i)}function V(e){for(var t,n=/\r\n|\r|\n/g,i=[0];t=n.exec(e);)i.push(n.lastIndex);return i}function F(e,n){if(e.length<n)return e;for(var i=e.split(/\b/),r=0,o=i.length-1;o>=0;o--)if(r+=i[o].length,r>n){i.splice(0,o);break}return i.join(t.empty).replace(/^\s/,t.empty)}t.empty="",t.pad=i;var z=/{(\d+)}/g;t.format=r,t.formatDate=o,t.formatTime=s,t.escape=a,t.escapeRegExpCharacters=u,t.replaceAll=l,t.trim=c,t.ltrim=d,t.rtrim=h,t.trimWhitespace=p,t.normalize=f,t.conciseformatDiff=g,t.verboseformatDiff=m,t.convertSimple2RegExpPattern=v,t.startsWith=y,t.endsWith=_,t.splice=b,t.createRegExp=w,t.regExpLeadsToEndlessLoop=C,t.encodeURIPart=E,t.isCamelCasePattern=S,t.isFalsyOrWhitespace=T,t.toRegExpPattern=L,t.anchorPattern=x,t.assertRegExp=M,t.normalizePath=N,t.colorize=k,t.firstNonWhitespaceIndex=I,t.getLeadingWhitespace=O,t.lastNonWhitespaceIndex=P,t.localeCompare=R,t.equalsIgnoreCase=A,t.commonPrefixLength=W,t.difference=H,t.computeLineStarts=V,t.lcut=F}),define("vs/base/errors",["require","exports","vs/nls!vs/editor/editor.main","vs/base/objects","vs/base/env","vs/base/types","vs/base/strings"],function(e,t,n,i,r,o,s){function a(e){t.errorHandler.setUnexpectedErrorHandler(e)}function u(e){p(e)||t.errorHandler.onUnexpectedError(e)}function l(e,t){var n=new w(e);return t?n.verboseMessage:n.message}function c(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 d(e,t){if(void 0===t&&(t=!1),!e)return n.localize("vs_base_errors",9);if(o.isString(e))return e;if(!o.isUndefinedOrNull(e.status))return l(e,t);if(e.detail){var i=e.detail;if(i.error){if(i.error&&!o.isUndefinedOrNull(i.error.status))return l(i.error,t);if(!o.isArray(i.error))return c(i.error,t);for(var r=0;r<i.error.length;r++)if(i.error[r]&&!o.isUndefinedOrNull(i.error[r].status))return l(i.error[r],t)}if(i.exception)return o.isUndefinedOrNull(i.exception.status)?c(i.exception,t):l(i.exception,t)}return e.stack?c(e,t):e.message?e.message:n.localize("vs_base_errors",10)}function h(e){if(e)if(o.isArray(e)){for(var t=0;t<e.length;t++)if(e[t]&&e[t].status)return e[t].status}else if(e.status)return e.status;return-1}function p(e){return e instanceof Error&&e.name===C&&e.message===C}function f(){var e=new Error(C);return e.name=e.message,e}function g(){return new Error(n.localize("vs_base_errors",11))}function m(e){return e?new Error(n.localize("vs_base_errors",12,e)):new Error(n.localize("vs_base_errors",13))}function v(e){return e?new Error(n.localize("vs_base_errors",14,e)):new Error(n.localize("vs_base_errors",15))}function y(){return r.isWeb?new Error(n.localize("vs_base_errors",16)):new Error(n.localize("vs_base_errors",17))}function _(e,t){void 0===t&&(t=null);var n=new Error(e);return t&&(n.actions=t),n}var b=function(){function e(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(function(){if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e},0)}}return e.prototype.addListener=function(e){var t=this;return this.listeners.push(e),function(){t._removeListener(e)}},e.prototype.emit=function(e){this.listeners.forEach(function(t){t(e)})},e.prototype._removeListener=function(e){this.listeners.splice(this.listeners.indexOf(e),1)},e.prototype.setUnexpectedErrorHandler=function(e){this.unexpectedErrorHandler=e},e.prototype.getUnexpectedErrorHandler=function(){return this.unexpectedErrorHandler},e.prototype.onUnexpectedError=function(e){this.unexpectedErrorHandler(e),this.emit(e)},e}();t.ErrorHandler=b,t.errorHandler=new b,t.setUnexpectedErrorHandler=a,t.onUnexpectedError=u;var w=function(){function e(e){this.status=e.status,this.statusText=e.statusText,this.name="ConnectionError";try{this.responseText=e.responseText}catch(t){this.responseText=""}if(this.errorMessage=null,this.errorCode=null,this.errorObject=null,this.responseText)try{var n=JSON.parse(this.responseText);this.errorMessage=n.message,this.errorCode=n.code,this.errorObject=n}catch(i){}}return Object.defineProperty(e.prototype,"message",{get:function(){return this.connectionErrorToMessage(this,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"verboseMessage",{get:function(){return this.connectionErrorToMessage(this,!0)},enumerable:!0,configurable:!0}),e.prototype.connectionErrorDetailsToMessage=function(e,t){var i=e.errorCode,r=e.errorMessage;return null!==i&&null!==r?n.localize("vs_base_errors",0,s.rtrim(r,"."),i):null!==r?r:t&&null!==e.responseText?e.responseText:null},e.prototype.connectionErrorToMessage=function(e,t){var i=this.connectionErrorDetailsToMessage(e,t);return 401===e.status?null!==i?n.localize("vs_base_errors",1,i):n.localize("vs_base_errors",2):i?i:e.status>0&&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)},e}();t.ConnectionError=w,i.derive(Error,w),t.toErrorMessage=d,t.getHttpStatus=h;var C="Canceled";t.isPromiseCanceledError=p,t.canceled=f,t.notImplemented=g,t.illegalArgument=m,t.illegalState=v,t.loaderError=y,t.error=_}),define("vs/base/eventEmitter",["require","exports","vs/base/errors"],function(e,t,n){var i=function(){function e(e,t,n){void 0===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=i;var r=function(){function e(e){if(void 0===e&&(e=null),this._listeners={},this._bulkListeners=[],this._collectedEvents=[],this._deferredCnt=0,e){this._allowedEventTypes={};for(var t=0;t<e.length;t++)this._allowedEventTypes[e[t]]=!0}else this._allowedEventTypes=null}return e.prototype.dispose=function(){this._listeners={},this._bulkListeners=[],this._collectedEvents=[],this._deferredCnt=0,this._allowedEventTypes=null},e.prototype.addListener=function(e,t){if("*"===e)throw new Error("Use addBulkListener(listener) to register your listener!");if(this._allowedEventTypes&&!this._allowedEventTypes.hasOwnProperty(e))throw new Error("This object will never emit this event type!");this._listeners.hasOwnProperty(e)?this._listeners[e].push(t):this._listeners[e]=[t];var n=this;return function(){n&&(n._removeListener(e,t),n=null,t=null)}},e.prototype.addListener2=function(e,t){var n=this.addListener(e,t);return{dispose:n}},e.prototype.on=function(e,t){return this.addListener(e,t)},e.prototype.addOneTimeListener=function(e,t){var n=this.addListener(e,function(e){n(),t(e)});return n},e.prototype.addOneTimeDisposableListener=function(e,t){var n=this.addOneTimeListener(e,t);return{dispose:n}},e.prototype.addBulkListener=function(e){var t=this;return this._bulkListeners.push(e),function(){t._removeBulkListener(e)}},e.prototype.addBulkListener2=function(e){var t=this.addBulkListener(e);return{dispose:t}},e.prototype.addEmitter=function(e,t){var n=this;return void 0===t&&(t=null),e.addBulkListener(function(e){var r=e;if(t){r=[];for(var o=0,s=e.length;s>o;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(void 0===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=null;try{t=e()}catch(i){n.onUnexpectedError(i)}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}),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||r(),a}function s(e,t){if(!t||e===t)return{top:0,left:0};for(var n=0,i=0,o=r(),s=0;s<o.length;s++){var a=o[s];if(a.window===t)break;if(!a.iframeElement)break;var u=a.iframeElement.getBoundingClientRect();n+=u.top,i+=u.left}return{top:n,left:i}}var a=!1,u=null;t.getSameOriginWindowChain=r,t.hasDifferentOriginAncestor=o,t.getPositionOfChildWindowRelativeToAncestorWindow=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/base/dom/mouseEvent",["require","exports","vs/base/env","vs/base/dom/iframe"],function(e,t,n,i){function r(e){var t=window.MonacoScrollDivisor||120;return e/t}var o=function(){function e(e){var t=this;this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.target=e.target||e.targetNode||e.srcElement,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.posx=0,this.posy=0,this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey;var r=function(){return e.clientX||e.clientY?(t.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,t.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop,!0):!1},o=function(){return e.pageX||e.pageY?(t.posx=e.pageX,t.posy=e.pageY,!0):!1},s=o,a=r;n.browser.isIE10&&(s=r,a=o),s()||a();var u=i.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=u.left,this.posy-=u.top}return e.prototype.preventDefault=function(){this.browserEvent.preventDefault?this.browserEvent.preventDefault():this.browserEvent.returnValue=!1},e.prototype.stopPropagation=function(){this.browserEvent.stopPropagation?this.browserEvent.stopPropagation():this.browserEvent.cancelBubble=!0},e}();t.StandardMouseEvent=o;var s=function(e){function t(t){e.call(this,t),this.dataTransfer=t.dataTransfer}return __extends(t,e),t}(o);t.DragMouseEvent=s;var a=function(e){function t(t){e.call(this,t)}return __extends(t,e),t}(s);t.DropMouseEvent=a;var u=function(){function e(e,t,i){if(void 0===t&&(t=0),void 0===i&&(i=0),this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t,e){var o=e,s=e;"undefined"!=typeof o.wheelDeltaY?this.deltaY=r(o.wheelDeltaY):"undefined"!=typeof s.VERTICAL_AXIS&&s.axis===s.VERTICAL_AXIS&&(this.deltaY=-s.detail/3),"undefined"!=typeof o.wheelDeltaX?this.deltaX=n.browser.isSafari&&n.isWindows?-r(o.wheelDeltaX):r(o.wheelDeltaX):"undefined"!=typeof s.HORIZONTAL_AXIS&&s.axis===s.HORIZONTAL_AXIS&&(this.deltaX=-e.detail/3),0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=r(e.wheelDelta))}}return e.prototype.preventDefault=function(){this.browserEvent&&(this.browserEvent.preventDefault?this.browserEvent.preventDefault():this.browserEvent.returnValue=!1)},e.prototype.stopPropagation=function(){this.browserEvent&&(this.browserEvent.stopPropagation?this.browserEvent.stopPropagation():this.browserEvent.cancelBubble=!0)},e}();t.StandardMouseWheelEvent=u}),/*!
  © 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="undefined"!=typeof process&&"function"==typeof process.nextTick?function(e){return process.nextTick(e)}:function(e){return setTimeout(e,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})}(e.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,this.WinJS),function(e){function t(e,t,n){var i=e;return"function"==typeof i&&(i=i()),(n&&o.test(n)?"":n?n+": ":"")+(t?t.replace(r,":")+": ":"")+i}function n(t,n,i){var r=e.Utilities.formatLog(t,n,i);console[i&&o.test(i)?i:"log"](r)}function i(e){return e.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&")}var r=/\s+/g,o=/^(error|warn|info|log)$/;e.Namespace.define("WinJS.Utilities",{startLog:function(t){t=t||{},"string"==typeof t&&(t={tags:t});var o=t.type&&new RegExp("^("+i(t.type).replace(r," ").split(" ").join("|")+")$"),s=t.excludeTags&&new RegExp("(^|\\s)("+i(t.excludeTags).replace(r," ").split(" ").join("|")+")(\\s|$)","i"),a=t.tags&&new RegExp("(^|\\s)("+i(t.tags).replace(r," ").split(" ").join("|")+")(\\s|$)","i"),u=t.action||n;if(!(o||s||a||e.log))return e.log=u,void 0;var l=function(e,t,n){o&&!o.test(n)||s&&s.test(t)||a&&!a.test(t)||u(e,t,n),l.next&&l.next(e,t,n)};l.next=e.log,e.log=l},stopLog:function(){delete e.log},formatLog:t})}(this.WinJS),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})}(this.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,this.WinJS),function(e,t,n){function i(){}function r(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?I:D,e._value=t,e._setState(n)}function o(e,t,n,i,r,o){return{exception:e,error:t,promise:n,handler:o,id:i,parent:r}}function s(e,t,n,i){var r=n._isException,s=n._errorId;return o(r?t:null,r?null:t,e,s,n,i)}function a(e,t,n){var i=n._isException,r=n._errorId;return v(e,r,i),o(i?t:null,i?null:t,e,r,n)}function u(e,t){var n=++V;return v(e,n),o(null,t,e,n)}function l(e,t){var n=++V;return v(e,n,!0),o(t,null,e,n)}function c(e,t,n,i){m(e,{c:t,e:n,p:i})}function d(e,t,n,i){e._value=t,f(e,t,n,i),e._setState(W)}function h(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!==I&&u._listeners&&t.push(u)}else q.prototype.done.call(e,a)}}}function p(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 a=1===o?i:i[r],u=a.e,l=a.promise;if(l){try{u?(u.handlesOnError||f(l,n,s,e,u),l._setCompleteValue(u(n))):l._setChainedErrorValue(n,e)}catch(c){l._setExceptionValue(c)}l._state!==I&&l._listeners&&t.push(l)}else U.prototype.done.call(e,null,u)}}}function f(e,t,n,i,r){if(S._listeners[T]){if(t instanceof Error&&t.message===L)return;S.dispatchEvent(T,n(e,t,i,r))}}function g(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 m(e,t){var n=e._listeners;n?(n=Array.isArray(n)?n:[n],n.push(t)):n=t,e._listeners=n}function v(e,t,n){e._isException=n||!1,e._errorId=t}function y(e,t,n,i){e._value=t,f(e,t,n,i),e._setState(H)}function _(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?I:A,e._value=t,e._setState(n)}function b(e,t,n,i){var r=new B(e);return m(e,{promise:r,c:t,e:n,p:i}),r}function w(e){var n;return new t.Promise(function(t){e?n=setTimeout(t,e):setImmediate(t)},function(){n&&clearTimeout(n)})}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 E=t.Class.mix(t.Class.define(null,{},{supportedForProcessing:!1}),t.Utilities.eventMixin),S=new E;S._listeners={};var T="error",L="Canceled",x=!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 N,k,I,O,P,R,D,A,W,H,V=1;N={name:"created",enter:function(e){e._setState(k)},cancel:i,done:i,then:i,_completed:i,_error:i,_notify:i,_progress:i,_setCompleteValue:i,_setErrorValue:i},k={name:"working",enter:i,cancel:function(e){e._setState(P)},done:c,then:b,_completed:r,_error:d,_notify:i,_progress:g,_setCompleteValue:_,_setErrorValue:y},I={name:"waiting",enter:function(e){var t=e._value,n=function(i){t._errorId?e._chainedError(i,t):(f(e,i,s,t,n),e._error(i))};n.handlesOnError=!0,t.then(e._completed.bind(e),n,e._progress.bind(e))},cancel:function(e){e._setState(O)},done:c,then:b,_completed:r,_error:d,_notify:i,_progress:g,_setCompleteValue:_,_setErrorValue:y},O={name:"waiting_canceled",enter:function(e){e._setState(R);var t=e._value;t.cancel&&t.cancel()},cancel:i,done:c,then:b,_completed:r,_error:d,_notify:i,_progress:g,_setCompleteValue:_,_setErrorValue:y},P={name:"canceled",enter:function(e){e._setState(R),e._cancelAction()},cancel:i,done:c,then:b,_completed:r,_error:d,_notify:i,_progress:g,_setCompleteValue:_,_setErrorValue:y},R={name:"canceling",enter:function(e){var t=new Error(L);t.name=t.message,e._value=t,e._setState(W)},cancel:i,done:i,then:i,_completed:i,_error:i,_notify:i,_progress:i,_setCompleteValue:i,_setErrorValue:i},D={name:"complete_notify",enter:function(e){if(e.done=q.prototype.done,e.then=q.prototype.then,e._listeners)for(var t,n=[e];n.length;)t=n.pop(),t._state._notify(t,n);e._setState(A)},cancel:i,done:null,then:null,_completed:i,_error:i,_notify:h,_progress:i,_setCompleteValue:i,_setErrorValue:i},A={name:"success",enter:function(e){e.done=q.prototype.done,e.then=q.prototype.then,e._cleanupAction()},cancel:i,done:null,then:null,_completed:i,_error:i,_notify:h,_progress:i,_setCompleteValue:i,_setErrorValue:i},W={name:"error_notify",enter:function(e){if(e.done=U.prototype.done,e.then=U.prototype.then,e._listeners)for(var t,n=[e];n.length;)t=n.pop(),t._state._notify(t,n);e._setState(H)},cancel:i,done:null,then:null,_completed:i,_error:i,_notify:p,_progress:i,_setCompleteValue:i,_setErrorValue:i},H={name:"error",enter:function(e){e.done=U.prototype.done,e.then=U.prototype.then,e._cleanupAction()},cancel:i,done:null,then:null,_completed:i,_error:i,_notify:p,_progress:i,_setCompleteValue:i,_setErrorValue:i};var F,z=t.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,a,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,u);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,a,t);return this._run(),n},_setExceptionValue:function(e){var t=this._state._setErrorValue(this,e,l);return this._run(),t},_run:function(){for(;this._nextState;)this._state=this._nextState,this._nextState=null,this._state.enter(this)}},{supportedForProcessing:!1}),B=t.Class.derive(z,function(e){x&&(x===!0||x&M.thenPromise)&&(this._stack=t.Promise._getStack()),this._creator=e,this._setState(N),this._run()},{_creator:null,_cancelAction:function(){this._creator&&this._creator.cancel()},_cleanupAction:function(){this._creator=null}},{supportedForProcessing:!1}),U=t.Class.define(function(e){x&&(x===!0||x&M.errorPromise)&&(this._stack=t.Promise._getStack()),this._value=e,f(this,e,u)},{cancel:function(){},done:function(e,t){var n=this._value;if(t)try{t.handlesOnError||f(null,n,s,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===L||setImmediate(function(){throw n})},then:function(e,t){if(!t)return this;var n,i=this._value;try{t.handlesOnError||f(null,i,s,this,t),n=new q(t(i))}catch(r){n=r===i?this:new j(r)}return n}},{supportedForProcessing:!1}),j=t.Class.derive(U,function(e){x&&(x===!0||x&M.exceptionPromise)&&(this._stack=t.Promise._getStack()),this._value=e,f(this,e,l)},{},{supportedForProcessing:!1}),q=t.Class.define(function(e){if(x&&(x===!0||x&M.completePromise)&&(this._stack=t.Promise._getStack()),e&&"object"==typeof e&&"function"==typeof e.then){var n=new B(null);return n._setCompleteValue(e),n}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 q(t)}catch(n){return new j(n)}}},{supportedForProcessing:!1}),G=t.Class.derive(z,function(e,n){x&&(x===!0||x&M.promise)&&(this._stack=t.Promise._getStack()),this._oncancel=n,this._setState(N),this._run();try{var i=this._completed.bind(this),r=this._error.bind(this),o=this._progress.bind(this);e(i,r,o)}catch(s){this._setExceptionValue(s)}},{_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 G(function(n,i){{var r=Object.keys(e);Array.isArray(e)?[]:{}}0===r.length&&n();var o=0;r.forEach(function(s){G.as(e[s]).then(function(){n({key:s,value:e[s]})},function(a){return a instanceof Error&&a.name===L?(++o===r.length&&n(t.Promise.cancel),void 0):(i({key:s,value:e[s]}),void 0)})})},function(){var t=Object.keys(e);t.forEach(function(t){var n=G.as(e[t]);"function"==typeof n.cancel&&n.cancel()})})},as:function(e){return e&&"object"==typeof e&&"function"==typeof e.then?e:new q(e)},cancel:{get:function(){return F=F||new U(new t.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 G(function(i,r,o){var s=Object.keys(e),a=Array.isArray(e)?[]:{},u=Array.isArray(e)?[]:{},l=0,c=s.length,d=function(e){if(0===--c){var n=Object.keys(a).length;if(0===n)i(u);else{var l=0;s.forEach(function(e){var t=a[e];t instanceof Error&&t.name===L&&l++}),l===n?i(t.Promise.cancel):r(a)}}else o({Key:e,Done:!0})};return s.forEach(function(t){var i=e[t];i===n?l++:G.then(i,function(e){u[t]=e,d(t)},function(e){a[t]=e,d(t)})}),c-=l,0===c?(i(u),void 0):void 0},function(){Object.keys(e).forEach(function(t){var n=G.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 G.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]=G.as(e[o]).then(t,n,i)}),G.join(r)},timeout:function(e,t){var n=w(e);return t?C(n,t):n},wrap:function(e){return new q(e)},wrapError:function(e){return new U(e)},_veryExpensiveTagWithStack:{get:function(){return x},set:function(e){x=e}},_veryExpensiveTagWithStack_tag:M,_getStack:function(){if(Debug.debuggerEnabled)try{throw new Error}catch(e){return e.stack}}});Object.defineProperties(G,t.Utilities.createEventProperties(T));var K=t.Class.derive(z,function(e){this._oncancel=e,this._setState(N),this._run()},{_cancelAction:function(){this._oncancel&&this._oncancel()},_cleanupAction:function(){this._oncancel=null}},{supportedForProcessing:!1}),$=t.Class.define(function(e){this._promise=new K(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});t.Namespace.define("WinJS",{Promise:G,_Signal:$})}(this,this.WinJS),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,this.WinJS),function(e){e.Namespace.define("WinJS",{xhr:function(t){var n;return new e.Promise(function(e,i,r){n=new XMLHttpRequest,n.onreadystatechange=function(){n._canceled||(4===n.readyState?(n.status>=200&&n.status<300||1223===n.status?e(n):i(n),n.onreadystatechange=function(){}):r(n))},n.open(t.type||"GET",t.url,!0,t.user,t.password),n.responseType=t.responseType||"",Object.keys(t.headers||{}).forEach(function(e){n.setRequestHeader(e,t.headers[e])}),t.customRequestInitializer&&t.customRequestInitializer(n),n.send(t.data)},function(){n._canceled=!0,n.abort()})}})}(this.WinJS),function(e,t){var n,i,r,o,s,a,u={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)."};n=i=function(e,t){e.innerHTML=t},r=o=function(e,t){e.outerHTML=t},s=a=function(e,t,n){e.insertAdjacentHTML(t,n)};var l=e.MSApp;if(l)i=function(e,t){l.execUnsafeLocalFunction(function(){e.innerHTML=t})},o=function(e,t){l.execUnsafeLocalFunction(function(){e.outerHTML=t})},a=function(e,t,n){l.execUnsafeLocalFunction(function(){e.insertAdjacentHTML(t,n)})};else if(e.msIsStaticHTML){var c=function(n){if(!e.msIsStaticHTML(n))throw new t.ErrorFromName("WinJS.Utitilies.NonStaticHTML",u.nonStaticHTML)};n=function(e,t){c(t),e.innerHTML=t},r=function(e,t){c(t),e.outerHTML=t},s=function(e,t,n){c(n),e.insertAdjacentHTML(t,n)}}t.Namespace.define("WinJS.Utilities",{setInnerHTML:n,setInnerHTMLUnsafe:i,setOuterHTML:r,setOuterHTMLUnsafe:o,insertAdjacentHTML:s,insertAdjacentHTMLUnsafe:a})}(this,this.WinJS)),function(e){"undefined"==typeof exports&&"function"==typeof define&&define.amd?define("vs/base/lib/raw.winjs.base",e.WinJS):module.exports=e.WinJS}(this),define("vs/base/lib/winjs.base",["./raw.winjs.base","vs/base/errors","vs/base/env"],function(e,t,n){function i(e){if(!n.isNative){var i=e.detail,r=i.id;if(i.parent)return i.handler&&s&&delete s[r],void 0;s[r]=i,1===Object.keys(s).length&&setTimeout(function(){var e=s;s={},Object.keys(e).forEach(function(n){var i=e[n];i.exception?t.onUnexpectedError(i.exception):i.error&&t.onUnexpectedError(i.error),console.log("WARNING: Promise with no error callback:"+i.id),console.log(i),i.exception&&console.log(i.exception.stack)})},0)}}function r(e,t,n){var i,r,s,a=new o.Promise(function(e,t,n){i=e,r=t,s=n},function(){e.cancel()});return e.then(function(e){t&&t(e),i(e)},function(e){n&&n(e),r(e)},s),a}var o=e,s={};return o.Promise.addEventListener("error",i),{decoratePromise:r,Class:o.Class,xhr:o.xhr,Promise:o.Promise,TPromise:o.Promise,PPromise:o.Promise,Utilities:o.Utilities}}),define("vs/base/dom/keyboardEvent",["require","vs/base/lib/winjs.base","vs/base/env"],function(e,t,n){function i(e){var t=e.ctrlKey,n=e.shiftKey,i=e.altKey,o=e.metaKey,s=r.extractKey(e);t=t||"Ctrl"===s,i=i||"Alt"===s,n=n||"Shift"===s,o=o||"Meta"===s;var a="";return t&&(a+="Ctrl"),n&&(a+=(""===a?"":"-")+"Shift"),i&&(a+=(""===a?"":"-")+"Alt"),o&&(a+=(""===a?"":"-")+"Meta"),s&&"Ctrl"!==s&&"Shift"!==s&&"Alt"!==s&&"Meta"!==s&&(a+=(""===a?"":"-")+s),a}var r=function(){var e={Backspace:8,Tab:9,Enter:13,Shift:16,Ctrl:17,Alt:18,PauseBreak:19,CapsLock:20,Escape:27,Space:32,PageUp:33,PageDown:34,End:35,Home:36,LeftArrow:37,UpArrow:38,RightArrow:39,DownArrow:40,Insert:45,Delete:46,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,ContextMenu:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NumLock:144,ScrollLock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222};n.browser.isIE11orEarlier?e.Meta=91:n.browser.isFirefox?(e["-"]=109,e["="]=107,e[";"]=59,n.isMacintosh&&(e.Meta=224)):n.browser.isOpera?(e["-"]=109,e["="]=61,e[";"]=59,n.isMacintosh&&(e.Meta=57392)):n.browser.isWebKit&&n.isMacintosh&&(e.Meta=91);var t={};!function(){for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n)}(),n.browser.isOpera?(t[189]="-",t[187]="=",t[186]=";"):n.browser.isWebKit&&n.isMacintosh&&(t[93]="Meta");var i=function(e,n){return t.hasOwnProperty(e)?t[e]:n},r=null;return r=n.browser.isOpera?function(e){return"keypress"===e.type?e.which<=32?i(e.keyCode,String.fromCharCode(e.keyCode).toUpperCase()):String.fromCharCode(e.which).toUpperCase():i(e.keyCode,"unknown")}:function(e){return e.charCode?String.fromCharCode(e.charCode).toUpperCase():i(e.keyCode,"unknown")},{CHAR_TO_CODE:e,CODE_TO_CHAR:t,extractKey:r}}(),o=t.Class.define(function(e){if(this.browserEvent=e,this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,this.target=e.target||e.targetNode,this.key=r.extractKey(e),this.ctrlKey=this.ctrlKey||"Ctrl"===this.key,this.altKey=this.altKey||"Alt"===this.key,this.shiftKey=this.shiftKey||"Shift"===this.key,this.metaKey=this.metaKey||"Meta"===this.key,n.browser.isOpera&&n.isMacintosh){var t=this.metaKey;this.metaKey=this.ctrlKey,this.ctrlKey=t,"Ctrl"===this.key?this.key="Meta":"Meta"===this.key&&(this.key="Ctrl")}},{preventDefault:function(){this.browserEvent.preventDefault?this.browserEvent.preventDefault():this.browserEvent.returnValue=!1},stopPropagation:function(){this.browserEvent.stopPropagation?this.browserEvent.stopPropagation():this.browserEvent.cancelBubble=!0},clone:function(){var e=this.asString();return{ctrlKey:this.ctrlKey,shiftKey:this.shiftKey,altKey:this.altKey,metaKey:this.metaKey,target:this.target,key:this.key,preventDefault:function(){},stopPropagation:function(){},asString:function(){return e}}},asString:function(){var e="";return this.ctrlKey&&(e+="Ctrl"),this.shiftKey&&(e+=(""===e?"":"-")+"Shift"),this.altKey&&(e+=(""===e?"":"-")+"Alt"),this.metaKey&&(e+=(""===e?"":"-")+"Meta"),this.key&&"Ctrl"!==this.key&&"Shift"!==this.key&&"Alt"!==this.key&&"Meta"!==this.key&&(e+=(""===e?"":"-")+this.key),e}});return{KEYS:r.CHAR_TO_CODE,toString:i,KeyboardEvent:o}}),define("vs/base/dom/browserService",["require","exports","vs/base/env"],function(e,t,n){function i(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}function r(){return s}t.regularIsHTMLElement=i;var o=function(){function e(){this.restore()}return e.prototype.mock=function(e){this.document=e.document,this.window=e.window,this.isHTMLElement=e.isHTMLElement},e.prototype.restore=function(){this.isHTMLElement=i,n.isInWebWorker()?(this.document=null,this.window=null):(this.document=window.document,this.window=window)},e}(),s=new o;t.getService=r}),define("vs/base/dom/dom",["require","exports","vs/base/env","vs/base/types","vs/base/eventEmitter","vs/base/dom/mouseEvent","vs/base/dom/keyboardEvent","vs/base/errors","vs/base/dom/browserService"],function(e,t,n,i,r,o,s,a,u){function l(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function c(e){var t=[];return JSON.stringify(e,function(e,n){if(n instanceof Element)return"[Element]";if(i.isObject(n)||Array.isArray(n)){if(-1!==t.indexOf(n))return"[Circular]";t.push(n)}return n})}function d(e){for(;e;){if(e===document.body)return!0;e=e.parentNode}return!1}function h(e,t){e.getAttribute("data-transform")!==t&&(e.setAttribute("data-transform",t),e.style.webkitTransform=t)}function p(e,t){e.getAttribute("data-transform")!==t&&(e.setAttribute("data-transform",t),e.style.transform=t)}function f(e,t,n,r){var o=function(e){e=e||window.event,n(e)};return i.isFunction(e.addEventListener)?(e.addEventListener(t,o,r||!1),function(){o&&(e.removeEventListener(t,o,r||!1),o=null,e=null,n=null)}):(e.attachEvent("on"+t,o),function(){e.detachEvent("on"+t,o)})}function g(e,t,n,i){var r=f(e,t,n,i);return{dispose:r}}function m(e){return function(t){return e(new o.StandardMouseEvent(t))}}function v(e){return function(t){return e(new s.KeyboardEvent(t))}}function y(e,t){return f(e,"mouseout",function(n){for(var i=n.relatedTarget||n.toElement;i&&i!==e;)i=i.parentNode;i!==e&&t(n)})}function _(e,t){var n=y(e,t);return{dispose:n}}function b(e,n,i,r,o){function s(){l=(new Date).getTime(),i(u),u=null}function a(){if(d=!1,!c){var e=(new Date).getTime()-l;e>=o?s():d||(d=!0,t.scheduleAtNextAnimationFrame(a,Number.MAX_VALUE))}}void 0===r&&(r=Q),void 0===o&&(o=0);var u=null,l=0,c=!1,d=!1,h=f(e,n,function(e){u=r(u,e),d||(d=!0,t.scheduleAtNextAnimationFrame(a,Number.MAX_VALUE))});return function(){c=!0,h()}}function w(e,t,n,i,r){function o(){u=-1,a=(new Date).getTime(),n(s),s=null}void 0===i&&(i=Q),void 0===r&&(r=Y);var s=null,a=0,u=-1,l=f(e,t,function(e){s=i(s,e);var t=(new Date).getTime()-a;t>=r?(-1!==u&&window.clearTimeout(u),o()):-1===u&&(u=window.setTimeout(o,r-t))});return function(){-1!==u&&window.clearTimeout(u),l()}}function C(e,t,n,i,r){return X.isNative?b(e,t,n,i,r):w(e,t,n,i,r)}function E(e,t,n,i,r){var o=C(e,t,n,i,r);return{dispose:o}}function S(e){return document.defaultView&&i.isFunction(document.defaultView.getComputedStyle)?document.defaultView.getComputedStyle(e,null):e.currentStyle}function T(e,t,n){var i=S(e),r="0";return i&&(r=i.getPropertyValue?i.getPropertyValue(t):i.getAttribute(n)),J(e,r)}function L(e){for(var t=e.offsetParent,n=e.offsetTop,i=e.offsetLeft;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){n-=e.scrollTop;var r=S(e);r&&(i-="rtl"!==r.direction?e.scrollLeft:-e.scrollLeft),e===t&&(i+=et.getBorderLeftWidth(e),n+=et.getBorderTopWidth(e),n+=e.offsetTop,i+=e.offsetLeft,t=e.offsetParent)}return{left:i,top:n}}function x(e){var t=L(e);return{left:t.left,top:t.top,width:e.clientWidth,height:e.clientHeight}}function M(e){var t=et.getBorderLeftWidth(e)+et.getBorderRightWidth(e),n=et.getPaddingLeft(e)+et.getPaddingRight(e);return e.offsetWidth-t-n}function N(e){var t=et.getMarginLeft(e)+et.getMarginRight(e);return e.offsetWidth+t}function k(e){var t=et.getBorderTopWidth(e)+et.getBorderBottomWidth(e),n=et.getPaddingTop(e)+et.getPaddingBottom(e);return e.offsetHeight-t-n}function I(e){var t=et.getMarginTop(e)+et.getMarginBottom(e);return e.offsetHeight+t}function O(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 P(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 R(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function D(e,n,i){for(;e;){if(t.hasClass(e,n))return e;if(i&&t.hasClass(e,i))return null;e=e.parentNode}return null}function A(){var e=document.createElement("style");return e.type="text/css",e.media="screen",document.getElementsByTagName("head")[0].appendChild(e),e}function W(e){return e&&e.sheet&&e.sheet.rules?e.sheet.rules:e&&e.sheet&&e.sheet.cssRules?e.sheet.cssRules:[]}function H(e,t,n){void 0===n&&(n=tt),n&&t&&n.sheet.insertRule(e+"{"+t+"}",0)}function V(e,t){if(void 0===t&&(t=tt),!t)return null;for(var n=W(t),i=0;i<n.length;i++){var r=n[i],o=r.selectorText.replace(/::/gi,":");if(o===e)return r}return null}function F(e,t){if(void 0===t&&(t=tt),t){for(var n=W(t),i=[],r=0;r<n.length;r++){var o=n[r],s=o.selectorText.replace(/::/gi,":");0===s.indexOf(e)&&i.push(r)}for(var r=i.length-1;r>=0;r--)t.sheet.deleteRule(i[r])}}function z(e){return u.getService().isHTMLElement(e)}function B(e){try{var t=U(e);e.select(),e.setSelectionRange&&e.setSelectionRange(0,9999),j(e,t)}catch(n){}}function U(e){for(var t=[],n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)t[n]=e.scrollTop,e=e.parentNode;return t}function j(e,t){for(var n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)e.scrollTop!==t[n]&&(e.scrollTop=t[n]),e=e.parentNode}function q(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(f(e,t.EventType.FOCUS,l,!0)),a.push(f(e,t.EventType.BLUR,c,!0)),u}function G(e){var t=document.createElement("div");t.innerHTML=e;for(var n=t.getElementsByTagName("script"),i=n.length;i--;)n[i].parentNode.removeChild(n[i]);return t.innerHTML}function K(){var e={},t=window.location.search;if(t)for(var n=t.split(/[?&]/),i=0;i<n.length;i++){var r=n[i];if(r){var o=r.split("=");2===o.length&&(e[o[0]]=decodeURIComponent(o[1]))}}return e}function $(t){var n=document.createElement("a");return n.href=e.toUrl(t),n.href}t.clearNode=l,t.safeStringifyDOMAware=c,t.isInDOM=d,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.StyleMutator={setMaxWidth:function(e,t){var n=t+"px";e.style.maxWidth!==n&&(e.style.maxWidth=n)},setWidth:function(e,t){var n=t+"px";e.style.width!==n&&(e.style.width=n)},setHeight:function(e,t){var n=t+"px";e.style.height!==n&&(e.style.height=n)},setTop:function(e,t){var n=t+"px";e.style.top!==n&&(e.style.top=n)},setLeft:function(e,t){var n=t+"px";e.style.left!==n&&(e.style.left=n)},setBottom:function(e,t){var n=t+"px";e.style.bottom!==n&&(e.style.bottom=n)},setRight:function(e,t){var n=t+"px";e.style.right!==n&&(e.style.right=n)},setFontSize:function(e,t){var n=t+"px";e.style.fontSize!==n&&(e.style.fontSize=n)},setLineHeight:function(e,t){var n=t+"px";e.style.lineHeight!==n&&(e.style.lineHeight=n)},setTransform:null,setDisplay:function(e,t){e.style.display!==t&&(e.style.display=t)},setVisibility:function(e,t){e.style.visibility!==t&&(e.style.visibility=t)}},function(){var e=document.createElement("div");t.StyleMutator.setTransform="undefined"!=typeof e.style.webkitTransform?h:p}(),t.addListener=f,t.addDisposableListener=g,t.addStandardDisposableListener=function(e,t,n,i){var r=n;return"click"===t?r=m(n):("keydown"===t||"keypress"===t||"keyup"===t)&&(r=v(n)),e.addEventListener(t,r,i||!1),{dispose:function(){r&&(e.removeEventListener(t,r,i||!1),r=null,e=null,n=null)}}},t.addNonBubblingMouseOutListener=y,t.addDisposableNonBubblingMouseOutListener=_;var X=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;var Z=function(){function e(e,t){this._runner=e,this.priority=t,this._canceled=!1}return e.prototype.dispose=function(){this._canceled=!0},e.prototype.execute=function(){if(!this._canceled)try{this._runner()}catch(e){a.onUnexpectedError(e)}},e.sort=function(e,t){return t.priority-e.priority},e}();!function(){var e=[],i=null,r=!1,o=!1,s=function(){for(r=!1,i=e,e=[],o=!0;i.length>0;){i.sort(Z.sort);var t=i.shift();t.execute()}o=!1};t.scheduleAtNextAnimationFrame=function(t,i){void 0===i&&(i=0);var o=new Z(t,i);if(e.push(o),!r)if(r=!0,n.browser.isChrome){var a;X.request(function(){clearTimeout(a),s()}),a=setTimeout(s,1e3)}else X.request(s);return o},t.runAtThisOrScheduleAtNextAnimationFrame=function(e,n){if(o){var r=new Z(e,n);return i.push(r),r}return t.scheduleAtNextAnimationFrame(e,n)}}();var Y=16,Q=function(e,t){return t};t.addThrottledListener=C,t.addDisposableThrottledListener=E,t.getComputedStyle=S;var J=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}}(),et={getBorderLeftWidth:function(e){return T(e,"border-left-width","borderLeftWidth")},getBorderTopWidth:function(e){return T(e,"border-top-width","borderTopWidth")},getBorderRightWidth:function(e){return T(e,"border-right-width","borderRightWidth")},getBorderBottomWidth:function(e){return T(e,"border-bottom-width","borderBottomWidth")},getPaddingLeft:function(e){return T(e,"padding-left","paddingLeft")},getPaddingTop:function(e){return T(e,"padding-top","paddingTop")},getPaddingRight:function(e){return T(e,"padding-right","paddingRight")},getPaddingBottom:function(e){return T(e,"padding-bottom","paddingBottom")},getMarginLeft:function(e){return T(e,"margin-left","marginLeft")},getMarginTop:function(e){return T(e,"margin-top","marginTop")},getMarginRight:function(e){return T(e,"margin-right","marginRight")},getMarginBottom:function(e){return T(e,"margin-bottom","marginBottom")},__commaSentinel:!1};t.getTopLeftOffset=L,t.getDomNodePosition=x,t.getContentWidth=M,t.getTotalWidth=N,t.getContentHeight=k,t.getTotalHeight=I,t.getRelativeLeft=O,t.getRelativeTop=P,t.isAncestor=R,t.findParentWithClass=D,t.createStyleSheet=A;var tt=A();t.createCSSRule=H,t.getCSSRule=V,t.removeCSSRulesWithPrefix=F,t.isHTMLElement=z,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=B,t.saveParentsScrollTop=U,t.restoreParentsScrollTop=j,t.trackFocus=q,t.UnitConverter={_emInPx:-1,emToPixel:function(e){if(this._emInPx<0){var t=document.createElement("div");t.style.position="absolute",t.style.top="10000px",t.style.left="10000px",t.style.fontSize="1em",t.innerHTML="AbcDef",document.body.appendChild(t);var n=I(t);document.body.removeChild(t),this._emInPx=n}var i=e*this._emInPx,r=Math.round(i);return r}},t.removeScriptTags=G,t.parseSearch=K,t.toContentLocation=$}),define("vs/editor/core/model/tokensBinaryEncoding",["require","exports","vs/base/strings","vs/base/errors"],function(e,t,n,i){function r(e,n){if(0===n.length)return m;if(1===n.length&&0===n[0].startIndex&&!n[0].type&&!n[0].bracket)return y;var r,o,s,a,u,l,c=e._inflate,d=e._deflate,h=-1,p=new Array(n.length);for(r=0,o=n.length;o>r;r++)l=n[r],l.startIndex<=h&&(l.startIndex=h+1,i.onUnexpectedError({message:"Invalid tokens detected",tokens:n})),d.hasOwnProperty(l.type)?s=d[l.type]:(s=c.length,d[l.type]=s,c.push(l.type)),a=l.bracket,0>a&&(a=2),u=a*t.BRACKET_OFFSET+s*t.TYPE_OFFSET+l.startIndex*t.START_INDEX_OFFSET,p[r]=u,h=l.startIndex;return p}function o(e,n){if(0===n)return f;var i=n/t.START_INDEX_OFFSET&t.START_INDEX_MASK,r=n/t.TYPE_OFFSET&t.TYPE_MASK,o=n/t.BRACKET_OFFSET&t.BRACKET_MASK;return 2===o&&(o=-1),new p(i,e._inflate[r],o)}function s(e){return e/t.START_INDEX_OFFSET&t.START_INDEX_MASK}function a(e,i){var r=i/t.TYPE_OFFSET&t.TYPE_MASK;return 0===r?n.empty:e._inflate[r]}function u(e){var n=e/t.BRACKET_OFFSET&t.BRACKET_MASK;return 2===n&&(n=-1),n}function l(e,n){if(0===n.length)return g;if(1===n.length&&0===n[0])return v;var i,r,o,s,a,u,l=new Array(n.length),c=e._inflate;for(i=0,r=n.length;r>i;i++)o=n[i],s=o/t.START_INDEX_OFFSET&t.START_INDEX_MASK,u=o/t.TYPE_OFFSET&t.TYPE_MASK,a=o/t.BRACKET_OFFSET&t.BRACKET_MASK,2===a&&(a=-1),l[i]=new p(s,c[u],a);return l}function c(e,t){return h(e,t)}function d(e,n,i,r){if(0===n.length)return g;if(1===n.length&&0===n[0])return v;var o,s,a,u,l,c,d,f=h(n,i),m=[],y=e._inflate;for(a=n[f],c=a/t.TYPE_OFFSET&t.TYPE_MASK,d=a/t.BRACKET_OFFSET&t.BRACKET_MASK,l=0,m.push(new p(l,y[c],d)),o=f+1,s=n.length;s>o&&(a=n[o],u=a/t.START_INDEX_OFFSET&t.START_INDEX_MASK,!(u>=r));o++)c=a/t.TYPE_OFFSET&t.TYPE_MASK,d=a/t.BRACKET_OFFSET&t.BRACKET_MASK,l=u-i,m.push(new p(l,y[c],d));return m}function h(e,t){for(var n,i,r=0,o=e.length-1;o>r;)n=r+Math.ceil((o-r)/2),i=4294967295&e[n],i>t?o=n-1:r=n;return r}var p=function(){function e(e,t,n){this.startIndex=e,this.type=t,this.bracket=n}return e}();t.START_INDEX_MASK=4294967295,t.TYPE_MASK=65535,t.BRACKET_MASK=255,t.START_INDEX_OFFSET=1,t.TYPE_OFFSET=Math.pow(2,32),t.BRACKET_OFFSET=Math.pow(2,48);var f={startIndex:0,type:"",bracket:0},g=[],m=[],v=[f],y=[0];t.deflateArr=r,t.inflate=o,t.getStartIndex=s,t.getType=a,t.getBracket=u,t.inflateArr=l,t.findIndexOfOffset=c,t.sliceAndInflate=d,t.findIndexInSegmentsArray=h}),define("vs/editor/editor",["require","exports","vs/editor/core/model/tokensBinaryEncoding"],function(e,t,n){!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;t.LineTokensBinaryEncoding=n,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/core/internalConstants",["require","exports"],function(e,t){t.Handler={ExecuteCommand:"executeCommand",ExecuteCommands:"executeCommands",CursorLeft:"cursorLeft",CursorLeftSelect:"cursorLeftSelect",CursorWordLeft:"cursorWordLeft",CursorWordLeftSelect:"cursorWordLeftSelect",CursorRight:"cursorRight",CursorRightSelect:"cursorRightSelect",CursorWordRight:"cursorWordRight",CursorWordRightSelect:"cursorWordRightSelect",CursorUp:"cursorUp",CursorUpSelect:"cursorUpSelect",CursorDown:"cursorDown",CursorDownSelect:"cursorDownSelect",CursorPageUp:"cursorPageUp",CursorPageUpSelect:"cursorPageUpSelect",CursorPageDown:"cursorPageDown",CursorPageDownSelect:"cursorPageDownSelect",CursorHome:"cursorHome",CursorHomeSelect:"cursorHomeSelect",CursorEnd:"cursorEnd",CursorEndSelect:"cursorEndSelect",CursorTop:"cursorTop",CursorTopSelect:"cursorTopSelect",CursorBottom:"cursorBottom",CursorBottomSelect:"cursorBottomSelect",AddCursorDown:"addCursorDown",AddCursorUp:"addCursorUp",MoveTo:"moveTo",MoveToSelect:"moveToSelect",CreateCursor:"createCursor",LastCursorMoveToSelect:"lastCursorMoveToSelect",JumpToBracket:"jumpToBracket",Type:"type",Paste:"paste",Tab:"tab",Indent:"indent",Outdent:"outdent",DeleteLeft:"deleteLeft",DeleteRight:"deleteRight",DeleteWordLeft:"deleteWordLeft",DeleteWordRight:"deleteWordRight",DeleteAllLeft:"deleteAllLeft",DeleteAllRight:"deleteAllRight",Enter:"enter",Escape:"escape",Cut:"cut",Undo:"undo",Redo:"redo",WordSelect:"wordSelect",WordSelectDrag:"wordSelectDrag",LastCursorWordSelect:"lastCursorWordSelect",LineSelect:"lineSelect",LineSelectDrag:"lineSelectDrag",LastCursorLineSelect:"lastCursorLineSelect",LastCursorLineSelectDrag:"lastCursorLineSelectDrag",LineInsertBefore:"lineInsertBefore",LineInsertAfter:"lineInsertAfter",LineBreakInsert:"lineBreakInsert",SelectAll:"selectAll"}}),define("vs/editor/core/constants",["require","exports","./internalConstants"],function(e,t,n){t.EditorType={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor",ITerminal:"vs.editor.ITerminal"},t.ClassName={EditorWarningDecoration:"greensquiggly",EditorErrorDecoration:"redsquiggly"},t.InternalHandlers={Indent:n.Handler.Indent,Outdent:n.Handler.Outdent,LineInsertBefore:n.Handler.LineInsertBefore,LineInsertAfter:n.Handler.LineInsertAfter,AddCursorUp:n.Handler.AddCursorUp,AddCursorDown:n.Handler.AddCursorDown},t.EventType={Disposed:"disposed",ConfigurationChanged:"configurationChanged",ModelDispose:"modelDispose",ModelChanged:"modelChanged",ModelTokensChanged:"modelTokensChanged",ModelModeChanged:"modelsModeChanged",ModelContentChanged:"contentChanged",ModelContentChanged2:"contentChanged2",ModelContentChangedFlush:"flush",ModelContentChangedLinesDeleted:"linesDeleted",ModelContentChangedLinesInserted:"linesInserted",ModelContentChangedLineChanged:"lineChanged",EditorTextBlur:"blur",EditorTextFocus:"focus",EditorFocus:"widgetFocus",EditorBlur:"widgetBlur",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/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}),define("vs/platform/platform",["require","exports","vs/base/env","vs/base/types","vs/base/assert"],function(e,t,n,i,r){var o=function(){function e(){this.data={}}return e.prototype.add=function(e,t){r.ok(i.isString(e)),r.ok(i.isObject(t)),r.ok(!this.data.hasOwnProperty(e),"There is already an extension with this id"),this.data[e]=t},e.prototype.knows=function(e){return this.data.hasOwnProperty(e)},e.prototype.as=function(e){return this.data[e]||null},e}();t.Registry=new o;var s=function(){function e(){this.toBeInstantiated=[],this.instances=[]}return e.prototype.setInstantiationService=function(e){var t=this;if(this.instantiationService=e,n.isTesting())this.toBeInstantiated.forEach(function(e){t.instantiate(e)});else for(;this.toBeInstantiated.length>0;){var i=this.toBeInstantiated.shift();this.instantiate(i)}},e.prototype.instantiate=function(e){var t=this.instantiationService.createInstance(e);this.instances.push(t)},e.prototype._register=function(e){this.instantiationService?this.instantiate(e):this.toBeInstantiated.push(e)},e.prototype._getInstances=function(){return this.instances.slice(0)},e.prototype._setInstances=function(e){this.instances=e},e}();t.BaseRegistry=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/base/async",["require","exports","vs/base/errors","vs/base/lib/winjs.base"],function(e,t,n,i){function r(e,t){return new i.Promise(function(i,r,o){e.done(function(e){try{t(e)}catch(r){n.onUnexpectedError(r)}i(e)},function(e){try{t(e)}catch(i){n.onUnexpectedError(i)}r(e)},function(e){o(e)})},function(){e.cancel()})}function o(e){function t(){return e.length?e.pop()():null}function n(e){e&&r.push(e);var o=t();return o?o.then(n):i.Promise.as(r)}var r=[];return e=e.reverse(),i.Promise.as(null).then(n)}function s(e){var t,n=this,i=!1;return function(){return i?t:(i=!0,t=e.apply(n,arguments))}}var a=function(){function e(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}return e.prototype.queue=function(e){var t=this;if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){var n=function(){t.queuedPromise=null;var e=t.queue(t.queuedPromiseFactory);return t.queuedPromiseFactory=null,e};this.queuedPromise=this.activePromise.then(n,n)}return new i.Promise(function(e,n){t.queuedPromise.then(e,n)},function(){})}return this.activePromise=e(),this.activePromise.then(function(e){return t.activePromise=null,e},function(e){return t.activePromise=null,i.Promise.wrapError(e)})},e}();t.Throttler=a;var u=function(){function e(e){this.defaultDelay=e,this.timeoutPromise=null,this.completionPromise=null,this.onSuccess=null,this.task=null}return e.prototype.trigger=function(e,t){var n=this;return void 0===t&&(t=this.defaultDelay),this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new i.Promise(function(e){n.onSuccess=e},function(){}).then(function(){n.completionPromise=null,n.onSuccess=null;var e=n.task();return n.task=null,e})),this.timeoutPromise=i.Promise.timeout(t),this.timeoutPromise.then(function(){n.timeoutPromise=null,n.onSuccess(null)}),this.completionPromise},e.prototype.isTriggered=function(){return!!this.timeoutPromise},e.prototype.cancel=function(){this.cancelTimeout(),this.completionPromise&&(this.completionPromise.cancel(),this.completionPromise=null)},e.prototype.cancelTimeout=function(){this.timeoutPromise&&(this.timeoutPromise.cancel(),this.timeoutPromise=null)},e}();t.Delayer=u;var l=function(e){function t(t){e.call(this,t),this.throttler=new a}return __extends(t,e),t.prototype.trigger=function(t,n){var i=this;return e.prototype.trigger.call(this,function(){return i.throttler.queue(t)},n)},t}(u);t.ThrottledDelayer=l;var c=function(){function e(){var e=this;this._value=new i.TPromise(function(t,n){e._completeCallback=t,e._errorCallback=n})}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e.prototype.complete=function(e){this._completeCallback(e)},e.prototype.error=function(e){this._errorCallback(e)},e}();t.PromiseSource=c;var d=function(e){function t(t){var i,r,o;e.call(this,function(e,t,n){i=e,r=t,o=n},function(){r(n.canceled())}),t.then(i,r,o)}return __extends(t,e),t}(i.TPromise);t.ShallowCancelThenPromise=d,t.always=r,t.sequence=o,t.once=s}),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/worker/marshalling",["require","exports","vs/base/objects","vs/base/types"],function(e,t,n,i){function r(e){a.push(e)}function o(e){return n.cloneAndChange(e,function(e){if("object"==typeof e)for(var t=0;t<a.length;t++){var n=a[t];if(n.canSerialize(e))return n.serialize(e,o)}return void 0})}function s(e){return n.cloneAndChange(e,function(e){if(i.isObject(e))for(var t=0;t<a.length;t++){var n=a[t];if(n.canDeserialize(e))return n.deserialize(e,s)}return void 0})}var a=[];t.registerMarshallingContribution=r,t.serialize=o,t.deserialize=s,r({canSerialize:function(e){return e instanceof RegExp},serialize:function(e){var t="";return e.global?t+="g":e.ignoreCase?t+="i":e.multiline&&(t+="m"),{$isRegExp:!0,source:e.source,flags:t}},canDeserialize:function(e){return e.$isRegExp},deserialize:function(e){return new RegExp(e.source,e.flags)}})}),define("vs/base/paths",["require","exports","./env"],function(e,t,n){function i(e,n){e=r(e),n=r(n);for(var i=e.split(t.sep),o=n.split(t.sep);i.length>0&&o.length>0&&i[0]===o[0];)i.shift(),o.shift();for(var s=0,a=i.length;a>s;s++)o.unshift("..");return o.join(t.sep)}function r(e,n){if(!e)return e;for(var i=e.split(/[\\\/]/),r=0,o=i.length;o>r;r++)"."===i[r]&&i[r+1]&&(i.splice(r,1),r--);return i.join(n?p:t.sep)}function o(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?".":0===~t?e[0]:e.substring(0,~t)}function s(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t===e.length-1?s(e.substring(0,e.length-1)):e.substr(~t+1)}function a(e){var t=~e.lastIndexOf(".");return t?e.substring(~t):""}function u(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=g.exec(e[0]);n&&(e[0]=e[0].substr(n[0].length));for(var i=[],r=/^[\\\/]/.test(e[0]),o=/[\\\/]$/.test(e[e.length-1]),s=0;s<e.length;s++)i.push.apply(i,e[s].split(/\/|\\/));for(var s=0;s<i.length;s++){var a=i[s];"."===a||0===a.length?(i.splice(s,1),s-=1):".."===a&&i[s-1]&&".."!==i[s-1]&&(i.splice(s-1,2),s-=2)}r&&i.unshift(""),o&&i.push("");var u=i.join("/");return n&&(u=n[0]+u),u}function l(e){return e&&"/"===e[0]}function c(e){return l(r(e))?e:t.sep+e}function d(e){return e&&e.length>1&&"."===e[0]}function h(e,n){if(e=r(e).toLowerCase(),n=r(n).toLowerCase(),e===n)return!0;if(0!==e.indexOf(n))return!1;var i=n.length;return n.charCodeAt(i-1)===f&&(i-=1),e.charCodeAt(i)===t.sep.charCodeAt(0)}t.sep="/";var p=n.isWindows?"\\":"/",f=t.sep.charCodeAt(0);t.relative=i,t.normalize=r,t.dirname=o,t.basename=s,t.extname=a;var g=/^\w[\w\d.+-]*:\/\//;t.join=u,t.isAbsolute=l,t.makeAbsolute=c,t.isRelative=d,t.isEqualOrParent=h}),define("vs/base/uri",["require","exports"],function(){var e;return function(e){function t(e){return e?"string"!=typeof e.scheme?!1:"string"!=typeof e.authority?!1:"string"!=typeof e.path?!1:"string"!=typeof e.query?!1:"string"!=typeof e.fragment?!1:"function"!=typeof e.with?!1:"function"!=typeof e.withScheme?!1:"function"!=typeof e.withAuthority?!1:"function"!=typeof e.withPath?!1:"function"!=typeof e.withQuery?!1:"function"!=typeof e.withFragment?!1:"function"!=typeof e.toString?!1:"function"!=typeof e.toJSON?!1:!0:!1}function n(e){var t;return e&&(t=c.exec(e))?r(t[2],t[4],t[5],t[7],t[9]):r()}function i(e){return r("file",h,e)}function r(e,t,n,i,a){e=e?e.toLowerCase():h;var u={scheme:e,authority:t,path:n,query:i,fragment:a};(f[e]||s)(u);var l,c=(p[e]||o)(u);return l={get scheme(){return u.scheme},get authority(){return u.authority},get path(){return u.path},get query(){return u.query},get fragment(){return u.fragment},withScheme:function(e){return r(e,u.authority,u.path,u.query,u.fragment)},withAuthority:function(e){return r(u.scheme,e,u.path,u.query,u.fragment)},withPath:function(e){return r(u.scheme,u.authority,e,u.query,u.fragment)},withQuery:function(e){return r(u.scheme,u.authority,u.path,e,u.fragment)},withFragment:function(e){return r(u.scheme,u.authority,u.path,u.query,e)},with:function(){return r.apply(void 0,arguments)},toString:function(){return c},toJSON:function(){return c}}}function o(e){var t=[];return e.scheme&&(t.push(e.scheme),t.push(":")),e.authority&&(t.push("//"),t.push(e.authority)),e.path&&(e.authority&&e.path.charCodeAt(0)!==d.charCodeAt(0)&&t.push(d),t.push(e.path)),e.query&&(t.push("?"),t.push(e.query)),e.fragment&&(t.push("#"),t.push(e.fragment)),t.join(h)}function s(e){e.scheme=e.scheme||h,e.authority=e.authority||h,e.path=e.path||h,e.query=e.query||h,e.fragment=e.fragment||h}function a(e){e.scheme=e.scheme?e.scheme.toLowerCase():h,e.authority=e.authority?e.authority.toLowerCase():h,e.path=e.path||h,e.query=e.query||h,e.fragment=e.fragment||h}function u(e){var t=[];return t.push("file://"),e.path&&(m.test(e.path)&&t.push(d),t.push(e.path)),e.query&&(t.push("?"),t.push(e.query)),e.fragment&&(t.push("#"),t.push(e.fragment)),t.join(h)}function l(e){if(e.authority=h,e.path){var t,n=[];(t=g.exec(e.path))?(n.push(t[2].toLowerCase()),n.push(t[3])):n.push(e.path),e.path=n.join(h).replace(/\\/g,d)}else e.path=h;e.query=e.query||h,e.fragment=e.fragment||h}e.isURI=t;var c=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;e.parse=n,e.file=i;var d="/",h="";e.create=r;var p=Object.create(null);p.file=u;var f=Object.create(null);f.http=a,f.https=a,f.file=l;var g=/^(\\|\/)?([A-Za-z])(:.*)$/,m=/^([A-Za-z])(:.*)$/}(e||(e={})),e}),define("vs/base/network",["require","exports","./assert","./hash","./strings","vs/base/worker/marshalling","vs/base/paths","vs/base/uri"],function(e,t,n,i,r,o,s,a){o.registerMarshallingContribution({canSerialize:function(e){return e instanceof p},serialize:function(e){return{$isURL:!0,$value:e.toUnique()}},canDeserialize:function(e){return e.$isURL},deserialize:function(e){return new p(e.$value)}});var u=":".charCodeAt(0),l="/".charCodeAt(0),c="?".charCodeAt(0),d="#".charCodeAt(0),h=function(){function e(e){this.spec=e||r.empty,this.specLength=this.spec.length,this.parse()}return e.prototype.forwardSubstring=function(e,t){return t>e?this.spec.substring(e,t):r.empty},e.prototype.getScheme=function(){return this.forwardSubstring(this.schemeStart,this.domainStart-1)},e.prototype.getProtocol=function(){return this.forwardSubstring(this.schemeStart,this.domainStart)},e.prototype.getDomain=function(){return this.forwardSubstring(this.domainStart+2,this.portStart)},e.prototype.getPort=function(){return this.forwardSubstring(this.portStart+1,this.pathStart)},e.prototype.getHost=function(){return this.forwardSubstring(this.domainStart+2,this.pathStart)},e.prototype.getPath=function(){return this.forwardSubstring(this.pathStart,this.queryStringStart)},e.prototype.getQueryString=function(){return this.forwardSubstring(this.queryStringStart+1,this.fragmentIdStart)},e.prototype.getFragmentId=function(){return this.forwardSubstring(this.fragmentIdStart+1,this.specLength)},e.prototype.getAllBeforePath=function(){return this.forwardSubstring(0,this.pathStart)},e.prototype.getAllBeforeFragmentId=function(){return this.forwardSubstring(0,this.fragmentIdStart)},e.prototype.combine=function(e){var t=e.indexOf("?"),n=e.indexOf("#"),i=e.length;-1!==t&&i>t&&(i=t),-1!==n&&i>n&&(i=n);var o=e.substring(0,i),a=e.substring(i);o=o.replace("\\","/");var u;for(u=r.startsWith(o,"/")?s.join(o):s.join(s.dirname(this.getPath()),o),"/"===u.charAt(0)&&(u=u.substr(1));0===u.indexOf("../");)u=u.substr(3);return this.getAllBeforePath()+"/"+u+a},e.prototype.parse=function(){var e,t,n=0,i=1,r=2,o=3,s=4,a=n,h=this.spec,p=this.specLength,f=-1,g=-1;for(this.schemeStart=0,this.domainStart=this.specLength,this.portStart=this.specLength,this.pathStart=this.specLength,this.queryStringStart=this.specLength,this.fragmentIdStart=this.specLength,e=0;p>e;e++){switch(t=h.charCodeAt(e),a){case n:f===l&&t===l&&(a=i,this.domainStart=e-1);break;case i:t===u?(a=r,this.portStart=e):t===l?(a=o,this.portStart=e,this.pathStart=e):t===d&&(this.portStart=e,this.pathStart=e,this.queryStringStart=e,this.fragmentIdStart=e,e=p);break;case r:t===l?(a=o,this.pathStart=e):t===d&&(this.pathStart=e,this.queryStringStart=e,this.fragmentIdStart=e,e=p);break;case o:t===c?(a=s,this.queryStringStart=e):t===d&&(this.queryStringStart=e,this.fragmentIdStart=e,e=p);break;case s:t===d&&(this.fragmentIdStart=e,e=p)}g=f,f=t}a===n&&(this.schemeStart=this.specLength)},e}();t.ParsedUrl=h;var p=function(){function e(e){n.ok(!!e,"spec must not be null"),this._uri="string"==typeof e?a.parse(e):e,this._spec=this._uri.toString(),this._parsed=null}return e.fromEncoded=function(t){return new e(decodeURIComponent(t))},e.fromValue=function(t){return new e(t)},e.fromUri=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.toExternal=function(){return this._spec},e.prototype.getScheme=function(){return this._ensureParsedUrl(),this._parsed.getScheme()},e.prototype.getPath=function(){return this._ensureParsedUrl(),this._parsed.getPath()},e.prototype.toUnique=function(){return this._ensureParsedUrl(),this._parsed.getAllBeforeFragmentId()},e.prototype.startsWith=function(e){return r.startsWith(this._spec,e._spec)},e.prototype.combine=function(t){return this._ensureParsedUrl(),new e(this._parsed.combine(t))},e.prototype._ensureParsedUrl=function(){null===this._parsed&&(this._parsed=new h(this._spec))},Object.defineProperty(e.prototype,"scheme",{get:function(){return this._uri.scheme},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"authority",{get:function(){return this._uri.authority},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._uri.path},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"query",{get:function(){return this._uri.query},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fragment",{get:function(){return this._uri.fragment},enumerable:!0,configurable:!0}),e.prototype.withScheme=function(e){return a.create(e,this.authority,this.path,this.query,this.fragment)},e.prototype.withAuthority=function(e){return a.create(this.scheme,e,this.path,this.query,this.fragment)},e.prototype.withPath=function(e){return a.create(this.scheme,this.authority,e,this.query,this.fragment)},e.prototype.withQuery=function(e){return a.create(this.scheme,this.authority,this.path,e,this.fragment)},e.prototype.withFragment=function(e){return a.create(this.scheme,this.authority,this.path,this.query,e)},e.prototype.with=function(e,t,n,i,r){return a.create(e,t,n,i,r)},e.prototype.toString=function(){return this._spec},e.prototype.toJSON=function(){return this.toString()},e}();t.URL=p;var f;!function(e){e.inMemory="inmemory",e.http="http",e.https="https",e.file="file"}(f=t.schemas||(t.schemas={}))}),define("vs/base/time/precision",["require","exports"],function(e,t){function n(){return new r(i?self.performance.now():(new Date).getTime())}var i=self.performance&&"function"==typeof self.performance.now,r=function(){function e(e){this._startTime=e,this._stopTime=-1}return e.prototype.stop=function(){this._stopTime=i?self.performance.now():(new Date).getTime()},e.prototype.elapsed=function(){if(-1!==this._stopTime)return this._stopTime-this._startTime;var e=i?self.performance.now():(new Date).getTime();return e-this._startTime},e}();t.StopWatch=r,t.createStopWatch=n}),define("vs/base/performance/timer",["require","exports","vs/base/env","vs/base/errors","vs/base/time/precision"],function(e,t,n,i,r){function o(e,t,n,i){return h.start(e,t,n,i)}function s(){return h}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",e[e.STARTUP=4]="STARTUP"}(t.Topic||(t.Topic={}));var u=t.Topic,l=function(){function e(){}return e.prototype.stop=function(){},e.prototype.timeTaken=function(){return-1},e}(),c=function(){function e(e,t,n,i,o){if(this.timeKeeper=e,this.name=t,this.description=o,this.topic=n,this.stopTime=null,i)return this.startTime=i,void 0;if(this.startTime=new Date,this.sw=r.createStopWatch(),a){var s=["Monaco",this.topic,this.name,"start"];self.msWriteProfilerMark(s.join("|"))}}return e.prototype.stop=function(e){if(null===this.stopTime){if(e)return this.stopTime=e,this.sw=null,this.timeKeeper._onEventStopped(this),void 0;if(this.stopTime=new Date,this.sw&&this.sw.stop(),this.timeKeeper._onEventStopped(this),a){var t=["Monaco",this.topic,this.name,"stop"];self.msWriteProfilerMark(t.join("|"))}}},e.prototype.timeTaken=function(){return this.sw?this.sw.elapsed():this.stopTime?this.stopTime.getTime()-this.startTime.getTime():-1
},e}(),d=function(){function e(){this.cleaningIntervalId=-1,this.collectedEvents=[],this.listeners=[]}return e.prototype.isEnabled=function(){return n.enablePerformanceEvents},e.prototype.start=function(e,n,i,r){if(!this.isEnabled())return t.nullEvent;var o;"string"==typeof e?o=e:e===u.EDITOR?o="Editor":e===u.LANGUAGES?o="Languages":e===u.WORKER?o="Worker":e===u.WORKBENCH?o="Workbench":e===u.STARTUP&&(o="Startup"),this.initAutoCleaning();var s=new c(this,n,o,i,r);return this.addEvent(s),s},e.prototype.dispose=function(){-1!==this.cleaningIntervalId&&(clearInterval(this.cleaningIntervalId),this.cleaningIntervalId=-1)},e.prototype.addListener=function(e){this.listeners.push(e)},e.prototype.removeListener=function(e){for(var t=0;t<this.listeners.length;t++)if(this.listeners[t]===e)return this.listeners.splice(t,1),void 0},e.prototype.addEvent=function(t){t.id=e.EVENT_ID,e.EVENT_ID++,this.collectedEvents.push(t),this.collectedEvents.length>e._EVENT_CACHE_LIMIT&&this.collectedEvents.shift()},e.prototype.initAutoCleaning=function(){var t=this;-1===this.cleaningIntervalId&&(this.cleaningIntervalId=setInterval(function(){var n=Date.now();t.collectedEvents.forEach(function(t){!t.stopTime&&n-t.startTime.getTime()>=e._MAX_TIMER_LENGTH&&t.stop()})},e._CLEAN_UP_INTERVAL))},e.prototype.getCollectedEvents=function(){return this.collectedEvents.slice(0)},e.prototype.clearCollectedEvents=function(){this.collectedEvents=[]},e.prototype._onEventStopped=function(e){for(var t=[e],n=this.listeners.slice(0),r=0;r<n.length;r++)try{n[r](t)}catch(o){i.onUnexpectedError(o)}},e.prototype.setInitialCollectedEvents=function(t,n){var i=this;this.isEnabled()&&(n&&(e.PARSE_TIME=n),t.forEach(function(e){var t=new c(i,e.name,e.topic,e.startTime,e.description);t.stop(e.stopTime),i.addEvent(t)}))},e._MAX_TIMER_LENGTH=6e4,e._CLEAN_UP_INTERVAL=12e4,e._EVENT_CACHE_LIMIT=1e3,e.EVENT_ID=1,e.PARSE_TIME=new Date,e}();t.TimeKeeper=d;var h=new d;t.nullEvent=new l,t.start=o,t.getTimeKeeper=s}),define("vs/base/http",["require","exports"],function(e,t){function n(e,t,n,i){var r,o;return{header:function(n){if("undefined"==typeof o)for(o=Object.create(null),u.lastIndex=t;;){var i=u.exec(e);if(!i)break;if(o[i[1].toLowerCase()]=i[2],i[3])break}return o[n.toLowerCase()]},value:function(){return"undefined"==typeof r&&(r=e.substr(n+2,i)),r}}}function i(e,t,i){void 0===i&&(i=0);var r=e.responseText;for(a.lastIndex=i;;){var o=a.exec(r);if(!o)return i;var s=parseInt(o[1],10);if(r.length<a.lastIndex+s)return i;t.push(n(r,i,a.lastIndex-2,s)),i=a.lastIndex+s}}t.GET="GET",t.POST="POST",t.PUT="PUT",t.DELETE="DELETE";var r;!function(e){e.CONTENT_TYPE="Content-Type",e.CONTENT_LENGTH="Content-Length",e.LAST_MODIFIED="Last-Modified",e.LOCATION="Location",e.ETAG="ETag",e.X_CONTENT_CHARSET="X-Content-Charset",e.X_CONTENT_TYPES="X-Content-Types",e.X_CONTENT_HASH="X-Content-Hash",e.X_FILEPATH="X-Filepath"}(r=t.Header||(t.Header={}));var o;!function(e){e.RAW="application/octet-stream",e.JSON="application/json",e.TEXT="text/plain",e.HTML="text/html"}(o=t.Mime||(t.Mime={}));var s;!function(e){e.UTF8="utf-8",e.UTF8_BOM="UTF8_BOM"}(s=t.Charset||(t.Charset={}));var a=/X-Chunk-Length:(\d+)\r\n\r\n/gi,u=/(.+?):(.+?)\r\n(\r\n)?/gm;t.parseChunkedData=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/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"}}),define("vs/base/mime",["require","exports","vs/base/paths","vs/base/types","vs/base/strings"],function(e,t,n,i,r){function o(e,t){e&&t&&(h[e]=t)}function s(e){if(!e)return!1;var n;return n=i.isArray(e)?e:e.split(",").map(function(e){return e.trim()}),n.indexOf(t.MIME_BINARY)>=0}function a(e){if(!e)return[t.MIME_UNKNOWN];e=e.toLowerCase();var i=n.basename(e),o=n.extname(e);for(var s in h){var a=s.toLowerCase();if(i===a||"."===s[0]&&r.endsWith(i,a)){var u=[h[s]];return u.push(t.MIME_TEXT),u}}if(l[i]){var u=[l[i]];return u.push(t.MIME_TEXT),u}if(c[o]){var u=[c[o]];return c[o]!==t.MIME_TEXT&&u.push(t.MIME_TEXT),u}if(d[o]){var u=[d[o]];return d[o]!==t.MIME_BINARY&&u.push(t.MIME_BINARY),u}return[t.MIME_UNKNOWN]}function u(e){return e&&e!==t.MIME_BINARY&&e!==t.MIME_TEXT&&e!==t.MIME_UNKNOWN}t.MIME_TEXT="text/plain",t.MIME_BINARY="application/octet-stream",t.MIME_UNKNOWN="application/unknown";var l={jakefile:"text/javascript",makefile:"text/x-makefile",config:"text/x-ini",dockerfile:"text/x-dockerfile",".gitignore":"text/x-ini",".gitattributes":"text/x-ini",".gitconfig":"text/x-ini"},c={".html":"text/html",".htm":"text/html",".shtml":"text/html",".mdoc":"text/html",".jsp":"text/html",".jshtm":"text/x-jshtm",".js":"text/javascript",".json":"application/json",".css":"text/css",".less":"text/x-less",".txt":"text/plain",".gitignore":"text/plain",".xml":"text/xml",".ascx":"text/xml",".aspx":"text/xml",".csproj":"text/xml",".config":"text/xml",".wxi":"text/xml",".wxl":"text/xml",".wxs":"text/xml",".dtd":"application/xml-dtd",".pl":"application/x-perl",".php":"application/x-php",".ctp":"application/x-php",".md":"text/x-web-markdown",".markdown":"text/x-web-markdown",".mdown":"text/x-web-markdown",".mkdn":"text/x-web-markdown",".mkd":"text/x-web-markdown",".mdwn":"text/x-web-markdown",".mdtxt":"text/x-web-markdown",".mdtext":"text/x-web-markdown",".cs":"text/x-csharp",".fs":"text/x-fsharp",".dot":"text/x-dot",".c":"text/x-cpp",".cc":"text/x-cpp",".cpp":"text/x-cpp",".h":"text/x-cpp",".hpp":"text/x-cpp",".cshtml":"text/x-cshtml",".xaml":"application/xaml+xml",".coffee":"text/x-coffeescript",".java":"text/x-java-source",".jav":"text/x-java-source",".bat":"text/x-bat",".vb":"text/x-vb",".handlebars":"text/x-handlebars-template",".hbs":"text/x-handlebars-template",".lua":"text/x-lua",".jade":"text/x-jade",".ps1":"text/x-powershell",".psm1":"text/x-powershell",".ts":"text/typescript",".ini":"text/x-ini",".properties":"text/x-ini",".gitconfig":"text/x-ini",".yml":"text/x-ini",".scss":"text/x-scss",".cmd":"text/x-bat"},d={".bmp":"image/bmp",".gif":"image/gif",".jpg":"image/jpg",".jpeg":"image/jpg",".jpe":"image/jpg",".png":"image/png",".svg":"image/svg+xml",".svgz":"image/svg+xml",".tiff":"image/tiff",".tif":"image/tiff",".ico":"image/x-icon",".tga":"image/x-tga",".psd":"image/vnd.adobe.photoshop",".mid":"audio/midi",".midi":"audio/midi",".mp4a":"audio/mp4",".mpga":"audio/mpeg",".mp2":"audio/mpeg",".mp2a":"audio/mpeg",".mp3":"audio/mpeg",".m2a":"audio/mpeg",".m3a":"audio/mpeg",".oga":"audio/ogg",".ogg":"audio/ogg",".spx":"audio/ogg",".aac":"audio/x-aac",".wav":"audio/x-wav",".wma":"audio/x-ms-wma",".mp4":"video/mp4",".mp4v":"video/mp4",".mpg4":"video/mp4",".mpeg":"video/mpeg",".mpg":"video/mpeg",".mpe":"video/mpeg",".m1v":"video/mpeg",".m2v":"video/mpeg",".ogv":"video/ogg",".qt":"video/quicktime",".mov":"video/quicktime",".webm":"video/webm",".mkv":"video/x-matroska",".mk3d":"video/x-matroska",".mks":"video/x-matroska",".wmv":"video/x-ms-wmv",".flv":"video/x-flv",".avi":"video/x-msvideo",".exe":"application/x-msdownload-exe",".dll":"application/x-msdownload",".com":"application/x-msdownload",".msi":"application/x-msdownload",".pdf":"application/pdf",".doc":"application/msword",".dot":"application/msword",".ppt":"application/vnd.ms-powerpoint",".pps":"application/vnd.ms-powerpoint",".pot":"application/vnd.ms-powerpoint",".xls":"application/vnd.ms-excel",".xlm":"application/vnd.ms-excel",".xla":"application/vnd.ms-excel",".xlc":"application/vnd.ms-excel",".xlt":"application/vnd.ms-excel",".xlw":"application/vnd.ms-excel",".zip":"application/zip",".rar":"application/x-rar-compressed",".iso":"application/x-iso9660-image",".dmg":"application/x-apple-diskimage",".bin":"application/octet-stream",".tar":"application/x-tar",".gz":"application/x-gzip",".7z":"application/x-7z-compressed",".cab":"application/vnd.ms-cab-compressed",".ttf":"application/x-font-ttf",".jar":"application/java-archive",".ps":"application/postscript",".ai":"application/postscript",".swf":"application/x-shockwave-flash",".aif":"audio/x-aiff",".odt":"application/vnd.oasis.opendocument.text",".so":"application/octet-stream",".obj":"application/octet-stream",".class":"application/java-vm",".jnilib":"application/octet-stream",".woff":"application/x-font-woff",".suo":"application/octet-stream",".deb":"application/x-debian-package",".sit":"application/x-stuffit",".sitx":"application/x-stuffitx",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".dotx":"application/vnd.openxmlformats-officedocument.wordprocessingml.template",".rtf":"application/rtf",".war":"application/octet-stream",".pdb":"application/vnd.palm",".xap":"application/x-silverlight-app",".lnk":"application/octet-stream",".mdb":"application/x-msaccess",".nupkg":"application/octet-stream",".cspkg":"application/octet-stream",".cer":"application/pkix-cert",".node":"application/octet-stream",".sl":"application/octet-stream",".snk":"application/octet-stream",".chm":"application/vnd.ms-htmlhelp",".reg":"application/octet-stream",".xcf":"application/octet-stream",".eot":"application/vnd.ms-fontobject",".bson":"application/octet-stream",".cache":"application/octet-stream",".pyc":"application/octet-stream",".movie":"video/x-sgi-movie",".pyo":"application/octet-stream",".out":"application/output"},h=Object.create(null);t.registerTextMime=o,t.isBinaryMime=s,t.guessMimeTypes=a,t.isSpecific=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/platform/files/files",["require","exports","vs/base/assert","vs/base/paths","vs/base/uri","vs/base/types","vs/base/strings","vs/base/ui/events","vs/base/mime"],function(e,t,n,i,r,o,s,a,u){function l(e){return"undefined"!=typeof e.charset&&"string"!=typeof e.charset?!1:"string"!=typeof e.etag?!1:"string"!=typeof e.mime?!1:"number"!=typeof e.mtime?!1:"string"!=typeof e.name?!1:"string"!=typeof e.path?!1:"string"!=typeof e.value?!1:!0}!function(e){e[e.UPDATED=0]="UPDATED",e[e.ADDED=1]="ADDED",e[e.DELETED=2]="DELETED"}(t.FileChangeType||(t.FileChangeType={}));var c=t.FileChangeType;!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.FILE=1]="FILE",e[e.DIRECTORY=2]="DIRECTORY"}(t.FileChangeKind||(t.FileChangeKind={}));t.FileChangeKind;t.EventType={FILE_CHANGES:"files:fileChanges"};var d=function(e){function t(t){e.call(this),this._changes=t,this._changes.forEach(function(e){e.path=i.makeAbsolute(i.normalize(e.path))})}return __extends(t,e),Object.defineProperty(t.prototype,"changes",{get:function(){return this._changes},enumerable:!0,configurable:!0}),t.prototype.filter=function(e){return new t(this._changes.filter(function(t){var n=t.path.split(/\//);return n.shift(),e(t,n)}))},t.prototype.contains=function(e,t){return e?this.containsAny([e],t):!1},t.prototype.containsAny=function(e,t){return e&&e.length?this._changes.some(function(n){return n.type!==t?!1:t===c.DELETED?e.some(function(e){return i.isEqualOrParent(e,n.path)}):e.some(function(e){return n.path===e})}):!1},t.prototype.getAdded=function(){return this.getOfType(c.ADDED)},t.prototype.gotAdded=function(){return this.hasType(c.ADDED)},t.prototype.getDeleted=function(){return this.getOfType(c.DELETED)},t.prototype.gotDeleted=function(){return this.hasType(c.DELETED)},t.prototype.getUpdated=function(){return this.getOfType(c.UPDATED)},t.prototype.gotUpdated=function(){return this.hasType(c.UPDATED)},t.prototype.getMoved=function(){return this._changes.filter(function(e){return!!e.movedFrom})},t.prototype.gotMoved=function(){return this._changes.some(function(e){return!!e.movedFrom})},t.prototype.getOfType=function(e){return this._changes.filter(function(t){return t.type===e})},t.prototype.hasType=function(e){return this._changes.some(function(t){return t.type===e})},t}(a.Event);t.FileChangesEvent=d,t.isIContent=l;var h=function(){function e(e,t,n,r,s,a,u){this.path=i.makeAbsolute(i.normalize(e)),this.value=t,this.name=n,this.mtime=r,this.etag=u,this.mime=s,this.charset=a,this.mtime=o.isNumber(r)?r:o.isString(r)?new Date(r).getTime():-1,this.mime&&this.mime.indexOf("; charset")>=0&&(this.mime=this.mime.substring(0,this.mime.indexOf(";")))}return e}();t.Content=h,function(e){e[e.FILE=0]="FILE",e[e.FOLDER=1]="FOLDER",e[e.ANY=2]="ANY"}(t.StatType||(t.StatType={}));var p=t.StatType,f=function(){function e(e,t,s,a,l,c,d){n.ok(!a||s,"Only a directory can have children"),this.resource=o.isString(e)?r.parse(e):e,this.path=i.makeAbsolute(i.normalize(t)),o.isString(l)?this.name=l:this.path&&(this.name=i.basename(this.path)),this.isDirectory=!!s,this.hasChildren=s&&a,this.mime=s?void 0:u.guessMimeTypes(this.path).join(", "),this.isDirectoryResolved=!1,this.etag=d,this.mtime=c,this.isDirectory&&(this.children=[])}return e.fromRAW=function(t,n,r){var s=new e(t.resource,t.path,t.isDirectory,t.hasChildren,t.name,t.mtime,t.etag);if(n&&n instanceof e?n.addChild(s):o.isString(n)&&(s.path=i.makeAbsolute(i.normalize(n))),s.isDirectory&&(s.children=[],s.isDirectoryResolved=!!t.children||!!r&&r.some(function(e){return i.isEqualOrParent(e,s.path)}),t.children))for(var a=0,u=t.children.length;u>a;a++)e.fromRAW(t.children[a],s,r);return s},e.prototype.clone=function(){var t=new e(this.resource,this.path,this.isDirectory,this.hasChildren,this.name,this.mtime,this.etag);return t.isDirectoryResolved=this.isDirectoryResolved,this.parent&&(t.parent=this.parent),this.isDirectory&&this.children.forEach(function(e){t.addChild(e.clone())}),t},e.prototype.addChild=function(e){n.ok(this.isDirectory,"Can only add a child to a folder"),this.removeChild(e),e.parent=this,e.updatePath(!1),this.children.push(e),this.hasChildren=this.children.length>0},e.prototype.hasChild=function(e,t,i){void 0===i&&(i=p.ANY),n.ok(this.isDirectory,"Can only call hasChild on a directory"),n.ok(o.isString(e),"Expected parameter of type String");for(var r=0;r<this.children.length;r++){var s=this.children[r];if(!(i===p.FILE&&s.isDirectory||i===p.FOLDER&&!s.isDirectory)){if(s.name===e)return!0;if(t&&s.name.toLowerCase()===e.toLowerCase())return!0}}return!1},e.prototype.removeChild=function(e){n.ok(this.isDirectory,"Can only remove a child from a directory"),n.ok(!!this.children,"Expected children for directory but found none: "+this.path);for(var t=0;t<this.children.length;t++)if(this.children[t].path===e.path){this.children.splice(t,1);break}this.hasChildren=this.children.length>0},e.prototype.move=function(e,t,i){var r=this;n.ok(e.isDirectory,"Can only move an element into a directory"),n.ok(!this.isRoot(),"Can not move the root"),t||(t=function(e){e()}),this.parent.removeChild(this),t(function(){e.addChild(r),r.updatePath(!0),i&&i()})},e.prototype.updatePath=function(e){this.path=i.join(this.parent.path,this.name),e&&this.isDirectory&&this.hasChildren&&this.children&&this.children.forEach(function(e){e.updatePath(!0)})},e.prototype.rename=function(e){n.ok(!this.isRoot(),"Can not rename root"),this.name=e.name,this.mime=e.mime,this.mtime=e.mtime,this.updatePath(!0)},e.prototype.find=function(e){return n.ok(o.isString(e),"Expected String as parameter"),n.ok(this.isDirectory,"Can only find() in directories"),n.ok(this.isRoot(),"Can only find() from root"),this.doFind(e)},e.prototype.doFind=function(e){if(e===i.sep&&this.isRoot())return this;if(!this.hasChildren)return null;e=s.trim(e,i.sep);var t=e.split(i.sep);if(t.length>0)for(var n=0;n<this.children.length;n++)if(this.children[n].name===t[0])return 1===t.length?this.children[n]:this.children[n].doFind(e.substr(e.indexOf(i.sep)));return null},e.prototype.isRoot=function(){return this.path===i.sep},e.prototype.isAncestorOf=function(e){return this.isDirectory&&i.isEqualOrParent(e.path,this.path)},e.prototype.isParentOf=function(e){if(!this.isAncestorOf(e))return!1;var t=this.isRoot()?s.empty:this.path;return 2===e.path.substring(t.length).split(i.sep).length},e.prototype.equals=function(t){return t&&t instanceof e&&t.path===this.path},e}();t.FileStatImpl=f,function(e){e[e.FILE_IS_BINARY=0]="FILE_IS_BINARY",e[e.FILE_NOT_FOUND=1]="FILE_NOT_FOUND",e[e.FILE_NOT_MODIFIED_SINCE=2]="FILE_NOT_MODIFIED_SINCE",e[e.FILE_MODIFIED_SINCE=3]="FILE_MODIFIED_SINCE",e[e.FILE_MOVE_CONFLICT=4]="FILE_MOVE_CONFLICT"}(t.FileOperationResult||(t.FileOperationResult={}));t.FileOperationResult});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/env","vs/base/strings","vs/base/network","vs/base/performance/timer","vs/base/objects","vs/base/hash","vs/base/errors","vs/base/worker/marshalling","vs/base/http","vs/base/ui/events","vs/platform/files/files"],function(e,t,n,i,r,o,s,a,u,l,c,d,h,p,f){var g=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=g;var m=function(e){function t(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];e.call(this,n),this._ctor=t}return __extends(t,e),Object.defineProperty(t.prototype,"ctor",{get:function(){return this._ctor},enumerable:!0,configurable:!0}),t.prototype.equals=function(e){return e===this?!0:e instanceof t?e.ctor===this.ctor:!1},t.prototype.hashCode=function(){return 61*(1+this.ctor.length)},t}(g);t.SyncDescriptor=m,d.registerMarshallingContribution({canSerialize:function(e){return e instanceof v},serialize:function(e,t){return{$isAsyncDescriptor:!0,$moduleName:e.moduleName,$ctorName:e.ctorName,$staticArguments:t(e.staticArguments())}},canDeserialize:function(e){return e.$isAsyncDescriptor},deserialize:function(e,t){var n=new v(e.$moduleName,e.$ctorName);return n.appendStaticArguments(t(e.$staticArguments)),n}});var v=function(t){function n(e,n){for(var i=[],r=2;r<arguments.length;r++)i[r-2]=arguments[r];t.call(this,i),this._moduleName=e,this._ctorName=n}return __extends(n,t),n.create=function(e,t){return new n(e,t)},Object.defineProperty(n.prototype,"moduleName",{get:function(){return this._moduleName},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"ctorName",{get:function(){return this._ctorName},enumerable:!0,configurable:!0}),n.prototype.equals=function(e){return e===this?!0:e instanceof n?e.moduleName===this.moduleName&&e.ctorName===this.ctorName:!1},n.prototype.hashCode=function(){return l.computeMurmur2StringHashCode(this.moduleName)*l.computeMurmur2StringHashCode(this.ctorName)},n.prototype.toSyncDescriptor=function(){var t;try{t=e(this.moduleName)}catch(n){return null}var i=t[this.ctorName],r=new m(i);return r.appendStaticArguments(this.staticArguments()),r},n}(g);t.AsyncDescriptor=v,function(e){e[e.None=0]="None",e[e.Group1=1]="Group1",e[e.Group2=2]="Group2",e[e.Group3=3]="Group3",e[e.Group4=4]="Group4",e[e.Group5=5]="Group5",e[e.Group6=6]="Group6",e[e.Group7=7]="Group7",e[e.Group8=8]="Group8",e[e.Group9=9]="Group9"}(t.ThreadAffinity||(t.ThreadAffinity={}));var y=(t.ThreadAffinity,function(){function e(e,t,n){void 0===n&&(n={}),this.workspace=e,this.configuration=t,this.options=n}return e.prototype.getWorkspace=function(){return this.workspace},e.prototype.getConfiguration=function(){return this.configuration},e.prototype.getOptions=function(){return this.options},e}());t.BaseWorkspaceContextService=y;var _=function(){function e(e,t,n){var i=null;if(e&&e.contextService){var s=e.contextService;this._serviceMap=s.getWorkspace(),this._telemetryService=e.telemetryService;var a=s.getConfiguration();a&&(this._additionalHeaders=a.additionalHeaders),i=s.getWorkspace().resource,o.endsWith(i,"/")||(i+="/"),!r.isNative&&s.getWorkspace().publicUrl&&(i=s.getWorkspace().publicUrl)}else this._serviceMap=e,this._additionalHeaders=t,this._telemetryService=n;this.computeOrigin(i)}return e.prototype.computeOrigin=function(e){if(e){this._origin=e;var t=new s.URL(this._origin).getPath();t&&t.length>0&&(this._origin=this._origin.substring(0,this._origin.length-t.length+1)),o.endsWith(this._origin,"/")||(this._origin+="/")}else this._origin="/"},e.prototype.getRequestUrl=function(e,t,n){if(this._serviceMap[e]){var i=this._serviceMap[e]+o.normalizePath(t),r=new s.URL(i);return r.getScheme()?i:n?this._origin+o.ltrim(i,"/"):i}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._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.makeCrossOriginRequest=function(e){var t=this.getRequestUrl("http");if(t){var n=o.format("{0}?url={1}",t,encodeURIComponent(e.url));return e.url=n,this.makeRequest(e)}return null},e.prototype.makeRequest=function(e){var t=a.nullEvent,r=!1,s=e.url;if(!s)throw new Error("IRequestService.makeRequest: Url is required");if((o.startsWith(s,"http://")||o.startsWith(s,"https://"))&&this._origin&&!o.startsWith(s,this._origin)){var l=this.makeCrossOriginRequest(e);if(l)return l;r=!0}var c=e;if(!r){var d=this.getAdditionalHeaders();this._telemetryService&&(d["X-TelemetrySession"]=this._telemetryService.sessionID),d["X-Requested-With"]="XMLHttpRequest",c.headers=u.mixin(c.headers,d)}return e.customRequestConfiguration&&(c.customRequestInitializer=function(t){u.mixin(t,e.customRequestConfiguration)}),this._telemetryService&&(t=this._telemetryService.start(r?"CorsXHR":"WorkbenchXHR",{url:s},!1)),i.always(n.xhr(c),function(e){t.data&&(t.data.status=e.status),t.stop()})},e.prototype.makeChunkedRequest=function(e){var t,i,r,o=this,s=0,a=!1;return new n.TPromise(function(n,a,u){t=n,i=a,r=u,o.makeRequest(e).done(function(e){var n={request:e,chunks:[]};s=h.parseChunkedData(e,n.chunks,s),t(n)},function(e){i(e)},function(){})},function(){a=!0})},e.prototype.reconnect=function(){},e}();t.BaseRequestService=_;var b=function(){function e(){}return e.CONNECTION_STATE_CHANGE="connectionStateChanged",e.CONNECTION_RECONNECTED="connectionReconnected",e}();t.RequstServiceEventTypes=b,function(e){e[e.CONNECTED=0]="CONNECTED",e[e.DISCONNECTED=1]="DISCONNECTED",e[e.SESSION_OVER=2]="SESSION_OVER",e[e.OUTDATED_CLIENT=3]="OUTDATED_CLIENT"}(t.ConnectionState||(t.ConnectionState={}));t.ConnectionState;!function(e){e[e.GLOBAL=0]="GLOBAL",e[e.WORKSPACE=1]="WORKSPACE"}(t.StorageScope||(t.StorageScope={}));t.StorageScope;t.StorageEventType={STORAGE:"storage"};var w=function(e){function t(t,n,i,r){e.call(this,t,n,i,r)}return __extends(t,e),t.prototype.isLocal=function(){return!this.originalEvent},t}(p.PropertyChangeEvent);t.StorageEvent=w,function(e){e[e.LEFT=0]="LEFT",e[e.CENTER=1]="CENTER",e[e.RIGHT=2]="RIGHT"}(t.Position||(t.Position={}));var C=t.Position;t.POSITIONS=[C.LEFT,C.CENTER,C.RIGHT];var E=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=E;var S=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.toArray=function(){return this.selection},t}(E);t.StructuredSelection=S;var T=function(){function e(){}return e.UPDATED="update",e}();t.ConfigurationServiceEventTypes=T,t.ResourceEvents={ADDED:"resource.added",REMOVED:"resource.removed",CHANGED:"resource.changed"};var L;!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([])},e.Instance=new e,e}());e.NullSearchService=t}(L=t.Search||(t.Search={})),t.Files=f});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){void 0===n&&(n=""),void 0===i&&(i=""),void 0===r&&(r=!0),void 0===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,"tooltip",{get:function(){return this._tooltip},set:function(e){this._setTooltip(e)},enumerable:!0,configurable:!0}),t.prototype._setTooltip=function(e){this._tooltip!==e&&(this._tooltip=e,this.emit(t.TOOLTIP,{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.TOOLTIP="tooltip",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;return e.enabled?(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})})):n.Promise.as(null)},t}(i.EventEmitter);t.ActionRunner=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/editorAction",["require","exports","vs/base/ui/actions","vs/base/lifecycle","vs/base/types","vs/editor/core/constants","vs/base/lib/winjs.base"],function(e,t,n,i,r,o,s){var a=function(){function e(e){this._delegates=e}return e.prototype.value=function(){return this._delegates.every(function(e){return e.value()})},e.prototype.reset=function(){this._delegates.forEach(function(e){e instanceof u&&e.reset()})},e.prototype.dispose=function(){this._delegates.forEach(function(e){return e.dispose()})},e}(),u=function(){function e(){}return e.prototype.reset=function(){this._value=null},e.prototype.dispose=function(){},e.prototype.value=function(){return r.isUndefinedOrNull(this._value)&&(this._value=this._computeValue()),this._value},e.prototype._computeValue=function(){return!1},e}(),l=function(e){function t(t,n){var i=this;e.call(this),this._behaviour=t,this.editor=n,this._callOnDispose=[],this.hasTextFocus=!1,this.hasWidgetFocus=!1,this.isReadOnly=!1,this._behaviour&d.TextFocus&&(this._callOnDispose.push(this.editor.addListener(o.EventType.EditorTextFocus,function(){return i._update(!0)})),this._callOnDispose.push(this.editor.addListener(o.EventType.EditorTextBlur,function(){return i._update(!1)}))),this._behaviour&d.WidgetFocus&&(this._callOnDispose.push(this.editor.addListener(o.EventType.EditorFocus,function(){return i._update(void 0,!0)})),this._callOnDispose.push(this.editor.addListener(o.EventType.EditorBlur,function(){return i._update(void 0,!1)}))),this._behaviour&d.Writeable&&this._callOnDispose.push(this.editor.addListener(o.EventType.ConfigurationChanged,function(){return i._update()}))}return __extends(t,e),t.prototype._update=function(e,t){void 0===e&&(e=this.hasTextFocus),void 0===t&&(t=this.hasWidgetFocus),this.hasTextFocus=e,this.hasWidgetFocus=t,this.isReadOnly=this.editor.getConfiguration().readOnly,this.reset()},t.prototype.dispose=function(){e.prototype.dispose.call(this),i.cAll(this._callOnDispose)},t.prototype._computeValue=function(){return this._behaviour&d.TextFocus&&!this.hasTextFocus?!1:this._behaviour&d.WidgetFocus&&!this.hasWidgetFocus?!1:this._behaviour&d.Writeable&&this.isReadOnly?!1:!0},t}(u),c=function(e){function t(t,n){var i=this;e.call(this),this._action=n,this._callOnDispose=[],t&d.UpdateOnModelChange&&this._callOnDispose.push(this._action.editor.addListener(o.EventType.ModelChanged,function(){return i.reset()
})),t&d.UpdateOnCursorPositionChange&&this._callOnDispose.push(this._action.editor.addListener(o.EventType.CursorPositionChanged,function(){return i.reset()}))}return __extends(t,e),t.prototype._computeValue=function(){return this._action.editor.getModel()?this._action.isSupported()?this._action.getEnablementState()?!0:!1:!1:!1},t}(u);!function(e){e[e.TextFocus=1]="TextFocus",e[e.WidgetFocus=2]="WidgetFocus",e[e.Writeable=4]="Writeable",e[e.UpdateOnModelChange=8]="UpdateOnModelChange",e[e.UpdateOnConfigurationChange=16]="UpdateOnConfigurationChange",e[e.ShowInContextMenu=32]="ShowInContextMenu",e[e.UpdateOnCursorPositionChange=64]="UpdateOnCursorPositionChange"}(t.Behaviour||(t.Behaviour={}));var d=t.Behaviour;t.defaultPrecondition=d.TextFocus|d.Writeable|d.UpdateOnModelChange;var h=function(e){function t(t,n,i,r){var o=this;e.call(this,n.id),this.editor=i,this._descriptor=n,this.label=n.label||"",this._enablementState=new a([new l(r,i),new c(r,this)]),this._shouldShowInContextMenu=!!(r&d.ShowInContextMenu),this._supportsReadonly=!(r&d.Writeable),this.toUnhook=[],this._bindings=[],this._telemetryService=t.telemetryService,this._handlerService=t.handlerService,this._editorService=t.editorService;for(var u=function(){return o.enabled?(o._telemetryService.publicLog("editorActionInvoked",{name:o.label}),s.Promise.as(o.run()).done(),!0):!1},h=0;h<this._descriptor.keybindings.length;h++)this._bindings.push(this._handlerService.bind(this._descriptor.keybindings[h],u))}return __extends(t,e),Object.defineProperty(t.prototype,"handlerService",{get:function(){return this._handlerService},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"telemetryService",{get:function(){return this._telemetryService},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"editorService",{get:function(){return this._editorService},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this.id},t.prototype.dispose=function(){this._enablementState.dispose(),this.toUnhook=i.cAll(this.toUnhook),this._bindings=i.disposeAll(this._bindings),e.prototype.dispose.call(this)},t.prototype.getGroupId=function(){return this.id},t.prototype.shouldShowInContextMenu=function(){return this._shouldShowInContextMenu},t.prototype.getDescriptor=function(){return this._descriptor},Object.defineProperty(t.prototype,"enabled",{get:function(){return this._enablementState.value()},set:function(){var e=new Error;console.log("setting EditorAction.enabled is UNCOOL. Use resetEnablementState and getEnablementState"),console.log(e.stack)},enumerable:!0,configurable:!0}),t.prototype.resetEnablementState=function(){this._enablementState.reset()},t.prototype.isSupported=function(){if(!this._supportsReadonly){if(this.editor.getConfiguration().readOnly)return!1;var e=this.editor.getModel();if(e&&e.hasEditableRange())return!1}return!0},t.prototype.getEnablementState=function(){return!0},t}(n.Action);t.EditorAction=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/editorExtensions",["require","exports","vs/base/lib/winjs.base","vs/platform/platform","vs/platform/services","vs/editor/editorAction","vs/base/strings"],function(e,t,n,i,r,o,s){function a(e,t,n){if(e.getLineContent().length<=t)return!1;for(var i=e.findIndexOfOffset(t),r=e.getTokenType(i),o=0,a=n.length;a>o;o++)if(""===n[o]){if(""===r)return!0}else if(s.startsWith(r,n[o]))return!0;return!1}function u(e){i.Registry.as(t.Extensions.EditorContributions).registerEditorContribution2(e)}function l(e,n,r){for(var o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];i.Registry.as(t.Extensions.EditorContributions).registerEditorActionContribution2(e,n,r,o)}!function(e){e[e.TextFocus=1]="TextFocus",e[e.WidgetFocus=2]="WidgetFocus",e[e.Writeable=4]="Writeable",e[e.UpdateOnModelChange=8]="UpdateOnModelChange",e[e.UpdateOnConfigurationChange=16]="UpdateOnConfigurationChange",e[e.ShowInContextMenu=32]="ShowInContextMenu",e[e.UpdateOnCursorPositionChange=64]="UpdateOnCursorPositionChange"}(t.Behaviour||(t.Behaviour={}));var c=t.Behaviour;t.defaultPrecondition=o.defaultPrecondition;var d=function(e){function t(t,n,i,r){e.call(this,t,n,i,r)}return __extends(t,e),t}(o.EditorAction);t.EditorAction=d;var h=function(e){function i(n,i,r,o){e.call(this,n,i,r,t.defaultPrecondition),this._handlerId=o}return __extends(i,e),i.prototype.run=function(){return this.editor.trigger(this.getId(),this._handlerId,null),n.TPromise.as(!0)},i}(d);t.HandlerEditorAction=h;var p=function(e){function t(n,i,r){var o=i.enablement||{};e.call(this,n,{id:i.id,label:i.label,keybindings:i.keybindings||[]},r,t._transformBehaviour(o,i.contextMenuGroupId)),this._contextMenuGroupId=i.contextMenuGroupId,this._run=i.run,this._tokensAtPosition=o.tokensAtPosition,this._wordAtPosition=o.wordAtPosition}return __extends(t,e),t._transformBehaviour=function(e,t){var n=0;return t?n|=c.ShowInContextMenu:e.textFocus&&(n|=c.TextFocus),e.widgetFocus&&(n|=c.WidgetFocus),e.writeableEditor&&(n|=c.Writeable),"undefined"!=typeof e.tokensAtPosition&&(n|=c.UpdateOnCursorPositionChange),"undefined"!=typeof e.wordAtPosition&&(n|=c.UpdateOnCursorPositionChange),n},t.prototype.getGroupId=function(){return this._contextMenuGroupId},t.prototype.run=function(){return n.Promise.as(this._run(this.editor))},t.prototype.getEnablementState=function(){return this._getEnablementOnTokens()&&this._getEnablementOnWord()},t.prototype._getEnablementOnTokens=function(){if(!this._tokensAtPosition)return!0;var e=this.editor.getModel(),t=this.editor.getSelection().getStartPosition(),n=e.getLineContext(t.lineNumber),i=t.column-1;return a(n,i,this._tokensAtPosition)},t.prototype._getEnablementOnWord=function(){if(!this._wordAtPosition)return!0;var e=this.editor.getModel(),t=this.editor.getSelection().getStartPosition(),n=e.getWordAtPosition(t,!0,!0);return!!n},t}(d);t.DynamicEditorAction=p;var f=function(){function e(e){this._ctor=e}return e.prototype.createInstance=function(e,t){return e.createInstance(this._ctor,t)},e}();t.SimpleEditorContributionDescriptor=f;var g=function(e){function t(t,n,i,r){e.call(this,t,{id:n,label:i,keybindings:r})}return __extends(t,e),t.prototype.createInstance=function(e,t){return e.createInstance(this,t)},Object.defineProperty(t.prototype,"descriptor",{get:function(){return this.staticArguments(0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this.descriptor.id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"label",{get:function(){return this.descriptor.label},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"keybindings",{get:function(){return this.descriptor.keybindings},enumerable:!0,configurable:!0}),t}(r.SyncDescriptor);t.EditorActionDescriptor=g,t.Extensions={EditorContributions:"editor.contributions"};var m=function(){function e(){this.editorContributions2=[]}return e.prototype.registerEditorContribution2=function(e){this.editorContributions2.push(new f(e))},e.prototype.registerEditorActionContribution2=function(e,t,n,i){this.editorContributions2.push(new g(e,t,n,i))},e.prototype.getEditorContributions2=function(){return this.editorContributions2.slice(0)},e}();i.Registry.add(t.Extensions.EditorContributions,new m),t.registerEditorContribution=u,t.registerEditorActionContribution=l}),define("vs/editor/core/position",["require","exports"],function(e,t){function n(e){return e&&"number"==typeof e.lineNumber&&"number"==typeof e.column}function i(e){return e?[0|e.lineNumber,0|e.column]:[-1,-1]}function r(e){return-1===e[0]&&-1===e[1]?null:new u(e[0],e[1])}function o(e){for(var t=[],n=0,i=e.length;i>n;n++){var r=e[n];r?(t[2*n+0]=0|r.lineNumber,t[2*n+1]=0|r.column):(t[2*n+0]=-1,t[2*n+1]=-1)}return t}function s(e){for(var t=[],n=0,i=Math.floor(e.length/2);i>n;n++)t[n]=-1===e[2*n+0]&&-1===e[2*n+1]?null:new u(e[2*n+0],e[2*n+1]);return t}t.isIPosition=n,t.serialize=i,t.deserialize=r,t.serializeMany=o,t.deserializeMany=s;var a;!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}(a=t.PositionUtils||(t.PositionUtils={}));var u=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.lineNumber<e.lineNumber?!0:e.lineNumber<this.lineNumber?!1:this.column<e.column},e.prototype.isBeforeOrEqual=function(e){return this.lineNumber<e.lineNumber?!0:e.lineNumber<this.lineNumber?!1:this.column<=e.column},e.prototype.clone=function(){return new e(this.lineNumber,this.column)},e.prototype.toString=function(){return"("+this.lineNumber+","+this.column+")"},e}();t.Position=u}),define("vs/editor/core/range",["require","exports","vs/editor/core/position"],function(e,t,n){function i(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}function r(e){return e?[0|e.startLineNumber,0|e.startColumn,0|e.endLineNumber,0|e.endColumn]:[-1,-1,-1,-1]}function o(e){return-1===e[0]&&-1===e[1]&&-1===e[2]&&-1===e[3]?null:new w(e[0],e[1],e[2],e[3])}function s(e){for(var t=[],n=0,i=e.length;i>n;n++){var r=e[n];r?(t[4*n+0]=0|r.startLineNumber,t[4*n+1]=0|r.startColumn,t[4*n+2]=0|r.endLineNumber,t[4*n+3]=0|r.endColumn):(t[4*n+0]=-1,t[4*n+1]=-1,t[4*n+2]=-1,t[4*n+3]=-1)}return t}function a(e){for(var t=[],n=0,i=Math.floor(e.length/4);i>n;n++)t[n]=-1===e[4*n+0]&&-1===e[4*n+1]&&-1===e[4*n+2]&&-1===e[4*n+3]?null:new w(e[4*n+0],e[4*n+1],e[4*n+2],e[4*n+3]);return t}function u(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}function l(e,t){return t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber?!1:t.lineNumber===e.startLineNumber&&t.column<e.startColumn?!1:t.lineNumber===e.endLineNumber&&t.column>e.endColumn?!1:!0}function c(e,t){return t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber?!1:t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber?!1:t.startLineNumber===e.startLineNumber&&t.startColumn<e.startColumn?!1:t.endLineNumber===e.endLineNumber&&t.endColumn>e.endColumn?!1:!0}function d(e,t){return e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn?!1:t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn?!1:!0}function h(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 w(n,i,r,o)}function p(e,t){var n,i,r,o;return t.startLineNumber<e.startLineNumber?(n=t.startLineNumber,i=t.startColumn):t.startLineNumber===e.startLineNumber?(n=t.startLineNumber,i=Math.min(t.startColumn,e.startColumn)):(n=e.startLineNumber,i=e.startColumn),t.endLineNumber>e.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 w(n,i,r,o)}function f(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}function g(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 m(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 v(e){return e.endLineNumber>e.startLineNumber}function y(e){return 17*e.startLineNumber+23*e.startColumn+29*e.endLineNumber+37*e.endColumn}function _(e){return{startLineNumber:e.startLineNumber,startColumn:e.startColumn,endLineNumber:e.startLineNumber,endColumn:e.startColumn}}function b(e){return e?new w(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}t.isIRange=i,t.serialize=r,t.deserialize=o,t.serializeMany=s,t.deserializeMany=a,t.isEmpty=u,t.containsPosition=l,t.containsRange=c,t.areIntersectingOrTouching=d,t.intersectRanges=h,t.plusRange=p,t.equalsRange=f,t.compareRangesUsingStarts=g,t.compareRangesUsingEnds=m,t.spansMultipleLines=v,t.hashCode=y,t.collapseToStart=_;var w=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 u(this)},e.prototype.containsPosition=function(e){return l(this,e)},e.prototype.containsRange=function(e){return c(this,e)},e.prototype.plusRange=function(e){return p(this,e)},e.prototype.intersectRanges=function(e){return h(this,e)},e.prototype.equalsRange=function(e){return f(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=w,t.create=b});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/selection",["require","exports","vs/editor/core/range","vs/editor/editor"],function(e,t,n,i){function r(e){return e&&"number"==typeof e.selectionStartLineNumber&&"number"==typeof e.selectionStartColumn&&"number"==typeof e.positionLineNumber&&"number"==typeof e.positionColumn}function o(e){return e?[0|e.selectionStartLineNumber,0|e.selectionStartColumn,0|e.positionLineNumber,0|e.positionColumn]:[-1,-1,-1,-1]}function s(e){return-1===e[0]&&-1===e[1]&&-1===e[2]&&-1===e[3]?null:new d(e[0],e[1],e[2],e[3])}function a(e){for(var t=[],n=0,i=e.length;i>n;n++){var r=e[n];r?(t[4*n+0]=0|r.selectionStartLineNumber,t[4*n+1]=0|r.selectionStartColumn,t[4*n+2]=0|r.positionLineNumber,t[4*n+3]=0|r.positionColumn):(t[4*n+0]=-1,t[4*n+1]=-1,t[4*n+2]=-1,t[4*n+3]=-1)}return t}function u(e){for(var t=[],n=0,i=Math.floor(e.length/4);i>n;n++)t[n]=-1===e[4*n+0]&&-1===e[4*n+1]&&-1===e[4*n+2]&&-1===e[4*n+3]?null:new d(e[4*n+0],e[4*n+1],e[4*n+2],e[4*n+3]);return t}function l(e){return new d(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}function c(e,t,n,r,o){return o===i.SelectionDirection.LTR?new d(e,t,n,r):new d(n,r,e,t)}t.isISelection=r,t.serialize=o,t.deserialize=s,t.serializeMany=a,t.deserializeMany=u,t.create=l,t.createWithDirection=c;var d=function(e){function t(t,n,i,r){this.selectionStartLineNumber=t,this.selectionStartColumn=n,this.positionLineNumber=i,this.positionColumn=r,e.call(this,t,n,i,r)}return __extends(t,e),t.prototype.clone=function(){return new t(this.selectionStartLineNumber,this.selectionStartColumn,this.positionLineNumber,this.positionColumn)},t.prototype.equalsSelection=function(e){return this.selectionStartLineNumber===e.selectionStartLineNumber&&this.selectionStartColumn===e.selectionStartColumn&&this.positionLineNumber===e.positionLineNumber&&this.positionColumn===e.positionColumn},t.prototype.getDirection=function(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?i.SelectionDirection.LTR:i.SelectionDirection.RTL},t.prototype.setEndPosition=function(e,n){return this.getDirection()===i.SelectionDirection.LTR?new t(this.startLineNumber,this.startColumn,e,n):new t(e,n,this.startLineNumber,this.startColumn)},t.prototype.setStartPosition=function(e,n){return this.getDirection()===i.SelectionDirection.LTR?new t(e,n,this.endLineNumber,this.endColumn):new t(this.endLineNumber,this.endColumn,e,n)},t}(n.Range);t.Selection=d}),define("vs/editor/contrib/comment/blockCommentCommand",["require","exports","vs/editor/core/range","vs/editor/core/selection"],function(e,t,n,i){var r=function(){function e(e){this._selection=e,this._usedEndToken=null}return e.prototype._haystackHasNeedleAtOffset=function(e,t,n){if(0>n)return!1;var i=t.length,r=e.length;if(n+i>r)return!1;for(var o=0;i>o;o++)if(e.charCodeAt(n+o)!==t.charCodeAt(o))return!1;return!0},e.prototype._createOperationsForBlockComment=function(e,t,i,r){var o=e.startLineNumber,s=e.startColumn,a=e.endLineNumber,u=e.endColumn,l=n.isEmpty(e),c=t.blockCommentStartToken,d=c.length,h=t.blockCommentEndToken,p=h.length,f=this._haystackHasNeedleAtOffset(i.getLineContent(o),c,s-1-d),g=this._haystackHasNeedleAtOffset(i.getLineContent(a),h,u-1);f&&g?l?r.addEditOperation(new n.Range(o,s-d,a,u+p),null):(r.addEditOperation(new n.Range(o,s-d,o,s),null),r.addEditOperation(new n.Range(a,u,a,u+p),null)):l?(r.addEditOperation(new n.Range(o,s,a,u),c+h),this._usedEndToken=h):(r.addEditOperation(new n.Range(o,s,o,s),c),r.addEditOperation(new n.Range(a,u,a,u),h))},e.prototype.getEditOperations=function(e,t){var n=this._selection.startLineNumber,i=this._selection.startColumn,r=this._selection.endLineNumber,o=this._selection.endColumn;r>n&&1===o&&(r-=1,o=e.getLineMaxColumn(r));var s=e.getModeAtPosition(n,i).commentsSupport;if(s){var a=s.getCommentsConfiguration();a&&a.blockCommentStartToken&&a.blockCommentEndToken&&this._createOperationsForBlockComment({startLineNumber:n,startColumn:i,endLineNumber:r,endColumn:o},a,e,t)}},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations();if(2===n.length){var r=n[0],o=n[1];return new i.Selection(r.range.endLineNumber,r.range.endColumn,o.range.startLineNumber,o.range.startColumn)}var s=n[0].range,a=this._usedEndToken?-this._usedEndToken.length:0;return new i.Selection(s.endLineNumber,s.endColumn+a,s.endLineNumber,s.endColumn+a)},e}();t.BlockCommentCommand=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/contrib/comment/lineCommentCommand",["require","exports","vs/editor/contrib/comment/blockCommentCommand","vs/base/strings","vs/editor/core/range"],function(e,t,n,i,r){var o=function(e){function t(t){e.call(this,t),this._hasDelegatedToParent=!1}return __extends(t,e),t.prototype._hasLineCommentTokensSupportForLines=function(e,t,n){for(var i,r,o=t;n>=o;o++){if(i=e.getModeAtPosition(o,1).commentsSupport,!i)return!1;if(r=i.getCommentsConfiguration(),!r||!r.lineCommentTokens||0===r.lineCommentTokens.length)return!1}return!0},t.prototype.getEditOperations=function(t,n){var o=this._selection;this._moveEndPositionDown=!1,o.startLineNumber<o.endLineNumber&&1===o.endColumn&&(this._moveEndPositionDown=!0,o=o.setEndPosition(o.endLineNumber-1,t.getLineMaxColumn(o.endLineNumber-1)));var s=t.getModeAtPosition(o.startLineNumber,o.startColumn).commentsSupport;if(s){if(!this._hasLineCommentTokensSupportForLines(t,o.startLineNumber,o.endLineNumber)){var a=s.getCommentsConfiguration();if(!a||!a.blockCommentStartToken||!a.blockCommentEndToken)return;var u=a.blockCommentStartToken,l=u.length,c=a.blockCommentEndToken,d=(c.length,t.getLineContent(o.startLineNumber).lastIndexOf(u,o.startColumn-1)),h=t.getLineContent(o.endLineNumber).indexOf(c,o.endColumn-1);return-1!==d&&-1!==h?(o.startColumn=d+l+1,o.endColumn=h+1):(o.startColumn=1,o.endColumn=t.getLineMaxColumn(o.endLineNumber)),this._hasDelegatedToParent=!0,e.prototype._createOperationsForBlockComment.call(this,o,a,t,n),void 0}var p,f,g,m,v=!0,y=[],_=[];for(m=o.startLineNumber;m<=o.endLineNumber;m++)g=t.getModeAtPosition(m,1).commentsSupport.getCommentsConfiguration().lineCommentTokens[0],_[m-o.startLineNumber]=g,v&&(p=t.getLineContent(m),f=i.firstNonWhitespaceIndex(p),-1===f?v=!1:this._haystackHasNeedleAtOffset(p,g,f)||(v=!1),y[m-o.startLineNumber]=f);if(v)for(m=o.startLineNumber;m<=o.endLineNumber;m++)n.addEditOperation(new r.Range(m,y[m-o.startLineNumber]+1,m,y[m-o.startLineNumber]+1+_[m-o.startLineNumber].length),null);else for(m=o.startLineNumber;m<=o.endLineNumber;m++)n.addEditOperation(new r.Range(m,1,m,1),_[m-o.startLineNumber]);this._selectionId=n.trackSelection(o)}},t.prototype.computeCursorState=function(t,n){if(this._hasDelegatedToParent)return e.prototype.computeCursorState.call(this,t,n);var i=n.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),i},t}(n.BlockCommentCommand);t.LineCommentCommand=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/contrib/comment/comment",["require","exports","vs/nls!vs/editor/editor.main","vs/base/env","vs/base/lib/winjs.base","./lineCommentCommand","./blockCommentCommand","vs/editor/editorExtensions"],function(e,t,n,i,r,o,s,a){var u=function(e){function t(t,n,i){e.call(this,t,n,i,a.defaultPrecondition)}return __extends(t,e),t.prototype.run=function(){for(var e=[],t=this.editor.getSelections(),n=0;n<t.length;n++)e.push(new o.LineCommentCommand(t[n]));return this.editor.executeCommands(this.id,e),r.TPromise.as(null)},t.ID="editor.actions.commentLine",t}(a.EditorAction),l=function(e){function t(t,n,i){e.call(this,t,n,i,a.defaultPrecondition)}return __extends(t,e),t.prototype.run=function(){for(var e=[],t=this.editor.getSelections(),n=0;n<t.length;n++)e.push(new s.BlockCommentCommand(t[n]));return this.editor.executeCommands(this.id,e),r.TPromise.as(null)},t.ID="editor.actions.blockComment",t}(a.EditorAction);a.registerEditorActionContribution(u,u.ID,n.localize("vs_editor_contrib_comment_comment",0),{ctrlCmd:!0,key:"/"},{ctrlCmd:!0,key:"7"}),a.registerEditorActionContribution(l,l.ID,n.localize("vs_editor_contrib_comment_comment",1),{ctrlCmd:i.isLinux,shift:!0,alt:!i.isLinux,key:"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/contrib/diffNavigator/diffNavigator",["require","exports","vs/base/eventEmitter","vs/base/assert","vs/editor/core/constants","vs/editor/core/range","vs/base/objects"],function(e,t,n,i,r,o,s){var a={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0},u=function(e){function t(n,i){var o=this;void 0===i&&(i={}),e.call(this,[t.Events.UPDATED]),this.editor=n,this.options=s.mixin(i,a,!1),this.disposed=!1,this.toUnbind=[],this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=this.options.alwaysRevealFirst,this.toUnbind.push(this.editor.addListener(r.EventType.Disposed,function(){return o.dispose()})),this.toUnbind.push(this.editor.addListener(r.EventType.DiffUpdated,function(){return o.onDiffUpdated()})),this.options.followsCaret&&this.toUnbind.push(this.editor.getModifiedEditor().addListener(r.EventType.CursorPositionChanged,function(){o.ignoreSelectionChange||(o.nextIdx=-1)})),this.options.alwaysRevealFirst&&this.toUnbind.push(this.editor.getModifiedEditor().addListener(r.EventType.ModelChanged,function(){o.revealFirst=!0})),this.init()}return __extends(t,e),t.prototype.init=function(){var e=this.editor.getLineChanges()},t.prototype.onDiffUpdated=function(){this.init(),this.compute(this.editor.getLineChanges()),this.revealFirst&&null!==this.editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next())},t.prototype.compute=function(e){var n=this;this.ranges=[],e&&e.forEach(function(e){!n.options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach(function(e){n.ranges.push({rhs:!0,range:new o.Range(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})}):n.ranges.push({rhs:!0,range:new o.Range(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber,1)})}),this.ranges.sort(function(e,t){return e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?-1:t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition())?1:0}),this.emit(t.Events.UPDATED,{})},t.prototype.initIdx=function(e){for(var t=!1,n=this.editor.getPosition(),i=0,r=this.ranges.length;r>i&&!t;i++){var o=this.ranges[i].range;n.isBeforeOrEqual(o.getStartPosition())&&(this.nextIdx=i+(e?0:-1),t=!0)}t||(this.nextIdx=e?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)},t.prototype.move=function(e){if(i.ok(!this.disposed,"Illegal State - diff navigator has been disposed"),this.canNavigate()){-1===this.nextIdx?this.initIdx(e):e?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));var t=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{this.editor.setPosition(t.range.getStartPosition(),!0,!0,!0)}finally{this.ignoreSelectionChange=!1}}},t.prototype.canNavigate=function(){return this.ranges&&this.ranges.length>0},t.prototype.next=function(){this.move(!0)},t.prototype.previous=function(){this.move(!1)},t.prototype.dispose=function(){for(;this.toUnbind.length>0;)this.toUnbind.pop()();this.ranges=null,this.disposed=!0,e.prototype.dispose.call(this)},t.Events={UPDATED:"navigation.updated"},t}(n.EventEmitter);t.DiffNavigator=u}),define("vs/css!vs/editor/contrib/links/links",["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/links/links",["require","exports","vs/nls!vs/editor/editor.main","vs/base/lib/winjs.base","vs/base/env","vs/base/errors","vs/editor/core/constants","vs/base/network","vs/editor/editorExtensions","vs/editor/editor","vs/css!./links"],function(e,t,n,i,r,o,s,a,u,l){var c=function(){function e(e,t,n){this.resourcePrefix=e,this.link=t,this.decorationId=n.addDecoration({startLineNumber:this.link.range.startLineNumber,startColumn:this.link.range.startColumn,endLineNumber:this.link.range.startLineNumber,endColumn:this.link.range.endColumn},this.getOptions(!1))
}return e.prototype._linkHoverMessage=function(){if(!this.resourcePrefix||0===this.resourcePrefix.indexOf(a.schemas.inMemory))return d.HOVER_MESSAGE_GENERAL;var e=new a.URL(this.link.url).getScheme();return e!==a.schemas.http&&e!==a.schemas.https||0===this.link.url.indexOf(this.resourcePrefix)?d.HOVER_MESSAGE_EDITOR:d.HOVER_MESSAGE_GENERAL},e.prototype.dispose=function(e){e.removeDecoration(this.decorationId)},e.prototype.getOptions=function(e){var t="";return this.link.extraInlineClassName&&(t=this.link.extraInlineClassName+" "),t+=e?d.CLASS_NAME_ACTIVE:d.CLASS_NAME,{stickiness:l.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,inlineClassName:t,hoverMessage:this._linkHoverMessage()}},e.prototype.activate=function(e){e.changeDecorationOptions(this.decorationId,this.getOptions(!0))},e.prototype.deactivate=function(e){e.changeDecorationOptions(this.decorationId,this.getOptions(!1))},e}(),d=function(){function e(e,t,n){var i=this;this.editor=e,this.editorService=t,this.requestService=n,this.listenersToRemove=[],this.listenersToRemove.push(e.addListener("change",function(){return i.onChange()})),this.listenersToRemove.push(e.addListener(s.EventType.ModelChanged,function(){return i.onModelChanged()})),this.listenersToRemove.push(e.addListener(s.EventType.ModelModeChanged,function(){return i.onModelModeChanged()})),this.listenersToRemove.push(this.editor.addListener(s.EventType.MouseUp,function(e){return i.onEditorMouseUp(e)})),this.listenersToRemove.push(this.editor.addListener(s.EventType.MouseMove,function(e){return i.onEditorMouseMove(e)})),this.listenersToRemove.push(this.editor.addListener(s.EventType.KeyDown,function(e){return i.onEditorKeyDown(e)})),this.listenersToRemove.push(this.editor.addListener(s.EventType.KeyUp,function(e){return i.onEditorKeyUp(e)})),this.timeoutPromise=null,this.computePromise=null,this.currentOccurences={},this.activeLinkDecorationId=null,this.beginCompute()}return e.prototype.isComputing=function(){return i.Promise.is(this.computePromise)},e.prototype.onModelChanged=function(){this.lastMouseEvent=null,this.currentOccurences={},this.activeLinkDecorationId=null,this.stop(),this.beginCompute()},e.prototype.onModelModeChanged=function(){this.stop(),this.beginCompute()},e.prototype.onChange=function(){var t=this;this.timeoutPromise||(this.timeoutPromise=i.TPromise.timeout(e.RECOMPUTE_TIME),this.timeoutPromise.then(function(){t.timeoutPromise=null,t.beginCompute()}))},e.prototype.beginCompute=function(){var e=this;if(this.editor.getModel()){var t=this.editor.getModel().getMode();t.linkSupport&&(this.computePromise=t.linkSupport.computeLinks(this.editor.getModel().getAssociatedResource()),this.computePromise.then(function(t){e.updateDecorations(t),e.computePromise=null}))}},e.prototype.updateDecorations=function(e){var t=this;this.editor.changeDecorations(function(n){for(var i in t.currentOccurences)if(t.currentOccurences.hasOwnProperty(i)){var r=t.currentOccurences[i];r.dispose(n)}if(t.currentOccurences={},t.activeLinkDecorationId=null,e)for(var o=0;o<e.length;o++){var r=new c(t.requestService.getRequestUrl("root","",!0),e[o],n);t.currentOccurences[r.decorationId]=r}})},e.prototype.onEditorKeyDown=function(t){t.key===e.TRIGGER_KEY_VALUE&&this.lastMouseEvent&&this.onEditorMouseMove(this.lastMouseEvent,t)},e.prototype.onEditorKeyUp=function(t){t.key===e.TRIGGER_KEY_VALUE&&this.cleanUpActiveLinkDecoration()},e.prototype.onEditorMouseMove=function(e,t){var n=this;if(this.lastMouseEvent=e,this.isEnabled(e,t)){this.cleanUpActiveLinkDecoration();var i=this.getLinkOccurence(e.target.position);i&&this.editor.changeDecorations(function(e){i.activate(e),n.activeLinkDecorationId=i.decorationId})}else this.cleanUpActiveLinkDecoration()},e.prototype.cleanUpActiveLinkDecoration=function(){if(this.activeLinkDecorationId){var e=this.currentOccurences[this.activeLinkDecorationId];e&&this.editor.changeDecorations(function(t){e.deactivate(t)}),this.activeLinkDecorationId=null}},e.prototype.onEditorMouseUp=function(e){if(this.isEnabled(e)){var t=this.getLinkOccurence(e.target.position);t&&this.openLinkOccurence(t,e.event.altKey)}},e.prototype.openLinkOccurence=function(e,t){if(this.editorService){var n=e.link,i=n.url,r=i.indexOf("#"),s=-1,u=-1;if(r>=0){var l=i.substr(r+1),c=l.split(",");c.length>0&&(s=Number(c[0])),c.length>1&&(u=Number(c[1])),(s>=0||u>=0)&&(i=i.substr(0,r))}var d={resource:new a.URL(i)};s>=0&&(d.options={selection:{startLineNumber:s,startColumn:u}}),this.editorService.openEditor(d,t).done(null,o.onUnexpectedError)}},e.prototype.getLinkOccurence=function(e){for(var t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},null,!0),n=0;n<t.length;n++){var i=t[n],r=this.currentOccurences[i.id];if(r)return r}return null},e.prototype.isEnabled=function(t,n){return t.target.type===l.MouseTargetType.CONTENT_TEXT&&(t.event[e.TRIGGER_MODIFIER]||n&&n.key===e.TRIGGER_KEY_VALUE)&&!!this.editor.getModel().getMode().linkSupport},e.prototype.stop=function(){this.timeoutPromise&&(this.timeoutPromise.cancel(),this.timeoutPromise=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)},e.prototype.dispose=function(){this.listenersToRemove.forEach(function(e){e()}),this.listenersToRemove=[],this.stop()},e.RECOMPUTE_TIME=1e3,e.TRIGGER_KEY_VALUE=r.isMacintosh?"Meta":"Ctrl",e.TRIGGER_MODIFIER=r.isMacintosh?"metaKey":"ctrlKey",e.HOVER_MESSAGE_GENERAL=r.isMacintosh?n.localize("vs_editor_contrib_links_links",0):n.localize("vs_editor_contrib_links_links",1),e.HOVER_MESSAGE_EDITOR=r.isMacintosh?n.localize("vs_editor_contrib_links_links",2):n.localize("vs_editor_contrib_links_links",3),e.CLASS_NAME="detected-link",e.CLASS_NAME_ACTIVE="detected-link-active",e}(),h=function(e){function t(t,n,i){e.call(this,t,n,i,u.Behaviour.WidgetFocus|u.Behaviour.UpdateOnCursorPositionChange),this._linkDetector=new d(i,t.editorService,t.requestService)}return __extends(t,e),t.prototype.dispose=function(){this._linkDetector.dispose(),e.prototype.dispose.call(this)},t.prototype.getEnablementState=function(){return this._linkDetector.isComputing()?!0:!!this._linkDetector.getLinkOccurence(this.editor.getPosition())},t.prototype.run=function(){var e=this._linkDetector.getLinkOccurence(this.editor.getPosition());return e&&this._linkDetector.openLinkOccurence(e,!1),i.TPromise.as(null)},t.ID="editor.contrib.links",t}(u.EditorAction);u.registerEditorActionContribution(h,h.ID,n.localize("vs_editor_contrib_links_links",4))});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/widgets/quickopen/quickOpenModel",["require","exports","vs/base/types"],function(e,t,n){!function(e){e[e.PREVIEW=0]="PREVIEW",e[e.OPEN=1]="OPEN"}(t.Mode||(t.Mode={}));var i=(t.Mode,0),r=function(){function e(e){void 0===e&&(e=[]),this.id=(i++).toString(),this.labelHighlights=e,this.descriptionHighlights=[]}return e.prototype.getId=function(){return this.id},e.prototype.getLabel=function(){return null},e.prototype.getMeta=function(){return null},e.prototype.getIcon=function(){return null},e.prototype.getDescription=function(){return null},e.prototype.getPath=function(){return null},e.prototype.isHidden=function(){return this.hidden},e.prototype.setHidden=function(e){this.hidden=e},e.prototype.setHighlights=function(e,t){this.labelHighlights=e,this.descriptionHighlights=t},e.prototype.getHighlights=function(){return[this.labelHighlights,this.descriptionHighlights]},e.prototype.run=function(){return!1},e}();t.QuickOpenEntry=r;var o=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.getHeight=function(){return 0},t.prototype.render=function(){return null},t}(r);t.QuickOpenEntryItem=o;var s=function(e){function t(t,n,i){e.call(this),this.entry=t,this.groupLabel=n,this.withBorder=i}return __extends(t,e),t.prototype.getGroupLabel=function(){return this.groupLabel},t.prototype.setGroupLabel=function(e){this.groupLabel=e},t.prototype.showBorder=function(){return this.withBorder},t.prototype.setShowBorder=function(e){this.withBorder=e},t.prototype.getLabel=function(){return this.entry?this.entry.getLabel():e.prototype.getLabel.call(this)},t.prototype.getMeta=function(){return this.entry?this.entry.getMeta():e.prototype.getMeta.call(this)},t.prototype.getPath=function(){return this.entry?this.entry.getPath():e.prototype.getPath.call(this)},t.prototype.getIcon=function(){return this.entry?this.entry.getIcon():e.prototype.getIcon.call(this)},t.prototype.getDescription=function(){return this.entry?this.entry.getDescription():e.prototype.getDescription.call(this)},t.prototype.getEntry=function(){return this.entry},t.prototype.getHighlights=function(){return this.entry?this.entry.getHighlights():e.prototype.getHighlights.call(this)},t.prototype.isHidden=function(){return this.entry?this.entry.isHidden():e.prototype.isHidden.call(this)},t.prototype.setHighlights=function(t,n){this.entry?this.entry.setHighlights(t,n):e.prototype.setHighlights.call(this,t,n)},t.prototype.setHidden=function(t){this.entry?this.entry.setHidden(t):e.prototype.setHidden.call(this,t)},t.prototype.run=function(t,n){return this.entry?this.entry.run(t,n):e.prototype.run.call(this,t,n)},t}(r);t.QuickOpenEntryGroup=s;var a=function(){function e(e){void 0===e&&(e=[]),this._entries=e}return Object.defineProperty(e.prototype,"entries",{get:function(){return this._entries},set:function(e){this._entries=e},enumerable:!0,configurable:!0}),e.prototype.addEntries=function(e){n.isArray(e)&&(this._entries=this._entries.concat(e))},e.prototype.setEntries=function(e){n.isArray(e)&&(this._entries=e)},e.prototype.getEntries=function(e){return e?this._entries.filter(function(e){return!e.isHidden()}):this._entries},e}();t.QuickOpenModel=a}),define("vs/css!vs/base/dom/builder",["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/base/dom/builder",["require","exports","vs/base/lib/winjs.base","vs/base/types","vs/base/strings","vs/base/assert","vs/base/dom/dom","vs/base/dom/browserService","vs/css!./builder"],function(e,t,n,i,r,o,s,a){function u(e,t){o.ok(i.isString(e),"Expected String as parameter");var n=a.getService().document.getElementById(e);return n?new x(n,t):null}function l(e){return e[b]||(e[b]={}),e[b]}function c(e){return!!e[b]}function d(e,t){return e instanceof M?new M(e):new x(e.getHTMLElement(),t)}function h(e,t){return new x(e,t)}function p(){return new x(null,!0)}function f(e,t,n){l(e)[t]=n}function g(e,t,n){if(c(e)){var r=l(e)[t];if(!i.isUndefined(r))return r}return n}function m(e,t){c(e)&&delete l(e)[t]}function v(e,t){f(e,w,t)}function y(e){m(e,w)}function _(e){return g(e,w)}t.withElementById=u,t.Build={withElementById:u};var b="_msDataKey",w="__$binding",C="__$listeners",E="__$visibility",S=function(){function e(e,t){this.x=e,this.y=t}return e}();t.Position=S;var T=function(){function e(e,t,n,i){this.top=e,this.right=t,this.bottom=n,this.left=i}return e}();t.Box=T;var L=function(){function e(e,t){this.width=e,this.height=t}return e.prototype.substract=function(t){return new e(this.width-t.left-t.right,this.height-t.top-t.bottom)},e}();t.Dimension=L;var x=function(){function e(e,t){this.offdom=t,this.container=e,this.currentElement=e,this.createdElements=[],this.toUnbind={},this.captureToUnbind={},this.browserService=a.getService()}return e.prototype.asContainer=function(){return d(this,this.offdom)},e.prototype.clone=function(){var t=new e(this.container,this.offdom);return t.currentElement=this.currentElement,t.createdElements=this.createdElements,t.captureToUnbind=this.captureToUnbind,t.toUnbind=this.toUnbind,t},e.prototype.and=function(t){t instanceof e||t instanceof M||(t=new e(t,this.offdom));var n=[this];if(t instanceof M)for(var i=0;i<t.length;i++)n.push(t.item(i));else n.push(t);return new M(n)},e.prototype.build=function(t,n){o.ok(this.offdom,"This builder was not created off-dom, so build() can not be called."),t?t instanceof e&&(t=t.getHTMLElement()):t=this.container,o.ok(t,"Builder can only be build() with a container provided."),o.ok(s.isHTMLElement(t),"The container must either be a HTMLElement or a Builder.");var r,a,u=t,l=u.childNodes;if(i.isNumber(n)&&n<l.length)for(r=0,a=this.createdElements.length;a>r;r++)u.insertBefore(this.createdElements[r],l[n++]);else for(r=0,a=this.createdElements.length;a>r;r++)u.appendChild(this.createdElements[r]);return this},e.prototype.appendTo=function(t,n){t?t instanceof e&&(t=t.getHTMLElement()):t=this.container,o.ok(t,"Builder can only be build() with a container provided."),o.ok(s.isHTMLElement(t),"The container must either be a HTMLElement or a Builder.");var r=t;this.currentElement.parentNode&&this.currentElement.parentNode.removeChild(this.currentElement);var a=r.childNodes;return i.isNumber(n)&&n<a.length?r.insertBefore(this.currentElement,a[n]):r.appendChild(this.currentElement),this},e.prototype.append=function(t,n){return o.ok(t,"Need a child to append"),s.isHTMLElement(t)&&(t=h(t)),o.ok(t instanceof e||t instanceof M,"Need a child to append"),t.appendTo(this,n),this},e.prototype.offDOM=function(){return this.currentElement.parentNode&&this.currentElement.parentNode.removeChild(this.currentElement),this},e.prototype.getHTMLElement=function(){return this.currentElement},e.prototype.getContainer=function(){return this.container},e.prototype.div=function(e,t){return this.doElement("div",e,t)},e.prototype.p=function(e,t){return this.doElement("p",e,t)},e.prototype.ul=function(e,t){return this.doElement("ul",e,t)},e.prototype.ol=function(e,t){return this.doElement("ol",e,t)},e.prototype.li=function(e,t){return this.doElement("li",e,t)},e.prototype.span=function(e,t){return this.doElement("span",e,t)},e.prototype.img=function(e,t){return this.doElement("img",e,t)},e.prototype.a=function(e,t){return this.doElement("a",e,t)},e.prototype.header=function(e,t){return this.doElement("header",e,t)},e.prototype.section=function(e,t){return this.doElement("section",e,t)},e.prototype.footer=function(e,t){return this.doElement("footer",e,t)},e.prototype.element=function(e,t,n){return this.doElement(e,t,n)},e.prototype.doElement=function(t,n,r){var o=this.browserService.document.createElement(t);if(this.currentElement=o,this.offdom&&this.createdElements.push(o),i.isObject(n)&&this.attr(n),i.isFunction(n)&&(r=n),i.isFunction(r)){var s=new e(o);r.call(s,s)}return this.offdom||this.container.appendChild(o),this},e.prototype.domFocus=function(){return this.currentElement.focus(),this},e.prototype.hasFocus=function(){var e=this.browserService.document.activeElement;return e===this.currentElement},e.prototype.domSelect=function(e){void 0===e&&(e=null);var t=this.currentElement;return t.select(),e&&t.setSelectionRange(e.start,e.end),this},e.prototype.domBlur=function(){return this.currentElement.blur(),this},e.prototype.domClick=function(){return this.currentElement.click(),this},e.prototype.on=function(e,t,n,r){var o=this;if(i.isArray(e))e.forEach(function(e){o.on(e,t,n,r)});else{var a=e,u=s.addListener(this.currentElement,a,function(e){t(e,o,u)},r||!1);r?(this.captureToUnbind[a]||(this.captureToUnbind[a]=[]),this.captureToUnbind[a].push(u)):(this.toUnbind[a]||(this.toUnbind[a]=[]),this.toUnbind[a].push(u));var l=this.getProperty(C,[]);l.push(u),this.setProperty(C,l),n&&i.isArray(n)&&n.push(u)}return this},e.prototype.off=function(e,t){var n=this;if(i.isArray(e))e.forEach(function(e){n.off(e)});else{var r=e;if(t){if(this.captureToUnbind[r])for(;this.captureToUnbind[r].length;)this.captureToUnbind[r].pop()()}else if(this.toUnbind[r])for(;this.toUnbind[r].length;)this.toUnbind[r].pop()()}return this},e.prototype.once=function(e,t,n,r){var o=this;if(i.isArray(e))e.forEach(function(e){o.once(e,t)});else{var a=e,u=s.addListener(this.currentElement,a,function(e){t(e,o,u),u()},r||!1);n&&i.isArray(n)&&n.push(u)}return this},e.prototype.preventDefault=function(e,t,n){var i=function(e){e.preventDefault(),t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)};return this.on(e,i,n)},e.prototype.attr=function(e,t){if(i.isObject(e)){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];this.doSetAttr(n,r)}return this}return i.isString(e)&&!i.isString(t)?this.currentElement.getAttribute(e):(i.isString(e)&&(i.isString(t)||(t=String(t)),this.doSetAttr(e,t)),this)},e.prototype.doSetAttr=function(e,t){"class"===e&&(e="addClass"),this[e]?i.isArray(t)?this[e].apply(this,t):this[e].call(this,t):this.currentElement.setAttribute(e,t)},e.prototype.removeAttribute=function(e){this.currentElement.removeAttribute(e)},e.prototype.id=function(e){return this.currentElement.setAttribute("id",e),this},e.prototype.src=function(e){return this.currentElement.setAttribute("src",e),this},e.prototype.href=function(e){return this.currentElement.setAttribute("href",e),this},e.prototype.title=function(e){return this.currentElement.setAttribute("title",e),this},e.prototype.name=function(e){return this.currentElement.setAttribute("name",e),this},e.prototype.type=function(e){return this.currentElement.setAttribute("type",e),this},e.prototype.value=function(e){return this.currentElement.setAttribute("value",e),this},e.prototype.alt=function(e){return this.currentElement.setAttribute("alt",e),this},e.prototype.draggable=function(e){return this.currentElement.setAttribute("draggable",e?"true":"false"),this},e.prototype.tabindex=function(e){return this.currentElement.setAttribute("tabindex",e.toString()),this},e.prototype.style=function(e,t){if(i.isObject(e)){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];this.doSetStyle(n,r)}}else{if(i.isString(e)&&!i.isString(t))return this.currentElement.style[this.cssKeyToJavaScriptProperty(e)];i.isString(e)&&i.isString(t)&&this.doSetStyle(e,t)}return this},e.prototype.doSetStyle=function(e,t){if(e.indexOf("-")>=0){var n=e.split("-");e=n[0];for(var i=1;i<n.length;i++){var r=n[i];e=e+r.charAt(0).toUpperCase()+r.substr(1)}}this.currentElement.style[this.cssKeyToJavaScriptProperty(e)]=t},e.prototype.cssKeyToJavaScriptProperty=function(e){if(e.indexOf("-")>=0){var t=e.split("-");e=t[0];for(var n=1;n<t.length;n++){var i=t[n];e=e+i.charAt(0).toUpperCase()+i.substr(1)}}else"float"===e&&(e="cssFloat");return e},e.prototype.getComputedStyle=function(){return s.getComputedStyle(this.currentElement)},e.prototype.addClass=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n-0]=arguments[n];return t.forEach(function(t){var n=t.split(" ");n.forEach(function(t){s.addClass(e.currentElement,t)})}),this},e.prototype.setClass=function(e,t){return void 0===t&&(t=null),null===t?this.currentElement.className=e:t?this.addClass(e):this.removeClass(e),this},e.prototype.hasClass=function(e){return s.hasClass(this.currentElement,e)},e.prototype.removeClass=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n-0]=arguments[n];return t.forEach(function(t){var n=t.split(" ");n.forEach(function(t){s.removeClass(e.currentElement,t)})}),this},e.prototype.swapClass=function(e,t){return this.hasClass(e)?(this.removeClass(e),this.addClass(t)):(this.removeClass(t),this.addClass(e)),this},e.prototype.toggleClass=function(e){return this.hasClass(e)?this.removeClass(e):this.addClass(e),this},e.prototype.color=function(e){return this.currentElement.style.color=e,this},e.prototype.background=function(e){return this.currentElement.style.backgroundColor=e,this},e.prototype.padding=function(e,t,n,r){return i.isString(e)&&e.indexOf(" ")>=0?this.padding.apply(this,e.split(" ")):(i.isUndefinedOrNull(e)||(this.currentElement.style.paddingTop=this.toPixel(e)),i.isUndefinedOrNull(t)||(this.currentElement.style.paddingRight=this.toPixel(t)),i.isUndefinedOrNull(n)||(this.currentElement.style.paddingBottom=this.toPixel(n)),i.isUndefinedOrNull(r)||(this.currentElement.style.paddingLeft=this.toPixel(r)),this)},e.prototype.margin=function(e,t,n,r){return i.isString(e)&&e.indexOf(" ")>=0?this.margin.apply(this,e.split(" ")):(i.isUndefinedOrNull(e)||(this.currentElement.style.marginTop=this.toPixel(e)),i.isUndefinedOrNull(t)||(this.currentElement.style.marginRight=this.toPixel(t)),i.isUndefinedOrNull(n)||(this.currentElement.style.marginBottom=this.toPixel(n)),i.isUndefinedOrNull(r)||(this.currentElement.style.marginLeft=this.toPixel(r)),this)},e.prototype.position=function(e,t,n,r,o){return i.isString(e)&&e.indexOf(" ")>=0?this.position.apply(this,e.split(" ")):(i.isUndefinedOrNull(e)||(this.currentElement.style.top=this.toPixel(e)),i.isUndefinedOrNull(t)||(this.currentElement.style.right=this.toPixel(t)),i.isUndefinedOrNull(n)||(this.currentElement.style.bottom=this.toPixel(n)),i.isUndefinedOrNull(r)||(this.currentElement.style.left=this.toPixel(r)),o||(o="absolute"),this.currentElement.style.position=o,this)},e.prototype.size=function(e,t){return i.isString(e)&&e.indexOf(" ")>=0?this.size.apply(this,e.split(" ")):(i.isUndefinedOrNull(e)||(this.currentElement.style.width=this.toPixel(e)),i.isUndefinedOrNull(t)||(this.currentElement.style.height=this.toPixel(t)),this)},e.prototype.minSize=function(e,t){return i.isString(e)&&e.indexOf(" ")>=0?this.minSize.apply(this,e.split(" ")):(i.isUndefinedOrNull(e)||(this.currentElement.style.minWidth=this.toPixel(e)),i.isUndefinedOrNull(t)||(this.currentElement.style.minHeight=this.toPixel(t)),this)},e.prototype.maxSize=function(e,t){return i.isString(e)&&e.indexOf(" ")>=0?this.maxSize.apply(this,e.split(" ")):(i.isUndefinedOrNull(e)||(this.currentElement.style.maxWidth=this.toPixel(e)),i.isUndefinedOrNull(t)||(this.currentElement.style.maxHeight=this.toPixel(t)),this)},e.prototype.float=function(e){return this.currentElement.style.cssFloat=e,this.currentElement.style.styleFloat=e,this},e.prototype.clear=function(e){return this.currentElement.style.clear=e,this},e.prototype.normal=function(){return this.currentElement.style.fontStyle="normal",this.currentElement.style.fontWeight="normal",this.currentElement.style.textDecoration="none",this},e.prototype.italic=function(){return this.currentElement.style.fontStyle="italic",this},e.prototype.bold=function(){return this.currentElement.style.fontWeight="bold",this},e.prototype.underline=function(){return this.currentElement.style.textDecoration="underline",this},e.prototype.overflow=function(e){return this.currentElement.style.overflow=e,this},e.prototype.display=function(e){return this.currentElement.style.display=e,this},e.prototype.disable=function(){return this.currentElement.setAttribute("disabled","disabled"),this},e.prototype.enable=function(){return this.currentElement.removeAttribute("disabled"),this},e.prototype.show=function(){return this.hasClass("hidden")&&this.removeClass("hidden"),this.attr("aria-hidden","false"),this.cancelVisibilityPromise(),this},e.prototype.showDelayed=function(e){var t=this;this.cancelVisibilityPromise();var i=n.Promise.timeout(e);return this.setProperty(E,i),i.done(function(){t.removeProperty(E),t.show()}),this},e.prototype.hide=function(){return this.hasClass("hidden")||this.addClass("hidden"),this.attr("aria-hidden","true"),this.cancelVisibilityPromise(),this},e.prototype.isHidden=function(){return this.hasClass("hidden")||"none"===this.currentElement.style.display},e.prototype.toggleVisibility=function(){return this.cancelVisibilityPromise(),this.swapClass("builder-visible","hidden"),this.isHidden()?this.attr("aria-hidden","true"):this.attr("aria-hidden","false"),this},e.prototype.cancelVisibilityPromise=function(){var e=this.getProperty(E);e&&(e.cancel(),this.removeProperty(E))},e.prototype.border=function(e,t,n){return i.isString(e)&&e.indexOf(" ")>=0?this.border.apply(this,e.split(" ")):(this.currentElement.style.borderWidth=this.toPixel(e),n&&(this.currentElement.style.borderColor=n),t&&(this.currentElement.style.borderStyle=t),this)},e.prototype.borderTop=function(e,t,n){return i.isString(e)&&e.indexOf(" ")>=0?this.borderTop.apply(this,e.split(" ")):(this.currentElement.style.borderTopWidth=this.toPixel(e),n&&(this.currentElement.style.borderTopColor=n),t&&(this.currentElement.style.borderTopStyle=t),this)},e.prototype.borderBottom=function(e,t,n){return i.isString(e)&&e.indexOf(" ")>=0?this.borderBottom.apply(this,e.split(" ")):(this.currentElement.style.borderBottomWidth=this.toPixel(e),n&&(this.currentElement.style.borderBottomColor=n),t&&(this.currentElement.style.borderBottomStyle=t),this)},e.prototype.borderLeft=function(e,t,n){return i.isString(e)&&e.indexOf(" ")>=0?this.borderLeft.apply(this,e.split(" ")):(this.currentElement.style.borderLeftWidth=this.toPixel(e),n&&(this.currentElement.style.borderLeftColor=n),t&&(this.currentElement.style.borderLeftStyle=t),this)},e.prototype.borderRight=function(e,t,n){return i.isString(e)&&e.indexOf(" ")>=0?this.borderRight.apply(this,e.split(" ")):(this.currentElement.style.borderRightWidth=this.toPixel(e),n&&(this.currentElement.style.borderRightColor=n),t&&(this.currentElement.style.borderRightStyle=t),this)},e.prototype.textAlign=function(e){return this.currentElement.style.textAlign=e,this},e.prototype.verticalAlign=function(e){return this.currentElement.style.verticalAlign=e,this},e.prototype.toPixel=function(e){return-1===e.toString().indexOf("px")?e.toString()+"px":e},e.prototype.innerHtml=function(e,t){return t?this.currentElement.innerHTML+=e:this.currentElement.innerHTML=e,this},e.prototype.text=function(e,t){return t?0===this.currentElement.children.length?this.currentElement.textContent+=e:this.currentElement.appendChild(this.browserService.document.createTextNode(e)):this.currentElement.textContent=e,this},e.prototype.safeInnerHtml=function(e,t){return this.innerHtml(r.escape(e),t)},e.prototype.insertHtmlBeforeBegin=function(e){return this.currentElement.insertAdjacentHTML("beforeBegin",e),this},e.prototype.insertHtmlAfterBegin=function(e){return this.currentElement.insertAdjacentHTML("afterBegin",e),this},e.prototype.insertHtmlBeforeEnd=function(e){return this.currentElement.insertAdjacentHTML("beforeEnd",e),this},e.prototype.insertHtmlAfterEnd=function(e){return this.currentElement.insertAdjacentHTML("afterEnd",e),this},e.prototype.bind=function(e){return v(this.currentElement,e),this},e.prototype.unbind=function(){return y(this.currentElement),this},e.prototype.getBinding=function(){return _(this.currentElement)},e.prototype.setProperty=function(e,t){return f(this.currentElement,e,t),this},e.prototype.getProperty=function(e,t){return g(this.currentElement,e,t)},e.prototype.removeProperty=function(e){return c(this.currentElement)&&delete l(this.currentElement)[e],this},e.prototype.parent=function(e){return o.ok(!this.offdom,"Builder was created with offdom = true and thus has no parent set"),h(this.currentElement.parentNode,e)},e.prototype.children=function(e){for(var t=this.currentElement.children,n=[],i=0;i<t.length;i++)n.push(h(t.item(i),e));return new M(n)},e.prototype.removeChild=function(e){return this.currentElement===e.parent().getHTMLElement()&&this.currentElement.removeChild(e.getHTMLElement()),this},e.prototype.select=function(e,t){o.ok(i.isString(e),"Expected String as parameter");for(var n=this.currentElement.querySelectorAll(e),r=[],s=0;s<n.length;s++)r.push(h(n.item(s),t));return new M(r)},e.prototype.matches=function(e){var t=this.currentElement,n=t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector;return n&&n.call(t,e)},e.prototype.isEmpty=function(){return!this.currentElement.childNodes||0===this.currentElement.childNodes.length},e.prototype.unbindDescendants=function(e){if(e&&e.children)for(var t=0,n=e.children.length;n>t;t++){var r=e.children.item(t);if(c(r)){var o=l(r)[C];if(i.isArray(o))for(;o.length;)o.pop()();delete r[b]}this.unbindDescendants(r)}},e.prototype.empty=function(){return this.unbindDescendants(this.currentElement),this.clearChildren(),this.offdom&&(this.createdElements=[]),this},e.prototype.clearChildren=function(){return this.currentElement&&s.clearNode(this.currentElement),this},e.prototype.destroy=function(){if(this.currentElement&&(this.currentElement.parentNode&&this.currentElement.parentNode.removeChild(this.currentElement),this.empty(),c(this.currentElement))){var e=l(this.currentElement)[C];if(i.isArray(e))for(;e.length;)e.pop()();delete this.currentElement[b]}var t;for(t in this.toUnbind)if(this.toUnbind.hasOwnProperty(t)&&i.isArray(this.toUnbind[t]))for(;this.toUnbind[t].length;)this.toUnbind[t].pop()();for(t in this.captureToUnbind)if(this.captureToUnbind.hasOwnProperty(t)&&i.isArray(this.captureToUnbind[t]))for(;this.captureToUnbind[t].length;)this.captureToUnbind[t].pop()();this.currentElement=null,this.container=null,this.offdom=null,this.createdElements=null,this.captureToUnbind=null,this.toUnbind=null},e.prototype.dispose=function(){this.destroy()},e.prototype.getPositionRelativeTo=function(t){t instanceof e&&(t=t.getHTMLElement());var n=s.getRelativeLeft(this.currentElement,t),i=s.getRelativeTop(this.currentElement,t);return new T(i,-1,-1,n)},e.prototype.getPosition=function(){var e=s.getTopLeftOffset(this.currentElement);return new T(e.top,-1,-1,e.left)},e.prototype.getTotalSize=function(){var e=s.getTotalWidth(this.currentElement),t=s.getTotalHeight(this.currentElement);return new L(e,t)},e.prototype.getContentSize=function(){var e=s.getContentWidth(this.currentElement),t=s.getContentHeight(this.currentElement);return new L(e,t)},e.prototype.getClientArea=function(){if(this.currentElement!==this.browserService.document.body){var e=s.getDomNodePosition(this.currentElement);return new L(e.width,e.height)}if(this.browserService.window.innerWidth&&this.browserService.window.innerHeight)return new L(this.browserService.window.innerWidth,this.browserService.window.innerHeight);if(this.browserService.document.body&&this.browserService.document.body.clientWidth&&this.browserService.document.body.clientWidth)return new L(this.browserService.document.body.clientWidth,this.browserService.document.body.clientHeight);if(this.browserService.document.documentElement&&this.browserService.document.documentElement.clientWidth&&this.browserService.document.documentElement.clientHeight)return new L(this.browserService.document.documentElement.clientWidth,this.browserService.document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")},e}();t.Builder=x;var M=function(e){function t(n){if(o.ok(i.isArray(n)||n instanceof t,"Expected Array or MultiBuilder as parameter"),e.call(this),this.length=0,this.builders=[],i.isArray(n))for(var r=0;r<n.length;r++)n[r]instanceof HTMLElement?this.push(h(n[r])):this.push(n[r]);else for(var r=0;r<n.length;r++)this.push(n.item(r));var s=this,a=function(e){s[e]=function(){for(var n,r=Array.prototype.slice.call(arguments),o=!1,a=0;a<s.length;a++){var u=s.item(a)[e].apply(s.item(a),r);if(u instanceof t){n||(n=[]),o=!0;for(var l=0;l<u.length;l++)n.push(u.item(l))}else i.isUndefined(u)||u instanceof x||(n||(n=[]),n.push(u))}return n&&o?new t(n):n||s}};for(var u in x.prototype)"clone"!==u&&"and"!==u&&x.prototype.hasOwnProperty(u)&&i.isFunction(x.prototype[u])&&a(u)}return __extends(t,e),t.prototype.item=function(e){return this.builders[e]},t.prototype.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];for(var n=0;n<e.length;n++)this.builders.push(e[n]);this.length=this.builders.length},t.prototype.pop=function(){var e=this.builders.pop();return this.length=this.builders.length,e},t.prototype.concat=function(e){var t=this.builders.concat(e);return this.length=this.builders.length,t},t.prototype.shift=function(){var e=this.builders.shift();return this.length=this.builders.length,e},t.prototype.unshift=function(e){var t=this.builders.unshift(e);return this.length=this.builders.length,t},t.prototype.slice=function(e,t){var n=this.builders.slice(e,t);return this.length=this.builders.length,n},t.prototype.splice=function(e,t){var n=this.builders.splice(e,t);
return this.length=this.builders.length,n},t.prototype.clone=function(){return new t(this)},t.prototype.and=function(e){e instanceof x||e instanceof t||(e=new x(e));var n=[];if(e instanceof t)for(var i=0;i<e.length;i++)n.push(e.item(i));else n.push(e);return this.push.apply(this,n),this},t}(x);t.MultiBuilder=M,t.setPropertyOnElement=f,t.getPropertyFromElement=g,t.removePropertyFromElement=m,t.bindElement=v,t.unbindElement=y,t.getBindingFromElement=_,t.Binding={setPropertyOnElement:f,getPropertyFromElement:g,removePropertyFromElement:m,bindElement:v,unbindElement:y,getBindingFromElement:_};var N=/([\w\-]+)?(#([\w\-]+))?((.([\w\-]+))*)/;t.$=function(e){if(i.isUndefined(e))return p();if(!e)throw new Error("Bad use of $");if(s.isHTMLElement(e)||e===window)return h(e);if(i.isArray(e))return new M(e);if(e instanceof x)return d(e);if(i.isString(e)){if("<"===e[0]){var t,n=a.getService().document.createElement("div");if(n.innerHTML=r.format.apply(r,arguments),0===n.children.length)throw new Error("Bad use of $");if(1===n.children.length)return t=n.firstChild,n.removeChild(t),h(t);for(var o=[];n.firstChild;)t=n.firstChild,n.removeChild(t),o.push(h(t));return new M(o)}if(1===arguments.length){var u=N.exec(e);if(!u)throw new Error("Bad use of $");var l=u[1]||"div",c=u[3]||void 0,f=(u[4]||"").replace(/\./g," "),g={};return c&&(g.id=c),f&&(g["class"]=f),p().element(l,g)}var m=p();return m.element.apply(m,arguments),m}throw new Error("Bad use of $")},t.$.Box=T,t.$.Dimension=L,t.$.Position=S,t.$.Builder=x,t.$.MultiBuilder=M,t.$.Build=t.Build,t.$.Binding=t.Binding});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/uuid",["require","exports"],function(e,t){function n(e,t){return"function"==typeof e[t]&&0===e[t].length}function i(e){return e instanceof a||e instanceof u||n(e,"asHex",0)&&n(e,"equals",1)}function r(){return new u}function o(e){if(!l.test(e))throw new Error("invalid uuid");return new a(e)}function s(){return r().asHex()}t.isUUID=i;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=r;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/css!vs/base/ui/widgets/highlightedlabel",["vs/css!vs/editor/editor.main"],{}),define("vs/base/ui/widgets/highlightedLabel",["require","exports","vs/base/strings","vs/base/dom/dom","vs/base/objects","vs/css!./highlightedlabel"],function(e,t,n,i,r){var o=function(){function e(e,t,n){void 0===t&&(t=""),void 0===n&&(n=[]),this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",e.getHTMLElement().appendChild(this.domNode),this.text=t,this.highlights=n,this.renderedOnce=!1}return e.prototype.destroy=function(){this.text=null,this.highlights=null},e.prototype.getHTMLElement=function(){return this.domNode},e.prototype.setValue=function(e,t){void 0===e&&(e=""),void 0===t&&(t=[]),this.renderedOnce&&this.text===e&&r.equals(this.highlights,t)||(this.text=e,this.highlights=t,this.render(),this.renderedOnce=!0)},e.prototype.render=function(){i.clearNode(this.domNode);for(var e,t=[],r=0,o=0;o<this.highlights.length;o++)e=this.highlights[o],r<e.start&&(t.push("<span>"),t.push(n.escape(this.text.substring(r,e.start))),t.push("</span>"),r=e.end),t.push('<span class="highlight">'),t.push(n.escape(this.text.substring(e.start,e.end))),t.push("</span>"),r=e.end;r<this.text.length&&(t.push("<span>"),t.push(n.escape(this.text.substring(r))),t.push("</span>")),this.domNode.innerHTML=t.join("")},e}();t.HighlightedLabel=o}),define("vs/base/arrays",["require","exports"],function(e,t){function n(e,t){return void 0===t&&(t=0),e[e.length-(1+t)]}function i(e,t){for(var n=0,i=e.length;i>n;n++)t(e[n],function(){e.splice(n,1),n--,i--})}function r(e,t,n){if(e.length!==t.length)return!1;for(var i=0,r=e.length;r>i;i++)if(!n(e[i],t[i]))return!1;return!0}function o(e,t){void 0===t&&(t=null);for(var n=new Array(e);e-->0;)n.push(t);return n}function s(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 a(e,t){var n=new Array;if(t)for(var i={},r=0;r<e.length;r++)for(var o=0;o<e[r].length;o++){var s=e[r][o],a=t(s);i.hasOwnProperty(a)||(i[a]=!0,n.push(s))}else for(var r=0,u=e.length;u>r;r++)n.push.apply(n,e[r]);return n}function u(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 l(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];i&&t.push(i)}return t}function c(e,t){return e.indexOf(t)>=0}function d(e,t,n){var i=e[t],r=e[n];e[t]=r,e[n]=i}function h(e,t,n){e.splice(n,0,e.splice(t,1)[0])}function p(e){return!Array.isArray(e)||0===e.length}function f(e,t){return e===t}function g(e,t,n){return void 0===n&&(n=f),e.every(function(e){return t.some(function(t){return n(e,t)})})}function m(e,t,n){return void 0===n&&(n=f),e.every(function(e){return!t.some(function(t){return n(e,t)})})}function v(e,t){if(!t)return e.filter(function(t,n){return e.indexOf(t)===n});var n={};return e.filter(function(e){var i=t(e);return n[i]?!1:(n[i]=!0,!0)})}function y(e,t,n){void 0===n&&(n=null);for(var i=0;i<e.length;i++){var r=e[i];if(t(r))return r}return n}function _(e,t){for(var n=[],i=0;t>i;i++)n.push(e);return n}t.tail=n,t.forEach=i,t.equals=r,t.fill=o,t.binarySearch=s,t.merge=a,t.findIndexInSegmentsArray=u,t.coalesce=l,t.contains=c,t.swap=d,t.move=h,t.isFalsyOrEmpty=p,t.withlist=g,t.blocklist=m,t.distinct=v,t.first=y,t.repeat=_}),define("vs/base/dom/touch",["require","exports","vs/base/arrays","vs/base/lifecycle","vs/base/dom/dom"],function(e,t,n,i,r){var o;!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend"}(o=t.EventType||(t.EventType={}));var s=function(){function e(e){this.callOnTarget=[],this.activeTouches={},this.target=e,this.handle=null}return e.prototype.dispose=function(){this.target=null,this.handle&&(this.handle.dispose(),this.handle=null)},Object.defineProperty(e.prototype,"target",{set:function(e){var t=this;i.cAll(this.callOnTarget),this.activeTouches={},this.targetElement=e,this.targetElement&&(this.callOnTarget.push(r.addListener(this.targetElement,"touchstart",function(e){return t.onTouchStart(e)})),this.callOnTarget.push(r.addListener(this.targetElement,"touchend",function(e){return t.onTouchEnd(e)})),this.callOnTarget.push(r.addListener(this.targetElement,"touchmove",function(e){return t.onTouchMove(e)})))},enumerable:!0,configurable:!0}),e.newGestureEvent=function(e){var t=document.createEvent("CustomEvent");return t.initEvent(e,!1,!0),t},e.prototype.onTouchStart=function(t){t.preventDefault(),t.stopPropagation(),this.handle&&(this.handle.dispose(),this.handle=null);for(var n=0,i=t.targetTouches.length;i>n;n++){var r=t.targetTouches.item(n);this.activeTouches[r.identifier]={id:r.identifier,initialTarget:r.target,initialTimeStamp:t.timeStamp,initialPageX:r.pageX,initialPageY:r.pageY,rollingTimestamps:[t.timeStamp],rollingPageX:[r.pageX],rollingPageY:[r.pageY]};var s=e.newGestureEvent(o.Start);s.pageX=r.pageX,s.pageY=r.pageY,this.targetElement.dispatchEvent(s)}},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(l<e.HOLD_DELAY&&Math.abs(u.initialPageX-n.tail(u.rollingPageX))<30&&Math.abs(u.initialPageY-n.tail(u.rollingPageY))<30){var c=e.newGestureEvent(o.Tap);c.initialTarget=u.initialTarget,c.pageX=n.tail(u.rollingPageX),c.pageY=n.tail(u.rollingPageY),this.targetElement.dispatchEvent(c)}else if(1===i){var d=n.tail(u.rollingPageX),h=n.tail(u.rollingPageY),p=n.tail(u.rollingTimestamps)-u.rollingTimestamps[0],f=d-u.rollingPageX[0],g=h-u.rollingPageY[0];this.inertia(t.timeStamp,Math.abs(f)/p,f>0?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/css!vs/base/ui/widgets/actionbar",["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/base/ui/widgets/actionbar",["require","exports","vs/nls!vs/editor/editor.main","vs/base/lifecycle","vs/base/dom/builder","vs/base/ui/actions","vs/base/dom/dom","vs/base/ui/events","vs/base/types","vs/base/eventEmitter","vs/base/dom/touch","vs/base/dom/keyboardEvent","vs/css!./actionbar"],function(e,t,n,i,r,o,s,a,u,l,c,d){var h=r.$,p=function(e){function t(t,n){var i=this;if(e.call(this),this._callOnDispose=[],this._context=t||this,this._action=n,n instanceof o.Action){var r=n.addBulkListener(function(e){i.builder&&e.forEach(function(e){switch(e.getType()){case o.Action.ENABLED:i._updateEnabled();break;case o.Action.LABEL:i._updateLabel(),i._updateTooltip();break;case o.Action.TOOLTIP:i._updateTooltip();break;case o.Action.CLASS:i._updateClass();break;case o.Action.CHECKED:i._updateChecked();break;default:i._updateUnknown(e)}})});this._callOnDispose.push(r)}}return __extends(t,e),Object.defineProperty(t.prototype,"callOnDispose",{get:function(){return this._callOnDispose},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionRunner",{get:function(){return this._actionRunner},set:function(e){this._actionRunner=e},enumerable:!0,configurable:!0}),t.prototype.getAction=function(){return this._action},t.prototype.isEnabled=function(){return this._action.enabled},t.prototype.setActionContext=function(e){this._context=e},t.prototype.render=function(e){var t=this;this.builder=h(e),this.gesture=new c.Gesture(e),this.builder.on(s.EventType.CLICK,function(e){t.onClick(e)}),this.builder.on(c.EventType.Tap,function(e){t.onClick(e)}),this.builder.on("mousedown",function(e){0===e.button&&t._action.enabled&&t.builder.addClass("active")}),this.builder.on(["mouseup","mouseout"],function(e){0===e.button&&t._action.enabled&&t.builder.removeClass("active")})},t.prototype.onClick=function(e){s.EventHelper.stop(e,!0),this._actionRunner.run(this._action,this._context||e)},t.prototype.focus=function(){this.builder.domFocus(),this.builder.addClass("focused")},t.prototype.blur=function(){this.builder.removeClass("focused")},t.prototype._updateEnabled=function(){},t.prototype._updateLabel=function(){},t.prototype._updateTooltip=function(){},t.prototype._updateClass=function(){},t.prototype._updateChecked=function(){},t.prototype._updateUnknown=function(){},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.builder&&(this.builder.destroy(),this.builder=null),this.gesture&&(this.gesture.dispose(),this.gesture=null),i.cAll(this._callOnDispose)},t}(l.EventEmitter);t.BaseActionItem=p;var f=function(e){function t(n,i){e.call(this,t.ID,n,n?"separator text":"separator"),this.checked=!1,this.enabled=!1,this.order=i}return __extends(t,e),t.ID="actions.monaco.separator",t}(o.Action);t.Separator=f;var g=function(e){function t(t,n,i){void 0===i&&(i={}),e.call(this,t,n),this.options=i,this.options.icon=void 0!==i.icon?i.icon:!1,this.options.label=void 0!==i.label?i.label:!0,this.cssClass=""}return __extends(t,e),t.prototype.render=function(t){e.prototype.render.call(this,t),this.$e=h("a.action-label").attr("tabIndex","-1").appendTo(this.builder),this.$e.attr({role:"menuitem"}),this.options.label&&this.options.keybinding&&h("span.keybinding").text(this.options.keybinding).appendTo(this.builder),this._updateClass(),this._updateLabel(),this._updateTooltip(),this._updateEnabled(),this._updateChecked()},t.prototype.focus=function(){e.prototype.focus.call(this),this.$e.domFocus()},t.prototype._updateLabel=function(){this.options.label&&this.$e.text(this.getAction().label)},t.prototype._updateTooltip=function(){var e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=n.localize("vs_base_ui_widgets_actionbar",0,e,this.options.keybinding))),e&&this.$e.attr({title:e})},t.prototype._updateClass=function(){this.cssClass&&this.$e.removeClass(this.cssClass),this.options.icon?(this.cssClass=this.getAction().class,this.$e.addClass("icon"),this.cssClass&&this.$e.addClass(this.cssClass),this._updateEnabled()):this.$e.removeClass("icon")},t.prototype._updateEnabled=function(){this.getAction().enabled?(this.builder.removeClass("disabled"),this.$e.removeClass("disabled")):(this.builder.addClass("disabled"),this.$e.addClass("disabled"))},t.prototype._updateChecked=function(){this.getAction().checked?this.$e.addClass("checked"):this.$e.removeClass("checked")},t}(p);t.ActionItem=g;var m=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.render=function(t){var n=document.createElement("div");h(n).addClass("progress-item");var i=document.createElement("div");h(i).addClass("label"),i.textContent=this.getAction().label,i.title=this.getAction().label,e.prototype.render.call(this,i);var r=document.createElement("div");r.textContent="…",h(r).addClass("tag","progress");var o=document.createElement("div");o.textContent="✓",h(o).addClass("tag","done");var s=document.createElement("div");s.textContent="!",h(s).addClass("tag","error"),this.callOnDispose.push(this.addListener(a.EventType.BEFORE_RUN,function(){h(r).addClass("active"),h(o).removeClass("active"),h(s).removeClass("active")})),this.callOnDispose.push(this.addListener(a.EventType.RUN,function(e){h(r).removeClass("active"),e.error?(h(o).removeClass("active"),h(s).addClass("active")):(h(s).removeClass("active"),h(o).addClass("active"))})),n.appendChild(i),n.appendChild(r),n.appendChild(o),n.appendChild(s),t.appendChild(n)},t.prototype.dispose=function(){i.cAll(this.callOnDispose),e.prototype.dispose.call(this)},t}(p);t.ProgressItem=m,function(e){e[e.HORIZONTAL=1]="HORIZONTAL",e[e.VERTICAL=2]="VERTICAL"}(t.ActionsOrientation||(t.ActionsOrientation={}));var v=t.ActionsOrientation,y={orientation:v.HORIZONTAL,context:null},_=function(e){function t(t,i){var r=this;void 0===i&&(i=y),e.call(this),this.builder=t,this.options=i,this.toDispose=[],this._actionRunner=this.options.actionRunner,this._actionRunner||(this._actionRunner=new o.ActionRunner,this.toDispose.push(this._actionRunner)),this.toDispose.push(this.addEmitter2(this._actionRunner)),this.items=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",this.domNode.tabIndex=0;var a=this.options.orientation===v.VERTICAL;a&&(this.domNode.className+=" vertical"),h(this.domNode).on(s.EventType.KEY_DOWN,function(e){var t=new d.KeyboardEvent(e),n=!0;switch(t.asString()){case a?"UpArrow":"LeftArrow":r.focusPrevious();break;case a?"DownArrow":"RightArrow":r.focusNext();break;case"Escape":r.cancel();break;case"Enter":break;default:n=!1}n&&(t.preventDefault(),t.stopPropagation())}),h(this.domNode).on(s.EventType.CONTEXT_MENU,function(e){e.preventDefault(),e.stopPropagation()}),h(this.domNode).on(s.EventType.KEY_UP,function(e){var t=new d.KeyboardEvent(e);switch(t.asString()){case"Enter":r.doTrigger(t),t.preventDefault(),t.stopPropagation()}});var u=s.trackFocus(this.domNode);u.addBlurListener(function(e){document.activeElement!==r.domNode&&s.isAncestor(document.activeElement,r.domNode)||r.emit("blur",e)}),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role","menu"),this.actionsList.setAttribute("aria-label",n.localize("vs_base_ui_widgets_actionbar",1)),this.domNode.appendChild(this.actionsList),t&&t.getHTMLElement().appendChild(this.domNode)}return __extends(t,e),Object.defineProperty(t.prototype,"actionRunner",{get:function(){return this._actionRunner},set:function(e){e&&(this._actionRunner=e,this.items.forEach(function(t){return t.actionRunner=e}))},enumerable:!0,configurable:!0}),t.prototype.getContainer=function(){return h(this.domNode)},t.prototype.push=function(e,t){var n=this;void 0===t&&(t={}),Array.isArray(e)||(e=[e]);var i=u.isNumber(t.index)?t.index:null;e.forEach(function(e){var r=document.createElement("li");r.className="action-item",r.setAttribute("role","presentation");var o=null;n.options.actionItemProvider&&(o=n.options.actionItemProvider(e)),o||(o=new g(n.options.context,e,t)),o.actionRunner=n._actionRunner,o.setActionContext(n.options.context),n.addEmitter(o),o.render(r),null===i||0>i||i>=n.actionsList.children.length?n.actionsList.appendChild(r):n.actionsList.insertBefore(r,n.actionsList.children[i++]),n.items.push(o)})},t.prototype.clear=function(){for(var e;e=this.items.pop();)e.dispose();h(this.actionsList).empty()},t.prototype.length=function(){return this.items.length},t.prototype.isEmpty=function(){return 0===this.items.length},t.prototype.onContentsChange=function(){this.emit(a.EventType.CONTENTS_CHANGED)},t.prototype.focus=function(e){e&&"undefined"==typeof this.focusedItem&&(this.focusedItem=0),this.updateFocus()},t.prototype.focusNext=function(){"undefined"==typeof this.focusedItem&&(this.focusedItem=this.items.length-1);var e,t=this.focusedItem;do this.focusedItem=(this.focusedItem+1)%this.items.length,e=this.items[this.focusedItem];while(this.focusedItem!==t&&!e.isEnabled());this.focusedItem!==t||e.isEnabled()||(this.focusedItem=void 0),this.updateFocus()},t.prototype.focusPrevious=function(){"undefined"==typeof this.focusedItem&&(this.focusedItem=0);var e,t=this.focusedItem;do this.focusedItem=this.focusedItem-1,this.focusedItem<0&&(this.focusedItem=this.items.length-1),e=this.items[this.focusedItem];while(this.focusedItem!==t&&!e.isEnabled());this.focusedItem!==t||e.isEnabled()||(this.focusedItem=void 0),this.updateFocus()},t.prototype.updateFocus=function(){if("undefined"==typeof this.focusedItem)return this.domNode.focus(),void 0;for(var e=0;e<this.items.length;e++){var t=this.items[e],n=t;e===this.focusedItem?u.isFunction(n.focus)&&n.focus():u.isFunction(n.blur)&&n.blur()}},t.prototype.doTrigger=function(e){if("undefined"!=typeof this.focusedItem){var t=this.items[this.focusedItem];this.run(t._action,t._context||e).done()}},t.prototype.cancel=function(){this.emit(a.EventType.CANCEL)},t.prototype.run=function(e,t){return this._actionRunner.run(e,t)},t.prototype.dispose=function(){null!==this.items&&this.clear(),this.items=null,this.toDispose=i.disposeAll(this.toDispose),this.getContainer().destroy(),e.prototype.dispose.call(this)},t.DEFAULT_OPTIONS={orientation:v.HORIZONTAL},t}(l.EventEmitter);t.ActionBar=_}),define("vs/css!vs/base/ui/widgets/tree/actionsRenderer",["vs/css!vs/editor/editor.main"],{}),define("vs/base/ui/widgets/tree/actionsRenderer",["require","exports","vs/base/dom/builder","vs/base/dom/dom","vs/base/ui/events","vs/base/ui/widgets/actionbar","vs/css!./actionsRenderer"],function(e,t,n,i,r,o){var s=n.$,a=function(){function e(e){this.actionProvider=e}return e.prototype.getHeight=function(e,t){return this.getContentHeight(e,t)},e.prototype.render=function(t,n,a,u){var l=this;try{i.clearNode(a)}catch(c){if(!/The node to be removed is no longer a child of this node/.test(c.message))throw c}u&&u(t,n);var d,h,p=s(a).addClass("actions"),f=s(".sub-content").appendTo(p);this.actionProvider.hasActions(t,n)?(p.addClass("has-actions"),d=new o.ActionBar(s(".primary-action-bar").appendTo(p),{context:this.getActionContext(t,n)}),this.actionProvider.getActions(t,n).then(function(e){d.push(e,{icon:!0,label:!1})}),h=d.addListener2(r.EventType.RUN,function(e){e.error&&l.onError(e.error)})):p.removeClass("has-actions");var g=(u?u[e.CONTENTS_CLEANUP_FN_KEY]:e.NO_OP)||e.NO_OP,m=this.renderContents(t,n,f.getHTMLElement(),g),v=function(){h&&h.dispose(),d&&d.dispose()};return v[e.CONTENTS_CLEANUP_FN_KEY]=m,v},e.prototype.getContentHeight=function(){return 20},e.prototype.renderContents=function(){return null},e.prototype.getActionContext=function(){return null},e.prototype.onError=function(){},e.prototype.dispose=function(){this.actionProvider=null},e.CONTENTS_CLEANUP_FN_KEY="__$ActionsRenderer.contentCleanupFn",e.NO_OP=function(){},e}();t.ActionsRenderer=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/base/ui/widgets/quickopen/quickOpenViewer",["require","exports","vs/base/lib/winjs.base","vs/base/dom/builder","vs/base/ui/widgets/highlightedLabel","vs/base/ui/widgets/quickopen/quickOpenModel","vs/base/ui/widgets/tree/actionsRenderer"],function(e,t,n,i,r,o,s){var a=i.$,u=function(){function e(){}return e.prototype.getId=function(t,n){return n instanceof o.QuickOpenModel?e.ROOT:n instanceof o.QuickOpenEntry?n.getId():null},e.prototype.hasChildren=function(e,t){return t instanceof o.QuickOpenModel?t.getEntries().length>0:!1},e.prototype.getChildren=function(e,t){return t instanceof o.QuickOpenModel?n.Promise.as(t.getEntries()):n.Promise.as([])},e.prototype.getParent=function(){return n.Promise.as(null)},e.ROOT="__root__",e}();t.DataSource=u;var l=function(){function e(){}return e.prototype.isVisible=function(e,t){return t instanceof o.QuickOpenEntry?!t.isHidden():!0},e}();t.Filter=l;var c=function(){function e(){}return e.prototype.hasActions=function(){return!1},e.prototype.getActions=function(){return n.Promise.as(null)},e.prototype.hasSecondaryActions=function(){return!1},e.prototype.getSecondaryActions=function(){return n.Promise.as(null)},e.prototype.getActionItem=function(){return null},e}(),d=function(e){function t(t){void 0===t&&(t=new c),e.call(this,t)}return __extends(t,e),t.prototype.getHeight=function(e,t){return t instanceof o.QuickOpenEntryItem?t.getHeight():24},t.prototype.renderContents=function(e,t,n,i){var r=this,s=[];if(t instanceof o.QuickOpenEntry){var u=t;if(u instanceof o.QuickOpenEntryItem)return t.render(e,n,i);if(u instanceof o.QuickOpenEntryGroup){var l=u;l.showBorder()&&a(n).addClass("results-group-separator"),l.getGroupLabel()&&a(n).div(function(e){e.addClass("results-group"),e.attr({text:l.getGroupLabel()})})}a(n).div(function(e){e.addClass("quick-open-entry"),u.getIcon()&&e.append(a("span",{class:"quick-open-entry-icon "+u.getIcon()}));var t=u.getHighlights(),n=t[0];n&&n.length>0?s.push(r.createHighlight(e,"labelHighlight",n,u.getLabel())):u.getLabel()&&e.span({text:u.getLabel(),class:"quick-open-entry-label"}),u.getMeta()&&e.span({text:u.getMeta(),class:"quick-open-entry-meta"});var i=t[1];i&&i.length>0?s.push(r.createHighlight(e.span({class:"quick-open-entry-description"}),"descriptionHighlight",i,u.getDescription())):u.getDescription()&&e.span({text:u.getDescription(),class:"quick-open-entry-description"})})}return function(){s.forEach(function(e){return e()})}},t.prototype.createHighlight=function(e,t,n,i){var o=e.getProperty(t);o||(o=new r.HighlightedLabel(e),e.setProperty(t,o));var s=function(){o.destroy()};return o.setValue(i,n),s},t}(s.ActionsRenderer);t.Renderer=d}),define("vs/base/dom/htmlContentRenderer",["require","exports","vs/base/dom/dom"],function(e,t,n){function i(e,t){return"string"==typeof e?[document.createTextNode(e)]:Array.isArray(e)?e.map(function(e){return r(e,t)}):e?[r(e,t)]:[]}function r(e,t){if(e.isText)return document.createTextNode(e.text);var n=o(e.tagName)||"div",i=document.createElement(n);return e.className&&(i.className=e.className),e.text&&(i.textContent=e.text),e.style&&i.setAttribute("style",e.style),e.customStyle&&Object.keys(e.customStyle).forEach(function(t){i.style[t]=e.customStyle[t]}),e.children&&e.children.forEach(function(e){i.appendChild(r(e))}),e.formattedText&&s(i,a(e.formattedText),t),i}function o(e){return e?d.hasOwnProperty(e)?e:null:null}function s(e,t,i){var r;if(t.type===c.Text)r=document.createTextNode(t.content);else if(t.type===c.Bold)r=document.createElement("b");else if(t.type===c.Italics)r=document.createElement("i");else if(t.type===c.Action){var o=document.createElement("a");o.href="#",n.addStandardDisposableListener(o,"click",function(e){i(t.index,e)}),r=o}else t.type===c.NewLine?r=document.createElement("br"):t.type===c.Root&&(r=e);e!==r&&e.appendChild(r),Array.isArray(t.children)&&t.children.forEach(function(e){s(r,e,i)})}function a(e){for(var t={type:c.Root,children:[]},n=0,i=t,r=[],o=new h(e);!o.eos();){var s=o.next();if(u(s)&&s===o.peek()){o.advance(),i.type===c.Text&&(i=r.pop());var a=l(s);if(i.type===a||i.type===c.Action&&a===c.ActionClose)i=r.pop();else{var d={type:a,children:[]};a===c.Action&&(d.index=n,n++),i.children.push(d),r.push(i),i=d}}else if("\n"===s)i.type===c.Text&&(i=r.pop()),i.children.push({type:c.NewLine});else if(i.type!==c.Text){var p={type:c.Text,content:s};i.children.push(p),r.push(i),i=p}else i.content+=s}return i.type===c.Text&&(i=r.pop()),r.length,t}function u(e){return l(e)!==c.Invalid}function l(e){switch(e){case"*":return c.Bold;case"_":return c.Italics;case"[":return c.Action;case"]":return c.ActionClose;default:return c.Invalid}}t.renderHtml2=i,t.renderHtml=r;var c,d={a:!0,b:!0,blockquote:!0,code:!0,del:!0,dd:!0,div:!0,dl:!0,dt:!0,em:!0,h1h2h3i:!0,img:!0,kbd:!0,li:!0,ol:!0,p:!0,pre:!0,s:!0,span:!0,sup:!0,sub:!0,strong:!0,strike:!0,ul:!0,br:!0,hr:!0},h=function(){function e(e){this.source=e,this.index=0}return e.prototype.eos=function(){return this.index>=this.source.length},e.prototype.next=function(){var e=this.peek();return this.advance(),e},e.prototype.peek=function(){return this.source[this.index]},e.prototype.advance=function(){this.index++},e}();!function(e){e[e.Invalid=0]="Invalid",e[e.Root=1]="Root",e[e.Text=2]="Text",e[e.Bold=3]="Bold",e[e.Italics=4]="Italics",e[e.Action=5]="Action",e[e.ActionClose=6]="ActionClose",e[e.NewLine=7]="NewLine"}(c||(c={}))}),define("vs/css!vs/base/ui/widgets/contextview/contextview",["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/base/ui/widgets/contextview/contextview",["require","exports","vs/base/dom/builder","vs/base/dom/dom","vs/base/lifecycle","vs/base/eventEmitter","vs/css!./contextview"],function(e,t,n,i,r,o){function s(e,t,n,i,r){var o,s;return i===l.BELOW?(o=t.top+t.height-n.top,n.top+o+e.height>n.height&&t.top-n.top>e.height&&(o=t.top-e.height-n.top)):(o=t.top-e.height-n.top,o+n.top<0&&t.top+t.height+e.height-n.top<n.height&&(o=t.top+t.height-n.top)),r===u.LEFT?(s=t.left-n.left,n.left+s+e.width>n.width&&(s-=e.width-t.width)):(s=t.left+t.width-e.width-n.left,s+n.left<0&&t.left+e.width<n.width&&(s=t.left-n.left)),{top:o,left:s}}var a=n.$;!function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(t.AnchorAlignment||(t.AnchorAlignment={}));var u=t.AnchorAlignment;!function(e){e[e.BELOW=0]="BELOW",e[e.ABOVE=1]="ABOVE"}(t.AnchorPosition||(t.AnchorPosition={}));var l=t.AnchorPosition;t.layout=s;var c=function(e){function t(t){var n=this;e.call(this),this.$view=a(".context-view").hide(),this.setContainer(t),this.toDispose=[{dispose:function(){n.setContainer(null)}}],this.toDisposeOnClean=null}return __extends(t,e),t.prototype.setContainer=function(e){var n=this;this.$container&&(this.$container.off(t.BUBBLE_UP_EVENTS),this.$container.off(t.BUBBLE_DOWN_EVENTS,!0),this.$container=null),e&&(this.$container=a(e),this.$view.appendTo(this.$container),this.$container.on(t.BUBBLE_UP_EVENTS,function(e){n.onDOMEvent(e,document.activeElement,!1)}),this.$container.on(t.BUBBLE_DOWN_EVENTS,function(e){n.onDOMEvent(e,document.activeElement,!0)},null,!0))},t.prototype.show=function(e){this.isVisible()&&this.hide(),this.$view.setClass("context-view").empty().style({top:"0px",left:"0px"}).show(),this.toDisposeOnClean=e.render(this.$view.getHTMLElement()),this.delegate=e,this.doLayout()},t.prototype.layout=function(){if(this.isVisible()){if(this.delegate.canRelayout===!1)return this.hide(),void 0;this.delegate.layout&&this.delegate.layout(),this.doLayout()}},t.prototype.doLayout=function(){var e,t=this.delegate.getAnchor();if(i.isHTMLElement(t)){var n=a(t),r=n.getPosition(),o=n.getTotalSize();e={top:r.top,left:r.left,width:o.width,height:o.height}}else{var c=t;e={top:c.y,left:c.x,width:0,height:0}}var d=this.$container.getPosition(),h={top:d.top,left:d.left,height:window.innerHeight,width:window.innerWidth},p=this.$view.getTotalSize(),f={width:p.width,height:p.height},g=this.delegate.anchorPosition||l.BELOW,m=this.delegate.anchorAlignment||u.LEFT,v=s(f,e,h,g,m);this.$view.removeClass("top","bottom","left","right"),this.$view.addClass(g===l.BELOW?"bottom":"top"),this.$view.addClass(m===u.LEFT?"left":"right"),this.$view.style({top:v.top+"px",left:v.left+"px",width:"initial"})},t.prototype.hide=function(e){this.delegate&&this.delegate.onHide&&this.delegate.onHide(e),this.delegate=null,this.toDisposeOnClean&&(this.toDisposeOnClean.dispose(),this.toDisposeOnClean=null),this.$view.hide()},t.prototype.isVisible=function(){return!!this.delegate},t.prototype.onDOMEvent=function(e,t,n){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):n&&!i.isAncestor(e.target,this.$container.getHTMLElement())&&this.hide())},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.hide(),this.toDispose=r.disposeAll(this.toDispose)},t.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],t.BUBBLE_DOWN_EVENTS=["click"],t}(o.EventEmitter);t.ContextView=c}),define("vs/css!vs/base/ui/widgets/inputBox",["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/base/ui/widgets/inputBox",["require","exports","vs/base/env","vs/base/dom/builder","vs/base/dom/dom","vs/base/dom/htmlContentRenderer","vs/base/eventEmitter","vs/base/ui/widgets/contextview/contextview","vs/css!./inputBox"],function(e,t,n,i,r,o,s,a){var u=i.$;
!function(e){e[e.INFO=1]="INFO",e[e.WARNING=2]="WARNING",e[e.ERROR=3]="ERROR"}(t.MessageType||(t.MessageType={}));var l=t.MessageType,c=function(e){function t(t,i,o){var s=this;e.call(this),this.state="idle",this.contextViewProvider=i,this.$placeholderShim=null,this.message=null,this.placeholder=o&&o.placeholder||"",this.ariaLabel=o&&o.ariaLabel||"",o&&o.validationOptions&&(this.validation=o.validationOptions.validation,this.showValidationMessage=o.validationOptions.showMessage||!1),this.$el=u(".monaco-inputbox.idle").appendTo(t);var a=u(".wrapper").appendTo(this.$el),l={wrap:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false"};this.ariaLabel&&(l["aria-label"]=this.ariaLabel),!n.browser.isIE11orEarlier&&this.placeholder&&(l.placeholder=this.placeholder),this.$input=u("input.input").type(o.type||"text").attr(l).on(r.EventType.INPUT,function(){s.onValueChange()}).on(r.EventType.BLUR,function(){s._hideMessage()}).on(r.EventType.FOCUS,function(){s._showMessage()}),this.placeholder&&n.browser.isIE11orEarlier&&(this.$placeholderShim=u("label.placeholder-shim").appendTo(a).attr({text:this.placeholder,for:"input"}).on(r.EventType.CLICK,function(e){r.EventHelper.stop(e,!0),s.$input.domFocus()}),n.browser.isIE9&&this.$input.on("keyup",function(){return s.onValueChange()})),this.$input.appendTo(a)}return __extends(t,e),t.prototype.setContextViewProvider=function(e){this.contextViewProvider=e},Object.defineProperty(t.prototype,"inputElement",{get:function(){return this.$input.getHTMLElement()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.inputElement.value},set:function(e){this.inputElement.value!==e&&(this.inputElement.value=e,this.onValueChange())},enumerable:!0,configurable:!0}),t.prototype.cursorIsAtBeginning=function(){var e=this.inputElement.selectionStart,t=this.inputElement.selectionEnd;return e===t&&0===e},t.prototype.cursorIsAtEnd=function(){var e=this.inputElement.selectionStart,t=this.inputElement.selectionEnd,n=this.inputElement.value.length;return e===t&&e===n},t.prototype.focus=function(){this.$input.domFocus()},t.prototype.hasFocus=function(){return this.$input.hasFocus()},t.prototype.select=function(e){void 0===e&&(e=null),this.$input.domSelect(e)},t.prototype.enable=function(){this.inputElement.removeAttribute("disabled")},t.prototype.disable=function(){this.$input.attr({disabled:!0}),this._hideMessage()},Object.defineProperty(t.prototype,"width",{get:function(){return this.$input.getTotalSize().width},set:function(e){this.$input.size(e)},enumerable:!0,configurable:!0}),t.prototype.showMessage=function(e){this.message=e,this.$el.removeClass("idle info warning error").addClass(this.classForType(e.type)),this.hasFocus()&&this._showMessage()},t.prototype.hideMessage=function(){this.message=null,this.$el.removeClass("info warning error").addClass("idle"),this._hideMessage()},t.prototype.isInputValid=function(){return!!this.validation&&!this.validation(this.value)},t.prototype.validate=function(){var e=null;return this.validation&&(e=this.validation(this.value),e?this.showMessage(e):this.hideMessage()),!e},t.prototype.classForType=function(e){switch(e){case l.INFO:return"info";case l.WARNING:return"warning";default:return"error"}},t.prototype._showMessage=function(){var e=this;if(this.contextViewProvider&&this.showValidationMessage&&this.message){var t;this.state="open",this.contextViewProvider.showContextView({getAnchor:function(){return e.$el.getHTMLElement()},anchorAlignment:a.AnchorAlignment.RIGHT,render:function(n){var i=e.$el.getTotalSize();t=u("div.monaco-inputbox-container").style({width:i.width+"px"}).appendTo(n);var r={tagName:"span",className:"monaco-inputbox-message"};e.message.formatContent?r.formattedText=e.message.content:r.text=e.message.content;var s=o.renderHtml(r),a=u(s).addClass(e.classForType(e.message.type)).appendTo(t);return{dispose:function(){a.destroy(),t.destroy()}}},layout:function(){var n=e.$el.getTotalSize();t.style({width:n.width+"px"})}})}},t.prototype._hideMessage=function(){this.contextViewProvider&&"open"===this.state&&(this.state="idle",this.contextViewProvider.hideContextView())},t.prototype.onValueChange=function(){this.emit("change",this.value),this.validate(),this.$placeholderShim&&(this.value?this.$placeholderShim.hide():this.$placeholderShim.show())},t.prototype.dispose=function(){this.$el&&(this.$el.dispose(),this.$el=null,this.$input.dispose(),this.$input=null),this.$placeholderShim&&(this.$placeholderShim.dispose(),this.$placeholderShim=null),this.contextViewProvider=null,this.message=null,this.placeholder=null,this.ariaLabel=null,this.validation=null,this.showValidationMessage=null,this.state=null,e.prototype.dispose.call(this)},t}(s.EventEmitter);t.InputBox=c}),define("vs/base/ui/widgets/tree/treeDefaults",["require","exports","vs/base/env","vs/base/errors","vs/base/dom/dom"],function(e,t,n,i,r){var o=function(){function e(){}return e.prototype.getHeight=function(){return 20},e.prototype.render=function(e,t,n){return n.textContent=""+t,null},e}();t.DefaultRenderer=o,function(e){e[e.ON_MOUSE_DOWN=0]="ON_MOUSE_DOWN",e[e.ON_MOUSE_UP=1]="ON_MOUSE_UP"}(t.ClickBehavior||(t.ClickBehavior={}));var s=t.ClickBehavior,a=function(){function e(e){void 0===e&&(e={clickBehavior:s.ON_MOUSE_UP}),this.options=e,this.downKeyBindings={Space:this.onSpace.bind(this),UpArrow:this.onUp.bind(this),PageUp:this.onPageUp.bind(this),DownArrow:this.onDown.bind(this),PageDown:this.onPageDown.bind(this),LeftArrow:this.onLeft.bind(this),RightArrow:this.onRight.bind(this),Escape:this.onEscape.bind(this)},this.upKeyBindings={Enter:this.onEnter.bind(this)},n.isMacintosh?this.upKeyBindings["Meta-Enter"]=this.onEnter.bind(this):this.upKeyBindings["Ctrl-Enter"]=this.onEnter.bind(this)}return e.prototype.onMouseDown=function(e,t,n,i){if(void 0===i&&(i="mouse"),this.options.clickBehavior===s.ON_MOUSE_DOWN&&n.leftButton){if(n.target){if(n.target.tagName&&"input"===n.target.tagName.toLowerCase())return!1;if(r.findParentWithClass(n.target,"monaco-action-bar","row"))return!1}return this.onLeftClick(e,t,n,i)}return!1},e.prototype.onClick=function(e,t,i){var r=n.isMacintosh;return r&&i.ctrlKey?(i.preventDefault(),i.stopPropagation(),!1):i.middleButton?!1:i.target&&i.target.tagName&&"input"===i.target.tagName.toLowerCase()?!1:this.options.clickBehavior===s.ON_MOUSE_DOWN&&i.leftButton?!1:this.onLeftClick(e,t,i)},e.prototype.onLeftClick=function(e,t,n,r){void 0===r&&(r="mouse");var o={origin:r,originalEvent:n};if(e.getInput()===t)e.clearFocus(o),e.clearSelection(o);else{var s=n&&n.browserEvent&&"mousedown"===n.browserEvent.type;s||n.preventDefault(),n.stopPropagation(),e.DOMFocus(),e.setSelection([t],o),e.setFocus(t,o),e.isExpanded(t)?e.collapse(t).done(null,i.onUnexpectedError):e.expand(t).done(null,i.onUnexpectedError)}return!0},e.prototype.onContextMenu=function(e,t,n){return n.target&&n.target.tagName&&"input"===n.target.tagName.toLowerCase()?!1:(n&&(n.preventDefault(),n.stopPropagation()),!1)},e.prototype.onTap=function(e,t,n){var i=n.initialTarget;return i&&i.tagName&&"input"===i.tagName.toLowerCase()?!1:this.onLeftClick(e,t,n,"touch")},e.prototype.onKeyDown=function(e,t){return this.onKey(this.downKeyBindings,e,t)},e.prototype.onKeyUp=function(e,t){return this.onKey(this.upKeyBindings,e,t)},e.prototype.onKey=function(e,t,n){var i=e[n.asString()];return i&&i(t,n)?(n.preventDefault(),n.stopPropagation(),!0):!1},e.prototype.onUp=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusPrevious(1,n),e.reveal(e.getFocus())),!0},e.prototype.onPageUp=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusPreviousPage(n),e.reveal(e.getFocus())),!0},e.prototype.onDown=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusNext(1,n),e.reveal(e.getFocus())),!0},e.prototype.onPageDown=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusNextPage(n),e.reveal(e.getFocus())),!0},e.prototype.onLeft=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(n);else{var i=e.getFocus();e.collapse(i).done(function(t){i&&!t&&e.focusParent(n)})}return!0},e.prototype.onRight=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(n);else{var r=e.getFocus();e.expand(r).done(null,i.onUnexpectedError)}return!0},e.prototype.onEnter=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())return!1;var i=e.getFocus();return i&&e.setSelection([i],n),!0},e.prototype.onSpace=function(e){if(e.getHighlight())return!1;var t=e.getFocus();return t&&e.toggleExpansion(t),!0},e.prototype.onEscape=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?(e.clearHighlight(n),!0):e.getFocus()||e.getSelection().length?(e.clearFocus(n),e.clearSelection(n),!0):!1},e}();t.DefaultController=a;var u=function(){function e(){}return e.prototype.getDragURI=function(){return null},e.prototype.onDragStart=function(){},e.prototype.onDragOver=function(){return null},e.prototype.drop=function(){},e}();t.DefaultDragAndDrop=u;var l=function(){function e(){}return e.prototype.isVisible=function(){return!0},e}();t.DefaultFilter=l;var c=function(){function e(){}return e.prototype.compare=function(){return 0},e}();t.DefaultSorter=c});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/widgets/tree/treeModel",["require","exports","vs/base/assert","vs/base/eventEmitter","vs/base/lib/winjs.base"],function(e,t,n,i,r){var o=function(e){function t(t){e.call(this),this._item=t}return __extends(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this._item},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.emit("unlock"),e.prototype.dispose.call(this)},t}(i.EventEmitter);t.LockData=o;var s=function(){function e(){this.locks=Object.create({})}return e.prototype.isLocked=function(e){return!!this.locks[e.id]},e.prototype.run=function(e,t){var n=this,i=this.getLock(e);if(i){var s;return new r.Promise(function(r,o){s=i.addOneTimeListener("unlock",function(){return n.run(e,t).then(r,o)})},function(){return s()})}var a;return new r.Promise(function(i,r){if(e.isDisposed())return r(new Error("Item is disposed."));var s=n.locks[e.id]=new o(e);return a=t().then(function(t){return delete n.locks[e.id],s.dispose(),t}).then(i,r)},function(){return a.cancel()})},e.prototype.getLock=function(e){var t;for(t in this.locks){var n=this.locks[t];if(e.intersects(n.item))return n}return null},e}();t.Lock=s;var a=function(e){function t(){e.call(this),this.items={}}return __extends(t,e),t.prototype.register=function(e){n.ok(!this.isRegistered(e.id),"item already registered: "+e.id),this.items[e.id]=e,this.emit("register",e)},t.prototype.deregister=function(e){n.ok(this.isRegistered(e.id),"item not registered: "+e.id),delete this.items[e.id],this.emit("deregister",e)},t.prototype.isRegistered=function(e){return this.items.hasOwnProperty(e)},t.prototype.getItem=function(e){return this.items[e]||null},t.prototype.dispose=function(){e.prototype.dispose.call(this),delete this.items},t}(i.EventEmitter);t.ItemRegistry=a;var u=function(e){function t(t,n,i,r,o){e.call(this),this.registry=n,this.context=i,this.lock=r,this.element=o,this.id=t,this.registry.register(this),this.doesHaveChildren=this.context.dataSource.hasChildren(this.context.tree,this.element),this.needsChildrenRefresh=!0,this.parent=null,this.previous=null,this.next=null,this.firstChild=null,this.lastChild=null,this.userContent=null,this.traits={},this.depth=0,this.maxDepth=0,this.expanded=!1,this.emit("item:create",{item:this}),this.visible=this._isVisible(),this.height=this._getHeight(),this._isDisposed=!1}return __extends(t,e),t.prototype.getElement=function(){return this.element},t.prototype.hasChildren=function(){return this.doesHaveChildren},t.prototype.getDepth=function(){return this.depth},t.prototype.getMaxDepth=function(){return this.maxDepth},t.prototype.isVisible=function(){return this.visible},t.prototype.setVisible=function(e){this.visible=e},t.prototype.isExpanded=function(){return this.expanded},t.prototype._setExpanded=function(e){this.expanded=e},t.prototype.reveal=function(e){void 0===e&&(e=null);var t={item:this,relativeTop:e};this.emit("item:reveal",t)},t.prototype.expand=function(){var e=this;if(this.isExpanded()||!this.doesHaveChildren||this.lock.isLocked(this))return r.Promise.as(!1);var t=this.lock.run(this,function(){var t,n={item:e};return e.emit("item:expanding",n),t=e.needsChildrenRefresh?e.refreshChildren(!1,!0,!0):r.Promise.as(null),t.then(function(){return e._setExpanded(!0),e.emit("item:expanded",n),!0})});return t.then(function(t){return e.isDisposed()?!1:t&&null!==e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.isVisible()?e.firstChild.expand().then(function(){return!0}):t})},t.prototype.collapse=function(e){var t=this;if(void 0===e&&(e=!1),e){var n=r.Promise.as(null);return this.forEachChild(function(e){n=n.then(function(){return e.collapse(!0)})}),n.then(function(){return t.collapse(!1)})}return!this.isExpanded()||this.lock.isLocked(this)?r.Promise.as(!1):this.lock.run(this,function(){var e={item:t};return t.emit("item:collapsing",e),t._setExpanded(!1),t.emit("item:collapsed",e),r.Promise.as(!0)})},t.prototype.addTrait=function(e){var t={item:this,trait:e};this.traits[e]=!0,this.emit("item:addTrait",t)},t.prototype.removeTrait=function(e){var t={item:this,trait:e};delete this.traits[e],this.emit("item:removeTrait",t)},t.prototype.hasTrait=function(e){return this.traits[e]||!1},t.prototype.getAllTraits=function(){var e,t=[];for(e in this.traits)this.traits.hasOwnProperty(e)&&this.traits[e]&&t.push(e);return t},t.prototype.getHeight=function(){return this.height},t.prototype.refreshChildren=function(e,n,i){var o=this;if(void 0===n&&(n=!1),void 0===i&&(i=!1),!i&&!this.isExpanded())return this.needsChildrenRefresh=!0,r.Promise.as(this);this.needsChildrenRefresh=!1;var s=function(){var i={item:o,isNested:n};o.emit("item:childrenRefreshing",i);var s;return s=o.doesHaveChildren?o.context.dataSource.getChildren(o.context.tree,o.element):r.Promise.as([]),s.then(function(n){n=n?n.slice(0):[],n=o.sort(n);for(var i={};null!==o.firstChild;)i[o.firstChild.id]=o.firstChild,o.removeChild(o.firstChild);for(var s=0,a=n.length;a>s;s++){var u=n[s],l=o.context.dataSource.getId(o.context.tree,u),c=i[l]||new t(l,o.registry,o.context,o.lock,u);c.element=u,e&&(c.needsChildrenRefresh=e),delete i[l],o.addChild(c)}for(var d in i)i.hasOwnProperty(d)&&i[d].dispose();return e?r.Promise.join(o.mapEachChild(function(t){return t.doRefresh(e,!0)})):r.Promise.as(null)}).then(function(){o.emit("item:childrenRefreshed",i)})};return n?s():this.lock.run(this,s)},t.prototype.doRefresh=function(e,t){void 0===t&&(t=!1);var n={item:this};return this.doesHaveChildren=this.context.dataSource.hasChildren(this.context.tree,this.element),this.height=this._getHeight(),this.setVisible(this._isVisible()),this.emit("item:refresh",n),this.refreshChildren(e,t)},t.prototype.refresh=function(e){return this.doRefresh(e)},t.prototype.getNavigator=function(){return new c(this)},t.prototype.intersects=function(e){return this.isAncestorOf(e)||e.isAncestorOf(this)},t.prototype.isAncestorOf=function(e){for(;e;){if(e.id===this.id)return!0;e=e.parent}return!1},t.prototype.addChild=function(e,t){void 0===t&&(t=this.lastChild);var n=null===this.firstChild,i=null===t,r=t===this.lastChild;n?(this.firstChild=this.lastChild=e,e.next=e.previous=null):i?(this.firstChild.previous=e,e.next=this.firstChild,e.previous=null,this.firstChild=e):r?(this.lastChild.next=e,e.next=null,e.previous=this.lastChild,this.lastChild=e):(e.previous=t,e.next=t.next,t.next.previous=e,t.next=e),e.parent=this,e.depth=this.depth+1;for(var o=this,s=e.maxDepth+1;o&&o.maxDepth<s;)o.maxDepth=s++,o=o.parent},t.prototype.removeChild=function(e){var t=this.firstChild===e,n=this.lastChild===e;t&&n?this.firstChild=this.lastChild=null:t?(e.next.previous=null,this.firstChild=e.next):n?(e.previous.next=null,this.lastChild=e.previous):(e.next.previous=e.previous,e.previous.next=e.next),e.parent=null,e.depth=null;for(var i=this,r=e.maxDepth+1;i&&i.maxDepth===r;)r=i.maxDepth+1,i.maxDepth=Math.max.apply(null,this.mapEachChild(function(e){return e.maxDepth}))+1,i=i.parent},t.prototype.forEachChild=function(e){for(var t,n=this.firstChild;n;)t=n.next,e(n),n=t},t.prototype.mapEachChild=function(e){var t=[];return this.forEachChild(function(n){t.push(e(n))}),t},t.prototype.sort=function(e){var t=this;return this.context.sorter?e.sort(function(e,n){return t.context.sorter.compare(t.context.tree,e,n)}):e},t.prototype._getHeight=function(){return this.context.renderer.getHeight(this.context.tree,this.element)},t.prototype._isVisible=function(){return this.context.filter.isVisible(this.context.tree,this.element)},t.prototype.isDisposed=function(){return this._isDisposed},t.prototype.dispose=function(){this.forEachChild(function(e){return e.dispose()}),delete this.parent,delete this.previous,delete this.next,delete this.firstChild,delete this.lastChild;var t={item:this};this.emit("item:dispose",t),this.registry.deregister(this),e.prototype.dispose.call(this),this._isDisposed=!0},t}(i.EventEmitter);t.Item=u;var l=function(e){function t(t,n,i,r,o){e.call(this,t,n,i,r,o)}return __extends(t,e),t.prototype.isVisible=function(){return!1},t.prototype.setVisible=function(){},t.prototype.isExpanded=function(){return!0},t.prototype._setExpanded=function(){},t.prototype.render=function(){},t.prototype._getHeight=function(){return 0},t.prototype._isVisible=function(){return!1},t}(u),c=function(){function e(e,t){void 0===t&&(t=!0),this.item=e,this.start=t?e:null}return e.lastDescendantOf=function(t){return t?t.isVisible()&&t.isExpanded()&&null!==t.lastChild?e.lastDescendantOf(t.lastChild):t:null},e.prototype.current=function(){return this.item||null},e.prototype.next=function(){if(this.item)do if((this.item instanceof l||this.item.isVisible()&&this.item.isExpanded())&&this.item.firstChild)this.item=this.item.firstChild;else if(this.item===this.start)this.item=null;else{for(;this.item&&this.item!==this.start&&!this.item.next;)this.item=this.item.parent;this.item===this.start&&(this.item=null),this.item=this.item?this.item.next:null}while(this.item&&!this.item.isVisible());return this.item||null},e.prototype.previous=function(){if(this.item)do{var t=e.lastDescendantOf(this.item.previous);this.item=t?t:this.item.parent&&this.item.parent!==this.start&&this.item.parent.isVisible()?this.item.parent:null}while(this.item&&!this.item.isVisible());return this.item||null},e.prototype.parent=function(){if(this.item){var e=this.item.parent;this.item=e&&e!==this.start&&e.isVisible()?e:null}return this.item||null},e.prototype.first=function(){return this.item=this.start,this.next(),this.item||null},e.prototype.last=function(){return this.start&&this.start.isExpanded()&&(this.item=this.start.lastChild,this.item&&!this.item.isVisible()&&this.previous()),this.item||null},e}();t.TreeNavigator=c;var d=function(e){function t(t){e.call(this),this.context=t,this.input=null,this.traitsToItems={}}return __extends(t,e),t.prototype.setInput=function(e){var t=this,n={item:this.input};this.emit("clearingInput",n),this.setSelection([]),this.setFocus(),this.setHighlight(),this.lock=new s,this.input&&this.input.dispose(),this.registry&&(this.registry.dispose(),this.unbindRegistryListener()),this.registry=new a,this.unbindRegistryListener=this.registry.addListener("register",function(e){var n=t.addEmitter(e),i=t.registry.addListener("deregister",function(r){if(r.id===e.id){for(var o=r.getAllTraits(),s=0,a=o.length;a>s;s++){var u=o[s];delete t.traitsToItems[u][r.id]}n(),i()}})});var i=this.context.dataSource.getId(this.context.tree,e);return this.input=new l(i,this.registry,this.context,this.lock,e),n={item:this.input},this.emit("setInput",n),this.refresh(this.input)},t.prototype.getInput=function(){return this.input?this.input.getElement():null},t.prototype.refresh=function(e,t){var n=this;void 0===e&&(e=null),void 0===t&&(t=!0);var i=this.getItem(e);if(!i)return r.Promise.as(null);var o={item:i,recursive:t};return this.emit("refreshing",o),i.refresh(t).then(function(){n.emit("refreshed",o)})},t.prototype.refreshAll=function(e,t){var n=this;void 0===t&&(t=!0);var i=[];return this.deferredEmit(function(){for(var r=0,o=e.length;o>r;r++)i.push(n.refresh(e[r],t))}),r.Promise.join(i)},t.prototype.expand=function(e){var t=this.getItem(e);return t?t.expand():r.Promise.as(!1)},t.prototype.expandAll=function(e){if(!e){e=[];for(var t,n=this.getNavigator();t=n.next();)e.push(t)}for(var i=[],o=0,s=e.length;s>o;o++)i.push(this.expand(e[o]));return r.Promise.join(i)},t.prototype.collapse=function(e,t){void 0===t&&(t=!1);var n=this.getItem(e);return n?n.collapse(t):r.Promise.as(!1)},t.prototype.collapseAll=function(e,t){void 0===e&&(e=null),void 0===t&&(t=!1),e||(e=[this.input],t=!0);for(var n=[],i=0,o=e.length;o>i;i++)n.push(this.collapse(e[i],t));return r.Promise.join(n)},t.prototype.toggleExpansion=function(e){return this.isExpanded(e)?this.collapse(e):this.expand(e)},t.prototype.toggleExpansionAll=function(e){for(var t=[],n=0,i=e.length;i>n;n++)t.push(this.toggleExpansion(e[n]));return r.Promise.join(t)},t.prototype.isExpanded=function(e){var t=this.getItem(e);return t?t.isExpanded():!1},t.prototype.reveal=function(e,t){var n=this;return void 0===t&&(t=null),this.resolveUnknownParentChain(e).then(function(e){var t=r.Promise.as(null);return e.forEach(function(e){t=t.then(function(){return n.expand(e)})}),t}).then(function(){var i=n.getItem(e);i&&i.reveal(t)})},t.prototype.resolveUnknownParentChain=function(e){var t=this;return this.context.dataSource.getParent(this.context.tree,e).then(function(e){return e?t.resolveUnknownParentChain(e).then(function(t){return t.push(e),t}):r.Promise.as([])})},t.prototype.setHighlight=function(e,t){this.setTraits("highlighted",e?[e]:[]);var n={highlight:this.getHighlight(),payload:t};this.emit("highlight",n)},t.prototype.getHighlight=function(){var e=this.getElementsWithTrait("highlighted");return 0===e.length?null:e[0]},t.prototype.isHighlighted=function(e){var t=this.getItem(e);return t?t.hasTrait("highlighted"):!1},t.prototype.select=function(e,t){this.selectAll([e],t)},t.prototype.selectAll=function(e,t){this.addTraits("selected",e);var n={selection:this.getSelection(),payload:t};this.emit("selection",n)},t.prototype.deselect=function(e,t){this.deselectAll([e],t)},t.prototype.deselectAll=function(e,t){this.removeTraits("selected",e);var n={selection:this.getSelection(),payload:t};this.emit("selection",n)},t.prototype.setSelection=function(e,t){this.setTraits("selected",e);var n={selection:this.getSelection(),payload:t};this.emit("selection",n)},t.prototype.isSelected=function(e){var t=this.getItem(e);return t?t.hasTrait("selected"):!1},t.prototype.getSelection=function(){return this.getElementsWithTrait("selected")},t.prototype.selectNext=function(e,t){void 0===e&&(e=1);for(var n,i=this.getSelection(),r=i.length>0?i[0]:this.input,o=this.getNavigator(r,!1),s=0;e>s&&(n=o.next(),n);s++)r=n;this.setSelection([r],t)},t.prototype.selectPrevious=function(e,t){void 0===e&&(e=1);var n=this.getSelection(),i=null,r=null;if(0===n.length){for(var o=this.getNavigator(this.input);i=o.next();)r=i;return this.setSelection([r],t),void 0}i=n[0];for(var o=this.getNavigator(i,!1),s=0;e>s&&(r=o.previous(),r);s++)i=r;this.setSelection([i],t)},t.prototype.selectParent=function(e){var t=this.getSelection(),n=t.length>0?t[0]:this.input,i=this.getNavigator(n,!1),r=i.parent();r&&this.setSelection([r],e)},t.prototype.setFocus=function(e,t){this.setTraits("focused",e?[e]:[]);var n={focus:this.getFocus(),payload:t};this.emit("focus",n)},t.prototype.isFocused=function(e){var t=this.getItem(e);return t?t.hasTrait("focused"):!1},t.prototype.getFocus=function(){var e=this.getElementsWithTrait("focused");return 0===e.length?null:e[0]},t.prototype.focusNext=function(e,t){void 0===e&&(e=1);for(var n,i=this.getFocus()||this.input,r=this.getNavigator(i,!1),o=0;e>o&&(n=r.next(),n);o++)i=n;this.setFocus(i,t)},t.prototype.focusPrevious=function(e,t){void 0===e&&(e=1);for(var n,i=this.getFocus()||this.input,r=this.getNavigator(i,!1),o=0;e>o&&(n=r.previous(),n);o++)i=n;this.setFocus(i,t)},t.prototype.focusParent=function(e){var t=this.getFocus()||this.input,n=this.getNavigator(t,!1),i=n.parent();i&&this.setFocus(i,e)},t.prototype.focusFirst=function(e){this.focusNth(0,e)},t.prototype.focusNth=function(e,t){for(var n=this.getNavigator(this.input),i=n.first(),r=0;e>r;r++)i=n.next();i&&this.setFocus(i,t)},t.prototype.focusLast=function(e){var t=this.getNavigator(this.input),n=t.last();n&&this.setFocus(n,e)},t.prototype.getNavigator=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!0),new c(this.getItem(e),t)},t.prototype.getItem=function(e){return void 0===e&&(e=null),null===e?this.input:e instanceof u?e:"string"==typeof e?this.registry.getItem(e):this.registry.getItem(this.context.dataSource.getId(this.context.tree,e))},t.prototype.addTraits=function(e,t){for(var n,i=this.traitsToItems[e]||{},r=0,o=t.length;o>r;r++)n=this.getItem(t[r]),n&&(n.addTrait(e),i[n.id]=n);this.traitsToItems[e]=i},t.prototype.removeTraits=function(e,t){var n,i,r=this.traitsToItems[e]||{};if(0===t.length){for(i in r)r.hasOwnProperty(i)&&(n=r[i],n.removeTrait(e));delete this.traitsToItems[e]}else for(var o=0,s=t.length;s>o;o++)n=this.getItem(t[o]),n&&(n.removeTrait(e),delete r[n.id])},t.prototype.setTraits=function(e,t){if(0===t.length)this.removeTraits(e,t);else{for(var n,i={},r=0,o=t.length;o>r;r++)n=this.getItem(t[r]),n&&(i[n.id]=n);var s,a=this.traitsToItems[e]||{},u=[];for(s in a)a.hasOwnProperty(s)&&(i.hasOwnProperty(s)?delete i[s]:u.push(a[s]));for(var r=0,o=u.length;o>r;r++)n=u[r],n.removeTrait(e),delete a[n.id];for(s in i)i.hasOwnProperty(s)&&(n=i[s],n.addTrait(e),a[s]=n);this.traitsToItems[e]=a}},t.prototype.getElementsWithTrait=function(e){var t,n=[],i=this.traitsToItems[e]||{};for(t in i)i.hasOwnProperty(t)&&n.push(i[t].getElement());return n},t.prototype.dispose=function(){this.registry&&(this.registry.dispose(),this.registry=null),e.prototype.dispose.call(this)},t}(i.EventEmitter);t.TreeModel=d});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/widgets/tree/tree",["require","exports"],function(e,t){var n=function(){function e(e,t,n){this._posx=e,this._posy=t,this._target=n}return e.prototype.preventDefault=function(){},e.prototype.stopPropagation=function(){},Object.defineProperty(e.prototype,"posx",{get:function(){return this._posx},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"posy",{get:function(){return this._posy},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0}),e}();t.ContextMenuEvent=n;var i=function(e){function t(t){e.call(this,t.posx,t.posy,t.target),this.originalEvent=t}return __extends(t,e),t.prototype.preventDefault=function(){this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.originalEvent.stopPropagation()},t}(n);t.MouseContextMenuEvent=i;var r=function(e){function t(t,n,i){e.call(this,t,n,i.target),this.originalEvent=i}return __extends(t,e),t.prototype.preventDefault=function(){this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.originalEvent.stopPropagation()},t}(n);t.KeyboardContextMenuEvent=r,function(e){e[e.COPY=0]="COPY",e[e.MOVE=1]="MOVE"}(t.DragOverEffect||(t.DragOverEffect={}));var o=t.DragOverEffect;!function(e){e[e.BUBBLE_DOWN=0]="BUBBLE_DOWN",e[e.BUBBLE_UP=1]="BUBBLE_UP"}(t.DragOverBubble||(t.DragOverBubble={}));var s=t.DragOverBubble;t.DRAG_OVER_REJECT={accept:!1},t.DRAG_OVER_ACCEPT={accept:!0},t.DRAG_OVER_ACCEPT_BUBBLE_UP={accept:!0,bubble:s.BUBBLE_UP},t.DRAG_OVER_ACCEPT_BUBBLE_DOWN={accept:!0,bubble:s.BUBBLE_DOWN},t.DRAG_OVER_ACCEPT_BUBBLE_UP_COPY={accept:!0,bubble:s.BUBBLE_UP,effect:o.COPY},t.DRAG_OVER_ACCEPT_BUBBLE_DOWN_COPY={accept:!0,bubble:s.BUBBLE_DOWN,effect:o.COPY}}),define("vs/base/bits/bits",["require","exports"],function(e,t){function n(e,t,n){return void 0===n&&(n="0"),new Array(t-e.length+1).join(n)+e}function i(e,t){return void 0===t&&(t=32),n((e>>>0).toString(16),t/4)}function r(e,t,n){void 0===n&&(n=32);var i=n-t,r=~((1<<i)-1);return(e<<t|(r&e)>>>i)>>>0}function o(e,t){var n=65535&e,i=e>>>16,r=65535&t,o=t>>>16,s=0,a=0,u=0,l=0,c=r*n;return s+=65535&c,a+=c>>>16,c=r*i,a+=65535&c,u+=c>>>16,c=o*n,a+=65535&c,u+=c>>>16,u+=a>>>16,a=65535&a,c=o*i,u+=65535&c,l+=c>>>16,l+=u>>>16,u=65535&u,[(l<<16|u)>>>0,(a<<16|s)>>>0]}t.leftPad=n,t.toHexString=i,t.leftRotate=r,t.multiply64=o}),define("vs/base/bits/encoding",["require","exports","./bits"],function(e,t,n){function i(e){if(e>>>=0,128>e)return 1;if(2048>e)return 2;if(65536>e)return 3;if(2097152>e)return 4;if(67108864>e)return 5;if(2147483648>e)return 6;throw new Error("Code point 0x"+n.toHexString(e)+" not encodable in UTF8.")}function r(e,t,n){var r=i(e);if(1===r)return t[n]=e,1;t[n]=255&(252<<6-r|e>>>6*(r-1));for(var o=1;r>o;o++)t[n+o]=255&(128|63&e>>>6*(r-o-1));return r}function o(e,t){var n,o,s=0,a=0,u=0,l=0;for(n=0,o=e.length;o>n;n++){if(a=e.charCodeAt(n),a>=55296&&56320>a){if(u=e.charCodeAt(++n),!(u>=56320&&57344>u))throw new Error("Invalid char code");l=((a-55296&1023)<<10|u-56320&1023)+65536}else l=a;s+=i(l)}t&&(s+=3);var c=new ArrayBuffer(s),d=new Uint8Array(c),h=0;for(t&&(d[0]=239,d[1]=187,d[2]=191,h+=3),n=0,o=e.length;o>n;n++)a=e.charCodeAt(n),a>=55296&&56320>a?(u=e.charCodeAt(++n),l=((a-55296&1023)<<10|u-56320&1023)+65536):l=a,h+=r(l,d,h);return c}function s(e,t,n,i){var r=2*e.length;if(r>i)throw Error("Unable to encode string to UTF16. Need "+r+" bytes, but only have "+i+" bytes.");for(var o=0;o<e.length;o++)t.setUint16(n+2*o,e.charCodeAt(o),!1);return r}t.encodeToUTF8=o,t.encodeToUTF16=s}),define("vs/base/bits/hash",["require","exports","vs/base/env","vs/base/bits/bits","vs/base/bits/encoding","vs/base/types"],function(e,t,n,i,r,o){function s(e,t,n,i,r){for(var o=0,s=Math.min(e.byteLength-t,n.byteLength-i,r);s>o;o++)e[t+o]=n[i+o];return s}function a(e,t,n,i){void 0===t&&(t=0),void 0===n&&(n=e.byteLength),void 0===i&&(i=0);for(var r=0;n>r;r++)e[t+r]=i}function u(e,t,n){if("undefined"==typeof ArrayBuffer)return null;var i=o.isString(e)?r.encodeToUTF8(e,t):e,s=new c;return n&&s.update(n(i.byteLength)),i.byteLength&&s.update(i),s.digest()}function l(){return!n.browser.isIE9}var c=function(){function e(){this.h0=1732584193,this.h1=4023233417,this.h2=2562383102,this.h3=271733878,this.h4=3285377520,this.length=0,this.buffer=new Uint8Array(e.BLOCK_SIZE),this.bufferDV=new DataView(this.buffer.buffer),this.bufferLength=0,this.bigBlock32=new DataView(new ArrayBuffer(320))}return e.digest=function(t){var n=new e;return n.update(t),n.digest()},e.prototype.update=function(t){if(!this.buffer)throw new Error("Digest already computed.");var n;n=o.isString(t)?new Uint8Array(r.encodeToUTF8(t)):t instanceof ArrayBuffer?new Uint8Array(t):t instanceof DataView?new Uint8Array(t.buffer):t;for(var i=0,a=0;a<n.byteLength;)i=s(this.buffer,this.bufferLength,n,a,n.byteLength),this.bufferLength+=i,a+=i,this.bufferLength===e.BLOCK_SIZE&&(this.step(this.bufferDV),this.bufferLength=0);this.length+=a},e.prototype.digest=function(){return this.buffer&&this.wrapUp(),i.toHexString(this.h0)+i.toHexString(this.h1)+i.toHexString(this.h2)+i.toHexString(this.h3)+i.toHexString(this.h4)},e.prototype.wrapUp=function(){this.buffer[this.bufferLength++]=128,a(this.buffer,this.bufferLength),this.bufferLength>56&&(this.step(this.bufferDV),a(this.buffer));var e=i.multiply64(8,this.length);
this.bufferDV.setUint32(56,e[0],!1),this.bufferDV.setUint32(60,e[1],!1),this.step(this.bufferDV),this.buffer=null,this.bufferDV=null,this.bufferLength=-1},e.prototype.step=function(e){for(var t=0;64>t;t+=4)this.bigBlock32.setUint32(t,e.getUint32(t,!1),!1);for(t=64;320>t;t+=4)this.bigBlock32.setUint32(t,i.leftRotate(this.bigBlock32.getUint32(t-12,!1)^this.bigBlock32.getUint32(t-32,!1)^this.bigBlock32.getUint32(t-56,!1)^this.bigBlock32.getUint32(t-64,!1),1),!1);var n,r,o,s=this.h0,a=this.h1,u=this.h2,l=this.h3,c=this.h4;for(t=0;80>t;t++)20>t?(n=a&u|~a&l,r=1518500249):40>t?(n=a^u^l,r=1859775393):60>t?(n=a&u|a&l|u&l,r=2400959708):(n=a^u^l,r=3395469782),o=i.leftRotate(s,5)+n+c+r+this.bigBlock32.getUint32(4*t,!1)&4294967295,c=l,l=u,u=i.leftRotate(a,30),a=s,s=o;this.h0=this.h0+s&4294967295,this.h1=this.h1+a&4294967295,this.h2=this.h2+u&4294967295,this.h3=this.h3+l&4294967295,this.h4=this.h4+c&4294967295},e.BLOCK_SIZE=64,e}();t.SHA1=c,t.computeSHA1Hash=u,t.canHash=l}),define("vs/base/diff/diffChange",["require","exports"],function(e,t){t.DifferenceType={Add:0,Remove:1,Change:2};var n=function(){function e(e,t,n,i){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=i}return e.prototype.getChangeType=function(){return 0===this.originalLength?t.DifferenceType.Add:0===this.modifiedLength?t.DifferenceType.Remove:t.DifferenceType.Change},e.prototype.getOriginalEnd=function(){return this.originalStart+this.originalLength},e.prototype.getModifiedEnd=function(){return this.modifiedStart+this.modifiedLength},e}();t.DiffChange=n}),define("vs/base/diff/diff",["require","exports","vs/base/diff/diffChange"],function(e,t,n){var i=function(){function e(){}return e.Assert=function(e,t){if(!e)throw new Error(t)},e}();t.Debug=i;var r=function(){function e(){}return e.Copy=function(e,t,n,i,r){for(var o=0;r>o;o++)n[i+o]=e[t+o]},e}();t.MyArray=r;// 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){void 0===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,i={},r=1;for(n=0;e>n;n++){var o=this.OriginalSequence.getElementHash(n);i.hasOwnProperty(o)?this.m_originalIds[n]=i[o]:(this.m_originalIds[n]=r++,i[o]=this.m_originalIds[n])}for(n=0;t>n;n++){var s=this.ModifiedSequence.getElementHash(n);i.hasOwnProperty(s)?this.m_modifiedIds[n]=i[s]:(this.m_modifiedIds[n]=r++,i[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,i){var r=[!1];return this.ComputeDiffRecursive(e,t,n,i,r)},e.prototype.ComputeDiffRecursive=function(e,t,r,o,s){for(s[0]=!1;t>=e&&o>=r&&this.ElementsAreEqual(e,r);)e++,r++;for(;t>=e&&o>=r&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||r>o){var a;return o>=r?(i.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a=[new n.DiffChange(e,0,r,o-r+1)]):t>=e?(i.Assert(r===o+1,"modifiedStart should only be one more than modifiedEnd"),a=[new n.DiffChange(e,t-e+1,r,0)]):(i.Assert(e===t+1,"originalStart should only be one more than originalEnd"),i.Assert(r===o+1,"modifiedStart should only be one more than modifiedEnd"),a=[]),a}var u=[0],l=[0],c=this.ComputeRecursionPoint(e,t,r,o,u,l,s),d=u[0],h=l[0];if(null!==c)return c;if(!s[0]){var p=this.ComputeDiffRecursive(e,d,r,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,r,o-r+1)]},e.prototype.WALKTRACE=function(e,t,i,r,o,a,u,l,c,d,h,p,f,g,m,v,y,_){var b,w=null,C=null,E=new s,S=t,T=i,L=f[0]-v[0]-r,x=Number.MIN_VALUE,M=this.m_forwardHistory.length-1;do b=L+e,b===S||T>b&&c[b-1]<c[b+1]?(h=c[b+1],g=h-L-r,x>h&&E.MarkNextChange(),x=h,E.AddModifiedElement(h+1,g),L=b+1-e):(h=c[b-1]+1,g=h-L-r,x>h&&E.MarkNextChange(),x=h-1,E.AddOriginalElement(h,g+1),L=b-1-e),M>=0&&(c=this.m_forwardHistory[M],e=c[0],S=1,T=c.length-1);while(--M>=-1);if(w=E.getReverseChanges(),_[0]){var N=f[0]+1,k=v[0]+1;if(null!==w&&w.length>0){var I=w[w.length-1];N=Math.max(N,I.getOriginalEnd()),k=Math.max(k,I.getModifiedEnd())}C=[new n.DiffChange(N,p-N+1,k,m-k+1)]}else{E=new s,S=a,T=u,L=f[0]-v[0]-l,x=Number.MAX_VALUE,M=y?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do b=L+o,b===S||T>b&&d[b-1]>=d[b+1]?(h=d[b+1]-1,g=h-L-l,h>x&&E.MarkNextChange(),x=h+1,E.AddOriginalElement(h+1,g+1),L=b+1-o):(h=d[b-1],g=h-L-l,h>x&&E.MarkNextChange(),x=h,E.AddModifiedElement(h+1,g+1),L=b-1-o),M>=0&&(d=this.m_reverseHistory[M],o=d[0],S=1,T=d.length-1);while(--M>=-1);C=E.getChanges()}return this.ConcatenateChanges(w,C)},e.prototype.ComputeRecursionPoint=function(e,t,i,s,a,u,l){var c,d,h,p=0,f=0,g=0,m=0;e--,i--,a[0]=0,u[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var v=t-e+(s-i),y=v+1,_=new Array(y),b=new Array(y),w=s-i,C=t-e,E=e-i,S=t-s,T=C-w,L=T%2===0;_[w]=e,b[C]=t,l[0]=!1;var x,M;for(h=1;v/2+1>=h;h++){var N=0,k=0;for(p=this.ClipDiagonalBound(w-h,h,w,y),f=this.ClipDiagonalBound(w+h,h,w,y),x=p;f>=x;x+=2){for(c=x===p||f>x&&_[x-1]<_[x+1]?_[x+1]:_[x-1]+1,d=c-(x-w)-E,M=c;t>c&&s>d&&this.ElementsAreEqual(c+1,d+1);)c++,d++;if(_[x]=c,c+d>N+k&&(N=c,k=d),!L&&Math.abs(x-C)<=h-1&&c>=b[x])return a[0]=c,u[0]=d,M<=b[x]&&o>0&&o+1>=h?this.WALKTRACE(w,p,f,E,C,g,m,S,_,b,c,t,a,d,s,u,L,l):null}var I=(N-e+(k-i)-h)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(N,this.OriginalSequence,I))return l[0]=!0,a[0]=N,u[0]=k,I>0&&o>0&&o+1>=h?this.WALKTRACE(w,p,f,E,C,g,m,S,_,b,c,t,a,d,s,u,L,l):(e++,i++,[new n.DiffChange(e,t-e+1,i,s-i+1)]);for(g=this.ClipDiagonalBound(C-h,h,C,y),m=this.ClipDiagonalBound(C+h,h,C,y),x=g;m>=x;x+=2){for(c=x===g||m>x&&b[x-1]>=b[x+1]?b[x+1]-1:b[x-1],d=c-(x-C)-S,M=c;c>e&&d>i&&this.ElementsAreEqual(c,d);)c--,d--;if(b[x]=c,L&&Math.abs(x-w)<=h&&c<=_[x])return a[0]=c,u[0]=d,M>=_[x]&&o>0&&o+1>=h?this.WALKTRACE(w,p,f,E,C,g,m,S,_,b,c,t,a,d,s,u,L,l):null}if(o>=h){var O=new Array(f-p+2);O[0]=w-p+1,r.Copy(_,p,O,1,f-p+1),this.m_forwardHistory.push(O),O=new Array(m-g+2),O[0]=C-g+1,r.Copy(b,g,O,1,m-g+1),this.m_reverseHistory.push(O)}}return this.WALKTRACE(w,p,f,E,C,g,m,S,_,b,c,t,a,d,s,u,L,l)},e.prototype.ConcatenateChanges=function(e,t){var n=[],i=null;return 0===e.length||0===t.length?t.length>0?t:e:this.ChangesOverlap(e[e.length-1],t[0],n)?(i=new Array(e.length+t.length-1),r.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],r.Copy(t,1,i,e.length,t.length-1),i):(i=new Array(e.length+t.length),r.Copy(e,0,i,0,e.length),r.Copy(t,0,i,e.length,t.length),i)},e.prototype.ChangesOverlap=function(e,t,r){if(i.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),i.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),r[0]=new n.DiffChange(o,s,a,u),!0}return r[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,n,i){if(e>=0&&i>e)return e;var r=n,o=i-n-1,s=t%2===0;if(0>e){var a=r%2===0;return s===a?0:1}var u=o%2===0;return s===u?i-1:i-2},e}();t.LcsDiff=a}),define("vs/base/ui/scrollbar/impl/common",["require","exports"],function(e,t){function n(e){switch(e){case"hidden":return i.Hidden;case"visible":return i.Visible;default:return i.Auto}}!function(e){e[e.Auto=0]="Auto",e[e.Hidden=1]="Hidden",e[e.Visible=2]="Visible"}(t.Visibility||(t.Visibility={}));var i=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/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;u<a.length;u++)this.hooks.push(i.addDisposableThrottledListener(a[u].window.document,"mousemove",function(e){return s.mouseMoveCallback(e)},function(e,t){return s.mouseMoveEventMerger(e,t)})),this.hooks.push(i.addDisposableListener(a[u].window.document,"mouseup",function(){return s.stopMonitoring(!0)}));if(o.hasDifferentOriginAncestor()){var l=a[a.length-1];this.hooks.push(i.addDisposableListener(l.window.document,"mouseout",function(e){var t=new r.StandardMouseEvent(e);"html"===t.target.tagName.toLowerCase()&&s.stopMonitoring(!0)})),this.hooks.push(i.addDisposableListener(l.window.document,"mouseover",function(e){var t=new r.StandardMouseEvent(e);"html"===t.target.tagName.toLowerCase()&&s.stopMonitoring(!0)})),this.hooks.push(i.addDisposableListener(l.window.document.body,"mouseleave",function(){s.stopMonitoring(!0)}))}}},e}();t.GlobalMouseMoveMonitor=a}),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","vs/base/env"],function(e,t,n,i,r,o,s,a){function u(e){return e+"px"}function l(e,t,n,i,r){null!==t&&(e.style.top=u(t)),null!==n&&(e.style.left=u(n)),null!==i&&(e.style.bottom=u(i)),null!==r&&(e.style.right=u(r))}function c(e,t,n){null!==t&&(e.style.width=u(t)),null!==n&&(e.style.height=u(n))}var d=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.computedSliderSize<e.MINIMUM_SLIDER_SIZE){var t=(e.MINIMUM_SLIDER_SIZE-this.computedSliderSize)/2;this.computedSliderSize=e.MINIMUM_SLIDER_SIZE,this.computedSliderPosition-=t,this.computedSliderPosition+this.computedSliderSize>this.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=d;var h=function(){function e(e,t,i,r,o,a,u,d,h){var p=this;this.parent=h,this.mouseWheelEventFactory=d,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",c(this.bgDomNode,a,u),l(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",c(this.domNode,f.ARROW_IMG_SIZE,f.ARROW_IMG_SIZE),l(this.domNode,t,i,r,o),this.mouseMoveMonitor=new s.GlobalMouseMoveMonitor,this.toDispose=[],this.toDispose.push(n.addDisposableListener(this.bgDomNode,"mousedown",function(e){return p._arrowMouseDown(e)})),this.toDispose.push(n.addDisposableListener(this.domNode,"mousedown",function(e){return p._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}(),p=function(){function e(e,t,n){this._revealTimeout=-1,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),-1!==this._revealTimeout&&(window.clearTimeout(this._revealTimeout),this._revealTimeout=-1)},e.prototype.applyVisibilitySetting=function(e){return this.visibility===r.Visibility.Hidden?!1:this.visibility===r.Visibility.Visible?!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.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,-1===this._revealTimeout&&(this._revealTimeout=window.setTimeout(function(){e._revealTimeout=-1,e.domNode.className=e.visibleClassName},0)),-1!==this.fadeAwayTimeout&&(window.clearTimeout(this.fadeAwayTimeout),this.fadeAwayTimeout=-1))},e.prototype._hide=function(e){-1!==this._revealTimeout&&(window.clearTimeout(this._revealTimeout),this._revealTimeout=-1),this.isVisible&&(this.isVisible=!1,this.domNode.className=this.invisibleClassName+(e?" fade":""))},e}(),f=function(){function e(e,t,n,i){this.parent=e,this.scrollbarState=t,this.visibilityController=new p(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"),a.browser.canUseTranslate3d&&(this.domNode.style.transform="translate3d(0px, 0px, 0px)"),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 h(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,r,o){var s=this;this.slider=document.createElement("div"),this.slider.className="slider",this.slider.style.position="absolute",l(this.slider,e,t,null,null),c(this.slider,r,o),this.domNode.appendChild(this.slider),this.toDispose.push(n.addDisposableListener(this.slider,"mousedown",function(e){return s._sliderMouseDown(new i.StandardMouseEvent(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(t)},e.prototype.delegateMouseDown=function(e){var t=new i.StandardMouseEvent(e),n=this.domNode.getClientRects()[0].top,r=n+this.scrollbarState.getSliderPosition(),o=n+this.scrollbarState.getSliderPosition()+this.scrollbarState.getSliderSize(),s=this._sliderMousePosition(t);s>=r&&o>=s?this._sliderMouseDown(t):this._onMouseDown(t)},e.prototype._onMouseDown=function(e){var t=n.getDomNodePosition(this.domNode),i=this._mouseDownRelativePosition(e,t)-this.scrollbarState.getArrowSize()-this.scrollbarState.getSliderSize()/2;this.setDesiredScrollPosition(this.scrollbarState.convertSliderPositionToScrollPosition(i)),this._sliderMouseDown(e)},e.prototype._sliderMouseDown=function(e){var t=this;if(e.leftButton){var i=this._sliderMousePosition(e)-this.scrollbarState.getSliderPosition();n.toggleClass(this.slider,"active",!0),this.mouseMoveMonitor.startMonitoring(s.standardMouseMoveMerger,function(e){var n=t._sliderMousePosition(e)-i;t.setDesiredScrollPosition(t.scrollbarState.convertSliderPositionToScrollPosition(n))},function(){n.toggleClass(t.slider,"active",!1),t.parent.onDragEnd()}),e.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=f});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","vs/base/dom/dom","vs/base/ui/scrollbar/impl/common","vs/base/env"],function(e,t,n,i,r,o,s){var a=function(e){function t(t,i,r){var s=this,a=new n.ScrollbarState(r.horizontalHasArrows?r.arrowSize:0,r.horizontal===o.Visibility.Hidden?0:r.horizontalScrollbarSize,r.vertical===o.Visibility.Hidden?0:r.verticalScrollbarSize);if(e.call(this,i,a,r.horizontal,"horizontal"),this.scrollable=t,this._createDomNode(),r.horizontalHasArrows){var u=(r.arrowSize-n.AbstractScrollbar.ARROW_IMG_SIZE)/2,l=(r.horizontalScrollbarSize-n.AbstractScrollbar.ARROW_IMG_SIZE)/2;this._createArrow("left-arrow",l,u,null,null,r.arrowSize,r.horizontalScrollbarSize,function(){return s._createMouseWheelEvent(1)}),this._createArrow("right-arrow",l,null,null,u,r.arrowSize,r.horizontalScrollbarSize,function(){return s._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.StyleMutator.setWidth(this.slider,e),s.browser.canUseTranslate3d?r.StyleMutator.setTransform(this.slider,"translate3d("+t+"px, 0px, 0px)"):r.StyleMutator.setLeft(this.slider,t)},t.prototype._renderDomNode=function(e,t){r.StyleMutator.setWidth(this.domNode,e),r.StyleMutator.setHeight(this.domNode,t),r.StyleMutator.setLeft(this.domNode,0),r.StyleMutator.setBottom(this.domNode,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=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/base/ui/scrollbar/impl/verticalScrollbar",["require","exports","vs/base/ui/scrollbar/impl/abstractScrollbar","vs/base/dom/mouseEvent","vs/base/dom/dom","vs/base/ui/scrollbar/impl/common","vs/base/env"],function(e,t,n,i,r,o,s){var a=function(e){function t(t,i,r){var s=this,a=new n.ScrollbarState(r.verticalHasArrows?r.arrowSize:0,r.vertical===o.Visibility.Hidden?0:r.verticalScrollbarSize,r.horizontal===o.Visibility.Hidden?0:r.horizontalScrollbarSize);if(e.call(this,i,a,r.vertical,"vertical"),this.scrollable=t,this._createDomNode(),r.verticalHasArrows){var u=(r.arrowSize-n.AbstractScrollbar.ARROW_IMG_SIZE)/2,l=(r.verticalScrollbarSize-n.AbstractScrollbar.ARROW_IMG_SIZE)/2;this._createArrow("up-arrow",u,l,null,null,r.verticalScrollbarSize,r.arrowSize,function(){return s._createMouseWheelEvent(1)}),this._createArrow("down-arrow",null,l,u,null,r.verticalScrollbarSize,r.arrowSize,function(){return s._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.StyleMutator.setHeight(this.slider,e),s.browser.canUseTranslate3d?r.StyleMutator.setTransform(this.slider,"translate3d(0px, "+t+"px, 0px)"):r.StyleMutator.setTop(this.slider,t)},t.prototype._renderDomNode=function(e,t){r.StyleMutator.setWidth(this.domNode,t),r.StyleMutator.setHeight(this.domNode,e),r.StyleMutator.setRight(this.domNode,0),r.StyleMutator.setTop(this.domNode,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=a}),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._mouseWheelToDispose=[],this._setListeningToMouseWheel(this.options.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._mouseWheelToDispose=l.disposeAll(this._mouseWheelToDispose),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){this.verticalScrollbar.delegateMouseDown(e)},e.prototype.onElementDimensions=function(e){var t=this;void 0===e&&(e=!1),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){var t=this;void 0===e&&(e=!1),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.isMacintosh&&(this.options.className+=" mac"),this.domNode.className="monaco-scrollable-element "+this.options.className},e.prototype.updateOptions=function(e){var t=this._createOptions(e);this.options.handleMouseWheel=t.handleMouseWheel,this._setListeningToMouseWheel(this.options.handleMouseWheel)},e.prototype._setListeningToMouseWheel=function(e){var t=this,r=this._mouseWheelToDispose.length>0;if(r!==e&&(this._mouseWheelToDispose=l.disposeAll(this._mouseWheelToDispose),e)){var o=function(e){var n=new i.StandardMouseWheelEvent(e);t.onMouseWheel(n)};this._mouseWheelToDispose.push(n.addDisposableListener(this.listenOnDomNode,"mousewheel",o)),this._mouseWheelToDispose.push(n.addDisposableListener(this.listenOnDomNode,"DOMMouseScroll",o))}},e.prototype.onMouseWheel=function(e){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.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/base/ui/widgets/tree/treeView",["require","exports","./tree","vs/base/env","vs/base/bits/hash","vs/base/lib/winjs.base","vs/base/dom/dom","vs/base/types","vs/base/eventEmitter","vs/base/diff/diff","vs/base/dom/touch","vs/base/dom/mouseEvent","vs/base/dom/keyboardEvent","vs/base/ui/scrollbar/impl/scrollableElement"],function(e,t,n,i,r,o,s,a,u,l,c,d,h,p){function f(e,t){return e||t?e&&t?e.accept!==t.accept?!1:e.bubble!==t.bubble?!1:e.effect!==t.effect?!1:!0:!1:!0}var g=function(){function e(e,t,n){void 0===t&&(t=0),void 0===n&&(n=e.length),this.items=e,this.start=t,this.end=n,this.index=t-1}return e.prototype.next=function(){return this.index=Math.min(this.index+1,this.end),this.index===this.end?null:this.items[this.index]},e}();t.ArrayIterator=g;var m=function(){function e(e){this.elements=e}return e.prototype.update=function(){},e.prototype.getData=function(){return this.elements},e}();t.ElementsDragAndDropData=m;var v=function(){function e(e){this.url=e}return e.prototype.update=function(){},e.prototype.getData=function(){return this.url},e}();t.ExternalDragAndDropData=v;var y=function(){function e(){this.types=[],this.files=[]}return e.prototype.update=function(e){e.dataTransfer.types&&(this.types=[],Array.prototype.push.apply(this.types,e.dataTransfer.types)),e.dataTransfer.files&&(this.files=[],Array.prototype.push.apply(this.files,e.dataTransfer.files),this.files=this.files.filter(function(e){return e.size||e.type}))},e.prototype.getData=function(){return{types:this.types,files:this.files}},e}();t.DesktopDragAndDropData=y;var _=function(){function e(e,t,n){this.context=e,this.model=t,this.id=this.model.id,this.top=n,this.height=t.getHeight(),this._styles={},t.isExpanded()&&this.addClass("expanded")}return Object.defineProperty(e.prototype,"expanded",{set:function(e){e?this.addClass("expanded"):this.removeClass("expanded")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loading",{set:function(e){e?this.addClass("loading"):this.removeClass("loading")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"draggable",{get:function(){return this._draggable},set:function(e){this._draggable=e,this.render(!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dropTarget",{set:function(e){e?this.addClass("drop-target"):this.removeClass("drop-target")},enumerable:!0,configurable:!0}),e.prototype.addClass=function(e){this._styles[e]=!0,this.render(!0)},e.prototype.removeClass=function(e){delete this._styles[e],this.render(!0)},e.prototype.render=function(e){var t=this;if(void 0===e&&(e=!1),this.row){var n=["row"];n.push.apply(n,Object.keys(this._styles)),this.model.hasChildren()&&n.push("has-children"),this.row.className=n.join(" "),this.row.draggable=this.draggable,this.row.style.height=this.height+"px",this.row.style.paddingLeft=this.context.options.twistiePixels+(this.model.getDepth()-1)*this.context.options.indentPixels+"px";var i=this.context.dnd.getDragURI(this.context.tree,this.model.getElement());i!==this.uri&&(this.unbindDragStart&&(this.unbindDragStart(),delete this.unbindDragStart),i?(this.uri=i,this.draggable=!0,this.unbindDragStart=s.addListener(this.row,"dragstart",function(e){t.onDragStart(e)})):this.uri=null),e||(this.renderCleanupFn=this.context.renderer.render(this.context.tree,this.model.getElement(),this.row.firstChild,this.renderCleanupFn))}},e.prototype.insertInDOM=function(e,t){if(!this.row){var n=document.createElement("div");n.className="content",this.row=document.createElement("div"),this.row[C.BINDING]=this,this.row.appendChild(n)}this.row.parentElement||(null===t?e.appendChild(this.row):e.insertBefore(this.row,t),this.render())},e.prototype.removeFromDOM=function(){if(this.row){this.unbindDragStart&&(this.unbindDragStart(),this.unbindDragStart=null),this.renderCleanupFn&&this.renderCleanupFn(this.context.tree,this.model.getElement()),this.uri=null;try{this.row.parentElement.removeChild(this.row)}catch(e){}this.row=null}},e.prototype.dispose=function(){this.renderCleanupFn=null,this.row=null,this.model=null},e}();t.ViewItem=_;var b=function(e){function t(t,n,i){e.call(this,t,n,0),this.row=i}return __extends(t,e),t.prototype.render=function(){if(this.row){var e=["monaco-vtree-wrapper"];e.push.apply(e,Object.keys(this._styles)),this.model.hasChildren()&&e.push("has-children"),this.row.className=e.join(" ")}},t.prototype.insertInDOM=function(){},t.prototype.removeFromDOM=function(){},t}(_),w=function(e){function t(t){e.call(this),this.context=t,this.heightMap=[],this.indexes={}}return __extends(t,e),t.prototype.getTotalHeight=function(){var e=this.heightMap[this.heightMap.length-1];return e?e.top+e.height:0},t.prototype.onInsertItems=function(e,t){void 0===t&&(t=null);var n,i,r,o,s,u=a.isArray(e)?new g(e):e,l=0;if(null===t)r=0,s=0;else{if(r=this.indexes[t]+1,i=this.heightMap[r-1],!i){var c=new Error("Tree error, onInsertItems: viewItem doesn't exist.");throw c.data=this.getDebugData(r-1),c}s=i.top+i.height}for(var d=this.heightMap.splice.bind(this.heightMap,r,0),h=[];n=u.next();)i=new _(this.context,n,s+l),this.emit("viewItem:create",{item:i.model}),this.indexes[n.id]=r++,h.push(i),l+=i.height;for(d.apply(this.heightMap,h),o=r;o<this.heightMap.length;o++)i=this.heightMap[o],i.top+=l,this.indexes[i.id]=o;for(o=h.length-1;o>=0;o--)this.onInsertItem(h[o]);for(o=this.heightMap.length-1;o>=r;o--)this.onRefreshItem(this.heightMap[o]);return l},t.prototype.onInsertItem=function(){},t.prototype.onRemoveItems=function(e){for(var t,n,i,r=a.isArray(e)?new g(e):e,o=null,s=0;t=r.next();){if(t=t.id||t,i=this.indexes[t],n=this.heightMap[i],!n){var u=new Error("Tree error, onRemoveItems: viewItem doesn't exist.");throw u.data=this.getDebugData(i),u}s-=n.height,delete this.indexes[t],this.onRemoveItem(n),null===o&&(o=i)}if(0!==s)for(this.heightMap.splice(o,i-o+1),i=o;i<this.heightMap.length;i++)n=this.heightMap[i],n.top+=s,this.indexes[n.id]=i,this.onRefreshItem(n)},t.prototype.onRemoveItem=function(){},t.prototype.onRefreshItemSet=function(e){var t=this;this.onRefreshItems(e.sort(function(e,n){return t.indexes[e.id]-t.indexes[n.id]}))},t.prototype.onRefreshItems=function(e){for(var t,n,i,r,o=a.isArray(e)?new g(e):e,s=null,u=0;t=o.next();){for(r=this.indexes[t.id];0!==u&&null!==s&&r>s;s++)n=this.heightMap[s],n.top+=u,this.onRefreshItem(n);n=this.heightMap[r],i=t.getHeight(),n.top+=u,u+=i-n.height,n.height=i,this.onRefreshItem(n,!0),s=r+1}if(0!==u&&null!==s)for(;s<this.heightMap.length;s++)n=this.heightMap[s],n.top+=u,this.onRefreshItem(n)},t.prototype.onRefreshItem=function(e,t){void 0===t&&(t=!1)},t.prototype.itemsCount=function(){return this.heightMap.length},t.prototype.itemAt=function(e){return this.heightMap[this.indexAt(e)].id},t.prototype.withItemsInRange=function(e,t,n){e=this.indexAt(e),t=this.indexAt(t);for(var i=e;t>=i;i++)n(this.heightMap[i].id)},t.prototype.indexAt=function(e){for(var t,n,i=0,r=this.heightMap.length;r>i;)if(t=Math.floor((i+r)/2),n=this.heightMap[t],e<n.top)r=t;else{if(!(e>=n.top+n.height))return t;if(i===t)break;i=t}return this.heightMap.length},t.prototype.indexAfter=function(e){return Math.min(this.indexAt(e)+1,this.heightMap.length)},t.prototype.itemAtIndex=function(e){return this.heightMap[e]},t.prototype.itemAfter=function(e){return this.heightMap[this.indexes[e.id]+1]||null},t.prototype.getDebugData=function(e){var t=this,n={};Object.keys(this.indexes).forEach(function(e){n[r.SHA1.digest(e)]=t.indexes[e]});var i=this.heightMap.map(function(e){return{id:r.SHA1.digest(e.id),top:e.top,height:e.height}});return{i:e,indexes:n,heightMap:i}},t.prototype.dispose=function(){this.heightMap=null,this.indexes=null},t}(u.EventEmitter);t.HeightMap=w;var C=function(e){function t(t,n){var r=this;e.call(this,t),this.lastClickTimeStamp=0,this.isRefreshing=!1,this.refreshingPreviousChildrenIds={},this.treeContext=t,this.modelListeners=[],this.viewListeners=[],this.dragAndDropListeners=[],this.model=null,this.items={},this.domNode=document.createElement("div"),this.domNode.className="monaco-vtree",this.domNode.tabIndex=0,this.treeContext.options.alwaysFocused&&s.addClass(this.domNode,"focused"),this.treeContext.options.bare&&s.addClass(this.domNode,"bare"),this.wrapper=document.createElement("div"),this.wrapper.className="monaco-vtree-wrapper",this.scrollableElement=new p.ScrollableElement(this.wrapper,{scrollable:this,horizontal:"hidden",vertical:t.options.verticalScrollMode||"auto",useShadows:t.options.useShadows}),i.browser.isIE11orEarlier?(this.wrapper.style.msTouchAction="none",this.wrapper.style.msContentZooming="none"):this.wrapperGesture=new c.Gesture(this.wrapper),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="rows",this.fakeRow=document.createElement("div"),this.fakeRow.className="row fake",this.fakeContent=document.createElement("div"),this.fakeContent.className="content",this.fakeRow.appendChild(this.fakeContent),this.rowsContainer.appendChild(this.fakeRow);var o=s.trackFocus(this.domNode);o.addFocusListener(function(e){return r.onFocus(e)}),o.addBlurListener(function(e){return r.onBlur(e)}),this.viewListeners.push(function(){o.dispose()}),this.viewListeners.push(s.addListener(this.domNode,"keydown",function(e){return r.onKeyDown(e)})),this.viewListeners.push(s.addListener(this.domNode,"keyup",function(e){return r.onKeyUp(e)})),this.viewListeners.push(s.addListener(this.domNode,"mousedown",function(e){return r.onMouseDown(e)})),this.viewListeners.push(s.addListener(this.domNode,"mouseup",function(e){return r.onMouseUp(e)})),this.viewListeners.push(s.addListener(this.wrapper,"click",function(e){return r.onClick(e)})),this.viewListeners.push(s.addListener(this.domNode,"contextmenu",function(e){return r.onContextMenu(e)})),this.viewListeners.push(s.addListener(this.wrapper,c.EventType.Tap,function(e){return r.onTap(e)})),this.viewListeners.push(s.addListener(this.wrapper,c.EventType.Change,function(e){return r.onTouchChange(e)})),i.browser.isIE11orEarlier&&(this.viewListeners.push(s.addListener(this.wrapper,"MSPointerDown",function(e){return r.onMsPointerDown(e)})),this.viewListeners.push(s.addListener(this.wrapper,"MSGestureTap",function(e){return r.onMsGestureTap(e)})),this.viewListeners.push(s.addThrottledListener(this.wrapper,"MSGestureChange",function(e){return r.onThrottledMsGestureChange(e)},function(e,t){t.stopPropagation(),t.preventDefault();var n={translationY:t.translationY,translationX:t.translationX};return e&&(n.translationY+=e.translationY,n.translationX+=e.translationX),n}))),this.viewListeners.push(s.addListener(window,"dragover",function(e){return r.onDragOver(e)})),this.viewListeners.push(s.addListener(window,"drop",function(e){return r.onDrop(e)})),this.viewListeners.push(s.addListener(window,"dragend",function(e){return r.onDragEnd(e)})),this.viewListeners.push(s.addListener(window,"dragleave",function(e){return r.onDragOver(e)})),this.wrapper.appendChild(this.rowsContainer),this.domNode.appendChild(this.scrollableElement.getDomNode()),n.appendChild(this.domNode),this._scrollTop=0,this._viewHeight=0,this.renderTop=0,this.renderHeight=0,this.didJustPressContextMenuKey=!1,this.currentDropTarget=null,this.currentDropTargets=[],this.shouldInvalidateDropReaction=!1,this.dragAndDropScrollInterval=null,this.dragAndDropScrollTimeout=null,this.onHiddenScrollTop=null,this.onRowsChanged(),this.layout(),this.setupMSGesture()}return __extends(t,e),t.prototype.getHTMLElement=function(){return this.domNode},t.prototype.focus=function(){this.domNode.focus()},t.prototype.isFocused=function(){return document.activeElement===this.domNode},t.prototype.blur=function(){this.domNode.blur()},t.prototype.onVisible=function(){this.scrollTop=this.onHiddenScrollTop,this.onHiddenScrollTop=null,this.scrollableElement.onElementDimensions(),this.scrollableElement.onElementInternalDimensions(),this.setupMSGesture()},t.prototype.setupMSGesture=function(){var e=this;window.MSGesture&&(this.msGesture=new MSGesture,setTimeout(function(){return e.msGesture.target=e.wrapper},100))},t.prototype.onHidden=function(){this.onHiddenScrollTop=this.scrollTop},t.prototype.isTreeVisible=function(){return null===this.onHiddenScrollTop},t.prototype.layout=function(e){this.isTreeVisible()&&(this.viewHeight=e||s.getContentHeight(this.wrapper),this.scrollTop=this.scrollTop,this.scrollableElement.onElementDimensions(),this.scrollableElement.onElementInternalDimensions())},t.prototype.render=function(e,t){var n,i,r=e+t,o=this.scrollTop+this.viewHeight,s=e;s=Math.max(s,0);var a=r,u=0===o?0:o;for(n=this.indexAfter(a)-1,i=this.indexAt(Math.max(u,s));n>=i;n--)this.insertItemInDOM(this.itemAtIndex(n));for(n=Math.min(this.indexAt(this.renderTop),this.indexAfter(a))-1,i=this.indexAt(s);n>=i;n--)this.insertItemInDOM(this.itemAtIndex(n));for(n=this.indexAt(this.renderTop),i=Math.min(this.indexAt(s),this.indexAfter(u));i>n;n++)this.removeItemFromDOM(this.itemAtIndex(n));for(n=Math.max(this.indexAfter(a),this.indexAt(this.renderTop)),i=this.indexAfter(u);i>n;n++)this.removeItemFromDOM(this.itemAtIndex(n));var l=this.itemAtIndex(this.indexAt(s));l&&(this.rowsContainer.style.top=l.top-s+"px"),this.renderTop=s,this.renderHeight=a-s},t.prototype.setModel=function(e){var t=this;this.releaseModel(),this.model=e,this.modelListeners.push(this.model.addBulkListener(function(e){return t.onModelEvents(e)}))},t.prototype.onModelEvents=function(e){for(var t=[],n=0,i=e.length;i>n;n++){var r=e[n],o=r.getData();switch(r.getType()){case"refreshing":this.onRefreshing();break;case"refreshed":this.onRefreshed();break;case"clearingInput":this.onClearingInput(o);break;case"setInput":this.onSetInput(o);break;case"item:childrenRefreshing":this.onItemChildrenRefreshing(o);break;case"item:childrenRefreshed":this.onItemChildrenRefreshed(o);break;case"item:refresh":t.push(o.item);break;case"item:expanding":this.onItemExpanding(o);break;case"item:expanded":this.onItemExpanded(o);break;case"item:collapsing":this.onItemCollapsing(o);break;case"item:reveal":this.onItemReveal(o);break;case"item:addTrait":this.onItemAddTrait(o);break;case"item:removeTrait":this.onItemRemoveTrait(o)}}t.length>0&&this.onItemsRefresh(t)},t.prototype.onRefreshing=function(){this.isRefreshing=!0},t.prototype.onRefreshed=function(){this.isRefreshing=!1,this.onRowsChanged()},t.prototype.onRowsChanged=function(e){void 0===e&&(e=this.scrollTop),this.isRefreshing||(this.scrollTop=e,this.scrollableElement.onElementInternalDimensions())},t.prototype.withFakeRow=function(e){return e(this.fakeContent)},t.prototype.focusNextPage=function(e){var t=this,n=this.indexAt(this.scrollTop+this.viewHeight);n=0===n?0:n-1;var i=this.itemAtIndex(n).model.getElement(),r=this.model.getFocus();if(r!==i)this.model.setFocus(i,e);else{var o=this.scrollTop;this.scrollTop+=this.viewHeight,this.scrollTop!==o&&setTimeout(function(){t.focusNextPage(e)},0)}},t.prototype.focusPreviousPage=function(e){var t,n=this;t=0===this.scrollTop?this.indexAt(this.scrollTop):this.indexAfter(this.scrollTop-1);var i=this.itemAtIndex(t).model.getElement(),r=this.model.getFocus();if(r!==i)this.model.setFocus(i,e);else{var o=this.scrollTop;this.scrollTop-=this.viewHeight,this.scrollTop!==o&&setTimeout(function(){n.focusPreviousPage(e)},0)}},Object.defineProperty(t.prototype,"viewHeight",{get:function(){return this._viewHeight},set:function(e){this.render(this.scrollTop,e),this._viewHeight=e},enumerable:!0,configurable:!0}),t.prototype.getScrollHeight=function(){return this.getTotalHeight()},t.prototype.getScrollWidth=function(){return 0},t.prototype.getScrollLeft=function(){return 0},t.prototype.setScrollLeft=function(){},Object.defineProperty(t.prototype,"scrollTop",{get:function(){return this._scrollTop},set:function(e){this.setScrollTop(e)},enumerable:!0,configurable:!0}),t.prototype.getScrollTop=function(){return this._scrollTop},t.prototype.setScrollTop=function(e){e=Math.min(e,this.getTotalHeight()-this.viewHeight),e=Math.max(e,0),this.render(e,this.viewHeight),this._scrollTop=e,this.emit("scroll",{vertical:!0,horizontal:!1})},t.prototype.addScrollListener=function(e){return this.addListener2("scroll",e)},t.prototype.onClearingInput=function(e){var t=e.item;t&&(this.onRemoveItems(t.getNavigator()),this.onRowsChanged())},t.prototype.onSetInput=function(e){this.inputItem=new b(this.treeContext,e.item,this.wrapper),this.emit("viewItem:create",{item:this.inputItem.model})},t.prototype.onItemChildrenRefreshing=function(e){var n=e.item,i=this.items[n.id];if(i&&(i.loadingPromise=o.Promise.timeout(t.LOADING_DECORATION_DELAY).then(function(){i.loadingPromise=null,i.loading=!0})),!e.isNested){for(var r,s=[],a=n.getNavigator();r=a.next();)s.push(r.id);this.refreshingPreviousChildrenIds[n.id]=s}},t.prototype.onItemChildrenRefreshed=function(e){var t=this,n=e.item,i=this.items[n.id];if(i&&(i.loadingPromise&&(i.loadingPromise.cancel(),i.loadingPromise=null),i.loading=!1),!e.isNested){for(var r,o=this.refreshingPreviousChildrenIds[n.id],s=[],a=n.getNavigator();r=a.next();)s.push(r);var u=new l.LcsDiff({getLength:function(){return o.length},getElementHash:function(e){return o[e]}},{getLength:function(){return s.length},getElementHash:function(e){return s[e].id}},null),c=u.ComputeDiff(),d=c.some(function(e){if(e.modifiedLength>0)for(var n=e.modifiedStart,i=e.modifiedStart+e.modifiedLength;i>n;n++)if(t.items.hasOwnProperty(s[n].id))return!0;return!1});if(d)c.length&&(this.onRemoveItems(o),this.onInsertItems(s));else for(var h=0,p=c.length;p>h;h++){var f=c[h];if(f.originalLength>0&&this.onRemoveItems(new g(o,f.originalStart,f.originalStart+f.originalLength)),f.modifiedLength>0){var m=s[f.modifiedStart-1]||n;m=m.getDepth()>0?m:null,this.onInsertItems(new g(s,f.modifiedStart,f.modifiedStart+f.modifiedLength),m?m.id:null)}}c.length&&this.onRowsChanged()}},t.prototype.onItemsRefresh=function(e){var t=this;e=e.filter(function(e){return t.items.hasOwnProperty(e.id)}),this.onRefreshItemSet(e),this.onRowsChanged()},t.prototype.onItemExpanding=function(e){var t=this.items[e.item.id];t&&(t.expanded=!0)},t.prototype.onItemExpanded=function(e){var t=e.item,n=this.items[t.id];if(n){n.expanded=!0;var i=this.onInsertItems(t.getNavigator(),t.id),r=this.scrollTop;n.top+n.height<=this.scrollTop&&(r+=i),this.onRowsChanged(r)}},t.prototype.onItemCollapsing=function(e){var t=e.item,n=this.items[t.id];n&&(n.expanded=!1,this.onRemoveItems(t.getNavigator()),this.onRowsChanged())},t.prototype.onItemReveal=function(e){var t=e.item,n=e.relativeTop,i=this.items[t.id];if(i)if(null!==n){n=0>n?0:n,n=n>1?1:n;var r=i.height-this.viewHeight;this.scrollTop=r*n+i.top}else{var o=i.top+i.height,s=this.scrollTop+this.viewHeight;i.top<this.scrollTop?this.scrollTop=i.top:o>=s&&(this.scrollTop=o-this.viewHeight)}},t.prototype.onItemAddTrait=function(e){var t=e.item,n=e.trait,i=this.items[t.id];i&&i.addClass(n),"highlighted"===n&&(s.addClass(this.domNode,n),i&&(this.highlightedItemWasDraggable=!!i.draggable,i.draggable&&(i.draggable=!1)))},t.prototype.onItemRemoveTrait=function(e){var t=e.item,n=e.trait,i=this.items[t.id];i&&i.removeClass(n),"highlighted"===n&&(s.removeClass(this.domNode,n),this.highlightedItemWasDraggable&&(i.draggable=!0),delete this.highlightedItemWasDraggable)},t.prototype.onInsertItem=function(e){var t=this;e.onDragStart=function(n){t.onDragStart(e,n)},e.needsRender=!0,this.refreshViewItem(e),this.items[e.id]=e},t.prototype.onRefreshItem=function(e,t){void 0===t&&(t=!1),e.needsRender=e.needsRender||t,this.refreshViewItem(e)},t.prototype.onRemoveItem=function(e){this.removeItemFromDOM(e),e.dispose(),this.emit("viewItem:dispose",{item:this.inputItem.model}),delete this.items[e.id]},t.prototype.refreshViewItem=function(e){e.render(),this.shouldBeRendered(e)?this.insertItemInDOM(e):this.removeItemFromDOM(e)},t.prototype.onClick=function(e){if(!this.lastPointerType||"mouse"===this.lastPointerType){var t=new d.StandardMouseEvent(e),n=this.getItemAround(t.target);n&&(i.browser.isIE10orLater&&Date.now()-this.lastClickTimeStamp<300&&(t.detail=2),this.lastClickTimeStamp=Date.now(),this.treeContext.controller.onClick(this.treeContext.tree,n.model.getElement(),t))}},t.prototype.onMouseDown=function(e){if(this.didJustPressContextMenuKey=!1,this.treeContext.controller.onMouseDown&&(!this.lastPointerType||"mouse"===this.lastPointerType)){var t=new d.StandardMouseEvent(e),n=this.getItemAround(t.target);n&&this.treeContext.controller.onMouseDown(this.treeContext.tree,n.model.getElement(),t)}},t.prototype.onMouseUp=function(e){if(this.treeContext.controller.onMouseUp&&(!this.lastPointerType||"mouse"===this.lastPointerType)){var t=new d.StandardMouseEvent(e),n=this.getItemAround(t.target);n&&this.treeContext.controller.onMouseUp(this.treeContext.tree,n.model.getElement(),t)}},t.prototype.onTap=function(e){var t=this.getItemAround(e.initialTarget);t&&this.treeContext.controller.onTap(this.treeContext.tree,t.model.getElement(),e)},t.prototype.onTouchChange=function(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY},t.prototype.onContextMenu=function(e){var t,i;if(e instanceof KeyboardEvent||this.didJustPressContextMenuKey){this.didJustPressContextMenuKey=!1;var r=new h.KeyboardEvent(e);if(i=this.model.getFocus(),!i)return;var o=this.context.dataSource.getId(this.context.tree,i),a=this.items[o],u=s.getDomNodePosition(a.row);t=new n.KeyboardContextMenuEvent(u.left+u.width,u.top,r)}else{var l=new d.StandardMouseEvent(e),c=this.getItemAround(l.target);if(!c)return;i=c.model.getElement(),t=new n.MouseContextMenuEvent(l)}this.treeContext.controller.onContextMenu(this.treeContext.tree,i,t)},t.prototype.onKeyDown=function(e){var t=new h.KeyboardEvent(e);this.didJustPressContextMenuKey="ContextMenu"===t.key||t.shiftKey&&"F10"===t.key,this.didJustPressContextMenuKey&&(t.preventDefault(),t.stopPropagation()),t.target&&t.target.tagName&&"input"===t.target.tagName.toLowerCase()||this.treeContext.controller.onKeyDown(this.treeContext.tree,t)},t.prototype.onKeyUp=function(e){this.didJustPressContextMenuKey&&this.onContextMenu(e),this.didJustPressContextMenuKey=!1,this.treeContext.controller.onKeyUp(this.treeContext.tree,new h.KeyboardEvent(e))},t.prototype.onDragStart=function(e,t){this.model.getHighlight()||(t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setData("monaco:tree",e.uri),t.dataTransfer.setData("URL",e.uri),t.dataTransfer.setDragImage&&e.row&&t.dataTransfer.setDragImage(e.row,t.offsetX||6,t.offsetY||6),this.currentDragAndDropData=new m([e.model.getElement()]),this.treeContext.dnd.onDragStart(this.treeContext.tree,this.currentDragAndDropData,new d.DragMouseEvent(t)))},t.prototype.setupDragAndDropScrollInterval=function(){var e=this,t=s.getTopLeftOffset(this.wrapper).top;this.dragAndDropScrollInterval||(this.dragAndDropScrollInterval=window.setInterval(function(){if(void 0!==e.dragAndDropMouseY){var n=e.dragAndDropMouseY-t,i=0,r=e.viewHeight-35;35>n?i=Math.max(-14,.2*(n-35)):n>r&&(i=Math.min(14,.2*(n-r))),e.scrollTop+=i}},10),this.cancelDragAndDropScrollTimeout(),this.dragAndDropScrollTimeout=window.setTimeout(function(){e.cancelDragAndDropScrollInterval(),e.dragAndDropScrollTimeout=null},1e3))},t.prototype.cancelDragAndDropScrollInterval=function(){this.dragAndDropScrollInterval&&(window.clearInterval(this.dragAndDropScrollInterval),this.dragAndDropScrollInterval=null),this.cancelDragAndDropScrollTimeout()},t.prototype.cancelDragAndDropScrollTimeout=function(){this.dragAndDropScrollTimeout&&(window.clearTimeout(this.dragAndDropScrollTimeout),this.dragAndDropScrollTimeout=null)},t.prototype.onDragOver=function(e){var t=this,i=new d.DragMouseEvent(e),r=this.getItemAround(i.target);if(!r)return this.currentDropTarget&&(this.currentDropTargets.forEach(function(e){return e.dropTarget=!1}),this.currentDropTargets=[],this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null)),this.cancelDragAndDropScrollInterval(),delete this.currentDropTarget,delete this.currentDropElement,delete this.dragAndDropMouseY,!1;if(this.setupDragAndDropScrollInterval(),this.dragAndDropMouseY=i.posy,!this.currentDragAndDropData){var s=i.dataTransfer.getData("monaco:tree");if(s)this.currentDragAndDropData=new v(s);else{if(!i.dataTransfer.types)return!1;this.currentDragAndDropData=new y}}this.currentDragAndDropData.update(i);var a,u,l=r.model;do{if(a=l?l.getElement():this.model.getInput(),u=this.treeContext.dnd.onDragOver(this.treeContext.tree,this.currentDragAndDropData,a,i),!u||u.bubble!==n.DragOverBubble.BUBBLE_UP)break;l=l&&l.parent}while(l);if(!l)return delete this.currentDropElement,!1;var c=u&&u.accept;c?(this.currentDropElement=l.getElement(),i.preventDefault(),i.dataTransfer.dropEffect=u.effect===n.DragOverEffect.COPY?"copy":"move"):delete this.currentDropElement;var h=l.id===this.inputItem.id?this.inputItem:this.items[l.id];if((this.shouldInvalidateDropReaction||this.currentDropTarget!==h||!f(this.currentDropElementReaction,u))&&(this.shouldInvalidateDropReaction=!1,this.currentDropTarget&&(this.currentDropTargets.forEach(function(e){return e.dropTarget=!1}),this.currentDropTargets=[],this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null)),this.currentDropTarget=h,this.currentDropElementReaction=u,c)){if(this.currentDropTarget&&(this.currentDropTarget.dropTarget=!0,this.currentDropTargets.push(this.currentDropTarget)),u.bubble===n.DragOverBubble.BUBBLE_DOWN)for(var p,g=l.getNavigator();p=g.next();)r=this.items[p.id],r&&(r.dropTarget=!0,this.currentDropTargets.push(r));this.currentDropPromise=o.Promise.timeout(500).then(function(){return t.treeContext.tree.expand(t.currentDropElement).then(function(){t.shouldInvalidateDropReaction=!0})})}return!0},t.prototype.onDrop=function(e){if(this.currentDropElement){var t=new d.DragMouseEvent(e);t.preventDefault(),this.currentDragAndDropData.update(t),this.treeContext.dnd.drop(this.treeContext.tree,this.currentDragAndDropData,this.currentDropElement,t),this.onDragEnd(e)}this.cancelDragAndDropScrollInterval()},t.prototype.onDragEnd=function(){this.currentDropTarget&&(this.currentDropTargets.forEach(function(e){return e.dropTarget=!1}),this.currentDropTargets=[]),this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null),this.cancelDragAndDropScrollInterval(),delete this.currentDragAndDropData,delete this.currentDropElement,delete this.currentDropTarget,delete this.dragAndDropMouseY},t.prototype.onFocus=function(){this.treeContext.options.alwaysFocused||s.addClass(this.domNode,"focused")},t.prototype.onBlur=function(){this.treeContext.options.alwaysFocused||s.removeClass(this.domNode,"focused")},t.prototype.onMsPointerDown=function(e){if(this.msGesture){var t=e.pointerType;return t===(e.MSPOINTER_TYPE_MOUSE||"mouse")?(this.lastPointerType="mouse",void 0):(t===(e.MSPOINTER_TYPE_TOUCH||"touch")&&(this.lastPointerType="touch",e.stopPropagation(),e.preventDefault(),this.msGesture.addPointer(e.pointerId)),void 0)}},t.prototype.onThrottledMsGestureChange=function(e){this.scrollTop-=e.translationY},t.prototype.onMsGestureTap=function(e){e.initialTarget=document.elementFromPoint(e.clientX,e.clientY),this.onTap(e)},t.prototype.insertItemInDOM=function(e){var t=null,n=this.itemAfter(e);n&&n.row&&(t=n.row),e.insertInDOM(this.rowsContainer,t)},t.prototype.removeItemFromDOM=function(e){e.removeFromDOM()},t.prototype.shouldBeRendered=function(e){return e.top<this.renderTop+this.renderHeight&&e.top+e.height>this.renderTop},t.prototype.getItemAround=function(e){var n=this.inputItem;do{if(e[t.BINDING]&&(n=e[t.BINDING]),e===this.wrapper||e===this.domNode)return n;if(e===document.body)return null}while(e=e.parentElement)},t.prototype.releaseModel=function(){if(this.model){for(;this.modelListeners.length;)this.modelListeners.pop()();this.model=null}},t.prototype.dispose=function(){for(this.scrollableElement.destroy(),this.releaseModel(),this.modelListeners=null;this.viewListeners.length;)this.viewListeners.pop()();this.viewListeners=null,this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.domNode=null,this.wrapperGesture&&(this.wrapperGesture.dispose(),this.wrapperGesture=null),e.prototype.dispose.call(this)},t.BINDING="monaco-vtree-row",t.LOADING_DECORATION_DELAY=800,t}(w);t.TreeView=C}),define("vs/css!vs/base/ui/widgets/tree/tree",["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/base/ui/widgets/tree/treeImpl",["require","exports","vs/base/types","vs/base/ui/widgets/tree/treeDefaults","vs/base/eventEmitter","./treeModel","./treeView","vs/css!./tree"],function(e,t,n,i,r,o,s){var a=function(){function e(e,t,r){if(void 0===r&&(r={}),this.tree=e,this.configuration=t,this.options=r,!t.dataSource)throw new Error("You must provide a Data Source to the tree.");this.dataSource=t.dataSource,this.renderer=t.renderer||new i.DefaultRenderer,this.controller=t.controller||new i.DefaultController,this.dnd=t.dnd||new i.DefaultDragAndDrop,this.filter=t.filter||new i.DefaultFilter,this.sorter=t.sorter||null;var o=[this.dataSource,this.renderer,this.controller,this.dnd,this.filter,this.sorter];o.forEach(function(t){t&&n.isFunction(t.setTree)&&t.setTree(e)})}return e}();t.TreeContext=a;var u=function(e){function t(t,n,i){void 0===i&&(i={}),e.call(this),this.container=t,this.configuration=n,this.options=i,this.options.twistiePixels="number"==typeof this.options.twistiePixels?this.options.twistiePixels:32,this.options.indentPixels="number"==typeof this.options.indentPixels?this.options.indentPixels:12,this.options.alwaysFocused=this.options.alwaysFocused===!0?!0:!1,this.options.bare=this.options.bare===!0?!0:!1,this.options.useShadows=this.options.useShadows===!1?!1:!0,this.context=new a(this,n,i),this.model=new o.TreeModel(this.context),this.view=new s.TreeView(this.context,this.container),this.view.setModel(this.model),this.addEmitter(this.model),this.addEmitter(this.view)}return __extends(t,e),t.prototype.getHTMLElement=function(){return this.view.getHTMLElement()},t.prototype.layout=function(e){this.view.layout(e)},t.prototype.DOMFocus=function(){this.view.focus()},t.prototype.isDOMFocused=function(){return this.view.isFocused()},t.prototype.DOMBlur=function(){this.view.blur()
},t.prototype.onVisible=function(){this.view.onVisible()},t.prototype.onHidden=function(){this.view.onHidden()},t.prototype.setInput=function(e){return this.model.setInput(e)},t.prototype.getInput=function(){return this.model.getInput()},t.prototype.refresh=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!0),this.model.refresh(e,t)},t.prototype.refreshAll=function(e,t){return void 0===t&&(t=!0),this.model.refreshAll(e,t)},t.prototype.expand=function(e){return this.model.expand(e)},t.prototype.expandAll=function(e){return this.model.expandAll(e)},t.prototype.collapse=function(e,t){return void 0===t&&(t=!1),this.model.collapse(e)},t.prototype.collapseAll=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),this.model.collapseAll(e,t)},t.prototype.toggleExpansion=function(e){return this.model.toggleExpansion(e)},t.prototype.toggleExpansionAll=function(e){return this.model.toggleExpansionAll(e)},t.prototype.isExpanded=function(e){return this.model.isExpanded(e)},t.prototype.reveal=function(e,t){return void 0===t&&(t=null),this.model.reveal(e,t)},t.prototype.setHighlight=function(e,t){this.model.setHighlight(e,t)},t.prototype.getHighlight=function(){return this.model.getHighlight()},t.prototype.isHighlighted=function(e){return this.model.isFocused(e)},t.prototype.clearHighlight=function(e){this.model.setHighlight(null,e)},t.prototype.select=function(e,t){this.model.select(e,t)},t.prototype.selectAll=function(e,t){this.model.selectAll(e,t)},t.prototype.deselect=function(e,t){this.model.deselect(e,t)},t.prototype.deselectAll=function(e,t){this.model.deselectAll(e,t)},t.prototype.setSelection=function(e,t){this.model.setSelection(e,t)},t.prototype.isSelected=function(e){return this.model.isSelected(e)},t.prototype.getSelection=function(){return this.model.getSelection()},t.prototype.clearSelection=function(e){this.model.setSelection([],e)},t.prototype.selectNext=function(e,t){this.model.selectNext(e,t)},t.prototype.selectPrevious=function(e,t){this.model.selectPrevious(e,t)},t.prototype.selectParent=function(e){this.model.selectParent(e)},t.prototype.setFocus=function(e,t){this.model.setFocus(e,t)},t.prototype.isFocused=function(e){return this.model.isFocused(e)},t.prototype.getFocus=function(){return this.model.getFocus()},t.prototype.focusNext=function(e,t){this.model.focusNext(e,t)},t.prototype.focusPrevious=function(e,t){this.model.focusPrevious(e,t)},t.prototype.focusParent=function(e){this.model.focusParent(e)},t.prototype.focusFirst=function(e){this.model.focusFirst(e)},t.prototype.focusNth=function(e,t){this.model.focusNth(e,t)},t.prototype.focusLast=function(e){this.model.focusLast(e)},t.prototype.focusNextPage=function(e){this.view.focusNextPage(e)},t.prototype.focusPreviousPage=function(e){this.view.focusPreviousPage(e)},t.prototype.clearFocus=function(e){this.model.setFocus(null,e)},t.prototype.withFakeRow=function(e){return this.view.withFakeRow(e)},t.prototype.dispose=function(){null!==this.model&&(this.model.dispose(),this.model=null),null!==this.view&&(this.view.dispose(),this.view=null),e.prototype.dispose.call(this)},t}(r.EventEmitter);t.Tree=u}),define("vs/css!vs/base/ui/widgets/progressbar",["vs/css!vs/editor/editor.main"],{}),define("vs/base/ui/widgets/progressbar",["require","exports","vs/base/lib/winjs.base","vs/base/assert","vs/base/env","vs/base/dom/builder","vs/base/dom/dom","vs/base/uuid","vs/css!./progressbar"],function(e,t,n,i,r,o,s,a){var u="done",l="active",c="infinite",d="discrete",h="progress-container",p="progress-bit",f=o.$,g=function(){function e(e){this.toUnbind=[],this.workedVal=0,this.create(e)}return e.prototype.create=function(e){var t=this;e.div({class:h},function(e){t.element=e.clone(),e.div({class:p}).on([s.EventType.ANIMATION_START,s.EventType.ANIMATION_END,s.EventType.ANIMATION_ITERATION],function(e){switch(e.type){case s.EventType.ANIMATION_START:case s.EventType.ANIMATION_END:t.animationRunning=e.type===s.EventType.ANIMATION_START;break;case s.EventType.ANIMATION_ITERATION:t.animationStopToken&&t.animationStopToken(null)}},t.toUnbind),t.bit=e.getHTMLElement()})},e.prototype.off=function(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.removeClass(l),this.element.removeClass(c),this.element.removeClass(d),this.workedVal=0,this.totalWork=void 0},e.prototype.done=function(){return this.doDone(!0)},e.prototype.stop=function(){return this.doDone(!1)},e.prototype.doDone=function(e){var t=this;return this.element.addClass(u),this.element.hasClass(c)?(this.bit.style.opacity="0",e?n.Promise.timeout(200).then(function(){return t.off()}):this.off()):(this.bit.style.width="inherit",e?n.Promise.timeout(200).then(function(){return t.off()}):this.off()),this},e.prototype.infinite=function(){if(this.bit.style.width="2%",this.bit.style.opacity="1",this.element.removeClass(d),this.element.removeClass(u),this.element.addClass(l),this.element.addClass(c),!r.browser.hasCSSAnimationSupport()){var e=a.v4().asHex();this.currentProgressToken=e,this.manualInfinite(e)}return this},e.prototype.manualInfinite=function(e){var t=this;this.bit.style.width="5%",this.bit.style.display="inherit";var i=0,r=function(){n.Promise.timeout(50).then(function(){e===t.currentProgressToken&&(t.element.hasClass(u)?(t.bit.style.display="none",t.bit.style.left="0"):t.element.isHidden()?r():(i=(i+1)%95,t.bit.style.left=i+"%",r()))})};r()},e.prototype.total=function(e){return this.workedVal=0,this.totalWork=e,this},e.prototype.hasTotal=function(){return!isNaN(this.totalWork)},e.prototype.worked=function(e){return i.ok(!isNaN(this.totalWork),"Total work not set"),e=Number(e),i.ok(!isNaN(e),"Value is not a number"),e=Math.max(1,e),this.workedVal+=e,this.workedVal=Math.min(this.totalWork,this.workedVal),this.element.hasClass(c)&&this.element.removeClass(c),this.element.hasClass(u)&&this.element.removeClass(u),this.element.hasClass(l)||this.element.addClass(l),this.element.hasClass(d)||this.element.addClass(d),this.bit.style.width=100*(this.workedVal/this.totalWork)+"%",this},e.prototype.getContainer=function(){return f(this.element)},e.prototype.dispose=function(){for(;this.toUnbind.length;)this.toUnbind.pop()()},e}();t.ProgressBar=g}),define("vs/css!vs/base/ui/widgets/quickopen/quickopen",["vs/css!vs/editor/editor.main"],{}),define("vs/base/ui/widgets/quickopen/quickOpenWidget",["require","exports","vs/base/lib/winjs.base","vs/base/env","vs/base/ui/events","vs/base/types","vs/base/errors","vs/base/uuid","vs/base/ui/widgets/quickopen/quickOpenViewer","vs/base/ui/widgets/quickopen/quickOpenModel","vs/base/dom/builder","vs/base/ui/widgets/inputBox","vs/base/ui/widgets/tree/treeImpl","vs/base/ui/widgets/progressbar","vs/base/dom/keyboardEvent","vs/base/ui/widgets/tree/treeDefaults","vs/base/dom/dom","vs/css!./quickopen"],function(e,t,n,i,r,o,s,a,u,l,c,d,h,p,f,g,m){var v=c.$,y=!1,_=function(){function e(e,t,n,i){this.toUnbind=[],this.container=e,this.callbacks=t,this.configuration=n,this.usageLogger=i}return e.prototype.setCallbacks=function(e){this.callbacks=e},e.prototype.create=function(){var e=this;this.builder=v().div(function(t){t.on(m.EventType.KEY_DOWN,function(t){var n=new f.KeyboardEvent(t);"Escape"===n.key&&(m.EventHelper.stop(t,!0),e.hide(!0))}).on(m.EventType.FOCUS,function(){return e.gainingFocus()},null,!0).on(m.EventType.CONTEXT_MENU,function(e){return m.EventHelper.stop(e,!0)}).on(m.EventType.BLUR,function(){return e.loosingFocus()},null,!0),e.progressBar=new p.ProgressBar(t.clone()),e.progressBar.getContainer().hide(),t.div({class:"quick-open-input"},function(t){e.inputContainer=t,e.inputBox=new d.InputBox(t.getHTMLElement(),null,{placeholder:e.configuration.inputPlaceHolder||"",ariaLabel:e.configuration.inputAriaLabel}),e.inputBox.$input.on(m.EventType.KEY_DOWN,function(t){var n=new f.KeyboardEvent(t);("Tab"===n.key||"DownArrow"===n.key||"UpArrow"===n.key||"PageDown"===n.key||"PageUp"===n.key)&&(m.EventHelper.stop(t,!0),e.navigateInTree(n.key,n.shiftKey))}).on(m.EventType.KEY_UP,function(t){var n=new f.KeyboardEvent(t);if("Enter"===n.key){var r=e.getVisibleFocus();r&&e.elementSelected(r,t)}else!i.browser.isIE9||"Backspace"!==n.key&&"Delete"!==n.key||e.onType()}).on(m.EventType.INPUT,function(){e.onType()}).attr({wrap:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false"}).clone()});var n=new u.DataSource;e.renderer=new u.Renderer(e.configuration.actionProvider),e.treeContainer=t.div({class:"quick-open-tree"},function(t){e.tree=new h.Tree(t.getHTMLElement(),{dataSource:n,controller:new g.DefaultController({clickBehavior:g.ClickBehavior.ON_MOUSE_DOWN}),renderer:e.renderer,filter:new u.Filter},{twistiePixels:11,indentPixels:0,alwaysFocused:!0,verticalScrollMode:"visible"}),e.toUnbind.push(e.tree.addListener(r.EventType.FOCUS,function(t){e.elementFocused(t.focus,t)})),e.toUnbind.push(e.tree.addListener(r.EventType.SELECTION,function(t){t.selection&&t.selection.length>0&&e.elementSelected(t.selection[0],t)}))}).on(m.EventType.KEY_DOWN,function(t){var n=new f.KeyboardEvent(t);e.quickNavigateConfiguration&&(e.quickNavigateConfiguration.keybindings.some(function(e){return e.keys.some(function(e){return e===n.key})})?(m.EventHelper.stop(t,!0),e.navigateInTree(n.shiftKey?"UpArrow":"DownArrow")):("DownArrow"===n.key||"UpArrow"===n.key||"PageDown"===n.key||"PageUp"===n.key)&&(m.EventHelper.stop(t,!0),e.navigateInTree(n.key)))}).on(m.EventType.KEY_UP,function(t){var n=new f.KeyboardEvent(t);if(e.quickNavigateConfiguration&&((e.quickNavigateConfiguration.keybindings.some(function(e){return e.ctrlCmd})||e.quickNavigateConfiguration.keybindings.some(function(e){return e.winCtrl}))&&("Ctrl"===n.key||"Meta"===n.key)||"Enter"===n.key)){var i=e.getVisibleFocus();i&&e.elementSelected(i,t)}}).clone()}).addClass("quick-open-widget").addClass(i.browser.isIE10orEarlier?" no-shadow":"").build(this.container),this.layoutDimensions&&this.layout(this.layoutDimensions)},e.prototype.onType=function(){var e=this.inputBox.value;this.helpText&&(e?this.helpText.hide():this.helpText.show()),this.callbacks.onType(e)},e.prototype.navigateInTree=function(e,t){var n=this.tree.getInput()?this.tree.getInput().getEntries(!0):[],i=this.getVisibleFocus(),r=!1,o=!1;if(n.length>1&&("UpArrow"!==e||i!==n[0]&&i?"DownArrow"===e&&i===n[n.length-1]&&(this.tree.focusFirst(),r=!0):(this.tree.focusLast(),r=!0)),!r)switch(e){case"DownArrow":this.tree.focusNext();break;case"UpArrow":this.tree.focusPrevious();break;case"PageDown":this.tree.focusNextPage();break;case"PageUp":this.tree.focusPreviousPage();break;case"Tab":this.cycleThroughEntryGroups(n,i,t),o=!0}i=this.getVisibleFocus(),i&&(o?this.tree.reveal(i,0):this.tree.reveal(i))},e.prototype.cycleThroughEntryGroups=function(e,t,n){if(0!==e.length){var i=t?e.indexOf(t):-1;if(i>=0)if(n)for(var r=i-1;r>=0;r--){var o=e[r];if(o instanceof l.QuickOpenEntryGroup&&o.getGroupLabel())return this.tree.setFocus(o),void 0}else for(var r=i+1;r<e.length;r++){var s=e[r];if(s instanceof l.QuickOpenEntryGroup&&s.getGroupLabel())return this.tree.setFocus(s),void 0}if(!n)return this.tree.setFocus(e[0]),void 0;for(var r=e.length-1;r>=0;r--){var o=e[r];if(o instanceof l.QuickOpenEntryGroup&&o.getGroupLabel())return this.tree.setFocus(o),void 0}}},e.prototype.elementFocused=function(e,t){if(e instanceof l.QuickOpenEntry&&this.isVisible()){var n={event:t,quickNavigateConfiguration:this.quickNavigateConfiguration};e.run(l.Mode.PREVIEW,n)}},e.prototype.elementSelected=function(e,t){var n=!0,i=this.tree.getInput();if(e instanceof l.QuickOpenEntry&&this.isVisible()){var r={event:t,quickNavigateConfiguration:this.quickNavigateConfiguration};n=e.run(l.Mode.OPEN,r)}if(this.usageLogger){var o=i.entries.indexOf(e),s=i.entries.length;this.usageLogger.publicLog("quickOpenWidgetItemAccepted",{index:o,count:s,isQuickNavigate:this.quickNavigateConfiguration?!0:!1})}n&&this.hide()},e.prototype.show=function(e,t,n){o.isUndefined(t)&&(t={}),this.visible=!0,this.isLoosingFocus=!1,this.quickNavigateConfiguration=n,this.quickNavigateConfiguration?(this.inputContainer.hide(),y&&this.treeContainer.removeClass("transition"),this.builder.show(),this.tree.DOMFocus()):(this.inputContainer.show(),y&&this.treeContainer.addClass("transition"),this.builder.show(),this.inputBox.$input.domFocus()),this.helpText&&(this.quickNavigateConfiguration||o.isString(e)?this.helpText.hide():this.helpText.show()),o.isString(e)?this.doShowWithPrefix(e):this.doShowWithInput(e,t)},e.prototype.doShowWithPrefix=function(e){this.inputBox.value=e,this.callbacks.onType(e)},e.prototype.doShowWithInput=function(e,t){this.setInput(e,t)},e.prototype.setInputAndLayout=function(e,t){var n=this,i=a.generateUuid();this.currentInputToken=i,this.setTreeHeightForInput(e).then(function(){n.currentInputToken===i&&n.tree.setInput(e).done(function(){n.tree.layout(),e&&e.getEntries(!0).length>0&&n.autoFocus(e,t)},s.onUnexpectedError)})},e.prototype.autoFocus=function(e,t){if(t.autoFocusPrefixMatch){for(var n,i,r=e.getEntries(!0),o=t.autoFocusPrefixMatch,s=o.toLowerCase(),a=0;a<r.length;a++){var u=r[a];if(n||0!==u.getLabel().indexOf(o)?i||0!==u.getLabel().toLowerCase().indexOf(s)||(i=u):n=u,n&&i)break}var l=n||i;if(l)return this.tree.setFocus(l),this.tree.reveal(l,0),void 0}if(t.autoFocusFirstEntry)this.tree.focusFirst(),this.tree.reveal(this.getVisibleFocus(),0);else if(t.autoFocusSecondEntry){var r=e.getEntries(!0);r.length>1&&this.tree.focusNth(1)}},e.prototype.refresh=function(e,t){var n=this;this.isVisible()&&this.setTreeHeightForInput(e).then(function(){n.tree.refresh().done(function(){n.tree.layout(),!n.getVisibleFocus()&&e&&e.getEntries(!0).length>0&&n.autoFocus(e,t)},s.onUnexpectedError)})},e.prototype.setTreeHeightForInput=function(e){var t=this,i=this.getHeight(e)+"px",r=this.treeContainer.style("height");return this.treeContainer.style({height:i}),this.treeContainer.hasClass("transition")&&r!==i?new n.Promise(function(e){var n=[],i=!1,r=function(){if(!i){for(i=!0;n.length;)n.pop()();e(null)}};t.treeContainer.once("webkitTransitionEnd",r,n),t.treeContainer.once("transitionend",r,n)}):n.Promise.as(null)},e.prototype.getHeight=function(t){if(!t){var n=this.renderer.getHeight(this.tree,null);return this.configuration.minItemsToShow*n}var i,r=0;this.layoutDimensions&&this.layoutDimensions.height&&(i=this.layoutDimensions.height-50),(!i||i>e.MAX_ITEMS_HEIGHT)&&(i=e.MAX_ITEMS_HEIGHT);for(var o=t.getEntries(!0),s=0;s<this.configuration.maxItemsToShow&&s<o.length;s++){var a=this.renderer.getHeight(this.tree,o[s]);if(!(i>=r+a))break;r+=a}return r},e.prototype.hide=function(e){if(void 0===e&&(e=!1),this.isVisible()){if(this.visible=!1,this.builder.hide(),this.builder.domBlur(),e){var t=this.tree.getInput();if(t){var n=t.getEntries(!0).length;this.usageLogger&&this.usageLogger.publicLog("quickOpenWidgetCancelled",{count:n,isQuickNavigate:this.quickNavigateConfiguration?!0:!1})}}this.inputBox.value="",this.tree.setInput(null);var i=this.renderer.getHeight(this.tree,null);this.treeContainer.style({height:this.configuration.minItemsToShow*i+"px"}),this.progressBar.stop().getContainer().hide(),this.tree.isDOMFocused()?this.tree.DOMBlur():this.inputBox.$input.hasFocus()&&this.inputBox.$input.domBlur(),e?this.callbacks.onCancel():this.callbacks.onOk()}},e.prototype.setInput=function(e,t){this.isVisible()&&this.setInputAndLayout(e,t)},e.prototype.getInput=function(){return this.tree.getInput()},e.prototype.getVisibleFocus=function(){var e=this.tree.getFocus();if(e instanceof l.QuickOpenEntry){var t=e;if(t.isHidden())return null}return e},e.prototype.runFocus=function(){var e=this.getVisibleFocus();return e?(this.elementSelected(e),!0):!1},e.prototype.getProgressBar=function(){return this.progressBar},e.prototype.setExtraClass=function(e){var t=this.builder.getProperty("extra-class");t&&this.builder.removeClass(t),e?(this.builder.addClass(e),this.builder.setProperty("extra-class",e)):t&&this.builder.removeProperty("extra-class")},e.prototype.isVisible=function(){return this.visible},e.prototype.layout=function(t){this.layoutDimensions=t;var n=Math.min(.62*this.layoutDimensions.width,e.MAX_WIDTH);this.builder&&(this.builder.style({width:n+"px",marginLeft:"-"+n/2+"px"}),this.inputContainer.style({width:n-12+"px"}))},e.prototype.gainingFocus=function(){this.isLoosingFocus=!1},e.prototype.loosingFocus=function(){var e=this;this.isVisible()&&(this.isLoosingFocus=!0,n.Promise.timeout(0).then(function(){e.isLoosingFocus&&e.hide(!1)}))},e.prototype.dispose=function(){for(;this.toUnbind.length;)this.toUnbind.pop()();this.progressBar.dispose(),this.inputBox.dispose(),this.tree.dispose()},e.MAX_WIDTH=600,e.MAX_ITEMS_HEIGHT=480,e}();t.QuickOpenWidget=_}),define("vs/editor/contrib/quickOpen/quickOpenEditorWidget",["require","exports","vs/editor/editor","vs/base/dom/builder","vs/base/ui/widgets/quickopen/quickOpenWidget"],function(e,t,n,i,r){var o=0,s=20,a=i.$,u=function(){function e(e,t,n,i,r){this.codeEditor=e,this.create(t,n,i,r)}return e.prototype.create=function(e,t,n,i){this.domNode=a().div().getHTMLElement(),this.quickOpenWidget=new r.QuickOpenWidget(this.domNode,{onOk:e,onCancel:t,onType:n},{minItemsToShow:o,maxItemsToShow:s,inputPlaceHolder:null,inputAriaLabel:i.inputAriaLabel},null),this.quickOpenWidget.create(),this.codeEditor.addOverlayWidget(this)},e.prototype.setInput=function(e,t){this.quickOpenWidget.setInput(e,t)},e.prototype.getId=function(){return e.ID},e.prototype.getDomNode=function(){return this.domNode},e.prototype.destroy=function(){this.quickOpenWidget.dispose()},e.prototype.isVisible=function(){return this.visible},e.prototype.show=function(e){this.visible=!0;var t=this.codeEditor.getLayoutInfo();t&&this.quickOpenWidget.layout(new i.Dimension(t.width,t.height)),this.quickOpenWidget.show(e),this.codeEditor.layoutOverlayWidget(this)},e.prototype.hide=function(){this.visible=!1,this.quickOpenWidget.hide(),this.codeEditor.layoutOverlayWidget(this)},e.prototype.getPosition=function(){return this.visible?{preference:n.OverlayWidgetPositionPreference.TOP_CENTER}:null},e.ID="editor.contrib.quickOpenEditorWidget",e}();t.QuickOpenEditorWidget=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/contrib/quickOpen/editorQuickOpen",["require","exports","vs/base/lib/winjs.base","vs/editor/editorExtensions","./quickOpenEditorWidget"],function(e,t,n,i,r){var o=function(e){function t(t,n,r,o,s){void 0===s&&(s=i.Behaviour.WidgetFocus),e.call(this,t,n,r,s),this.label=o}return __extends(t,e),t.prototype.run=function(){var e=this;return this.widget||(this.widget=new r.QuickOpenEditorWidget(this.editor,function(){return e._onClose(!1)},function(){return e._onClose(!0)},function(t){return e.onType(t)},{inputAriaLabel:this._getInputAriaLabel()})),this.lastKnownEditorSelection||(this.lastKnownEditorSelection=this.editor.getSelection()),this.widget.show(""),n.Promise.as(!0)},t.prototype._getModel=function(){throw new Error("Subclasses to implement")},t.prototype._getAutoFocus=function(){throw new Error("Subclasses to implement")},t.prototype._getInputAriaLabel=function(){throw new Error("Subclasses to implement")},t.prototype.onType=function(e){this.widget.setInput(this._getModel(e),this._getAutoFocus(e))},t.prototype.decorateLine=function(e,t){var n=this;t.changeDecorations(function(t){n.lineHighlightDecorationId&&(t.removeDecoration(n.lineHighlightDecorationId),n.lineHighlightDecorationId=null),n.lineHighlightDecorationId=t.addDecoration(e,{className:"lineHighlight",isWholeLine:!0})})},t.prototype.clearDecorations=function(){var e=this;this.lineHighlightDecorationId&&this.editor.changeDecorations(function(t){t.removeDecoration(e.lineHighlightDecorationId),e.lineHighlightDecorationId=null})},t.prototype._onClose=function(e){this.clearDecorations(),e&&this.lastKnownEditorSelection&&this.editor.setSelection(this.lastKnownEditorSelection,!0,!0,!0),this.lastKnownEditorSelection=null,this.editor.focus()},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.widget&&(this.widget.destroy(),this.widget=null)},t}(i.EditorAction);t.BaseEditorQuickOpenAction=o}),define("vs/css!vs/editor/contrib/quickOpen/gotoLine",["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/quickOpen/gotoLine",["require","exports","vs/nls!vs/editor/editor.main","vs/base/types","vs/editor/core/constants","vs/base/ui/widgets/quickopen/quickOpenModel","./editorQuickOpen","vs/css!./gotoLine"],function(e,t,n,i,r,o,s){var a=function(e){function t(t,n,i){e.call(this),this.editor=n,this.decorator=i,this._parseResult=this._parseInput(t)}return __extends(t,e),t.prototype._parseInput=function(e){var t,i=e.split(",").map(function(e){return parseInt(e,10)}).filter(function(e){return!isNaN(e)});t=0===i.length?{lineNumber:-1,column:-1}:1===i.length?{lineNumber:i[0],column:1}:{lineNumber:i[0],column:i[1]};var o,s=this.editor.getEditorType();switch(s){case r.EditorType.IDiffEditor:o=this.editor.getModel().modified;break;case r.EditorType.ICodeEditor:case r.EditorType.ITerminal:o=this.editor.getModel();break;default:throw new Error}var a,u=o.validatePosition(t).equals(t);return a=u?t.column&&t.column>1?n.localize("vs_editor_contrib_quickOpen_gotoLine",0,t.lineNumber,t.column):n.localize("vs_editor_contrib_quickOpen_gotoLine",1,t.lineNumber,t.column):t.lineNumber<1||t.lineNumber>o.getLineCount()?n.localize("vs_editor_contrib_quickOpen_gotoLine",2,o.getLineCount()):n.localize("vs_editor_contrib_quickOpen_gotoLine",3,o.getLineMaxColumn(t.lineNumber)),{position:t,isValid:u,label:a}},t.prototype.getLabel=function(){return this._parseResult.label},t.prototype.run=function(e){return e===o.Mode.OPEN?this.runOpen():this.runPreview()},t.prototype.runOpen=function(){if(!this._parseResult.isValid)return!1;var e=this.toSelection();return this.editor.setSelection(e,!0,!0,!0),this.editor.focus(),!0},t.prototype.runPreview=function(){if(!this._parseResult.isValid)return this.decorator.clearDecorations(),!1;var e=this.toSelection();return this.editor.revealRange(e,!0,!0),i.isFunction(this.editor.changeDecorations)&&this.decorator.decorateLine(e,this.editor),!1},t.prototype.toSelection=function(){return{startLineNumber:this._parseResult.position.lineNumber,startColumn:this._parseResult.position.column,endLineNumber:this._parseResult.position.lineNumber,endColumn:this._parseResult.position.column}},t}(o.QuickOpenEntry);t.GotoLineEntry=a;var u=function(e){function t(t,i,r){e.call(this,t,i,r,n.localize("vs_editor_contrib_quickOpen_gotoLine",4))}return __extends(t,e),t.prototype._getModel=function(e){var t=new o.QuickOpenModel,n=[new a(e,this.editor,this)];return t.addEntries(n),t},t.prototype._getAutoFocus=function(e){return{autoFocusFirstEntry:e.length>0}},t.prototype._getInputAriaLabel=function(){return n.localize("vs_editor_contrib_quickOpen_gotoLine",5)},t.ID="editor.actions.gotoLine",t}(s.BaseEditorQuickOpenAction);t.GotoLineAction=u}),define("vs/editor/contrib/quickOpen/gotoLine.contribution",["require","exports","vs/nls!vs/editor/editor.main","vs/editor/editorExtensions","./gotoLine"],function(e,t,n,i,r){i.registerEditorActionContribution(r.GotoLineAction,r.GotoLineAction.ID,n.localize("vs_editor_contrib_quickOpen_gotoLine.contribution",0),{ctrlCmd:!0,key:"G"})}),define("vs/base/filters",["require","exports","vs/base/strings"],function(e,t,n){function i(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return function(t,n){for(var i=0,r=e.length;r>i;i++){var o=e[i](t,n);if(o)return o}return null}}function r(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return function(t,n){for(var i=[],r=0,o=e.length;o>r;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.length<t.length)return null;e&&(t=t.toLowerCase(),n=n.toLowerCase());for(var i=0;i<t.length;i++)if(t[i]!==n[i])return null;return t.length>0?[{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 f({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<t.length&&null===(n=m(e.toLowerCase(),t,0,i));)i=g(t,i+1);return n}function c(e){var t=e.charCodeAt(0);return t>=97&&122>=t}function d(e){var t=e.charCodeAt(0);return t>=65&&90>=t}function h(e){var t=e.charCodeAt(0);return t>=48&&57>=t}function p(e){return c(e)||d(e)||h(e)}function f(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function g(e,t){for(var n=t;n<e.length;n++){var i=e[n];if(d(i)||h(i)||n>0&&!p(e[n-1]))return n}return e.length}function m(e,t,n,i){if(n===e.length)return[];if(i===t.length)return null;if(e[n]!==t[i].toLowerCase())return null;var r=null,o=i+1;for(r=m(e,t,n+1,i+1);!r&&(o=g(t,o))<t.length;)r=m(e,t,n+1,o),o++;return null===r?null:f({start:i,end:i+1},r)}t.or=i,t.and=r,t.matchesStrictPrefix=function(e,t){return o(!1,e,t)},t.matchesPrefix=function(e,t){return o(!0,e,t)},t.matchesContiguousSubString=s,t.matchesSubString=a,t.matchesCamelCase=l;var v=function(){function e(){}return e.matches=function(t,i){var r=e.RegExpCache[t];r||(r=new RegExp(n.convertSimple2RegExpPattern(t),"i"),e.RegExpCache[t]=r);var o=r.exec(i);return o?[{start:o.index,end:o.index+o[0].length}]:e.DefaultFilter(t,i)},e.DefaultFilter=i(t.matchesPrefix,l,s),e.RegExpCache={},e}();t.CombinedMatcher=v}),define("vs/css!vs/editor/contrib/quickOpen/quickOutline",["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/quickOpen/quickOutline",["require","exports","vs/nls!vs/editor/editor.main","vs/base/arrays","vs/base/lib/winjs.base","vs/base/types","vs/base/errors","vs/base/strings","vs/base/filters","vs/base/ui/widgets/quickopen/quickOpenModel","./editorQuickOpen","vs/editor/editorExtensions","vs/css!./quickOutline"],function(e,t,n,i,r,o,s,a,u,l,c,d){var h=":",p=function(e){function t(t,n,i,r,o,s,a,u){e.call(this),this.name=t,this.meta=n,this.type=i,this.description=r,this.range=o,this.setHighlights(s),this.editor=a,this.decorator=u}return __extends(t,e),t.prototype.getLabel=function(){return this.name},t.prototype.getMeta=function(){return this.meta},t.prototype.getIcon=function(){return this.type},t.prototype.getDescription=function(){return this.description},t.prototype.getType=function(){return this.type},t.prototype.getRange=function(){return this.range},t.prototype.run=function(e,t){return e===l.Mode.OPEN?this.runOpen(t):this.runPreview()},t.prototype.runOpen=function(){var e=this.toSelection();return this.editor.setSelection(e,!0,!0,!0),this.editor.focus(),!0},t.prototype.runPreview=function(){var e=this.toSelection();return this.editor.revealRange(e,!0,!0),o.isFunction(this.editor.changeDecorations)&&this.decorator.decorateLine(this.range,this.editor),!1},t.prototype.toSelection=function(){return{startLineNumber:this.range.startLineNumber,startColumn:this.range.startColumn||1,endLineNumber:this.range.startLineNumber,endColumn:this.range.startColumn||1}},t}(l.QuickOpenEntryGroup),f=function(e){function t(t,i,r){e.call(this,t,i,r,n.localize("vs_editor_contrib_quickOpen_quickOutline",0),d.Behaviour.WidgetFocus|d.Behaviour.ShowInContextMenu)}return __extends(t,e),t.prototype.getGroupId=function(){return"1_goto/5_visitSymbol"},t.prototype.isSupported=function(){var t=this.editor.getModel().getMode();return!!t&&!!t.outlineSupport&&e.prototype.isSupported.call(this)},t.prototype.run=function(){var t=this,n=this.editor.getModel(),i=n.getMode(),a=i.outlineSupport;if(!a)return null;var u=a.getOutline(n.getAssociatedResource());return u.then(function(n){return o.isArray(n)&&n.length>0?(t.cachedResult=n,e.prototype.run.call(t)):r.Promise.as(!0)},function(e){return s.onUnexpectedError(e),!1})},t.prototype._getModel=function(e){var t=new l.QuickOpenModel,n=this.toQuickOpenEntries(this.cachedResult,e);return t.addEntries(n),t},t.prototype._getAutoFocus=function(e){return 0===e.indexOf(h)&&(e=e.substr(h.length)),{autoFocusPrefixMatch:e,autoFocusFirstEntry:!!e}},t.prototype._getInputAriaLabel=function(){return n.localize("vs_editor_contrib_quickOpen_quickOutline",1)},t.prototype.toQuickOpenEntries=function(e,t){var r=[],o=[];e&&this.flatten(e,o);var s=t;0===t.indexOf(h)&&(s=s.substr(h.length));for(var l=0;l<o.length;l++){var c=o[l],d=a.trim(c.label),f=null;if("method"===c.type||"function"===c.type){var g=d.indexOf("(");g>0?(f=d.substr(g),d=d.substr(0,g)):f="()"}var m=u.CombinedMatcher.matches(s,d);if(m){var v=null;c.parentScope&&(v=i.tail(c.parentScope)),r.push(new p(d,f,c.type,v,c.range,m,this.editor,this))}}if(t&&(r=0===t.indexOf(h)?r.sort(this.sortScoped.bind(this,t.toLowerCase())):r.sort(this.sortNormal.bind(this,t.toLowerCase()))),r.length>0&&0===t.indexOf(h)){for(var y=null,_=null,b=0,l=0;l<r.length;l++){var w=r[l];y!==w.getType()?(_&&_.setGroupLabel(this.typeToLabel(y,b)),y=w.getType(),_=w,b=1,w.setShowBorder(l>0)):b++}_&&_.setGroupLabel(this.typeToLabel(y,b))}else r.length>0&&r[0].setGroupLabel(n.localize("vs_editor_contrib_quickOpen_quickOutline",2,r.length));return r},t.prototype.typeToLabel=function(e,t){switch(e){case"module":return n.localize("vs_editor_contrib_quickOpen_quickOutline",3,t);case"class":return n.localize("vs_editor_contrib_quickOpen_quickOutline",4,t);case"interface":return n.localize("vs_editor_contrib_quickOpen_quickOutline",5,t);case"method":return n.localize("vs_editor_contrib_quickOpen_quickOutline",6,t);case"function":return n.localize("vs_editor_contrib_quickOpen_quickOutline",7,t);case"property":return n.localize("vs_editor_contrib_quickOpen_quickOutline",8,t);case"variable":return n.localize("vs_editor_contrib_quickOpen_quickOutline",9,t);case"var":return n.localize("vs_editor_contrib_quickOpen_quickOutline",10,t);case"constructor":return n.localize("vs_editor_contrib_quickOpen_quickOutline",11,t);case"call":return n.localize("vs_editor_contrib_quickOpen_quickOutline",12,t)}return e},t.prototype.flatten=function(e,t,n){for(var i=0;i<e.length;i++){var r=e[i];if(t.push(r),n&&(r.parentScope=n),r.children){var o=[];n&&(o=n.slice(0)),o.push(r.label),this.flatten(r.children,t,o)}}},t.prototype.sortNormal=function(e,t,n){var i=t.getLabel().toLowerCase(),r=n.getLabel().toLowerCase(),o=a.localeCompare(i,r);if(0!==o)return o;var s=t.getRange(),u=n.getRange();return s.startLineNumber-u.startLineNumber},t.prototype.sortScoped=function(e,t,n){e=e.substr(h.length);var i=t.getType(),r=n.getType(),o=a.localeCompare(i,r);if(0!==o)return o;if(e){var s=t.getLabel().toLowerCase(),u=n.getLabel().toLowerCase(),o=a.localeCompare(s,u);if(0!==o)return o}var l=t.getRange(),c=n.getRange();return l.startLineNumber-c.startLineNumber},t.prototype._onClose=function(t){e.prototype._onClose.call(this,t),this.cachedResult=null},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.cachedResult=null},t.ID="editor.actions.quickOutline",t}(c.BaseEditorQuickOpenAction);t.QuickOutlineAction=f}),define("vs/editor/contrib/quickOpen/quickOutline.contribution",["require","exports","vs/nls!vs/editor/editor.main","vs/editor/editorExtensions","./quickOutline"],function(e,t,n,i,r){i.registerEditorActionContribution(r.QuickOutlineAction,r.QuickOutlineAction.ID,n.localize("vs_editor_contrib_quickOpen_quickOutline.contribution",0),{ctrlCmd:!0,shift:!0,key:"O"},{ctrlCmd:!0,shift:!0,key:","})});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/smartSelect/smartSelect",["require","exports","vs/nls!vs/editor/editor.main","vs/base/arrays","vs/base/env","vs/base/lib/winjs.base","vs/editor/core/constants","vs/editor/core/range","vs/editor/editorExtensions"],function(e,t,n,i,r,o,s,a,u){var l=function(){function e(e){this.editor=e,this.next=null,this.previous=null,this.selection=e.getSelection()
}return e}(),c=null,d=!1,h=function(e){function t(t,n,i,r){e.call(this,t,n,i,u.Behaviour.TextFocus|u.Behaviour.UpdateOnModelChange),this.forward=r}return __extends(t,e),t.prototype.isSupported=function(){return!!this.editor.getModel().getMode().logicalSelectionSupport&&e.prototype.isSupported.call(this)},t.prototype.run=function(){var e=this,t=this.editor.getSelection(),n=this.editor.getModel(),r=n.getMode().logicalSelectionSupport;c&&c.editor!==this.editor&&(c=null);var u=o.Promise.as(c);return c||(u=r.getRangesToPosition(n.getAssociatedResource(),t.getStartPosition()).then(function(t){if(!i.isFalsyOrEmpty(t)){var n;t.filter(function(t){var n=e.editor.getSelection(),i=new a.Range(t.range.startLineNumber,t.range.startColumn,t.range.endLineNumber,t.range.endColumn);return i.containsPosition(n.getStartPosition())&&i.containsPosition(n.getEndPosition())}).forEach(function(t){var i=t.range,r=new l(e.editor);r.selection=new a.Range(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn),n&&(r.next=n,n.previous=r),n=r});var r=new l(e.editor);r.next=n,n&&(n.previous=r),c=r;var o=e.editor.addListener(s.EventType.CursorPositionChanged,function(){d||(c=null,o())})}})),u.then(function(){if(c&&(c=e.forward?c.next:c.previous)){d=!0;try{e.editor.setSelection(c.selection)}finally{d=!1}}})},t}(u.EditorAction),p=function(e){function t(t,n,i){e.call(this,t,n,i,!0)}return __extends(t,e),t.ID="editor.action.smartSelect.grow",t}(h),f=function(e){function t(t,n,i){e.call(this,t,n,i,!1)}return __extends(t,e),t.ID="editor.action.smartSelect.shrink",t}(h);u.registerEditorActionContribution(p,p.ID,n.localize("vs_editor_contrib_smartSelect_smartSelect",0),r.isMacintosh?{shift:!0,cmdCtrl:!0,winCtrl:!0,alt:!1,key:"RightArrow"}:{shift:!0,alt:!0,key:"RightArrow"}),u.registerEditorActionContribution(f,f.ID,n.localize("vs_editor_contrib_smartSelect_smartSelect",1),r.isMacintosh?{shift:!0,cmdCtrl:!0,winCtrl:!0,alt:!1,key:"LeftArrow"}:{shift:!0,alt:!0,key:"LeftArrow"})});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/smartSelect/jumpToBracket",["require","exports","vs/nls!vs/editor/editor.main","vs/base/lib/winjs.base","vs/editor/core/internalConstants","vs/editor/editorExtensions"],function(e,t,n,i,r,o){var s=function(e){function t(t,n,i){e.call(this,t,n,i,o.Behaviour.TextFocus)}return __extends(t,e),t.prototype.run=function(){return this.editor.trigger(this.id,r.Handler.JumpToBracket,{}),i.TPromise.as(!0)},t.ID="editor.action.jumpToBracket",t}(o.EditorAction);o.registerEditorActionContribution(s,s.ID,n.localize("vs_editor_contrib_smartSelect_jumpToBracket",0),{ctrlCmd:!0,alt:!0,key:"]"})}),define("vs/editor/contrib/wordHighlighter/wordHighlighter",["require","exports","vs/editor/core/constants","vs/editor/core/range","vs/editor/editorExtensions","vs/editor/editor"],function(e,t,n,i,r,o){var s=function(){function e(e){var t=this;this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.workerRequestValue=null,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.model=this.editor.getModel(),this.toUnhook=[],this.toUnhook.push(e.addListener(n.EventType.CursorPositionChanged,function(e){t._onPositionChanged(e)})),this.toUnhook.push(e.addListener(n.EventType.ModelChanged,function(){t._stopAll(),t.model=t.editor.getModel()})),this.toUnhook.push(e.addListener("change",function(){t._stopAll()})),this._lastWordRange=null,this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.workerRequestValue=null,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}return e.prototype._removeDecorations=function(){this._decorationIds.length>0&&(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.endColumn<s)return this._stopAll(),void 0;for(var u=new i.Range(r,a.startColumn,r,a.endColumn),l=this._lastWordRange&&this._lastWordRange.equalsRange(u),c=0,d=this._decorationIds.length;!l&&d>c;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",s="rgba(246, 185, 77, 0.7)";i.kind&&"write"===i.kind&&(r+="Strong",s="rgba(249, 206, 130, 0.7)"),e.push({range:i.range,options:{stickiness:o.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,isOverlay:!1,className:r,overviewRuler:{color:s,position:o.OverviewRulerLane.Center}}})}this._decorationIds=this.editor.deltaDecorations(this._decorationIds,e)},e.prototype.destroy=function(){for(this._stopAll();this.toUnhook.length>0;)this.toUnhook.pop()()},e}(),a=function(){function e(e,t){this.wordHighligher=new s(t)}return e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.wordHighligher.destroy()},e.ID="editor.contrib.wordHighlighter",e}();r.registerEditorContribution(a)}),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,o){this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=i,this._onDomNodeTop=r,this._onComputedHeight=o}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){var i=this;void 0===n&&(n={}),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 void 0===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),n.domNode.style.top="-1000px";var o=new l(r,i.lineNumber,i.column,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/editor/modes/modesFilters",["require","exports","vs/base/filters"],function(e,t,n){function i(e){return function(t,n){var i=e(t,n.label);return n.highlights=i||[],!!i}}function r(e,t){return function(n,i){return e(n,i)||t(n,i)}}function o(e,t){return function(n,i){return e(n,i)&&t(n,i)}}t.StrictPrefix=i(n.matchesStrictPrefix),t.Prefix=i(n.matchesPrefix),t.CamelCase=i(n.matchesCamelCase),t.ContiguousSubString=i(n.matchesContiguousSubString),t.or=r,t.and=o,t.DefaultFilter=r(r(t.Prefix,t.CamelCase),t.ContiguousSubString)}),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,n){function i(e){void 0===e&&(e="");for(var t="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",n="(-?\\d*\\.\\d\\w*)|([^",i=0;i<t.length;i++)e.indexOf(t[i])>=0||(n+="\\"+t[i]);return n+="\\s]+)",new RegExp(n,"g")}function r(e,t,i,r){void 0===r&&(r=0);var o=[{startIndex:r,type:"",bracket:n.Bracket.None}],s=[{startIndex:r,mode:e}];return{tokens:o,actualStopOffset:r+t.length,endState:i,modeTransitions:s}}var o=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=o,t.createWordRegExp=i;var s=function(){function e(){this.tokenTypeClassificationSupport=this}return e.prototype.getId=function(){return e.ID},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=i(),e.ID="vs.editor.modes.nullMode",e}();t.NullMode=s,t.nullTokenize=r}),define("vs/platform/thread/attribute",["require","exports","vs/base/lib/winjs.base","vs/platform/services"],function(e,t,n,i){function r(e,t){for(var n in e)if(e[n]===t)return n;throw new Error("Member not found in prototype")}function o(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 s(e,t){var n=r(e.prototype,t);e.prototype[n]=function(){for(var e=[],i=0;i<arguments.length;i++)e[i-0]=arguments[i];return o(this).MainThread(this,n,t,e)}}function a(e,t,s,a){void 0===a&&(a=i.ThreadAffinity.None);var u,l=r(e.prototype,t);"function"==typeof s?u=s:"undefined"!=typeof s&&(a=s),e.prototype[l]=function(){for(var e=[],i=0;i<arguments.length;i++)e[i-0]=arguments[i];if(u){var r=this,s=u.call(r);return n.Promise.is(s)||(s=n.Promise.as(s)),s.then(function(){return o(r).OneWorker(r,l,t,e,a)})}return o(this).OneWorker(this,l,t,e,a)}}function u(e,t){var n=r(e.prototype,t);e.prototype[n]=function(){for(var e=[],i=0;i<arguments.length;i++)e[i-0]=arguments[i];return o(this).AllWorkers(this,n,t,e)}}function l(e,t){var n=r(e.prototype,t);e.prototype[n]=function(){for(var e=[],i=0;i<arguments.length;i++)e[i-0]=arguments[i];return o(this).Everywhere(this,n,t,e)}}t.THREAD_SERVICE_PROPERTY_NAME="__$$__threadService",t.MainThread=s,t.OneWorker=a,t.AllWorkers=u,t.Everywhere=l}),define("vs/platform/thread/abstractThreadService",["require","exports","vs/base/lib/winjs.base","vs/base/env","vs/platform/thread/attribute"],function(e,t,n,i,r){var o=function(){function e(){this.isInMainThread=!i.isInWebWorker()&&!i.isInEmulatedWebWorker()&&!i.isInProcessWorker(),this._boundObjects={},this._pendingObjects=[]}return e.prototype.setInstantiationService=function(e){this._instantiationService=e},e.prototype.createInstance=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return this._doCreateInstance(e)},e.prototype._doCreateInstance=function(e){var t=this,i=this._instantiationService.createInstance.apply(this._instantiationService,e);if(n.Promise.is(i)){var r=i.then(function(e){if(e.asyncCtor){var t=e.asyncCtor();if(n.Promise.is(t))return t.then(function(){return e})}return e});return this._pendingObjects.push(r),r.then(function(e){for(var n=t._finishInstance(e),i=0;i<t._pendingObjects.length;i++)if(t._pendingObjects[i]===r){t._pendingObjects.splice(i,1);break}return n})}return this._finishInstance(i)},e.prototype._finishInstance=function(e){return e[r.THREAD_SERVICE_PROPERTY_NAME]=this,this._boundObjects[e.getId()]=e,e.creationDone&&e.creationDone(),e},e.prototype.registerInstance=function(e){this._finishInstance(e)},e}();t.AbstractThreadService=o}),define("vs/base/collections",["require","exports"],function(e,t){function n(){return Object.create(null)}function i(){return Object.create(null)}function r(e,t,n){void 0===n&&(n=null);var i=String(t);return a(e,i)?e[i]:n}function o(e,t,n){var i=String(t);return a(e,i)?e[i]:("function"==typeof n&&(n=n()),e[i]=n,n)}function s(e,t,n){e[n(t)]=t}function a(e,t){return m.call(e,t)}function u(e){return{every:function(t){for(var n in e)if(m.call(e,n)&&!t(n))return!1;return!0}}}function l(e){var t=[];for(var n in e)m.call(e,n)&&t.push(e[n]);return t}function c(e,t){for(var n in e)if(m.call(e,n)){var i=t({key:n,value:e[n]},function(){delete e[n]});if(i===!1)return}}function d(e,t){return m.call(e,t)?(delete e[t],!0):!1}function h(e,t){var i=n();return e.forEach(function(e){return o(i,t(e),[]).push(e)}),i}function p(e){var n=e.length;return 0===n?t.EmptyIterable:1===n?e[0]:{every:function(t){for(var i=0;n>i;i++)if(!e[i].every(t))return!1;return!0}}}function f(e){return{every:function(t){return t(e)}}}function g(e){if(Array.isArray(e))return e;var t=[];return e.every(function(e){return t.push(e),!0}),t}t.createStringDictionary=n,t.createNumberDictionary=i,t.lookup=r,t.lookupOrInsert=o,t.insert=s;var m=Object.prototype.hasOwnProperty;t.contains=a,t.keys=u,t.values=l,t.forEach=c,t.remove=d,t.groupBy=h,t.EmptyIterable={every:function(){return!0}},t.combine=p,t.singleton=f,t.toArray=g}),define("vs/platform/instantiation/instantiationService",["require","exports","vs/base/lib/winjs.base","vs/base/errors","vs/base/strings","vs/base/types","vs/platform/services","vs/base/collections"],function(e,t,n,i,r,o,s,a){function u(e){return new d(e,new l)}t.create=u;var l=function(){function e(){this._value=0}return Object.defineProperty(e.prototype,"locked",{get:function(){return 0===this._value},enumerable:!0,configurable:!0}),e.prototype.runUnlocked=function(e){this._value++;try{return e()}finally{this._value--}},e}(),c=function(){function e(e,t){var n=this;this._services=e,this._lock=t,a.forEach(this._services,function(e){n.registerService(e.key,e.value)})}return e.prototype.registerService=function(e,t){var n=this;Object.defineProperty(this,e,{get:function(){if(n._lock.locked)throw i.illegalState("the services map can only be used during construction");if(!t)throw i.illegalArgument(r.format("service with '{0}' not found",e));return t},set:function(){throw i.illegalState("services cannot be changed")},configurable:!1,enumerable:!1}),this._services[e]=t},Object.defineProperty(e.prototype,"lock",{get:function(){return this._lock},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"services",{get:function(){return this._services},enumerable:!0,configurable:!0}),e.prototype.createInstance=function(e,t){var n=[e.ctor,this];return n.push.apply(n,e.staticArguments()),n.push.apply(n,t),this._lock.runUnlocked(function(){var t=o.create.apply(null,n);return e._validate(t),t})},e}(),d=function(){function t(e,t){e.instantiationService=this,this._servicesMap=new c(e,t)}return t.prototype.createChild=function(e){var n={};return a.forEach(this._servicesMap.services,function(e){n[e.key]=e.value}),a.forEach(e,function(e){n[e.key]=e.value}),new t(n,this._servicesMap.lock)},t.prototype.registerService=function(e,t){this._servicesMap.registerService(e,t)},t.prototype.createInstance=function(e){for(var t=new Array(arguments.length-1),n=1,i=arguments.length;i>n;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));var l;if(l=t.ctorName?e[t.ctorName]:e,"function"!=typeof l)return u(i.illegalArgument("not a function: "+t.ctorName||t.moduleName));try{r.unshift.apply(r,t.staticArguments()),n(a._servicesMap.createInstance(new s.SyncDescriptor(l),r))}catch(c){return u(c)}},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/nullThreadService",["require","exports","vs/base/lib/winjs.base","vs/platform/thread/abstractThreadService","vs/platform/instantiation/instantiationService"],function(e,t,n,i,r){var o=function(e){function t(t){e.call(this),this._warn=t,this.setInstantiationService(r.create({threadService:this}))}return __extends(t,e),t.prototype._doCreateInstance=function(t){return this._warn&&console.warn("Instantiating using the null thread service"),e.prototype._doCreateInstance.call(this,t)},t.prototype.MainThread=function(e,t,n,i){return n.apply(e,i)},t.prototype.OneWorker=function(){return n.Promise.as(null)},t.prototype.AllWorkers=function(){return n.Promise.as(null)},t.prototype.Everywhere=function(e,t,n,i){return n.apply(e,i)},t.prototype.ensureWorkers=function(){},t.prototype.addStatusListener=function(){},t.prototype.removeStatusListener=function(){},t}(i.AbstractThreadService);t.NULL_THREAD_SERVICE=new o(!0),t.PLUGIN_HOST_THREAD_SERVICE=new o(!1)}),define("vs/editor/modes/stream",["require","exports"],function(e,t){var n=function(){function e(e){this._source=e,this.sourceLength=e.length,this._pos=0,this.whitespace="	  ",this.whitespaceArr=this.stringToArray(this.whitespace),this.separators="",this.separatorsArr=this.stringToArray(this.separators),this.tokenStart=-1,this.tokenEnd=-1}return e.prototype.stringToArray=function(t){return e.STRING_TO_ARRAY_CACHE.hasOwnProperty(t)||(e.STRING_TO_ARRAY_CACHE[t]=this.actualStringToArray(t)),e.STRING_TO_ARRAY_CACHE[t]},e.prototype.actualStringToArray=function(e){for(var t=0,n=0;n<e.length;n++)t=e.charCodeAt(n);var i=[];for(n=0;t>n;n++)i[n]=!1;for(n=0;n<e.length;n++)i[e.charCodeAt(n)]=!0;return i},e.prototype.pos=function(){return this._pos},e.prototype.eos=function(){return this._pos>=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.next2=function(){if(this._pos>=this.sourceLength)throw new Error("Stream is at the end");this.tokenStart=-1,this.tokenEnd=-1,this._pos++},e.prototype.advance=function(e){if(0===e)return"";var t=this._pos;return this._pos+=e,this.tokenStart=-1,this.tokenEnd=-1,this._source.substring(t,this._pos)},e.prototype._advance2=function(e){return 0===e?e:(this._pos+=e,this.tokenStart=-1,this.tokenEnd=-1,e)},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 0;for(t=0;r>t;t++)if(i.charAt(n+t).toLowerCase()!==e.charAt(t).toLowerCase())return 0;return r},e.prototype.advanceIfStringCaseInsensitive=function(e){return this.advance(this._advanceIfStringCaseInsensitive(e))},e.prototype.advanceIfStringCaseInsensitive2=function(e){return this._advance2(this._advanceIfStringCaseInsensitive(e))},e.prototype._advanceIfString=function(e){var t,n=this._pos,i=this._source,r=e.length;if(1>r||n+r>this.sourceLength)return 0;for(t=0;r>t;t++)if(i.charCodeAt(n+t)!==e.charCodeAt(t))return 0;return r},e.prototype.advanceIfString=function(e){return this.advance(this._advanceIfString(e))},e.prototype.advanceIfString2=function(e){return this._advance2(this._advanceIfString(e))},e.prototype._advanceIfCharCode=function(e){return this._pos<this.sourceLength&&this._source.charCodeAt(this._pos)===e?1:0},e.prototype.advanceIfCharCode=function(e){return this.advance(this._advanceIfCharCode(e))},e.prototype.advanceIfCharCode2=function(e){return this._advance2(this._advanceIfCharCode(e))},e.prototype._advanceIfRegExp=function(e){return this._pos>=this.sourceLength?0:e.test(this._source.substr(this._pos))?RegExp.lastMatch.length:0},e.prototype.advanceIfRegExp=function(e){return this.advance(this._advanceIfRegExp(e))},e.prototype.advanceIfRegExp2=function(e){return this._advance2(this._advanceIfRegExp(e))},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._advanceUntilString=function(e,t){if(this.eos()||0===e.length)return 0;var n=this._pos,i=this._source.indexOf(e,n);return-1===i?this.sourceLength-n:t?i+e.length-n:i-n},e.prototype.advanceUntilString=function(e,t){return this.advance(this._advanceUntilString(e,t))},e.prototype.advanceUntilString2=function(e,t){return this._advance2(this._advanceUntilString(e,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 r-i},e.prototype.skipWhitespace=function(){return this.advance(this._skipWhitespace())},e.prototype.skipWhitespace2=function(){return this._advance2(this._skipWhitespace())},e.STRING_TO_ARRAY_CACHE={},e}();t.LineStream=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/modes/supports",["require","exports","vs/base/types","vs/base/arrays","vs/base/lib/winjs.base","vs/editor/modes/stream","vs/editor/modes/modes","vs/editor/modes/nullMode"],function(e,t,n,i,r,o,s,a){function u(e,t,n,r){var o=t.modeTransitions;if(1===o.length)return r(o[0].mode,t,n);var s=i.findIndexInSegmentsArray(o,n),a=o[s].mode,u=o[s].startIndex,l=t.findIndexOfOffset(u),d=-1,h=-1;s+1<o.length?(h=t.findIndexOfOffset(o[s+1].startIndex),d=t.getTokenStartIndex(h)):(h=t.getTokenCount(),d=t.getLineContent().length);var p=t.getTokenStartIndex(l),f=new c(t,a,l,h,p,d);return r(a,f,n-p)}var l=function(){function e(e,t,n){this.startIndex=e,this.type=t,this.bracket=n}return e}();t.Token=l,t.handleEvent=u;var c=function(){function e(e,t,n,i,r,o){this.modeTransitions=[{startIndex:0,mode:t}],this._actual=e,this._firstTokenInModeIndex=n,this._nextTokenAfterMode=i,this._firstTokenCharacterOffset=r,this._nextCharacterAfterModeIndex=o}return e.prototype.getLineContent=function(){var e=this._actual.getLineContent();return e.substring(this._firstTokenCharacterOffset,this._nextCharacterAfterModeIndex)},e.prototype.getTokenCount=function(){return this._nextTokenAfterMode-this._firstTokenInModeIndex},e.prototype.findIndexOfOffset=function(e){return this._actual.findIndexOfOffset(e+this._firstTokenCharacterOffset)-this._firstTokenInModeIndex},e.prototype.getTokenStartIndex=function(e){return this._actual.getTokenStartIndex(e+this._firstTokenInModeIndex)-this._firstTokenCharacterOffset},e.prototype.getTokenEndIndex=function(e){return this._actual.getTokenEndIndex(e+this._firstTokenInModeIndex)-this._firstTokenCharacterOffset},e.prototype.getTokenType=function(e){return this._actual.getTokenType(e+this._firstTokenInModeIndex)},e.prototype.getTokenBracket=function(e){return this._actual.getTokenBracket(e+this._firstTokenInModeIndex)},e.prototype.getTokenText=function(e){return this._actual.getTokenText(e+this._firstTokenInModeIndex)},e}();t.FilteredLineContext=c;var d=function(){function e(e){this._mode=e}return Object.defineProperty(e.prototype,"mode",{get:function(){return this._mode},enumerable:!0,configurable:!0}),e.prototype._dispatchToMode=function(e,t,n){var r=e.modeTransitions;if(1===r.length)return n(r[0].mode,e,t);var o=i.findIndexInSegmentsArray(r,t),s=r[o].mode,a=r[o].startIndex,u=e.findIndexOfOffset(a),l=-1,d=-1;o+1<r.length?(d=e.findIndexOfOffset(r[o+1].startIndex),l=e.getTokenStartIndex(d)):(d=e.getTokenCount(),l=e.getLineContent().length);var h=e.getTokenStartIndex(u),p=new c(e,s,u,d,h,l);return n(s,p,t-h)},e}();t.AbstractSupport=d;var h=function(e){function t(t,i,r){e.call(this,t);var o=t,s=!1;void 0!==i&&(void 0!==r?(o=i,s=r):"boolean"==typeof i&&(s=i)),this.customization=o,this.supportsNestedModes=s,this.shouldGenerateEmbeddedModels=s,this.defaults={enterNestedMode:!n.isFunction(o.enterNestedMode),getNestedMode:!n.isFunction(o.getNestedMode),getNestedModeInitialState:!n.isFunction(o.getNestedModeInitialState),getLeavingNestedModeData:!n.isFunction(o.getLeavingNestedModeData),onReturningFromNestedMode:!n.isFunction(o.onReturningFromNestedMode)}}return __extends(t,e),t.prototype.getInitialState=function(){return this.customization.getInitialState()},t.prototype.tokenize=function(e,t,n,i){return void 0===n&&(n=0),void 0===i&&(i=n+e.length),t.getMode()!==this.mode?this._nestedTokenize(e,t,n,i,[],[]):this._myTokenize(e,t,n,i,[],[])},t.prototype._nestedTokenize=function(e,t,n,i,r,o){for(var s=t.getStateData(),u=this.getLeavingNestedModeData(e,s),l=t;l.getStateData()&&l.getStateData().getMode()!==this.mode;)l=l.getStateData();var c=l.getMode();
if(!u){var d;return d=c.tokenizationSupport?c.tokenizationSupport.tokenize(e,t,n,i):a.nullTokenize(c,e,t,n),d.tokens=r.concat(d.tokens),d.modeTransitions=o.concat(d.modeTransitions),d}var h=u.nestedModeBuffer;if(h.length>0){var p;p=c.tokenizationSupport?c.tokenizationSupport.tokenize(h,t,n,i):a.nullTokenize(c,h,t,n),t=p.endState,r=r.concat(p.tokens),o=o.concat(p.modeTransitions)}var f=u.bufferAfterNestedMode,g=u.stateAfterNestedMode;return g.setStateData(s.getStateData()),this.onReturningFromNestedMode(g,t),this._myTokenize(f,g,n+h.length,i,r,o)},t.prototype._myTokenize=function(e,n,i,r,a,u){var c,d,h=new o.LineStream(e),p=null,f=null;n=n.clone(),(u.length<=0||u[u.length-1].mode!==this.mode)&&u.push({startIndex:i,mode:this.mode});for(var g=Math.min(r-i,e.length),m=s.Bracket.None;h.pos()<g;){d=h.pos();do{if(c=n.tokenize(h),null===c||void 0===c||(void 0===c.type||null===c.type)&&(void 0===c.nextState||null===c.nextState))throw new Error("Tokenizer must return a valid state");if(c.nextState&&(c.nextState.setStateData(n.getStateData()),n=c.nextState),h.pos()<=d)throw new Error("Stream did not advance while tokenizing. Mode id is "+this.mode.getId()+' (stuck at token type: "'+c.type+'", prepend tokens: "'+a.map(function(e){return e.type}).join(",")+'").')}while(!c.type&&""!==c.type);if((p!==c.type||c.bracket||null===p)&&a.push(new l(d+i,c.type,c.bracket||m)),p=c.type,this.supportsNestedModes&&this.enterNestedMode(n)){var v=this._getEmbeddedLevel(n);if(v<t.MAX_EMBEDDED_LEVELS){var y=this.getNestedModeInitialState(n);if(!h.eos()){var _=e.substr(h.pos()),b=this._nestedTokenize(_,y.state,i+h.pos(),r,a,u);return b.retokenize=b.retokenize||y.missingModePromise,b}n=y.state,f=y.missingModePromise}}}return{tokens:a,actualStopOffset:h.pos()+i,modeTransitions:u,endState:n,retokenize:f}},t.prototype._getEmbeddedLevel=function(e){for(var t=-1;e;)t++,e=e.getStateData();return t},t.prototype.enterNestedMode=function(e){return this.defaults.enterNestedMode?!1:this.customization.enterNestedMode(e)},t.prototype.getNestedMode=function(e){return this.defaults.getNestedMode?null:this.customization.getNestedMode(e)},t.prototype.getNestedModeInitialState=function(e){if(this.defaults.getNestedModeInitialState){var t,n=this.getNestedMode(e),i=n.missingModePromise;return t=n.mode.tokenizationSupport?n.mode.tokenizationSupport.getInitialState():new a.NullState(n.mode,null),t.setStateData(e),{state:t,missingModePromise:i}}return this.customization.getNestedModeInitialState(e)},t.prototype.getLeavingNestedModeData=function(e,t){return this.defaults.getLeavingNestedModeData?null:this.customization.getLeavingNestedModeData(e,t)},t.prototype.onReturningFromNestedMode=function(e,t){return this.defaults.onReturningFromNestedMode?null:this.customization.onReturningFromNestedMode(e,t)},t.MAX_EMBEDDED_LEVELS=5,t}(d);t.TokenizationSupport=h;var p=function(e){function t(t,i){void 0===i&&(i=t),e.call(this,t),this.defaults={getElectricCharacters:!n.isFunction(i.getElectricCharacters),onElectricCharacter:!n.isFunction(i.onElectricCharacter),onEnter:!n.isFunction(i.onEnter)},this.customization=i}return __extends(t,e),t.prototype.getElectricCharacters=function(){return this.defaults.getElectricCharacters?[]:this.customization.getElectricCharacters()},t.prototype.onElectricCharacter=function(e,t){var n=this;return this._dispatchToMode(e,t,function(e,t,i){return n.mode===e?n.defaults.onElectricCharacter?null:n.customization.onElectricCharacter(t,i):e.electricCharacterSupport?e.electricCharacterSupport.onElectricCharacter(t,i):null})},t.prototype.onEnter=function(e,t){var n=this;return this._dispatchToMode(e,t,function(e,t,i){return n.mode===e?n.defaults.onEnter?null:n.customization.onEnter(t,i):e.electricCharacterSupport?e.electricCharacterSupport.onEnter(t,i):null})},t}(d);t.ElectricCharacterSupport=p;var f=function(e){function t(t,n){e.call(this,t),this.brackets=n}return __extends(t,e),t.prototype.getElectricCharacters=function(){return this.brackets.getElectricBrackets()},t.prototype.onElectricCharacter=function(e,t){var n=this;return this._dispatchToMode(e,t,function(e,t,i){return n.mode===e?n.brackets.onElectricCharacter(t,i):e.electricCharacterSupport?e.electricCharacterSupport.onElectricCharacter(t,i):null})},t.prototype.onEnter=function(e,t){var n=this;return this._dispatchToMode(e,t,function(e,t,i){return n.mode===e?n.brackets.onEnter(t,i):e.electricCharacterSupport?e.electricCharacterSupport.onEnter(t,i):null})},t}(d);t.BracketElectricCharacterSupport=f;var g=function(e){function t(t,n,i){void 0===i&&(i=n),e.call(this,t),this._autoClosingPairs=n,this._surroundingPairs=i}return __extends(t,e),t.prototype.getAutoClosingPairs=function(){return this._autoClosingPairs},t.prototype.shouldAutoClosePair=function(e,t,n){var i=this;return this._dispatchToMode(t,n,function(t,n,r){if(i.mode===t){if(0===n.getTokenCount())return!1;for(var o=n.findIndexOfOffset(r-1),s=n.getTokenType(o),a=0;a<i._autoClosingPairs.length;++a)if(i._autoClosingPairs[a].open===e){if(i._autoClosingPairs[a].notIn)for(var u=0;u<i._autoClosingPairs[a].notIn.length;++u)if(s.indexOf(i._autoClosingPairs[a].notIn[u])>-1)return!1;break}return!0}return t.characterPairSupport?t.characterPairSupport.shouldAutoClosePair(e,n,r):null})},t.prototype.getSurroundingPairs=function(){return this._surroundingPairs},t}(d);t.CharacterPairSupport=g;var m=function(){function e(){}return e.prototype.valueSetsReplace=function(e,t,n){for(var i=null;e.length>0&&null===i;)i=this.valueSetReplace(e.pop(),t,n);return i},e.prototype.valueSetReplace=function(e,t,n){var i=e.indexOf(t);return i>=0?(i+=n?1:-1,0>i?i=e.length-1:i%=e.length,e[i]):null},e}();t.ReplaceSupport=new m;var v=function(){function e(e,t){void 0===t&&(t=null),this.resourceService=e,this.defaults={textReplace:!t||!n.isFunction(t.textReplace),navigateValueSetFallback:!t||!n.isFunction(t.navigateValueSetFallback)},this.customization=t}return e.prototype.navigateValueSet=function(e,t,n){var i=this.doNavigateValueSet(e,t,n,!0);return i&&i.value&&i.range?r.TPromise.as(i):this.defaults.navigateValueSetFallback?r.TPromise.as(null):this.customization.navigateValueSetFallback(e,t,n)},e.prototype.doNavigateValueSet=function(e,t,n,i){var r,o=this.resourceService.get(e),s={range:null,value:null};if(i)t.startColumn===t.endColumn&&(t.endColumn+=1),r=o.getValueInRange(t),s.range=t;else{var a={lineNumber:t.startLineNumber,column:t.startColumn},u=o.getWordAtPosition(a,!0,!0);if(!u||-1===u.startColumn)return null;r=u.word,s.range={startLineNumber:t.startLineNumber,endLineNumber:t.endLineNumber,startColumn:u.startColumn,endColumn:u.endColumn}}var l=this.numberReplace(r,n);if(null!==l)s.value=l;else{var c=this.textReplace(r,n);if(null!==c)s.value=c;else if(i)return this.doNavigateValueSet(e,t,n,!1)}return s},e.prototype.numberReplace=function(e,t){var n=Math.pow(10,e.length-(e.lastIndexOf(".")+1)),i=Number(e),r=parseFloat(e);return isNaN(i)||isNaN(r)||i!==r?null:0!==i||t?(i=Math.floor(i*n),i+=t?n:-n,String(i/n)):null},e.prototype.textReplace=function(e,t){return this.defaults.textReplace?null:this.customization.textReplace(e,t)},e}();t.InplaceReplaceSupport=v}),define("vs/platform/plugins",["require","exports","vs/base/lib/winjs.base","vs/base/errors"],function(e,t,n,i){function r(e){m.INSTANCE.registerPlugins(e)}function o(e){m.INSTANCE.registerPlugin(e)}function s(){return m.INSTANCE.getAllPluginDescriptions()}function a(e,t){m.INSTANCE.registerPointListener(e,t)}function u(e){return m.INSTANCE.activateByEvent(e)}function l(e){void 0===e&&(e=[]),m.INSTANCE.registrationDone(e)}function c(){return m.INSTANCE.onReady()}function d(e){m.INSTANCE=e.accept(m.INSTANCE)}function h(e){if(!Array.isArray(e))return!1;for(var t=0,n=e.length;n>t;t++)if("string"!=typeof e[t])return!1;return!0}var p=Object.hasOwnProperty,f=this.MonacoPlugins||{},g=this;t.registerPlugins=r,t.registerPlugin=o,t.getAllPluginDescriptions=s,t.registerPointListener=a,t.activateByEvent=u,t.registrationDone=l,t.onReady=c,t.replacePluginManager=d;var m=function(){function t(e){var t=this;e?(this._onReady=n.TPromise.as(!0),this._onReadyC=function(){}):this._onReady=new n.TPromise(function(e){t._onReadyC=e},function(){console.warn("Should really not cancel this ready promise!")}),this._MonacoPlugins=f,this.activatingPlugins={},this.activatedPlugins={},this._pointListeners={};for(var i in this._MonacoPlugins)if(p.call(this._MonacoPlugins,i)){var r=this._isInvalidPluginDescription(this._MonacoPlugins[i]);if(r)throw new Error("Detected invalid plugin description: "+r)}}return t.prototype.registrationDone=function(e){e.forEach(function(e){return i.onUnexpectedError(e)}),this._onReadyC(!0)},t.prototype.onReady=function(){return this._onReady},t.prototype.accept=function(e){if(this._MonacoPlugins=e._MonacoPlugins,Object.keys(e.activatingPlugins).length>0)throw new Error("Unexpected plugin activation occured");if(Object.keys(e.activatedPlugins).length>0)throw new Error("Unexpected plugin activation occured");return this._pointListeners=e._pointListeners,this},t.prototype.registerPointListener=function(e,t){this._pointListeners[e]=this._pointListeners[e]||[],this._pointListeners[e].push(t),this._triggerPointListeners(e,this._getAllPluginDescriptionsByPoint(e))},t.prototype._triggerPointListeners=function(e,t){if(t&&0!==t.length&&p.call(this._pointListeners,e))for(var n=this._pointListeners[e].slice(0),i=0;i<n.length;i++)n[i](t)},t.prototype.registerPlugins=function(e){for(var t=0,n=e.length;n>t;t++)this.registerPlugin(e[t])},t.prototype.registerPlugin=function(e){var t=this._isInvalidPluginDescription(e);if(t)throw new Error("Invalid plugin description: "+t);if(p.call(this._MonacoPlugins,e.pluginId)&&console.warn("Plugin `"+e.pluginId+"` is already registered"),e.contributes)for(var n in e.contributes)p.call(e.contributes,n)&&this._triggerPointListeners(n,[e]);this._MonacoPlugins[e.pluginId]=e},t.prototype._getAllPluginDescriptionsByPoint=function(e){var t=[];for(var n in this._MonacoPlugins)if(p.call(this._MonacoPlugins,n)){var i=this._MonacoPlugins[n];p.call(i.contributes,e)&&t.push(i)}return t},t.prototype.getAllPluginDescriptions=function(){var e=[];for(var t in this._MonacoPlugins)p.call(this._MonacoPlugins,t)&&e.push(this._MonacoPlugins[t]);return e},t.prototype.activateByEvent=function(e){var t=this;return this._onReady.then(function(){var n=t.getAllPluginDescriptions(),i=n.filter(function(n){return p.call(t.activatedPlugins,n.pluginId)?!1:n.activationEvents?n.activationEvents.indexOf(e)>=0:!1});return t._activatePlugins(i)})},t.prototype._activatePlugins=function(e){var t=this;e.forEach(function(e){if("undefined"!=typeof e.dependencies)throw new Error("Not implemented ")});var i=e.map(function(e){return t._activatePlugin(e)});return n.TPromise.join(i)},t.prototype._activatePlugin=function(e){var t=this;return p.call(this.activatedPlugins,e.pluginId)?n.TPromise.as(this.activatedPlugins):p.call(this.activatingPlugins,e.pluginId)?this.activatingPlugins[e.pluginId]:(this.activatingPlugins[e.pluginId]=this._actualActivatePlugin(e).then(function(n){return t.activatedPlugins[e.pluginId]=n,delete t.activatingPlugins[e.pluginId],n}),this.activatingPlugins[e.pluginId])},t._callActivate=function(e,t){if(void 0===t&&(t=[]),"function"!=typeof e.activate)return n.TPromise.as(e);var i=[{}].concat(t);try{return n.TPromise.as(e.activate.apply(g,i))}catch(r){return n.TPromise.wrapError(r)}},t._loadAMDModule=function(t){return new n.TPromise(function(n,i){e([t],function(e){n(e)},i)})},t.prototype._actualActivatePlugin=function(e){return t._loadAMDModule(e.mainModule).then(function(n){return t._callActivate(n,e.mainModuleExtra)})},t.prototype._isInvalidPluginDescription=function(e){return"string"!=typeof e.pluginId?"Could not find property `pluginId`":"undefined"==typeof e.dependencies||h(e.dependencies)?"undefined"==typeof e.activationEvents||h(e.activationEvents)?"undefined"!=typeof e.mainModule&&"string"!=typeof e.mainModule?"Property `mainModule` is not a string":"undefined"==typeof e.mainModuleExtra||Array.isArray(e.mainModuleExtra)?void 0:"Property `mainModuleExtra` is not an array":"Property `activationEvents` is not a string array":"Property `dependencies` is not a string array"},t.INSTANCE=new t(!0),t}();t.PluginManager=m});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/modesExtensions",["require","exports","vs/base/lib/winjs.base","vs/base/strings","vs/platform/platform","./modesFilters","vs/editor/modes/nullMode","vs/platform/services","vs/platform/thread/nullThreadService","vs/platform/thread/attribute","./supports","vs/platform/plugins","vs/base/errors","vs/base/objects","vs/base/env","vs/base/mime","vs/base/eventEmitter"],function(e,t,n,i,r,o,s,a,u,l,c,d,h,p,f,g,m){function v(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e.getLineContent().length<=t)return!1;for(var o=e.findIndexOfOffset(t),s=e.getTokenType(o),a=0,u=n.length;u>a;a++)if(i.endsWith(s,n[a]))return!0;return!1}function y(e){return V[e]||X.INSTANCE.getModeIdForLanguageNameLowercase(e)}function _(e,t){return null===e&&null===t?!0:null===e||null===t?!1:e.equals(t)}function b(e){return e?e.clone():null}function w(e){U.push(e)}function C(e,n,i,o){var s=r.Registry.as(t.Extensions.EditorModes);s.registerMode(e,n,i,o)}function E(e,n,i,o){var s=r.Registry.as(t.Extensions.EditorModes);s.registerMode(e,n,i,o),s.getOrCreateMode(e)}function S(e,t,n,i,r){C(e,t,n,new a.AsyncDescriptor(i,r))}function T(e,n){var i=r.Registry.as(t.Extensions.EditorModes);i.configureModeById(e,n)}function L(e){var n=r.Registry.as(t.Extensions.EditorModes);return n.getOrCreateMode(e)}function x(e){var n=r.Registry.as(t.Extensions.EditorModes);return n.getMode(e)}function M(e,n,i){var o=r.Registry.as(t.Extensions.EditorModes);o.registerWorkerParticipant(e,new a.AsyncDescriptor(n,i))}function N(e,t,n){var i=q.getThreadService()||u.NULL_THREAD_SERVICE;return i.isInMainThread&&G.instantiateModeInWorkers(n),i.createInstance(t,{id:n}).then(function(e){return e.configSupport&&e.configSupport.configure(K.getConfigurationForMode(n)),e})}function k(e,t){q.registerModeSupport(e,"tokenizationSupport",t)}function I(e,t){q.registerModeSupport(e,"commentsSupport",function(){return t})}function O(e,t){q.registerModeSupport(e,"electricCharacterSupport",t)}function P(e,t){q.registerModeSupport(e,"tokenTypeClassificationSupport",function(){return t})}function R(e,t){q.registerModeSupport(e,"inplaceReplaceSupport",function(){return t})}function D(e,t){q.registerModeSupport(e,"characterPairSupport",t)}t.createWordRegExp=s.createWordRegExp;var A=Object.prototype.hasOwnProperty;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),w="F".charCodeAt(0);return function(C,E){var S=C.charCodeAt(0);switch(E){case 1:return S===e;case 2:return S>=e&&t>=S;case 3:return S>=e&&n>=S;case 4:return S>=e&&i>=S;case 5:return S>=e&&r>=S;case 6:return S>=e&&o>=S;case 7:return S>=e&&s>=S;case 8:return S>=e&&a>=S;case 9:return S>=e&&u>=S;case 10:return S>=e&&l>=S;case 11:return S>=e&&l>=S||S===c||S===m;case 12:return S>=e&&l>=S||S>=c&&d>=S||S>=m&&v>=S;case 13:return S>=e&&l>=S||S>=c&&h>=S||S>=m&&y>=S;case 14:return S>=e&&l>=S||S>=c&&p>=S||S>=m&&_>=S;case 15:return S>=e&&l>=S||S>=c&&f>=S||S>=m&&b>=S;default:return S>=e&&l>=S||S>=c&&g>=S||S>=m&&w>=S}}}(),t.isLineToken=v;var W=function(){function t(e,t,n){void 0===n&&(n=null),this._resourceService=e.resourceService,this._instantiationService=e.instantiationService,this._threadService=e.threadService,this._modelService=e.modelService,this._descriptor=t,this._workerDescriptor=n||a.AsyncDescriptor.create("vs/languages/nullWorker","NullWorker"),this._options=null,this.autoValidateDelay=500,this.modelSyncSupport=this,this.occurrencesSupport=this,this.suggestSupport=this,this.inplaceReplaceSupport=this,this.diffSupport=this,this.dirtyDiffSupport=this,this.linkSupport=this,this.configSupport=this,this.commentsSupport=this,this.tokenTypeClassificationSupport=this,this._workerPiecePromise=null}return t.prototype.getId=function(){return this._descriptor.id},t.prototype.creationDone=function(){this._threadService.isInMainThread&&this._pickAWorkerToValidate()},t.prototype._getOrCreateWorker=function(){var e=this;return this._workerPiecePromise||(this._workerPiecePromise=t._loadModule(this._workerDescriptor.moduleName).then(function(){var t=q.getWorkerParticipants(e._descriptor.id);return n.TPromise.join(t.map(function(t){return e._instantiationService.createInstance(t)}))}).then(function(t){return e._instantiationService.createInstance(e._workerDescriptor,e,t)})),this._workerPiecePromise},t._loadModule=function(t){return new n.TPromise(function(n,i){e([t],n,i)},function(){})},t.prototype._worker=function(e){return this._getOrCreateWorker().then(e)},t.prototype.bindModel=function(e){this._modelService&&this._modelService.addModel(e)},t.prototype.unbindModel=function(e){this._modelService&&this._modelService.removeModel(e)},t.prototype._pickAWorkerToValidate=function(){return this._worker(function(e){return e.enableValidator()})},t.prototype.getFilter=function(){return o.DefaultFilter},t.prototype.suggest=function(e,t){return this._worker(function(n){return n.suggest(e,t)})},t.prototype.getTriggerCharacters=function(){return[]},t.prototype.shouldAutotriggerSuggest=function(e,n,i){return c.handleEvent(this,e,n,function(e,n,r){return e.suggestSupport?e instanceof t?e.shouldAutotriggerSuggestImpl(n,r,i):e.suggestSupport.shouldAutotriggerSuggest(n,r,i):!1})},t.prototype.shouldAutotriggerSuggestImpl=function(){return!1},t.prototype.shouldShowEmptySuggestionList=function(){return!0},t.prototype.shouldTriggerParameterHints=function(){return!0},t.prototype.findOccurrences=function(e,t,n){return void 0===n&&(n=!1),this._worker(function(i){return i.findOccurrences(e,t,n)})},t.prototype.navigateValueSet=function(e,t,n){return this._worker(function(i){return i.inplaceReplaceSupport.navigateValueSet(e,t,n)})},t.prototype.computeDiff=function(e,t,n){return this._worker(function(i){return i.computeDiff(e,t,n)})},t.prototype.computeDirtyDiff=function(e,t){return this._worker(function(n){return n.computeDirtyDiff(e,t)})},t.prototype.computeLinks=function(e){return this._worker(function(t){return t.computeLinks(e)})},t.prototype.configure=function(e){return this._options=e,this._threadService.isInMainThread?this._configureWorkers(e):this._worker(function(t){return t.configure(e)})},t.prototype._configureWorkers=function(e){return this._worker(function(t){return t.configure(e)})},t.prototype.getNonWordTokenTypes=function(){return[]},t.prototype.getWordDefinition=function(){return s.NullMode.DEFAULT_WORD_REGEXP},t.prototype.getCommentsConfiguration=function(){return null},t.prototype._getMirrorModelAtPosition=function(e,t){var n=this._resourceService.get(e);return n.getEmbeddedAtPosition(t)},t.prototype._delegateToModeAtPosition=function(e,t,n){var i=this._resourceService.get(e);if(!i)return null;var r=i.getEmbeddedAtPosition(t);if(!r)return n(!1,i);var o=r.getMode();return n(o.getId()!==this.getId(),r)},t.prototype._delegateToAllModes=function(e,t){var n=this._resourceService.get(e);return n?t(n.getAllEmbedded()):null},t.$_pickAWorkerToValidate=l.OneWorker(t,t.prototype._pickAWorkerToValidate,a.ThreadAffinity.Group1),t.$suggest=l.OneWorker(t,t.prototype.suggest),t.$findOccurrences=l.OneWorker(t,t.prototype.findOccurrences),t.$navigateValueSet=l.OneWorker(t,t.prototype.navigateValueSet),t.$computeDiff=l.OneWorker(t,t.prototype.computeDiff),t.$computeDirtyDiff=l.OneWorker(t,t.prototype.computeDirtyDiff),t.$computeLinks=l.OneWorker(t,t.prototype.computeLinks),t.$_configureWorkers=l.AllWorkers(t,t.prototype._configureWorkers),t}();t.AbstractMode=W;var H;!function(e){function t(e,t,n,r){var o;o=n?'<div style="white-space: pre;">':{tagName:"div",style:"white-space: pre",children:[]};for(var s=e.split("\n"),a=t.tokenizationSupport.getInitialState(),u=0;u<s.length;u++){var l=s[u],c=0,d=t.tokenizationSupport.tokenize(l,a);a=d.endState;for(var h=d.tokens,p=0;p<h.length;p++){var f=h[p];e="",p<h.length-1?(e=l.substring(c,h[p+1].startIndex),c=h[p+1].startIndex):e=l.substr(c);var g=[];r&&g.push(r),g.push("token"),f.type&&g.push(f.type.replace(/\./g," ")),n?o+='<span class="'+g.join(" ")+'">'+i.escape(e)+"</span>":o.children.push({tagName:"span",className:g.join(" "),text:e})}u<s.length-1&&(n?o+="<br />":o.children.push({tagName:"br"}))}return o}e.tokenize=t}(H=t.TextToHtmlTokenizer||(t.TextToHtmlTokenizer={}));var V={bat:"text/x-bat",coffeescript:"text/x-coffeescript",coffee:"text/x-coffeescript",cpp:"text/x-cpp",csharp:"text/x-csharp",css:"text/css",fsharp:"text/x-fsharp",handlebars:"text/x-handlebars-template",htm:"text/html",html:"text/html",xhtml:"text/html",ini:"text/x-ini",jade:"text/x-jade",java:"text/x-java-source",javascript:"text/javascript",js:"text/javascript",json:"application/json",less:"text/x-less",lua:"text/x-lua",markdown:"text/x-web-markdown",php:"application/x-php",text:"text/plain",powershell:"text/x-powershell",ps:"text/x-powershell",ps1:"text/x-powershell",razor:"text/x-cshtml",sass:"text/x-scss",scss:"text/x-scss",typescript:"text/typescript",ts:"text/typescript",vb:"text/x-vb",xml:"text/xml"};t.languageAliasToMime=y,t.LANGUAGE_CONFIGURATION="languages";var F=function(){function e(){}return e.apply=function(e){if(e&&e[t.LANGUAGE_CONFIGURATION]){var n=e[t.LANGUAGE_CONFIGURATION],i=r.Registry.as(t.Extensions.EditorModes);for(var o in n)if(n.hasOwnProperty(o)){var s=n[o];i.configureModeById(o,s)}}},e}();t.ModesConfiguration=F;var z=function(){function e(e,t){void 0===t&&(t=null),this.mode=e,this.stateData=t}return e.prototype.getMode=function(){return this.mode},e.prototype.clone=function(){var e=this.makeClone();return e.initializeFrom(this),e},e.prototype.makeClone=function(){throw new Error("Abstract Method")},e.prototype.initializeFrom=function(e){this.stateData=null!==e.stateData?e.stateData.clone():null},e.prototype.getStateData=function(){return this.stateData},e.prototype.setStateData=function(e){this.stateData=e},e.prototype.equals=function(t){return null===t||this.mode!==t.getMode()?!1:t instanceof e?_(this.stateData,t.stateData):!1},e.prototype.tokenize=function(){throw new Error("Abstract Method")},e}();t.AbstractState=z,t.safeStateEquals=_,t.safeStateClone=b,t.Extensions={EditorModes:"editor.modes"};var B=function(e){function t(t,n){e.call(this,t,{id:n}),this._eventEmitter=new m.EventEmitter}return __extends(t,e),t.prototype.registerSupport=function(e,t){var n=t(this);this[e]=n;var i={modelSyncSupport:!1,tokenizationSupport:!1,occurrencesSupport:!1,declarationSupport:!1,typeDeclarationSupport:!1,navigateTypesSupport:!1,referenceSupport:!1,suggestSupport:!1,parameterHintsSupport:!1,extraInfoSupport:!1,outlineSupport:!1,logicalSelectionSupport:!1,formattingSupport:!1,inplaceReplaceSupport:!1,diffSupport:!1,dirtyDiffSupport:!1,emitOutputSupport:!1,linkSupport:!1,configSupport:!1,electricCharacterSupport:!1,commentsSupport:!1,characterPairSupport:!1,tokenTypeClassificationSupport:!1,quickFixSupport:!1};i[e]=!0,this._eventEmitter.emit("modeSupportChanged",i)},t.prototype.addSupportChangedListener=function(e){return this._eventEmitter.addListener2("modeSupportChanged",e)},t}(W),U=[];t.registerThreadServiceListener=w;var j=function(){function e(){this._threadService=null,this._activationPromises={},this._instantiatedModes={},this._frankensteinModes={}}return e.prototype.getThreadService=function(){return this._threadService},e.prototype.setThreadService=function(e){null===this._threadService&&(this._threadService=e,U.forEach(function(t){return t(e)}),G.register(e),K.register(e))},e.prototype.registerWorkerParticipant=function(e,t){var n={pluginId:e+":"+t.moduleName+"."+t.ctorName+".impl",activationEvents:["mode:"+e],something:t,isFake:!0};d.registerPlugin(n)},e.prototype.getWorkerParticipants=function(e){return d.getAllPluginDescriptions().filter(function(t){return"undefined"!=typeof t.activationEvents?t.activationEvents.indexOf("mode:"+e)>=0:!1}).map(function(e){return e.something})},e.prototype.isRegisteredMode=function(e){return X.INSTANCE.isRegisteredMode(e)},e.prototype.getRegisteredModes=function(){return X.INSTANCE.getRegisteredModes()},e.prototype.getRegisteredMimetypes=function(){return X.INSTANCE.getRegisteredMimetypes()},e.prototype.getRegisteredLanguageNames=function(){return X.INSTANCE.getRegisteredLanguageNames()},e.prototype.getLanguageName=function(e){return X.INSTANCE.getLanguageName(e)},e.prototype.registerMode=function(e,t,n,i){var r={};n.forEach(function(t){return r[t]=e});var o={};o[t]=e;var s={};s[e]=!0;var a={pluginId:e+".impl",isFake:!0,activationEvents:["textModel:"+e],mainModule:"vs/editor/modes/modesExtensions",mainModuleExtra:[i,e,!1],contributes:{language:[{id:e,aliases:[t],__isCompat:!0,__mimes:n}]},forceLoadingInUI:!0};d.registerPlugin(a)},e.prototype.configureMode=function(e,t){var n=this.getModeId(e);n&&this.configureModeById(n,t)},e.prototype.configureModeById=function(e,t){K.configureModeById(e,t)},e.prototype.lookup=function(e){for(var t=[],n=X.INSTANCE.extractModeIds(e),i=0;i<n.length;i++){var r=n[i];t.push({modeId:r,isInstantiated:this._instantiatedModes.hasOwnProperty(r)})}return t},e.prototype.getMode=function(e){for(var t=X.INSTANCE.extractModeIds(e),n=!1,i=0;i<t.length;i++){if(this._instantiatedModes.hasOwnProperty(t[i]))return this._instantiatedModes[t[i]];n=n||"vs.languages.plainText"===t[i]}if(f.isTesting()||n){var r=null;return this.getOrCreateMode(e).then(function(e){r=e}).done(null,h.onUnexpectedError),r}},e.prototype.getModeId=function(e){var t=X.INSTANCE.extractModeIds(e);return t.length>0?t[0]:null},e.prototype.getModeIdByLanguageName=function(e){var t=X.INSTANCE.getModeIdsFromLanguageName(e);return t.length>0?t[0]:null},e.prototype.getModeIdByFilename=function(e){var t=X.INSTANCE.getModeIdsFromFilename(e);return t.length>0?t[0]:null},e.prototype.getOrCreateMode=function(e){var t=this;return d.onReady().then(function(){var n=t.getModeId(e);return t._getOrCreateMode(n||"vs.languages.plainText")})},e.prototype.getOrCreateModeByLanguageName=function(e){var t=this;return d.onReady().then(function(){var n=t.getModeIdByLanguageName(e);return t._getOrCreateMode(n||"vs.languages.plainText")})},e.prototype.getOrCreateModeByFilename=function(e){var t=this;return d.onReady().then(function(){var n=t.getModeIdByFilename(e);return t._getOrCreateMode(n||"vs.languages.plainText")})},e.prototype._getOrCreateMode=function(e){var t=this;return this._instantiatedModes.hasOwnProperty(e)?n.TPromise.as(this._instantiatedModes[e]):this._activationPromises.hasOwnProperty(e)?this._activationPromises[e]:(this._activationPromises[e]=this._createMode(e).then(function(n){return t._instantiatedModes[e]=n,delete t._activationPromises[e],t._instantiatedModes[e]}),this._activationPromises[e])},e.prototype._createMode=function(e){var t=this,n="textModel:"+e;if(X.INSTANCE.isCompat(e))return d.activateByEvent(n).then(function(t){if(t=t.filter(function(e){return!!e}),0===t.length)return console.warn("mode not found: "+e),null;if(1===t.length)return t[0];throw new Error("Cannot have more than one mode!")});var i=this._threadService||u.NULL_THREAD_SERVICE;return i.isInMainThread&&G.instantiateModeInWorkers(e),this._frankensteinModes.hasOwnProperty(e)||(this._frankensteinModes[e]=i.createInstance(B,e)),d.activateByEvent(n).then(function(){return t._frankensteinModes[e]})},e.prototype.registerModeSupport=function(e,t,n){if(!this._frankensteinModes.hasOwnProperty(e)){if(X.INSTANCE.isCompat(e))return console.warn("Cannot register support "+t+" on mode "+e+" because it is not a Frankenstein mode"),void 0;var i=this._threadService||u.NULL_THREAD_SERVICE;this._frankensteinModes[e]=i.createInstance(B,e)}var r=this._frankensteinModes[e];r.registerSupport(t,n)},e}(),q=new j;r.Registry.add(t.Extensions.EditorModes,q),t.registerModeAsyncDescriptor=C,t.registerCustomMonarchMode=E,t.registerMode=S,t.configureMode=T,t.getOrCreateMode=L,t.getMode=x,t.registerWorkerParticipant=M;var G=function(){function e(){}return e.register=function(t){e.INSTANCE_REGISTERED||(e.INSTANCE_REGISTERED=!0,t.registerInstance(e.INSTANCE))},e.instantiateModeInWorkers=function(t){e.register(u.NULL_THREAD_SERVICE),e.INSTANCE._instantiateInWorkers(t)},e.prototype.getId=function(){return"vs.editor.modes.modeInstantiator"},e.prototype._instantiateInWorkers=function(e){q._getOrCreateMode(e).done(null,h.onUnexpectedError)},e.INSTANCE=new e,e.INSTANCE_REGISTERED=!1,e.$_instantiateInWorkers=l.AllWorkers(e,e.prototype._instantiateInWorkers),e}(),K=function(){function e(e){void 0===e&&(e={}),this._config=e}return e.configureModeById=function(t,n){e.INSTANCE._configureModeById(t,n)},e.getConfigurationForMode=function(t){return e.INSTANCE._getConfigurationForMode(t)},e.register=function(t){if(!(e.INSTANCE instanceof $)){var n=new $(e.INSTANCE);t.registerInstance(n),e.INSTANCE=n}},e.prototype._configureModeById=function(e,t){var n=this._config[e]||{},i=p.mixin(p.clone(n),t);return p.equals(n,i)?!1:(this._config[e]=i,!0)},e.prototype._getConfigurationForMode=function(e){return this._config[e]||{}},e.INSTANCE=new e,e}(),$=function(e){function t(t){e.call(this,t._config)}return __extends(t,e),t.prototype.getId=function(){return"vs.editor.modes.modeConfigurator"},t.prototype.getSerializableState=function(){return this._config},t.prototype.setData=function(e){this._config=e},t.prototype._configureModeById=function(t,n){if(e.prototype._configureModeById.call(this,t,n)){var i=q.getMode(t);i&&i.configSupport&&i.configSupport.configure(this._getConfigurationForMode(t))}},t.$_configureModeById=l.Everywhere(t,t.prototype._configureModeById),t}(K);t.activate=N,t.registerTokenizationSupport=k,t.registerCommentsSupport=I,t.registerElectricCharacterSupport=O,t.registerTokenTypeClassificationSupport=P,t.registerInplaceReplaceSupport=R,t.registerCharacterPairSupport=D;var X=function(){function e(){var e=this;this.knownModeIds={},this.mime2LanguageId={},this.name2LanguageId={},this.id2Name={},this.isCompatModeId={},this.lowerName2Id={},d.registerPointListener("language",function(t){return e._onLanguages(t)})}return e.prototype._onLanguages=function(e){for(var t=0;t<e.length;t++){var n=e[t].contributes.language;if(Array.isArray(n))for(var i=0;i<n.length;i++)this._onLanguage(e[t],n[i]);else console.warn("Ignoring `language` point for "+e[t].pluginId)}},e.prototype._onLanguage=function(e,t){if("string"!=typeof t.id)return console.warn("Ignoring `language` point for "+e.pluginId),void 0;this.knownModeIds[t.id]=!0;var n=null;if("undefined"!=typeof t.__mimes&&Array.isArray(t.__mimes))for(var i=0;i<t.__mimes.length;i++)n||(n=t.__mimes[i]),this.mime2LanguageId[t.__mimes[i]]=t.id;if(n||(n="text/x-"+t.id,this.mime2LanguageId[n]=t.id),"undefined"!=typeof t.extensions&&Array.isArray(t.extensions))for(var i=0;i<t.extensions.length;i++)g.registerTextMime(t.extensions[i],n);if("undefined"!=typeof t.filenames&&Array.isArray(t.filenames))for(var i=0;i<t.filenames.length;i++)g.registerTextMime(t.filenames[i],n);var r=null;if("undefined"!=typeof t.aliases&&Array.isArray(t.aliases))for(var i=0;i<t.aliases.length;i++)t.aliases[i]&&0!==t.aliases[i].length&&(r||(r=t.aliases[i]),this.name2LanguageId[t.aliases[i]]=t.id,this.lowerName2Id[t.aliases[i].toLowerCase()]=t.id);r||(r=t.id),this.id2Name[t.id]=r,"undefined"!=typeof t.__isCompat&&(this.isCompatModeId[t.id]=!0)},e.prototype.isRegisteredMode=function(e){return A.call(this.mime2LanguageId,e)?!0:A.call(this.knownModeIds,e)},e.prototype.getRegisteredModes=function(){return Object.keys(this.knownModeIds)
},e.prototype.getRegisteredMimetypes=function(){return Object.keys(this.mime2LanguageId)},e.prototype.getRegisteredLanguageNames=function(){return Object.keys(this.name2LanguageId)},e.prototype.getLanguageName=function(e){return this.id2Name[e]||null},e.prototype.getModeIdForLanguageNameLowercase=function(e){return this.lowerName2Id[e]||null},e.prototype.extractModeIds=function(e){var t=this;return e?e.split(",").map(function(e){return e.trim()}).map(function(e){return t.mime2LanguageId[e]||e}).filter(function(e){return t.knownModeIds[e]}):[]},e.prototype.getModeIdsFromLanguageName=function(e){return e?A.call(this.name2LanguageId,e)?[this.name2LanguageId[e]]:[]:[]},e.prototype.getModeIdsFromFilename=function(e){if(!e)return[];var t=g.guessMimeTypes(e);return this.extractModeIds(t.join(","))},e.prototype.isCompat=function(e){return this.isCompatModeId[e]||!1},e.INSTANCE=new e,e}()}),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",LINE_NUMBERS:"line-numbers",GLYPH_MARGIN:"glyph-margin",SCROLL_DECORATION:"scroll-decoration",VIEW_CURSORS_LAYER:"cursors-layer",VIEW_ZONES:"view-zones"},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/editor/core/view/lines/viewLineParts",["require","exports","vs/base/arrays"],function(e,t,n){function i(e,t,n,i,r){return i.length>0?new s(e,n,t,i,r):new o(n,t,r)}function r(e,t){if(0===e.length)return e;var n=/^[ \t]*/.exec(t)[0].length;if(0===n)return e;e=e.slice(0);for(var i=0,r=e.length;r>i&&e[i].startIndex<n;i++){var o=i===r-1?t.length:e[i+1].startIndex;if(!(n>=o)){var s={type:e[i].type+" whitespace",startIndex:e[i].startIndex},a={type:e[i].type,startIndex:n};e.splice(i,1,s,a);break}e[i]={type:e[i].type+" whitespace",startIndex:e[i].startIndex}}return e}t.createLineParts=i;var o=function(){function e(e,t,n){this.lineTokens=e,this.parts=n?r(e.getTokens(),t):e.getTokens()}return e.prototype.getParts=function(){return this.parts},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 n.findIndexInSegmentsArray(this.parts,e)},e}();t.FastViewLineParts=o;var s=function(){function e(e,t,n,i,o){for(var s,u,l,d=c.normalize(e,i),h=0,p=d.length,f=t.getTokens(),g=[],m=0,v=f.length;v>m;m++){for(s=f[m].startIndex,u=v>m+1?f[m+1].startIndex:t.getTextLength(),l=f[m].type;p>h&&d[h].startOffset<u;){if(d[h].startOffset>s&&(g.push(new a(s,l)),s=d[h].startOffset),g.push(new a(s,l+" "+d[h].className)),d[h].endOffset>=u){s=u;break}s=d[h].endOffset+1,h++}u>s&&g.push(new a(s,l))}this.parts=o?r(g,n):g,this.lastPartIndex=g.length-1,this.lastEndOffset=u}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=s;var a=function(){function e(e,t){this.startIndex=e,this.type=t}return e}(),u=function(){function e(e,t,n){this.startOffset=e,this.endOffset=t,this.className=n}return e}();t.DecorationSegment=u;var l=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]<e;){for(var i=0;i+1<this.count&&this.stopOffsets[i]===this.stopOffsets[i+1];)i++;n.push(new u(t,this.stopOffsets[i],this.classNames.join(" "))),t=this.stopOffsets[i]+1,this.stopOffsets.splice(0,i+1),this.classNames.splice(0,i+1),this.count-=i+1}return this.count>0&&e>t&&(n.push(new u(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<this.count;n++)if(this.stopOffsets[n]>=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t);break}this.count++},e}(),c=function(){function e(){}return e.normalize=function(t,n){var i=[];if(0===n.length)return i;var r,o,s,a,u,c=new l,d=0;for(a=0,u=n.length;u>a;a++)r=n[a],r.range.endLineNumber<t||r.range.startLineNumber>t||(r.range.startLineNumber!==r.range.endLineNumber||r.range.startColumn!==r.range.endColumn)&&(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=c});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","vs/base/dom/dom"],function(e,t,n,i,r,o){function s(e,t){return e.top===t.top?e.left-t.left:e.top-t.top}function a(e,t,n){var i=e.findIndexOfOffset(t);return n>=i?i:n}function u(e){return new f(e)}function l(e){return new g(e)}function c(e){return new p(e)}function d(e){var t=e.lineContent,n={charOffsetInPart:[],hasOverflowed:!1,lastRenderedPartIndex:0,partsCount:0,output:[]},i=0;if(n.output.push("<span>"),t.length>0){var r,o,s,a,u=t.length,l=-1,c=0,d=0,h=0,p="",f=e.tabSize,g=e.stopRenderingLineAfter,m=e.renderWhitespace,T=e.parts;for(-1!==g&&u>g-1&&(p=t.substr(g-1,1),u=g-1,n.hasOverflowed=!0),o=0;u>o;o++){switch(o===c&&(l++,c=l+1<T.length?T[l+1].startIndex:Number.MAX_VALUE,o>0&&n.output.push("</span>"),i++,n.output.push('<span class="'),s="token "+T[l].type.replace(/[^a-z0-9\-]/gi," "),n.output.push(s),n.output.push('">'),h=0),n.charOffsetInPart[o]=h,r=t.charCodeAt(o),m=m&&(r===y||r===v),r){case y:for(a=f-(o+d)%f,d+=a-1,h+=a-1,a>0&&(n.output.push(m?"&rarr;":"&nbsp;"),a--);a>0;)n.output.push("&nbsp;"),a--;break;case v:n.output.push(m?"&middot;":"&nbsp;");break;case _:n.output.push("&lt;");break;case b:n.output.push("&gt;");break;case w:n.output.push("&amp;");break;case 0:n.output.push("&#00;");break;case E:n.output.push(S);break;case C:n.output.push("&#8203");break;default:n.output.push(t.charAt(o))}h++}n.output.push("</span>"),n.charOffsetInPart[u]=h,n.lastRenderedPartIndex=l,p.length>0&&(n.output.push('<span class="'),n.output.push(s),n.output.push('" style="color:grey">'),n.output.push(p),n.output.push("&hellip;</span>"))}else n.output.push("<span>&nbsp;</span>");return n.output.push("</span>"),n.partsCount=i,n}var h=function(){function e(e,t,n,i){this.top=e,this.left=t,this.width=n,this.height=i}return e}(),p=function(){function e(e){this._context=e,this._domNode=null,this._isInvalid=!0,this._isMaybeInvalid=!1,this._lineParts=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,t){var n=null;return(this._isMaybeInvalid||this._isInvalid)&&(n=this._computeLineParts(e,t)),this._isMaybeInvalid&&(this._isInvalid||this._lineParts&&this._lineParts.equals(n)||(this._isInvalid=!0),this._isMaybeInvalid=!1),this._isInvalid&&(this._lineParts=n),this._isInvalid},e.prototype.getLineOuterHTML=function(e,t,n){e.push('<div lineNumber="'),e.push(t.toString()),e.push('" style="top:'),e.push(n.toString()),e.push("px;height:"),e.push(this._context.configuration.editor.lineHeight.toString()),e.push('px;" class="'),e.push(i.ClassNames.VIEW_LINE),e.push('">'),e.push(this.getLineInnerHTML(t)),e.push("</div>")},e.prototype.getLineInnerHTML=function(e){return this._isInvalid=!1,this._renderMyLine(e,this._lineParts).join("")},e.prototype.layoutLine=function(e,t){var n=this._domNode.getAttribute("lineNumber");n!==e.toString()&&this._domNode.setAttribute("lineNumber",e.toString()),o.StyleMutator.setTop(this._domNode,t),o.StyleMutator.setHeight(this._domNode,this._context.configuration.editor.lineHeight)},e.prototype._computeLineParts=function(e,t){return r.createLineParts(e,this._context.model.getLineContent(e),this._context.model.getLineTokens(e),t,this._context.configuration.editor.renderWhitespace)},e.prototype._renderMyLine=function(e,t){this._bustReadingCache();var n=d({lineContent:this._context.model.getLineContent(e),tabSize:this._context.configuration.getIndentationOptions().tabSize,stopRenderingLineAfter:this._context.configuration.editor.stopRenderingLineAfter,renderWhitespace:this._context.configuration.editor.renderWhitespace,parts:t.getParts()});return this._charOffsetInPart=n.charOffsetInPart,this._hasOverflowed=n.hasOverflowed,this._lastRenderedPartIndex=n.lastRenderedPartIndex,n.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,s){var a=this._context.configuration.editor.stopRenderingLineAfter;return-1!==a&&t>a&&n>a?null:(-1!==a&&t>a&&(t=a),-1!==a&&n>a&&(n=a),this._readVisibleRangesForRange(e,t,n,i,r,o,s))},e.prototype._readVisibleRangesForRange=function(e,t,n,i,r,o,a){var u;if(u=t===n?this._readRawVisibleRangesForPosition(e,t,i,r,o,a):this._readRawVisibleRangesForRange(e,t,n,i,r,o,a),!u||u.length<=1)return u;u.sort(s);for(var l,c=[],d=u[0],h=1,p=u.length;p>h;h++)l=u[h],d.left+d.width+.001>=l.left?d.width=Math.max(d.width,l.left+l.width-d.left):(c.push(d),d=l);return c.push(d),c},e.prototype._readRawVisibleRangesForPosition=function(e,t,n,i,r,o){if(0===this._charOffsetInPart.length){var s=this._readRawVisibleRangesForEntireLine(n,i,r);return s[0].width=0,s}var u=a(this._lineParts,t-1,this._lastRenderedPartIndex),l=this._charOffsetInPart[t-1];return this._readRawVisibleRangesFrom(this._getReadingTarget(),u,l,u,l,n,i,r,o)},e.prototype._readRawVisibleRangesForRange=function(e,t,n,i,r,o,s){if(1===t&&n===this._charOffsetInPart.length)return this._readRawVisibleRangesForEntireLine(i,r,o);var u=a(this._lineParts,t-1,this._lastRenderedPartIndex),l=this._charOffsetInPart[t-1],c=a(this._lineParts,n-1,this._lastRenderedPartIndex),d=this._charOffsetInPart[n-1];return this._readRawVisibleRangesFrom(this._getReadingTarget(),u,l,c,d,i,r,o,s)},e.prototype._readRawVisibleRangesForEntireLine=function(e){var t=this._domNode.getBoundingClientRect();return[new h(t.top-e,0,this._getReadingTarget().offsetWidth,t.height)]},e.prototype._readRawVisibleRangesFrom=function(e,t,n,i,r,o,s,a,u){var l=m.createRange();try{var c=0,d=e.children.length-1;if(c>d)return null;t=Math.min(d,Math.max(c,t)),i=Math.min(d,Math.max(c,i));var h=e.children[t].firstChild,p=e.children[i].firstChild;if(!h||!p)return null;n=Math.min(h.textContent.length,Math.max(0,n)),r=Math.min(p.textContent.length,Math.max(0,r)),l.setStart(h,n),l.setEnd(p,r);var f=l.getClientRects(),g=null;return f.length>0&&(g=this._createRawVisibleRangesFromClientRects(f,o,s,a)),g}catch(v){return null}finally{m.detachRange(l,u)}},e.prototype._createRawVisibleRangesFromClientRects=function(e,t,n,i){var r,o,s=e.length,a=[];for(o=0;s>o;o++)r=e[o],a.push(new h(r.top-t-n,Math.max(0,r.left-i),r.width,r.height));return a},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+1<r.length?(o=r[i+1].startIndex,s=this._charOffsetInPart[o-1]+this._charOffsetInPart[o]):(o=this._context.model.getLineMaxColumn(e)-1,s=this._charOffsetInPart[o]);var u,l=a,c=o;-1!==this._context.configuration.editor.stopRenderingLineAfter&&(c=Math.min(this._context.configuration.editor.stopRenderingLineAfter-1,o));for(var d,h,p,f,g;c>l;){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}(),f=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype._createRawVisibleRangesFromClientRects=function(e,t,n,i){var r,o,s=e.length,a=[],u=screen.logicalYDPI/screen.deviceYDPI,l=screen.logicalXDPI/screen.deviceXDPI;for(a=new Array(s),o=0;s>o;o++)r=e[o],a[o]=new h(r.top*u-t-n,Math.max(0,r.left*l-i),r.width*l,r.height*u);return a},t}(p),g=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype._readVisibleRangesForRange=function(t,n,i,r,o,s,a){var u=e.prototype._readVisibleRangesForRange.call(this,t,n,i,r,o,s,a);if(!u||0===u.length||n===i||1===n&&i===this._charOffsetInPart.length)return u;var l=this._readRawVisibleRangesForPosition(t,i-1,r,o,s,a),c=this._readRawVisibleRangesForPosition(t,i,r,o,s,a);if(l&&l.length>0&&c&&c.length>0){var d=l[0],h=c[0],p=!0;d.top===h.top&&(p=d.left<=h.left);var f=u[u.length-1];p&&f.top===h.top&&f.left<h.left?f.width=h.left-f.left:f.top>h.top&&u.splice(u.length-1,1)}return u},t}(p),m=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=function(){return window.screen&&window.screen.deviceXDPI&&(navigator.userAgent.indexOf("Trident/6.0")>=0||navigator.userAgent.indexOf("Trident/5.0")>=0)?u:n.browser.isWebKit?l:c}();var v=" ".charCodeAt(0),y="	".charCodeAt(0),_="<".charCodeAt(0),b=">".charCodeAt(0),w="&".charCodeAt(0),C="\r".charCodeAt(0),E=65279,S="�";t.renderLine=d}),define("vs/editor/standalone/colorizer",["require","exports","vs/base/lib/winjs.base","vs/editor/modes/modesExtensions","vs/platform/platform","vs/base/time/schedulers","vs/editor/core/view/lines/viewLine","vs/editor/editor"],function(e,t,n,i,r,o,s,a){function u(e,t){t=t||{};var n=t.theme||"vs",i=t.mimeType||e.getAttribute("lang")||e.getAttribute("data-lang");if(!i)return console.error("Mode not detected"),void 0;var r=e.firstChild.nodeValue;e.className+="monaco-editor "+n;var o=function(t){e.innerHTML=t};return l(r,i,t).then(o,function(e){return console.error(e)},o)}function l(e,t,i){i=i||{},"undefined"==typeof i.tabSize&&(i.tabSize=4);var r,s,a,u,l=e.split("\n"),c=!1,d=new n.TPromise(function(e,t,n){r=e,s=t,a=n},function(){c=!0}),f=new o.RunOnceScheduler(function(){if(!c){var e=h(l,u,i.tabSize);e.retokenize.length>0?(e.retokenize.forEach(function(e){return e.then(g)}),a(e.result)):r(e.result)}},0),g=function(){return f.schedule()};return p.getOrCreateMode(t).then(function(e){return e?e.tokenizationSupport?(u=e,g(),void 0):(s('Mode found ("'+e.getId()+'"), but does not support tokenization.'),void 0):(s('Mode not found: "'+t+'".'),void 0)}),d}function c(e,t,n){void 0===n&&(n=4);var i=s.renderLine({lineContent:e,parts:t,stopRenderingLineAfter:-1,renderWhitespace:!1,tabSize:n});return i.output.join("")}function d(e,t,n){void 0===n&&(n=4);var i=e.getLineContent(t),r=e.getLineTokens(t,!1),o=a.LineTokensBinaryEncoding.inflateArr(r.getBinaryEncodedTokensMap(),r.getBinaryEncodedTokens());return c(i,o,n)}function h(e,t,n){var i,r,o,a,u,l=t.tokenizationSupport,c=[],d=l.getInitialState(),h=[];for(i=0,r=e.length;r>i;i++)o=e[i],a=l.tokenize(o,d),a.retokenize&&h.push(a.retokenize),u=s.renderLine({lineContent:o,parts:a.tokens,stopRenderingLineAfter:-1,renderWhitespace:!1,tabSize:n}),c=c.concat(u.output),c.push("<br/>"),d=a.endState;return{result:c.join(""),retokenize:h}}var p=r.Registry.as(i.Extensions.EditorModes);t.colorizeElement=u,t.colorize=l,t.colorizeLine=c,t.colorizeModelLine=d}),define("vs/editor/core/config/config",["require","exports","vs/base/env","vs/editor/core/internalConstants"],function(e,t,n,i){function r(e,t){return n.isMacintosh?{shift:e,alt:!0,key:t}:{ctrlCmd:!0,shift:e,key:t}}var o=function(){function e(){this.editor={lineHeight:20,lineNumbers:!0,selectOnLineNumbers:!0,lineNumbersMinChars:n.enableDebug?3:5,glyphMargin:n.enableDebug,lineDecorationsWidth:10,revealHorizontalRightPadding:30,tabSize:"auto",insertSpaces:"auto",roundedSelection:!0,theme:"vs",pageSize:1,readOnly:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1},overviewRulerLanes:2,hideCursorInOverviewRuler:!1,scrollBeyondLastLine:!0,automaticLayout:!1,wrappingColumn:300,wordWrapBreakBeforeCharacters:"{([+",wordWrapBreakAfterCharacters:" 	})]?|&,;",wordWrapBreakObtrusiveCharacters:".",tabFocusMode:!1,forcedTokenizationBoundary:1e3,longLineBoundary:300,isDominatedByLongLines:!1,hover:!0,contextmenu:!0,quickSuggestions:!0,quickSuggestionsDelay:10,iconsInSuggestions:!0,autoClosingBrackets:!0,formatOnType:!0,suggestOnTriggerCharacters:!0,selectionHighlight:!0,outlineMarkers:!1},this.keyBindings={}}return e.prototype.addKeyBinding=function(e,t){this.keyBindings[e]=this.keyBindings[e]||[],this.keyBindings[e].push(t)},e}();t.ConfigClass=o,t.Config=new o,t.Config.addKeyBinding(i.Handler.CursorLeft,{key:"LeftArrow"}),t.Config.addKeyBinding(i.Handler.CursorLeftSelect,{shift:!0,key:"LeftArrow"}),t.Config.addKeyBinding(i.Handler.CursorRight,{key:"RightArrow"}),t.Config.addKeyBinding(i.Handler.CursorRightSelect,{shift:!0,key:"RightArrow"}),t.Config.addKeyBinding(i.Handler.CursorUp,{key:"UpArrow"}),t.Config.addKeyBinding(i.Handler.CursorUpSelect,{shift:!0,key:"UpArrow"}),t.Config.addKeyBinding(i.Handler.CursorDown,{key:"DownArrow"}),t.Config.addKeyBinding(i.Handler.CursorDownSelect,{shift:!0,key:"DownArrow"}),t.Config.addKeyBinding(i.Handler.CursorPageUp,{key:"PageUp"}),t.Config.addKeyBinding(i.Handler.CursorPageUpSelect,{shift:!0,key:"PageUp"}),t.Config.addKeyBinding(i.Handler.CursorPageDown,{key:"PageDown"}),t.Config.addKeyBinding(i.Handler.CursorPageDownSelect,{shift:!0,key:"PageDown"}),t.Config.addKeyBinding(i.Handler.CursorHome,{key:"Home"}),t.Config.addKeyBinding(i.Handler.CursorHomeSelect,{shift:!0,key:"Home"}),t.Config.addKeyBinding(i.Handler.CursorEnd,{key:"End"}),t.Config.addKeyBinding(i.Handler.CursorEndSelect,{shift:!0,key:"End"}),t.Config.addKeyBinding(i.Handler.Tab,{key:"Tab"}),t.Config.addKeyBinding(i.Handler.Outdent,{shift:!0,key:"Tab"}),t.Config.addKeyBinding(i.Handler.DeleteLeft,{key:"Backspace"}),t.Config.addKeyBinding(i.Handler.DeleteLeft,{shift:!0,key:"Backspace"}),t.Config.addKeyBinding(i.Handler.DeleteRight,{key:"Delete"}),t.Config.addKeyBinding(i.Handler.DeleteRight,{shift:!0,key:"Delete"}),t.Config.addKeyBinding(i.Handler.SelectAll,{ctrlCmd:!0,key:"A"}),t.Config.addKeyBinding(i.Handler.Escape,{key:"Escape"}),t.Config.addKeyBinding(i.Handler.CursorWordLeft,r(!1,"LeftArrow")),t.Config.addKeyBinding(i.Handler.CursorWordLeftSelect,r(!0,"LeftArrow")),t.Config.addKeyBinding(i.Handler.CursorWordRight,r(!1,"RightArrow")),t.Config.addKeyBinding(i.Handler.CursorWordRightSelect,r(!0,"RightArrow")),t.Config.addKeyBinding(i.Handler.CursorDownSelect,r(!0,"DownArrow")),t.Config.addKeyBinding(i.Handler.CursorUpSelect,r(!0,"UpArrow")),t.Config.addKeyBinding(i.Handler.DeleteWordLeft,r(!1,"Backspace")),t.Config.addKeyBinding(i.Handler.DeleteWordRight,r(!1,"Delete")),n.isMacintosh?(t.Config.addKeyBinding(i.Handler.CursorTop,{ctrlCmd:!0,key:"UpArrow"}),t.Config.addKeyBinding(i.Handler.CursorTopSelect,{ctrlCmd:!0,shift:!0,key:"UpArrow"}),t.Config.addKeyBinding(i.Handler.CursorBottom,{ctrlCmd:!0,key:"DownArrow"}),t.Config.addKeyBinding(i.Handler.CursorBottomSelect,{ctrlCmd:!0,shift:!0,key:"DownArrow"}),n.browser.isOpera?(t.Config.addKeyBinding(i.Handler.Undo,{winCtrl:!0,key:"Z"}),t.Config.addKeyBinding(i.Handler.Redo,{winCtrl:!0,key:"Y"})):(t.Config.addKeyBinding(i.Handler.Undo,{ctrlCmd:!0,key:"Z"}),t.Config.addKeyBinding(i.Handler.Redo,{ctrlCmd:!0,shift:!0,key:"Z"})),t.Config.addKeyBinding(i.Handler.CursorHome,{ctrlCmd:!0,key:"LeftArrow"}),t.Config.addKeyBinding(i.Handler.CursorHomeSelect,{ctrlCmd:!0,shift:!0,key:"LeftArrow"}),t.Config.addKeyBinding(i.Handler.CursorEnd,{ctrlCmd:!0,key:"RightArrow"}),t.Config.addKeyBinding(i.Handler.CursorEndSelect,{ctrlCmd:!0,shift:!0,key:"RightArrow"}),t.Config.addKeyBinding(i.Handler.CursorHome,{winCtrl:!0,key:"A"}),t.Config.addKeyBinding(i.Handler.CursorLeft,{winCtrl:!0,key:"B"}),t.Config.addKeyBinding(i.Handler.DeleteRight,{winCtrl:!0,key:"D"}),t.Config.addKeyBinding(i.Handler.CursorEnd,{winCtrl:!0,key:"E"}),t.Config.addKeyBinding(i.Handler.CursorRight,{winCtrl:!0,key:"F"}),t.Config.addKeyBinding(i.Handler.DeleteLeft,{winCtrl:!0,key:"H"}),t.Config.addKeyBinding(i.Handler.DeleteAllRight,{winCtrl:!0,key:"K"}),t.Config.addKeyBinding(i.Handler.CursorDown,{winCtrl:!0,key:"N"}),t.Config.addKeyBinding(i.Handler.LineBreakInsert,{winCtrl:!0,key:"O"}),t.Config.addKeyBinding(i.Handler.CursorUp,{winCtrl:!0,key:"P"}),t.Config.addKeyBinding(i.Handler.CursorPageDown,{winCtrl:!0,key:"V"})):(t.Config.addKeyBinding(i.Handler.CursorTop,{ctrlCmd:!0,key:"Home"}),t.Config.addKeyBinding(i.Handler.CursorTopSelect,{ctrlCmd:!0,shift:!0,key:"Home"}),t.Config.addKeyBinding(i.Handler.CursorBottom,{ctrlCmd:!0,key:"End"}),t.Config.addKeyBinding(i.Handler.CursorBottomSelect,{ctrlCmd:!0,shift:!0,key:"End"}),t.Config.addKeyBinding(i.Handler.Undo,{ctrlCmd:!0,key:"Z"}),t.Config.addKeyBinding(i.Handler.Redo,{ctrlCmd:!0,key:"Y"}),t.Config.addKeyBinding(i.Handler.Redo,{ctrlCmd:!0,shift:!0,key:"Z"}))}),define("vs/platform/configuration/configurationRegistry",["require","exports","vs/nls!vs/editor/editor.main","vs/platform/platform","vs/base/objects"],function(e,t,n,i,r){t.Extensions={Configuration:"base.contributions.configuration"};var o=function(){function e(){this.configurationContributors=[],this.masterConfiguration={id:"configurationFile",title:n.localize("vs_platform_configuration_configurationRegistry",0),description:n.localize("vs_platform_configuration_configurationRegistry",1),type:"object",properties:{type:{type:"string",description:n.localize("vs_platform_configuration_configurationRegistry",2)},languages:{type:"object",description:n.localize("vs_platform_configuration_configurationRegistry",3),properties:{}}}}}return e.prototype.registerConfiguration=function(e){e=r.clone(e),this.configurationContributors.push(e),this.registerConfigurationNode(this.masterConfiguration,e.id.split("/"),e.id)},e.prototype.registerConfigurationNode=function(e,t,n){if(1===t.length)e.properties[t[0]]={type:"ref",$ref:n};else{var i=t.shift();e.properties[i]||(e.properties[i]={type:"object",properties:{}}),this.registerConfigurationNode(e.properties[i],t,n)}},e.prototype.getConfigurations=function(){return this.configurationContributors.slice(0)},e.prototype.getConfigurationSchemas=function(){var e=this.getConfigurations();return e.push(this.masterConfiguration),e},e}();i.Registry.add(t.Extensions.Configuration,new o)}),define("vs/editor/core/handlerDispatcher",["require","exports"],function(e,t){var n=function(){function e(e,t){this.source=e,this.data=t}return e.prototype.getSource=function(){return this.source},e.prototype.getData=function(){return this.data},e}();t.DispatcherEvent=n;var i=function(){function e(){this.registry={}}return e.prototype.setHandler=function(e,t){this.registry[e]=t},e.prototype.clearHandlers=function(){this.registry={}},e.prototype.getHandler=function(e){return this.registry.hasOwnProperty(e)?this.registry[e]:null},e.prototype.trigger=function(e,t,i){var r=this.getHandler(t),o=!1;if(r){var s=new n(e,i);o=r(s)}return o},e}();t.HandlerDispatcher=i}),define("vs/editor/core/config/elementSizeObserver",["require","exports"],function(e,t){var n=function(){function e(e,t){this.referenceDomElement=e,this.changeCallback=t,this.measureReferenceDomElementToken=-1,this.width=-1,this.height=-1,this.measureReferenceDomElement(!1)}return e.prototype.getWidth=function(){return this.width},e.prototype.getHeight=function(){return this.height},e.prototype.dispose=function(){this.stopObserving()},e.prototype.startObserving=function(){var e=this;-1===this.measureReferenceDomElementToken&&(this.measureReferenceDomElementToken=window.setInterval(function(){return e.measureReferenceDomElement(!0)},100))},e.prototype.stopObserving=function(){-1!==this.measureReferenceDomElementToken&&(window.clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)},e.prototype.observe=function(e){this.measureReferenceDomElement(!0,e)},e.prototype.measureReferenceDomElement=function(e,t){var n=0,i=0;t?(n=t.width,i=t.height):this.referenceDomElement&&(n=this.referenceDomElement.clientWidth,i=this.referenceDomElement.clientHeight),n=Math.max(5,n),i=Math.max(5,i),(this.width!==n||this.height!==i)&&(this.width=n,this.height=i,e&&this.changeCallback())},e}();t.ElementSizeObserver=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/config/configuration",["require","exports","vs/nls!vs/editor/editor.main","vs/base/env","vs/editor/core/config/config","vs/base/objects","vs/base/types","vs/platform/platform","vs/platform/configuration/configurationRegistry","vs/editor/core/handlerDispatcher","vs/base/eventEmitter","vs/editor/core/constants","vs/base/strings","vs/base/dom/dom","vs/editor/core/config/elementSizeObserver"],function(e,t,n,i,r,o,s,a,u,l,c,d,h,p,f){function g(e){return Boolean(e)}function m(e,t,n){var i=parseInt(e,10);return"number"==typeof t&&(i=Math.max(t,i)),"number"==typeof n&&(i=Math.min(n,i)),i}var v=function(){function e(e){this._keyBindings=o.clone(r.Config.keyBindings),this._editor=o.clone(r.Config.editor),this._mergeOptionsIn(e)}return e.prototype.getKeyBindings=function(){return this._keyBindings},e.prototype.getEditorOptions=function(){return this._editor},e.prototype._mergeOptionsIn=function(e){this._editor=o.mixin(this._editor,e||{})},e.prototype.updateOptions=function(e){var t=Object.keys(e);t.push("stopLineTokenizationAfter"),t.push("stopRenderingLineAfter");for(var n={},i=0,r=t.length;r>i;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){if(!e.CACHE.hasOwnProperty(t)){var n=e._actualReadConfiguration(t);(n.lineHeight<=2||n.thinnestCharacterWidth<=2||n.maxDigitWidth<=2)&&(n.lineHeight=Math.max(n.lineHeight,n.fontSize,5),n.thinnestCharacterWidth=Math.max(n.thinnestCharacterWidth,n.fontSize,5),n.maxDigitWidth=Math.max(n.maxDigitWidth,n.fontSize,5),e._installChangeMonitor()),e.CACHE[t]=n}return e.CACHE[t]},e._installChangeMonitor=function(){-1===e._CHANGE_MONITOR_TIMEOUT&&(e._CHANGE_MONITOR_TIMEOUT=setTimeout(function(){e._CHANGE_MONITOR_TIMEOUT=-1,e._monitorForChanges()},500))},e._monitorForChanges=function(){var t=!1;for(var n in e.CACHE)if(e.CACHE.hasOwnProperty(n)){var i=e._actualReadConfiguration(n);i.lineHeight<=2||i.thinnestCharacterWidth<=2||i.maxDigitWidth<=2?t=!0:(e.CACHE[n]=i,e._invokeChangeListeners())}t&&e._installChangeMonitor()},e._invokeChangeListeners=function(){for(var t=e._CHANGE_LISTENERS.slice(0),n=0;n<t.length;n++)t[n]()},e.addChangeListener=function(t){e._CHANGE_LISTENERS.push(t)},e.removeChangeListener=function(t){for(var n=0;n<e._CHANGE_LISTENERS.length;n++)if(e._CHANGE_LISTENERS[n]===t){e._CHANGE_LISTENERS.splice(n,1);break}},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?"&nbsp;":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=o?parseInt(o.fontSize,10):0,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?e.font?e.font:e.fontFamily+" "+e.fontSize+" "+e.fontSizeAdjust+" "+e.fontStretch+" "+e.fontStyle+" "+e.fontVariant+" "+e.fontWeight+" ":"unknown"},e._USUAL_CHARS="0123456789|",e.CACHE={},e._CHANGE_LISTENERS=[],e._CHANGE_MONITOR_TIMEOUT=-1,e}(),_=function(e){function t(t,n,i){var r=this;void 0===n&&(n=null),void 0===i&&(i=null),e.call(this,[d.EventType.ConfigurationChanged]),this._cssBasedConfigurationChangeListener=function(){return r._onCSSBasedConfigurationChanged()},y.addChangeListener(this._cssBasedConfigurationChangeListener),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(r.editor.pageSize);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(0)}return __extends(t,e),t.prototype._onCSSBasedConfigurationChanged=function(){var e=this.editor;this.editor=this._computeInternalOptions(this.editor.pageSize);var t=this._createConfigurationChangedEvent([]);
t.lineHeight=this.editor.lineHeight!==e.lineHeight,t.thinnestCharacterWidth=this.editor.thinnestCharacterWidth!==e.thinnestCharacterWidth,t.maxDigitWidth=this.editor.maxDigitWidth!==e.maxDigitWidth,t.font=this.editor.font!==e.font,t.fontSize=this.editor.fontSize!==e.fontSize,this.emit(d.EventType.ConfigurationChanged,t)},t.prototype.observeReferenceElement=function(e){this._elementSizeObserver.observe(e)},t.prototype.dispose=function(){y.removeChangeListener(this._cssBasedConfigurationChangeListener),this._elementSizeObserver.dispose(),e.prototype.dispose.call(this)},t.prototype.getRawOptions=function(){return this._configWithDefaults.getEditorOptions()},t.prototype._computeInternalOptions=function(e){var t,n=this._configWithDefaults.getEditorOptions(),i=m(n.wrappingColumn,-1);t="undefined"!=typeof n.stopLineTokenizationAfter?m(n.stopLineTokenizationAfter,-1):i>=0?-1:1e4;var r;r="undefined"!=typeof n.stopRenderingLineAfter?m(n.stopRenderingLineAfter,-1):i>=0?-1:1e4;var o=this._getEditorClassName(n.theme),s=y.readConfiguration(o),a=this._elementSizeObserver.getWidth(),u=this._elementSizeObserver.getHeight();return{observedOuterWidth:a,observedOuterHeight:u,lineNumbers:n.lineNumbers,selectOnLineNumbers:g(n.selectOnLineNumbers),lineNumbersMinChars:m(n.lineNumbersMinChars,1),glyphMargin:g(n.glyphMargin),lineDecorationsWidth:m(n.lineDecorationsWidth,0),revealHorizontalRightPadding:m(n.revealHorizontalRightPadding,0),roundedSelection:g(n.roundedSelection),theme:n.theme,readOnly:g(n.readOnly),scrollbar:n.scrollbar,overviewRulerLanes:m(n.overviewRulerLanes,0,3),hideCursorInOverviewRuler:g(n.hideCursorInOverviewRuler),scrollBeyondLastLine:g(n.scrollBeyondLastLine),automaticLayout:g(n.automaticLayout),wrappingColumn:i,wordWrapBreakBeforeCharacters:n.wordWrapBreakBeforeCharacters,wordWrapBreakAfterCharacters:n.wordWrapBreakAfterCharacters,wordWrapBreakObtrusiveCharacters:n.wordWrapBreakObtrusiveCharacters,tabFocusMode:g(n.tabFocusMode),forcedTokenizationBoundary:m(n.forcedTokenizationBoundary),stopLineTokenizationAfter:t,stopRenderingLineAfter:r,renderWhitespace:g(n.renderWhitespace),longLineBoundary:m(n.longLineBoundary),hover:g(n.hover),contextmenu:g(n.contextmenu),quickSuggestions:g(n.quickSuggestions),quickSuggestionsDelay:m(n.quickSuggestionsDelay),iconsInSuggestions:g(n.iconsInSuggestions),autoClosingBrackets:g(n.autoClosingBrackets),formatOnType:g(n.formatOnType),suggestOnTriggerCharacters:g(n.suggestOnTriggerCharacters),selectionHighlight:g(n.selectionHighlight),outlineMarkers:g(n.outlineMarkers),lineHeight:s.lineHeight,pageSize:e,thinnestCharacterWidth:s.thinnestCharacterWidth,maxDigitWidth:s.maxDigitWidth,font:s.font,fontSize:s.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;s<o.length;s++){var a=o[s];e(a,r,{id:i})}});return i},t.prototype._createConfigurationChangedEvent=function(e){var t={observedOuterWidth:!1,observedOuterHeight:!1,lineHeight:!1,pageSize:!1,thinnestCharacterWidth:!1,maxDigitWidth:!1,font:!1,fontSize:!1,isDominatedByLongLines:!1,lineNumbers:!1,selectOnLineNumbers:!1,lineNumbersMinChars:!1,glyphMargin:!1,lineDecorationsWidth:!1,revealHorizontalRightPadding:!1,roundedSelection:!1,theme:!1,readOnly:!1,scrollbar:!1,overviewRulerLanes:!1,hideCursorInOverviewRuler:!1,scrollBeyondLastLine:!1,automaticLayout:!1,wrappingColumn:!1,wordWrapBreakBeforeCharacters:!1,wordWrapBreakAfterCharacters:!1,wordWrapBreakObtrusiveCharacters:!1,tabFocusMode:!1,stopLineTokenizationAfter:!1,stopRenderingLineAfter:!1,longLineBoundary:!1,forcedTokenizationBoundary:!1,hover:!1,contextmenu:!1,quickSuggestions:!1,quickSuggestionsDelay:!1,iconsInSuggestions:!1,autoClosingBrackets:!1,formatOnType:!1,suggestOnTriggerCharacters:!1,selectionHighlight:!1,outlineMarkers:!1};if(e.length>0)for(var n=0;n<e.length;n++)t[e[n]]=!0;return t},t.prototype.updateOptions=function(e){var t=this._configWithDefaults.updateOptions(e);this.editor=this._computeInternalOptions(this.editor.pageSize),this._computedIndentationOptions=null,t.length>0&&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.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:"false"===e.insertSpaces?!1:!!e.insertSpaces,tabSize:parseInt(e.tabSize,10)};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;t<e.length;t++)"	"===e.charAt(t)?i+=n.tabSize:i++;var r="";if(!n.insertSpaces){var o=Math.floor(i/n.tabSize);for(i%=n.tabSize,t=0;o>t;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<e.tabSize;n++)t+=" ";return t}return"	"},t}(c.EventEmitter);t.Configuration=_;var b=function(){function e(){}return e.apply=function(t,n){if(t){var i=n;s.isArray(n)||(i=[n]);for(var r=0;r<i.length;r++){var o=i[r];if(o&&s.isFunction(o.updateOptions)){var a=o.getEditorType();switch(a){case d.EditorType.ICodeEditor:case d.EditorType.IDiffEditor:var u=t[e.EDITOR_SECTION];u&&(delete u.readOnly,o.updateOptions(u));break;case d.EditorType.ITerminal:var l=t[e.TERMINAL_SECTION];l&&o.updateOptions(l)}}}}},e.EDITOR_SECTION="editor",e.TERMINAL_SECTION="console",e}();t.EditorConfiguration=b;var w=a.Registry.as(u.Extensions.Configuration);w.registerConfiguration({id:b.EDITOR_SECTION,type:"object",title:n.localize("vs_editor_core_config_configuration",0),description:n.localize("vs_editor_core_config_configuration",1),properties:{lineNumbers:{type:"boolean",default:r.Config.editor.lineNumbers,description:n.localize("vs_editor_core_config_configuration",2)},glyphMargin:{type:"boolean",default:r.Config.editor.glyphMargin,description:n.localize("vs_editor_core_config_configuration",3)},tabSize:{oneOf:[{type:"number"},{type:"string",enum:["auto"]}],default:r.Config.editor.tabSize,minimum:1,description:n.localize("vs_editor_core_config_configuration",4)},insertSpaces:{oneOf:[{type:"boolean"},{type:"string",enum:["auto"]}],default:r.Config.editor.insertSpaces,description:n.localize("vs_editor_core_config_configuration",5)},roundedSelection:{type:"boolean",default:r.Config.editor.roundedSelection,description:n.localize("vs_editor_core_config_configuration",6)},scrollBeyondLastLine:{type:"boolean",default:r.Config.editor.scrollBeyondLastLine,description:n.localize("vs_editor_core_config_configuration",7)},wrappingColumn:{type:"integer",default:r.Config.editor.wrappingColumn,minimum:-1,description:n.localize("vs_editor_core_config_configuration",8)},quickSuggestions:{type:"boolean",default:r.Config.editor.quickSuggestions,description:n.localize("vs_editor_core_config_configuration",9)},quickSuggestionsDelay:{type:"integer",default:r.Config.editor.quickSuggestionsDelay,minimum:0,description:n.localize("vs_editor_core_config_configuration",10)},autoClosingBrackets:{type:"boolean",default:r.Config.editor.autoClosingBrackets,description:n.localize("vs_editor_core_config_configuration",11)},formatOnType:{type:"boolean",default:r.Config.editor.formatOnType,description:n.localize("vs_editor_core_config_configuration",12)},suggestOnTriggerCharacters:{type:"boolean",default:r.Config.editor.suggestOnTriggerCharacters,description:n.localize("vs_editor_core_config_configuration",13)},selectionHighlight:{type:"boolean",default:r.Config.editor.selectionHighlight,description:n.localize("vs_editor_core_config_configuration",14)},overviewRulerLanes:{type:"integer",default:3,description:n.localize("vs_editor_core_config_configuration",15)},hideCursorInOverviewRuler:{type:"boolean",default:r.Config.editor.hideCursorInOverviewRuler,description:n.localize("vs_editor_core_config_configuration",16)},renderWhitespace:{type:"boolean",default:r.Config.editor.renderWhitespace,description:n.localize("vs_editor_core_config_configuration",17)}}}),i.enableConsole&&w.registerConfiguration({id:b.TERMINAL_SECTION,type:"object",title:n.localize("vs_editor_core_config_configuration",18),description:n.localize("vs_editor_core_config_configuration",19),properties:{lineNumbers:{type:"boolean",default:!1,description:n.localize("vs_editor_core_config_configuration",20)},glyphMargin:{type:"boolean",default:!1,description:n.localize("vs_editor_core_config_configuration",21)},roundedSelection:{type:"boolean",default:!0,description:n.localize("vs_editor_core_config_configuration",22)},wrappingColumn:{type:"integer",default:0,minimum:-1,description:n.localize("vs_editor_core_config_configuration",23)},quickSuggestionsDelay:{type:"integer",default:50,minimum:0,description:n.localize("vs_editor_core_config_configuration",24)},scrollBeyondLastLine:{type:"boolean",default:!0,description:n.localize("vs_editor_core_config_configuration",25)},hideCursorInOverviewRuler:{type:"boolean",default:!0,description:n.localize("vs_editor_core_config_configuration",26)}}})}),define("vs/editor/core/command/shiftCommand",["require","exports","vs/editor/core/range"],function(e,t,n){var i=function(){function e(e,t,n){this._configuration=e,this._isUnshift=t,this._selection=n}return e.prototype.getEditOperations=function(e,t){var i=this._selection.startLineNumber,r=this._selection.endLineNumber;1===this._selection.endColumn&&i!==r&&(r-=1);var o;if(this._isUnshift){var s=this._configuration.getIndentationOptions().tabSize;for(o=i;r>=o;o++){var a,u=e.getLineContent(o);if("	"===u.charAt(0))a=1;else for(a=0;a<u.length&&s>a;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 n<e.getLineMaxColumn(t)?n+=1:t<e.getLineCount()&&(t+=1,n=1),{lineNumber:t,column:n}},e.prototype.getPositionUp=function(e,t,n,i,r){var o=this.visibleColumnFromColumn(e,t,n)+i;return t-=r,1>t?(t=1,n=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=e.getLineMaxColumn(t)):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(t,n,i){return e.visibleColumnFromColumn(t,n,i,this.configuration.getIndentationOptions().tabSize)},e.visibleColumnFromColumn=function(t,n,i,r){for(var o=t.getLineContent(n),s=0,a=0;i-1>a;a++)s="	"===o.charAt(a)?e.nextTabColumn(s,r):s+1;return s},e.prototype.columnFromVisibleColumn=function(t,n,i){for(var r=t.getLineContent(n),o=-1,s=0,a=0;a<r.length&&i>=s;a++)o=s,s="	"===r.charAt(a)?e.nextTabColumn(s,this.configuration.getIndentationOptions().tabSize):s+1;return s=Math.abs(i-s),o=Math.abs(i-o),o>s?a+1:a},e.nextTabColumn=function(e,t){return e+t-e%t},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()&&(e=this.model.matchBracket(this.position,!0));var i=[];if(e&&e.brackets){var r={stickiness:n.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,isOverlay:!1,className:"bracket-match"};i.push({range:e.brackets[0],options:r}),i.push({range:e.brackets[1],options:r})}this.bracketDecorations=this.model.deltaDecorations(this.bracketDecorations,i,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){void 0===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();i<l.startLineNumber||i===l.startLineNumber&&r<l.startColumn?(i=l.startLineNumber,r=l.startColumn):(i>l.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?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<this.model.getLineCount()&&(r=!0,n+=1,i=1);var s=this.helper.findWord(new o.Position(n,i),"right",!0);return i=s?s.end+1:this.model.getLineMaxColumn(n),this._moveModelPosition(t,"explicit",e,n,i,0,!0),!0},e.prototype.moveDown=function(e,t,n){var i,r,o=t?this.configuration.editor.pageSize:1;if(this.inSelectionMode&&!e){var s=this.getViewSelection(),a=this.viewModelHelper.validateViewPosition(s.endLineNumber,s.endColumn,this.getSelection().getEndPosition());i=a.lineNumber,r=a.column}else{var u=this._getValidViewPosition();i=u.lineNumber,r=u.column}var l=this.helper.getPositionDown(this.viewModelHelper.viewModel,i,r,this.leftoverVisibleColumns,o);return this._moveViewPosition(n,"explicit",e,l.lineNumber,l.column,l.leftoverVisibleColumns,!0),!0},e.prototype.translateDown=function(e){var t=this.getViewSelection(),n=this.helper.getPositionDown(this.viewModelHelper.viewModel,t.selectionStartLineNumber,t.selectionStartColumn,this.selectionStartLeftoverVisibleColumns,1);this._moveViewPosition(e,"explicit",!1,n.lineNumber,n.column,this.leftoverVisibleColumns,!0);var i=this.helper.getPositionDown(this.viewModelHelper.viewModel,t.positionLineNumber,t.positionColumn,this.leftoverVisibleColumns,1);return this._moveViewPosition(e,"explicit",!0,i.lineNumber,i.column,i.leftoverVisibleColumns,!0),this.selectionStartLeftoverVisibleColumns=n.leftoverVisibleColumns,!0},e.prototype.moveUp=function(e,t,n){var i,r,o=t?this.configuration.editor.pageSize:1;if(this.inSelectionMode&&!e){var s=this.getViewSelection(),a=this.viewModelHelper.validateViewPosition(s.startLineNumber,s.startColumn,this.getSelection().getStartPosition());i=a.lineNumber,r=a.column}else{var u=this._getValidViewPosition();i=u.lineNumber,r=u.column}var l=this.helper.getPositionUp(this.viewModelHelper.viewModel,i,r,this.leftoverVisibleColumns,o);return this._moveViewPosition(n,"explicit",e,l.lineNumber,l.column,l.leftoverVisibleColumns,!0),!0},e.prototype.translateUp=function(e){var t=this.getViewSelection(),n=this.helper.getPositionUp(this.viewModelHelper.viewModel,t.selectionStartLineNumber,t.selectionStartColumn,this.selectionStartLeftoverVisibleColumns,1);this._moveViewPosition(e,"explicit",!1,n.lineNumber,n.column,this.leftoverVisibleColumns,!0);var i=this.helper.getPositionUp(this.viewModelHelper.viewModel,t.positionLineNumber,t.positionColumn,this.leftoverVisibleColumns,1);return this._moveViewPosition(e,"explicit",!0,i.lineNumber,i.column,i.leftoverVisibleColumns,!0),this.selectionStartLeftoverVisibleColumns=n.leftoverVisibleColumns,!0},e.prototype.moveToBeginningOfLine=function(e,t){var n=this._getValidViewPosition(),i=n.lineNumber,r=n.column;return r=this.helper.getColumnAtBeginningOfLine(this.viewModelHelper.viewModel,i,r),this._moveViewPosition(t,"explicit",e,i,r,0,!0),!0},e.prototype.moveToEndOfLine=function(e,t){var n=this._getValidViewPosition(),i=n.lineNumber,r=n.column;return r=this.helper.getColumnAtEndOfLine(this.viewModelHelper.viewModel,i,r),this._moveViewPosition(t,"explicit",e,i,r,0,!0),!0},e.prototype.moveToBeginningOfBuffer=function(e,t){return this._moveModelPosition(t,"explicit",e,1,1,0,!0),!0},e.prototype.moveToEndOfBuffer=function(e,t){var n=this.model.getLineCount(),i=this.model.getLineMaxColumn(n);return this._moveModelPosition(t,"explicit",e,n,i,0,!0),!0},e.prototype.selectAll=function(e){var t,n,i,r,o=!0;if(this.model.hasEditableRange()){var s=this.model.getEditableRange(),a=this.getSelection();a.equalsRange(s)||(o=!1,t=s.startLineNumber,n=s.startColumn,i=s.endLineNumber,r=s.endColumn)}return o&&(t=1,n=1,i=this.model.getLineCount(),r=this.model.getLineMaxColumn(i)),this._moveModelPosition(e,null,!1,t,n,0,!1),this._moveModelPosition(e,null,!0,i,r,0,!1),e.shouldReveal=!1,e.shouldRevealHorizontal=!1,!0},e.prototype.line=function(e,t,n,i){var r,o=this.model.validatePosition(t);r=n?this.viewModelHelper.validateViewPosition(n.lineNumber,n.column,o):this.viewModelHelper.convertModelPositionToViewPosition(o.lineNumber,o.column);var a,u;if(e&&this.inSelectionMode)a=r.lineNumber,u=o.isBeforeOrEqual(this.selectionStart.getStartPosition())?1:this.viewModelHelper.viewModel.getLineMaxColumn(a);else{var l=new s.Range(r.lineNumber,1,r.lineNumber,this.viewModelHelper.viewModel.getLineMaxColumn(r.lineNumber)),c=this.viewModelHelper.convertViewToModelPosition(l.startLineNumber,l.startColumn),d=this.viewModelHelper.convertViewToModelPosition(l.endLineNumber,l.endColumn);this._startSelectionModeFromRange(new s.Range(c.lineNumber,c.column,d.lineNumber,d.column),l),a=l.endLineNumber,u=l.endColumn}i.cursorPositionChangeReason="explicit",i.shouldRevealHorizontal=!1;var h=this.viewModelHelper.convertViewToModelPosition(a,u);return this._setPosition(h.lineNumber,h.column,a,u,0),!0},e.prototype.word=function(e,t,n,i){var r,o,a,u,l=this.model.validatePosition(t),c=this.helper.findWord(l,n);if(e&&this.inSelectionMode)r=c?c.start+1:l.column,o=c?c.end+1:l.column,a=l.lineNumber,u=l.isBeforeOrEqual(this.selectionStart.getStartPosition())?r:o;else{if(c)r=c.start+1,o=c.end+1;else{var d=this.model.getLineMaxColumn(l.lineNumber);l.column===d||"left"===n?(r=l.column-1,o=l.column):(r=l.column,o=l.column+1),1>=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,o){void 0===n&&(n=this.position),void 0===o&&(o=this.getSelection()),t.shouldPushStackElementBefore=!0;var s,a=this.model.getLineContent(n.lineNumber),l=this.model.getLineContext(n.lineNumber);if(this.model.getMode().electricCharacterSupport)try{s=this.model.getMode().electricCharacterSupport.onEnter(l,n.column-1)}catch(c){d.onUnexpectedError(c)}var h=i.getLeadingWhitespace(a);if(h.length>n.column-1&&(h=h.substring(0,n.column-1)),s?(s.appendText?-1===i.firstNonWhitespaceIndex(s.appendText)&&(s.appendText=s.appendText):s.appendText=s.indentAction===r.IndentAction.None?"":"	",s.indentOutdentAppendText||(s.indentOutdentAppendText="")):s={indentAction:r.IndentAction.None,appendText:"",indentOutdentAppendText:""},s.indentAction===r.IndentAction.None)this.actualType("\n"+this.helper.normalizeIndentation(h+s.appendText),e,t,o);else if(s.indentAction===r.IndentAction.Indent)this.actualType("\n"+this.helper.normalizeIndentation(h+s.appendText),e,t,o);else if(s.indentAction===r.IndentAction.IndentOutdent){var p=this.helper.normalizeIndentation(h),f=this.helper.normalizeIndentation(h+s.appendText),g="\n"+f+"\n"+p+s.indentOutdentAppendText;t.executeCommand=e?new u.ReplaceCommandWithoutChangingPosition(o,g):new u.ReplaceCommandWithOffsetCursorState(o,g,-1,f.length-p.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.getLineContext(this.position.lineNumber),a=!1;try{a=this.model.getMode().characterPairSupport.shouldAutoClosePair(e,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.getLineContext(this.position.lineNumber);if(this.model.getMode().electricCharacterSupport)try{t=this.model.getMode().electricCharacterSupport.onElectricCharacter(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 w=-l.length;t.advanceCount&&(w+=t.advanceCount),e.shouldPushStackElementAfter=!0,e.executeCommand=new u.ReplaceCommandWithOffsetCursorState(this.getSelection(),l,0,w)}}},e.prototype.actualType=function(e,t,n,i){return void 0===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(n.cursorPositionChangeReason="paste",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+1<i?r.end+1:r.start+1:1;var o=new s.Range(n,i,n,this.position.column);if(!o.isEmpty())return e.executeCommand=new u.ReplaceCommand(o,""),!0}return this.deleteLeft(e)},e.prototype.deleteRight=function(e){var t=this.getSelection();if(t.isEmpty()){var n=this.helper.getRightOfPosition(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.deleteWordRight=function(e){var t=this.getSelection();if(t.isEmpty()){var n=this.position.lineNumber,i=this.position.column,r=this.model.getLineCount(),a=this.model.getLineMaxColumn(n);if(n===r&&i===a)return!0;var l=this.helper.findWord(new o.Position(n,i),"right",!0);i=l?l.start+1>i?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.deleteRight(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){void 0===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.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber?!1:t.lineNumber===e.startLineNumber&&t.column<e.startColumn?!1:t.lineNumber===e.endLineNumber&&t.column>e.endColumn?!1:!0},e.isPositionInsideRange=function(e,t){return e.lineNumber<t.startLineNumber?!1:e.lineNumber>t.endLineNumber?!1:e.lineNumber===t.startLineNumber&&e.column<t.startColumn?!1:e.lineNumber===t.endLineNumber&&e.column>t.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;n<e.length;n++)t.push({index:n,selection:e[n].getSelection()});t.sort(function(e,t){return e.selection.startLineNumber===t.selection.startLineNumber?e.selection.startColumn-t.selection.startColumn:e.selection.startLineNumber-t.selection.startLineNumber});for(var r=0;r<t.length-1;r++){var o=t[r],s=t[r+1],a=o.selection,u=s.selection;if(u.getStartPosition().isBeforeOrEqual(a.getEndPosition())){var l=o.index<s.index?r:r+1,c=o.index<s.index?r+1:r,d=t[c].index,h=t[l].index,p=t[c].selection,f=t[l].selection;if(!p.equalsSelection(f)){var g,m=p.plusRange(f),v=p.selectionStartLineNumber===p.startLineNumber&&p.selectionStartColumn===p.startColumn,y=f.selectionStartLineNumber===f.startLineNumber&&f.selectionStartColumn===f.startColumn;d===this.lastAddedCursorIndex?(g=v,this.lastAddedCursorIndex=h):g=y;var _;_=g?new i.Selection(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn):new i.Selection(m.endLineNumber,m.endColumn,m.startLineNumber,m.startColumn),t[l].selection=_,e[h].setSelection(_)}for(var b=0;b<t.length;b++)t[b].index>d&&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;e<t.length;e++)n.electricChars[t[e]]=!0;var o;if(this.model.getMode().characterPairSupport)try{o=this.model.getMode().characterPairSupport.getAutoClosingPairs()}catch(i){r.onUnexpectedError(i),o=null}if(o)for(e=0;e<o.length;e++)n.autoClosingPairsOpen[o[e].open]=o[e].close,n.autoClosingPairsClose[o[e].close]=o[e].open;var s;if(this.model.getMode().characterPairSupport)try{s=this.model.getMode().characterPairSupport.getSurroundingPairs()}catch(i){r.onUnexpectedError(i),s=null}if(s)for(e=0;e<s.length;e++)n.surroundingPairs[s[e].open]=s[e].close;return n},e}();t.CursorCollection=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/controller/cursor",["require","exports","vs/nls!vs/editor/editor.main","vs/editor/core/internalConstants","vs/editor/core/constants","vs/editor/core/range","vs/editor/core/selection","vs/base/eventEmitter","vs/editor/core/handlerDispatcher","vs/editor/editor","vs/editor/core/controller/cursorCollection","vs/base/errors","vs/editor/core/position","vs/base/lifecycle","vs/editor/core/command/replaceCommand"],function(e,t,n,i,r,o,s,a,u,l,c,d,h,p,f){var g=function(e){function t(t,n,i,o){var s=this;e.call(this,[r.EventType.CursorPositionChanged,r.EventType.CursorSelectionChanged,r.EventType.CursorRevealRange]),this.editorId=t,this.configuration=n,this.model=i,this.viewModelHelper=o,this.viewModelHelper||(this.viewModelHelper={viewModel:this.model,convertModelPositionToViewPosition:function(e,t){return new h.Position(e,t)},convertViewToModelPosition:function(e,t){return new h.Position(e,t)},validateViewPosition:function(e,t,n){return n}}),this.cursors=new c.CursorCollection(this.editorId,this.model,this.configuration,this.viewModelHelper),this.typingListeners={},this._isHandling=!1,this.modelUnbinds=[],this.modelUnbinds.push(this.model.addListener2(r.EventType.ModelContentChanged,function(e){s._onModelContentChanged(e)})),this.modelUnbinds.push(this.model.addListener2(r.EventType.ModelModeChanged,function(e){s._onModelModeChanged(e)})),this._registerHandlers()}return __extends(t,e),t.prototype.dispose=function(){this.modelUnbinds=p.disposeAll(this.modelUnbinds),this.model=null,this.cursors.dispose(),this.cursors=null,this.configuration.handlerDispatcher.clearHandlers(),this.configuration=null,this.viewModelHelper=null,e.prototype.dispose.call(this)},t.prototype.saveState=function(){for(var e,t=this.cursors.getSelections(),n=[],i=0;i<t.length;i++)e=t[i],n.push({inSelectionMode:!e.isEmpty(),selectionStart:{lineNumber:e.selectionStartLineNumber,column:e.selectionStartColumn},position:{lineNumber:e.positionLineNumber,column:e.positionColumn}});return n},t.prototype.restoreState=function(e){for(var t,n=this,i=[],r=0;r<e.length;r++){t=e[r];var o=1,s=1;t.position&&t.position.lineNumber&&(o=t.position.lineNumber),t.position&&t.position.column&&(s=t.position.column);var a=o,l=s;t.selectionStart&&t.selectionStart.lineNumber&&(a=t.selectionStart.lineNumber),t.selectionStart&&t.selectionStart.column&&(l=t.selectionStart.column),i.push({selectionStartLineNumber:a,selectionStartColumn:l,positionLineNumber:o,positionColumn:s})}this._onHandler("restoreState",function(){return n.cursors.setSelections(i),!1},new u.DispatcherEvent("restoreState",null))},t.prototype.setEditableRange=function(e){this.model.setEditableRange(e)},t.prototype.getEditableRange=function(){return this.model.getEditableRange()},t.prototype.addTypingListener=function(e,t){this.typingListeners.hasOwnProperty(e)||(this.typingListeners[e]=[]),this.typingListeners[e].push(t)},t.prototype.removeTypingListener=function(e,t){if(this.typingListeners.hasOwnProperty(e))for(var n=this.typingListeners[e],i=0;i<n.length;i++)if(n[i]===t)return n.splice(i,1),void 0},t.prototype._onModelModeChanged=function(){this.cursors.updateMode(),this.emitCursorPositionChanged("model","modeChanged"),this.emitCursorSelectionChanged("model","modeChanged")},t.prototype._onModelContentChanged=function(e){var t=this;e.changeType===r.EventType.ModelContentChangedFlush?(this.cursors.dispose(),this.cursors=new c.CursorCollection(this.editorId,this.model,this.configuration,this.viewModelHelper),this.emitCursorPositionChanged("model","contentFlush"),this.emitCursorSelectionChanged("model","contentFlush"),this.emitCursorRevealRange(!1,!0)):this._isHandling||this._onHandler("recoverSelectionFromMarkers",function(e){var n=t._invokeForAll(e,function(e,t,n){return t.recoverSelectionFromMarkers(n)});return e.shouldPushStackElementBefore=!1,e.shouldPushStackElementAfter=!1,n},new u.DispatcherEvent("modelChange",null))},t.prototype.getSelection=function(){return this.cursors.getSelection(0)},t.prototype.getSelections=function(){return this.cursors.getSelections()},t.prototype.getPosition=function(){return this.cursors.getPosition(0)},t.prototype.setSelections=function(e,t){var n=this;this._onHandler("setSelections",function(e){return e.shouldReveal=!1,n.cursors.setSelections(t),!1},new u.DispatcherEvent(e,null))},t.prototype._createAndInterpretHandlerCtx=function(e,t,n){var i={cursorPositionChangeReason:"",shouldReveal:!0,shouldRevealVerticalInCenter:!1,shouldRevealHorizontal:!0,eventSource:e,eventData:t,executeCommands:[],postOperationRunnables:[],shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1};n(i),this._interpretHandlerContext(i),this.cursors.normalize()},t.prototype._onHandler=function(e,t,n){this._isHandling=!0,this.charactersTyped="";var i=!1;try{var r,o,s,a,u=this.cursors.getSelections(),l=this.cursors.getViewSelections(),c=n.getSource();this._createAndInterpretHandlerCtx(c,n.getData(),function(e){i=t(e),r=e.cursorPositionChangeReason,o=e.shouldReveal,s=e.shouldRevealVerticalInCenter,a=e.shouldRevealHorizontal});for(var h=0;h<this.charactersTyped.length;h++){var p=this.charactersTyped.charAt(h);if(this.typingListeners.hasOwnProperty(p))for(var f=this.typingListeners[p].slice(0),g=0,m=f.length;m>g;g++)try{f[g]()}catch(n){d.onUnexpectedError(n)}}var v=this.cursors.getSelections(),y=this.cursors.getViewSelections(),_=!1;if(u.length!==v.length)_=!0;else{for(var h=0,b=u.length;!_&&b>h;h++)u[h].equalsSelection(v[h])||(_=!0);for(var h=0,b=l.length;!_&&b>h;h++)l[h].equalsSelection(y[h])||(_=!0)}_&&(this.emitCursorPositionChanged(c,r),o&&this.emitCursorRevealRange(s,a),this.emitCursorSelectionChanged(c,r))}catch(w){d.onUnexpectedError(w)}return this._isHandling=!1,i},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,c=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 t.getDirection()===l.SelectionDirection.LTR?(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()},h={addEditOperation:a,trackSelection:c};try{i.getEditOperations(this.model,h)}catch(p){return p.friendlyMessage=n.localize("vs_editor_core_controller_cursor",0),d.onUnexpectedError(p),{operations:[],hadTrackedRange:!1}}return{operations:o,hadTrackedRange:u}},t.prototype._getEditOperations=function(e,t){for(var n,i,r=[],o=[],s=0;s<t.length;s++)t[s]?(n=this._getEditOperationsFromCommand(e,s,t[s]),r=r.concat(n.operations),o[s]=n.hadTrackedRange,i=i||o[s]):o[s]=!1;return{operations:r,hadTrackedRanges:o,anyoneHadTrackedRange:i}},t.prototype._getLoserCursorMap=function(e){e=e.slice(0),e.sort(function(e,t){return-o.compareRangesUsingEnds(e.range,t.range)});for(var t,n,i,r={},s=1;s<e.length;s++)if(t=e[s-1],n=e[s],t.range.getStartPosition().isBeforeOrEqual(n.range.getEndPosition())){i=t.identifier.major>n.identifier.major?t.identifier.major:n.identifier.major,r[i.toString()]=!0;for(var a=0;a<e.length;a++)e[a].identifier.major===i&&(e.splice(a,1),s>a&&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;a<r.length;a++)if(s.range.endLineNumber===r[a].range.startLineNumber&&s.range.endColumn===r[a].range.startColumn){var u=new o.Range(s.range.startLineNumber,s.range.startColumn,r[a].range.endLineNumber,r[a].range.endColumn);s.range=u,i[r[a].order].setRange(u),i[s.order].setRange(u)}else s=r[a]}}},t.prototype._internalExecuteCommands=function(e,t){var n={selectionStartMarkers:[],positionMarkers:[]};this._collapseDeleteCommands(e,t);for(var i=this._innerExecuteCommands(n,e,t),r=0;r<n.selectionStartMarkers.length;r++)this.model._removeMarker(n.selectionStartMarkers[r]),this.model._removeMarker(n.positionMarkers[r]);return i},t.prototype._arrayIsEmpty=function(e){var t,n;for(t=0,n=e.length;n>t;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;d<a.length;d++){var h=a[d].range;if(!l.isBeforeOrEqual(h.getStartPosition())||!h.getEndPosition().isBeforeOrEqual(c))return!1}var p=this._getLoserCursorMap(a);if(p.hasOwnProperty("0"))return console.warn("Ignoring commands"),!1;for(var f=[],d=0;d<a.length;d++)p.hasOwnProperty(a[d].identifier.major.toString())||f.push(a[d]);var g,m=this.model.pushEditOperations(r,f,function(n){for(var a=[],u=0;u<r.length;u++)a[u]=[];for(var u=0;u<n.length;u++){var l=n[u];a[l.identifier.major].push(l)}for(var c=function(e,t){return e.identifier.minor-t.identifier.minor},d=[],u=0;u<r.length;u++)a[u].length>0||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<v.length;d++)m.splice(v[d],1),n.splice(v[d],1);return this._interpretCommandResult(m)},t.prototype.emitCursorPositionChanged=function(e,t){var n=this.cursors.getPositions(),i=n[0],o=n.slice(1),s=this.cursors.getViewPositions(),a=s[0],u=s.slice(1),l=!0;if(this.model.hasEditableRange()){var c=this.model.getEditableRange();c.containsPosition(i)||(l=!1)}var d={position:i,viewPosition:a,secondaryPositions:o,secondaryViewPositions:u,reason:t,source:e,isInEditableRange:l};this.emit(r.EventType.CursorPositionChanged,d)},t.prototype.emitCursorSelectionChanged=function(e,t){var n=this.cursors.getSelections(),i=n[0],o=n.slice(1),s={selection:i,secondarySelections:o,source:e,reason:t};this.emit(r.EventType.CursorSelectionChanged,s)},t.prototype.emitCursorRevealRange=function(e,t){var n=this.cursors.getPosition(0),i=this.cursors.getViewPosition(0),s=new o.Range(n.lineNumber,n.column,n.lineNumber,n.column),a=new o.Range(i.lineNumber,i.column,i.lineNumber,i.column),u={range:s,viewRange:a,revealVerticalInCenter:e,revealHorizontal:t};this.emit(r.EventType.CursorRevealRange,u)},t.prototype._registerHandlers=function(){var e=this,t=i.Handler,n={};n[t.JumpToBracket]=function(t){return e._jumpToBracket(t)},n[t.MoveTo]=function(t){return e._moveTo(!1,t)},n[t.MoveToSelect]=function(t){return e._moveTo(!0,t)},n[t.AddCursorUp]=function(t){return e._addCursorUp(t)},n[t.AddCursorDown]=function(t){return e._addCursorDown(t)},n[t.CreateCursor]=function(t){return e._createCursor(t)},n[t.LastCursorMoveToSelect]=function(t){return e._lastCursorMoveTo(t)},n[t.CursorLeft]=function(t){return e._moveLeft(!1,t)},n[t.CursorLeftSelect]=function(t){return e._moveLeft(!0,t)},n[t.CursorWordLeft]=function(t){return e._moveWordLeft(!1,t)},n[t.CursorWordLeftSelect]=function(t){return e._moveWordLeft(!0,t)},n[t.CursorRight]=function(t){return e._moveRight(!1,t)},n[t.CursorRightSelect]=function(t){return e._moveRight(!0,t)},n[t.CursorWordRight]=function(t){return e._moveWordRight(!1,t)},n[t.CursorWordRightSelect]=function(t){return e._moveWordRight(!0,t)},n[t.CursorUp]=function(t){return e._moveUp(!1,!1,t)},n[t.CursorUpSelect]=function(t){return e._moveUp(!0,!1,t)},n[t.CursorDown]=function(t){return e._moveDown(!1,!1,t)},n[t.CursorDownSelect]=function(t){return e._moveDown(!0,!1,t)},n[t.CursorPageUp]=function(t){return e._moveUp(!1,!0,t)},n[t.CursorPageUpSelect]=function(t){return e._moveUp(!0,!0,t)},n[t.CursorPageDown]=function(t){return e._moveDown(!1,!0,t)},n[t.CursorPageDownSelect]=function(t){return e._moveDown(!0,!0,t)},n[t.CursorHome]=function(t){return e._moveToBeginningOfLine(!1,t)},n[t.CursorHomeSelect]=function(t){return e._moveToBeginningOfLine(!0,t)},n[t.CursorEnd]=function(t){return e._moveToEndOfLine(!1,t)},n[t.CursorEndSelect]=function(t){return e._moveToEndOfLine(!0,t)},n[t.CursorTop]=function(t){return e._moveToBeginningOfBuffer(!1,t)},n[t.CursorTopSelect]=function(t){return e._moveToBeginningOfBuffer(!0,t)},n[t.CursorBottom]=function(t){return e._moveToEndOfBuffer(!1,t)},n[t.CursorBottomSelect]=function(t){return e._moveToEndOfBuffer(!0,t)},n[t.SelectAll]=function(t){return e._selectAll(t)},n[t.LineSelect]=function(t){return e._line(!1,t)},n[t.LineSelectDrag]=function(t){return e._line(!0,t)},n[t.LastCursorLineSelect]=function(t){return e._lastCursorLine(!1,t)
},n[t.LastCursorLineSelectDrag]=function(t){return e._lastCursorLine(!0,t)},n[t.LineInsertBefore]=function(t){return e._lineInsertBefore(t)},n[t.LineInsertAfter]=function(t){return e._lineInsertAfter(t)},n[t.LineBreakInsert]=function(t){return e._lineBreakInsert(t)},n[t.WordSelect]=function(t){return e._word(!1,t)},n[t.WordSelectDrag]=function(t){return e._word(!0,t)},n[t.LastCursorWordSelect]=function(t){return e._lastCursorWord(t)},n[t.Escape]=function(t){return e._cancelSelection(t)},n[t.Type]=function(t){return e._type(t)},n[t.Tab]=function(t){return e._tab(t)},n[t.Indent]=function(t){return e._indent(t)},n[t.Outdent]=function(t){return e._outdent(t)},n[t.Paste]=function(t){return e._paste(t)},n[t.DeleteLeft]=function(t){return e._deleteLeft(t)},n[t.DeleteWordLeft]=function(t){return e._deleteWordLeft(t)},n[t.DeleteRight]=function(t){return e._deleteRight(t)},n[t.DeleteWordRight]=function(t){return e._deleteWordRight(t)},n[t.DeleteAllLeft]=function(t){return e._deleteAllLeft(t)},n[t.DeleteAllRight]=function(t){return e._deleteAllRight(t)},n[t.Cut]=function(t){return e._cut(t)},n[t.Undo]=function(t){return e._undo(t)},n[t.Redo]=function(t){return e._redo(t)},n[t.ExecuteCommand]=function(t){return e._externalExecuteCommand(t)},n[t.ExecuteCommands]=function(t){return e._externalExecuteCommands(t)};var r,o=function(t,n){return function(i){return e._onHandler(t,n,i)}};for(r in n)n.hasOwnProperty(r)&&this.configuration.handlerDispatcher.setHandler(r,o(r,n[r]))},t.prototype._invokeForAll=function(e,t,n,i){void 0===n&&(n=!0),void 0===i&&(i=!0);var r,o=!1,s=this.cursors.getAll();e.shouldPushStackElementBefore=n,e.shouldPushStackElementAfter=i;for(var a=0;a<s.length;a++)r={cursorPositionChangeReason:"",cursorPositionChangeSource:"",shouldReveal:!0,shouldRevealVerticalInCenter:!1,shouldRevealHorizontal:!0,executeCommand:null,postOperationRunnable:null,shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1},o=t(a,s[a],r)||o,0===a&&(e.cursorPositionChangeReason=r.cursorPositionChangeReason,e.shouldRevealHorizontal=r.shouldRevealHorizontal,e.shouldReveal=r.shouldReveal,e.shouldRevealVerticalInCenter=r.shouldRevealVerticalInCenter),e.shouldPushStackElementBefore=e.shouldPushStackElementBefore||r.shouldPushStackElementBefore,e.shouldPushStackElementAfter=e.shouldPushStackElementAfter||r.shouldPushStackElementAfter,e.executeCommands[a]=r.executeCommand,e.postOperationRunnables[a]=r.postOperationRunnable;return o},t.prototype._jumpToBracket=function(e){return this.cursors.killSecondaryCursors(),this._invokeForAll(e,function(e,t,n){return t.jumpToBracket(n)})},t.prototype._moveTo=function(e,t){return this.cursors.killSecondaryCursors(),this._invokeForAll(t,function(n,i,r){return i.moveTo(e,t.eventData.position,t.eventData.viewPosition,t.eventSource,r)})},t.prototype._createCursor=function(e){if(this.configuration.editor.readOnly||this.model.hasEditableRange())return!1;this.cursors.addSecondaryCursor({selectionStartLineNumber:1,selectionStartColumn:1,positionLineNumber:1,positionColumn:1});var t=this.cursors.getLastAddedCursor();return this._invokeForAll(e,function(n,i,r){return i===t?e.eventData.wholeLine?i.line(!1,e.eventData.position,e.eventData.viewPosition,r):i.moveTo(!1,e.eventData.position,e.eventData.viewPosition,e.eventSource,r):!1}),e.shouldReveal=!1,e.shouldRevealHorizontal=!1,!0},t.prototype._lastCursorMoveTo=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.moveTo(!0,e.eventData.position,e.eventData.viewPosition,e.eventSource,r):!1}),e.shouldReveal=!1,e.shouldRevealHorizontal=!1,!0},t.prototype._addCursorUp=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.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){var t=this._distributePasteToCursors(e);return t?this._invokeForAll(e,function(e,n,i){return n.paste(t[e],!1,i)}):this._invokeForAll(e,function(t,n,i){return n.paste(e.eventData.text,e.eventData.pasteOnNewLine,i)})},t.prototype._distributePasteToCursors=function(e){if(e.eventData.pasteOnNewLine)return null;var t=this.cursors.getSelections();if(1===t.length)return null;for(var n=0;n<t.length;n++)if(t[n].startLineNumber!==t[n].endLineNumber)return null;var i=e.eventData.text.split(/\r\n|\r|\n/);return i.length!==t.length?null: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/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,l);var o=100,a=0,l=i.startLineNumber,c=i.startColumn,d=i.endLineNumber,h=i.endColumn,p=t.getLineMaxColumn(d);i.isEmpty()&&r!==l&&(c=1,h=p);var f="",g=Math.max(1,l-a);l>g&&(f=t.getValueInRange(new n.Range(g,1,l,1),u.EndOfLinePreference.LF)),f+=t.getValueInRange(new n.Range(l,1,l,c),u.EndOfLinePreference.LF),f.length>o&&(f=f.substring(f.length-o,f.length));var m="",v=Math.min(d+a,t.getLineCount());m+=t.getValueInRange(new n.Range(d,h,d,p),u.EndOfLinePreference.LF),v>d&&(m="\n"+t.getValueInRange(new n.Range(d+1,1,v,t.getLineMaxColumn(v)),u.EndOfLinePreference.LF)),m.length>o&&(m=m.substring(0,o));var y=t.getValueInRange(new n.Range(l,c,d,h),u.EndOfLinePreference.LF);return y.length>2*o&&(y=y.substring(0,o)+String.fromCharCode(8230)+y.substring(y.length-o,y.length)),new e(f+y+m,f.length,f.length+y.length,l)},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{var n=o.saveParentsScrollTop(e);e.focus(),e.setSelectionRange(this.selectionStart,this.selectionEnd),o.restoreParentsScrollTop(e,n)}catch(i){}},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.textareaIsShownAtCursor=!1,this.listenersToRemove.push(o.addListener(this.textArea,"compositionstart",function(){l.textareaIsShownAtCursor||(l.textareaIsShownAtCursor=!0,l.showTextAreaAtCursor()),l.asyncReadFromTextArea.cancel()})),this.listenersToRemove.push(o.addListener(this.textArea,"compositionend",function(){l.textareaIsShownAtCursor&&(l.textareaIsShownAtCursor=!1,l.hideTextArea()),l.lastCompositionEndTime=(new Date).getTime(),l._scheduleReadFromTextArea(d.Type)})),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(d.Type),l.lastKeyPressTime=0)})),s.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.textareaIsShownAtCursor||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._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){"Escape"===e.asString()&&e.preventDefault(),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.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(d.Type)}},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&&(e===d.Type?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.textareaIsShownAtCursor){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(d.Paste)),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.isWindows?"\r\n":"\n",t=s.isWindows?u.EndOfLinePreference.CRLF:u.EndOfLinePreference.LF,i=this.context.model.getSelections();if(1===i.length){var r=i[0];return r.isEmpty()?"":this.context.model.getValueInRange(r,t)}i=i.slice(0).sort(n.compareRangesUsingStarts);for(var o=[],a=0;a<i.length;a++)o.push(this.context.model.getValueInRange(i[a],t));return o.join(e)},t}(l.ViewEventHandler);t.KeyboardHandler=p}),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,o){var s=function(){function e(e,t,n,r,o){void 0===n&&(n=null),void 0===r&&(r=null),void 0===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 this.type===o.MouseTargetType.TEXTAREA?"TEXTAREA":this.type===o.MouseTargetType.GUTTER_GLYPH_MARGIN?"GUTTER_GLYPH_MARGIN":this.type===o.MouseTargetType.GUTTER_LINE_NUMBERS?"GUTTER_LINE_NUMBERS":this.type===o.MouseTargetType.GUTTER_LINE_DECORATIONS?"GUTTER_LINE_DECORATIONS":this.type===o.MouseTargetType.GUTTER_VIEW_ZONE?"GUTTER_VIEW_ZONE":this.type===o.MouseTargetType.CONTENT_TEXT?"CONTENT_TEXT":this.type===o.MouseTargetType.CONTENT_EMPTY?"CONTENT_EMPTY":this.type===o.MouseTargetType.CONTENT_VIEW_ZONE?"CONTENT_VIEW_ZONE":this.type===o.MouseTargetType.CONTENT_WIDGET?"CONTENT_WIDGET":this.type===o.MouseTargetType.OVERVIEW_RULER?"OVERVIEW_RULER":this.type===o.MouseTargetType.SCROLLBAR?"SCROLLBAR":this.type===o.MouseTargetType.OVERLAY_WIDGET?"OVERLAY_WIDGET":"UNKNOWN"},e.prototype.toString=function(){return this._typeToString()+": "+this.position+" - "+this.range+" - "+this.detail},e}(),a=function(){function e(e){return"[^/]*"+e+"[^/]*"}function t(){return"[^/]+"}function n(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=!1;return"$"===e[e.length-1]&&(n=!0,e.pop()),new RegExp(i+e.join("\\/")+(n?"$":""))}var i="^"+r.ClassNames.OVERFLOW_GUARD+"\\/";return{IS_TEXTAREA_COVER:n(e(r.ClassNames.TEXTAREA_COVER),"$"),IS_TEXTAREA:n(r.ClassNames.TEXTAREA,"$"),IS_VIEW_LINES:n(t(),t(),r.ClassNames.VIEW_LINES,"$"),IS_CURSORS_LAYER:n(t(),t(),e(r.ClassNames.VIEW_CURSORS_LAYER),"$"),IS_CHILD_OF_VIEW_LINES:n(t(),t(),r.ClassNames.VIEW_LINES),IS_CHILD_OF_SCROLLABLE_ELEMENT:n(e(r.ClassNames.SCROLLABLE_ELEMENT)),IS_CHILD_OF_CONTENT_WIDGETS:n(t(),t(),r.ClassNames.CONTENT_WIDGETS),IS_CHILD_OF_OVERLAY_WIDGETS:n(r.ClassNames.OVERLAY_WIDGETS),IS_CHILD_OF_VIEW_OVERLAYS:n("margin-view-overlays"),IS_CHILD_OF_VIEW_ZONES:n(t(),t(),r.ClassNames.VIEW_ZONES)}}(),u=function(){function e(e,t){this.context=e,this.viewHelper=t}return e.prototype.getClassNamePathTo=function(e,t){for(var n,i=[];e&&e!==document.body&&e!==t;)e.nodeType===e.ELEMENT_NODE&&(n=e.className,n&&i.unshift(n)),e=e.parentNode;return i.join("/")},e.prototype.mouseTargetIsWidget=function(e){var t=e.target,n=this.getClassNamePathTo(t,this.viewHelper.viewDomNode);return a.IS_CHILD_OF_CONTENT_WIDGETS.test(n)?!0:a.IS_CHILD_OF_OVERLAY_WIDGETS.test(n)?!0:!1},e.prototype.createMouseTarget=function(e,t,n,i){try{var r=this._unsafeCreateMouseTarget(e,t,n,i);return r}catch(n){return this.createMouseTargetFromUnknownTarget(n.target)}},e.prototype._unsafeCreateMouseTarget=function(e,t,n,i){var r=Math.max(0,this.viewHelper.getScrollTop()+(n.posy-t.top)),u=this.viewHelper.getScrollLeft()+(n.posx-t.left),l=n.target,c=this.getClassNamePathTo(l,this.viewHelper.viewDomNode),d=l.hasAttribute&&l.hasAttribute("lineNumber")?l.getAttribute("lineNumber"):null,h=l.hasAttribute&&l.hasAttribute("column")?l.getAttribute("column"):null;if(d&&h)return this.createMouseTargetFromViewCursor(l,parseInt(d,10),parseInt(h,10));if(a.IS_CHILD_OF_CONTENT_WIDGETS.test(c))return this.createMouseTargetFromContentWidgetsChild(l);if(a.IS_CHILD_OF_OVERLAY_WIDGETS.test(c))return this.createMouseTargetFromOverlayWidgetsChild(l);if(a.IS_TEXTAREA_COVER.test(c))return this.context.configuration.editor.glyphMargin?this.createMouseTargetFromGlyphMargin(l,r):this.context.configuration.editor.lineNumbers?this.createMouseTargetFromLineNumbers(l,r):this.createMouseTargetFromLinesDecorationsChild(l,r);if(a.IS_TEXTAREA.test(c))return new s(l,o.MouseTargetType.TEXTAREA);if(a.IS_CHILD_OF_VIEW_ZONES.test(c)){var p=this._getZoneAtCoord(r);return p?new s(l,o.MouseTargetType.CONTENT_VIEW_ZONE,p.position,null,p):this.createMouseTargetFromUnknownTarget(l)}if(a.IS_VIEW_LINES.test(c)){if(this.viewHelper.isAfterLines(r))return this.createMouseTargetFromViewLines(l,r);var p=this._getZoneAtCoord(r);if(p)return new s(l,o.MouseTargetType.CONTENT_VIEW_ZONE,p.position,null,p);var f=this._doHitTest(t,n);return f.position?this.createMouseTargetFromHitTestPosition(l,f.position.lineNumber,f.position.column,u):this.createMouseTargetFromViewLines(l,r)}if(!i||a.IS_CHILD_OF_VIEW_LINES.test(c)){var f=this._doHitTest(t,n);if(f.position)return this.createMouseTargetFromHitTestPosition(l,f.position.lineNumber,f.position.column,u);f.hitTarget&&(l=f.hitTarget,c=this.getClassNamePathTo(l,this.viewHelper.viewDomNode))}if(a.IS_CURSORS_LAYER.test(c))return new s(l,o.MouseTargetType.UNKNOWN);if(a.IS_CHILD_OF_SCROLLABLE_ELEMENT.test(c))return this.createMouseTargetFromScrollbar(l,r);if(a.IS_CHILD_OF_VIEW_OVERLAYS.test(c)){var g=Math.abs(n.posx-t.left);return g<=e.decorationsWidth?this.createMouseTargetFromLinesDecorationsChild(l,r):(g-=e.decorationsWidth,g<=e.lineNumbersWidth?this.createMouseTargetFromLineNumbers(l,r):(g-=e.lineNumbersWidth,this.createMouseTargetFromGlyphMargin(l,r)))}return/OverviewRuler/i.test(c)?this.createMouseTargetFromScrollbar(l,r):this.createMouseTargetFromUnknownTarget(l)},e.prototype._isChild=function(e,t,n){for(;e&&e!==document.body;){if(e===t)return!0;if(e===n)return!1;e=e.parentNode}return!1},e.prototype._findAttribute=function(e,t,n){for(;e&&e!==document.body;){if(e.hasAttribute&&e.hasAttribute(t))return e.getAttribute(t);if(e===n)return null;e=e.parentNode}return null},e.prototype._doHitTestWithCaretRangeFromPoint=function(e,t){var n=null,i=null,o=t.posx-document.body.scrollLeft,s=t.posy-document.body.scrollTop,a=document.caretRangeFromPoint(o,s),u=a?a.startContainer:null,l=u?u.parentNode:null,c=l?l.parentNode:null,d=c?c.parentNode:null,h=c&&c.nodeType===c.ELEMENT_NODE?c.className:"",p=d&&d.nodeType===d.ELEMENT_NODE?d.className:"";return p===r.ClassNames.VIEW_LINE?n=this.viewHelper.getPositionFromDOMInfo(a.startContainer.parentNode,a.startOffset):h===r.ClassNames.VIEW_LINE?n=this.viewHelper.getPositionFromDOMInfo(a.startContainer,a.startOffset):i=l,{position:n,hitTarget:i}},e.prototype._doHitTestWithCaretPositionFromPoint=function(e){var t=null,n=null,i=e.posx-document.body.scrollLeft-document.documentElement.scrollLeft,r=e.posy-document.body.scrollTop-document.documentElement.scrollTop,o=document.caretPositionFromPoint(i,r),s=document.createRange();return s.setStart(o.offsetNode,o.offset),s.collapse(!0),t=this.viewHelper.getPositionFromDOMInfo(s.startContainer.parentNode,s.startOffset),s.detach(),{position:t,hitTarget:n}
},e.prototype._doHitTestWithMoveToPoint=function(e){var t=null,n=null,i=document.body.createTextRange();try{var o=e.posx-document.body.scrollLeft-document.documentElement.scrollLeft,s=e.posy-document.body.scrollTop-document.documentElement.scrollTop;i.moveToPoint(o,s)}catch(a){return{position:null,hitTarget:null}}i.collapse(!0);var u=i?i.parentElement():null,l=u?u.parentNode:null,c=l?l.parentNode:null,d=c&&c.nodeType===c.ELEMENT_NODE?c.className:"";if(d===r.ClassNames.VIEW_LINE){var h=i.duplicate();h.moveToElementText(u),h.setEndPoint("EndToStart",i),t=this.viewHelper.getPositionFromDOMInfo(u,h.text.length),h.moveToElementText(this.viewHelper.viewDomNode)}else n=u;return i.moveToElementText(this.viewHelper.viewDomNode),{position:t,hitTarget:n}},e.prototype._doHitTest=function(e,t){return document.caretRangeFromPoint?this._doHitTestWithCaretRangeFromPoint(e,t):document.caretPositionFromPoint?this._doHitTestWithCaretPositionFromPoint(t):document.body.createTextRange?this._doHitTestWithMoveToPoint(t):{position:null,hitTarget:null}},e.prototype._getZoneAtCoord=function(e){var t=this.viewHelper.getWhitespaceAtVerticalOffset(e);if(t){var i,r=t.verticalOffset+t.height/2,o=this.context.model.getLineCount(),s=null,a=null;return t.afterLineNumber!==o&&(a=new n.Position(t.afterLineNumber+1,1)),t.afterLineNumber>0&&(s=new n.Position(t.afterLineNumber,this.context.model.getLineMaxColumn(t.afterLineNumber))),i=null===a?s:null===s?a:r>e?s:a,{viewZoneId:t.id,afterLineNumber:t.afterLineNumber,positionBefore:s,positionAfter:a,position:i}}return null},e.prototype._getFullLineRangeAtCoord=function(e){if(this.viewHelper.isAfterLines(e)){var t=this.context.model.getLineCount(),n=this.context.model.getLineMaxColumn(t);return{range:new i.Range(t,n,t,n),isAfterLines:!0}}var t=this.viewHelper.getLineNumberAtVerticalOffset(e),n=this.context.model.getLineMaxColumn(t);return{range:new i.Range(t,1,t,n),isAfterLines:!1}},e.prototype.createMouseTargetFromViewCursor=function(e,t,i){return new s(e,o.MouseTargetType.CONTENT_TEXT,new n.Position(t,i))},e.prototype.createMouseTargetFromViewLines=function(e){var t=this.context.model.getLineCount(),i=this.context.model.getLineMaxColumn(t);return new s(e,o.MouseTargetType.CONTENT_EMPTY,new n.Position(t,i))},e.prototype.createMouseTargetFromHitTestPosition=function(e,t,r,a){var u=new n.Position(t,r),l=this.viewHelper.getLineWidth(t);if(a>l)return new s(e,o.MouseTargetType.CONTENT_EMPTY,u);var c=this.viewHelper.visibleRangeForPosition2(t,r);if(!c)return new s(e,o.MouseTargetType.UNKNOWN,u);var d=c.left;if(a===d)return new s(e,o.MouseTargetType.CONTENT_TEXT,u);var h;if(r>1){var p=c.left;if(h=!1,h=h||a>p&&d>a,h=h||a>d&&p>a){var f=new i.Range(t,r,t,r-1);return new s(e,o.MouseTargetType.CONTENT_TEXT,u,f)}}var g=this.context.model.getLineMaxColumn(t);if(g>r){var m=this.viewHelper.visibleRangeForPosition2(t,r+1);if(m){var v=m.left;if(h=!1,h=h||a>d&&v>a,h=h||a>v&&d>a){var f=new i.Range(t,r,t,r+1);return new s(e,o.MouseTargetType.CONTENT_TEXT,u,f)}}}return new s(e,o.MouseTargetType.CONTENT_TEXT,u)},e.prototype.createMouseTargetFromContentWidgetsChild=function(e){var t=this._findAttribute(e,"widgetId",this.viewHelper.viewDomNode);return t?new s(e,o.MouseTargetType.CONTENT_WIDGET,null,null,t):new s(e,o.MouseTargetType.UNKNOWN)},e.prototype.createMouseTargetFromOverlayWidgetsChild=function(e){var t=this._findAttribute(e,"widgetId",this.viewHelper.viewDomNode);return t?new s(e,o.MouseTargetType.OVERLAY_WIDGET,null,null,t):new s(e,o.MouseTargetType.UNKNOWN)},e.prototype.createMouseTargetFromLinesDecorationsChild=function(e,t){var i=this._getZoneAtCoord(t);if(i)return new s(e,o.MouseTargetType.GUTTER_VIEW_ZONE,i.position,null,i);var r=this._getFullLineRangeAtCoord(t);return new s(e,o.MouseTargetType.GUTTER_LINE_DECORATIONS,new n.Position(r.range.startLineNumber,r.range.startColumn),r.range,r.isAfterLines)},e.prototype.createMouseTargetFromLineNumbers=function(e,t){var i=this._getZoneAtCoord(t);if(i)return new s(e,o.MouseTargetType.GUTTER_VIEW_ZONE,i.position,null,i);var r=this._getFullLineRangeAtCoord(t);return new s(e,o.MouseTargetType.GUTTER_LINE_NUMBERS,new n.Position(r.range.startLineNumber,r.range.startColumn),r.range,r.isAfterLines)},e.prototype.createMouseTargetFromGlyphMargin=function(e,t){var i=this._getZoneAtCoord(t);if(i)return new s(e,o.MouseTargetType.GUTTER_VIEW_ZONE,i.position,null,i);var r=this._getFullLineRangeAtCoord(t);return new s(e,o.MouseTargetType.GUTTER_GLYPH_MARGIN,new n.Position(r.range.startLineNumber,r.range.startColumn),r.range,r.isAfterLines)},e.prototype.createMouseTargetFromScrollbar=function(e,t){var i=this.viewHelper.getLineNumberAtVerticalOffset(t),r=this.context.model.getLineMaxColumn(i);return new s(e,o.MouseTargetType.SCROLLBAR,new n.Position(i,r))},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 s(e,o.MouseTargetType.OVERLAY_WIDGET,null,null,n):new s(e,o.MouseTargetType.UNKNOWN)},e}();t.MouseTargetFactory=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/controller/mouseHandler",["require","exports","vs/base/env","vs/editor/core/position","vs/editor/core/selection","vs/base/dom/mouseEvent","vs/base/dom/dom","vs/editor/editor","vs/editor/core/controller/mouseTarget","vs/editor/core/view/viewEventHandler","vs/base/lifecycle","vs/base/dom/globalMouseMoveMonitor"],function(e,t,n,i,r,o,s,a,u,l,c,d){function h(e){return function(t,n){var i=new o.StandardMouseEvent(n),r=!1;return e&&(r=e.mouseTargetIsWidget(i)),r||i.preventDefault(),i}}var p=function(e){function t(n,i,o){var a=this;e.call(this),this.context=n,this.viewController=i,this.viewHelper=o,this.mouseTargetFactory=new u.MouseTargetFactory(this.context,o),this.listenersToRemove=[],this.hideTextAreaTimeout=-1,this.toDispose=[],this.mouseMoveMonitor=new d.GlobalMouseMoveMonitor,this.toDispose.push(this.mouseMoveMonitor),this.lastMouseEvent=null,this.lastMouseDownPosition=null,this.currentSelection=new r.Selection(1,1,1,1),this.lastMouseDownPositionEqualCount=0,this.lastMouseDownCount=0,this.lastSetMouseDownCountTime=0,this.onScrollTimeout=-1,this.layoutWidth=0,this.layoutHeight=0,this.lastMouseLeaveTime=-1,this.listenersToRemove.push(s.addListener(this.viewHelper.viewDomNode,"contextmenu",function(e){return a._onContextMenu(e)})),this.listenersToRemove.push(s.addThrottledListener(this.viewHelper.viewDomNode,"mousemove",function(e){return a._onMouseMove(e)},h(this.mouseTargetFactory),t.MOUSE_MOVE_MINIMUM_TIME)),this.listenersToRemove.push(s.addListener(this.viewHelper.viewDomNode,"mouseup",function(e){return a._onMouseUp(e)})),this.listenersToRemove.push(s.addNonBubblingMouseOutListener(this.viewHelper.viewDomNode,function(e){return a._onMouseLeave(e)})),this.listenersToRemove.push(s.addListener(this.viewHelper.viewDomNode,"mousedown",function(e){return a._onMouseDown(e)})),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.toDispose=c.disposeAll(this.toDispose),this._unhook(),-1!==this.hideTextAreaTimeout&&(window.clearTimeout(this.hideTextAreaTimeout),this.hideTextAreaTimeout=-1)},t.prototype.onLayoutChanged=function(e){return this._layoutInfo=e,!1},t.prototype.onScrollChanged=function(e){return this.mouseMoveMonitor.isMonitoring()&&this._hookedOnScroll(e),!1},t.prototype.onCursorSelectionChanged=function(e){return this.currentSelection=e.selection,!1},t.prototype._onContextMenu=function(e){var t=new o.StandardMouseEvent(e),n=s.getDomNodePosition(this.viewHelper.linesContentDomNode),i=this.mouseTargetFactory.createMouseTarget(this._layoutInfo,n,t,!0),r={event:t,target:i};this.viewController.emitContextMenu(r)},t.prototype._onMouseMove=function(e){if(!this.mouseMoveMonitor.isMonitoring()){var t=e.browserEvent.timeStamp;if(!(t<this.lastMouseLeaveTime)){var n=s.getDomNodePosition(this.viewHelper.linesContentDomNode),i=this.mouseTargetFactory.createMouseTarget(this._layoutInfo,n,e,!0),r={event:e,target:i};this.viewController.emitMouseMove(r)}}},t.prototype._onMouseLeave=function(e){this.lastMouseLeaveTime=(new Date).getTime();var t={event:new o.StandardMouseEvent(e),target:null};this.viewController.emitMouseLeave(t)},t.prototype._onMouseUp=function(e){var t=new o.StandardMouseEvent(e),n=s.getDomNodePosition(this.viewHelper.linesContentDomNode),i=this.mouseTargetFactory.createMouseTarget(this._layoutInfo,n,t,!0),r={event:t,target:i};this.viewController.emitMouseUp(r)},t.prototype._onMouseDown=function(e){var t=this,i=new o.StandardMouseEvent(e),r=s.getDomNodePosition(this.viewHelper.linesContentDomNode),u=this.mouseTargetFactory.createMouseTarget(this._layoutInfo,r,i,!0),l=u.type===a.MouseTargetType.CONTENT_TEXT||u.type===a.MouseTargetType.CONTENT_EMPTY,c=u.type===a.MouseTargetType.GUTTER_GLYPH_MARGIN||u.type===a.MouseTargetType.GUTTER_LINE_NUMBERS||u.type===a.MouseTargetType.GUTTER_LINE_DECORATIONS,d=u.type===a.MouseTargetType.GUTTER_LINE_NUMBERS,h=this.context.configuration.editor.selectOnLineNumbers,p=u.type===a.MouseTargetType.CONTENT_VIEW_ZONE||u.type===a.MouseTargetType.GUTTER_VIEW_ZONE;if(i.leftButton&&(l||d&&h))n.browser.isIE11orEarlier?i.browserEvent.fromElement?(i.preventDefault(),this.viewHelper.focusTextArea()):setTimeout(function(){t.viewHelper.focusTextArea()}):(i.preventDefault(),this.viewHelper.focusTextArea()),this._updateMouse(u.type,i,i.shiftKey,i.detail),this._hook(u.type);else if(c)i.preventDefault();else if(p){var f=u.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(f.viewZoneId)&&i.preventDefault()}var g={event:i,target:u};this.viewController.emitMouseDown(g)},t.prototype._hookedOnScroll=function(){var e=this;-1===this.onScrollTimeout&&(this.onScrollTimeout=window.setTimeout(function(){e.onScrollTimeout=-1,e._updateMouse(e.monitoringStartTargetType,null,!0)},10))},t.prototype._hook=function(e){var t=this;this.mouseMoveMonitor.isMonitoring()||(this.monitoringStartTargetType=e,this.mouseMoveMonitor.startMonitoring(h(null),function(e){t._updateMouse(t.monitoringStartTargetType,e,!0)},function(){t._unhook()}))},t.prototype._unhook=function(){-1!==this.onScrollTimeout&&(window.clearTimeout(this.onScrollTimeout),this.onScrollTimeout=-1)},t.prototype._getPositionOutsideEditor=function(e,t){var n;return t.posy<e.top?(n=this.viewHelper.getLineNumberAtVerticalOffset(Math.max(this.viewHelper.getScrollTop()-(e.top-t.posy),0)),{lineNumber:n,column:1}):t.posy>e.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.posx<e.left?{lineNumber:n,column:1}:t.posx>e.left+e.width?{lineNumber:n,column:this.context.model.getLineMaxColumn(n)}:null)},t.prototype._updateMouse=function(e,n,r,o){void 0===o&&(o=0),n=n||this.lastMouseEvent,this.lastMouseEvent=n;var u,l,c=s.getDomNodePosition(this.viewHelper.viewDomNode),d=this._getPositionOutsideEditor(c,n);if(d)u=d.lineNumber,l=d.column;else{var h=this.mouseTargetFactory.createMouseTarget(this._layoutInfo,c,n,!0),p=h.position;if(!p)return;if((h.type===a.MouseTargetType.CONTENT_VIEW_ZONE||h.type===a.MouseTargetType.GUTTER_VIEW_ZONE)&&this.lastMouseDownCount>0){var f=new i.Position(this.currentSelection.selectionStartLineNumber,this.currentSelection.selectionStartColumn),g=h.detail,m=g.positionBefore,v=g.positionAfter;m&&v&&(p=m.isBefore(f)?m:v)}u=p.lineNumber,l=p.column}if(o){var y=(new Date).getTime();y-this.lastSetMouseDownCountTime>t.CLEAR_MOUSE_DOWN_COUNT_TIME&&(o=1),this.lastSetMouseDownCountTime=y,o>this.lastMouseDownCount+1&&(o=this.lastMouseDownCount+1);var _=new i.Position(u,l);this.lastMouseDownPosition&&this.lastMouseDownPosition.equals(_)?this.lastMouseDownPositionEqualCount++:this.lastMouseDownPositionEqualCount=1,this.lastMouseDownPosition=_,this.lastMouseDownCount=Math.min(o,this.lastMouseDownPositionEqualCount),n.detail=this.lastMouseDownCount}if(e===a.MouseTargetType.GUTTER_LINE_NUMBERS)n.altKey?r?this.viewController.lastCursorLineSelect("mouse",u,l):this.viewController.createCursor("mouse",u,l,!0):r?this.viewController.lineSelectDrag("mouse",u,l):this.viewController.lineSelect("mouse",u,l);else if(this.lastMouseDownCount>=4)this.viewController.selectAll("mouse");else if(3===this.lastMouseDownCount)n.altKey?r?this.viewController.lastCursorLineSelectDrag("mouse",u,l):this.viewController.lastCursorLineSelect("mouse",u,l):r?this.viewController.lineSelectDrag("mouse",u,l):this.viewController.lineSelect("mouse",u,l);else if(2===this.lastMouseDownCount){var b="none",w=this.viewHelper.visibleRangeForPosition2(u,l);if(w){var C=c.left+w.left;n.posx>C?b="right":n.posx<C&&(b="left")}n.altKey?this.viewController.lastCursorWordSelect("mouse",u,l,b):r?this.viewController.wordSelectDrag("mouse",u,l,b):this.viewController.wordSelect("mouse",u,l,b)}else n.altKey?n.ctrlKey||n.metaKey||(r?this.viewController.lastCursorMoveToSelect("mouse",u,l):this.viewController.createCursor("mouse",u,l,!1)):r?this.viewController.moveToSelect("mouse",u,l):this.viewController.moveTo("mouse",u,l)},t.CLEAR_MOUSE_DOWN_COUNT_TIME=400,t.MOUSE_MOVE_MINIMUM_TIME=100,t}(l.ViewEventHandler);t.MouseHandler=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/controller/pointerHandler",["require","exports","vs/base/dom/mouseEvent","vs/base/dom/dom","vs/base/dom/touch","vs/editor/core/controller/mouseHandler"],function(e,t,n,i,r,o){var s=function(e){function t(t,n,r){var o=this;e.call(this,t,n,r);var s=function(e,t){var n={translationY:t.translationY,translationX:t.translationX};return e&&(n.translationY+=e.translationY,n.translationX+=e.translationX),n};this.viewHelper.linesContentDomNode.style.msTouchAction="none",this.viewHelper.linesContentDomNode.style.msContentZooming="none",this._installGestureHandlerTimeout=window.setTimeout(function(){if(o._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=o.viewHelper.linesContentDomNode,t.target=o.viewHelper.linesContentDomNode,o.viewHelper.linesContentDomNode.addEventListener("MSPointerDown",function(n){var i=n.pointerType;return i===(n.MSPOINTER_TYPE_MOUSE||"mouse")?(o._lastPointerType="mouse",void 0):(i===(n.MSPOINTER_TYPE_TOUCH||"touch")?(o._lastPointerType="touch",e.addPointer(n.pointerId)):(o._lastPointerType="pen",t.addPointer(n.pointerId)),void 0)}),o.listenersToRemove.push(i.addThrottledListener(o.viewHelper.linesContentDomNode,"MSGestureChange",function(e){return o._onGestureChange(e)},s)),o.listenersToRemove.push(i.addListener(o.viewHelper.linesContentDomNode,"MSGestureTap",function(e){return o._onCaptureGestureTap(e)},!0))}},100),this._lastPointerType="mouse"}return __extends(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,r=new n.StandardMouseEvent(e),o=i.getDomNodePosition(this.viewHelper.linesContentDomNode),s=this.mouseTargetFactory.createMouseTarget(this._layoutInfo,o,r,!1);s.position&&this.viewController.moveTo("mouse",s.position.lineNumber,s.position.column),r.browserEvent.fromElement?(r.preventDefault(),this.viewHelper.focusTextArea()):setTimeout(function(){t.viewHelper.focusTextArea()})},t.prototype._onGestureChange=function(e){this.viewHelper.setScrollTop(this.viewHelper.getScrollTop()-e.translationY),this.viewHelper.setScrollLeft(this.viewHelper.getScrollLeft()-e.translationX)},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this)},t}(o.MouseHandler),a=function(e){function t(t,n,o){var s=this;e.call(this,t,n,o),this.gesture=new r.Gesture(this.viewHelper.linesContentDomNode),this.listenersToRemove.push(i.addListener(this.viewHelper.linesContentDomNode,r.EventType.Tap,function(e){return s.onTap(e)})),this.listenersToRemove.push(i.addListener(this.viewHelper.linesContentDomNode,r.EventType.Change,function(e){return s.onChange(e)}))}return __extends(t,e),t.prototype.dispose=function(){this.gesture.dispose(),e.prototype.dispose.call(this)},t.prototype.onTap=function(e){e.preventDefault(),this.viewHelper.focusTextArea();var t=i.getDomNodePosition(this.viewHelper.linesContentDomNode),r=new n.StandardMouseEvent(e),o=this.mouseTargetFactory.createMouseTarget(this._layoutInfo,t,r,!1);o.position&&this.viewController.moveTo("mouse",o.position.lineNumber,o.position.column)},t.prototype.onChange=function(e){this.viewHelper.setScrollTop(this.viewHelper.getScrollTop()-e.translationY),this.viewHelper.setScrollLeft(this.viewHelper.getScrollLeft()-e.translationX)},t}(o.MouseHandler),u=function(){function e(e,t,n){this.handler=window.navigator.msPointerEnabled?new s(e,t,n):window.TouchEvent?new a(e,t,n):new o.MouseHandler(e,t,n)}return e.prototype.onScrollChanged=function(e){this.handler.onScrollChanged(e)},e.prototype.dispose=function(){this.handler.dispose()},e}();t.PointerHandler=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/viewPart",["require","exports","vs/editor/core/view/viewEventHandler"],function(e,t,n){var i=function(e){function t(t){e.call(this),this._context=t,this._context.addEventHandler(this),this._modificationBeforeRenderingRunners=[],this._modificationRunners=[]}return __extends(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._modificationBeforeRenderingRunners=[],this._modificationRunners=[]},t.prototype._requestModificationFrameBeforeRendering=function(e){this._modificationBeforeRenderingRunners.push(e)},t.prototype._requestModificationFrame=function(e){this._modificationRunners.push(e)},t.prototype.onBeforeForcedLayout=function(){if(this._modificationBeforeRenderingRunners.length>0){for(var e=0;e<this._modificationBeforeRenderingRunners.length;e++)this._modificationBeforeRenderingRunners[e]();this._modificationBeforeRenderingRunners=[]}},t.prototype.onReadAfterForcedLayout=function(e){this.shouldRender&&this._render(e)},t.prototype.onWriteAfterForcedLayout=function(){this.shouldRender&&(this.shouldRender=!1,this._executeModificationRunners())},t.prototype._executeModificationRunners=function(){if(this._modificationRunners.length>0){for(var e=0;e<this._modificationRunners.length;e++)this._modificationRunners[e]();this._modificationRunners=[]}},t.prototype._render=function(){throw new Error("Implement me!")},t}(n.ViewEventHandler);t.ViewPart=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/view/parts/zones/zones",["require","exports","vs/base/types","vs/editor/core/view/viewContext","vs/editor/core/view/viewPart","vs/base/dom/dom","vs/base/errors"],function(e,t,n,i,r,o,s){var a=function(e){function t(t,n){e.call(this,t),this._whitespaceManager=n,this.domNode=document.createElement("div"),this.domNode.className=i.ClassNames.VIEW_ZONES,this.domNode.style.position="absolute",this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._zones={}}return __extends(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._whitespaceManager=null,this._zones={}},t.prototype.onConfigurationChanged=function(e){var t=this;if(e.lineHeight){var n,i,r,s={};for(n in this._zones)this._zones.hasOwnProperty(n)&&(i=this._zones[n],r=this._heightInPixels(i.delegate),this._safeCallOnComputedHeight(i.delegate,r),s[n]=r,this._whitespaceManager.changeWhitespace(parseInt(n,10),r));return this._requestModificationFrame(function(){for(n in t._zones)t._zones.hasOwnProperty(n)&&s.hasOwnProperty(n)&&o.StyleMutator.setHeight(t._zones[n].delegate.domNode,s[n])}),!0}return!1},t.prototype.onLineMappingChanged=function(){var e,t,n=!1;for(t in this._zones)if(this._zones.hasOwnProperty(t)){e=this._zones[t];var i=this._computeWhitespaceAfterLineNumber(e.delegate);n=this._whitespaceManager.changeAfterLineNumberForWhitespace(parseInt(t,10),i)||n}return n},t.prototype.onLayoutChanged=function(){return!0},t.prototype.onScrollChanged=function(e){return e.vertical},t.prototype.onZonesChanged=function(){return!0},t.prototype.onModelLinesDeleted=function(){return!0},t.prototype.onModelLinesInserted=function(){return!0},t.prototype._getZoneOrdinal=function(e){return"undefined"!=typeof e.afterColumn?e.afterColumn:1e4},t.prototype._computeWhitespaceAfterLineNumber=function(e){if(0===e.afterLineNumber)return 0;var t;if("undefined"!=typeof e.afterColumn)t=this._context.model.validateModelPosition({lineNumber:e.afterLineNumber,column:e.afterColumn});else{var n=this._context.model.validateModelPosition({lineNumber:e.afterLineNumber,column:1}).lineNumber;t={lineNumber:n,column:this._context.model.getModelLineMaxColumn(n)}}var i=this._context.model.convertModelPositionToViewPosition(t.lineNumber,t.column);return i.lineNumber},t.prototype.addZone=function(e){var t=this._heightInPixels(e),n=this._whitespaceManager.addWhitespace(this._computeWhitespaceAfterLineNumber(e),this._getZoneOrdinal(e),t),i={whitespaceId:n,delegate:e,isVisible:!1};return this._safeCallOnComputedHeight(i.delegate,t),this._requestModificationFrame(function(){i.delegate.domNode.hasAttribute("monaco-view-zone")&&(i.delegate.domNode.style.position="absolute",o.StyleMutator.setHeight(i.delegate.domNode,t),i.delegate.domNode.style.width="100%",o.StyleMutator.setDisplay(i.delegate.domNode,"none"))}),this._zones[i.whitespaceId.toString()]=i,i.delegate.domNode.setAttribute("monaco-view-zone",i.whitespaceId.toString()),this.domNode.appendChild(i.delegate.domNode),i.whitespaceId},t.prototype.removeZone=function(e){if(this._zones.hasOwnProperty(e.toString())){var t=this._zones[e.toString()];return delete this._zones[e.toString()],this._whitespaceManager.removeWhitespace(t.whitespaceId),t.delegate.domNode.removeAttribute("monaco-visible-view-zone"),t.delegate.domNode.removeAttribute("monaco-view-zone"),this._requestModificationFrame(function(){t.delegate.domNode.hasAttribute("monaco-view-zone")||t.delegate.domNode.parentNode&&t.delegate.domNode.parentNode.removeChild(t.delegate.domNode)}),!0}return!1},t.prototype.layoutZone=function(e){var t=!1;if(this._zones.hasOwnProperty(e.toString())){{var n=this._zones[e.toString()],i=this._heightInPixels(n.delegate),r=this._computeWhitespaceAfterLineNumber(n.delegate);this._getZoneOrdinal(n.delegate)}t=this._whitespaceManager.changeWhitespace(n.whitespaceId,i)||t,t=this._whitespaceManager.changeAfterLineNumberForWhitespace(n.whitespaceId,r)||t}return t},t.prototype.shouldSuppressMouseDownOnViewZone=function(e){if(this._zones.hasOwnProperty(e.toString())){var t=this._zones[e.toString()];return t.delegate.suppressMouseDown}return!1},t.prototype._heightInPixels=function(e){return"number"==typeof e.heightInPx?e.heightInPx:"number"==typeof e.heightInLines?this._context.configuration.editor.lineHeight*e.heightInLines:this._context.configuration.editor.lineHeight},t.prototype._safeCallOnComputedHeight=function(e,t){if(n.isFunction(e.onComputedHeight))try{e.onComputedHeight(t)}catch(i){s.onUnexpectedError(i)}},t.prototype._safeCallOnDomNodeTop=function(e,t){if(n.isFunction(e.onDomNodeTop))try{e.onDomNodeTop(t)}catch(i){s.onUnexpectedError(i)}},t.prototype._render=function(e){var t=this,n=this._whitespaceManager.getWhitespaceViewportData();this._requestModificationFrame(function(){var i,r,s={},a=!1;for(i=0,r=n.length;r>i;i++)s[n[i].id.toString()]=n[i],a=!0;var u,l;for(u in t._zones)t._zones.hasOwnProperty(u)&&(l=t._zones[u],s.hasOwnProperty(u)?(o.StyleMutator.setTop(l.delegate.domNode,s[u].verticalOffset-e.bigNumbersDelta),o.StyleMutator.setHeight(l.delegate.domNode,s[u].height),l.isVisible||(o.StyleMutator.setDisplay(l.delegate.domNode,"block"),l.delegate.domNode.setAttribute("monaco-visible-view-zone","true"),l.isVisible=!0),t._safeCallOnDomNodeTop(l.delegate,e.getScrolledTopFromAbsoluteTop(s[u].verticalOffset))):(l.isVisible&&(o.StyleMutator.setDisplay(l.delegate.domNode,"none"),l.delegate.domNode.removeAttribute("monaco-visible-view-zone"),l.isVisible=!1),t._safeCallOnDomNodeTop(l.delegate,e.getScrolledTopFromAbsoluteTop(-1e6))));a&&o.StyleMutator.setWidth(t.domNode,e.scrollWidth)})},t}(r.ViewPart);t.ViewZones=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/view/viewLayer",["require","exports","vs/base/dom/dom","vs/editor/core/view/viewPart"],function(e,t,n,i){var r=function(e){function t(t){var n=this;e.call(this,t),this.domNode=this._createDomNode(),this._lines=[],this._rendLineNumberStart=1,this._renderer=new o(function(){return n._createLine()})}return __extends(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._lines=null},t.prototype.onConfigurationChanged=function(e){for(var t=0;t<this._lines.length;t++)this._lines[t].onConfigurationChanged(e);return!0},t.prototype.onLayoutChanged=function(){return!0},t.prototype.onScrollChanged=function(e){return e.vertical},t.prototype.onZonesChanged=function(){return!0},t.prototype.onModelFlushed=function(){return this._lines=[],this._rendLineNumberStart=1,n.clearNode(this.domNode),!0},t.prototype.onModelLinesDeleted=function(e){var t,n=Math.max(e.fromLineNumber-this._rendLineNumberStart,0),i=Math.min(e.toLineNumber-this._rendLineNumberStart,this._lines.length-1);if(e.fromLineNumber<this._rendLineNumberStart&&(e.toLineNumber<this._rendLineNumberStart?this._rendLineNumberStart-=e.toLineNumber-e.fromLineNumber+1:this._rendLineNumberStart=e.fromLineNumber),i>=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<this._lines.length;t++)this._lines[t].onLinesDeletedAbove();return!0},t.prototype.onModelLineChanged=function(e){var t=e.lineNumber-this._rendLineNumberStart,n=!1;t>=0&&t<this._lines.length&&(this._lines[t].onContentChanged(),n=!0);for(var i=Math.max(t,0);i<this._lines.length;i++)this._lines[i].onLineChangedAbove(),n=!0;return n},t.prototype.onModelLinesInserted=function(e){var t;if(e.fromLineNumber<=this._rendLineNumberStart){for(this._rendLineNumberStart+=e.toLineNumber-e.fromLineNumber+1,t=0;t<this._lines.length;t++)this._lines[t].onLinesInsertedAbove();return!0}if(e.fromLineNumber>=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){for(t=n;i>=t;t++){var r=this._createLine();this._lines.splice(t,0,r)}var o=i-n+1;for(t=0;o>t;t++){var s=this._lines.pop();this.domNode.removeChild(s.getDomNode())}}for(t=i;t<this._lines.length;t++)this._lines[t].onLinesInsertedAbove();return!0},t.prototype.onModelTokensChanged=function(e){var t=e.fromLineNumber-this._rendLineNumberStart,n=e.toLineNumber-this._rendLineNumberStart;if(0>n||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){var t={domNode:this.domNode,rendLineNumberStart:this._rendLineNumberStart,lines:this._lines,linesLength:this._lines.length,getInlineDecorationsForLineInViewport:function(t){return e.getInlineDecorationsForLineInViewport(t)},viewportTop:e.viewportTop,viewportHeight:e.viewportHeight},n=this._renderer.renderWithManyUpdates(t,e.startLineNumber,e.endLineNumber,e.relativeVerticalOffset);this._rendLineNumberStart=n.rendLineNumberStart,this._lines=n.lines},t.prototype._createDomNode=function(){var e=document.createElement("div");return e.className="view-layer",e.style.position="absolute",e.setAttribute("role","presentation"),e.setAttribute("aria-hidden","true"),e},t.prototype._createLine=function(){throw new Error("Implement me!")},t}(i.ViewPart);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,rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength,getInlineDecorationsForLineInViewport:e.getInlineDecorationsForLineInViewport,viewportTop:e.viewportTop,viewportHeight:e.viewportHeight};if(r.rendLineNumberStart+r.linesLength-1<t||n<r.rendLineNumberStart){r.rendLineNumberStart=t,r.linesLength=n-t+1,r.lines=[];for(var o=t;n>=o;o++)r.lines[o-t]=this._createLine();return this._finishRendering(r,!0,i),r}this._renderUntouchedLines(r,Math.max(t-r.rendLineNumberStart,0),Math.min(n-r.rendLineNumberStart,r.linesLength-1),i,t);var s,a,u;return r.rendLineNumberStart>t?(s=t,a=Math.min(n,r.rendLineNumberStart-1),a>=s&&(this._insertLinesBefore(r,s,a,i,t),r.linesLength+=a-s+1)):r.rendLineNumberStart<t&&(u=Math.min(r.linesLength,t-r.rendLineNumberStart),u>0&&(this._removeLinesBefore(r,u),r.linesLength-=u)),r.rendLineNumberStart=t,r.rendLineNumberStart+r.linesLength-1<n?(s=r.rendLineNumberStart+r.linesLength,a=n,a>=s&&(this._insertLinesAfter(r,s,a,i,t),r.linesLength+=a-s+1)):r.rendLineNumberStart+r.linesLength-1>n&&(s=Math.max(0,n-r.rendLineNumberStart+1),a=r.linesLength-1,u=a-s+1,u>0&&(this._removeLinesAfter(r,u),r.linesLength-=u)),this._finishRendering(r,!1,i),r},e.prototype._renderUntouchedLines=function(e,t,n,i,r){var o,s;for(o=t;n>=o;o++){s=e.rendLineNumberStart+o;var a=e.lines[o].getDomNode();a&&e.lines[o].layoutLine(s,i[s-r])}},e.prototype._insertLinesBefore=function(e,t,n){var i,r,o=[];for(r=t;n>=r;r++)i=this._createLine(),o.push(i);e.lines=o.concat(e.lines)},e.prototype._removeLinesBefore=function(e,t){var n;for(n=0;t>n;n++){var i=e.lines[n].getDomNode();i&&e.domNode.removeChild(i)}e.lines.splice(0,t)},e.prototype._insertLinesAfter=function(e,t,n){var i,r,o=[];for(r=t;n>=r;r++)i=this._createLine(),o.push(i);e.lines=e.lines.concat(o)},e.prototype._removeLinesAfter=function(e,t){var n,i=e.linesLength-t;for(n=0;t>n;n++){var r=e.lines[i+n].getDomNode();r&&e.domNode.removeChild(r)}e.lines.splice(i,t)},e.prototype._finishRendering=function(e,t,n){var i,r,o,s,a=!1,u=[],l=[],c=!1,d=[],h=[];for(i=0,r=e.linesLength;r>i;i++)if(o=e.lines[i],s=i+e.rendLineNumberStart,o.shouldUpdateHTML(s,e.getInlineDecorationsForLineInViewport(s))){var p=o.getDomNode();p?(o.getLineOuterHTML(h,s,n[i]),d[i]=!0,c=!0):(o.getLineOuterHTML(l,s,n[i]),u[i]=!0,a=!0)}if(a){if(t)e.domNode.innerHTML=l.join("");else{var f=e.domNode.lastChild;f.insertAdjacentHTML("afterend",l.join(""))}var g=e.domNode.lastChild;for(i=e.linesLength-1;i>=0;i--)o=e.lines[i],u[i]&&(o.setDomNode(g),g=g.previousSibling)}if(c){var m=document.createElement("div");m.innerHTML=h.join("");var p,v;for(i=0;i<e.linesLength;i++)o=e.lines[i],d[i]&&(v=m.firstChild,p=o.getDomNode(),p.parentNode.replaceChild(v,p),o.setDomNode(v))}},e}()});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/viewLines",["require","exports","vs/editor/core/view/lines/viewLine","vs/editor/core/view/viewLayer","vs/editor/core/view/viewContext","vs/editor/core/range","vs/base/time/schedulers","vs/base/env","vs/base/dom/dom"],function(e,t,n,i,r,o,s,a,u){var l=function(e){function t(t,n){var i=this;e.call(this,t),this._hasVerticalScroll=!1,this._hasHorizontalScroll=!1,this._layoutProvider=n,this.domNode.className=r.ClassNames.VIEW_LINES,this._maxLineWidth=0,this._asyncUpdateLineWidths=new s.RunOnceScheduler(function(){i._updateLineWidths()
},200),this._currentVisibleRange=new o.Range(1,1,1,1),this._bigNumbersDelta=0,this._lastCursorRevealRangeHorizontallyEvent=null,this.textRangeRestingSpot=document.createElement("div"),this.textRangeRestingSpot.className="textRangeRestingSpot"}return __extends(t,e),t.prototype.dispose=function(){this._asyncUpdateLineWidths.dispose(),this._layoutProvider=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(t){var n=e.prototype.onConfigurationChanged.call(this,t);return t.wrappingColumn&&(this._maxLineWidth=0),n},t.prototype.onLayoutChanged=function(t){var n=e.prototype.onLayoutChanged.call(this,t);return this._maxLineWidth=0,n},t.prototype.onModelFlushed=function(){var t=e.prototype.onModelFlushed.call(this);return this._maxLineWidth=0,t},t.prototype.onScrollWidthChanged=function(){return!0},t.prototype.onModelDecorationsChanged=function(t){for(var n=e.prototype.onModelDecorationsChanged.call(this,t),i=0;i<this._lines.length;i++)this._lines[i].onModelDecorationsChanged();return n||!0},t.prototype.onCursorRevealRange=function(e){var t=this._computeScrollTopToRevealRange(this._layoutProvider.getCurrentViewport(),e.range,e.revealVerticalInCenter);return e.revealHorizontal&&(this._lastCursorRevealRangeHorizontallyEvent=e),this._layoutProvider.setScrollTop(t),!0},t.prototype.onScrollChanged=function(t){return this._hasVerticalScroll=this._hasVerticalScroll||t.vertical,this._hasHorizontalScroll=this._hasHorizontalScroll||t.horizontal,e.prototype.onScrollChanged.call(this,t)},t.prototype.getPositionFromDOMInfo=function(e,t){var n=this._getLineNumberFromDOMInfo(e);if(-1===n)return null;if(1>n||n>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(n))return{lineNumber:n,column:1};var i=n-this._rendLineNumberStart;if(0>i||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.linesVisibleRangesForRange=function(e,n){if(this.shouldRender)return null;var i=e.endLineNumber;if(e=o.intersectRanges(e,this._currentVisibleRange),!e)return null;var r,s,a,u,l,c,d,h=[],p=this.domNode.getBoundingClientRect(),f=p.top,g=p.left;for(n&&(d=this._context.model.convertViewPositionToModelPosition(e.startLineNumber,1).lineNumber),s=e.startLineNumber;s<=e.endLineNumber;s++)a=s-this._rendLineNumberStart,0>a||a>=this._lines.length||(u=s===e.startLineNumber?e.startColumn:1,l=s===e.endLineNumber?e.endColumn:this._context.model.getLineMaxColumn(s),r=this._lines[a].getVisibleRangesForRange(s,u,l,f,0,g,this.textRangeRestingSpot),r&&r.length>0&&(n&&i>s&&(c=d,d=this._context.model.convertViewPositionToModelPosition(s+1,1).lineNumber,c!==d&&(r[r.length-1].width+=t.LINE_FEED_WIDTH)),h.push({lineNumber:s,ranges:r})));return 0===h.length?null:h},t.prototype.visibleRangesForRange2=function(e,n,i,r){if(this.shouldRender)return null;var s=e.endLineNumber;if(e=o.intersectRanges(e,this._currentVisibleRange),!e)return null;var a,u,l,c,d,h,p,f,g=[],m=this._context.configuration.editor.lineHeight,v=this.domNode.getBoundingClientRect(),y=v.top,_=v.left;for(r&&(f=this._context.model.convertViewPositionToModelPosition(e.startLineNumber,1).lineNumber),u=e.startLineNumber;u<=e.endLineNumber;u++)if(c=u-this._rendLineNumberStart,!(0>c||c>=this._lines.length)&&(d=u===e.startLineNumber?e.startColumn:1,h=u===e.endLineNumber?e.endColumn:this._context.model.getLineMaxColumn(u),a=this._lines[c].getVisibleRangesForRange(u,d,h,y,i,_,this.textRangeRestingSpot),a&&a.length>0)){l=this._layoutProvider.getVerticalOffsetForLineNumber(u)-this._bigNumbersDelta+n;for(var b=0,w=a.length;w>b;b++)a[b].top=l,a[b].height=m;r&&s>u&&(p=f,f=this._context.model.convertViewPositionToModelPosition(u+1,1).lineNumber,p!==f&&(a[a.length-1].width+=t.LINE_FEED_WIDTH)),g=g.concat(a)}return 0===g.length?null:g},t.prototype._createLine=function(){return n.createLine(this._context)},t.prototype._renderAndUpdateLineHeights=function(t){if(e.prototype._renderLines.call(this,t),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)),this._lastCursorRevealRangeHorizontallyEvent){var n=this._computeScrollLeftToRevealRange(this._lastCursorRevealRangeHorizontallyEvent.range);this._lastCursorRevealRangeHorizontallyEvent=null;var i=this._context.configuration.getWrappingColumn(),r=0===i;r||this._ensureMaxLineWidth(n.maxHorizontalOffset),this._layoutProvider.setScrollLeft(n.scrollLeft)}},t.prototype._updateLineWidths=function(){var e,t,n=1;for(e=0;e<this._lines.length;e++)t=this._lines[e].getWidth(),n=Math.max(n,t);this._ensureMaxLineWidth(n)},t.prototype.render=function(){var e=this._layoutProvider.getLinesViewportData();if(this._bigNumbersDelta=e.bigNumbersDelta,this.shouldRender&&(this.shouldRender=!1,this._renderAndUpdateLineHeights(e),this._asyncUpdateLineWidths.schedule()),this._hasVerticalScroll||this._hasHorizontalScroll){if(a.browser.canUseTranslate3d){var t="translate3d("+-this._layoutProvider.getScrollLeft()+"px, "+e.visibleRangesDeltaTop+"px, 0px)";u.StyleMutator.setTransform(this.domNode.parentNode,t)}else this._hasVerticalScroll&&u.StyleMutator.setTop(this.domNode.parentNode,e.visibleRangesDeltaTop),this._hasHorizontalScroll&&u.StyleMutator.setLeft(this.domNode.parentNode,-this._layoutProvider.getScrollLeft());this._hasVerticalScroll=!1,this._hasHorizontalScroll=!1}return u.StyleMutator.setWidth(this.domNode,this._layoutProvider.getScrollWidth()),u.StyleMutator.setHeight(this.domNode,Math.min(this._layoutProvider.getTotalHeight(),1e6)),e.visibleRange=this._currentVisibleRange,e},t.prototype._ensureMaxLineWidth=function(e){this._maxLineWidth<e&&(this._maxLineWidth=e,this._layoutProvider.onMaxLineWidthChanged(this._maxLineWidth))},t.prototype._computeScrollTopToRevealRange=function(e,t,n){var i,r,o=e.top,s=e.height,a=o+s;i=this._layoutProvider.getVerticalOffsetForLineNumber(t.startLineNumber),r=this._layoutProvider.getVerticalOffsetForLineNumber(t.endLineNumber)+this._layoutProvider.heightInPxForLine(t.endLineNumber),n||(r+=this._context.configuration.editor.lineHeight);var u;if(n){var l=(i+r)/2;u=Math.max(0,l-s/2)}else u=this._computeMinimumScrolling(o,a,i,r);return u},t.prototype._computeScrollLeftToRevealRange=function(e){var n=0;if(e.startLineNumber!==e.endLineNumber)return{scrollLeft:0,maxHorizontalOffset:n};var i=this._layoutProvider.getCurrentViewport(),r=i.left,o=r+i.width,s=this.visibleRangesForRange2(e,0,0,!1),a=Number.MAX_VALUE,u=0;if(!s)return{scrollLeft:r,maxHorizontalOffset:n};var l,c;for(l=0;l<s.length;l++)c=s[l],c.left<a&&(a=c.left),c.left+c.width>u&&(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=l}),define("vs/editor/core/view/parts/overviewRuler/overviewRulerImpl",["require","exports","vs/editor/editor","vs/base/dom/dom","vs/base/env"],function(e,t,n,i,r){function o(e,t){return e.startLineNumber===t.startLineNumber&&e.endLineNumber===t.endLineNumber&&e.forceHeight===t.forceHeight&&e.color===t.color&&e.position===t.position}function s(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(var n=0,i=e.length;i>n;n++)if(!o(e[n],t[n]))return!1;return!0}t.hasCanvas=-1===window.navigator.userAgent.indexOf("MSIE 8");var a=function(){function e(e,t,n,i,o,s,a){this._canvasLeftOffset=e,this._minimumHeight=o,this._maximumHeight=s,this._getVerticalOffsetForLine=a,this._zones=[],this._renderedZones=[],this._domNode=document.createElement("canvas"),this._domNode.className=t,this._domNode.style.position="absolute",r.browser.canUseTranslate3d&&(this._domNode.style.transform="translate3d(0px, 0px, 0px)"),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){i.StyleMutator.setTop(this._domNode,e.top),i.StyleMutator.setRight(this._domNode,e.right),(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(!0))},e.prototype.getLanesCount=function(){return this._lanesCount},e.prototype.setLanesCount=function(e,t){this._lanesCount=e,t&&this.render(!0)},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(!0)},e.prototype.setLineHeight=function(e,t){this._lineHeight=e,t&&this.render(!0)},e.prototype.setZones=function(e,t){this._zones=e,t&&this.render(!1)},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(e){if(0===this._outerHeight)return!1;if(!t.hasCanvas)return!1;var n=e||!s(this._renderedZones,this._zones);if(n){var i=this._height/this._outerHeight,r=this._domNode.getContext("2d");r.clearRect(0,0,this._width,this._height);var o=this._width-this._canvasLeftOffset;this._lanesCount>=3?this._renderThreeLanes(r,i,o):2===this._lanesCount?this._renderTwoLanes(r,i,o):1===this._lanesCount&&this._renderOneLane(r,i,o)}return this._renderedZones=this._zones,n},e.prototype._renderOneLane=function(e,t,i){this._renderVerticalPatch(e,t,n.OverviewRulerLane.Left|n.OverviewRulerLane.Center|n.OverviewRulerLane.Right,this._canvasLeftOffset,i)},e.prototype._renderTwoLanes=function(e,t,i){var r=Math.floor(i/2),o=i-r,s=this._canvasLeftOffset,a=this._canvasLeftOffset+r;this._renderVerticalPatch(e,t,n.OverviewRulerLane.Left|n.OverviewRulerLane.Center,s,r),this._renderVerticalPatch(e,t,n.OverviewRulerLane.Right,a,o)},e.prototype._renderThreeLanes=function(e,t,i){var r=Math.floor(i/3),o=Math.floor(i/3),s=i-r-o,a=this._canvasLeftOffset,u=this._canvasLeftOffset+r,l=this._canvasLeftOffset+r+s;this._renderVerticalPatch(e,t,n.OverviewRulerLane.Left,a,r),this._renderVerticalPatch(e,t,n.OverviewRulerLane.Center,u,s),this._renderVerticalPatch(e,t,n.OverviewRulerLane.Right,l,o)},e}();t.OverviewRulerImpl=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/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._shouldForceRender=!1,this._zonesFromCursors=[],this._cursorPositions=[],this._cursorColor=this._getCursorColor()}return __extends(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._overviewRuler.dispose()},t.prototype._getCursorColor=function(){var e=this._context.configuration.editor.theme;return/dark/.test(e)||/black/.test(e)?t._CURSOR_COLOR_DARK:t._CURSOR_COLOR},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),this._shouldForceRender=!0,i=!0),t!==n&&(this._overviewRuler.setLanesCount(n,!1),this._shouldForceRender=!0,i=!0),e.hideCursorInOverviewRuler&&(this._hideCursor=this._context.configuration.editor.hideCursorInOverviewRuler,this._shouldUpdateCursorPosition=!0,i=!0),e.theme&&(this._cursorColor=this._getCursorColor(),this._shouldUpdateCursorPosition=!0,i=!0),i},t.prototype.onLayoutChanged=function(e){var t=this;return this._shouldForceRender=!0,this._requestModificationFrame(function(){t._overviewRuler.setLayout(e.overviewRuler,!1)}),!0},t.prototype.onZonesChanged=function(){return!0},t.prototype.onModelFlushed=function(){return this._shouldUpdateCursorPosition=!0,this._shouldUpdateDecorations=!0,!0},t.prototype.onModelDecorationsChanged=function(){return this._shouldUpdateDecorations=!0,!0},t.prototype.onScrollHeightChanged=function(e){return this._overviewRuler.setScrollHeight(e,!1),this._shouldForceRender=!0,!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:this._cursorColor,position:i.OverviewRulerLane.Full});return r},t.prototype._render=function(){var e=this,t=this._shouldForceRender;this._shouldForceRender=!1;var i=!1;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 r=[];r=r.concat(this._zonesFromCursors),r=r.concat(this._zonesFromDecorations),this._overviewRuler.setZones(r,!1),i=!0}(i||t)&&this._requestModificationFrame(function(){var i=e._overviewRuler.render(t);if(i&&n.hasCanvas&&e._overviewRuler.getLanesCount()>0&&(e._zonesFromDecorations.length>0||e._zonesFromCursors.length>0)){var r=e._overviewRuler.getDomNode().getContext("2d");r.beginPath(),r.lineWidth=1,r.strokeStyle="rgba(197,197,197,0.8)",r.rect(0,0,e._overviewRuler.getWidth(),e._overviewRuler.getHeight()),r.stroke()}})},t.DECORATION_HEIGHT=6,t._CURSOR_COLOR="rgba(0, 0, 102, 0.8)",t._CURSOR_COLOR_DARK="rgba(152, 152, 152, 0.8)",t}(r.ViewPart);t.DecorationsOverviewRuler=o}),define("vs/editor/core/view/parts/viewCursors/viewCursor",["require","exports","vs/base/dom/dom"],function(e,t,n){var i=function(){function e(e,t){this._context=e,this._isInEditableRange=!0,this._domNode=this._createCursorDomNode(t),this._isVisible=!0,n.StyleMutator.setDisplay(this._domNode,"none"),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"),n.StyleMutator.setHeight(t,this._context.configuration.editor.lineHeight),n.StyleMutator.setTop(t,0),n.StyleMutator.setLeft(t,0),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||(n.StyleMutator.setVisibility(this._domNode,"inherit"),this._isVisible=!0)},e.prototype.hide=function(){this._isVisible&&(n.StyleMutator.setVisibility(this._domNode,"hidden"),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&&n.StyleMutator.setHeight(this._domNode,this._context.configuration.editor.lineHeight),!0},e.prototype.prepareRender=function(e){var t=e.visibleRangeForPosition(this._position);t?(this._positionTop=t.top,this._positionLeft=t.left,this._isInViewport=!0):this._isInViewport=!1},e.prototype.render=function(e){this._isInViewport?(n.StyleMutator.setDisplay(this._domNode,"block"),n.StyleMutator.setLeft(this._domNode,this._positionLeft),n.StyleMutator.setTop(this._domNode,this._positionTop+e.viewportTop-e.bigNumbersDelta)):n.StyleMutator.setDisplay(this._domNode,"none")},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._isInViewport=!1},e}();t.ViewCursor=i}),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/viewContext","vs/editor/core/view/parts/viewCursors/viewCursor","vs/editor/core/view/viewPart","vs/base/env","vs/css!./viewCursors"],function(e,t,n,i,r,o){var s;!function(e){e[e.Hidden=0]="Hidden",e[e.Visible=1]="Visible",e[e.Blink=2]="Blink"}(s||(s={}));var a=function(e){function t(t){e.call(this,t),this._primaryCursor=new i.ViewCursor(this._context,!1),this._secondaryCursors=[],this._domNode=document.createElement("div"),this._domNode.className=n.ClassNames.VIEW_CURSORS_LAYER,o.browser.canUseTranslate3d&&(this._domNode.style.transform="translate3d(0px, 0px, 0px)"),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(e){return e.inlineDecorationsChanged},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;n<this._secondaryCursors.length;n++)if(t(this._secondaryCursors[n].getPosition()))return!0;return!1},t.prototype.onCursorPositionChanged=function(e){if(this._primaryCursor.onCursorPositionChanged(e.position,e.isInEditableRange),this._updateBlinking(),this._secondaryCursors.length<e.secondaryPositions.length)for(var t=e.secondaryPositions.length-this._secondaryCursors.length,n=0;t>n;n++){var r=new i.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,n=0;o>n;n++)this._secondaryCursors[0].getDomNode().parentNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1);for(var n=0;n<e.secondaryPositions.length;n++)this._secondaryCursors[n].onCursorPositionChanged(e.secondaryPositions[n],e.isInEditableRange);return!0},t.prototype.onCursorSelectionChanged=function(){return!1},t.prototype.onConfigurationChanged=function(e){this._primaryCursor.onConfigurationChanged(e);for(var t=0,n=this._secondaryCursors.length;n>t;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?s.Blink:s.Visible:s.Hidden},t.prototype._updateBlinking=function(){var e=this;-1!==this._blinkTimer&&(window.clearInterval(this._blinkTimer),this._blinkTimer=-1);var n=this._getRenderType();n===s.Visible||n===s.Blink?this._show():this._hide(),n===s.Blink&&(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}(r.ViewPart);t.ViewCursors=a}),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/base/dom/dom","vs/css!./contentWidgets"],function(e,t,n,i,r,o){var s=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(e){return e.inlineDecorationsChanged},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)&&o.StyleMutator.setMaxWidth(t._widgets[e].widget.getDomNode(),t._contentWidth)}),!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",o.StyleMutator.setMaxWidth(t,this._contentWidth),o.StyleMutator.setVisibility(t,"hidden"),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),i.removeAttribute("monaco-visible-content-widget"),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<n.viewportLeft&&(f=n.viewportLeft),{aboveTop:c,fitsAbove:d,belowTop:h,fitsBelow:p,left:f}},t.prototype._prepareRenderWidgetAtExactPosition=function(e,t){var n=t.visibleRangeForPosition(e);return n?{top:n.top,left:n.left}:null},t.prototype._prepareRenderWidget=function(e,t){var n=this;if(!e.position||!e.preference)return null;var r,o,s,a=this._context.model.validateModelPosition(e.position),u=this._context.model.convertModelPositionToViewPosition(a.lineNumber,a.column),l=null,c=function(){if(!l){var i=e.widget.getDomNode();l=n._layoutBoxInViewport(u,i,t)}};for(o=1;2>=o;o++)for(s=0;s<e.preference.length;s++)if(r=e.preference[s],r===i.ContentWidgetPositionPreference.ABOVE){if(c(),!l)return null;if(2===o||l.fitsAbove)return{top:l.aboveTop,left:l.left}}else{if(r!==i.ContentWidgetPositionPreference.BELOW)return this._prepareRenderWidgetAtExactPosition(u,t);if(c(),!l)return null;if(2===o||l.fitsBelow)return{top:l.belowTop,left:l.left}}},t.prototype._render=function(e){var t,n,i=this,r={};for(n in this._widgets)this._widgets.hasOwnProperty(n)&&(t=this._prepareRenderWidget(this._widgets[n],e),t&&(r[n]=t));this._requestModificationFrame(function(){var t,n,s;for(t in i._widgets)i._widgets.hasOwnProperty(t)&&(n=i._widgets[t],s=i._widgets[t].widget.getDomNode(),r.hasOwnProperty(t)?(o.StyleMutator.setTop(s,r[t].top+e.viewportTop-e.bigNumbersDelta),o.StyleMutator.setLeft(s,r[t].left),n.isVisible||(o.StyleMutator.setVisibility(s,"inherit"),s.setAttribute("monaco-visible-content-widget","true"),n.isVisible=!0)):n.isVisible&&(s.removeAttribute("monaco-visible-content-widget"),n.isVisible=!1,o.StyleMutator.setVisibility(s,"hidden")))})},t}(r.ViewPart);t.ViewContentWidgets=s}),define("vs/css!vs/editor/core/view/parts/overlayWidgets/overlayWidgets",["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/overlayWidgets/overlayWidgets",["require","exports","vs/editor/core/view/viewContext","vs/editor/editor","vs/editor/core/view/viewPart","vs/base/dom/dom","vs/css!./overlayWidgets"],function(e,t,n,i,r,o){var s=function(e){function t(t){e.call(this,t),this._widgets={},this._verticalScrollbarWidth=0,this._horizontalScrollbarHeight=0,this._editorHeight=0,this.domNode=document.createElement("div"),this.domNode.className=n.ClassNames.OVERLAY_WIDGETS}return __extends(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets=null},t.prototype.onLayoutChanged=function(e){var t=this;return this._verticalScrollbarWidth=e.verticalScrollbarWidth,this._horizontalScrollbarHeight=e.horizontalScrollbarHeight,this._editorHeight=e.height,this._requestModificationFrame(function(){o.StyleMutator.setWidth(t.domNode,e.width)}),!0},t.prototype.addWidget=function(e){this._widgets[e.getId()]={widget:e,preference:null};var t=e.getDomNode();t.style.position="absolute",t.setAttribute("widgetId",e.getId()),this.domNode.appendChild(t)},t.prototype.setWidgetPosition=function(e,t){var n=this,i=this._widgets[e.getId()];i.preference=t,this._requestModificationFrame(function(){n._widgets.hasOwnProperty(e.getId())&&n._renderWidget(i)})},t.prototype.removeWidget=function(e){var t=e.getId();if(this._widgets.hasOwnProperty(t)){var n=this._widgets[t],i=n.widget.getDomNode();delete this._widgets[t],i.parentNode.removeChild(i)}},t.prototype._renderWidget=function(e){var t="data-editor-restoreStyleTop",n=e.widget.getDomNode();if(null!==e.preference)if(e.preference===i.OverlayWidgetPositionPreference.TOP_RIGHT_CORNER)n.hasAttribute(t)||n.setAttribute(t,n.style.top),o.StyleMutator.setTop(n,0),o.StyleMutator.setRight(n,2*this._verticalScrollbarWidth);else if(e.preference===i.OverlayWidgetPositionPreference.BOTTOM_RIGHT_CORNER){n.hasAttribute(t)||n.setAttribute(t,n.style.top);var r=n.clientHeight;o.StyleMutator.setTop(n,this._editorHeight-r-2*this._horizontalScrollbarHeight),o.StyleMutator.setRight(n,2*this._verticalScrollbarWidth)}else e.preference===i.OverlayWidgetPositionPreference.TOP_CENTER&&(n.hasAttribute(t)||n.setAttribute(t,n.style.top),o.StyleMutator.setTop(n,0),n.style.right="50%");else if(n.hasAttribute(t)){var s=n.getAttribute(t);
n.removeAttribute(t),n.style.top=s}},t.prototype._render=function(){var e,t=this;this._requestModificationFrame(function(){for(e in t._widgets)t._widgets.hasOwnProperty(e)&&t._renderWidget(t._widgets[e])})},t.prototype.onReadAfterForcedLayout=function(e){return this._render(e),null},t.prototype.onWriteAfterForcedLayout=function(){this._executeModificationRunners()},t}(r.ViewPart);t.ViewOverlayWidgets=s}),define("vs/editor/core/view/layout/lines/whitespaceComputer",["require","exports"],function(e,t){var n=function(){function e(){this.heights=[],this.ids=[],this.afterLineNumbers=[],this.ordinals=[],this.prefixSum=[],this.prefixSumValidIndex=-1,this.whitespaceId2Index={},this.lastWhitespaceId=0}return e.findInsertionIndex=function(e,t,n,i){for(var r,o=0,s=e.length;s>o;)r=Math.floor((o+s)/2),t===e[r]?i<n[r]?s=r:o=r+1:t<e[r]?s=r:o=r+1;return o},e.prototype.insertWhitespace=function(t,n,i){var r=++this.lastWhitespaceId,o=e.findInsertionIndex(this.afterLineNumbers,t,this.ordinals,n);return this.insertWhitespaceAtIndex(r,o,t,n,i),r},e.prototype.insertWhitespaceAtIndex=function(e,t,n,i,r){this.heights.splice(t,0,r),this.ids.splice(t,0,e),this.afterLineNumbers.splice(t,0,n),this.ordinals.splice(t,0,i),this.prefixSum.splice(t,0,0);var o,s;for(o in this.whitespaceId2Index)this.whitespaceId2Index.hasOwnProperty(o)&&(s=this.whitespaceId2Index[o],s>=t&&(this.whitespaceId2Index[o]=s+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.ordinals[r],s=this.heights[r];this.removeWhitespace(t);var a=e.findInsertionIndex(this.afterLineNumbers,n,this.ordinals,o);return this.insertWhitespaceAtIndex(t,a,n,o,s),!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.ordinals.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]<e){if(t+1>=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 n<this.heights.length?n:-1},e.prototype.getFirstWhitespaceIndexAfterLineNumber=function(e){return this.findFirstWhitespaceAfterLineNumber(e)},e.prototype.getCount=function(){return this.heights.length},e.prototype.getAfterLineNumberForWhitespaceIndex=function(e){return this.afterLineNumbers[e]},e.prototype.getIdForWhitespaceIndex=function(e){return this.ids[e]},e.prototype.getHeightForWhitespaceIndex=function(e){return this.heights[e]},e.prototype.getWhitespaces=function(e){for(var t=[],n=0;n<this.heights.length;n++)t.push({id:this.ids[n],afterLineNumber:this.afterLineNumbers[n],heightInLines:this.heights[n]/e});return t},e}();t.WhitespaceComputer=n}),define("vs/editor/core/view/layout/lines/verticalObjects",["require","exports","vs/editor/core/view/layout/lines/whitespaceComputer"],function(e,t,n){var i=function(){function e(){this.whitespaces=new n.WhitespaceComputer}return e.prototype.replaceLines=function(e){this.linesCount=e},e.prototype.insertWhitespace=function(e,t,n){return this.whitespaces.insertWhitespace(e,t,n)},e.prototype.changeWhitespace=function(e,t){return this.whitespaces.changeWhitespace(e,t)},e.prototype.changeAfterLineNumberForWhitespace=function(e,t){return this.whitespaces.changeAfterLineNumberForWhitespace(e,t)},e.prototype.removeWhitespace=function(e){return this.whitespaces.removeWhitespace(e)},e.prototype.onModelLinesDeleted=function(e,t){this.linesCount-=t-e+1,this.whitespaces.onModelLinesDeleted(e,t)},e.prototype.onModelLinesInserted=function(e,t){this.linesCount+=t-e+1,this.whitespaces.onModelLinesInserted(e,t)},e.prototype.getTotalHeight=function(e){var t=e*this.linesCount,n=this.whitespaces.getTotalHeight();return t+n},e.prototype.getVerticalOffsetForLineNumber=function(e,t){var n;n=e>1?t*(e-1):0;var i=this.whitespaces.getAccumulatedHeightBeforeLineNumber(e);return n+i},e.prototype.getWhitespaceAccumulatedHeightBeforeLineNumber=function(e){return this.whitespaces.getAccumulatedHeightBeforeLineNumber(e)},e.prototype.hasWhitespace=function(){return this.whitespaces.getCount()>0},e.prototype.isAfterLines=function(e,t){var n=this.getTotalHeight(t);return e>n},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.startLineNumber;a<=o.endLineNumber;a++)if(i=o.visibleRangesDeltaTop+o.relativeVerticalOffset[a-o.startLineNumber],r=i+n,s>=i&&r>s||i>s)return a;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));var c=a,d=c,h=5e5,p=0;a>=h&&(p=Math.floor(a/h)*h,p=Math.floor(p/n)*n,d-=p);for(var f=[],g=o;s>=g;g++){for(c+=n,f.push(d),d+=n;r===g;)d+=i,c+=i,u++,u>=l?r=s+1:(r=this.whitespaces.getAfterLineNumberForWhitespaceIndex(u),i=this.whitespaces.getHeightForWhitespaceIndex(u));if(c>t){s=g;break}}return{viewportTop:e-p,viewportHeight:t-e,bigNumbersDelta:p,startLineNumber:o,endLineNumber:s,visibleRangesDeltaTop:-(e-p),relativeVerticalOffset:f,visibleRange:null,getInlineDecorationsForLineInViewport:null,getDecorationsInViewport:null}},e.prototype.getVerticalOffsetForWhitespaceIndex=function(e,t){var n,n,i=this.whitespaces.getAfterLineNumberForWhitespaceIndex(e);n=i>=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.prototype.getWhitespaces=function(e){return this.whitespaces.getWhitespaces(e)},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,n){return this.verticalObjects.insertWhitespace(e,t,n)},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.isAfterLines=function(e){return this.verticalObjects.isAfterLines(e,this.configuration.editor.lineHeight)},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.getWhitespaces=function(){return this.verticalObjects.getWhitespaces(this.configuration.editor.lineHeight)},e.prototype.getWhitespaceAtVerticalOffset=function(e){return this.verticalObjects.getWhitespaceAtVerticalOffset(e,this.configuration.editor.lineHeight)},e.prototype.getLinesViewportData=function(e){var t=this.verticalObjects.getLinesViewportData(e.top,e.top+e.height,this.configuration.editor.lineHeight),n=this.model.getDecorationsResolver(t.startLineNumber,t.endLineNumber);return t.getDecorationsInViewport=function(){return n.getDecorations()},t.getInlineDecorationsForLineInViewport=function(e){return n.getInlineDecorations(e)},t},e.prototype.getCenteredLineInViewport=function(e){return this.verticalObjects.getCenteredLineInViewport(e.top,e.top+e.height,this.configuration.editor.lineHeight)},e.prototype.getWhitespaceAccumulatedHeightBeforeLineNumber=function(e){return this.verticalObjects.getWhitespaceAccumulatedHeightBeforeLineNumber(e)},e.prototype.hasWhitespace=function(){return this.verticalObjects.hasWhitespace()},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.lineHeight=e,this.setGlyphMarginWidth(this.computeGlyphMarginWidth()),!0):!1},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 e=Math.round(e),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});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,i){e.call(this,[t._SCROLL_EVENT,t._INTERNAL_SIZE_CHANGED_EVENT]),this.linesContent=n,this._forceUsageOfScrollLeft=i,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){e=Math.floor(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){e=Math.floor(e),e<this.width&&(e=this.width),this.scrollWidth!==e&&(this.scrollWidth=e,this.setScrollLeft(this.scrollLeft),this._emitInternalSizeEvent())},t.prototype.getScrollLeft=function(){return this.scrollLeft},t.prototype.setScrollLeft=function(e){e=Math.floor(e),0>e&&(e=0),e+this.width>this.scrollWidth&&(e=this.scrollWidth-this.width),this.scrollLeft!==e&&(this.scrollLeft=e,this._forceUsageOfScrollLeft&&(this.linesContent.scrollLeft=e),this._emitScrollEvent(!1,!0))},t.prototype.getHeight=function(){return this.height},t.prototype.setHeight=function(e){e=Math.floor(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){e=Math.floor(e),e<this.height&&(e=this.height),this.scrollHeight!==e&&(this.scrollHeight=e,this.setScrollTop(this.scrollTop),this._emitInternalSizeEvent())},t.prototype.getScrollTop=function(){return this.scrollTop},t.prototype.setScrollTop=function(e){e=Math.floor(e),0>e&&(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,!1),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(e){c.scrollbar.updateClassName(c.configuration.editor.theme),e.scrollbar&&c.scrollbar.updateOptions(c.configuration.editor.scrollbar)}));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.editorLayoutProvider.getLayoutInfo()),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()),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._updatePageSize(this.editorLayoutProvider.getLayoutInfo()),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(e){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.getCenteredViewLineNumberInViewport=function(){return this.linesLayout.getCenteredLineInViewport(this.getCurrentViewport())},t.prototype._emitLayoutChangedEvent=function(e){void 0===e&&(e=0),this.scrollManager.onSizeProviderLayoutChanged();var t=this.getLayoutInfo();this._updatePageSize(t),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(){var e=this.scrollManager.getScrollTop(),t=this.linesLayout.getLineNumberAtOrAfterVerticalOffset(e),n=this.linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(t);return{scrollTop:e,scrollTopWithoutViewZones:e-n,scrollLeft:this.scrollManager.getScrollLeft(),linesDomNodeWidth:this.scrollManager.getScrollWidth()}},t.prototype.restoreState=function(e){var t=e.scrollTop;"number"!=typeof e.scrollTopWithoutViewZones||this.linesLayout.hasWhitespace()||(t=e.scrollTopWithoutViewZones),this.scrollManager.setScrollTop(t),this.scrollManager.setScrollLeft(e.scrollLeft)},t.prototype.addWhitespace=function(e,t,n){return this.linesLayout.insertWhitespace(e,t,n)},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.isAfterLines=function(e){return this.linesLayout.isAfterLines(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.getWhitespaces=function(){return this.linesLayout.getWhitespaces()},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){for(var t=0,n=this.eventHandlers.length;n>t;t++)this.eventHandlers[t]===e&&console.warn("Detected duplicate listener in ViewEventDispatcher",e);this.eventHandlers.push(e)},e.prototype.removeEventHandler=function(e){for(var t=0;t<this.eventHandlers.length;t++)if(this.eventHandlers[t]===e){this.eventHandlers.splice(t,1);break}},e.prototype.emit=function(e,t){this.eventQueue.push(new n.EmitterEvent(e,t)),this.isConsumingQueue||this.consumeQueue()},e.prototype.emitMany=function(e){this.eventQueue=this.eventQueue.concat(e),this.isConsumingQueue||this.consumeQueue()},e.prototype.consumeQueue=function(){var e=this;this.eventHandlerGateKeeper(function(){try{e.isConsumingQueue=!0;for(var t,n,i,r;e.eventQueue.length>0;)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._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._scrollHeight=0}return __extends(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this);for(var t=0;t<this._overlays.length;t++)this._overlays[t].dispose();this._overlays=null},t.prototype.onViewFocusChanged=function(){return!1},t.prototype.onLayoutChanged=function(e){var t=this;return this._requestModificationFrame(function(){n.StyleMutator.setWidth(t._backgroundDomNode,e.width)}),!1},t.prototype.addOverlay=function(e){this._overlays.push(e),this._staticDomNode.appendChild(e.getDomNode())},t.prototype._render=function(e){for(var t=this,i=0;i<this._overlays.length;i++)this._overlays[i].prepareRender(e);this._requestModificationFrame(function(){for(var i=0;i<t._overlays.length;i++)t._overlays[i].render(e);t._scrollHeight!==e.scrollHeight&&(t._scrollHeight=e.scrollHeight,n.StyleMutator.setHeight(t._backgroundDomNode,t._scrollHeight)),n.StyleMutator.setTop(t._backgroundDomNode,e.getViewportVerticalOffsetForLineNumber(e.visibleRange.startLineNumber))})},t.prototype.onReadAfterForcedLayout=function(e){return this._render(e),null},t.prototype.onWriteAfterForcedLayout=function(){this._executeModificationRunners()},t}(i.ViewPart);t.ViewOverlays=r}),define("vs/css!vs/editor/core/view/overlays/currentLineHighlight/currentLineHighlight",["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/currentLineHighlight/currentLineHighlight",["require","exports","vs/editor/core/view/viewEventHandler","vs/base/dom/dom","vs/css!./currentLineHighlight"],function(e,t,n,i){var r=function(e){function t(t){e.call(this),this._context=t,this._currentLine=document.createElement("div"),this._currentLine.className="current-line",this._currentLineIsVisible=!0,i.StyleMutator.setWidth(this._currentLine,0),i.StyleMutator.setHeight(this._currentLine,this._context.configuration.editor.lineHeight),this._selectionIsEmpty=!0,this._primaryCursorIsInEditableRange=!0,this._updatePrimaryCursorPosition({lineNumber:1,column:1}),this._updateCurrentLine(),this._context.addEventHandler(this)}return __extends(t,e),t.prototype._updatePrimaryCursorPosition=function(e){this._primaryCursorPosition=e,this._primaryCursorPositionTop=-1e3},t.prototype.dispose=function(){this._context.removeEventHandler(this)},t.prototype.getDomNode=function(){return this._currentLine},t.prototype.onModelFlushed=function(){return this._primaryCursorIsInEditableRange=!0,this._selectionIsEmpty=!0,this._updatePrimaryCursorPosition({lineNumber:1,column:1}),!0},t.prototype.onModelLinesDeleted=function(){return!0},t.prototype.onModelLinesInserted=function(){return!0},t.prototype.onCursorPositionChanged=function(e){return this._primaryCursorIsInEditableRange=e.isInEditableRange,this._updatePrimaryCursorPosition(e.position),this._updateCurrentLine(),!0},t.prototype.onCursorSelectionChanged=function(e){return this._selectionIsEmpty=e.selection.isEmpty(),this._updateCurrentLine(),!1},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&i.StyleMutator.setHeight(this._currentLine,this._context.configuration.editor.lineHeight),!0},t.prototype.onLayoutChanged=function(e){return i.StyleMutator.setLeft(this._currentLine,e.contentLeft),i.StyleMutator.setWidth(this._currentLine,e.contentWidth),!0},t.prototype.onScrollChanged=function(){return!0},t.prototype.onZonesChanged=function(){return!0},t.prototype.onScrollWidthChanged=function(){return!0},t.prototype._shouldShowCurrentLine=function(){return this._selectionIsEmpty&&this._primaryCursorIsInEditableRange&&!this._context.configuration.editor.readOnly},t.prototype._updateCurrentLine=function(){this._shouldShowCurrentLine()?this._currentLineIsVisible||(i.StyleMutator.setDisplay(this._currentLine,"block"),this._currentLineIsVisible=!0):this._currentLineIsVisible&&(i.StyleMutator.setDisplay(this._currentLine,"none"),this._currentLineIsVisible=!1)},t.prototype.prepareRender=function(e){if(this.shouldRender){var t=e.visibleRangeForPosition(this._primaryCursorPosition);this._primaryCursorPositionTop=t?t.top:-1e3}},t.prototype.render=function(){this.shouldRender&&(this.shouldRender=!1,i.StyleMutator.setTop(this._currentLine,this._primaryCursorPositionTop))},t}(n.ViewEventHandler);t.CurrentLineHighlightOverlay=r}),define("vs/css!vs/editor/core/view/overlays/selections/selections",["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/selections/selections",["require","exports","vs/editor/core/view/viewEventHandler","vs/css!./selections"],function(e,t,n){var i;!function(e){e[e.EXTERN=0]="EXTERN",e[e.INTERN=1]="INTERN",e[e.FLAT=2]="FLAT"}(i||(i={}));var r=function(e){function t(t){e.call(this),this._previousFrameVisibleRangesWithStyle=[],this._context=t,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}return __extends(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._selections=null,this._renderResult=null},t.prototype.onModelFlushed=function(){return!0},t.prototype.onModelDecorationsChanged=function(e){return e.inlineDecorationsChanged},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(e){return this._selections=[e.selection],this._selections=this._selections.concat(e.secondarySelections),!0},t.prototype.onCursorRevealRange=function(){return!1},t.prototype.onConfigurationChanged=function(){return!0},t.prototype.onLayoutChanged=function(){return!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._visibleRangesHaveGaps=function(e){var t,n,i;for(t=0,n=e.length;n>t;t++)if(i=e[t],i.ranges.length>1)return!0;return!1},t.prototype._enrichVisibleRangesWithStyle=function(e,t){var n,r,o,s,a,u,l,c,d,h,p,f=null,g=null;if(t&&t.length>0&&e.length>0){for(var m=e[0].lineNumber,h=0;!f&&h<t.length;h++)t[h].lineNumber===m&&(f=t[h].ranges[0]);for(var v=e[e.length-1].lineNumber,h=t.length-1;!g&&h>=0;h--)t[h].lineNumber===v&&(g=t[h].ranges[0]);f&&!f.startStyle&&(f=null),g&&!g.startStyle&&(g=null)}for(h=0,p=e.length;p>h;h++)n=e[h].ranges[0],r=n.left,o=n.left+n.width,c={top:i.EXTERN,bottom:i.EXTERN},d={top:i.EXTERN,bottom:i.EXTERN},h>0?(s=e[h-1].ranges[0].left,a=e[h-1].ranges[0].left+e[h-1].ranges[0].width,r===s?c.top=i.FLAT:r>s&&(c.top=i.INTERN),o===a?d.top=i.FLAT:o>s&&a>o&&(d.top=i.INTERN)):f&&(c.top=f.startStyle.top,d.top=f.endStyle.top),p>h+1?(u=e[h+1].ranges[0].left,l=e[h+1].ranges[0].left+e[h+1].ranges[0].width,r===u?c.bottom=i.FLAT:r>u&&l>r&&(c.bottom=i.INTERN),o===l?d.bottom=i.FLAT:l>o&&(d.bottom=i.INTERN)):g&&(c.bottom=g.startStyle.bottom,d.bottom=g.endStyle.bottom),n.startStyle=c,n.endStyle=d},t.prototype._getVisibleRangesWithStyle=function(e,t,n){var i=t.linesVisibleRangesForRange(e,!0)||[],r=this._visibleRangesHaveGaps(i),o=navigator.userAgent.indexOf("Trident/7.0")>=0;return o||r||!this._context.configuration.editor.roundedSelection||this._enrichVisibleRangesWithStyle(i,n),i},t.prototype._createSelectionPiece=function(e,t,n,i,r){e.push('<div class="cslr '),e.push(n),e.push('" style="left:'),e.push(i.toString()),e.push("px;width:"),e.push(r.toString()),e.push("px;height:"),e.push(t),e.push('px;"></div>')},t.prototype._actualRenderOneSelection=function(e,n){var r,o,s,a,u,l,c,d,h=n.length>0&&n[0].ranges[0].startStyle,p=this._context.configuration.editor.lineHeight.toString(),f=0;for(a=0,u=n.length;u>a;a++)for(r=n[a],e.hasOwnProperty(r.lineNumber.toString())?o=e[r.lineNumber.toString()]:(o=[],e[r.lineNumber.toString()]=o),l=0,c=r.ranges.length;c>l;l++)d=r.ranges[l],h&&((d.startStyle.top===i.INTERN||d.startStyle.bottom===i.INTERN)&&(f++,this._createSelectionPiece(o,p,t.SELECTION_CLASS_NAME,d.left-t.ROUNDED_PIECE_WIDTH,t.ROUNDED_PIECE_WIDTH),s=t.EDITOR_BACKGROUND_CLASS_NAME,d.startStyle.top===i.INTERN&&(s+=" "+t.SELECTION_TOP_RIGHT),d.startStyle.bottom===i.INTERN&&(s+=" "+t.SELECTION_BOTTOM_RIGHT),f++,this._createSelectionPiece(o,p,s,d.left-t.ROUNDED_PIECE_WIDTH,t.ROUNDED_PIECE_WIDTH)),(d.endStyle.top===i.INTERN||d.endStyle.bottom===i.INTERN)&&(f++,this._createSelectionPiece(o,p,t.SELECTION_CLASS_NAME,d.left+d.width,t.ROUNDED_PIECE_WIDTH),s=t.EDITOR_BACKGROUND_CLASS_NAME,d.endStyle.top===i.INTERN&&(s+=" "+t.SELECTION_TOP_LEFT),d.endStyle.bottom===i.INTERN&&(s+=" "+t.SELECTION_BOTTOM_LEFT),f++,this._createSelectionPiece(o,p,s,d.left+d.width,t.ROUNDED_PIECE_WIDTH))),s=t.SELECTION_CLASS_NAME,h&&(d.startStyle.top===i.EXTERN&&(s+=" "+t.SELECTION_TOP_LEFT),d.startStyle.bottom===i.EXTERN&&(s+=" "+t.SELECTION_BOTTOM_LEFT),d.endStyle.top===i.EXTERN&&(s+=" "+t.SELECTION_TOP_RIGHT),d.endStyle.bottom===i.EXTERN&&(s+=" "+t.SELECTION_BOTTOM_RIGHT)),f++,this._createSelectionPiece(o,p,s,d.left,d.width);return f},t.prototype.shouldCallRender2=function(e){if(!this.shouldRender)return!1;this.shouldRender=!1;var t,n,i,r={},o=0,s=[];for(i=0;i<this._selections.length;i++)t=this._selections[i],t.isEmpty()?s.push(null):(n=this._getVisibleRangesWithStyle(t,e,this._previousFrameVisibleRangesWithStyle[i]),s.push(n),o+=this._actualRenderOneSelection(r,n));return this._previousFrameVisibleRangesWithStyle=s,this._renderResult=r,!0},t.prototype.render2=function(e){return this._renderResult&&this._renderResult.hasOwnProperty(e.toString())?this._renderResult[e.toString()]:null},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._renderResult=null,this._context.addEventHandler(this)}return __extends(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=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(){return!0},t.prototype.onScrollChanged=function(e){return e.vertical},t.prototype.onZonesChanged=function(){return!0},t.prototype.onScrollWidthChanged=function(){return!0},t.prototype.onScrollHeightChanged=function(){return!1},t.prototype.shouldCallRender2=function(e){if(!this.shouldRender)return!1;this.shouldRender=!1;var t,n,i,r,o,s,a,u,l,c,d,h,p={},f=e.getDecorationsInViewport(),g=this._context.configuration.editor.lineHeight.toString(),m=0;for(a=0,u=f.length;u>a;a++)if(n=f[a],i=n.range,n.options.className)if(n.options.isWholeLine)for(l=i.startLineNumber;l<=i.endLineNumber;l++)e.lineIsVisible(l)&&(p.hasOwnProperty(l.toString())?t=p[l.toString()]:(t=[],p[l.toString()]=t),m++,t.push('<div class="cdr '),t.push(n.options.className),t.push('" style="left:0;width:100%;height:'),t.push(g.toString()),t.push('px;"></div>'));else if(r=e.linesVisibleRangesForRange(i,!1))for(l=0,c=r.length;c>l;l++)for(o=r[l],p.hasOwnProperty(o.lineNumber.toString())?t=p[o.lineNumber.toString()]:(t=[],p[o.lineNumber.toString()]=t),d=0,h=o.ranges.length;h>d;d++)s=o.ranges[d],m++,t.push('<div class="cdr '),t.push(n.options.className),t.push('" style="left:'),t.push(s.left.toString()),t.push("px;width:"),t.push(s.width.toString()),t.push("px;height:"),t.push(g.toString()),t.push('px;"></div>');return this._renderResult=p,!0},t.prototype.render2=function(e){return this._renderResult&&this._renderResult.hasOwnProperty(e.toString())?this._renderResult[e.toString()]:null},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/base/dom/dom","vs/editor/core/view/viewPart","vs/css!./glyphMargin"],function(e,t,n,i,r,o){var s=function(e){function t(t){e.call(this,t),this._context=t,this._domNode=document.createElement("div"),this._domNode.className=n.ClassNames.GLYPH_MARGIN}return __extends(t,e),t.prototype.getDomNode=function(){return this._domNode},t.prototype.onLayoutChanged=function(e){var t=this;return this._requestModificationFrame(function(){r.StyleMutator.setLeft(t._domNode,e.glyphMarginLeft),r.StyleMutator.setWidth(t._domNode,e.glyphMarginWidth),r.StyleMutator.setHeight(t._domNode,e.height)}),!0},t.prototype._render=function(){},t}(o.ViewPart);t.GlyphMarginViewPart=s;var a=function(e){function t(t){e.call(this),this._context=t,this._glyphMarginLeft=0,this._glyphMarginWidth=0,this._renderResult=null,this._context.addEventHandler(this)}return __extends(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=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.shouldCallRender2=function(e){if(!this.shouldRender)return!1;if(this.shouldRender=!1,!this._context.configuration.editor.glyphMargin)return this._renderResult=null,!1;var t,n,i,r,o,s,a,u,l,c={},d=0,h=e.getDecorationsInViewport(),p=this._context.configuration.editor.lineHeight.toString(),f={};for(i=0,r=h.length;r>i;i++)if(t=h[i],t.options.glyphMarginClassName)for(n=t.range,u=n.startLineNumber;u<=n.endLineNumber;u++)e.lineIsVisible(u)&&(l=u.toString(),f.hasOwnProperty(l)||(f[l]={}),f[l][t.options.glyphMarginClassName]=!0);var g=this._glyphMarginLeft.toString(),m=this._glyphMarginWidth.toString(),v='" style="left:'+g+"px;width:"+m+"px;height:"+p+'px;"></div>';for(l in f){o=f[l],a=[],a.push('<div class="cgmr');for(s in o)d++,a.push(" "),a.push(s);a.push(v),c[l]=a}return this._renderResult=c,!0},t.prototype.render2=function(e){return this._renderResult&&this._renderResult.hasOwnProperty(e.toString())?this._renderResult[e.toString()]:null},t}(i.ViewEventHandler);t.GlyphMarginOverlay=a}),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/viewEventHandler","vs/css!./linesDecorations"],function(e,t,n){var i=function(e){function t(t){e.call(this),this._context=t,this._decorationsLeft=0,this._decorationsWidth=0,this._renderResult=null,this._context.addEventHandler(this)}return __extends(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=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.shouldCallRender2=function(e){if(!this.shouldRender)return!1;this.shouldRender=!1;var t,n,i,r,o,s,a,u,l,c={},d=0,h=e.getDecorationsInViewport(),p=this._context.configuration.editor.lineHeight.toString(),f={};for(i=0,r=h.length;r>i;i++)if(t=h[i],t.options.linesDecorationsClassName)for(n=t.range,u=n.startLineNumber;u<=n.endLineNumber;u++)e.lineIsVisible(u)&&(l=u.toString(),f.hasOwnProperty(l)||(f[l]={}),f[l][t.options.linesDecorationsClassName]=!0);var g=this._decorationsLeft.toString(),m=this._decorationsWidth.toString(),v='" style="left:'+g+"px;width:"+m+"px;height:"+p+'px;"></div>';for(l in f){o=f[l],a=[],a.push('<div class="cldr');for(s in o)d++,a.push(" "),a.push(s);a.push(v),c[l]=a}return this._renderResult=c,!0},t.prototype.render2=function(e){return this._renderResult&&this._renderResult.hasOwnProperty(e.toString())?this._renderResult[e.toString()]:null},t}(n.ViewEventHandler);t.LinesDecorationsOverlay=i}),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._renderResult=null,this._context.addEventHandler(this)}return __extends(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=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.shouldCallRender2=function(e){if(!this.shouldRender)return!1;if(this.shouldRender=!1,!this._context.configuration.editor.lineNumbers)return this._renderResult=null,!1;var t,i,r={},o=this._context.configuration.editor.lineHeight.toString(),s='<div class="'+n.ClassNames.LINE_NUMBERS+'" style="left:'+this._lineNumbersLeft.toString()+"px;width:"+this._lineNumbersWidth.toString()+"px;height:"+o+'px;">';for(t=e.visibleRange.startLineNumber;t<=e.visibleRange.endLineNumber;t++)if(i=this._context.model.getLineRenderLineNumber(t)){var a=[s,this._context.model.getLineRenderLineNumber(t),"</div>"];r[t.toString()]=a}return this._renderResult=r,!0},t.prototype.render2=function(e){return this._renderResult&&this._renderResult.hasOwnProperty(e.toString())?this._renderResult[e.toString()]:null},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/base/dom/dom","vs/editor/core/view/viewPart","vs/css!./scrollDecoration"],function(e,t,n,i,r){var o=function(e){function t(t){e.call(this,t),this._scrollTop=0,this._width=0,this._shouldShow=!1,this._domNode=document.createElement("div")}return __extends(t,e),t.prototype._updateShouldShow=function(){var e=this._context.configuration.editor.scrollbar.useShadows&&this._scrollTop>0;return this._shouldShow!==e?(this._shouldShow=e,!0):!1},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(){return this._updateShouldShow()},t.prototype.onLayoutChanged=function(e){return this._width!==e.width?(this._width=e.width,!0):!1},t.prototype.onScrollChanged=function(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()},t.prototype._render=function(){var e=this;this._requestModificationFrame(function(){i.StyleMutator.setWidth(e._domNode,e._width),i.toggleClass(e._domNode,n.ClassNames.SCROLL_DECORATION,e._shouldShow)})},t}(r.ViewPart);t.ScrollDecorationViewPart=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/viewOverlays2",["require","exports","vs/editor/core/view/viewLayer","vs/editor/core/view/viewContext","vs/base/dom/dom"],function(e,t,n,i,r){var o=function(e){function t(t,n){e.call(this,t),this._layoutProvider=n,this._dynamicOverlays=[],this.domNode.className="view-overlays"}return __extends(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._layoutProvider=null;for(var t=0;t<this._dynamicOverlays.length;t++)this._dynamicOverlays[t].dispose();this._dynamicOverlays=null},t.prototype.getDomNode=function(){return this.domNode},t.prototype.addDynamicOverlay=function(e){this._dynamicOverlays.push(e)},t.prototype.onViewFocusChanged=function(e){var t=this;return this._requestModificationFrame(function(){r.toggleClass(t.domNode,"focused",e)}),!1},t.prototype._createLine=function(){var e=new s(this._context,this._dynamicOverlays);return e},t.prototype.onReadAfterForcedLayout=function(e){for(var t=this,n=0;n<this._dynamicOverlays.length;n++)this._dynamicOverlays[n].shouldCallRender2(e);return this._requestModificationFrame(function(){t._viewOverlaysRender(e)}),null},t.prototype._viewOverlaysRender=function(t){e.prototype._renderLines.call(this,t.linesViewportData)},t.prototype.onWriteAfterForcedLayout=function(){this._executeModificationRunners()},t}(n.ViewLayer);t.ViewOverlays2=o;var s=function(){function e(e,t){this._context=e,this._dynamicOverlays=t,this._domNode=null,this._renderPieces=null}return e.prototype.getDomNode=function(){return this._domNode},e.prototype.setDomNode=function(e){this._domNode=e},e.prototype.onContentChanged=function(){},e.prototype.onLinesInsertedAbove=function(){},e.prototype.onLinesDeletedAbove=function(){},e.prototype.onLineChangedAbove=function(){},e.prototype.onTokensChanged=function(){},e.prototype.onConfigurationChanged=function(){},e.prototype._piecesEqual=function(e){if(!this._renderPieces||this._renderPieces.length!==e.length)return!1;for(var t=0,n=e.length;n>t;t++)if(this._renderPieces[t]!==e[t])return!1;return!0},e.prototype.shouldUpdateHTML=function(e){for(var t=[],n=0;n<this._dynamicOverlays.length;n++){var i=this._dynamicOverlays[n].render2(e);i&&i.length>0&&(t=t.concat(i))}var r=this._piecesEqual(t);return r||(this._renderPieces=t),!r},e.prototype.getLineOuterHTML=function(e,t,n){e.push('<div lineNumber="'),e.push(t.toString()),e.push('" style="top:'),e.push(n.toString()),e.push("px;height:"),e.push(this._context.configuration.editor.lineHeight.toString()),e.push('px;" class="'),e.push(i.ClassNames.VIEW_LINE),e.push('">'),e.push(this.getLineInnerHTML(t)),e.push("</div>")},e.prototype.getLineInnerHTML=function(){return this._renderPieces.join("")},e.prototype.layoutLine=function(e,t){var n=this._domNode.getAttribute("lineNumber");n!==e.toString()&&this._domNode.setAttribute("lineNumber",e.toString()),r.StyleMutator.setTop(this._domNode,t),r.StyleMutator.setHeight(this._domNode,this._context.configuration.editor.lineHeight)},e}()});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/marginViewOverlays",["require","exports","vs/base/env","vs/base/dom/dom","vs/editor/core/view/viewOverlays2"],function(e,t,n,i,r){var o=function(e){function t(t,n){e.call(this,t,n),this._hasVerticalScroll=!1,this.domNode.className="margin-view-overlays",i.StyleMutator.setWidth(this.domNode,1),this._updateDomNodeHeight()}return __extends(t,e),t.prototype.onLayoutChanged=function(t){var n=this;return this._requestModificationFrame(function(){i.StyleMutator.setWidth(n.domNode,t.contentLeft),n._updateDomNodeHeight()}),e.prototype.onLayoutChanged.call(this,t)||!0},t.prototype.onScrollChanged=function(t){return this._hasVerticalScroll=this._hasVerticalScroll||t.vertical,e.prototype.onScrollChanged.call(this,t)},t.prototype._viewOverlaysRender=function(t){if(e.prototype._viewOverlaysRender.call(this,t),this._hasVerticalScroll){if(n.browser.canUseTranslate3d){var r="translate3d(0px, "+t.linesViewportData.visibleRangesDeltaTop+"px, 0px)";i.StyleMutator.setTransform(this.domNode,r)
}else this._hasVerticalScroll&&i.StyleMutator.setTop(this.domNode,t.linesViewportData.visibleRangesDeltaTop);this._hasVerticalScroll=!1}},t.prototype._updateDomNodeHeight=function(){var e=Math.min(this._layoutProvider.getTotalHeight(),1e6);i.StyleMutator.setHeight(this.domNode,e)},t}(r.ViewOverlays2);t.MarginViewOverlays=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/contentViewOverlays",["require","exports","vs/base/dom/dom","vs/editor/core/view/viewOverlays2"],function(e,t,n,i){var r=function(e){function t(t,i){e.call(this,t,i),n.StyleMutator.setWidth(this.domNode,0),n.StyleMutator.setHeight(this.domNode,0)}return __extends(t,e),t.prototype.onScrollWidthChanged=function(){return!0},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t),n.StyleMutator.setWidth(this.domNode,this._layoutProvider.getScrollWidth())},t}(i.ViewOverlays2);t.ContentViewOverlays=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/errors","vs/base/performance/timer","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/editor/core/view/marginViewOverlays","vs/editor/core/view/contentViewOverlays","vs/base/lifecycle"],function(e,t,n,i,r,o,s,a,u,l,c,d,h,p,f,g,m,v,y,_,b,w,C,E,S,T,L,x,M,N,k,I,O,P){var R=function(e){function t(t,n,i){var o=this;e.call(this),this._isDisposed=!1,this._renderAnimationFrame=null,this.outgoingEventBus=new r.EventEmitter;var l=new C.ViewController(i,n,this.outgoingEventBus);this.listenersToRemove=[],this.listenersToDispose=[],this.eventDispatcher=new y.ViewEventDispatcher(function(e){return o._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 o.eventDispatcher.addEventHandler(e)},function(e){return o.eventDispatcher.removeEventHandler(e)}),this.createTextArea(),this.createViewParts(),this.keyboardHandler=new a.KeyboardHandler(this.context,l,this.createKeyboardHandlerHelper()),this.pointerHandler=new u.PointerHandler(this.context,l,this.createPointerHandlerHelper()),this.hasFocus=!1,this.codeEditorHelper=null,this.eventDispatcher.addEventHandler(this),this.handleAccumulatedModelEventsTimeout=-1,this.accumulatedModelEvents=[],this.listenersToRemove.push(i.addBulkListener(function(e){o.accumulatedModelEvents=o.accumulatedModelEvents.concat(e),-1===o.handleAccumulatedModelEventsTimeout&&(o.handleAccumulatedModelEventsTimeout=setTimeout(function(){o.handleAccumulatedModelEventsTimeout=-1,o._flushAnyAccumulatedEvents()}))}))}return __extends(t,e),t.prototype._flushAnyAccumulatedEvents=function(){var e=this.accumulatedModelEvents;this.accumulatedModelEvents=[],e.length>0&&this.eventDispatcher.emitMany(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"),i.StyleMutator.setTop(this.textArea,0),i.StyleMutator.setLeft(this.textArea,0),i.StyleMutator.setFontSize(this.textArea,this.context.configuration.editor.fontSize),i.StyleMutator.setLineHeight(this.textArea,this.context.configuration.editor.lineHeight),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?"monaco-editor-background "+s.ClassNames.GLYPH_MARGIN+" "+s.ClassNames.TEXTAREA_COVER:this.context.configuration.editor.lineNumbers?"monaco-editor-background "+s.ClassNames.LINE_NUMBERS+" "+s.ClassNames.TEXTAREA_COVER:"monaco-editor-background "+s.ClassNames.TEXTAREA_COVER,this.textAreaCover.style.position="absolute",i.StyleMutator.setWidth(this.textAreaCover,1),i.StyleMutator.setHeight(this.textAreaCover,1),i.StyleMutator.setTop(this.textAreaCover,0),i.StyleMutator.setLeft(this.textAreaCover,0)},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 x.GlyphMarginViewPart(this.context);this.viewParts.push(n);var i=new k.ScrollDecorationViewPart(this.context);this.viewParts.push(i);var r=new E.ViewOverlays(this.context);this.viewParts.push(r),r.addOverlay(new S.CurrentLineHighlightOverlay(this.context));var o=new O.ContentViewOverlays(this.context,this.layoutProvider);this.viewParts.push(o),o.addDynamicOverlay(new T.SelectionsOverlay(this.context)),o.addDynamicOverlay(new L.DecorationsOverlay(this.context));var s=new I.MarginViewOverlays(this.context,this.layoutProvider);this.viewParts.push(s),s.addDynamicOverlay(new x.GlyphMarginOverlay(this.context)),s.addDynamicOverlay(new M.LinesDecorationsOverlay(this.context)),s.addDynamicOverlay(new N.LineNumbersOverlay(this.context)),this.contentWidgets=new f.ViewContentWidgets(this.context),this.viewParts.push(this.contentWidgets);var a=new p.ViewCursors(this.context);if(this.viewParts.push(a),this.overlayWidgets=new g.ViewOverlayWidgets(this.context),this.viewParts.push(this.overlayWidgets),this.linesContentContainer=this.layoutProvider.getScrollbarContainerDomNode(),this.linesContentContainer.style.position="absolute",t){var u=this.layoutProvider.getOverviewRulerInsertData();u.parent.insertBefore(t.getDomNode(),u.insertBefore)}this.linesContent.appendChild(o.getDomNode()),this.linesContent.appendChild(this.viewZones.domNode),this.linesContent.appendChild(this.viewLines.domNode),this.linesContent.appendChild(this.contentWidgets.domNode),this.linesContent.appendChild(a.getDomNode()),this.overflowGuardContainer.appendChild(n.getDomNode()),this.overflowGuardContainer.appendChild(i.getDomNode()),this.overflowGuardContainer.appendChild(r.domNode),this.overflowGuardContainer.appendChild(s.getDomNode()),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._flushAccumulatedAndRenderNow=function(){this._flushAnyAccumulatedEvents(),this._renderNow()},t.prototype.createPointerHandlerHelper=function(){var e=this;return{viewDomNode:this.domNode,linesContentDomNode:this.linesContent,focusTextArea:function(){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.focusTextArea: View is disposed");e.focus()},getScrollTop:function(){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.getScrollTop: View is disposed");return e.layoutProvider.getScrollTop()},setScrollTop:function(t){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.setScrollTop: View is disposed");e.layoutProvider.setScrollTop(t)},getScrollLeft:function(){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.getScrollLeft: View is disposed");return e.layoutProvider.getScrollLeft()},setScrollLeft:function(t){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.setScrollLeft: View is disposed");e.layoutProvider.setScrollLeft(t)},isAfterLines:function(t){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.isAfterLines: View is disposed");return e.layoutProvider.isAfterLines(t)},getLineNumberAtVerticalOffset:function(t){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.getLineNumberAtVerticalOffset: View is disposed");return e.layoutProvider.getLineNumberAtVerticalOffset(t)},getWhitespaceAtVerticalOffset:function(t){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.getWhitespaceAtVerticalOffset: View is disposed");return e.layoutProvider.getWhitespaceAtVerticalOffset(t)},shouldSuppressMouseDownOnViewZone:function(t){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.shouldSuppressMouseDownOnViewZone: View is disposed");return e.viewZones.shouldSuppressMouseDownOnViewZone(t)},getPositionFromDOMInfo:function(t,n){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.getPositionFromDOMInfo: View is disposed");return e._flushAccumulatedAndRenderNow(),e.viewLines.getPositionFromDOMInfo(t,n)},visibleRangeForPosition2:function(t,n){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.visibleRangeForPosition2: View is disposed");e._flushAccumulatedAndRenderNow();var i=0,r=e.viewLines.visibleRangesForRange2(new _.Range(t,n,t,n),0,i,!1);return r?r[0]:null},getLineWidth:function(t){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.getLineWidth: View is disposed");return e._flushAccumulatedAndRenderNow(),e.viewLines.getLineWidth(t)}}},t.prototype.createKeyboardHandlerHelper=function(){var e=this;return{viewDomNode:this.domNode,textArea:this.textArea,visibleRangeForPositionRelativeToEditor:function(t,n){if(e._isDisposed)throw new Error("ViewImpl.keyboardHandler.visibleRangeForPositionRelativeToEditor: View is disposed");e._flushAccumulatedAndRenderNow();var i=e.layoutProvider.getLinesViewportData(),r=0,o=e.viewLines.visibleRangesForRange2(new _.Range(t,n,t,n),i.visibleRangesDeltaTop,r,!1);return o?o[0]:null}}},t.prototype.onLayoutChanged=function(e){return i.StyleMutator.setWidth(this.domNode,e.width),i.StyleMutator.setHeight(this.domNode,e.height),i.StyleMutator.setWidth(this.overflowGuardContainer,e.width),i.StyleMutator.setHeight(this.overflowGuardContainer,e.height),i.StyleMutator.setWidth(this.linesContent,1e6),i.StyleMutator.setHeight(this.linesContent,1e6),i.StyleMutator.setLeft(this.linesContentContainer,e.contentLeft),i.StyleMutator.setWidth(this.linesContentContainer,e.contentWidth),i.StyleMutator.setHeight(this.linesContentContainer,e.contentHeight),this.outgoingEventBus.emit(o.EventType.ViewLayoutChanged,e),!1},t.prototype.onConfigurationChanged=function(){return this.domNode.className=this.context.configuration.getEditorClassName(),i.StyleMutator.setFontSize(this.textArea,this.context.configuration.editor.fontSize),i.StyleMutator.setLineHeight(this.textArea,this.context.configuration.editor.lineHeight),!1},t.prototype.onScrollChanged=function(){return this.outgoingEventBus.emit("scroll",{scrollTop:this.layoutProvider.getScrollTop(),scrollLeft:this.layoutProvider.getScrollLeft()}),!1},t.prototype.onScrollHeightChanged=function(t){return this.outgoingEventBus.emit("scrollSize",{scrollWidth:this.layoutProvider.getScrollWidth(),scrollHeight:this.layoutProvider.getScrollHeight()}),e.prototype.onScrollHeightChanged.call(this,t)},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._isDisposed=!0,-1!==this.handleAccumulatedModelEventsTimeout&&(clearTimeout(this.handleAccumulatedModelEventsTimeout),this.handleAccumulatedModelEventsTimeout=-1),null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this.accumulatedModelEvents=[],this.eventDispatcher.removeEventHandler(this),this.outgoingEventBus.dispose(),this.listenersToRemove.forEach(function(e){e()}),this.listenersToRemove=[],this.listenersToDispose=P.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(){if(e._isDisposed)throw new Error("ViewImpl.codeEditorHelper.getScrollTop: View is disposed");return e.layoutProvider.getScrollTop()},setScrollTop:function(t){if(e._isDisposed)throw new Error("ViewImpl.codeEditorHelper.setScrollTop: View is disposed");e.layoutProvider.setScrollTop(t)},getScrollLeft:function(){if(e._isDisposed)throw new Error("ViewImpl.codeEditorHelper.getScrollLeft: View is disposed");return e.layoutProvider.getScrollLeft()},setScrollLeft:function(t){if(e._isDisposed)throw new Error("ViewImpl.codeEditorHelper.setScrollLeft: View is disposed");e.layoutProvider.setScrollLeft(t)},getScrollHeight:function(){if(e._isDisposed)throw new Error("ViewImpl.codeEditorHelper.getScrollHeight: View is disposed");return e.layoutProvider.getScrollHeight()},getScrollWidth:function(){if(e._isDisposed)throw new Error("ViewImpl.codeEditorHelper.getScrollWidth: View is disposed");return e.layoutProvider.getScrollWidth()},getLayoutInfo:function(){if(e._isDisposed)throw new Error("ViewImpl.codeEditorHelper.getLayoutInfo: View is disposed");return e.layoutProvider.getLayoutInfo()},getVerticalOffsetForLineNumber:function(t){if(e._isDisposed)throw new Error("ViewImpl.codeEditorHelper.getVerticalOffsetForLineNumber: View is disposed");return e.layoutProvider.getVerticalOffsetForLineNumber(t)},delegateVerticalScrollbarMouseDown:function(t){if(e._isDisposed)throw new Error("ViewImpl.codeEditorHelper.delegateVerticalScrollbarMouseDown: View is disposed");e.layoutProvider.delegateVerticalScrollbarMouseDown(t)},getOffsetForColumn:function(t,n){if(e._isDisposed)throw new Error("ViewImpl.codeEditorHelper.getOffsetForColumn: View is disposed");e._flushAccumulatedAndRenderNow();var i=e.viewLines.visibleRangesForRange2(new _.Range(t,n,t,n),0,0,!1);return i?i[0].left:-1}}),this.codeEditorHelper},t.prototype.getCenteredRangeInViewport=function(){if(this._isDisposed)throw new Error("ViewImpl.getCenteredRangeInViewport: View is disposed");var e=this.layoutProvider.getCenteredViewLineNumberInViewport(),t=this.context.model,n=new _.Range(e,1,e,t.getLineMaxColumn(e));return t.convertViewRangeToModelRange(n)},t.prototype.getInternalEventBus=function(){if(this._isDisposed)throw new Error("ViewImpl.getInternalEventBus: View is disposed");return this.outgoingEventBus},t.prototype.saveState=function(){if(this._isDisposed)throw new Error("ViewImpl.saveState: View is disposed");return this.layoutProvider.saveState()},t.prototype.restoreState=function(e){if(this._isDisposed)throw new Error("ViewImpl.restoreState: View is disposed");return this._flushAnyAccumulatedEvents(),this.layoutProvider.restoreState(e)},t.prototype.focus=function(){if(this._isDisposed)throw new Error("ViewImpl.focus: View is disposed");var e=i.saveParentsScrollTop(this.textArea);this.textArea.focus(),i.selectTextInInputElement(this.textArea),i.restoreParentsScrollTop(this.textArea,e),this._setHasFocus(!0)},t.prototype.isFocused=function(){if(this._isDisposed)throw new Error("ViewImpl.isFocused: View is disposed");return this.hasFocus},t.prototype.createOverviewRuler=function(e,t,n){var i=this;if(this._isDisposed)throw new Error("ViewImpl.createOverviewRuler: View is disposed");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;if(this._isDisposed)throw new Error("ViewImpl.change: View is disposed");var n=!1;return this._renderOnce(function(){t._flushAnyAccumulatedEvents();var i={addZone:function(e){return n=!0,t.viewZones.addZone(e)},removeZone:function(e){n=t.viewZones.removeZone(e)||n},layoutZone:function(e){n=t.viewZones.layoutZone(e)||n}},r=null;try{r=e(i)}catch(s){b.onUnexpectedError(s)}return i.addZone=null,i.removeZone=null,n&&t.context.privateViewEventBus.emit(o.EventType.ViewZonesChanged,null),r}),n},t.prototype.getWhitespaces=function(){if(this._isDisposed)throw new Error("ViewImpl.getWhitespaces: View is disposed");return this.layoutProvider.getWhitespaces()},t.prototype.addContentWidget=function(e){var t=this;if(this._isDisposed)throw new Error("ViewImpl.addContentWidget: View is disposed");this._renderOnce(function(){t.contentWidgets.addWidget(e.widget),t.layoutContentWidget(e)})},t.prototype.layoutContentWidget=function(e){var t=this;if(this._isDisposed)throw new Error("ViewImpl.layoutContentWidget: View is disposed");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;if(this._isDisposed)throw new Error("ViewImpl.removeContentWidget: View is disposed");this._renderOnce(function(){t.contentWidgets.removeWidget(e.widget)})},t.prototype.addOverlayWidget=function(e){var t=this;if(this._isDisposed)throw new Error("ViewImpl.addOverlayWidget: View is disposed");this._renderOnce(function(){t.overlayWidgets.addWidget(e.widget),t.layoutOverlayWidget(e)})},t.prototype.layoutOverlayWidget=function(e){var t=this;if(this._isDisposed)throw new Error("ViewImpl.layoutOverlayWidget: View is disposed");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;if(this._isDisposed)throw new Error("ViewImpl.removeOverlayWidget: View is disposed");this._renderOnce(function(){t.overlayWidgets.removeWidget(e.widget)})},t.prototype.render=function(){if(this._isDisposed)throw new Error("ViewImpl.render: View is disposed");this.layoutProvider.emitLayoutChangedEvent()},t.prototype.renderOnce=function(e){if(this._isDisposed)throw new Error("ViewImpl.renderOnce: View is disposed");return this._renderOnce(e)},t.prototype._renderOnce=function(e){var t=this;if(this._isDisposed)throw new Error("ViewImpl._renderOnce: View is disposed");return this.outgoingEventBus.deferredEmit(function(){try{var n=e?e():null}finally{t._scheduleRender()}return n})},t.prototype._scheduleRender=function(){if(this._isDisposed)throw new Error("ViewImpl._scheduleRender: View is disposed");null===this._renderAnimationFrame&&(this._renderAnimationFrame=i.runAtThisOrScheduleAtNextAnimationFrame(this._onRenderScheduled.bind(this),100))},t.prototype._onRenderScheduled=function(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()},t.prototype._renderNow=function(){if(this._isDisposed)throw new Error("ViewImpl._renderNow: View is disposed");this.actualRender()},t.prototype.createRenderingContext=function(e){var t=this,n=this.layoutProvider.getCurrentViewport(),i=e.visibleRangesDeltaTop,r=0,o={linesViewportData:e,scrollWidth:this.layoutProvider.getScrollWidth(),scrollHeight:this.layoutProvider.getScrollHeight(),visibleRange:e.visibleRange,bigNumbersDelta:e.bigNumbersDelta,viewportWidth:n.width,viewportHeight:n.height,viewportLeft:n.left,viewportTop:n.top,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)},getDecorationsInViewport:function(){return e.getDecorationsInViewport()},visibleRangesForRange:function(e,n){return t.viewLines.visibleRangesForRange2(e,i,r,n)},linesVisibleRangesForRange:function(e,n){return t.viewLines.linesVisibleRangesForRange(e,n)},visibleRangeForPosition:function(e){var n=t.viewLines.visibleRangesForRange2(new _.Range(e.lineNumber,e.column,e.lineNumber,e.column),i,r,!1);return n?n[0]:null},visibleRangeForPosition2:function(e,n){var o=t.viewLines.visibleRangesForRange2(new _.Range(e,n,e,n),i,r,!1);return o?o[0]:null},lineIsVisible:function(t){return e.visibleRange.startLineNumber<=t&&t<=e.visibleRange.endLineNumber}};return o},t.prototype.actualRender=function(){if(this._isDisposed)throw new Error("ViewImpl.actualRender: View is disposed");if(i.isInDOM(this.domNode)){var e,t,n=w.start(w.Topic.EDITOR,"View.render");try{for(e=0,t=this.viewParts.length;t>e;e++)this.viewParts[e].onBeforeForcedLayout();var r=this.viewLines.render(),o=this.createRenderingContext(r);for(e=0,t=this.viewParts.length;t>e;e++)this.viewParts[e].onReadAfterForcedLayout(o);for(e=0,t=this.viewParts.length;t>e;e++)this.viewParts[e].onWriteAfterForcedLayout()}catch(s){b.onUnexpectedError(s)}n.stop()}},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=R}),define("vs/editor/core/view/model/prefixSumComputer",["require","exports"],function(e,t){var n=function(){function e(e){this.values=e,this.prefixSum=[];for(var t=0,n=this.values.length;n>t;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-1<this.prefixSumValidIndex&&(this.prefixSumValidIndex=e-1)},e.prototype.changeValue=function(e,t){this.values[e]!==t&&(this.values[e]=t,e-1<this.prefixSumValidIndex&&(this.prefixSumValidIndex=e-1))},e.prototype.removeValues=function(e,t){this.values.splice(e,t),this.prefixSum.splice(e,t),e-1<this.prefixSumValidIndex&&(this.prefixSumValidIndex=e-1)},e.prototype.getTotalValue=function(){return 0===this.values.length?0:this.getAccumulatedValue(this.values.length-1)},e.prototype.getAccumulatedValue=function(e){if(0>e)return 0;if(e<=this.prefixSumValidIndex)return this.prefixSum[e];var t=this.prefixSumValidIndex+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);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/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<l.length;i++)u=Math.max(u,l.charCodeAt(i));for(i=0;u>=i;i++)r[i]=0;for(i=0;i<e.length;i++)r[e.charCodeAt(i)]=o;for(i=0;i<t.length;i++)r[t.charCodeAt(i)]=s;for(i=0;i<n.length;i++)r[n.charCodeAt(i)]=a;return r}var r={index:-1,remainder:-1},o=1,s=2,a=3,u=function(){function e(e,t,n){this.characterClasses=i(e,t,n)}return e.nextVisibleColumn=function(e,t,n){return n?e+(t-e%t):e+1},e.prototype.createLineMapping=function(t,i,r){if(-1===r)return null;var u,c,d,h,p,f,g,m,v=this.characterClasses,y="	".charCodeAt(0),_=0,b=[],w=0,C=-1,E=0,S=-1,T=0;for(d=0,u=0,c=t.length;c>u;u++)h=t.charCodeAt(u),p=h===y,f=h<v.length?v[h]:0,f===o&&(C=u,E=0),d=e.nextVisibleColumn(d,i,p),d>r&&0!==u&&(-1!==C?(g=C,m=E):-1!==S?(g=S,m=T):(g=u,m=0),b[w++]=g-_,_=g,d=e.nextVisibleColumn(m,i,p),C=-1,E=0,S=-1,T=0),-1!==C&&(E=e.nextVisibleColumn(E,i,p)),-1!==S&&(T=e.nextVisibleColumn(T,i,p)),f===s&&(C=u+1,E=0),f===a&&(S=u+1,T=0);return 0===w?null:(b[w++]=c-_,new l(new n.PrefixSumComputer(b)))},e}();t.CharacterHardWrappingLineMapperFactory=u;var l=function(){function e(e){this._prefixSums=e}return e.prototype.getOutputLineCount=function(){return this._prefixSums.getCount()},e.prototype.getInputOffsetOfOutputPosition=function(e,t){return 0===e?t:this._prefixSums.getAccumulatedValue(e-1)+t},e.prototype.getOutputPositionOfInputOffset=function(e,t){this._prefixSums.getIndexOf(e,r),t.outputLineIndex=r.index,t.outputOffset=r.remainder},e}();t.CharacterHardWrappingLineMapping=l}),define("vs/editor/core/view/model/filteredLineTokens",["require","exports","vs/editor/editor","vs/base/arrays"],function(e,t,n,i){var r=function(){function e(e,t,i){this._original=e,this._startOffset=t,this._endOffset=i,this.inflatedTokens=n.LineTokensBinaryEncoding.sliceAndInflate(e.getBinaryEncodedTokensMap(),e.getBinaryEncodedTokens(),t,i)}return e.prototype.getTokens=function(){return this.inflatedTokens},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 i.findIndexInSegmentsArray(this.inflatedTokens,e)},e}();t.FilteredLineTokens=r;var o=function(){function e(e,t){this._original=e,this._textLength=t}return e.prototype.getTokens=function(){return n.LineTokensBinaryEncoding.inflateArr(this._original.getBinaryEncodedTokensMap(),this._original.getBinaryEncodedTokens())},e.prototype.getTextLength=function(){return this._textLength},e.prototype.equals=function(t){if(t instanceof e){var n=t;return this._original.equals(n._original)}return!1},e.prototype.findIndexOfOffset=function(e){return this._original.findIndexOfOffset(e)},e}();t.IdentityFilteredLineTokens=o}),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){function s(e,t,n,i){var r=e.createLineMapping(t,n,i);return null===r?u.INSTANCE:new l(r)}var a={outputLineIndex:0,outputOffset:0},u=function(){function e(){}return e.prototype.getOutputLineCount=function(){return 1},e.prototype.getOutputLineContent=function(e,t){return e.getLineContent(t)},e.prototype.getOutputLineMaxColumn=function(e,t){return e.getLineMaxColumn(t)},e.prototype.getOutputLineTokens=function(e,t,n,r){return new i.IdentityFilteredLineTokens(e.getLineTokens(t,r),e.getLineMaxColumn(t)-1)},e.prototype.getInputColumnOfOutputPosition=function(e,t){return t},e.prototype.getOutputPositionOfInputPosition=function(e,t){return new r.Position(e,t)},e.INSTANCE=new e,e}(),l=function(){function e(e){this.positionMapper=e,this.outputLineCount=this.positionMapper.getOutputLineCount()}return 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,r){var o=this.getInputStartOffsetOfOutputLineIndex(n),s=this.getInputEndOffsetOfOutputLineIndex(e,t,n);return new i.FilteredLineTokens(e.getLineTokens(t,r),o,s)},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,a);var n=a.outputLineIndex,i=a.outputOffset+1;return new r.Position(e+n,i)},e}(),c=function(){function e(e,t,n,i){this.model=e,this._validModelVersionId=-1,this.tabSize=n,this.wrappingColumn=i,this.linePositionMapperFactory=t,this.constructLines(),this.tmpIndexOfResult={index:0,remainder:0}}return e.prototype._ensureValidState=function(){var e=this.model.getVersionId();if(e!==this._validModelVersionId)throw new Error("SplitLinesCollection: attempt to access a 'newer' model")},e.prototype.constructLines=function(){this.lines=[];for(var e,t=[],i=this.model.getLinesContent(),r=0,o=i.length;o>r;r++)e=s(this.linePositionMapperFactory,i[r],this.tabSize,this.wrappingColumn),t[r]=e.getOutputLineCount(),this.lines[r]=e;this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new n.PrefixSumComputer(t)},e.prototype.setTabSize=function(e,t){return this.tabSize===e?!1:(this.tabSize=e,this.constructLines(),t(o.EventNames.ModelFlushedEvent,null),!0)},e.prototype.setWrappingColumn=function(e,t){return this.wrappingColumn===e?!1:(this.wrappingColumn=e,this.constructLines(),t(o.EventNames.ModelFlushedEvent,null),!0)},e.prototype.onModelFlushed=function(e,t){this.constructLines(),t(o.EventNames.ModelFlushedEvent,null)},e.prototype.onModelLinesDeleted=function(e,t,n,i){if(!(e<=this._validModelVersionId)){this._validModelVersionId=e;var r=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,s=this.prefixSumComputer.getAccumulatedValue(n-1);this.lines.splice(t-1,n-t+1),this.prefixSumComputer.removeValues(t-1,n-t+1);var a={fromLineNumber:r,toLineNumber:s};i(o.EventNames.LinesDeletedEvent,a)}},e.prototype.onModelLinesInserted=function(e,t,n,i,r){if(!(e<=this._validModelVersionId)){this._validModelVersionId=e;for(var a,u,l=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,c=0,d=i.length-1;d>=0;d--){var a=s(this.linePositionMapperFactory,i[d],this.tabSize,this.wrappingColumn);this.lines.splice(t-1,0,a),u=a.getOutputLineCount(),c+=u,this.prefixSumComputer.insertValue(t-1,u)}var h={fromLineNumber:l,toLineNumber:l+c-1};r(o.EventNames.LinesInsertedEvent,h)}},e.prototype.onModelLineChanged=function(e,t,n,i){if(!(e<=this._validModelVersionId)){this._validModelVersionId=e;var r=t-1,a=this.lines[r].getOutputLineCount(),u=s(this.linePositionMapperFactory,n,this.tabSize,this.wrappingColumn);this.lines[r]=u;var l=this.lines[r].getOutputLineCount(),c=!1,d=0,h=-1,p=0,f=-1,g=0,m=-1;a>l?(d=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,h=d+l-1,g=h+1,m=g+(a-l)-1,c=!0):l>a?(d=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,h=d+a-1,p=h+1,f=p+(l-a)-1,c=!0):(d=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,h=d+l-1),this.prefixSumComputer.changeValue(r,l);
var v,y,_,b;if(h>=d)for(var v=d;h>=v;v++)y={lineNumber:v},i(o.EventNames.LineChangedEvent,y);return f>=p&&(_={fromLineNumber:p,toLineNumber:f},i(o.EventNames.LinesInsertedEvent,_)),m>=g&&(b={fromLineNumber:g,toLineNumber:m},i(o.EventNames.LinesDeletedEvent,b)),c}},e.prototype.getOutputLineCount=function(){return this._ensureValidState(),this.prefixSumComputer.getTotalValue()},e.prototype.getOutputLineContent=function(e){this._ensureValidState(),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._ensureValidState(),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,t){this._ensureValidState(),this.prefixSumComputer.getIndexOf(e-1,this.tmpIndexOfResult);var n=this.tmpIndexOfResult.index,i=this.tmpIndexOfResult.remainder;return this.lines[n].getOutputLineTokens(this.model,n+1,i,t)},e.prototype.convertOutputPositionToInputPosition=function(e,t){this._ensureValidState(),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){this._ensureValidState(),e>this.lines.length&&(e=this.lines.length);var n=1+(1===e?0:this.prefixSumComputer.getAccumulatedValue(e-2)),i=this.lines[e-1].getOutputPositionOfInputPosition(n,t);return i},e}();t.SplitLinesCollection=c}),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){this.id=e.id,this.options=e.options,this.ownerId=e.ownerId,this.modelRange=e.range,this.range=t}return e}(),o=function(){function e(e,t,n){this.editorId=e,this.configuration=t,this.converter=n,this.decorations=[],this._clearCachedModelDecorationsResolver()}return e.prototype._clearCachedModelDecorationsResolver=function(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverStartLineNumber=0,this._cachedModelDecorationsResolverEndLineNumber=0},e.prototype.dispose=function(){this.converter=null,this.decorations=null,this._clearCachedModelDecorationsResolver()},e.compareDecorations=function(e,t){return n.compareRangesUsingStarts(e.range,t.range)},e.prototype.reset=function(t){var n,i,o,s,a=t.getAllDecorations(this.editorId,this.configuration.editor.readOnly);for(this.decorations=[],n=0,i=a.length;i>n;n++)o=a[n],s=new r(o,this.converter.convertModelRangeToViewRange(o.range,o.options.isWholeLine)),this.decorations[n]=s;this._clearCachedModelDecorationsResolver(),this.decorations.sort(e.compareDecorations)},e.prototype.onModelDecorationsChanged=function(t,n){var o,s,a,u=!1,l=!1,c={},d={},h=this.configuration.editor.readOnly;for(s=0,a=t.addedOrChangedDecorations.length;a>s;s++)o=t.addedOrChangedDecorations[s],h&&o.isForValidation||o.ownerId&&o.ownerId!==this.editorId||(d[o.id]=o);for(s=0,a=t.removedDecorations.length;a>s;s++)c[t.removedDecorations[s]]=!0;var p,f={};for(s=0,a=this.decorations.length;a>s;s++)p=this.decorations[s],d.hasOwnProperty(p.id)&&(f[p.id]=!0,o=d[p.id],p.options=o.options,p.modelRange=o.range,p.range=this.converter.convertModelRangeToViewRange(o.range,o.options.isWholeLine),p.options.inlineClassName&&(l=!0),u=!0),c.hasOwnProperty(p.id)&&(this.decorations[s].options.inlineClassName&&(l=!0),this.decorations.splice(s,1),a--,s--,u=!0);var g;for(g in d)!f.hasOwnProperty(g)&&d.hasOwnProperty(g)&&(o=d[g],p=new r(o,this.converter.convertModelRangeToViewRange(o.range,o.options.isWholeLine)),this.decorations.push(p),p.options.inlineClassName&&(l=!0),u=!0);if(u){this._clearCachedModelDecorationsResolver(),this.decorations.sort(e.compareDecorations);var m={inlineDecorationsChanged:l};n(i.EventNames.DecorationsChangedEvent,m)}},e.prototype.onLineMappingChanged=function(t){var r,o,s,a,u=this.decorations,l=!1,c=!1;for(o=0,a=u.length;a>o;o++)r=u[o],s=this.converter.convertModelRangeToViewRange(r.modelRange,r.options.isWholeLine),c||!r.options.inlineClassName||n.equalsRange(s,r.range)||(c=!0),l||n.equalsRange(s,r.range)||(l=!0),r.range=s;if(l){this._clearCachedModelDecorationsResolver(),this.decorations.sort(e.compareDecorations);var d={inlineDecorationsChanged:c};t(i.EventNames.DecorationsChangedEvent,d)}},e.prototype.getAllDecorations=function(){return this.decorations},e.prototype.getDecorationsResolver=function(e,t){var n=!0;return n=n&&null!==this._cachedModelDecorationsResolver,n=n&&this._cachedModelDecorationsResolverStartLineNumber===e,n=n&&this._cachedModelDecorationsResolverEndLineNumber===t,n||(this._cachedModelDecorationsResolver=this._createDecorationsResolver(e,t),this._cachedModelDecorationsResolverStartLineNumber=e,this._cachedModelDecorationsResolverEndLineNumber=t),this._cachedModelDecorationsResolver},e.prototype._createDecorationsResolver=function(e,t){var n,i,r,o,s,a,u,l=[],c=[],d=this.decorations;for(n=e;t>=n;n++)c[n-e]=[];for(a=0,u=d.length;u>a&&(o=d[a],s=o.range,!(s.startLineNumber>t));a++)if(!(s.endLineNumber<e)&&(l.push(o),o.options.inlineClassName))for(i=Math.max(e,s.startLineNumber),r=Math.min(t,s.endLineNumber),n=i;r>=n;n++)c[n-e].push(o);return{getDecorations:function(){return l},getInlineDecorations:function(n){if(e>n||n>t)throw new Error("Unexpected line outside the ViewModelDecorationsResolver preconfigured range");return c[n-e]}}},e}();t.ViewModelDecorations=o}),define("vs/editor/core/view/model/viewModelCursors",["require","exports","vs/editor/core/range","vs/editor/core/selection","vs/editor/core/view/viewContext"],function(e,t,n,i,r){var o=function(){function e(e,t){this.configuration=e,this.converter=t,this.lastCursorPositionChangedEvent=null,this.lastCursorSelectionChangedEvent=null}return e.prototype.getSelections=function(){if(this.lastCursorSelectionChangedEvent){var e=[];e.push(this.converter.convertModelSelectionToViewSelection(this.lastCursorSelectionChangedEvent.selection));for(var t=0,n=this.lastCursorSelectionChangedEvent.secondarySelections.length;n>t;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._updateShouldForceTokenization(),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._updateShouldForceTokenization=function(){this.shouldForceTokenization=this.lines.getOutputLineCount()<=this.configuration.editor.forcedTokenizationBoundary},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._updateShouldForceTokenization())})},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,r=null,o=!1;this.deferredEmit(function(){if(t){var a=new s.Range(t,1,t,n.getLineMaxColumn(t));r=n.convertViewRangeToModelRange(a)}o=n.lines.setWrappingColumn(e,function(e,t){return n.emit(e,t)}),o?(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._updateShouldForceTokenization()):r=null,r&&(n.restoreCurrentCenteredModelRange=r),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,d=!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),c=!0;break;case r.EventType.ModelContentChangedLinesDeleted:t.onModelLinesDeleted(u),c=!0;break;case r.EventType.ModelContentChangedLinesInserted:t.onModelLinesInserted(u),c=!0;break;case r.EventType.ModelContentChangedLineChanged:d=t.onModelLineChanged(u);break;default:console.info("ViewModel received unkown event: "),console.info(s)}l=!0;break;case r.EventType.ModelTokensChanged:t.onModelTokensChanged(a);break;case r.EventType.ModelModeChanged:break;case r.EventType.ModelPropertiesChanged:break;case r.EventType.ModelContentChanged2: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&&t._updateShouldForceTokenization(),!c&&d&&(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._updateShouldForceTokenization())}),this.restoreCenteredModelRange(),this.isHandlingExternalEvents=!1},t.prototype.onModelFlushed=function(e){var t=this;this.lines.onModelFlushed(e.versionId,function(e,n){return t.emit(e,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.versionId,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.versionId,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.versionId,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,!this.shouldForceTokenization)},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.getDecorationsResolver=function(e,t){return this.decorations.getDecorationsResolver(e,t)},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/editor/core/editorPluginHost",["require","exports"],function(e,t){var n=function(){function e(){}return e.prototype.register=function(){},e.prototype.deregister=function(){},e.prototype.registerModel=function(){},e.prototype.deregisterModel=function(){},e.INSTANCE=new e,e}();t.EditorPluginHost=n}),define("vs/editor/editor2",["require","exports","vs/editor/editor","vs/base/errors","vs/editor/core/constants"],function(e,t,n,i,r){function o(e,t,n){var r,o;for(r=0,o=e.length;o>r;r++)try{e[r].call(t[r],n)}catch(s){i.onUnexpectedError(s)}}function s(e,t,n,i){if(!n||!i)throw new Error("Bad args");var r,o;for(r=0,o=e.length;o>r;r++)if(e[r]===n&&t[r]===i)throw new Error("Cannot add same callback twice!");e.push(n),t.push(i)}function a(e,t,n,i){if(!n||!i)throw new Error("Bad args");var r,o;for(r=0,o=e.length;o>r;r++)if(e[r]===n&&t[r]===i)return e.splice(r,1),t.splice(r,1),void 0;throw new Error("Cannot find callback to remove!")}function u(e){m.push(new g(e))}function l(){return m.slice(0)}t.TrackedRangeStickiness=n.TrackedRangeStickiness,t.OverviewRulerLane=n.OverviewRulerLane,t.OverlayWidgetPositionPreference=n.OverlayWidgetPositionPreference,t.EndOfLinePreference=n.EndOfLinePreference,function(e){e[e.EndOfLastEditOperation=0]="EndOfLastEditOperation"}(t.EditCursorState||(t.EditCursorState={}));t.EditCursorState;!function(e){e[e.TextFocus=1]="TextFocus",e[e.WidgetFocus=2]="WidgetFocus",e[e.Writeable=4]="Writeable",e[e.UpdateOnModelChange=8]="UpdateOnModelChange",e[e.UpdateOnConfigurationChange=16]="UpdateOnConfigurationChange",e[e.ShowInContextMenu=32]="ShowInContextMenu",e[e.UpdateOnCursorPositionChange=64]="UpdateOnCursorPositionChange"}(t.ActionBehavior||(t.ActionBehavior={}));var c=(t.ActionBehavior,function(){function e(){this._func=[],this._context=[]}return e.prototype.invoke=function(e){o(this._func.slice(0),this._context.slice(0),e)},e.prototype.add=function(e,t){s(this._func,this._context,e,t)},e.prototype.remove=function(e,t){a(this._func,this._context,e,t)},e}());t.CallbackQueue=c;var d={};d[r.EventType.CursorPositionChanged]=!0,d[r.EventType.CursorSelectionChanged]=!0,d[r.EventType.ModelContentChanged]=!0,d[r.EventType.ModelChanged]=!0,d[r.EventType.ConfigurationChanged]=!0;var h=function(){function e(){var e=this;this._func=[],this._context=[],this.cursorPositionChanged=new c,this.modelContentChanged=new c,this.modelChanged=new c,this.configurationChanged=new c,this.cursorSelectionChanged=new c,this._invoker={cursorPositionChanged:function(t){return e.cursorPositionChanged.invoke(t.data)},cursorSelectionChanged:function(t){return e.cursorSelectionChanged.invoke(t.data)},modelContentChanged:function(t){return e.modelContentChanged.invoke(t.data)},modelChanged:function(t){return e.modelChanged.invoke(t.data)},configurationChanged:function(t){return e.configurationChanged.invoke(t.data)}}}return e.visitEvent=function(e,t){switch(e.type){case r.EventType.CursorPositionChanged:return t.cursorPositionChanged(e);case r.EventType.CursorSelectionChanged:return t.cursorSelectionChanged(e);case r.EventType.ModelContentChanged:return t.modelContentChanged(e);case r.EventType.ModelChanged:return t.modelChanged(e);case r.EventType.ConfigurationChanged:return t.configurationChanged(e);default:throw new Error("Not implemented")}},e.prototype.add=function(e,t){s(this._func,this._context,e,t)},e.prototype.remove=function(e,t){a(this._func,this._context,e,t)},e.prototype.invoke=function(t){if(t=t.filter(e._interestingEventsFilter),0!==t.length){o(this._func.slice(0),this._context.slice(0),t);for(var n=0;n<t.length;n++)e.visitEvent(t[n],this._invoker)}},e._interestingEventsFilter=function(e){return d[e.type]},e}();t.EditorEventsFacade=h;var p={};p[r.EventType.ModelContentChanged]=!0;var f=function(){function e(){var e=this;this._func=[],this._context=[],this.modelContentChanged=new c,this._invoker={modelContentChanged:function(t){return e.modelContentChanged.invoke(t.data)}}}return e.visitEvent=function(e,t){switch(e.type){case r.EventType.ModelContentChanged:return t.modelContentChanged(e);default:throw new Error("Not implemented")}},e.prototype.add=function(e,t){s(this._func,this._context,e,t)},e.prototype.remove=function(e,t){a(this._func,this._context,e,t)},e.prototype.invoke=function(t){if(t=t.filter(e._interestingEventsFilter),0!==t.length){o(this._func.slice(0),this._context.slice(0),t);for(var n=0;n<t.length;n++)e.visitEvent(t[n],this._invoker)}},e._interestingEventsFilter=function(e){return p[e.type]},e}();t.ModelEventsFacade=f;var g=function(){function e(e){this._ctor=e}return e.prototype.createInstance=function(e,t){return e.createInstance(this._ctor,t)},e}(),m=[];t.registerEditorContribution=u,t.getEditorContributions=l}),define("vs/base/remote/remote",["require","exports","vs/base/types"],function(e,t,n){function i(e){if(n.isUndefinedOrNull(e))return null;if(n.isArray(e)){for(var t={items:[]},r=0;r<e.length;r++)t.items.push(i(e[r]));return t}if(n.isObject(e)){var o={methods:[],props:{}};for(var s in e)"function"==typeof e[s]?o.methods.push(s):a.call(e,s)&&(o.props[s]=i(e[s]));return o}var u={value:e};return u}function r(e,t){return o(e,t.proxyId,"",t.desc)}function o(e,t,n,i){if(!i)return null;if(i.items){for(var r=[],u=i.items,l=0;l<u.length;l++)r[l]=o(e,t,n+"["+l+"].",u[l]);return r}if(i.methods){for(var c={},d=i.methods,h=0;h<d.length;h++)c[d[h]]=s(e,t,n+d[h]);var p=i.props;for(var f in p)a.call(p,f)&&(c[f]=o(e,t,n+f+".",p[f]));return c}return i.value}function s(e,t,n){return function(){for(var i=[],r=0;r<arguments.length;r++)i[r-0]=arguments[r];return e.callOnRemote(t,n,i)}}var a=Object.prototype.hasOwnProperty;t.createDescriptor=i,t.createProxy=r}),define("vs/base/worker/workerProtocol",["require","exports","vs/base/lib/winjs.base","vs/base/worker/marshalling","vs/base/remote/remote"],function(e,t,n,i,r){function o(e){return JSON.stringify(i.serialize(e))}function s(e){return i.deserialize(JSON.parse(e))}function a(e){var t={};return e.stacktrace?t.stack=e.stacktrace:e.stack&&(t.stack=e.stack),t.message=e.toString(),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"},t.marshallObject=o,t.demarshallObject=s,t.transformError=a;var u=function(){function e(e){this._requester=e,this._handlers={},this._lastGeneratedId=0}return e.prototype.callOnRemote=function(e,t,n){return this._requester.request("_proxyObj",{proxyId:e,path:t,args:n})},e.prototype.registerHandler=function(e,t){this._handlers[e]=t},e.prototype.handleMessage=function(e){var t=this._handlers[e.proxyId];return this._invokeHandler(t[e.path],t,e.args)},e.prototype._invokeHandler=function(e,t,i){try{return n.Promise.as(e.apply(t,this._createProxiesIfNecessary(i)))}catch(r){return n.Promise.wrapError(r)}},e.prototype._createProxiesIfNecessary=function(e){if(!e||0===e.length)return e;for(var t=0,n=e.length;n>t;t++)e[t]=this._createProxyIfNecessary(e[t]);return e},e.prototype._createProxyIfNecessary=function(e){return e&&e.$isProxyDescriptor?r.createProxy(this,e):e},e.prototype.createProxy=function(e){var t="$"+String(++this._lastGeneratedId);return this._handlers[t]=e,{$isProxyDescriptor:!0,proxyId:t,desc:r.createDescriptor(e)}},e}();t.RemoteCom=u}),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(s.demarshallObject(e.data))}}return e.prototype.getId=function(){return this.id},e.prototype.postMessage=function(e){this.worker.postMessage(s.marshallObject(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=s.demarshallObject(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){if(this.loaded===!0){var t=window.frames[this.iframeId()],n=s.marshallObject(e);t.postMessage?t.postMessage(n,"*"):t.contentWindow.postMessage(n,"*")}else this.beforeLoadMessages.push(e)},t.prototype.terminate=function(){window.removeEventListener("message",this.onMessage),window.frames[this.iframeId()].close()},t}(),h=function(){function e(){}return e.prototype.create=function(e,t,n){void 0===n&&(n=null);var i=null;try{i=new c(e,"service"+e,t)}catch(r){i=new d(e,t)}return i},e}();t.DefaultWorkerFactory=h;var p=function(){function e(t,n,i,r,o){var a=this;void 0===o&&(o=++e.LAST_WORKER_ID),this._decodeMessageName=i,this._lastMessageId=0,this._promises={},this._messageHandlers={},this._messagesQueue=[],this._processQueueTimeout=-1,this._waitingForWorkerReply=!1,this._lastTimerEvent=null,this._workerId=o,this._worker=t.create(o,function(e){return a._onmessage(e)},function(){r(a)});var u=null,l=window.require;"function"==typeof l.getConfig?u=l.getConfig():"undefined"!=typeof window.requirejs&&(u=window.requirejs.s.contexts._.config);var c=window.MonacoEnvironment||null;this.onModuleLoaded=this._sendMessage(s.MessageType.INITIALIZE,{id:this._worker.getId(),moduleId:n,loaderConfiguration:u,MonacoEnvironment:c}),this.onModuleLoaded.then(null,function(){return a._onError("Worker failed to load "+n)}),this._remoteCom=new s.RemoteCom(this)}return e.prototype.getRemoteCom=function(){return this._remoteCom},Object.defineProperty(e.prototype,"workerId",{get:function(){return this._workerId},enumerable:!0,configurable:!0}),e.prototype.getQueueSize=function(){return this._messagesQueue.length+(this._waitingForWorkerReply?1:0)},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){var r=this;void 0===i&&(i=(new Date).getTime());var o,s,a,u={id:++this._lastMessageId,type:e,timestamp:i,payload:t},l=new n.Promise(function(e,t,n){o=e,s=t,a=n},function(){r._removeMessage(u.id)});return this._promises[u.id]={complete:o,error:s,progress:a,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(r.Topic.WORKER,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:this._dispatchRequestFromWorker(e)}this._processMessagesQueue()}},e.prototype._dispatchRequestFromWorker=function(e){var t=this;this._handleWorkerRequest(e).then(function(n){var i={id:0,type:s.MessageType.REPLY,timestamp:(new Date).getTime(),seq:e.req,payload:n instanceof Error?s.transformError(n):n,err:null};t._worker.postMessage(i)},function(n){var i={id:0,type:s.MessageType.REPLY,timestamp:(new Date).getTime(),seq:e.req,payload:null,err:n instanceof Error?s.transformError(n):n};
t._worker.postMessage(i)})},e.prototype._handleWorkerRequest=function(e){return"_proxyObj"===e.type?this._remoteCom.handleMessage(e.payload):"function"==typeof this[e.type]?this._invokeHandler(this[e.type],this,e.payload):"function"==typeof this._messageHandlers[e.type]?this._invokeHandler(this._messageHandlers[e.type],null,e.payload):(this._onError("Received unexpected message from Worker:",e),n.Promise.wrapError(new Error("No handler found")))},e.prototype._invokeHandler=function(e,t,i){try{return n.Promise.as(e.call(t,i))}catch(r){return n.Promise.wrapError(r)}},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=0,e}();t.WorkerClient=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/platform/thread/mainThreadService",["require","exports","vs/base/lib/winjs.base","vs/base/worker/workerClient","vs/platform/services","vs/platform/thread/abstractThreadService","vs/base/env","vs/base/errors","vs/base/performance/timer","vs/platform/plugins"],function(e,t,n,i,r,o,s,a,u,l){var c=function(e){function t(r,o,s){var a=this;if(void 0===s&&(s=new i.DefaultWorkerFactory),e.call(this),this._contextService=r,this._telemetryService=o,this._workerFactory=s,!this.isInMainThread)throw new Error("Incorrect Service usage: this service must be used only in the main thread");this._workerPool=[],this._affinityScrambler={},this._listeners=[],this._workersCreatedPromise=new n.Promise(function(e){a._triggerWorkersCreatedPromise=e},function(){}),n.Promise.timeout(t.MAXIMUM_WORKER_CREATION_DELAY).then(function(){return a.ensureWorkers()})}return __extends(t,e),t.onWorker=function(e){t._listeners.push(e)},t.prototype.ensureWorkers=function(){if(this._triggerWorkersCreatedPromise){var e=s.workersCount;s.hasWebWorkerSupport()||(e=Math.min(e,1));for(var t=0;e>t;t++)this._createWorker();var n=this._triggerWorkersCreatedPromise;this._triggerWorkersCreatedPromise=null,n(null)}},t.prototype.addStatusListener=function(e){for(var t=0;t<this._listeners.length;t++)if(this._listeners[t]===e)return;this._listeners.push(e)},t.prototype.removeStatusListener=function(e){for(var t=0;t<this._listeners.length;t++)if(this._listeners[t]===e)return this._listeners.splice(t,1),void 0},t.prototype._afterWorkers=function(){var e=this,t=!1;return new n.Promise(function(n,i,r){e._workersCreatedPromise.then(function(){t||n(null)},i,r)},function(){t=!0})},t.prototype._createWorker=function(){this._workerPool.push(this._doCreateWorker())},t.prototype._massagePluginDescriptions=function(e){return e.filter(function(e){return e.isFake})},t.prototype._shortName=function(e,t){return e.substring(e.length-14)+"."+t.substr(0,14)},t.prototype._doCreateWorker=function(e){var r=this,o=new i.WorkerClient(this._workerFactory,"vs/editor/worker/editorWorkerServer",function(e){return"threadService"===e.type?r._shortName(e.payload[0],e.payload[1]):e.type},function(e){for(var t=0;t<r._workerPool.length&&e!==r._workerPool[t];t++);var n=r._doCreateWorker(e.workerId);e===r._workerPool[t]?r._workerPool[t]=n:r._workerPool.push(n)},e);o.onModuleLoaded=o.request("initialize",{threadService:this._getRegisteredObjectsData(),telemetryService:{enableTelemetry:s.enableTelemetry,enablePrivateTelemetry:s.enablePrivateTelemetry,telemetrySessionID:this._telemetryService.sessionID},contextService:{workspace:this._contextService.getWorkspace(),configuration:this._contextService.getConfiguration(),options:this._contextService.getOptions()},plugins:this._massagePluginDescriptions(l.getAllPluginDescriptions())}),o.addMessageHandler("threadService",function(e){var t=e.identifier,i=e.memberName,o=e.args;if(!r._boundObjects.hasOwnProperty(t))throw new Error("Object "+t+" was not found on the main thread.");var s=r._boundObjects[t];return n.Promise.as(s[i].apply(s,o))}),o.addMessageHandler("telemetryService",function(e){var t=e.eventName,n=e.isPublic,i=e.data;n?r._telemetryService.publicLog(t,i):r._telemetryService.log(t,i)});for(var a=t._listeners.slice(0),u=0,c=a.length;c>u;u++)a[u](o);return o},t.prototype._getRegisteredObjectsData=function(){var e=this,t={};return Object.keys(this._boundObjects).forEach(function(n){var i=e._boundObjects[n];i.getSerializableState&&(t[n]=i.getSerializableState())}),t},t.prototype.MainThread=function(e,t,n,i){return n.apply(e,i)},t.prototype._getWorkerIndex=function(e,t){if(t===r.ThreadAffinity.None){for(var n=[0],i=this._workerPool[0].getQueueSize(),o=1;o<this._workerPool.length;o++){var s=this._workerPool[o].getQueueSize();i>s?(i=s,n=[o]):s===i&&n.push(o)}return n[Math.floor(Math.random()*n.length)]}var a=0;return this._affinityScrambler.hasOwnProperty(e.getId())?a=this._affinityScrambler[e.getId()]:(a=Math.floor(Math.random()*this._workerPool.length),this._affinityScrambler[e.getId()]=a),(a+t)%this._workerPool.length},t.prototype.OneWorker=function(e,t,n,i,r){var o=this;return this._afterWorkers().then(function(){if(0===o._workerPool.length)throw new Error("Cannot fulfill request...");var n=o._getWorkerIndex(e,r);return o._remoteCall(o._workerPool[n],e,t,i)})},t.prototype.AllWorkers=function(e,t,i,r){var o=this;return this._afterWorkers().then(function(){return n.Promise.join(o._workerPool.map(function(n){return o._remoteCall(n,e,t,r)}))})},t.prototype.Everywhere=function(e,t,n,i){var r=this;return this._afterWorkers().then(function(){r._workerPool.forEach(function(n){r._remoteCall(n,e,t,i).done(null,a.onUnexpectedError)})}),n.apply(e,i)},t.prototype._remoteCall=function(e,t,i,r){var o=this,s=t.getId();if(!s)throw new Error("Synchronizable Objects must have an identifier");var a=u.start(u.Topic.LANGUAGES,this._shortName(s,i)),l=function(){a.stop(),o._pingListenersIfNecessary()},c=n.decoratePromise(e.request("threadService",[s,i,r]),l,l);return this._pingListenersIfNecessary(),c},t.prototype._pingListenersIfNecessary=function(){if(this._listeners.length>0){var e=this._buildStatus(),t=this._listeners.slice(0);try{for(var n=0;n<t.length;n++)t[n].onThreadServiceStatus(e)}catch(i){a.onUnexpectedError(i)}}},t.prototype._buildStatus=function(){var e=this._workerPool.map(function(e){return{queueSize:e.getQueueSize()}});return{workers:e}},t.MAXIMUM_WORKER_CREATION_DELAY=500,t._listeners=[],t}(o.AbstractThreadService);t.MainThreadService=c}),define("vs/editor/modes/monarch/monarchCommon",["require","exports"],function(e,t){function n(){return"0.96  (2013.01.22)"}function i(e){return e?!1:!0}function r(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function o(e){return e.replace(p,function(e){var t=h[e];return t?t:""})}function s(e){return e.replace(/[&<>'"]/g,"_")}function a(e,t){console.log(t)}function u(e,t){throw new Error(t)}function l(e,t,n,o,s){var a=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,u=null;return t.replace(a,function(t,a,l,c,d,h,p){return i(l)?i(c)?!i(d)&&d<o.length?r(e,o[d]):!i(p)&&e&&"string"==typeof e[p]?e[p]:(null===u&&(u=s.split("."),u.unshift(s)),!i(h)&&h<u.length?r(e,u[h]):""):r(e,n):"$"})}function c(e,t){for(;t&&t.length>0;){var n=e.tokenizer[t];if(n)return n;var i=t.lastIndexOf(".");t=0>i?null:t.substr(0,i)}return null}function d(e,t){for(;t&&t.length>0;){var n=e.stateNames[t];if(n)return!0;var i=t.lastIndexOf(".");t=0>i?null:t.substr(0,i)}return!1}t.monarchPath="vs/editor/modes/monarch/monarch",t.version=n,t.empty=i,t.fixCase=r;var h={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&apos;",'"':"&quot;"},p=new RegExp("["+Object.keys(h).join("")+"]","g");t.htmlEscape=o,t.sanitize=s,t.log=a,t.throwError=u,t.substituteMatches=l,t.findRules=c,t.stateExists=d}),define("vs/editor/modes/monarch/monarchCompile",["require","exports","vs/base/objects","vs/editor/modes/modes","vs/editor/modes/monarch/monarchCommon"],function(e,t,n,i,r){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,i){var o="";return"string"==typeof e[i]?o=e[i]:e[i]&&e[i]instanceof RegExp?o=e[i].source:void 0===e[i]?r.throwError(e,"language definition does not contain attribute '"+i+"', used at: "+t):r.throwError(e,"attribute reference '"+i+"' must be a string, used at: "+t),r.empty(o)?"":"(?:"+o+")"});return new RegExp(t,e.ignoreCase?"i":"")}function d(e,t,n,i){if(0>i)return e;if(i<t.length)return t[i];if(i>=100){i-=100;var r=n.split(".");if(r.unshift(n),i<r.length)return r[i]}return null}function h(e,t,i,s){var a=-1,u=i,l=i.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);l&&(l[3]&&(a=parseInt(l[3]),l[2]&&(a+=100)),u=l[4]);var h="~",p=u;u&&0!==u.length?/^\w*$/.test(p)?h="==":(l=u.match(/^(@|!@|~|!~|==|!=)(.*)$/),l&&(h=l[1],p=l[2])):(h="!=",p="");var f;if("~"!==h&&"!~"!==h||!/^(\w|\|)*$/.test(p))if("@"===h||"!@"===h){var g=e[p];g||r.throwError(e,"the @ match target '"+p+"' is not defined, in rule: "+t),o(function(e){return"string"==typeof e},g)||r.throwError(e,"the @ match target '"+p+"' must be an array of strings, in rule: "+t);var m=n.createKeywordMatcher(g,e.ignoreCase);f=function(e){return"@"===h?m(e):!m(e)}}else if("~"===h||"!~"===h)if(p.indexOf("$")<0){var v=c(e,"^"+p+"$");f=function(e){return"~"===h?v.test(e):!v.test(e)}}else f=function(t,n,i,o){var s=c(e,"^"+r.substituteMatches(e,p,n,i,o)+"$");return s.test(t)};else if(p.indexOf("$")<0){var y=r.fixCase(e,p);f=function(e){return"=="===h?e===y:e!==y}}else{var y=r.fixCase(e,p);f=function(t,n,i,o){var s=r.substituteMatches(e,y,n,i,o);return"=="===h?t===s:t!==s}}else{var m=n.createKeywordMatcher(p.split("|"),e.ignoreCase);f=function(e){return"~"===h?m(e):!m(e)}}return-1===a?{name:i,value:s,test:function(e,t,n,i){return f(e,e,t,n,i)}}:{name:i,value:s,test:function(e,t,n,i){var r=d(e,t,n,a);return f(r?r:"",e,t,n,i)}}}function p(e,t,n){if(n){if("string"==typeof n)return n;if(n.token||""===n.token){if("string"!=typeof n.token)return r.throwError(e,"a 'token' attribute must be of type string, in rule: "+t),{token:""};var o={token:n.token};if(n.token.indexOf("$")>=0&&(o.tokenSubst=!0),"string"==typeof n.bracket&&("@open"===n.bracket?o.bracket=i.Bracket.Open:"@close"===n.bracket?o.bracket=i.Bracket.Close:r.throwError(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t)),n.next)if("string"!=typeof n.next)r.throwError(e,"the next state must be a string value in rule: "+t);else{var s=n.next;/^(@pop|@push|@popall)$/.test(s)||("@"===s[0]&&(s=s.substr(1)),s.indexOf("$")<0&&(r.stateExists(e,r.substituteMatches(e,s,"",[],""))||r.throwError(e,"the next state '"+n.next+"' is not defined in rule: "+t))),o.next=s}return"number"==typeof n.goBack&&(o.goBack=n.goBack),"string"==typeof n.switchTo&&(o.switchTo=n.switchTo),"string"==typeof n.log&&(o.log=n.log),"string"==typeof n.nextEmbedded&&(o.nextEmbedded=n.nextEmbedded,e.usesEmbedded=!0),o}if(Array.isArray(n)){var a,u=[];for(a in n)n.hasOwnProperty(a)&&(u[a]=p(e,t,n[a]));return{group:u}}if(n.cases){var l,c=[];for(l in n.cases)if(n.cases.hasOwnProperty(l)){var d=p(e,t,n.cases[l]);"@default"===l||"@"===l||""===l?c.push({test:null,value:d,name:l}):"@eos"===l?c.push({test:function(e,t,n,i){return i},value:d,name:l}):c.push(h(e,t,l,d))}var f=e.defaultToken;return{test:function(e,t,n,i){var r;for(r in c)if(c.hasOwnProperty(r)){var o=!c[r].test||c[r].test(e,t,n,i);if(o)return c[r].value}return f}}}return r.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(i,o,u){var l;for(l in u)if(u.hasOwnProperty(l)){var c=u[l],d=c.include;if(d)"string"!=typeof d&&r.throwError(n,"an 'include' attribute must be a string at: "+i),"@"===d[0]&&(d=d.substr(1)),e.tokenizer[d]||r.throwError(n,"include target '"+d+"' is not defined at: "+i),t(i+"."+d,o,e.tokenizer[d]);else{var h=new g(i);if(Array.isArray(c)&&c.length>=1&&c.length<=3)if(h.setRegex(p,c[0]),c.length>=3)if("string"==typeof c[1])h.setAction(p,{token:c[1],next:c[2]});else if("object"==typeof c[1]){var f=c[1];f.next=c[2],h.setAction(p,f)}else r.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: "+i);else h.setAction(p,c[1]);else c.regex||r.throwError(n,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+i),c.name&&(h.name=a(c.name)),c.matchOnlyAtStart&&(h.matchOnlyAtLineStart=s(c.matchOnlyAtLineStart)),h.setRegex(p,c.regex),h.setAction(p,c.action);o.push(h)}}}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={};if(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(){r.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(){r.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])),n.suggestSupport={textualCompletions:!0,triggerCharacters:[],snippets:[]},"undefined"!=typeof e.suggestSupport){var i=e.suggestSupport;if(Array.isArray(i.snippets))for(var o=i.snippets,d=0,h=o.length;h>d;d++)"string"==typeof o[d]?n.suggestSupport.snippets.push({type:"snippet",label:o[d],codeSnippet:o[d]}):n.suggestSupport.snippets.push(o[d]);Array.isArray(i.triggerCharacters)&&(n.suggestSupport.triggerCharacters=i.triggerCharacters),"undefined"!=typeof i.textualCompletions&&(n.suggestSupport.textualCompletions=i.textualCompletions)}var p=e;p.name=n.name,p.displayName=n.displayName,p.ignoreCase=n.ignoreCase,p.noThrow=n.noThrow,p.usesEmbedded=n.usesEmbedded,p.stateNames=e.tokenizer,p.logConsole=n.logConsole,p.defaultToken=n.defaultToken,e.tokenizer&&"object"==typeof e.tokenizer||r.throwError(n,"a language definition must define the 'tokenizer' attribute as an object"),n.tokenizer=[];var f;for(f in e.tokenizer)if(e.tokenizer.hasOwnProperty(f)){n.start||(n.start=f);var m=e.tokenizer[f];n.tokenizer[f]=new Array,t("tokenizer."+f,n.tokenizer[f],m)}n.usesEmbedded=p.usesEmbedded,n.nonWordTokens=l(e.nonWordTokens,["delimiter","delimiter.parenthesis","delimiter.curly","delimiter.square","delimiter.angle"],function(){r.throwError(n,"the 'nonWordTokens' attribute must be an array of strings")});var v;for(v in n.nonWordTokens)n.nonWordTokens.hasOwnProperty(v)&&(n.nonWordTokens[v]+=n.tokenPostfix);e.brackets?Array.isArray(e.brackets)||r.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 y=[];for(var _ in e.brackets)if(e.brackets.hasOwnProperty(_)){var b=e.brackets[_];b&&Array.isArray(b)&&3===b.length&&(b={token:b[2],open:b[0],close:b[1]}),b.open===b.close&&r.throwError(n,"open and close brackets in a 'brackets' attribute must be different: "+b.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required."),"string"==typeof b.open&&"string"==typeof b.token?y.push({token:a(b.token)+n.tokenPostfix,open:r.fixCase(n,a(b.open)),close:r.fixCase(n,a(b.close))}):r.throwError(n,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}n.brackets=y;var w;if(e.autoClosingPairs?(Array.isArray(e.autoClosingPairs)||r.throwError(n,"the 'autoClosingPairs' attribute must be an array of string pairs (as arrays)"),w=e.autoClosingPairs.slice(0)):w=[['"','"'],["'","'"],["@brackets"]],n.autoClosingPairs=[],w)for(var C in w)if(w.hasOwnProperty(C)){var E,S=w[C];if("@brackets"===S||"@brackets"===S[0]){var T;for(T in y)y.hasOwnProperty(T)&&y[T].open&&1===y[T].open.length&&y[T].close&&1===y[T].close.length&&(E={open:y[T].open,close:y[T].close},n.autoClosingPairs.push(E))}else Array.isArray(S)&&2===S.length&&"string"==typeof S[0]&&1===S[0].length&&"string"==typeof S[1]&&1===S[1].length?(E={open:r.fixCase(n,S[0]),close:r.fixCase(n,S[1])},n.autoClosingPairs.push(E)):"string"==typeof S.open&&1===S.open.length&&"string"==typeof S.close&&1===S.close.length?(E={open:r.fixCase(n,S.open[0]),close:r.fixCase(n,S.close[0])},n.autoClosingPairs.push(E)):r.throwError(n,"every element in an 'autoClosingPairs' array must be a pair of 1 character strings, or a '@brackets' directive")}if(e.autoIndent){var L=[];Array.isArray(e.autoIndent)||r.throwError(n,"an 'autoIndent' attribute must be an array of '{match,matchAfter}' objects");for(var x in e.autoIndent)e.autoIndent.hasOwnProperty(x)&&("string"!=typeof e.autoIndent[x].match&&r.throwError(n,"each object in the 'autoIndent' array must define a 'match' attribute"),L.push({match:c(n,e.autoIndent[x].match),matchAfter:c(n,a(e.autoIndent[x].matchAfter))}));n.autoIndent=L}if(e.autoComplete){var M=[];Array.isArray(e.autoComplete)||r.throwError(n,"an 'autoComplete' attribute must be an array of '{trigger,match,complete}' objects");for(var N in e.autoComplete)e.autoComplete.hasOwnProperty(N)&&("string"!=typeof e.autoComplete[N].triggers&&r.throwError(n,"each object in the 'autoComplete' array must define a 'triggers' attribute"),"string"!=typeof e.autoComplete[N].match&&r.throwError(n,"each object in the 'autoComplete' array must define a 'match' attribute as a regular expression string"),"string"!=typeof e.autoComplete[N].complete&&r.throwError(n,"each object in the 'autoComplete' array must define a 'complete' attribute"),M.push({triggers:r.fixCase(n,a(e.autoComplete[N].triggers)),match:c(n,e.autoComplete[N].match),complete:a(e.autoComplete[N].complete)}));n.autoComplete=M}if(e.noindentBrackets){var k=u(e.noindentBrackets,null,function(){r.throwError(n,"the 'noindentBrackets' must be a regular expression string")});n.noindentBrackets=c(n,k)}var I=[];for(var O in n.brackets)if(n.brackets.hasOwnProperty(O)){var P=n.brackets[O].close;P&&P.length>0&&(n.noindentBrackets&&n.noindentBrackets.test(P)||I.push(P.substr(P.length-1)))}for(var R in n.autoComplete)n.autoComplete.hasOwnProperty(R)&&I.push(n.autoComplete[R].triggers);return n.electricChars=I.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:r.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 i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);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/supports","vs/editor/modes/monarch/monarchCommon","vs/editor/modes/monarch/monarchCompile","vs/base/lib/winjs.base","vs/editor/modes/nullMode","vs/platform/thread/attribute"],function(e,t,n,i,r,o,s,a,u,l,c,d,h){function p(e){return!e||""===e||/\bcomment\b/.test(e)||/\bwhite\b/.test(e)}function f(e,t){if(!t)return null;t=u.fixCase(e,t);for(var n=e.brackets,i=0;i<n.length;i++){var r=n[i];if(r.open===t)return{token:r.token,bracketType:o.Bracket.Open};if(r.close===t)return{token:r.token,bracketType:o.Bracket.Close}}return null}function g(e,t){for(var n=e.getLineContent(),i=[],r=[],o=0;o<e.getTokenCount();o++)if(!p(e.getTokenType(o))){var s="";s=o<e.getTokenCount()-1?n.substr(e.getTokenStartIndex(o),e.getTokenStartIndex(o+1)-e.getTokenStartIndex(o)):n.substr(e.getTokenStartIndex(o)),e.getTokenStartIndex(o)<t?i.push(s):r.push(s)}return{pre:" "+i.join(" ")+" ",post:" "+r.join(" ")+" "}}function m(e,t){return t+1<e.getTokenCount()?e.getLineContent().substr(e.getTokenStartIndex(t),e.getTokenStartIndex(t+1)-e.getTokenStartIndex(t)):e.getLineContent().substr(e.getTokenStartIndex(t))}function v(e,t,n){var i;if(e.autoIndent){var r=g(t,n);for(i=0;i<e.autoIndent.length;i++)if(!e.autoIndent[i].match||e.autoIndent[i].match.test(r.pre))return!e.autoIndent[i].matchAfter||e.autoIndent[i].matchAfter.test(r.post)?{indentAction:o.IndentAction.IndentOutdent}:{indentAction:o.IndentAction.Indent}}var s=[];for(i=0;i<t.getTokenCount()&&t.getTokenStartIndex(i)<n;i++)t.getTokenBracket(i)===o.Bracket.Open?s.push(i):t.getTokenBracket(i)===o.Bracket.Close&&s.length>0&&s.pop();if(0===s.length)return null;var a=s.pop();if(e.noindentBrackets){var u=m(t,a);if(e.noindentBrackets.test(u))return null}return i<t.getTokenCount()&&t.getTokenBracket(i)===o.Bracket.Close&&t.getTokenType(i)===t.getTokenType(a)?{indentAction:o.IndentAction.IndentOutdent}:{indentAction:o.IndentAction.Indent}}function y(e,t,n){var i=t.getLineContent(),r=null,s=null;if(e.autoComplete&&e.autoComplete.length>0){var a=u.fixCase(e,i.substr(n,1)),l=g(t,n+1).pre;for(p=0;p<e.autoComplete.length;p++)if(e.autoComplete[p].triggers.indexOf(a)>=0){var c=l.match(e.autoComplete[p].match);if(c){r=c[0].replace(e.autoComplete[p].match,e.autoComplete[p].complete);break}}}for(var d=0,h=0,p=0;p<t.getTokenCount()&&!(t.getTokenStartIndex(p)>n);p++)d=t.getTokenStartIndex(p),h=p;if(!(t.getTokenBracket(h)!==o.Bracket.Close||e.noindentBrackets&&e.noindentBrackets.test(m(t,h)))){var f=!0;for(p=0;d>p;p++)if(" "!==i[p]&&"	"!==i[p]){f=!1;break}f&&(s=t.getTokenType(h))}return r||s?{matchBracketType:s,appendText:r}:null}function _(e,t){x.registerMonarchDefinition(e,t)}function b(e,t){var i=n.Registry?n.Registry.as(s.Extensions.EditorModes):null;return new a.TokenizationSupport(e,{getInitialState:function(){return new L(e,t)},enterNestedMode:function(e){return e instanceof L?e.embeddedEntered:!1},getNestedMode:function(e){var t=null;if(e instanceof L){var n=e.embeddedMode;if(i.isRegisteredMode(n)){var r=T(i,n);if(r)return{mode:r,missingModePromise:t};t=i.getOrCreateMode(n)}}return{mode:T(i,"text/plain"),missingModePromise:t}},getLeavingNestedModeData:function(e,t){for(var n=t,i=new r.LineStream(e);!i.eos()&&n.embeddedMode;)n.tokenize(i,!0);if(n.embeddedMode)return null;var o=i.pos();return{nestedModeBuffer:e.substring(0,o),bufferAfterNestedMode:e.substring(o),stateAfterNestedMode:n}}},t.usesEmbedded)}function w(e){return{getCommentsConfiguration:function(){return{lineCommentTokens:[e.lineComment],blockCommentStartToken:e.blockCommentStart,blockCommentEndToken:e.blockCommentEnd}}}}function C(e,t){return new a.ElectricCharacterSupport(e,{getElectricCharacters:function(){return t.electricChars.split("")},onEnter:function(e,n){return v(t,e,n)},onElectricCharacter:function(e,n){return y(t,e,n)}})}function E(e){return{getNonWordTokenTypes:function(){return e.nonWordTokens},getWordDefinition:function(){return e.wordDefinition||d.NullMode.DEFAULT_WORD_REGEXP}}}function S(e,t){return new a.CharacterPairSupport(e,t.autoClosingPairs)}function T(e,t){if(!e||void 0===e.getMode)return null;var n=e.getMode(t);if(n)return n;if(e.getOrCreateMode){var i=e.getOrCreateMode(t);return i&&i.value?i.value:null}}var L=function(e){function t(n,i,r,o){e.call(this,n),this.id=t.ID++,this.lexer=i,this.stack=r?r:[i.start],this.embeddedMode=o?o:null,this.embeddedEntered=!1,this.groupActions=null,this.groupMatches=null,this.groupMatched=null,this.groupRule=null}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode(),this.lexer,this.stack.slice(0),this.embeddedMode)},t.prototype.equals=function(n){if(!e.prototype.equals.call(this,n))return!1;if(!(n instanceof t))return!1;var i=n;if(this.stack.length!==i.stack.length||this.lexer.name!==i.lexer.name||this.embeddedMode!==i.embeddedMode)return!1;var r;for(r in this.stack)if(this.stack.hasOwnProperty(r)&&this.stack[r]!==i.stack[r])return!1;return!0},t.prototype.tokenize=function(e,t){var n=this.stack.length,i=0,r=this.stack[0];this.embeddedEntered=!1;var a=null,l=null,c=null,d=null,h=null;if(this.groupActions)i=this.groupActions.length,a=this.groupMatches,l=this.groupMatched.shift(),c=this.groupActions.shift(),h=this.groupRule,0===this.groupActions.length&&(this.groupActions=null,this.groupMatches=null,this.groupMatched=null,this.groupRule=null);else{if(e.eos())return{type:""};var p=e.advanceToEOS();e.goBack(p.length);var g=this.lexer.tokenizer[r];if(g||(g=u.findRules(this.lexer,r)),g){h=null;var m,v=e.pos();for(m in g)if(g.hasOwnProperty(m)&&(h=g[m],(0===v||!h.matchOnlyAtLineStart)&&(a=p.match(h.regex)))){l=a[0],c=h.action;break}}else u.throwError(this.lexer,"tokenizer state is not defined: "+r)}for(a||(a=[""],l=""),c||(e.eos()||(a=[e.peek()],l=a[0]),c=this.lexer.defaultToken),e.advance(l.length);c.test;){var y=c.test(l,a,r,e.eos());c=y}var _=null;if("string"==typeof c||Array.isArray(c))_=c;else if(c.group)_=c.group;else if(null!==c.token&&void 0!==c.token){if(_=c.token,c.tokenSubst&&(_=u.substituteMatches(this.lexer,_,l,a,r)),c.nextEmbedded)if("@pop"===c.nextEmbedded)this.embeddedMode||u.throwError(this.lexer,"cannot pop embedded mode if not inside one"),this.embeddedMode=null;else if(this.embeddedMode)u.throwError(this.lexer,"cannot enter embedded mode from within an embedded mode");else{this.embeddedMode=u.substituteMatches(this.lexer,c.nextEmbedded,l,a,r);var b=s.languageAliasToMime(this.embeddedMode);this.embeddedMode&&b&&(this.embeddedMode=b),this.embeddedEntered=!0}if(c.goBack&&e.goBack(c.goBack),c.switchTo&&"string"==typeof c.switchTo){var w=u.substituteMatches(this.lexer,c.switchTo,l,a,r);"@"===w[0]&&(w=w.substr(1)),u.findRules(this.lexer,w)?this.stack[0]=w:u.throwError(this.lexer,"trying to switch to a state '"+w+"' that is undefined in rule: "+h.name),d=null}else if(c.transform&&"function"==typeof c.transform)this.stack=c.transform(this.stack),d=null;else if(c.next)if("@push"===c.next)this.stack.length>=this.lexer.maxStack?u.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(r);else if("@pop"===c.next)this.stack.length<=1?u.throwError(this.lexer,"trying to pop an empty stack in rule: "+h.name):this.stack.shift();else if("@popall"===c.next)this.stack.length>1&&(this.stack=[this.stack[this.stack.length-1]]);else{var w=u.substituteMatches(this.lexer,c.next,l,a,r);"@"===w[0]&&(w=w.substr(1)),u.findRules(this.lexer,w)?this.stack.unshift(w):u.throwError(this.lexer,"trying to set a next state '"+w+"' that is undefined in rule: "+h.name)}c.log&&"string"==typeof c.log&&u.log(this.lexer,this.lexer.displayName+": "+u.substituteMatches(this.lexer,c.log,l,a,r))}if(null===_&&(u.throwError(this.lexer,"lexer rule has no well-defined action in rule: "+h.name),_=this.lexer.defaultToken),Array.isArray(_)){this.groupActions&&this.groupActions.length>0&&u.throwError(this.lexer,"groups cannot be nested: "+h.name),a.length!==_.length+1&&u.throwError(this.lexer,"matched number of groups does not match the number of actions in rule: "+h.name);for(var C=0,E=1;E<a.length;E++)C+=a[E].length;return C!==l.length&&u.throwError(this.lexer,"with groups, all characters should be matched in consecutive groups in rule: "+h.name),this.groupMatches=a,this.groupMatched=a.slice(1),this.groupActions=_.slice(0),this.groupRule=h,e.goBack(l.length),this.tokenize(e)}if("@rematch"===_&&(e.goBack(l.length),l="",a=null,_=""),0===l.length)if(n!==this.stack.length||r!==this.stack[0]||(this.groupActions?this.groupActions.length:0)!==i){if(!t)return this.tokenize(e)}else u.throwError(this.lexer,"no progress in tokenizer in rule: "+h.name),e.advanceToEOS();if(0===_.indexOf("@brackets")){var S=_.substr("@brackets".length),T=f(this.lexer,l);return T||(u.throwError(this.lexer,"@brackets token returned but no bracket defined as: "+l),T={token:"",bracketType:o.Bracket.None}),{type:u.sanitize(T.token+S),bracket:T.bracketType}}var L=""===_?"":_+this.lexer.tokenPostfix;return{type:u.sanitize(L),bracket:c.bracket}},t.ID=0,t}(s.AbstractState);t.MonarchLexer=L,t.registerMonarchDefinition=_;var x=function(){function e(){}return e.register=function(t){e.INSTANCE_REGISTERED||(e.INSTANCE_REGISTERED=!0,t.registerInstance(e.INSTANCE))},e.registerMonarchDefinition=function(t,n){e.INSTANCE._registerMonarchDefinition(t,n)},e.prototype.getId=function(){return"vs.editor.modes.monarchDefinitionForwarder"},e.prototype._registerMonarchDefinition=function(e,t){var n=l.compile(t);s.registerTokenizationSupport(e,function(e){return b(e,n)}),s.registerCommentsSupport(e,w(n)),s.registerElectricCharacterSupport(e,function(e){return C(e,n)}),s.registerTokenTypeClassificationSupport(e,E(n)),s.registerCharacterPairSupport(e,function(e){return S(e,n)})},e.INSTANCE=new e,e.INSTANCE_REGISTERED=!1,e.$_registerMonarchDefinition=h.Everywhere(e,e.prototype._registerMonarchDefinition),e}();s.registerThreadServiceListener(x.register),t.createTokenizationSupport=b;var M=function(e){function t(n,r,o){!o.name&&o.lexer&&(o=o.lexer),r||(r={id:o.name,workerParticipants:[]}),e.call(this,n,r,o.workerDescriptor?i.AsyncDescriptor.create(o.workerDescriptor.moduleName,o.workerDescriptor.ctorName):t.WorkerDescriptor),this.lexer=o,this.tokenizationSupport=b(this,o),this.electricCharacterSupport=C(this,o),this.commentsSupport=w(o),this.tokenTypeClassificationSupport=E(o),this.characterPairSupport=S(this,o)}return __extends(t,e),t.prototype.getTriggerCharacters=function(){return this.lexer.suggestSupport.triggerCharacters},t.prototype.suggest=function(t,n){var i=this;return this._threadService.isInMainThread?this.lexer.suggestSupport.textualCompletions?e.prototype.suggest.call(this,t,n).then(function(e){return i._addSnippets(t,n,e)}):c.TPromise.as(this._addSnippets(t,n,null)):e.prototype.suggest.call(this,t,n)},t.prototype._addSnippets=function(e,t,n){var i=this.lexer.suggestSupport.snippets;if(!i||0===i.length)return n;n||(n=[]);var r=this._modelService.getModel(e);return n.push({currentWord:r.getWordUntilPosition(t,!0,!0).word,suggestions:i.slice(0)}),n},t.prototype.shouldAutotriggerSuggest=function(e,t,n){return this.lexer.suggestSupport.triggerCharacters.indexOf(n)>=0},t.WorkerDescriptor=i.AsyncDescriptor.create(u.monarchPath+"Worker","MonarchNullWorker"),t}(s.AbstractMode);t.MonarchMode=M;var N=function(e){function t(t,n,i){e.call(this,t,i,l.compile(n))}return __extends(t,e),t}(M);t.DynamicMonarchMode=N}),define("vs/editor/worker/workerHelper",["require","exports","vs/platform/services","vs/base/lib/winjs.base","vs/platform/thread/attribute","vs/editor/modes/modesExtensions"],function(e,t,n,i,r,o){var s=function(){function e(e){this.resourceService=e.resourceService
}return e.prototype.getId=function(){return"vs.editor.worker.workerHelper.ServiceExtractor"},e}(),a=function(){function t(){this._lastProxyId=0,this._modulesMap={},this._supports={}}return t.register=function(e){t.INSTANCE_REGISTERED||(t.INSTANCE_REGISTERED=!0,e.registerInstance(t.INSTANCE),t.INSTANCE.setServices(e.createInstance(s)))},t.prototype.getId=function(){return"vs.editor.worker.workerHelper"},t.prototype.setServices=function(e){this._resourceService=e.resourceService},t.prototype.loadInBackgroundWorker=function(e){var t=this,n=String(++this._lastProxyId);return this._loadInBackgroundWorker(n,e).then(function(e){for(var i={},r=0;r<e.length;r++)i[e[r]]=t._createProxyMethod(n,e[r]);return i})},t.prototype._createProxyMethod=function(e,t){var n=this;return function(){for(var i=[],r=0;r<arguments.length;r++)i[r-0]=arguments[r];return n._executeMethod(e,t,i)}},t.prototype._loadInBackgroundWorker=function(t,n){var r,o,s=this,a=new i.TPromise(function(e,t){r=e,o=t});if(!/^file\:\/\//.test(n)){var u=n.match(/.*(\/plugins\/.*)\.js$/i);u&&(n="vs"+u[1])}return e([n],function(e){var n=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&"function"==typeof e[i]&&n.push(i);s._modulesMap[t]=e,r(n)},o),a},t.prototype._executeMethod=function(e,t,n){var r=this._modulesMap[e];try{return i.TPromise.as(r[t].apply(r,n))}catch(o){return i.TPromise.wrapError(o)}},t.INSTANCE=new t,t.INSTANCE_REGISTERED=!1,t.$_loadInBackgroundWorker=r.OneWorker(t,t.prototype._loadInBackgroundWorker,n.ThreadAffinity.Group3),t.$_executeMethod=r.OneWorker(t,t.prototype._executeMethod,n.ThreadAffinity.Group3),t}();t.WorkerHelper=a,o.registerThreadServiceListener(a.register)}),define("vs/editor/api/common",["require","exports","vs/base/lib/winjs.base","vs/base/network","vs/editor/modes/monarch/monarch","vs/editor/modes/modesExtensions","vs/editor/modes/modes","vs/editor/modes/supports","vs/editor/worker/workerHelper"],function(e,t,n,i,r,o,s,a,u){function l(){return new c}var c=function(){function e(){this.Promise=this._createPromise(),this.Models=this._createModels(),this.Modes=this._createModes(),this.Testing=this._createTesting()}return e.prototype._createPromise=function(){return n.TPromise},e.prototype._createModels=function(){return new d},e.prototype._createModes=function(){return new h},e.prototype._createTesting=function(){return new f},e}();t.MonacoAPI=c;var d=function(){function e(){this.URL=this._createURL()}return e.prototype._createURL=function(){return i.URL},e}();t.MonacoModelsAPI=d;var h=function(){function e(){this.InplaceReplaceSupport=this._createInplaceReplaceSupport(),this.Bracket=s.Bracket}return e.prototype._createInplaceReplaceSupport=function(){return new p},e.prototype.registerMonarchDefinition=function(e,t){r.registerMonarchDefinition(e,t)},e.prototype.registerTextMateDefinition=function(){throw new Error("Not supported")},e.prototype.loadInBackgroundWorker=function(e){return u.WorkerHelper.INSTANCE.loadInBackgroundWorker(e)},e}();t.MonacoModesAPI=h;var p=function(){function e(){}return e.prototype.register=function(e,t){o.registerInplaceReplaceSupport(e,t)},e.prototype.create=function(){throw new Error("TODO - I need the resource service here...")},e.prototype.valueSetReplace=function(e,t,n){return a.ReplaceSupport.valueSetReplace(e,t,n)},e.prototype.valueSetsReplace=function(e,t,n){return a.ReplaceSupport.valueSetsReplace(e,t,n)},e}();t.MonacoModesInplaceReplaceSupportAPI=p;var f=function(){function e(){}return e.prototype.createTokenize=function(){throw new Error("Not supported")},e.prototype.assertTokens=function(){throw new Error("Not supported")},e.prototype.module=function(){throw new Error("Not supported")},e.prototype.test=function(){throw new Error("Not supported")},e}();t.MonacoTestingAPI=f,t.createAPI=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/api/plugins",["require","exports","vs/base/remote/remote","./common","vs/editor/modes/monarch/monarch","vs/editor/modes/modesExtensions"],function(e,t,n,i,r,o){function s(e){var i=n.createProxy(e,{$isProxyDescriptor:!0,proxyId:t.PROXY_ID,desc:n.createDescriptor(d.prototype)}),r=new u(e,i);return e.registerHandler(t.PROXY_ID,r),r}function a(e,i){var r=n.createProxy(e,{$isProxyDescriptor:!0,proxyId:t.PROXY_ID,desc:n.createDescriptor(u.prototype)}),o=new d(e,r,i);return e.registerHandler(t.PROXY_ID,o),o}var u=function(e){function t(t,n){this._remote=t,this._proxy=n,e.call(this)}return __extends(t,e),t.prototype._createModes=function(){return new l(this._remote,this._proxy)},t}(i.MonacoAPI);t.MonacoAPI=u;var l=function(e){function t(t,n){this._remote=t,this._proxy=n,e.call(this)}return __extends(t,e),t.prototype._createInplaceReplaceSupport=function(){return new c(this._remote,this._proxy)},t.prototype.registerMonarchDefinition=function(e,t){r.registerMonarchDefinition(e,t),this._proxy.$Modes_registerMonarchDefinition(e,t)},t.prototype.loadInBackgroundWorker=function(e){return this._proxy.$Modes_loadInBackgroundWorker(e)},t}(i.MonacoModesAPI);t.MonacoModesAPI=l;var c=function(e){function t(t,n){this._remote=t,this._proxy=n,e.call(this)}return __extends(t,e),t.prototype.register=function(e,t){var n={navigateValueSet:function(e,n,i){return t.navigateValueSet(e,n,i)}},i=this._remote.createProxy(n);this._proxy.$Modes_InplaceReplaceSupport_register(e,i)},t}(i.MonacoModesInplaceReplaceSupportAPI);t.MonacoModesInplaceReplaceSupportAPI=c;var d=function(){function e(e,t,n){this._remote=e,this._proxy=t,this._helper=n}return e.prototype.$Modes_registerMonarchDefinition=function(e,t){r.registerMonarchDefinition(e,t)},e.prototype.$Modes_loadInBackgroundWorker=function(e){var t=this;return this._helper.loadInBackgroundWorker(e).then(function(e){return t._remote.createProxy(e)})},e.prototype.$Modes_InplaceReplaceSupport_register=function(e,t){o.registerInplaceReplaceSupport(e,t)},e}();t.MonacoAPIHost=d,t.PROXY_ID="vs/editor/api/plugins",t.createAPI=s,t.createAPIHost=a}),define("vs/css!vs/editor/css/editor",["vs/css!vs/editor/editor.main"],{}),define("vs/css!vs/editor/css/tokens",["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/editor/standalone/colorizer","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/editor/core/controller/cursorMoveHelper","vs/editor/core/editorPluginHost","vs/editor/editor2","vs/base/lifecycle","vs/editor/editorAction","vs/platform/thread/mainThreadService","vs/editor/api/plugins","vs/css!./../css/editor","vs/css!./../css/tokens","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,w,C,E,S,T,L,x,M,N,k){var I=0,O=function(e){function t(t,n,i){var o=this;e.call(this),this._facade=new A(t,this);var s=b.start(b.Topic.EDITOR,"CodeEditor.ctor");this.id=++I,this.domElement=n,this._lifetimeListeners=[],i=i||{};var a=null;i.model&&(a=i.model,delete i.model),this._configuration=new d.Configuration(i,n,function(e){return o.model?o.model.guessIndentation(e):null}),this._lifetimeListeners.push(this._configuration.addListener(r.EventType.ConfigurationChanged,function(e){return o.emit(r.EventType.ConfigurationChanged,e)})),this.forcedWidgetFocusCount=0,this.focusTracker=l.trackFocus(this.domElement),this.focusTracker.addFocusListener(function(){0===o.forcedWidgetFocusCount&&o.emit(r.EventType.EditorFocus,{})}),this.focusTracker.addBlurListener(function(){0===o.forcedWidgetFocusCount&&o.emit(r.EventType.EditorBlur,{})}),this.handlerService=t.handlerService,this._telemetryService=t.telemetryService,this._instantiationService=t.instantiationService,this.handlerService?(this.bindings=this._configuration.bindKeys(this.handlerService),this.bindings.deactivate(),this._lifetimeListeners.push(this.addListener(r.EventType.EditorTextBlur,function(){return o.bindings.deactivate()})),this._lifetimeListeners.push(this.addListener(r.EventType.EditorTextFocus,function(){return o.bindings.activate()}))):this.bindings=null,this._attachModel(a),this.contentWidgets={},this.overlayWidgets={},this.contributions={};for(var c=u.Registry.as(w.Extensions.EditorContributions),h=c.getEditorContributions2(),p=0,f=h.length;f>p;p++){var g=h[p].createInstance(t.instantiationService,this);this.contributions[g.getId()]=g}for(var m=L.getEditorContributions(),p=0,f=m.length;f>p;p++){var g=m[p].createInstance(t.instantiationService,this.getFacade());this.contributions[g.getId()]=g}T.EditorPluginHost.INSTANCE.register(this),s.stop()}return __extends(t,e),t.prototype.getFacade=function(){return this._facade},t.prototype.getId=function(){return this.getEditorType()+":"+this.id},t.prototype.getEditorType=function(){return r.EditorType.ICodeEditor},t.prototype.destroy=function(){this.dispose()},t.prototype.dispose=function(){for(T.EditorPluginHost.INSTANCE.deregister(this);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(r.EventType.Disposed,{}),e.prototype.dispose.call(this)},t.prototype.colorizeModelLine=function(e,t){if(void 0===t&&(t=this.model),!t)return"";var i=t.getLineContent(e),r=t.getLineTokens(e,!1),o=E.LineTokensBinaryEncoding.inflateArr(r.getBinaryEncodedTokensMap(),r.getBinaryEncodedTokens()),s=this._configuration.getIndentationOptions();return n.colorizeLine(i,o,s.tabSize)},t.prototype.updateOptions=function(e){this._configuration.updateOptions(e)},t.prototype.getConfiguration=function(){return s.clone(this._configuration.editor)},t.prototype.getRawConfiguration=function(){return this._configuration.getRawOptions()},t.prototype.getIndentationOptions=function(){return s.clone(this._configuration.getIndentationOptions())},t.prototype.normalizeIndentation=function(e){return this._configuration.normalizeIndentation(e)},t.prototype.getValue=function(e){if(void 0===e&&(e=null),this.model){var t=e&&e.preserveBOM?!0:!1,n=E.EndOfLinePreference.TextDefined;return e&&e.lineEnding&&"\n"===e.lineEnding?n=E.EndOfLinePreference.LF:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(n=E.EndOfLinePreference.CRLF),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(void 0===e&&(e=null),this.model!==e){var t=b.start(b.Topic.EDITOR,"CodeEditor.setModel"),n=this._detachModel();this._attachModel(e);var i=null,o=null;n&&(i=n.getAssociatedResource().toExternal()),e&&(o=e.getAssociatedResource().toExternal());var s={oldModelUrl:i,newModelUrl:o};t.stop(),this.emit(r.EventType.ModelChanged,s),this._postDetachModelCleanup(n)}},t.prototype.getDomNode=function(){return this.hasView?this._view.domNode:null},t.prototype.getCenteredRangeInViewport=function(){return this.hasView?this._view.getCenteredRangeInViewport():null},t.prototype.getVisibleColumnFromPosition=function(e){if(!this.model)return e.column;var t=this.model.validatePosition(e);return S.ModelCursorMoveHelper.visibleColumnFromColumn(this.model,t.lineNumber,t.column,this._configuration.getIndentationOptions().tabSize)+1},t.prototype.getPosition=function(){return this.cursor?this.cursor.getPosition().clone():null},t.prototype.setPosition=function(e,t,n,i){if(void 0===t&&(t=!1),void 0===n&&(n=!1),void 0===i&&(i=!1),this.cursor){if(!v.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(void 0===t&&(t=!1),void 0===n&&(n=!1),!v.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){void 0===t&&(t=!1),void 0===n&&(n=!1),void 0===i&&(i=!1);var r=_.isISelection(e),o=y.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 _.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(void 0===t&&(t=!1),void 0===n&&(n=!1),this.model&&this.cursor){if(!y.isIRange(e))throw new Error("Invalid arguments");var i=this.model.validateRange(e),o={range:i,viewRange:null,revealVerticalInCenter:t,revealHorizontal:n};this.cursor.emit(r.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(!_.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.getScrollWidth=function(){return this.hasView?this._view.getCodeEditorHelper().getScrollWidth():-1},t.prototype.getScrollHeight=function(){return this.hasView?this._view.getCodeEditorHelper().getScrollHeight():-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;a.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.addAction=function(e){var t=this._instantiationService.createInstance(w.DynamicEditorAction,e,this);this.contributions[t.getId()]=t},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,n){var r=this.getAction(t);null!==r?r.enabled&&i.Promise.as(r.run()).done():this._configuration.handlerDispatcher.trigger(e,t,n)},t.prototype.executeCommand=function(e,t){return this._configuration.handlerDispatcher.trigger(e,o.Handler.ExecuteCommand,t)},t.prototype.executeCommands=function(e,t){return this._configuration.handlerDispatcher.trigger(e,o.Handler.ExecuteCommands,t)},t.prototype.addContentWidget=function(e){var t={widget:e,position:e.getPosition()};this.contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id."),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.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),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?0===e.length&&0===t.length?e:this.model.deltaDecorations(e,t,this.id):[]},t.prototype.changeViewZones=function(e){if(this.hasView){var t=this._view.change(e);t&&this.emit(r.EventType.ViewZonesChanged)}},t.prototype.getWhitespaces=function(){return this.hasView?this._view.getWhitespaces():[]},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)}):function(){}},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.domElement.setAttribute("data-mode-id",this.model.getMode().getId()),this.model.setStopLineTokenizationAfter(this._configuration.editor.stopLineTokenizationAfter),this._configuration.setIsDominatedByLongLines(this.model.isDominatedByLongLines(this._configuration.editor.longLineBoundary)),this._configuration.resetIndentationOptions(),this.model.onBeforeAttached();var n=this._configuration.getWrappingColumn(),i=-1;n>0&&(i=n);var o=new f.CharacterHardWrappingLineMapperFactory(this._configuration.editor.wordWrapBreakBeforeCharacters,this._configuration.editor.wordWrapBreakAfterCharacters,this._configuration.editor.wordWrapBreakObtrusiveCharacters),s=new g.SplitLinesCollection(this.model,o,this._configuration.getIndentationOptions().tabSize,i);this.viewModel=new m.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 h.Cursor(this.id,this._configuration,this.model,a),this.viewModel.addEventSource(this.cursor),this._view=new p.View(this.id,this._configuration,this.viewModel),this.listenersToRemove.push(this._view.getInternalEventBus().addBulkListener(function(e){for(var n=0,i=e.length;i>n;n++){var o=e[n].getType(),s=e[n].getData();switch(o){case r.EventType.ViewFocusGained:t.emit(r.EventType.EditorTextFocus),t.emit(r.EventType.EditorFocus,{});break;case"scroll":t.emit("scroll",s);break;case"scrollSize":t.emit("scrollSize",s);break;case r.EventType.ViewFocusLost:t.emit(r.EventType.EditorTextBlur);break;case r.EventType.ContextMenu:t.emit(r.EventType.ContextMenu,s);break;case r.EventType.MouseDown:t.emit(r.EventType.MouseDown,s);break;case r.EventType.MouseUp:t.emit(r.EventType.MouseUp,s);break;case r.EventType.KeyUp:t.emit(r.EventType.KeyUp,s);break;case r.EventType.MouseMove:t.emit(r.EventType.MouseMove,s);break;case r.EventType.MouseLeave:t.emit(r.EventType.MouseLeave,s);break;case r.EventType.KeyDown:t.emit(r.EventType.KeyDown,s);break;case r.EventType.ViewLayoutChanged:t.emit(r.EventType.EditorLayout,s)}}})),this.listenersToRemove.push(this.model.addBulkListener(function(e){for(var n=0,i=e.length;i>n;n++){var o=e[n].getType(),s=e[n].getData();switch(o){case r.EventType.ModelDecorationsChanged:t.emit(r.EventType.ModelDecorationsChanged,s);break;case r.EventType.ModelModeChanged:t.domElement.setAttribute("data-mode-id",t.model.getMode().getId()),t.emit(r.EventType.ModelModeChanged,s);break;case r.EventType.ModelContentChanged:t.emit(r.EventType.ModelContentChanged,s),t.emit("change",{});break;case r.EventType.ModelDispose:t.setModel(null)}}})),this.listenersToRemove.push(this.cursor.addBulkListener(function(e){for(var n=0,i=e.length;i>n;n++){var o=e[n].getType(),s=e[n].getData();switch(o){case r.EventType.CursorPositionChanged:t.emit(r.EventType.CursorPositionChanged,s);break;case r.EventType.CursorSelectionChanged:t.emit(r.EventType.CursorSelectionChanged,s)}}})),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.model&&this.model.onBeforeDetached(),this.hasView=!1,this.listenersToRemove.forEach(function(e){e()}),this.listenersToRemove=[],this.cursor&&(this.cursor.dispose(),this.cursor=null);var e=null;this._view&&(this._view.dispose(),e=this._view.domNode,this._view=null),this.viewModel&&(this.viewModel.dispose(),this.viewModel=null);var t=this.model;return this.model=null,e&&this.domElement.removeChild(e),this.domElement.removeAttribute("data-mode-id"),t},t}(c.EventEmitter);t.CodeEditorWidget=O;var P=function(){function e(e,t){this._id=e,this._position=t,this._domNode=document.createElement("div"),this._domNode.className=this._id.replace(/\./g,"-").replace(/[^a-z0-9\-]/,"")}return e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return this._position},e}(),R=function(){function e(e,t){this._ops=e,this._editCursorState=t}return e.prototype.getEditOperations=function(e,t){if(0!==this._ops.length){this._ops.sort(function(e,t){return y.compareRangesUsingStarts(e.range,t.range)});for(var n=[],i=this._ops[0],r=1;r<this._ops.length;r++)i.range.endLineNumber===this._ops[r].range.startLineNumber&&i.range.endColumn===this._ops[r].range.startColumn?(i.range=y.plusRange(i.range,this._ops[r].range),i.text=i.text+this._ops[r].text):(n.push(i),i=this._ops[r]);n.push(i);for(var r=0;r<n.length;r++)t.addEditOperation(y.create(n[r].range),n[r].text)}},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations(),i=n[n.length-1].range;return new _.Selection(i.endLineNumber,i.endColumn,i.endLineNumber,i.endColumn)},e}();t.CommandRunner=R;var D=function(e){function t(t,n,i,r){e.call(this,t,i,r,i.behavior),this._action=n}return __extends(t,e),t.prototype.run=function(){return this._action.run()},t}(M.EditorAction),A=function(){function e(e,t){var n=this;this._editor=t,this._instantiationService=e.instantiationService,this._handlerService=e.handlerService,this.decorations=new W(t),this.events=new L.EditorEventsFacade,this._actions={},this._toDispose=[],this._toDispose.push(this._editor.addBulkListener2(function(e){var t=e.map(function(e){return{type:e.getType(),data:e.getData()}});n.events.invoke(t)}))}return e.prototype.dispose=function(){this._toDispose=x.disposeAll(this._toDispose)},e.prototype.getModel=function(){var e=this._editor.getModel();return e?e.getFacade():null},e.prototype.getConfiguration=function(){return this._editor.getConfiguration()},e.prototype.edit2=function(e,t,n){var i=new R(t,n);return this._editor.executeCommand(e,i)},e.prototype.getAction=function(e){return this._editor.getAction(e)||this._actions[e]},e.prototype.addAction=function(e,t){var n=this._instantiationService.createInstance(D,t,e,this._editor);this._actions[n.getId()]=n},e.prototype.addOverlayWidget=function(e,t){var n=new P(e,t);return this._editor.addOverlayWidget(n),n.getDomNode()},e.prototype.getPosition=function(){return this._editor.getPosition()},e.prototype.getSelection=function(){return this._editor.getSelection()},e.prototype.getSelections=function(){return this._editor.getSelections()},e.prototype.setSelection=function(e,t,n,i){this._editor.setSelection(e,t,n,i)},e.prototype.revealRange=function(e,t,n){this._editor.revealRange(e,t,n)},e.prototype.bindKeybinding=function(e,t,n){return this._handlerService.bind(e,t,n)},e.prototype.focus=function(){this._editor.focus()},e}(),W=function(){function e(e){this._editor=e,this._types={},this._lastTypeId=0}return e.prototype.createType=function(e){var t=String(++this._lastTypeId);return this._types[t]=e,t},e.prototype.disposeTypes=function(e){for(var t=0,n=e.length;n>t;t++){var i=String(e[t]);delete this._types[i]}},e.prototype.delta=function(e,t,n){var i=String(n),r=this._types[i],o=t.map(function(e){return{range:e,options:r}});return this._editor.deltaDecorations(e,o)},e.prototype.delta2=function(e){var t=this,n=[];return this._editor.changeDecorations(function(i){for(var r=0,o=e.toDelete.length;o>r;r++)i.removeDecoration(e.toDelete[r]);for(var r=0,o=e.toCreateRange.length;o>r;r++){var s=String(e.toCreateType[r]),a=t._types[s];n.push(i.addDecoration(e.toCreateRange[r],a))}for(var r=0,o=e.toChange.length;o>r;r++){var s=String(e.toChangeType[r]),a=t._types[s];i.changeDecorationOptions(e.toChange[r],a)}}),n},e.prototype.changeType=function(e,t){var n=String(t),i=this._types[n];this._editor.changeDecorations(function(t){for(var n=0,r=e.length;r>n;n++)t.changeDecorationOptions(e[n],i)})},e.prototype.changeTypes=function(e,t){var n=this;this._editor.changeDecorations(function(i){for(var r=0,o=e.length;o>r;r++){var s=String(t[r]),a=n._types[s];i.changeDecorationOptions(e[r],a)}})},e.prototype.getRange=function(e){return this._editor.getModel().getDecorationRange(e)},e.prototype.getRanges=function(e){for(var t=[],n=this._editor.getModel(),i=0,r=e.length;r>i;i++)t[i]=n.getDecorationRange(e[i]);return t},e}();N.MainThreadService.onWorker(function(e){k.createAPIHost(e.getRemoteCom(),{loadInBackgroundWorker:function(){throw new Error("Not implemented")}})})}),define("vs/css!vs/base/ui/widgets/sash",["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/base/ui/widgets/sash",["require","exports","vs/base/lifecycle","vs/base/dom/builder","vs/base/env","vs/base/types","vs/base/dom/dom","vs/base/dom/touch","vs/base/eventEmitter","vs/base/dom/mouseEvent","vs/css!./sash"],function(e,t,n,i,r,o,s,a,u,l){var c=i.$;!function(e){e[e.VERTICAL=0]="VERTICAL",e[e.HORIZONTAL=1]="HORIZONTAL"}(t.Orientation||(t.Orientation={}));var d=t.Orientation,h=function(e){function t(t,n,i){var o=this;void 0===i&&(i={}),e.call(this),this.$e=c(".monaco-sash").appendTo(t),this.gesture=new a.Gesture(this.$e.getHTMLElement()),this.$e.on("mousedown",function(e){o.onMouseDown(e)}),this.$e.on(a.EventType.Start,function(e){o.onTouchStart(e)}),this.orientation=i.orientation||d.VERTICAL,this.$e.addClass(this.orientation===d.HORIZONTAL?"horizontal":"vertical"),this.size=i.baseSize||5,r.browser.isIPad&&(this.size*=4,this.$e.addClass("touch")),this.orientation===d.HORIZONTAL?this.$e.size(null,this.size):this.$e.size(this.size),this.isDisabled=!1,this.hidden=!1,this.layoutProvider=n}return __extends(t,e),t.prototype.getHTMLElement=function(){return this.$e.getHTMLElement()},t.prototype.onMouseDown=function(e){var t=this;if(s.EventHelper.stop(e,!1),!this.isDisabled){var n=new l.StandardMouseEvent(e),i=n.posx,r=n.posy,o={startX:i,currentX:i,instantDiffX:0,startY:r,currentY:r,instantDiffY:0};this.$e.addClass("active"),this.emit("start",o);var a=c("div").style({position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:1e6,cursor:this.orientation===d.VERTICAL?"ew-resize":"ns-resize"}),u=c(window),h=i,p=r;u.on("mousemove",function(e){s.EventHelper.stop(e,!1);var n=new l.StandardMouseEvent(e),o={startX:i,currentX:n.posx,instantDiffX:n.posx-h,startY:r,currentY:n.posy,instantDiffY:n.posy-p};h=n.posx,p=n.posy,t.emit("change",o)}).once("mouseup",function(e){s.EventHelper.stop(e,!1),t.$e.removeClass("active"),t.emit("end"),u.off("mousemove"),a.destroy()}),a.appendTo(document.body)}},t.prototype.onTouchStart=function(e){var t=this;s.EventHelper.stop(e);var i=[],r=e.pageX,u=e.pageY;this.emit("start",{startX:r,currentX:r,instantDiffX:0,startY:u,currentY:u,instantDiffY:0});var l=r,c=u;i.push(s.addDisposableListener(this.$e.getHTMLElement(),a.EventType.Change,function(e){o.isNumber(e.pageX)&&o.isNumber(e.pageY)&&(t.emit("change",{startX:r,currentX:e.pageX,instantDiffX:e.pageX-l,startY:u,currentY:e.pageY,instantDiffY:e.pageY-c}),l=e.pageX,c=e.pageY)})),i.push(s.addDisposableListener(this.$e.getHTMLElement(),a.EventType.End,function(){t.emit("end"),n.disposeAll(i)}))},t.prototype.layout=function(){var e;if(this.orientation===d.VERTICAL){var t=this.layoutProvider;e={left:t.getVerticalSashLeft(this)-this.size/2+"px"},t.getVerticalSashTop&&(e.top=t.getVerticalSashTop(this)+"px"),t.getVerticalSashHeight&&(e.height=t.getVerticalSashHeight(this)+"px")
}else{var n=this.layoutProvider;e={top:n.getHorizontalSashTop(this)-this.size/2+"px"},n.getHorizontalSashLeft&&n.getHorizontalSashLeft(this)+"px",n.getHorizontalSashWidth&&(e.width=n.getHorizontalSashWidth(this)+"px")}this.$e.style(e)},t.prototype.show=function(){this.hidden=!1,this.$e.show()},t.prototype.hide=function(){this.hidden=!0,this.$e.hide()},t.prototype.isHidden=function(){return this.hidden},t.prototype.enable=function(){this.$e.removeClass("disabled"),this.isDisabled=!1},t.prototype.disable=function(){this.$e.addClass("disabled"),this.isDisabled=!0},t.prototype.dispose=function(){this.$e&&(this.$e.destroy(),this.$e=null),e.prototype.dispose.call(this)},t}(u.EventEmitter);t.Sash=h}),define("vs/css!vs/editor/diff/diffEditor",["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/diff/diffEditorWidget",["require","exports","vs/editor/core/config/config","vs/base/lifecycle","vs/editor/core/constants","vs/base/objects","vs/editor/core/codeEditorWidget","vs/base/dom/dom","vs/base/eventEmitter","vs/editor/core/range","vs/editor/editor","vs/base/ui/widgets/sash","vs/editor/core/view/lines/viewLine","vs/editor/core/view/lines/viewLineParts","vs/base/time/schedulers","vs/css!./diffEditor"],function(e,t,n,i,r,o,s,a,u,l,c,d,h,p,f){function g(e){return e.modifiedEndLineNumber>0}function m(e){return e.originalEndLineNumber>0}function v(e,t,n,i,r,o){return{range:new l.Range(e,t,n,i),options:{isOverlay:!1,className:r,isWholeLine:o}}}function y(){var e=document.createElement("div");return e.className="diagonal-fill",e}var _=function(){function e(){this._zones=[],this._zonesMap={},this._decorations=[]}return e.prototype.getForeignViewZones=function(e){var t=this;return e.filter(function(e){return!t._zonesMap[String(e.id)]})},e.prototype.clean=function(e){var t=this;this._zones.length>0&&e.changeViewZones(function(e){for(var n=0,i=t._zones.length;i>n;n++)e.removeZone(t._zones[n])}),this._zones=[],this._zonesMap={},this._decorations.length>0&&e.changeDecorations(function(e){for(var n=0,i=t._decorations.length;i>n;n++)e.removeDecoration(t._decorations[n])}),this._decorations=[]},e.prototype.apply=function(e,t,n){var i,r,o=this;e.changeViewZones(function(e){for(i=0,r=o._zones.length;r>i;i++)e.removeZone(o._zones[i]);for(o._zones=[],o._zonesMap={},i=0,r=n.zones.length;r>i;i++){n.zones[i].suppressMouseDown=!0;var t=e.addZone(n.zones[i]);o._zones.push(t),o._zonesMap[String(t)]=!0}}),this._decorations=e.deltaDecorations(this._decorations,n.decorations),t.setZones(n.overviewZones)},e}(),b=0,w=function(e){function t(i,r,o){var s=this;e.call(this),this.id=++b,this._domElement=r,o=o||{},this._theme=o.theme||n.Config.editor.theme,this._renderSideBySide=!0,"undefined"!=typeof o.renderSideBySide&&(this._renderSideBySide=o.renderSideBySide),this._ignoreTrimWhitespace=!0,"undefined"!=typeof o.ignoreTrimWhitespace&&(this._ignoreTrimWhitespace=o.ignoreTrimWhitespace),this._updateDecorationsRunner=new f.RunOnceScheduler(function(){return s._updateDecorations()},0),this._toDispose=[],this._toDispose.push(this._updateDecorationsRunner),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=t._getClassName(this._theme,this._renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=document.createElement("div"),this._overviewViewportDomElement.className="diffViewport",this._overviewViewportDomElement.style.position="absolute",this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.style.height="100%",this._overviewDomElement.appendChild(this._overviewViewportDomElement),this._toDispose.push(a.addDisposableListener(this._overviewDomElement,"mousedown",function(e){s.modifiedEditor.delegateVerticalScrollbarMouseDown(e)})),this._containerDomElement.appendChild(this._overviewDomElement),this._createLeftHandSide(),this._createRightHandSide(),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new _,this._modifiedEditorState=new _,this._isVisible=!0,this._isHandlingScrollEvent=!1,this._width=0,this._height=0,this._lineChanges=null,this._createLeftHandSideEditor(o,i.instantiationService),this._createRightHandSideEditor(o,i.instantiationService),o.automaticLayout&&(this._measureDomElementToken=window.setInterval(function(){return s._measureDomElement(!1)},100)),this._enableSplitViewResizing=!0,"undefined"!=typeof o.enableSplitViewResizing&&(this._enableSplitViewResizing=o.enableSplitViewResizing),this._renderSideBySide?this._setStrategy(new T(this._createDataSource(),this._enableSplitViewResizing)):this._setStrategy(new x(this._createDataSource(),this._enableSplitViewResizing))}return __extends(t,e),t._getClassName=function(e,t){var n="monaco-diff-editor monaco-editor-background ";return t&&(n+="side-by-side "),n+=e},t.prototype._recreateOverviewRulers=function(){this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._originalOverviewRuler=this.originalEditor.getView().createOverviewRuler("original diffOverviewRuler",4,Number.MAX_VALUE),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._modifiedOverviewRuler=this.modifiedEditor.getView().createOverviewRuler("modified diffOverviewRuler",4,Number.MAX_VALUE),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode()),this._layoutOverviewRulers()},t.prototype._createLeftHandSide=function(){this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode)},t.prototype._createRightHandSide=function(){this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode)},t.prototype._createLeftHandSideEditor=function(e,t){var n=this;this.originalEditor=t.createInstance(s.CodeEditorWidget,this._originalDomNode,this._adjustOptionsForLeftHandSide(e)),this._toDispose.push(this.originalEditor.addBulkListener2(function(e){return n._onOriginalEditorEvents(e)})),this._toDispose.push(this.addEmitter2(this.originalEditor,"leftHandSide"))},t.prototype._createRightHandSideEditor=function(e,t){var n=this;this.modifiedEditor=t.createInstance(s.CodeEditorWidget,this._modifiedDomNode,this._adjustOptionsForRightHandSide(e)),this._toDispose.push(this.modifiedEditor.addBulkListener2(function(e){return n._onModifiedEditorEvents(e)})),this._toDispose.push(this.addEmitter2(this.modifiedEditor,"rightHandSide"))},t.prototype.destroy=function(){this.dispose()},t.prototype.dispose=function(){this._toDispose=i.disposeAll(this._toDispose),window.clearInterval(this._measureDomElementToken),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler.dispose(),this._modifiedOverviewRuler.dispose(),this.originalEditor.destroy(),this.modifiedEditor.destroy(),this._strategy.dispose(),e.prototype.dispose.call(this)},t.prototype.getId=function(){return this.getEditorType()+":"+this.id},t.prototype.getEditorType=function(){return r.EditorType.IDiffEditor},t.prototype.getLineChanges=function(){return this._lineChanges},t.prototype.getOriginalEditor=function(){return this.originalEditor},t.prototype.getModifiedEditor=function(){return this.modifiedEditor},t.prototype.updateOptions=function(e){this._theme=e&&e.theme?e.theme:this._theme;var n=!1;"undefined"!=typeof e.renderSideBySide&&this._renderSideBySide!==e.renderSideBySide&&(this._renderSideBySide=e.renderSideBySide,n=!0),"undefined"!=typeof e.ignoreTrimWhitespace&&this._ignoreTrimWhitespace!==e.ignoreTrimWhitespace&&(this._ignoreTrimWhitespace=e.ignoreTrimWhitespace,this._beginUpdateDecorations()),this._containerDomElement.className=t._getClassName(this._theme,this._renderSideBySide),this.modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(e)),this.originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(e)),"undefined"!=typeof e.enableSplitViewResizing&&(this._enableSplitViewResizing=e.enableSplitViewResizing),this._strategy.setEnableSplitViewResizing(this._enableSplitViewResizing),n&&(this._renderSideBySide?this._setStrategy(new T(this._createDataSource(),this._enableSplitViewResizing)):this._setStrategy(new x(this._createDataSource(),this._enableSplitViewResizing)))},t.prototype.getValue=function(e){return void 0===e&&(e=null),this.modifiedEditor.getValue(e)},t.prototype.getModel=function(){return{original:this.originalEditor.getModel(),modified:this.modifiedEditor.getModel()}},t.prototype.setModel=function(e){this._cleanViewZonesAndDecorations(),this.originalEditor.setModel(e?e.original:null),this.modifiedEditor.setModel(e?e.modified:null),e&&(this.originalEditor.setScrollTop(0),this.modifiedEditor.setScrollTop(0)),this._lineChanges=null,this._diffComputationToken++,e?(this._recreateOverviewRulers(),this._beginUpdateDecorations()):this._lineChanges=null,this._layoutOverviewViewport()},t.prototype.getDomNode=function(){return this._domElement},t.prototype.getVisibleColumnFromPosition=function(e){return this.modifiedEditor.getVisibleColumnFromPosition(e)},t.prototype.getPosition=function(){return this.modifiedEditor.getPosition()},t.prototype.setPosition=function(e,t,n,i){this.modifiedEditor.setPosition(e,t,n,i)},t.prototype.revealPosition=function(e,t,n){this.modifiedEditor.revealPosition(e,t,n)},t.prototype.getSelection=function(){return this.modifiedEditor.getSelection()},t.prototype.getSelections=function(){return this.modifiedEditor.getSelections()},t.prototype.setSelection=function(e,t,n,i){this.modifiedEditor.setSelection(e,t,n,i)},t.prototype.setSelections=function(e){this.modifiedEditor.setSelections(e)},t.prototype.revealRange=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1),this.modifiedEditor.revealRange(e,t,n)},t.prototype.addAction=function(e){this.modifiedEditor.addAction(e)},t.prototype.getActions=function(){return this.modifiedEditor.getActions()},t.prototype.getAction=function(e){return this.modifiedEditor.getAction(e)},t.prototype.saveViewState=function(){var e=this.originalEditor.saveViewState(),t=this.modifiedEditor.saveViewState();return{original:e,modified:t}},t.prototype.restoreViewState=function(e){var t=e;if(t.original&&t.original){var n=t;this.originalEditor.restoreViewState(n.original),this.modifiedEditor.restoreViewState(n.modified)}},t.prototype.layout=function(e){this._measureDomElement(!1,e)},t.prototype.focus=function(){this.modifiedEditor.focus()},t.prototype.isFocused=function(){return this.originalEditor.isFocused()||this.modifiedEditor.isFocused()},t.prototype.onVisible=function(){this._isVisible=!0,this.originalEditor.onVisible(),this.modifiedEditor.onVisible(),this._beginUpdateDecorations()},t.prototype.onHide=function(){this._isVisible=!1,this.originalEditor.onHide(),this.modifiedEditor.onHide(),this._cleanViewZonesAndDecorations()},t.prototype.trigger=function(e,t,n){this.modifiedEditor.trigger(e,t,n)},t.prototype.changeDecorations=function(e){return this.modifiedEditor.changeDecorations(e)},t.prototype._measureDomElement=function(e,t){t=t||a.getDomNodePosition(this._containerDomElement),t.width<=0||(e||t.width!==this._width||t.height!==this._height)&&(this._width=t.width,this._height=t.height,this._doLayout())},t.prototype._layoutOverviewRulers=function(){var e=t.ENTIRE_DIFF_OVERVIEW_WIDTH-2*t.ONE_OVERVIEW_WIDTH,n=this.modifiedEditor.getLayoutInfo();n&&(this._originalOverviewRuler.setLayout({top:0,width:t.ONE_OVERVIEW_WIDTH,right:e+t.ONE_OVERVIEW_WIDTH,height:this._height-n.horizontalScrollbarHeight}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:t.ONE_OVERVIEW_WIDTH,height:this._height-n.horizontalScrollbarHeight}))},t.prototype._recomputeIfNecessary=function(e){for(var n=this,i=!1,o=0;!i&&o<e.length;o++){var s=e[o].getType();i=i||"change"===s||s===r.EventType.ModelModeChanged}i&&this._isVisible&&(-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(function(){return n._beginUpdateDecorations()},t.UPDATE_DIFF_DECORATIONS_DELAY))},t.prototype._onOriginalEditorEvents=function(e){for(var t=0;t<e.length;t++)"scroll"===e[t].getType()&&this._onOriginalEditorScroll(e[t].getData()),e[t].getType()===r.EventType.ViewZonesChanged&&this._onViewZonesChanged();this._recomputeIfNecessary(e)},t.prototype._onModifiedEditorEvents=function(e){for(var t=0;t<e.length;t++)"scroll"===e[t].getType()&&(this._onModifiedEditorScroll(e[t].getData()),this._layoutOverviewViewport()),"scrollSize"===e[t].getType()&&this._layoutOverviewViewport(),"viewLayoutChanged"===e[t].getType()&&this._layoutOverviewViewport(),e[t].getType()===r.EventType.ViewZonesChanged&&this._onViewZonesChanged();this._recomputeIfNecessary(e)},t.prototype._onViewZonesChanged=function(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()},t.prototype._beginUpdateDecorations=function(){var e=this;if(this._beginUpdateDecorationsTimeout=-1,this.modifiedEditor.getModel()){this._diffComputationToken++;var t=this._diffComputationToken,n=this.originalEditor.getModel(),i=this.modifiedEditor.getModel(),o=this.modifiedEditor.getModel().getMode().diffSupport;if(o)try{o.computeDiff(n.getAssociatedResource(),i.getAssociatedResource(),this._ignoreTrimWhitespace).then(function(o){t===e._diffComputationToken&&n===e.originalEditor.getModel()&&i===e.modifiedEditor.getModel()&&(e._lineChanges=o,e._updateDecorationsRunner.schedule(),e.emit(r.EventType.DiffUpdated,{editor:e,lineChanges:o}))},function(){t===e._diffComputationToken&&n===e.originalEditor.getModel()&&i===e.modifiedEditor.getModel()&&(e._lineChanges=null,e._updateDecorationsRunner.schedule())})}catch(s){console.error(s),this._lineChanges=null,this._updateDecorationsRunner.schedule()}else this._lineChanges=null,this._updateDecorationsRunner.schedule()}},t.prototype._cleanViewZonesAndDecorations=function(){this._originalEditorState.clean(this.originalEditor),this._modifiedEditorState.clean(this.modifiedEditor)},t.prototype._updateDecorations=function(){var e=this._lineChanges||[],t=this._originalEditorState.getForeignViewZones(this.originalEditor.getWhitespaces()),n=this._modifiedEditorState.getForeignViewZones(this.modifiedEditor.getWhitespaces()),i=this._strategy.getEditorsDiffDecorations(e,this._ignoreTrimWhitespace,t,n,this.originalEditor,this.modifiedEditor);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this.originalEditor,this._originalOverviewRuler,i.original),this._modifiedEditorState.apply(this.modifiedEditor,this._modifiedOverviewRuler,i.modified)}finally{this._currentlyChangingViewZones=!1}},t.prototype._adjustOptionsForLeftHandSide=function(e){var t=o.clone(e||{});return t.wrappingColumn=-1,t.readOnly=!0,t.automaticLayout=!1,t.scrollbar=t.scrollbar||{},t.scrollbar.vertical="hidden",t.overviewRulerLanes=1,t.theme=this._theme+" original-in-monaco-diff-editor",t},t.prototype._adjustOptionsForRightHandSide=function(e){var i=o.clone(e||{});return i.wrappingColumn=-1,i.automaticLayout=!1,i.revealHorizontalRightPadding=n.Config.editor.revealHorizontalRightPadding+t.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar=i.scrollbar||{},i.scrollbar.vertical="visible",i.scrollbar.verticalHasArrows=!1,i.theme=this._theme+" modified-in-monaco-diff-editor",i},t.prototype._onOriginalEditorScroll=function(e){this._isHandlingScrollEvent||(this._isHandlingScrollEvent=!0,this.modifiedEditor.setScrollLeft(e.scrollLeft),this.modifiedEditor.setScrollTop(e.scrollTop),this._isHandlingScrollEvent=!1)},t.prototype._onModifiedEditorScroll=function(e){this._isHandlingScrollEvent||(this._isHandlingScrollEvent=!0,this.originalEditor.setScrollLeft(e.scrollLeft),this.originalEditor.setScrollTop(e.scrollTop),this._isHandlingScrollEvent=!1)},t.prototype._doLayout=function(){var e=this._strategy.layout();this._originalDomNode.style.width=e+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=this._width-e+"px",this._modifiedDomNode.style.left=e+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.width=t.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=this._width-t.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.style.width=t.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.style.height="30px",this.originalEditor.layout({width:e,height:this._height}),this.modifiedEditor.layout({width:this._width-e-t.ENTIRE_DIFF_OVERVIEW_WIDTH,height:this._height}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._layoutOverviewViewport()},t.prototype._layoutOverviewViewport=function(){var e=this._computeOverviewViewport();e?(a.StyleMutator.setTop(this._overviewViewportDomElement,e.top),a.StyleMutator.setHeight(this._overviewViewportDomElement,e.height)):(a.StyleMutator.setTop(this._overviewViewportDomElement,0),a.StyleMutator.setHeight(this._overviewViewportDomElement,0))},t.prototype._computeOverviewViewport=function(){var e=this.modifiedEditor.getLayoutInfo();if(!e)return null;var t=this.modifiedEditor.getScrollTop(),n=this.modifiedEditor.getScrollHeight(),i=Math.max(0,e.contentHeight-e.horizontalScrollbarHeight),r=Math.max(0,i-0),o=n>0?r/n:0,s=Math.max(1,Math.floor(e.contentHeight*o)),a=Math.floor(t*o);return{height:s,top:a}},t.prototype._createDataSource=function(){var e=this;return{getWidth:function(){return e._width},getHeight:function(){return e._height},getContainerDomNode:function(){return e._containerDomElement},relayoutEditors:function(){e._doLayout()},getOriginalEditor:function(){return e.originalEditor},getModifiedEditor:function(){return e.modifiedEditor}}},t.prototype._setStrategy=function(e){this._strategy&&this._strategy.dispose(),this._strategy=e,this._lineChanges&&this._updateDecorations(),this._measureDomElement(!0)},t.prototype._getLineChangeAtOrBeforeLineNumber=function(e,t){if(0===this._lineChanges.length||e<t(this._lineChanges[0]))return null;for(var n=0,i=this._lineChanges.length-1;i>n;){var r=Math.floor((n+i)/2),o=t(this._lineChanges[r]),s=i>=r+1?t(this._lineChanges[r+1]):Number.MAX_VALUE;o>e?i=r-1:e>=s?n=r+1:(n=r,i=r)}return this._lineChanges[n]},t.prototype._getEquivalentLineForOriginalLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,function(e){return e.originalStartLineNumber});if(!t)return e;var n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),r=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,o=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-n;return r>=s?i+Math.min(s,o):i+o-r+s},t.prototype._getEquivalentLineForModifiedLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,function(e){return e.modifiedStartLineNumber});if(!t)return e;var n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),r=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,o=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-i;return o>=s?n+Math.min(s,r):n+r-o+s},t.prototype.getDiffLineInformationForOriginal=function(e){return this._lineChanges?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null},t.prototype.getDiffLineInformationForModified=function(e){return this._lineChanges?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null},t.ONE_OVERVIEW_WIDTH=15,t.ENTIRE_DIFF_OVERVIEW_WIDTH=30,t.UPDATE_DIFF_DECORATIONS_DELAY=200,t}(u.EventEmitter);t.DiffEditorWidget=w;var C=function(){function e(e){this._dataSource=e}return e.prototype.getEditorsDiffDecorations=function(e,t,n,i,r,o){i=i.sort(function(e,t){return e.afterLineNumber-t.afterLineNumber}),n=n.sort(function(e,t){return e.afterLineNumber-t.afterLineNumber});var s=this._getViewZones(e,n,i,r,o),a=this._getOriginalEditorDecorations(e,t,r,o),u=this._getModifiedEditorDecorations(e,t,r,o);return{original:{decorations:a.decorations,overviewZones:a.overviewZones,zones:s.original},modified:{decorations:u.decorations,overviewZones:u.overviewZones,zones:s.modified}}},e.prototype._getViewZones=function(){return null},e.prototype._getOriginalEditorDecorations=function(){return null},e.prototype._getModifiedEditorDecorations=function(){return null},e}(),E=function(){function e(e){this._source=e,this._index=-1,this.advance()}return e.prototype.advance=function(){this._index++,this.current=this._index<this._source.length?this._source[this._index]:null},e}(),S=function(){function e(e,t,n){this.lineChanges=e,this.originalForeignVZ=t,this.modifiedForeignVZ=n}return e.prototype.getViewZones=function(){var e,t,n,i,r,o,s,a={original:[],modified:[]},u=0,l=0,c=0,d=0,h=0,p=0,f=0,v=function(e,t){return e.afterLineNumber-t.afterLineNumber},_=function(e,t){if(null===t.domNode&&e.length>0){var n=e[e.length-1];if(n.afterLineNumber===t.afterLineNumber&&null===n.domNode)return n.heightInLines+=t.heightInLines,void 0}e.push(t)},b=new E(this.modifiedForeignVZ),w=new E(this.originalForeignVZ);for(e=0,t=this.lineChanges.length;t>=e;e++){for(n=t>e?this.lineChanges[e]:null,null!==n?(c=n.originalStartLineNumber+(n.originalEndLineNumber>0?-1:0),d=n.modifiedStartLineNumber+(n.modifiedEndLineNumber>0?-1:0),l=n.originalEndLineNumber>0?n.originalEndLineNumber-n.originalStartLineNumber+1:0,u=n.modifiedEndLineNumber>0?n.modifiedEndLineNumber-n.modifiedStartLineNumber+1:0,h=Math.max(n.originalStartLineNumber,n.originalEndLineNumber),p=Math.max(n.modifiedStartLineNumber,n.modifiedEndLineNumber)):(c+=1e7+l,d+=1e7+u,h=c,p=d),i=[],r=[];b.current&&b.current.afterLineNumber<=p;)f=b.current.afterLineNumber<=d?c-d+b.current.afterLineNumber:h,i.push({afterLineNumber:f,heightInLines:b.current.heightInLines,domNode:null}),b.advance();for(;w.current&&w.current.afterLineNumber<=h;)f=w.current.afterLineNumber<=c?d-c+w.current.afterLineNumber:p,r.push({afterLineNumber:f,heightInLines:w.current.heightInLines,domNode:null}),w.advance();if(null!==n&&g(n)){var C=this._produceOriginalFromDiff(n,l,u);C&&i.push(C)}if(null!==n&&m(n)){var C=this._produceModifiedFromDiff(n,l,u);C&&r.push(C)}for(o=0,s=0,i=i.sort(v),r=r.sort(v);o<i.length&&s<r.length;){var S=i[o],T=r[s],L=S.afterLineNumber-c,x=T.afterLineNumber-d;x>L?(_(a.original,S),o++):L>x?(_(a.modified,T),s++):S.shouldNotShrink?(_(a.original,S),o++):T.shouldNotShrink?(_(a.modified,T),s++):S.heightInLines>=T.heightInLines?(S.heightInLines-=T.heightInLines,s++):(T.heightInLines-=S.heightInLines,o++)}for(;o<i.length;)_(a.original,i[o]),o++;for(;s<r.length;)_(a.modified,r[s]),s++}var M=function(e){e.domNode||(e.domNode=y())};return a.original.forEach(M),a.modified.forEach(M),a},e.prototype._produceOriginalFromDiff=function(){throw new Error("NotImplemented")},e.prototype._produceModifiedFromDiff=function(){throw new Error("NotImplemented")},e}(),T=function(e){function t(t,n){var i=this;e.call(this,t),this._disableSash=n===!1,this._sashRatio=null,this._sashPosition=null,this._sash=new d.Sash(this._dataSource.getContainerDomNode(),this),this._disableSash&&this._sash.disable(),this._sash.on("start",function(){return i._onSashDragStart()}),this._sash.on("change",function(e){return i._onSashDrag(e)}),this._sash.on("end",function(){return i._onSashDragEnd()})}return __extends(t,e),t.prototype.dispose=function(){this._sash.dispose()},t.prototype.setEnableSplitViewResizing=function(e){var t=e===!1;this._disableSash!==t&&(this._disableSash=t,this._disableSash?this._sash.disable():this._sash.enable())},t.prototype.layout=function(e){void 0===e&&(e=this._sashRatio);var n=this._dataSource.getWidth(),i=n-w.ENTIRE_DIFF_OVERVIEW_WIDTH,r=Math.floor((e||.5)*i),o=Math.floor(.5*i),r=this._disableSash?o:r||o;return i>2*t.MINIMUM_EDITOR_WIDTH?(r<t.MINIMUM_EDITOR_WIDTH&&(r=t.MINIMUM_EDITOR_WIDTH),r>i-t.MINIMUM_EDITOR_WIDTH&&(r=i-t.MINIMUM_EDITOR_WIDTH)):r=o,this._sashPosition!==r&&(this._sashPosition=r,this._sash.layout()),this._sashPosition},t.prototype._onSashDragStart=function(){this._startSashPosition=this._sashPosition},t.prototype._onSashDrag=function(e){var t=this._dataSource.getWidth(),n=t-w.ENTIRE_DIFF_OVERVIEW_WIDTH,i=this.layout((this._startSashPosition+(e.currentX-e.startX))/n);this._sashRatio=i/n,this._dataSource.relayoutEditors()},t.prototype._onSashDragEnd=function(){this._sash.layout()},t.prototype.getVerticalSashTop=function(){return 0},t.prototype.getVerticalSashLeft=function(){return this._sashPosition},t.prototype.getVerticalSashHeight=function(){return this._dataSource.getHeight()},t.prototype._getViewZones=function(e,t,n){var i=new L(e,t,n);return i.getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,n){var i,r,o,s,a,u,l,d,h,p={decorations:[],overviewZones:[]},f=n.getModel();for(i=0,r=e.length;r>i;i++)if(a=e[i],m(a)&&(p.decorations.push(v(a.originalStartLineNumber,1,a.originalEndLineNumber,Number.MAX_VALUE,"line-delete",!0)),g(a)&&a.charChanges||p.decorations.push(v(a.originalStartLineNumber,1,a.originalEndLineNumber,Number.MAX_VALUE,"char-delete",!0)),p.overviewZones.push({startLineNumber:a.originalStartLineNumber,endLineNumber:a.originalEndLineNumber,color:"rgba(255, 0, 0, 0.4)",position:c.OverviewRulerLane.Full}),a.charChanges))for(o=0,s=a.charChanges.length;s>o;o++)if(u=a.charChanges[o],m(u))if(t)for(l=u.originalStartLineNumber;l<=u.originalEndLineNumber;l++)d=l===u.originalStartLineNumber?u.originalStartColumn:f.getLineFirstNonWhitespaceColumn(l),h=l===u.originalEndLineNumber?u.originalEndColumn:f.getLineLastNonWhitespaceColumn(l),p.decorations.push(v(l,d,l,h,"char-delete",!1));else p.decorations.push(v(u.originalStartLineNumber,u.originalStartColumn,u.originalEndLineNumber,u.originalEndColumn,"char-delete",!1));return p},t.prototype._getModifiedEditorDecorations=function(e,t,n,i){var r,o,s,a,u,l,d,h,p,f={decorations:[],overviewZones:[]},y=i.getModel();for(r=0,o=e.length;o>r;r++)if(u=e[r],g(u)&&(f.decorations.push(v(u.modifiedStartLineNumber,1,u.modifiedEndLineNumber,Number.MAX_VALUE,"line-insert",!0)),m(u)&&u.charChanges||f.decorations.push(v(u.modifiedStartLineNumber,1,u.modifiedEndLineNumber,Number.MAX_VALUE,"char-insert",!0)),f.overviewZones.push({startLineNumber:u.modifiedStartLineNumber,endLineNumber:u.modifiedEndLineNumber,color:"rgba(155, 185, 85, 0.4)",position:c.OverviewRulerLane.Full}),u.charChanges))for(s=0,a=u.charChanges.length;a>s;s++)if(l=u.charChanges[s],g(l))if(t)for(d=l.modifiedStartLineNumber;d<=l.modifiedEndLineNumber;d++)h=d===l.modifiedStartLineNumber?l.modifiedStartColumn:y.getLineFirstNonWhitespaceColumn(d),p=d===l.modifiedEndLineNumber?l.modifiedEndColumn:y.getLineLastNonWhitespaceColumn(d),f.decorations.push(v(d,h,d,p,"char-insert",!1));else f.decorations.push(v(l.modifiedStartLineNumber,l.modifiedStartColumn,l.modifiedEndLineNumber,l.modifiedEndColumn,"char-insert",!1));return f},t.MINIMUM_EDITOR_WIDTH=100,t}(C),L=function(e){function t(t,n,i){e.call(this,t,n,i)}return __extends(t,e),t.prototype._produceOriginalFromDiff=function(e,t,n){return n>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:n-t,domNode:null}:null},t.prototype._produceModifiedFromDiff=function(e,t,n){return t>n?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-n,domNode:null}:null},t}(S),x=function(e){function t(t){var n=this;e.call(this,t),this.decorationsLeft=40,this.toDispose=[],this.toDispose.push(t.getOriginalEditor().addListener2(r.EventType.EditorLayout,function(e){n.decorationsLeft!==e.decorationsLeft&&(n.decorationsLeft=e.decorationsLeft,t.relayoutEditors())}))}return __extends(t,e),t.prototype.dispose=function(){this.toDispose=i.disposeAll(this.toDispose)},t.prototype.setEnableSplitViewResizing=function(){},t.prototype._getViewZones=function(e,t,n,i,r){var o=new M(e,t,n,i,r);return o.getViewZones()},t.prototype._getOriginalEditorDecorations=function(e){var t,n,i,r={decorations:[],overviewZones:[]};for(t=0,n=e.length;n>t;t++)i=e[t],m(i)&&r.overviewZones.push({startLineNumber:i.originalStartLineNumber,endLineNumber:i.originalEndLineNumber,color:"rgba(255, 0, 0, 0.4)",position:c.OverviewRulerLane.Full});return r},t.prototype._getModifiedEditorDecorations=function(e,t,n,i){var r,o,s,a,u,l,d,h,p,f={decorations:[],overviewZones:[]},m=i.getModel();for(r=0,o=e.length;o>r;r++)if(s=e[r],g(s))if(f.decorations.push(v(s.modifiedStartLineNumber,1,s.modifiedEndLineNumber,Number.MAX_VALUE,"line-insert",!0)),f.overviewZones.push({startLineNumber:s.modifiedStartLineNumber,endLineNumber:s.modifiedEndLineNumber,color:"rgba(155, 185, 85, 0.4)",position:c.OverviewRulerLane.Full}),s.charChanges){for(a=0,u=s.charChanges.length;u>a;a++)if(l=s.charChanges[a],g(l))if(t)for(d=l.modifiedStartLineNumber;d<=l.modifiedEndLineNumber;d++)h=d===l.modifiedStartLineNumber?l.modifiedStartColumn:m.getLineFirstNonWhitespaceColumn(d),p=d===l.modifiedEndLineNumber?l.modifiedEndColumn:m.getLineLastNonWhitespaceColumn(d),f.decorations.push(v(d,h,d,p,"char-insert",!1));else f.decorations.push(v(l.modifiedStartLineNumber,l.modifiedStartColumn,l.modifiedEndLineNumber,l.modifiedEndColumn,"char-insert",!1))}else f.decorations.push(v(s.modifiedStartLineNumber,1,s.modifiedEndLineNumber,Number.MAX_VALUE,"char-insert",!0));return f},t.prototype.layout=function(){return Math.max(5,this.decorationsLeft)},t}(C),M=function(e){function t(t,n,i,r,o){e.call(this,t,n,i),this.originalModel=r.getModel(),this.modifiedEditorConfiguration=o.getConfiguration(),this.modifiedEditorIndentation=o.getIndentationOptions()}return __extends(t,e),t.prototype._produceOriginalFromDiff=function(e,t,n){return{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:n,domNode:document.createElement("div")}},t.prototype._produceModifiedFromDiff=function(e,t){var n,i,r,o,s=[];if(e.charChanges)for(n=0,i=e.charChanges.length;i>n;n++)r=e.charChanges[n],m(r)&&(o=v(r.originalStartLineNumber,r.originalStartColumn,r.originalEndLineNumber,r.originalEndColumn,"char-delete",!1),o.options.inlineClassName=o.options.className,s.push(o));var a,u=[];for(a=e.originalStartLineNumber;a<=e.originalEndLineNumber;a++)u=u.concat(this.renderOriginalLine(a-e.originalStartLineNumber,this.originalModel,this.modifiedEditorConfiguration,this.modifiedEditorIndentation,a,s));var l=document.createElement("div");return l.className="view-lines line-delete",l.innerHTML=u.join(""),{shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,domNode:l}},t.prototype.renderOriginalLine=function(e,t,n,i,r,o){var s,a,u=t.getLineContent(r);s={getTokens:function(){return[{startIndex:0,type:""}]},getTextLength:function(){return u.length},equals:function(){return!1},findIndexOfOffset:function(){return 0}},a=p.createLineParts(r,u,s,o,n.renderWhitespace);var l=h.renderLine({lineContent:u,tabSize:i.tabSize,stopRenderingLineAfter:n.stopRenderingLineAfter,renderWhitespace:n.renderWhitespace,parts:a.getParts()}),c=[];return c.push('<div class="view-line'),0===o.length&&c.push(" char-delete"),c.push('" style="top:'),c.push(String(e*n.lineHeight)),c.push('px;width:1000000px;">'),c=c.concat(l.output),c.push("</div>"),c
},t}(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/languages/plaintext/plaintext",["require","exports","vs/editor/modes/supports","vs/editor/modes/modesExtensions"],function(e,t,n,i){var r=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.makeClone=function(){return this},t.prototype.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n):!1},t.prototype.tokenize=function(e){return e.advanceToEOS(),{type:""}},t}(i.AbstractState),o=function(e){function t(t,i){var o=this;e.call(this,t,i),this.tokenizationSupport=new n.TokenizationSupport(this,{getInitialState:function(){return new r(o)}},!1)}return __extends(t,e),t}(i.AbstractMode);t.Mode=o}),define("vs/editor/modes/autoIndentation/autoIndentation",["require","exports","vs/editor/modes/modes","vs/base/strings"],function(e,t,n,i){var r=function(){function e(e){this.brackets=e}return e.prototype.getElectricBrackets=function(){for(var e,t=[],n=0;n<this.brackets.length;n++)e=this.brackets[n],e.isElectric&&t.push(e.close);return t},e.prototype.onEnter=function(e,t){if(0===e.getTokenCount())return null;for(var i=e.findIndexOfOffset(t-1),r=i;r>0&&""===e.getTokenType(r);)r--;if(!this.tokenTypeIsBracket(e.getTokenType(r))||e.getTokenBracket(r)!==n.Bracket.Open)return null;for(var o=i+1;o<e.getTokenCount()&&""===e.getTokenType(o);)o++;return o<e.getTokenCount()&&e.getTokenType(o)===e.getTokenType(r)&&e.getTokenBracket(o)===n.Bracket.Close?{indentAction:n.IndentAction.IndentOutdent}:{indentAction:n.IndentAction.Indent}},e.prototype.onElectricCharacter=function(e,t){if(0===e.getTokenCount())return null;var n=e.getLineContent(),r=i.firstNonWhitespaceIndex(n);return-1!==r&&t>r?null:{matchBracketType:this.tokenTypeFromChar(n[t])}},e.prototype.tokenTypeFromChar=function(e){for(var t,n=0;n<this.brackets.length;n++)if(t=this.brackets[n],e===t.open||e===t.close)return t.tokenType;return null},e.prototype.bracketTypeFromChar=function(e){for(var t,i=0;i<this.brackets.length;i++){if(t=this.brackets[i],e===t.open)return n.Bracket.Open;if(e===t.close)return n.Bracket.Close}return null},e.prototype.tokenTypeIsBracket=function(e){for(var t=0;t<this.brackets.length;t++)if(e===this.brackets[t].tokenType)return!0;return!1},e.prototype.characterIsBracket=function(e){for(var t,n=0;n<this.brackets.length;n++)if(t=this.brackets[n],e===t.open||e===t.close)return!0;return!1},e}();t.Brackets=r}),define("vs/editor/modes/monarch/monarchTypes",["require","exports"],function(){}),define("vs/base/json",["require","exports"],function(e,t){function n(e,t){function n(t,n){for(var i=0,r=0;t>i||!n;){var o=e.charCodeAt(f);if(o>=c._0&&o<=c._9)r=16*r+o-c._0;else if(o>=c.A&&o<=c.F)r=16*r+o-c.A+10;else{if(!(o>=c.a&&o<=c.f))break;r=16*r+o-c.a+10}f++,i++}return t>i&&(r=-1),r}function a(){var t=f;if(e.charCodeAt(f)===c._0)f++;else for(f++;f<e.length&&o(e.charCodeAt(f));)f++;if(f<e.length&&e.charCodeAt(f)===c.dot){if(f++,!(f<e.length&&o(e.charCodeAt(f))))return _=u.UnexpectedEndOfNumber,e.substring(t,n);for(f++;f<e.length&&o(e.charCodeAt(f));)f++}var n=f;if(f<e.length&&(e.charCodeAt(f)===c.E||e.charCodeAt(f)===c.e))if(f++,(f<e.length&&e.charCodeAt(f)===c.plus||e.charCodeAt(f)===c.minus)&&f++,f<e.length&&o(e.charCodeAt(f))){for(f++;f<e.length&&o(e.charCodeAt(f));)f++;n=f}else _=u.UnexpectedEndOfNumber;return e.substring(t,n)}function d(){for(var t="",i=f;;){if(f>=g){t+=e.substring(i,f),_=u.UnexpectedEndOfString;break}var o=e.charCodeAt(f);if(o===c.doubleQuote){t+=e.substring(i,f),f++;break}if(o!==c.backslash){if(r(o)){t+=e.substring(i,f),_=u.UnexpectedEndOfString;break}f++}else{if(t+=e.substring(i,f),f++,f>=g){_=u.UnexpectedEndOfString;break}switch(o=e.charCodeAt(f++)){case c.doubleQuote:t+='"';break;case c.backslash:t+="\\";break;case c.slash:t+="/";break;case c.b:t+="\b";break;case c.f:t+="\f";break;case c.n:t+="\n";break;case c.r:t+="\r";break;case c.t:t+="	";break;case c.u:var o=n(4,!0);o>=0?t+=String.fromCharCode(o):_=u.InvalidUnicode;break;default:_=u.InvalidEscapeCharacter}i=f}}return t}function h(){if(m="",_=u.None,v=f,f>=g)return v=g,y=l.EOF;var t=e.charCodeAt(f);if(i(t)||r(t)){do f++,m+=String.fromCharCode(t),t=e.charCodeAt(f);while(i(t)||r(t));return y=l.Trivia}switch(t){case c.openBrace:return f++,y=l.OpenBraceToken;case c.closeBrace:return f++,y=l.CloseBraceToken;case c.openBracket:return f++,y=l.OpenBracketToken;case c.closeBracket:return f++,y=l.CloseBracketToken;case c.colon:return f++,y=l.ColonToken;case c.comma:return f++,y=l.CommaToken;case c.doubleQuote:return f++,m=d(),y=l.StringLiteral;case c.slash:var n=f-1;if(e.charCodeAt(f+1)===c.slash){for(f+=2;g>f&&!r(e.charCodeAt(f));)f++;return m=e.substring(n,f),y=l.LineCommentTrivia}if(e.charCodeAt(f+1)===c.asterisk){f+=2;for(var h=g-1,p=!1;h>f;){var b=e.charCodeAt(f);if(b===c.asterisk&&e.charCodeAt(f+1)===c.slash){f+=2,p=!0;break}f++}return p||(f++,_=u.UnexpectedEndOfComment),m=e.substring(n,f),y=l.BlockCommentTrivia}return m+=String.fromCharCode(t),f++,y=l.Unknown;case c.minus:if(m+=String.fromCharCode(t),f++,f===g||!o(e.charCodeAt(f)))return y=l.Unknown;case c._0:case c._1:case c._2:case c._3:case c._4:case c._5:case c._6:case c._7:case c._8:case c._9:return m+=a(),y=l.NumericLiteral;default:for(;g>f&&s(t);)f++,t=e.charCodeAt(f);if(v!==f){switch(m=e.substring(v,f)){case"true":return y=l.TrueKeyword;case"false":return y=l.FalseKeyword;case"null":return y=l.NullKeyword}return y=l.Unknown}return m+=String.fromCharCode(t),f++,y=l.Unknown}}function p(){var e;do e=h();while(e===l.Trivia||e===l.LineCommentTrivia||e===l.BlockCommentTrivia);return e}void 0===t&&(t=!1);var f=0,g=e.length,m="",v=0,y=l.Unknown,_=u.None;return{getPosition:function(){return f},scan:t?p:h,getToken:function(){return y},getTokenValue:function(){return m},getTokenOffset:function(){return v},getTokenLength:function(){return f-v},getTokenError:function(){return _}}}function i(e){return e===c.space||e===c.tab||e===c.verticalTab||e===c.formFeed||e===c.nonBreakingSpace||e===c.ogham||e>=c.enQuad&&e<=c.zeroWidthSpace||e===c.narrowNoBreakSpace||e===c.mathematicalSpace||e===c.ideographicSpace||e===c.byteOrderMark}function r(e){return e===c.lineFeed||e===c.carriageReturn||e===c.lineSeparator||e===c.paragraphSeparator}function o(e){return e>=c._0&&e<=c._9}function s(e){return e>=c.a&&e<=c.z||e>=c.A&&e<=c.Z}function a(e,t){var i,r,o=n(e),s=[],a=0;do switch(r=o.getPosition(),i=o.scan()){case l.LineCommentTrivia:case l.BlockCommentTrivia:case l.EOF:a!==r&&s.push(e.substring(a,r)),void 0!==t&&s.push(o.getTokenValue().replace(/[^\r\n]/g,t)),a=o.getPosition()}while(i!==l.EOF);return s.join("")}!function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter"}(t.ScanError||(t.ScanError={}));var u=t.ScanError;!function(e){e[e.Unknown=0]="Unknown",e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.Trivia=14]="Trivia",e[e.EOF=15]="EOF"}(t.SyntaxKind||(t.SyntaxKind={}));var l=t.SyntaxKind;t.createScanner=n,t.isLetter=s;var c;!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.mathematicalSpace=8287]="mathematicalSpace",e[e.ogham=5760]="ogham",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",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.j=106]="j",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.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",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"}(c||(c={})),t.stripComments=a}),require.config({ignoreDuplicateModules:["vs/languages/javascript/jsdoc","vs/languages/typescript/features/tokenization","vs/languages/typescript/typescript","vs/languages/typescript/typescriptMode","vs/languages/typescript/typescript.configuration","vs/languages/javascript/javascript.configuration","vs/languages/javascript/javascript.extensions","vs/base/severity","vs/base/paths","vs/base/uuid","vs/base/trie","vs/base/callbackList","vs/base/eventSource","vs/languages/csharp/features/tokenization","vs/languages/lib/htmlLib","vs/languages/lib/beautify-html","vs/platform/configuration/configurationRegistry","vs/languages/csharp/csharp.extensions","vs/base/lifecycle"]}),define("vs/editor/languages.common",["./modes/modesExtensions","vs/languages/plaintext/plaintext","./modes/autoIndentation/autoIndentation","vs/editor/core/constants","./modes/monarch/monarchTypes","./modes/monarch/monarchCommon","./modes/monarch/monarchCompile","./modes/monarch/monarch","vs/base/json"],function(){}),define("vs/base/severity",["require","exports","vs/nls!vs/editor/editor.main","vs/base/strings"],function(e,t,n,i){var r;!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(r||(r={}));var r;return function(e){function t(t){return t?i.equalsIgnoreCase(s,t)?e.Error:i.equalsIgnoreCase(a,t)||i.equalsIgnoreCase(u,t)?e.Warning:i.equalsIgnoreCase(l,t)?e.Info:e.Ignore:e.Ignore}function r(t){switch(t){case e.Error:return n.localize("vs_base_severity",0);case e.Warning:return n.localize("vs_base_severity",1);case e.Info:return n.localize("vs_base_severity",2)}return i.empty}function o(e,t){return t-e}var s="error",a="warning",u="warn",l="info";e.fromValue=t,e.toString=r,e.compare=o}(r||(r={})),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/standalone/simpleServices",["require","exports","vs/base/lib/winjs.base","vs/platform/services","vs/base/errors","vs/base/types","vs/editor/core/constants","vs/base/network","vs/base/eventEmitter","vs/base/severity"],function(e,t,n,i,r,o,s,a,u,l){var c=function(){function e(e){this._widget=e}return e.prototype.getId=function(){return"editor"},e.prototype.getControl=function(){return this._widget},e.prototype.getSelection=function(){return this._widget.getSelection()},e.prototype.focus=function(){this._widget.focus()},e.prototype.withTypedEditor=function(e,t){return this._widget.getEditorType()===s.EditorType.ICodeEditor?e(this._widget):t(this._widget)},e}();t.SimpleEditor=c;var d=function(e){function t(t){e.call(this),this.model=t}return __extends(t,e),Object.defineProperty(t.prototype,"textEditorModel",{get:function(){return this.model},enumerable:!0,configurable:!0}),t}(u.EventEmitter);t.SimpleModel=d;var h=function(){function e(){this.openEditorDelegate=null}return e.prototype.setEditor=function(e){this.editor=new c(e)},e.prototype.setOpenEditorDelegate=function(e){this.openEditorDelegate=e},e.prototype.openEditor=function(e){var t=this;return n.TPromise.as(this.editor.withTypedEditor(function(n){return t.doOpenEditor(n,e)},function(n){return t.doOpenEditor(n.getOriginalEditor(),e)||t.doOpenEditor(n.getModifiedEditor(),e)}))},e.prototype.doOpenEditor=function(e,t){var n=this.findModel(e,t);if(!n){if(t.resource){if(this.openEditorDelegate)return this.openEditorDelegate(t.resource.toString()),null;var i=t.resource.scheme;if(i===a.schemas.http||i===a.schemas.https)return window.open(t.resource.toString()),this.editor}return null}var r=t.options.selection;return r&&(o.isUndefinedOrNull(r.endLineNumber)||o.isUndefinedOrNull(r.endColumn)?e.setPosition({lineNumber:r.startLineNumber,column:r.startColumn},!0,!0,!0):e.setSelection(r,!0,!0,!0)),this.editor},e.prototype.findModel=function(e,t){var n=e.getModel();return n.getAssociatedResource().equals(t.resource)?n:null},e.prototype.resolveEditorModel=function(e){var t,i=this;return t=this.editor.withTypedEditor(function(t){return i.findModel(t,e)},function(t){return i.findModel(t.getOriginalEditor(),e)||i.findModel(t.getModifiedEditor(),e)}),t?n.Promise.as(new d(t)):n.Promise.as(null)},e}();t.SimpleEditorService=h;var p=function(){function e(){}return e.prototype.show=function(t,n){switch(t){case l.Error:console.error(r.toErrorMessage(n,!0));break;case l.Warning:console.warn(n);break;default:console.log(n)}return e.Empty},e.prototype.hideAll=function(){},e.prototype.confirm=function(e){var t=e.message;return e.detail&&(t=t+"\n\n"+e.detail),window.confirm(t)},e.Empty=function(){},e}();t.SimpleMessageService=p;var f=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.getPath=function(e,t){return t.toExternal()},t}(i.BaseRequestService);t.SimpleEditorRequestService=f}),define("vs/editor/core/model/modelLine",["require","exports","vs/editor/editor","vs/base/strings"],function(e,t,n,i){function r(e,t,n){return 0===n?p.INSTANCE:!t||0===t.length||1===t.length&&0===t[0].startIndex&&""===t[0].type&&!t[0].bracket?f.INSTANCE:new h(e,t)}function o(e,t,n){return 0===n?p.INSTANCE:!t||0===t.length||1===t.length&&0===t[0]?f.INSTANCE:new h(e,t)}function s(e,t){return t&&0!==t.length?1===t.length&&0===t[0].startIndex?t[0].mode===e?g.INSTANCE:new m(t[0].mode):new v(t):g.INSTANCE}var a=function(){function e(e,t){this.lineNumber=e,this.text=t,this.isInvalid=!1,this._recreateLineTokens(null,null),this._recreateModeTransitions(null,null)}return e.prototype.setState=function(e){this._state=e},e.prototype.getState=function(){return this._state||null},e.prototype._setLineTokens=function(e){("undefined"!=typeof this._lineTokens||e!==p.INSTANCE&&e!==f.INSTANCE)&&(this._lineTokens=e)},e.prototype.getTokens=function(){return this._lineTokens?this._lineTokens:0===this.text.length?p.INSTANCE:f.INSTANCE},e.prototype.getModeTransitions=function(){return this._modeTransitions?this._modeTransitions:g.INSTANCE},e.prototype._recreateLineTokens=function(e,t){this._setLineTokens(r(e,t,this.text.length))},e.prototype._recreateLineTokens2=function(e,t){this._setLineTokens(o(e,t,this.text.length))},e.prototype._setModeTransitions=function(e){("undefined"!=typeof this._modeTransitions||e!==g.INSTANCE)&&(this._modeTransitions=e)},e.prototype._recreateModeTransitions=function(e,t){this._setModeTransitions(s(e,t))},e.prototype.insertText=function(e,t,i,r){var o=this.text,s=o.length+1,a=this.getTokens(),u=a.getBinaryEncodedTokens(),l=a instanceof h,c=i.text.length;t=Math.max(1,t),t=Math.min(t,s);var d,p;if(c>0){var f=o.substring(0,t-1)+i.text+o.substring(t-1,o.length);if(l){var g,m,v,y,_,b,w=n.LineTokensBinaryEncoding;for(d=0,p=u.length;p>d;d++)g=u[d],m=g/w.START_INDEX_OFFSET&w.START_INDEX_MASK,m>=t-1&&m>0&&(_=g/w.TYPE_OFFSET&w.TYPE_MASK,b=g/w.BRACKET_OFFSET&w.BRACKET_MASK,y=m+c,v=b*w.BRACKET_OFFSET+_*w.TYPE_OFFSET+y*w.START_INDEX_OFFSET,u[d]=v)}if(this._markers){var C;for(d=0,p=this._markers.length;p>d;d++)C=this._markers[d],(C.column>t||C.column===t&&(r||!C.stickToPreviousCharacter))&&(e[C.id]=!0,C.oldLineNumber=C.oldLineNumber||this.lineNumber,C.oldColumn=C.oldColumn||C.column,C.column+=c)}this.text=f,this._recreateLineTokens2(a.getBinaryEncodedTokensMap(),u)}if(i.markers&&(p=i.markers.length,p>0))for(this._markers||(this._markers=[]),d=0;p>d;d++)C=i.markers[d],e[C.id]=!0,C.oldLineNumber=C.oldLineNumber||this.lineNumber,C.oldColumn=C.oldColumn||C.column,C.line=this,C.column+=t-1,this._markers.push(C)},e.prototype.removeText=function(e,t,i,r,o){var s=i,a="",u=[],l=this.text,c=l.length+1,d=this.getTokens(),p=d.getBinaryEncodedTokens(),f=d instanceof h;t=Math.max(1,t),i=Math.max(1,i),t=Math.min(t,c),i=Math.min(i,c);var g;if(i>t&&i>1&&c>t){a=l.substring(t-1,i-1);var m=l.substring(0,t-1)+l.substring(i-1,l.length);if(f){var v,y,_,b,w,C,E,S=n.LineTokensBinaryEncoding;for(g=0;g<p.length;g++)v=p[g],y=v/S.START_INDEX_OFFSET&S.START_INDEX_MASK,b=y,y>=i-1?b=y-a.length:y>=t-1&&(b=t-1),b>=m.length?(p.splice(g,1),g--):(w=v/S.TYPE_OFFSET&S.TYPE_MASK,C=v/S.BRACKET_OFFSET&S.BRACKET_MASK,_=C*S.BRACKET_OFFSET+w*S.TYPE_OFFSET+b*S.START_INDEX_OFFSET,p[g]=_,g>0&&(E=p[g-1]/S.START_INDEX_OFFSET&S.START_INDEX_MASK,E>=b&&(p.splice(g-1,1),g--)))}this.text=m,this._recreateLineTokens2(d.getBinaryEncodedTokensMap(),p)}if(this._markers){var T;for(g=0;g<this._markers.length;g++)T=this._markers[g],T.column>s||T.column===s&&(o||!T.stickToPreviousCharacter)?(e[T.id]=!0,T.oldLineNumber=T.oldLineNumber||this.lineNumber,T.oldColumn=T.oldColumn||T.column,T.column-=a.length):(T.column>t||T.column===t&&(o||!T.stickToPreviousCharacter))&&(e[T.id]=!0,T.oldLineNumber=T.oldLineNumber||this.lineNumber,T.oldColumn=T.oldColumn||T.column,r?(T.line=null,T.column-=t-1,this._markers.splice(g,1),g--,u.push(T)):T.column=t)}return{text:a,markers:u}},e.prototype.addMarker=function(e){e.line=this,this._markers?this._markers.push(e):this._markers=[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?this._markers.concat(e):e.slice(0)},e.prototype.removeMarker=function(e){var t=this._indexOfMarkerId(e.id);t>=0&&this._markers.splice(t,1),e.line=null},e.prototype.getMarkers=function(){return this._markers?this._markers.slice(0):[]},e.prototype.updateLineNumber=function(e,t){if(this._markers){var n,i,r,o=this._markers;for(n=0,i=o.length;i>n;n++)r=o[n],e[r.id]=!0,r.oldLineNumber=r.oldLineNumber||this.lineNumber}this.lineNumber=t},e.prototype.deleteLine=function(e,t,n){if(this._markers){var i,r,o,s=this._markers;for(i=0,r=s.length;r>i;i++)o=s[i],e[o.id]=!0,o.oldColumn=o.oldColumn||o.column,o.oldLineNumber=o.oldLineNumber||n,o.column=t;return s}return[]},e.prototype._indexOfMarkerId=function(e){if(this._markers){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,t,n,i){this._recreateLineTokens(e,t),this._recreateModeTransitions(n,i)},e}();t.ModelLine=a;var u=n.LineTokensBinaryEncoding.getStartIndex,l=n.LineTokensBinaryEncoding.getType,c=n.LineTokensBinaryEncoding.getBracket,d=n.LineTokensBinaryEncoding.findIndexOfOffset,h=function(){function e(e,t){this.map=e,this._tokens="number"==typeof t[0]?t:n.LineTokensBinaryEncoding.deflateArr(e,t)}return e.prototype.getBinaryEncodedTokensMap=function(){return this.map},e.prototype.getBinaryEncodedTokens=function(){return this._tokens},e.prototype.getTokenCount=function(){return this._tokens.length},e.prototype.getTokenStartIndex=function(e){return u(this._tokens[e])},e.prototype.getTokenType=function(e){return l(this.map,this._tokens[e])},e.prototype.getTokenBracket=function(e){return c(this._tokens[e])},e.prototype.getTokenEndIndex=function(e,t){return e+1<this._tokens.length?u(this._tokens[e+1]):t},e.prototype.equals=function(e){return this===e},e.prototype.findIndexOfOffset=function(e){return d(this._tokens,e)},e}();t.LineTokens=h;var p=function(){function e(){}return e.prototype.getBinaryEncodedTokens=function(){return e.TOKENS},e.prototype.getBinaryEncodedTokensMap=function(){return null},e.prototype.getTokenCount=function(){return 0},e.prototype.getTokenStartIndex=function(){return 0},e.prototype.getTokenType=function(){return i.empty},e.prototype.getTokenBracket=function(){return 0},e.prototype.getTokenEndIndex=function(){return 0},e.prototype.equals=function(e){return e===this},e.prototype.findIndexOfOffset=function(){return 0},e.INSTANCE=new e,e.TOKENS=[],e}(),f=function(){function e(){}return e.prototype.getBinaryEncodedTokensMap=function(){return null},e.prototype.getBinaryEncodedTokens=function(){return e.TOKENS},e.prototype.getTokenCount=function(){return 1},e.prototype.getTokenStartIndex=function(){return 0},e.prototype.getTokenType=function(){return i.empty},e.prototype.getTokenBracket=function(){return 0},e.prototype.getTokenEndIndex=function(e,t){return t},e.prototype.equals=function(e){return this===e},e.prototype.findIndexOfOffset=function(){return 0},e.INSTANCE=new e,e.TOKENS=[0],e}();t.DefaultLineTokens=f;var g=function(){function e(){}return e.prototype.toArray=function(e){return[{startIndex:0,mode:e}]},e.INSTANCE=new e,e}(),m=function(){function e(e){this._mode=e}return e.prototype.toArray=function(){return[{startIndex:0,mode:this._mode}]},e}(),v=function(){function e(e){this._modeTransitions=e}return e.prototype.toArray=function(){return this._modeTransitions.slice(0)},e}()});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=" ".charCodeAt(0),d="	".charCodeAt(0),h=999,p=function(e){function t(t,n){t.push(u.EventType.ModelContentChanged),e.call(this,t),this._constructLines(n),this._setVersionId(1),this._isDisposed=!1}return __extends(t,e),t.prototype.getVersionId=function(){if(this._isDisposed)throw new Error("TextModel.getVersionId: Model is disposed");return this._versionId},t.prototype.getAlternativeVersionId=function(){if(this._isDisposed)throw new Error("TextModel.getAlternativeVersionId: Model is disposed");return this._alternativeVersionId},t.prototype._increaseVersionId=function(){this._setVersionId(this._versionId+1)},t.prototype._setVersionId=function(e){this._versionId=e,this._alternativeVersionId=this._versionId},t.prototype._overwriteAlternativeVersionId=function(e){this._alternativeVersionId=e},t.prototype.isDisposed=function(){return this._isDisposed},t.prototype.dispose=function(){if(this._isDisposed)throw new Error("TextModel.dispose: Model is disposed");this._isDisposed=!0,this._lines=null,this._EOL=null,this._BOM=null,e.prototype.dispose.call(this)},t.prototype._createContentChangedFlushEvent=function(){return{changeType:u.EventType.ModelContentChangedFlush,detail:null,versionId:-1,isUndoing:!1,isRedoing:!1}},t.prototype._emitContentChanged2=function(e,t,n,i,r,o,s,l){var c={range:new a.Range(e,t,n,i),rangeLength:r,text:o,versionId:this.getVersionId(),isUndoing:s,isRedoing:l};this.emit(u.EventType.ModelContentChanged2,c)},t.prototype._resetValue=function(e,n){this._constructLines(t.toRawText(n)),this._increaseVersionId(),e.detail=this.toRawText(),e.versionId=this._versionId},t.prototype.toRawText=function(){return{BOM:this._BOM,EOL:this._EOL,lines:this.getLinesContent()}},t.prototype.setValue=function(e){if(this._isDisposed)throw new Error("TextModel.setValue: Model is disposed");if(null!==e){var t=this.getFullModelRange(),n=this.getValueLengthInRange(t),i=this.getLineCount(),r=this.getLineMaxColumn(i),o=this._createContentChangedFlushEvent();this._resetValue(o,e),this._emitModelContentChangedFlushEvent(o),this._emitContentChanged2(1,1,i,r,n,this.getValue(),!1,!1)}},t.prototype.getValue=function(e,t){if(void 0===t&&(t=!1),this._isDisposed)throw new Error("TextModel.getValue: Model is disposed");var n=this.getFullModelRange(),i=this.getValueInRange(n,e);return t?this._BOM+i:i},t.prototype.getEmptiedValueInRange=function(e,t,n){if(void 0===t&&(t=""),void 0===n&&(n=i.EndOfLinePreference.TextDefined),this._isDisposed)throw new Error("TextModel.getEmptiedValueInRange: Model is disposed");var r=this.validateRange(e);if(r.isEmpty())return"";if(r.startLineNumber===r.endLineNumber)return this._repeatCharacter(t,r.endColumn-r.startColumn);var o=this._getEndOfLine(n),s=r.startLineNumber-1,a=r.endLineNumber-1,u=[];u.push(this._repeatCharacter(t,this._lines[s].text.length-r.startColumn+1));for(var l=s+1;a>l;l++)u.push(this._repeatCharacter(t,this._lines[l].text.length));return u.push(this._repeatCharacter(t,r.endColumn-1)),u.join(o)},t.prototype._repeatCharacter=function(e,t){for(var n="",i=0;t>i;i++)n+=e;return n},t.prototype.getValueInRange=function(e,t){if(void 0===t&&(t=i.EndOfLinePreference.TextDefined),this._isDisposed)throw new Error("TextModel.getValueInRange: Model is disposed");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),o=n.startLineNumber-1,s=n.endLineNumber-1,a=[];a.push(this._lines[o].text.substring(n.startColumn-1));for(var u=o+1;s>u;u++)a.push(this._lines[u].text);return a.push(this._lines[s].text.substring(0,n.endColumn-1)),a.join(r)},t.prototype.getValueLengthInRange=function(e,t){if(void 0===t&&(t=i.EndOfLinePreference.TextDefined),this._isDisposed)throw new Error("TextModel.getValueInRange: Model is disposed");var n=this.validateRange(e);if(n.isEmpty())return 0;if(n.startLineNumber===n.endLineNumber)return n.endColumn-n.startColumn;var r=this._getEndOfLine(t).length,o=n.startLineNumber-1,s=n.endLineNumber-1,a=0;a+=this._lines[o].text.length-n.startColumn+1;for(var u=o+1;s>u;u++)a+=r+this._lines[u].text.length;return a+=r+(n.endColumn-1)},t.prototype.isDominatedByLongLines=function(e){if(this._isDisposed)throw new Error("TextModel.isDominatedByLongLines: Model is disposed");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){if(this._isDisposed)throw new Error("TextModel.guessIndentation: Model is disposed");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(){if(this._isDisposed)throw new Error("TextModel.getLineCount: Model is disposed");return this._lines.length},t.prototype.getLineContent=function(e){if(this._isDisposed)throw new Error("TextModel.getLineContent: Model is disposed");if(1>e||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return this._lines[e-1].text},t.prototype.getLinesContent=function(){if(this._isDisposed)throw new Error("TextModel.getLineContent: Model is disposed");for(var e=[],t=0,n=this._lines.length;n>t;t++)e[t]=this._lines[t].text;return e},t.prototype.getEOL=function(){if(this._isDisposed)throw new Error("TextModel.getEOL: Model is disposed");return this._EOL},t.prototype.getLineMaxColumn=function(e){if(this._isDisposed)throw new Error("TextModel.getLineMaxColumn: Model is disposed");if(1>e||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return this._lines[e-1].text.length+1},t.prototype.getLineFirstNonWhitespaceColumn=function(e){if(this._isDisposed)throw new Error("TextModel.getLineFirstNonWhitespaceColumn: Model is disposed");if(1>e||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");var t=o.firstNonWhitespaceIndex(this._lines[e-1].text);return-1===t?0:t+1},t.prototype.getLineLastNonWhitespaceColumn=function(e){if(this._isDisposed)throw new Error("TextModel.getLineLastNonWhitespaceColumn: Model is disposed");if(1>e||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");var t=o.lastNonWhitespaceIndex(this._lines[e-1].text);return-1===t?0:t+2},t.prototype.validateLineNumber=function(e){if(this._isDisposed)throw new Error("TextModel.validateLineNumber: Model is disposed");return 1>e&&(e=1),e>this._lines.length&&(e=this._lines.length),e},t.prototype.validatePosition=function(e){if(this._isDisposed)throw new Error("TextModel.validatePosition: Model is disposed");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){if(this._isDisposed)throw new Error("TextModel.validateRange: Model is disposed");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(){if(this._isDisposed)throw new Error("TextModel.getFullModelRange: Model is disposed");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.toRawText=function(e){for(var t=0,n=-1;-1!==(n=e.indexOf("\r",n+1));)t++;var i=e.split(/\r\n|\r|\n/),r="";i[0].length>0&&i[0].charCodeAt(0)===l&&(r=String.fromCharCode(l),i[0]=i[0].substr(1));
var o=i.length-1,s="";return s=0===o||t>o/2?"\r\n":"\n",{BOM:r,EOL:s,lines:i}},t.prototype._constructLines=function(e){var t,n,i=e.lines,o=[];for(t=0,n=i.length;n>t;t++)o.push(new r.ModelLine(t+1,i[t]));this._BOM=e.BOM,this._EOL=e.EOL,this._lines=o},t.prototype._getEndOfLine=function(e){switch(e){case i.EndOfLinePreference.LF:return"\n";case i.EndOfLinePreference.CRLF:return"\r\n";case i.EndOfLinePreference.TextDefined:return this.getEOL()}throw new Error("Unknown EOL preference")},t.prototype.findMatches=function(e,t,n,i,r){if(this._isDisposed)throw new Error("Model.findMatches: Model is disposed");if(""===e)return[];var s=null;try{s=o.createRegExp(e,n,i,r)}catch(u){return[]}if(o.regExpLeadsToEndlessLoop(s))return[];var l;return l=a.isIRange(t)?t:this.getFullModelRange(),this._doFindMatches(l,s)},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<e.endLineNumber&&h>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}(n.EventEmitter);t.TextModel=p}),define("vs/editor/core/model/tokenIterator",["require","exports","vs/editor/editor"],function(e,t,n){var i=n.LineTokensBinaryEncoding.getStartIndex,r=n.LineTokensBinaryEncoding.inflate,o=function(){function e(e,t){this._model=e,this._currentLineNumber=t.lineNumber,this._currentTokenIndex=0,this._readLineTokens(this._currentLineNumber),this._next=null,this._prev=null;for(var n=t.column-1,r=Number.MAX_VALUE,o=this._currentTokens.length-1;o>=0;o--){if(i(this._currentTokens[o])<=n&&r>=n){this._currentTokenIndex=o,this._next=this._current(),this._prev=this._current();break}r=i(this._currentTokens[o])}}return e.prototype._readLineTokens=function(e){this._currentLineTokens=this._model.getLineTokens(e,!1),this._currentTokens=this._currentLineTokens.getBinaryEncodedTokens(),this._map=this._currentLineTokens.getBinaryEncodedTokensMap()},e.prototype._advanceNext=function(){if(this._prev=this._next,this._next=null,this._currentTokenIndex+1<this._currentTokens.length)this._currentTokenIndex++,this._next=this._current();else{for(;this._currentLineNumber+1<=this._model.getLineCount();)if(this._currentLineNumber++,this._readLineTokens(this._currentLineNumber),this._currentTokens.length>0){this._currentTokenIndex=0,this._next=this._current();break}null===this._next&&(this._readLineTokens(this._currentLineNumber),this._currentTokenIndex=this._currentTokens.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._readLineTokens(this._currentLineNumber),this._currentTokens.length>0){this._currentTokenIndex=this._currentTokens.length-1,this._prev=this._current();break}},e.prototype._current=function(){return{token:r(this._map,this._currentTokens[this._currentTokenIndex]),lineNumber:this._currentLineNumber,startColumn:i(this._currentTokens[this._currentTokenIndex])+1,endColumn:this._currentTokenIndex+1<this._currentTokens.length?i(this._currentTokens[this._currentTokenIndex+1])+1:this._model.getLineContent(this._currentLineNumber).length+1}},e.prototype.hasNext=function(){return null!==this._next},e.prototype.next=function(){var e=this._next;return this._advanceNext(),e},e.prototype.hasPrev=function(){return null!==this._prev},e.prototype.prev=function(){var e=this._prev;return this._advancePrev(),e},e.prototype._invalidate=function(){var e=function(){throw new Error("iteration isn't valid anymore")};this.hasNext=e,this.next=e,this.hasPrev=e,this.prev=e},e}();t.TokenIterator=o}),define("vs/editor/core/model/textModelWithTokensHelpers",["require","exports","vs/editor/editor","vs/editor/modes/nullMode","vs/base/errors","vs/editor/core/range"],function(e,t,n,i,r,o){var s=n.LineTokensBinaryEncoding.getType,a=n.LineTokensBinaryEncoding.getBracket,u=n.LineTokensBinaryEncoding.getStartIndex,l=function(){function e(){}return e.massageWordDefinitionOf=function(e){var t=i.NullMode.DEFAULT_WORD_REGEXP;if(e.tokenTypeClassificationSupport){try{t=e.tokenTypeClassificationSupport.getWordDefinition()}catch(n){r.onUnexpectedError(n)}if(t instanceof RegExp){if(!t.global){var o="g";t.ignoreCase&&(o+="i"),t.multiline&&(o+="m"),t=new RegExp(t.source,o)}}else t=i.NullMode.DEFAULT_WORD_REGEXP}return t.lastIndex=0,t},e.getWords=function(t,n,i,r){if(void 0===r&&(r=!1),r&&!t._lineIsTokenized(n))return e._getWordsInText(t.getLineContent(n),e.massageWordDefinitionOf(t.getMode()));var o,a,l,c,d,h=[],p=t.getLineContent(n),f=t.getLineTokens(n,!1),g=f.getBinaryEncodedTokens(),m=f.getBinaryEncodedTokensMap(),v=t._getLineModeTransitions(n),y={};if(i&&(y=e._getNonWordTokenMap(t)),0!==p.length){var _=0,b=_+1<v.length?v[_+1].startIndex:Number.MAX_VALUE,w=e.massageWordDefinitionOf(v[_].mode);for(o=0,a=0,l=g.length;l>o;o++){if(d=o===l-1?p.length:u(g[o+1]),a>=b&&(_++,b=_+1<v.length?v[_+1].startIndex:Number.MAX_VALUE,w=e.massageWordDefinitionOf(v[_].mode)),!i||!y.hasOwnProperty(s(m,g[o]))){var C,E=p.substring(a,d),S=E.match(w)||[],T=0;for(c=0;c<S.length;c++){var L=S[c].trim();L.length>0&&(C=E.indexOf(L,T),T=C+L.length,h.push({start:a+C,end:a+T}))}}a=d}}return h},e._getWordsInText=function(e,t){var n,i,r,o,s,a,u=e.match(t)||[],l=[];for(n=0;n<u.length;n++)a=u[n].trim(),a.length>0&&(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,n,i,r){if(void 0===r&&(r=!1),r&&!t._lineIsTokenized(n.lineNumber))return e._getWordAtText(n.column,e.massageWordDefinitionOf(t.getMode()),t.getLineContent(n.lineNumber),0);var o=t.getLineTokens(n.lineNumber,!1),a=o.getBinaryEncodedTokens(),l=o.getBinaryEncodedTokensMap(),c=-1,d=-1;if(a.length>0&&(c=o.findIndexOfOffset(n.column-1),c>0&&u(a[c])===n.column-1&&(d=c-1)),i&&(-1!==c||-1!==d)){var h=e._getNonWordTokenMap(t);-1!==c&&h.hasOwnProperty(s(l,a[c]))&&(c=-1),-1!==d&&h.hasOwnProperty(s(l,a[d]))&&(d=-1)}var p,f=e.massageWordDefinitionOf(t.getModeAtPosition(n.lineNumber,n.column)),g=t.getLineContent(n.lineNumber),m=null;return m||-1===c||(p=g.substring(u(a[c]),c+1<a.length?u(a[c+1]):Number.MAX_VALUE),m=e._getWordAtText(n.column,f,p,u(a[c]))),m||-1===d||(p=g.substring(u(a[d]),d+1<a.length?u(a[d+1]):Number.MAX_VALUE),m=e._getWordAtText(n.column,f,p,u(a[d]))),m},e._getWordAtText=function(e,t,n,i){var r,o,s,a,u,l,c=n.match(t)||[];for(r=0;r<c.length;r++)if(l=c[r].trim(),l.length>0&&(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._getNonWordTokenMap=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=l;var c=function(){function e(){}return e._sign=function(e){return 0>e?-1:e>0?1:0},e._findMatchingBracketUp=function(t,n,i,r,l){var c,d,h,p=l;for(c=i;c>=1;c--){var f=t.getLineTokens(c,!1),g=f.getBinaryEncodedTokens(),m=f.getBinaryEncodedTokensMap(),v=t.getLineContent(c);for(h=(c===i?r:g.length)-1;h>=0;h--)if(s(m,g[h])===n&&(p+=e._sign(a(g[h])),0===p))return d=h===g.length-1?v.length:u(g[h+1]),new o.Range(c,u(g[h])+1,c,d+1)}return null},e._findMatchingBracketDown=function(t,n,i,r,l){var c,d,h,p,f,g=1;for(c=i,d=t.getLineCount();d>=c;c++){if(l&&!t._lineIsTokenized(c))return{range:null,isAccurate:!1};var m=t.getLineTokens(c,!1),v=m.getBinaryEncodedTokens(),y=m.getBinaryEncodedTokensMap(),_=t.getLineContent(c);for(p=c===i?r+1:0,f=v.length;f>p;p++)if(s(y,v[p])===n&&(g+=e._sign(a(v[p])),0===g))return h=p===v.length-1?_.length:u(v[p+1]),{range:new o.Range(c,u(v[p])+1,c,h+1),isAccurate:!0}}return{range:null,isAccurate:!0}},e.findMatchingBracketUp=function(t,n,i){var r,o,s,a=i.column-1,l=-1,c=t.getLineTokens(i.lineNumber,!1),d=c.getBinaryEncodedTokens(),h=t.getLineContent(i.lineNumber);for(r=0,o=d.length;-1===l&&o>r;r++)s=r===o-1?h.length:u(d[r+1]),u(d[r])<=a&&s>=a&&(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,l,c=t.getLineContent(n.lineNumber),d={brackets:null,isAccurate:!0};if(c.length>0){var h,p,f,g,m,v=n.column-1,y=t.getLineTokens(n.lineNumber,!1),_=y.getBinaryEncodedTokens(),b=y.getBinaryEncodedTokensMap();for(r=0,l=_.length;null===d.brackets&&l>r;r++)if(h=_[r],f=u(h),m=s(b,h),g=a(h),p=r===l-1?c.length:u(_[r+1]),v>=f&&p>=v){if(0>g){var w=e._findMatchingBracketUp(t,m,n.lineNumber,r,-1);w&&(d.brackets=[new o.Range(n.lineNumber,f+1,n.lineNumber,p+1),w])}if(null===d.brackets&&g>0){var C=e._findMatchingBracketDown(t,m,n.lineNumber,r,i);d.isAccurate=C.isAccurate,C.range&&(d.brackets=[new o.Range(n.lineNumber,f+1,n.lineNumber,p+1),C.range])}}}return d},e}();t.BracketsHelper=c});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/base/lifecycle","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","vs/base/time/schedulers","vs/base/performance/timer","vs/base/time/precision"],function(e,t,n,i,r,o,s,a,u,l,c,d,h,p,f,g){var m=function(){function e(){this._inflate=[""],this._deflate={"":0}}return e}();t.TokensInflatorMap=m;var v=function(){function e(e,t){var n=this;this._modePromise=e,this._externalModePromise=new i.TPromise(function(e,t){n._externalModePromise_c=e,n._externalModePromise_e=t}),this._model=t,this._isDisposed=!1,i.TPromise.timeout(0).then(function(){return n._modePromise}).then(function(e){if(n._isDisposed)return n._externalModePromise_c(!1),void 0;var t=n._model;n.dispose(),t.setMode(e),t._warmUpTokens(),n._externalModePromise_c(!0)}).done(null,function(e){n._externalModePromise_e(e),a.onUnexpectedError(e)})}return e.prototype.getModePromise=function(){return this._externalModePromise},e.prototype.dispose=function(){this._modePromise=null,this._model=null,this._isDisposed=!0},e}(),y=function(){function e(e,t){var n=this;this._retokenizePromise=e,this._model=t,this._isDisposed=!1,this.isFulfilled=!1,i.TPromise.timeout(0).then(function(){return n._retokenizePromise}).then(function(){n._isDisposed||(n.isFulfilled=!0,n._model.onRetokenizerFulfilled())}).done(null,a.onUnexpectedError)}return e.prototype.getRange=function(){return null},e.prototype.dispose=function(){this._retokenizePromise=null,this._model=null,this._isDisposed=!0},e}();t.FullModelRetokenizer=y;var _=function(){function e(e,t){this.modeTransitions=t.getModeTransitions().toArray(e),this._text=t.text,this._lineTokens=t.getTokens()}return e.prototype.getLineContent=function(){return this._text},e.prototype.getTokenCount=function(){return this._lineTokens.getTokenCount()},e.prototype.getTokenStartIndex=function(e){return this._lineTokens.getTokenStartIndex(e)},e.prototype.getTokenEndIndex=function(e){return this._lineTokens.getTokenEndIndex(e,this._text.length)},e.prototype.getTokenType=function(e){return this._lineTokens.getTokenType(e)},e.prototype.getTokenBracket=function(e){return this._lineTokens.getTokenBracket(e)},e.prototype.getTokenText=function(e){var t=this._lineTokens.getTokenStartIndex(e),n=this._lineTokens.getTokenEndIndex(e,this._text.length);return this._text.substring(t,n)},e.prototype.findIndexOfOffset=function(e){return this._lineTokens.findIndexOfOffset(e)},e}(),b=function(e){function t(t,n,r,o){var a=this;if(t.push(u.EventType.ModelTokensChanged),t.push(u.EventType.ModelModeChanged),e.call(this,t,n),this._shouldAutoTokenize=r,this._stopLineTokenizationAfter=c.Config.editor.stopLineTokenizationAfter,o)if(i.Promise.is(o)){var l=o;this._modeToModelBinder=new v(l,this),this._mode=new s.NullMode}else this._mode=o,this._resetModeListener(this._mode);else this._mode=new s.NullMode;this._revalidateTokensTimeout=-1,this._modeTokenizationFailedTimeout=-1,this._scheduleRetokenizeNow=new p.RunOnceScheduler(function(){return a._retokenizeNow()},200),this._retokenizers=[],this._resetTokenizationState()}return __extends(t,e),t.prototype.dispose=function(){this._modeToModelBinder&&(this._modeToModelBinder.dispose(),this._modeToModelBinder=null),this._resetModeListener(null),this._clearTimers(),this._mode=null,this._lastState=null,this._tokensInflatorMap=null,this._retokenizers=r.disposeAll(this._retokenizers),this._scheduleRetokenizeNow.dispose(),e.prototype.dispose.call(this)},t.prototype.whenModeIsReady=function(){return this._modeToModelBinder?this._modeToModelBinder.getModePromise():i.Promise.as(this._mode)},t.prototype.onRetokenizerFulfilled=function(){this._scheduleRetokenizeNow.schedule()},t.prototype._retokenizeNow=function(){var e=this._retokenizers.filter(function(e){return e.isFulfilled});this._retokenizers=this._retokenizers.filter(function(e){return!e.isFulfilled});for(var t=!1,n=0;n<e.length;n++)e[n].getRange()||(t=!0);if(t){for(var n=0,i=this._lines.length;i>n;n++)this._lines[n].isInvalid=!0;this._invalidLineStartIndex=0}else{for(var r=Number.MAX_VALUE,n=0;n<e.length;n++){var o=e[n].getRange();r=Math.min(r,o.startLineNumber);for(var s=o.startLineNumber;s<=o.endLineNumber;s++)this._lines[s-1].isInvalid=!0}r-1<this._invalidLineStartIndex&&(this._invalidLineStartIndex<this._lines.length&&(this._lines[this._invalidLineStartIndex].isInvalid=!0),this._invalidLineStartIndex=r-1)}this._beginBackgroundTokenization();for(var n=0;n<e.length;n++)e[n].dispose()},t.prototype._createRetokenizer=function(e){return new y(e,this)},t.prototype._resetValue=function(t,n){e.prototype._resetValue.call(this,t,n),this._resetTokenizationState()},t.prototype._resetMode=function(e,t){this._mode=t,this._resetModeListener(t),this._resetTokenizationState(),this.emitModelTokensChangedEvent(1,this.getLineCount())},t.prototype._resetModeListener=function(e){var t=this;this._modeListener&&(this._modeListener.dispose(),this._modeListener=null),e&&"function"==typeof e.addSupportChangedListener&&(this._modeListener=e.addSupportChangedListener(function(e){return t._onModeSupportChanged(e)}))},t.prototype._onModeSupportChanged=function(e){e.tokenizationSupport&&(this._resetTokenizationState(),this.emitModelTokensChangedEvent(1,this.getLineCount()))},t.prototype._resetTokenizationState=function(){this._retokenizers=r.disposeAll(this._retokenizers),this._scheduleRetokenizeNow.cancel(),this._clearTimers(),this._initializeTokenizationState(),this._tokenizationElapsedTime=0,this._tokenizationTotalCharacters=1},t.prototype._clearTimers=function(){-1!==this._revalidateTokensTimeout&&(clearTimeout(this._revalidateTokensTimeout),this._revalidateTokensTimeout=-1),-1!==this._modeTokenizationFailedTimeout&&(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){n.friendlyMessage=t.MODE_TOKENIZATION_FAILED_MSG,a.onUnexpectedError(n),this._mode=new s.NullMode}e||(e=new s.NullState(this._mode,null)),this._lines[0].setState(e),this._lastState=null,this._tokensInflatorMap=new m,this._invalidLineStartIndex=0,this._beginBackgroundTokenization()},t.prototype.setStopLineTokenizationAfter=function(e){if(this._isDisposed)throw new Error("TextModelWithTokens.setStopLineTokenizationAfter: Model is disposed");this._stopLineTokenizationAfter=e},t.prototype.getLineTokens=function(e,t){if(void 0===t&&(t=!1),this._isDisposed)throw new Error("TextModelWithTokens.getLineTokens: Model is disposed");if(1>e||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return t||this._updateTokensUntilLine(e,!0),this._lines[e-1].getTokens()},t.prototype.getLineContext=function(e){if(this._isDisposed)throw new Error("TextModelWithTokens.getLineContext: Model is disposed");if(1>e||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return this._updateTokensUntilLine(e,!0),new _(this._mode,this._lines[e-1])},t.prototype._getInternalTokens=function(e){return this._updateTokensUntilLine(e,!0),this._lines[e-1].getTokens()},t.prototype.setValue=function(e,t){if(void 0===t&&(t=null),this._isDisposed)throw new Error("TextModelWithTokens.setValue: Model is disposed");if(null!==e||t){var n;if(null!==e&&(n=this._createContentChangedFlushEvent(),this._resetValue(n,e)),t)if(this._modeToModelBinder&&(this._modeToModelBinder.dispose(),this._modeToModelBinder=null),i.Promise.is(t))this._modeToModelBinder=new v(t,this);else{var r=t;if(this._mode!==r){var o={oldMode:this._mode,newMode:r};this._resetMode(o,r),this._emitModelModeChangedEvent(o)}}n&&this._emitModelContentChangedFlushEvent(n)}},t.prototype.getMode=function(){if(this._isDisposed)throw new Error("TextModelWithTokens.getMode: Model is disposed");return this._mode},t.prototype.setMode=function(e){if(this._isDisposed)throw new Error("TextModelWithTokens.setMode: Model is disposed");e&&this.setValue(null,e)},t.prototype.getModeAtPosition=function(e,t){if(this._isDisposed)throw new Error("TextModelWithTokens.getModeAtPosition: Model is disposed");var n=this.validatePosition({lineNumber:e,column:t}),i=n.lineNumber,r=n.column;if(1===r)return this.getStateBeforeLine(i).getMode();if(r===this.getLineMaxColumn(i))return this.getStateAfterLine(i).getMode();var o=this._getLineModeTransitions(i),s=l.findIndexInSegmentsArray(o,r-1);return o[s].mode},t.prototype._invalidateLine=function(e){this._lines[e].isInvalid=!0,e<this._invalidLineStartIndex&&(this._invalidLineStartIndex<this._lines.length&&(this._lines[this._invalidLineStartIndex].isInvalid=!0),this._invalidLineStartIndex=e,this._beginBackgroundTokenization())},t.prototype._updateLineTokens=function(e,t,n,i){this._lines[e].setTokens(t,i.tokens,n,i.modeTransitions)},t.prototype._beginBackgroundTokenization=function(){var e=this;this._shouldAutoTokenize&&-1===this._revalidateTokensTimeout&&(this._revalidateTokensTimeout=setTimeout(function(){e._revalidateTokensTimeout=-1,e._revalidateTokensNow()},0))},t.prototype._warmUpTokens=function(){if(this._isDisposed)throw new Error("TextModelWithTokens._warmUpTokens: Model is disposed");for(var e=Math.min(100,this.getLineCount()),t=e,n=1;e>=n;n++){var i=this._lines[n-1].text;if(i.length>=200){t=n-1;break}}this._revalidateTokensNow(t)},t.prototype._revalidateTokensNow=function(e){void 0===e&&(e=this._invalidLineStartIndex+1e6);var t=f.start(f.Topic.EDITOR,"backgroundTokenization");e=Math.min(this._lines.length,e);for(var n,i=20,r=this._invalidLineStartIndex+1,o=0,s=0,a=0,u=this._stopLineTokenizationAfter,l=g.createStopWatch(),c=r;e>=c;c++){if(n=l.elapsed(),n>i){e=c-1;break}if(s=this._lines[c-1].text.length,-1!==u&&s>u&&(s=u),o>0&&(a=n/o*s,n+a>i)){e=c-1;break}this._updateTokensUntilLine(c,!1),o+=s}n=l.elapsed();var d=f.start(f.Topic.EDITOR,"**speed: "+this._tokenizationTotalCharacters/this._tokenizationElapsedTime);d.stop(),e>=r&&this.emitModelTokensChangedEvent(r,e),this._invalidLineStartIndex<this._lines.length&&this._beginBackgroundTokenization(),t.stop()},t.prototype.getStateBeforeLine=function(e){return this._updateTokensUntilLine(e-1,!0),this._lines[e-1].getState()},t.prototype.getStateAfterLine=function(e){return this._updateTokensUntilLine(e,!0),e<this._lines.length?this._lines[e].getState():this._lastState},t.prototype._getLineModeTransitions=function(e){if(this._isDisposed)throw new Error("TextModelWithTokens._getLineModeTransitions: Model is disposed");if(1>e||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return this._updateTokensUntilLine(e,!0),this._lines[e-1].getModeTransitions().toArray(this._mode)},t.prototype._updateTokensUntilLine=function(e,n){var i=this._lines.length,r=e-1,o=this._stopLineTokenizationAfter;-1===o&&(o=1e9);for(var u=g.createStopWatch(),l=0,c=this._invalidLineStartIndex+1,d=e,h=this._invalidLineStartIndex;r>=h;h++){var p=h+1,f=null,m=this._lines[h].text;if(this._mode.tokenizationSupport){try{f=this._mode.tokenizationSupport.tokenize(this._lines[h].text,this._lines[h].getState(),0,o),l=f?f.actualStopOffset:this._lines[h].text.length}catch(v){v.friendlyMessage=t.MODE_TOKENIZATION_FAILED_MSG,a.onUnexpectedError(v),this._onModeTokenizationFailed()}f&&f.retokenize&&this._retokenizers.push(this._createRetokenizer(f.retokenize,h+1)),f&&f.tokens&&f.tokens.length>0&&(f.actualStopOffset=Math.max(f.actualStopOffset,f.tokens[f.tokens.length-1].startIndex+1)),f&&f.actualStopOffset<m.length&&(f.tokens.push({startIndex:f.actualStopOffset,type:"",bracket:0}),f.endState=this._lines[h].getState())}if(f||(f=s.nullTokenize(this._mode,m,this._lines[h].getState())),f.modeTransitions||(f.modeTransitions=[]),0===f.modeTransitions.length&&f.modeTransitions.push({startIndex:0,mode:this._mode}),this._updateLineTokens(h,this._tokensInflatorMap,this._mode,f),this._lines[h].isInvalid&&(this._lines[h].isInvalid=!1),i>p)if(null!==this._lines[p].getState()&&f.endState.equals(this._lines[p].getState())){for(var y=h+1;i>y&&!this._lines[y].isInvalid;){if(i>y+1){if(null===this._lines[y+1].getState())break}else if(null===this._lastState)break;y++}this._invalidLineStartIndex=Math.max(this._invalidLineStartIndex,y),h=y-1}else this._lines[p].setState(f.endState);else this._lastState=f.endState}this._invalidLineStartIndex=Math.max(this._invalidLineStartIndex,r+1),this._tokenizationElapsedTime+=u.elapsed(),this._tokenizationTotalCharacters+=l,n&&d>=c&&this.emitModelTokensChangedEvent(c,d)},t.prototype._onModeTokenizationFailed=function(){var e=this;-1===this._modeTokenizationFailedTimeout&&(this._modeTokenizationFailedTimeout=setTimeout(function(){e._modeTokenizationFailedTimeout=-1,e.setMode(new s.NullMode)},200))},t.prototype.emitModelTokensChangedEvent=function(e,t){var n={fromLineNumber:e,toLineNumber:t};this.emit(u.EventType.ModelTokensChanged,n)},t.prototype._emitModelModeChangedEvent=function(e){this.emit(u.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){a.onUnexpectedError(t)}return e},t.prototype._getWordDefinition=function(){return h.WordHelper.massageWordDefinitionOf(this._mode)},t.prototype.getWordAtPosition=function(e,t,n){if(void 0===n&&(n=!1),this._isDisposed)throw new Error("TextModelWithTokens.getWordAtPosition: Model is disposed");return h.WordHelper.getWordAtPosition(this,this.validatePosition(e),t,n)},t.prototype.getWordUntilPosition=function(e,t,n){if(void 0===n&&(n=!1),this._isDisposed)throw new Error("TextModelWithTokens.getWordUntilPosition: Model is disposed");var i=this.getWordAtPosition(e,t,n);return i?{word:i.word.substr(0,e.column-i.startColumn),startColumn:i.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}},t.prototype.getWords=function(e,t,n){if(void 0===n&&(n=!1),this._isDisposed)throw new Error("TextModelWithTokens.getWords: Model is disposed");if(1>e||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return h.WordHelper.getWords(this,this.validateLineNumber(e),t,n)},t.prototype.tokenIterator=function(e,t){if(this._isDisposed)throw new Error("TextModelWithTokens.tokenIterator: Model is disposed");var n=new d.TokenIterator(this,this.validatePosition(e)),i=t(n);return n._invalidate(),i},t.prototype.findMatchingBracketUp=function(e,t){if(this._isDisposed)throw new Error("TextModelWithTokens.findMatchingBracketUp: Model is disposed");return h.BracketsHelper.findMatchingBracketUp(this,e,this.validatePosition(t))},t.prototype.matchBracket=function(e,t){if(void 0===t&&(t=!1),this._isDisposed)throw new Error("TextModelWithTokens.matchBracket: Model is disposed");return h.BracketsHelper.matchBracket(this,this.validatePosition(e),t)},t.MODE_TOKENIZATION_FAILED_MSG=n.localize("vs_editor_core_model_textModelWithTokens",0),t}(o.TextModel);t.TextModelWithTokens=b});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/base/network","vs/editor/core/constants","vs/editor/core/view/model/prefixSumComputer","vs/editor/core/model/textModelWithTokens","vs/editor/core/model/modelLine","vs/base/lifecycle","vs/editor/core/model/textModel"],function(e,t,n,i,r,o,s,a,u){function l(e,t,n,i,r,o){return new p(e,t,u.TextModel.toRawText(n),i,r,o)}var c=function(e){function t(t,n,r,o,s,a){e.call(this,t.concat([i.EventType.ModelDispose]),r,!1,o),a||(a={}),this._setVersionId(n),this._associatedResource=s,this._extraProperties=a}return __extends(t,e),t.prototype.getModeId=function(){if(this._isDisposed)throw new Error("AbstractMirrorModel.getModeId: Model is disposed");return this.getMode().getId()},t.prototype.getEmbeddedAtPosition=function(){return null},t.prototype.getAllEmbedded=function(){return[]},t.prototype._constructLines=function(t){e.prototype._constructLines.call(this,t),this._EOL="\n"},t.prototype.destroy=function(){this.dispose()},t.prototype.dispose=function(){this.emit(i.EventType.ModelDispose),e.prototype.dispose.call(this)},t.prototype.getAssociatedResource=function(){if(this._isDisposed)throw new Error("AbstractMirrorModel.getAssociatedResource: Model is disposed");return this._associatedResource},t.prototype.getProperty=function(e){if(this._isDisposed)throw new Error("AbstractMirrorModel.getProperty: Model is disposed");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){if(this._isDisposed)throw new Error("AbstractMirrorModel.getRangeFromOffsetAndLength: Model is disposed");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){if(this._isDisposed)throw new Error("AbstractMirrorModel.getOffsetAndLengthFromRange: Model is disposed");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){if(this._isDisposed)throw new Error("AbstractMirrorModel.getPositionFromOffset: Model is disposed");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){if(this._isDisposed)throw new Error("AbstractMirrorModel.getOffsetFromPosition: Model is disposed");return this.getLineStart(e.lineNumber)+e.column-1},t.prototype.getLineStart=function(e){if(this._isDisposed)throw new Error("AbstractMirrorModel.getLineStart: Model is disposed");this._ensurePrefixSum();var t=Math.min(e,this._lines.length)-1;return this._lineStarts.getAccumulatedValue(t-1)},t.prototype.getAllWordsWithRange=function(){if(this._isDisposed)throw new Error("AbstractMirrorModel.getAllWordsWithRange: Model is disposed");if(this._lines.length>1e4)return[];var e,t=[],n=function(n){var r=i.text.substring(n.start,n.end),o={startLineNumber:e+1,startColumn:n.start+1,endLineNumber:e+1,endColumn:n.end+1};t.push({text:r,range:o})};for(e=0;e<this._lines.length;e++){var i=this._lines[e];this.wordenize(i.text).forEach(n)}return t},t.prototype.getAllWords=function(){var e=this;if(this._isDisposed)throw new Error("AbstractMirrorModel.getAllWords: Model is disposed");var t=[];return this._lines.forEach(function(n){e.wordenize(n.text).forEach(function(e){t.push(n.text.substring(e.start,e.end))})}),t},t.prototype.getAllUniqueWords=function(e){if(this._isDisposed)throw new Error("AbstractMirrorModel.getAllUniqueWords: Model is disposed");var t=!1,n={};return this.getAllWords().filter(function(i){return e&&!t&&e===i?(t=!0,!1):n[i]?!1:(n[i]=!0,!0)})},t.prototype.wordenize=function(e){for(var t,n=[],i=this._getWordDefinition();t=i.exec(e);)n.push({start:t.index,end:t.index+t[0].length});return n},t.prototype.getWord=function(e,t,n){for(var i=this.wordenize(e),r=0;r<i.length&&t>=i[r].start;r++){var o=i[r];if(t<=o.end)return n(e,o.start,o.end)}return n(e,-1,-1)},t}(o.TextModelWithTokens);t.AbstractMirrorModel=c;var d=function(e){function t(n,i,r,o){e.call(this,["changed"],n.getVersionId(),t._getMirrorValueWithinRanges(n,i),r,o),this._actualModel=n}return __extends(t,e),t._getMirrorValueWithinRanges=function(e,t){var n,i="",r=1,o=1;for(n=0;n<t.length;n++){var s=t[n];i+=e.getEmptiedValueInRange({startLineNumber:r,startColumn:o,endLineNumber:s.startLineNumber,endColumn:s.startColumn}," "),i+=e.getValueInRange(s),r=s.endLineNumber,o=s.endColumn}var a=e.getLineCount(),l=e.getLineMaxColumn(a);return i+=e.getEmptiedValueInRange({startLineNumber:r,startColumn:o,endLineNumber:a,endColumn:l}," "),u.TextModel.toRawText(i)},t.prototype.setIncludedRanges=function(e){var n=this.getVersionId();this._lineStarts=null,this._constructLines(t._getMirrorValueWithinRanges(this._actualModel,e)),this._resetTokenizationState(),this._setVersionId(n+1),this.emit("changed",{})},t}(c);t.MirrorModelEmbedded=d;var h=function(){function e(e){this.mode=e,this.ranges=[]}return e}();t.createMirrorModelFromString=l;var p=function(e){function t(t,n,i,r,o,s){e.call(this,["changed"],n,i,r,o,s),this._resourceService=t,this._embeddedModels={},this._updateEmbeddedModels()}return __extends(t,e),t.prototype.getEmbeddedAtPosition=function(e){if(this._isDisposed)throw new Error("MirrorModel.getEmbeddedAtPosition: Model is disposed");var t=this.getModeAtPosition(e.lineNumber,e.column);return this._embeddedModels.hasOwnProperty(t.getId())?this._embeddedModels[t.getId()]:null},t.prototype.getAllEmbedded=function(){var e=this;if(this._isDisposed)throw new Error("MirrorModel.getAllEmbedded: Model is disposed");return Object.keys(this._embeddedModels).map(function(t){return e._embeddedModels[t]})},t.prototype.dispose=function(){var t=this;e.prototype.dispose.call(this);var n=Object.keys(this._embeddedModels).map(function(e){return t._embeddedModels[e]});n.forEach(function(e){return t._resourceService.remove(e.getAssociatedResource())}),a.disposeAll(n),this._embeddedModels={}},t._getModesRanges=function(e){for(var t={},n=function(e,n){return t.hasOwnProperty(e)||(t[e]=new h(n)),t[e]},i=e.getLineCount(),r=e.getMode().getId(),o=e.getMode(),s=1,a=1,u=1;i>=u;u++)for(var l=e._getLineModeTransitions(u),c=0;c<l.length;c++){var d=l[c];if(d.mode.getId()!==r){var p=n(r,o);p.ranges.push({startLineNumber:s,startColumn:a,endLineNumber:u,endColumn:d.startIndex+1}),r=d.mode.getId(),o=d.mode,s=u,a=d.startIndex+1}}var f=i,g=e.getLineMaxColumn(f);if(s!==f||a!==g){var p=n(r,o);p.ranges.push({startLineNumber:s,startColumn:a,endLineNumber:f,endColumn:g})}return t},t.prototype._updateEmbeddedModels=function(){var e=!1;if(!this._resourceService||!this.getMode().tokenizationSupport||!this.getMode().tokenizationSupport.shouldGenerateEmbeddedModels)return e;
for(var i=t._getModesRanges(this),r=Object.keys(this._embeddedModels),o=0;o<r.length;o++){var s=r[o];i.hasOwnProperty(s)||(e=!0,this._resourceService.remove(this._embeddedModels[s].getAssociatedResource()),this._embeddedModels[s].dispose(),delete this._embeddedModels[s])}for(var a=Object.keys(i),o=0;o<a.length;o++){var u=a[o];if(this._embeddedModels.hasOwnProperty(u))this._embeddedModels[u].setIncludedRanges(i[u].ranges);else{var l=new n.URL(this.getAssociatedResource().toExternal()+"#"+u);this._embeddedModels[u]=new d(this,i[u].ranges,i[u].mode,l),this._resourceService.insert(this._embeddedModels[u].getAssociatedResource(),this._embeddedModels[u])}}return e},t.prototype.onEvents=function(e){if(this._isDisposed)throw new Error("MirrorModel.onEvents: Model is disposed");for(var t=!1,n=0,r=e.length;r>n;n++){var o=e[n];switch(o.type){case i.EventType.ModelContentChanged:var s=o;switch(this._lineStarts=null,this._setVersionId(s.versionId),s.changeType){case i.EventType.ModelContentChangedFlush:this._onLinesFlushed(s),t=!0;break;case i.EventType.ModelContentChangedLinesDeleted:this._onLinesDeleted(s),t=!0;break;case i.EventType.ModelContentChangedLinesInserted:this._onLinesInserted(s),t=!0;break;case i.EventType.ModelContentChangedLineChanged:this._onLineChanged(s),t=!0}break;case i.EventType.ModelPropertiesChanged:this._extraProperties=o.properties;break;default:console.warn("Unknown model event: "+o.type)}}var a=!1;return t&&(this.emit("changed",{}),a=this._updateEmbeddedModels()),a},t.prototype._onLinesFlushed=function(e){this._lineStarts=null,this._constructLines(e.detail),this._resetTokenizationState()},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].removeText({},1,this._lines[e.lineNumber-1].text.length+1,!1,!1),this._lines[e.lineNumber-1].insertText({},1,{text:e.detail,markers:null},!1),this._invalidateLine(e.lineNumber-1)},t.prototype._onLinesDeleted=function(e){var t=e.fromLineNumber-1,n=e.toLineNumber-1;this._lineStarts&&this._lineStarts.removeValues(t,n-t+1);var i=this._lines[t].getState();this._lines.splice(t,n-t+1),t<this._lines.length&&(this._lines[t].setState(i),this._invalidateLine(t))},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<e.toLineNumber;t++,n++)this._lineStarts&&this._lineStarts.insertValue(t,r[n].length+i),this._lines.splice(t,0,new s.ModelLine(0,r[n]));e.fromLineNumber>=2&&this._invalidateLine(e.fromLineNumber-2)},t}(c);t.MirrorModel=p}),define("vs/base/callbackList",["require","exports"],function(){var e=function(){function e(){}return e.prototype.add=function(e,t){var n=this;return this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),{dispose:function(){return n.remove(e)}}},e.prototype.remove=function(e){if(this._callbacks){var t=this._callbacks.indexOf(e);t>=0&&(this._callbacks.splice(t,1),this._contexts.splice(t,1))}},e.prototype.invoke=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];if(this._callbacks){for(var n=[],i=0;i<this._callbacks.length;i++){var r=this._callbacks[i];n.push(r.apply(this._contexts[i],e))}return n}},e}();return e}),define("vs/base/eventSource",["require","exports","vs/base/callbackList"],function(e,t,n){var i=function(){function e(e){this._fireLastOnAdd=e}return e.prototype.fire=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return this._value?(this._fireLastOnAdd&&(this._lastArgs=e),this._value.invoke.apply(this._value,e)):void 0},Object.defineProperty(e.prototype,"value",{get:function(){var e=this;return this._value||(this._value=new n),{add:function(t,n){e._value.add(t,n),e._fireLastOnAdd&&setTimeout(function(){return t.bind(n,e._lastArgs)})},remove:this._value.remove.bind(this._value)}},enumerable:!0,configurable:!0}),e}();return i}),define("vs/editor/modes/boundModels",["require","exports","vs/editor/core/model/mirrorModel","vs/editor/editor","vs/base/collections","vs/base/severity","vs/editor/core/range","vs/platform/thread/attribute","vs/editor/core/constants","vs/base/eventSource"],function(e,t,n,i,r,o,s,a,u,l){var c=function(){function e(e){this.model=e,this.toUnbind=null}return e.prototype.dispose=function(){this._decorationIds=this.model.deltaDecorations(this._decorationIds,[]),this.model=null,this.toUnbind&&(this.toUnbind(),this.toUnbind=null)},e.prototype.deltaMarkers=function(e){var t=this;e=e.slice(0,500);var n=e.map(function(e){return{range:t._createDecorationRange(e),options:t._createDecorationOption(e)}});this._decorationIds=this.model.deltaDecorations(this._decorationIds,n)},e.prototype._createDecorationRange=function(e){var t=this.model.validateRange(new s.Range(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn)),n=new s.Range(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn);if(n.isEmpty()){var i=this.model.getWordAtPosition(n.getStartPosition(),!1);if(i)n.startColumn=i.startColumn,n.endColumn=i.endColumn;else{var r=this.model.getLineLastNonWhitespaceColumn(t.startLineNumber)||this.model.getLineMaxColumn(t.startLineNumber);1===r?console.warn("marker on empty line:",t):n.endColumn>=r?(n.endColumn=r,n.startColumn=r-1):n.endColumn+=1}}return n},e.prototype._createDecorationOption=function(e){var t=e.severity===o.Error,n=null;return"string"==typeof e.message?n=[{isText:!0,text:e.message}]:Array.isArray(e.message)?n=e.message:e.message&&(n=[e.message]),{stickiness:i.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,isOverlay:!0,className:t?u.ClassName.EditorErrorDecoration:u.ClassName.EditorWarningDecoration,htmlMessage:n,overviewRuler:{color:t?"rgba(255,18,18,0.7)":"rgba(18,136,18,0.7)",position:i.OverviewRulerLane.Right}}},e}(),d=function(){function e(e,t,n,i){this._resourceService=n,this._markerService=t,this._models={},this._modeInstantiator=i,this._onModelAdded=new l,this._onModelRemoved=new l,this._markerService&&e.isInMainThread&&this._markerService.onMarkerChanged.add(this._handleMarkerChange,this),e.registerInstance(this)}return e.prototype.dispose=function(){this._markerService&&this._markerService.onMarkerChanged.remove(this._handleMarkerChange)},e.prototype._handleMarkerChange=function(e){var t=this;e.forEach(function(e){var n=t._models[e.toExternal()];n&&n.deltaMarkers(t._markerService.read({resource:e,take:500}))})},e.prototype.addModel=function(e){var t=this,n=e.getAssociatedResource().toString(),i=new c(e);i.toUnbind=e.addBulkListener(function(e){return t._onModelEvents(n,e)}),this._markerService&&i.deltaMarkers(this._markerService.read({resource:e.getAssociatedResource()})),this._models[n]=i,this._modelInitialize(this._getBoundModelData(e)),this._onModelAdded.fire(e)},e.prototype.removeModel=function(e){var t=this,n=e.getAssociatedResource().toString();if(this._modelDispose(e.getAssociatedResource()),this._models[n].dispose(),delete this._models[n],this._markerService){var i=this._markerService.read({resource:e.getAssociatedResource()}),r=Object.create(null);i.forEach(function(e){return r[e.owner]=t}),Object.keys(r).forEach(function(n){return t._markerService.changeOne(n,e.getAssociatedResource(),[])})}this._onModelRemoved.fire(e)},e.prototype.getModels=function(){var e=[];return r.forEach(this._models,function(t){return e.push(t.value.model)}),e},e.prototype.getModel=function(e){var t=this._models[e.toExternal()];return t?t.model:null},Object.defineProperty(e.prototype,"onModelAdded",{get:function(){return this._onModelAdded?this._onModelAdded.value:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onModelRemoved",{get:function(){return this._onModelRemoved?this._onModelRemoved.value:null},enumerable:!0,configurable:!0}),e.prototype.getId=function(){return e._ID},e.prototype.getSerializableState=function(){var e=this,t={};return Object.keys(this._models).forEach(function(n){t[n]=e._getBoundModelData(e._models[n].model)}),t},e.prototype.setData=function(e){var t=this;Object.keys(e).forEach(function(n){t._addMirrorModel(e[n])})},e.prototype._getBoundModelData=function(e){return{url:e.getAssociatedResource(),versionId:e.getVersionId(),properties:e.getProperties(),value:e.toRawText(),modeId:e.getMode().getId()}},e.prototype._onModelEvents=function(e,t){var n,i,r=[],o=!1;for(n=0,i=t.length;i>n;n++){var s=t[n],a=s.getData();switch(s.getType()){case u.EventType.ModelContentChanged:switch(a.changeType){case u.EventType.ModelContentChangedFlush:r.push(this._mixinProperties({type:s.getType()},a,["changeType","detail","versionId"]));break;case u.EventType.ModelContentChangedLinesDeleted:r.push(this._mixinProperties({type:s.getType()},a,["changeType","fromLineNumber","toLineNumber","versionId"]));break;case u.EventType.ModelContentChangedLinesInserted:r.push(this._mixinProperties({type:s.getType()},a,["changeType","fromLineNumber","toLineNumber","detail","versionId"]));break;case u.EventType.ModelContentChangedLineChanged:r.push(this._mixinProperties({type:s.getType()},a,["changeType","lineNumber","detail","versionId"]))}o=!0;break;case u.EventType.ModelPropertiesChanged:r.push(this._mixinProperties({type:s.getType()},a,["properties"]))}}r.length>0&&this._modelEvents(this._models[e].model.getAssociatedResource(),r)},e.prototype._mixinProperties=function(e,t,n){for(var i=0;i<n.length;i++)e[n[i]]=t[n[i]];return e},e.prototype._addMirrorModel=function(e){var t=this;return this._modeInstantiator(e.modeId).then(function(i){t._resourceService.insert(e.url,new n.MirrorModel(t._resourceService,e.versionId,e.value,i,e.url,e.properties))})},e.prototype._modelInitialize=function(e){return this._addMirrorModel(e)},e.prototype._modelEvents=function(e,t){var n=this._resourceService.get(e);if(!n)throw new Error("Received model events for missing model "+e.toString());n.onEvents(t)},e.prototype._modelDispose=function(e){var t=this._resourceService.get(e);this._resourceService.remove(e),t&&t.dispose()},e._ID="boundModels",e.$_modelInitialize=a.AllWorkers(e,e.prototype._modelInitialize),e.$_modelEvents=a.AllWorkers(e,e.prototype._modelEvents),e.$_modelDispose=a.AllWorkers(e,e.prototype._modelDispose),e}();t.BoundModels=d}),define("vs/platform/markers/markerService2",["require","exports","vs/base/network","vs/base/arrays","vs/base/strings","vs/base/collections","vs/platform/thread/attribute","vs/base/eventSource"],function(e,t,n,i,r,o,s,a){var u;!function(e){function t(e){var t=/^(.*)→(.*)$/.exec(e);return{owner:t[1],resource:n.URL.fromValue(t[2])}}function i(e){return e.owner+"→"+e.resource}function o(e,t){return new RegExp(r.format("^({0})→({1})$",e?r.escapeRegExpCharacters(e):".*",t?r.escapeRegExpCharacters(t.toString()):".*"))}function s(e,t){return e+"→"+t}e.fromValue=t,e.valueOf=i,e.selector=o,e.raw=s}(u||(u={}));var l=function(){function e(e){this._data=Object.create(null),this._onMarkerChanged=new a,e.registerInstance(this)}return e.prototype.getId=function(){return"__markerService"},e.prototype.getSerializableState=function(){return this._data},e.prototype.setData=function(e){this._data=e},Object.defineProperty(e.prototype,"onMarkerChanged",{get:function(){return this._onMarkerChanged?this._onMarkerChanged.value:null},enumerable:!0,configurable:!0}),e.prototype.changeOne=function(e,t,n){var r=u.raw(e,t),o=!i.isFalsyOrEmpty(this._data[r]),s=!i.isFalsyOrEmpty(n);s?(this._data[r]=n,this._onMarkerChanged.fire([t])):o&&(delete this._data[r],this._onMarkerChanged.fire([t]))},e.prototype.changeAll=function(e,t){var n=this,r=Object.create(null);this._forEach(e,null,-1,function(e,t){var n=u.fromValue(e.key).resource;r[n.toExternal()]=n,t()}),i.isFalsyOrEmpty(t)||t.forEach(function(t){r[t.resource.toString()]=t.resource,o.lookupOrInsert(n._data,u.raw(e,t.resource),[]).push(t.marker)}),this._onMarkerChanged.fire(o.values(r))},e.prototype.read=function(e){var t=this;void 0===e&&(e={});var n=[];return this._forEach(e.owner,e.resource,e.take,function(e){return t._fromEntry(e,n)}),n},e.prototype._forEach=function(e,t,n,i){var r=u.selector(e,t),s=0;o.forEach(this._data,function(e,t){return r.test(e.key)&&(i(e,t),n>0&&s++>=n)?!1:void 0})},e.prototype._fromEntry=function(t,n){var i=u.fromValue(t.key);t.value.forEach(function(t){e._sanitize(t),n.push({owner:i.owner,resource:i.resource,code:t.code,message:t.message,severity:t.severity,startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn})})},e._sanitize=function(e){e.code=e.code||0,e.startLineNumber=e.startLineNumber>0?e.startLineNumber:1,e.startColumn=e.startColumn>0?e.startColumn:1,e.endLineNumber=e.endLineNumber>=e.startLineNumber?e.endLineNumber:e.startLineNumber,e.endColumn=e.endColumn>0?e.endColumn:e.startColumn},e.$changeOne=s.MainThread(e,e.prototype.changeOne),e.$changeAll=s.MainThread(e,e.prototype.changeAll),e}();t.MarkerService=l}),define("vs/platform/telemetry/abstractTelemetryService",["require","exports","vs/base/uuid","vs/base/performance/timer","vs/base/errors","vs/base/types","vs/base/objects","vs/platform/platform","vs/base/env","vs/base/hash"],function(e,t,n,i,r,o,s,a,u,l){var c={enableTelemetry:!0,publicOnly:!0,enableHardIdel:!0,enableSoftIdle:!0},d=function(){function e(e,t){var o=this;if(void 0===e&&(e=null),this.contextService=e,this.config=s.withDefaults(t,c),this.sessionID=this.config.sessionID||n.generateUuid()+Date.now(),this.timeKeeper=new i.TimeKeeper,this.toUnbind=[],this.appenders=[],this.timeKeeperListener=function(e){return o.onTelemetryTimerEventStop(e)},this.timeKeeper.addListener(this.timeKeeperListener),this.toUnbind.push(r.errorHandler.addListener(this.onErrorEvent.bind(this))),this.startTime=new Date,this.eventCount=0,this.enableGlobalErrorHandler(),this.contextService&&this.contextService.getConfiguration()&&this.contextService.getConfiguration().profile){var a=this.contextService.getConfiguration().profile.userEmail;a&&(this.userIdHash=l.computeMurmur2StringHashCode(a).toString())}}return e.prototype.loadTelemetryAppendersFromRegistery=function(){for(var e=a.Registry.as(t.Extenstions.TelemetryAppenders).getTelemetryAppenderDescriptors(),n=0;n<e.length;n++){var i=e[n],r=this.instantiationService.createInstance(i);this.appenders.push(r)}},e.prototype._safeStringify=function(e){return s.safeStringify(e)},e.prototype.onTelemetryTimerEventStop=function(e){for(var t=0;t<e.length;t++){var n=e[t],i=n.data||{};i.duration=n.timeTaken(),"public"===n.topic?this.publicLog(n.name,i):this.log(n.name,i)}},e.prototype.onErrorEvent=function(e){Array.isArray(e.stack)&&(e.stack=e.stack.join("\n")),e.detail&&e.detail.stack&&(e=e.detail),e.stack&&(e.message||(e.message=this._safeStringify(e)),this.publicLog("UnhandledError",e))},e.prototype.enableGlobalErrorHandler=function(){o.isFunction(self.onerror)&&(this.oldOnError=self.onerror);var e=this,t=function(t,n,i,r,o){e.onUncaughtError(t,n,i,r,o),e.oldOnError&&e.oldOnError.apply(this,arguments)};self.onerror=t},e.prototype.onUncaughtError=function(t,n,i,r,s){if(!o.isString(t)||!e.FILTERS.some(function(e){return t.indexOf(e)>=0})){var a={message:t,filename:n,line:i,column:r};s&&(a.error={name:s.name,message:s.message,stack:s.stack}),this.publicLog("UncaughtError",a)}},e.prototype.handleEvent=function(e,t,n){if(this.config.enableTelemetry){this.eventCount++,n=this.addCommonProperties(n);for(var i=0;i<this.appenders.length;i++)this.appenders[i].log(e,t,n)}},e.prototype.addCommonProperties=function(e){e=e||{};var t=new Date;return e.sessionID=this.sessionID,e.timestamp=t,e.version=u.version,e.userId=this.userIdHash,e["common.timesincesessionstart"]=t.getTime()-this.startTime.getTime(),e["common.sequence"]=this.eventCount,e},e.prototype.dispose=function(){for(;this.toUnbind.length;)this.toUnbind.pop()();this.timeKeeper.removeListener(this.timeKeeperListener),this.timeKeeper.dispose(),this.oldOnError&&(self.onerror=this.oldOnError);for(var e=0;e<this.appenders.length;e++)this.appenders[e].dispose()},e.prototype.setInstantiationService=function(e){this.instantiationService=e,this.instantiationService&&this.loadTelemetryAppendersFromRegistery()},e.prototype.start=function(e,t,n){var i=n?"public":"private",r=this.timeKeeper.start(i,e);return t&&(r.data=t),r},e.prototype.log=function(e,t){this.config.publicOnly||this.handleEvent(e,!1,t)},e.prototype.publicLog=function(e,t){this.handleEvent(e,!0,t)},e.prototype.getAppendersCount=function(){return this.appenders.length},e.prototype.getAppenders=function(){return this.appenders},e.prototype.addTelemetryAppender=function(e){this.appenders.push(e)},e.prototype.removeTelemetryAppender=function(e){var t=this.appenders.indexOf(e);t>-1&&this.appenders.splice(t,1)},e.FILTERS=["NPObject"],e}();t.AbstractTelemetryService=d,t.Extenstions={TelemetryAppenders:"telemetry.appenders"};var h=function(){function e(){this.telemetryAppenderDescriptors=[]}return e.prototype.registerTelemetryAppenderDescriptor=function(e){this.telemetryAppenderDescriptors.push(e)},e.prototype.getTelemetryAppenderDescriptors=function(){return this.telemetryAppenderDescriptors},e}();a.Registry.add(t.Extenstions.TelemetryAppenders,new 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/base/time/idleMonitor",["require","exports","vs/base/dom/dom","vs/base/lifecycle","vs/base/eventEmitter","vs/base/dom/browserService"],function(e,t,n,i,r,o){!function(e){e[e.Idle=0]="Idle",e[e.Active=1]="Active"}(t.UserStatus||(t.UserStatus={}));var s=t.UserStatus;t.DEFAULT_IDLE_TIME=36e5;var a=function(){function e(e){var n=this;void 0===e&&(e=t.DEFAULT_IDLE_TIME),this.instance=l.INSTANCE,this.instance.increment(),this.status=null,this.idleCheckTimeout=-1,this.lastActiveTime=-1,this.idleTime=e,this.toDispose=[],this.eventEmitter=new r.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=i.disposeAll(this.toDispose),this.instance.decrement()},e.prototype.onUserActive=function(){this.lastActiveTime=(new Date).getTime(),this.status!==s.Active&&(this.status=s.Active,this.scheduleIdleCheck(),this.eventEmitter.emit("onActive"))},e.prototype.onUserIdle=function(){this.status!==s.Idle&&(this.status=s.Idle,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=a;var u=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}(),l=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.construct=function(){var e=this;this.toDispose=[],this.eventEmitter=new r.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=i.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}(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/platform/telemetry/mainTelemetryService",["require","exports","vs/platform/telemetry/abstractTelemetryService","vs/base/time/idleMonitor"],function(e,t,n,i){var r=function(e){function t(n,r){var o=this;void 0===n&&(n=null),e.call(this,n,r),this.config.enableHardIdle&&(this.hardIdleMonitor=new i.IdleMonitor),this.config.enableSoftIdle&&(this.softIdleMonitor=new i.IdleMonitor(t.SOFT_IDLE_TIME),this.softIdleMonitor.addOneTimeActiveListener(function(){return o.onUserActive()}),this.softIdleMonitor.addOneTimeIdleListener(function(){return o.onUserIdle()}))}return __extends(t,e),t.prototype.dispose=function(){this.hardIdleMonitor&&this.hardIdleMonitor.dispose(),this.softIdleMonitor&&this.softIdleMonitor.dispose(),e.prototype.dispose.call(this)},t.prototype.handleEvent=function(t,n,r){this.hardIdleMonitor&&this.hardIdleMonitor.getStatus()===i.UserStatus.Idle||e.prototype.handleEvent.call(this,t,n,r)},t.prototype.onUserIdle=function(){var e=this;this.publicLog(t.IDLE_START_EVENT_NAME),this.softIdleMonitor.addOneTimeIdleListener(function(){return e.onUserIdle()})},t.prototype.onUserActive=function(){var e=this;this.publicLog(t.IDLE_STOP_EVENT_NAME),this.softIdleMonitor.addOneTimeActiveListener(function(){return e.onUserActive()})},t.SOFT_IDLE_TIME=12e4,t.IDLE_START_EVENT_NAME="UserIdleStart",t.IDLE_STOP_EVENT_NAME="UserIdleStop",t}(n.AbstractTelemetryService);t.MainTelemetryService=r}),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){void 0===t&&(t=!1);var i=[];return(e.ctrlCmd&&!r.isMacintosh||e.winCtrl&&r.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.isMacintosh&&i.push(t?n.localize("vs_platform_handlerService",3):"Meta"),e.winCtrl&&!r.isMacintosh&&i.push(t?n.localize("vs_platform_handlerService",4):"Meta"),t&&"Del"===e.key?i.push("Delete"):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){var n=this;void 0===t&&(t={});var i,r,o=this;return i=function(){for(var n=[],i=0;i<arguments.length;i++)n[i-0]=arguments[i];if(!this.active)return!1;var s=!1;try{s=e.apply(e,n),s===!0&&t.once&&r.dispose()}catch(a){throw r.dispose(),a}return u(o.keyBinding,t,"handled?"+s),s},i.$debugId=t.id,i.active=!0,this.data.unshift(i),r={activate:function(){u(n.keyBinding,t,"activated"),i.active=!0},deactivate:function(){u(n.keyBinding,t,"deactivated"),i.active=!1},dispose:function(){u(n.keyBinding,t,"disposed");var e=n.data.indexOf(i);-1!==e&&(n.data.splice(e,1),0===n.data.length&&n.onEmpty())}}},e.prototype.trigger=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];for(var n=0;n<this.data.length;n++){var i=this.data[n].apply(this.data[n],e);if(i===!0)return!0}return!1},e}();t.HandlerList=d;var h=function(){function e(e){this.bindings=e}return e.prototype.activate=function(){this.bindings.forEach(function(e){e.activate()})},e.prototype.deactivate=function(){this.bindings.forEach(function(e){e.deactivate()})},e.prototype.dispose=function(){this.bindings.forEach(function(e){e.dispose()})},e}();t.CompositeBinding=h;var p=function(){function e(e){var t=this;this.map={},this.unbind=o.addListener(e,o.EventType.KEY_DOWN,function(e){var n=new s.KeyboardEvent(e);t.dispatch(n)})}return e.prototype.dispatch=function(e){var t=e.asString(),n=this.map[t],i=!1;return n instanceof d&&(i=n.trigger(e)),i&&(e.preventDefault(),e.stopPropagation()),i},e.prototype.ensureHandlerList=function(e){var t=this,n=a(e),i=this.map[n];return i||(i=new d(n,function(){t.map&&delete t.map[n]}),this.map[n]=i),i},e.prototype.bind=function(e,t,n){return void 0===n&&(n={once:!1,id:"unkown"}),this.ensureHandlerList(e).push(t,n)},e.prototype.bindGroup=function(e,t){var n=this;void 0===t&&(t={once:!1,id:"unkownGroup"});var i,r=[],o=function(e,o){var s=o;t.once&&(s=function(){var n=!1;try{n=o.apply(o,arguments),n===!0&&(u(a(e),t,"handled?true > GROUP disposal"),i.dispose())}catch(r){throw i.dispose(),r}return n}),r.push(n.bind(e,s))};return e(o),i=new h(r)},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,n){var i=this;this.delegate=e,this.domNode=t,this.scopeNode=n,this.handlerActive=!1,l(this.scopeNode),this.unbind=o.addListener(this.domNode,o.EventType.FOCUS,function(e){c(e.target),i.update(o.isAncestor(e.target,i.scopeNode))},!0)}return 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/css!vs/base/ui/widgets/menu/menu",["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/base/ui/widgets/menu/menu",["require","exports","vs/base/dom/builder","vs/base/ui/widgets/actionbar","vs/base/eventEmitter","vs/css!./menu"],function(e,t,n,i,r){var o=n.$,s=function(e){function t(t,n,r){void 0===r&&(r={}),e.call(this),o(t).addClass("monaco-menu-container");var s=o(".monaco-menu").appendTo(t);this.actionBar=new i.ActionBar(s,{orientation:i.ActionsOrientation.VERTICAL,actionItemProvider:r.actionItemProvider,context:r.context,actionRunner:r.actionRunner}),this.listener=this.addEmitter2(this.actionBar),this.actionBar.push(n,{icon:!0,label:!0})}return __extends(t,e),t.prototype.focus=function(){this.actionBar.focus()},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.actionBar&&(this.actionBar.dispose(),this.actionBar=null),this.listener&&(this.listener.dispose(),this.listener=null)},t}(r.EventEmitter);t.Menu=s}),define("vs/css!vs/platform/contextview/contextmenu",["vs/css!vs/editor/editor.main"],{}),define("vs/platform/contextview/contextmenu",["require","exports","vs/base/dom/builder","vs/base/lifecycle","vs/base/dom/mouseEvent","vs/base/ui/actions","vs/base/ui/widgets/menu/menu","vs/base/ui/events","vs/base/severity","vs/css!./contextmenu"],function(e,t,n,i,r,o,s,a,u){var l=n.$,c=function(){function e(e,t,n,i){var r=this;this.setContainer(e),this.contextViewService=t,this.telemetryService=n,this.messageService=i,this.actionRunner=new o.ActionRunner,this.menuContainerElement=null,this.toDispose=[];var s=!1;this.toDispose.push(this.actionRunner.addListener2(a.EventType.BEFORE_RUN,function(e){r.telemetryService&&r.telemetryService.publicLog("workbenchActionExecuted",{id:e.action.id,From:"contextMenu"}),s=!!e.retainActionItem,s||r.contextViewService.hideContextView(!1)})),this.toDispose.push(this.actionRunner.addListener2(a.EventType.RUN,function(e){s&&r.contextViewService.hideContextView(!1),s=!1,e.error&&r.messageService&&r.messageService.show(u.Error,e.error)}))}return e.prototype.setContainer=function(e){var t=this;this.$el&&(this.$el.off(["click","mousedown"]),this.$el=null),e&&(this.$el=l(e),this.$el.on("mousedown",function(e){return t.onMouseDown(e)}))},e.prototype.showContextMenu=function(e){var t=this;e.getActions().done(function(n){t.contextViewService.showContextView({getAnchor:function(){return e.getAnchor()},canRelayout:!1,render:function(r){t.menuContainerElement=r;var o=e.getMenuClassName?e.getMenuClassName():"";o&&(r.className+=" "+o);var u=new s.Menu(r,n,{actionItemProvider:e.getActionItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:t.actionRunner}),l=u.addListener2(a.EventType.CANCEL,function(){t.contextViewService.hideContextView(!0)}),c=u.addListener2(a.EventType.BLUR,function(){t.contextViewService.hideContextView(!0)});return u.focus(),i.combinedDispose(l,c,u)},onHide:function(n){e.onHide&&e.onHide(n),t.menuContainerElement=null}})})},e.prototype.onMouseDown=function(e){if(this.menuContainerElement){for(var t=new r.StandardMouseEvent(e),n=t.target;n;){if(n===this.menuContainerElement)return;n=n.parentElement}this.contextViewService.hideContextView()}},e.prototype.dispose=function(){this.setContainer(null)},e}();t.ContextMenuHandler=c}),define("vs/platform/contextview/contextviewService",["require","exports","vs/base/ui/widgets/contextview/contextview","vs/platform/contextview/contextmenu"],function(e,t,n,i){var r=function(){function e(e,t,r){this.contextView=new n.ContextView(e),this.contextMenuHandler=new i.ContextMenuHandler(e,this,t,r)}return e.prototype.dispose=function(){this.contextView.dispose(),this.contextMenuHandler.dispose()},e.prototype.setContainer=function(e){this.contextView.setContainer(e),this.contextMenuHandler.setContainer(e)},e.prototype.showContextView=function(e){this.contextView.show(e)},e.prototype.layout=function(){this.contextView.layout()},e.prototype.hideContextView=function(e){this.contextView.hide(e)},e.prototype.showContextMenu=function(e){this.contextMenuHandler.showContextMenu(e)},e}();t.ContextViewService=r}),define("vs/editor/standalone/standaloneServices",["require","exports","vs/platform/services","vs/editor/modes/boundModels","vs/platform/instantiation/instantiationService","vs/platform/thread/mainThreadService","vs/platform/markers/markerService2","vs/base/env","vs/platform/telemetry/mainTelemetryService","vs/editor/standalone/simpleServices","vs/platform/handlerService","vs/platform/contextview/contextviewService"],function(e,t,n,i,r,o,s,a,u,l,c,d){function h(e){var t={};if(e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function p(e){e=h(e);var t=g(e);return e.threadService=e.threadService||t.threadService,e.contextService=e.contextService||t.contextService,e.telemetryService=e.telemetryService||t.telemetryService,e.requestService=e.requestService||t.requestService,e.messageService=e.messageService||new l.SimpleMessageService,e.modelService=e.modelService||t.modelService,e.markerService=e.markerService||t.markerService,e}function f(e,t){var n=[];if("undefined"==typeof t.handlerService){var i=new c.HandlerService(e);
n.push(i),t.handlerService=i}if("undefined"==typeof t.contextViewService){var r=new d.ContextViewService(e,t.telemetryService,t.messageService);n.push(r),t.contextViewService=r}return"undefined"==typeof t.contextMenuService&&(t.contextMenuService=r),n}function g(e){if(m)return m;e=e||{};var t=e.contextService;if(!t){var c="inmemory://";t=new n.BaseWorkspaceContextService({resource:c,id:null,name:null,path:null,alternatePath:null,telemetry:a.standaloneEditorTelemetryEndpoint,ctime:null,mtime:null},{paths:{PUBLIC_WORKSPACE_URL:c}})}var d=e.telemetryService;d||(d=new u.MainTelemetryService(t,{enableTelemetry:a.enableTelemetry,publicOnly:!a.enablePrivateTelemetry})),a.standaloneEditorTelemetryEndpoint&&console.warn("standaloneEditorTelemetryEndpoint is obsolete");var h=e.threadService;h||(h=new o.MainThreadService(t,d));var p=e.markerService||new s.MarkerService(h),f=e.requestService||new l.SimpleEditorRequestService({contextService:t,telemetryService:d}),g=e.modelService||new i.BoundModels(h,p,null,null);m={threadService:h,markerService:p,contextService:t,telemetryService:d,requestService:f,modelService:g};var v=r.create(m);return h.setInstantiationService(v),d.setInstantiationService(v),m}t.ensureStaticPlatformServices=p,t.ensureDynamicPlatformServices=f;var m=null;t.getOrCreateStaticServices=g});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","vs/base/lifecycle"],function(e,t,n,i,r){var o=function(){function e(e,t,n){this.id=e,this.column=t,this.stickToPreviousCharacter=n,this.oldLineNumber=0,this.oldColumn=0,this.line=null}return e}(),s=0,a=function(e){function t(t,n,i){e.call(this,t,n,!0,i),this._markerIdGenerator=new r.IdGenerator(++s+";"),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){if(this._isDisposed)throw new Error("TextModelWithMarkers._addMarker: Model is disposed");var r=this.validatePosition(new i.Position(e,t)),s=new o(this._markerIdGenerator.generate(),r.column,n);return this._markerIdToMarker[s.id]=s,this._lines[r.lineNumber-1].addMarker(s),s.id},t.prototype._changeMarker=function(e,t,n){if(this._isDisposed)throw new Error("TextModelWithMarkers._changeMarker: Model is disposed");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._isDisposed)throw new Error("TextModelWithMarkers._changeMarkerStickiness: Model is disposed");if(this._markerIdToMarker.hasOwnProperty(e)){var n=this._markerIdToMarker[e];n.stickToPreviousCharacter!==t&&(n.stickToPreviousCharacter=t)}},t.prototype._getMarker=function(e){if(this._isDisposed)throw new Error("TextModelWithMarkers._getMarker: Model is disposed");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){if(this._isDisposed)throw new Error("TextModelWithMarkers._getLineMarkers: Model is disposed");if(1>e||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return this._lines[e-1].getMarkers()},t.prototype._removeMarker=function(e){if(this._isDisposed)throw new Error("TextModelWithMarkers._removeMarker: Model is disposed");if(this._markerIdToMarker.hasOwnProperty(e)){var t=this._markerIdToMarker[e];t.line.removeMarker(t),delete this._markerIdToMarker[e]}},t.prototype._getMarkersInMap=function(e){if(this._isDisposed)throw new Error("TextModelWithMarkers._getMarkersInMap: Model is disposed");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=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/textModelWithTrackedRanges",["require","exports","vs/editor/editor","vs/editor/core/model/textModelWithMarkers","vs/editor/core/model/textModelWithTokens","vs/editor/core/range","vs/base/lifecycle"],function(e,t,n,i,r,o,s){var a=function(e){function t(t,i,r){e.call(this,t,r),this.trackedRangeId=r.addTrackedRange({startLineNumber:i,startColumn:1,endLineNumber:i,endColumn:r.getLineMaxColumn(i)},n.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges)}return __extends(t,e),t.prototype.getRange=function(){return this._model.getTrackedRange(this.trackedRangeId)},t.prototype.dispose=function(){var t=this._model;t.isValidTrackedRange(this.trackedRangeId)&&t.removeTrackedRange(this.trackedRangeId),e.prototype.dispose.call(this)},t}(r.FullModelRetokenizer),u=function(){function e(e,t,n){this.id=e,this.startMarkerId=t,this.endMarkerId=n}return e}(),l=0,c=function(e){function t(t,n,i){e.call(this,t,n,i),this._rangeIdGenerator=new s.IdGenerator(++l+";"),this._ranges={},this._markerIdToRangeId={},this._multiLineTrackedRanges={}}return __extends(t,e),t.prototype._createRetokenizer=function(e,t){return new a(e,t,this)},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 e===n.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges||e===n.TrackedRangeStickiness.GrowsOnlyWhenTypingBefore?!0:!1},t.prototype._shouldEndMarkerSticksToPreviousCharacter=function(e){return e===n.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges||e===n.TrackedRangeStickiness.GrowsOnlyWhenTypingBefore?!0:!1},t.prototype.addTrackedRange=function(e,t){if(this._isDisposed)throw new Error("TextModelWithTrackedRanges.addTrackedRange: Model is disposed");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=new u(this._rangeIdGenerator.generate(),r,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._isDisposed)throw new Error("TextModelWithTrackedRanges.changeTrackedRange: Model is disposed");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._isDisposed)throw new Error("TextModelWithTrackedRanges.changeTrackedRangeStickiness: Model is disposed");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.isValidTrackedRange=function(e){return this._isDisposed||!this._ranges?!1:this._ranges.hasOwnProperty(e)},t.prototype.removeTrackedRange=function(e){if(this._isDisposed)throw new Error("TextModelWithTrackedRanges.removeTrackedRange: Model is disposed");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 o.Range(e.lineNumber,e.column,e.lineNumber,e.column):new o.Range(e.lineNumber,e.column,t.lineNumber,t.column)},t.prototype.getTrackedRange=function(e){if(this._isDisposed)throw new Error("TextModelWithTrackedRanges.getTrackedRange: Model is disposed");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.lineNumber<e)continue;s.push({id:i.id,range:this._newEditorRange(r,o)})}return s},t.prototype.getLinesTrackedRanges=function(e,t){if(this._isDisposed)throw new Error("TextModelWithTrackedRanges.getLinesTrackedRanges: Model is disposed");var n,i,r,o,s,a,u,l,c=this._getMultiLineTrackedRanges(e,t),d={};for(o=0,s=c.length;s>o;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=c});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","vs/base/strings","vs/base/lifecycle","vs/base/errors"],function(e,t,n,i,r,o,s,a){function u(e){return e.replace(/[^a-z0-9\-]/gi," ")}function l(e){return new v(e)}function c(e,t){return void 0===t&&(t=null),new y(e,t)}function d(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+h(t)},""),t.isWholeLine+"",t.overviewRuler.color,t.overviewRuler.position,t.glyphMarginClassName,t.linesDecorationsClassName,t.inlineClassName];return n.join("-")}function h(e){var t=[e.tagName,e.text,e.className];return e.children&&e.children.forEach(function(e,n){t.push("child"+n+"-"+h(e))}),t.join("-")}var p=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=p;var f=0,g=function(e){function t(t,n,i){t.push(r.EventType.ModelDecorationsChanged),e.call(this,t,n,i),this._decorationIdGenerator=new s.IdGenerator(++f+";"),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){var n=this;if(void 0===t&&(t=0),this._isDisposed)throw new Error("TextModelWithDecorations.changeDecorations: Model is disposed");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=null;try{o=e(r)}catch(s){a.onUnexpectedError(s)}return r.addDecoration=null,r.changeDecoration=null,r.removeDecoration=null,r.deltaDecorations=null,o})},t.prototype.deltaDecorations=function(e,t,n){if(void 0===n&&(n=0),this._isDisposed)throw new Error("TextModelWithDecorations.deltaDecorations: Model is disposed");return e||(e=[]),this.changeDecorations(function(n){return n.deltaDecorations(e,t)},n)},t.prototype.removeAllDecorationsWithOwnerId=function(e){if(this._isDisposed)throw new Error("TextModelWithDecorations.removeAllDecorationsWithOwnerId: Model is disposed");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;r<i.length;r++)this._removeDecorationImpl(null,i[r])},t.prototype.getDecorationOptions=function(e){if(this._isDisposed)throw new Error("TextModelWithDecorations.getDecorationOptions: Model is disposed");return this.decorations.hasOwnProperty(e)?this.decorations[e].options:null},t.prototype.getDecorationRange=function(e){if(this._isDisposed)throw new Error("TextModelWithDecorations.getDecorationRange: Model is disposed");if(this.decorations.hasOwnProperty(e)){var t=this.decorations[e];return this.getTrackedRange(t.rangeId)}return null},t.prototype.getLineDecorations=function(e,t,n){if(void 0===t&&(t=0),void 0===n&&(n=!1),this._isDisposed)throw new Error("TextModelWithDecorations.getLineDecorations: Model is disposed");return 1>e||e>this.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)},t.prototype._getDecorationsInRange=function(e,t,n,i,o,s){var a,u,l,c,d=[],h=this.getLinesTrackedRanges(e,n);for(u=0,c=h.length;c>u;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.endColumn<t)continue;if(l.range.endLineNumber===n&&l.range.startColumn>i)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){if(void 0===n&&(n=0),void 0===i&&(i=!1),this._isDisposed)throw new Error("TextModelWithDecorations.getLinesDecorations: Model is disposed");var r=this.getLineCount();return e=Math.min(r,Math.max(1,e)),t=Math.min(r,Math.max(1,t)),this._getDecorationsInRange(e,1,t,Number.MAX_VALUE,n,i)},t.prototype.getDecorationsInRange=function(e,t,n){if(this._isDisposed)throw new Error("TextModelWithDecorations.getDecorationsInRange: Model is disposed");var i=this.validateRange(e);return this._getDecorationsInRange(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn,t,n)},t.prototype.getAllDecorations=function(e,t){if(void 0===e&&(e=0),void 0===t&&(t=!1),this._isDisposed)throw new Error("TextModelWithDecorations.getAllDecorations: Model is disposed");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 p);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=l(i);var r=this.addTrackedRange(n,i.stickiness),o=new m(this._decorationIdGenerator.generate(),t,r,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=l(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,s=[],a=[];for(r=0,o=i.length;o>r;r++)s[r]=l(i[r].options),a[r]=this.validateRange(i[r].range);return this._deltaImpl(e,t,n,o,a,s)},t.prototype._deltaImpl=function(e,t,n,i,r,o){var s,a,u,l,c={};for(s=0,a=n.length;a>s;s++)this.decorations.hasOwnProperty(n[s])&&(l=this.decorations[n[s]],u=d(this.getTrackedRange(l.rangeId),l.options),c[u]=c[u]||[],c[u].push(n[s]));var h,p,f,g,m=[],v={};for(s=0;i>s;s++){if(u=d(r[s],o[s]),g=!1,c.hasOwnProperty(u))for(f=c[u],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=g;var m=function(){function e(e,t,n,i){this.id=e,this.ownerId=t,this.rangeId=n,this.options=i}return e}(),v=function(){function e(e){this.stickiness=e.stickiness||n.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,this.className=u(e.className||o.empty),this.hoverMessage=e.hoverMessage||o.empty,this.htmlMessage=e.htmlMessage||[],this.isWholeLine=e.isWholeLine||!1,this.overviewRuler=c(e.overviewRuler,e.showInOverviewRuler),this.glyphMarginClassName=u(e.glyphMarginClassName||o.empty),this.linesDecorationsClassName=u(e.linesDecorationsClassName||o.empty),this.inlineClassName=u(e.inlineClassName||o.empty)}return e}(),y=function(){function e(e,t){this.color=o.empty,this.position=n.OverviewRulerLane.Center,t&&(this.color=t),e&&e.color&&(this.color=e.color),e&&e.hasOwnProperty("position")&&(this.position=e.position)}return e}()}),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;r<i.length;r++)if(i[r-1].range.getStartPosition().isBeforeOrEqual(i[r].range.getEndPosition()))throw new Error("Overlapping ranges are not allowed!");var o=t.getEditableRange(),s=o.getStartPosition(),a=o.getEndPosition();for(r=0;r<i.length;r++){var u=i[r].range;if(!s.isBeforeOrEqual(u.getStartPosition())||!u.getEndPosition().isBeforeOrEqual(a))throw new Error("Editing outside of editable range not allowed!")}var l=e._applyWithMarkers(t,n,i),c=e._squashMarkers(t,l);for(c.sort(e._compareOperations),r=1;r<c.length;r++)if(c[r-1].range.getStartPosition().isBeforeOrEqual(c[r].range.getEndPosition()))throw new Error("Inverse edit operations: Overlapping ranges are not allowed!");return c},e._squashMarkers=function(e,t){var i,r,o,s,a,u,l,c,d=[];for(i=0,r=t.length;r>i;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","vs/base/errors"],function(e,t,n,i){var r=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,r){this.future=[],this.currentOpenStackElement||(this.currentOpenStackElement={beforeVersionId:this.model.getAlternativeVersionId(),beforeCursorState:e,editOperations:[],afterCursorState:null,afterVersionId:-1});var o=n.ModelEditOperation.execute(this.model,{operations:t});this.currentOpenStackElement.editOperations.push(o);try{this.currentOpenStackElement.afterCursorState=r?r(o.operations):null}catch(s){i.onUnexpectedError(s),this.currentOpenStackElement.afterCursorState=null}return this.currentOpenStackElement.afterVersionId=this.model.getVersionId(),this.currentOpenStackElement.afterCursorState},e.prototype.undo=function(){if(this.pushStackElement(),this.past.length>0){var e=this.past.pop();try{for(var t=e.editOperations.length-1;t>=0;t--)e.editOperations[t]=n.ModelEditOperation.execute(this.model,e.editOperations[t])}catch(i){return this.clear(),null}return this.future.push(e),{selections:e.beforeCursorState,recordedVersionId:e.beforeVersionId}}return null},e.prototype.redo=function(){if(this.future.length>0){if(this.currentOpenStackElement)throw new Error("How is this possible?");var e=this.future.pop();try{for(var t=0;t<e.editOperations.length;t++)e.editOperations[t]=n.ModelEditOperation.execute(this.model,e.editOperations[t])}catch(i){return this.clear(),null}return this.past.push(e),{selections:e.afterCursorState,recordedVersionId:e.afterVersionId}}return null},e}();t.EditStack=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/editableTextModel",["require","exports","vs/editor/core/model/textModelWithDecorations","vs/editor/core/model/editStack","vs/editor/editor","vs/editor/core/model/modelLine","vs/editor/core/position","vs/editor/core/constants","vs/base/errors"],function(e,t,n,i,r,o,s,a,u){var l=function(e){function t(t,n,r){t.push(a.EventType.ModelContentChanged),t.push(a.EventType.ModelContentChanged2),e.call(this,t,n,r),this._commandManager=new i.EditStack(this),this._isUndoing=!1,this._isRedoing=!1,this._hasEditableRange=!1,this._editableRangeId=null}return __extends(t,e),t.prototype.dispose=function(){this._commandManager=null,e.prototype.dispose.call(this)},t.prototype._resetValue=function(t,n){e.prototype._resetValue.call(this,t,n),this._commandManager=new i.EditStack(this),this._hasEditableRange=!1,this._editableRangeId=null},t.prototype.change=function(e){var t=this;if(this._isDisposed)throw new Error("EditableTextModel.change: Model is disposed");return this._withDeferredEvents(function(n){var i={insertText:function(e,i,r){return void 0===r&&(r=!1),t._insertText(n.changedMarkers,e,i,r)},deleteText:function(e){return t._deleteText(n.changedMarkers,e)}},r=null;try{r=e(i)}catch(o){u.onUnexpectedError(o)}return i.insertText=null,i.deleteText=null,r})},t.prototype.pushStackElement=function(){if(this._isDisposed)throw new Error("EditableTextModel.pushStackElement: Model is disposed");this._commandManager.pushStackElement()},t.prototype.pushEditOperations=function(e,t,n){if(this._isDisposed)throw new Error("EditableTextModel.pushEditOperations: Model is disposed");return this._commandManager.pushEditOperation(e,t,n)},t.prototype.undo=function(){var e=this;if(this._isDisposed)throw new Error("EditableTextModel.undo: Model is disposed");return this._withDeferredEvents(function(){e._isUndoing=!0;var t=e._commandManager.undo();return e._isUndoing=!1,t?(e._overwriteAlternativeVersionId(t.recordedVersionId),t.selections):null})},t.prototype.redo=function(){var e=this;if(this._isDisposed)throw new Error("EditableTextModel.redo: Model is disposed");return this._withDeferredEvents(function(){e._isRedoing=!0;var t=e._commandManager.redo();return e._isRedoing=!1,t?(e._overwriteAlternativeVersionId(t.recordedVersionId),t.selections):null})},t.prototype.setEditableRange=function(e){if(this._isDisposed)throw new Error("EditableTextModel.setEditableRange: Model is disposed");this._commandManager.clear(),this._hasEditableRange&&(this.removeTrackedRange(this._editableRangeId),this._editableRangeId=null,this._hasEditableRange=!1),e&&(this._hasEditableRange=!0,this._editableRangeId=this.addTrackedRange(e,r.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges))},t.prototype.hasEditableRange=function(){if(this._isDisposed)throw new Error("EditableTextModel.hasEditableRange: Model is disposed");return this._hasEditableRange},t.prototype.getEditableRange=function(){if(this._isDisposed)throw new Error("EditableTextModel.getEditableRange: Model is disposed");return this._hasEditableRange?this.getTrackedRange(this._editableRangeId):this.getFullModelRange()},t.prototype.callInsertTextOnLine=function(e,t,n,i,r,o){this._lines[t].insertText(e,n,i,r),o&&(this._invalidateLine(t),this.emitModelContentChangedLineChangedEvent(t+1))},t.prototype.callDeleteTextOnLine=function(e,t,n,i,r,o,s){var a=this._lines[t].removeText(e,n,i,r,o);return s&&(this._invalidateLine(t),this.emitModelContentChangedLineChangedEvent(t+1)),a},t.prototype._updateLineNumbers=function(e,t){var n,i,r=this._lines;for(n=t-1,i=r.length;i>n;n++)r[n].updateLineNumber(e,n+1)},t.prototype._insertText=function(e,t,n,i){var r=this.validatePosition(t);if(0===n.length)return r;var o,s=n.split(/\r\n|\r|\n/);return o=1===s.length?this._insertTextOneLine(e,r,s[0],i):this._insertTextMultiline(e,r,s,i),this._emitContentChanged2(r.lineNumber,r.column,r.lineNumber,r.column,0,s.join(this.getEOL()),!1,!1),o},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.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);if(n.isEmpty())return{position:new s.Position(n.startLineNumber,n.startColumn),deletedText:""};var i,r=this.getValueLengthInRange(n);return i=n.startLineNumber===n.endLineNumber?this._deleteTextOneLine(e,n):this._deleteTextMultiline(e,n),this._emitContentChanged2(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn,r,"",!1,!1),i},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=[];for(r=n;i>=r;r++)o.push(this._lines[r].text),s=s.concat(this._lines[r].deleteLine(e,t,r+1));return this._lines.splice(n,i-n+1),{deletedText:o.join("\n"),deletedMarkers:s}},t.prototype._deleteTextMultiline=function(e,t){if(1===t.startColumn){var n=this._lines[t.startLineNumber-1].getState(),i=this._deleteWholeLines(e,t.startColumn,t.startLineNumber-1,t.endLineNumber-2);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].setState(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.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){this._increaseVersionId();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){this._increaseVersionId();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){this._increaseVersionId();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=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/model/model",["require","exports","vs/editor/core/model/textModel","vs/base/objects","vs/base/network","vs/editor/core/constants","vs/editor/core/model/editableTextModel","vs/editor/core/editorPluginHost","vs/editor/editor2"],function(e,t,n,i,r,o,s,a,u){var l=0,c=function(e){function t(t,i,s){void 0===s&&(s=null),e.call(this,[o.EventType.ModelPropertiesChanged,o.EventType.ModelDispose],n.TextModel.toRawText(t),i),this._facade=new d(this),l++,this.id="$model"+l,("undefined"==typeof s||null===s)&&(s=new r.URL("inmemory://model/"+l)),this._associatedResource=s,this._bindToMode(),this._extraProperties={},a.EditorPluginHost.INSTANCE.registerModel(this)}return __extends(t,e),t.prototype.getFacade=function(){return this._facade},t.prototype.destroy=function(){this.dispose()},t.prototype.dispose=function(){a.EditorPluginHost.INSTANCE.deregisterModel(this),this.emit(o.EventType.ModelDispose),this._unbindFromMode(),e.prototype.dispose.call(this)},t.prototype._resetMode=function(t,n){e.prototype._resetMode.call(this,t,n),t.oldMode.modelSyncSupport&&t.oldMode.modelSyncSupport.unbindModel(this),t.newMode.modelSyncSupport&&t.newMode.modelSyncSupport.bindModel(this)},t.prototype._bindToMode=function(){var e=this.getMode().modelSyncSupport;e&&e.bindModel(this)},t.prototype._unbindFromMode=function(){if(this.getMode()){var e=this.getMode().modelSyncSupport;e&&e.unbindModel(this)}},t.prototype.onBeforeAttached=function(){if(this._isDisposed)throw new Error("Model.onBeforeAttached: Model is disposed");this._warmUpTokens()},t.prototype.onBeforeDetached=function(){if(this._isDisposed)throw new Error("Model.onBeforeDetached: Model is disposed")},t.prototype.getAssociatedResource=function(){if(this._isDisposed)throw new Error("Model.getAssociatedResource: Model is disposed");return this._associatedResource},t.prototype.setProperty=function(e,t){if(this._isDisposed)throw new Error("Model.setProperty: Model is disposed");this._extraProperties[e]=t,this.emitModelPropertiesChangedEvent()},t.prototype.getProperty=function(e){if(this._isDisposed)throw new Error("Model.getProperty: Model is disposed");return this._extraProperties.hasOwnProperty(e)?this._extraProperties[e]:null},t.prototype.getProperties=function(){if(this._isDisposed)throw new Error("Model.getProperties: Model is disposed");return i.clone(this._extraProperties)},t.prototype.emitModelPropertiesChangedEvent=function(){var e={properties:this._extraProperties};this.emit(o.EventType.ModelPropertiesChanged,e)},t}(s.EditableTextModel);t.Model=c;var d=function(){function e(e){var t=this;this._model=e,this.events=new u.ModelEventsFacade,this._toDispose=[],this._toDispose.push(this._model.addBulkListener2(function(e){var n=e.map(function(e){return{type:e.getType(),data:e.getData()}});t.events.invoke(n)}))}return e.prototype.getValueInRange=function(e,t){return this._model.getValueInRange(e,t)},e.prototype.getLineMaxColumn=function(e){return this._model.getLineMaxColumn(e)},e.prototype.getEditableRange=function(){return this._model.getEditableRange()},e.prototype.getFullModelRange=function(){return this._model.getFullModelRange()},e.prototype.findMatches=function(e,t,n,i,r){return this._model.findMatches(e,t,n,i,r)},e}()});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/standalone/standaloneCodeEditor",["require","exports","vs/editor/core/codeEditorWidget","vs/editor/standalone/simpleServices","vs/platform/services","vs/editor/standalone/standaloneServices","vs/editor/modes/modesExtensions","vs/platform/platform","vs/editor/core/model/model","vs/base/lifecycle","vs/platform/instantiation/instantiationService","vs/editor/diff/diffEditorWidget"],function(e,t,n,i,r,o,s,a,u,l,c,d){function h(e){var t={};if(e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function p(e,t,n){E.initModesRegistryIfNecessary(),n=h(n);var r=null;n&&n.editorService||(r=new i.SimpleEditorService,n.editorService=r);var o=g(e,n),s=new w(o.ctx,e,t,o.toDispose);return r&&r.setEditor(s),s}function f(e,t,n){E.initModesRegistryIfNecessary(),n=h(n);var r=null;n&&n.editorService||(r=new i.SimpleEditorService,n.editorService=r);var o=g(e,n),s=new C(o.ctx,e,t,o.toDispose);return r&&r.setEditor(s),s}function g(e,t){t=o.ensureStaticPlatformServices(t);var n=o.ensureDynamicPlatformServices(e,t);return t.instantiationService=c.create(t),{ctx:t,toDispose:n}}function m(e,t,n){var i=b.lookup(t);t=i.length>0?i[0].modeId:"plain/text";var r=b.getMode(t);return r?new u.Model(e,r,n):new u.Model(e,b.getOrCreateMode(t),n)}function v(e,t,n){if(E.initModesRegistryIfNecessary(),"string"==typeof t)return m(e,t,n);var i=_(t);return new u.Model(e,i,n)}function y(e){return E.initModesRegistryIfNecessary(),b.getOrCreateMode(e)}function _(e){E.initModesRegistryIfNecessary(),s.registerCustomMonarchMode(e.name,e.name,[],new r.AsyncDescriptor("vs/editor/modes/monarch/monarch","DynamicMonarchMode",e));var t=a.Registry.as(s.Extensions.EditorModes);return t.getMode(e.name)}var b=a.Registry.as(s.Extensions.EditorModes),w=function(e){function t(t,n,i,r){this._handlerService=t.handlerService,this._contextViewService=t.contextViewService,this._editorService=t.editorService,this._markerService=t.markerService,this._toDispose2=r,i=i||{},"undefined"==typeof i.model?(i.model=self.Monaco.Editor.createModel(i.value||"",i.mode||"text/plain"),this._ownsModel=!0):this._ownsModel=!1,e.call(this,t,n,i)}return __extends(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._toDispose2=l.disposeAll(this._toDispose2)},t.prototype.destroy=function(){this.dispose()},t.prototype.getMarkerService=function(){return this._markerService},t.prototype.getHandlerService=function(){return this._handlerService},t.prototype.getTelemetryService=function(){return this._telemetryService},t.prototype.getEditorService=function(){return this._editorService},t.prototype._attachModel=function(t){e.prototype._attachModel.call(this,t),this._view&&this._contextViewService.setContainer(this._view.domNode)},t.prototype._postDetachModelCleanup=function(t){e.prototype._postDetachModelCleanup.call(this,t),t&&this._ownsModel&&(t.destroy(),this._ownsModel=!1)},t}(n.CodeEditorWidget),C=function(e){function t(t,n,i,r){this._handlerService=t.handlerService,this._contextViewService=t.contextViewService,this._editorService=t.editorService,this._markerService=t.markerService,this._telemetryService=t.telemetryService,this._toDispose2=r,i=i||{},e.call(this,t,n,i),this._contextViewService.setContainer(this._containerDomElement)}return __extends(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._toDispose2=l.disposeAll(this._toDispose2)},t.prototype.destroy=function(){this.dispose()},t.prototype.getMarkerService=function(){return this._markerService},t.prototype.getHandlerService=function(){return this._handlerService},t.prototype.getTelemetryService=function(){return this._telemetryService},t}(d.DiffEditorWidget),E=function(){var e=!1,t=!1;return{initModesRegistryIfNecessary:function(){if(!e){e=!0;var t=o.getOrCreateStaticServices();b.setThreadService(t.threadService)}},setupServices:function(n){return t?(console.error("Call to Monaco.Editor.setupServices is ignored because it was called before"),void 0):(t=!0,e?(console.error("Call to Monaco.Editor.setupServices is ignored because other API was called before"),void 0):o.ensureStaticPlatformServices(n))}}}();t.setupServices=E.setupServices,t.create=p,t.createDiffEditor=f,t.createModel=v,t.getOrCreateMode=y,t.createCustomMode=_}),define("vs/editor/standalone/f12standaloneEditor",["require","exports","vs/editor/standalone/colorizer","vs/editor/standalone/standaloneCodeEditor","vs/platform/services","vs/base/env"],function(e,t,n,i,r,o){var s="f12://",a=new r.BaseWorkspaceContextService({resource:s,id:null,name:null,path:null,alternatePath:null,telemetry:o.standaloneEditorTelemetryEndpoint,ctime:null,mtime:null,root:"/"},{paths:{PUBLIC_WORKSPACE_URL:s}});i.setupServices({contextService:a});var u=self;u.Monaco||(u.Monaco={});var l=u.Monaco;l.Editor||(l.Editor={}),l.Editor.setupServices=i.setupServices,l.Editor.create=i.create,l.Editor.createModel=i.createModel,l.Editor.createDiffEditor=i.createDiffEditor,l.Editor.getOrCreateMode=i.getOrCreateMode,l.Editor.createCustomMode=i.createCustomMode,l.Editor.colorize=n.colorize,l.Editor.colorizeElement=n.colorizeElement,l.Editor.colorizeLine=n.colorizeLine,l.Editor.colorizeModelLine=n.colorizeModelLine}),define("vs/languages/coffeescript/coffeescript.contribution",["require","exports","vs/editor/modes/modesExtensions"],function(e,t,n){n.registerMode("vs.languages.coffeescript","CoffeeScript",["text/x-coffeescript","text/coffeescript"],"vs/languages/coffeescript/coffeescript","CoffeeMode")}),define("vs/languages/css/level",["require","exports"],function(e,t){function n(e){switch(e){case"ignore":return i.Ignore;case"warning":return i.Warning;case"error":return i.Error}return null}!function(e){e[e.Ignore=1]="Ignore",e[e.Warning=2]="Warning",e[e.Error=4]="Error"}(t.Level||(t.Level={}));var i=t.Level;t.toLevel=n}),define("vs/languages/css/services/lintRules",["require","exports","vs/nls!vs/editor/editor.main","vs/languages/css/level"],function(e,t,n,i){function r(){var e={};for(var n in t.Rules){var i=t.Rules[n];e[i.id]=i.getConfiguration()}return e}function o(){var e={};for(var n in t.Rules){var i=t.Rules[n];e[i.id]=i.defaultValue}return e}function s(e){var n={};for(var r in t.Rules){var o=t.Rules[r],s=i.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),l),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),l),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),l),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=r,t.getDefaultSettings=o,t.sanitize=s}),define("vs/css!vs/languages/css/css-hover",["vs/css!vs/editor/editor.main"],{}),define("vs/languages/css/css.contribution",["require","exports","vs/nls!vs/editor/editor.main","vs/platform/platform","vs/editor/modes/modesExtensions","vs/platform/configuration/configurationRegistry","vs/base/env","vs/languages/css/services/lintRules","vs/css!vs/languages/css/css-hover"],function(e,t,n,i,r,o,s,a){r.registerMode("vs.languages.css","CSS",["text/css"],"vs/languages/css/css","CSSMode"),s.enableGlobalCSSRuleChecker&&r.registerWorkerParticipant("vs.languages.css","vs/languages/css/monacoParticipant","WorkerParticipant");var u=i.Registry.as(o.Extensions.Configuration);u.registerConfiguration({id:r.LANGUAGE_CONFIGURATION+"/vs.languages.css",type:"object",title:n.localize("vs_languages_css_css.contribution",0),description:n.localize("vs_languages_css_css.contribution",1),properties:{validationSettings:{description:n.localize("vs_languages_css_css.contribution",2),default:{lint:a.getDefaultSettings()},type:"object",properties:{lint:{type:"object",description:n.localize("vs_languages_css_css.contribution",3),properties:a.getConfigurationProperties()}}}}})}),define("vs/languages/csharp/csharp.contribution",["require","exports","vs/editor/modes/modesExtensions"],function(e,t,n){t.Id="vs.languages.csharp",n.registerMode(t.Id,"C#",["text/x-csharp"],"vs/languages/csharp/csharp","CSMode")}),define("vs/languages/html/html.contribution",["require","exports","vs/editor/modes/modesExtensions"],function(e,t,n){n.registerMode("vs.languages.html","HTML",["text/html","text/x-jshtm","text/template"],"vs/languages/html/html","HTMLMode")}),define("vs/languages/javascript/javascript.configuration",["require","exports","vs/base/severity","vs/base/collections"],function(e,t,n,i){var r=function(){function e(e){this._lintSettings=e,this._severities={},this._severities[2322]=this._severities[2323]=this._severities[2345]=n.fromValue(e.forcedTypeConversion),this._severities[2362]=this._severities[2363]=this._severities[2365]=this._severities[2356]=this._severities[2357]=n.fromValue(e.mixedTypesArithmetics),this._severities[2359]=this._severities[2358]=n.fromValue(e.primitivesInInstanceOf),this._severities[2339]=n.fromValue(e.unknownProperty),this._severities[2304]=n.fromValue(e.undeclaredVariables),this._severities[2403]=n.fromValue(e.redeclaredVariables),this._severities[2350]=n.fromValue(e.newOnReturningFunctions)}return e.prototype.classify=function(e){var t=e.code;return 2e3>t?n.Error:2339===t&&i.lookup(this._severities,t)!==n.Ignore&&/The property '[\w\d_]+' does not exist on value of type '(any|{})'\./.test(e.messageText)?n.Ignore:i.lookup(this._severities,t,n.Ignore)},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:"warning",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.extensions",["require","exports","vs/platform/platform"],function(e,t,n){var i;!function(e){function t(e){r=e}function i(){return r}e.Identifier="vs.languages.javascript",n.Registry.add(e.Identifier,e);var r;e.setProjectResolver=t,e.getProjectResolver=i}(i=t.Extensions||(t.Extensions={}))}),define("vs/languages/javascript/javascript.contribution",["require","exports","vs/nls!vs/editor/editor.main","vs/base/env","vs/platform/services","vs/platform/platform","vs/platform/configuration/configurationRegistry","vs/editor/modes/modesExtensions","./javascript.configuration","vs/languages/javascript/javascript.extensions"],function(e,t,n,i,r,o,s,a,u,l){a.registerMode("vs.languages.javascript","JavaScript",["text/javascript"],"vs/languages/javascript/javascript","JSMode"),a.registerWorkerParticipant("vs.languages.javascript","vs/languages/typescript/participants/filenameSuggestions","FilenameSuggestions"),i.enableJavaScriptRewriting&&(a.registerWorkerParticipant("vs.languages.javascript","vs/languages/typescript/js/importAndExportRewriter","ImportsAndExportsCollector"),a.registerWorkerParticipant("vs.languages.javascript","vs/languages/typescript/js/globalVariableRewriter","GlobalVariableCollector")),l.Extensions.setProjectResolver(new r.AsyncDescriptor("vs/languages/typescript/project/projectResolver","ProjectResolver",{modeId:"vs.languages.javascript",pattern:"{**/*.d.ts,**/*.js,**/_references.ts}"}));var c=o.Registry.as(s.Extensions.Configuration);c.registerConfiguration({id:a.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:u.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:u.defaultValidationSettings,type:"object",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)}}}}}}})}),define("vs/languages/json/json.contribution",["require","exports","vs/nls!vs/editor/editor.main","vs/platform/configuration/configurationRegistry","vs/platform/platform","vs/editor/modes/modesExtensions"],function(e,t,n,i,r,o){o.registerMode("vs.languages.json","JSON",["application/json"],"vs/languages/json/json","JSONMode");var s=r.Registry.as(i.Extensions.Configuration);s.registerConfiguration({id:o.LANGUAGE_CONFIGURATION+"/vs.languages.json",type:"object",title:n.localize("vs_languages_json_json.contribution",0),description:n.localize("vs_languages_json_json.contribution",1),properties:{schemas:{type:"array",description:n.localize("vs_languages_json_json.contribution",2),items:{type:"object",properties:{url:{type:"string",default:"/user.schema.json",description:n.localize("vs_languages_json_json.contribution",3)},fileMatch:{type:"array",items:{type:"string",default:"MyFile.json",description:n.localize("vs_languages_json_json.contribution",4)},minItems:1,description:n.localize("vs_languages_json_json.contribution",5)},schema:{type:"object",description:n.localize("vs_languages_json_json.contribution",6)}}},default:[{fileMatch:["/bower.json","/.bower.json"],url:"http://json.schemastore.org/bower"},{fileMatch:["/package.json"],url:"http://json.schemastore.org/package"},{fileMatch:["/project.json"],url:"http://json.schemastore.org/project"},{fileMatch:["*.schema.json"],url:"http://json-schema.org/draft-04/schema#"},{fileMatch:["/global.json"],url:"http://json.schemastore.org/global"}]}}})}),define("vs/languages/less/less.contribution",["require","exports","vs/platform/platform","vs/nls!vs/editor/editor.main","vs/languages/css/services/lintRules","vs/editor/modes/modesExtensions","vs/platform/configuration/configurationRegistry","vs/css!vs/languages/css/css-hover"],function(e,t,n,i,r,o,s){o.registerMode("less","Less",["text/x-less","text/less"],"vs/languages/less/less","LESSMode");var a=n.Registry.as(s.Extensions.Configuration);a.registerConfiguration({id:o.LANGUAGE_CONFIGURATION+"/less",type:"object",title:i.localize("vs_languages_less_less.contribution",0),description:i.localize("vs_languages_less_less.contribution",1),properties:{validationSettings:{description:i.localize("vs_languages_less_less.contribution",2),type:"object",default:{lint:r.getDefaultSettings()},properties:{lint:{type:"object",description:i.localize("vs_languages_less_less.contribution",3),properties:r.getConfigurationProperties()}}}}})}),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","Plain Text",["text/plain"],"vs/languages/plaintext/plaintext","Mode")}),define("vs/languages/sass/sass.contribution",["require","exports","vs/editor/modes/modesExtensions","vs/platform/platform","vs/nls!vs/editor/editor.main","vs/languages/css/services/lintRules","vs/platform/configuration/configurationRegistry","vs/css!vs/languages/css/css-hover"],function(e,t,n,i,r,o,s){n.registerMode("sass","Sass",["text/x-scss","text/scss"],"vs/languages/sass/sass","SASSMode");var a=i.Registry.as(s.Extensions.Configuration);a.registerConfiguration({id:n.LANGUAGE_CONFIGURATION+"/sass",type:"object",title:r.localize("vs_languages_sass_sass.contribution",0),description:r.localize("vs_languages_sass_sass.contribution",1),properties:{validationSettings:{description:r.localize("vs_languages_sass_sass.contribution",2),type:"object",default:{lint:o.getDefaultSettings()},properties:{lint:{type:"object",description:r.localize("vs_languages_sass_sass.contribution",3),properties:o.getConfigurationProperties()}}}}})}),define("vs/base/trie",["require","exports","vs/base/collections","vs/base/assert"],function(e,t,n,i){function r(e,t){void 0===t&&(t=p);var i,r;return i={_key:null,_parent:null,_children:{},parent:function(){return null},children:function(e){return void 0===e&&(e=!1),u(this,e)}},r={insert:function(e,n){return o(i,t(e),n)},lookUp:function(e,n){return void 0===n&&(n=!1),s(i,t(e),n)},roots:function(){return u(i,!1)},values:function(){return l(i)},fringe:function(){return c(i)},remove:function(e){return d(e)}},"undefined"!=typeof e&&n.forEach(e,function(e){r.insert(e.key,e.value)}),r}function o(e,t,n){for(var i=0,r=t.length,o=e;r>i&&(o=e._children[t[i]]);)e=o,i+=1;for(;r>i;)o={_key:t[i],_parent:e,_children:{},parent:function(){return a(this)},children:function(e){return void 0===e&&(e=!1),u(this,e)}},e._children[t[i]]=o,e=o,i+=1;return o.element=n,o}function s(e,t,n){for(var i=0,r=t.length,o=e,s=void 0!==o.element?o:void 0;r>i&&(o=e._children[t[i]]);)e=o,i+=1,void 0!==o.element&&(s=o);return o&&void 0!==o.element?o:n&&void 0!==s?s:null}function a(e){for(;e._parent;){if("undefined"!=typeof e._parent.element)return e._parent;e=e._parent}return null}function u(e,t){for(var i=[],r=n.values(e._children);r.length>0;)e=r.shift(),void 0!==e.element&&i.push(e),(t||void 0===e.element)&&r.push.apply(r,n.values(e._children));return i}function l(e){for(var t=[],i=[e];i.length>0;)e=i.pop(),void 0!==e.element&&t.push(e.element),n.forEach(e._children,function(e){i.push(e.value)});return t}function c(e){for(var t=[e],r=[];t.length>0;){var o=t.pop(),s=t.length;n.forEach(o._children,function(e){t.push(e.value)}),s===t.length&&null!==o._key&&(i.ok("undefined"!=typeof o.element),r.push(o))}return r}function d(e){return e._parent?e._parent._children[e._key]!==e?!1:(delete e._parent._children[e._key],"undefined"==typeof e._parent.element&&h(e._parent._children)&&d(e._parent),!0):!1}function h(e){if(!e)return!0;for(var t in e)if(f.call(e,t))return!1;return!0}var p=function(e){return e.split("")};t.newTrie=r;var f=Object.prototype.hasOwnProperty}),define("vs/languages/typescript/typescript.configuration",["require","exports","vs/base/objects","vs/base/severity","vs/base/paths","vs/base/trie","vs/base/strings"],function(e,t,n,i,r,o,s){function a(e,t,n){return e instanceof l?e:new l(e,t,n)}function u(e,t){return e instanceof l&&(e=e.raw),t instanceof l&&(t=t.raw),n.equals(e,t)}t.impilictAnyClassifier=function(e){return e.code>=7005&&e.code<=7018?i.Warning:i.Error},t.defaultLintSettings={emptyBlocksWithoutComment:"ignore",curlyBracketsMustNotBeOmitted:"ignore",comparisonOperatorsNotStrict:"ignore",missingSemicolon:"ignore",unknownTypeOfResults:"ignore",semicolonsInsteadOfBlocks:"ignore",functionsInsideLoops:"ignore",functionsWithoutReturnType:"ignore",tripleSlashReferenceAlike:"ignore",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.defaultSuggestSettings={alwaysAllWords:!1,useCodeSnippetsOnMethodSuggest:!1};var l=function(){function e(e,t,n){this._raw=e,this._defaultCompileSettings=t,this._defaultSuggestSettings=n}return Object.defineProperty(e.prototype,"raw",{get:function(){return this._raw},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validationSettings",{get:function(){return this._compileSettings||(this._compileSettings=this._ensureCompileSettings()),this._compileSettings.slice(0)},enumerable:!0,configurable:!0}),e.prototype._ensureCompileSettings=function(){var e=this;if(!this._raw||!this._raw.validationSettings)return[this._defaultCompileSettings];if(Array.isArray(this._raw.validationSettings)){if(0===this._raw.validationSettings.length)return[this._defaultCompileSettings]}else this._raw.validationSettings=[this._raw.validationSettings];var t=o.newTrie(),i=[],a=!1;this._raw.validationSettings.forEach(function(e){var i,o=e.scope;s.isFalsyOrWhitespace(o)?o=r.sep:(o=r.makeAbsolute(o),o=r.normalize(o)),e.scope=o,a=a||o===r.sep,s.isFalsyOrWhitespace(e.module)&&!s.isFalsyOrWhitespace(e.moduleGenTarget)&&(e.module=e.moduleGenTarget),s.isFalsyOrWhitespace(e.target)&&!s.isFalsyOrWhitespace(e.codeGenTarget)&&(e.target=e.codeGenTarget),i=t.lookUp(e.scope),i&&(e=n.withDefaults(e,i.element)),t.insert(e.scope,e)}),a||t.insert(r.sep,this._defaultCompileSettings);for(var u;(u=t.fringe()).length>0;)u.forEach(function(o){for(var s=o.element,a=o.parent(),u=[e._defaultCompileSettings];null!==a;)u.push(a.element),a=a.parent();for(;0!==u.length;)s=n.withDefaults(s,u.pop());s.baseUrl=r.normalize(s.baseUrl),s.baseUrl=r.makeAbsolute(s.baseUrl),t.remove(o),i.unshift(s)});
return i.sort(function(e,t){return e.scope.length-t.scope.length}),i},Object.defineProperty(e.prototype,"suggestSettings",{get:function(){return this._suggestSettings||(this._suggestSettings=this._raw&&this._raw.suggestSettings?n.withDefaults(this._raw.suggestSettings,this._defaultSuggestSettings):this._defaultSuggestSettings),n.clone(this._suggestSettings)},enumerable:!0,configurable:!0}),e}();t.sanitize=a,t.equal=u}),define("vs/languages/typescript/typescript",["require","exports","vs/platform/platform"],function(e,t,n){var i;!function(e){e.ResourceSetChanged="typescript.resourceSetChanged"}(i=t.Events||(t.Events={}));var r;!function(e){function t(e){r=e}function i(){return r}e.Identifier="vs.languages.typescript",n.Registry.add(e.Identifier,e);var r;e.setProjectResolver=t,e.getProjectResolver=i}(r=t.Extensions||(t.Extensions={}))}),define("vs/css!vs/languages/typescript/typescript",["vs/css!vs/editor/editor.main"],{}),define("vs/languages/typescript/typescript.contribution",["require","exports","vs/nls!vs/editor/editor.main","vs/base/env","vs/platform/services","vs/platform/platform","vs/editor/modes/modesExtensions","vs/platform/configuration/configurationRegistry","./typescript.configuration","vs/languages/typescript/typescript","vs/css!./typescript"],function(e,t,n,i,r,o,s,a,u,l){l.Extensions.setProjectResolver(new r.AsyncDescriptor("vs/languages/typescript/project/projectResolver","ProjectResolver",{modeId:"vs.languages.typescript",pattern:"**/*.ts"})),i.enableTypeScriptServiceMode?s.registerMode("vs.languages.typescript","TypeScript",["text/typescript"],"vs/languages/typescript/service/typescriptServiceMode","TypeScriptServiceMode"):s.registerMode("vs.languages.typescript","TypeScript",["text/typescript"],"vs/languages/typescript/typescriptMode","TypeScriptMode"),i.enableNLSWarnings&&s.registerWorkerParticipant("vs.languages.typescript","vs/languages/typescript/participants/nlsParticipant","WorkerParticipant"),s.registerWorkerParticipant("vs.languages.typescript","vs/languages/typescript/participants/filenameSuggestions","FilenameSuggestions");var c=o.Registry.as(a.Extensions.Configuration);c.registerConfiguration({id:s.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:u.defaultSuggestSettings,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)}}},validationSettings:{description:n.localize("vs_languages_typescript_typescript.contribution",5),default:u.defaultValidationSettings,type:"object",properties:{scope:{type:"string",default:"/",description:n.localize("vs_languages_typescript_typescript.contribution",6)},baseUrl:{type:"string",default:"",description:n.localize("vs_languages_typescript_typescript.contribution",7)},target:{enum:["ES5","ES3"],default:"ES5",description:n.localize("vs_languages_typescript_typescript.contribution",8)},module:{enum:["commonjs","amd",""],default:"",description:n.localize("vs_languages_typescript_typescript.contribution",9)},noImplicitAny:{type:"boolean",default:!1,description:n.localize("vs_languages_typescript_typescript.contribution",10)},noLib:{type:"boolean",default:!1,description:n.localize("vs_languages_typescript_typescript.contribution",11)},lint:{type:"object",description:n.localize("vs_languages_typescript_typescript.contribution",12),properties:{curlyBracketsMustNotBeOmitted:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",13)},emptyBlocksWithoutComment:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",14)},comparisonOperatorsNotStrict:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",15)},missingSemicolon:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",16)},reservedKeywords:{enum:["ignore","warning","error"],default:"error",description:n.localize("vs_languages_typescript_typescript.contribution",17)},typeScriptSpecifics:{enum:["ignore","warning","error"],default:"error",description:n.localize("vs_languages_typescript_typescript.contribution",18)},unknownTypeOfResults:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",19)},semicolonsInsteadOfBlocks:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",20)},functionsInsideLoops:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",21)},newOnLowercaseFunctions:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",22)},tripleSlashReferenceAlike:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",23)},unusedVariables:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",24)},unusedFunctions:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",25)},unusedMembers:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",26)},functionsWithoutReturnType:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",27)}}}}}}})}),define("vs/languages/xml/xml.contribution",["require","exports","vs/editor/modes/modesExtensions"],function(e,t,n){n.registerMode("vs.languages.xml","XML",["text/xml","application/xml","application/xaml+xml"],"vs/languages/xml/xml","XMLMode")}),require.config({ignoreDuplicateModules:["vs/languages/vsxml/vsxml"]}),define("vs/editor/editor.main",["./contrib/comment/comment","./contrib/diffNavigator/diffNavigator","./contrib/links/links","./contrib/quickOpen/gotoLine.contribution","./contrib/quickOpen/quickOutline.contribution","./contrib/smartSelect/smartSelect","./contrib/smartSelect/jumpToBracket","./contrib/wordHighlighter/wordHighlighter","./contrib/zoneWidget/zoneWidget","./core/codeEditorWidget","./diff/diffEditorWidget","./languages.common","./standalone/f12standaloneEditor","vs/languages/coffeescript/coffeescript.contribution","vs/languages/css/css.contribution","vs/languages/csharp/csharp.contribution","vs/languages/html/html.contribution","vs/languages/javascript/javascript.contribution","vs/languages/json/json.contribution","vs/languages/less/less.contribution","vs/languages/plaintext/plaintext.contribution","vs/languages/sass/sass.contribution","vs/languages/typescript/typescript.contribution","vs/languages/xml/xml.contribution"],function(){});
/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/editor/editor.main.nls.keys",[],{vs_base_strings:{path:"vs/base/strings.js",keys:["format.date","format.time","diff.seconds","diff.minutes","diff.hours","diff.days","diff.seconds.verbose","diff.minute.verbose","diff.minutes.verbose","diff.hour.verbose","diff.hours.verbose","diff.days.yesterday","diff.days.week","diff.days.month","diff.days.verbose"]},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.defaultMessage","error.defaultMessage","error.defaultMessage","notImplementedError","illegalArgumentError","illegalArgumentError2","illegalStateError","illegalStateError2","loaderError","loaderErrorNative"]},vs_editor_contrib_comment_comment:{path:"vs/editor/contrib/comment/comment.js",keys:["comment.line","comment.block"]},vs_editor_contrib_links_links:{path:"vs/editor/contrib/links/links.js",keys:["links.navigate.mac","links.navigate","links.navigate.editor.mac","links.navigate.editor","label"]},vs_base_ui_widgets_actionbar:{path:"vs/base/ui/widgets/actionbar.js",keys:["titleLabel","actionBarAccessibleLabel"]},vs_editor_contrib_quickOpen_gotoLine:{path:"vs/editor/contrib/quickOpen/gotoLine.js",keys:["gotoLineLabelValidLineAndColumn","gotoLineLabelValidLine","gotoLineLabelEmptyWithLineLimit","gotoLineLabelEmptyWithLineAndColumnLimit","GotoLineAction.label","gotoLineActionInput"]},"vs_editor_contrib_quickOpen_gotoLine.contribution":{path:"vs/editor/contrib/quickOpen/gotoLine.contribution.js",keys:["label"]},vs_editor_contrib_quickOpen_quickOutline:{path:"vs/editor/contrib/quickOpen/quickOutline.js",keys:["QuickOutlineAction.label","quickOutlineActionInput","symbols","modules","class","interface","method","function","property","variable","variable2","_constructor","call"]},"vs_editor_contrib_quickOpen_quickOutline.contribution":{path:"vs/editor/contrib/quickOpen/quickOutline.contribution.js",keys:["label"]},vs_editor_contrib_smartSelect_smartSelect:{path:"vs/editor/contrib/smartSelect/smartSelect.js",keys:["smartSelect.grow","smartSelect.shrink"]},vs_editor_contrib_smartSelect_jumpToBracket:{path:"vs/editor/contrib/smartSelect/jumpToBracket.js",keys:["smartSelect.jumpBracket"]},vs_platform_configuration_configurationRegistry:{path:"vs/platform/configuration/configurationRegistry.js",keys:["masterConfigTitle","masterConfigDesc","masterTypeDesc","masterLanguageDesc"]},vs_editor_core_config_configuration:{path:"vs/editor/core/config/configuration.js",keys:["editorConfigurationTitle","editorConfigurationDescription","lineNumbers","glyphMargin","tabSize","insertSpaces","roundedSelection","scrollBeyondLastLine","wrappingColumn","quickSuggestions","quickSuggestionsDelay","autoClosingBrackets","formatOnType","suggestOnTriggerCharacters","selectionHighlight","overviewRulerLanes","hideCursorInOverviewRuler","renderWhitespace","consoleConfigurationTitle","consoleConfigurationDescription","lineNumbers","glyphMarginVisibility","roundedSelection","wrappingColumn","quickSuggestionsDelay","scrollBeyondLastLineConsole","hideCursorInOverviewRuler"]},vs_editor_core_controller_cursor:{path:"vs/editor/core/controller/cursor.js",keys:["corrupt.commands"]},vs_editor_core_view_viewImpl:{path:"vs/editor/core/view/viewImpl.js",keys:["editorViewAccessibleLabel"]},vs_base_severity:{path:"vs/base/severity.js",keys:["sev.error","sev.warning","sev.info"]},vs_editor_core_model_textModelWithTokens:{path:"vs/editor/core/model/textModelWithTokens.js",keys:["mode.tokenizationSupportFailed"]},vs_platform_handlerService:{path:"vs/platform/handlerService.js",keys:["ctrlKey","shiftKey","altKey","cmdKey","windowsKey"]},vs_languages_css_services_lintRules:{path:"vs/languages/css/services/lintRules.js",keys:["rule.vendorprefixes.all","rule.standardvendorprefix.all","rule.duplicateDeclarations","rule.emptyRuleSets","rule.importDirective","rule.withHeightAndBorderPadding","rule.universalSelector","rule.zeroWidthUnit","rule.fontFaceProperties","rule.hexColor","rule.colorFunction","rule.unkownProperty","rule.unkownVendorSpecificProperty","rule.propertyIgnoredDueToDisplay","rule.avoidImportant","rule.avoidFloat","rule.avoidIdSelector"]},"vs_languages_css_css.contribution":{path:"vs/languages/css/css.contribution.js",keys:["cssConfigurationTitle","cssConfigurationDescription","validationSettings","lint"]},"vs_languages_javascript_javascript.contribution":{path:"vs/languages/javascript/javascript.contribution.js",keys:["jsConfigurationTitle","jsConfigurationDescription","suggestSettings","allwaysAllWords","useCodeSnippetsOnMethodSuggest","compilationSettings","scope","baseUrl","target","module","noLib","lint","lint.curlyBracketsMustNotBeOmitted","lint.emptyBlocksWithoutComment","lint.comparisonOperatorsNotStrict","lint.missingSemicolon","lint.reservedKeywords","lint.typeScriptSpecifics","lint.unknownTypeOfResults","lint.semicolonsInsteadOfBlocks","lint.functionsInsideLoops","lint.newOnLowercaseFunctions","lint.tripleSlashReferenceAlike","lint.unusedVariables","lint.unusedFunctions","lint.newOnReturningFunctions","lint.redeclaredVariables","lint.undeclaredVariables","lint.unknownProperty","lint.primitivesInInstanceOf","lint.mixedTypesArithmetics","lint.forcedTypeConversion"]},"vs_languages_json_json.contribution":{path:"vs/languages/json/json.contribution.js",keys:["jsonConfigurationTitle","jsonConfigurationDescription","jsonConfiguration.schemas","jsonConfiguration.schemaPath","jsonConfiguration.fileMatch","jsonConfiguration.fileMatches","jsonConfiguration.schema"]},"vs_languages_less_less.contribution":{path:"vs/languages/less/less.contribution.js",keys:["lessConfigurationTitle","lessConfigurationDescription","lessValidationSettings","lessLint"]},"vs_languages_sass_sass.contribution":{path:"vs/languages/sass/sass.contribution.js",keys:["sassConfigurationTitle","sassConfigurationDescription","sassValidationSettings","sassLint"]},"vs_languages_typescript_typescript.contribution":{path:"vs/languages/typescript/typescript.contribution.js",keys:["tsConfigurationTitle","tsConfigurationDescription","suggestSettings","allwaysAllWords","useCodeSnippetsOnMethodSuggest","compilationSettings","scope","baseUrl","target","module","noImplicitAny","noLib","lint","lint.curlyBracketsMustNotBeOmitted","lint.emptyBlocksWithoutComment","lint.comparisonOperatorsNotStrict","lint.missingSemicolon","lint.reservedKeywords","lint.typeScriptSpecifics","lint.unknownTypeOfResults","lint.semicolonsInsteadOfBlocks","lint.functionsInsideLoops","lint.newOnLowercaseFunctions","lint.tripleSlashReferenceAlike","lint.unusedVariables","lint.unusedFunctions","lint.unusedMembers","lint.functionsWithoutReturnType"]}});<svg xmlns="http://www.w3.org/2000/svg" width="300" height="40"><path d="M288.483 33c-.772 0-1.497-.123-2.153-.365-.678-.253-1.27-.617-1.76-1.084-.5-.475-.892-1.049-1.163-1.704-.27-.644-.407-1.371-.407-2.158 0-.517.061-1.018.178-1.49.116-.47.29-.925.516-1.348.225-.422.508-.815.844-1.167.334-.352.717-.656 1.139-.905.416-.246.881-.44 1.38-.576.493-.134 1.026-.202 1.587-.202.705 0 1.382.109 2.013.324.642.217 1.218.538 1.708.955.501.425.903.948 1.193 1.556.294.623.442 1.316.442 2.064 0 .619-.09 1.185-.268 1.679-.178.492-.42.92-.721 1.275-.331.377-.699.658-1.104.847l-.048.022v1.53l-.587.266c-.128.059-.288.117-.474.179-.193.062-.404.114-.645.159-.229.04-.477.076-.753.103-.27.027-.578.04-.917.04z" fill="#2D2D2D"/><path d="M291.716 24.041c-.396-.336-.856-.593-1.384-.771-.527-.18-1.09-.271-1.689-.271-.473 0-.912.055-1.324.167-.414.112-.791.27-1.135.473-.342.202-.65.446-.922.733-.273.286-.502.602-.686.949-.186.347-.33.722-.428 1.119-.1.399-.148.814-.148 1.247 0 .652.109 1.247.332 1.776.219.531.53.984.928 1.361.396.378.871.667 1.416.87.548.202 1.152.304 1.808.304.302 0 .577-.011.823-.035.246-.023.468-.056.664-.091.195-.036.366-.078.514-.125l.375-.14v-.854l-.463.184c-.16.056-.336.104-.521.143-.188.037-.387.069-.604.089-.213.024-.448.034-.7.034-.562 0-1.064-.088-1.509-.264-.442-.176-.816-.421-1.125-.731-.309-.314-.545-.687-.708-1.124-.161-.435-.243-.913-.243-1.432 0-.545.09-1.053.273-1.522.182-.471.435-.879.758-1.225.324-.345.708-.617 1.155-.815.446-.196.934-.294 1.457-.294.419 0 .798.044 1.122.136.329.091.62.215.871.369.254.158.465.339.643.547.179.209.324.432.438.667.113.237.193.48.246.731.051.254.076.5.076.741 0 .344-.033.653-.102.926-.068.274-.158.503-.269.694-.11.189-.239.335-.386.434s-.295.148-.453.148l-.215-.045c-.066-.029-.119-.08-.166-.156-.046-.075-.082-.177-.107-.306-.025-.126-.039-.292-.039-.492l.018-.325.041-.53.055-.644.058-.647.048-.546.027-.344h-.919l-.054.6h-.021c-.025-.103-.07-.195-.136-.281-.063-.083-.141-.155-.233-.216-.091-.061-.193-.106-.307-.141-.115-.033-.238-.048-.369-.048-.337 0-.646.07-.924.216-.281.144-.518.344-.721.599-.201.254-.355.556-.465.905-.115.35-.17.726-.17 1.134 0 .344.045.645.135.901.088.26.211.473.359.646.153.171.329.3.534.382.2.086.415.129.641.129.176 0 .342-.027.499-.081.154-.052.302-.13.432-.232.134-.104.248-.23.348-.38.102-.149.182-.323.236-.52h.027c0 .376.101.674.307.893.207.22.502.33.889.33.292 0 .58-.064.863-.198.283-.132.536-.328.762-.586.223-.262.404-.583.543-.966.138-.384.208-.83.208-1.34 0-.605-.117-1.15-.345-1.634-.231-.482-.546-.891-.939-1.225m-2.368 3.774c-.056.277-.136.517-.246.719-.109.203-.246.363-.407.481-.163.115-.354.176-.572.176-.12 0-.236-.025-.344-.078-.108-.052-.206-.13-.289-.232-.081-.103-.148-.234-.198-.39-.046-.156-.07-.337-.07-.547 0-.237.027-.481.08-.729.056-.247.137-.473.25-.677.109-.2.25-.363.416-.492.165-.127.361-.191.582-.191.123 0 .234.021.34.063.107.042.198.107.279.196.08.087.145.197.189.33.043.134.07.294.07.48 0 .317-.031.615-.08.891" fill="#C5C5C5"/><path d="M288.483 13c-.772 0-1.497-.123-2.153-.365-.678-.253-1.27-.617-1.76-1.084-.5-.475-.892-1.049-1.163-1.704-.269-.644-.407-1.371-.407-2.159 0-.517.061-1.018.178-1.49.116-.47.29-.925.516-1.348.225-.422.508-.815.844-1.167.334-.352.717-.656 1.139-.905.416-.246.881-.44 1.38-.576.492-.134 1.025-.202 1.586-.202.705 0 1.382.109 2.013.324.642.217 1.218.538 1.708.955.501.425.903.948 1.193 1.556.295.624.443 1.317.443 2.065 0 .619-.09 1.185-.268 1.679-.178.492-.42.92-.721 1.275-.331.377-.699.658-1.104.847l-.048.022v1.53l-.587.266c-.128.059-.288.117-.474.179-.193.062-.404.114-.645.159-.229.04-.477.076-.753.103-.27.027-.578.04-.917.04z" fill="#F3F3F3"/><path d="M291.716 4.041c-.396-.336-.856-.593-1.384-.771-.527-.179-1.09-.27-1.689-.27-.473 0-.912.055-1.324.167-.414.112-.791.27-1.135.473-.342.202-.65.446-.922.733-.273.286-.502.602-.686.949-.186.347-.33.722-.428 1.119-.099.4-.148.815-.148 1.247 0 .652.109 1.247.332 1.776.219.531.53.984.928 1.361.396.378.871.667 1.416.87.548.202 1.152.304 1.808.304.302 0 .577-.011.823-.035.246-.023.468-.056.664-.091.195-.036.366-.078.514-.125l.375-.14v-.854l-.463.184c-.16.056-.336.104-.521.143-.188.037-.387.069-.604.089-.213.024-.448.034-.7.034-.562 0-1.064-.088-1.509-.264-.442-.176-.816-.421-1.125-.731-.309-.314-.545-.687-.708-1.124-.161-.435-.243-.913-.243-1.432 0-.545.09-1.053.273-1.522.182-.471.435-.879.758-1.225.324-.345.708-.617 1.155-.815.446-.196.934-.294 1.457-.294.419 0 .798.044 1.122.136.329.091.62.215.871.369.254.158.465.339.643.547.179.209.324.432.438.667.113.237.193.48.246.731.051.254.076.5.076.741 0 .344-.033.653-.102.926-.068.274-.158.503-.269.694-.11.189-.239.335-.386.434s-.295.148-.453.148l-.215-.045c-.066-.029-.119-.08-.166-.156-.046-.075-.082-.177-.107-.306-.025-.126-.039-.292-.039-.492l.018-.325.041-.53.055-.644.058-.647.048-.546.027-.344h-.919l-.054.6h-.021c-.025-.103-.07-.195-.136-.281-.063-.083-.141-.155-.233-.216-.091-.061-.193-.106-.307-.141-.115-.033-.238-.048-.369-.048-.337 0-.646.07-.924.216-.281.144-.518.344-.721.599-.201.254-.355.556-.465.905-.115.35-.17.726-.17 1.134 0 .344.045.645.135.901.088.26.211.473.359.646.153.171.329.3.534.382.2.086.415.129.641.129.176 0 .342-.027.499-.081.154-.052.302-.13.432-.232.134-.104.248-.23.348-.38.102-.149.182-.323.236-.52h.027c0 .376.101.674.307.893.207.22.502.33.889.33.292 0 .58-.064.863-.198.283-.132.536-.328.762-.586.223-.262.404-.583.543-.966.138-.385.208-.831.208-1.341 0-.605-.117-1.15-.345-1.634-.231-.482-.546-.891-.939-1.225m-2.368 3.774c-.056.277-.136.517-.246.719-.109.203-.246.363-.407.481-.163.115-.354.176-.572.176-.12 0-.236-.025-.344-.078-.108-.052-.206-.13-.289-.232-.081-.103-.148-.234-.198-.39-.046-.156-.07-.337-.07-.547 0-.237.027-.481.08-.729.056-.247.137-.473.25-.677.109-.2.25-.363.416-.492.165-.127.361-.191.582-.191.123 0 .234.021.34.063.107.042.198.107.279.196.08.087.145.197.189.33.043.134.07.294.07.48 0 .317-.031.615-.08.891" fill="#424242"/><path d="M264 37v-14h8.625l3.375 3.556v10.444h-12z" fill="#2D2D2D"/><path d="M272 24h-7v12h10v-9l-3-3zm2 11h-8v-10h5v3h3v7z" fill="#C5C5C5"/><polygon points="266,25 271,25 271,28 274,28 274,35 266,35" fill="#2D2D2D"/><path d="M264 17v-14h8.625l3.375 3.556v10.444h-12z" fill="#F3F3F3"/><path d="M272 4h-7v12h10v-9l-3-3zm2 11h-8v-10h5v3h3v7z" fill="#424242"/><polygon points="266,5 271,5 271,8 274,8 274,15 266,15" fill="#F0EFF1"/><polygon points="247,34 247,30 245,30 245,26 255,26 255,34" fill="#2D2D2D"/><path d="M254 29h-8v-2h8v2zm0 1h-6v1h6v-1zm0 2h-6v1h6v-1z" fill="#C5C5C5"/><polygon points="247,14 247,10 245,10 245,6 255,6 255,14" fill="#F3F3F3"/><path d="M254 9h-8v-2h8v2zm0 1h-6v1h6v-1zm0 2h-6v1h6v-1z" fill="#424242"/><path d="M230.5 22c-4.143 0-7.5 3.357-7.5 7.5s3.357 7.5 7.5 7.5 7.5-3.357 7.5-7.5-3.357-7.5-7.5-7.5zm0 11c-1.933 0-3.5-1.566-3.5-3.5s1.567-3.5 3.5-3.5 3.5 1.566 3.5 3.5-1.567 3.5-3.5 3.5z" fill="#2D2D2D"/><path d="M224.025 29c.108-1.418.669-2.708 1.542-3.726l1.431 1.431c-.516.646-.851 1.43-.947 2.295h-2.026zm2.973 3.295c-.516-.646-.851-1.43-.947-2.295h-2.025c.108 1.418.669 2.707 1.542 3.726l1.43-1.431zm4.002-9.27v2.025c.865.097 1.649.432 2.295.947l1.431-1.431c-1.018-.872-2.308-1.432-3.726-1.541zm-3.295 2.973c.646-.516 1.43-.851 2.295-.947v-2.025c-1.418.108-2.708.669-3.726 1.542l1.431 1.43zm6.297.707c.516.646.851 1.43.947 2.295h2.025c-.108-1.418-.669-2.708-1.542-3.726l-1.43 1.431zm-4.002 7.244c-.865-.097-1.649-.432-2.295-.947l-1.431 1.431c1.018.873 2.307 1.434 3.726 1.542v-2.026zm4.949-3.949c-.097.865-.432 1.648-.947 2.295l1.431 1.431c.873-1.019 1.434-2.308 1.542-3.726h-2.026zm-1.654 3.002c-.646.516-1.43.851-2.295.947v2.025c1.419-.108 2.708-.669 3.726-1.542l-1.431-1.43z" fill="#C5C5C5"/><path d="M230.5 2c-4.143 0-7.5 3.358-7.5 7.5 0 4.143 3.357 7.5 7.5 7.5s7.5-3.357 7.5-7.5c0-4.142-3.357-7.5-7.5-7.5zm0 11c-1.933 0-3.5-1.566-3.5-3.5 0-1.933 1.567-3.5 3.5-3.5s3.5 1.567 3.5 3.5c0 1.934-1.567 3.5-3.5 3.5z" fill="#F3F3F3"/><path d="M224.025 9c.108-1.418.669-2.708 1.542-3.726l1.431 1.431c-.516.646-.851 1.43-.947 2.294h-2.026zm2.973 3.295c-.516-.646-.851-1.43-.947-2.295h-2.025c.108 1.418.669 2.707 1.542 3.726l1.43-1.431zm4.002-9.27v2.025c.865.097 1.649.432 2.295.948l1.431-1.431c-1.018-.873-2.308-1.433-3.726-1.542zm-3.295 2.974c.646-.516 1.43-.851 2.295-.948v-2.026c-1.418.108-2.708.669-3.726 1.542l1.431 1.432zm6.297.707c.516.646.851 1.43.947 2.294h2.025c-.108-1.418-.669-2.708-1.542-3.726l-1.43 1.432zm-4.002 7.243c-.865-.097-1.649-.432-2.295-.947l-1.431 1.431c1.018.873 2.307 1.434 3.726 1.542v-2.026zm4.949-3.949c-.097.865-.432 1.648-.947 2.295l1.431 1.431c.873-1.019 1.434-2.308 1.542-3.726h-2.026zm-1.654 3.002c-.646.516-1.43.851-2.295.947v2.025c1.419-.108 2.708-.669 3.726-1.542l-1.431-1.43z" fill="#424242"/><rect x="202" y="23" width="16" height="14" fill="#2D2D2D"/><path d="M203 24v12h14v-12h-14zm13 11h-12v-10h12v10zm-6-7v-1h-1v5h3v-4h-2zm1 3h-1v-2h1v2zm3-2v2h1v1h-2v-4h2v1h-1zm-6-1v4h-3v-2h1v1h1v-1h-1v-1h-1v-1h3z" fill="#C5C5C5"/><path d="M210 29h1v2h-1v-2zm-3 2v-1h-1v1h1zm9-6v10h-12v-10h12zm-8 3h-3v1h1v1h-1v2h3v-4zm4 0h-2v-1h-1v5h3v-4zm3 0h-2v4h2v-1h-1v-2h1v-1z" fill="#2D2D2D"/><rect x="202" y="3" width="16" height="14" fill="#F3F3F3"/><path d="M203 4v12h14v-12h-14zm13 11h-12v-10h12v10zm-6-7v-1h-1v5h3v-4h-2zm1 3h-1v-2h1v2zm3-2v2h1v1h-2v-4h2v1h-1zm-6-1v4h-3v-2h1v1h1v-1h-1v-1h-1v-1h3z" fill="#424242"/><path d="M210 9h1v2h-1v-2zm-3 2v-1h-1v1h1zm9-6v10h-12v-10h12zm-8 3h-3v1h1v1h-1v2h3v-4zm4 0h-2v-1h-1v5h3v-4zm3 0h-2v4h2v-1h-1v-2h1v-1z" fill="#F0EFF1"/><path d="M196.652 32.5c.811-.537 1.348-1.457 1.348-2.5 0-1.654-1.346-3-3-3-.771 0-1.468.301-2 .779v-5.779h-11v12h3.764l-1.452.727 1.481 1.48c.322.322.803.5 1.354.5.436 0 .897-.111 1.301-.313l3.144-1.572c.134.053.271.098.414.127l-.005.051c0 1.654 1.346 3 3 3s3-1.346 3-3c-.001-1.043-.538-1.963-1.349-2.5z" fill="#2D2D2D"/><path d="M195 33c-.293 0-.569.066-.82.18l-.25-.25c.042-.137.07-.279.07-.43s-.028-.293-.07-.43l.25-.25c.251.113.527.18.82.18 1.104 0 2-.896 2-2 0-1.105-.896-2-2-2s-2 .895-2 2c0 .293.066.568.18.82l-.25.25c-.137-.043-.279-.07-.43-.07-.337 0-.645.115-.895.303l-2.607-1.305-.999-.5c-.552-.275-1.223-.275-1.499.002l-.5.5 5 2.5-5 2.5.5.5c.276.275.947.275 1.5 0l1-.5 2.605-1.303c.25.188.558.303.895.303.15 0 .293-.029.43-.07l.25.25c-.114.25-.18.527-.18.82 0 1.104.896 2 2 2s2-.896 2-2c0-1.105-.896-2-2-2zm0-4c.553 0 1 .447 1 1 0 .551-.447 1-1 1s-1-.449-1-1c0-.553.447-1 1-1zm-2.5 4c-.276 0-.5-.225-.5-.5 0-.277.224-.5.5-.5s.5.223.5.5c0 .275-.224.5-.5.5zm2.5 3c-.553 0-1-.449-1-1 0-.553.447-1 1-1s1 .447 1 1c0 .551-.447 1-1 1zm-3-13v7.051c-.142.029-.279.07-.413.123l-.587-.174v-6h-7v7h-1v-8h9zm-8 10h-1v-1h1v1zm2-1h-1v1h1v-1zm2 0h-1v1h1v-1z" fill="#C5C5C5"/><path d="M185.793 28.793l-1.793 1.207v-6h7v5.381l-2.554-.777c-.816-.409-1.99-.475-2.653.189zm-.793 2.207h.764l-.764-.383v.383zm11 4c0 .551-.447 1-1 1s-1-.449-1-1c0-.553.447-1 1-1s1 .447 1 1zm-3.5-3c-.276 0-.5.223-.5.5 0 .275.224.5.5.5s.5-.225.5-.5c0-.277-.224-.5-.5-.5zm2.5-3c-.553 0-1 .447-1 1 0 .551.447 1 1 1s1-.449 1-1c0-.553-.447-1-1-1z" fill="#2D2D2D"/><path d="M196.652 12.5c.811-.538 1.348-1.458 1.348-2.5 0-1.654-1.346-3-3-3-.771 0-1.468.301-2 .779v-5.779h-11v12h3.764l-1.452.727 1.481 1.48c.322.322.803.5 1.354.5.436 0 .897-.111 1.301-.313l3.144-1.572c.134.053.271.098.414.127l-.005.051c0 1.654 1.346 3 3 3s3-1.346 3-3c-.001-1.043-.538-1.963-1.349-2.5z" fill="#F3F3F3"/><path d="M195 13c-.293 0-.569.066-.82.18l-.25-.25c.042-.137.07-.279.07-.43s-.028-.293-.07-.43l.25-.25c.251.113.527.18.82.18 1.104 0 2-.896 2-2 0-1.105-.896-2-2-2s-2 .895-2 2c0 .293.066.568.18.82l-.25.25c-.137-.043-.279-.07-.43-.07-.337 0-.645.115-.895.303l-2.607-1.304-.999-.5c-.552-.275-1.223-.275-1.499.002l-.5.499 5 2.5-5 2.5.5.5c.276.275.947.275 1.5 0l1-.5 2.605-1.303c.25.188.558.303.895.303.15 0 .293-.029.43-.07l.25.25c-.113.25-.18.527-.18.82 0 1.104.896 2 2 2s2-.896 2-2c0-1.106-.896-2-2-2zm0-4c.553 0 1 .447 1 1 0 .551-.447 1-1 1s-1-.449-1-1c0-.553.447-1 1-1zm-2.5 4c-.276 0-.5-.225-.5-.5 0-.277.224-.5.5-.5s.5.223.5.5c0 .275-.224.5-.5.5zm2.5 3c-.553 0-1-.449-1-1 0-.553.447-1 1-1s1 .447 1 1c0 .55-.447 1-1 1zm-3-13v7.051c-.142.029-.279.07-.413.123l-.587-.174v-6h-7v7h-1v-8h9zm-8 10h-1v-1h1v1zm2-1h-1v1h1v-1zm2 0h-1v1h1v-1z" fill="#424242"/><path d="M185.793 8.793l-1.793 1.207v-6h7v5.381l-2.554-.777c-.816-.409-1.99-.475-2.653.189zm-.793 2.207h.764l-.764-.383v.383zm11 4c0 .551-.447 1-1 1s-1-.449-1-1c0-.553.447-1 1-1s1 .447 1 1zm-3.5-3c-.276 0-.5.223-.5.5 0 .275.224.5.5.5s.5-.225.5-.5c0-.278-.224-.5-.5-.5zm2.5-3c-.553 0-1 .447-1 1 0 .551.447 1 1 1s1-.449 1-1c0-.553-.447-1-1-1z" fill="#F0EFF1"/><path d="M178 27v-3h-7v-1h-9v14h13v-3h3v-3h-1v-3h-6v-1h7zm-8 7v-3h1v3h-1z" fill="#2D2D2D"/><path d="M177 26h-5v-1h5v1zm-1 3h-2v1h2v-1zm-4 0h-9v1h9v-1zm2 6h-11v1h11v-1zm-5-3h-6v1h6v-1zm8 0h-5v1h5v-1zm-7-8v3h-7v-3h7zm-1 1h-5v1h5v-1z" fill="#C5C5C5"/><rect x="164" y="25" width="5" height="1" fill="#2D2D2D"/><path d="M178 7v-3h-7v-1h-9v14h13v-3h3v-3h-1v-3h-6v-1h7zm-8 7v-3h1v3h-1z" fill="#F3F3F3"/><path d="M177 6h-5v-1h5v1zm-1 3h-2v1h2v-1zm-4 0h-9v1h9v-1zm2 6h-11v1h11v-1zm-5-3h-6v1h6v-1zm8 0h-5v1h5v-1zm-7-8v3h-7v-3h7zm-1 1h-5v1h5v-1z" fill="#424242"/><rect x="164" y="5" width="5" height="1" fill="#F0EFF1"/><polygon points="154.414,24 149.586,24 148,25.586 148,28 144,28 144,35 152,35 152,31 154.414,31 156,29.414 156,25.586" fill="#2D2D2D"/><g fill="#75BEFF"><path d="M154 25h-4l-1 1v2h5v1h-2v1h2l1-1v-3l-1-1zm0 2h-4v-1h4v1zM145 34h6v-5h-6v5zm1-3h4v1h-4v-1z"/></g><g fill="#2D2D2D"><rect x="146" y="31" width="4" height="1"/><rect x="150" y="26" width="4" height="1"/><rect x="152" y="28" width="2" height="1"/></g><polygon points="154.414,4 149.586,4 148,5.586 148,8 144,8 144,15 152,15 152,11 154.414,11 156,9.414 156,5.586" fill="#F3F3F3"/><g fill="#00539C"><path d="M154 5h-4l-1 1v2h5v1h-2v1h2l1-1v-3l-1-1zm0 2h-4v-1h4v1zM145 14h6v-5h-6v5zm1-3h4v1h-4v-1z"/></g><g fill="#F0EFF1"><rect x="146" y="11" width="4" height="1"/><rect x="150" y="6" width="4" height="1"/><rect x="152" y="8" width="2" height="1"/></g><path d="M138 24h-15v4h-1v8h8v-6h8v-6zm-11 9h-2v-2h2v2z" fill="#2D2D2D"/><path d="M137 29h-7v-1h-6v-3h1v2h1v-2h1v2h1v-2h1v2h1v-2h1v2h1v-2h1v2h1v-2h1v2h1v-2h1v4zm-12 1v-1h-2v6h2v-1h-1v-4h1zm2 4v1h2v-6h-2v1h1v4h-1z" fill="#C5C5C5"/><path d="M125 27v-2h1v2h-1zm3 0v-2h-1v2h1zm2 0v-2h-1v2h1zm2 0v-2h-1v2h1zm2 0v-2h-1v2h1zm2 0v-2h-1v2h1z" fill="#2D2D2D"/><path d="M138 4h-15v4h-1v8h8v-6h8v-6zm-11 9h-2v-2h2v2z" fill="#F3F3F3"/><path d="M137 9h-7v-1h-6v-3h1v2h1v-2h1v2h1v-2h1v2h1v-2h1v2h1v-2h1v2h1v-2h1v2h1v-2h1v4zm-12 1v-1h-2v6h2v-1h-1v-4h1zm2 4v1h2v-6h-2v1h1v4h-1z" fill="#424242"/><path d="M125 7v-2h1v2h-1zm3 0v-2h-1v2h1zm2 0v-2h-1v2h1zm2 0v-2h-1v2h1zm2 0v-2h-1v2h1zm2 0v-2h-1v2h1z" fill="#F0EFF1"/><path d="M110.449 23c-1.637 0-3.075.797-3.987 2.012l.001.002c-.628.836-1.014 1.863-1.014 2.986 0 .469.067.933.2 1.385l-2.907 2.908c-.687.686-1.253 2.161 0 3.414.609.609 1.244.736 1.67.736.958 0 1.621-.613 1.744-.736l2.907-2.908c.453.133.917.201 1.386.201 1.123 0 2.149-.387 2.985-1.014l.002.001c1.216-.912 2.013-2.352 2.013-3.987 0-2.762-2.238-5-5-5z" fill="#2D2D2D"/><path d="M114.09 26.359l-2.641 2.641-2-2 2.641-2.641c-.502-.227-1.055-.359-1.641-.359-2.209 0-4 1.791-4 4 0 .586.133 1.139.359 1.64l-3.359 3.36s-1 1 0 2h2l3.359-3.36c.502.227 1.055.36 1.641.36 2.209 0 4-1.791 4-4 0-.586-.133-1.139-.359-1.641z" fill="#C5C5C5"/><path d="M110.449 3c-1.637 0-3.075.797-3.987 2.012l.001.002c-.628.836-1.014 1.863-1.014 2.986 0 .469.067.933.2 1.385l-2.907 2.908c-.687.686-1.253 2.161 0 3.414.609.609 1.244.736 1.67.736.958 0 1.621-.613 1.744-.736l2.907-2.908c.453.133.917.201 1.386.201 1.123 0 2.149-.387 2.985-1.014l.002.001c1.216-.912 2.013-2.352 2.013-3.987 0-2.762-2.238-5-5-5z" fill="#F3F3F3"/><path d="M114.09 6.359l-2.641 2.641-2-2 2.641-2.641c-.502-.226-1.055-.359-1.641-.359-2.209 0-4 1.791-4 4 0 .586.133 1.139.359 1.64l-3.359 3.36s-1 1 0 2h2l3.359-3.36c.502.227 1.055.36 1.641.36 2.209 0 4-1.791 4-4 0-.586-.133-1.139-.359-1.641z" fill="#424242"/><path d="M89 33h1v-1c0-.537.741-1.613 1-2-.259-.389-1-1.467-1-2v-1h-1v-3h1c1.969.021 3 1.277 3 3v1l1 1v2l-1 1v1c0 1.709-1.031 2.979-3 3h-1v-3zm-2 0h-1v-1c0-.537-.741-1.613-1-2 .259-.389 1-1.467 1-2v-1h1v-3h-1c-1.969.021-3 1.277-3 3v1l-1 1v2l1 1v1c0 1.709 1.317 2.979 3.286 3h.714v-3z" fill="#2D2D2D"/><path d="M91 33v-1c0-.834.496-1.738 1-2-.504-.27-1-1.168-1-2v-1c0-.84-.584-1-1-1v-1c2.083 0 2 1.166 2 2v1c0 .969.703.98 1 1v2c-.322.02-1 .053-1 1v1c0 .834.083 2-2 2v-1c.833 0 1-1 1-1zm-6 0v-1c0-.834-.496-1.738-1-2 .504-.27 1-1.168 1-2v-1c0-.84.584-1 1-1v-1c-2.083 0-2 1.166-2 2v1c0 .969-.703.98-1 1v2c.322.02 1 .053 1 1v1c0 .834-.083 2 2 2v-1c-.833 0-1-1-1-1z" fill="#C5C5C5"/><path d="M89 13h1v-1c0-.537.741-1.613 1-2-.259-.389-1-1.467-1-2v-1h-1v-3h1c1.969.021 3 1.277 3 3v1l1 1v2l-1 1v1c0 1.709-1.031 2.979-3 3h-1v-3zm-2 0h-1v-1c0-.537-.741-1.613-1-2 .259-.389 1-1.467 1-2v-1h1v-3h-1c-1.969.021-3 1.277-3 3v1l-1 1v2l1 1v1c0 1.709 1.317 2.979 3.286 3h.714v-3z" fill="#F3F3F3"/><path d="M91 13v-1c0-.834.496-1.738 1-2-.504-.27-1-1.168-1-2v-1c0-.84-.584-1-1-1v-1c2.083 0 2 1.166 2 2v1c0 .969.703.98 1 1v2c-.322.02-1 .053-1 1v1c0 .834.083 2-2 2v-1c.833 0 1-1 1-1zm-6 0v-1c0-.834-.496-1.738-1-2 .504-.27 1-1.168 1-2v-1c0-.84.584-1 1-1v-1c-2.083 0-2 1.166-2 2v1c0 .969-.703.98-1 1v2c.322.02 1 .053 1 1v1c0 .834-.083 2 2 2v-1c-.833 0-1-1-1-1z" fill="#424242"/><path d="M73.5 34c-1.914 0-3.601-1.242-4.227-3h-1.683c-.524.91-1.503 1.5-2.591 1.5-1.654 0-3-1.346-3-3s1.346-3 3-3c1.088 0 2.066.588 2.591 1.5h1.683c.626-1.76 2.313-3 4.227-3 2.481 0 4.5 2.018 4.5 4.5 0 2.48-2.019 4.5-4.5 4.5z" fill="#2D2D2D"/><path d="M73.5 26c-1.759 0-3.204 1.308-3.449 3h-3.122c-.223-.861-.998-1.5-1.929-1.5-1.104 0-2 .895-2 2 0 1.104.896 2 2 2 .931 0 1.706-.639 1.929-1.5h3.122c.245 1.691 1.69 3 3.449 3 1.93 0 3.5-1.57 3.5-3.5 0-1.931-1.57-3.5-3.5-3.5zm0 5c-.827 0-1.5-.674-1.5-1.5 0-.828.673-1.5 1.5-1.5s1.5.672 1.5 1.5c0 .826-.673 1.5-1.5 1.5z" fill="#75BEFF"/><circle cx="73.5" cy="29.5" r="1.5" fill="#2D2D2D"/><path d="M73.5 14c-1.914 0-3.601-1.242-4.227-3h-1.683c-.524.91-1.503 1.5-2.591 1.5-1.654 0-3-1.346-3-3s1.346-3 3-3c1.088 0 2.066.588 2.591 1.5h1.683c.626-1.76 2.313-3 4.227-3 2.481 0 4.5 2.018 4.5 4.5 0 2.48-2.019 4.5-4.5 4.5z" fill="#F3F3F3"/><path d="M73.5 6c-1.759 0-3.204 1.308-3.449 3h-3.122c-.223-.861-.998-1.5-1.929-1.5-1.104 0-2 .895-2 2 0 1.104.896 2 2 2 .931 0 1.706-.639 1.929-1.5h3.122c.245 1.691 1.69 3 3.449 3 1.93 0 3.5-1.57 3.5-3.5 0-1.931-1.57-3.5-3.5-3.5zm0 5c-.827 0-1.5-.674-1.5-1.5 0-.828.673-1.5 1.5-1.5s1.5.672 1.5 1.5c0 .826-.673 1.5-1.5 1.5z" fill="#00539C"/><circle cx="73.5" cy="9.5" r="1.5" fill="#F0EFF1"/><path d="M58 28.586l-3-3-1.414 1.414h-2.172l1-1-4-4h-.828l-5.586 5.586v.828l4 4 2.414-2.414h.586v5h1.586l3 3h.828l3.586-3.586v-.828l-2.086-2.086 2.086-2.086v-.828z" fill="#2D2D2D"/><polygon points="53.998,33.002 51,33 51,29 53,29 52,30 54,32 57,29 55,27 54,28 49,28 51,26 48,23 43,28 46,31 48,29 50,29 50,34 53,34 52,35 54,37 57,34 55,32" fill="#C27D1A"/><path d="M58 8.586l-3-3-1.414 1.414h-2.172l1-1-4-4h-.828l-5.586 5.586v.828l4 4 2.414-2.414h.586v5h1.586l3 3h.828l3.586-3.586v-.828l-2.086-2.086 2.086-2.086v-.828z" fill="#F3F3F3"/><polygon points="53.998,13.002 51,13 51,9 53,9 52,10 54,12 57,9 55,7 54,8 49,8 51,6 48,3 43,8 46,11 48,9 50,9 50,14 53,14 52,15 54,17 57,14 55,12" fill="#C27D1A"/><path d="M29.263 24l4.737 2.369v5.236l-6.791 3.395h-.42l-4.789-2.395v-5.236l6.739-3.369h.524z" fill="#2D2D2D"/><path d="M23 28v4l4 2 6-3v-4l-4-2-6 3zm4 1l-2-1 4-2 2 1-4 2z" fill="#75BEFF"/><path d="M29 26l2 1-4 2-2-1 4-2z" fill="#2D2D2D"/><path d="M29.263 4l4.737 2.369v5.236l-6.791 3.395h-.42l-4.789-2.395v-5.236l6.739-3.369h.524z" fill="#F3F3F3"/><path d="M23 8v4l4 2 6-3v-4l-4-2-6 3zm4 1l-2-1 4-2 2 1-4 2z" fill="#00539C"/><path d="M29 6l2 1-4 2-2-1 4-2z" fill="#F0EFF1"/><polygon points="2,27.308 2,32.692 7.209,36 7.791,36 13,32.692 13,27.308 7.791,24 7.209,24" fill="#2D2D2D"/><path d="M7.5 25l-4.5 2.857v4.285l4.5 2.858 4.5-2.857v-4.285l-4.5-2.858zm-.5 8.498l-3-1.905v-2.815l3 1.905v2.815zm-2.358-5.498l2.858-1.815 2.858 1.815-2.858 1.815-2.858-1.815zm6.358 3.593l-3 1.905v-2.815l3-1.905v2.815z" fill="#B180D7"/><polygon points="10.358,28 7.5,29.815 4.642,28 7.5,26.185" fill="#2D2D2D"/><polygon points="4,28.777 7,30.683 7,33.498 4,31.593" fill="#2D2D2D"/><polygon points="8,33.498 8,30.683 11,28.777 11,31.593" fill="#2D2D2D"/><polygon points="2,7.308 2,12.692 7.209,16 7.791,16 13,12.692 13,7.308 7.791,4 7.209,4" fill="#F3F3F3"/><path d="M7.5 5l-4.5 2.857v4.285l4.5 2.858 4.5-2.857v-4.286l-4.5-2.857zm-.5 8.498l-3-1.905v-2.816l3 1.905v2.816zm-2.358-5.498l2.858-1.815 2.858 1.815-2.858 1.815-2.858-1.815zm6.358 3.593l-3 1.905v-2.815l3-1.905v2.815z" fill="#652D90"/><polygon points="10.358,8 7.5,9.815 4.642,8 7.5,6.185" fill="#F0EFF1"/><polygon points="4,8.777 7,10.683 7,13.498 4,11.593" fill="#F0EFF1"/><polygon points="8,13.498 8,10.683 11,8.777 11,11.593" fill="#F0EFF1"/></svg>/*---------------------------------------------------------
 * 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: #fffffe; 
}
.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 {
	color: #2B91AF;
}
.monaco-editor .lineHighlight {
	background-color: rgba(253, 255, 0, 0.2);
}
.monaco-editor .view-overlays.focused .selected-text {
	background: #ADD6FF !important;
}
.monaco-editor .view-overlays .selected-text {
	background: #E5EBF1 !important;
}
.monaco-diff-editor .diffOverview {
	background-color: #f9f7f7;
}
.monaco-editor .wordHighlight {
	background-color: rgba(87, 87, 87, 0.25);
}
.monaco-editor .wordHighlightStrong {
	background-color: rgba(14, 99, 156, 0.25);
}
.monaco-editor .selectionHighlight {
	background-color: rgba(173, 214, 255, 0.3);
}
.monaco-editor .valueSetReplacement {
	outline: solid 2px #888;
}
.monaco-editor .focus-mode {
	background-color: #FFFFFF;
	opacity: 0.333;
}
/*---------------------------------------------------------
 * 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;
}
�PNG


IHDR���	pHYs��(J�gAMA���a%IDATx�c`�EK�w���pm�����P�4���0OM�Z�IEND�B`��PNG


IHDR���	pHYs��(J�gAMA���a!IDATx�c``P����)Z2��H�K�#���˖0O8�ʔIEND�B`�<svg xmlns="http://www.w3.org/2000/svg" height="3" width="6"><g fill="#080"><polygon points="5.5,0 2.5,3 1.1,3 4.1,0"/><polygon points="4,0 6,2 6,0.6 5.4,0"/><polygon points="0,2 1,3 2.4,3 0,0.6"/></g></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6 3" enable-background="new 0 0 6 3" height="3" width="6"><g fill="#F00"><polygon points="5.5,0 2.5,3 1.1,3 4.1,0"/><polygon points="4,0 6,2 6,0.6 5.4,0"/><polygon points="0,2 1,3 2.4,3 0,0.6"/></g></svg>/*---------------------------------------------------------
 * 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/editor/worker/modesWorker"],function(e,t,n){var i=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t}(n.AbstractWorkerMode);t.MonarchNullWorker=i});/*---------------------------------------------------------
 * 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,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/nullWorker",["require","exports","vs/editor/worker/modesWorker"],function(e,t,n){var r=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t}(n.AbstractWorkerMode);t.NullWorker=r});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/languages/nullWorker.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/base/async",["require","exports","vs/base/errors","vs/base/lib/winjs.base"],function(e,t,n,r){function i(e,t){return new r.Promise(function(r,i,o){e.done(function(e){try{t(e)}catch(i){n.onUnexpectedError(i)}r(e)},function(e){try{t(e)}catch(r){n.onUnexpectedError(r)}i(e)},function(e){o(e)})},function(){e.cancel()})}function o(e){function t(){return e.length?e.pop()():null}function n(e){e&&i.push(e);var o=t();return o?o.then(n):r.Promise.as(i)}var i=[];return e=e.reverse(),r.Promise.as(null).then(n)}function s(e){var t,n=this,r=!1;return function(){return r?t:(r=!0,t=e.apply(n,arguments))}}var a=function(){function e(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}return e.prototype.queue=function(e){var t=this;if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){var n=function(){t.queuedPromise=null;var e=t.queue(t.queuedPromiseFactory);return t.queuedPromiseFactory=null,e};this.queuedPromise=this.activePromise.then(n,n)}return new r.Promise(function(e,n){t.queuedPromise.then(e,n)},function(){})}return this.activePromise=e(),this.activePromise.then(function(e){return t.activePromise=null,e},function(e){return t.activePromise=null,r.Promise.wrapError(e)})},e}();t.Throttler=a;var u=function(){function e(e){this.defaultDelay=e,this.timeoutPromise=null,this.completionPromise=null,this.onSuccess=null,this.task=null}return e.prototype.trigger=function(e,t){var n=this;return void 0===t&&(t=this.defaultDelay),this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new r.Promise(function(e){n.onSuccess=e},function(){}).then(function(){n.completionPromise=null,n.onSuccess=null;var e=n.task();return n.task=null,e})),this.timeoutPromise=r.Promise.timeout(t),this.timeoutPromise.then(function(){n.timeoutPromise=null,n.onSuccess(null)}),this.completionPromise},e.prototype.isTriggered=function(){return!!this.timeoutPromise},e.prototype.cancel=function(){this.cancelTimeout(),this.completionPromise&&(this.completionPromise.cancel(),this.completionPromise=null)},e.prototype.cancelTimeout=function(){this.timeoutPromise&&(this.timeoutPromise.cancel(),this.timeoutPromise=null)},e}();t.Delayer=u;var l=function(e){function t(t){e.call(this,t),this.throttler=new a}return __extends(t,e),t.prototype.trigger=function(t,n){var r=this;return e.prototype.trigger.call(this,function(){return r.throttler.queue(t)},n)},t}(u);t.ThrottledDelayer=l;var c=function(){function e(){var e=this;this._value=new r.TPromise(function(t,n){e._completeCallback=t,e._errorCallback=n})}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e.prototype.complete=function(e){this._completeCallback(e)},e.prototype.error=function(e){this._errorCallback(e)},e}();t.PromiseSource=c;var d=function(e){function t(t){var r,i,o;e.call(this,function(e,t,n){r=e,i=t,o=n},function(){i(n.canceled())}),t.then(r,i,o)}return __extends(t,e),t}(r.TPromise);t.ShallowCancelThenPromise=d,t.always=i,t.sequence=o,t.once=s}),define("vs/base/eventEmitter",["require","exports","vs/base/errors"],function(e,t,n){var r=function(){function e(e,t,n){void 0===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(void 0===e&&(e=null),this._listeners={},this._bulkListeners=[],this._collectedEvents=[],this._deferredCnt=0,e){this._allowedEventTypes={};for(var t=0;t<e.length;t++)this._allowedEventTypes[e[t]]=!0}else this._allowedEventTypes=null}return e.prototype.dispose=function(){this._listeners={},this._bulkListeners=[],this._collectedEvents=[],this._deferredCnt=0,this._allowedEventTypes=null},e.prototype.addListener=function(e,t){if("*"===e)throw new Error("Use addBulkListener(listener) to register your listener!");if(this._allowedEventTypes&&!this._allowedEventTypes.hasOwnProperty(e))throw new Error("This object will never emit this event type!");this._listeners.hasOwnProperty(e)?this._listeners[e].push(t):this._listeners[e]=[t];var n=this;return function(){n&&(n._removeListener(e,t),n=null,t=null)}},e.prototype.addListener2=function(e,t){var n=this.addListener(e,t);return{dispose:n}},e.prototype.on=function(e,t){return this.addListener(e,t)},e.prototype.addOneTimeListener=function(e,t){var n=this.addListener(e,function(e){n(),t(e)});return n},e.prototype.addOneTimeDisposableListener=function(e,t){var n=this.addOneTimeListener(e,t);return{dispose:n}},e.prototype.addBulkListener=function(e){var t=this;return this._bulkListeners.push(e),function(){t._removeBulkListener(e)}},e.prototype.addBulkListener2=function(e){var t=this.addBulkListener(e);return{dispose:t}},e.prototype.addEmitter=function(e,t){var n=this;return void 0===t&&(t=null),e.addBulkListener(function(e){var i=e;if(t){i=[];for(var o=0,s=e.length;s>o;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(void 0===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=null;try{t=e()}catch(r){n.onUnexpectedError(r)}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/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 r(e,t,n){if(e!==t||!e||!t)throw new Error(n?"Assertion failed ("+n+")":"Assertion Failed")}t.ok=n,t.equals=r}),define("vs/base/hash",["require","exports"],function(e,t){function n(e){for(var t=1540483477,n=24,r=0,i=e.length,o=i,s=0^o,a=r;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 r(e,t){return(t<<5)+t+e&2147483647}t.computeMurmur2StringHashCode=n,t.combine=r}),define("vs/base/paths",["require","exports","./env"],function(e,t,n){function r(e,n){e=i(e),n=i(n);for(var r=e.split(t.sep),o=n.split(t.sep);r.length>0&&o.length>0&&r[0]===o[0];)r.shift(),o.shift();for(var s=0,a=r.length;a>s;s++)o.unshift("..");return o.join(t.sep)}function i(e,n){if(!e)return e;for(var r=e.split(/[\\\/]/),i=0,o=r.length;o>i;i++)"."===r[i]&&r[i+1]&&(r.splice(i,1),i--);return r.join(n?p:t.sep)}function o(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?".":0===~t?e[0]:e.substring(0,~t)}function s(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t===e.length-1?s(e.substring(0,e.length-1)):e.substr(~t+1)}function a(e){var t=~e.lastIndexOf(".");return t?e.substring(~t):""}function u(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=g.exec(e[0]);n&&(e[0]=e[0].substr(n[0].length));for(var r=[],i=/^[\\\/]/.test(e[0]),o=/[\\\/]$/.test(e[e.length-1]),s=0;s<e.length;s++)r.push.apply(r,e[s].split(/\/|\\/));for(var s=0;s<r.length;s++){var a=r[s];"."===a||0===a.length?(r.splice(s,1),s-=1):".."===a&&r[s-1]&&".."!==r[s-1]&&(r.splice(s-1,2),s-=2)}i&&r.unshift(""),o&&r.push("");var u=r.join("/");return n&&(u=n[0]+u),u}function l(e){return e&&"/"===e[0]}function c(e){return l(i(e))?e:t.sep+e}function d(e){return e&&e.length>1&&"."===e[0]}function h(e,n){if(e=i(e).toLowerCase(),n=i(n).toLowerCase(),e===n)return!0;if(0!==e.indexOf(n))return!1;var r=n.length;return n.charCodeAt(r-1)===f&&(r-=1),e.charCodeAt(r)===t.sep.charCodeAt(0)}t.sep="/";var p=n.isWindows?"\\":"/",f=t.sep.charCodeAt(0);t.relative=r,t.normalize=i,t.dirname=o,t.basename=s,t.extname=a;var g=/^\w[\w\d.+-]*:\/\//;t.join=u,t.isAbsolute=l,t.makeAbsolute=c,t.isRelative=d,t.isEqualOrParent=h}),define("vs/base/uri",["require","exports"],function(){var e;return function(e){function t(e){return e?"string"!=typeof e.scheme?!1:"string"!=typeof e.authority?!1:"string"!=typeof e.path?!1:"string"!=typeof e.query?!1:"string"!=typeof e.fragment?!1:"function"!=typeof e.with?!1:"function"!=typeof e.withScheme?!1:"function"!=typeof e.withAuthority?!1:"function"!=typeof e.withPath?!1:"function"!=typeof e.withQuery?!1:"function"!=typeof e.withFragment?!1:"function"!=typeof e.toString?!1:"function"!=typeof e.toJSON?!1:!0:!1}function n(e){var t;return e&&(t=c.exec(e))?i(t[2],t[4],t[5],t[7],t[9]):i()}function r(e){return i("file",h,e)}function i(e,t,n,r,a){e=e?e.toLowerCase():h;var u={scheme:e,authority:t,path:n,query:r,fragment:a};(f[e]||s)(u);var l,c=(p[e]||o)(u);return l={get scheme(){return u.scheme},get authority(){return u.authority},get path(){return u.path},get query(){return u.query},get fragment(){return u.fragment},withScheme:function(e){return i(e,u.authority,u.path,u.query,u.fragment)},withAuthority:function(e){return i(u.scheme,e,u.path,u.query,u.fragment)},withPath:function(e){return i(u.scheme,u.authority,e,u.query,u.fragment)},withQuery:function(e){return i(u.scheme,u.authority,u.path,e,u.fragment)},withFragment:function(e){return i(u.scheme,u.authority,u.path,u.query,e)},with:function(){return i.apply(void 0,arguments)},toString:function(){return c},toJSON:function(){return c}}}function o(e){var t=[];return e.scheme&&(t.push(e.scheme),t.push(":")),e.authority&&(t.push("//"),t.push(e.authority)),e.path&&(e.authority&&e.path.charCodeAt(0)!==d.charCodeAt(0)&&t.push(d),t.push(e.path)),e.query&&(t.push("?"),t.push(e.query)),e.fragment&&(t.push("#"),t.push(e.fragment)),t.join(h)}function s(e){e.scheme=e.scheme||h,e.authority=e.authority||h,e.path=e.path||h,e.query=e.query||h,e.fragment=e.fragment||h}function a(e){e.scheme=e.scheme?e.scheme.toLowerCase():h,e.authority=e.authority?e.authority.toLowerCase():h,e.path=e.path||h,e.query=e.query||h,e.fragment=e.fragment||h}function u(e){var t=[];return t.push("file://"),e.path&&(m.test(e.path)&&t.push(d),t.push(e.path)),e.query&&(t.push("?"),t.push(e.query)),e.fragment&&(t.push("#"),t.push(e.fragment)),t.join(h)}function l(e){if(e.authority=h,e.path){var t,n=[];(t=g.exec(e.path))?(n.push(t[2].toLowerCase()),n.push(t[3])):n.push(e.path),e.path=n.join(h).replace(/\\/g,d)}else e.path=h;e.query=e.query||h,e.fragment=e.fragment||h}e.isURI=t;var c=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;e.parse=n,e.file=r;var d="/",h="";e.create=i;var p=Object.create(null);p.file=u;var f=Object.create(null);f.http=a,f.https=a,f.file=l;var g=/^(\\|\/)?([A-Za-z])(:.*)$/,m=/^([A-Za-z])(:.*)$/}(e||(e={})),e}),define("vs/base/network",["require","exports","./assert","./hash","./strings","vs/base/worker/marshalling","vs/base/paths","vs/base/uri"],function(e,t,n,r,i,o,s,a){o.registerMarshallingContribution({canSerialize:function(e){return e instanceof p},serialize:function(e){return{$isURL:!0,$value:e.toUnique()}},canDeserialize:function(e){return e.$isURL},deserialize:function(e){return new p(e.$value)}});var u=":".charCodeAt(0),l="/".charCodeAt(0),c="?".charCodeAt(0),d="#".charCodeAt(0),h=function(){function e(e){this.spec=e||i.empty,this.specLength=this.spec.length,this.parse()}return e.prototype.forwardSubstring=function(e,t){return t>e?this.spec.substring(e,t):i.empty},e.prototype.getScheme=function(){return this.forwardSubstring(this.schemeStart,this.domainStart-1)},e.prototype.getProtocol=function(){return this.forwardSubstring(this.schemeStart,this.domainStart)},e.prototype.getDomain=function(){return this.forwardSubstring(this.domainStart+2,this.portStart)},e.prototype.getPort=function(){return this.forwardSubstring(this.portStart+1,this.pathStart)},e.prototype.getHost=function(){return this.forwardSubstring(this.domainStart+2,this.pathStart)},e.prototype.getPath=function(){return this.forwardSubstring(this.pathStart,this.queryStringStart)},e.prototype.getQueryString=function(){return this.forwardSubstring(this.queryStringStart+1,this.fragmentIdStart)},e.prototype.getFragmentId=function(){return this.forwardSubstring(this.fragmentIdStart+1,this.specLength)},e.prototype.getAllBeforePath=function(){return this.forwardSubstring(0,this.pathStart)},e.prototype.getAllBeforeFragmentId=function(){return this.forwardSubstring(0,this.fragmentIdStart)},e.prototype.combine=function(e){var t=e.indexOf("?"),n=e.indexOf("#"),r=e.length;-1!==t&&r>t&&(r=t),-1!==n&&r>n&&(r=n);var o=e.substring(0,r),a=e.substring(r);o=o.replace("\\","/");var u;for(u=i.startsWith(o,"/")?s.join(o):s.join(s.dirname(this.getPath()),o),"/"===u.charAt(0)&&(u=u.substr(1));0===u.indexOf("../");)u=u.substr(3);return this.getAllBeforePath()+"/"+u+a},e.prototype.parse=function(){var e,t,n=0,r=1,i=2,o=3,s=4,a=n,h=this.spec,p=this.specLength,f=-1,g=-1;for(this.schemeStart=0,this.domainStart=this.specLength,this.portStart=this.specLength,this.pathStart=this.specLength,this.queryStringStart=this.specLength,this.fragmentIdStart=this.specLength,e=0;p>e;e++){switch(t=h.charCodeAt(e),a){case n:f===l&&t===l&&(a=r,this.domainStart=e-1);break;case r:t===u?(a=i,this.portStart=e):t===l?(a=o,this.portStart=e,this.pathStart=e):t===d&&(this.portStart=e,this.pathStart=e,this.queryStringStart=e,this.fragmentIdStart=e,e=p);break;case i:t===l?(a=o,this.pathStart=e):t===d&&(this.pathStart=e,this.queryStringStart=e,this.fragmentIdStart=e,e=p);break;case o:t===c?(a=s,this.queryStringStart=e):t===d&&(this.queryStringStart=e,this.fragmentIdStart=e,e=p);break;case s:t===d&&(this.fragmentIdStart=e,e=p)}g=f,f=t}a===n&&(this.schemeStart=this.specLength)},e}();t.ParsedUrl=h;var p=function(){function e(e){n.ok(!!e,"spec must not be null"),this._uri="string"==typeof e?a.parse(e):e,this._spec=this._uri.toString(),this._parsed=null}return e.fromEncoded=function(t){return new e(decodeURIComponent(t))},e.fromValue=function(t){return new e(t)},e.fromUri=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.toExternal=function(){return this._spec},e.prototype.getScheme=function(){return this._ensureParsedUrl(),this._parsed.getScheme()},e.prototype.getPath=function(){return this._ensureParsedUrl(),this._parsed.getPath()},e.prototype.toUnique=function(){return this._ensureParsedUrl(),this._parsed.getAllBeforeFragmentId()},e.prototype.startsWith=function(e){return i.startsWith(this._spec,e._spec)},e.prototype.combine=function(t){return this._ensureParsedUrl(),new e(this._parsed.combine(t))},e.prototype._ensureParsedUrl=function(){null===this._parsed&&(this._parsed=new h(this._spec))},Object.defineProperty(e.prototype,"scheme",{get:function(){return this._uri.scheme},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"authority",{get:function(){return this._uri.authority},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._uri.path},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"query",{get:function(){return this._uri.query},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fragment",{get:function(){return this._uri.fragment},enumerable:!0,configurable:!0}),e.prototype.withScheme=function(e){return a.create(e,this.authority,this.path,this.query,this.fragment)},e.prototype.withAuthority=function(e){return a.create(this.scheme,e,this.path,this.query,this.fragment)},e.prototype.withPath=function(e){return a.create(this.scheme,this.authority,e,this.query,this.fragment)},e.prototype.withQuery=function(e){return a.create(this.scheme,this.authority,this.path,e,this.fragment)},e.prototype.withFragment=function(e){return a.create(this.scheme,this.authority,this.path,this.query,e)},e.prototype.with=function(e,t,n,r,i){return a.create(e,t,n,r,i)},e.prototype.toString=function(){return this._spec},e.prototype.toJSON=function(){return this.toString()},e}();t.URL=p;var f;!function(e){e.inMemory="inmemory",e.http="http",e.https="https",e.file="file"}(f=t.schemas||(t.schemas={}))}),define("vs/base/time/precision",["require","exports"],function(e,t){function n(){return new i(r?self.performance.now():(new Date).getTime())}var r=self.performance&&"function"==typeof self.performance.now,i=function(){function e(e){this._startTime=e,this._stopTime=-1}return e.prototype.stop=function(){this._stopTime=r?self.performance.now():(new Date).getTime()},e.prototype.elapsed=function(){if(-1!==this._stopTime)return this._stopTime-this._startTime;var e=r?self.performance.now():(new Date).getTime();return e-this._startTime},e}();t.StopWatch=i,t.createStopWatch=n}),define("vs/base/performance/timer",["require","exports","vs/base/env","vs/base/errors","vs/base/time/precision"],function(e,t,n,r,i){function o(e,t,n,r){return h.start(e,t,n,r)}function s(){return h}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",e[e.STARTUP=4]="STARTUP"}(t.Topic||(t.Topic={}));var u=t.Topic,l=function(){function e(){}return e.prototype.stop=function(){},e.prototype.timeTaken=function(){return-1},e}(),c=function(){function e(e,t,n,r,o){if(this.timeKeeper=e,this.name=t,this.description=o,this.topic=n,this.stopTime=null,r)return this.startTime=r,void 0;if(this.startTime=new Date,this.sw=i.createStopWatch(),a){var s=["Monaco",this.topic,this.name,"start"];self.msWriteProfilerMark(s.join("|"))}}return e.prototype.stop=function(e){if(null===this.stopTime){if(e)return this.stopTime=e,this.sw=null,this.timeKeeper._onEventStopped(this),void 0;if(this.stopTime=new Date,this.sw&&this.sw.stop(),this.timeKeeper._onEventStopped(this),a){var t=["Monaco",this.topic,this.name,"stop"];self.msWriteProfilerMark(t.join("|"))}}},e.prototype.timeTaken=function(){return this.sw?this.sw.elapsed():this.stopTime?this.stopTime.getTime()-this.startTime.getTime():-1},e}(),d=function(){function e(){this.cleaningIntervalId=-1,this.collectedEvents=[],this.listeners=[]}return e.prototype.isEnabled=function(){return n.enablePerformanceEvents},e.prototype.start=function(e,n,r,i){if(!this.isEnabled())return t.nullEvent;var o;"string"==typeof e?o=e:e===u.EDITOR?o="Editor":e===u.LANGUAGES?o="Languages":e===u.WORKER?o="Worker":e===u.WORKBENCH?o="Workbench":e===u.STARTUP&&(o="Startup"),this.initAutoCleaning();var s=new c(this,n,o,r,i);return this.addEvent(s),s},e.prototype.dispose=function(){-1!==this.cleaningIntervalId&&(clearInterval(this.cleaningIntervalId),this.cleaningIntervalId=-1)},e.prototype.addListener=function(e){this.listeners.push(e)},e.prototype.removeListener=function(e){for(var t=0;t<this.listeners.length;t++)if(this.listeners[t]===e)return this.listeners.splice(t,1),void 0},e.prototype.addEvent=function(t){t.id=e.EVENT_ID,e.EVENT_ID++,this.collectedEvents.push(t),this.collectedEvents.length>e._EVENT_CACHE_LIMIT&&this.collectedEvents.shift()},e.prototype.initAutoCleaning=function(){var t=this;-1===this.cleaningIntervalId&&(this.cleaningIntervalId=setInterval(function(){var n=Date.now();t.collectedEvents.forEach(function(t){!t.stopTime&&n-t.startTime.getTime()>=e._MAX_TIMER_LENGTH&&t.stop()})},e._CLEAN_UP_INTERVAL))},e.prototype.getCollectedEvents=function(){return this.collectedEvents.slice(0)},e.prototype.clearCollectedEvents=function(){this.collectedEvents=[]},e.prototype._onEventStopped=function(e){for(var t=[e],n=this.listeners.slice(0),i=0;i<n.length;i++)try{n[i](t)}catch(o){r.onUnexpectedError(o)}},e.prototype.setInitialCollectedEvents=function(t,n){var r=this;this.isEnabled()&&(n&&(e.PARSE_TIME=n),t.forEach(function(e){var t=new c(r,e.name,e.topic,e.startTime,e.description);t.stop(e.stopTime),r.addEvent(t)}))},e._MAX_TIMER_LENGTH=6e4,e._CLEAN_UP_INTERVAL=12e4,e._EVENT_CACHE_LIMIT=1e3,e.EVENT_ID=1,e.PARSE_TIME=new Date,e}();t.TimeKeeper=d;var h=new d;t.nullEvent=new l,t.start=o,t.getTimeKeeper=s}),define("vs/base/http",["require","exports"],function(e,t){function n(e,t,n,r){var i,o;return{header:function(n){if("undefined"==typeof o)for(o=Object.create(null),u.lastIndex=t;;){var r=u.exec(e);if(!r)break;if(o[r[1].toLowerCase()]=r[2],r[3])break}return o[n.toLowerCase()]},value:function(){return"undefined"==typeof i&&(i=e.substr(n+2,r)),i}}}function r(e,t,r){void 0===r&&(r=0);var i=e.responseText;for(a.lastIndex=r;;){var o=a.exec(i);if(!o)return r;var s=parseInt(o[1],10);if(i.length<a.lastIndex+s)return r;t.push(n(i,r,a.lastIndex-2,s)),r=a.lastIndex+s}}t.GET="GET",t.POST="POST",t.PUT="PUT",t.DELETE="DELETE";var i;!function(e){e.CONTENT_TYPE="Content-Type",e.CONTENT_LENGTH="Content-Length",e.LAST_MODIFIED="Last-Modified",e.LOCATION="Location",e.ETAG="ETag",e.X_CONTENT_CHARSET="X-Content-Charset",e.X_CONTENT_TYPES="X-Content-Types",e.X_CONTENT_HASH="X-Content-Hash",e.X_FILEPATH="X-Filepath"}(i=t.Header||(t.Header={}));var o;!function(e){e.RAW="application/octet-stream",e.JSON="application/json",e.TEXT="text/plain",e.HTML="text/html"}(o=t.Mime||(t.Mime={}));var s;!function(e){e.UTF8="utf-8",e.UTF8_BOM="UTF8_BOM"}(s=t.Charset||(t.Charset={}));var a=/X-Chunk-Length:(\d+)\r\n\r\n/gi,u=/(.+?):(.+?)\r\n(\r\n)?/gm;t.parseChunkedData=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/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 r=function(e){function t(t,n){e.call(this,n),this.message=t}return __extends(t,e),t}(n);t.MessageEvent=r;var i=function(e){function t(t,n,r,i){e.call(this,i),this.key=t,this.oldValue=n,this.newValue=r}return __extends(t,e),t}(n);t.PropertyChangeEvent=i;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"}}),define("vs/base/mime",["require","exports","vs/base/paths","vs/base/types","vs/base/strings"],function(e,t,n,r,i){function o(e,t){e&&t&&(h[e]=t)}function s(e){if(!e)return!1;var n;return n=r.isArray(e)?e:e.split(",").map(function(e){return e.trim()}),n.indexOf(t.MIME_BINARY)>=0}function a(e){if(!e)return[t.MIME_UNKNOWN];e=e.toLowerCase();var r=n.basename(e),o=n.extname(e);for(var s in h){var a=s.toLowerCase();if(r===a||"."===s[0]&&i.endsWith(r,a)){var u=[h[s]];return u.push(t.MIME_TEXT),u}}if(l[r]){var u=[l[r]];return u.push(t.MIME_TEXT),u}if(c[o]){var u=[c[o]];return c[o]!==t.MIME_TEXT&&u.push(t.MIME_TEXT),u}if(d[o]){var u=[d[o]];return d[o]!==t.MIME_BINARY&&u.push(t.MIME_BINARY),u}return[t.MIME_UNKNOWN]}function u(e){return e&&e!==t.MIME_BINARY&&e!==t.MIME_TEXT&&e!==t.MIME_UNKNOWN}t.MIME_TEXT="text/plain",t.MIME_BINARY="application/octet-stream",t.MIME_UNKNOWN="application/unknown";var l={jakefile:"text/javascript",makefile:"text/x-makefile",config:"text/x-ini",dockerfile:"text/x-dockerfile",".gitignore":"text/x-ini",".gitattributes":"text/x-ini",".gitconfig":"text/x-ini"},c={".html":"text/html",".htm":"text/html",".shtml":"text/html",".mdoc":"text/html",".jsp":"text/html",".jshtm":"text/x-jshtm",".js":"text/javascript",".json":"application/json",".css":"text/css",".less":"text/x-less",".txt":"text/plain",".gitignore":"text/plain",".xml":"text/xml",".ascx":"text/xml",".aspx":"text/xml",".csproj":"text/xml",".config":"text/xml",".wxi":"text/xml",".wxl":"text/xml",".wxs":"text/xml",".dtd":"application/xml-dtd",".pl":"application/x-perl",".php":"application/x-php",".ctp":"application/x-php",".md":"text/x-web-markdown",".markdown":"text/x-web-markdown",".mdown":"text/x-web-markdown",".mkdn":"text/x-web-markdown",".mkd":"text/x-web-markdown",".mdwn":"text/x-web-markdown",".mdtxt":"text/x-web-markdown",".mdtext":"text/x-web-markdown",".cs":"text/x-csharp",".fs":"text/x-fsharp",".dot":"text/x-dot",".c":"text/x-cpp",".cc":"text/x-cpp",".cpp":"text/x-cpp",".h":"text/x-cpp",".hpp":"text/x-cpp",".cshtml":"text/x-cshtml",".xaml":"application/xaml+xml",".coffee":"text/x-coffeescript",".java":"text/x-java-source",".jav":"text/x-java-source",".bat":"text/x-bat",".vb":"text/x-vb",".handlebars":"text/x-handlebars-template",".hbs":"text/x-handlebars-template",".lua":"text/x-lua",".jade":"text/x-jade",".ps1":"text/x-powershell",".psm1":"text/x-powershell",".ts":"text/typescript",".ini":"text/x-ini",".properties":"text/x-ini",".gitconfig":"text/x-ini",".yml":"text/x-ini",".scss":"text/x-scss",".cmd":"text/x-bat"},d={".bmp":"image/bmp",".gif":"image/gif",".jpg":"image/jpg",".jpeg":"image/jpg",".jpe":"image/jpg",".png":"image/png",".svg":"image/svg+xml",".svgz":"image/svg+xml",".tiff":"image/tiff",".tif":"image/tiff",".ico":"image/x-icon",".tga":"image/x-tga",".psd":"image/vnd.adobe.photoshop",".mid":"audio/midi",".midi":"audio/midi",".mp4a":"audio/mp4",".mpga":"audio/mpeg",".mp2":"audio/mpeg",".mp2a":"audio/mpeg",".mp3":"audio/mpeg",".m2a":"audio/mpeg",".m3a":"audio/mpeg",".oga":"audio/ogg",".ogg":"audio/ogg",".spx":"audio/ogg",".aac":"audio/x-aac",".wav":"audio/x-wav",".wma":"audio/x-ms-wma",".mp4":"video/mp4",".mp4v":"video/mp4",".mpg4":"video/mp4",".mpeg":"video/mpeg",".mpg":"video/mpeg",".mpe":"video/mpeg",".m1v":"video/mpeg",".m2v":"video/mpeg",".ogv":"video/ogg",".qt":"video/quicktime",".mov":"video/quicktime",".webm":"video/webm",".mkv":"video/x-matroska",".mk3d":"video/x-matroska",".mks":"video/x-matroska",".wmv":"video/x-ms-wmv",".flv":"video/x-flv",".avi":"video/x-msvideo",".exe":"application/x-msdownload-exe",".dll":"application/x-msdownload",".com":"application/x-msdownload",".msi":"application/x-msdownload",".pdf":"application/pdf",".doc":"application/msword",".dot":"application/msword",".ppt":"application/vnd.ms-powerpoint",".pps":"application/vnd.ms-powerpoint",".pot":"application/vnd.ms-powerpoint",".xls":"application/vnd.ms-excel",".xlm":"application/vnd.ms-excel",".xla":"application/vnd.ms-excel",".xlc":"application/vnd.ms-excel",".xlt":"application/vnd.ms-excel",".xlw":"application/vnd.ms-excel",".zip":"application/zip",".rar":"application/x-rar-compressed",".iso":"application/x-iso9660-image",".dmg":"application/x-apple-diskimage",".bin":"application/octet-stream",".tar":"application/x-tar",".gz":"application/x-gzip",".7z":"application/x-7z-compressed",".cab":"application/vnd.ms-cab-compressed",".ttf":"application/x-font-ttf",".jar":"application/java-archive",".ps":"application/postscript",".ai":"application/postscript",".swf":"application/x-shockwave-flash",".aif":"audio/x-aiff",".odt":"application/vnd.oasis.opendocument.text",".so":"application/octet-stream",".obj":"application/octet-stream",".class":"application/java-vm",".jnilib":"application/octet-stream",".woff":"application/x-font-woff",".suo":"application/octet-stream",".deb":"application/x-debian-package",".sit":"application/x-stuffit",".sitx":"application/x-stuffitx",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".dotx":"application/vnd.openxmlformats-officedocument.wordprocessingml.template",".rtf":"application/rtf",".war":"application/octet-stream",".pdb":"application/vnd.palm",".xap":"application/x-silverlight-app",".lnk":"application/octet-stream",".mdb":"application/x-msaccess",".nupkg":"application/octet-stream",".cspkg":"application/octet-stream",".cer":"application/pkix-cert",".node":"application/octet-stream",".sl":"application/octet-stream",".snk":"application/octet-stream",".chm":"application/vnd.ms-htmlhelp",".reg":"application/octet-stream",".xcf":"application/octet-stream",".eot":"application/vnd.ms-fontobject",".bson":"application/octet-stream",".cache":"application/octet-stream",".pyc":"application/octet-stream",".movie":"video/x-sgi-movie",".pyo":"application/octet-stream",".out":"application/output"},h=Object.create(null);t.registerTextMime=o,t.isBinaryMime=s,t.guessMimeTypes=a,t.isSpecific=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/platform/files/files",["require","exports","vs/base/assert","vs/base/paths","vs/base/uri","vs/base/types","vs/base/strings","vs/base/ui/events","vs/base/mime"],function(e,t,n,r,i,o,s,a,u){function l(e){return"undefined"!=typeof e.charset&&"string"!=typeof e.charset?!1:"string"!=typeof e.etag?!1:"string"!=typeof e.mime?!1:"number"!=typeof e.mtime?!1:"string"!=typeof e.name?!1:"string"!=typeof e.path?!1:"string"!=typeof e.value?!1:!0}!function(e){e[e.UPDATED=0]="UPDATED",e[e.ADDED=1]="ADDED",e[e.DELETED=2]="DELETED"}(t.FileChangeType||(t.FileChangeType={}));var c=t.FileChangeType;!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.FILE=1]="FILE",e[e.DIRECTORY=2]="DIRECTORY"}(t.FileChangeKind||(t.FileChangeKind={}));t.FileChangeKind;t.EventType={FILE_CHANGES:"files:fileChanges"};var d=function(e){function t(t){e.call(this),this._changes=t,this._changes.forEach(function(e){e.path=r.makeAbsolute(r.normalize(e.path))})}return __extends(t,e),Object.defineProperty(t.prototype,"changes",{get:function(){return this._changes},enumerable:!0,configurable:!0}),t.prototype.filter=function(e){return new t(this._changes.filter(function(t){var n=t.path.split(/\//);return n.shift(),e(t,n)}))},t.prototype.contains=function(e,t){return e?this.containsAny([e],t):!1},t.prototype.containsAny=function(e,t){return e&&e.length?this._changes.some(function(n){return n.type!==t?!1:t===c.DELETED?e.some(function(e){return r.isEqualOrParent(e,n.path)}):e.some(function(e){return n.path===e})}):!1},t.prototype.getAdded=function(){return this.getOfType(c.ADDED)},t.prototype.gotAdded=function(){return this.hasType(c.ADDED)},t.prototype.getDeleted=function(){return this.getOfType(c.DELETED)},t.prototype.gotDeleted=function(){return this.hasType(c.DELETED)},t.prototype.getUpdated=function(){return this.getOfType(c.UPDATED)},t.prototype.gotUpdated=function(){return this.hasType(c.UPDATED)},t.prototype.getMoved=function(){return this._changes.filter(function(e){return!!e.movedFrom
})},t.prototype.gotMoved=function(){return this._changes.some(function(e){return!!e.movedFrom})},t.prototype.getOfType=function(e){return this._changes.filter(function(t){return t.type===e})},t.prototype.hasType=function(e){return this._changes.some(function(t){return t.type===e})},t}(a.Event);t.FileChangesEvent=d,t.isIContent=l;var h=function(){function e(e,t,n,i,s,a,u){this.path=r.makeAbsolute(r.normalize(e)),this.value=t,this.name=n,this.mtime=i,this.etag=u,this.mime=s,this.charset=a,this.mtime=o.isNumber(i)?i:o.isString(i)?new Date(i).getTime():-1,this.mime&&this.mime.indexOf("; charset")>=0&&(this.mime=this.mime.substring(0,this.mime.indexOf(";")))}return e}();t.Content=h,function(e){e[e.FILE=0]="FILE",e[e.FOLDER=1]="FOLDER",e[e.ANY=2]="ANY"}(t.StatType||(t.StatType={}));var p=t.StatType,f=function(){function e(e,t,s,a,l,c,d){n.ok(!a||s,"Only a directory can have children"),this.resource=o.isString(e)?i.parse(e):e,this.path=r.makeAbsolute(r.normalize(t)),o.isString(l)?this.name=l:this.path&&(this.name=r.basename(this.path)),this.isDirectory=!!s,this.hasChildren=s&&a,this.mime=s?void 0:u.guessMimeTypes(this.path).join(", "),this.isDirectoryResolved=!1,this.etag=d,this.mtime=c,this.isDirectory&&(this.children=[])}return e.fromRAW=function(t,n,i){var s=new e(t.resource,t.path,t.isDirectory,t.hasChildren,t.name,t.mtime,t.etag);if(n&&n instanceof e?n.addChild(s):o.isString(n)&&(s.path=r.makeAbsolute(r.normalize(n))),s.isDirectory&&(s.children=[],s.isDirectoryResolved=!!t.children||!!i&&i.some(function(e){return r.isEqualOrParent(e,s.path)}),t.children))for(var a=0,u=t.children.length;u>a;a++)e.fromRAW(t.children[a],s,i);return s},e.prototype.clone=function(){var t=new e(this.resource,this.path,this.isDirectory,this.hasChildren,this.name,this.mtime,this.etag);return t.isDirectoryResolved=this.isDirectoryResolved,this.parent&&(t.parent=this.parent),this.isDirectory&&this.children.forEach(function(e){t.addChild(e.clone())}),t},e.prototype.addChild=function(e){n.ok(this.isDirectory,"Can only add a child to a folder"),this.removeChild(e),e.parent=this,e.updatePath(!1),this.children.push(e),this.hasChildren=this.children.length>0},e.prototype.hasChild=function(e,t,r){void 0===r&&(r=p.ANY),n.ok(this.isDirectory,"Can only call hasChild on a directory"),n.ok(o.isString(e),"Expected parameter of type String");for(var i=0;i<this.children.length;i++){var s=this.children[i];if(!(r===p.FILE&&s.isDirectory||r===p.FOLDER&&!s.isDirectory)){if(s.name===e)return!0;if(t&&s.name.toLowerCase()===e.toLowerCase())return!0}}return!1},e.prototype.removeChild=function(e){n.ok(this.isDirectory,"Can only remove a child from a directory"),n.ok(!!this.children,"Expected children for directory but found none: "+this.path);for(var t=0;t<this.children.length;t++)if(this.children[t].path===e.path){this.children.splice(t,1);break}this.hasChildren=this.children.length>0},e.prototype.move=function(e,t,r){var i=this;n.ok(e.isDirectory,"Can only move an element into a directory"),n.ok(!this.isRoot(),"Can not move the root"),t||(t=function(e){e()}),this.parent.removeChild(this),t(function(){e.addChild(i),i.updatePath(!0),r&&r()})},e.prototype.updatePath=function(e){this.path=r.join(this.parent.path,this.name),e&&this.isDirectory&&this.hasChildren&&this.children&&this.children.forEach(function(e){e.updatePath(!0)})},e.prototype.rename=function(e){n.ok(!this.isRoot(),"Can not rename root"),this.name=e.name,this.mime=e.mime,this.mtime=e.mtime,this.updatePath(!0)},e.prototype.find=function(e){return n.ok(o.isString(e),"Expected String as parameter"),n.ok(this.isDirectory,"Can only find() in directories"),n.ok(this.isRoot(),"Can only find() from root"),this.doFind(e)},e.prototype.doFind=function(e){if(e===r.sep&&this.isRoot())return this;if(!this.hasChildren)return null;e=s.trim(e,r.sep);var t=e.split(r.sep);if(t.length>0)for(var n=0;n<this.children.length;n++)if(this.children[n].name===t[0])return 1===t.length?this.children[n]:this.children[n].doFind(e.substr(e.indexOf(r.sep)));return null},e.prototype.isRoot=function(){return this.path===r.sep},e.prototype.isAncestorOf=function(e){return this.isDirectory&&r.isEqualOrParent(e.path,this.path)},e.prototype.isParentOf=function(e){if(!this.isAncestorOf(e))return!1;var t=this.isRoot()?s.empty:this.path;return 2===e.path.substring(t.length).split(r.sep).length},e.prototype.equals=function(t){return t&&t instanceof e&&t.path===this.path},e}();t.FileStatImpl=f,function(e){e[e.FILE_IS_BINARY=0]="FILE_IS_BINARY",e[e.FILE_NOT_FOUND=1]="FILE_NOT_FOUND",e[e.FILE_NOT_MODIFIED_SINCE=2]="FILE_NOT_MODIFIED_SINCE",e[e.FILE_MODIFIED_SINCE=3]="FILE_MODIFIED_SINCE",e[e.FILE_MOVE_CONFLICT=4]="FILE_MOVE_CONFLICT"}(t.FileOperationResult||(t.FileOperationResult={}));t.FileOperationResult});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/env","vs/base/strings","vs/base/network","vs/base/performance/timer","vs/base/objects","vs/base/hash","vs/base/errors","vs/base/worker/marshalling","vs/base/http","vs/base/ui/events","vs/platform/files/files"],function(e,t,n,r,i,o,s,a,u,l,c,d,h,p,f){var g=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=g;var m=function(e){function t(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];e.call(this,n),this._ctor=t}return __extends(t,e),Object.defineProperty(t.prototype,"ctor",{get:function(){return this._ctor},enumerable:!0,configurable:!0}),t.prototype.equals=function(e){return e===this?!0:e instanceof t?e.ctor===this.ctor:!1},t.prototype.hashCode=function(){return 61*(1+this.ctor.length)},t}(g);t.SyncDescriptor=m,d.registerMarshallingContribution({canSerialize:function(e){return e instanceof v},serialize:function(e,t){return{$isAsyncDescriptor:!0,$moduleName:e.moduleName,$ctorName:e.ctorName,$staticArguments:t(e.staticArguments())}},canDeserialize:function(e){return e.$isAsyncDescriptor},deserialize:function(e,t){var n=new v(e.$moduleName,e.$ctorName);return n.appendStaticArguments(t(e.$staticArguments)),n}});var v=function(t){function n(e,n){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];t.call(this,r),this._moduleName=e,this._ctorName=n}return __extends(n,t),n.create=function(e,t){return new n(e,t)},Object.defineProperty(n.prototype,"moduleName",{get:function(){return this._moduleName},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"ctorName",{get:function(){return this._ctorName},enumerable:!0,configurable:!0}),n.prototype.equals=function(e){return e===this?!0:e instanceof n?e.moduleName===this.moduleName&&e.ctorName===this.ctorName:!1},n.prototype.hashCode=function(){return l.computeMurmur2StringHashCode(this.moduleName)*l.computeMurmur2StringHashCode(this.ctorName)},n.prototype.toSyncDescriptor=function(){var t;try{t=e(this.moduleName)}catch(n){return null}var r=t[this.ctorName],i=new m(r);return i.appendStaticArguments(this.staticArguments()),i},n}(g);t.AsyncDescriptor=v,function(e){e[e.None=0]="None",e[e.Group1=1]="Group1",e[e.Group2=2]="Group2",e[e.Group3=3]="Group3",e[e.Group4=4]="Group4",e[e.Group5=5]="Group5",e[e.Group6=6]="Group6",e[e.Group7=7]="Group7",e[e.Group8=8]="Group8",e[e.Group9=9]="Group9"}(t.ThreadAffinity||(t.ThreadAffinity={}));var y=(t.ThreadAffinity,function(){function e(e,t,n){void 0===n&&(n={}),this.workspace=e,this.configuration=t,this.options=n}return e.prototype.getWorkspace=function(){return this.workspace},e.prototype.getConfiguration=function(){return this.configuration},e.prototype.getOptions=function(){return this.options},e}());t.BaseWorkspaceContextService=y;var _=function(){function e(e,t,n){var r=null;if(e&&e.contextService){var s=e.contextService;this._serviceMap=s.getWorkspace(),this._telemetryService=e.telemetryService;var a=s.getConfiguration();a&&(this._additionalHeaders=a.additionalHeaders),r=s.getWorkspace().resource,o.endsWith(r,"/")||(r+="/"),!i.isNative&&s.getWorkspace().publicUrl&&(r=s.getWorkspace().publicUrl)}else this._serviceMap=e,this._additionalHeaders=t,this._telemetryService=n;this.computeOrigin(r)}return e.prototype.computeOrigin=function(e){if(e){this._origin=e;var t=new s.URL(this._origin).getPath();t&&t.length>0&&(this._origin=this._origin.substring(0,this._origin.length-t.length+1)),o.endsWith(this._origin,"/")||(this._origin+="/")}else this._origin="/"},e.prototype.getRequestUrl=function(e,t,n){if(this._serviceMap[e]){var r=this._serviceMap[e]+o.normalizePath(t),i=new s.URL(r);return i.getScheme()?r:n?this._origin+o.ltrim(r,"/"):r}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._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.makeCrossOriginRequest=function(e){var t=this.getRequestUrl("http");if(t){var n=o.format("{0}?url={1}",t,encodeURIComponent(e.url));return e.url=n,this.makeRequest(e)}return null},e.prototype.makeRequest=function(e){var t=a.nullEvent,i=!1,s=e.url;if(!s)throw new Error("IRequestService.makeRequest: Url is required");if((o.startsWith(s,"http://")||o.startsWith(s,"https://"))&&this._origin&&!o.startsWith(s,this._origin)){var l=this.makeCrossOriginRequest(e);if(l)return l;i=!0}var c=e;if(!i){var d=this.getAdditionalHeaders();this._telemetryService&&(d["X-TelemetrySession"]=this._telemetryService.sessionID),d["X-Requested-With"]="XMLHttpRequest",c.headers=u.mixin(c.headers,d)}return e.customRequestConfiguration&&(c.customRequestInitializer=function(t){u.mixin(t,e.customRequestConfiguration)}),this._telemetryService&&(t=this._telemetryService.start(i?"CorsXHR":"WorkbenchXHR",{url:s},!1)),r.always(n.xhr(c),function(e){t.data&&(t.data.status=e.status),t.stop()})},e.prototype.makeChunkedRequest=function(e){var t,r,i,o=this,s=0,a=!1;return new n.TPromise(function(n,a,u){t=n,r=a,i=u,o.makeRequest(e).done(function(e){var n={request:e,chunks:[]};s=h.parseChunkedData(e,n.chunks,s),t(n)},function(e){r(e)},function(){})},function(){a=!0})},e.prototype.reconnect=function(){},e}();t.BaseRequestService=_;var b=function(){function e(){}return e.CONNECTION_STATE_CHANGE="connectionStateChanged",e.CONNECTION_RECONNECTED="connectionReconnected",e}();t.RequstServiceEventTypes=b,function(e){e[e.CONNECTED=0]="CONNECTED",e[e.DISCONNECTED=1]="DISCONNECTED",e[e.SESSION_OVER=2]="SESSION_OVER",e[e.OUTDATED_CLIENT=3]="OUTDATED_CLIENT"}(t.ConnectionState||(t.ConnectionState={}));t.ConnectionState;!function(e){e[e.GLOBAL=0]="GLOBAL",e[e.WORKSPACE=1]="WORKSPACE"}(t.StorageScope||(t.StorageScope={}));t.StorageScope;t.StorageEventType={STORAGE:"storage"};var C=function(e){function t(t,n,r,i){e.call(this,t,n,r,i)}return __extends(t,e),t.prototype.isLocal=function(){return!this.originalEvent},t}(p.PropertyChangeEvent);t.StorageEvent=C,function(e){e[e.LEFT=0]="LEFT",e[e.CENTER=1]="CENTER",e[e.RIGHT=2]="RIGHT"}(t.Position||(t.Position={}));var w=t.Position;t.POSITIONS=[w.LEFT,w.CENTER,w.RIGHT];var E=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=E;var S=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.toArray=function(){return this.selection},t}(E);t.StructuredSelection=S;var T=function(){function e(){}return e.UPDATED="update",e}();t.ConfigurationServiceEventTypes=T,t.ResourceEvents={ADDED:"resource.added",REMOVED:"resource.removed",CHANGED:"resource.changed"};var x;!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([])},e.Instance=new e,e}());e.NullSearchService=t}(x=t.Search||(t.Search={})),t.Files=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/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 i().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/platform/platform",["require","exports","vs/base/env","vs/base/types","vs/base/assert"],function(e,t,n,r,i){var o=function(){function e(){this.data={}}return e.prototype.add=function(e,t){i.ok(r.isString(e)),i.ok(r.isObject(t)),i.ok(!this.data.hasOwnProperty(e),"There is already an extension with this id"),this.data[e]=t},e.prototype.knows=function(e){return this.data.hasOwnProperty(e)},e.prototype.as=function(e){return this.data[e]||null},e}();t.Registry=new o;var s=function(){function e(){this.toBeInstantiated=[],this.instances=[]}return e.prototype.setInstantiationService=function(e){var t=this;if(this.instantiationService=e,n.isTesting())this.toBeInstantiated.forEach(function(e){t.instantiate(e)});else for(;this.toBeInstantiated.length>0;){var r=this.toBeInstantiated.shift();this.instantiate(r)}},e.prototype.instantiate=function(e){var t=this.instantiationService.createInstance(e);this.instances.push(t)},e.prototype._register=function(e){this.instantiationService?this.instantiate(e):this.toBeInstantiated.push(e)},e.prototype._getInstances=function(){return this.instances.slice(0)},e.prototype._setInstances=function(e){this.instances=e},e}();t.BaseRegistry=s}),define("vs/platform/telemetry/abstractTelemetryService",["require","exports","vs/base/uuid","vs/base/performance/timer","vs/base/errors","vs/base/types","vs/base/objects","vs/platform/platform","vs/base/env","vs/base/hash"],function(e,t,n,r,i,o,s,a,u,l){var c={enableTelemetry:!0,publicOnly:!0,enableHardIdel:!0,enableSoftIdle:!0},d=function(){function e(e,t){var o=this;if(void 0===e&&(e=null),this.contextService=e,this.config=s.withDefaults(t,c),this.sessionID=this.config.sessionID||n.generateUuid()+Date.now(),this.timeKeeper=new r.TimeKeeper,this.toUnbind=[],this.appenders=[],this.timeKeeperListener=function(e){return o.onTelemetryTimerEventStop(e)},this.timeKeeper.addListener(this.timeKeeperListener),this.toUnbind.push(i.errorHandler.addListener(this.onErrorEvent.bind(this))),this.startTime=new Date,this.eventCount=0,this.enableGlobalErrorHandler(),this.contextService&&this.contextService.getConfiguration()&&this.contextService.getConfiguration().profile){var a=this.contextService.getConfiguration().profile.userEmail;a&&(this.userIdHash=l.computeMurmur2StringHashCode(a).toString())}}return e.prototype.loadTelemetryAppendersFromRegistery=function(){for(var e=a.Registry.as(t.Extenstions.TelemetryAppenders).getTelemetryAppenderDescriptors(),n=0;n<e.length;n++){var r=e[n],i=this.instantiationService.createInstance(r);this.appenders.push(i)}},e.prototype._safeStringify=function(e){return s.safeStringify(e)},e.prototype.onTelemetryTimerEventStop=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=n.data||{};r.duration=n.timeTaken(),"public"===n.topic?this.publicLog(n.name,r):this.log(n.name,r)}},e.prototype.onErrorEvent=function(e){Array.isArray(e.stack)&&(e.stack=e.stack.join("\n")),e.detail&&e.detail.stack&&(e=e.detail),e.stack&&(e.message||(e.message=this._safeStringify(e)),this.publicLog("UnhandledError",e))},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(t,n,r,i,s){if(!o.isString(t)||!e.FILTERS.some(function(e){return t.indexOf(e)>=0})){var a={message:t,filename:n,line:r,column:i};s&&(a.error={name:s.name,message:s.message,stack:s.stack}),this.publicLog("UncaughtError",a)}},e.prototype.handleEvent=function(e,t,n){if(this.config.enableTelemetry){this.eventCount++,n=this.addCommonProperties(n);for(var r=0;r<this.appenders.length;r++)this.appenders[r].log(e,t,n)}},e.prototype.addCommonProperties=function(e){e=e||{};var t=new Date;return e.sessionID=this.sessionID,e.timestamp=t,e.version=u.version,e.userId=this.userIdHash,e["common.timesincesessionstart"]=t.getTime()-this.startTime.getTime(),e["common.sequence"]=this.eventCount,e},e.prototype.dispose=function(){for(;this.toUnbind.length;)this.toUnbind.pop()();this.timeKeeper.removeListener(this.timeKeeperListener),this.timeKeeper.dispose(),this.oldOnError&&(self.onerror=this.oldOnError);for(var e=0;e<this.appenders.length;e++)this.appenders[e].dispose()},e.prototype.setInstantiationService=function(e){this.instantiationService=e,this.instantiationService&&this.loadTelemetryAppendersFromRegistery()},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(e,!1,t)},e.prototype.publicLog=function(e,t){this.handleEvent(e,!0,t)},e.prototype.getAppendersCount=function(){return this.appenders.length},e.prototype.getAppenders=function(){return this.appenders},e.prototype.addTelemetryAppender=function(e){this.appenders.push(e)},e.prototype.removeTelemetryAppender=function(e){var t=this.appenders.indexOf(e);t>-1&&this.appenders.splice(t,1)},e.FILTERS=["NPObject"],e}();t.AbstractTelemetryService=d,t.Extenstions={TelemetryAppenders:"telemetry.appenders"};var h=function(){function e(){this.telemetryAppenderDescriptors=[]}return e.prototype.registerTelemetryAppenderDescriptor=function(e){this.telemetryAppenderDescriptors.push(e)},e.prototype.getTelemetryAppenderDescriptors=function(){return this.telemetryAppenderDescriptors},e}();a.Registry.add(t.Extenstions.TelemetryAppenders,new 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/platform/telemetry/workerTelemetryService",["require","exports","vs/platform/telemetry/abstractTelemetryService"],function(e,t,n){var r=function(e){function t(t,n){void 0===t&&(t=null),n=n||{},n.enableHardIdle=!1,n.enableSoftIdle=!1,e.call(this,t,n)}return __extends(t,e),t}(n.AbstractTelemetryService);t.WorkerTelemetryService=r;var i=function(){function e(e){this.workerPublisher=e}return e.prototype.log=function(e,t,n){var n=n||{};n.workerTelemetry=!0,this.workerPublisher&&this.workerPublisher.sendMessage("telemetryService",{eventName:e,isPublic:t,data:n})},e.prototype.dispose=function(){this.workerPublisher=null},e}();t.WorkerTelemetryAppender=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/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.get=function(e){return this.data[e.toString()]?this.data[e.toString()]:null},t.prototype.all=function(){var e=this;return Object.keys(this.data).map(function(t){return e.data[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];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"],function(e,t,n,r){var i=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=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}();t.DispatcherService=i}),define("vs/base/arrays",["require","exports"],function(e,t){function n(e,t){return void 0===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,n){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}function o(e,t){void 0===t&&(t=null);for(var n=new Array(e);e-->0;)n.push(t);return n}function s(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 a(e,t){var n=new Array;if(t)for(var r={},i=0;i<e.length;i++)for(var o=0;o<e[i].length;o++){var s=e[i][o],a=t(s);r.hasOwnProperty(a)||(r[a]=!0,n.push(s))}else for(var i=0,u=e.length;u>i;i++)n.push.apply(n,e[i]);return n}function u(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 l(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];r&&t.push(r)}return t}function c(e,t){return e.indexOf(t)>=0}function d(e,t,n){var r=e[t],i=e[n];e[t]=i,e[n]=r}function h(e,t,n){e.splice(n,0,e.splice(t,1)[0])}function p(e){return!Array.isArray(e)||0===e.length}function f(e,t){return e===t}function g(e,t,n){return void 0===n&&(n=f),e.every(function(e){return t.some(function(t){return n(e,t)})})}function m(e,t,n){return void 0===n&&(n=f),e.every(function(e){return!t.some(function(t){return n(e,t)})})}function v(e,t){if(!t)return e.filter(function(t,n){return e.indexOf(t)===n});var n={};return e.filter(function(e){var r=t(e);return n[r]?!1:(n[r]=!0,!0)})}function y(e,t,n){void 0===n&&(n=null);for(var r=0;r<e.length;r++){var i=e[r];if(t(i))return i}return n}function _(e,t){for(var n=[],r=0;t>r;r++)n.push(e);return n}t.tail=n,t.forEach=r,t.equals=i,t.fill=o,t.binarySearch=s,t.merge=a,t.findIndexInSegmentsArray=u,t.coalesce=l,t.contains=c,t.swap=d,t.move=h,t.isFalsyOrEmpty=p,t.withlist=g,t.blocklist=m,t.distinct=v,t.first=y,t.repeat=_}),define("vs/base/collections",["require","exports"],function(e,t){function n(){return Object.create(null)}function r(){return Object.create(null)}function i(e,t,n){void 0===n&&(n=null);var r=String(t);return a(e,r)?e[r]:n}function o(e,t,n){var r=String(t);return a(e,r)?e[r]:("function"==typeof n&&(n=n()),e[r]=n,n)}function s(e,t,n){e[n(t)]=t}function a(e,t){return m.call(e,t)}function u(e){return{every:function(t){for(var n in e)if(m.call(e,n)&&!t(n))return!1;return!0}}}function l(e){var t=[];for(var n in e)m.call(e,n)&&t.push(e[n]);return t}function c(e,t){for(var n in e)if(m.call(e,n)){var r=t({key:n,value:e[n]},function(){delete e[n]});if(r===!1)return}}function d(e,t){return m.call(e,t)?(delete e[t],!0):!1}function h(e,t){var r=n();return e.forEach(function(e){return o(r,t(e),[]).push(e)}),r}function p(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 f(e){return{every:function(t){return t(e)}}}function g(e){if(Array.isArray(e))return e;var t=[];return e.every(function(e){return t.push(e),!0}),t}t.createStringDictionary=n,t.createNumberDictionary=r,t.lookup=i,t.lookupOrInsert=o,t.insert=s;var m=Object.prototype.hasOwnProperty;t.contains=a,t.keys=u,t.values=l,t.forEach=c,t.remove=d,t.groupBy=h,t.EmptyIterable={every:function(){return!0}},t.combine=p,t.singleton=f,t.toArray=g}),define("vs/platform/thread/attribute",["require","exports","vs/base/lib/winjs.base","vs/platform/services"],function(e,t,n,r){function i(e,t){for(var n in e)if(e[n]===t)return n;throw new Error("Member not found in prototype")}function o(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 s(e,t){var n=i(e.prototype,t);e.prototype[n]=function(){for(var e=[],r=0;r<arguments.length;r++)e[r-0]=arguments[r];return o(this).MainThread(this,n,t,e)}}function a(e,t,s,a){void 0===a&&(a=r.ThreadAffinity.None);var u,l=i(e.prototype,t);"function"==typeof s?u=s:"undefined"!=typeof s&&(a=s),e.prototype[l]=function(){for(var e=[],r=0;r<arguments.length;r++)e[r-0]=arguments[r];if(u){var i=this,s=u.call(i);return n.Promise.is(s)||(s=n.Promise.as(s)),s.then(function(){return o(i).OneWorker(i,l,t,e,a)})}return o(this).OneWorker(this,l,t,e,a)}}function u(e,t){var n=i(e.prototype,t);e.prototype[n]=function(){for(var e=[],r=0;r<arguments.length;r++)e[r-0]=arguments[r];return o(this).AllWorkers(this,n,t,e)}}function l(e,t){var n=i(e.prototype,t);e.prototype[n]=function(){for(var e=[],r=0;r<arguments.length;r++)e[r-0]=arguments[r];return o(this).Everywhere(this,n,t,e)}}t.THREAD_SERVICE_PROPERTY_NAME="__$$__threadService",t.MainThread=s,t.OneWorker=a,t.AllWorkers=u,t.Everywhere=l}),define("vs/base/callbackList",["require","exports"],function(){var e=function(){function e(){}return e.prototype.add=function(e,t){var n=this;return this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),{dispose:function(){return n.remove(e)}}},e.prototype.remove=function(e){if(this._callbacks){var t=this._callbacks.indexOf(e);t>=0&&(this._callbacks.splice(t,1),this._contexts.splice(t,1))}},e.prototype.invoke=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];if(this._callbacks){for(var n=[],r=0;r<this._callbacks.length;r++){var i=this._callbacks[r];n.push(i.apply(this._contexts[r],e))}return n}},e}();return e}),define("vs/base/eventSource",["require","exports","vs/base/callbackList"],function(e,t,n){var r=function(){function e(e){this._fireLastOnAdd=e}return e.prototype.fire=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return this._value?(this._fireLastOnAdd&&(this._lastArgs=e),this._value.invoke.apply(this._value,e)):void 0},Object.defineProperty(e.prototype,"value",{get:function(){var e=this;return this._value||(this._value=new n),{add:function(t,n){e._value.add(t,n),e._fireLastOnAdd&&setTimeout(function(){return t.bind(n,e._lastArgs)})},remove:this._value.remove.bind(this._value)}},enumerable:!0,configurable:!0}),e}();return r}),define("vs/platform/markers/markerService2",["require","exports","vs/base/network","vs/base/arrays","vs/base/strings","vs/base/collections","vs/platform/thread/attribute","vs/base/eventSource"],function(e,t,n,r,i,o,s,a){var u;!function(e){function t(e){var t=/^(.*)→(.*)$/.exec(e);return{owner:t[1],resource:n.URL.fromValue(t[2])}}function r(e){return e.owner+"→"+e.resource}function o(e,t){return new RegExp(i.format("^({0})→({1})$",e?i.escapeRegExpCharacters(e):".*",t?i.escapeRegExpCharacters(t.toString()):".*"))}function s(e,t){return e+"→"+t}e.fromValue=t,e.valueOf=r,e.selector=o,e.raw=s}(u||(u={}));var l=function(){function e(e){this._data=Object.create(null),this._onMarkerChanged=new a,e.registerInstance(this)}return e.prototype.getId=function(){return"__markerService"},e.prototype.getSerializableState=function(){return this._data},e.prototype.setData=function(e){this._data=e},Object.defineProperty(e.prototype,"onMarkerChanged",{get:function(){return this._onMarkerChanged?this._onMarkerChanged.value:null},enumerable:!0,configurable:!0}),e.prototype.changeOne=function(e,t,n){var i=u.raw(e,t),o=!r.isFalsyOrEmpty(this._data[i]),s=!r.isFalsyOrEmpty(n);s?(this._data[i]=n,this._onMarkerChanged.fire([t])):o&&(delete this._data[i],this._onMarkerChanged.fire([t]))},e.prototype.changeAll=function(e,t){var n=this,i=Object.create(null);this._forEach(e,null,-1,function(e,t){var n=u.fromValue(e.key).resource;i[n.toExternal()]=n,t()}),r.isFalsyOrEmpty(t)||t.forEach(function(t){i[t.resource.toString()]=t.resource,o.lookupOrInsert(n._data,u.raw(e,t.resource),[]).push(t.marker)}),this._onMarkerChanged.fire(o.values(i))},e.prototype.read=function(e){var t=this;void 0===e&&(e={});var n=[];return this._forEach(e.owner,e.resource,e.take,function(e){return t._fromEntry(e,n)}),n},e.prototype._forEach=function(e,t,n,r){var i=u.selector(e,t),s=0;o.forEach(this._data,function(e,t){return i.test(e.key)&&(r(e,t),n>0&&s++>=n)?!1:void 0})},e.prototype._fromEntry=function(t,n){var r=u.fromValue(t.key);t.value.forEach(function(t){e._sanitize(t),n.push({owner:r.owner,resource:r.resource,code:t.code,message:t.message,severity:t.severity,startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn})})},e._sanitize=function(e){e.code=e.code||0,e.startLineNumber=e.startLineNumber>0?e.startLineNumber:1,e.startColumn=e.startColumn>0?e.startColumn:1,e.endLineNumber=e.endLineNumber>=e.startLineNumber?e.endLineNumber:e.startLineNumber,e.endColumn=e.endColumn>0?e.endColumn:e.startColumn},e.$changeOne=s.MainThread(e,e.prototype.changeOne),e.$changeAll=s.MainThread(e,e.prototype.changeAll),e}();t.MarkerService=l}),define("vs/platform/thread/abstractThreadService",["require","exports","vs/base/lib/winjs.base","vs/base/env","vs/platform/thread/attribute"],function(e,t,n,r,i){var o=function(){function e(){this.isInMainThread=!r.isInWebWorker()&&!r.isInEmulatedWebWorker()&&!r.isInProcessWorker(),this._boundObjects={},this._pendingObjects=[]}return e.prototype.setInstantiationService=function(e){this._instantiationService=e},e.prototype.createInstance=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return this._doCreateInstance(e)},e.prototype._doCreateInstance=function(e){var t=this,r=this._instantiationService.createInstance.apply(this._instantiationService,e);
if(n.Promise.is(r)){var i=r.then(function(e){if(e.asyncCtor){var t=e.asyncCtor();if(n.Promise.is(t))return t.then(function(){return e})}return e});return this._pendingObjects.push(i),i.then(function(e){for(var n=t._finishInstance(e),r=0;r<t._pendingObjects.length;r++)if(t._pendingObjects[r]===i){t._pendingObjects.splice(r,1);break}return n})}return this._finishInstance(r)},e.prototype._finishInstance=function(e){return e[i.THREAD_SERVICE_PROPERTY_NAME]=this,this._boundObjects[e.getId()]=e,e.creationDone&&e.creationDone(),e},e.prototype.registerInstance=function(e){this._finishInstance(e)},e}();t.AbstractThreadService=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/platform/thread/workerThreadService",["require","exports","vs/base/lib/winjs.base","vs/platform/thread/abstractThreadService"],function(e,t,n,r){var i=function(e){function t(t,r,i){var o=this;e.call(this),this._mainThreadData=t,this._dispatcherService=r,this._dispatcherService.register("threadService",function(e,t,r){if(!o._boundObjects.hasOwnProperty(e))return n.Promise.join(o._pendingObjects.slice(0)).then(function(){if(!o._boundObjects.hasOwnProperty(e))return n.Promise.wrapError(new Error("Bound object `"+e+"` was not found."));var i=o._boundObjects[e];return n.Promise.as(i[t].apply(i,r))});var i=o._boundObjects[e];return n.Promise.as(i[t].apply(i,r))}),this._publisher=i}return __extends(t,e),t.prototype._finishInstance=function(t){var n=t.getId();if(this._mainThreadData.hasOwnProperty(n)){var r=this._mainThreadData[n];delete this._mainThreadData[n],t.setData||console.log("BROKEN INSTANCE!!! "+n),t.setData(r)}return e.prototype._finishInstance.call(this,t)},t.prototype.MainThread=function(e,t,n,r){return this._publisher.sendMessage("threadService",{identifier:e.getId(),memberName:t,args:r})},t.prototype.OneWorker=function(e,t,n,r){return n.apply(e,r)},t.prototype.AllWorkers=function(e,t,n,r){return n.apply(e,r)},t.prototype.Everywhere=function(e,t,n,r){return n.apply(e,r)},t.prototype.ensureWorkers=function(){},t.prototype.addStatusListener=function(){},t.prototype.removeStatusListener=function(){},t}(r.AbstractThreadService);t.WorkerThreadService=i}),define("vs/base/filters",["require","exports","vs/base/strings"],function(e,t,n){function r(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return function(t,n){for(var r=0,i=e.length;i>r;r++){var o=e[r](t,n);if(o)return o}return null}}function i(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return function(t,n){for(var r=[],i=0,o=e.length;o>i;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.length<t.length)return null;e&&(t=t.toLowerCase(),n=n.toLowerCase());for(var r=0;r<t.length;r++)if(t[r]!==n[r])return null;return t.length>0?[{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 f({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<t.length&&null===(n=m(e.toLowerCase(),t,0,r));)r=g(t,r+1);return n}function c(e){var t=e.charCodeAt(0);return t>=97&&122>=t}function d(e){var t=e.charCodeAt(0);return t>=65&&90>=t}function h(e){var t=e.charCodeAt(0);return t>=48&&57>=t}function p(e){return c(e)||d(e)||h(e)}function f(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function g(e,t){for(var n=t;n<e.length;n++){var r=e[n];if(d(r)||h(r)||n>0&&!p(e[n-1]))return n}return e.length}function m(e,t,n,r){if(n===e.length)return[];if(r===t.length)return null;if(e[n]!==t[r].toLowerCase())return null;var i=null,o=r+1;for(i=m(e,t,n+1,r+1);!i&&(o=g(t,o))<t.length;)i=m(e,t,n+1,o),o++;return null===i?null:f({start:r,end:r+1},i)}t.or=r,t.and=i,t.matchesStrictPrefix=function(e,t){return o(!1,e,t)},t.matchesPrefix=function(e,t){return o(!0,e,t)},t.matchesContiguousSubString=s,t.matchesSubString=a,t.matchesCamelCase=l;var v=function(){function e(){}return e.matches=function(t,r){var i=e.RegExpCache[t];i||(i=new RegExp(n.convertSimple2RegExpPattern(t),"i"),e.RegExpCache[t]=i);var o=i.exec(r);return o?[{start:o.index,end:o.index+o[0].length}]:e.DefaultFilter(t,r)},e.DefaultFilter=r(t.matchesPrefix,l,s),e.RegExpCache={},e}();t.CombinedMatcher=v}),define("vs/editor/modes/modesFilters",["require","exports","vs/base/filters"],function(e,t,n){function r(e){return function(t,n){var r=e(t,n.label);return n.highlights=r||[],!!r}}function i(e,t){return function(n,r){return e(n,r)||t(n,r)}}function o(e,t){return function(n,r){return e(n,r)&&t(n,r)}}t.StrictPrefix=r(n.matchesStrictPrefix),t.Prefix=r(n.matchesPrefix),t.CamelCase=r(n.matchesCamelCase),t.ContiguousSubString=r(n.matchesContiguousSubString),t.or=i,t.and=o,t.DefaultFilter=i(i(t.Prefix,t.CamelCase),t.ContiguousSubString)}),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/editor/modes/nullMode",["require","exports","vs/editor/modes/modes"],function(e,t,n){function r(e){void 0===e&&(e="");for(var t="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",n="(-?\\d*\\.\\d\\w*)|([^",r=0;r<t.length;r++)e.indexOf(t[r])>=0||(n+="\\"+t[r]);return n+="\\s]+)",new RegExp(n,"g")}function i(e,t,r,i){void 0===i&&(i=0);var o=[{startIndex:i,type:"",bracket:n.Bracket.None}],s=[{startIndex:i,mode:e}];return{tokens:o,actualStopOffset:i+t.length,endState:r,modeTransitions:s}}var o=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=o,t.createWordRegExp=r;var s=function(){function e(){this.tokenTypeClassificationSupport=this}return e.prototype.getId=function(){return e.ID},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=r(),e.ID="vs.editor.modes.nullMode",e}();t.NullMode=s,t.nullTokenize=i}),define("vs/platform/instantiation/instantiationService",["require","exports","vs/base/lib/winjs.base","vs/base/errors","vs/base/strings","vs/base/types","vs/platform/services","vs/base/collections"],function(e,t,n,r,i,o,s,a){function u(e){return new d(e,new l)}t.create=u;var l=function(){function e(){this._value=0}return Object.defineProperty(e.prototype,"locked",{get:function(){return 0===this._value},enumerable:!0,configurable:!0}),e.prototype.runUnlocked=function(e){this._value++;try{return e()}finally{this._value--}},e}(),c=function(){function e(e,t){var n=this;this._services=e,this._lock=t,a.forEach(this._services,function(e){n.registerService(e.key,e.value)})}return e.prototype.registerService=function(e,t){var n=this;Object.defineProperty(this,e,{get:function(){if(n._lock.locked)throw r.illegalState("the services map can only be used during construction");if(!t)throw r.illegalArgument(i.format("service with '{0}' not found",e));return t},set:function(){throw r.illegalState("services cannot be changed")},configurable:!1,enumerable:!1}),this._services[e]=t},Object.defineProperty(e.prototype,"lock",{get:function(){return this._lock},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"services",{get:function(){return this._services},enumerable:!0,configurable:!0}),e.prototype.createInstance=function(e,t){var n=[e.ctor,this];return n.push.apply(n,e.staticArguments()),n.push.apply(n,t),this._lock.runUnlocked(function(){var t=o.create.apply(null,n);return e._validate(t),t})},e}(),d=function(){function t(e,t){e.instantiationService=this,this._servicesMap=new c(e,t)}return t.prototype.createChild=function(e){var n={};return a.forEach(this._servicesMap.services,function(e){n[e.key]=e.value}),a.forEach(e,function(e){n[e.key]=e.value}),new t(n,this._servicesMap.lock)},t.prototype.registerService=function(e,t){this._servicesMap.registerService(e,t)},t.prototype.createInstance=function(e){for(var t=new Array(arguments.length-1),n=1,r=arguments.length;r>n;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));var l;if(l=t.ctorName?e[t.ctorName]:e,"function"!=typeof l)return u(r.illegalArgument("not a function: "+t.ctorName||t.moduleName));try{i.unshift.apply(i,t.staticArguments()),n(a._servicesMap.createInstance(new s.SyncDescriptor(l),i))}catch(c){return u(c)}},u)},function(){o=r.canceled()})},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/platform/thread/nullThreadService",["require","exports","vs/base/lib/winjs.base","vs/platform/thread/abstractThreadService","vs/platform/instantiation/instantiationService"],function(e,t,n,r,i){var o=function(e){function t(t){e.call(this),this._warn=t,this.setInstantiationService(i.create({threadService:this}))}return __extends(t,e),t.prototype._doCreateInstance=function(t){return this._warn&&console.warn("Instantiating using the null thread service"),e.prototype._doCreateInstance.call(this,t)},t.prototype.MainThread=function(e,t,n,r){return n.apply(e,r)},t.prototype.OneWorker=function(){return n.Promise.as(null)},t.prototype.AllWorkers=function(){return n.Promise.as(null)},t.prototype.Everywhere=function(e,t,n,r){return n.apply(e,r)},t.prototype.ensureWorkers=function(){},t.prototype.addStatusListener=function(){},t.prototype.removeStatusListener=function(){},t}(r.AbstractThreadService);t.NULL_THREAD_SERVICE=new o(!0),t.PLUGIN_HOST_THREAD_SERVICE=new o(!1)}),define("vs/editor/modes/stream",["require","exports"],function(e,t){var n=function(){function e(e){this._source=e,this.sourceLength=e.length,this._pos=0,this.whitespace="	  ",this.whitespaceArr=this.stringToArray(this.whitespace),this.separators="",this.separatorsArr=this.stringToArray(this.separators),this.tokenStart=-1,this.tokenEnd=-1}return e.prototype.stringToArray=function(t){return e.STRING_TO_ARRAY_CACHE.hasOwnProperty(t)||(e.STRING_TO_ARRAY_CACHE[t]=this.actualStringToArray(t)),e.STRING_TO_ARRAY_CACHE[t]},e.prototype.actualStringToArray=function(e){for(var t=0,n=0;n<e.length;n++)t=e.charCodeAt(n);var r=[];for(n=0;t>n;n++)r[n]=!1;for(n=0;n<e.length;n++)r[e.charCodeAt(n)]=!0;return r},e.prototype.pos=function(){return this._pos},e.prototype.eos=function(){return this._pos>=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.next2=function(){if(this._pos>=this.sourceLength)throw new Error("Stream is at the end");this.tokenStart=-1,this.tokenEnd=-1,this._pos++},e.prototype.advance=function(e){if(0===e)return"";var t=this._pos;return this._pos+=e,this.tokenStart=-1,this.tokenEnd=-1,this._source.substring(t,this._pos)},e.prototype._advance2=function(e){return 0===e?e:(this._pos+=e,this.tokenStart=-1,this.tokenEnd=-1,e)},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 0;for(t=0;i>t;t++)if(r.charAt(n+t).toLowerCase()!==e.charAt(t).toLowerCase())return 0;return i},e.prototype.advanceIfStringCaseInsensitive=function(e){return this.advance(this._advanceIfStringCaseInsensitive(e))},e.prototype.advanceIfStringCaseInsensitive2=function(e){return this._advance2(this._advanceIfStringCaseInsensitive(e))},e.prototype._advanceIfString=function(e){var t,n=this._pos,r=this._source,i=e.length;if(1>i||n+i>this.sourceLength)return 0;for(t=0;i>t;t++)if(r.charCodeAt(n+t)!==e.charCodeAt(t))return 0;return i},e.prototype.advanceIfString=function(e){return this.advance(this._advanceIfString(e))},e.prototype.advanceIfString2=function(e){return this._advance2(this._advanceIfString(e))},e.prototype._advanceIfCharCode=function(e){return this._pos<this.sourceLength&&this._source.charCodeAt(this._pos)===e?1:0},e.prototype.advanceIfCharCode=function(e){return this.advance(this._advanceIfCharCode(e))},e.prototype.advanceIfCharCode2=function(e){return this._advance2(this._advanceIfCharCode(e))},e.prototype._advanceIfRegExp=function(e){return this._pos>=this.sourceLength?0:e.test(this._source.substr(this._pos))?RegExp.lastMatch.length:0},e.prototype.advanceIfRegExp=function(e){return this.advance(this._advanceIfRegExp(e))},e.prototype.advanceIfRegExp2=function(e){return this._advance2(this._advanceIfRegExp(e))},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._advanceUntilString=function(e,t){if(this.eos()||0===e.length)return 0;var n=this._pos,r=this._source.indexOf(e,n);return-1===r?this.sourceLength-n:t?r+e.length-n:r-n},e.prototype.advanceUntilString=function(e,t){return this.advance(this._advanceUntilString(e,t))},e.prototype.advanceUntilString2=function(e,t){return this._advance2(this._advanceUntilString(e,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 i-r},e.prototype.skipWhitespace=function(){return this.advance(this._skipWhitespace())},e.prototype.skipWhitespace2=function(){return this._advance2(this._skipWhitespace())},e.STRING_TO_ARRAY_CACHE={},e}();t.LineStream=n});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/supports",["require","exports","vs/base/types","vs/base/arrays","vs/base/lib/winjs.base","vs/editor/modes/stream","vs/editor/modes/modes","vs/editor/modes/nullMode"],function(e,t,n,r,i,o,s,a){function u(e,t,n,i){var o=t.modeTransitions;if(1===o.length)return i(o[0].mode,t,n);var s=r.findIndexInSegmentsArray(o,n),a=o[s].mode,u=o[s].startIndex,l=t.findIndexOfOffset(u),d=-1,h=-1;s+1<o.length?(h=t.findIndexOfOffset(o[s+1].startIndex),d=t.getTokenStartIndex(h)):(h=t.getTokenCount(),d=t.getLineContent().length);var p=t.getTokenStartIndex(l),f=new c(t,a,l,h,p,d);return i(a,f,n-p)}var l=function(){function e(e,t,n){this.startIndex=e,this.type=t,this.bracket=n}return e}();t.Token=l,t.handleEvent=u;var c=function(){function e(e,t,n,r,i,o){this.modeTransitions=[{startIndex:0,mode:t}],this._actual=e,this._firstTokenInModeIndex=n,this._nextTokenAfterMode=r,this._firstTokenCharacterOffset=i,this._nextCharacterAfterModeIndex=o}return e.prototype.getLineContent=function(){var e=this._actual.getLineContent();return e.substring(this._firstTokenCharacterOffset,this._nextCharacterAfterModeIndex)},e.prototype.getTokenCount=function(){return this._nextTokenAfterMode-this._firstTokenInModeIndex},e.prototype.findIndexOfOffset=function(e){return this._actual.findIndexOfOffset(e+this._firstTokenCharacterOffset)-this._firstTokenInModeIndex},e.prototype.getTokenStartIndex=function(e){return this._actual.getTokenStartIndex(e+this._firstTokenInModeIndex)-this._firstTokenCharacterOffset},e.prototype.getTokenEndIndex=function(e){return this._actual.getTokenEndIndex(e+this._firstTokenInModeIndex)-this._firstTokenCharacterOffset},e.prototype.getTokenType=function(e){return this._actual.getTokenType(e+this._firstTokenInModeIndex)},e.prototype.getTokenBracket=function(e){return this._actual.getTokenBracket(e+this._firstTokenInModeIndex)},e.prototype.getTokenText=function(e){return this._actual.getTokenText(e+this._firstTokenInModeIndex)},e}();t.FilteredLineContext=c;var d=function(){function e(e){this._mode=e}return Object.defineProperty(e.prototype,"mode",{get:function(){return this._mode},enumerable:!0,configurable:!0}),e.prototype._dispatchToMode=function(e,t,n){var i=e.modeTransitions;if(1===i.length)return n(i[0].mode,e,t);var o=r.findIndexInSegmentsArray(i,t),s=i[o].mode,a=i[o].startIndex,u=e.findIndexOfOffset(a),l=-1,d=-1;o+1<i.length?(d=e.findIndexOfOffset(i[o+1].startIndex),l=e.getTokenStartIndex(d)):(d=e.getTokenCount(),l=e.getLineContent().length);var h=e.getTokenStartIndex(u),p=new c(e,s,u,d,h,l);return n(s,p,t-h)},e}();t.AbstractSupport=d;var h=function(e){function t(t,r,i){e.call(this,t);var o=t,s=!1;void 0!==r&&(void 0!==i?(o=r,s=i):"boolean"==typeof r&&(s=r)),this.customization=o,this.supportsNestedModes=s,this.shouldGenerateEmbeddedModels=s,this.defaults={enterNestedMode:!n.isFunction(o.enterNestedMode),getNestedMode:!n.isFunction(o.getNestedMode),getNestedModeInitialState:!n.isFunction(o.getNestedModeInitialState),getLeavingNestedModeData:!n.isFunction(o.getLeavingNestedModeData),onReturningFromNestedMode:!n.isFunction(o.onReturningFromNestedMode)}}return __extends(t,e),t.prototype.getInitialState=function(){return this.customization.getInitialState()},t.prototype.tokenize=function(e,t,n,r){return void 0===n&&(n=0),void 0===r&&(r=n+e.length),t.getMode()!==this.mode?this._nestedTokenize(e,t,n,r,[],[]):this._myTokenize(e,t,n,r,[],[])},t.prototype._nestedTokenize=function(e,t,n,r,i,o){for(var s=t.getStateData(),u=this.getLeavingNestedModeData(e,s),l=t;l.getStateData()&&l.getStateData().getMode()!==this.mode;)l=l.getStateData();var c=l.getMode();if(!u){var d;return d=c.tokenizationSupport?c.tokenizationSupport.tokenize(e,t,n,r):a.nullTokenize(c,e,t,n),d.tokens=i.concat(d.tokens),d.modeTransitions=o.concat(d.modeTransitions),d}var h=u.nestedModeBuffer;if(h.length>0){var p;p=c.tokenizationSupport?c.tokenizationSupport.tokenize(h,t,n,r):a.nullTokenize(c,h,t,n),t=p.endState,i=i.concat(p.tokens),o=o.concat(p.modeTransitions)}var f=u.bufferAfterNestedMode,g=u.stateAfterNestedMode;return g.setStateData(s.getStateData()),this.onReturningFromNestedMode(g,t),this._myTokenize(f,g,n+h.length,r,i,o)},t.prototype._myTokenize=function(e,n,r,i,a,u){var c,d,h=new o.LineStream(e),p=null,f=null;n=n.clone(),(u.length<=0||u[u.length-1].mode!==this.mode)&&u.push({startIndex:r,mode:this.mode});for(var g=Math.min(i-r,e.length),m=s.Bracket.None;h.pos()<g;){d=h.pos();do{if(c=n.tokenize(h),null===c||void 0===c||(void 0===c.type||null===c.type)&&(void 0===c.nextState||null===c.nextState))throw new Error("Tokenizer must return a valid state");if(c.nextState&&(c.nextState.setStateData(n.getStateData()),n=c.nextState),h.pos()<=d)throw new Error("Stream did not advance while tokenizing. Mode id is "+this.mode.getId()+' (stuck at token type: "'+c.type+'", prepend tokens: "'+a.map(function(e){return e.type}).join(",")+'").')}while(!c.type&&""!==c.type);if((p!==c.type||c.bracket||null===p)&&a.push(new l(d+r,c.type,c.bracket||m)),p=c.type,this.supportsNestedModes&&this.enterNestedMode(n)){var v=this._getEmbeddedLevel(n);if(v<t.MAX_EMBEDDED_LEVELS){var y=this.getNestedModeInitialState(n);if(!h.eos()){var _=e.substr(h.pos()),b=this._nestedTokenize(_,y.state,r+h.pos(),i,a,u);return b.retokenize=b.retokenize||y.missingModePromise,b}n=y.state,f=y.missingModePromise}}}return{tokens:a,actualStopOffset:h.pos()+r,modeTransitions:u,endState:n,retokenize:f}},t.prototype._getEmbeddedLevel=function(e){for(var t=-1;e;)t++,e=e.getStateData();return t},t.prototype.enterNestedMode=function(e){return this.defaults.enterNestedMode?!1:this.customization.enterNestedMode(e)},t.prototype.getNestedMode=function(e){return this.defaults.getNestedMode?null:this.customization.getNestedMode(e)},t.prototype.getNestedModeInitialState=function(e){if(this.defaults.getNestedModeInitialState){var t,n=this.getNestedMode(e),r=n.missingModePromise;return t=n.mode.tokenizationSupport?n.mode.tokenizationSupport.getInitialState():new a.NullState(n.mode,null),t.setStateData(e),{state:t,missingModePromise:r}}return this.customization.getNestedModeInitialState(e)},t.prototype.getLeavingNestedModeData=function(e,t){return this.defaults.getLeavingNestedModeData?null:this.customization.getLeavingNestedModeData(e,t)},t.prototype.onReturningFromNestedMode=function(e,t){return this.defaults.onReturningFromNestedMode?null:this.customization.onReturningFromNestedMode(e,t)},t.MAX_EMBEDDED_LEVELS=5,t}(d);t.TokenizationSupport=h;var p=function(e){function t(t,r){void 0===r&&(r=t),e.call(this,t),this.defaults={getElectricCharacters:!n.isFunction(r.getElectricCharacters),onElectricCharacter:!n.isFunction(r.onElectricCharacter),onEnter:!n.isFunction(r.onEnter)},this.customization=r}return __extends(t,e),t.prototype.getElectricCharacters=function(){return this.defaults.getElectricCharacters?[]:this.customization.getElectricCharacters()},t.prototype.onElectricCharacter=function(e,t){var n=this;return this._dispatchToMode(e,t,function(e,t,r){return n.mode===e?n.defaults.onElectricCharacter?null:n.customization.onElectricCharacter(t,r):e.electricCharacterSupport?e.electricCharacterSupport.onElectricCharacter(t,r):null})},t.prototype.onEnter=function(e,t){var n=this;return this._dispatchToMode(e,t,function(e,t,r){return n.mode===e?n.defaults.onEnter?null:n.customization.onEnter(t,r):e.electricCharacterSupport?e.electricCharacterSupport.onEnter(t,r):null})},t}(d);t.ElectricCharacterSupport=p;var f=function(e){function t(t,n){e.call(this,t),this.brackets=n}return __extends(t,e),t.prototype.getElectricCharacters=function(){return this.brackets.getElectricBrackets()},t.prototype.onElectricCharacter=function(e,t){var n=this;return this._dispatchToMode(e,t,function(e,t,r){return n.mode===e?n.brackets.onElectricCharacter(t,r):e.electricCharacterSupport?e.electricCharacterSupport.onElectricCharacter(t,r):null})},t.prototype.onEnter=function(e,t){var n=this;return this._dispatchToMode(e,t,function(e,t,r){return n.mode===e?n.brackets.onEnter(t,r):e.electricCharacterSupport?e.electricCharacterSupport.onEnter(t,r):null})},t}(d);t.BracketElectricCharacterSupport=f;var g=function(e){function t(t,n,r){void 0===r&&(r=n),e.call(this,t),this._autoClosingPairs=n,this._surroundingPairs=r}return __extends(t,e),t.prototype.getAutoClosingPairs=function(){return this._autoClosingPairs},t.prototype.shouldAutoClosePair=function(e,t,n){var r=this;return this._dispatchToMode(t,n,function(t,n,i){if(r.mode===t){if(0===n.getTokenCount())return!1;for(var o=n.findIndexOfOffset(i-1),s=n.getTokenType(o),a=0;a<r._autoClosingPairs.length;++a)if(r._autoClosingPairs[a].open===e){if(r._autoClosingPairs[a].notIn)for(var u=0;u<r._autoClosingPairs[a].notIn.length;++u)if(s.indexOf(r._autoClosingPairs[a].notIn[u])>-1)return!1;break}return!0}return t.characterPairSupport?t.characterPairSupport.shouldAutoClosePair(e,n,i):null})},t.prototype.getSurroundingPairs=function(){return this._surroundingPairs},t}(d);t.CharacterPairSupport=g;var m=function(){function e(){}return e.prototype.valueSetsReplace=function(e,t,n){for(var r=null;e.length>0&&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}();t.ReplaceSupport=new m;var v=function(){function e(e,t){void 0===t&&(t=null),this.resourceService=e,this.defaults={textReplace:!t||!n.isFunction(t.textReplace),navigateValueSetFallback:!t||!n.isFunction(t.navigateValueSetFallback)},this.customization=t}return e.prototype.navigateValueSet=function(e,t,n){var r=this.doNavigateValueSet(e,t,n,!0);return r&&r.value&&r.range?i.TPromise.as(r):this.defaults.navigateValueSetFallback?i.TPromise.as(null):this.customization.navigateValueSetFallback(e,t,n)},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.getWordAtPosition(a,!0,!0);if(!u||-1===u.startColumn)return null;i=u.word,s.range={startLineNumber:t.startLineNumber,endLineNumber:t.endLineNumber,startColumn:u.startColumn,endColumn:u.endColumn}}var l=this.numberReplace(i,n);if(null!==l)s.value=l;else{var c=this.textReplace(i,n);if(null!==c)s.value=c;else if(r)return this.doNavigateValueSet(e,t,n,!1)}return s},e.prototype.numberReplace=function(e,t){var n=Math.pow(10,e.length-(e.lastIndexOf(".")+1)),r=Number(e),i=parseFloat(e);return isNaN(r)||isNaN(i)||r!==i?null:0!==r||t?(r=Math.floor(r*n),r+=t?n:-n,String(r/n)):null},e.prototype.textReplace=function(e,t){return this.defaults.textReplace?null:this.customization.textReplace(e,t)},e}();t.InplaceReplaceSupport=v}),define("vs/platform/plugins",["require","exports","vs/base/lib/winjs.base","vs/base/errors"],function(e,t,n,r){function i(e){m.INSTANCE.registerPlugins(e)}function o(e){m.INSTANCE.registerPlugin(e)}function s(){return m.INSTANCE.getAllPluginDescriptions()}function a(e,t){m.INSTANCE.registerPointListener(e,t)}function u(e){return m.INSTANCE.activateByEvent(e)}function l(e){void 0===e&&(e=[]),m.INSTANCE.registrationDone(e)}function c(){return m.INSTANCE.onReady()}function d(e){m.INSTANCE=e.accept(m.INSTANCE)}function h(e){if(!Array.isArray(e))return!1;for(var t=0,n=e.length;n>t;t++)if("string"!=typeof e[t])return!1;return!0}var p=Object.hasOwnProperty,f=this.MonacoPlugins||{},g=this;t.registerPlugins=i,t.registerPlugin=o,t.getAllPluginDescriptions=s,t.registerPointListener=a,t.activateByEvent=u,t.registrationDone=l,t.onReady=c,t.replacePluginManager=d;var m=function(){function t(e){var t=this;e?(this._onReady=n.TPromise.as(!0),this._onReadyC=function(){}):this._onReady=new n.TPromise(function(e){t._onReadyC=e},function(){console.warn("Should really not cancel this ready promise!")}),this._MonacoPlugins=f,this.activatingPlugins={},this.activatedPlugins={},this._pointListeners={};for(var r in this._MonacoPlugins)if(p.call(this._MonacoPlugins,r)){var i=this._isInvalidPluginDescription(this._MonacoPlugins[r]);if(i)throw new Error("Detected invalid plugin description: "+i)}}return t.prototype.registrationDone=function(e){e.forEach(function(e){return r.onUnexpectedError(e)}),this._onReadyC(!0)},t.prototype.onReady=function(){return this._onReady},t.prototype.accept=function(e){if(this._MonacoPlugins=e._MonacoPlugins,Object.keys(e.activatingPlugins).length>0)throw new Error("Unexpected plugin activation occured");if(Object.keys(e.activatedPlugins).length>0)throw new Error("Unexpected plugin activation occured");return this._pointListeners=e._pointListeners,this},t.prototype.registerPointListener=function(e,t){this._pointListeners[e]=this._pointListeners[e]||[],this._pointListeners[e].push(t),this._triggerPointListeners(e,this._getAllPluginDescriptionsByPoint(e))},t.prototype._triggerPointListeners=function(e,t){if(t&&0!==t.length&&p.call(this._pointListeners,e))for(var n=this._pointListeners[e].slice(0),r=0;r<n.length;r++)n[r](t)},t.prototype.registerPlugins=function(e){for(var t=0,n=e.length;n>t;t++)this.registerPlugin(e[t])},t.prototype.registerPlugin=function(e){var t=this._isInvalidPluginDescription(e);if(t)throw new Error("Invalid plugin description: "+t);if(p.call(this._MonacoPlugins,e.pluginId)&&console.warn("Plugin `"+e.pluginId+"` is already registered"),e.contributes)for(var n in e.contributes)p.call(e.contributes,n)&&this._triggerPointListeners(n,[e]);this._MonacoPlugins[e.pluginId]=e},t.prototype._getAllPluginDescriptionsByPoint=function(e){var t=[];for(var n in this._MonacoPlugins)if(p.call(this._MonacoPlugins,n)){var r=this._MonacoPlugins[n];p.call(r.contributes,e)&&t.push(r)}return t},t.prototype.getAllPluginDescriptions=function(){var e=[];for(var t in this._MonacoPlugins)p.call(this._MonacoPlugins,t)&&e.push(this._MonacoPlugins[t]);return e},t.prototype.activateByEvent=function(e){var t=this;return this._onReady.then(function(){var n=t.getAllPluginDescriptions(),r=n.filter(function(n){return p.call(t.activatedPlugins,n.pluginId)?!1:n.activationEvents?n.activationEvents.indexOf(e)>=0:!1});return t._activatePlugins(r)})},t.prototype._activatePlugins=function(e){var t=this;e.forEach(function(e){if("undefined"!=typeof e.dependencies)throw new Error("Not implemented ")});var r=e.map(function(e){return t._activatePlugin(e)});return n.TPromise.join(r)},t.prototype._activatePlugin=function(e){var t=this;return p.call(this.activatedPlugins,e.pluginId)?n.TPromise.as(this.activatedPlugins):p.call(this.activatingPlugins,e.pluginId)?this.activatingPlugins[e.pluginId]:(this.activatingPlugins[e.pluginId]=this._actualActivatePlugin(e).then(function(n){return t.activatedPlugins[e.pluginId]=n,delete t.activatingPlugins[e.pluginId],n
}),this.activatingPlugins[e.pluginId])},t._callActivate=function(e,t){if(void 0===t&&(t=[]),"function"!=typeof e.activate)return n.TPromise.as(e);var r=[{}].concat(t);try{return n.TPromise.as(e.activate.apply(g,r))}catch(i){return n.TPromise.wrapError(i)}},t._loadAMDModule=function(t){return new n.TPromise(function(n,r){e([t],function(e){n(e)},r)})},t.prototype._actualActivatePlugin=function(e){return t._loadAMDModule(e.mainModule).then(function(n){return t._callActivate(n,e.mainModuleExtra)})},t.prototype._isInvalidPluginDescription=function(e){return"string"!=typeof e.pluginId?"Could not find property `pluginId`":"undefined"==typeof e.dependencies||h(e.dependencies)?"undefined"==typeof e.activationEvents||h(e.activationEvents)?"undefined"!=typeof e.mainModule&&"string"!=typeof e.mainModule?"Property `mainModule` is not a string":"undefined"==typeof e.mainModuleExtra||Array.isArray(e.mainModuleExtra)?void 0:"Property `mainModuleExtra` is not an array":"Property `activationEvents` is not a string array":"Property `dependencies` is not a string array"},t.INSTANCE=new t(!0),t}();t.PluginManager=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/editor/modes/modesExtensions",["require","exports","vs/base/lib/winjs.base","vs/base/strings","vs/platform/platform","./modesFilters","vs/editor/modes/nullMode","vs/platform/services","vs/platform/thread/nullThreadService","vs/platform/thread/attribute","./supports","vs/platform/plugins","vs/base/errors","vs/base/objects","vs/base/env","vs/base/mime","vs/base/eventEmitter"],function(e,t,n,r,i,o,s,a,u,l,c,d,h,p,f,g,m){function v(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];if(e.getLineContent().length<=t)return!1;for(var o=e.findIndexOfOffset(t),s=e.getTokenType(o),a=0,u=n.length;u>a;a++)if(r.endsWith(s,n[a]))return!0;return!1}function y(e){return V[e]||X.INSTANCE.getModeIdForLanguageNameLowercase(e)}function _(e,t){return null===e&&null===t?!0:null===e||null===t?!1:e.equals(t)}function b(e){return e?e.clone():null}function C(e){U.push(e)}function w(e,n,r,o){var s=i.Registry.as(t.Extensions.EditorModes);s.registerMode(e,n,r,o)}function E(e,n,r,o){var s=i.Registry.as(t.Extensions.EditorModes);s.registerMode(e,n,r,o),s.getOrCreateMode(e)}function S(e,t,n,r,i){w(e,t,n,new a.AsyncDescriptor(r,i))}function T(e,n){var r=i.Registry.as(t.Extensions.EditorModes);r.configureModeById(e,n)}function x(e){var n=i.Registry.as(t.Extensions.EditorModes);return n.getOrCreateMode(e)}function L(e){var n=i.Registry.as(t.Extensions.EditorModes);return n.getMode(e)}function M(e,n,r){var o=i.Registry.as(t.Extensions.EditorModes);o.registerWorkerParticipant(e,new a.AsyncDescriptor(n,r))}function k(e,t,n){var r=q.getThreadService()||u.NULL_THREAD_SERVICE;return r.isInMainThread&&G.instantiateModeInWorkers(n),r.createInstance(t,{id:n}).then(function(e){return e.configSupport&&e.configSupport.configure(K.getConfigurationForMode(n)),e})}function N(e,t){q.registerModeSupport(e,"tokenizationSupport",t)}function I(e,t){q.registerModeSupport(e,"commentsSupport",function(){return t})}function O(e,t){q.registerModeSupport(e,"electricCharacterSupport",t)}function A(e,t){q.registerModeSupport(e,"tokenTypeClassificationSupport",function(){return t})}function P(e,t){q.registerModeSupport(e,"inplaceReplaceSupport",function(){return t})}function R(e,t){q.registerModeSupport(e,"characterPairSupport",t)}t.createWordRegExp=s.createWordRegExp;var D=Object.prototype.hasOwnProperty;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,E){var S=w.charCodeAt(0);switch(E){case 1:return S===e;case 2:return S>=e&&t>=S;case 3:return S>=e&&n>=S;case 4:return S>=e&&r>=S;case 5:return S>=e&&i>=S;case 6:return S>=e&&o>=S;case 7:return S>=e&&s>=S;case 8:return S>=e&&a>=S;case 9:return S>=e&&u>=S;case 10:return S>=e&&l>=S;case 11:return S>=e&&l>=S||S===c||S===m;case 12:return S>=e&&l>=S||S>=c&&d>=S||S>=m&&v>=S;case 13:return S>=e&&l>=S||S>=c&&h>=S||S>=m&&y>=S;case 14:return S>=e&&l>=S||S>=c&&p>=S||S>=m&&_>=S;case 15:return S>=e&&l>=S||S>=c&&f>=S||S>=m&&b>=S;default:return S>=e&&l>=S||S>=c&&g>=S||S>=m&&C>=S}}}(),t.isLineToken=v;var W=function(){function t(e,t,n){void 0===n&&(n=null),this._resourceService=e.resourceService,this._instantiationService=e.instantiationService,this._threadService=e.threadService,this._modelService=e.modelService,this._descriptor=t,this._workerDescriptor=n||a.AsyncDescriptor.create("vs/languages/nullWorker","NullWorker"),this._options=null,this.autoValidateDelay=500,this.modelSyncSupport=this,this.occurrencesSupport=this,this.suggestSupport=this,this.inplaceReplaceSupport=this,this.diffSupport=this,this.dirtyDiffSupport=this,this.linkSupport=this,this.configSupport=this,this.commentsSupport=this,this.tokenTypeClassificationSupport=this,this._workerPiecePromise=null}return t.prototype.getId=function(){return this._descriptor.id},t.prototype.creationDone=function(){this._threadService.isInMainThread&&this._pickAWorkerToValidate()},t.prototype._getOrCreateWorker=function(){var e=this;return this._workerPiecePromise||(this._workerPiecePromise=t._loadModule(this._workerDescriptor.moduleName).then(function(){var t=q.getWorkerParticipants(e._descriptor.id);return n.TPromise.join(t.map(function(t){return e._instantiationService.createInstance(t)}))}).then(function(t){return e._instantiationService.createInstance(e._workerDescriptor,e,t)})),this._workerPiecePromise},t._loadModule=function(t){return new n.TPromise(function(n,r){e([t],n,r)},function(){})},t.prototype._worker=function(e){return this._getOrCreateWorker().then(e)},t.prototype.bindModel=function(e){this._modelService&&this._modelService.addModel(e)},t.prototype.unbindModel=function(e){this._modelService&&this._modelService.removeModel(e)},t.prototype._pickAWorkerToValidate=function(){return this._worker(function(e){return e.enableValidator()})},t.prototype.getFilter=function(){return o.DefaultFilter},t.prototype.suggest=function(e,t){return this._worker(function(n){return n.suggest(e,t)})},t.prototype.getTriggerCharacters=function(){return[]},t.prototype.shouldAutotriggerSuggest=function(e,n,r){return c.handleEvent(this,e,n,function(e,n,i){return e.suggestSupport?e instanceof t?e.shouldAutotriggerSuggestImpl(n,i,r):e.suggestSupport.shouldAutotriggerSuggest(n,i,r):!1})},t.prototype.shouldAutotriggerSuggestImpl=function(){return!1},t.prototype.shouldShowEmptySuggestionList=function(){return!0},t.prototype.shouldTriggerParameterHints=function(){return!0},t.prototype.findOccurrences=function(e,t,n){return void 0===n&&(n=!1),this._worker(function(r){return r.findOccurrences(e,t,n)})},t.prototype.navigateValueSet=function(e,t,n){return this._worker(function(r){return r.inplaceReplaceSupport.navigateValueSet(e,t,n)})},t.prototype.computeDiff=function(e,t,n){return this._worker(function(r){return r.computeDiff(e,t,n)})},t.prototype.computeDirtyDiff=function(e,t){return this._worker(function(n){return n.computeDirtyDiff(e,t)})},t.prototype.computeLinks=function(e){return this._worker(function(t){return t.computeLinks(e)})},t.prototype.configure=function(e){return this._options=e,this._threadService.isInMainThread?this._configureWorkers(e):this._worker(function(t){return t.configure(e)})},t.prototype._configureWorkers=function(e){return this._worker(function(t){return t.configure(e)})},t.prototype.getNonWordTokenTypes=function(){return[]},t.prototype.getWordDefinition=function(){return s.NullMode.DEFAULT_WORD_REGEXP},t.prototype.getCommentsConfiguration=function(){return null},t.prototype._getMirrorModelAtPosition=function(e,t){var n=this._resourceService.get(e);return n.getEmbeddedAtPosition(t)},t.prototype._delegateToModeAtPosition=function(e,t,n){var r=this._resourceService.get(e);if(!r)return null;var i=r.getEmbeddedAtPosition(t);if(!i)return n(!1,r);var o=i.getMode();return n(o.getId()!==this.getId(),i)},t.prototype._delegateToAllModes=function(e,t){var n=this._resourceService.get(e);return n?t(n.getAllEmbedded()):null},t.$_pickAWorkerToValidate=l.OneWorker(t,t.prototype._pickAWorkerToValidate,a.ThreadAffinity.Group1),t.$suggest=l.OneWorker(t,t.prototype.suggest),t.$findOccurrences=l.OneWorker(t,t.prototype.findOccurrences),t.$navigateValueSet=l.OneWorker(t,t.prototype.navigateValueSet),t.$computeDiff=l.OneWorker(t,t.prototype.computeDiff),t.$computeDirtyDiff=l.OneWorker(t,t.prototype.computeDirtyDiff),t.$computeLinks=l.OneWorker(t,t.prototype.computeLinks),t.$_configureWorkers=l.AllWorkers(t,t.prototype._configureWorkers),t}();t.AbstractMode=W;var H;!function(e){function t(e,t,n,i){var o;o=n?'<div style="white-space: pre;">':{tagName:"div",style:"white-space: pre",children:[]};for(var s=e.split("\n"),a=t.tokenizationSupport.getInitialState(),u=0;u<s.length;u++){var l=s[u],c=0,d=t.tokenizationSupport.tokenize(l,a);a=d.endState;for(var h=d.tokens,p=0;p<h.length;p++){var f=h[p];e="",p<h.length-1?(e=l.substring(c,h[p+1].startIndex),c=h[p+1].startIndex):e=l.substr(c);var g=[];i&&g.push(i),g.push("token"),f.type&&g.push(f.type.replace(/\./g," ")),n?o+='<span class="'+g.join(" ")+'">'+r.escape(e)+"</span>":o.children.push({tagName:"span",className:g.join(" "),text:e})}u<s.length-1&&(n?o+="<br />":o.children.push({tagName:"br"}))}return o}e.tokenize=t}(H=t.TextToHtmlTokenizer||(t.TextToHtmlTokenizer={}));var V={bat:"text/x-bat",coffeescript:"text/x-coffeescript",coffee:"text/x-coffeescript",cpp:"text/x-cpp",csharp:"text/x-csharp",css:"text/css",fsharp:"text/x-fsharp",handlebars:"text/x-handlebars-template",htm:"text/html",html:"text/html",xhtml:"text/html",ini:"text/x-ini",jade:"text/x-jade",java:"text/x-java-source",javascript:"text/javascript",js:"text/javascript",json:"application/json",less:"text/x-less",lua:"text/x-lua",markdown:"text/x-web-markdown",php:"application/x-php",text:"text/plain",powershell:"text/x-powershell",ps:"text/x-powershell",ps1:"text/x-powershell",razor:"text/x-cshtml",sass:"text/x-scss",scss:"text/x-scss",typescript:"text/typescript",ts:"text/typescript",vb:"text/x-vb",xml:"text/xml"};t.languageAliasToMime=y,t.LANGUAGE_CONFIGURATION="languages";var F=function(){function e(){}return e.apply=function(e){if(e&&e[t.LANGUAGE_CONFIGURATION]){var n=e[t.LANGUAGE_CONFIGURATION],r=i.Registry.as(t.Extensions.EditorModes);for(var o in n)if(n.hasOwnProperty(o)){var s=n[o];r.configureModeById(o,s)}}},e}();t.ModesConfiguration=F;var B=function(){function e(e,t){void 0===t&&(t=null),this.mode=e,this.stateData=t}return e.prototype.getMode=function(){return this.mode},e.prototype.clone=function(){var e=this.makeClone();return e.initializeFrom(this),e},e.prototype.makeClone=function(){throw new Error("Abstract Method")},e.prototype.initializeFrom=function(e){this.stateData=null!==e.stateData?e.stateData.clone():null},e.prototype.getStateData=function(){return this.stateData},e.prototype.setStateData=function(e){this.stateData=e},e.prototype.equals=function(t){return null===t||this.mode!==t.getMode()?!1:t instanceof e?_(this.stateData,t.stateData):!1},e.prototype.tokenize=function(){throw new Error("Abstract Method")},e}();t.AbstractState=B,t.safeStateEquals=_,t.safeStateClone=b,t.Extensions={EditorModes:"editor.modes"};var z=function(e){function t(t,n){e.call(this,t,{id:n}),this._eventEmitter=new m.EventEmitter}return __extends(t,e),t.prototype.registerSupport=function(e,t){var n=t(this);this[e]=n;var r={modelSyncSupport:!1,tokenizationSupport:!1,occurrencesSupport:!1,declarationSupport:!1,typeDeclarationSupport:!1,navigateTypesSupport:!1,referenceSupport:!1,suggestSupport:!1,parameterHintsSupport:!1,extraInfoSupport:!1,outlineSupport:!1,logicalSelectionSupport:!1,formattingSupport:!1,inplaceReplaceSupport:!1,diffSupport:!1,dirtyDiffSupport:!1,emitOutputSupport:!1,linkSupport:!1,configSupport:!1,electricCharacterSupport:!1,commentsSupport:!1,characterPairSupport:!1,tokenTypeClassificationSupport:!1,quickFixSupport:!1};r[e]=!0,this._eventEmitter.emit("modeSupportChanged",r)},t.prototype.addSupportChangedListener=function(e){return this._eventEmitter.addListener2("modeSupportChanged",e)},t}(W),U=[];t.registerThreadServiceListener=C;var j=function(){function e(){this._threadService=null,this._activationPromises={},this._instantiatedModes={},this._frankensteinModes={}}return e.prototype.getThreadService=function(){return this._threadService},e.prototype.setThreadService=function(e){null===this._threadService&&(this._threadService=e,U.forEach(function(t){return t(e)}),G.register(e),K.register(e))},e.prototype.registerWorkerParticipant=function(e,t){var n={pluginId:e+":"+t.moduleName+"."+t.ctorName+".impl",activationEvents:["mode:"+e],something:t,isFake:!0};d.registerPlugin(n)},e.prototype.getWorkerParticipants=function(e){return d.getAllPluginDescriptions().filter(function(t){return"undefined"!=typeof t.activationEvents?t.activationEvents.indexOf("mode:"+e)>=0:!1}).map(function(e){return e.something})},e.prototype.isRegisteredMode=function(e){return X.INSTANCE.isRegisteredMode(e)},e.prototype.getRegisteredModes=function(){return X.INSTANCE.getRegisteredModes()},e.prototype.getRegisteredMimetypes=function(){return X.INSTANCE.getRegisteredMimetypes()},e.prototype.getRegisteredLanguageNames=function(){return X.INSTANCE.getRegisteredLanguageNames()},e.prototype.getLanguageName=function(e){return X.INSTANCE.getLanguageName(e)},e.prototype.registerMode=function(e,t,n,r){var i={};n.forEach(function(t){return i[t]=e});var o={};o[t]=e;var s={};s[e]=!0;var a={pluginId:e+".impl",isFake:!0,activationEvents:["textModel:"+e],mainModule:"vs/editor/modes/modesExtensions",mainModuleExtra:[r,e,!1],contributes:{language:[{id:e,aliases:[t],__isCompat:!0,__mimes:n}]},forceLoadingInUI:!0};d.registerPlugin(a)},e.prototype.configureMode=function(e,t){var n=this.getModeId(e);n&&this.configureModeById(n,t)},e.prototype.configureModeById=function(e,t){K.configureModeById(e,t)},e.prototype.lookup=function(e){for(var t=[],n=X.INSTANCE.extractModeIds(e),r=0;r<n.length;r++){var i=n[r];t.push({modeId:i,isInstantiated:this._instantiatedModes.hasOwnProperty(i)})}return t},e.prototype.getMode=function(e){for(var t=X.INSTANCE.extractModeIds(e),n=!1,r=0;r<t.length;r++){if(this._instantiatedModes.hasOwnProperty(t[r]))return this._instantiatedModes[t[r]];n=n||"vs.languages.plainText"===t[r]}if(f.isTesting()||n){var i=null;return this.getOrCreateMode(e).then(function(e){i=e}).done(null,h.onUnexpectedError),i}},e.prototype.getModeId=function(e){var t=X.INSTANCE.extractModeIds(e);return t.length>0?t[0]:null},e.prototype.getModeIdByLanguageName=function(e){var t=X.INSTANCE.getModeIdsFromLanguageName(e);return t.length>0?t[0]:null},e.prototype.getModeIdByFilename=function(e){var t=X.INSTANCE.getModeIdsFromFilename(e);return t.length>0?t[0]:null},e.prototype.getOrCreateMode=function(e){var t=this;return d.onReady().then(function(){var n=t.getModeId(e);return t._getOrCreateMode(n||"vs.languages.plainText")})},e.prototype.getOrCreateModeByLanguageName=function(e){var t=this;return d.onReady().then(function(){var n=t.getModeIdByLanguageName(e);return t._getOrCreateMode(n||"vs.languages.plainText")})},e.prototype.getOrCreateModeByFilename=function(e){var t=this;return d.onReady().then(function(){var n=t.getModeIdByFilename(e);return t._getOrCreateMode(n||"vs.languages.plainText")})},e.prototype._getOrCreateMode=function(e){var t=this;return this._instantiatedModes.hasOwnProperty(e)?n.TPromise.as(this._instantiatedModes[e]):this._activationPromises.hasOwnProperty(e)?this._activationPromises[e]:(this._activationPromises[e]=this._createMode(e).then(function(n){return t._instantiatedModes[e]=n,delete t._activationPromises[e],t._instantiatedModes[e]}),this._activationPromises[e])},e.prototype._createMode=function(e){var t=this,n="textModel:"+e;if(X.INSTANCE.isCompat(e))return d.activateByEvent(n).then(function(t){if(t=t.filter(function(e){return!!e}),0===t.length)return console.warn("mode not found: "+e),null;if(1===t.length)return t[0];throw new Error("Cannot have more than one mode!")});var r=this._threadService||u.NULL_THREAD_SERVICE;return r.isInMainThread&&G.instantiateModeInWorkers(e),this._frankensteinModes.hasOwnProperty(e)||(this._frankensteinModes[e]=r.createInstance(z,e)),d.activateByEvent(n).then(function(){return t._frankensteinModes[e]})},e.prototype.registerModeSupport=function(e,t,n){if(!this._frankensteinModes.hasOwnProperty(e)){if(X.INSTANCE.isCompat(e))return console.warn("Cannot register support "+t+" on mode "+e+" because it is not a Frankenstein mode"),void 0;var r=this._threadService||u.NULL_THREAD_SERVICE;this._frankensteinModes[e]=r.createInstance(z,e)}var i=this._frankensteinModes[e];i.registerSupport(t,n)},e}(),q=new j;i.Registry.add(t.Extensions.EditorModes,q),t.registerModeAsyncDescriptor=w,t.registerCustomMonarchMode=E,t.registerMode=S,t.configureMode=T,t.getOrCreateMode=x,t.getMode=L,t.registerWorkerParticipant=M;var G=function(){function e(){}return e.register=function(t){e.INSTANCE_REGISTERED||(e.INSTANCE_REGISTERED=!0,t.registerInstance(e.INSTANCE))},e.instantiateModeInWorkers=function(t){e.register(u.NULL_THREAD_SERVICE),e.INSTANCE._instantiateInWorkers(t)},e.prototype.getId=function(){return"vs.editor.modes.modeInstantiator"},e.prototype._instantiateInWorkers=function(e){q._getOrCreateMode(e).done(null,h.onUnexpectedError)},e.INSTANCE=new e,e.INSTANCE_REGISTERED=!1,e.$_instantiateInWorkers=l.AllWorkers(e,e.prototype._instantiateInWorkers),e}(),K=function(){function e(e){void 0===e&&(e={}),this._config=e}return e.configureModeById=function(t,n){e.INSTANCE._configureModeById(t,n)},e.getConfigurationForMode=function(t){return e.INSTANCE._getConfigurationForMode(t)},e.register=function(t){if(!(e.INSTANCE instanceof $)){var n=new $(e.INSTANCE);t.registerInstance(n),e.INSTANCE=n}},e.prototype._configureModeById=function(e,t){var n=this._config[e]||{},r=p.mixin(p.clone(n),t);return p.equals(n,r)?!1:(this._config[e]=r,!0)},e.prototype._getConfigurationForMode=function(e){return this._config[e]||{}},e.INSTANCE=new e,e}(),$=function(e){function t(t){e.call(this,t._config)}return __extends(t,e),t.prototype.getId=function(){return"vs.editor.modes.modeConfigurator"},t.prototype.getSerializableState=function(){return this._config},t.prototype.setData=function(e){this._config=e},t.prototype._configureModeById=function(t,n){if(e.prototype._configureModeById.call(this,t,n)){var r=q.getMode(t);r&&r.configSupport&&r.configSupport.configure(this._getConfigurationForMode(t))}},t.$_configureModeById=l.Everywhere(t,t.prototype._configureModeById),t}(K);t.activate=k,t.registerTokenizationSupport=N,t.registerCommentsSupport=I,t.registerElectricCharacterSupport=O,t.registerTokenTypeClassificationSupport=A,t.registerInplaceReplaceSupport=P,t.registerCharacterPairSupport=R;var X=function(){function e(){var e=this;this.knownModeIds={},this.mime2LanguageId={},this.name2LanguageId={},this.id2Name={},this.isCompatModeId={},this.lowerName2Id={},d.registerPointListener("language",function(t){return e._onLanguages(t)})}return e.prototype._onLanguages=function(e){for(var t=0;t<e.length;t++){var n=e[t].contributes.language;if(Array.isArray(n))for(var r=0;r<n.length;r++)this._onLanguage(e[t],n[r]);else console.warn("Ignoring `language` point for "+e[t].pluginId)}},e.prototype._onLanguage=function(e,t){if("string"!=typeof t.id)return console.warn("Ignoring `language` point for "+e.pluginId),void 0;this.knownModeIds[t.id]=!0;var n=null;if("undefined"!=typeof t.__mimes&&Array.isArray(t.__mimes))for(var r=0;r<t.__mimes.length;r++)n||(n=t.__mimes[r]),this.mime2LanguageId[t.__mimes[r]]=t.id;if(n||(n="text/x-"+t.id,this.mime2LanguageId[n]=t.id),"undefined"!=typeof t.extensions&&Array.isArray(t.extensions))for(var r=0;r<t.extensions.length;r++)g.registerTextMime(t.extensions[r],n);if("undefined"!=typeof t.filenames&&Array.isArray(t.filenames))for(var r=0;r<t.filenames.length;r++)g.registerTextMime(t.filenames[r],n);var i=null;if("undefined"!=typeof t.aliases&&Array.isArray(t.aliases))for(var r=0;r<t.aliases.length;r++)t.aliases[r]&&0!==t.aliases[r].length&&(i||(i=t.aliases[r]),this.name2LanguageId[t.aliases[r]]=t.id,this.lowerName2Id[t.aliases[r].toLowerCase()]=t.id);i||(i=t.id),this.id2Name[t.id]=i,"undefined"!=typeof t.__isCompat&&(this.isCompatModeId[t.id]=!0)},e.prototype.isRegisteredMode=function(e){return D.call(this.mime2LanguageId,e)?!0:D.call(this.knownModeIds,e)},e.prototype.getRegisteredModes=function(){return Object.keys(this.knownModeIds)},e.prototype.getRegisteredMimetypes=function(){return Object.keys(this.mime2LanguageId)},e.prototype.getRegisteredLanguageNames=function(){return Object.keys(this.name2LanguageId)},e.prototype.getLanguageName=function(e){return this.id2Name[e]||null},e.prototype.getModeIdForLanguageNameLowercase=function(e){return this.lowerName2Id[e]||null},e.prototype.extractModeIds=function(e){var t=this;return e?e.split(",").map(function(e){return e.trim()}).map(function(e){return t.mime2LanguageId[e]||e}).filter(function(e){return t.knownModeIds[e]}):[]},e.prototype.getModeIdsFromLanguageName=function(e){return e?D.call(this.name2LanguageId,e)?[this.name2LanguageId[e]]:[]:[]},e.prototype.getModeIdsFromFilename=function(e){if(!e)return[];var t=g.guessMimeTypes(e);return this.extractModeIds(t.join(","))},e.prototype.isCompat=function(e){return this.isCompatModeId[e]||!1},e.INSTANCE=new e,e}()}),define("vs/editor/core/internalConstants",["require","exports"],function(e,t){t.Handler={ExecuteCommand:"executeCommand",ExecuteCommands:"executeCommands",CursorLeft:"cursorLeft",CursorLeftSelect:"cursorLeftSelect",CursorWordLeft:"cursorWordLeft",CursorWordLeftSelect:"cursorWordLeftSelect",CursorRight:"cursorRight",CursorRightSelect:"cursorRightSelect",CursorWordRight:"cursorWordRight",CursorWordRightSelect:"cursorWordRightSelect",CursorUp:"cursorUp",CursorUpSelect:"cursorUpSelect",CursorDown:"cursorDown",CursorDownSelect:"cursorDownSelect",CursorPageUp:"cursorPageUp",CursorPageUpSelect:"cursorPageUpSelect",CursorPageDown:"cursorPageDown",CursorPageDownSelect:"cursorPageDownSelect",CursorHome:"cursorHome",CursorHomeSelect:"cursorHomeSelect",CursorEnd:"cursorEnd",CursorEndSelect:"cursorEndSelect",CursorTop:"cursorTop",CursorTopSelect:"cursorTopSelect",CursorBottom:"cursorBottom",CursorBottomSelect:"cursorBottomSelect",AddCursorDown:"addCursorDown",AddCursorUp:"addCursorUp",MoveTo:"moveTo",MoveToSelect:"moveToSelect",CreateCursor:"createCursor",LastCursorMoveToSelect:"lastCursorMoveToSelect",JumpToBracket:"jumpToBracket",Type:"type",Paste:"paste",Tab:"tab",Indent:"indent",Outdent:"outdent",DeleteLeft:"deleteLeft",DeleteRight:"deleteRight",DeleteWordLeft:"deleteWordLeft",DeleteWordRight:"deleteWordRight",DeleteAllLeft:"deleteAllLeft",DeleteAllRight:"deleteAllRight",Enter:"enter",Escape:"escape",Cut:"cut",Undo:"undo",Redo:"redo",WordSelect:"wordSelect",WordSelectDrag:"wordSelectDrag",LastCursorWordSelect:"lastCursorWordSelect",LineSelect:"lineSelect",LineSelectDrag:"lineSelectDrag",LastCursorLineSelect:"lastCursorLineSelect",LastCursorLineSelectDrag:"lastCursorLineSelectDrag",LineInsertBefore:"lineInsertBefore",LineInsertAfter:"lineInsertAfter",LineBreakInsert:"lineBreakInsert",SelectAll:"selectAll"}}),define("vs/editor/core/constants",["require","exports","./internalConstants"],function(e,t,n){t.EditorType={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor",ITerminal:"vs.editor.ITerminal"},t.ClassName={EditorWarningDecoration:"greensquiggly",EditorErrorDecoration:"redsquiggly"},t.InternalHandlers={Indent:n.Handler.Indent,Outdent:n.Handler.Outdent,LineInsertBefore:n.Handler.LineInsertBefore,LineInsertAfter:n.Handler.LineInsertAfter,AddCursorUp:n.Handler.AddCursorUp,AddCursorDown:n.Handler.AddCursorDown},t.EventType={Disposed:"disposed",ConfigurationChanged:"configurationChanged",ModelDispose:"modelDispose",ModelChanged:"modelChanged",ModelTokensChanged:"modelTokensChanged",ModelModeChanged:"modelsModeChanged",ModelContentChanged:"contentChanged",ModelContentChanged2:"contentChanged2",ModelContentChangedFlush:"flush",ModelContentChangedLinesDeleted:"linesDeleted",ModelContentChangedLinesInserted:"linesInserted",ModelContentChangedLineChanged:"lineChanged",EditorTextBlur:"blur",EditorTextFocus:"focus",EditorFocus:"widgetFocus",EditorBlur:"widgetBlur",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/view/model/prefixSumComputer",["require","exports"],function(e,t){var n=function(){function e(e){this.values=e,this.prefixSum=[];for(var t=0,n=this.values.length;n>t;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-1<this.prefixSumValidIndex&&(this.prefixSumValidIndex=e-1)},e.prototype.changeValue=function(e,t){this.values[e]!==t&&(this.values[e]=t,e-1<this.prefixSumValidIndex&&(this.prefixSumValidIndex=e-1))},e.prototype.removeValues=function(e,t){this.values.splice(e,t),this.prefixSum.splice(e,t),e-1<this.prefixSumValidIndex&&(this.prefixSumValidIndex=e-1)},e.prototype.getTotalValue=function(){return 0===this.values.length?0:this.getAccumulatedValue(this.values.length-1)},e.prototype.getAccumulatedValue=function(e){if(0>e)return 0;if(e<=this.prefixSumValidIndex)return this.prefixSum[e];var t=this.prefixSumValidIndex+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);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/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=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return{dispose:function(){return n(e)}}}function i(e){return{dispose:function(){return n(e)}}}function o(e){return{dispose:function(){return e()}}}function s(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return i(e.map(o))}function a(e){if(e){if("function"==typeof e)return e(),null;if(Array.isArray(e)){for(;e.length>0;)e.pop()();return e}return null}return null}t.disposeAll=n,t.combinedDispose=r,t.combinedDispose2=i,t.fnToDisposable=o,t.toDisposable=s,t.cAll=a;var u=function(){function e(e){this._prefix=e,this._lastId=0}return e.prototype.generate=function(){return this._prefix+ ++this._lastId},e}();t.IdGenerator=u}),define("vs/editor/core/model/tokensBinaryEncoding",["require","exports","vs/base/strings","vs/base/errors"],function(e,t,n,r){function i(e,n){if(0===n.length)return m;if(1===n.length&&0===n[0].startIndex&&!n[0].type&&!n[0].bracket)return y;var i,o,s,a,u,l,c=e._inflate,d=e._deflate,h=-1,p=new Array(n.length);for(i=0,o=n.length;o>i;i++)l=n[i],l.startIndex<=h&&(l.startIndex=h+1,r.onUnexpectedError({message:"Invalid tokens detected",tokens:n})),d.hasOwnProperty(l.type)?s=d[l.type]:(s=c.length,d[l.type]=s,c.push(l.type)),a=l.bracket,0>a&&(a=2),u=a*t.BRACKET_OFFSET+s*t.TYPE_OFFSET+l.startIndex*t.START_INDEX_OFFSET,p[i]=u,h=l.startIndex;return p}function o(e,n){if(0===n)return f;var r=n/t.START_INDEX_OFFSET&t.START_INDEX_MASK,i=n/t.TYPE_OFFSET&t.TYPE_MASK,o=n/t.BRACKET_OFFSET&t.BRACKET_MASK;return 2===o&&(o=-1),new p(r,e._inflate[i],o)}function s(e){return e/t.START_INDEX_OFFSET&t.START_INDEX_MASK}function a(e,r){var i=r/t.TYPE_OFFSET&t.TYPE_MASK;return 0===i?n.empty:e._inflate[i]}function u(e){var n=e/t.BRACKET_OFFSET&t.BRACKET_MASK;return 2===n&&(n=-1),n}function l(e,n){if(0===n.length)return g;if(1===n.length&&0===n[0])return v;var r,i,o,s,a,u,l=new Array(n.length),c=e._inflate;for(r=0,i=n.length;i>r;r++)o=n[r],s=o/t.START_INDEX_OFFSET&t.START_INDEX_MASK,u=o/t.TYPE_OFFSET&t.TYPE_MASK,a=o/t.BRACKET_OFFSET&t.BRACKET_MASK,2===a&&(a=-1),l[r]=new p(s,c[u],a);return l}function c(e,t){return h(e,t)}function d(e,n,r,i){if(0===n.length)return g;if(1===n.length&&0===n[0])return v;var o,s,a,u,l,c,d,f=h(n,r),m=[],y=e._inflate;for(a=n[f],c=a/t.TYPE_OFFSET&t.TYPE_MASK,d=a/t.BRACKET_OFFSET&t.BRACKET_MASK,l=0,m.push(new p(l,y[c],d)),o=f+1,s=n.length;s>o&&(a=n[o],u=a/t.START_INDEX_OFFSET&t.START_INDEX_MASK,!(u>=i));o++)c=a/t.TYPE_OFFSET&t.TYPE_MASK,d=a/t.BRACKET_OFFSET&t.BRACKET_MASK,l=u-r,m.push(new p(l,y[c],d));return m}function h(e,t){for(var n,r,i=0,o=e.length-1;o>i;)n=i+Math.ceil((o-i)/2),r=4294967295&e[n],r>t?o=n-1:i=n;return i}var p=function(){function e(e,t,n){this.startIndex=e,this.type=t,this.bracket=n}return e}();t.START_INDEX_MASK=4294967295,t.TYPE_MASK=65535,t.BRACKET_MASK=255,t.START_INDEX_OFFSET=1,t.TYPE_OFFSET=Math.pow(2,32),t.BRACKET_OFFSET=Math.pow(2,48);var f={startIndex:0,type:"",bracket:0},g=[],m=[],v=[f],y=[0];t.deflateArr=i,t.inflate=o,t.getStartIndex=s,t.getType=a,t.getBracket=u,t.inflateArr=l,t.findIndexOfOffset=c,t.sliceAndInflate=d,t.findIndexInSegmentsArray=h}),define("vs/editor/editor",["require","exports","vs/editor/core/model/tokensBinaryEncoding"],function(e,t,n){!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;t.LineTokensBinaryEncoding=n,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/core/model/modelLine",["require","exports","vs/editor/editor","vs/base/strings"],function(e,t,n,r){function i(e,t,n){return 0===n?p.INSTANCE:!t||0===t.length||1===t.length&&0===t[0].startIndex&&""===t[0].type&&!t[0].bracket?f.INSTANCE:new h(e,t)}function o(e,t,n){return 0===n?p.INSTANCE:!t||0===t.length||1===t.length&&0===t[0]?f.INSTANCE:new h(e,t)}function s(e,t){return t&&0!==t.length?1===t.length&&0===t[0].startIndex?t[0].mode===e?g.INSTANCE:new m(t[0].mode):new v(t):g.INSTANCE}var a=function(){function e(e,t){this.lineNumber=e,this.text=t,this.isInvalid=!1,this._recreateLineTokens(null,null),this._recreateModeTransitions(null,null)}return e.prototype.setState=function(e){this._state=e},e.prototype.getState=function(){return this._state||null},e.prototype._setLineTokens=function(e){("undefined"!=typeof this._lineTokens||e!==p.INSTANCE&&e!==f.INSTANCE)&&(this._lineTokens=e)},e.prototype.getTokens=function(){return this._lineTokens?this._lineTokens:0===this.text.length?p.INSTANCE:f.INSTANCE},e.prototype.getModeTransitions=function(){return this._modeTransitions?this._modeTransitions:g.INSTANCE},e.prototype._recreateLineTokens=function(e,t){this._setLineTokens(i(e,t,this.text.length))},e.prototype._recreateLineTokens2=function(e,t){this._setLineTokens(o(e,t,this.text.length))},e.prototype._setModeTransitions=function(e){("undefined"!=typeof this._modeTransitions||e!==g.INSTANCE)&&(this._modeTransitions=e)},e.prototype._recreateModeTransitions=function(e,t){this._setModeTransitions(s(e,t))},e.prototype.insertText=function(e,t,r,i){var o=this.text,s=o.length+1,a=this.getTokens(),u=a.getBinaryEncodedTokens(),l=a instanceof h,c=r.text.length;t=Math.max(1,t),t=Math.min(t,s);var d,p;if(c>0){var f=o.substring(0,t-1)+r.text+o.substring(t-1,o.length);if(l){var g,m,v,y,_,b,C=n.LineTokensBinaryEncoding;for(d=0,p=u.length;p>d;d++)g=u[d],m=g/C.START_INDEX_OFFSET&C.START_INDEX_MASK,m>=t-1&&m>0&&(_=g/C.TYPE_OFFSET&C.TYPE_MASK,b=g/C.BRACKET_OFFSET&C.BRACKET_MASK,y=m+c,v=b*C.BRACKET_OFFSET+_*C.TYPE_OFFSET+y*C.START_INDEX_OFFSET,u[d]=v)}if(this._markers){var w;for(d=0,p=this._markers.length;p>d;d++)w=this._markers[d],(w.column>t||w.column===t&&(i||!w.stickToPreviousCharacter))&&(e[w.id]=!0,w.oldLineNumber=w.oldLineNumber||this.lineNumber,w.oldColumn=w.oldColumn||w.column,w.column+=c)}this.text=f,this._recreateLineTokens2(a.getBinaryEncodedTokensMap(),u)}if(r.markers&&(p=r.markers.length,p>0))for(this._markers||(this._markers=[]),d=0;p>d;d++)w=r.markers[d],e[w.id]=!0,w.oldLineNumber=w.oldLineNumber||this.lineNumber,w.oldColumn=w.oldColumn||w.column,w.line=this,w.column+=t-1,this._markers.push(w)},e.prototype.removeText=function(e,t,r,i,o){var s=r,a="",u=[],l=this.text,c=l.length+1,d=this.getTokens(),p=d.getBinaryEncodedTokens(),f=d instanceof h;t=Math.max(1,t),r=Math.max(1,r),t=Math.min(t,c),r=Math.min(r,c);var g;if(r>t&&r>1&&c>t){a=l.substring(t-1,r-1);var m=l.substring(0,t-1)+l.substring(r-1,l.length);if(f){var v,y,_,b,C,w,E,S=n.LineTokensBinaryEncoding;for(g=0;g<p.length;g++)v=p[g],y=v/S.START_INDEX_OFFSET&S.START_INDEX_MASK,b=y,y>=r-1?b=y-a.length:y>=t-1&&(b=t-1),b>=m.length?(p.splice(g,1),g--):(C=v/S.TYPE_OFFSET&S.TYPE_MASK,w=v/S.BRACKET_OFFSET&S.BRACKET_MASK,_=w*S.BRACKET_OFFSET+C*S.TYPE_OFFSET+b*S.START_INDEX_OFFSET,p[g]=_,g>0&&(E=p[g-1]/S.START_INDEX_OFFSET&S.START_INDEX_MASK,E>=b&&(p.splice(g-1,1),g--)))}this.text=m,this._recreateLineTokens2(d.getBinaryEncodedTokensMap(),p)}if(this._markers){var T;for(g=0;g<this._markers.length;g++)T=this._markers[g],T.column>s||T.column===s&&(o||!T.stickToPreviousCharacter)?(e[T.id]=!0,T.oldLineNumber=T.oldLineNumber||this.lineNumber,T.oldColumn=T.oldColumn||T.column,T.column-=a.length):(T.column>t||T.column===t&&(o||!T.stickToPreviousCharacter))&&(e[T.id]=!0,T.oldLineNumber=T.oldLineNumber||this.lineNumber,T.oldColumn=T.oldColumn||T.column,i?(T.line=null,T.column-=t-1,this._markers.splice(g,1),g--,u.push(T)):T.column=t)}return{text:a,markers:u}},e.prototype.addMarker=function(e){e.line=this,this._markers?this._markers.push(e):this._markers=[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?this._markers.concat(e):e.slice(0)},e.prototype.removeMarker=function(e){var t=this._indexOfMarkerId(e.id);t>=0&&this._markers.splice(t,1),e.line=null},e.prototype.getMarkers=function(){return this._markers?this._markers.slice(0):[]},e.prototype.updateLineNumber=function(e,t){if(this._markers){var n,r,i,o=this._markers;for(n=0,r=o.length;r>n;n++)i=o[n],e[i.id]=!0,i.oldLineNumber=i.oldLineNumber||this.lineNumber}this.lineNumber=t},e.prototype.deleteLine=function(e,t,n){if(this._markers){var r,i,o,s=this._markers;for(r=0,i=s.length;i>r;r++)o=s[r],e[o.id]=!0,o.oldColumn=o.oldColumn||o.column,o.oldLineNumber=o.oldLineNumber||n,o.column=t;return s}return[]},e.prototype._indexOfMarkerId=function(e){if(this._markers){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,t,n,r){this._recreateLineTokens(e,t),this._recreateModeTransitions(n,r)},e}();t.ModelLine=a;var u=n.LineTokensBinaryEncoding.getStartIndex,l=n.LineTokensBinaryEncoding.getType,c=n.LineTokensBinaryEncoding.getBracket,d=n.LineTokensBinaryEncoding.findIndexOfOffset,h=function(){function e(e,t){this.map=e,this._tokens="number"==typeof t[0]?t:n.LineTokensBinaryEncoding.deflateArr(e,t)}return e.prototype.getBinaryEncodedTokensMap=function(){return this.map},e.prototype.getBinaryEncodedTokens=function(){return this._tokens},e.prototype.getTokenCount=function(){return this._tokens.length},e.prototype.getTokenStartIndex=function(e){return u(this._tokens[e])},e.prototype.getTokenType=function(e){return l(this.map,this._tokens[e])},e.prototype.getTokenBracket=function(e){return c(this._tokens[e])},e.prototype.getTokenEndIndex=function(e,t){return e+1<this._tokens.length?u(this._tokens[e+1]):t},e.prototype.equals=function(e){return this===e},e.prototype.findIndexOfOffset=function(e){return d(this._tokens,e)},e}();t.LineTokens=h;var p=function(){function e(){}return e.prototype.getBinaryEncodedTokens=function(){return e.TOKENS},e.prototype.getBinaryEncodedTokensMap=function(){return null},e.prototype.getTokenCount=function(){return 0},e.prototype.getTokenStartIndex=function(){return 0},e.prototype.getTokenType=function(){return r.empty},e.prototype.getTokenBracket=function(){return 0},e.prototype.getTokenEndIndex=function(){return 0},e.prototype.equals=function(e){return e===this},e.prototype.findIndexOfOffset=function(){return 0},e.INSTANCE=new e,e.TOKENS=[],e}(),f=function(){function e(){}return e.prototype.getBinaryEncodedTokensMap=function(){return null},e.prototype.getBinaryEncodedTokens=function(){return e.TOKENS},e.prototype.getTokenCount=function(){return 1},e.prototype.getTokenStartIndex=function(){return 0},e.prototype.getTokenType=function(){return r.empty},e.prototype.getTokenBracket=function(){return 0},e.prototype.getTokenEndIndex=function(e,t){return t},e.prototype.equals=function(e){return this===e},e.prototype.findIndexOfOffset=function(){return 0},e.INSTANCE=new e,e.TOKENS=[0],e}();t.DefaultLineTokens=f;var g=function(){function e(){}return e.prototype.toArray=function(e){return[{startIndex:0,mode:e}]},e.INSTANCE=new e,e}(),m=function(){function e(e){this._mode=e}return e.prototype.toArray=function(){return[{startIndex:0,mode:this._mode}]},e}(),v=function(){function e(e){this._modeTransitions=e}return e.prototype.toArray=function(){return this._modeTransitions.slice(0)},e}()}),define("vs/editor/core/position",["require","exports"],function(e,t){function n(e){return e&&"number"==typeof e.lineNumber&&"number"==typeof e.column}function r(e){return e?[0|e.lineNumber,0|e.column]:[-1,-1]}function i(e){return-1===e[0]&&-1===e[1]?null:new u(e[0],e[1])}function o(e){for(var t=[],n=0,r=e.length;r>n;n++){var i=e[n];i?(t[2*n+0]=0|i.lineNumber,t[2*n+1]=0|i.column):(t[2*n+0]=-1,t[2*n+1]=-1)}return t}function s(e){for(var t=[],n=0,r=Math.floor(e.length/2);r>n;n++)t[n]=-1===e[2*n+0]&&-1===e[2*n+1]?null:new u(e[2*n+0],e[2*n+1]);return t}t.isIPosition=n,t.serialize=r,t.deserialize=i,t.serializeMany=o,t.deserializeMany=s;var a;!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}(a=t.PositionUtils||(t.PositionUtils={}));var u=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.lineNumber<e.lineNumber?!0:e.lineNumber<this.lineNumber?!1:this.column<e.column},e.prototype.isBeforeOrEqual=function(e){return this.lineNumber<e.lineNumber?!0:e.lineNumber<this.lineNumber?!1:this.column<=e.column},e.prototype.clone=function(){return new e(this.lineNumber,this.column)},e.prototype.toString=function(){return"("+this.lineNumber+","+this.column+")"},e}();t.Position=u}),define("vs/editor/core/range",["require","exports","vs/editor/core/position"],function(e,t,n){function r(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}function i(e){return e?[0|e.startLineNumber,0|e.startColumn,0|e.endLineNumber,0|e.endColumn]:[-1,-1,-1,-1]}function o(e){return-1===e[0]&&-1===e[1]&&-1===e[2]&&-1===e[3]?null:new C(e[0],e[1],e[2],e[3])}function s(e){for(var t=[],n=0,r=e.length;r>n;n++){var i=e[n];i?(t[4*n+0]=0|i.startLineNumber,t[4*n+1]=0|i.startColumn,t[4*n+2]=0|i.endLineNumber,t[4*n+3]=0|i.endColumn):(t[4*n+0]=-1,t[4*n+1]=-1,t[4*n+2]=-1,t[4*n+3]=-1)}return t}function a(e){for(var t=[],n=0,r=Math.floor(e.length/4);r>n;n++)t[n]=-1===e[4*n+0]&&-1===e[4*n+1]&&-1===e[4*n+2]&&-1===e[4*n+3]?null:new C(e[4*n+0],e[4*n+1],e[4*n+2],e[4*n+3]);return t}function u(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}function l(e,t){return t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber?!1:t.lineNumber===e.startLineNumber&&t.column<e.startColumn?!1:t.lineNumber===e.endLineNumber&&t.column>e.endColumn?!1:!0}function c(e,t){return t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber?!1:t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber?!1:t.startLineNumber===e.startLineNumber&&t.startColumn<e.startColumn?!1:t.endLineNumber===e.endLineNumber&&t.endColumn>e.endColumn?!1:!0}function d(e,t){return e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn?!1:t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn?!1:!0}function h(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 C(n,r,i,o)}function p(e,t){var n,r,i,o;return t.startLineNumber<e.startLineNumber?(n=t.startLineNumber,r=t.startColumn):t.startLineNumber===e.startLineNumber?(n=t.startLineNumber,r=Math.min(t.startColumn,e.startColumn)):(n=e.startLineNumber,r=e.startColumn),t.endLineNumber>e.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 C(n,r,i,o)}function f(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}function g(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 m(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 v(e){return e.endLineNumber>e.startLineNumber}function y(e){return 17*e.startLineNumber+23*e.startColumn+29*e.endLineNumber+37*e.endColumn}function _(e){return{startLineNumber:e.startLineNumber,startColumn:e.startColumn,endLineNumber:e.startLineNumber,endColumn:e.startColumn}}function b(e){return e?new C(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}t.isIRange=r,t.serialize=i,t.deserialize=o,t.serializeMany=s,t.deserializeMany=a,t.isEmpty=u,t.containsPosition=l,t.containsRange=c,t.areIntersectingOrTouching=d,t.intersectRanges=h,t.plusRange=p,t.equalsRange=f,t.compareRangesUsingStarts=g,t.compareRangesUsingEnds=m,t.spansMultipleLines=v,t.hashCode=y,t.collapseToStart=_;var C=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 u(this)},e.prototype.containsPosition=function(e){return l(this,e)},e.prototype.containsRange=function(e){return c(this,e)},e.prototype.plusRange=function(e){return p(this,e)},e.prototype.intersectRanges=function(e){return h(this,e)},e.prototype.equalsRange=function(e){return f(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=C,t.create=b});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=" ".charCodeAt(0),d="	".charCodeAt(0),h=999,p=function(e){function t(t,n){t.push(u.EventType.ModelContentChanged),e.call(this,t),this._constructLines(n),this._setVersionId(1),this._isDisposed=!1}return __extends(t,e),t.prototype.getVersionId=function(){if(this._isDisposed)throw new Error("TextModel.getVersionId: Model is disposed");return this._versionId},t.prototype.getAlternativeVersionId=function(){if(this._isDisposed)throw new Error("TextModel.getAlternativeVersionId: Model is disposed");return this._alternativeVersionId},t.prototype._increaseVersionId=function(){this._setVersionId(this._versionId+1)},t.prototype._setVersionId=function(e){this._versionId=e,this._alternativeVersionId=this._versionId},t.prototype._overwriteAlternativeVersionId=function(e){this._alternativeVersionId=e},t.prototype.isDisposed=function(){return this._isDisposed},t.prototype.dispose=function(){if(this._isDisposed)throw new Error("TextModel.dispose: Model is disposed");this._isDisposed=!0,this._lines=null,this._EOL=null,this._BOM=null,e.prototype.dispose.call(this)},t.prototype._createContentChangedFlushEvent=function(){return{changeType:u.EventType.ModelContentChangedFlush,detail:null,versionId:-1,isUndoing:!1,isRedoing:!1}},t.prototype._emitContentChanged2=function(e,t,n,r,i,o,s,l){var c={range:new a.Range(e,t,n,r),rangeLength:i,text:o,versionId:this.getVersionId(),isUndoing:s,isRedoing:l};this.emit(u.EventType.ModelContentChanged2,c)},t.prototype._resetValue=function(e,n){this._constructLines(t.toRawText(n)),this._increaseVersionId(),e.detail=this.toRawText(),e.versionId=this._versionId},t.prototype.toRawText=function(){return{BOM:this._BOM,EOL:this._EOL,lines:this.getLinesContent()}},t.prototype.setValue=function(e){if(this._isDisposed)throw new Error("TextModel.setValue: Model is disposed");if(null!==e){var t=this.getFullModelRange(),n=this.getValueLengthInRange(t),r=this.getLineCount(),i=this.getLineMaxColumn(r),o=this._createContentChangedFlushEvent();this._resetValue(o,e),this._emitModelContentChangedFlushEvent(o),this._emitContentChanged2(1,1,r,i,n,this.getValue(),!1,!1)}},t.prototype.getValue=function(e,t){if(void 0===t&&(t=!1),this._isDisposed)throw new Error("TextModel.getValue: Model is disposed");var n=this.getFullModelRange(),r=this.getValueInRange(n,e);return t?this._BOM+r:r},t.prototype.getEmptiedValueInRange=function(e,t,n){if(void 0===t&&(t=""),void 0===n&&(n=r.EndOfLinePreference.TextDefined),this._isDisposed)throw new Error("TextModel.getEmptiedValueInRange: Model is disposed");var i=this.validateRange(e);if(i.isEmpty())return"";if(i.startLineNumber===i.endLineNumber)return this._repeatCharacter(t,i.endColumn-i.startColumn);var o=this._getEndOfLine(n),s=i.startLineNumber-1,a=i.endLineNumber-1,u=[];u.push(this._repeatCharacter(t,this._lines[s].text.length-i.startColumn+1));for(var l=s+1;a>l;l++)u.push(this._repeatCharacter(t,this._lines[l].text.length));return u.push(this._repeatCharacter(t,i.endColumn-1)),u.join(o)},t.prototype._repeatCharacter=function(e,t){for(var n="",r=0;t>r;r++)n+=e;return n},t.prototype.getValueInRange=function(e,t){if(void 0===t&&(t=r.EndOfLinePreference.TextDefined),this._isDisposed)throw new Error("TextModel.getValueInRange: Model is disposed");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),o=n.startLineNumber-1,s=n.endLineNumber-1,a=[];a.push(this._lines[o].text.substring(n.startColumn-1));for(var u=o+1;s>u;u++)a.push(this._lines[u].text);return a.push(this._lines[s].text.substring(0,n.endColumn-1)),a.join(i)},t.prototype.getValueLengthInRange=function(e,t){if(void 0===t&&(t=r.EndOfLinePreference.TextDefined),this._isDisposed)throw new Error("TextModel.getValueInRange: Model is disposed");var n=this.validateRange(e);if(n.isEmpty())return 0;if(n.startLineNumber===n.endLineNumber)return n.endColumn-n.startColumn;var i=this._getEndOfLine(t).length,o=n.startLineNumber-1,s=n.endLineNumber-1,a=0;a+=this._lines[o].text.length-n.startColumn+1;for(var u=o+1;s>u;u++)a+=i+this._lines[u].text.length;return a+=i+(n.endColumn-1)},t.prototype.isDominatedByLongLines=function(e){if(this._isDisposed)throw new Error("TextModel.isDominatedByLongLines: Model is disposed");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){if(this._isDisposed)throw new Error("TextModel.guessIndentation: Model is disposed");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(){if(this._isDisposed)throw new Error("TextModel.getLineCount: Model is disposed");return this._lines.length},t.prototype.getLineContent=function(e){if(this._isDisposed)throw new Error("TextModel.getLineContent: Model is disposed");if(1>e||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return this._lines[e-1].text},t.prototype.getLinesContent=function(){if(this._isDisposed)throw new Error("TextModel.getLineContent: Model is disposed");for(var e=[],t=0,n=this._lines.length;n>t;t++)e[t]=this._lines[t].text;return e},t.prototype.getEOL=function(){if(this._isDisposed)throw new Error("TextModel.getEOL: Model is disposed");return this._EOL},t.prototype.getLineMaxColumn=function(e){if(this._isDisposed)throw new Error("TextModel.getLineMaxColumn: Model is disposed");if(1>e||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return this._lines[e-1].text.length+1},t.prototype.getLineFirstNonWhitespaceColumn=function(e){if(this._isDisposed)throw new Error("TextModel.getLineFirstNonWhitespaceColumn: Model is disposed");if(1>e||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");var t=o.firstNonWhitespaceIndex(this._lines[e-1].text);return-1===t?0:t+1},t.prototype.getLineLastNonWhitespaceColumn=function(e){if(this._isDisposed)throw new Error("TextModel.getLineLastNonWhitespaceColumn: Model is disposed");if(1>e||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");var t=o.lastNonWhitespaceIndex(this._lines[e-1].text);return-1===t?0:t+2},t.prototype.validateLineNumber=function(e){if(this._isDisposed)throw new Error("TextModel.validateLineNumber: Model is disposed");return 1>e&&(e=1),e>this._lines.length&&(e=this._lines.length),e},t.prototype.validatePosition=function(e){if(this._isDisposed)throw new Error("TextModel.validatePosition: Model is disposed");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){if(this._isDisposed)throw new Error("TextModel.validateRange: Model is disposed");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(){if(this._isDisposed)throw new Error("TextModel.getFullModelRange: Model is disposed");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.toRawText=function(e){for(var t=0,n=-1;-1!==(n=e.indexOf("\r",n+1));)t++;var r=e.split(/\r\n|\r|\n/),i="";r[0].length>0&&r[0].charCodeAt(0)===l&&(i=String.fromCharCode(l),r[0]=r[0].substr(1));var o=r.length-1,s="";return s=0===o||t>o/2?"\r\n":"\n",{BOM:i,EOL:s,lines:r}},t.prototype._constructLines=function(e){var t,n,r=e.lines,o=[];for(t=0,n=r.length;n>t;t++)o.push(new i.ModelLine(t+1,r[t]));this._BOM=e.BOM,this._EOL=e.EOL,this._lines=o},t.prototype._getEndOfLine=function(e){switch(e){case r.EndOfLinePreference.LF:return"\n";case r.EndOfLinePreference.CRLF:return"\r\n";case r.EndOfLinePreference.TextDefined:return this.getEOL()}throw new Error("Unknown EOL preference")},t.prototype.findMatches=function(e,t,n,r,i){if(this._isDisposed)throw new Error("Model.findMatches: Model is disposed");if(""===e)return[];var s=null;try{s=o.createRegExp(e,n,r,i)}catch(u){return[]}if(o.regExpLeadsToEndlessLoop(s))return[];var l;return l=a.isIRange(t)?t:this.getFullModelRange(),this._doFindMatches(l,s)},t.prototype._doFindMatches=function(e,t){var n,r=[],i=0;if(e.startLineNumber===e.endLineNumber)return n=this._lines[e.startLineNumber-1].text.substring(e.startColumn-1,e.endColumn-1),i=this._findMatchesInLine(t,n,e.startLineNumber,e.startColumn-1,i,r),r;n=this._lines[e.startLineNumber-1].text.substring(e.startColumn-1),i=this._findMatchesInLine(t,n,e.startLineNumber,e.startColumn-1,i,r);for(var o=e.startLineNumber+1;o<e.endLineNumber&&h>i;o++)i=this._findMatchesInLine(t,this._lines[o-1].text,o,0,i,r);return h>i&&(n=this._lines[e.endLineNumber-1].text.substring(0,e.endColumn-1),i=this._findMatchesInLine(t,n,e.endLineNumber,0,i,r)),r},t.prototype._findMatchesInLine=function(e,t,n,r,i,o){var s;do if(s=e.exec(t),s&&(o.push(new a.Range(n,s.index+1+r,n,s.index+1+s[0].length+r)),i++,i>=h))return i;while(s);return i},t}(n.EventEmitter);t.TextModel=p}),define("vs/editor/core/config/config",["require","exports","vs/base/env","vs/editor/core/internalConstants"],function(e,t,n,r){function i(e,t){return n.isMacintosh?{shift:e,alt:!0,key:t}:{ctrlCmd:!0,shift:e,key:t}}var o=function(){function e(){this.editor={lineHeight:20,lineNumbers:!0,selectOnLineNumbers:!0,lineNumbersMinChars:n.enableDebug?3:5,glyphMargin:n.enableDebug,lineDecorationsWidth:10,revealHorizontalRightPadding:30,tabSize:"auto",insertSpaces:"auto",roundedSelection:!0,theme:"vs",pageSize:1,readOnly:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1},overviewRulerLanes:2,hideCursorInOverviewRuler:!1,scrollBeyondLastLine:!0,automaticLayout:!1,wrappingColumn:300,wordWrapBreakBeforeCharacters:"{([+",wordWrapBreakAfterCharacters:" 	})]?|&,;",wordWrapBreakObtrusiveCharacters:".",tabFocusMode:!1,forcedTokenizationBoundary:1e3,longLineBoundary:300,isDominatedByLongLines:!1,hover:!0,contextmenu:!0,quickSuggestions:!0,quickSuggestionsDelay:10,iconsInSuggestions:!0,autoClosingBrackets:!0,formatOnType:!0,suggestOnTriggerCharacters:!0,selectionHighlight:!0,outlineMarkers:!1},this.keyBindings={}}return e.prototype.addKeyBinding=function(e,t){this.keyBindings[e]=this.keyBindings[e]||[],this.keyBindings[e].push(t)},e}();t.ConfigClass=o,t.Config=new o,t.Config.addKeyBinding(r.Handler.CursorLeft,{key:"LeftArrow"}),t.Config.addKeyBinding(r.Handler.CursorLeftSelect,{shift:!0,key:"LeftArrow"}),t.Config.addKeyBinding(r.Handler.CursorRight,{key:"RightArrow"}),t.Config.addKeyBinding(r.Handler.CursorRightSelect,{shift:!0,key:"RightArrow"}),t.Config.addKeyBinding(r.Handler.CursorUp,{key:"UpArrow"}),t.Config.addKeyBinding(r.Handler.CursorUpSelect,{shift:!0,key:"UpArrow"}),t.Config.addKeyBinding(r.Handler.CursorDown,{key:"DownArrow"}),t.Config.addKeyBinding(r.Handler.CursorDownSelect,{shift:!0,key:"DownArrow"}),t.Config.addKeyBinding(r.Handler.CursorPageUp,{key:"PageUp"}),t.Config.addKeyBinding(r.Handler.CursorPageUpSelect,{shift:!0,key:"PageUp"}),t.Config.addKeyBinding(r.Handler.CursorPageDown,{key:"PageDown"}),t.Config.addKeyBinding(r.Handler.CursorPageDownSelect,{shift:!0,key:"PageDown"}),t.Config.addKeyBinding(r.Handler.CursorHome,{key:"Home"}),t.Config.addKeyBinding(r.Handler.CursorHomeSelect,{shift:!0,key:"Home"}),t.Config.addKeyBinding(r.Handler.CursorEnd,{key:"End"}),t.Config.addKeyBinding(r.Handler.CursorEndSelect,{shift:!0,key:"End"}),t.Config.addKeyBinding(r.Handler.Tab,{key:"Tab"}),t.Config.addKeyBinding(r.Handler.Outdent,{shift:!0,key:"Tab"}),t.Config.addKeyBinding(r.Handler.DeleteLeft,{key:"Backspace"}),t.Config.addKeyBinding(r.Handler.DeleteLeft,{shift:!0,key:"Backspace"}),t.Config.addKeyBinding(r.Handler.DeleteRight,{key:"Delete"}),t.Config.addKeyBinding(r.Handler.DeleteRight,{shift:!0,key:"Delete"}),t.Config.addKeyBinding(r.Handler.SelectAll,{ctrlCmd:!0,key:"A"}),t.Config.addKeyBinding(r.Handler.Escape,{key:"Escape"}),t.Config.addKeyBinding(r.Handler.CursorWordLeft,i(!1,"LeftArrow")),t.Config.addKeyBinding(r.Handler.CursorWordLeftSelect,i(!0,"LeftArrow")),t.Config.addKeyBinding(r.Handler.CursorWordRight,i(!1,"RightArrow")),t.Config.addKeyBinding(r.Handler.CursorWordRightSelect,i(!0,"RightArrow")),t.Config.addKeyBinding(r.Handler.CursorDownSelect,i(!0,"DownArrow")),t.Config.addKeyBinding(r.Handler.CursorUpSelect,i(!0,"UpArrow")),t.Config.addKeyBinding(r.Handler.DeleteWordLeft,i(!1,"Backspace")),t.Config.addKeyBinding(r.Handler.DeleteWordRight,i(!1,"Delete")),n.isMacintosh?(t.Config.addKeyBinding(r.Handler.CursorTop,{ctrlCmd:!0,key:"UpArrow"}),t.Config.addKeyBinding(r.Handler.CursorTopSelect,{ctrlCmd:!0,shift:!0,key:"UpArrow"}),t.Config.addKeyBinding(r.Handler.CursorBottom,{ctrlCmd:!0,key:"DownArrow"}),t.Config.addKeyBinding(r.Handler.CursorBottomSelect,{ctrlCmd:!0,shift:!0,key:"DownArrow"}),n.browser.isOpera?(t.Config.addKeyBinding(r.Handler.Undo,{winCtrl:!0,key:"Z"}),t.Config.addKeyBinding(r.Handler.Redo,{winCtrl:!0,key:"Y"})):(t.Config.addKeyBinding(r.Handler.Undo,{ctrlCmd:!0,key:"Z"}),t.Config.addKeyBinding(r.Handler.Redo,{ctrlCmd:!0,shift:!0,key:"Z"})),t.Config.addKeyBinding(r.Handler.CursorHome,{ctrlCmd:!0,key:"LeftArrow"}),t.Config.addKeyBinding(r.Handler.CursorHomeSelect,{ctrlCmd:!0,shift:!0,key:"LeftArrow"}),t.Config.addKeyBinding(r.Handler.CursorEnd,{ctrlCmd:!0,key:"RightArrow"}),t.Config.addKeyBinding(r.Handler.CursorEndSelect,{ctrlCmd:!0,shift:!0,key:"RightArrow"}),t.Config.addKeyBinding(r.Handler.CursorHome,{winCtrl:!0,key:"A"}),t.Config.addKeyBinding(r.Handler.CursorLeft,{winCtrl:!0,key:"B"}),t.Config.addKeyBinding(r.Handler.DeleteRight,{winCtrl:!0,key:"D"}),t.Config.addKeyBinding(r.Handler.CursorEnd,{winCtrl:!0,key:"E"}),t.Config.addKeyBinding(r.Handler.CursorRight,{winCtrl:!0,key:"F"}),t.Config.addKeyBinding(r.Handler.DeleteLeft,{winCtrl:!0,key:"H"}),t.Config.addKeyBinding(r.Handler.DeleteAllRight,{winCtrl:!0,key:"K"}),t.Config.addKeyBinding(r.Handler.CursorDown,{winCtrl:!0,key:"N"}),t.Config.addKeyBinding(r.Handler.LineBreakInsert,{winCtrl:!0,key:"O"}),t.Config.addKeyBinding(r.Handler.CursorUp,{winCtrl:!0,key:"P"}),t.Config.addKeyBinding(r.Handler.CursorPageDown,{winCtrl:!0,key:"V"})):(t.Config.addKeyBinding(r.Handler.CursorTop,{ctrlCmd:!0,key:"Home"}),t.Config.addKeyBinding(r.Handler.CursorTopSelect,{ctrlCmd:!0,shift:!0,key:"Home"}),t.Config.addKeyBinding(r.Handler.CursorBottom,{ctrlCmd:!0,key:"End"}),t.Config.addKeyBinding(r.Handler.CursorBottomSelect,{ctrlCmd:!0,shift:!0,key:"End"}),t.Config.addKeyBinding(r.Handler.Undo,{ctrlCmd:!0,key:"Z"}),t.Config.addKeyBinding(r.Handler.Redo,{ctrlCmd:!0,key:"Y"}),t.Config.addKeyBinding(r.Handler.Redo,{ctrlCmd:!0,shift:!0,key:"Z"}))}),define("vs/editor/core/model/tokenIterator",["require","exports","vs/editor/editor"],function(e,t,n){var r=n.LineTokensBinaryEncoding.getStartIndex,i=n.LineTokensBinaryEncoding.inflate,o=function(){function e(e,t){this._model=e,this._currentLineNumber=t.lineNumber,this._currentTokenIndex=0,this._readLineTokens(this._currentLineNumber),this._next=null,this._prev=null;for(var n=t.column-1,i=Number.MAX_VALUE,o=this._currentTokens.length-1;o>=0;o--){if(r(this._currentTokens[o])<=n&&i>=n){this._currentTokenIndex=o,this._next=this._current(),this._prev=this._current();break}i=r(this._currentTokens[o])}}return e.prototype._readLineTokens=function(e){this._currentLineTokens=this._model.getLineTokens(e,!1),this._currentTokens=this._currentLineTokens.getBinaryEncodedTokens(),this._map=this._currentLineTokens.getBinaryEncodedTokensMap()},e.prototype._advanceNext=function(){if(this._prev=this._next,this._next=null,this._currentTokenIndex+1<this._currentTokens.length)this._currentTokenIndex++,this._next=this._current();else{for(;this._currentLineNumber+1<=this._model.getLineCount();)if(this._currentLineNumber++,this._readLineTokens(this._currentLineNumber),this._currentTokens.length>0){this._currentTokenIndex=0,this._next=this._current();
break}null===this._next&&(this._readLineTokens(this._currentLineNumber),this._currentTokenIndex=this._currentTokens.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._readLineTokens(this._currentLineNumber),this._currentTokens.length>0){this._currentTokenIndex=this._currentTokens.length-1,this._prev=this._current();break}},e.prototype._current=function(){return{token:i(this._map,this._currentTokens[this._currentTokenIndex]),lineNumber:this._currentLineNumber,startColumn:r(this._currentTokens[this._currentTokenIndex])+1,endColumn:this._currentTokenIndex+1<this._currentTokens.length?r(this._currentTokens[this._currentTokenIndex+1])+1:this._model.getLineContent(this._currentLineNumber).length+1}},e.prototype.hasNext=function(){return null!==this._next},e.prototype.next=function(){var e=this._next;return this._advanceNext(),e},e.prototype.hasPrev=function(){return null!==this._prev},e.prototype.prev=function(){var e=this._prev;return this._advancePrev(),e},e.prototype._invalidate=function(){var e=function(){throw new Error("iteration isn't valid anymore")};this.hasNext=e,this.next=e,this.hasPrev=e,this.prev=e},e}();t.TokenIterator=o}),define("vs/editor/core/model/textModelWithTokensHelpers",["require","exports","vs/editor/editor","vs/editor/modes/nullMode","vs/base/errors","vs/editor/core/range"],function(e,t,n,r,i,o){var s=n.LineTokensBinaryEncoding.getType,a=n.LineTokensBinaryEncoding.getBracket,u=n.LineTokensBinaryEncoding.getStartIndex,l=function(){function e(){}return e.massageWordDefinitionOf=function(e){var t=r.NullMode.DEFAULT_WORD_REGEXP;if(e.tokenTypeClassificationSupport){try{t=e.tokenTypeClassificationSupport.getWordDefinition()}catch(n){i.onUnexpectedError(n)}if(t instanceof RegExp){if(!t.global){var o="g";t.ignoreCase&&(o+="i"),t.multiline&&(o+="m"),t=new RegExp(t.source,o)}}else t=r.NullMode.DEFAULT_WORD_REGEXP}return t.lastIndex=0,t},e.getWords=function(t,n,r,i){if(void 0===i&&(i=!1),i&&!t._lineIsTokenized(n))return e._getWordsInText(t.getLineContent(n),e.massageWordDefinitionOf(t.getMode()));var o,a,l,c,d,h=[],p=t.getLineContent(n),f=t.getLineTokens(n,!1),g=f.getBinaryEncodedTokens(),m=f.getBinaryEncodedTokensMap(),v=t._getLineModeTransitions(n),y={};if(r&&(y=e._getNonWordTokenMap(t)),0!==p.length){var _=0,b=_+1<v.length?v[_+1].startIndex:Number.MAX_VALUE,C=e.massageWordDefinitionOf(v[_].mode);for(o=0,a=0,l=g.length;l>o;o++){if(d=o===l-1?p.length:u(g[o+1]),a>=b&&(_++,b=_+1<v.length?v[_+1].startIndex:Number.MAX_VALUE,C=e.massageWordDefinitionOf(v[_].mode)),!r||!y.hasOwnProperty(s(m,g[o]))){var w,E=p.substring(a,d),S=E.match(C)||[],T=0;for(c=0;c<S.length;c++){var x=S[c].trim();x.length>0&&(w=E.indexOf(x,T),T=w+x.length,h.push({start:a+w,end:a+T}))}}a=d}}return h},e._getWordsInText=function(e,t){var n,r,i,o,s,a,u=e.match(t)||[],l=[];for(n=0;n<u.length;n++)a=u[n].trim(),a.length>0&&(r=e.indexOf(a,i),i=r+a.length,o=r,s=i,l.push({start:o,end:s}));return l},e.getWordAtPosition=function(t,n,r,i){if(void 0===i&&(i=!1),i&&!t._lineIsTokenized(n.lineNumber))return e._getWordAtText(n.column,e.massageWordDefinitionOf(t.getMode()),t.getLineContent(n.lineNumber),0);var o=t.getLineTokens(n.lineNumber,!1),a=o.getBinaryEncodedTokens(),l=o.getBinaryEncodedTokensMap(),c=-1,d=-1;if(a.length>0&&(c=o.findIndexOfOffset(n.column-1),c>0&&u(a[c])===n.column-1&&(d=c-1)),r&&(-1!==c||-1!==d)){var h=e._getNonWordTokenMap(t);-1!==c&&h.hasOwnProperty(s(l,a[c]))&&(c=-1),-1!==d&&h.hasOwnProperty(s(l,a[d]))&&(d=-1)}var p,f=e.massageWordDefinitionOf(t.getModeAtPosition(n.lineNumber,n.column)),g=t.getLineContent(n.lineNumber),m=null;return m||-1===c||(p=g.substring(u(a[c]),c+1<a.length?u(a[c+1]):Number.MAX_VALUE),m=e._getWordAtText(n.column,f,p,u(a[c]))),m||-1===d||(p=g.substring(u(a[d]),d+1<a.length?u(a[d+1]):Number.MAX_VALUE),m=e._getWordAtText(n.column,f,p,u(a[d]))),m},e._getWordAtText=function(e,t,n,r){var i,o,s,a,u,l,c=n.match(t)||[];for(i=0;i<c.length;i++)if(l=c[i].trim(),l.length>0&&(o=n.indexOf(l,s),s=o+l.length,a=r+o+1,u=r+s+1,e>=a&&u>=e))return{word:l,startColumn:a,endColumn:u};return null},e._getNonWordTokenMap=function(e){var t,n,r=e._getNonWordTokenTypes(),i={};for(t=0,n=r.length;n>t;t++)i[r[t]]=!0;return i},e}();t.WordHelper=l;var c=function(){function e(){}return e._sign=function(e){return 0>e?-1:e>0?1:0},e._findMatchingBracketUp=function(t,n,r,i,l){var c,d,h,p=l;for(c=r;c>=1;c--){var f=t.getLineTokens(c,!1),g=f.getBinaryEncodedTokens(),m=f.getBinaryEncodedTokensMap(),v=t.getLineContent(c);for(h=(c===r?i:g.length)-1;h>=0;h--)if(s(m,g[h])===n&&(p+=e._sign(a(g[h])),0===p))return d=h===g.length-1?v.length:u(g[h+1]),new o.Range(c,u(g[h])+1,c,d+1)}return null},e._findMatchingBracketDown=function(t,n,r,i,l){var c,d,h,p,f,g=1;for(c=r,d=t.getLineCount();d>=c;c++){if(l&&!t._lineIsTokenized(c))return{range:null,isAccurate:!1};var m=t.getLineTokens(c,!1),v=m.getBinaryEncodedTokens(),y=m.getBinaryEncodedTokensMap(),_=t.getLineContent(c);for(p=c===r?i+1:0,f=v.length;f>p;p++)if(s(y,v[p])===n&&(g+=e._sign(a(v[p])),0===g))return h=p===v.length-1?_.length:u(v[p+1]),{range:new o.Range(c,u(v[p])+1,c,h+1),isAccurate:!0}}return{range:null,isAccurate:!0}},e.findMatchingBracketUp=function(t,n,r){var i,o,s,a=r.column-1,l=-1,c=t.getLineTokens(r.lineNumber,!1),d=c.getBinaryEncodedTokens(),h=t.getLineContent(r.lineNumber);for(i=0,o=d.length;-1===l&&o>i;i++)s=i===o-1?h.length:u(d[i+1]),u(d[i])<=a&&s>=a&&(l=i);return e._findMatchingBracketUp(t,n,r.lineNumber,l+1,0)},e.matchBracket=function(t,n,r){if(r&&!t._lineIsTokenized(n.lineNumber))return{brackets:null,isAccurate:!1};var i,l,c=t.getLineContent(n.lineNumber),d={brackets:null,isAccurate:!0};if(c.length>0){var h,p,f,g,m,v=n.column-1,y=t.getLineTokens(n.lineNumber,!1),_=y.getBinaryEncodedTokens(),b=y.getBinaryEncodedTokensMap();for(i=0,l=_.length;null===d.brackets&&l>i;i++)if(h=_[i],f=u(h),m=s(b,h),g=a(h),p=i===l-1?c.length:u(_[i+1]),v>=f&&p>=v){if(0>g){var C=e._findMatchingBracketUp(t,m,n.lineNumber,i,-1);C&&(d.brackets=[new o.Range(n.lineNumber,f+1,n.lineNumber,p+1),C])}if(null===d.brackets&&g>0){var w=e._findMatchingBracketDown(t,m,n.lineNumber,i,r);d.isAccurate=w.isAccurate,w.range&&(d.brackets=[new o.Range(n.lineNumber,f+1,n.lineNumber,p+1),w.range])}}}return d},e}();t.BracketsHelper=c}),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});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/textModelWithTokens",["require","exports","vs/nls!vs/editor/worker/editorWorkerServer","vs/base/lib/winjs.base","vs/base/lifecycle","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","vs/base/time/schedulers","vs/base/performance/timer","vs/base/time/precision"],function(e,t,n,r,i,o,s,a,u,l,c,d,h,p,f,g){var m=function(){function e(){this._inflate=[""],this._deflate={"":0}}return e}();t.TokensInflatorMap=m;var v=function(){function e(e,t){var n=this;this._modePromise=e,this._externalModePromise=new r.TPromise(function(e,t){n._externalModePromise_c=e,n._externalModePromise_e=t}),this._model=t,this._isDisposed=!1,r.TPromise.timeout(0).then(function(){return n._modePromise}).then(function(e){if(n._isDisposed)return n._externalModePromise_c(!1),void 0;var t=n._model;n.dispose(),t.setMode(e),t._warmUpTokens(),n._externalModePromise_c(!0)}).done(null,function(e){n._externalModePromise_e(e),a.onUnexpectedError(e)})}return e.prototype.getModePromise=function(){return this._externalModePromise},e.prototype.dispose=function(){this._modePromise=null,this._model=null,this._isDisposed=!0},e}(),y=function(){function e(e,t){var n=this;this._retokenizePromise=e,this._model=t,this._isDisposed=!1,this.isFulfilled=!1,r.TPromise.timeout(0).then(function(){return n._retokenizePromise}).then(function(){n._isDisposed||(n.isFulfilled=!0,n._model.onRetokenizerFulfilled())}).done(null,a.onUnexpectedError)}return e.prototype.getRange=function(){return null},e.prototype.dispose=function(){this._retokenizePromise=null,this._model=null,this._isDisposed=!0},e}();t.FullModelRetokenizer=y;var _=function(){function e(e,t){this.modeTransitions=t.getModeTransitions().toArray(e),this._text=t.text,this._lineTokens=t.getTokens()}return e.prototype.getLineContent=function(){return this._text},e.prototype.getTokenCount=function(){return this._lineTokens.getTokenCount()},e.prototype.getTokenStartIndex=function(e){return this._lineTokens.getTokenStartIndex(e)},e.prototype.getTokenEndIndex=function(e){return this._lineTokens.getTokenEndIndex(e,this._text.length)},e.prototype.getTokenType=function(e){return this._lineTokens.getTokenType(e)},e.prototype.getTokenBracket=function(e){return this._lineTokens.getTokenBracket(e)},e.prototype.getTokenText=function(e){var t=this._lineTokens.getTokenStartIndex(e),n=this._lineTokens.getTokenEndIndex(e,this._text.length);return this._text.substring(t,n)},e.prototype.findIndexOfOffset=function(e){return this._lineTokens.findIndexOfOffset(e)},e}(),b=function(e){function t(t,n,i,o){var a=this;if(t.push(u.EventType.ModelTokensChanged),t.push(u.EventType.ModelModeChanged),e.call(this,t,n),this._shouldAutoTokenize=i,this._stopLineTokenizationAfter=c.Config.editor.stopLineTokenizationAfter,o)if(r.Promise.is(o)){var l=o;this._modeToModelBinder=new v(l,this),this._mode=new s.NullMode}else this._mode=o,this._resetModeListener(this._mode);else this._mode=new s.NullMode;this._revalidateTokensTimeout=-1,this._modeTokenizationFailedTimeout=-1,this._scheduleRetokenizeNow=new p.RunOnceScheduler(function(){return a._retokenizeNow()},200),this._retokenizers=[],this._resetTokenizationState()}return __extends(t,e),t.prototype.dispose=function(){this._modeToModelBinder&&(this._modeToModelBinder.dispose(),this._modeToModelBinder=null),this._resetModeListener(null),this._clearTimers(),this._mode=null,this._lastState=null,this._tokensInflatorMap=null,this._retokenizers=i.disposeAll(this._retokenizers),this._scheduleRetokenizeNow.dispose(),e.prototype.dispose.call(this)},t.prototype.whenModeIsReady=function(){return this._modeToModelBinder?this._modeToModelBinder.getModePromise():r.Promise.as(this._mode)},t.prototype.onRetokenizerFulfilled=function(){this._scheduleRetokenizeNow.schedule()},t.prototype._retokenizeNow=function(){var e=this._retokenizers.filter(function(e){return e.isFulfilled});this._retokenizers=this._retokenizers.filter(function(e){return!e.isFulfilled});for(var t=!1,n=0;n<e.length;n++)e[n].getRange()||(t=!0);if(t){for(var n=0,r=this._lines.length;r>n;n++)this._lines[n].isInvalid=!0;this._invalidLineStartIndex=0}else{for(var i=Number.MAX_VALUE,n=0;n<e.length;n++){var o=e[n].getRange();i=Math.min(i,o.startLineNumber);for(var s=o.startLineNumber;s<=o.endLineNumber;s++)this._lines[s-1].isInvalid=!0}i-1<this._invalidLineStartIndex&&(this._invalidLineStartIndex<this._lines.length&&(this._lines[this._invalidLineStartIndex].isInvalid=!0),this._invalidLineStartIndex=i-1)}this._beginBackgroundTokenization();for(var n=0;n<e.length;n++)e[n].dispose()},t.prototype._createRetokenizer=function(e){return new y(e,this)},t.prototype._resetValue=function(t,n){e.prototype._resetValue.call(this,t,n),this._resetTokenizationState()},t.prototype._resetMode=function(e,t){this._mode=t,this._resetModeListener(t),this._resetTokenizationState(),this.emitModelTokensChangedEvent(1,this.getLineCount())},t.prototype._resetModeListener=function(e){var t=this;this._modeListener&&(this._modeListener.dispose(),this._modeListener=null),e&&"function"==typeof e.addSupportChangedListener&&(this._modeListener=e.addSupportChangedListener(function(e){return t._onModeSupportChanged(e)}))},t.prototype._onModeSupportChanged=function(e){e.tokenizationSupport&&(this._resetTokenizationState(),this.emitModelTokensChangedEvent(1,this.getLineCount()))},t.prototype._resetTokenizationState=function(){this._retokenizers=i.disposeAll(this._retokenizers),this._scheduleRetokenizeNow.cancel(),this._clearTimers(),this._initializeTokenizationState(),this._tokenizationElapsedTime=0,this._tokenizationTotalCharacters=1},t.prototype._clearTimers=function(){-1!==this._revalidateTokensTimeout&&(clearTimeout(this._revalidateTokensTimeout),this._revalidateTokensTimeout=-1),-1!==this._modeTokenizationFailedTimeout&&(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){n.friendlyMessage=t.MODE_TOKENIZATION_FAILED_MSG,a.onUnexpectedError(n),this._mode=new s.NullMode}e||(e=new s.NullState(this._mode,null)),this._lines[0].setState(e),this._lastState=null,this._tokensInflatorMap=new m,this._invalidLineStartIndex=0,this._beginBackgroundTokenization()},t.prototype.setStopLineTokenizationAfter=function(e){if(this._isDisposed)throw new Error("TextModelWithTokens.setStopLineTokenizationAfter: Model is disposed");this._stopLineTokenizationAfter=e},t.prototype.getLineTokens=function(e,t){if(void 0===t&&(t=!1),this._isDisposed)throw new Error("TextModelWithTokens.getLineTokens: Model is disposed");if(1>e||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return t||this._updateTokensUntilLine(e,!0),this._lines[e-1].getTokens()},t.prototype.getLineContext=function(e){if(this._isDisposed)throw new Error("TextModelWithTokens.getLineContext: Model is disposed");if(1>e||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return this._updateTokensUntilLine(e,!0),new _(this._mode,this._lines[e-1])},t.prototype._getInternalTokens=function(e){return this._updateTokensUntilLine(e,!0),this._lines[e-1].getTokens()},t.prototype.setValue=function(e,t){if(void 0===t&&(t=null),this._isDisposed)throw new Error("TextModelWithTokens.setValue: Model is disposed");if(null!==e||t){var n;if(null!==e&&(n=this._createContentChangedFlushEvent(),this._resetValue(n,e)),t)if(this._modeToModelBinder&&(this._modeToModelBinder.dispose(),this._modeToModelBinder=null),r.Promise.is(t))this._modeToModelBinder=new v(t,this);else{var i=t;if(this._mode!==i){var o={oldMode:this._mode,newMode:i};this._resetMode(o,i),this._emitModelModeChangedEvent(o)}}n&&this._emitModelContentChangedFlushEvent(n)}},t.prototype.getMode=function(){if(this._isDisposed)throw new Error("TextModelWithTokens.getMode: Model is disposed");return this._mode},t.prototype.setMode=function(e){if(this._isDisposed)throw new Error("TextModelWithTokens.setMode: Model is disposed");e&&this.setValue(null,e)},t.prototype.getModeAtPosition=function(e,t){if(this._isDisposed)throw new Error("TextModelWithTokens.getModeAtPosition: Model is disposed");var n=this.validatePosition({lineNumber:e,column:t}),r=n.lineNumber,i=n.column;if(1===i)return this.getStateBeforeLine(r).getMode();if(i===this.getLineMaxColumn(r))return this.getStateAfterLine(r).getMode();var o=this._getLineModeTransitions(r),s=l.findIndexInSegmentsArray(o,i-1);return o[s].mode},t.prototype._invalidateLine=function(e){this._lines[e].isInvalid=!0,e<this._invalidLineStartIndex&&(this._invalidLineStartIndex<this._lines.length&&(this._lines[this._invalidLineStartIndex].isInvalid=!0),this._invalidLineStartIndex=e,this._beginBackgroundTokenization())},t.prototype._updateLineTokens=function(e,t,n,r){this._lines[e].setTokens(t,r.tokens,n,r.modeTransitions)},t.prototype._beginBackgroundTokenization=function(){var e=this;this._shouldAutoTokenize&&-1===this._revalidateTokensTimeout&&(this._revalidateTokensTimeout=setTimeout(function(){e._revalidateTokensTimeout=-1,e._revalidateTokensNow()},0))},t.prototype._warmUpTokens=function(){if(this._isDisposed)throw new Error("TextModelWithTokens._warmUpTokens: Model is disposed");for(var e=Math.min(100,this.getLineCount()),t=e,n=1;e>=n;n++){var r=this._lines[n-1].text;if(r.length>=200){t=n-1;break}}this._revalidateTokensNow(t)},t.prototype._revalidateTokensNow=function(e){void 0===e&&(e=this._invalidLineStartIndex+1e6);var t=f.start(f.Topic.EDITOR,"backgroundTokenization");e=Math.min(this._lines.length,e);for(var n,r=20,i=this._invalidLineStartIndex+1,o=0,s=0,a=0,u=this._stopLineTokenizationAfter,l=g.createStopWatch(),c=i;e>=c;c++){if(n=l.elapsed(),n>r){e=c-1;break}if(s=this._lines[c-1].text.length,-1!==u&&s>u&&(s=u),o>0&&(a=n/o*s,n+a>r)){e=c-1;break}this._updateTokensUntilLine(c,!1),o+=s}n=l.elapsed();var d=f.start(f.Topic.EDITOR,"**speed: "+this._tokenizationTotalCharacters/this._tokenizationElapsedTime);d.stop(),e>=i&&this.emitModelTokensChangedEvent(i,e),this._invalidLineStartIndex<this._lines.length&&this._beginBackgroundTokenization(),t.stop()},t.prototype.getStateBeforeLine=function(e){return this._updateTokensUntilLine(e-1,!0),this._lines[e-1].getState()},t.prototype.getStateAfterLine=function(e){return this._updateTokensUntilLine(e,!0),e<this._lines.length?this._lines[e].getState():this._lastState},t.prototype._getLineModeTransitions=function(e){if(this._isDisposed)throw new Error("TextModelWithTokens._getLineModeTransitions: Model is disposed");if(1>e||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return this._updateTokensUntilLine(e,!0),this._lines[e-1].getModeTransitions().toArray(this._mode)},t.prototype._updateTokensUntilLine=function(e,n){var r=this._lines.length,i=e-1,o=this._stopLineTokenizationAfter;-1===o&&(o=1e9);for(var u=g.createStopWatch(),l=0,c=this._invalidLineStartIndex+1,d=e,h=this._invalidLineStartIndex;i>=h;h++){var p=h+1,f=null,m=this._lines[h].text;if(this._mode.tokenizationSupport){try{f=this._mode.tokenizationSupport.tokenize(this._lines[h].text,this._lines[h].getState(),0,o),l=f?f.actualStopOffset:this._lines[h].text.length}catch(v){v.friendlyMessage=t.MODE_TOKENIZATION_FAILED_MSG,a.onUnexpectedError(v),this._onModeTokenizationFailed()}f&&f.retokenize&&this._retokenizers.push(this._createRetokenizer(f.retokenize,h+1)),f&&f.tokens&&f.tokens.length>0&&(f.actualStopOffset=Math.max(f.actualStopOffset,f.tokens[f.tokens.length-1].startIndex+1)),f&&f.actualStopOffset<m.length&&(f.tokens.push({startIndex:f.actualStopOffset,type:"",bracket:0}),f.endState=this._lines[h].getState())}if(f||(f=s.nullTokenize(this._mode,m,this._lines[h].getState())),f.modeTransitions||(f.modeTransitions=[]),0===f.modeTransitions.length&&f.modeTransitions.push({startIndex:0,mode:this._mode}),this._updateLineTokens(h,this._tokensInflatorMap,this._mode,f),this._lines[h].isInvalid&&(this._lines[h].isInvalid=!1),r>p)if(null!==this._lines[p].getState()&&f.endState.equals(this._lines[p].getState())){for(var y=h+1;r>y&&!this._lines[y].isInvalid;){if(r>y+1){if(null===this._lines[y+1].getState())break}else if(null===this._lastState)break;y++}this._invalidLineStartIndex=Math.max(this._invalidLineStartIndex,y),h=y-1}else this._lines[p].setState(f.endState);else this._lastState=f.endState}this._invalidLineStartIndex=Math.max(this._invalidLineStartIndex,i+1),this._tokenizationElapsedTime+=u.elapsed(),this._tokenizationTotalCharacters+=l,n&&d>=c&&this.emitModelTokensChangedEvent(c,d)},t.prototype._onModeTokenizationFailed=function(){var e=this;-1===this._modeTokenizationFailedTimeout&&(this._modeTokenizationFailedTimeout=setTimeout(function(){e._modeTokenizationFailedTimeout=-1,e.setMode(new s.NullMode)},200))},t.prototype.emitModelTokensChangedEvent=function(e,t){var n={fromLineNumber:e,toLineNumber:t};this.emit(u.EventType.ModelTokensChanged,n)},t.prototype._emitModelModeChangedEvent=function(e){this.emit(u.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){a.onUnexpectedError(t)}return e},t.prototype._getWordDefinition=function(){return h.WordHelper.massageWordDefinitionOf(this._mode)},t.prototype.getWordAtPosition=function(e,t,n){if(void 0===n&&(n=!1),this._isDisposed)throw new Error("TextModelWithTokens.getWordAtPosition: Model is disposed");return h.WordHelper.getWordAtPosition(this,this.validatePosition(e),t,n)},t.prototype.getWordUntilPosition=function(e,t,n){if(void 0===n&&(n=!1),this._isDisposed)throw new Error("TextModelWithTokens.getWordUntilPosition: Model is disposed");var r=this.getWordAtPosition(e,t,n);return r?{word:r.word.substr(0,e.column-r.startColumn),startColumn:r.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}},t.prototype.getWords=function(e,t,n){if(void 0===n&&(n=!1),this._isDisposed)throw new Error("TextModelWithTokens.getWords: Model is disposed");if(1>e||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return h.WordHelper.getWords(this,this.validateLineNumber(e),t,n)},t.prototype.tokenIterator=function(e,t){if(this._isDisposed)throw new Error("TextModelWithTokens.tokenIterator: Model is disposed");var n=new d.TokenIterator(this,this.validatePosition(e)),r=t(n);return n._invalidate(),r},t.prototype.findMatchingBracketUp=function(e,t){if(this._isDisposed)throw new Error("TextModelWithTokens.findMatchingBracketUp: Model is disposed");return h.BracketsHelper.findMatchingBracketUp(this,e,this.validatePosition(t))},t.prototype.matchBracket=function(e,t){if(void 0===t&&(t=!1),this._isDisposed)throw new Error("TextModelWithTokens.matchBracket: Model is disposed");return h.BracketsHelper.matchBracket(this,this.validatePosition(e),t)},t.MODE_TOKENIZATION_FAILED_MSG=n.localize("vs_editor_core_model_textModelWithTokens",0),t}(o.TextModel);t.TextModelWithTokens=b});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/base/network","vs/editor/core/constants","vs/editor/core/view/model/prefixSumComputer","vs/editor/core/model/textModelWithTokens","vs/editor/core/model/modelLine","vs/base/lifecycle","vs/editor/core/model/textModel"],function(e,t,n,r,i,o,s,a,u){function l(e,t,n,r,i,o){return new p(e,t,u.TextModel.toRawText(n),r,i,o)}var c=function(e){function t(t,n,i,o,s,a){e.call(this,t.concat([r.EventType.ModelDispose]),i,!1,o),a||(a={}),this._setVersionId(n),this._associatedResource=s,this._extraProperties=a}return __extends(t,e),t.prototype.getModeId=function(){if(this._isDisposed)throw new Error("AbstractMirrorModel.getModeId: Model is disposed");return this.getMode().getId()},t.prototype.getEmbeddedAtPosition=function(){return null},t.prototype.getAllEmbedded=function(){return[]},t.prototype._constructLines=function(t){e.prototype._constructLines.call(this,t),this._EOL="\n"},t.prototype.destroy=function(){this.dispose()},t.prototype.dispose=function(){this.emit(r.EventType.ModelDispose),e.prototype.dispose.call(this)},t.prototype.getAssociatedResource=function(){if(this._isDisposed)throw new Error("AbstractMirrorModel.getAssociatedResource: Model is disposed");return this._associatedResource},t.prototype.getProperty=function(e){if(this._isDisposed)throw new Error("AbstractMirrorModel.getProperty: Model is disposed");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){if(this._isDisposed)throw new Error("AbstractMirrorModel.getRangeFromOffsetAndLength: Model is disposed");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){if(this._isDisposed)throw new Error("AbstractMirrorModel.getOffsetAndLengthFromRange: Model is disposed");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){if(this._isDisposed)throw new Error("AbstractMirrorModel.getPositionFromOffset: Model is disposed");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){if(this._isDisposed)throw new Error("AbstractMirrorModel.getOffsetFromPosition: Model is disposed");return this.getLineStart(e.lineNumber)+e.column-1},t.prototype.getLineStart=function(e){if(this._isDisposed)throw new Error("AbstractMirrorModel.getLineStart: Model is disposed");this._ensurePrefixSum();var t=Math.min(e,this._lines.length)-1;return this._lineStarts.getAccumulatedValue(t-1)},t.prototype.getAllWordsWithRange=function(){if(this._isDisposed)throw new Error("AbstractMirrorModel.getAllWordsWithRange: Model is disposed");if(this._lines.length>1e4)return[];var e,t=[],n=function(n){var i=r.text.substring(n.start,n.end),o={startLineNumber:e+1,startColumn:n.start+1,endLineNumber:e+1,endColumn:n.end+1};t.push({text:i,range:o})};for(e=0;e<this._lines.length;e++){var r=this._lines[e];this.wordenize(r.text).forEach(n)}return t},t.prototype.getAllWords=function(){var e=this;if(this._isDisposed)throw new Error("AbstractMirrorModel.getAllWords: Model is disposed");var t=[];return this._lines.forEach(function(n){e.wordenize(n.text).forEach(function(e){t.push(n.text.substring(e.start,e.end))})}),t},t.prototype.getAllUniqueWords=function(e){if(this._isDisposed)throw new Error("AbstractMirrorModel.getAllUniqueWords: Model is disposed");var t=!1,n={};return this.getAllWords().filter(function(r){return e&&!t&&e===r?(t=!0,!1):n[r]?!1:(n[r]=!0,!0)})},t.prototype.wordenize=function(e){for(var t,n=[],r=this._getWordDefinition();t=r.exec(e);)n.push({start:t.index,end:t.index+t[0].length});return n},t.prototype.getWord=function(e,t,n){for(var r=this.wordenize(e),i=0;i<r.length&&t>=r[i].start;i++){var o=r[i];if(t<=o.end)return n(e,o.start,o.end)}return n(e,-1,-1)},t}(o.TextModelWithTokens);t.AbstractMirrorModel=c;var d=function(e){function t(n,r,i,o){e.call(this,["changed"],n.getVersionId(),t._getMirrorValueWithinRanges(n,r),i,o),this._actualModel=n}return __extends(t,e),t._getMirrorValueWithinRanges=function(e,t){var n,r="",i=1,o=1;for(n=0;n<t.length;n++){var s=t[n];r+=e.getEmptiedValueInRange({startLineNumber:i,startColumn:o,endLineNumber:s.startLineNumber,endColumn:s.startColumn}," "),r+=e.getValueInRange(s),i=s.endLineNumber,o=s.endColumn}var a=e.getLineCount(),l=e.getLineMaxColumn(a);return r+=e.getEmptiedValueInRange({startLineNumber:i,startColumn:o,endLineNumber:a,endColumn:l}," "),u.TextModel.toRawText(r)},t.prototype.setIncludedRanges=function(e){var n=this.getVersionId();this._lineStarts=null,this._constructLines(t._getMirrorValueWithinRanges(this._actualModel,e)),this._resetTokenizationState(),this._setVersionId(n+1),this.emit("changed",{})},t}(c);t.MirrorModelEmbedded=d;var h=function(){function e(e){this.mode=e,this.ranges=[]}return e}();t.createMirrorModelFromString=l;var p=function(e){function t(t,n,r,i,o,s){e.call(this,["changed"],n,r,i,o,s),this._resourceService=t,this._embeddedModels={},this._updateEmbeddedModels()}return __extends(t,e),t.prototype.getEmbeddedAtPosition=function(e){if(this._isDisposed)throw new Error("MirrorModel.getEmbeddedAtPosition: Model is disposed");var t=this.getModeAtPosition(e.lineNumber,e.column);return this._embeddedModels.hasOwnProperty(t.getId())?this._embeddedModels[t.getId()]:null},t.prototype.getAllEmbedded=function(){var e=this;if(this._isDisposed)throw new Error("MirrorModel.getAllEmbedded: Model is disposed");return Object.keys(this._embeddedModels).map(function(t){return e._embeddedModels[t]})},t.prototype.dispose=function(){var t=this;e.prototype.dispose.call(this);var n=Object.keys(this._embeddedModels).map(function(e){return t._embeddedModels[e]});n.forEach(function(e){return t._resourceService.remove(e.getAssociatedResource())}),a.disposeAll(n),this._embeddedModels={}},t._getModesRanges=function(e){for(var t={},n=function(e,n){return t.hasOwnProperty(e)||(t[e]=new h(n)),t[e]},r=e.getLineCount(),i=e.getMode().getId(),o=e.getMode(),s=1,a=1,u=1;r>=u;u++)for(var l=e._getLineModeTransitions(u),c=0;c<l.length;c++){var d=l[c];if(d.mode.getId()!==i){var p=n(i,o);p.ranges.push({startLineNumber:s,startColumn:a,endLineNumber:u,endColumn:d.startIndex+1}),i=d.mode.getId(),o=d.mode,s=u,a=d.startIndex+1}}var f=r,g=e.getLineMaxColumn(f);if(s!==f||a!==g){var p=n(i,o);p.ranges.push({startLineNumber:s,startColumn:a,endLineNumber:f,endColumn:g})}return t},t.prototype._updateEmbeddedModels=function(){var e=!1;if(!this._resourceService||!this.getMode().tokenizationSupport||!this.getMode().tokenizationSupport.shouldGenerateEmbeddedModels)return e;for(var r=t._getModesRanges(this),i=Object.keys(this._embeddedModels),o=0;o<i.length;o++){var s=i[o];r.hasOwnProperty(s)||(e=!0,this._resourceService.remove(this._embeddedModels[s].getAssociatedResource()),this._embeddedModels[s].dispose(),delete this._embeddedModels[s])}for(var a=Object.keys(r),o=0;o<a.length;o++){var u=a[o];if(this._embeddedModels.hasOwnProperty(u))this._embeddedModels[u].setIncludedRanges(r[u].ranges);else{var l=new n.URL(this.getAssociatedResource().toExternal()+"#"+u);this._embeddedModels[u]=new d(this,r[u].ranges,r[u].mode,l),this._resourceService.insert(this._embeddedModels[u].getAssociatedResource(),this._embeddedModels[u])}}return e},t.prototype.onEvents=function(e){if(this._isDisposed)throw new Error("MirrorModel.onEvents: Model is disposed");for(var t=!1,n=0,i=e.length;i>n;n++){var o=e[n];switch(o.type){case r.EventType.ModelContentChanged:var s=o;switch(this._lineStarts=null,this._setVersionId(s.versionId),s.changeType){case r.EventType.ModelContentChangedFlush:this._onLinesFlushed(s),t=!0;break;case r.EventType.ModelContentChangedLinesDeleted:this._onLinesDeleted(s),t=!0;break;case r.EventType.ModelContentChangedLinesInserted:this._onLinesInserted(s),t=!0;break;case r.EventType.ModelContentChangedLineChanged:this._onLineChanged(s),t=!0}break;case r.EventType.ModelPropertiesChanged:this._extraProperties=o.properties;break;default:console.warn("Unknown model event: "+o.type)}}var a=!1;return t&&(this.emit("changed",{}),a=this._updateEmbeddedModels()),a},t.prototype._onLinesFlushed=function(e){this._lineStarts=null,this._constructLines(e.detail),this._resetTokenizationState()},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].removeText({},1,this._lines[e.lineNumber-1].text.length+1,!1,!1),this._lines[e.lineNumber-1].insertText({},1,{text:e.detail,markers:null},!1),this._invalidateLine(e.lineNumber-1)},t.prototype._onLinesDeleted=function(e){var t=e.fromLineNumber-1,n=e.toLineNumber-1;this._lineStarts&&this._lineStarts.removeValues(t,n-t+1);
var r=this._lines[t].getState();this._lines.splice(t,n-t+1),t<this._lines.length&&(this._lines[t].setState(r),this._invalidateLine(t))},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<e.toLineNumber;t++,n++)this._lineStarts&&this._lineStarts.insertValue(t,i[n].length+r),this._lines.splice(t,0,new s.ModelLine(0,i[n]));e.fromLineNumber>=2&&this._invalidateLine(e.fromLineNumber-2)},t}(c);t.MirrorModel=p}),define("vs/base/severity",["require","exports","vs/nls!vs/editor/worker/editorWorkerServer","vs/base/strings"],function(e,t,n,r){var i;!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(i||(i={}));var i;return function(e){function t(t){return t?r.equalsIgnoreCase(s,t)?e.Error:r.equalsIgnoreCase(a,t)||r.equalsIgnoreCase(u,t)?e.Warning:r.equalsIgnoreCase(l,t)?e.Info:e.Ignore:e.Ignore}function i(t){switch(t){case e.Error:return n.localize("vs_base_severity",0);case e.Warning:return n.localize("vs_base_severity",1);case e.Info:return n.localize("vs_base_severity",2)}return r.empty}function o(e,t){return t-e}var s="error",a="warning",u="warn",l="info";e.fromValue=t,e.toString=i,e.compare=o}(i||(i={})),i}),define("vs/editor/modes/boundModels",["require","exports","vs/editor/core/model/mirrorModel","vs/editor/editor","vs/base/collections","vs/base/severity","vs/editor/core/range","vs/platform/thread/attribute","vs/editor/core/constants","vs/base/eventSource"],function(e,t,n,r,i,o,s,a,u,l){var c=function(){function e(e){this.model=e,this.toUnbind=null}return e.prototype.dispose=function(){this._decorationIds=this.model.deltaDecorations(this._decorationIds,[]),this.model=null,this.toUnbind&&(this.toUnbind(),this.toUnbind=null)},e.prototype.deltaMarkers=function(e){var t=this;e=e.slice(0,500);var n=e.map(function(e){return{range:t._createDecorationRange(e),options:t._createDecorationOption(e)}});this._decorationIds=this.model.deltaDecorations(this._decorationIds,n)},e.prototype._createDecorationRange=function(e){var t=this.model.validateRange(new s.Range(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn)),n=new s.Range(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn);if(n.isEmpty()){var r=this.model.getWordAtPosition(n.getStartPosition(),!1);if(r)n.startColumn=r.startColumn,n.endColumn=r.endColumn;else{var i=this.model.getLineLastNonWhitespaceColumn(t.startLineNumber)||this.model.getLineMaxColumn(t.startLineNumber);1===i?console.warn("marker on empty line:",t):n.endColumn>=i?(n.endColumn=i,n.startColumn=i-1):n.endColumn+=1}}return n},e.prototype._createDecorationOption=function(e){var t=e.severity===o.Error,n=null;return"string"==typeof e.message?n=[{isText:!0,text:e.message}]:Array.isArray(e.message)?n=e.message:e.message&&(n=[e.message]),{stickiness:r.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,isOverlay:!0,className:t?u.ClassName.EditorErrorDecoration:u.ClassName.EditorWarningDecoration,htmlMessage:n,overviewRuler:{color:t?"rgba(255,18,18,0.7)":"rgba(18,136,18,0.7)",position:r.OverviewRulerLane.Right}}},e}(),d=function(){function e(e,t,n,r){this._resourceService=n,this._markerService=t,this._models={},this._modeInstantiator=r,this._onModelAdded=new l,this._onModelRemoved=new l,this._markerService&&e.isInMainThread&&this._markerService.onMarkerChanged.add(this._handleMarkerChange,this),e.registerInstance(this)}return e.prototype.dispose=function(){this._markerService&&this._markerService.onMarkerChanged.remove(this._handleMarkerChange)},e.prototype._handleMarkerChange=function(e){var t=this;e.forEach(function(e){var n=t._models[e.toExternal()];n&&n.deltaMarkers(t._markerService.read({resource:e,take:500}))})},e.prototype.addModel=function(e){var t=this,n=e.getAssociatedResource().toString(),r=new c(e);r.toUnbind=e.addBulkListener(function(e){return t._onModelEvents(n,e)}),this._markerService&&r.deltaMarkers(this._markerService.read({resource:e.getAssociatedResource()})),this._models[n]=r,this._modelInitialize(this._getBoundModelData(e)),this._onModelAdded.fire(e)},e.prototype.removeModel=function(e){var t=this,n=e.getAssociatedResource().toString();if(this._modelDispose(e.getAssociatedResource()),this._models[n].dispose(),delete this._models[n],this._markerService){var r=this._markerService.read({resource:e.getAssociatedResource()}),i=Object.create(null);r.forEach(function(e){return i[e.owner]=t}),Object.keys(i).forEach(function(n){return t._markerService.changeOne(n,e.getAssociatedResource(),[])})}this._onModelRemoved.fire(e)},e.prototype.getModels=function(){var e=[];return i.forEach(this._models,function(t){return e.push(t.value.model)}),e},e.prototype.getModel=function(e){var t=this._models[e.toExternal()];return t?t.model:null},Object.defineProperty(e.prototype,"onModelAdded",{get:function(){return this._onModelAdded?this._onModelAdded.value:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onModelRemoved",{get:function(){return this._onModelRemoved?this._onModelRemoved.value:null},enumerable:!0,configurable:!0}),e.prototype.getId=function(){return e._ID},e.prototype.getSerializableState=function(){var e=this,t={};return Object.keys(this._models).forEach(function(n){t[n]=e._getBoundModelData(e._models[n].model)}),t},e.prototype.setData=function(e){var t=this;Object.keys(e).forEach(function(n){t._addMirrorModel(e[n])})},e.prototype._getBoundModelData=function(e){return{url:e.getAssociatedResource(),versionId:e.getVersionId(),properties:e.getProperties(),value:e.toRawText(),modeId:e.getMode().getId()}},e.prototype._onModelEvents=function(e,t){var n,r,i=[],o=!1;for(n=0,r=t.length;r>n;n++){var s=t[n],a=s.getData();switch(s.getType()){case u.EventType.ModelContentChanged:switch(a.changeType){case u.EventType.ModelContentChangedFlush:i.push(this._mixinProperties({type:s.getType()},a,["changeType","detail","versionId"]));break;case u.EventType.ModelContentChangedLinesDeleted:i.push(this._mixinProperties({type:s.getType()},a,["changeType","fromLineNumber","toLineNumber","versionId"]));break;case u.EventType.ModelContentChangedLinesInserted:i.push(this._mixinProperties({type:s.getType()},a,["changeType","fromLineNumber","toLineNumber","detail","versionId"]));break;case u.EventType.ModelContentChangedLineChanged:i.push(this._mixinProperties({type:s.getType()},a,["changeType","lineNumber","detail","versionId"]))}o=!0;break;case u.EventType.ModelPropertiesChanged:i.push(this._mixinProperties({type:s.getType()},a,["properties"]))}}i.length>0&&this._modelEvents(this._models[e].model.getAssociatedResource(),i)},e.prototype._mixinProperties=function(e,t,n){for(var r=0;r<n.length;r++)e[n[r]]=t[n[r]];return e},e.prototype._addMirrorModel=function(e){var t=this;return this._modeInstantiator(e.modeId).then(function(r){t._resourceService.insert(e.url,new n.MirrorModel(t._resourceService,e.versionId,e.value,r,e.url,e.properties))})},e.prototype._modelInitialize=function(e){return this._addMirrorModel(e)},e.prototype._modelEvents=function(e,t){var n=this._resourceService.get(e);if(!n)throw new Error("Received model events for missing model "+e.toString());n.onEvents(t)},e.prototype._modelDispose=function(e){var t=this._resourceService.get(e);this._resourceService.remove(e),t&&t.dispose()},e._ID="boundModels",e.$_modelInitialize=a.AllWorkers(e,e.prototype._modelInitialize),e.$_modelEvents=a.AllWorkers(e,e.prototype._modelEvents),e.$_modelDispose=a.AllWorkers(e,e.prototype._modelDispose),e}();t.BoundModels=d}),define("vs/editor/worker/workerHelper",["require","exports","vs/platform/services","vs/base/lib/winjs.base","vs/platform/thread/attribute","vs/editor/modes/modesExtensions"],function(e,t,n,r,i,o){var s=function(){function e(e){this.resourceService=e.resourceService}return e.prototype.getId=function(){return"vs.editor.worker.workerHelper.ServiceExtractor"},e}(),a=function(){function t(){this._lastProxyId=0,this._modulesMap={},this._supports={}}return t.register=function(e){t.INSTANCE_REGISTERED||(t.INSTANCE_REGISTERED=!0,e.registerInstance(t.INSTANCE),t.INSTANCE.setServices(e.createInstance(s)))},t.prototype.getId=function(){return"vs.editor.worker.workerHelper"},t.prototype.setServices=function(e){this._resourceService=e.resourceService},t.prototype.loadInBackgroundWorker=function(e){var t=this,n=String(++this._lastProxyId);return this._loadInBackgroundWorker(n,e).then(function(e){for(var r={},i=0;i<e.length;i++)r[e[i]]=t._createProxyMethod(n,e[i]);return r})},t.prototype._createProxyMethod=function(e,t){var n=this;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i-0]=arguments[i];return n._executeMethod(e,t,r)}},t.prototype._loadInBackgroundWorker=function(t,n){var i,o,s=this,a=new r.TPromise(function(e,t){i=e,o=t});if(!/^file\:\/\//.test(n)){var u=n.match(/.*(\/plugins\/.*)\.js$/i);u&&(n="vs"+u[1])}return e([n],function(e){var n=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&"function"==typeof e[r]&&n.push(r);s._modulesMap[t]=e,i(n)},o),a},t.prototype._executeMethod=function(e,t,n){var i=this._modulesMap[e];try{return r.TPromise.as(i[t].apply(i,n))}catch(o){return r.TPromise.wrapError(o)}},t.INSTANCE=new t,t.INSTANCE_REGISTERED=!1,t.$_loadInBackgroundWorker=i.OneWorker(t,t.prototype._loadInBackgroundWorker,n.ThreadAffinity.Group3),t.$_executeMethod=i.OneWorker(t,t.prototype._executeMethod,n.ThreadAffinity.Group3),t}();t.WorkerHelper=a,o.registerThreadServiceListener(a.register)}),define("vs/editor/modes/monarch/monarchCommon",["require","exports"],function(e,t){function n(){return"0.96  (2013.01.22)"}function r(e){return e?!1:!0}function i(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function o(e){return e.replace(p,function(e){var t=h[e];return t?t:""})}function s(e){return e.replace(/[&<>'"]/g,"_")}function a(e,t){console.log(t)}function u(e,t){throw new Error(t)}function l(e,t,n,o,s){var a=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,u=null;return t.replace(a,function(t,a,l,c,d,h,p){return r(l)?r(c)?!r(d)&&d<o.length?i(e,o[d]):!r(p)&&e&&"string"==typeof e[p]?e[p]:(null===u&&(u=s.split("."),u.unshift(s)),!r(h)&&h<u.length?i(e,u[h]):""):i(e,n):"$"})}function c(e,t){for(;t&&t.length>0;){var n=e.tokenizer[t];if(n)return n;var r=t.lastIndexOf(".");t=0>r?null:t.substr(0,r)}return null}function d(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 h={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&apos;",'"':"&quot;"},p=new RegExp("["+Object.keys(h).join("")+"]","g");t.htmlEscape=o,t.sanitize=s,t.log=a,t.throwError=u,t.substituteMatches=l,t.findRules=c,t.stateExists=d}),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<t.length)return t[r];if(r>=100){r-=100;var i=n.split(".");if(i.unshift(n),r<i.length)return i[r]}return null}function h(e,t,r,s){var a=-1,u=r,l=r.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);l&&(l[3]&&(a=parseInt(l[3]),l[2]&&(a+=100)),u=l[4]);var h="~",p=u;u&&0!==u.length?/^\w*$/.test(p)?h="==":(l=u.match(/^(@|!@|~|!~|==|!=)(.*)$/),l&&(h=l[1],p=l[2])):(h="!=",p="");var f;if("~"!==h&&"!~"!==h||!/^(\w|\|)*$/.test(p))if("@"===h||"!@"===h){var g=e[p];g||i.throwError(e,"the @ match target '"+p+"' is not defined, in rule: "+t),o(function(e){return"string"==typeof e},g)||i.throwError(e,"the @ match target '"+p+"' must be an array of strings, in rule: "+t);var m=n.createKeywordMatcher(g,e.ignoreCase);f=function(e){return"@"===h?m(e):!m(e)}}else if("~"===h||"!~"===h)if(p.indexOf("$")<0){var v=c(e,"^"+p+"$");f=function(e){return"~"===h?v.test(e):!v.test(e)}}else f=function(t,n,r,o){var s=c(e,"^"+i.substituteMatches(e,p,n,r,o)+"$");return s.test(t)};else if(p.indexOf("$")<0){var y=i.fixCase(e,p);f=function(e){return"=="===h?e===y:e!==y}}else{var y=i.fixCase(e,p);f=function(t,n,r,o){var s=i.substituteMatches(e,y,n,r,o);return"=="===h?t===s:t!==s}}else{var m=n.createKeywordMatcher(p.split("|"),e.ignoreCase);f=function(e){return"~"===h?m(e):!m(e)}}return-1===a?{name:r,value:s,test:function(e,t,n,r){return f(e,e,t,n,r)}}:{name:r,value:s,test:function(e,t,n,r){var i=d(e,t,n,a);return f(i?i:"",e,t,n,r)}}}function p(e,t,n){if(n){if("string"==typeof n)return n;if(n.token||""===n.token){if("string"!=typeof n.token)return i.throwError(e,"a 'token' attribute must be of type string, in rule: "+t),{token:""};var o={token:n.token};if(n.token.indexOf("$")>=0&&(o.tokenSubst=!0),"string"==typeof n.bracket&&("@open"===n.bracket?o.bracket=r.Bracket.Open:"@close"===n.bracket?o.bracket=r.Bracket.Close: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 s=n.next;/^(@pop|@push|@popall)$/.test(s)||("@"===s[0]&&(s=s.substr(1)),s.indexOf("$")<0&&(i.stateExists(e,i.substituteMatches(e,s,"",[],""))||i.throwError(e,"the next state '"+n.next+"' is not defined in rule: "+t))),o.next=s}return"number"==typeof n.goBack&&(o.goBack=n.goBack),"string"==typeof n.switchTo&&(o.switchTo=n.switchTo),"string"==typeof n.log&&(o.log=n.log),"string"==typeof n.nextEmbedded&&(o.nextEmbedded=n.nextEmbedded,e.usesEmbedded=!0),o}if(Array.isArray(n)){var a,u=[];for(a in n)n.hasOwnProperty(a)&&(u[a]=p(e,t,n[a]));return{group:u}}if(n.cases){var l,c=[];for(l in n.cases)if(n.cases.hasOwnProperty(l)){var d=p(e,t,n.cases[l]);"@default"===l||"@"===l||""===l?c.push({test:null,value:d,name:l}):"@eos"===l?c.push({test:function(e,t,n,r){return r},value:d,name:l}):c.push(h(e,t,l,d))}var f=e.defaultToken;return{test:function(e,t,n,r){var i;for(i in c)if(c.hasOwnProperty(i)){var o=!c[i].test||c[i].test(e,t,n,r);if(o)return c[i].value}return f}}}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(r,o,u){var l;for(l in u)if(u.hasOwnProperty(l)){var c=u[l],d=c.include;if(d)"string"!=typeof d&&i.throwError(n,"an 'include' attribute must be a string at: "+r),"@"===d[0]&&(d=d.substr(1)),e.tokenizer[d]||i.throwError(n,"include target '"+d+"' is not defined at: "+r),t(r+"."+d,o,e.tokenizer[d]);else{var h=new g(r);if(Array.isArray(c)&&c.length>=1&&c.length<=3)if(h.setRegex(p,c[0]),c.length>=3)if("string"==typeof c[1])h.setAction(p,{token:c[1],next:c[2]});else if("object"==typeof c[1]){var f=c[1];f.next=c[2],h.setAction(p,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: "+r);else h.setAction(p,c[1]);else c.regex||i.throwError(n,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+r),c.name&&(h.name=a(c.name)),c.matchOnlyAtStart&&(h.matchOnlyAtLineStart=s(c.matchOnlyAtLineStart)),h.setRegex(p,c.regex),h.setAction(p,c.action);o.push(h)}}}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={};if(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])),n.suggestSupport={textualCompletions:!0,triggerCharacters:[],snippets:[]},"undefined"!=typeof e.suggestSupport){var r=e.suggestSupport;if(Array.isArray(r.snippets))for(var o=r.snippets,d=0,h=o.length;h>d;d++)"string"==typeof o[d]?n.suggestSupport.snippets.push({type:"snippet",label:o[d],codeSnippet:o[d]}):n.suggestSupport.snippets.push(o[d]);Array.isArray(r.triggerCharacters)&&(n.suggestSupport.triggerCharacters=r.triggerCharacters),"undefined"!=typeof r.textualCompletions&&(n.suggestSupport.textualCompletions=r.textualCompletions)}var p=e;p.name=n.name,p.displayName=n.displayName,p.ignoreCase=n.ignoreCase,p.noThrow=n.noThrow,p.usesEmbedded=n.usesEmbedded,p.stateNames=e.tokenizer,p.logConsole=n.logConsole,p.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 f;for(f in e.tokenizer)if(e.tokenizer.hasOwnProperty(f)){n.start||(n.start=f);var m=e.tokenizer[f];n.tokenizer[f]=new Array,t("tokenizer."+f,n.tokenizer[f],m)}n.usesEmbedded=p.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 v;for(v in n.nonWordTokens)n.nonWordTokens.hasOwnProperty(v)&&(n.nonWordTokens[v]+=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 y=[];for(var _ in e.brackets)if(e.brackets.hasOwnProperty(_)){var b=e.brackets[_];b&&Array.isArray(b)&&3===b.length&&(b={token:b[2],open:b[0],close:b[1]}),b.open===b.close&&i.throwError(n,"open and close brackets in a 'brackets' attribute must be different: "+b.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required."),"string"==typeof b.open&&"string"==typeof b.token?y.push({token:a(b.token)+n.tokenPostfix,open:i.fixCase(n,a(b.open)),close:i.fixCase(n,a(b.close))}):i.throwError(n,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}n.brackets=y;var C;if(e.autoClosingPairs?(Array.isArray(e.autoClosingPairs)||i.throwError(n,"the 'autoClosingPairs' attribute must be an array of string pairs (as arrays)"),C=e.autoClosingPairs.slice(0)):C=[['"','"'],["'","'"],["@brackets"]],n.autoClosingPairs=[],C)for(var w in C)if(C.hasOwnProperty(w)){var E,S=C[w];if("@brackets"===S||"@brackets"===S[0]){var T;for(T in y)y.hasOwnProperty(T)&&y[T].open&&1===y[T].open.length&&y[T].close&&1===y[T].close.length&&(E={open:y[T].open,close:y[T].close},n.autoClosingPairs.push(E))}else Array.isArray(S)&&2===S.length&&"string"==typeof S[0]&&1===S[0].length&&"string"==typeof S[1]&&1===S[1].length?(E={open:i.fixCase(n,S[0]),close:i.fixCase(n,S[1])},n.autoClosingPairs.push(E)):"string"==typeof S.open&&1===S.open.length&&"string"==typeof S.close&&1===S.close.length?(E={open:i.fixCase(n,S.open[0]),close:i.fixCase(n,S.close[0])},n.autoClosingPairs.push(E)):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 x=[];Array.isArray(e.autoIndent)||i.throwError(n,"an 'autoIndent' attribute must be an array of '{match,matchAfter}' objects");for(var L in e.autoIndent)e.autoIndent.hasOwnProperty(L)&&("string"!=typeof e.autoIndent[L].match&&i.throwError(n,"each object in the 'autoIndent' array must define a 'match' attribute"),x.push({match:c(n,e.autoIndent[L].match),matchAfter:c(n,a(e.autoIndent[L].matchAfter))}));n.autoIndent=x}if(e.autoComplete){var M=[];Array.isArray(e.autoComplete)||i.throwError(n,"an 'autoComplete' attribute must be an array of '{trigger,match,complete}' objects");for(var k in e.autoComplete)e.autoComplete.hasOwnProperty(k)&&("string"!=typeof e.autoComplete[k].triggers&&i.throwError(n,"each object in the 'autoComplete' array must define a 'triggers' attribute"),"string"!=typeof e.autoComplete[k].match&&i.throwError(n,"each object in the 'autoComplete' array must define a 'match' attribute as a regular expression string"),"string"!=typeof e.autoComplete[k].complete&&i.throwError(n,"each object in the 'autoComplete' array must define a 'complete' attribute"),M.push({triggers:i.fixCase(n,a(e.autoComplete[k].triggers)),match:c(n,e.autoComplete[k].match),complete:a(e.autoComplete[k].complete)}));n.autoComplete=M}if(e.noindentBrackets){var N=u(e.noindentBrackets,null,function(){i.throwError(n,"the 'noindentBrackets' must be a regular expression string")});n.noindentBrackets=c(n,N)}var I=[];for(var O in n.brackets)if(n.brackets.hasOwnProperty(O)){var A=n.brackets[O].close;A&&A.length>0&&(n.noindentBrackets&&n.noindentBrackets.test(A)||I.push(A.substr(A.length-1)))}for(var P in n.autoComplete)n.autoComplete.hasOwnProperty(P)&&I.push(n.autoComplete[P].triggers);return n.electricChars=I.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/supports","vs/editor/modes/monarch/monarchCommon","vs/editor/modes/monarch/monarchCompile","vs/base/lib/winjs.base","vs/editor/modes/nullMode","vs/platform/thread/attribute"],function(e,t,n,r,i,o,s,a,u,l,c,d,h){function p(e){return!e||""===e||/\bcomment\b/.test(e)||/\bwhite\b/.test(e)}function f(e,t){if(!t)return null;t=u.fixCase(e,t);for(var n=e.brackets,r=0;r<n.length;r++){var i=n[r];if(i.open===t)return{token:i.token,bracketType:o.Bracket.Open};if(i.close===t)return{token:i.token,bracketType:o.Bracket.Close}}return null}function g(e,t){for(var n=e.getLineContent(),r=[],i=[],o=0;o<e.getTokenCount();o++)if(!p(e.getTokenType(o))){var s="";s=o<e.getTokenCount()-1?n.substr(e.getTokenStartIndex(o),e.getTokenStartIndex(o+1)-e.getTokenStartIndex(o)):n.substr(e.getTokenStartIndex(o)),e.getTokenStartIndex(o)<t?r.push(s):i.push(s)}return{pre:" "+r.join(" ")+" ",post:" "+i.join(" ")+" "}}function m(e,t){return t+1<e.getTokenCount()?e.getLineContent().substr(e.getTokenStartIndex(t),e.getTokenStartIndex(t+1)-e.getTokenStartIndex(t)):e.getLineContent().substr(e.getTokenStartIndex(t))}function v(e,t,n){var r;if(e.autoIndent){var i=g(t,n);for(r=0;r<e.autoIndent.length;r++)if(!e.autoIndent[r].match||e.autoIndent[r].match.test(i.pre))return!e.autoIndent[r].matchAfter||e.autoIndent[r].matchAfter.test(i.post)?{indentAction:o.IndentAction.IndentOutdent}:{indentAction:o.IndentAction.Indent}}var s=[];for(r=0;r<t.getTokenCount()&&t.getTokenStartIndex(r)<n;r++)t.getTokenBracket(r)===o.Bracket.Open?s.push(r):t.getTokenBracket(r)===o.Bracket.Close&&s.length>0&&s.pop();if(0===s.length)return null;var a=s.pop();if(e.noindentBrackets){var u=m(t,a);if(e.noindentBrackets.test(u))return null}return r<t.getTokenCount()&&t.getTokenBracket(r)===o.Bracket.Close&&t.getTokenType(r)===t.getTokenType(a)?{indentAction:o.IndentAction.IndentOutdent}:{indentAction:o.IndentAction.Indent}}function y(e,t,n){var r=t.getLineContent(),i=null,s=null;if(e.autoComplete&&e.autoComplete.length>0){var a=u.fixCase(e,r.substr(n,1)),l=g(t,n+1).pre;for(p=0;p<e.autoComplete.length;p++)if(e.autoComplete[p].triggers.indexOf(a)>=0){var c=l.match(e.autoComplete[p].match);if(c){i=c[0].replace(e.autoComplete[p].match,e.autoComplete[p].complete);break}}}for(var d=0,h=0,p=0;p<t.getTokenCount()&&!(t.getTokenStartIndex(p)>n);p++)d=t.getTokenStartIndex(p),h=p;if(!(t.getTokenBracket(h)!==o.Bracket.Close||e.noindentBrackets&&e.noindentBrackets.test(m(t,h)))){var f=!0;for(p=0;d>p;p++)if(" "!==r[p]&&"	"!==r[p]){f=!1;break}f&&(s=t.getTokenType(h))}return i||s?{matchBracketType:s,appendText:i}:null}function _(e,t){L.registerMonarchDefinition(e,t)}function b(e,t){var r=n.Registry?n.Registry.as(s.Extensions.EditorModes):null;return new a.TokenizationSupport(e,{getInitialState:function(){return new x(e,t)},enterNestedMode:function(e){return e instanceof x?e.embeddedEntered:!1},getNestedMode:function(e){var t=null;if(e instanceof x){var n=e.embeddedMode;if(r.isRegisteredMode(n)){var i=T(r,n);if(i)return{mode:i,missingModePromise:t};t=r.getOrCreateMode(n)}}return{mode:T(r,"text/plain"),missingModePromise:t}},getLeavingNestedModeData:function(e,t){for(var n=t,r=new i.LineStream(e);!r.eos()&&n.embeddedMode;)n.tokenize(r,!0);if(n.embeddedMode)return null;var o=r.pos();return{nestedModeBuffer:e.substring(0,o),bufferAfterNestedMode:e.substring(o),stateAfterNestedMode:n}}},t.usesEmbedded)}function C(e){return{getCommentsConfiguration:function(){return{lineCommentTokens:[e.lineComment],blockCommentStartToken:e.blockCommentStart,blockCommentEndToken:e.blockCommentEnd}}}}function w(e,t){return new a.ElectricCharacterSupport(e,{getElectricCharacters:function(){return t.electricChars.split("")},onEnter:function(e,n){return v(t,e,n)},onElectricCharacter:function(e,n){return y(t,e,n)}})}function E(e){return{getNonWordTokenTypes:function(){return e.nonWordTokens},getWordDefinition:function(){return e.wordDefinition||d.NullMode.DEFAULT_WORD_REGEXP}}}function S(e,t){return new a.CharacterPairSupport(e,t.autoClosingPairs)}function T(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}}var x=function(e){function t(n,r,i,o){e.call(this,n),this.id=t.ID++,this.lexer=r,this.stack=i?i:[r.start],this.embeddedMode=o?o:null,this.embeddedEntered=!1,this.groupActions=null,this.groupMatches=null,this.groupMatched=null,this.groupRule=null}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode(),this.lexer,this.stack.slice(0),this.embeddedMode)},t.prototype.equals=function(n){if(!e.prototype.equals.call(this,n))return!1;if(!(n instanceof t))return!1;var r=n;if(this.stack.length!==r.stack.length||this.lexer.name!==r.lexer.name||this.embeddedMode!==r.embeddedMode)return!1;var i;for(i in this.stack)if(this.stack.hasOwnProperty(i)&&this.stack[i]!==r.stack[i])return!1;return!0},t.prototype.tokenize=function(e,t){var n=this.stack.length,r=0,i=this.stack[0];this.embeddedEntered=!1;var a=null,l=null,c=null,d=null,h=null;if(this.groupActions)r=this.groupActions.length,a=this.groupMatches,l=this.groupMatched.shift(),c=this.groupActions.shift(),h=this.groupRule,0===this.groupActions.length&&(this.groupActions=null,this.groupMatches=null,this.groupMatched=null,this.groupRule=null);else{if(e.eos())return{type:""};var p=e.advanceToEOS();e.goBack(p.length);var g=this.lexer.tokenizer[i];if(g||(g=u.findRules(this.lexer,i)),g){h=null;var m,v=e.pos();for(m in g)if(g.hasOwnProperty(m)&&(h=g[m],(0===v||!h.matchOnlyAtLineStart)&&(a=p.match(h.regex)))){l=a[0],c=h.action;break}}else u.throwError(this.lexer,"tokenizer state is not defined: "+i)}for(a||(a=[""],l=""),c||(e.eos()||(a=[e.peek()],l=a[0]),c=this.lexer.defaultToken),e.advance(l.length);c.test;){var y=c.test(l,a,i,e.eos());c=y}var _=null;if("string"==typeof c||Array.isArray(c))_=c;else if(c.group)_=c.group;else if(null!==c.token&&void 0!==c.token){if(_=c.token,c.tokenSubst&&(_=u.substituteMatches(this.lexer,_,l,a,i)),c.nextEmbedded)if("@pop"===c.nextEmbedded)this.embeddedMode||u.throwError(this.lexer,"cannot pop embedded mode if not inside one"),this.embeddedMode=null;else if(this.embeddedMode)u.throwError(this.lexer,"cannot enter embedded mode from within an embedded mode");else{this.embeddedMode=u.substituteMatches(this.lexer,c.nextEmbedded,l,a,i);var b=s.languageAliasToMime(this.embeddedMode);this.embeddedMode&&b&&(this.embeddedMode=b),this.embeddedEntered=!0}if(c.goBack&&e.goBack(c.goBack),c.switchTo&&"string"==typeof c.switchTo){var C=u.substituteMatches(this.lexer,c.switchTo,l,a,i);"@"===C[0]&&(C=C.substr(1)),u.findRules(this.lexer,C)?this.stack[0]=C:u.throwError(this.lexer,"trying to switch to a state '"+C+"' that is undefined in rule: "+h.name),d=null}else if(c.transform&&"function"==typeof c.transform)this.stack=c.transform(this.stack),d=null;else if(c.next)if("@push"===c.next)this.stack.length>=this.lexer.maxStack?u.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"===c.next)this.stack.length<=1?u.throwError(this.lexer,"trying to pop an empty stack in rule: "+h.name):this.stack.shift();else if("@popall"===c.next)this.stack.length>1&&(this.stack=[this.stack[this.stack.length-1]]);else{var C=u.substituteMatches(this.lexer,c.next,l,a,i);"@"===C[0]&&(C=C.substr(1)),u.findRules(this.lexer,C)?this.stack.unshift(C):u.throwError(this.lexer,"trying to set a next state '"+C+"' that is undefined in rule: "+h.name)}c.log&&"string"==typeof c.log&&u.log(this.lexer,this.lexer.displayName+": "+u.substituteMatches(this.lexer,c.log,l,a,i))}if(null===_&&(u.throwError(this.lexer,"lexer rule has no well-defined action in rule: "+h.name),_=this.lexer.defaultToken),Array.isArray(_)){this.groupActions&&this.groupActions.length>0&&u.throwError(this.lexer,"groups cannot be nested: "+h.name),a.length!==_.length+1&&u.throwError(this.lexer,"matched number of groups does not match the number of actions in rule: "+h.name);for(var w=0,E=1;E<a.length;E++)w+=a[E].length;return w!==l.length&&u.throwError(this.lexer,"with groups, all characters should be matched in consecutive groups in rule: "+h.name),this.groupMatches=a,this.groupMatched=a.slice(1),this.groupActions=_.slice(0),this.groupRule=h,e.goBack(l.length),this.tokenize(e)}if("@rematch"===_&&(e.goBack(l.length),l="",a=null,_=""),0===l.length)if(n!==this.stack.length||i!==this.stack[0]||(this.groupActions?this.groupActions.length:0)!==r){if(!t)return this.tokenize(e)}else u.throwError(this.lexer,"no progress in tokenizer in rule: "+h.name),e.advanceToEOS();if(0===_.indexOf("@brackets")){var S=_.substr("@brackets".length),T=f(this.lexer,l);return T||(u.throwError(this.lexer,"@brackets token returned but no bracket defined as: "+l),T={token:"",bracketType:o.Bracket.None}),{type:u.sanitize(T.token+S),bracket:T.bracketType}
}var x=""===_?"":_+this.lexer.tokenPostfix;return{type:u.sanitize(x),bracket:c.bracket}},t.ID=0,t}(s.AbstractState);t.MonarchLexer=x,t.registerMonarchDefinition=_;var L=function(){function e(){}return e.register=function(t){e.INSTANCE_REGISTERED||(e.INSTANCE_REGISTERED=!0,t.registerInstance(e.INSTANCE))},e.registerMonarchDefinition=function(t,n){e.INSTANCE._registerMonarchDefinition(t,n)},e.prototype.getId=function(){return"vs.editor.modes.monarchDefinitionForwarder"},e.prototype._registerMonarchDefinition=function(e,t){var n=l.compile(t);s.registerTokenizationSupport(e,function(e){return b(e,n)}),s.registerCommentsSupport(e,C(n)),s.registerElectricCharacterSupport(e,function(e){return w(e,n)}),s.registerTokenTypeClassificationSupport(e,E(n)),s.registerCharacterPairSupport(e,function(e){return S(e,n)})},e.INSTANCE=new e,e.INSTANCE_REGISTERED=!1,e.$_registerMonarchDefinition=h.Everywhere(e,e.prototype._registerMonarchDefinition),e}();s.registerThreadServiceListener(L.register),t.createTokenizationSupport=b;var M=function(e){function t(n,i,o){!o.name&&o.lexer&&(o=o.lexer),i||(i={id:o.name,workerParticipants:[]}),e.call(this,n,i,o.workerDescriptor?r.AsyncDescriptor.create(o.workerDescriptor.moduleName,o.workerDescriptor.ctorName):t.WorkerDescriptor),this.lexer=o,this.tokenizationSupport=b(this,o),this.electricCharacterSupport=w(this,o),this.commentsSupport=C(o),this.tokenTypeClassificationSupport=E(o),this.characterPairSupport=S(this,o)}return __extends(t,e),t.prototype.getTriggerCharacters=function(){return this.lexer.suggestSupport.triggerCharacters},t.prototype.suggest=function(t,n){var r=this;return this._threadService.isInMainThread?this.lexer.suggestSupport.textualCompletions?e.prototype.suggest.call(this,t,n).then(function(e){return r._addSnippets(t,n,e)}):c.TPromise.as(this._addSnippets(t,n,null)):e.prototype.suggest.call(this,t,n)},t.prototype._addSnippets=function(e,t,n){var r=this.lexer.suggestSupport.snippets;if(!r||0===r.length)return n;n||(n=[]);var i=this._modelService.getModel(e);return n.push({currentWord:i.getWordUntilPosition(t,!0,!0).word,suggestions:r.slice(0)}),n},t.prototype.shouldAutotriggerSuggest=function(e,t,n){return this.lexer.suggestSupport.triggerCharacters.indexOf(n)>=0},t.WorkerDescriptor=r.AsyncDescriptor.create(u.monarchPath+"Worker","MonarchNullWorker"),t}(s.AbstractMode);t.MonarchMode=M;var k=function(e){function t(t,n,r){e.call(this,t,r,l.compile(n))}return __extends(t,e),t}(M);t.DynamicMonarchMode=k}),define("vs/editor/api/common",["require","exports","vs/base/lib/winjs.base","vs/base/network","vs/editor/modes/monarch/monarch","vs/editor/modes/modesExtensions","vs/editor/modes/modes","vs/editor/modes/supports","vs/editor/worker/workerHelper"],function(e,t,n,r,i,o,s,a,u){function l(){return new c}var c=function(){function e(){this.Promise=this._createPromise(),this.Models=this._createModels(),this.Modes=this._createModes(),this.Testing=this._createTesting()}return e.prototype._createPromise=function(){return n.TPromise},e.prototype._createModels=function(){return new d},e.prototype._createModes=function(){return new h},e.prototype._createTesting=function(){return new f},e}();t.MonacoAPI=c;var d=function(){function e(){this.URL=this._createURL()}return e.prototype._createURL=function(){return r.URL},e}();t.MonacoModelsAPI=d;var h=function(){function e(){this.InplaceReplaceSupport=this._createInplaceReplaceSupport(),this.Bracket=s.Bracket}return e.prototype._createInplaceReplaceSupport=function(){return new p},e.prototype.registerMonarchDefinition=function(e,t){i.registerMonarchDefinition(e,t)},e.prototype.registerTextMateDefinition=function(){throw new Error("Not supported")},e.prototype.loadInBackgroundWorker=function(e){return u.WorkerHelper.INSTANCE.loadInBackgroundWorker(e)},e}();t.MonacoModesAPI=h;var p=function(){function e(){}return e.prototype.register=function(e,t){o.registerInplaceReplaceSupport(e,t)},e.prototype.create=function(){throw new Error("TODO - I need the resource service here...")},e.prototype.valueSetReplace=function(e,t,n){return a.ReplaceSupport.valueSetReplace(e,t,n)},e.prototype.valueSetsReplace=function(e,t,n){return a.ReplaceSupport.valueSetsReplace(e,t,n)},e}();t.MonacoModesInplaceReplaceSupportAPI=p;var f=function(){function e(){}return e.prototype.createTokenize=function(){throw new Error("Not supported")},e.prototype.assertTokens=function(){throw new Error("Not supported")},e.prototype.module=function(){throw new Error("Not supported")},e.prototype.test=function(){throw new Error("Not supported")},e}();t.MonacoTestingAPI=f,t.createAPI=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/editor/api/plugins",["require","exports","vs/base/remote/remote","./common","vs/editor/modes/monarch/monarch","vs/editor/modes/modesExtensions"],function(e,t,n,r,i,o){function s(e){var r=n.createProxy(e,{$isProxyDescriptor:!0,proxyId:t.PROXY_ID,desc:n.createDescriptor(d.prototype)}),i=new u(e,r);return e.registerHandler(t.PROXY_ID,i),i}function a(e,r){var i=n.createProxy(e,{$isProxyDescriptor:!0,proxyId:t.PROXY_ID,desc:n.createDescriptor(u.prototype)}),o=new d(e,i,r);return e.registerHandler(t.PROXY_ID,o),o}var u=function(e){function t(t,n){this._remote=t,this._proxy=n,e.call(this)}return __extends(t,e),t.prototype._createModes=function(){return new l(this._remote,this._proxy)},t}(r.MonacoAPI);t.MonacoAPI=u;var l=function(e){function t(t,n){this._remote=t,this._proxy=n,e.call(this)}return __extends(t,e),t.prototype._createInplaceReplaceSupport=function(){return new c(this._remote,this._proxy)},t.prototype.registerMonarchDefinition=function(e,t){i.registerMonarchDefinition(e,t),this._proxy.$Modes_registerMonarchDefinition(e,t)},t.prototype.loadInBackgroundWorker=function(e){return this._proxy.$Modes_loadInBackgroundWorker(e)},t}(r.MonacoModesAPI);t.MonacoModesAPI=l;var c=function(e){function t(t,n){this._remote=t,this._proxy=n,e.call(this)}return __extends(t,e),t.prototype.register=function(e,t){var n={navigateValueSet:function(e,n,r){return t.navigateValueSet(e,n,r)}},r=this._remote.createProxy(n);this._proxy.$Modes_InplaceReplaceSupport_register(e,r)},t}(r.MonacoModesInplaceReplaceSupportAPI);t.MonacoModesInplaceReplaceSupportAPI=c;var d=function(){function e(e,t,n){this._remote=e,this._proxy=t,this._helper=n}return e.prototype.$Modes_registerMonarchDefinition=function(e,t){i.registerMonarchDefinition(e,t)},e.prototype.$Modes_loadInBackgroundWorker=function(e){var t=this;return this._helper.loadInBackgroundWorker(e).then(function(e){return t._remote.createProxy(e)})},e.prototype.$Modes_InplaceReplaceSupport_register=function(e,t){o.registerInplaceReplaceSupport(e,t)},e}();t.MonacoAPIHost=d,t.PROXY_ID="vs/editor/api/plugins",t.createAPI=s,t.createAPIHost=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/api/worker",["require","exports","vs/base/remote/remote","./plugins","vs/editor/modes/supports"],function(e,t,n,r,i){function o(e,t){var i=n.createProxy(e,{$isProxyDescriptor:!0,proxyId:r.PROXY_ID,desc:n.createDescriptor(r.MonacoAPIHost.prototype)}),o=new s(e,i,t);return e.registerHandler(r.PROXY_ID,o),o}var s=function(e){function t(t,n,r){this._resourceService=r,e.call(this,t,n)}return __extends(t,e),t.prototype._createModes=function(){return new a(this._remote,this._proxy,this._resourceService)},t}(r.MonacoAPI);t.MonacoAPI=s;var a=function(e){function t(t,n,r){this._resourceService=r,e.call(this,t,n)}return __extends(t,e),t.prototype._createInplaceReplaceSupport=function(){return new u(this._remote,this._proxy,this._resourceService)},t}(r.MonacoModesAPI);t.MonacoModesAPI=a;var u=function(e){function t(t,n,r){e.call(this,t,n),this._resourceService=r}return __extends(t,e),t.prototype.create=function(e){return new i.InplaceReplaceSupport(this._resourceService,e)},t}(r.MonacoModesInplaceReplaceSupportAPI);t.MonacoModesInplaceReplaceSupportAPI=u,t.createAPI=o}),define("vs/base/diff/diffChange",["require","exports"],function(e,t){t.DifferenceType={Add:0,Remove:1,Change:2};var n=function(){function e(e,t,n,r){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=r}return e.prototype.getChangeType=function(){return 0===this.originalLength?t.DifferenceType.Add:0===this.modifiedLength?t.DifferenceType.Remove:t.DifferenceType.Change},e.prototype.getOriginalEnd=function(){return this.originalStart+this.originalLength},e.prototype.getModifiedEnd=function(){return this.modifiedStart+this.modifiedLength},e}();t.DiffChange=n}),define("vs/base/diff/diff",["require","exports","vs/base/diff/diffChange"],function(e,t,n){var r=function(){function e(){}return e.Assert=function(e,t){if(!e)throw new Error(t)},e}();t.Debug=r;var i=function(){function e(){}return e.Copy=function(e,t,n,r,i){for(var o=0;i>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){void 0===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,E=new s,S=t,T=r,x=f[0]-v[0]-i,L=Number.MIN_VALUE,M=this.m_forwardHistory.length-1;do b=x+e,b===S||T>b&&c[b-1]<c[b+1]?(h=c[b+1],g=h-x-i,L>h&&E.MarkNextChange(),L=h,E.AddModifiedElement(h+1,g),x=b+1-e):(h=c[b-1]+1,g=h-x-i,L>h&&E.MarkNextChange(),L=h-1,E.AddOriginalElement(h,g+1),x=b-1-e),M>=0&&(c=this.m_forwardHistory[M],e=c[0],S=1,T=c.length-1);while(--M>=-1);if(C=E.getReverseChanges(),_[0]){var k=f[0]+1,N=v[0]+1;if(null!==C&&C.length>0){var I=C[C.length-1];k=Math.max(k,I.getOriginalEnd()),N=Math.max(N,I.getModifiedEnd())}w=[new n.DiffChange(k,p-k+1,N,m-N+1)]}else{E=new s,S=a,T=u,x=f[0]-v[0]-l,L=Number.MAX_VALUE,M=y?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do b=x+o,b===S||T>b&&d[b-1]>=d[b+1]?(h=d[b+1]-1,g=h-x-l,h>L&&E.MarkNextChange(),L=h+1,E.AddOriginalElement(h+1,g+1),x=b+1-o):(h=d[b-1],g=h-x-l,h>L&&E.MarkNextChange(),L=h,E.AddModifiedElement(h+1,g+1),x=b-1-o),M>=0&&(d=this.m_reverseHistory[M],o=d[0],S=1,T=d.length-1);while(--M>=-1);w=E.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,E=e-r,S=t-s,T=w-C,x=T%2===0;_[C]=e,b[w]=t,l[0]=!1;var L,M;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),L=p;f>=L;L+=2){for(c=L===p||f>L&&_[L-1]<_[L+1]?_[L+1]:_[L-1]+1,d=c-(L-C)-E,M=c;t>c&&s>d&&this.ElementsAreEqual(c+1,d+1);)c++,d++;if(_[L]=c,c+d>k+N&&(k=c,N=d),!x&&Math.abs(L-w)<=h-1&&c>=b[L])return a[0]=c,u[0]=d,M<=b[L]&&o>0&&o+1>=h?this.WALKTRACE(C,p,f,E,w,g,m,S,_,b,c,t,a,d,s,u,x,l):null}var I=(k-e+(N-r)-h)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(k,this.OriginalSequence,I))return l[0]=!0,a[0]=k,u[0]=N,I>0&&o>0&&o+1>=h?this.WALKTRACE(C,p,f,E,w,g,m,S,_,b,c,t,a,d,s,u,x,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),L=g;m>=L;L+=2){for(c=L===g||m>L&&b[L-1]>=b[L+1]?b[L+1]-1:b[L-1],d=c-(L-w)-S,M=c;c>e&&d>r&&this.ElementsAreEqual(c,d);)c--,d--;if(b[L]=c,x&&Math.abs(L-C)<=h&&c<=_[L])return a[0]=c,u[0]=d,M>=_[L]&&o>0&&o+1>=h?this.WALKTRACE(C,p,f,E,w,g,m,S,_,b,c,t,a,d,s,u,x,l):null}if(o>=h){var O=new Array(f-p+2);O[0]=C-p+1,i.Copy(_,p,O,1,f-p+1),this.m_forwardHistory.push(O),O=new Array(m-g+2),O[0]=w-g+1,i.Copy(b,g,O,1,m-g+1),this.m_reverseHistory.push(O)}}return this.WALKTRACE(C,p,f,E,w,g,m,S,_,b,c,t,a,d,s,u,x,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;r<o.offset;r++)a.push({offset:r,lineNumber:i.lineNumber,column:i.column+(r-i.offset)}),u.push({offset:r+1,lineNumber:i.lineNumber,column:i.column+(r-i.offset)+1});return new s(this.buffer,a,u)},t}(s),u=function(){function e(e,t,n){0===e.originalLength?(this.originalStartLineNumber=0,this.originalStartColumn=0,this.originalEndLineNumber=0,this.originalEndColumn=0):(this.originalStartLineNumber=t.getStartLineNumber(e.originalStart),this.originalStartColumn=t.getStartColumn(e.originalStart),this.originalEndLineNumber=t.getEndLineNumber(e.originalStart+e.originalLength-1),this.originalEndColumn=t.getEndColumn(e.originalStart+e.originalLength-1)),0===e.modifiedLength?(this.modifiedStartLineNumber=0,this.modifiedStartColumn=0,this.modifiedEndLineNumber=0,this.modifiedEndColumn=0):(this.modifiedStartLineNumber=n.getStartLineNumber(e.modifiedStart),this.modifiedStartColumn=n.getStartColumn(e.modifiedStart),this.modifiedEndLineNumber=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),this.modifiedEndColumn=n.getEndColumn(e.modifiedStart+e.modifiedLength-1))}return e}(),l=function(){function e(e,t,i,o,s){if(0===e.originalLength?(this.originalStartLineNumber=t.getStartLineNumber(e.originalStart)-1,this.originalEndLineNumber=0):(this.originalStartLineNumber=t.getStartLineNumber(e.originalStart),this.originalEndLineNumber=t.getEndLineNumber(e.originalStart+e.originalLength-1)),0===e.modifiedLength?(this.modifiedStartLineNumber=i.getStartLineNumber(e.modifiedStart)-1,this.modifiedEndLineNumber=0):(this.modifiedStartLineNumber=i.getStartLineNumber(e.modifiedStart),this.modifiedEndLineNumber=i.getEndLineNumber(e.modifiedStart+e.modifiedLength-1)),0!==e.originalLength&&0!==e.modifiedLength&&o()){var a=t.getCharSequence(e.originalStart,e.originalStart+e.originalLength-1),l=i.getCharSequence(e.modifiedStart,e.modifiedStart+e.modifiedLength-1),c=new n.LcsDiff(a,l,o),d=c.ComputeDiff();s&&(d=r(d)),this.charChanges=[];for(var h=0,p=d.length;p>h;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<this.maximumRunTimeMs},e}();t.DiffComputer=c}),define("vs/editor/contrib/links/linkComputer",["require","exports"],function(e,t){function n(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?l.computeLinks(e):[]}var r=[],i=1,o=9,s=10;r[1]={h:2,H:2},r[2]={t:3,T:3},r[3]={t:4,T:4},r[4]={p:5,P:5},r[5]={s:6,S:6,":":7},r[6]={":":7},r[7]={"/":8},r[8]={"/":9};var a=[];!function(){var e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-?=&#@:+%/",t=0;for(n=0;n<e.length;n++)t=Math.max(t,e.charCodeAt(n));t=Math.max("<".charCodeAt(0),"(".charCodeAt(0),"[".charCodeAt(0),"{".charCodeAt(0));for(var n=0;t>=n;n++)a[n]=String.fromCharCode(n);for(n=0;n<e.length;n++)a[e.charCodeAt(n)]=null;a["<".charCodeAt(0)]=">",a["(".charCodeAt(0)]=")",a["[".charCodeAt(0)]="]",a["{".charCodeAt(0)]="}"}();var u=" 	>)]}'\"",l=function(){function e(){}return e._createLink=function(e,t,n,r){return{range:{startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:r+1},url:e.substring(n,r)}},e.computeLinks=function(t){var n,l,c,d,h,p,f,g,m,v,y,_=[];for(n=1,l=t.getLineCount();l>=n;n++){for(c=t.getLineContent(n),d=0,h=c.length,f=u,p=null,g=0,m=i;h>d;)v=c.charAt(d),y=!1,m===s?f.indexOf(v)>=0&&(_.push(e._createLink(c,n,g,d)),y=!0):m===o?f.indexOf(v)>=0?y=!0:m=s:r[m].hasOwnProperty(v)?m=r[m][v]:y=!0," "!==v&&"	"!==v&&(p=v),y&&(m=i,g=d+1,f=u,p&&p.charCodeAt(0)<a.length&&(p=a[p.charCodeAt(0)]),p&&(f+=p)),d++;m===s&&_.push(e._createLink(c,n,g,h))}return _},e}();t.computeLinks=n}),define("vs/editor/worker/modesWorker",["require","exports","vs/base/lib/winjs.base","vs/editor/diff/diffComputer","vs/editor/modes/modesFilters","vs/editor/core/model/textModel","vs/platform/services","vs/editor/core/model/mirrorModel","vs/editor/contrib/links/linkComputer","vs/base/lifecycle","vs/base/time/schedulers","vs/editor/modes/supports"],function(e,t,n,r,i,o,s,a,u,l,c,d){function h(e){return"function"==typeof e.validate}function p(e){return"function"==typeof e.suggest||"function"==typeof e.filter}var f=function(){function e(e,t){var n=this;this._toDispose=[],this._changeCallback=t,this._model=e,this._isDirty=!1,this._toDispose.push({dispose:e.addBulkListener(function(e){return n._onModelChanged(e)})})}return e.prototype.dispose=function(){this._toDispose=l.disposeAll(this._toDispose),this._changeCallback=null},e.prototype.markAsClean=function(){this._isDirty=!1},e.prototype.markAsDirty=function(){this._isDirty=!0},e.prototype.isDirty=function(){return this._isDirty},e.prototype.getMirrorModel=function(){return this._model},e.prototype._onModelChanged=function(e){for(var t=!1,n=0;!t&&n<e.length;n++)"changed"===e[n].getType()&&(t=!0);t&&this._changeCallback(this)},e}(),g=function(){function e(e,t,n,r){var i=this;void 0===r&&(r=500),this._toDispose=[],this._resourceService=e,this._callback=t,this._filter=n,this._validationDelay=r,this._models={},this._isDueToConfigurationChange=!1,this._toDispose.push(this._resourceService.addListener2(s.ResourceEvents.ADDED,function(e){i._onResourceAdded(e)})),this._toDispose.push(this._resourceService.addListener2(s.ResourceEvents.REMOVED,function(e){i._onResourceRemoved(e)})),this._validate=new c.RunOnceScheduler(function(){return i._invokeCallback()},this._validationDelay),this._toDispose.push(this._validate),this._resourceService.all().forEach(function(e){return i._addElement(e)})}return e.prototype.dispose=function(){var e=this;this._toDispose=l.disposeAll(this._toDispose),l.disposeAll(Object.keys(this._models).map(function(t){return e._models[t]})),this._models=null},e.prototype.trigger=function(){this._validate.schedule()},e.prototype.triggerDueToConfigurationChange=function(){this._isDueToConfigurationChange=!0,this._validate.schedule()},e.prototype._addElement=function(e){var t=this;if(this._filter(e)){var n=e,r=new f(n,function(e){return t._onChanged(e)});this._models[n.getAssociatedResource().toExternal()]=r,this._onChanged(r)}},e.prototype._onResourceAdded=function(e){var t=e.url.toExternal();this._models.hasOwnProperty(t)&&this._models[t].dispose(),this._addElement(e.addedElement)},e.prototype._onResourceRemoved=function(e){var t=e.url.toExternal();this._models.hasOwnProperty(t)&&(this._models[t].dispose(),delete this._models[t])},e.prototype._onChanged=function(e){e.markAsDirty(),this._validate.schedule()},e.prototype._invokeCallback=function(){var e=this;if(this._isEnabled){var t=[],n=[];Object.keys(this._models).map(function(t){return e._models[t]}).forEach(function(e){e.isDirty()?(t.push(e.getMirrorModel().getAssociatedResource()),e.markAsClean()):n.push(e.getMirrorModel().getAssociatedResource())});var r=this._isDueToConfigurationChange;this._isDueToConfigurationChange=!1,this._callback(t,n,r)}},e.prototype.enable=function(){this._isEnabled=!0,this.trigger()},e}();t.ValidationHelper=g;var m=function(){function e(e,t,n){var r=this;this._validationParticipants=[],this._suggestParticipants=[],this._participants=[],this._mode=t,this._participants=n,this.publisher=e.publisherService,this.resourceService=e.resourceService,this.markerService=e.markerService,this._validationHelper=new g(this.resourceService,function(e,t,n){return r._newValidate(e,t,n)},function(e){return r._shouldIncludeModelInValidation(e)},500),this._validationParticipants=this._getWorkerParticipants(function(e){return h(e)}),this._suggestParticipants=this._getWorkerParticipants(function(e){return p(e)}),this.inplaceReplaceSupport=this._createInPlaceReplaceSupport()}return e.prototype._createInPlaceReplaceSupport=function(){return new d.InplaceReplaceSupport(this.resourceService)},e.prototype._getMode=function(){return this._mode},e.prototype._getWorkerParticipants=function(e){return this._participants.filter(e)},e.prototype._shouldIncludeModelInValidation=function(e){if(!(e instanceof a.MirrorModel||e instanceof a.MirrorModelEmbedded))return!1;var t=e;return t.getMode().getId()===this._mode.getId()},e.prototype.enableValidator=function(){return this._validationHelper.enable(),n.Promise.as(null)},e.prototype._newValidate=function(e,t,n){this.doValidateOnChange(e,t,n);for(var r=0;r<e.length;r++)this.triggerValidateParticipation(e[r],this._getContextForValidationParticipants(e[r]))},e.prototype._getContextForValidationParticipants=function(){return null},e.prototype.doValidateOnChange=function(e,t,n){if(n){for(var r=0;r<e.length;r++)this.doValidate(e[r]);for(var r=0;r<t.length;r++)this.doValidate(t[r])}else for(var r=0;r<e.length;r++)this.doValidate(e[r])},e.prototype.triggerValidateParticipation=function(e,t){var n=this;void 0===t&&(t=null);var r=this.resourceService.get(e);this._validationParticipants.forEach(function(e){try{e.validate(r,n.markerService,t)}catch(i){}})},e.prototype.doValidate=function(){return null},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)}),incomplete:e[i].incomplete});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,!0,!0).word,o={currentWord:i,suggestions:[]};return o.suggestions.push.apply(o.suggestions,this.suggestWords(e,t,!1)),o.suggestions.push.apply(o.suggestions,this.suggestSnippets(e,t)),n.Promise.as(o)},e.prototype.suggestWords=function(e,t,n){var r=this.resourceService.get(e),i=r.getWordUntilPosition(t,!0,!0).word,o=r.getAllUniqueWords(i);return n&&!i?[]:o.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,!0,!0),o=i?i.word:"",s=[],a=r.getAllWordsWithRange(),u=Math.min(1e3,a.length),l=0;u>l;l++)a[l].text===o&&s.push({range:a[l].range});return n.TPromise.as(s)},e.prototype.computeDiff=function(e,t,i){var o=this.resourceService.get(e),s=this.resourceService.get(t);if(null!==o&&null!==s){var a=o.getLinesContent(),u=s.getLinesContent(),l=new r.DiffComputer(a,u,!0,i);return n.TPromise.as(l.computeDiff())}return n.TPromise.as(null)},e.prototype.computeDirtyDiff=function(e,t){var i=this.resourceService.get(e),s=i.getProperty("original");if(s&&null!==i){var a=o.TextModel.toRawText(s),u=a.lines,l=i.getLinesContent(),c=new r.DiffComputer(u,l,!1,t);return n.TPromise.as(c.computeDiff())}return n.TPromise.as([])},e.prototype.computeLinks=function(e){var t=this.resourceService.get(e),r=u.computeLinks(t);return n.TPromise.as(r)},e.prototype.configure=function(e){var t=this;return this._doConfigure(e).then(function(e){return e&&t._validationHelper.triggerDueToConfigurationChange(),!0})},e.prototype._doConfigure=function(){return n.TPromise.as(!0)},e.filter=i.DefaultFilter,e}();t.AbstractWorkerMode=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/plaintext/plaintext",["require","exports","vs/editor/modes/supports","vs/editor/modes/modesExtensions"],function(e,t,n,r){var i=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.makeClone=function(){return this},t.prototype.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n):!1},t.prototype.tokenize=function(e){return e.advanceToEOS(),{type:""}},t}(r.AbstractState),o=function(e){function t(t,r){var o=this;e.call(this,t,r),this.tokenizationSupport=new n.TokenizationSupport(this,{getInitialState:function(){return new i(o)}},!1)}return __extends(t,e),t}(r.AbstractMode);t.Mode=o}),define("vs/editor/modes/autoIndentation/autoIndentation",["require","exports","vs/editor/modes/modes","vs/base/strings"],function(e,t,n,r){var i=function(){function e(e){this.brackets=e}return e.prototype.getElectricBrackets=function(){for(var e,t=[],n=0;n<this.brackets.length;n++)e=this.brackets[n],e.isElectric&&t.push(e.close);return t},e.prototype.onEnter=function(e,t){if(0===e.getTokenCount())return null;for(var r=e.findIndexOfOffset(t-1),i=r;i>0&&""===e.getTokenType(i);)i--;if(!this.tokenTypeIsBracket(e.getTokenType(i))||e.getTokenBracket(i)!==n.Bracket.Open)return null;for(var o=r+1;o<e.getTokenCount()&&""===e.getTokenType(o);)o++;return o<e.getTokenCount()&&e.getTokenType(o)===e.getTokenType(i)&&e.getTokenBracket(o)===n.Bracket.Close?{indentAction:n.IndentAction.IndentOutdent}:{indentAction:n.IndentAction.Indent}},e.prototype.onElectricCharacter=function(e,t){if(0===e.getTokenCount())return null;var n=e.getLineContent(),i=r.firstNonWhitespaceIndex(n);return-1!==i&&t>i?null:{matchBracketType:this.tokenTypeFromChar(n[t])}},e.prototype.tokenTypeFromChar=function(e){for(var t,n=0;n<this.brackets.length;n++)if(t=this.brackets[n],e===t.open||e===t.close)return t.tokenType;return null},e.prototype.bracketTypeFromChar=function(e){for(var t,r=0;r<this.brackets.length;r++){if(t=this.brackets[r],e===t.open)return n.Bracket.Open;if(e===t.close)return n.Bracket.Close}return null},e.prototype.tokenTypeIsBracket=function(e){for(var t=0;t<this.brackets.length;t++)if(e===this.brackets[t].tokenType)return!0;return!1},e.prototype.characterIsBracket=function(e){for(var t,n=0;n<this.brackets.length;n++)if(t=this.brackets[n],e===t.open||e===t.close)return!0;return!1},e}();t.Brackets=i}),define("vs/editor/modes/monarch/monarchTypes",["require","exports"],function(){}),define("vs/base/json",["require","exports"],function(e,t){function n(e,t){function n(t,n){for(var r=0,i=0;t>r||!n;){var o=e.charCodeAt(f);if(o>=c._0&&o<=c._9)i=16*i+o-c._0;else if(o>=c.A&&o<=c.F)i=16*i+o-c.A+10;else{if(!(o>=c.a&&o<=c.f))break;i=16*i+o-c.a+10}f++,r++}return t>r&&(i=-1),i}function a(){var t=f;if(e.charCodeAt(f)===c._0)f++;else for(f++;f<e.length&&o(e.charCodeAt(f));)f++;if(f<e.length&&e.charCodeAt(f)===c.dot){if(f++,!(f<e.length&&o(e.charCodeAt(f))))return _=u.UnexpectedEndOfNumber,e.substring(t,n);for(f++;f<e.length&&o(e.charCodeAt(f));)f++}var n=f;if(f<e.length&&(e.charCodeAt(f)===c.E||e.charCodeAt(f)===c.e))if(f++,(f<e.length&&e.charCodeAt(f)===c.plus||e.charCodeAt(f)===c.minus)&&f++,f<e.length&&o(e.charCodeAt(f))){for(f++;f<e.length&&o(e.charCodeAt(f));)f++;n=f}else _=u.UnexpectedEndOfNumber;return e.substring(t,n)}function d(){for(var t="",r=f;;){if(f>=g){t+=e.substring(r,f),_=u.UnexpectedEndOfString;break}var o=e.charCodeAt(f);if(o===c.doubleQuote){t+=e.substring(r,f),f++;break}if(o!==c.backslash){if(i(o)){t+=e.substring(r,f),_=u.UnexpectedEndOfString;break}f++}else{if(t+=e.substring(r,f),f++,f>=g){_=u.UnexpectedEndOfString;break}switch(o=e.charCodeAt(f++)){case c.doubleQuote:t+='"';break;case c.backslash:t+="\\";break;case c.slash:t+="/";break;case c.b:t+="\b";break;case c.f:t+="\f";break;case c.n:t+="\n";break;case c.r:t+="\r";break;case c.t:t+="	";break;case c.u:var o=n(4,!0);o>=0?t+=String.fromCharCode(o):_=u.InvalidUnicode;break;default:_=u.InvalidEscapeCharacter}r=f}}return t}function h(){if(m="",_=u.None,v=f,f>=g)return v=g,y=l.EOF;var t=e.charCodeAt(f);if(r(t)||i(t)){do f++,m+=String.fromCharCode(t),t=e.charCodeAt(f);while(r(t)||i(t));return y=l.Trivia}switch(t){case c.openBrace:return f++,y=l.OpenBraceToken;case c.closeBrace:return f++,y=l.CloseBraceToken;case c.openBracket:return f++,y=l.OpenBracketToken;case c.closeBracket:return f++,y=l.CloseBracketToken;case c.colon:return f++,y=l.ColonToken;case c.comma:return f++,y=l.CommaToken;case c.doubleQuote:return f++,m=d(),y=l.StringLiteral;case c.slash:var n=f-1;if(e.charCodeAt(f+1)===c.slash){for(f+=2;g>f&&!i(e.charCodeAt(f));)f++;return m=e.substring(n,f),y=l.LineCommentTrivia}if(e.charCodeAt(f+1)===c.asterisk){f+=2;for(var h=g-1,p=!1;h>f;){var b=e.charCodeAt(f);if(b===c.asterisk&&e.charCodeAt(f+1)===c.slash){f+=2,p=!0;break}f++}return p||(f++,_=u.UnexpectedEndOfComment),m=e.substring(n,f),y=l.BlockCommentTrivia}return m+=String.fromCharCode(t),f++,y=l.Unknown;case c.minus:if(m+=String.fromCharCode(t),f++,f===g||!o(e.charCodeAt(f)))return y=l.Unknown;case c._0:case c._1:case c._2:case c._3:case c._4:case c._5:case c._6:case c._7:case c._8:case c._9:return m+=a(),y=l.NumericLiteral;default:for(;g>f&&s(t);)f++,t=e.charCodeAt(f);if(v!==f){switch(m=e.substring(v,f)){case"true":return y=l.TrueKeyword;case"false":return y=l.FalseKeyword;case"null":return y=l.NullKeyword}return y=l.Unknown}return m+=String.fromCharCode(t),f++,y=l.Unknown}}function p(){var e;do e=h();while(e===l.Trivia||e===l.LineCommentTrivia||e===l.BlockCommentTrivia);return e}void 0===t&&(t=!1);var f=0,g=e.length,m="",v=0,y=l.Unknown,_=u.None;return{getPosition:function(){return f},scan:t?p:h,getToken:function(){return y},getTokenValue:function(){return m},getTokenOffset:function(){return v},getTokenLength:function(){return f-v},getTokenError:function(){return _}}}function r(e){return e===c.space||e===c.tab||e===c.verticalTab||e===c.formFeed||e===c.nonBreakingSpace||e===c.ogham||e>=c.enQuad&&e<=c.zeroWidthSpace||e===c.narrowNoBreakSpace||e===c.mathematicalSpace||e===c.ideographicSpace||e===c.byteOrderMark}function i(e){return e===c.lineFeed||e===c.carriageReturn||e===c.lineSeparator||e===c.paragraphSeparator}function o(e){return e>=c._0&&e<=c._9}function s(e){return e>=c.a&&e<=c.z||e>=c.A&&e<=c.Z}function a(e,t){var r,i,o=n(e),s=[],a=0;do switch(i=o.getPosition(),r=o.scan()){case l.LineCommentTrivia:case l.BlockCommentTrivia:case l.EOF:a!==i&&s.push(e.substring(a,i)),void 0!==t&&s.push(o.getTokenValue().replace(/[^\r\n]/g,t)),a=o.getPosition()}while(r!==l.EOF);return s.join("")}!function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter"}(t.ScanError||(t.ScanError={}));var u=t.ScanError;!function(e){e[e.Unknown=0]="Unknown",e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.Trivia=14]="Trivia",e[e.EOF=15]="EOF"}(t.SyntaxKind||(t.SyntaxKind={}));var l=t.SyntaxKind;t.createScanner=n,t.isLetter=s;var c;!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.mathematicalSpace=8287]="mathematicalSpace",e[e.ogham=5760]="ogham",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",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.j=106]="j",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.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",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"}(c||(c={})),t.stripComments=a
}),require.config({ignoreDuplicateModules:["vs/languages/javascript/jsdoc","vs/languages/typescript/features/tokenization","vs/languages/typescript/typescript","vs/languages/typescript/typescriptMode","vs/languages/typescript/typescript.configuration","vs/languages/javascript/javascript.configuration","vs/languages/javascript/javascript.extensions","vs/base/severity","vs/base/paths","vs/base/uuid","vs/base/trie","vs/base/callbackList","vs/base/eventSource","vs/languages/csharp/features/tokenization","vs/languages/lib/htmlLib","vs/languages/lib/beautify-html","vs/platform/configuration/configurationRegistry","vs/languages/csharp/csharp.extensions","vs/base/lifecycle"]}),define("vs/editor/languages.common",["./modes/modesExtensions","vs/languages/plaintext/plaintext","./modes/autoIndentation/autoIndentation","vs/editor/core/constants","./modes/monarch/monarchTypes","./modes/monarch/monarchCommon","./modes/monarch/monarchCompile","./modes/monarch/monarch","vs/base/json"],function(){}),define("vs/editor/worker/editorWorkerServer",["require","exports","vs/base/lib/winjs.base","vs/base/async","vs/base/eventEmitter","vs/platform/services","vs/platform/telemetry/workerTelemetryService","./resourceService","./dispatcherService","vs/platform/markers/markerService2","vs/platform/thread/workerThreadService","vs/editor/modes/modesExtensions","vs/platform/platform","vs/editor/modes/boundModels","vs/platform/instantiation/instantiationService","vs/platform/plugins","vs/editor/worker/workerHelper","vs/editor/api/worker","vs/editor/worker/modesWorker","vs/editor/languages.common"],function(e,t,n,r,i,o,s,a,u,l,c,d,h,p,f,g,m,v){var y=this,_=function(){function e(){var e=this;this.dispatcherService=new u.DispatcherService,this.modePromise=new n.Promise(function(t){e.modeCompleteCallback=t})}return e.prototype.initialize=function(e,t,u,_,b){g.registerPlugins(b.plugins);var C=new o.BaseWorkspaceContextService(b.contextService.workspace,b.contextService.configuration,b.contextService.options),w=new s.WorkerTelemetryService(C,{enableTelemetry:b.telemetryService.enableTelemetry,publicOnly:!b.telemetryService.enablePrivateTelemetry,sessionID:b.telemetryService.telemetrySessionID,enableHardIdle:!1,enableSoftIdle:!1}),E={sendMessage:function(t,n){return e.request(t,n)}},S=new s.WorkerTelemetryAppender(E);w.addTelemetryAppender(S);var T=new c.WorkerThreadService(b.threadService,this.dispatcherService,E),x=new a.ResourceService,L=new l.MarkerService(T),M=h.Registry.as(d.Extensions.EditorModes);d.registerThreadServiceListener(m.WorkerHelper.register);var k=new r.PromiseSource,N=new p.BoundModels(T,L,x,function(e){return k.value.then(function(){return M.getOrCreateMode(e)})}),I=new o.BaseRequestService({contextService:C,telemetryService:w}),O={threadService:T,contextService:C,eventService:new i.EventEmitter,resourceService:x,dispatcherService:this.dispatcherService,publisherService:E,markerService:L,telemetryService:w,modelService:N,requestService:I},A=n.Promise.as(null),P=C.getConfiguration().additionalWorkerServices;P&&P.forEach(function(e){A=A.then(function(){var t=o.AsyncDescriptor.create(e.moduleName,e.ctorName);return f.create(O).createInstance(t).then(function(t){O[e.serviceId]=t})})}),A.then(function(){var n=f.create(O);T.setInstantiationService(n);var r=e.getRemoteCom();y.Monaco=v.createAPI(r,x),M.setThreadService(T),k.complete(),t(void 0)})},e.prototype.request=function(e,t,n,r,i){this.dispatcherService.dispatch(i).then(t,n,r)},e}();t.EditorWorkerServer=_,t.value=new _});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/editor/worker/editorWorkerServer.nls.keys",[],{vs_editor_core_model_textModelWithTokens:{path:"vs/editor/core/model/textModelWithTokens.js",keys:["mode.tokenizationSupportFailed"]},vs_base_severity:{path:"vs/base/severity.js",keys:["sev.error","sev.warning","sev.info"]}});/*---------------------------------------------------------
 * 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/supports","vs/editor/modes/modesExtensions"],function(e,t,n,r,i,o,s){var a="+-*%&|^~!=<>/?:.,",u="+-*/%&|^~!=<>()[]\"'\\/?:.,#{}",l="	 ",c=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}]),d=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"]),h=function(e){return a.indexOf(e)>-1},p=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){return n instanceof t?e.prototype.equals.call(this,n)&&this.name===n.name&&s.safeStateEquals(this.parent,n.parent):!1},t.prototype.tokenize=function(e){return e.setTokenRules(u,l),e.skipWhitespace().length>0?{type:""}:this.stateTokenize(e)},t.prototype.stateTokenize=function(){throw new Error("To be implemented")},t}(s.AbstractState),f=function(e){function t(t,n,r,i){e.call(this,t,"string",n),this.previous=r,this.bracketStack=i}return __extends(t,e),t.prototype.makeClone=function(){var e=null!==this.bracketStack?r.clone(this.bracketStack):null;return new t(this.getMode(),s.safeStateClone(this.parent),this.previous,e)},t.prototype.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n)&&this.previous===n.previous&&r.equals(this.bracketStack,n.bracketStack):!1},t.prototype.tokenize=function(e){return e.advanceUntil(/^(#{|\\"|")/,!1),e.eos()||2===e.advanceIfRegExp(/^\\"/).length?{type:"string.coffee"}:2===e.advanceIfString("#{").length?(this.bracketStack.push("#{"),{type:"string.coffee",nextState:new C(this.getMode(),this,this.previous,this.bracketStack)}):e.advanceIfRegExp(/^"("")?/).length>0?(this.previous="string.coffee",{type:"string.coffee",nextState:new C(this.getMode(),this,this.previous,this.bracketStack)}):{type:"string.coffee"}},t}(p),g=function(e){function t(t,n,r,i){void 0===i&&(i=!0),e.call(this,t,"string",n),this.isAtBeginning=i,this.delimiter=r}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode(),s.safeStateClone(this.parent),this.delimiter,this.isAtBeginning)},t.prototype.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n)&&this.isAtBeginning===n.isAtBeginning&&this.delimiter===n.delimiter:!1},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}(p),m=function(e){function t(t,n,r){e.call(this,t,"regexp",n),this.previous=r}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode(),s.safeStateClone(this.parent),this.previous)},t.prototype.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n)&&this.previous===n.previous:!1},t.prototype.tokenize=function(e){if(-1!==["","bracket.open","delimiter"].indexOf(this.previous)){for(var t,n=e.pos();!e.eos();){if(t=e.next(),"/"===t)return{type:"regexp.coffee",nextState:this.parent};"\\"!==t||e.eos()||"/"!==e.peek()||e.next()}e.goBack(e.pos()-n)}return{type:"delimiter.coffee",nextState:this.parent}},t}(p),v=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(),s.safeStateClone(this.parent),this.previous,null!==this.bracketStack?r.clone(this.bracketStack):null)},t.prototype.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n)&&this.previous===n.previous&&r.equals(this.bracketStack,n.bracketStack):!1},t.prototype.tokenize=function(e){for(;!e.eos();){if("#"===e.peek()&&0===e.pos())return new _(this.getMode(),this,"regexMultiline",this.bracketStack).tokenize(e);if("#"===e.peek())return this.previous="regexMultiline",{type:"regexp.coffee",nextState:new _(this.getMode(),this,this.previous,this.bracketStack)};if(3===e.advanceIfString("///").length)return{type:"regexp.coffee",nextState:new C(this.getMode(),this,this.previous,this.bracketStack)};e.next()}return{type:"regexp.coffee"}},t}(p),y=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(),s.safeStateClone(this.parent),this.firstDigit)},t.prototype.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n)&&this.firstDigit===n.firstDigit:!1},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(!s.isDigit(t,8))return{type:"number.coffee",nextState:this.parent};n=8}e.next()}for(;!e.eos();)if(t=e.peek(),s.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()||!s.isDigit(e.peek(),n)){e.goBack(1);break}r=!0}else{if(8!==n||!s.isDigit(t,10))break;n=10,e.next()}var o="number";return 16===n?o+=".hex":8===n&&(o+=".octal"),{type:o+".coffee",nextState:this.parent}},t}(p),_=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(n){return n instanceof t?e.prototype.equals.call(this,n)&&this.previous===n.previous&&r.equals(this.bracketStack,n.bracketStack):!1},t.prototype.makeClone=function(){return new t(this.getMode(),s.safeStateClone(this.parent),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 v(this.getMode(),this,this.previous,this.bracketStack)}):(e.advanceUntil("###",!1),{type:"comment.coffee",nextState:3===e.advanceIfString("###").length?this.parent:null})},t}(p),b=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 m(this.getMode(),s.safeStateClone(this.parent),this.token)},t.prototype.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n)&&this.token===n.token:!1},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}(p),C=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(),s.safeStateClone(this.parent),this.previous,null!==this.bracketStack?r.clone(this.bracketStack):null)},t.prototype.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n)&&this.previous===n.previous&&r.equals(this.bracketStack,n.bracketStack):!1},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 f(this.getMode(),this,n,this.bracketStack)},this.previous="string.nested.end",t;if(s.isDigit(e.peek(),10))return t={nextState:new y(this.getMode(),this,e.next())},this.previous="number",t;var n=e.nextToken();if(d(n)||"@"===n[0])return t={nextState:new b(this.getMode(),this,n)},this.previous="keyword",t;if("#"===n)return 2===e.advanceIfString("##").length?(t={nextState:new _(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 v(this.getMode(),this,this.previous,this.bracketStack)},this.previous="regexp.multiline",t):(t={nextState:new m(this.getMode(),this,this.previous)},this.previous="regexp",t);if('"'===n)return t={nextState:new f(this.getMode(),this,n,this.bracketStack)},this.previous="string",t;if("'"===n)return t={nextState:new g(this.getMode(),this,n)},this.previous="string",t;if(c.characterIsBracket(n)){var r=c.bracketTypeFromChar(n);return"{"===n?(this.previous="bracket.open",this.bracketStack.push(n)):"}"===n?(this.previous="bracket.close",this.bracketStack.length>0&&this.bracketStack.pop()):c.characterIsBracket(n)&&(this.previous=r===i.Bracket.Open?"bracket.open":"bracket.close"),{bracket:r,type:c.tokenTypeFromChar(n)}}return h(n)?(this.previous="delimiter",{type:"delimiter.coffee"}):(this.previous="identitifer",{type:""})},t}(p),w=function(e){function t(t,n){var r=this;e.call(this,t,n),this.tokenizationSupport=new o.TokenizationSupport(this,{getInitialState:function(){return new C(r,null,"",[])}},!1),this.electricCharacterSupport=new o.ElectricCharacterSupport(this),this.characterPairSupport=new o.CharacterPairSupport(this,[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}])}return __extends(t,e),t.prototype.getElectricCharacters=function(){return c.getElectricBrackets()},t.prototype.onEnter=function(e,t){if(0===e.getTokenCount())return null;var n=e.findIndexOfOffset(t),r=["for","while","loop","if","unless","else","switch","try","catch","finally","class","->"],o=e.getTokenStartIndex(n),s=e.getTokenText(n);return o+s.length<=t&&r.indexOf(s)>=0?{indentAction:i.IndentAction.Indent}:c.onEnter(e,t)},t.prototype.onElectricCharacter=function(e,t){return c.onElectricCharacter(e,t)},t.prototype.getNonWordTokenTypes=function(){return["delimiter.coffee","delimiter.parenthesis.coffee","delimiter.bracket.coffee","delimiter.array.coffee","regexp.coffee"]},t.prototype.getCommentsConfiguration=function(){return{lineCommentTokens:["#"],blockCommentStartToken:"###",blockCommentEndToken:"###"}},t}(s.AbstractMode);t.CoffeeMode=w});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/languages/coffeescript/coffeescript.nls.keys",[],{});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
"use strict";define("vs/base/severity",["require","exports","vs/nls!vs/languages/csharp/csharp","vs/base/strings"],function(e,t,n,r){var i;!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(i||(i={}));var i;return function(e){function t(t){return t?r.equalsIgnoreCase(s,t)?e.Error:r.equalsIgnoreCase(a,t)||r.equalsIgnoreCase(u,t)?e.Warning:r.equalsIgnoreCase(l,t)?e.Info:e.Ignore:e.Ignore}function i(t){switch(t){case e.Error:return n.localize("vs_base_severity",0);case e.Warning:return n.localize("vs_base_severity",1);case e.Info:return n.localize("vs_base_severity",2)}return r.empty}function o(e,t){return t-e}var s="error",a="warning",u="warn",l="info";e.fromValue=t,e.toString=i,e.compare=o}(i||(i={})),i}),define("vs/languages/csharp/features/tokenization",["require","exports"],function(e,t){t.language={displayName:"C#",name:"cs",mimeTypes:[],defaultToken:"",lineComment:"// ",blockCommentStart:"/*",blockCommentEnd:"*/",wordDefinition:/(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,autoClosingPairs:[['"','"'],["'","'"],["{","}"],["[","]"],["(",")"]],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],noindentBrackets:">",editorOptions:{tabSize:4,insertSpaces:!0},keywords:["extern","alias","using","bool","decimal","sbyte","byte","short","ushort","int","uint","long","ulong","char","float","double","object","dynamic","string","assembly","module","is","as","ref","out","this","base","new","typeof","void","checked","unchecked","default","delegate","var","const","if","else","switch","case","while","do","for","foreach","in","break","continue","goto","return","throw","try","catch","finally","lock","yield","from","let","where","join","on","equals","into","orderby","ascending","descending","select","group","by","namespace","partial","class","field","event","method","param","property","public","protected","internal","private","abstract","sealed","static","struct","readonly","volatile","virtual","override","params","get","set","add","remove","operator","true","false","implicit","explicit","interface","enum","null","async","await"],namespaceFollows:["namespace","using"],parenFollows:["if","for","while","switch","foreach","using","catch"],operators:["=","??","||","&&","|","^","&","==","!=","<=",">=","<<","+","-","*","/","%","!","~","++","--","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=",">>","=>"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@namespaceFollows":{token:"keyword.$0",next:"@namespace"},"@keywords":{token:"keyword.$0",next:"@qualified"},"@default":{token:"identifier",next:"@qualified"}}}],{include:"@whitespace"},[/}/,{cases:{"$S2==interpolatedstring":{token:"string.quote",bracket:"@close",next:"@pop"},"@default":"@brackets"}}],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/@"/,{token:"string.quote",bracket:"@open",next:"@litstring"}],[/\$"/,{token:"string.quote",bracket:"@open",next:"@interpolatedstring"}],[/\d*\.\d+([eE][\-+]?\d+)?[fFdD]?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],qualified:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":"keyword.$0","@default":"identifier"}}],[/\./,"delimiter"],["","","@pop"]],namespace:[{include:"@whitespace"},[/[A-Z]\w*/,"namespace"],[/[\.=]/,"delimiter"],["","","@pop"]],comment:[[/[^\/*]+/,"comment"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],interpolatedstring:[[/[^\\"{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",bracket:"@open",next:"root.interpolatedstring"}],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/^[ \t\v\f]*#\w.*$/,"namespace.cpp"],[/[ \t\v\f\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}}});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/csharp/csharp.extensions",["require","exports","vs/platform/platform","vs/platform/services"],function(e,t,n,r){var i;return function(e){function t(e){a=e}function i(){return a}function o(e,t){l.push(new u(e,t))}function s(){return l.slice(0)}e.Identifier="vs.languages.csharp",n.Registry.add(e.Identifier,e);var a;e.setOmnisharpServer=t,e.getOmnitsharpServer=i;var u=function(e){function t(t,n){e.call(this,t),this._supportName=n}return __extends(t,e),Object.defineProperty(t.prototype,"supportName",{get:function(){return this._supportName},enumerable:!0,configurable:!0}),t}(r.AsyncDescriptor);e.LanguageServiceFeatureDescriptor=u;var l=[];e.addLanguageServiceFeature=o,e.getLanguageServiceFeatures=s}(i||(i={})),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/languages/csharp/csharp",["require","exports","vs/base/async","vs/base/severity","vs/languages/csharp/features/tokenization","vs/base/lib/winjs.base","vs/languages/csharp/csharp.extensions","vs/editor/core/constants","vs/editor/modes/monarch/monarch","vs/editor/modes/monarch/monarchCompile"],function(e,t,n,r,i,o,s,a,u,l){var c=function(e){function t(t,u,c){var d=this;if(void 0===c&&(c=null),i.language.workerDescriptor=c,e.call(this,t,u,l.compile(i.language)),this._eventService=t.eventService,this._omnisharpService=t.omnisharp,t.threadService&&t.threadService.isInMainThread&&this._omnisharpService){var h=t.instantiationService,p=t.messageService;this._server=this._omnisharpService.server().then(function(e){return e.start()}),this._server.done(void 0,function(e){p.show(r.Error,e)});var f=s.getLanguageServiceFeatures().map(function(e){return h.createInstance(e,new n.ShallowCancelThenPromise(d._server)).then(function(t){d[e.supportName]=t})});o.TPromise.join(f).then(function(){d._modelService.getModels().forEach(function(e){e.getMode()===d&&e.emit(a.EventType.ModelModeChanged,{oldMode:d,newMode:d})})}).done(null,function(e){return console.error(e)})}}return __extends(t,e),t}(u.MonarchMode);t.CSMode=c});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/languages/csharp/csharp.nls.keys",[],{vs_base_severity:{path:"vs/base/severity.js",keys:["sev.error","sev.warning","sev.info"]}});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/languages/css/services/browsers",["require","exports"],function(e,t){"use strict";function n(){if(!o){o={};for(var e=0,t=h.length;t>e;e++){var n=h[e];o[n.name]=new u(n)}}return o}var r={css:{}},i={FF:"Firefox",S:"Safari",C:"Chrome",IE:"IE",O:"Opera"};t.browserNames=i;var o,s=function(e){var t={},n=0;return e&&e.split(",").forEach(function(e){if(e=e.trim(),"all"===e)t.all=!0,t.FF=t.S=t.C=t.IE=t.O="",n=Number.MAX_VALUE;else if("none"!==e)for(var r in i)0===e.indexOf(r)&&(t[r]=e.substring(r.length).trim(),n++)}),t.count=n,t},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=s(this.data.browsers)),this.browserEntry},enumerable:!0,configurable:!0}),e}(),u=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=s(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}(),l=r.css.atdirectives||[],c=r.css.pseudoclasses||[],d=r.css.pseudoelements||[],h=r.css.properties||[];t.getProperties=n;var p;t.getAtDirectives=function(){if(!p){p=[];for(var e=0,t=l.length;t>e;e++){var n=l[e];p.push(new u(n))}}return p};var f;t.getPseudoClasses=function(){if(!f){f=[];for(var e=0,t=c.length;t>e;e++){var n=c[e];f.push(new u(n))}}return f};var g;t.getPseudoElements=function(){if(!g){g=[];for(var e=0,t=d.length;t>e;e++){var n=d[e];f.push(new u(n))}}return g}});/*---------------------------------------------------------
 * 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/supports","vs/editor/modes/modesExtensions","vs/base/objects","vs/platform/services","vs/platform/thread/attribute"],function(e,t,n,r,i,o,s,a,u){!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 l=t.States,c=new n.Brackets([{tokenType:"delimiter.bracket.css",open:"{",close:"}",isElectric:!0}]),d=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)&&s.equals(this,t)},t.prototype.tokenizeInComment=function(e){return/\*\/$/.test(e.advanceUntilString("*/",!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.skipWhitespace2())return{type:""};if(e.advanceIfString2("/*"))return this.inComment=!0,this.tokenizeInComment(e);if(e.advanceIfString2("'"))return this.quote="'",this.tokenizeInString(e);if(e.advanceIfString2('"'))return this.quote='"',this.tokenizeInString(e);var t=e.next();if(this.kind===l.ValuePostUrl){if("("===t)return this.nextState(l.ValueInUrlFunction,{type:"delimiter.parenthesis.css",bracket:r.Bracket.Open});this.kind=l.Value}else if(this.kind===l.ValueInUrlFunction){if(")"!==t)return e.advanceIfRegExp2(/^[^\)]*/),{type:"string.css"};this.kind=l.Value}switch(this.kind){case l.Selector:return"{"===t?this.nextState(l.Rule,{type:"delimiter.bracket.css",bracket:r.Bracket.Open}):"("===t||")"===t?{type:"delimiter.parenthesis.css",bracket:"("===t?r.Bracket.Open:r.Bracket.Close}:"@"!==t||this.inMeta?"}"===t&&this.inMeta?(this.inMeta=!1,this.nextState(l.Selector,{type:"delimiter.bracket.css",bracket:r.Bracket.Close})):/[\*\(\)\[\]\+>=\~\|;]/.test(t)?{type:"delimiter.css"}:"#"===t?(e.advanceIfRegExp2(/^[\w\-]*/),{type:"tag.css"}):(e.advanceIfRegExp2(/^[\w\-]*/),{type:"tag.css"}):(e.advanceIfRegExp2(/^[\w\-]*/),this.nextState(l.Meta,{type:"keyword.css"}));case l.Meta:if("{"===t){var n=l.Rule;return this.inMeta&&(n=l.Selector),this.nextState(n,{type:"delimiter.bracket.css",bracket:r.Bracket.Open})}return"("===t||")"===t?{type:"delimiter.parenthesis.css",bracket:"("===t?r.Bracket.Open:r.Bracket.Close}:";"===t?(0===this.metaBraceCount&&(this.inMeta=!1),this.nextState(l.Selector,{type:"delimiter.css"})):/[\*\(\)\[\]\+>=\~\|]/.test(t)?{type:"delimiter.css"}:(this.inMeta=!0,e.advanceIfRegExp2(/^[\w\-]*/),{type:"attribute.value.css"});case l.Rule:return"}"===t?this.nextState(l.Selector,{type:"delimiter.bracket.css",bracket:r.Bracket.Close}):":"===t?this.nextState(l.Value,{type:"delimiter.css"}):"("===t||")"===t?{type:"delimiter.parenthesis.css",bracket:"("===t?r.Bracket.Open:r.Bracket.Close}:(e.advanceIfRegExp2(/^[\w\-]*/),{type:"attribute.name.css"});case l.Value:if("}"===t)return this.nextState(l.Selector,{type:"delimiter.bracket.css",bracket:r.Bracket.Close});if(";"===t)return this.nextState(l.Rule,{type:"delimiter.css"});if(("u"===t||"U"===t)&&e.advanceIfStringCaseInsensitive2("rl"))return this.nextState(l.ValuePostUrl,{type:"attribute.value.css"});if("("===t||")"===t)return{type:"delimiter.parenthesis.css",bracket:"("===t?r.Bracket.Open:r.Bracket.Close};if(","===t)return{type:"delimiter.css"};if("#"===t)return e.advanceIfRegExp2(/^[\w]*/),{type:"attribute.value.hex.css"};if(/\d/.test(t)||/-|\+/.test(t)&&!e.eos()&&/\d/.test(e.peek()))return e.advanceIfRegExp2(/^[\d\.]*/),this.nextState(l.Unit,{type:"attribute.value.number.css"});if("!"===t)return{type:"keyword.css"};if(("i"===t||"I"===t)&&e.advanceIfStringCaseInsensitive2("mportant"))return{type:"keyword.css"};if(e.advanceIfRegExp2(/^[\w\-]*/))return{type:"attribute.value.css"};break;case l.Unit:return e.goBack(1),e.advanceIfRegExp2(/^(em|ex|ch|rem|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)/)?{type:"attribute.value.unit.css"}:(this.nextState(l.Value,null),this.tokenize(e))}return{type:""}},t}(o.AbstractState);t.State=d;var h=function(e){function t(t,n){var r=this;e.call(this,t,n,a.AsyncDescriptor.create("vs/languages/css/cssWorker","CSSWorker")),this.tokenizationSupport=new i.TokenizationSupport(this,{getInitialState:function(){return new d(r,l.Selector,!1,null,!1,0)}},!1),this.electricCharacterSupport=new i.BracketElectricCharacterSupport(this,c),this.extraInfoSupport=this,this.referenceSupport=this,this.logicalSelectionSupport=this,this.outlineSupport=this,this.declarationSupport=this,this.characterPairSupport=new i.CharacterPairSupport(this,[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}])}return __extends(t,e),t.prototype._worker=function(t){return e.prototype._worker.call(this,t)},t.prototype.canFindDeclaration=function(e,t){return o.isLineToken(e,t,"attribute.value.css")},t.prototype.findDeclaration=function(e,t){return this._worker(function(n){return n.findDeclaration(e,t)})},t.prototype.canFindReferences=function(e,t){return o.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.getNonWordTokenTypes=function(){return["delimiter.css","delimiter.parenthesis.css","delimiter.bracket.css"]},t.prototype.getTriggerCharacters=function(){return[" ",":"]},t.prototype.shouldAutotriggerSuggestImpl=function(e,t){var n=e.findIndexOfOffset(t),r=e.getTokenType(n);switch(r){case"comment.css":case"string.css":return!1;default:return!0}},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.$findDeclaration=u.OneWorker(t,t.prototype.findDeclaration),t.$computeInfo=u.OneWorker(t,t.prototype.computeInfo),t.$findReferences=u.OneWorker(t,t.prototype.findReferences),t.$getRangesToPosition=u.OneWorker(t,t.prototype.getRangesToPosition),t.$getOutline=u.OneWorker(t,t.prototype.getOutline),t.$findColorDeclarations=u.OneWorker(t,t.prototype.findColorDeclarations),t}(o.AbstractMode);t.CSSMode=h});/*---------------------------------------------------------
 * 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/services/cssLanguageService",["require","exports","vs/base/lib/winjs.base","vs/platform/services","vs/editor/core/model/mirrorModel"],function(e,t,n,r,i){var o=function(e){function t(){var t=this;e.call(this,function(e,n){t._valueCallback=e,t._errorCallback=n})}return __extends(t,e),t.prototype.resolve=function(e){return this._valueCallback(e),this},t.prototype.reject=function(e){return this._errorCallback(e),this},t}(n.TPromise),s=function(){function e(e,t,n){var r=this;this._cssModeId=n,this.resourceService=e,this.entries={},this.callOnDispose=[],this.createParser=t,this.updateResources(),this.callOnDispose.push(this.resourceService.addBulkListener(function(e){return r.onChange(e)}))}return e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()();clearTimeout(this.onChangeHandle),this.onChangeHandle=null,this.entries=null},e.prototype.onChange=function(e){for(var t=this,n=0,i=e.length;i>n;n++){var s=e[n];if(s.getType()===r.ResourceEvents.REMOVED){var a=s.getData(),u=a.url.toExternal();this.entries.hasOwnProperty(u)&&delete this.entries[u]}}this.activeDelay||(this.activeDelay=new o),this.onChangeHandle&&clearTimeout(this.onChangeHandle),this.onChangeHandle=setTimeout(function(){t.updateResources(),t.activeDelay.resolve(null),t.activeDelay=null,t.onChangeHandle=null},50)},e.prototype.join=function(){return this.activeDelay||n.Promise.as(null)},e.prototype.updateResources=function(){var e=this,t=((new Date).getTime(),0);this.resourceService.all().filter(function(t){return t instanceof i.MirrorModel||t instanceof i.MirrorModelEmbedded?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().parseStylesheet(n),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}();t.CSSLanguageService=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/languages/css/parser/cssNodes",["require","exports","vs/base/types"],function(e,t,n){function r(e,t){var n=null;return!e||t<e.offset||t>e.offset+e.length?null:(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 i(e,t){for(var n=r(e,t),i=[];n;)i.unshift(n),n=n.parent;return i}function o(e){var t=e.findParent(s.Declaration);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",e[e.MSViewPort=61]="MSViewPort"}(t.NodeType||(t.NodeType={}));var s=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.getNodeAtOffset=r,t.getNodePath=i,t.getParentDeclaration=o;var a=function(){function e(e,t,n){void 0===e&&(e=-1),void 0===t&&(t=-1),this.parent=null,this.offset=e,this.length=t,n&&(this.nodeType=n)}return Object.defineProperty(e.prototype,"type",{get:function(){return this.nodeType||s.Undefined},set:function(e){this.nodeType=e},enumerable:!0,configurable:!0}),e.prototype.getText=function(){for(var e=this;e&&!e.textProvider;)e=e.parent;return e?e.textProvider(this.offset,this.length):"unknown"},e.prototype.accept=function(e){n.isFunction(e)||(e=e.visitNode.bind(e)),e(this)&&this.children&&this.children.forEach(function(t){t.accept(e)})},e.prototype.adoptChild=function(e,t){if(void 0===t&&(t=-1),e.parent&&e.parent.children){var n=e.parent.children.indexOf(e);n>=0&&e.parent.children.splice(n,1)}e.parent=this;var r=this.children;return r||(r=this.children=[]),-1!==t?r.splice(n,0,e):r.push(e),e},e.prototype.attachTo=function(e,t){return void 0===t&&(t=-1),e&&e.adoptChild(this,t),this},e.prototype.collectIssues=function(e){this.issues&&e.push.apply(e,this.issues)},e.prototype.addIssue=function(e){this.issues||(this.issues=[]),this.issues.push(e)},e.prototype.isErroneous=function(){return this.issues&&this.issues.length>0},e.prototype.setNode=function(e,t,n){return void 0===n&&(n=-1),t?(t.attachTo(this,n),this[e]=t,!0):!1},e.prototype.addChild=function(e){return e?(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0):!1},e.prototype.updateOffsetAndLength=function(e){(e.offset<this.offset||-1===this.offset)&&(this.offset=e.offset),(e.offset+e.length>this.offset+this.length||-1===this.length)&&(this.length=e.offset+e.length-this.offset)},e.prototype.hasChildren=function(){return this.children&&this.children.length>0},e.prototype.getChildren=function(){return this.children?this.children.slice(0):[]},e.prototype.getChild=function(e){return this.children&&e<this.children.length?this.children[e]:null},e.prototype.addChildren=function(e){var t=this;e.forEach(function(e){return t.addChild(e)})},e.prototype.findFirstChildBeforeOffset=function(e){if(this.children)for(var t=null,n=this.children.length-1;n>=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){void 0===n&&(n=-1),e.call(this,-1,-1),this.attachTo(t,n),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),this.exclusiveOffset=-1,this.exclusiveLength=-1}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.Brackets},enumerable:!0,configurable:!0}),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){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.Identifier},enumerable:!0,configurable:!0}),t.prototype.containsInterpolation=function(){return this.hasChildren()},t}(a);t.Identifier=c;var d=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.Stylesheet},enumerable:!0,configurable:!0}),t.prototype.setName=function(e){this.name=e},t}(a);t.Stylesheet=d;var h=function(e){function t(){e.call(this,-1,-1)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.Declarations},enumerable:!0,configurable:!0}),t}(a);t.Declarations=h;var p=function(e){function t(t,n){e.call(this,t,n)}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 h,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){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.Ruleset},enumerable:!0,configurable:!0}),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){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.Selector},enumerable:!0,configurable:!0}),t}(a);t.Selector=g;var m=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.SimpleSelector},enumerable:!0,configurable:!0}),t}(a);t.SimpleSelector=m;var v=function(e){function t(t,n){e.call(this,t,n),this.colonPosition=-1,this.semicolonPosition=-1}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.Declaration},enumerable:!0,configurable:!0}),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 h&&this.parent.getParent()instanceof I){var n=this.parent.getParent().getParent();if(n instanceof t)return n.getFullPropertyName()+e}return e},t.prototype.getNonPrefixedPropertyName=function(){var e=this.getFullPropertyName();if(e&&"-"===e.charAt(0)){var t=e.indexOf("-",1);if(-1!==t)return e.substring(t+1)}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){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.Property},enumerable:!0,configurable:!0}),t.prototype.setIdentifier=function(e){return this.setNode("identifier",e)},t.prototype.getIdentifier=function(){return this.identifier},t.prototype.getName=function(){return this.getText()},t}(a);t.Property=y;var _=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.Invocation},enumerable:!0,configurable:!0}),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){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.Function},enumerable:!0,configurable:!0}),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.getText():""},t}(_);t.Function=b;var C=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.FunctionParameter},enumerable:!0,configurable:!0}),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.getText():""},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){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.FunctionArgument},enumerable:!0,configurable:!0}),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.getText():""},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){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.If},enumerable:!0,configurable:!0}),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){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.For},enumerable:!0,configurable:!0}),t.prototype.setVariable=function(e){return this.setNode("variable",e,0)},t}(p);t.ForStatement=E;var T=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.Each},enumerable:!0,configurable:!0}),t.prototype.setVariable=function(e){return this.setNode("variable",e,0)},t}(p);t.EachStatement=T;var k=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.While},enumerable:!0,configurable:!0}),t}(p);t.WhileStatement=k;var x=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.Else},enumerable:!0,configurable:!0}),t}(p);t.ElseStatement=x;var L=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.FunctionDeclaration},enumerable:!0,configurable:!0}),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.getText():""},t.prototype.getParameters=function(){return this.parameters||(this.parameters=new u(this)),this.parameters},t}(p);t.FunctionDeclaration=L;var M=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.MSViewPort},enumerable:!0,configurable:!0}),t}(p);t.MSViewPort=M;var N=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.FontFace},enumerable:!0,configurable:!0}),t}(p);t.FontFace=N;var I=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.NestedProperties},enumerable:!0,configurable:!0}),t}(p);t.NestedProperties=I;var P=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.Keyframe},enumerable:!0,configurable:!0}),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.getText():""},t}(p);t.Keyframe=P;var O=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.KeyframeSelector},enumerable:!0,configurable:!0}),t}(p);t.KeyframeSelector=O;var A=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.Import},enumerable:!0,configurable:!0}),t.prototype.setMedialist=function(e){return e?(e.attachTo(this),this.medialist=e,!0):!1},t}(a);t.Import=A;var R=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.Namespace},enumerable:!0,configurable:!0}),t}(a);t.Namespace=R;var D=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.Media},enumerable:!0,configurable:!0}),t}(p);t.Media=D;var W=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),t.prototype.getMediums=function(){return this.mediums||(this.mediums=new u(this)),this.mediums},t}(a);t.Medialist=W;var F=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.MediaQuery},enumerable:!0,configurable:!0}),t}(a);t.MediaQuery=F;var H=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.Page},enumerable:!0,configurable:!0}),t}(p);t.Page=H;var V=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.PageBoxMarginBox},enumerable:!0,configurable:!0}),t}(p);t.PageBoxMarginBox=V;var B=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.Expression},enumerable:!0,configurable:!0}),t}(a);t.Expression=B;var z=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.BinaryExpression},enumerable:!0,configurable:!0}),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=z;var U=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.Term},enumerable:!0,configurable:!0}),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=U;var q=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.Operator},enumerable:!0,configurable:!0}),t}(a);t.Operator=q;var j=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.HexColorValue},enumerable:!0,configurable:!0}),t}(a);t.HexColorValue=j;var K=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.NumericValue},enumerable:!0,configurable:!0}),t.prototype.getValue=function(){for(var e,t=this.getText(),n=0,r=".".charCodeAt(0),i="0".charCodeAt(0),o="9".charCodeAt(0),s=0,a=t.length;a>s&&(e=t.charCodeAt(s),e>=i&&o>=e||e===r);s++)n+=1;return{value:t.substring(0,n),unit:a>n?t.substring(n):void 0}},t}(a);t.NumericValue=K;var G=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.VariableDeclaration},enumerable:!0,configurable:!0}),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=G;var $=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.Interpolation},enumerable:!0,configurable:!0}),t}(a);t.Interpolation=$;var X=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.VariableName},enumerable:!0,configurable:!0}),t.prototype.getName=function(){return this.getText()},t}(a);t.Variable=X;var Y=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.ExtendsReference},enumerable:!0,configurable:!0}),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.getText():""},t}(a);t.ExtendsReference=Y;var Z=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.MixinReference},enumerable:!0,configurable:!0}),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.getText():""},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=Z;var Q=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return s.MixinDeclaration},enumerable:!0,configurable:!0}),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.getText():""},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=Q;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 et=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=et;var tt=function(){function e(e,t,n,r,i,o){void 0===i&&(i=e.offset),void 0===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=tt;var nt=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){return e.isErroneous()&&e.collectIssues(this.entries),!0},e}();t.ParseErrorCollector=nt}),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){var t=e.getName();return t?i.equalsIgnoreCase(t,"rgb")||i.equalsIgnoreCase(t,"rgba")||i.equalsIgnoreCase(t,"hsl")||i.equalsIgnoreCase(t,"hsla"):!1}function s(e){if(e.type===n.NodeType.HexColorValue)return!0;if(e.type===n.NodeType.Function)return this.isColorConstructor(e);if(e.type===n.NodeType.Identifier){if(e.parent&&e.parent.type!==n.NodeType.Term)return!1;var r=e.getText().toLowerCase();if("none"===r)return!1;if(t.colors[r])return!0}return!1}function a(e){return e?(e=e.toLowerCase(),r.getProperties().hasOwnProperty(e)):!1}function u(e){return e.browsers.count>1}function l(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 c(){for(var e=r.getAtDirectives(),t=[],n=0;n<e.length;n++){var i=e[n];"http://www.w3.org/TR/css3-page/#page-box"===i.reference&&t.push(i.name)}return t}function d(e){var t=e.description||"",n=this.getBrowserLabel(e.browsers);return n&&(t&&(t+="\n"),t=t+"("+n+")"),t}function h(e){var t="";if(!e||e.all||0===e.count)return null;for(var n in r.browserNames)if(e.hasOwnProperty(n)){t.length>0&&(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.isColorConstructor=o,t.isColorValue=s,t.isKnownProperty=a,t.isCommonValue=u,t.getAlternateValues=l,t.getPageBoxDirectives=c,t.getEntryDescription=d,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){return void 0===t&&(t=0),this.offset<=e&&this.offset+this.length>e+t||this.offset===e&&this.length===t?this.findInScope(e,t):null},e.prototype.findInScope=function(e,t){void 0===t&&(t=0);var n=0,r=this.children.length;if(0===r)return this;for(var i=e+t;r>n;){var o=n+Math.floor((r-n)/2);this.children[o].offset>i?r=o:n=o+1}if(0===n)return this;var s=this.children[n-1];return s.offset<=e&&s.offset+s.length>e+t||s.offset===e&&s.length===t?s.findInScope(e,t):this},e.prototype.addSymbol=function(e){this.symbols.push(e)},e.prototype.getSymbol=function(e,t){for(var n=0;n<this.symbols.length;n++){var r=this.symbols[n];if(r.name===e&&r.type===t)return r}return null},e.prototype.getSymbols=function(){return this.symbols},e}();t.Scope=r;var i=function(e){function t(){e.call(this,0,Number.MAX_VALUE)}return __extends(t,e),t}(r);t.GlobalScope=i;var o=function(){function e(e,t,n){this.name=e,this.node=t,this.type=n}return e}();t.Symbol=o;var s=function(){function e(e){this.scope=e}return e.prototype.addSymbol=function(e,t,n){if(-1!==e.offset){var r=this.scope.findScope(e.offset,e.length);r.addSymbol(new o(t,e,n))}},e.prototype.addScope=function(e){if(-1!==e.offset){var t=this.scope.findScope(e.offset,e.length);if(t.offset!==e.offset||t.length!==e.length){var n=new r(e.offset,e.length);return t.addChild(n),n}return t}return null},e.prototype.addSymbolToChildScope=function(e,t,n,r){if(e&&-1!==e.offset){var i=this.addScope(e);i.addSymbol(new o(n,t,r))}},e.prototype.visitNode=function(e){switch(e.type){case n.NodeType.Keyframe:return this.addSymbol(e,e.getName(),n.ReferenceType.Keyframe),!0;case n.NodeType.VariableDeclaration:return this.addSymbol(e,e.getName(),n.ReferenceType.Variable),!0;case n.NodeType.Ruleset:return this.visitRuleSet(e);case n.NodeType.MixinDeclaration:return this.addSymbol(e,e.getName(),n.ReferenceType.Mixin),!0;case n.NodeType.FunctionDeclaration:return this.addSymbol(e,e.getName(),n.ReferenceType.Function),!0;case n.NodeType.FunctionParameter:var t=e.getParent().getBrackets();return this.addSymbolToChildScope(t,e,e.getName(),n.ReferenceType.Variable),!0;case n.NodeType.Brackets:return this.addScope(e),!0;case n.NodeType.For:var r=e;return this.addSymbolToChildScope(r.getBrackets(),r.variable,r.variable.getName(),n.ReferenceType.Variable),!0;
case n.NodeType.Each:var i=e;return this.addSymbolToChildScope(i.getBrackets(),i.variable,i.variable.getName(),n.ReferenceType.Variable),!0}return!0},e.prototype.visitRuleSet=function(e){var t=this.scope.findScope(e.offset,e.length);return e.getSelectors().getChildren().forEach(function(e){e instanceof n.Selector&&1===e.getChildren().length&&t.addSymbol(new o(e.getChild(0).getText(),e,n.ReferenceType.Rule))}),!0},e}();t.ScopeBuilder=s;var a=function(){function e(e){this.global=new i,e.accept(new s(this.global))}return e.prototype.findSymbolsAtOffset=function(e,t){for(var n=this.global.findScope(e,0),r=[],i={};n;){for(var o=n.getSymbols(),s=0;s<o.length;s++){var a=o[s];a.node.offset<=e&&a.type===t&&!i[a.name]&&(r.push(a),i[a.name]=!0)}n=n.parent}return r},e.prototype.internalFindSymbol=function(e,t){var r=e;if(e.parent instanceof n.FunctionParameter&&e.parent.getParent()instanceof n.BodyDeclaration&&(r=e.parent.getParent().getBrackets()),e.parent instanceof n.FunctionArgument&&e.parent.getParent()instanceof n.Function){var i=e.parent.getParent().getIdentifier();if(i){var o=this.internalFindSymbol(i,[n.ReferenceType.Function]);o&&(r=o.node.getBrackets())}}for(var s=e.getText(),a=this.global.findScope(r.offset,r.length);a;){for(var u=0;u<t.length;u++){var l=t[u],c=a.getSymbol(s,l);if(c)return c}a=a.parent}return null},e.prototype.evaluateReferenceTypes=function(e){if(e instanceof n.Identifier){var t=e.referenceTypes;if(t)return t;var r=n.getParentDeclaration(e);if(r){var i=r.getNonPrefixedPropertyName();if(("animation"===i||"animation-name"===i)&&r.getValue()&&r.getValue().offset===e.offset)return[n.ReferenceType.Keyframe]}}else if(e instanceof n.Variable)return[n.ReferenceType.Variable];var o=e.findParent(n.NodeType.Selector);if(o)return[n.ReferenceType.Rule];var s=e.findParent(n.NodeType.ExtendsReference);return s?[n.ReferenceType.Rule]:null},e.prototype.findSymbolFromNode=function(e){if(!e)return null;for(;e.type===n.NodeType.Interpolation;)e=e.getParent();var t=this.evaluateReferenceTypes(e);return t?this.internalFindSymbol(e,t):null},e.prototype.matchesSymbol=function(e,t){if(!e)return null;for(;e.type===n.NodeType.Interpolation;)e=e.getParent();if(t.name.length!==e.length||t.name!==e.getText())return!1;var r=this.evaluateReferenceTypes(e);if(!r||-1===r.indexOf(t.type))return!1;var i=this.internalFindSymbol(e,r);return i===t},e.prototype.findSymbol=function(e,t,n){for(var r=this.global.findScope(n);r;){var i=r.getSymbol(e,t);if(i)return i;r=r.parent}return null},e}();t.Symbols=a}),define("vs/languages/css/services/occurrences",["require","exports","vs/languages/css/parser/cssNodes","vs/languages/css/parser/cssSymbols"],function(e,t,n,r){function i(e,t){var i=new r.Symbols(e),o=n.getNodeAtOffset(e,t);if(!o)return null;var s=i.findSymbolFromNode(o);return s?s.node:null}function o(e,t){var i=[],o=n.getNodeAtOffset(e,t);if(!o||o.type===n.NodeType.Stylesheet)return i;var a=new r.Symbols(e),u=a.findSymbolFromNode(o),l=o.getText();return e.accept(function(e){if(u){if(a.matchesSymbol(e,u))return i.push({kind:s(e),type:u.type,node:e}),!1}else o.type===e.type&&l===e.getText()&&i.push({kind:s(e),node:e,type:n.ReferenceType.Unknown});return!0}),i}function s(e){if(e.type===n.NodeType.Selector)return"write";if(e.parent)switch(e.parent.type){case n.NodeType.FunctionDeclaration:case n.NodeType.MixinDeclaration:case n.NodeType.Keyframe:case n.NodeType.VariableDeclaration:case n.NodeType.FunctionParameter:return"write"}return null}t.findDeclaration=i,t.findOccurrences=o}),define("vs/languages/css/cssSnippets",["require","exports","vs/nls!vs/languages/css/cssWorker"],function(e,t,n){t.declarationSnippets=[{type:"snippet",label:"transition",codeSnippet:"transition: {{property}} {{duration}} {{timing-function}} {{delay}};\n-webkit-transition: {{property}} {{duration}} {{timing-function}} {{delay}};\n-o-transition: {{property}} {{duration}} {{timing-function}} {{delay}};\n-moz-transition: {{property}} {{duration}} {{timing-function}} {{delay}};",documentationLabel:n.localize("vs_languages_css_cssSnippets",0)},{type:"snippet",label:"border",codeSnippet:"border: {{width}} {{border-style}} {{color}};{{}}",documentationLabel:"[width] [border-style] [color]"}]}),define("vs/languages/css/services/intelliSense",["require","exports","vs/languages/css/parser/cssNodes","vs/languages/css/parser/cssSymbols","vs/languages/css/services/browsers","vs/languages/css/services/languageFacts","../cssSnippets"],function(e,t,n,r,i,o,s){var a=function(){function e(e){void 0===e&&(e=null),this.variablePrefix=e}return e.prototype.getSymbolContext=function(){return this.symbolContext||(this.symbolContext=new r.Symbols(this.styleSheet)),this.symbolContext},e.prototype.getCompletionsAtPosition=function(e,t,r,i){this.offset=t.getOffsetFromPosition(i),this.position=i,this.currentWord=t.getWordUntilPosition(i,!0,!0).word,this.model=t,this.styleSheet=e.getStylesheet(r);for(var o=[],s=n.getNodePath(this.styleSheet,this.offset),a=s.length-1;a>=0;a--){var u=s[a];if(u instanceof n.Property?this.getCompletionsForDeclarationProperty(o):u instanceof n.Expression?this.getCompletionsForExpression(u,o):u instanceof n.SimpleSelector?this.getCompletionsForSelector(o):u instanceof n.Declarations?this.getCompletionsForDeclarations(u,o):u instanceof n.VariableDeclaration?this.getCompletionsForVariableDeclaration(u,o):u instanceof n.RuleSet?this.getCompletionsForRuleSet(u,o):u instanceof n.Interpolation&&this.getCompletionsForInterpolation(u,o),o.length>0)return{currentWord:this.currentWord,suggestions:o}}if(this.getCompletionsForStylesheet(o),o.length>0)return{currentWord:this.currentWord,suggestions:o};if(this.variablePrefix&&0===this.currentWord.indexOf(this.variablePrefix)&&(this.getVariableProposals(o),o.length>0))return{currentWord:this.currentWord,suggestions:o};var l=t.getAllUniqueWords(this.currentWord);return{currentWord:this.currentWord,suggestions:l.map(function(e){return{type:"text",label:e,codeSnippet:e}})}},e.prototype.getCompletionsForDeclarationProperty=function(e){var t=i.getProperties();for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];r.browsers.count>1&&e.push({label:r.name,documentationLabel:o.getEntryDescription(r),codeSnippet:r.name+": ",type:"property"})}return s.declarationSnippets.forEach(function(t){e.push(t)}),e},e.prototype.getCompletionsForDeclarationValue=function(e,t){var n=e.getFullPropertyName(),r=i.getProperties()[n];if(r)this.getColorProposals(r,t),this.getValueEnumProposals(r,t),this.getUnitProposals(r,t);else{var o=new u;this.styleSheet.accept(new c(n,o)),o.getEntries().forEach(function(e){t.push({label:e,codeSnippet:e,type:"value"})})}return this.getVariableProposals(t),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})})}return t},e.prototype.getCompletionsForInterpolation=function(e,t){return this.offset>=e.offset+2&&this.getVariableProposals(t),t},e.prototype.getVariableProposals=function(e){var t=this.getSymbolContext().findSymbolsAtOffset(this.offset,n.ReferenceType.Variable);return t.forEach(function(t){e.push({label:t.name,codeSnippet:t.name,type:"variable"})}),e},e.prototype.getUnitProposals=function(e,t){var n=isNaN(parseFloat(this.currentWord))?"0":this.currentWord;return e.restrictions.forEach(function(e){var r=o.units[e];r&&r.forEach(function(e){t.push({label:n+e,codeSnippet:n+e,type:"unit"})})}),t},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:"#"+o.colors[n]});var r=new u;this.styleSheet.accept(new d(r)),r.getEntries().forEach(function(e){t.push({label:e,codeSnippet:e,type:"#"+e})})}return t},e.prototype.getCompletionsForStylesheet=function(e){var t=this.styleSheet.findFirstChildBeforeOffset(this.offset);return t?t instanceof n.RuleSet?this.getCompletionsForRuleSet(t,e):e:this.getCompletionForTopLevel(e)},e.prototype.getCompletionForTopLevel=function(e){return i.getAtDirectives().forEach(function(t){t.browsers.count>0&&e.push({label:t.name,codeSnippet:t.name,documentationLabel:o.getEntryDescription(t),type:"keyword"})}),e},e.prototype.getCompletionsForRuleSet=function(e,t){var n=e.getBrackets(),r=-1!==n.length&&this.offset>=n.offset+n.length;if(r)return this.getCompletionForTopLevel(t);var i=-1===n.offset||this.offset<=n.offset;return i?this.getCompletionsForSelector(t):this.getCompletionsForDeclarations(e.getDeclarations(),t)},e.prototype.getCompletionsForSelector=function(e){return i.getPseudoClasses().forEach(function(t){t.browsers.all&&e.push({label:t.name,codeSnippet:t.name,documentationLabel:o.getEntryDescription(t),type:"function"})}),i.getPseudoElements().forEach(function(t){t.browsers.all&&e.push({label:t.name,codeSnippet:t.name,documentationLabel:o.getEntryDescription(t),type:"function"})}),e},e.prototype.getCompletionsForDeclarations=function(e,t){var r=e.findFirstChildBeforeOffset(this.offset);if(!r)return this.getCompletionsForDeclarationProperty(t);if(r instanceof n.Declaration){var i=r;return-1===i.colonPosition||this.offset<=i.colonPosition||-1!==i.semicolonPosition&&i.semicolonPosition<this.offset?this.getCompletionsForDeclarationProperty(t):this.getCompletionsForDeclarationValue(i,t)}return t},e.prototype.getCompletionsForVariableDeclaration=function(e,t){return this.offset>e.colonPosition&&this.getVariableProposals(t),t},e.prototype.getCompletionsForExpression=function(e,t){var r=e.findParent(n.NodeType.Declaration);if(!r)return t;var i=e.findChildAtOffset(this.offset,!0);return i?i instanceof n.NumericValue||i instanceof n.Identifier?this.getCompletionsForDeclarationValue(r,t):t:this.getCompletionsForDeclarationValue(r,t)},e}();t.CSSIntellisense=a;var u=function(){function e(){this.entries={}}return e.prototype.add=function(e){this.entries[e]=!0},e.prototype.getEntries=function(){return Object.keys(this.entries)},e}(),l=function(){function e(e){this.entries=e}return e.prototype.visitNode=function(e){return(e instanceof n.Identifier||e instanceof n.NumericValue||e instanceof n.HexColorValue)&&this.entries.add(e.getText()),!0},e}(),c=function(){function e(e,t){this.propertyName=e,this.entries=t}return e.prototype.matchesProperty=function(e){var t=e.getFullPropertyName();return this.propertyName===t},e.prototype.visitNode=function(e){if(e instanceof n.Declaration&&this.matchesProperty(e)){var t=e.getValue();t&&t.accept(new l(this.entries))}return!0},e}(),d=function(){function e(e){this.entries=e}return e.prototype.visitNode=function(e){return(e instanceof n.HexColorValue||e instanceof n.Function&&o.isColorConstructor(e))&&this.entries.add(e.getText()),!0},e}()}),define("vs/languages/css/level",["require","exports"],function(e,t){function n(e){switch(e){case"ignore":return r.Ignore;case"warning":return r.Warning;case"error":return r.Error}return null}!function(e){e[e.Ignore=1]="Ignore",e[e.Warning=2]="Warning",e[e.Error=4]="Error"}(t.Level||(t.Level={}));var r=t.Level;t.toLevel=n}),define("vs/languages/css/parser/cssScanner",["require","exports"],function(e,t){!function(e){e[e.Ident=0]="Ident",e[e.AtKeyword=1]="AtKeyword",e[e.String=2]="String",e[e.BadString=3]="BadString",e[e.BadUri=4]="BadUri",e[e.Hash=5]="Hash",e[e.Num=6]="Num",e[e.Percentage=7]="Percentage",e[e.Dimension=8]="Dimension",e[e.URI=9]="URI",e[e.UnicodeRange=10]="UnicodeRange",e[e.CDO=11]="CDO",e[e.CDC=12]="CDC",e[e.Colon=13]="Colon",e[e.SemiColon=14]="SemiColon",e[e.CurlyL=15]="CurlyL",e[e.CurlyR=16]="CurlyR",e[e.ParenthesisL=17]="ParenthesisL",e[e.ParenthesisR=18]="ParenthesisR",e[e.BracketL=19]="BracketL",e[e.BracketR=20]="BracketR",e[e.Whitespace=21]="Whitespace",e[e.Includes=22]="Includes",e[e.Dashmatch=23]="Dashmatch",e[e.SubstringOperator=24]="SubstringOperator",e[e.PrefixOperator=25]="PrefixOperator",e[e.SuffixOperator=26]="SuffixOperator",e[e.Delim=27]="Delim",e[e.EMS=28]="EMS",e[e.EXS=29]="EXS",e[e.Length=30]="Length",e[e.Angle=31]="Angle",e[e.Time=32]="Time",e[e.Freq=33]="Freq",e[e.Exclamation=34]="Exclamation",e[e.Resolution=35]="Resolution",e[e.Comma=36]="Comma",e[e.Charset=37]="Charset",e[e.EscapedJavaScript=38]="EscapedJavaScript",e[e.BadEscapedJavaScript=39]="BadEscapedJavaScript",e[e.SingleLineComment=40]="SingleLineComment",e[e.EOF=41]="EOF",e[e.CustomToken=42]="CustomToken"}(t.TokenType||(t.TokenType={}));var n=t.TokenType,r=function(){function e(e){this.source=e,this.len=e.length,this.position=0}return e.prototype.substring=function(e,t){return void 0===t&&(t=this.position),this.source.substring(e,t)},e.prototype.eos=function(){return this.len<=this.position},e.prototype.pos=function(){return this.position},e.prototype.goBackTo=function(e){this.position=e},e.prototype.goBack=function(e){this.position-=e},e.prototype.advance=function(e){this.position+=e},e.prototype.nextChar=function(){return this.source.charCodeAt(this.position++)||0},e.prototype.peekChar=function(e){return void 0===e&&(e=0),this.source.charCodeAt(this.position+e)||0},e.prototype.lookbackChar=function(e){return void 0===e&&(e=0),this.source.charCodeAt(this.position-e)||0},e.prototype.advanceIfChar=function(e){return e===this.source.charCodeAt(this.position)?(this.position++,!0):!1},e.prototype.advanceIfChars=function(e){var t;if(this.position+e.length>this.source.length)return!1;for(t=0;t<e.length;t++)if(this.source.charCodeAt(this.position+t)!==e[t])return!1;return this.advance(t),!0},e.prototype.advanceWhileChar=function(e){for(var t=this.position;this.position<this.len&&e(this.source.charCodeAt(this.position));)this.position++;return this.position-t},e}();t.MultiLineStream=r;var i="a".charCodeAt(0),o="c".charCodeAt(0),s="e".charCodeAt(0),a="h".charCodeAt(0),u="l".charCodeAt(0),l="r".charCodeAt(0),c="s".charCodeAt(0),d="t".charCodeAt(0),h="u".charCodeAt(0),p="z".charCodeAt(0),f="A".charCodeAt(0),g="L".charCodeAt(0),m="R".charCodeAt(0),v="U".charCodeAt(0),y="Z".charCodeAt(0),_="0".charCodeAt(0),b="9".charCodeAt(0),C="~".charCodeAt(0),w="^".charCodeAt(0),S="=".charCodeAt(0),E="|".charCodeAt(0),T="-".charCodeAt(0),k="_".charCodeAt(0),x="%".charCodeAt(0),L="*".charCodeAt(0),M="(".charCodeAt(0),N=")".charCodeAt(0),I="<".charCodeAt(0),P=">".charCodeAt(0),O="@".charCodeAt(0),A="#".charCodeAt(0),R="$".charCodeAt(0),D="\\".charCodeAt(0),W="/".charCodeAt(0),F="\n".charCodeAt(0),H="\r".charCodeAt(0),V="\f".charCodeAt(0),B='"'.charCodeAt(0),z="'".charCodeAt(0),U=" ".charCodeAt(0),q="	".charCodeAt(0),j=";".charCodeAt(0),K=":".charCodeAt(0),G="{".charCodeAt(0),$="}".charCodeAt(0),X="[".charCodeAt(0),Y="]".charCodeAt(0),Z=",".charCodeAt(0),Q=".".charCodeAt(0),J="!".charCodeAt(0),et=[h,v,l,m,u,g,M,M],tt={};tt[j]=n.SemiColon,tt[K]=n.Colon,tt[G]=n.CurlyL,tt[$]=n.CurlyR,tt[Y]=n.BracketR,tt[X]=n.BracketL,tt[M]=n.ParenthesisL,tt[N]=n.ParenthesisR,tt[Z]=n.Comma;var nt={};nt.em=n.EMS,nt.ex=n.EXS,nt.px=n.Length,nt.cm=n.Length,nt.mm=n.Length,nt["in"]=n.Length,nt.pt=n.Length,nt.pc=n.Length,nt.deg=n.Angle,nt.rad=n.Angle,nt.grad=n.Angle,nt.ms=n.Time,nt.s=n.Time,nt.hz=n.Freq,nt.khz=n.Freq,nt["%"]=n.Percentage,nt.dpi=n.Resolution,nt.dpcm=n.Resolution;var rt=function(){function e(){this.ignoreComment=!0}return e.prototype.setSource=function(e){this.stream=new r(e)},e.prototype.finishToken=function(e,t){return e.len=this.stream.pos()-e.offset,e.type=t,e.text=this.stream.substring(e.offset),e},e.prototype.substring=function(e,t){return this.stream.substring(e,e+t)},e.prototype.pos=function(){return this.stream.pos()},e.prototype.goBackTo=function(e){this.stream.goBackTo(e)},e.prototype.scan=function(e){void 0===e&&(e=!0);var t={type:void 0,text:void 0,offset:this.stream.pos(),len:0};if(this.whitespace())return e?this.scan(e):this.finishToken(t,n.Whitespace);if(this.comment())return this.ignoreComment?this.scan(e):this.finishToken(t,r);if(this.stream.eos())return this.finishToken(t,n.EOF);var r=this.url();if(null!==r)return this.finishToken(t,r);if(this.ident())return this.finishToken(t,n.Ident);if(this.stream.advanceIfChar(O))return this.stream.advanceIfChars([o,a,i,l,c,s,d])?this.finishToken(t,n.Charset):this.ident()?this.finishToken(t,n.AtKeyword):this.finishToken(t,n.Delim);if(this.stream.advanceIfChar(A))return this.name()?this.finishToken(t,n.Hash):this.finishToken(t,n.Delim);if(this.stream.advanceIfChar(J))return this.finishToken(t,n.Exclamation);if(this._number()){var u=this.stream.pos();if(this.stream.advanceIfChar(x))return this.finishToken(t,n.Percentage);if(this.dimension()){var h=this.stream.substring(u).toLowerCase(),r=nt[h];return"undefined"!=typeof r?this.finishToken(t,r):this.finishToken(t,n.Dimension)}return this.finishToken(t,n.Num)}var r=this._string();if(null!==r)return this.finishToken(t,r);if(this.stream.advanceIfChars([I,J,T,T]))return this.finishToken(t,n.CDO);if(this.stream.advanceIfChars([T,T,P]))return this.finishToken(t,n.CDC);var r=tt[this.stream.peekChar()];return"undefined"!=typeof r?(this.stream.advance(1),this.finishToken(t,r)):this.stream.peekChar(0)===C&&this.stream.peekChar(1)===S?(this.stream.advance(2),this.finishToken(t,n.Includes)):this.stream.peekChar(0)===E&&this.stream.peekChar(1)===S?(this.stream.advance(2),this.finishToken(t,n.Dashmatch)):this.stream.peekChar(0)===L&&this.stream.peekChar(1)===S?(this.stream.advance(2),this.finishToken(t,n.SubstringOperator)):this.stream.peekChar(0)===w&&this.stream.peekChar(1)===S?(this.stream.advance(2),this.finishToken(t,n.PrefixOperator)):this.stream.peekChar(0)===R&&this.stream.peekChar(1)===S?(this.stream.advance(2),this.finishToken(t,n.SuffixOperator)):(this.stream.nextChar(),this.finishToken(t,n.Delim))},e.prototype.matchWordAnyCase=function(e){var t=0;return this.stream.advanceWhileChar(function(n){var r=e[t]===n||e[t+1]===n;return r&&(t+=2),r}),t===e.length?!0:(this.stream.goBack(t/2),!1)},e.prototype.comment=function(){if(this.stream.advanceIfChars([W,L])){var e=!1,t=!1;return this.stream.advanceWhileChar(function(n){return t&&n===W?(e=!0,!1):(t=n===L,!0)}),e&&this.stream.advance(1),!0}return!1},e.prototype._number=function(){var e,t=0;return this.stream.peekChar()===Q&&(t=1),e=this.stream.peekChar(t),e>=_&&b>=e?(this.stream.advance(t+1),this.stream.advanceWhileChar(function(e){return e>=_&&b>=e||0===t&&e===Q}),!0):!1},e.prototype._string=function(){if(this.stream.peekChar()===z||this.stream.peekChar()===B){var e=this.stream.nextChar(),t=!1,r=-1;return this.stream.advanceWhileChar(function(n){switch(r=n,n){case D:return t=!0,!0;case V:case F:case H:case e:var i=t;return t=!1,i;default:return t=!1,!0}}),r===e?(this.stream.nextChar(),n.String):n.BadString}return null},e.prototype.url=function(){if(this.matchWordAnyCase(et)){this.whitespace();var e=n.URI,t=this._string();return t===n.BadString?e=n.BadUri:null===t&&(this.stream.advanceWhileChar(function(e){return e!==N}),e=n.URI),this.whitespace(),this.stream.advanceIfChar(N)?e:n.BadUri}return null},e.prototype.whitespace=function(){var e=this.stream.advanceWhileChar(function(e){return e===U||e===q||e===F||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===T&&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>=i&&p>=e||e>=f&&y>=e||e>=128&&65535>=e?!0:!1},e.prototype.nmchar=function(e){return this.nmstart(e)||e===T||e>=_&&b>=e?!0:!1},e}();t.Scanner=rt}),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){void 0===e&&(e=new r.Scanner),this.scanner=e,this.token=null,this.prevToken=null}return e.prototype.peek=function(e,t,n){return void 0===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){void 0===n&&(n=!0);for(var r=0;r<t.length;r++)if(this.peek(e,t[r],n))return this.consumeToken(),!0;return!1},e.prototype.accept=function(e,t,n){return void 0===n&&(n=!0),this.peek(e,t,n)?(this.consumeToken(),!0):!1},e.prototype.resync=function(e,t){for(;;){if(e&&-1!==e.indexOf(this.token.type))return this.consumeToken(),!0;if(t&&-1!==t.indexOf(this.token.type))return!0;if(this.token.type===r.TokenType.EOF)return!1;this.token=this.scanner.scan()}return!1},e.prototype.createNode=function(e){return new i.Node(this.token.offset,this.token.len,e)},e.prototype.create=function(e){return n.create(e,this.token.offset,this.token.len)},e.prototype.finish=function(e,t,n,r){return e instanceof i.Nodelist||(t&&this.markError(e,t,n,r),null!==this.prevToken&&(e.length=this.prevToken.offset+this.prevToken.len-e.offset)),e},e.prototype.markError=function(e,t,n,r){this.token!==this.lastErrorToken&&(e.addIssue(new i.Marker(e,t,o.Level.Error,null,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(n||r)&&this.resync(n,r)},e.prototype.openBrackets=function(e){e.begin(this.prevToken.offset,this.prevToken.len)},e.prototype.closeBrackets=function(e){e.end(this.prevToken.offset,this.prevToken.len)},e.prototype.parseStylesheet=function(e){var t=e.getVersionId(),n=function(n,r){if(e.getVersionId()!==t)throw new Error("Underlying model has changed, AST is no longer valid");var i=e.getRangeFromOffsetAndLength(n,r);return e.getValueInRange(i)};return this.internalParse(e.getValue(),this._parseStylesheet,n)},e.prototype.internalParse=function(e,t,n){this.scanner.setSource(e),this.token=this.scanner.scan();var r=t.bind(this)();return r&&(r.textProvider=n?n:function(t,n){return e.substr(t,n)}),r},e.prototype._parseStylesheet=function(){return this.create(i.Stylesheet);},e.prototype._parseStylesheetStatement=function(){return this._parseRuleset()||this._parseImport()||this._parseMedia()||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseMSViewPort()||this._parseNamespace()},e.prototype._tryParseRuleset=function(){var e=this.mark();if(this._parseSelector()){for(;this.accept(r.TokenType.Comma)&&this._parseSelector(););if(this.accept(r.TokenType.CurlyL))return this.restoreAtMark(e),this._parseRuleset()}return this.restoreAtMark(e),null},e.prototype._parseRuleset=function(){var e=this.create(i.RuleSet);if(!e.getSelectors().addChild(this._parseSelector()))return null;for(;this.accept(r.TokenType.Comma)&&e.getSelectors().addChild(this._parseSelector()););return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},e.prototype._parseRuleSetDeclaration=function(){return this._parseDeclaration()},e.prototype._needsSemicolonAfter=function(e){switch(e.type){case i.NodeType.Keyframe:case i.NodeType.MSViewPort:case i.NodeType.Media:case i.NodeType.Ruleset:case i.NodeType.Media:case i.NodeType.Namespace:case i.NodeType.If:case i.NodeType.For:case i.NodeType.Each:case i.NodeType.While:case i.NodeType.MixinDeclaration:case i.NodeType.FunctionDeclaration:return!1;case i.NodeType.VariableDeclaration:case i.NodeType.ExtendsReference:case i.NodeType.MixinContent:case i.NodeType.ReturnStatement:case i.NodeType.MediaQuery:case i.NodeType.Debug:case i.NodeType.Import:return!0;case i.NodeType.MixinReference:return!e.getContent();case i.NodeType.Declaration:return!e.getNestedProperties()}return!1},e.prototype._parseDeclarations=function(e){for(var t=this.create(i.Declarations),n=e();t.addChild(n)&&!this.peek(r.TokenType.CurlyR);){if(this._needsSemicolonAfter(n)&&!this.accept(r.TokenType.SemiColon))return this.finish(t,s.ParseError.SemiColonExpected,[r.TokenType.SemiColon],[r.TokenType.CurlyR]);for(;this.accept(r.TokenType.SemiColon););n=e()}return this.finish(t)},e.prototype._parseBody=function(e,t){return this.accept(r.TokenType.CurlyL)?(this.openBrackets(e.getBrackets()),e.setDeclarations(this._parseDeclarations(t)),this.accept(r.TokenType.CurlyR)?(this.closeBrackets(e.getBrackets()),this.finish(e)):this.finish(e,s.ParseError.RightCurlyExpected,[r.TokenType.CurlyR,r.TokenType.SemiColon])):this.finish(e,s.ParseError.LeftCurlyExpected,[r.TokenType.CurlyR,r.TokenType.SemiColon])},e.prototype._parseSelector=function(){for(var e=this.create(i.Selector),t=!1;e.addChild(this._parseSimpleSelector());)t=!0,e.addChild(this._parseCombinator());return t?this.finish(e):null},e.prototype._parseDeclaration=function(e){var t=this.create(i.Declaration);return t.setProperty(this._parseProperty())?this.accept(r.TokenType.Colon)?(t.colonPosition=this.prevToken.offset,t.setValue(this._parseExpr())?(t.addChild(this._parsePrio()),this.peek(r.TokenType.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)):this.finish(t,s.ParseError.PropertyValueExpected)):this.finish(t,s.ParseError.ColonExpected,[r.TokenType.Colon],e):null},e.prototype._tryToParseDeclaration=function(){var e=this.mark();return this._parseProperty()&&this.accept(r.TokenType.Colon)?(this.restoreAtMark(e),this._parseDeclaration()):(this.restoreAtMark(e),null)},e.prototype._parseProperty=function(){var e=this.create(i.Property);return e.setIdentifier(this._parseIdent())?this.finish(e):null},e.prototype._parseCharset=function(){var e=this.create(i.Node);return this.accept(r.TokenType.Charset)?this.accept(r.TokenType.String)?this.accept(r.TokenType.SemiColon)?this.finish(e):this.finish(e,s.ParseError.SemiColonExpected):this.finish(e,s.ParseError.IdentifierExpected):null},e.prototype._parseImport=function(){var e=this.create(i.Import);return this.accept(r.TokenType.AtKeyword,"@import")?this.accept(r.TokenType.URI)||this.accept(r.TokenType.String)?(e.setMedialist(this._parseMediaList()),this.finish(e)):this.finish(e,s.ParseError.URIOrStringExpected):null},e.prototype._parseNamespace=function(){var e=this.create(i.Namespace);return this.accept(r.TokenType.AtKeyword,"@namespace")?(e.addChild(this._parseIdent()),this.accept(r.TokenType.URI)||this.accept(r.TokenType.String)?this.accept(r.TokenType.SemiColon)?this.finish(e):this.finish(e,s.ParseError.SemiColonExpected):this.finish(e,s.ParseError.URIExpected,[r.TokenType.SemiColon])):null},e.prototype._parseFontFace=function(){if(!this.peek(r.TokenType.AtKeyword,"@font-face"))return null;var e=this.create(i.FontFace);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},e.prototype._parseMSViewPort=function(){if(!this.peek(r.TokenType.AtKeyword,"@-ms-viewport"))return null;var e=this.create(i.MSViewPort);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},e.prototype._parseKeyframe=function(){var e=this.create(i.Keyframe),t=this.create(i.Node);return this.accept(r.TokenType.AtKeyword,"@keyframes")||this.accept(r.TokenType.AtKeyword,"@-webkit-keyframes")||this.accept(r.TokenType.AtKeyword,"@-ms-keyframes")||this.accept(r.TokenType.AtKeyword,"@-moz-keyframes")||this.accept(r.TokenType.AtKeyword,"@-o-keyframes")?(e.setKeyword(this.finish(t)),"@-ms-keyframes"===t.getText()&&this.markError(t,s.ParseError.UnknownKeyword),e.setIdentifier(this._parseIdent([i.ReferenceType.Keyframe]))?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,s.ParseError.IdentifierExpected,[r.TokenType.CurlyR])):null},e.prototype._parseKeyframeSelector=function(){var e=this.create(i.KeyframeSelector);if(!e.addChild(this._parseIdent())&&!this.accept(r.TokenType.Percentage))return null;for(;this.accept(r.TokenType.Comma);)if(!e.addChild(this._parseIdent())&&!this.accept(r.TokenType.Percentage))return this.finish(e,s.ParseError.PercentageExpected);
return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},e.prototype._parseMediaDeclaration=function(){return this._tryToParseDeclaration()||this._parseStylesheetStatement()},e.prototype._parseMedia=function(){var e=this.create(i.Media);if(!this.accept(r.TokenType.AtKeyword,"@media"))return null;if(!e.addChild(this._parseMediaQuery([r.TokenType.CurlyL])))return this.finish(e,s.ParseError.IdentifierExpected);for(;this.accept(r.TokenType.Comma);)if(!e.addChild(this._parseMediaQuery([r.TokenType.CurlyL])))return this.finish(e,s.ParseError.IdentifierExpected);return this._parseBody(e,this._parseMediaDeclaration.bind(this))},e.prototype._parseMediaQuery=function(e){var t=this.create(i.MediaQuery),n=!0,o=!1;if(!this.peek(r.TokenType.ParenthesisL)){if(this.accept(r.TokenType.Ident,"only",!0)||this.accept(r.TokenType.Ident,"not",!0),!t.addChild(this._parseIdent()))return null;o=!0,n=this.accept(r.TokenType.Ident,"and",!0)}for(;n;){if(!this.accept(r.TokenType.ParenthesisL))return o?this.finish(t,s.ParseError.LeftParenthesisExpected,[],e):null;if(!t.addChild(this._parseMediaFeatureName()))return this.finish(t,s.ParseError.IdentifierExpected,[],e);if(this.accept(r.TokenType.Colon)&&!t.addChild(this._parseExpr()))return this.finish(t,s.ParseError.TermExpected,[],e);if(!this.accept(r.TokenType.ParenthesisR))return this.finish(t,s.ParseError.RightParenthesisExpected,[],e);n=this.accept(r.TokenType.Ident,"and",!0)}return t},e.prototype._parseMediaFeatureName=function(){return this._parseIdent()},e.prototype._parseMediaList=function(){var e=this.create(i.Medialist);if(e.getMediums().addChild(this._parseMedium())){for(;this.accept(r.TokenType.Comma);)if(!e.getMediums().addChild(this._parseMedium()))return this.finish(e,s.ParseError.IdentifierExpected);return this.finish(e)}return null},e.prototype._parseMedium=function(){var e=this.create(i.Node);return e.addChild(this._parseIdent())?this.finish(e):null},e.prototype._parsePageDeclaration=function(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()},e.prototype._parsePage=function(){var e=this.create(i.Page);if(!this.accept(r.TokenType.AtKeyword,"@Page"))return null;if(e.addChild(this._parsePageSelector()))for(;this.accept(r.TokenType.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,s.ParseError.IdentifierExpected);return this._parseBody(e,this._parsePageDeclaration.bind(this))},e.prototype._parsePageMarginBox=function(){var e=this.create(i.PageBoxMarginBox);return this.peek(r.TokenType.AtKeyword)?(this.acceptOne(r.TokenType.AtKeyword,a.getPageBoxDirectives())||this.markError(e,s.ParseError.UnknownAtRule,[],[r.TokenType.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))):null},e.prototype._parsePageSelector=function(){var e=this.create(i.Node);return this.peek(r.TokenType.Ident)||this.peek(r.TokenType.Colon)?(e.addChild(this._parseIdent()),this.accept(r.TokenType.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,s.ParseError.IdentifierExpected):this.finish(e)):null},e.prototype._parseOperator=function(){var e=this.createNode(i.NodeType.Operator);return this.accept(r.TokenType.Delim,"/")||this.accept(r.TokenType.Delim,"*")||this.accept(r.TokenType.Delim,"+")||this.accept(r.TokenType.Delim,"-")||this.accept(r.TokenType.Dashmatch)||this.accept(r.TokenType.Includes)||this.accept(r.TokenType.SubstringOperator)||this.accept(r.TokenType.PrefixOperator)||this.accept(r.TokenType.SuffixOperator)||this.accept(r.TokenType.Delim,"=")?this.finish(e):null},e.prototype._parseUnaryOperator=function(){var e=this.create(i.Node);return this.accept(r.TokenType.Delim,"+")||this.accept(r.TokenType.Delim,"-")?this.finish(e):null},e.prototype._parseCombinator=function(){var e=this.create(i.Node);return this.accept(r.TokenType.Delim,">")?(e.type=i.NodeType.SelectorCombinatorParent,this.finish(e)):this.accept(r.TokenType.Delim,"+")?(e.type=i.NodeType.SelectorCombinatorSibling,this.finish(e)):this.accept(r.TokenType.Delim,"~")?(e.type=i.NodeType.SelectorCombinatorAllSiblings,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(r.TokenType.Hash)&&!this.peek(r.TokenType.Delim,"#"))return null;var e=this.createNode(i.NodeType.IdentifierSelector);if(this.accept(r.TokenType.Delim,"#")){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(r.TokenType.Delim,"."))return null;var e=this.createNode(i.NodeType.ClassSelector);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.createNode(i.NodeType.ElementNameSelector);return e.addChild(this._parseSelectorIdent())||this.accept(r.TokenType.Delim,"*")?this.finish(e):null},e.prototype._parseAttrib=function(){if(!this.peek(r.TokenType.BracketL))return null;var e=this.createNode(i.NodeType.AttributeSelector);return this.consumeToken(),!e.addChild(this._parseBinaryExpr()),this.accept(r.TokenType.BracketR)?this.finish(e):this.finish(e,s.ParseError.RightSquareBracketExpected)},e.prototype._parsePseudo=function(){if(!this.peek(r.TokenType.Colon))return null;var e=this.mark(),t=this.createNode(i.NodeType.PseudoSelector);return this.consumeToken(),!this.hasWhitespace()&&this.accept(r.TokenType.Colon),this.hasWhitespace()?(this.restoreAtMark(e),null):t.addChild(this._parseIdent())?this.hasWhitespace()||!this.accept(r.TokenType.ParenthesisL)||(t.addChild(this._parseBinaryExpr()||this._parseSimpleSelector()),this.accept(r.TokenType.ParenthesisR))?this.finish(t):this.finish(t,s.ParseError.RightParenthesisExpected):this.finish(t,s.ParseError.IdentifierExpected)},e.prototype._parsePrio=function(){if(!this.peek(r.TokenType.Exclamation))return null;var e=this.createNode(i.NodeType.Prio);return this.accept(r.TokenType.Exclamation)&&this.accept(r.TokenType.Ident,"important",!0)?this.finish(e):null},e.prototype._parseExpr=function(e){void 0===e&&(e=!1);var t=this.create(i.Expression);if(!t.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(r.TokenType.Comma)){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);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(r.TokenType.Num)||this.accept(r.TokenType.Percentage)||this.accept(r.TokenType.Resolution)||this.accept(r.TokenType.Length)||this.accept(r.TokenType.EMS)||this.accept(r.TokenType.EXS)||this.accept(r.TokenType.Angle)||this.accept(r.TokenType.Time)||this.accept(r.TokenType.Dimension)||this.accept(r.TokenType.Freq)?this.finish(e):null},e.prototype._parseStringLiteral=function(){var e=this.createNode(i.NodeType.StringLiteral);return this.accept(r.TokenType.String)||this.accept(r.TokenType.BadString)?this.finish(e):null},e.prototype._parseURILiteral=function(){var e=this.createNode(i.NodeType.URILiteral);return this.accept(r.TokenType.URI)||this.accept(r.TokenType.BadUri)?this.finish(e):null},e.prototype._parseIdent=function(e){var t=this.create(i.Identifier);return e&&(t.referenceTypes=e),this.accept(r.TokenType.Ident)?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(r.TokenType.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(r.TokenType.Comma);)if(!t.getArguments().addChild(this._parseFunctionArgument()))return this.finish(t,s.ParseError.ExpressionExpected);return this.accept(r.TokenType.ParenthesisR)?this.finish(t):this.finish(t,s.ParseError.RightParenthesisExpected)},e.prototype._parseFunctionIdentifier=function(){var e=this.create(i.Identifier);if(e.referenceTypes=[i.ReferenceType.Function],this.accept(r.TokenType.Ident,"progid")){if(this.accept(r.TokenType.Colon))for(;this.accept(r.TokenType.Ident)&&this.accept(r.TokenType.Delim,"."););return this.finish(e)}return this.accept(r.TokenType.Ident)?this.finish(e):null},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.HexColorValue);return this.accept(r.TokenType.Hash)?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 n.NodeType.SelectorCombinator:case n.NodeType.SelectorPlaceholder:case n.NodeType.ElementNameSelector:t.name="*"===e.getText()?"element":e.getText();break;case n.NodeType.ClassSelector:t.addAttr("class",e.getText().substring(1));break;case n.NodeType.IdentifierSelector:t.addAttr("id",e.getText().substring(1));break;case n.NodeType.MixinDeclaration:t.addAttr("class",e.getName());break;case n.NodeType.PseudoSelector:t.addAttr(e.getText(),r.empty);break;case n.NodeType.AttributeSelector:var i,o=e.getChildren()[0];if(o.getRight())switch(o.getOperator().getText()){case"|=":i=r.format("{0}-…",h.remove(o.getRight().getText()));break;case"^=":i=r.format("{0}…",h.remove(o.getRight().getText()));break;case"$=":i=r.format("…{0}",h.remove(o.getRight().getText()));break;case"~=":i=r.format(" … {0} … ",h.remove(o.getRight().getText()));break;case"*=":i=r.format("…{0}…",h.remove(o.getRight().getText()));break;default:i=h.remove(o.getRight().getText())}t.addAttr(o.getLeft().getText(),i)}}),t}function o(e){var t=i(e),n=new p('"').print(t);return{tagName:"span",className:"selector",children:n}}function s(e){switch(e.type){case n.NodeType.MixinDeclaration:case n.NodeType.Stylesheet: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 t=a(e),n=new p('"').print(t);return{tagName:"span",className:"selector",children:n}}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;r<this.children.length;r++)t.addChild(this.children[r].clone());return t},e}();t.Element=l;var c=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t}(l);t.RootElement=c;var d=function(e){function t(t){e.call(this),this.name=t}return __extends(t,e),t}(l);t.LabelElement=d;var h,p=function(){function e(e){this.quote=e}return e.prototype.print=function(e){return e instanceof c?this.doPrint(e.children):this.doPrint([e])},e.prototype.doPrint=function(e){for(var t={children:[]},n=t;e.length>0;){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 d)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:h.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}(h||(h={})),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 t=this;e.getChildren().forEach(function(e){if(e instanceof n.SimpleSelector){if(t.prev instanceof n.SimpleSelector){var r=new d("…");t.element.addChild(r),t.element=r}else!t.prev||"+"!==t.prev.getText()&&"~"!==t.prev.getText()||(t.element=t.element.parent);t.prev&&"~"===t.prev.getText()&&(t.element.addChild(i(e)),t.element.addChild(new d("⋮")));var o=i(e);t.element.addChild(o),t.element=o}(e instanceof n.SimpleSelector||e.type===n.NodeType.SelectorCombinatorParent||e.type===n.NodeType.SelectorCombinatorSibling||e.type===n.NodeType.SelectorCombinatorAllSiblings)&&(t.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),l),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),l),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),l),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){void 0===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<e.length;r++)e[r].name.toLowerCase()===t&&n.push(e[r]);return n},e.prototype.fetchWithValue=function(e,t,n){for(var r=[],i=0;i<e.length;i++)if(e[i].name.toLowerCase()===t){var o=e[i].node.getValue();o&&this.findValueInExpression(o,n)&&r.push(e[i])}return r},e.prototype.findValueInExpression=function(e,t){var n=!1;return e.accept(function(e){return e.type===i.NodeType.Identifier&&e.getText()===t&&(n=!0),!n}),n},e.prototype.fetchWithin=function(e,t){for(var n=[],r=0;r<e.length;r++)e[r].name.toLowerCase().indexOf(t)>=0&&n.push(e[r]);return n},e.prototype.getEntries=function(e){return void 0===e&&(e=s.Level.Warning|s.Level.Error),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;n<t.length;n++){var r=e.indexOf(t[n]);-1!==r&&(e[r]=null)}for(var i=null,n=0;n<e.length;n++){var s=e[n];s&&(i=null===i?o.localize("vs_languages_css_services_lint",0,s):o.localize("vs_languages_css_services_lint",1,i,s))}return i},e.prototype.visitNode=function(e){switch(e.type){case i.NodeType.Stylesheet:return this.visitStylesheet(e);case i.NodeType.FontFace:return this.visitFontFace(e);case i.NodeType.Ruleset:return this.visitRuleSet(e);case i.NodeType.SimpleSelector:return this.visitSimpleSelector(e);case i.NodeType.Function:return this.visitFunction(e);case i.NodeType.NumericValue:return this.visitNumericValue(e);case i.NodeType.Import:return this.visitImport(e)}return this.visitUnknownNode(e)},e.prototype.visitStylesheet=function(e){var t=this,n=new u;e.accept(function(e){if(e instanceof i.Keyframe){var t=e.getKeyword(),r=t.getText();n.add(e.getName(),r,"@keyframes"!==r?t:null)}return!0});var s=["@-webkit-keyframes","@-moz-keyframes","@-o-keyframes"],a=function(e){if(d){var n=o.localize("vs_languages_css_services_lint",2);t.addEntry(e,r.Rules.IncludeStandardPropertyWhenUsingVendorPrefix,n)}if(h){var n=o.localize("vs_languages_css_services_lint",3,h);t.addEntry(e,r.Rules.AllVendorPrefixes,n)}};for(var l in n.data){var c=n.data[l].names,d=-1===c.indexOf("@keyframes");if(d||1!==c.length){var h=this.getMissingNames(s,c);(h||d)&&n.data[l].nodes.forEach(a)}}return!0},e.prototype.visitSimpleSelector=function(e){return"*"===e.getText()&&this.addEntry(e,r.Rules.UniversalSelector),0===e.getText().indexOf("#")&&this.addEntry(e,r.Rules.AvoidIdSelector),!0},e.prototype.visitImport=function(e){return this.addEntry(e,r.Rules.ImportStatemement),!0},e.prototype.visitRuleSet=function(t){var s=this;t.getDeclarations().hasChildren()||this.addEntry(t.getSelectors(),r.Rules.EmptyRuleSet);var l=this,c=[];if(t.getDeclarations().getChildren().forEach(function(e){if(e instanceof i.Declaration){var t=e;c.push(new a(t.getFullPropertyName(),t))}},this),(this.fetch(c,"width").length>0||this.fetch(c,"height").length>0)&&(this.fetchWithin(c,"padding").length>0||this.fetchWithin(c,"border").length>0)){for(var d=this.fetch(c,"width"),h=0;h<d.length;h++)this.addEntry(d[h].node,r.Rules.NoWidthOrHeightWhenPaddingOrBorder);d=this.fetch(c,"height");for(var h=0;h<d.length;h++)this.addEntry(d[h].node,r.Rules.NoWidthOrHeightWhenPaddingOrBorder);d=this.fetchWithin(c,"padding");for(var h=0;h<d.length;h++)this.addEntry(d[h].node,r.Rules.NoWidthOrHeightWhenPaddingOrBorder);d=this.fetchWithin(c,"border");for(var h=0;h<d.length;h++)this.addEntry(d[h].node,r.Rules.NoWidthOrHeightWhenPaddingOrBorder)}var p=this.fetchWithValue(c,"display","inline");p.length>0&&["width","height","margin-top","margin-bottom","float"].forEach(function(e){for(var t=l.fetch(c,e),n=0;n<t.length;n++)l.addEntry(t[n].node,r.Rules.PropertyIgnoredDueToDisplay)});var p=this.fetchWithValue(c,"display","inline-block");if(p.length>0)for(var f=this.fetch(c,"float"),h=0;h<f.length;h++)this.addEntry(f[h].node,r.Rules.PropertyIgnoredDueToDisplay);var p=this.fetchWithValue(c,"display","block");if(p.length>0)for(var f=this.fetch(c,"vertical-align"),h=0;h<f.length;h++)this.addEntry(f[h].node,r.Rules.PropertyIgnoredDueToDisplay);t.accept(function(e){return e.type===i.NodeType.Prio&&l.addEntry(e,r.Rules.AvoidImportant),!0});for(var d=this.fetch(c,"float"),h=0;h<d.length;h++)this.addEntry(d[h].node,r.Rules.AvoidFloat);for(var g=0;g<c.length;g++){var m=c[g];if("background"!==m.name.toLowerCase()){var v=m.node.getValue();if(v&&"-"!==v.getText()[0]){var d=this.fetch(c,m.name);if(d.length>1)for(var y=0;y<d.length;y++){var v=d[y].node.getValue();v&&"-"!==v.getText()[0]&&d[y]!==m&&this.addEntry(m.node,r.Rules.DuplicateDeclarations)}}}}var _=new u,b=!1;if(t.getDeclarations().getChildren().forEach(function(e){if(s.isCSSDeclaration(e)){var t=e,i=t.getFullPropertyName();if(0===i.indexOf("-")){n.isKnownProperty(i)||s.addEntry(t.getProperty(),r.Rules.UnknownVendorSpecificProperty);var o=t.getNonPrefixedPropertyName();_.add(o,i,t.getProperty())}else n.isKnownProperty(i)||s.addEntry(t.getProperty(),r.Rules.UnknownProperty),_.add(i,i,null)}else b=!0}),!b){var C=function(e){if(T){var t=o.localize("vs_languages_css_services_lint",4,w);s.addEntry(e,r.Rules.IncludeStandardPropertyWhenUsingVendorPrefix,t)}if(M){var t=o.localize("vs_languages_css_services_lint",5,M);s.addEntry(e,r.Rules.AllVendorPrefixes,t)}};for(var w in _.data){var S=_.data[w],E=S.names,T=n.isKnownProperty(w)&&-1===E.indexOf(w);if(T||1!==E.length){for(var k=[],g=0,x=e.prefixes.length;x>g;g++){var L=e.prefixes[g];n.isKnownProperty(L+w)&&k.push(L+w)}var M=this.getMissingNames(k,E);(M||T)&&S.nodes.forEach(C)}}}return!0},e.prototype.visitNumericValue=function(e){var t=e.getValue();return"%"===t.unit?!0:(0===parseFloat(t.value)&&t.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){if(e.type===i.NodeType.HexColorValue){var t=e.getText();7!==t.length&&4!==t.length&&this.addEntry(e,r.Rules.HexColorLength)}return!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}();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/languages/css/services/cssLanguageService","vs/languages/css/services/languageFacts","vs/languages/css/services/browsers","./services/occurrences","vs/languages/css/services/intelliSense","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","vs/editor/modes/supports"],function(e,t,n,r,i,o,s,a,u,l,c,d,h,p,f,g,m,v,y){var _=function(e){function t(t,n,r){e.call(this,t,n,r),this.languageService=this.createLanguageService(t,n.getId()),this.lintSettings={}}return __extends(t,e),t.prototype._createInPlaceReplaceSupport=function(){return new y.InplaceReplaceSupport(this.resourceService,this)},t.prototype.createLanguageService=function(e,t){return new a.CSSLanguageService(e.resourceService,this.createParser.bind(this),t)},t.prototype.createParser=function(){return new f.Parser},t.prototype._doConfigure=function(e){if(e){var t=e.validationSettings;return this.lintSettings=t&&t.lint?v.sanitize(t.lint):{},o.TPromise.as(!0)}return o.TPromise.as(!1)},t.prototype.doValidate=function(e){var t=this;this.languageService.join().then(function(){var n=t.resourceService.get(e),r=t.languageService.getStylesheet(e),i=[];i.push.apply(i,h.ParseErrorCollector.entries(r)),i.push.apply(i,t.collectLintEntries(r));var o=i.filter(function(e){return e.getLevel()!==p.Level.Ignore}).map(function(e){return t._createMarkerData(n,e)});t.markerService.changeOne(t._getMode().getId(),e,o)})},t.prototype._createMarkerData=function(e,t){var n=e.getRangeFromOffsetAndLength(t.getOffset(),t.getLength());return{code:0,message:t.getMessage(),severity:t.getLevel()===p.Level.Warning?r.Warning:r.Error,startLineNumber:n.startLineNumber,startColumn:n.startColumn,endLineNumber:n.endLineNumber,endColumn:n.endColumn}},t.prototype.collectLintEntries=function(e){return m.LintVisitor.entries(e,this.lintSettings)},t.prototype.createIntellisense=function(){return new d.CSSIntellisense},t.prototype.doSuggest=function(e,t){var n=this;return this.languageService.join().then(function(){var r=n.resourceService.get(e),i=n.createIntellisense().getCompletionsAtPosition(n.languageService,r,e,t);return i})},t.prototype.getRangesToPosition=function(e,t){var n=this;return this.languageService.join().then(function(){for(var r=n.resourceService.get(e),i=r.getOffsetFromPosition(t),o=n.languageService.getStylesheet(e),s=h.getNodePath(o,i),a=[],u=0;u<s.length;u++){var l=s[u];if(-1!==l.offset&&-1!==l.length&&(!l.parent||l.parent.offset!==l.offset||l.parent.length!==l.length)&&(a.push({type:"node",range:n._range(l,r)}),l instanceof h.Brackets)){var c={offset:l.exclusiveOffset,length:l.exclusiveLength};a.push({type:"node",range:n._range(c,r)})}}return a})},t.prototype.getOutline=function(e){var t=this;return this.languageService.join().then(function(){var r=t.resourceService.get(e),i=t.languageService.getStylesheet(e),o=[];return i.accept(function(e){var i={label:null,type:"rule",range:null,children:[]};return e instanceof h.Selector?i.label=e.getText():e instanceof h.VariableDeclaration?(i.label=e.getName(),i.type="variable"):e instanceof h.MixinDeclaration?(i.label=e.getName(),i.type="method"):e instanceof h.FunctionDeclaration?(i.label=e.getName(),i.type="function"):e instanceof h.Keyframe?i.label=n.localize("vs_languages_css_cssWorker",0,e.getName()):e instanceof h.FontFace&&(i.label=n.localize("vs_languages_css_cssWorker",1)),i.label&&(i.range=t._range(e,r,!0),o.push(i)),!0}),o})},t.prototype.computeInfo=function(e,t){var n=this;return this.languageService.join().then(function(){for(var r=n.resourceService.get(e),i=r.getOffsetFromPosition(t),o=n.languageService.getStylesheet(e),s=h.getNodePath(o,i),a=0;a<s.length;a++){var u=s[a];if(u instanceof h.Selector)return{htmlContent:[g.selectorToHtml(u)],range:n._range(u,r)};if(u instanceof h.SimpleSelector)return{htmlContent:[g.simpleSelectorToHtml(u)],range:n._range(u,r)}}return null})},t.prototype.findDeclaration=function(e,t){var n=this;return this.languageService.join().then(function(){var r=n.resourceService.get(e),i=r.getOffsetFromPosition(t),o=c.findDeclaration(n.languageService.getStylesheet(e),i);return o?{resourceUrl:e,range:n._range(o,r,!0)}:null})},t.prototype.findOccurrences=function(e,t){var n=this;return this.languageService.join().then(function(){var r=n.resourceService.get(e),i=r.getOffsetFromPosition(t),o=c.findOccurrences(n.languageService.getStylesheet(e),i);return o.map(function(e){return{range:n._range(e.node,r),kind:e.kind}})})},t.prototype.findReferences=function(e,t){var n=this;return this.languageService.join().then(function(){var r=n.resourceService.get(e),i=r.getOffsetFromPosition(t),o=c.findOccurrences(n.languageService.getStylesheet(e),i);return o.map(function(e){return{resourceUrl:r.getAssociatedResource(),range:n._range(e.node,r)}})})},t.prototype.navigateValueSetFallback=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),c=h.getNodeAtOffset(a,s);if(c){var d=h.getParentDeclaration(c);if(d){var p=l.getProperties()[d.getFullPropertyName()];if(p&&p.values){for(var f=p.restrictions.indexOf("color")>=0,g=p.values.filter(function(e){return f?!!u.colors[e.name.toLowerCase()]:u.isCommonValue(e)}),m=c.getText(),v=0,y=g.length;y>v;v++)if(i.equalsIgnoreCase(g[v].name,m)){var _=v;n?_=(v+1)%y:(_=v-1,0>_&&(_=y-1));var b={value:g[_].name,range:r._range(c,o)};return b}if(g.length>0){var b={value:g[0].name,range:r._range(c,o)};return b}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 u.isColorValue(e)&&i.push({range:t._range(e,n),value:e.getText()}),!0}),i})},t.prototype._range=function(e,t,n){if(void 0===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}(s.AbstractWorkerMode);t.CSSWorker=_});
/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/languages/css/cssWorker.nls.keys",[],{vs_languages_css_cssSnippets:{path:"vs/languages/css/cssSnippets.js",keys:["transition.snippet"]},vs_languages_css_parser_cssErrors:{path:"vs/languages/css/parser/cssErrors.js",keys:["expected.number","expected.condt","expected.ruleorselector","expected.dot","expected.colon","expected.semicolon","expected.term","expected.expression","expected.operator","expected.ident","expected.percentage","expected.uriorstring","expected.uri","expected.varname","expected.varvalue","expected.propvalue","expected.lcurly","expected.rcurly","expected.lsquare","expected.rsquare","expected.lparen","expected.rparent","expected.comma","expected.pagedirordecl","unknown.atrule","unknown.keyword","expected.selector","expected.stringliteral"]},vs_languages_css_services_lintRules:{path:"vs/languages/css/services/lintRules.js",keys:["rule.vendorprefixes.all","rule.standardvendorprefix.all","rule.duplicateDeclarations","rule.emptyRuleSets","rule.importDirective","rule.withHeightAndBorderPadding","rule.universalSelector","rule.zeroWidthUnit","rule.fontFaceProperties","rule.hexColor","rule.colorFunction","rule.unkownProperty","rule.unkownVendorSpecificProperty","rule.propertyIgnoredDueToDisplay","rule.avoidImportant","rule.avoidFloat","rule.avoidIdSelector"]},vs_languages_css_services_lint:{path:"vs/languages/css/services/lint.js",keys:["namelist.single","namelist.concatenated","keyframes.standardrule.missing","keyframes.vendorspecific.missing","property.standard.missing","property.vendorspecific.missing"]},vs_languages_css_cssWorker:{path:"vs/languages/css/cssWorker.js",keys:["literal.keyframes","literal.fontface"]}});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
"use strict";define("vs/languages/css/monacoParticipant",["require","exports","vs/languages/css/parser/cssParser","vs/languages/css/parser/cssNodes","vs/base/severity"],function(e,t,n,r,i){var o=function(){function e(e,t){this.markerCollector=e,this.mirrorModel=t}return e.prototype.visitNode=function(e){if(e.type!==r.NodeType.Selector)return!0;for(var t=e,n=t.getChildren(),o=0;o<n.length;o++)if(n[o]instanceof r.SimpleSelector){var s=n[o],a=s.getText();if("."===a.charAt(0)&&(a=a.substr(1)),"#"===a.charAt(0)&&(a=a.substr(1)),-1===a.indexOf("monaco")){var u=this.mirrorModel.getPositionFromOffset(s.offset),l={severity:i.Warning,message:"Global css selector",startLineNumber:u.lineNumber,startColumn:u.column,endLineNumber:u.lineNumber,endColumn:u.column};this.markerCollector.push(l)}}return!0},e}(),s=function(){function e(){}return e.prototype.validate=function(t,r){var i=new n.Parser,s=i.parseStylesheet(t),a=[];s.accept(new o(a,t)),r.changeOne(e.ID,t.getAssociatedResource(),a)},e.ID="vs/languages/css/monacoParticipant",e}();t.WorkerParticipant=s});/*---------------------------------------------------------
 * 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,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/html/html",["require","exports","vs/editor/modes/modes","vs/editor/modes/modesExtensions","vs/editor/modes/supports","vs/platform/platform","vs/platform/services","vs/base/lib/winjs.base","vs/platform/thread/attribute"],function(e,t,n,r,i,o,s,a,u){!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"}(t.States||(t.States={}));var l=t.States,c=["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param"],d=["script","style"],h=/^tag\.html\./,p=function(e){function t(t,n,r,i,o,s,a){e.call(this,t),this.kind=n,this.lastTagName=r,this.lastAttributeName=i,this.embeddedContentType=o,this.attributeValueQuote=s,this.attributeValue=a}return __extends(t,e),t.escapeTagName=function(e){return"tag.html.tag-"+e.replace(/:/g,"-")},t.prototype.makeClone=function(){return new t(this.getMode(),this.kind,this.lastTagName,this.lastAttributeName,this.embeddedContentType,this.attributeValueQuote,this.attributeValue)},t.prototype.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n)&&this.kind===n.kind&&this.lastTagName===n.lastTagName&&this.lastAttributeName===n.lastAttributeName&&this.embeddedContentType===n.embeddedContentType&&this.attributeValueQuote===n.attributeValueQuote&&this.attributeValue===n.attributeValue:!1},t.prototype.nextName=function(e){return e.advanceIfRegExp(/^[_:\w][_:\w-.\d]*/).toLowerCase()},t.prototype.tokenize=function(e){switch(this.kind){case l.WithinComment:if(e.advanceUntilString2("-->",!1))return{type:"comment.html.content"};if(e.advanceIfString2("-->"))return this.kind=l.Content,{type:"comment.html",bracket:n.Bracket.Close};break;case l.WithinDoctype:if(e.advanceUntilString2(">",!1))return{type:"meta.content.html"};if(e.advanceIfString2(">"))return this.kind=l.Content,{type:"meta.html",bracket:n.Bracket.Close};break;case l.Content:if(e.advanceIfCharCode2("<".charCodeAt(0))){if(!e.eos()&&"!"===e.peek()){if(e.advanceIfString2("!--"))return this.kind=l.WithinComment,{type:"comment.html",bracket:n.Bracket.Open};if(e.advanceIfStringCaseInsensitive2("!DOCTYPE"))return this.kind=l.WithinDoctype,{type:"meta.html",bracket:n.Bracket.Open}}return e.advanceIfCharCode2("/".charCodeAt(0))?(this.kind=l.OpeningEndTag,{type:"delimiter.end.html",bracket:n.Bracket.Open}):(this.kind=l.OpeningStartTag,{type:"delimiter.start.html",bracket:n.Bracket.Open})}break;case l.OpeningEndTag:var r=this.nextName(e);return r.length>0?{type:t.escapeTagName(r),bracket:-1!==c.indexOf(r)?-1:n.Bracket.Close}:e.advanceIfString2(">")?(this.kind=l.Content,{type:"delimiter.end.html",bracket:n.Bracket.Close}):(e.advanceUntilString2(">",!1),{type:""});case l.OpeningStartTag: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=l.WithinTag,{type:t.escapeTagName(this.lastTagName),bracket:-1!==c.indexOf(this.lastTagName)?-1:n.Bracket.Open};break;case l.WithinTag:if(e.skipWhitespace2()||e.eos())return{type:""};var i=this.nextName(e);return i.length>0?(this.lastAttributeName=i,this.kind=l.AttributeName,{type:"attribute.name.html"}):e.advanceIfString2("/>")||e.advanceIfCharCode2(">".charCodeAt(0))?-1!==d.indexOf(this.lastTagName)?(this.kind=l.WithinEmbeddedContent,{type:"delimiter.start.html",bracket:n.Bracket.Close}):(this.kind=l.Content,{type:"delimiter.start.html",bracket:n.Bracket.Close}):(e.next2(),{type:""});case l.AttributeName:return e.skipWhitespace2()||e.eos()?{type:""}:e.advanceIfCharCode2("=".charCodeAt(0))?(this.kind=l.AttributeValue,{type:""}):(this.kind=l.WithinTag,this.tokenize(e));case l.AttributeValue:if(e.eos())return{type:""};if(e.skipWhitespace2())return'"'===this.attributeValueQuote||"'"===this.attributeValueQuote?{type:"attribute.value.html"}:{type:""};if('"'!==this.attributeValueQuote&&"'"!==this.attributeValueQuote){var o=e.peek();return"'"===o||'"'===o?(this.attributeValueQuote=o,this.attributeValue=o,e.next2(),{type:"attribute.value.html"}):(this.kind=l.WithinTag,this.tokenize(e))}if(this.attributeValue!==this.attributeValueQuote||"script"!==this.lastTagName&&"style"!==this.lastTagName||"type"!==this.lastAttributeName){if(e.advanceIfCharCode2(this.attributeValueQuote.charCodeAt(0)))this.kind=l.WithinTag,this.attributeValue="",this.attributeValueQuote="";else{var s=e.next();this.attributeValue+=s}return{type:"attribute.value.html"}}if(this.attributeValue=e.advanceUntilString(this.attributeValueQuote,!0),this.attributeValue.length>0)return this.embeddedContentType=this.unquote(this.attributeValue),this.kind=l.WithinTag,this.attributeValue="",this.attributeValueQuote="",{type:"attribute.value.html"}}return e.next2(),this.kind=l.Content,{type:""}},t.prototype.unquote=function(e){var t=0,n=e.length;return'"'===e[0]&&t++,'"'===e[n-1]&&n--,e.substring(t,n)},t}(r.AbstractState);t.State=p;var f=function(e){function t(t,n,r){void 0===r&&(r=s.AsyncDescriptor.create("vs/languages/html/htmlWorker","HTMLWorker")),e.call(this,t,n,r),this.tokenizationSupport=new i.TokenizationSupport(this,!0),this.electricCharacterSupport=new i.ElectricCharacterSupport(this),this.formattingSupport=this,this.extraInfoSupport=this,this.referenceSupport=this,this.logicalSelectionSupport=this,this.parameterHintsSupport=this}return __extends(t,e),t.prototype.asyncCtor=function(){var e=this;return a.Promise.join([g.getOrCreateMode("text/javascript"),g.getOrCreateMode("text/css")]).then(function(t){var n=e._getAutoClosingPairs(t);e.characterPairSupport=new i.CharacterPairSupport(e,n.slice(0),[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}])})},t.prototype.getNonWordTokenTypes=function(){return["delimiter.html"]},t.prototype._getAutoClosingPairs=function(e){var t=this,n={'"':'"',"'":"'"};e.forEach(function(e){return t._collectAutoClosingPairs(n,e)});var r,i=[];for(r in n)i.push({open:r,close:n[r]});return i},t.prototype._collectAutoClosingPairs=function(e,t){if(t&&t.characterPairSupport){var n=t.characterPairSupport.getAutoClosingPairs();if(null!==n)for(var r=0;r<n.length;r++)e[n[r].open]=n[r].close}},t.prototype.getTriggerCharacters=function(){var e=[];return this._collectTriggerCharacters(e,g.getMode("text/javascript")),this._collectTriggerCharacters(e,g.getMode("text/css")),e},t.prototype._collectTriggerCharacters=function(e,t){if(t&&t.suggestSupport){var n=t.suggestSupport.getTriggerCharacters();n.forEach(function(t){return e.push(t)})}},t.prototype.getParameterHintsTriggerCharacters=function(){var e=[];return this._collectParameterHintsTriggerCharacters(e,g.getMode("text/javascript")),this._collectParameterHintsTriggerCharacters(e,g.getMode("text/css")),e},t.prototype._collectParameterHintsTriggerCharacters=function(e,t){if(t&&t.parameterHintsSupport){var n=t.parameterHintsSupport.getParameterHintsTriggerCharacters();n.forEach(function(t){return e.push(t)})}},t.prototype.getInitialState=function(){return new p(this,l.Content,"","","","","")},t.prototype.enterNestedMode=function(e){return e instanceof p&&e.kind===l.WithinEmbeddedContent},t.prototype.getNestedMode=function(e){var t=null,n=e,r=null;if(null!==n.embeddedContentType)g.isRegisteredMode(n.embeddedContentType)&&(t=g.getMode(n.embeddedContentType),t||(r=g.getOrCreateMode(n.embeddedContentType)));else{var i=null;i="script"===n.lastTagName?"text/javascript":"style"===n.lastTagName?"text/css":"text/plain",t=g.getMode(i)}return null===t&&(t=g.getMode("text/plain")),{mode:t,missingModePromise:r}},t.prototype.getLeavingNestedModeData=function(e,t){var n=t.lastTagName,r=new RegExp("<\\/"+n+"\\s*>","i"),i=r.exec(e);return null!==i?{nestedModeBuffer:e.substring(0,i.index),bufferAfterNestedMode:e.substring(i.index),stateAfterNestedMode:new p(this,l.Content,"","","","","")}:null},t.prototype.getElectricCharacters=function(){var e={">":!0,"/":!0};return this.collectElectricCharactersFromMode(e,g.getMode("text/javascript")),this.collectElectricCharactersFromMode(e,g.getMode("text/css")),Object.keys(e)},t.prototype.collectElectricCharactersFromMode=function(e,t){if(t&&t.electricCharacterSupport){var n=t.electricCharacterSupport.getElectricCharacters();if(null!==n)for(var r=0;r<n.length;r++)e[n[r]]=!0}},t.prototype.onEnter=function(e,t){if(0===e.getTokenCount())return null;for(var r=e.findIndexOfOffset(t-1),i=r;i>0&&""===e.getTokenType(i);)i--;return 0>i||"delimiter.start.html"!==e.getTokenType(i)?null:"/>"===e.getTokenText(i)?null:(i=r+1,i<e.getTokenCount()&&"delimiter.end.html"===e.getTokenType(i)?{indentAction:n.IndentAction.IndentOutdent}:{indentAction:n.IndentAction.Indent})},t.prototype.onElectricCharacter=function(e,t){var n=e.getLineContent();if(""===n)return null;var r=e.findIndexOfOffset(t),i={startIndex:e.getTokenStartIndex(r),type:e.getTokenType(r)};if(!i)return null;if(r>1){var o=n.substring(i.startIndex,r===e.getTokenCount()-1?n.length:e.getTokenStartIndex(r+1));if("delimiter.end.html"===i.type&&"</"===o){var s;do s=i.startIndex,r--,i={startIndex:e.getTokenStartIndex(r),type:e.getTokenType(r)};while(r>=0&&i&&0!==i.type.indexOf("tag.html.tag-"));if(r>=0&&i){var a=n.substring(i.startIndex,s)+">";return{appendText:a,advanceCount:a.length}}return null}if("delimiter.start.html"===i.type&&">"===o){var s;do s=i.startIndex,r--,i={startIndex:e.getTokenStartIndex(r),type:e.getTokenType(r)};while(r>=0&&i&&0!==i.type.indexOf("tag.html.tag-"));return r>=0&&i?{appendText:"</"+n.substring(i.startIndex,s)+">"}:null}}if("delimiter.start.html"===i.type&&"/>"===o)return null;do r--;while(r>=0&&""===e.getTokenType(r));return 0>r||!h.test(e.getTokenType(r))?null:{matchBracketType:e.getTokenType(r)}},t.prototype.getWordDefinition=function(){return t.WORD_DEFINITION},t.prototype.getCommentsConfiguration=function(){return{blockCommentStartToken:"<!--",blockCommentEndToken:"-->"}},t.prototype._worker=function(t){return e.prototype._worker.call(this,t)},t.prototype.formatDocument=function(e,t){return this._worker(function(n){return n.format(e,null,t)})},t.prototype.formatRange=function(e,t,n){return this._worker(function(r){return r.format(e,t,n)})},t.prototype.computeInfo=function(e,t){return this._delegateToModeAtPosition(e,t,function(e,n){return e&&n.getMode().extraInfoSupport?n.getMode().extraInfoSupport.computeInfo(n.getAssociatedResource(),t):void 0})},t.prototype.canFindReferences=function(e,t){var n=this;return i.handleEvent(this,e,t,function(e,t,r){return e.getId()!==n.getId()&&e.referenceSupport?e.referenceSupport.canFindReferences(t,r):!1})},t.prototype.findReferences=function(e,t,n){return this._delegateToModeAtPosition(e,t,function(e,r){return e&&r.getMode().referenceSupport?r.getMode().referenceSupport.findReferences(r.getAssociatedResource(),t,n):void 0})},t.prototype.getRangesToPosition=function(e,t){return this._delegateToModeAtPosition(e,t,function(e,n){return e&&n.getMode().logicalSelectionSupport?n.getMode().logicalSelectionSupport.getRangesToPosition(n.getAssociatedResource(),t):void 0})},t.prototype.canFindDeclaration=function(e,t){var n=this;return i.handleEvent(this,e,t,function(e,t,r){return e.getId()!==n.getId()&&e.declarationSupport?e.declarationSupport.canFindDeclaration(t,r):!1})},t.prototype.findDeclaration=function(e,t){return this._delegateToModeAtPosition(e,t,function(e,n){return e&&n.getMode().declarationSupport?n.getMode().declarationSupport.findDeclaration(n.getAssociatedResource(),t):void 0})},t.prototype.findOccurrences=function(e,t,n){var r=this;return void 0===n&&(n=!1),this._delegateToModeAtPosition(e,t,function(i,o){return i&&o.getMode().occurrencesSupport?o.getMode().occurrencesSupport.findOccurrences(o.getAssociatedResource(),t,n):r._worker(function(r){return r.findOccurrences(e,t,n)})})},t.prototype.suggest=function(e,t){var n=this;return this._delegateToModeAtPosition(e,t,function(r,i){return r&&i.getMode().suggestSupport?i.getMode().suggestSupport.suggest(i.getAssociatedResource(),t):n._worker(function(n){return n.suggest(e,t)})})},t.prototype.findColorDeclarations=function(e){return this._delegateToAllModes(e,function(e){var t=[];return t=e.filter(function(e){return"function"==typeof e.getMode().findColorDeclarations}).map(function(e){return e.getMode().findColorDeclarations(e.getAssociatedResource())}),a.TPromise.join(t).then(function(e){var t=[];return e.forEach(function(e){return t=t.concat(e)}),t})})},t.prototype.getParameterHints=function(e,t){return this._delegateToModeAtPosition(e,t,function(e,n){return e&&n.getMode().parameterHintsSupport?n.getMode().parameterHintsSupport.getParameterHints(n.getAssociatedResource(),t):void 0})},t.WORD_DEFINITION=r.createWordRegExp("#-?%"),t.$formatDocument=u.OneWorker(t,t.prototype.formatDocument),t.$formatRange=u.OneWorker(t,t.prototype.formatRange),t.$computeInfo=u.OneWorker(t,t.prototype.computeInfo),t.$findReferences=u.OneWorker(t,t.prototype.findReferences),t.$getRangesToPosition=u.OneWorker(t,t.prototype.getRangesToPosition),t.$findDeclaration=u.OneWorker(t,t.prototype.findDeclaration),t.$findOccurrences=u.OneWorker(t,t.prototype.findOccurrences),t.$suggest=u.OneWorker(t,t.prototype.suggest),t.$findColorDeclarations=u.OneWorker(t,t.prototype.findColorDeclarations),t.$getParameterHints=u.OneWorker(t,t.prototype.getParameterHints),t}(r.AbstractMode);t.HTMLMode=f;var g=o.Registry.as(r.Extensions.EditorModes)});/*---------------------------------------------------------
 * 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 t={style_html:e};return t}),define("vs/languages/html/htmlSnippets",["require","exports","vs/nls!vs/languages/html/htmlWorker"],function(e,t,n){t.snippets=[{type:"snippet",label:"html",codeSnippet:["<!DOCTYPE html>","<html>","<head>",'	<meta charset="utf-8" />','	<meta http-equiv="X-UA-Compatible" content="IE=edge">',"	<title>{{Page Title}}</title>",'	<meta name="viewport" content="width=device-width, initial-scale=1">','	<link rel="stylesheet" type="text/css" media="screen" href="{{main.css}}" />','	<script src="{{main.js}}"></script>',"</head>","<body>","	{{}}","</body>","</html>"].join("\n"),documentationLabel:n.localize("vs_languages_html_htmlSnippets",0)},{type:"snippet",label:"ul",codeSnippet:'<ul class="{{my_list}}">\n	<li>{{item 1}}</li>\n	<li>{{item 2}}</li>\n	<li>{{item 3}}</li>\n</ul>',documentationLabel:n.localize("vs_languages_html_htmlSnippets",1)},{type:"snippet",label:"ol",codeSnippet:'<ol class="{{my_list}}">\n	<li>{{item 1}}</li>\n	<li>{{item 2}}</li>\n	<li>{{item 3}}</li>\n</ol>',documentationLabel:n.localize("vs_languages_html_htmlSnippets",2)},{type:"snippet",label:"table",codeSnippet:['<table class="my_table">',"	<tr>","		<td>{{Row 1, Column 1}}</td>","		<td>{{Row 1, Column 2}}</td>","		<td>{{Row 1, Column 3}}</td>","	</tr>","	<tr>","		<td>{{Row 2, Column 1}}</td>","		<td>{{Row 2, Column 2}}</td>","		<td>{{Row 2, Column 3}}</td>","	</tr>","</table>"].join("\n"),documentationLabel:n.localize("vs_languages_html_htmlSnippets",3)},{type:"snippet",label:"js",codeSnippet:'<script src="{{main}}.js"></script>{{}}',documentationLabel:n.localize("vs_languages_html_htmlSnippets",4)},{type:"snippet",label:"script",codeSnippet:'<script src="{{main}}.js"></script>{{}}',documentationLabel:n.localize("vs_languages_html_htmlSnippets",5)},{type:"snippet",label:"css",codeSnippet:'<link rel="stylesheet" type="text/css" media="{{screen}}" href="{{main}}.css" />{{}}',documentationLabel:n.localize("vs_languages_html_htmlSnippets",6)},{type:"snippet",label:"img",codeSnippet:'<img src="{{my_image.png}}" alt="{{Image Description}}" />{{}}',documentationLabel:n.localize("vs_languages_html_htmlSnippets",7)},{type:"snippet",label:"link",codeSnippet:'<a href="{{link}}" target="{{target}}">{{}}</a>',documentationLabel:n.localize("vs_languages_html_htmlSnippets",8)}]});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/html/htmlWorker",["require","exports","vs/base/lib/winjs.base","vs/editor/worker/modesWorker","vs/languages/lib/htmlLib","./htmlSnippets","vs/base/network","vs/editor/core/range","vs/base/strings"],function(e,t,n,r,i,o,s,a,u){var l;!function(e){e[e.LOOKING_FOR_HREF_OR_SRC=1]="LOOKING_FOR_HREF_OR_SRC",e[e.AFTER_HREF_OR_SRC=2]="AFTER_HREF_OR_SRC"}(l||(l={}));var c=function(e){function t(t,n,r){e.call(this,t,n,r),this._requestService=t.requestService}return __extends(t,e),t.prototype.format=function(e,t,r){var o=this.resourceService.get(e),s=t?o.getValueInRange(t):o.getValue(),a=i.style_html(s,{indent_size:r.insertSpaces?r.tabSize:1,indent_char:r.insertSpaces?" ":"	",max_char:120});return n.TPromise.as([{range:t,text:a}])},t.prototype.suggestSnippets=function(){return o.snippets},t._stripQuotes=function(e){return e.replace(/^'([^']+)'$/,function(e,t){return t}).replace(/^"([^"]+)"$/,function(e,t){return t})},t.prototype._getWorkspaceUrl=function(e,n,r){if(r=t._stripQuotes(r),/^\s*javascript\:/i.test(r)||/^\s*\#/i.test(r))return null;if(/^\s*https?:\/\//i.test(r))return r.replace(/^\s*/g,"");if(/^\s*\/\//i.test(r)){var i=e.getScheme(),o="http";return i===s.schemas.https&&(o=s.schemas.https),o+":"+r.replace(/^\s*/g,"")}var a=e.combine(r).toExternal();if(n&&e.startsWith(n)){var l=n.toExternal(),c=u.commonPrefixLength(l,a);return l+a.substr(c)}return a},t.prototype.createLink=function(e,t,n,r,i,o){var s=this._getWorkspaceUrl(e,t,n);return s?{range:{startLineNumber:r,startColumn:i,endLineNumber:r,endColumn:o},url:s}:null},t.prototype._computeHTMLLinks=function(e){var t,n,r,i,o,a,u,c,d,h,p=e.getLineCount(),f=[],g=l.LOOKING_FOR_HREF_OR_SRC,m=e.getAssociatedResource(),v=this._requestService.getRequestUrl("root","",!0),y=v?new s.URL(v):null;for(t=1;p>=t;t++)for(n=e.getLineContent(t),r=n.length,i=e.getLineTokens(t),u=0,a=i.getTokenCount();a>u;u++)switch(o=i.getTokenType(u)){case"":break;case"attribute.name.html":g===l.LOOKING_FOR_HREF_OR_SRC&&(c=i.getTokenEndIndex(u,r),d=n.substring(i.getTokenStartIndex(u),c).toLowerCase(),("src"===d||"href"===d)&&(g=l.AFTER_HREF_OR_SRC));break;case"attribute.value.html":g===l.AFTER_HREF_OR_SRC&&(c=i.getTokenEndIndex(u,r),d=n.substring(i.getTokenStartIndex(u),c),h=this.createLink(m,y,d,t,i.getTokenStartIndex(u)+2,c),h&&f.push(h),g=l.LOOKING_FOR_HREF_OR_SRC);default:0===o.indexOf("tag.html")?g=l.LOOKING_FOR_HREF_OR_SRC:g===l.AFTER_HREF_OR_SRC&&(g=l.LOOKING_FOR_HREF_OR_SRC)}return f},t.prototype.computeLinks=function(t){var n=this;return e.prototype.computeLinks.call(this,t).then(function(e){var r,i,o,s,u,l,c,d=n.resourceService.get(t),h=n._computeHTMLLinks(d),p=[];for(r=0,o=0,i=e.length,s=h.length;i>r&&s>o;)u=e[r],l=h[o],a.areIntersectingOrTouching(u.range,l.range)?r++:(c=a.compareRangesUsingStarts(u.range,l.range),0>c?(p.push(u),r++):(p.push(l),o++));for(;i>r;r++)p.push(e[r]);for(;s>o;o++)p.push(h[o]);return p})},t}(r.AbstractWorkerMode);t.HTMLWorker=c});/*---------------------------------------------------------
 * 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","link.snippet"]}});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
"use strict";define("vs/languages/javascript/jsdoc",["require","exports","vs/editor/modes/modes","vs/base/strings"],function(e,t,n,r){function i(e,t){if(0===e.getTokenCount())return null;var n=e.getLineContent(),i=n[t];if("*"!==i)return null;if(n.indexOf("*/",t)>=0)return null;var o=e.findIndexOfOffset(t);return r.startsWith(e.getTokenType(o),"comment.doc")?"/*"!==n.substring(e.getTokenStartIndex(o),t)?null:{appendText:"*/"}:null}function o(e,t){if(0===e.getTokenCount())return null;var i,o,s=e.getLineContent(),a=e.findIndexOfOffset(t);return r.startsWith(e.getTokenType(a),"comment.doc")?(i=s.indexOf("/**"),o=s.indexOf("*/"),-1===i&&-1===o?{indentAction:n.IndentAction.None,appendText:"* "}:-1!==i&&t>=i+3&&-1!==o&&o>=t?{indentAction:n.IndentAction.IndentOutdent,appendText:" * ",indentOutdentAppendText:" "}:-1!==i&&t>=i+3?{indentAction:n.IndentAction.None,appendText:" * "}:null):null}t.onElectricCharacter=i,t.onEnter=o}),define("vs/languages/typescript/features/tokenization",["require","exports","vs/base/strings","vs/base/arrays","vs/base/collections","vs/editor/modes/modes","vs/editor/modes/supports","vs/languages/vsxml/vsxml","vs/editor/modes/stream","vs/languages/typescript/lib/typescriptServices"],function(e,t,n,r,i,o,s,a,u,l){function c(e,t){var n=l.createClassifier({log:function(){}}),r=t===p.TypeScript?v:_,i=t===p.TypeScript?y:b;return{shouldGenerateEmbeddedModels:!1,getInitialState:function(){return new g(e,null,t,f.Unknown)},tokenize:function(e,t,o,s){return d(r,i,n,t,e,o,s)}}}function d(e,t,i,a,u,c){function d(e,t,n){(0===v.tokens.length||void 0!==n||r.tail(v.tokens).type!==t)&&v.tokens.push(new s.Token(e,t,n||o.Bracket.None))}void 0===c&&(c=0);var v={tokens:[],actualStopOffset:c+u.length,endState:new g(a.getMode(),a.getStateData(),a.language,f.Unknown),modeTransitions:[{startIndex:c,mode:a.getMode()}]};if(h(a,c,u,d))return v;var y=i.getClassificationsForLine(u,f.toEndOfLineState(a.errorState),!0),_=a.language===p.TypeScript,b=0;return v.endState.errorState=f.toErrorState(y.finalLexState,u,a.errorState),y.entries.forEach(function(r){var i,s=o.Bracket.None;if(r.classification===l.TokenClass.Punctuation){var h=u.charCodeAt(b);s=m[h]||o.Bracket.None,i=e[h]||t[r.classification],d(b+c,i,s)}else r.classification===l.TokenClass.Comment?a.errorState===f.InDocMultiLineCommentTrivia||u.match(/\/\*\*.*$/)&&!u.match(/^\s*\/\//)?d(b+c,_?"comment.doc.ts":"comment.doc.js",o.Bracket.None):a.errorState===f.InMultiLineCommentTrivia||u.match(/\/\*.*$/)&&!u.match(/^\s*\/\//)?d(b+c,_?"comment.block.ts":"comment.block.js",o.Bracket.None):d(b+c,_?"comment.line.ts":"comment.line.js",o.Bracket.None):d(b+c,t[r.classification]||n.empty,void 0);b+=r.length}),v}function h(e,t,n,r){if(!n.match(C))return!1;var i,s,l=new u.LineStream(n),c=new a.VSXMLExpression(e.getMode(),e);for(l.advanceIfRegExp(C).length>0&&r(t,"comment.vs",o.Bracket.None);!l.eos();){s=l.pos();do{if(i=c.tokenize(l),null===i||void 0===i||(void 0===i.type||null===i.type)&&(void 0===i.nextState||null===i.nextState))throw new Error("Tokenizer must return a valid state");if(i.nextState&&(i.nextState.setStateData(c.getStateData()),c=i.nextState),l.pos()<=s)throw new Error}while(!i.type&&""!==i.type);r(s+t,i.type,i.bracket)}return!0}!function(e){e[e.TypeScript=0]="TypeScript",e[e.EcmaScript5=1]="EcmaScript5"}(t.Language||(t.Language={}));var p=t.Language;t.createTokenizationSupport=c;var f;!function(e){e[e.Unknown=0]="Unknown",e[e.InMultiLineCommentTrivia=1]="InMultiLineCommentTrivia",e[e.InDocMultiLineCommentTrivia=2]="InDocMultiLineCommentTrivia",e[e.InSingleQuoteStringLiteral=3]="InSingleQuoteStringLiteral",e[e.InDoubleQuoteStringLiteral=4]="InDoubleQuoteStringLiteral"}(f||(f={}));var f;!function(e){function t(t){switch(t){case e.InSingleQuoteStringLiteral:return l.EndOfLineState.InSingleQuoteStringLiteral;case e.InDoubleQuoteStringLiteral:return l.EndOfLineState.InDoubleQuoteStringLiteral;case e.InMultiLineCommentTrivia:case e.InDocMultiLineCommentTrivia:return l.EndOfLineState.InMultiLineCommentTrivia}return l.EndOfLineState.Start}function n(t,n,r){switch(t){case l.EndOfLineState.Start:return e.Unknown;case l.EndOfLineState.InSingleQuoteStringLiteral:return e.InSingleQuoteStringLiteral;case l.EndOfLineState.InDoubleQuoteStringLiteral:return e.InDoubleQuoteStringLiteral;case l.EndOfLineState.InMultiLineCommentTrivia:return r===e.InDocMultiLineCommentTrivia||n.match(/\/\*\*.*$/)?e.InDocMultiLineCommentTrivia:e.InMultiLineCommentTrivia}}e.toEndOfLineState=t,e.toErrorState=n}(f||(f={}));var g=function(){function e(e,t,n,r){this._mode=e,this._state=t,this.language=n,this.errorState=r}return e.prototype.clone=function(){return new e(this._mode,this._state,this.language,this.errorState)},e.prototype.equals=function(t){return t===this?!0:t&&t instanceof e?this.errorState===t.errorState:!1},e.prototype.getMode=function(){return this._mode},e.prototype.tokenize=function(){throw new Error},e.prototype.getStateData=function(){return this._state},e.prototype.setStateData=function(e){this._state=e},e}(),m=i.createNumberDictionary();m["(".charCodeAt(0)]=o.Bracket.Open,m[")".charCodeAt(0)]=o.Bracket.Close,m["{".charCodeAt(0)]=o.Bracket.Open,m["}".charCodeAt(0)]=o.Bracket.Close,m["[".charCodeAt(0)]=o.Bracket.Open,m["]".charCodeAt(0)]=o.Bracket.Close;var v=i.createNumberDictionary();v["(".charCodeAt(0)]="delimiter.parenthesis.ts",v[")".charCodeAt(0)]="delimiter.parenthesis.ts",v["{".charCodeAt(0)]="delimiter.bracket.ts",v["}".charCodeAt(0)]="delimiter.bracket.ts",v["[".charCodeAt(0)]="delimiter.array.ts",v["]".charCodeAt(0)]="delimiter.array.ts";var y=i.createNumberDictionary();y[l.TokenClass.Identifier]="identifier.ts",y[l.TokenClass.Keyword]="keyword.ts",y[l.TokenClass.Operator]="delimiter.ts",y[l.TokenClass.Punctuation]="delimiter.ts",y[l.TokenClass.NumberLiteral]="number.ts",y[l.TokenClass.RegExpLiteral]="regexp.ts",y[l.TokenClass.StringLiteral]="string.ts";var _=i.createNumberDictionary();_["(".charCodeAt(0)]="delimiter.parenthesis.js",_[")".charCodeAt(0)]="delimiter.parenthesis.js",_["{".charCodeAt(0)]="delimiter.bracket.js",_["}".charCodeAt(0)]="delimiter.bracket.js",_["[".charCodeAt(0)]="delimiter.array.js",_["]".charCodeAt(0)]="delimiter.array.js";var b=i.createNumberDictionary();b[l.TokenClass.Identifier]="identifier.js",b[l.TokenClass.Keyword]="keyword.js",b[l.TokenClass.Operator]="delimiter.js",b[l.TokenClass.Punctuation]="delimiter.js",b[l.TokenClass.NumberLiteral]="number.js",b[l.TokenClass.RegExpLiteral]="regexp.js",b[l.TokenClass.StringLiteral]="string.js";var C=/^\s*\/\/\//}),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=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return{dispose:function(){return n(e)}}}function i(e){return{dispose:function(){return n(e)}}}function o(e){return{dispose:function(){return e()}}}function s(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return i(e.map(o))}function a(e){if(e){if("function"==typeof e)return e(),null;if(Array.isArray(e)){for(;e.length>0;)e.pop()();return e}return null}return null}t.disposeAll=n,t.combinedDispose=r,t.combinedDispose2=i,t.fnToDisposable=o,t.toDisposable=s,t.cAll=a;var u=function(){function e(e){this._prefix=e,this._lastId=0}return e.prototype.generate=function(){return this._prefix+ ++this._lastId},e}();t.IdGenerator=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/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 i().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/languages/typescript/typescript",["require","exports","vs/platform/platform"],function(e,t,n){var r;!function(e){e.ResourceSetChanged="typescript.resourceSetChanged"}(r=t.Events||(t.Events={}));var i;!function(e){function t(e){i=e}function r(){return i}e.Identifier="vs.languages.typescript",n.Registry.add(e.Identifier,e);var i;e.setProjectResolver=t,e.getProjectResolver=r}(i=t.Extensions||(t.Extensions={}))});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/typescriptMode",["require","exports","vs/base/lib/winjs.base","vs/base/strings","vs/base/lifecycle","vs/base/errors","vs/editor/modes/modesExtensions","vs/editor/modes/supports","vs/base/uuid","vs/languages/javascript/jsdoc","vs/base/arrays","vs/platform/services","vs/languages/typescript/features/tokenization","vs/editor/modes/autoIndentation/autoIndentation","vs/platform/thread/attribute","vs/languages/typescript/typescript"],function(e,t,n,r,i,o,s,a,u,l,c,d,h,p,f,g){var m=new p.Brackets([{tokenType:"delimiter.bracket.ts",open:"{",close:"}",isElectric:!0},{tokenType:"delimiter.array.ts",open:"[",close:"]",isElectric:!0},{tokenType:"delimiter.parenthesis.ts",open:"(",close:")",isElectric:!0}]),v=function(e){function t(t,n){var r=this;e.call(this,t,n,d.AsyncDescriptor.create("vs/languages/typescript/typescriptWorker2","TypeScriptWorker2")),this._disposables=[],this._projectResolverPromise=null,this._projectPromise=null,this._pendingCallbacks=[],this._telemetryService=t.telemetryService,t.eventService&&this._disposables.push(t.eventService.addListener2(g.Events.ResourceSetChanged,function(){return r._joinProjectResolver()})),this.tokenizationSupport=h.createTokenizationSupport(this,h.Language.TypeScript),this.electricCharacterSupport=new a.ElectricCharacterSupport(this,this),this.referenceSupport=this,this.navigateTypesSupport=this,this.extraInfoSupport=this,this.formattingSupport=this,this.declarationSupport=this,this.quickFixSupport=this,this.logicalSelectionSupport=this,this.parameterHintsSupport=this,this.outlineSupport=this,this.emitOutputSupport=this,this.codeLensSupport=this,this.characterPairSupport=new a.CharacterPairSupport(this,[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`"}])}return __extends(t,e),t.prototype.dispose=function(){this._disposables=i.disposeAll(this._disposables)},t.prototype._releaseCallbacks=function(e,t){for(;this._pendingCallbacks.length>0;){var n=this._pendingCallbacks.shift();t?n.error(t):n.completion(e)}},t.prototype._joinProjectResolver=function(){var e=this;if(!this._threadService.isInMainThread)return null;var t,r;if(r=new n.TPromise(function(n,r){t={completion:n,error:r},e._pendingCallbacks.push(t)},function(){var n=e._pendingCallbacks.indexOf(t);n>=0&&(e._pendingCallbacks.splice(n,1),t.error(o.canceled()))}),!this._projectPromise){if(!this._projectResolverPromise){var i=this._getProjectResolverDescription();if(!i)return null;this._projectResolverPromise=this._instantiationService.createInstance(i)}this._projectPromise=this._projectResolverPromise.then(function(e){var t=e.resolve();return n.Promise.is(t)?t:n.TPromise.as({})}).then(function(t){return t?t.hasChanges!==!0&&c.isFalsyOrEmpty(t.added)&&c.isFalsyOrEmpty(t.removed)?null:e._acceptProjectDelta(t):null});var s,a=Date.now(),l=u.v4().asHex();s=setInterval(function(){e._telemetryService.log("typescript.projectResolver.slow",{module:e._getProjectResolverDescription().moduleName,ctor:e._getProjectResolverDescription().ctorName,resolveCallUuid:l,totalWaitTime:Date.now()-a})},2e4),this._projectPromise.done(function(t){clearTimeout(s),e._projectPromise=null,e._releaseCallbacks(t,null)},function(t){clearTimeout(s),e._projectPromise=null,e._releaseCallbacks(null,t)})}return r},t.prototype._getProjectResolverDescription=function(){return g.Extensions.getProjectResolver()},t.prototype._acceptProjectDelta=function(e){return this._worker(function(t){return t.acceptProjectDelta(e)})},t.prototype.getNonWordTokenTypes=function(){return["delimiter.ts","delimiter.parenthesis.ts","delimiter.bracket.ts","delimiter.array.ts"]},t.prototype.getElectricCharacters=function(){return["*"].concat(m.getElectricBrackets())},t.prototype.onEnter=function(e,t){return l.onEnter(e,t)||m.onEnter(e,t)},t.prototype.onElectricCharacter=function(e,t){return l.onElectricCharacter(e,t)||m.onElectricCharacter(e,t)},t.prototype.getCommentsConfiguration=function(){return{lineCommentTokens:["//"],blockCommentStartToken:"/*",blockCommentEndToken:"*/"}},t.prototype.getTriggerCharacters=function(){return["."]},t.prototype.shouldAutotriggerSuggestImpl=function(e,t){if(0===e.getTokenCount())return!1;var n=e.findIndexOfOffset(t-1),r=e.getTokenType(n);return r.indexOf("string")>=0||r.indexOf("comment")>=0||r.indexOf("number")>=0?!1:!0},t.prototype._pickAWorkerToValidate=function(){return this._worker(function(e){return e.enableValidator()})},t.prototype.getOutline=function(e){return this._worker(function(t){return t.getOutline(e)})},t.prototype.findOccurrences=function(e,t,n){return void 0===n&&(n=!1),this._worker(function(r){return r.findOccurrences(e,t,n)})},t.prototype.suggest=function(e,t){return this._worker(function(n){return n.suggest(e,t)})},t.prototype.getSorter=function(){return function(e,t){if("reference"===e.type&&"reference"===t.type){var n=e.label.split("/"),i=t.label.split("/");if(n.length<i.length)return-1;if(n.length>i.length)return 1;for(var o=0;o<n.length;o++){var s=r.localeCompare(n[o],i[o]);if(0!=s)return s}return 0}return"reference"===e.type?-1:"reference"===t.type?1:r.localeCompare(e.label.toLowerCase(),t.label.toLowerCase())}},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){if(0===e.getTokenCount())return!1;var n=e.findIndexOfOffset(t-1),r=e.getTokenType(n);return"string.ts"===r?!1:!0},t.prototype.getEmitOutput=function(e,t){return void 0===t&&(t=void 0),this._worker(function(n){return n.getEmitOutput(e,t)})},t.prototype.getWordDefinition=function(){return t.WORD_DEFINITION},t.prototype.canFindReferences=function(e,t){return s.isLineToken(e,t,"identifier.ts")},t.prototype._worker=function(t){return e.prototype._worker.call(this,t)},t.prototype.findReferences=function(e,t,n){return this._worker(function(r){return r.findReferences(e,t,n)})},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 s.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.canFindTypeDeclaration=function(e,t){return s.isLineToken(e,t,"identifier.ts")},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[";","}","\n"]},t.prototype.formatDocument=function(e,t){return this._worker(function(n){return n.formatDocument(e,t)})},t.prototype.formatRange=function(e,t,n){return this._worker(function(r){return r.formatRange(e,t,n)})},t.prototype.formatAfterKeystroke=function(e,t,n,r){return this._worker(function(i){return i.formatAfterKeystroke(e,t,n,r)})},t.prototype.enableCodeLens=function(){return this._options&&this._options.enableCodeLens===!0},t.prototype.findCodeLensSymbols=function(e){return this._worker(function(t){return t.findCodeLensSymbols(e)})},t.prototype.findCodeLensReferences=function(e,t){return this._worker(function(n){return n.findCodeLensReferences(e,t)})},t.$_acceptProjectDelta=f.AllWorkers(t,t.prototype._acceptProjectDelta),t.$_pickAWorkerToValidate=f.OneWorker(t,t.prototype._pickAWorkerToValidate,t.prototype._joinProjectResolver,d.ThreadAffinity.Group3),t.$getOutline=f.OneWorker(t,t.prototype.getOutline,d.ThreadAffinity.Group1),t.$findOccurrences=f.OneWorker(t,t.prototype.findOccurrences,t.prototype._joinProjectResolver,d.ThreadAffinity.Group2),t.$suggest=f.OneWorker(t,t.prototype.suggest,t.prototype._joinProjectResolver,d.ThreadAffinity.Group2),t.$getSuggestionDetails=f.OneWorker(t,t.prototype.getSuggestionDetails,t.prototype._joinProjectResolver,d.ThreadAffinity.Group2),t.$getParameterHints=f.OneWorker(t,t.prototype.getParameterHints,t.prototype._joinProjectResolver,d.ThreadAffinity.Group2),t.$getEmitOutput=f.OneWorker(t,t.prototype.getEmitOutput,t.prototype._joinProjectResolver,d.ThreadAffinity.Group3),t.WORD_DEFINITION=s.createWordRegExp("$"),t.$findReferences=f.OneWorker(t,t.prototype.findReferences,t.prototype._joinProjectResolver,d.ThreadAffinity.Group3),t.$getNavigateToItems=f.OneWorker(t,t.prototype.getNavigateToItems,t.prototype._joinProjectResolver,d.ThreadAffinity.Group3),t.$quickFix=f.OneWorker(t,t.prototype.quickFix,t.prototype._joinProjectResolver,d.ThreadAffinity.Group2),t.$getRangesToPosition=f.OneWorker(t,t.prototype.getRangesToPosition,d.ThreadAffinity.Group1),t.$findDeclaration=f.OneWorker(t,t.prototype.findDeclaration,t.prototype._joinProjectResolver,d.ThreadAffinity.Group2),t.$findTypeDeclaration=f.OneWorker(t,t.prototype.findTypeDeclaration,t.prototype._joinProjectResolver,d.ThreadAffinity.Group2),t.$computeInfo=f.OneWorker(t,t.prototype.computeInfo,t.prototype._joinProjectResolver,d.ThreadAffinity.Group2),t.$formatDocument=f.OneWorker(t,t.prototype.formatDocument,d.ThreadAffinity.Group1),t.$formatRange=f.OneWorker(t,t.prototype.formatRange,d.ThreadAffinity.Group1),t.$formatAfterKeystroke=f.OneWorker(t,t.prototype.formatAfterKeystroke,d.ThreadAffinity.Group1),t.findCodeLensSymbols=f.OneWorker(t,t.prototype.findCodeLensSymbols,d.ThreadAffinity.Group1),t.findCodeLensReferences=f.OneWorker(t,t.prototype.findCodeLensReferences,t.prototype._joinProjectResolver,d.ThreadAffinity.Group3),t}(s.AbstractMode);t.TypeScriptMode=v}),define("vs/languages/javascript/javascript.extensions",["require","exports","vs/platform/platform"],function(e,t,n){var r;!function(e){function t(e){i=e}function r(){return i}e.Identifier="vs.languages.javascript",n.Registry.add(e.Identifier,e);var i;e.setProjectResolver=t,e.getProjectResolver=r}(r=t.Extensions||(t.Extensions={}))});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/javascript/javascript",["require","exports","vs/base/lib/winjs.base","vs/editor/modes/autoIndentation/autoIndentation","vs/editor/modes/modesExtensions","vs/platform/services","./jsdoc","vs/languages/typescript/features/tokenization","vs/languages/typescript/typescriptMode","vs/editor/modes/supports","vs/languages/javascript/javascript.extensions"],function(e,t,n,r,i,o,s,a,u,l,c){var d=new r.Brackets([{tokenType:"delimiter.bracket.js",open:"{",close:"}",isElectric:!0},{tokenType:"delimiter.array.js",open:"[",close:"]",isElectric:!0},{tokenType:"delimiter.parenthesis.js",open:"(",close:")",isElectric:!0}]),h=function(t){function r(e,n){t.call(this,e,n),this._workerDescriptor=o.AsyncDescriptor.create("vs/languages/javascript/javascriptWorker","JavaScriptWorker"),this.typeDeclarationSupport=void 0,this.quickFixSupport=void 0,this.emitOutputSupport=void 0,this.tokenizationSupport=a.createTokenizationSupport(this,a.Language.EcmaScript5),this.characterPairSupport=new l.CharacterPairSupport(this,[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}])}return __extends(r,t),r.prototype.asyncCtor=function(){var t=this;return this._threadService.isInMainThread?n.Promise.as(this):new n.Promise(function(n){e(["vs/languages/typescript/typescriptWorker2"],function(){n(t)})})},r.prototype._worker=function(e){return t.prototype._worker.call(this,e)},r.prototype._getProjectResolverDescription=function(){return c.Extensions.getProjectResolver()},r.prototype.getNonWordTokenTypes=function(){return["delimiter.js","delimiter.parenthesis.js","delimiter.bracket.js","delimiter.array.js","regexp.js"]},r.prototype.getElectricCharacters=function(){return["*"].concat(d.getElectricBrackets())},r.prototype.onEnter=function(e,t){return s.onEnter(e,t)||d.onEnter(e,t)},r.prototype.onElectricCharacter=function(e,t){return s.onElectricCharacter(e,t)||d.onElectricCharacter(e,t)},r.prototype.getCommentsConfiguration=function(){return{lineCommentTokens:["//"],blockCommentStartToken:"/*",blockCommentEndToken:"*/"}},r.prototype.getTriggerCharacters=function(){return["."]},r.prototype.shouldAutotriggerSuggestImpl=function(e,t){if(0===e.getTokenCount())return!1;var n=e.findIndexOfOffset(t-1),r=e.getTokenType(n);return r.indexOf("string")>=0||r.indexOf("comment")>=0||r.indexOf("number")>=0?!1:!0},r.prototype.getWordDefinition=function(){return r.JS_WORD_DEFINITION},r.prototype.canFindReferences=function(e,t){return i.isLineToken(e,t,"identifier.js")},r.prototype.canFindDeclaration=function(e,t){return i.isLineToken(e,t,"identifier.js","string.js","attribute.value.vs")},r.prototype.getParameterHintsTriggerCharacters=function(){return["(",","]},r.prototype.shouldTriggerParameterHints=function(e,t){if(0===e.getTokenCount())return!1;var n=e.findIndexOfOffset(t-1),r=e.getTokenType(n);return"string.js"===r||"string.escape.js"===r?!1:!0},r.JS_WORD_DEFINITION=i.createWordRegExp("$"),r}(u.TypeScriptMode);t.JSMode=h});/*---------------------------------------------------------
 * 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,t,n,r){var i=function(){function e(e){this._lintSettings=e,this._severities={},this._severities[2322]=this._severities[2323]=this._severities[2345]=n.fromValue(e.forcedTypeConversion),this._severities[2362]=this._severities[2363]=this._severities[2365]=this._severities[2356]=this._severities[2357]=n.fromValue(e.mixedTypesArithmetics),this._severities[2359]=this._severities[2358]=n.fromValue(e.primitivesInInstanceOf),this._severities[2339]=n.fromValue(e.unknownProperty),this._severities[2304]=n.fromValue(e.undeclaredVariables),this._severities[2403]=n.fromValue(e.redeclaredVariables),this._severities[2350]=n.fromValue(e.newOnReturningFunctions)}return e.prototype.classify=function(e){var t=e.code;return 2e3>t?n.Error:2339===t&&r.lookup(this._severities,t)!==n.Ignore&&/The property '[\w\d_]+' does not exist on value of type '(any|{})'\./.test(e.messageText)?n.Ignore:r.lookup(this._severities,t,n.Ignore)},e}();t.JavaScriptDiagnosticsClassifier=i,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:"warning",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}});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/js/textEdits",["require","exports","vs/base/arrays","vs/base/strings","vs/base/collections"],function(e,t,n,r,i){function o(e,t){return-s(e,t)}function s(e,t){return e.offset===t.offset?t.length-e.length:t.offset-e.offset}function a(e){var t={};n.forEach(e,function(e,n){if(e.isInsert()){var r=i.lookupOrInsert(t,e.offset,e);r!==e&&(r.text+=e.text,n())}})}function u(e,t){var n,i=[],o=t.length,u=[],l=[];a(e),e.sort(s);for(var c=0,h=e.length;h>c;c++)n=e[c],i.push(t.substring(n.end,o)),i.push(n.text),o=n.offset,u.push(n.deltaLength),l.push(new d(n.offset,n.text.length,t.substr(n.offset,n.length)));i.push(t.substring(0,o));for(var p=0,c=l.length-1;c>=0;c--)l[c].offset+=p,p+=u[c];return{value:i.reverse().join(r.empty),doEdits:e,undoEdits:l}}function l(e,t,n){"undefined"==typeof n&&(n=h.None),e.sort(o);for(var r,i=0,s=0,a=e.length;a>s;s++)if(r=e[s],r.end<t)i+=r.deltaLength;else{if(r.offset>t)break;r.offset<=t&&r.end>=t&&(n===h.None?i+=Math.min(0,r.offset+(r.length+r.deltaLength)-t):n===h.StickLeft?i+=r.offset-t:n===h.StickRight&&(i+=r.end+r.deltaLength-t))}return t+i}var c=function(){function e(e,t){this.offset=e,this.length=t}return e.from=function(t){return new e(t.offset,t.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(t){return new e(t.offset,t.length).before(this)},e.prototype.contains=function(e){return e.offset>=this.offset&&e.offset<this.end&&e.offset+e.length<=this.end},e.prototype.overlaps=function(t){var n=new e(t.offset,t.length);return this.offset<n.offset&&this.end>=n.offset&&this.end<=n.end||n.offset<this.offset&&n.end>=this.offset&&n.end<=this.end},e}();t.TextSpan=c;var d=function(e){function t(t,n,r){e.call(this,t,n),this.text=r}return __extends(t,e),Object.defineProperty(t.prototype,"deltaLength",{get:function(){return this.text.length-this.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"deltaEnd",{get:function(){return this.end+this.deltaLength},enumerable:!0,configurable:!0}),t.prototype.isInsert=function(){return 0===this.length&&this.text.length>0},t.prototype.isReplace=function(){return this.length>0&&this.text.length>0},t.prototype.isDelete=function(){return this.length>0&&0===this.text.length},t.prototype.equals=function(t){return this.text===t.text&&e.prototype.equals.call(this,t)},t.prototype.toString=function(){return r.format("{0}-{1}/{2}",this.offset,this.length,this.text)},t}(c);t.Edit=d,t.compareAscending=o,t.compareDecending=s,t.apply=u,function(e){e[e.None=0]="None",e[e.StickLeft=1]="StickLeft",e[e.StickRight=2]="StickRight"}(t.TranslationBehaviour||(t.TranslationBehaviour={}));var h=t.TranslationBehaviour;t.translate=l}),define("vs/languages/typescript/js/javaScriptRewriter",["require","exports","vs/base/strings","vs/languages/typescript/lib/typescriptServices","vs/languages/typescript/js/textEdits"],function(e,t,n,r,i){function o(e,t,n){t||(t=r.createSourceFile("fakefilename.ts",n,r.ScriptTarget.ES5,"",!1),r.bindSourceFile(t));for(var o=new u(t),s=0,a=e.length;a>s;s++)e[s].computeEdits(o);return 0===o.edits.length?{value:n,doEdits:[],undoEdits:[]}:i.apply(o.edits,n)}function s(e){return"function"==typeof e.computeEdits&&1===e.computeEdits.length}var a=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}();t.IdentityTranslator=a,t.translate=o;var u=function(){function e(e){this.sourceFile=e,this.sourceUnitStart=e.getStart(),this.edits=[]}return e.prototype.newInsert=function(e,t){var n;"string"==typeof e?(n=this.sourceUnitStart,t=e):n=e,this.edits.push(new i.Edit(n,0,t))},e.prototype.newDelete=function(e,t){this.edits.push(new i.Edit(e,t,n.empty))},e.prototype.newReplace=function(e,t,n){this.edits.push(new i.Edit(e,t,n))},e.prototype.newAppend=function(e){this.edits.push(new i.Edit(this.sourceFile.getFullWidth(),0,e))},e}();t.AnalyzerContext=u,t.isISyntaxRewriter=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/languages/javascript/project/languageServiceHosts",["require","exports","vs/base/strings","vs/editor/core/position","vs/languages/typescript/lib/typescriptServices","vs/languages/typescript/js/javaScriptRewriter","vs/languages/typescript/js/textEdits"],function(e,t,n,r,i,o,s){var a=function(){function e(e){this._delegate=e}return e.prototype.dispose=function(){this._delegate.dispose()},e.prototype.getStateId=function(){return this._delegate.getStateId()},e.prototype.addScriptSnapshot=function(e,t){return this._delegate.addScriptSnapshot(e,t)},e.prototype.removeScriptSnapshot=function(e){return this._delegate.removeScriptSnapshot(e)},e.prototype.getCompilationSettings=function(){return this._delegate.getCompilationSettings()},e.prototype.getScriptFileNames=function(){return this._delegate.getScriptFileNames()},e.prototype.getScriptVersion=function(e){return this._delegate.getScriptVersion(e)},e.prototype.getScriptIsOpen=function(e){return this._delegate.getScriptIsOpen(e)},e.prototype.getScriptSnapshot=function(e){return this._delegate.getScriptSnapshot(e)},e.prototype.getLocalizedDiagnosticMessages=function(){return this._delegate.getLocalizedDiagnosticMessages()},e.prototype.getCancellationToken=function(){return this._delegate.getCancellationToken()},e.prototype.getCurrentDirectory=function(){return this._delegate.getCurrentDirectory()},e.prototype.getDefaultLibFilename=function(e){return this._delegate.getDefaultLibFilename(e)},e.prototype.log=function(e){this._delegate.log(e)},e}();t.DelegateLanguageServiceHost=a;var u=function(){function e(e){this._lineStarts=e.getLineStartPositions()}return e.prototype.getPosition=function(e,t){return i.getPositionFromLineAndCharacter(this._lineStarts,e,t)},e.prototype.getLineAndCharacterFromPosition=function(e){return i.getLineAndCharacterOfPosition(this._lineStarts,e)},e}(),l=function(){function e(e,t,n){this._textOperationResult=e,this._lineMapModified=new u(t),this._lineMapOriginal=new u(n)}return e.prototype.to=function(e){if(r.isIPosition(e))return this._doTranslate(this._textOperationResult.doEdits,this._lineMapOriginal,this._lineMapModified,e,s.TranslationBehaviour.None);var t=e,n=this._doTranslate(this._textOperationResult.doEdits,this._lineMapOriginal,this._lineMapModified,{lineNumber:t.startLineNumber,column:t.startColumn},s.TranslationBehaviour.None),i=this._doTranslate(this._textOperationResult.doEdits,this._lineMapOriginal,this._lineMapModified,{lineNumber:t.endLineNumber,column:t.endColumn},s.TranslationBehaviour.None);return{startLineNumber:n.lineNumber,startColumn:n.column,endLineNumber:i.lineNumber,endColumn:i.column}},e.prototype.from=function(e){if(r.isIPosition(e))return this._doTranslate(this._textOperationResult.undoEdits,this._lineMapModified,this._lineMapOriginal,e,s.TranslationBehaviour.None);var t=e,n=this._doTranslate(this._textOperationResult.undoEdits,this._lineMapModified,this._lineMapOriginal,{lineNumber:t.startLineNumber,column:t.startColumn},s.TranslationBehaviour.StickLeft),i=this._doTranslate(this._textOperationResult.undoEdits,this._lineMapModified,this._lineMapOriginal,{lineNumber:t.endLineNumber,column:t.endColumn},s.TranslationBehaviour.StickRight);return{startLineNumber:n.lineNumber,startColumn:n.column,endLineNumber:i.lineNumber,endColumn:i.column}},e.prototype._doTranslate=function(e,t,n,r,i){var o=t.getPosition(r.lineNumber,r.column),a=s.translate(e,o,i),u=n.getLineAndCharacterFromPosition(a);return{lineNumber:u.line,column:u.character}},Object.defineProperty(e.prototype,"report",{get:function(){return this},enumerable:!0,configurable:!0}),e.prototype.isInserted=function(e){var t;t=r.isIPosition(e)?r.PositionUtils.asEmptyRange(e):e;for(var n=this._lineMapModified.getPosition(t.startLineNumber,t.startColumn),i=this._lineMapModified.getPosition(t.endLineNumber,t.endColumn),o=this._textOperationResult.undoEdits,a=0,u=o.length;u>a;a++)if(o[a].contains(new s.TextSpan(n,i-n)))return!0;return!1},e}(),c=function(){function e(e){this._value=e,this._lineStarts=i.computeLineStarts(e)}return e.prototype.getText=function(e,t){return this._value.substring(e,t)},e.prototype.getLength=function(){return this._value.length},e.prototype.getLineStartPositions=function(){return this._lineStarts},e.prototype.getChangeRange=function(){return null},e}(),d=function(e){function t(t,n){e.call(this,t),this._rewriter=n,this._rewrittenSnapshots=Object.create(null)}return __extends(t,e),t.prototype.dispose=function(){},t.prototype.getScriptSnapshot=function(t){var n=this._getOrCreateRewrittenSnapshot(t);return n?n.snapshot:e.prototype.getScriptSnapshot.call(this,t)},t.prototype.getTranslator=function(e){var t=this._getOrCreateRewrittenSnapshot(e);return t?t.translator:null},t.prototype._getOrCreateRewrittenSnapshot=function(t){if(!n.endsWith(t,".js"))return null;if(!e.prototype.getScriptSnapshot.call(this,t))return null;var r=this.getScriptVersion(t),i=this._rewrittenSnapshots[t];if(!i||i.versionId!==r){var s=e.prototype.getScriptSnapshot.call(this,t),a=o.translate(this._rewriter,null,s.getText(0,s.getLength())),u=new c(a.value);i={versionId:this.getScriptVersion(t),snapshot:u,translator:new l(a,u,s)},this._rewrittenSnapshots[t]=i}return i},t}(a);t.RewritingLanguageServiceHost=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/javascript/project/javascriptProject",["require","exports","vs/languages/typescript/lib/typescriptServices","vs/languages/javascript/project/languageServiceHosts","vs/languages/typescript/project/typescriptProject","vs/languages/typescript/js/javaScriptRewriter"],function(e,t,n,r,i,o){var s=function(e){function t(t,n,r,i,o,s,a,u){e.call(this,t,r,i,o,s,a,u),this._rewriter=n}return __extends(t,e),t.prototype.semanticLanguageService=function(){if(!this._semanticLanguageService){var t=e.prototype.semanticLanguageService.call(this),i=new r.RewritingLanguageServiceHost(t.host,this._rewriter);this._disposables.push(i),this._applyCompileConfig(i.getCompilationSettings());var o=n.createLanguageService(i,n.createDocumentRegistry());o.host=i,this._semanticLanguageService=o}return this._semanticLanguageService},t.prototype.getTranslater=function(e){var t=this.semanticLanguageService().host;return t.getTranslator(e.toExternal())||o.IdentityTranslator.Instance},t}(i.TypeScriptProject);t.JavascriptProject=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/languages/javascript/javascriptWorker",["require","exports","vs/base/strings","vs/base/arrays","vs/editor/modes/modesFilters","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/javascript/project/javascriptProject","vs/languages/typescript/features/validationStrategy"],function(e,t,n,r,i,o,s,a,u,l,c,d){var h=function(e){function t(t,n,r){e.call(this,t,n,r)}return __extends(t,e),t.prototype._doConfigure=function(t){for(var n=a.sanitize(t,u._internalDefaultValidationSettings,u.defaultSuggestSettions),r=0,i=n.validationSettings.length;i>r;r++){var o=new u.JavaScriptDiagnosticsClassifier(n.validationSettings[r].lint);n.validationSettings[r].diagnosticClassifier=o.classify.bind(o)}return e.prototype._doConfigure.call(this,n)},t.prototype._isMirrorModelAndMyMode=function(t){var r=e.prototype._isMirrorModelAndMyMode.call(this,t);if(r)return!0;if(!(t instanceof o.AbstractMirrorModel))return!1;var i=t,s=i.getModeId();if("vs.languages.typescript"!==s)return!1;var a=i.getAssociatedResource().getPath();return n.endsWith(a,"_references.ts")||n.endsWith(a,".d.ts")?!0:!1},t.prototype._createProject=function(e,t,n,r,i){return this._instantiationService.createInstance(c.JavascriptProject,this._getWorkerParticipants(function(e){return l.isISyntaxRewriter(e)}),this._getMode(),e,n,t,r,i)},t.prototype.translator=function(e){var t=this.findProject(e);return t.getTranslater(e)},t.prototype._isRelevantForValidationPurposes=function(e){return n.endsWith(e.toExternal(),".d.ts")||n.endsWith(e.toExternal(),"_references.ts")},t.prototype._shouldValidate=function(e){return!this._isRelevantForValidationPurposes(e)},t.prototype.doValidateOnChange=function(t,n,r){var i=this._shouldValidate.bind(this);e.prototype.doValidateOnChange.call(this,t.filter(i),n.filter(i),r)},t.prototype._shouldIncludeModelInValidation=function(t){if(!(t instanceof o.MirrorModel||t instanceof o.MirrorModelEmbedded))return!1;if(e.prototype._shouldIncludeModelInValidation.call(this,t))return!0;var n=t;return this._isRelevantForValidationPurposes(n.getAssociatedResource())},t.prototype._publishMarkersForResource=function(t,n,i){if(n!==d.ValidationType.Syntax){var o=this.translator(t);r.forEach(i,function(e,t){var n={startLineNumber:e.startLineNumber,startColumn:e.startColumn,endLineNumber:e.endLineNumber,endColumn:e.endColumn};o.report.isInserted(n)?t():(n=o.from(n),e.startLineNumber=n.startLineNumber,e.startColumn=n.startColumn,e.endLineNumber=n.endLineNumber,e.endColumn=n.endColumn)})}return e.prototype._publishMarkersForResource.call(this,t,n,i)},t.prototype.doSuggest=function(t,n){return e.prototype.doSuggest.call(this,t,this.translator(t).to(n))},t.prototype.getSuggestionFilter=function(){return i.and(function(e,t){return t.label.indexOf("̲")<0},e.prototype.getSuggestionFilter.call(this))},t.prototype.getSuggestionDetails=function(t,n,r){return e.prototype.getSuggestionDetails.call(this,t,this.translator(t).to(n),r)},t.prototype.getParameterHints=function(t,n){return e.prototype.getParameterHints.call(this,t,this.translator(t).to(n))},t.prototype.findOccurrences=function(t,n,i){var o=this;return e.prototype.findOccurrences.call(this,t,this.translator(t).to(n),i).then(function(e){return r.forEach(e,function(e,n){o.translator(t).report.isInserted(e.range)?n():e.range=o.translator(t).from(e.range)}),e})},t.prototype._findTypeScriptDeclaration=function(t,n){var r=this;return e.prototype._findTypeScriptDeclaration.call(this,t,this.translator(t).to(n)).then(function(e){if(e){var t=r.translator(e.resourceUrl);if(!t.report.isInserted(e.range))return e.range=t.from(e.range),e}return null})},t.prototype.findReferences=function(t,n,i){var o=this;return e.prototype.findReferences.call(this,t,this.translator(t).to(n),i).then(function(e){return r.forEach(e,function(e,t){var n=o.translator(e.resourceUrl);n.report.isInserted(e.range)?t():e.range=n.from(e.range)}),e})},t.prototype.computeInfo=function(t,n){var r=this;return e.prototype.computeInfo.call(this,t,this.translator(t).to(n)).then(function(e){return e&&(e.range=r.translator(t).from(e.range)),e})},t}(s.TypeScriptWorker2);t.JavaScriptWorker=h});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/languages/javascript/javascriptWorker.nls.keys",[],{});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
"use strict";define("vs/platform/configuration/configurationRegistry",["require","exports","vs/nls!vs/languages/json/json","vs/platform/platform","vs/base/objects"],function(e,t,n,r,i){t.Extensions={Configuration:"base.contributions.configuration"};var o=function(){function e(){this.configurationContributors=[],this.masterConfiguration={id:"configurationFile",title:n.localize("vs_platform_configuration_configurationRegistry",0),description:n.localize("vs_platform_configuration_configurationRegistry",1),type:"object",properties:{type:{type:"string",description:n.localize("vs_platform_configuration_configurationRegistry",2)},languages:{type:"object",description:n.localize("vs_platform_configuration_configurationRegistry",3),properties:{}}}}}return e.prototype.registerConfiguration=function(e){e=i.clone(e),this.configurationContributors.push(e),this.registerConfigurationNode(this.masterConfiguration,e.id.split("/"),e.id)},e.prototype.registerConfigurationNode=function(e,t,n){if(1===t.length)e.properties[t[0]]={type:"ref",$ref:n};else{var r=t.shift();e.properties[r]||(e.properties[r]={type:"object",properties:{}}),this.registerConfigurationNode(e.properties[r],t,n)}},e.prototype.getConfigurations=function(){return this.configurationContributors.slice(0)},e.prototype.getConfigurationSchemas=function(){var e=this.getConfigurations();return e.push(this.masterConfiguration),e},e}();r.Registry.add(t.Extensions.Configuration,new o)}),define("vs/languages/json/features/tokenization",["require","exports","vs/editor/modes/modes","vs/base/json"],function(e,t,n,r){function i(e,t){return{shouldGenerateEmbeddedModels:!1,getInitialState:function(){return new s(e,null,null,!1)},tokenize:function(n,r,i,s){return o(e,t,n,r,i,s)}}}function o(e,t,i,o,a){void 0===a&&(a=0);var u=0,l=!1;switch(o.scanError){case r.ScanError.UnexpectedEndOfString:i='"'+i,u=1;break;case r.ScanError.UnexpectedEndOfComment:i="/*"+i,u=2}var c,d,h=r.createScanner(i),p=o.lastWasColon;for(d={tokens:[],actualStopOffset:i.length,endState:o.clone(),modeTransitions:[{startIndex:0,mode:e}]};;){var f=a+h.getPosition(),g=n.Bracket.None,m="";if(c=h.scan(),c===r.SyntaxKind.EOF)break;if(f===a+h.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+i.substr(h.getPosition(),3));switch(l&&(f-=u),l=u>0,c){case r.SyntaxKind.OpenBraceToken:g=n.Bracket.Open,m="delimiter.bracket.json";break;case r.SyntaxKind.CloseBraceToken:g=n.Bracket.Close,m="delimiter.bracket.json";break;case r.SyntaxKind.OpenBracketToken:g=n.Bracket.Open,m="delimiter.array.json";break;case r.SyntaxKind.CloseBracketToken:g=n.Bracket.Close,m="delimiter.array.json";break;case r.SyntaxKind.ColonToken:m="delimiter.colon.json";break;case r.SyntaxKind.CommaToken:m="delimiter.comma.json";break;case r.SyntaxKind.TrueKeyword:case r.SyntaxKind.FalseKeyword:case r.SyntaxKind.NullKeyword:m="keyword.json";break;case r.SyntaxKind.StringLiteral:m=p?"string.value.json":"string.key.json";break;case r.SyntaxKind.NumericLiteral:m="number.json"}if(t)switch(c){case r.SyntaxKind.LineCommentTrivia:m="comment.line.json";break;case r.SyntaxKind.BlockCommentTrivia:m="comment.block.json"}""!==m&&(p=c===r.SyntaxKind.ColonToken),d.endState=new s(o.getMode(),o.getStateData(),h.getTokenError(),p),d.tokens.push({startIndex:f,type:m,bracket:g})}return d}t.createTokenizationSupport=i;var s=function(){function e(e,t,n,r){this._mode=e,this._state=t,this.scanError=n,this.lastWasColon=r}return e.prototype.clone=function(){return new e(this._mode,this._state,this.scanError,this.lastWasColon)},e.prototype.equals=function(t){return t===this?!0:t&&t instanceof e?this.scanError===t.scanError&&this.lastWasColon===t.lastWasColon:!1},e.prototype.getMode=function(){return this._mode},e.prototype.tokenize=function(){throw new Error},e.prototype.getStateData=function(){return this._state},e.prototype.setStateData=function(e){this._state=e},e}()});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/json/json",["require","exports","vs/platform/configuration/configurationRegistry","vs/editor/modes/autoIndentation/autoIndentation","vs/editor/modes/supports","vs/editor/modes/modesExtensions","vs/platform/platform","vs/nls!vs/languages/json/json","vs/platform/services","vs/platform/thread/attribute","vs/languages/json/features/tokenization"],function(e,t,n,r,i,o,s,a,u,l,c){var d=function(e){function t(n,r){e.call(this,n,r,u.AsyncDescriptor.create("vs/languages/json/jsonWorker","JSONWorker")),this.tokenizationSupport=c.createTokenizationSupport(this,!0),this.electricCharacterSupport=new i.BracketElectricCharacterSupport(this,t._brackets),this.extraInfoSupport=this,this.outlineSupport=this,this.formattingSupport=this,this.characterPairSupport=new i.CharacterPairSupport(this,[{open:"{",close:"}",notIn:["string.json"]},{open:"[",close:"]",notIn:["string.json"]},{open:'"',close:'"',notIn:["string.json"]}])}return __extends(t,e),t.prototype.creationDone=function(){if(e.prototype.creationDone.call(this),this._threadService.isInMainThread){var t=s.Registry.as(n.Extensions.Configuration);this._configureWorkerSchemas(t.getConfigurationSchemas())}},t.prototype.getSerializableState=function(){var e=s.Registry.as(n.Extensions.Configuration);return{schemas:e.getConfigurationSchemas()}},t.prototype.setData=function(e){this._worker(function(t){return t.setConfigurationSchemas(e.schemas)})},t.prototype._worker=function(t){return e.prototype._worker.call(this,t)},t.prototype._configureWorkerSchemas=function(e){return this._worker(function(t){return t.setConfigurationSchemas(e)})},t.prototype.computeInfo=function(e,t){return this._worker(function(n){return n.computeInfo(e,t)})},t.prototype.getOutline=function(e){return this._worker(function(t){return t.getOutline(e)})},t.prototype.formatDocument=function(e,t){return this._worker(function(n){return n.format(e,null,t)})},t.prototype.formatRange=function(e,t,n){return this._worker(function(r){return r.format(e,t,n)})},t.prototype.getOutlineGroupLabel=function(e){switch(e){case"object":return a.localize("vs_languages_json_json",0);case"array":return a.localize("vs_languages_json_json",1);case"string":return a.localize("vs_languages_json_json",2);case"number":return a.localize("vs_languages_json_json",3);case"boolean":return a.localize("vs_languages_json_json",4);case"null":return a.localize("vs_languages_json_json",5)}},t.prototype.getCommentsConfiguration=function(){return{lineCommentTokens:["//"],blockCommentStartToken:"/*",blockCommentEndToken:"*/"}},t.prototype.getNonWordTokenTypes=function(){return["delimiter.json","delimiter.bracket.json","delimiter.array.json"]},t.prototype.shouldAutotriggerSuggestImpl=function(e,t){var n=e.findIndexOfOffset(t),r=e.getTokenType(n);switch(r){case"comment.line.json":case"comment.block.json":return!1;default:return!0}},t.prototype.getWordDefinition=function(){return t.WORD_DEFINITION},t._brackets=new r.Brackets([{tokenType:"delimiter.bracket.json",open:"{",close:"}",isElectric:!0},{tokenType:"delimiter.array.json",open:"[",close:"]",isElectric:!0}]),t.$_configureWorkerSchemas=l.AllWorkers(t,t.prototype._configureWorkerSchemas),t.$computeInfo=l.OneWorker(t,t.prototype.computeInfo),t.$getOutline=l.OneWorker(t,t.prototype.getOutline),t.$formatDocument=l.OneWorker(t,t.prototype.formatDocument),t.$formatRange=l.OneWorker(t,t.prototype.formatRange),t.WORD_DEFINITION=o.createWordRegExp(".-"),t}(o.AbstractMode);t.JSONMode=d});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/languages/json/json.nls.keys",[],{vs_platform_configuration_configurationRegistry:{path:"vs/platform/configuration/configurationRegistry.js",keys:["masterConfigTitle","masterConfigDesc","masterTypeDesc","masterLanguageDesc"]},vs_languages_json_json:{path:"vs/languages/json/json.js",keys:["object","array","string","number","boolean","undefined"]}});/*---------------------------------------------------------
 * 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/json/parser/jsonParser",["require","exports","vs/nls!vs/languages/json/jsonWorker","vs/base/arrays","vs/base/types","vs/base/json"],function(e,t,n,r,i,o){var s=function(){function e(e,t,n,r,i){this.type=t,this.name=n,this.start=r,this.end=i,this.parent=e}return e.prototype.getPath=function(){var e=[];return this.parent?(e=this.parent.getPath(),this.name&&e.push(this.name),e):e},e.prototype.getChildNodes=function(){return[]},e.prototype.getValue=function(){},e.prototype.contains=function(e,t){return void 0===t&&(t=!1),e>=this.start&&e<this.end||t&&e===this.end},e.prototype.visit=function(e){return e(this)},e.prototype.getNodeFromOffset=function(e){var t=function(n){if(e>=n.start&&e<n.end){for(var r=n.getChildNodes(),i=0;i<r.length&&r[i].start<=e;i++){var o=t(r[i]);if(o)return o}return n}return null};return t(this)},e.prototype.getNodeFromOffsetEndInclusive=function(e){var t=function(n){if(e>=n.start&&e<=n.end){for(var r=n.getChildNodes(),i=0;i<r.length&&r[i].start<=e;i++){var o=t(r[i]);if(o)return o}return n}return null};return t(this)},e.prototype.validate=function(e,t,i,o){var s=this;if(void 0===o&&(o=-1),-1===o||this.contains(o)){if(Array.isArray(e.type)?r.contains(e.type,this.type)===!1?t.warnings.push({location:{start:this.start,end:this.end},message:n.localize("vs_languages_json_parser_jsonParser",0,e.type.join())}):e.type.length>0&&(t.typeMatch=!0):e.type&&(this.type!==e.type?t.warnings.push({location:{start:this.start,end:this.end},message:n.localize("vs_languages_json_parser_jsonParser",1,e.type)}):t.typeMatch=!0),Array.isArray(e.allOf)&&e.allOf.forEach(function(e){s.validate(e,t,i,o)}),e.not){var a=new g,u=[];this.validate(e.not,a,u,o),a.hasErrors()||t.warnings.push({location:{start:this.start,end:this.end},message:n.localize("vs_languages_json_parser_jsonParser",2)}),i&&u.forEach(function(e){e.inverted=!e.inverted,i.push(e)})}var l=function(e,r){var o=0,a=null;return e.forEach(function(e){var t=new g,n=[];if(s.validate(e,t,n),t.hasErrors()||o++,a)if(r||t.hasErrors()||a.validationResult.hasErrors()){var i=t.compare(a.validationResult);i>0?a={schema:e,validationResult:t,matchingSchemas:n}:0===i&&a.matchingSchemas.push.apply(a.matchingSchemas,n)}else a.matchingSchemas.push.apply(a.matchingSchemas,n),a.validationResult.propertiesMatches+=t.propertiesMatches,a.validationResult.propertiesValueMatches+=t.propertiesValueMatches;else a={schema:e,validationResult:t,matchingSchemas:n}}),o>1&&r&&t.warnings.push({location:{start:s.start,end:s.start+1},message:n.localize("vs_languages_json_parser_jsonParser",3)}),null!==a&&(t.merge(a.validationResult),t.propertiesMatches+=a.validationResult.propertiesMatches,t.propertiesValueMatches+=a.validationResult.propertiesValueMatches,i&&i.push.apply(i,a.matchingSchemas)),o};Array.isArray(e.anyOf)&&l(e.anyOf,!1),Array.isArray(e.oneOf)&&l(e.oneOf,!0),Array.isArray(e.enum)&&r.contains(e.enum,this.getValue())===!1&&t.warnings.push({location:{start:this.start,end:this.end},message:n.localize("vs_languages_json_parser_jsonParser",4,JSON.stringify(e.enum))}),null!==i&&i.push({node:this,schema:e})}},e}();t.ASTNode=s;var a=function(e){function t(t,n,r,i){e.call(this,t,"null",n,r,i)}return __extends(t,e),t.prototype.getValue=function(){return null},t}(s);t.NullASTNode=a;var u=function(e){function t(t,n,r,i,o){e.call(this,t,"boolean",n,i,o),this.value=r}return __extends(t,e),t.prototype.getValue=function(){return this.value},t}(s);t.BooleanASTNode=u;var l=function(e){function t(t,n,r,i){e.call(this,t,"array",n,r,i),this.items=[]}return __extends(t,e),t.prototype.getChildNodes=function(){return this.items},t.prototype.getValue=function(){return this.items.map(function(e){return e.getValue()})},t.prototype.addItem=function(e){return e?(this.items.push(e),!0):!1},t.prototype.visit=function(e){for(var t=e(this),n=0;n<this.items.length&&t;n++)t=this.items[n].visit(e);return t},t.prototype.validate=function(t,r,i,o){var s=this;if(void 0===o&&(o=-1),-1===o||this.contains(o)){if(e.prototype.validate.call(this,t,r,i,o),Array.isArray(t.items)){var a=t.items;a.forEach(function(e,n){var a=new g,u=s.items[n];u?(u.validate(e,a,i,o),r.mergePropertyMatch(a)):s.items.length>=t.items.length&&r.propertiesValueMatches++}),t.additionalItems===!1&&this.items.length>a.length?r.warnings.push({location:{start:this.start,end:this.end},message:n.localize("vs_languages_json_parser_jsonParser",5,a.length)}):this.items.length>=t.items.length&&(r.propertiesValueMatches+=this.items.length-t.items.length)}else t.items&&this.items.forEach(function(e){var n=new g;e.validate(t.items,n,i,o),r.mergePropertyMatch(n)});if(t.minItems&&this.items.length<t.minItems&&r.warnings.push({location:{start:this.start,end:this.end},message:n.localize("vs_languages_json_parser_jsonParser",6,t.minItems)}),t.maxItems&&this.items.length>t.maxItems&&r.warnings.push({location:{start:this.start,end:this.end},message:n.localize("vs_languages_json_parser_jsonParser",7,t.minItems)}),t.uniqueItems===!0){var u=this.items.map(function(e){return e.getValue()}),l=u.some(function(e,t){return t!==u.lastIndexOf(e)});l&&r.warnings.push({location:{start:this.start,end:this.end},message:n.localize("vs_languages_json_parser_jsonParser",8)})}}},t}(s);t.ArrayASTNode=l;var c=function(e){function t(t,n,r,i){e.call(this,t,"number",n,r,i),this.isInteger=!0,this.value=Number.NaN}return __extends(t,e),t.prototype.getValue=function(){return this.value},t.prototype.validate=function(t,o,s,a){if(void 0===a&&(a=-1),-1===a||this.contains(a)){var u=!1;("integer"===t.type||Array.isArray(t.type)&&r.contains(t.type,"integer"))&&(u=!0),u&&this.isInteger===!0&&(this.type="integer"),e.prototype.validate.call(this,t,o,s,a),this.type="number";var l=this.getValue();i.isNumber(t.multipleOf)&&l%t.multipleOf!==0&&o.warnings.push({location:{start:this.start,end:this.end},message:n.localize("vs_languages_json_parser_jsonParser",9,t.multipleOf)}),i.isUndefined(t.minimum)||(t.exclusiveMinimum&&l<=t.minimum&&o.warnings.push({location:{start:this.start,end:this.end},message:n.localize("vs_languages_json_parser_jsonParser",10,t.minimum)}),!t.exclusiveMinimum&&l<t.minimum&&o.warnings.push({location:{start:this.start,end:this.end},message:n.localize("vs_languages_json_parser_jsonParser",11,t.minimum)})),i.isUndefined(t.maximum)||(t.exclusiveMaximum&&l>=t.maximum&&o.warnings.push({location:{start:this.start,end:this.end},message:n.localize("vs_languages_json_parser_jsonParser",12,t.maximum)}),!t.exclusiveMaximum&&l>t.maximum&&o.warnings.push({location:{start:this.start,end:this.end},message:n.localize("vs_languages_json_parser_jsonParser",13,t.maximum)}))}},t}(s);t.NumberASTNode=c;var d=function(e){function t(t,n,r,i,o){this.isKey=r,this.value="",e.call(this,t,"string",n,i,o)}return __extends(t,e),t.prototype.getValue=function(){return this.value},t.prototype.validate=function(t,r,i,o){if(void 0===o&&(o=-1),(-1===o||this.contains(o))&&(e.prototype.validate.call(this,t,r,i,o),t.minLength&&this.value.length<t.minLength&&r.warnings.push({location:{start:this.start,end:this.end},message:n.localize("vs_languages_json_parser_jsonParser",14,t.minLength)}),t.maxLength&&this.value.length>t.maxLength&&r.warnings.push({location:{start:this.start,end:this.end},message:n.localize("vs_languages_json_parser_jsonParser",15,t.maxLength)}),t.pattern)){var s=new RegExp(t.pattern);s.test(this.value)||r.warnings.push({location:{start:this.start,end:this.end},message:n.localize("vs_languages_json_parser_jsonParser",16,t.pattern)})}},t}(s);t.StringASTNode=d;var h=function(e){function t(t,n){e.call(this,t,"property",null,n.start),this.key=n,n.parent=this,n.name=n.value,this.colonOffset=-1}return __extends(t,e),t.prototype.getChildNodes=function(){return this.value?[this.key,this.value]:[this.key]},t.prototype.setValue=function(e){return this.value=e,null!==e},t.prototype.visit=function(e){return e(this)&&this.key.visit(e)&&this.value&&this.value.visit(e)},t.prototype.validate=function(e,t,n,r){void 0===r&&(r=-1),(-1===r||this.contains(r))&&this.value&&this.value.validate(e,t,n,r)},t}(s);t.PropertyASTNode=h;var p=function(e){function t(t,n,r,i){e.call(this,t,"object",n,r,i),this.properties=[]}return __extends(t,e),t.prototype.getChildNodes=function(){return this.properties},t.prototype.addProperty=function(e){return e?(this.properties.push(e),!0):!1},t.prototype.getFirstProperty=function(e){for(var t=0;t<this.properties.length;t++)if(this.properties[t].key.value===e)return this.properties[t];return null},t.prototype.getKeyList=function(){return this.properties.map(function(e){return e.key.getValue()})},t.prototype.getValue=function(){var e={};return this.properties.forEach(function(t){var n=t.value.getValue();n&&(e[t.key.getValue()]=n)}),e},t.prototype.visit=function(e){for(var t=e(this),n=0;n<this.properties.length&&t;n++)t=this.properties[n].visit(e);return t},t.prototype.validate=function(t,r,o,s){var a=this;if(void 0===s&&(s=-1),-1===s||this.contains(s)){e.prototype.validate.call(this,t,r,o,s);var u={},l=[];this.properties.forEach(function(e){var t=e.key.value;u[t]=e.value,l.push(t)}),Array.isArray(t.required)&&t.required.forEach(function(e){u[e]||r.warnings.push({location:{start:a.start,end:a.start+1},message:n.localize("vs_languages_json_parser_jsonParser",17,e)})});var c=function(e){for(var t=l.indexOf(e);t>=0;)l.splice(t,1),t=l.indexOf(e)};t.properties&&Object.keys(t.properties).forEach(function(e){c(e);var n=t.properties[e],i=u[e];if(i){var a=new g;i.validate(n,a,o,s),r.mergePropertyMatch(a)}}),t.patternProperties&&Object.keys(t.patternProperties).forEach(function(e){var n=new RegExp(e);l.slice(0).forEach(function(i){if(n.test(i)){c(i);var a=u[i];if(a){var l=new g;a.validate(t.patternProperties[e],l,o,s),r.mergePropertyMatch(l)}}})}),i.isObject(t.additionalProperties)?l.forEach(function(e){var n=u[e];if(n){var i=new g;n.validate(t.additionalProperties,i,o,s),r.mergePropertyMatch(i)}}):t.additionalProperties===!1&&l.length>0&&l.forEach(function(e){var t=u[e];if(t){var i=t.parent;r.warnings.push({location:{start:i.key.start,end:i.key.end},message:n.localize("vs_languages_json_parser_jsonParser",18)})}}),t.maxProperties&&this.properties.length>t.maxProperties&&r.warnings.push({location:{start:this.start,end:this.end},message:n.localize("vs_languages_json_parser_jsonParser",19,t.maxProperties)}),t.minProperties&&this.properties.length<t.minProperties&&r.warnings.push({location:{start:this.start,end:this.end},message:n.localize("vs_languages_json_parser_jsonParser",20,t.minProperties)}),i.isObject(t.dependencies)&&Object.keys(t.dependencies).forEach(function(e){var l=u[e];if(l)if(Array.isArray(t.dependencies[e])){var c=t.dependencies[e];c.forEach(function(t){u[t]?r.propertiesValueMatches++:r.warnings.push({location:{start:a.start,end:a.end},message:n.localize("vs_languages_json_parser_jsonParser",21,t,e)})})}else if(i.isObject(t.dependencies[e])){var d=t.dependencies[e],h=new g;a.validate(d,h,o,s),r.mergePropertyMatch(h)}})}},t}(s);t.ObjectASTNode=p;var f=function(){function e(){this.ignoreDanglingComma=!1}return e}();t.JSONDocumentConfig=f;var g=function(){function e(){this.errors=[],this.warnings=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.typeMatch=!1}return e.prototype.hasErrors=function(){return!!this.errors.length||!!this.warnings.length},e.prototype.mergeAll=function(e){var t=this;e.forEach(function(e){t.merge(e)})},e.prototype.merge=function(e){this.errors=this.errors.concat(e.errors),this.warnings=this.warnings.concat(e.warnings)},e.prototype.mergePropertyMatch=function(e){this.merge(e),this.propertiesMatches++,e.hasErrors()||this.propertiesValueMatches++},e.prototype.compare=function(e){var t=this.hasErrors();return t!==e.hasErrors()?t?-1:1:this.typeMatch!==e.typeMatch?e.typeMatch?-1:1:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches},e}();t.ValidationResult=g;var m=function(){function e(e){this.config=e,this.validationResult=new g}return Object.defineProperty(e.prototype,"errors",{get:function(){return this.validationResult.errors},set:function(e){this.validationResult.errors=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"warnings",{get:function(){return this.validationResult.warnings},set:function(e){this.validationResult.warnings=e},enumerable:!0,configurable:!0}),e.prototype.getNodeFromOffset=function(e){return this.root&&this.root.getNodeFromOffset(e)},e.prototype.getNodeFromOffsetEndInclusive=function(e){return this.root&&this.root.getNodeFromOffsetEndInclusive(e)},e.prototype.visit=function(e){this.root&&this.root.visit(e)},e.prototype.validate=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=-1),this.root&&this.root.validate(e,this.validationResult,t,n)},e}();t.JSONDocument=m;var v=function(){function e(){}return e.prototype.parse=function(e,t){function r(e){return T.getToken()===e?(T.scan(),!0):!1}function i(e,t,n,r){if(void 0===t&&(t=null),void 0===n&&(n=[]),void 0===r&&(r=[]),0===E.errors.length||E.errors[0].location.start!==T.getTokenOffset()){var i={message:e,location:{start:T.getTokenOffset(),end:T.getTokenOffset()+T.getTokenLength()}};E.errors.push(i)}if(t&&g(t,!1),n.length+r.length>0)for(var s=T.getToken();s!==o.SyntaxKind.EOF;){if(-1!==n.indexOf(s)){T.scan();break}if(-1!==r.indexOf(s))break;s=T.scan()}return t}function s(){switch(T.getTokenError()){case o.ScanError.InvalidUnicode:return i(n.localize("vs_languages_json_parser_jsonParser",22)),!0;case o.ScanError.InvalidEscapeCharacter:return i(n.localize("vs_languages_json_parser_jsonParser",23)),!0;case o.ScanError.UnexpectedEndOfNumber:return i(n.localize("vs_languages_json_parser_jsonParser",24)),!0;case o.ScanError.UnexpectedEndOfComment:return i(n.localize("vs_languages_json_parser_jsonParser",25)),!0;case o.ScanError.UnexpectedEndOfString:return i(n.localize("vs_languages_json_parser_jsonParser",26)),!0}return!1}function g(e,t){return e.end=T.getTokenOffset()+T.getTokenLength(),t&&T.scan(),e}function v(e,t){if(T.getToken()!==o.SyntaxKind.OpenBracketToken)return null;var s=new l(e,t,T.getTokenOffset());T.scan();var a=0;if(s.addItem(w(s,""+a++)))for(;r(o.SyntaxKind.CommaToken);)s.addItem(w(s,""+a++))||E.config.ignoreDanglingComma||i(n.localize("vs_languages_json_parser_jsonParser",27));return T.getToken()!==o.SyntaxKind.CloseBracketToken?i(n.localize("vs_languages_json_parser_jsonParser",28),s):g(s,!0)}function y(e,t){var r=b(null,null,!0);if(!r){if(T.getToken()===o.SyntaxKind.Unknown){var s=T.getTokenValue();s.length>0&&("'"===s.charAt(0)||o.isLetter(s.charAt(0).charCodeAt(0)))&&i(n.localize("vs_languages_json_parser_jsonParser",29))}return null}var a=new h(e,r);return t[r.value]&&E.warnings.push({location:{start:a.key.start,end:a.key.end},message:n.localize("vs_languages_json_parser_jsonParser",30)}),t[r.value]=!0,T.getToken()!==o.SyntaxKind.ColonToken?i(n.localize("vs_languages_json_parser_jsonParser",31),a,[],[o.SyntaxKind.CloseBraceToken,o.SyntaxKind.CommaToken]):(a.colonOffset=T.getTokenOffset(),T.scan(),a.setValue(w(a,a.key.getValue()))?g(a,!1):i(n.localize("vs_languages_json_parser_jsonParser",32),a,[],[o.SyntaxKind.CloseBraceToken,o.SyntaxKind.CommaToken]))}function _(e,t){if(T.getToken()!==o.SyntaxKind.OpenBraceToken)return null;var s=new p(e,t,T.getTokenOffset());T.scan();var a={};if(s.addProperty(y(s,a)))for(;r(o.SyntaxKind.CommaToken);)s.addProperty(y(s,a))||E.config.ignoreDanglingComma||i(n.localize("vs_languages_json_parser_jsonParser",33));return T.getToken()!==o.SyntaxKind.CloseBraceToken?i(n.localize("vs_languages_json_parser_jsonParser",34),s):g(s,!0)}function b(e,t,n){if(T.getToken()!==o.SyntaxKind.StringLiteral)return null;var r=new d(e,t,n,T.getTokenOffset());return r.value=T.getTokenValue(),s(),g(r,!0)}function S(e,t){if(T.getToken()!==o.SyntaxKind.NumericLiteral)return null;var r=new c(e,t,T.getTokenOffset());if(!s()){var a=T.getTokenValue();try{var u=JSON.parse(a);if("number"!=typeof u)return i(n.localize("vs_languages_json_parser_jsonParser",35),r);r.value=u}catch(l){return i(n.localize("vs_languages_json_parser_jsonParser",36),r)}r.isInteger=-1===a.indexOf(".")}return g(r,!0)}function C(e,t){var n;switch(T.getToken()){case o.SyntaxKind.NullKeyword:n=new a(e,t,T.getTokenOffset());break;case o.SyntaxKind.TrueKeyword:n=new u(e,t,!0,T.getTokenOffset());break;case o.SyntaxKind.FalseKeyword:n=new u(e,t,!1,T.getTokenOffset());break;default:return null}return g(n,!0)}function w(e,t){return v(e,t)||_(e,t)||b(e,t,!1)||S(e,t)||C(e,t)}void 0===t&&(t=new f);var E=new m(t),T=o.createScanner(e,!0);return T.scan(),E.root=w(null,"root"),E.root?T.getToken()!==o.SyntaxKind.EOF&&i(n.localize("vs_languages_json_parser_jsonParser",38)):i(n.localize("vs_languages_json_parser_jsonParser",37)),E},e}();t.JSONParser=v}),define("vs/languages/json/jsonSchemaService",["require","exports","vs/nls!vs/languages/json/jsonWorker","vs/base/objects","vs/base/types","vs/base/lib/winjs.base","vs/platform/services"],function(e,t,n,r,i,o,s){var a=function(){function e(e,t){this.url=e,this.filePatterns=t}return e.prototype.matchesPattern=function(e){for(var t=0;t<this.filePatterns.length;t++)if(this.filePatterns[t].test(e))return!0;return!1},e}(),u=function(){function e(e,t,n){void 0===n&&(n=null),this.service=e,this.url=t,this.schema=null,n&&(this.schema=o.TPromise.as(new l(n).resolveInlineReferences()))}return e.prototype.getSchema=function(){return null===this.schema&&(this.schema=this.service.fetchFileSchema(this.url)),this.schema},e.prototype.clearSchema=function(){this.schema=null},e}(),l=function(){function e(e,t){void 0===t&&(t=null),this.schema=e,this.loadError=t}return e.prototype.getSection=function(e){return this.getSectionRecursive(e,this.schema)},e.prototype.getSectionRecursive=function(e,t){var n=this;if(!t||0===e.length)return t;var r=e.shift();if(t.properties&&t.properties[r])return this.getSectionRecursive(e,t.properties[r]);if(i.isObject(t.patternProperties))Object.keys(t.patternProperties).forEach(function(i){var o=new RegExp(i);return o.test(r)?n.getSectionRecursive(e,t.patternProperties[i]):void 0});else{if(i.isObject(t.additionalProperties))return this.getSectionRecursive(e,t.additionalProperties);if(r.match("[0-9]+")){if(i.isObject(t.items))return this.getSectionRecursive(e,t.items);if(Array.isArray(t.items))try{var o=parseInt(r,10);return t.items[o]?this.getSectionRecursive(e,t.items[o]):null}catch(s){return null}}}return null},e.prototype.resolveInlineReferences=function(){for(var e=[{parent:null,key:null,value:this.schema}];e.length;){var t=e.pop();Array.isArray(t.value)?t.value.forEach(function(n,r){e.push({parent:t.value,key:r,value:n})}):i.isObject(t.value)&&(t.value.$ref?t.parent[t.key]=this.getInlineReference(t.value.$ref):Object.keys(t.value).forEach(function(n){e.push({parent:t.value,key:n,value:t.value[n]})}))}return this},e.prototype.getInlineReference=function(e){if("#"!==e[0])return{};if("#"===e)return this.schema;var t=this.schema;return e.substr(2).split("/").some(function(e){return t=t[e],!t}),t||{}},e}();t.FileSchema=l;var c=function(){function e(e){var t=this;this.requestService=e.requestService,this.callOnDispose=[];var n=e.resourceService;n&&this.callOnDispose.push(n.addBulkListener(function(e){return t.onResourceChange(e)})),this.configurationSchemas={},this.preloadedSchemas={},this.unresolvedReferences=[],this.schemasById={},this.schemasFilePatternMapping=[],this.addPreloadedFileSchemas()}return e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(e){for(var t=0,n=e.length;n>t;t++){var r=e[t];if(r.getType()===s.ResourceEvents.CHANGED){var i=r.getData(),o=i.url.toExternal(),a=this.schemasById[o];a&&a.clearSchema()}}},e.prototype.registerConfigurationSchema=function(e){var t=this;this.configurationSchemas[e.id]=e;var n=function(e){e.$ref?t.unresolvedReferences.push({id:e.$ref,section:e}):e.properties&&Object.keys(e.properties).forEach(function(t){n(e.properties[t])})},i=function(){t.unresolvedReferences=t.unresolvedReferences.filter(function(e){var n=t.configurationSchemas[e.id];return n?(r.mixin(e.section,n),!1):!0})};n(e),i()},e.prototype.registerExternalSchema=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null);var r=new u(this,e,n);return this.schemasById[e]=r,t&&t.length>0&&this.schemasFilePatternMapping.push(new a(e,t)),r},e.prototype.clearExternalSchemas=function(){this.schemasById={},this.schemasFilePatternMapping=[]},e.prototype.getConfigurationSchema=function(e){return this.configurationSchemas[e]},e.prototype.fetchFileSchema=function(e){var t=this.preloadedSchemas[e];return t?o.TPromise.as(t):this.requestService.makeRequest({url:e}).then(function(e){return e.responseText}).then(function(e){var t=null;try{t=JSON.parse(e)}catch(n){}return t?new l(t).resolveInlineReferences():null},function(t){var r=n.localize("vs_languages_json_jsonSchemaService",0,e,t.statusText||t.toString());return console.log(r),new l({},r)})},e.prototype.getSchemaForResource=function(e,t){if(-1!==e.indexOf("/.settings/")){var n=this.configurationSchemas.configurationFile;return n?o.TPromise.as(new l(n)):o.TPromise.as(null)}if(t&&t.root&&"object"===t.root.type){var r=t.root.properties.filter(function(e){return"$schema"===e.key.value&&!!e.value});if(r.length>0){var i=r[0].value.getValue(),s=this.schemasById[i];if(s)return s.getSchema();if(i)return this.registerExternalSchema(i).getSchema()}}for(var a=this.schemasFilePatternMapping.length-1;a>=0;a--){var u=this.schemasFilePatternMapping[a];if(u.matchesPattern(e)){var s=this.schemasById[u.url];if(s)return s.getSchema()}}return o.TPromise.as(null)},e.prototype.addPreloadedFileSchema=function(e,t){var n=new l(t).resolveInlineReferences();this.preloadedSchemas[e]=n},e.prototype.addPreloadedFileSchemas=function(){this.addPreloadedFileSchema("http://json-schema.org/draft-04/schema#",{id:"http://json-schema.org/draft-04/schema#",title:n.localize("vs_languages_json_jsonSchemaService",1),$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri",description:n.localize("vs_languages_json_jsonSchemaService",2)},$schema:{type:"string",format:"uri",description:n.localize("vs_languages_json_jsonSchemaService",3)},title:{type:"string",description:n.localize("vs_languages_json_jsonSchemaService",4)},description:{type:"string",description:n.localize("vs_languages_json_jsonSchemaService",5)},default:{description:n.localize("vs_languages_json_jsonSchemaService",6)},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0,description:n.localize("vs_languages_json_jsonSchemaService",7)},maximum:{type:"number",description:n.localize("vs_languages_json_jsonSchemaService",8)},exclusiveMaximum:{type:"boolean",default:!1,description:n.localize("vs_languages_json_jsonSchemaService",9)},minimum:{type:"number",description:n.localize("vs_languages_json_jsonSchemaService",10)},exclusiveMinimum:{type:"boolean",default:!1,description:n.localize("vs_languages_json_jsonSchemaService",11)},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}],description:n.localize("vs_languages_json_jsonSchemaService",12)},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}],description:n.localize("vs_languages_json_jsonSchemaService",13)},pattern:{type:"string",format:"regex",description:n.localize("vs_languages_json_jsonSchemaService",14)},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{},description:n.localize("vs_languages_json_jsonSchemaService",15)},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{},description:n.localize("vs_languages_json_jsonSchemaService",16)},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}],description:n.localize("vs_languages_json_jsonSchemaService",17)},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}],description:n.localize("vs_languages_json_jsonSchemaService",18)},uniqueItems:{type:"boolean",default:!1,description:n.localize("vs_languages_json_jsonSchemaService",19)},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}],description:n.localize("vs_languages_json_jsonSchemaService",20)},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}],description:n.localize("vs_languages_json_jsonSchemaService",21)},required:{allOf:[{$ref:"#/definitions/stringArray"}],description:n.localize("vs_languages_json_jsonSchemaService",22)},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{},description:n.localize("vs_languages_json_jsonSchemaService",23)},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{},description:n.localize("vs_languages_json_jsonSchemaService",24)},properties:{type:"object",additionalProperties:{$ref:"#"},default:{},description:n.localize("vs_languages_json_jsonSchemaService",25)},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{},description:n.localize("vs_languages_json_jsonSchemaService",26)},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]},description:n.localize("vs_languages_json_jsonSchemaService",27)},enum:{type:"array",minItems:1,uniqueItems:!0,description:n.localize("vs_languages_json_jsonSchemaService",28)},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}],description:n.localize("vs_languages_json_jsonSchemaService",29)},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}],description:n.localize("vs_languages_json_jsonSchemaService",30)},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}],description:n.localize("vs_languages_json_jsonSchemaService",31)},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}],description:n.localize("vs_languages_json_jsonSchemaService",32)},not:{allOf:[{$ref:"#"}],description:n.localize("vs_languages_json_jsonSchemaService",33)}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}}),this.addPreloadedFileSchema("http://json.schemastore.org/project",{title:n.localize("vs_languages_json_jsonSchemaService",34),$schema:"http://json-schema.org/draft-04/schema#",id:"http://json.schemastore.org/project",type:"object",definitions:{compilationOptions:{description:n.localize("vs_languages_json_jsonSchemaService",35),type:"object",properties:{define:{type:"array",items:{type:"string",uniqueItems:!0}},warningsAsErrors:{type:"boolean",default:!1},allowUnsafe:{type:"boolean",default:!1},optimize:{type:"boolean",default:!1},languageVersion:{type:"string",enum:["csharp1","csharp2","csharp3","csharp4","csharp5","csharp6","experimental"]}}},configType:{type:"object",properties:{dependencies:{$ref:"#/definitions/dependencies"},compilationOptions:{$ref:"#/definitions/compilationOptions"},frameworkAssemblies:{$ref:"#/definitions/dependencies"}}},dependencies:{type:"object",additionalProperties:{type:["string","object"],properties:{version:{type:"string",description:n.localize("vs_languages_json_jsonSchemaService",36)},type:{type:"string",default:"default",enum:["default","build"],description:n.localize("vs_languages_json_jsonSchemaService",37)}},id:"nugget-package"},description:n.localize("vs_languages_json_jsonSchemaService",38),id:"nugget-packages"},script:{type:["string","array"],items:{type:"string"},description:n.localize("vs_languages_json_jsonSchemaService",39)}},properties:{authors:{description:n.localize("vs_languages_json_jsonSchemaService",40),type:"array",items:{type:"string",uniqueItems:!0}},code:{description:n.localize("vs_languages_json_jsonSchemaService",41),type:["string","array"],items:{type:"string"},default:"**\\*.cs"},commands:{description:n.localize("vs_languages_json_jsonSchemaService",42),type:"object",additionalProperties:{type:"string"}},compilationOptions:{$ref:"#/definitions/compilationOptions"},configurations:{type:"object",description:n.localize("vs_languages_json_jsonSchemaService",43),additionalProperties:{type:"object",properties:{compilationOptions:{$ref:"#/definitions/compilationOptions"}}}},dependencies:{$ref:"#/definitions/dependencies"},description:{description:n.localize("vs_languages_json_jsonSchemaService",44),type:"string"},exclude:{description:n.localize("vs_languages_json_jsonSchemaService",45),type:["string","array"],items:{type:"string"},default:["bin/**/*.*","obj/**/*.*"]},frameworks:{description:n.localize("vs_languages_json_jsonSchemaService",46),type:"object",additionalProperties:{$ref:"#/definitions/configType"}},packExclude:{description:n.localize("vs_languages_json_jsonSchemaService",47),type:["string","array"],items:{type:"string"},default:""},preprocess:{description:n.localize("vs_languages_json_jsonSchemaService",48),type:"string",default:"Compiler\\Preprocess\\**\\*.cs"},resources:{description:n.localize("vs_languages_json_jsonSchemaService",49),type:["string","array"],items:{type:"string"},default:"Compiler\\Resources\\**\\*.cs"},scripts:{type:"object",description:n.localize("vs_languages_json_jsonSchemaService",50),properties:{prebuild:{$ref:"#/definitions/script"},postbuild:{$ref:"#/definitions/script"},prepack:{$ref:"#/definitions/script"},postpack:{$ref:"#/definitions/script"},prerestore:{$ref:"#/definitions/script"},postrestore:{$ref:"#/definitions/script"},prepare:{$ref:"#/definitions/script"}}},shared:{description:n.localize("vs_languages_json_jsonSchemaService",51),type:["string","array"],items:{type:"string"},default:"Compiler\\Shared\\**\\*.cs"},version:{description:n.localize("vs_languages_json_jsonSchemaService",52),type:"string"},webroot:{description:n.localize("vs_languages_json_jsonSchemaService",53),type:"string"}}}),this.addPreloadedFileSchema("http://json.schemastore.org/bower",{title:n.localize("vs_languages_json_jsonSchemaService",54),$schema:"http://json-schema.org/draft-04/schema#",id:"http://json.schemastore.org/bower",type:"object",required:["name"],patternProperties:{"^_":{description:n.localize("vs_languages_json_jsonSchemaService",55),additionalProperties:!0,additionalItems:!0}},properties:{name:{description:n.localize("vs_languages_json_jsonSchemaService",56),type:"string",maxLength:50},description:{description:n.localize("vs_languages_json_jsonSchemaService",57),type:"string"},version:{description:n.localize("vs_languages_json_jsonSchemaService",58),type:"string"},main:{description:n.localize("vs_languages_json_jsonSchemaService",59),type:["string","array"]},license:{description:n.localize("vs_languages_json_jsonSchemaService",60),type:["string","array"],maxLength:140},ignore:{description:n.localize("vs_languages_json_jsonSchemaService",61),type:["string","array"]},keywords:{description:n.localize("vs_languages_json_jsonSchemaService",62),type:"array",items:{type:"string",maxLength:50}},authors:{description:n.localize("vs_languages_json_jsonSchemaService",63),type:"array",items:{type:["string","object"]}},homepage:{description:n.localize("vs_languages_json_jsonSchemaService",64),type:"string"},repository:{description:n.localize("vs_languages_json_jsonSchemaService",65),type:"object",properties:{type:{type:"string",enum:["git"]},url:{type:"string"}}},dependencies:{id:"bower-packages",description:n.localize("vs_languages_json_jsonSchemaService",66),type:"object",additionalProperties:{id:"bower-package",type:"string"}},devDependencies:{id:"bower-packages",description:n.localize("vs_languages_json_jsonSchemaService",67),type:"object",additionalProperties:{id:"bower-package",type:"string"}},resolutions:{description:n.localize("vs_languages_json_jsonSchemaService",68),type:"object"},private:{description:n.localize("vs_languages_json_jsonSchemaService",69),type:"boolean"},exportsOverride:{description:n.localize("vs_languages_json_jsonSchemaService",70),type:"object",additionalProperties:{type:"object",additionalProperties:{type:"string"}}},moduleType:{description:n.localize("vs_languages_json_jsonSchemaService",71),type:"array",items:{enum:["amd","es6","globals","node","yui"]}}}}),this.addPreloadedFileSchema("http://json.schemastore.org/package",{id:"http://json.schemastore.org/package",description:n.localize("vs_languages_json_jsonSchemaService",72),type:"object",required:["name","version"],properties:{name:{type:"string",description:n.localize("vs_languages_json_jsonSchemaService",73)},version:{type:"string",description:n.localize("vs_languages_json_jsonSchemaService",74),pattern:"^\\s*[v=]*\\s*([0-9]+)\\.([0-9]+)\\.([0-9]+)(-[0-9]+-?)?([a-zA-Z-][a-zA-Z0-9-.:]*)?$"},description:{type:"string",description:n.localize("vs_languages_json_jsonSchemaService",75)},keywords:{type:"array",description:n.localize("vs_languages_json_jsonSchemaService",76),items:{type:"string"}},url:{type:"string",description:n.localize("vs_languages_json_jsonSchemaService",77),format:"uri"},bugs:{type:"string",description:n.localize("vs_languages_json_jsonSchemaService",78)},license:{type:"string",description:n.localize("vs_languages_json_jsonSchemaService",79)},author:{description:n.localize("vs_languages_json_jsonSchemaService",80),oneOf:[{type:"string"},{type:"object",required:["name"],properties:{name:{type:"string"},email:{type:"string"},url:{type:"string",format:"uri"}}}]},contributors:{type:"array",description:n.localize("vs_languages_json_jsonSchemaService",81),items:{oneOf:[{type:"string"},{type:"object",required:["name"],properties:{name:{type:"string"},email:{type:"string"},url:{type:"string",format:"uri"}}}]}},files:{type:"array",description:n.localize("vs_languages_json_jsonSchemaService",82),items:{type:"string"}},main:{type:"string",description:n.localize("vs_languages_json_jsonSchemaService",83)},bin:{type:"object",description:n.localize("vs_languages_json_jsonSchemaService",84)},man:{type:"string",description:n.localize("vs_languages_json_jsonSchemaService",85)},repository:{type:"object",description:n.localize("vs_languages_json_jsonSchemaService",86),required:["type","url"],properties:{type:{type:"string",description:n.localize("vs_languages_json_jsonSchemaService",87)},url:{type:"string",format:"uri"}}},dependencies:{id:"npm-packages",type:"object",description:n.localize("vs_languages_json_jsonSchemaService",88),additionalProperties:{id:"npm-package",type:"string"}},devDependencies:{id:"npm-packages",type:"object",description:n.localize("vs_languages_json_jsonSchemaService",89),additionalProperties:{id:"npm-package",type:"string"}},bundledDependencies:{type:"array",description:n.localize("vs_languages_json_jsonSchemaService",90),items:{type:"string"}},optionalDependencies:{id:"npm-packages",type:"object",description:n.localize("vs_languages_json_jsonSchemaService",91),additionalProperties:{id:"npm-package",type:"string"}},scripts:{type:"object",description:n.localize("vs_languages_json_jsonSchemaService",92)},config:{type:"object",description:n.localize("vs_languages_json_jsonSchemaService",93)},engines:{type:"object",description:n.localize("vs_languages_json_jsonSchemaService",94)},os:{type:"array",description:n.localize("vs_languages_json_jsonSchemaService",95),items:{type:"string"}},cpu:{type:"array",description:n.localize("vs_languages_json_jsonSchemaService",96),items:{type:"string"}},preferGlobal:{type:"boolean",description:n.localize("vs_languages_json_jsonSchemaService",97)},engineStrict:{type:"boolean",description:n.localize("vs_languages_json_jsonSchemaService",98)},private:{type:"boolean",description:n.localize("vs_languages_json_jsonSchemaService",99)}}}),this.addPreloadedFileSchema("http://json.schemastore.org/global",{title:n.localize("vs_languages_json_jsonSchemaService",100),type:"object",additionalProperties:!0,required:["sources"],properties:{sources:{type:"array",description:n.localize("vs_languages_json_jsonSchemaService",101),items:{type:"string"}}}})
},e}();t.JSONSchemaService=c}),define("vs/languages/json/jsonIntellisense",["require","exports","./parser/jsonParser","vs/base/types","vs/base/lib/winjs.base"],function(e,t,n,r,i){var o=function(){function e(e,t){this.schemaService=e.schemaService,this.requestService=e.requestService,this.contributions=t}return e.prototype.doSuggest=function(e,t,r){var o=this,s=t.getWordUntilPosition(r,!0,!0).word,a=new n.JSONParser,u=new n.JSONDocumentConfig;u.ignoreDanglingComma=!0;var l=a.parse(t.getValue(),u),c=t.getOffsetFromPosition(r),d=l.getNodeFromOffsetEndInclusive(c);if(!d)return null;var h=t.getRangeFromOffsetAndLength(d.start,d.end-d.start),p=!1;if("string"===d.type){var f=d,g=h.startColumn;f.isKey&&(p=!0,g++,d.parent&&(d=d.parent.parent)),s=t.getValueInRange({startColumn:g,startLineNumber:h.startLineNumber,endColumn:r.column,endLineNumber:r.lineNumber})}var m={currentWord:s,incomplete:!1,suggestions:[]},v={},y={add:function(e){v[e.label]||(v[e.label]=!0,m.suggestions.push(e))},setAsIncomplete:function(){m.incomplete=!0}};return this.schemaService.getSchemaForResource(e.toExternal(),l).then(function(e){var n=[];if(d&&"object"===d.type){if(d.start===c)return m;var r=d.properties,a=0===r.length||c>=r[r.length-1].end;if(e){var u=[];l.validate(e.schema,u,d.start),u.forEach(function(e){if(e.node===d&&!e.inverted){var t=e.schema.properties;t&&Object.keys(t).forEach(function(e){var n=t[e];y.add({type:"property",label:e,codeSnippet:o.getSnippetForProperty(e,n,p,a),documentationLabel:n.description||""})});var r=e.schema.id;r&&o.contributions.forEach(function(e){n.push(e.collectPropertySuggestions(r,s,p,a,y))})}})}else if(d.parent){var h=function(e){e.properties.forEach(function(e){var t=e.key.value;y.add({type:"property",label:t,codeSnippet:o.getSnippetForSimilarProperty(t,e.value,p),documentationLabel:""})})};if("property"===d.parent.type){var f=d.parent.key.value;l.visit(function(e){return"property"===e.type&&e.key.value===f&&e.value&&"object"===e.value.type&&h(e.value),!0})}else"array"===d.parent.type&&d.parent.items.forEach(function(e){"object"===e.type&&e!==d&&h(e)})}}return!d||"string"!==d.type&&"number"!==d.type&&"boolean"!==d.type&&"null"!==d.type||(d=d.parent),e?n.push(o.getValueSuggestions(e,l,d,c,y)):n.push(o.getSchemaLessValueSuggestions(l,d,c,t,y)),i.Promise.join(n).then(function(){return m})})},e.prototype.getSchemaLessValueSuggestions=function(e,t,n,r,o){var s=this,a=function(e){var t=s.getSnippetForValue(e,r);o.add({type:s.getSuggestionType(e.type),label:t,codeSnippet:t,documentationLabel:""}),"boolean"===e.type&&s.addBooleanSuggestion(!e.getValue(),o)};if(t&&"property"===t.type&&n>t.colonOffset){var u=t.value;if(u&&n>u.end)return;var l=t.key.value;e.visit(function(e){return"property"===e.type&&e.key.value===l&&e.value&&a(e.value),!0})}if(t&&"array"===t.type)if(t.parent&&"property"===t.parent.type){var l=t.parent.key.value;e.visit(function(e){return"property"===e.type&&e.key.value===l&&e.value&&"array"===e.value.type&&e.value.items.forEach(function(e){a(e)}),!0})}else t.items.forEach(function(e){a(e)});return i.Promise.as(0)},e.prototype.getValueSuggestions=function(e,t,n,r,o){var s=this,a=null;if(n&&"property"===n.type&&r>n.colonOffset){var u=n.value;if(u&&r>u.end)return i.Promise.as(0);a=n.key.value,n=n.parent}if(n&&(null!==a||"array"===n.type)){var l=[],c=[];return t.validate(e.schema,c,n.start),c.forEach(function(e){var t=null,r="string";if(e.node===n&&!e.inverted&&e.schema){if("array"===n.type&&e.schema.items)t=e.schema.items.enum,r=e.schema.items.type;else if(e.schema.properties){var i=e.schema.properties[a];i&&(t=i.enum,r=i.type)}if(Array.isArray(t))for(var u=0;u<t.length;u++){var c=JSON.stringify(t[u]);o.add({type:s.getSuggestionType(r),label:c,codeSnippet:c,documentationLabel:""})}else"boolean"===r&&(s.addBooleanSuggestion(!0,o),s.addBooleanSuggestion(!1,o));var d=e.schema.id;d&&s.contributions.forEach(function(e){l.push(e.collectValueSuggestions(d,a,o))})}}),i.Promise.join(l)}return i.Promise.as(0)},e.prototype.addBooleanSuggestion=function(e,t){var n=e?"true":"false";t.add({type:this.getSuggestionType("boolean"),label:n,codeSnippet:n,documentationLabel:""})},e.prototype.getSuggestionType=function(e){if(Array.isArray(e)){var t=e;e=t.length>0?t[0]:null}if(!e)return"text";switch(e){case"string":return"text";case"object":return"module";case"property":return"property";default:return"value"}},e.prototype.getSnippetForValue=function(e,t){switch(e.type){case"array":return"[]";case"object":return"{}";default:var n=t.getValueInRange(t.getRangeFromOffsetAndLength(e.start,e.end-e.start));return n}},e.prototype.getSnippetForProperty=function(e,t,n,i){if(n)return e;var o='"'+e+'": ',s=function(e){var t=JSON.stringify(e);return t.length>0&&'"'===t.charAt(0)?'"{{'+t.substr(1,t.length-2)+'}}"':"{{"+t+"}}"},a=t.default;if(r.isUndefined(a))if(t.enum&&t.enum.length>0)o+=s(t.enum[0]);else switch(t.type){case"boolean":o+="{{false}}";break;case"string":o+='"{{}}"';break;case"object":o+="{{{}}}";break;case"array":o+="[{{}}]";break;case"number":o+="{{0}}";break;default:return o}else o+=s(a);return i||(o+=","),o},e.prototype.getSnippetForSimilarProperty=function(e,t,n){return void 0===n&&(n=!1),n?e:'"'+e+'": '},e}();t.JSONIntellisense=o}),define("vs/languages/json/contributions/projectJSONContribution",["require","exports","vs/base/lib/winjs.base","vs/nls!vs/languages/json/jsonWorker"],function(e,t,n,r){var i=function(){function e(e){this.requestService=e.requestService}return e.prototype.collectPropertySuggestions=function(e,t,i,o,s){if("nugget-packages"===e){var a;return a=t.length>0?"https://www.myget.org/F/aspnetrelease/api/v2/Packages?$filter=Id%20ge%20'"+encodeURIComponent(t)+"'%20and%20Id%20lt%20'"+encodeURIComponent(t+"z")+"'%20and%20IsAbsoluteLatestVersion%20eq%20true&$select=Id,Version,Description&$format=json&$top=100":"https://www.myget.org/F/aspnetrelease/api/v2/Packages?$filter=IsAbsoluteLatestVersion%20eq%20true&$orderby=DownloadCount%20desc&$top=100&$select=Id,Version,DownloadCount,Description&$format=json",this.requestService.makeRequest({url:a}).then(function(e){try{var t=JSON.parse(e.responseText);if(Array.isArray(t.d))for(var n=t.d,a=0;a<n.length;a++){var u=n[a],l=u.Id,c=u.Version;if(l){var d=u.Description&&u.Version?r.localize("vs_languages_json_contributions_projectJSONContribution",0,u.Description,u.Version):"",h=i?l:JSON.stringify(l)+': "{{'+c+'}}"';i||o||(h+=","),s.add({type:"property",label:l,codeSnippet:h,documentationLabel:d})}}}catch(p){}},function(){return 0})}return n.Promise.as(0)},e.prototype.collectValueSuggestions=function(e,t,i){if("nugget-packages"===e){var o="https://www.myget.org/F/aspnetrelease/api/v2/Packages?$filter=Id%20eq%20'"+encodeURIComponent(t)+"'&$select=Version,IsAbsoluteLatestVersion&$format=json&$top=50";return this.requestService.makeRequest({url:o}).then(function(e){try{var t=JSON.parse(e.responseText);if(Array.isArray(t.d))for(var n=t.d,o=0;o<n.length;o++){var s=n[o],a=s.Version;if(a){var u=JSON.stringify(a),l="true"===s.IsAbsoluteLatestVersion,c=u,d="";l&&(d=r.localize("vs_languages_json_contributions_projectJSONContribution",1)),i.add({type:"class",label:c,codeSnippet:u,documentationLabel:d})}}}catch(h){}return 0},function(){return 0})}return n.Promise.as(0)},e.prototype.getInfoContribution=function(e,t){if("nugget-package"===e){var n=[];n.push({className:"type",text:r.localize("vs_languages_json_contributions_projectJSONContribution",2,t)});var i="https://www.myget.org/F/aspnetrelease/api/v2/Packages?$filter=Id%20eq%20'"+encodeURIComponent(t)+"'%20and%20IsAbsoluteLatestVersion%20eq%20true&$select=Version,Description&$format=json&$top=5";return this.requestService.makeRequest({url:i}).then(function(e){var t=e.responseText;if(t)try{var i=JSON.parse(t);if(i.d&&i.d[0]){var o=i.d[0];o.Description&&n.push({className:"documentation",text:o.Description}),o.Version&&n.push({className:"documentation",text:r.localize("vs_languages_json_contributions_projectJSONContribution",3,o.Version)})}}catch(s){}return n},function(){return n})}return null},e}();t.ProjectJSONContribution=i}),define("vs/languages/json/contributions/packageJSONContribution",["require","exports","vs/base/lib/winjs.base","vs/nls!vs/languages/json/jsonWorker"],function(e,t,n,r){var i=function(){function e(e){this.requestService=e.requestService}return e.prototype.collectPropertySuggestions=function(e,t,r,i,o){if("npm-packages"===e){var s;return s=t.length>0?"https://typeahead.npmjs.com/search?q="+encodeURIComponent(t):"https://typeahead.npmjs.com/search?q=",this.requestService.makeRequest({url:s}).then(function(e){try{var t=JSON.parse(e.responseText);if(Array.isArray(t))for(var n=t,s=0;s<n.length;s++){var a=n[s].value,u=r?a:JSON.stringify(a)+': "{{*}}"';r||i||(u+=","),o.add({type:"property",label:a,codeSnippet:u,documentationLabel:""})}}catch(l){}o.setAsIncomplete()},function(){return 0})}return n.Promise.as(0)},e.prototype.collectValueSuggestions=function(e,t,r){if("npm-packages"===e){var i="http://registry.npmjs.org/"+encodeURIComponent(t)+"/latest";return this.requestService.makeRequest({url:i}).then(function(e){try{var t=JSON.parse(e.responseText);if(t&&t.version){var n=t.version,i=JSON.stringify(n);r.add({type:"class",label:i,codeSnippet:i,documentationLabel:"The currently latest version of the package"}),i=JSON.stringify("^"+n),r.add({type:"class",label:i,codeSnippet:i,documentationLabel:"Matches the most recent major version (1.x.x)"}),i=JSON.stringify("~"+n),r.add({type:"class",label:i,codeSnippet:i,documentationLabel:"Matches the most recent minor version (1.2.x)"})}}catch(o){}return 0},function(){return 0})}return n.Promise.as(0)},e.prototype.getInfoContribution=function(e,t){if("npm-package"===e){var n=[];n.push({className:"type",text:r.localize("vs_languages_json_contributions_packageJSONContribution",0,t)});var i="http://registry.npmjs.org/"+encodeURIComponent(t)+"/latest";return this.requestService.makeRequest({url:i}).then(function(e){try{var t=JSON.parse(e.responseText);t&&(t.description&&n.push({className:"documentation",text:t.description}),t.version&&n.push({className:"documentation",text:r.localize("vs_languages_json_contributions_packageJSONContribution",1,t.version)}))}catch(i){}return n},function(){return n})}return null},e}();t.PackageJSONContribution=i}),define("vs/languages/json/contributions/bowerJSONContribution",["require","exports","vs/base/strings","vs/base/lib/winjs.base","vs/nls!vs/languages/json/jsonWorker"],function(e,t,n,r,i){var o=function(){function e(e){this.topRanked=["twitter","bootstrap","angular-1.1.6","angular-latest","angulerjs","d3","myjquery","jq","abcdef1234567890","jQuery","jquery-1.11.1","jquery","sushi-vanilla-x-data","font-awsome","Font-Awesome","font-awesome","fontawesome","html5-boilerplate","impress.js","homebrew","backbone","moment1","momentjs","moment","linux","animate.css","animate-css","reveal.js","jquery-file-upload","blueimp-file-upload","threejs","express","chosen","normalize-css","normalize.css","semantic","semantic-ui","Semantic-UI","modernizr","underscore","underscore1","material-design-icons","ionic","chartjs","Chart.js","nnnick-chartjs","select2-ng","select2-dist","phantom","skrollr","scrollr","less.js","leancss","parser-lib","hui","bootstrap-languages","async","gulp","jquery-pjax","coffeescript","hammer.js","ace","leaflet","jquery-mobile","sweetalert","typeahead.js","soup","typehead.js","sails","codeigniter2"],this.requestService=e.requestService}return e.prototype.collectPropertySuggestions=function(e,t,n,i,o){if("bower-packages"===e){if(t.length>0){var s="https://bower.herokuapp.com/packages/search/"+encodeURIComponent(t);return this.requestService.makeRequest({url:s}).then(function(e){try{var t=JSON.parse(e.responseText);if(Array.isArray(t))for(var r=t,s=0;s<r.length;s++){var a=r[s].name,u=r[s].description||"",l=n?a:JSON.stringify(a)+': "{{*}}"';n||i||(l+=","),o.add({type:"property",label:a,codeSnippet:l,documentationLabel:u})}}catch(c){}},function(){return 0})}this.topRanked.forEach(function(e){var t=n?e:JSON.stringify(e)+': "{{*}}"';o.add({type:"property",label:e,codeSnippet:t,documentationLabel:""})})}return r.Promise.as(0)},e.prototype.collectValueSuggestions=function(){return r.Promise.as(0)},e.prototype.getInfoContribution=function(e,t){if("bower-package"===e){var r=[];r.push({className:"type",text:i.localize("vs_languages_json_contributions_bowerJSONContribution",0,t)});var o="https://bower.herokuapp.com/packages/"+encodeURIComponent(t);return this.requestService.makeRequest({url:o}).then(function(e){try{var t=JSON.parse(e.responseText);if(t&&t.url){var i=t.url;n.startsWith(i,"git://")&&(i=i.substring(6)),n.endsWith(i,".git")&&(i=i.substring(0,i.length-4)),r.push({className:"documentation",text:i})}}catch(o){}return r},function(){return r})}return null},e}();t.BowerJSONContribution=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/json/jsonWorker",["require","exports","vs/base/severity","vs/editor/worker/modesWorker","./parser/jsonParser","./jsonSchemaService","./jsonIntellisense","vs/base/lib/winjs.base","vs/base/strings","./contributions/projectJSONContribution","vs/editor/modes/supports","./contributions/packageJSONContribution","./contributions/bowerJSONContribution"],function(e,t,n,r,i,o,s,a,u,l,c,d,h){var p=function(e){function t(t,n,r){e.call(this,t,n,r),this.jsonMode=n,this.requestService=t.requestService,this.schemaService=new o.JSONSchemaService(t),this.contributions=[t.instantiationService.createInstance(l.ProjectJSONContribution),t.instantiationService.createInstance(d.PackageJSONContribution),t.instantiationService.createInstance(h.BowerJSONContribution)],this.jsonIntellisense=new s.JSONIntellisense({schemaService:this.schemaService,requestService:this.requestService},this.contributions)}return __extends(t,e),t.prototype._createInPlaceReplaceSupport=function(){return new c.InplaceReplaceSupport(this.resourceService,this)},t.prototype._doConfigure=function(e){var t=this;return e&&e.schemas&&(this.schemaService.clearExternalSchemas(),e.schemas.forEach(function(e){if(e.url&&(e.fileMatch||e.schema)){var n=e.url,r=!1;u.startsWith(n,"http://")||u.startsWith(n,"https://")||(n=t.requestService.getRequestUrl("root",n,!0),r=!0);var i=null;if(e.fileMatch){i=[];for(var o=0;o<e.fileMatch.length;o++)try{i.push(new RegExp(u.convertSimple2RegExpPattern(e.fileMatch[o])))}catch(s){}}t.schemaService.registerExternalSchema(n,i,e.schema)}else if(e.filePattern&&e.schemaPath){var n=t.requestService.getRequestUrl("root",e.schemaPath),i=[];try{i.push(new RegExp(e.filePattern))}catch(s){}t.schemaService.registerExternalSchema(n,i)}})),a.TPromise.as(!0)},t.prototype.setConfigurationSchemas=function(e){var t=this;return e.forEach(function(e){t.schemaService.registerConfigurationSchema(e)}),a.TPromise.as(!0)},t.prototype.doValidate=function(e){var t=this,r=this.resourceService.get(e),o=new i.JSONParser,s=o.parse(r.getValue());this.schemaService.getSchemaForResource(e.toExternal(),s).then(function(i){if(i)if(i.loadError&&s.root){var o="object"===s.root.type?s.root.getFirstProperty("$schema"):null;if(o){var a=o.value||o;s.warnings.push({location:{start:a.start,end:a.end},message:i.loadError})}else s.warnings.push({location:{start:s.root.start,end:s.root.start+1},message:i.loadError})}else s.validate(i.schema);var u=s.errors.concat(s.warnings).map(function(e,t){var i=r.getPositionFromOffset(e.location.start),o=r.getPositionFromOffset(e.location.end);return{message:e.message,severity:t>=s.errors.length?n.Warning:n.Error,startLineNumber:i.lineNumber,startColumn:i.column,endLineNumber:o.lineNumber,endColumn:o.column}});t.markerService.changeOne(t._getMode().getId(),e,u)})},t.prototype.doSuggest=function(e,t){var n=this,r=this.resourceService.get(e);return this.jsonIntellisense.doSuggest(e,r,t).then(function(r){return r&&0===r.suggestions.length&&r.currentWord.length>0&&(r.suggestions=n.suggestWords(e,t,!0)),r})},t.prototype.computeInfo=function(e,t){var n=this,r=this.resourceService.get(e),o=new i.JSONParser,s=o.parse(r.getValue()),u=r.getOffsetFromPosition(t),l=s.getNodeFromOffset(u),c=l;if(l&&"string"===l.type){var d=l;if(d.isKey){var h=l.parent;l=h.value}}return l?this.schemaService.getSchemaForResource(e.toExternal(),s).then(function(e){if(e){var t=[];s.validate(e.schema,t,l.start);var i=null,o=null;if(t.every(function(e){return e.node===l&&!e.inverted&&e.schema&&(i=i||e.schema.description,o=o||e.schema.id),!0}),o&&l.name)for(var a=n.contributions.length-1;a>=0;a--){var u=n.contributions[a],d=u.getInfoContribution(o,l.name);if(d)return d.then(function(e){return n.createInfoResult(e,c,r)})}if(i){var h=[{className:"documentation",text:i}];return n.createInfoResult(h,c,r)}}return null}):a.Promise.as(null)},t.prototype.createInfoResult=function(e,t,n){var r=n.getRangeFromOffsetAndLength(t.start,t.end-t.start),i={value:"",htmlContent:e,className:"typeInfo json",range:r};return i},t.prototype.getOutline=function(e){function t(e,r){if("array"===r.type)r.items.forEach(function(n){t(e,n)});else if("object"===r.type){var i=r;i.properties.forEach(function(r){var i=n.getRangeFromOffsetAndLength(r.start,r.end-r.start),o=r.value;if(o){var s=t([],o),a="object"===o.type?"module":o.type;e.push({label:r.key.getValue(),icon:a,type:o.type,range:i,children:s})}})}return e}var n=this.resourceService.get(e),r=new i.JSONParser,o=r.parse(n.getValue()),s=o.root;if(!s)return a.Promise.as(null);var u=t([],s);return a.Promise.as(u)},t.prototype.textReplace=function(e,t){return c.ReplaceSupport.valueSetReplace(["true","false"],e,t)},t.prototype.format=function(e,t,n){var r=this.resourceService.get(e),i=t?r.getValueInRange(t):r.getValue(),o=4;o=n.insertSpaces?n.tabSize:"	";try{return a.TPromise.as([{range:t,text:JSON.stringify(JSON.parse(i),null,o)}])}catch(s){return null}},t.prototype.navigateValueSetFallback=function(e,t,n){var r=this,o=this.resourceService.get(e),s=o.getOffsetFromPosition({lineNumber:t.startLineNumber,column:t.startColumn}),a=new i.JSONParser,l=new i.JSONDocumentConfig;l.ignoreDanglingComma=!0;var c=a.parse(o.getValue(),l),d=c.getNodeFromOffsetEndInclusive(s);return!d||"string"!==d.type&&"number"!==d.type&&"boolean"!==d.type&&"null"!==d.type?null:this.schemaService.getSchemaForResource(e.toExternal(),c).then(function(e){if(e){var t=[],i={},s={add:function(e){i[e.label]||(i[e.label]=!0,t.push(e))},setAsIncomplete:function(){}};return r.jsonIntellisense.getValueSuggestions(e,c,d.parent,d.start,s).then(function(){for(var e=o.getRangeFromOffsetAndLength(d.start,d.end-d.start),r=o.getValueInRange(e),i=0,s=t.length;s>i;i++)if(u.equalsIgnoreCase(t[i].label,r)){var a=i;return n?a=(i+1)%s:(a=i-1,0>a&&(a=s-1)),{value:t[a].label,range:e}}return null})}})},t}(r.AbstractWorkerMode);t.JSONWorker=p});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/languages/json/jsonWorker.nls.keys",[],{vs_languages_json_parser_jsonParser:{path:"vs/languages/json/parser/jsonParser.js",keys:["typeArrayMismatchWarning","typeMismatchWarning","notSchemaWarning","oneOfWarning","enumWarning","additionalItemsWarning","minItemsWarning","maxItemsWarning","uniqueItemsWarning","multipleOfWarning","exclusiveMinimumWarning","minimumWarning","exclusiveMaximumWarning","maximumWarning","minLengthWarning","maxLengthWarning","patternWarning","MissingRequiredPropWarning","DisallowedExtraPropWarning","MaxPropWarning","MinPropWarning","RequiredDependentPropWarning","InvalidUnicode","InvalidEscapeCharacter","UnexpectedEndOfNumber","UnexpectedEndOfComment","UnexpectedEndOfString","ValueExpected","ExpectedCloseBracket","DoubleQuotesExpected","DuplicateKeyWarning","ColonExpected","ValueExpected","PropertyExpected","ExpectedCloseBrace","InvalidNumberFormat","InvalidNumberFormat","Invalid symbol","End of file expected"]},vs_languages_json_jsonSchemaService:{path:"vs/languages/json/jsonSchemaService.js",keys:["json.schema.unabletoload","schema.json","schema.json.id","schema.json.$schema","schema.json.title","schema.json.description","schema.json.default","schema.json.multipleOf","schema.json.maximum","schema.json.exclusiveMaximum","schema.json.minimum","schema.json.exclusiveMininum","schema.json.maxLength","schema.json.minLength","schema.json.pattern","schema.json.additionalItems","schema.json.items","schema.json.maxItems","schema.json.minItems","schema.json.uniqueItems","schema.json.maxProperties","schema.json.minProperties","schema.json.required","schema.json.additionalProperties","schema.json.definitions","schema.json.properties","schema.json.patternProperties","schema.json.dependencies","schema.json.enum","schema.json.type","schema.json.allOf","schema.json.anyOf","schema.json.oneOf","schema.json.not","project.json.title","project.json.compilationOptions","project.json.dependency.name","project.json.dependency.type","project.json.dependencies","project.json.script","project.json.authors","project.json.code","project.json.commands","project.json.configurations","project.json.description","project.json.exclude","project.json.frameworks","project.json.packExclude","project.json.preprocess","project.json.resources","project.json.scripts","project.json.shared","project.json.version","project.json.webroot","bower.json.title","bower.json.invalidPatternName","bower.json.packagename","bower.json.description","bower.json.version","bower.json.main","bower.json.license","bower.json.ignore","bower.json.keywords","bower.json.authors","bower.json.homepage","bower.json.repository","bower.json.dependencies","bower.json.devDependencies","bower.json.resolutions","bower.json.private","bower.json.exportsOverride","bower.json.moduleType","package.json","package.json.name","package.json.version","package.json.description","package.json.keywords","package.json.url","package.json.bugs","package.json.license","package.json.author","package.json.contributors","package.json.files","package.json.main","package.json.bin","package.json.man","package.json.repository","package.json.repository.type","package.json.dependencies","package.json.devdependencies","package.json.bundleddependencies","package.json.optionaldependencies","package.json.scripts","package.json.config","package.json.engines","package.json.os","package.json.cpu","package.json.preferGlobal","package.json.engineStrict","package.json.private","global.json.title","global.json.description"]},vs_languages_json_contributions_projectJSONContribution:{path:"vs/languages/json/contributions/projectJSONContribution.js",keys:["json.nugget.packagedescription.suggest","json.nugget.versiondescription.suggest","json.nugget.package.hover","json.nugget.version.hover"]},vs_languages_json_contributions_packageJSONContribution:{path:"vs/languages/json/contributions/packageJSONContribution.js",keys:["json.npm.package.hover","json.npm.version.hover"]},vs_languages_json_contributions_bowerJSONContribution:{path:"vs/languages/json/contributions/bowerJSONContribution.js",keys:["json.bower.package.hover"]}});/*---------------------------------------------------------
 * 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/less/less",["require","exports","vs/base/lib/winjs.base","vs/editor/modes/modesExtensions","vs/editor/modes/monarch/monarch","vs/editor/modes/monarch/monarchCompile","vs/platform/thread/attribute"],function(e,t,n,r,i,o,s){t.language={displayName:"LESS",name:"less",mimeTypes:["text/x-less"],fileExtensions:[".less"],workerDescriptor:{moduleName:"vs/languages/less/lessWorker",ctorName:"LessWorker"},nonWordTokens:["delimiter.curly.less","delimiter.bracket.less","delimiter.parenthesis.less","delimiter.angle.less"],wordDefinition:/(#?-?\d*\.\d\w*%?)|([@#!.:]?[\w-?]+%?)|[@#!.]/g,defaultToken:"",lineComment:"//",blockCommentStart:"/*",blockCommentEnd:"*/",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@nestedJSBegin"},["[ \\t\\r\\n]+",""],{include:"@comments"},{include:"@keyword"},{include:"@strings"},{include:"@numbers"},["[a-zA-Z\\-\\s]+(?=:.*(;|(\\\\$)))","attribute.name","@attribute"],{include:"@operators"},["[{}()\\[\\]]","@brackets"],["[,:;]","delimiter"],["#[\\w\\-.:]+","tag.id"],["&","identifier"],["\\.[\\w\\-.:]+(?=\\()","tag.class","@attribute"],["\\.[\\w\\-.:]+","tag.class"],["[\\w\\-.:]+","tag"],["@[\\w\\-]+(?=[:,\\)])","variable","@attribute"],["@[\\w\\-]+","variable"],["@","key","@atRules"]],nestedJSBegin:[["``","delimiter.backtick"],["`",{token:"delimiter.backtick",bracket:"@open",next:"@nestedJSEnd",nextEmbedded:"text/javascript"}]],nestedJSEnd:[["`",{token:"delimiter.backtick",bracket:"@close",next:"@pop"}],[".",{token:"@rematch",next:"@javascript_block"}]],javascript_block:[["`",{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],operators:[["[<>=\\+\\-\\*\\/\\^\\|\\~]","operator"]],keyword:[["(@[\\s]*import|![\\s]*important|true|false|when|iscolor|isnumber|isstring|iskeyword|isurl|ispixel|ispercentage|isem|hue|saturation|lightness|alpha|lighten|darken|saturate|desaturate|fadein|fadeout|fade|spin|mix|round|ceil|floor|percentage)\\b","keyword"]],attribute:[{include:"@nestedJSBegin"},{include:"@comments"},{include:"@strings"},{include:"@numbers"},{include:"@keyword"},["[a-zA-Z\\-]+(?=\\()","attribute.value","@attribute"],[">","operator","@pop"],["\\w+\\-\\w+","attribute.value"],{include:"@operators"},["@[\\w\\-]+","variable"],["[)\\}]","@brackets","@pop"],["[{}()\\[\\]>]","@brackets"],["[;]","delimiter","@pop"],["[,=:]","delimiter"],["\\s",""],["\\w+","attribute.value"],[".","attribute.value"]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],numbers:[["(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["((em|ex|ch|rem|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)\\b)?","attribute.value.unit","@pop"]],strings:[['~?"',{token:"string.delimiter",bracket:"@open",next:"@stringsEndDoubleQuote"}],["~?'",{token:"string.delimiter",bracket:"@open",next:"@stringsEndQuote"}]],stringsEndDoubleQuote:[['\\\\"',"string"],['"',{token:"string.delimiter",next:"@popall",bracket:"@close"}],[".","string"]],stringsEndQuote:[["\\\\'","string"],["'",{token:"string.delimiter",next:"@popall",bracket:"@close"}],[".","string"]],atRules:[{include:"@comments"},{include:"@strings"},["[()]","delimiter"],["[\\{;]","delimiter","@pop"],[".","key"]]}};var a=function(e){function i(n,r){e.call(this,n,r,o.compile(t.language)),this.extraInfoSupport=this,this.referenceSupport=this,this.logicalSelectionSupport=this,this.declarationSupport=this,this.outlineSupport=this}return __extends(i,e),i.prototype._worker=function(t){var i=this;return r.getOrCreateMode("vs.languages.css").then(function(e){return e._worker(function(){return n.TPromise.as(!0)})}).then(function(){return e.prototype._worker.call(i,t)})},i.prototype.canFindReferences=function(e,t){return r.isLineToken(e,t,"attribute.name.less","attribute.value.less","variable.less","tag.class.less","tag.id.less","tag.less")},i.prototype.findReferences=function(e,t){return this._worker(function(n){return n.findReferences(e,t)})},i.prototype.getRangesToPosition=function(e,t){return this._worker(function(n){return n.getRangesToPosition(e,t)})},i.prototype.computeInfo=function(e,t){return this._worker(function(n){return n.computeInfo(e,t)})},i.prototype.getOutline=function(e){return this._worker(function(t){return t.getOutline(e)})},i.prototype.canFindDeclaration=function(e,t){return r.isLineToken(e,t,"variable.less","tag.class.less","tag.id.less","tag.less")},i.prototype.findDeclaration=function(e,t){return this._worker(function(n){return n.findDeclaration(e,t)})},i.prototype.findColorDeclarations=function(e){return this._worker(function(t){return t.findColorDeclarations(e)})},i.prototype.shouldAutotriggerSuggest=function(e,t){var n=e.findIndexOfOffset(t),r=e.getTokenType(n);switch(r){case"comment.less":case"string.less":return!1;default:return!0}},i.$findReferences=s.OneWorker(i,i.prototype.findReferences),i.$getRangesToPosition=s.OneWorker(i,i.prototype.getRangesToPosition),i.$computeInfo=s.OneWorker(i,i.prototype.computeInfo),i.$getOutline=s.OneWorker(i,i.prototype.getOutline),i.$findDeclaration=s.OneWorker(i,i.prototype.findDeclaration),i.$findColorDeclarations=s.OneWorker(i,i.prototype.findColorDeclarations),i}(i.MonarchMode);t.LESSMode=a});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/languages/less/less.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/less/parser/lessScanner",["require","exports","vs/languages/css/parser/cssScanner"],function(e,t,n){var r=("%".charCodeAt(0),"(".charCodeAt(0),"/".charCodeAt(0)),i="\n".charCodeAt(0),o="\r".charCodeAt(0),s="\f".charCodeAt(0),a="`".charCodeAt(0),u=".".charCodeAt(0),l=n.TokenType.CustomToken;t.Ellipsis=l++;var c=function(e){function l(){e.apply(this,arguments)}return __extends(l,e),l.prototype.scan=function(r){void 0===r&&(r=!0);var i={type:void 0,text:void 0,offset:this.stream.pos(),len:0};if(this.lessComment())return this.ignoreComment?this.scan(r):this.finishToken(i,n.TokenType.SingleLineComment);var o=this.escapedJavaScript();return null!==o?this.finishToken(i,o):this.stream.advanceIfChars([u,u,u])?this.finishToken(i,t.Ellipsis):e.prototype.scan.call(this,r)},l.prototype.lessComment=function(){return this.stream.advanceIfChars([r,r])?(this.stream.advanceWhileChar(function(e){switch(e){case i:case o:case s:return!1;default:return!0}}),!0):!1},l.prototype.escapedJavaScript=function(){var e=this.stream.peekChar();return e===a?(this.stream.advance(1),this.stream.advanceWhileChar(function(e){return e!==a}),this.stream.advanceIfChar(a)?n.TokenType.EscapedJavaScript:n.TokenType.BadEscapedJavaScript):null},l}(n.Scanner);t.LessScanner=c});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/less/parser/lessParser",["require","exports","./lessScanner","vs/languages/css/parser/cssScanner","vs/languages/css/parser/cssParser","vs/languages/css/parser/cssNodes","vs/languages/css/parser/cssErrors"],function(e,t,n,r,i,o,s){var a=function(e){function t(){e.call(this,new n.LessScanner)}return __extends(t,e),t.prototype._parseStylesheetStatement=function(){return this._tryParseMixinDeclaration()||e.prototype._parseStylesheetStatement.call(this)||this._parseVariableDeclaration()},t.prototype._parseImport=function(){var e=this.create(o.Import);if(!this.accept(r.TokenType.AtKeyword,"@import")&&!this.accept(r.TokenType.AtKeyword,"@import-once"))return null;if(this.accept(r.TokenType.ParenthesisL)){if(!this.accept(r.TokenType.Ident))return this.finish(e,s.ParseError.IdentifierExpected,[r.TokenType.SemiColon]);if(!this.accept(r.TokenType.ParenthesisR))return this.finish(e,s.ParseError.RightParenthesisExpected,[r.TokenType.SemiColon])}return this.accept(r.TokenType.URI)||this.accept(r.TokenType.String)?(e.setMedialist(this._parseMediaList()),this.finish(e)):this.finish(e,s.ParseError.URIOrStringExpected,[r.TokenType.SemiColon])},t.prototype._parseVariableDeclaration=function(e){void 0===e&&(e=[]);var t=this.create(o.VariableDeclaration),n=this.mark();return t.setVariable(this._parseVariable())?this.accept(r.TokenType.Colon,":")?(t.colonPosition=this.prevToken.offset,t.setValue(this._parseExpr())?this.finish(t):this.finish(t,s.ParseError.VariableValueExpected,[],e)):(this.restoreAtMark(n),null):null},t.prototype._parseVariable=function(){var e=this.create(o.Variable);return this.accept(r.TokenType.AtKeyword)?e:null},t.prototype._parseTerm=function(){var t=e.prototype._parseTerm.call(this);return t?t:(t=this.create(o.Term),t.setExpression(this._parseVariable())||t.setExpression(this._parseEscaped())||t.setExpression(this._parseOperation())?this.finish(t):null)},t.prototype._parseEscaped=function(){var e=this.createNode(o.NodeType.EscapedValue);return this.accept(r.TokenType.EscapedJavaScript)||this.accept(r.TokenType.BadEscapedJavaScript)?this.finish(e):this.accept(r.TokenType.Delim,"~")?this.finish(e,this.accept(r.TokenType.String)?null:s.ParseError.TermExpected):null},t.prototype._parseOperation=function(){var e=this.create(o.Node);return this.accept(r.TokenType.ParenthesisL)?(e.addChild(this._parseExpr()),this.accept(r.TokenType.ParenthesisR)?this.finish(e):this.finish(e,s.ParseError.RightParenthesisExpected)):null},t.prototype._parseOperator=function(){var t=this._parseGuardOperator();return t?t:e.prototype._parseOperator.call(this)},t.prototype._parseGuardOperator=function(){var e=this.createNode(o.NodeType.Operator);return this.accept(r.TokenType.Delim,">")?(this.accept(r.TokenType.Delim,"="),e):this.accept(r.TokenType.Delim,"=")?(this.accept(r.TokenType.Delim,"<"),e):this.accept(r.TokenType.Delim,"<")?e:null},t.prototype._parseRuleSetDeclaration=function(){return this.peek(r.TokenType.AtKeyword)?this._parseKeyframe()||this._parseMedia()||this._parseVariableDeclaration():this._tryParseMixinDeclaration()||this._tryParseRuleset()||this._parseMixinReference()||this._parseDeclaration()},t.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||e.prototype._parseSimpleSelectorBody.call(this)},t.prototype._parseSelectorCombinator=function(){var e=this.createNode(o.NodeType.SelectorCombinator);return this.accept(r.TokenType.Delim,"&")?this.finish(e):null},t.prototype._parseSelectorIdent=function(){return this._parseIdent()||this._parseSelectorInterpolation()},t.prototype._parseSelectorInterpolation=function(){var e=this.createNode(o.NodeType.SelectorInterpolation);return this.accept(r.TokenType.Delim,"~")?this.hasWhitespace()||!this.accept(r.TokenType.String)&&!this.accept(r.TokenType.BadString)?this.finish(e,s.ParseError.StringLiteralExpected):this.finish(e):this.accept(r.TokenType.Delim,"@")?this.hasWhitespace()||!this.accept(r.TokenType.CurlyL)?this.finish(e,s.ParseError.LeftCurlyExpected):e.addChild(this._parseIdent())?this.accept(r.TokenType.CurlyR)?this.finish(e):this.finish(e,s.ParseError.RightCurlyExpected):this.finish(e,s.ParseError.IdentifierExpected):null},t.prototype._tryParseMixinDeclaration=function(){if(!this.peek(r.TokenType.Delim,"."))return null;var e=this.mark(),t=this.create(o.MixinDeclaration);if(!t.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(r.TokenType.ParenthesisL))return this.restoreAtMark(e),null;if(t.getParameters().addChild(this._parseMixinParameter()))for(;this.accept(r.TokenType.Comma)||this.accept(r.TokenType.SemiColon);)if(!t.getParameters().addChild(this._parseMixinParameter()))return this.finish(t,s.ParseError.IdentifierExpected);return this.accept(r.TokenType.ParenthesisR)?(t.setGuard(this._parseGuard()),this.peek(r.TokenType.CurlyL)?this._parseBody(t,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(e),null)):this.finish(t,s.ParseError.RightParenthesisExpected)},t.prototype._parseMixinDeclarationIdentifier=function(){var e=this.create(o.Identifier);return this.consumeToken(),this.hasWhitespace()||!this.accept(r.TokenType.Ident)?null:(e.referenceTypes=[o.ReferenceType.Mixin],this.finish(e))},t.prototype._parseMixinReference=function(){if(!this.peek(r.TokenType.Delim,"."))return null;var e=this.create(o.MixinReference),t=this.create(o.Identifier);if(this.consumeToken(),this.hasWhitespace()||!this.accept(r.TokenType.Ident))return this.finish(e,s.ParseError.IdentifierExpected);if(e.setIdentifier(this.finish(t)),!this.hasWhitespace()&&this.accept(r.TokenType.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(r.TokenType.Comma)||this.accept(r.TokenType.SemiColon);)if(!e.getArguments().addChild(this._parseExpr()))return this.finish(e,s.ParseError.ExpressionExpected);if(!this.accept(r.TokenType.ParenthesisR))return this.finish(e,s.ParseError.RightParenthesisExpected);t.referenceTypes=[o.ReferenceType.Mixin]}else{if(!this.accept(r.TokenType.SemiColon))return this.finish(e,s.ParseError.SemiColonExpected);t.referenceTypes=[o.ReferenceType.Mixin,o.ReferenceType.Rule]}return this.finish(e)},t.prototype._parseMixinParameter=function(){var e=this.create(o.FunctionParameter);if(this.peek(r.TokenType.AtKeyword,"@rest")){var t=this.create(o.Node);return this.consumeToken(),this.accept(n.Ellipsis)?(e.setIdentifier(this.finish(t)),this.finish(e)):this.finish(e,s.ParseError.DotExpected,[],[r.TokenType.Comma,r.TokenType.ParenthesisR])}if(this.peek(n.Ellipsis)){var i=this.create(o.Node);return this.consumeToken(),e.setIdentifier(this.finish(i)),this.finish(e)}return e.setIdentifier(this._parseVariable())&&this.accept(r.TokenType.Colon),e.setDefaultValue(this._parseExpr(!0)),this.finish(e)},t.prototype._parseGuard=function(){var e=this.create(o.LessGuard);if(!this.accept(r.TokenType.Ident,"when"))return null;if(e.isNegated=this.accept(r.TokenType.Ident,"not"),!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,s.ParseError.ConditionExpected);for(;this.accept(r.TokenType.Ident,"and")||this.accept(r.TokenType.Comma,",");)if(!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,s.ParseError.ConditionExpected);return this.finish(e)},t.prototype._parseGuardCondition=function(){var e=this.create(o.GuardCondition);return this.accept(r.TokenType.ParenthesisL)?(!e.addChild(this._parseExpr()),this.accept(r.TokenType.ParenthesisR)?this.finish(e):this.finish(e,s.ParseError.RightParenthesisExpected)):null},t.prototype._parseFunctionIdentifier=function(){if(this.peek(r.TokenType.Delim,"%")){var t=this.create(o.Identifier);return t.referenceTypes=[o.ReferenceType.Function],this.consumeToken(),this.finish(t)}return e.prototype._parseFunctionIdentifier.call(this)},t}(i.Parser);t.LessParser=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/less/lessWorker",["require","exports","vs/languages/css/cssWorker","vs/languages/css/services/intelliSense","./parser/lessParser"],function(e,t,n,r,i){var o=function(e){function t(t,n,r){e.call(this,t,n,r)}return __extends(t,e),t.prototype.createIntellisense=function(){return new r.CSSIntellisense("@")},t.prototype.createParser=function(){return new i.LessParser},t}(n.CSSWorker);t.LessWorker=o});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/languages/less/lessWorker.nls.keys",[],{});stylesheet  : [ CDO | CDC | S | statement ]*;
statement   : ruleset | at-rule;
at-rule     : ATKEYWORD S* any* [ block | ';' S* ];
block       : '{' S* [ any | block | ATKEYWORD S* | ';' S* ]* '}' S*;
ruleset     : selector? '{' S*  [ ruleset | [[declaration | mixin]? [ ';' S* [declaration | mixin]? ]*]] '}' S*;
selector    : any+;
declaration : property S* ':' S* value;
mixin		: selector;
property    : IDENT;
value       : [ any | block | ATKEYWORD S* | at-rule ]+;
any         : [ IDENT | NUMBER | PERCENTAGE | DIMENSION | STRING
              | DELIM | URI | HASH | UNICODE-RANGE | INCLUDES
              | DASHMATCH | ':' | FUNCTION S* [any|unused]* ')'
              | '(' S* [any|unused]* ')' | '[' S* [any|unused]* ']'
              ] S*;
unused      : block | ATKEYWORD S* | ';' S* | CDO S* | CDC S*;/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/languages/plaintext/plaintext.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 i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/sass/sass",["require","exports","vs/editor/modes/monarch/monarch","vs/editor/modes/monarch/monarchCompile","vs/base/lib/winjs.base","vs/editor/modes/modesExtensions","vs/platform/thread/attribute"],function(e,t,n,i,r,o,s){t.language={displayName:"SASS",name:"sass",mimeTypes:["text/x-scss"],fileExtensions:[".scss"],workerDescriptor:{moduleName:"vs/languages/sass/sassWorker",ctorName:"SassWorker"},nonWordTokens:["delimiter.curly.sass","delimiter.bracket.sass","delimiter.parenthesis.sass","delimiter.angle.sass"],wordDefinition:/(#?-?\d*\.\d\w*%?)|([$@#!.:]?[\w-?]+%?)|[$@#!.]/g,defaultToken:"",lineComment:"//",blockCommentStart:"/*",blockCommentEnd:"*/",ws:"[ 	\n\r\f]*",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"},["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["[@](function)",{token:"keyword",next:"@functiondeclaration"}],["[@](mixin)",{token:"keyword",next:"@mixindeclaration"}]],selector:[{include:"@comments"},{include:"@import"},{include:"@variabledeclaration"},{include:"@warndebug"},["[@](include)",{token:"keyword",next:"@includedeclaration"}],["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face)",{token:"keyword"}],{include:"@controlstatement"},{include:"@selectorname"},["[&\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",bracket:"@open",next:"@selectorattribute"}],["{",{token:"delimiter.curly",bracket:"@open",next:"@selectorbody"}]],selectorbody:[["[\\w\\-]+@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],{include:"@selector"},["[@](extend)",{token:"keyword",next:"@extendbody"}],["[@](return)",{token:"keyword",next:"@declarationbody"}],["}",{token:"delimiter.curly",bracket:"@close",next:"@pop"}]],selectorname:[["#{",{token:"meta",bracket:"@open",next:"@variableinterpolation"}],["(\\.|#(?=[^{])|%|\\w|\\-|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",bracket:"@close",next:"@pop"}]],term:[{include:"@comments"},["url\\(",{token:"meta",bracket:"@open",next:"@urldeclaration"}],{include:"@functioninvocation"},{include:"@numbers"},{include:"@strings"},{include:"@variablereference"},["([<>=\\+\\-\\*\\/\\^\\|\\~,]|and\\b|or\\b|not\\b)","operator"],{include:"@name"},[",","delimiter"],["!default","literal"],["\\(",{token:"delimiter.parenthesis",bracket:"@open",next:"@parenthizedterm"}]],rulevalue:[{include:"@term"},["!important","literal"],[";","delimiter","@pop"],["{",{token:"delimiter.curly",bracket:"@open",switchTo:"@nestedproperty"}],["(?=})",{token:"",next:"@pop"}]],nestedproperty:[["[\\w\\-.]+@ws:","attribute.name","@rulevalue"],{include:"@comments"},["}",{token:"delimiter.curly",bracket:"@close",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],variabledeclaration:[["\\$[\\w\\-]+@ws:","variable.decl","@declarationbody"]],urldeclaration:[{include:"@strings"},["[^)\r\n]+","string"],["\\)",{token:"meta",bracket:"@close",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",bracket:"@close",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],extendbody:[{include:"@selectorname"},["!optional","literal"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],variablereference:[["\\$[\\w\\-]+","variable.ref"],["\\.\\.\\.","operator"],["#{",{token:"meta",bracket:"@open",next:"@variableinterpolation"}]],variableinterpolation:[{include:"@variablereference"},["}",{token:"meta",bracket:"@close",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],name:[["[\\w\\-&]+","attribute.value"]],numbers:[["(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","number.hex"]],units:[["(em|ex|ch|rem|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","number","@pop"]],functiondeclaration:[["[\\w\\-]+@ws\\(",{token:"meta",bracket:"@open",next:"@parameterdeclaration"}],["{",{token:"delimiter.curly",bracket:"@open",switchTo:"@functionbody"}]],mixindeclaration:[["[\\w\\-]+@ws\\(",{token:"meta",bracket:"@open",next:"@parameterdeclaration"}],["[\\w\\-]","meta"],["{",{token:"delimiter.curly",bracket:"@open",switchTo:"@selectorbody"}]],parameterdeclaration:[["\\$[\\w\\-]+@ws:","variable.decl"],["\\.\\.\\.","operator"],[",","delimiter"],{include:"@term"},["\\)",{token:"meta",bracket:"@close",next:"@pop"}]],includedeclaration:[{include:"@functioninvocation"},["[\\w\\-]","meta"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}],["{",{token:"delimiter.curly",bracket:"@open",switchTo:"@selectorbody"}]],keyframedeclaration:[["[\\w\\-]","meta"],["{",{token:"delimiter.curly",bracket:"@open",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.curly",bracket:"@open",next:"@selectorbody"}],["}",{token:"delimiter.curly",bracket:"@close",next:"@pop"}]],controlstatement:[["[@](if|else|for|while|each|media)",{token:"keyword.flow",next:"@controlstatementdeclaration"}]],controlstatementdeclaration:[["(in|from|through|if|to)\\b",{token:"keyword.flow"}],{include:"@term"},["{",{token:"delimiter.curly",bracket:"@open",switchTo:"@selectorbody"}]],functionbody:[["[@](return)",{token:"keyword"}],{include:"@variabledeclaration"},{include:"@term"},{include:"@controlstatement"},[";","delimiter"],["}",{token:"delimiter.curly",bracket:"@close",next:"@pop"}]],functioninvocation:[["[\\w\\-]+\\(",{token:"meta",bracket:"@open",next:"@functionarguments"}]],functionarguments:[["\\$[\\w\\-]+@ws:","key"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"meta",bracket:"@close",next:"@pop"}]],strings:[['~?"',{token:"string.delimiter",bracket:"@open",next:"@stringenddoublequote"}],["~?'",{token:"string.delimiter",bracket:"@open",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string.delimiter",next:"@pop",bracket:"@close"}],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string.delimiter",next:"@pop",bracket:"@close"}],[".","string"]]}};var a=function(e){function n(n,r){e.call(this,n,r,i.compile(t.language)),this.extraInfoSupport=this,this.referenceSupport=this,this.logicalSelectionSupport=this,this.declarationSupport=this,this.outlineSupport=this}return __extends(n,e),n.prototype._worker=function(t){var n=this;return o.getOrCreateMode("vs.languages.css").then(function(e){return e._worker(function(){return r.TPromise.as(!0)})}).then(function(){return e.prototype._worker.call(n,t)})},n.prototype.canFindReferences=function(e,t){return o.isLineToken(e,t,"attribute.name.sass","attribute.value.sass","variable.decl.sass","variable.ref.sass","meta.sass","key.sass","tag.sass")},n.prototype.findReferences=function(e,t){return this._worker(function(n){return n.findReferences(e,t)})},n.prototype.getRangesToPosition=function(e,t){return this._worker(function(n){return n.getRangesToPosition(e,t)})},n.prototype.computeInfo=function(e,t){return this._worker(function(n){return n.computeInfo(e,t)})},n.prototype.getOutline=function(e){return this._worker(function(t){return t.getOutline(e)})},n.prototype.canFindDeclaration=function(e,t){return o.isLineToken(e,t,"variable.decl.sass","variable.ref.sass","meta.sass","key.sass","tag.sass")},n.prototype.findDeclaration=function(e,t){return this._worker(function(n){return n.findDeclaration(e,t)})},n.prototype.findColorDeclarations=function(e){return this._worker(function(t){return t.findColorDeclarations(e)})},n.prototype.shouldAutotriggerSuggest=function(e,t){var n=e.findIndexOfOffset(t),i=e.getTokenType(n);switch(i){case"comment.sass":case"string.sass":return!1;default:return!0}},n.$findReferences=s.OneWorker(n,n.prototype.findReferences),n.$getRangesToPosition=s.OneWorker(n,n.prototype.getRangesToPosition),n.$computeInfo=s.OneWorker(n,n.prototype.computeInfo),n.$getOutline=s.OneWorker(n,n.prototype.getOutline),n.$findDeclaration=s.OneWorker(n,n.prototype.findDeclaration),n.$findColorDeclarations=s.OneWorker(n,n.prototype.findColorDeclarations),n}(n.MonarchMode);t.SASSMode=a});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/languages/sass/sass.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 i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/sass/parser/sassScanner",["require","exports","vs/languages/css/parser/cssScanner"],function(e,t,n){var i="/".charCodeAt(0),r="\n".charCodeAt(0),o="\r".charCodeAt(0),s="\f".charCodeAt(0),a="$".charCodeAt(0),c="#".charCodeAt(0),l="{".charCodeAt(0),u="=".charCodeAt(0),p="!".charCodeAt(0),h="<".charCodeAt(0),d=">".charCodeAt(0),f=".".charCodeAt(0),m=n.TokenType.CustomToken;t.VariableName=m++,t.InterpolationFunction=m++,t.Default=m++,t.EqualsOperator=m++,t.NotEqualsOperator=m++,t.GreaterEqualsOperator=m++,t.SmallerEqualsOperator=m++,t.Ellipsis=m++;var g=function(e){function m(){e.apply(this,arguments)}return __extends(m,e),m.prototype.scan=function(i){void 0===i&&(i=!0);var r={type:void 0,text:void 0,offset:this.stream.pos(),len:0};return this.sassComment()?this.ignoreComment?this.scan(i):this.finishToken(r,n.TokenType.SingleLineComment):this.stream.peekChar()===a&&this.nmchar(this.stream.peekChar(1))?(this.stream.advance(1),this.stream.advanceWhileChar(this.nmchar.bind(this)),this.finishToken(r,t.VariableName)):this.stream.advanceIfChars([c,l])?this.finishToken(r,t.InterpolationFunction):this.stream.advanceIfChars([u,u])?this.finishToken(r,t.EqualsOperator):this.stream.advanceIfChars([p,u])?this.finishToken(r,t.NotEqualsOperator):this.stream.advanceIfChar(h)?this.stream.advanceIfChar(u)?this.finishToken(r,t.SmallerEqualsOperator):this.finishToken(r,n.TokenType.Delim):this.stream.advanceIfChar(d)?this.stream.advanceIfChar(u)?this.finishToken(r,t.GreaterEqualsOperator):this.finishToken(r,n.TokenType.Delim):this.stream.advanceIfChars([f,f,f])?this.finishToken(r,t.Ellipsis):e.prototype.scan.call(this,i)},m.prototype.sassComment=function(){return this.stream.advanceIfChars([i,i])?(this.stream.advanceWhileChar(function(e){switch(e){case r:case o:case s:return!1;default:return!0}}),!0):!1},m}(n.Scanner);t.SassScanner=g}),define("vs/languages/sass/parser/sassErrors",["require","exports","vs/nls!vs/languages/sass/sassWorker"],function(e,t,n){var i=function(){function e(e,t){this.id=e,this.message=t}return e}();t.SassIssueType=i,t.ParseError={FromExpected:new i("sass-fromexpected",n.localize("vs_languages_sass_parser_sassErrors",0)),ThroughOrToExpected:new i("sass-throughexpected",n.localize("vs_languages_sass_parser_sassErrors",1)),InExpected:new i("sass-fromexpected",n.localize("vs_languages_sass_parser_sassErrors",2))}});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/sass/parser/sassParser",["require","exports","./sassScanner","./sassErrors","vs/languages/css/parser/cssScanner","vs/languages/css/parser/cssParser","vs/languages/css/parser/cssNodes","vs/languages/css/parser/cssErrors"],function(e,t,n,i,r,o,s,a){var c=function(e){function t(){e.call(this,new n.SassScanner)}return __extends(t,e),t.prototype._parseStylesheetStatement=function(){return e.prototype._parseStylesheetStatement.call(this)||this._parseVariableDeclaration()||this._parseWarnAndDebug()||this._parseControlStatement()||this._parseMixinDeclaration()||this._parseMixinContent()||this._parseMixinReference()||this._parseFunctionDeclaration()},t.prototype._parseImport=function(){var e=this.create(s.Import);if(!this.accept(r.TokenType.AtKeyword,"@import"))return null;if(!this.accept(r.TokenType.URI)&&!this.accept(r.TokenType.String))return this.finish(e,a.ParseError.URIOrStringExpected);for(;this.accept(r.TokenType.Comma);)if(!this.accept(r.TokenType.URI)&&!this.accept(r.TokenType.String))return this.finish(e,a.ParseError.URIOrStringExpected);return e.setMedialist(this._parseMediaList()),this.finish(e)},t.prototype._parseVariableDeclaration=function(e){void 0===e&&(e=[]);var t=this.create(s.VariableDeclaration);return t.setVariable(this._parseVariable())?this.accept(r.TokenType.Colon,":")?(t.colonPosition=this.prevToken.offset,t.setValue(this._parseExpr())?this.accept(r.TokenType.Exclamation)&&!this.accept(r.TokenType.Ident,"default",!0)?this.finish(t,a.ParseError.UnknownKeyword):this.finish(t):this.finish(t,a.ParseError.VariableValueExpected,[],e)):this.finish(t,a.ParseError.ColonExpected):null},t.prototype._parseMediaFeatureName=function(){return this._parseFunction()||this._parseIdent()||this._parseVariable()},t.prototype._parseKeyframeSelector=function(){return e.prototype._parseKeyframeSelector.call(this)||this._parseMixinContent()},t.prototype._parseVariable=function(){var e=this.create(s.Variable);return this.accept(n.VariableName)?e:null},t.prototype._parseIdent=function(e){var t=this.create(s.Identifier);t.referenceTypes=e;for(var n=!1;(this.accept(r.TokenType.Ident)||t.addChild(this._parseInterpolation()))&&(n=!0,!this.hasWhitespace()&&this.accept(r.TokenType.Delim,"-"),!this.hasWhitespace()););return n?this.finish(t):null},t.prototype._parseTerm=function(){var t=e.prototype._parseTerm.call(this);return t?t:(t=this.create(s.Term),t.setExpression(this._parseVariable())||t.setExpression(this._parseOperation())?this.finish(t):null)},t.prototype._parseInterpolation=function(){var e=this.create(s.Interpolation);return this.accept(n.InterpolationFunction)?e.addChild(this._parseBinaryExpr())?this.accept(r.TokenType.CurlyR)?this.finish(e):this.finish(e,a.ParseError.RightCurlyExpected):this.finish(e,a.ParseError.ExpressionExpected):null},t.prototype._parseOperation=function(){var e=this.create(s.Node);return this.accept(r.TokenType.ParenthesisL)?(e.addChild(this._parseExpr()),this.accept(r.TokenType.ParenthesisR)?this.finish(e):this.finish(e,a.ParseError.RightParenthesisExpected)):null},t.prototype._parseOperator=function(){var t=this.createNode(s.NodeType.Operator);if(this.peek(n.EqualsOperator)||this.peek(n.NotEqualsOperator)||this.peek(n.GreaterEqualsOperator)||this.peek(n.SmallerEqualsOperator)||this.peek(r.TokenType.Delim,">")||this.peek(r.TokenType.Delim,"<")||this.peek(r.TokenType.Ident,"and")||this.peek(r.TokenType.Ident,"or")||this.peek(r.TokenType.Delim,"%")){var t=this.createNode(s.NodeType.Operator);return this.consumeToken(),this.finish(t)}return e.prototype._parseOperator.call(this)},t.prototype._parseUnaryOperator=function(){if(this.peek(r.TokenType.Ident,"not")){var t=this.create(s.Node);return this.consumeToken(),this.finish(t)}return e.prototype._parseUnaryOperator.call(this)},t.prototype._parseRuleSetDeclaration=function(){return this.peek(r.TokenType.AtKeyword)?this._parseKeyframe()||this._parseImport()||this._parseMedia()||this._parseFontFace()||this._parseWarnAndDebug()||this._parseControlStatement()||this._parseFunctionDeclaration()||this._parseExtends()||this._parseMixinReference()||this._parseMixinContent()||this._parseMixinDeclaration():this._parseVariableDeclaration()||this._tryParseRuleset()||this._parseDeclaration()},t.prototype._parseDeclaration=function(e){var t=this.create(s.Declaration);if(!t.setProperty(this._parseProperty()))return null;if(!this.accept(r.TokenType.Colon,":"))return this.finish(t,a.ParseError.ColonExpected,[r.TokenType.Colon],e);t.colonPosition=this.prevToken.offset;var n=!1;if(t.setValue(this._parseExpr())&&(n=!0,t.addChild(this._parsePrio())),this.peek(r.TokenType.CurlyL))t.setNestedProperties(this._parseNestedProperties());else if(!n)return this.finish(t,a.ParseError.PropertyValueExpected);return this.peek(r.TokenType.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)},t.prototype._parseNestedProperties=function(){var e=this.create(s.NestedProperties);return this._parseBody(e,this._parseDeclaration.bind(this))},t.prototype._parseExtends=function(){var e=this.create(s.ExtendsReference);return this.accept(r.TokenType.AtKeyword,"@extend")?e.setSelector(this._parseSimpleSelector())?this.accept(r.TokenType.Exclamation)&&!this.accept(r.TokenType.Ident,"optional",!0)?this.finish(e,a.ParseError.UnknownKeyword):this.finish(e):this.finish(e,a.ParseError.SelectorExpected):null},t.prototype._parseSelector=function(){var e=this.create(s.Selector),t=!1;for(e.addChild(this._parseCombinator())&&(t=!0);e.addChild(this._parseSimpleSelector());)t=!0,e.addChild(this._parseCombinator());return t?this.finish(e):null},t.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||this._parseSelectorPlaceholder()||e.prototype._parseSimpleSelectorBody.call(this)},t.prototype._parseSelectorCombinator=function(){var e=this.createNode(s.NodeType.SelectorCombinator);return this.accept(r.TokenType.Delim,"&")?this.finish(e):null},t.prototype._parseSelectorPlaceholder=function(){var e=this.createNode(s.NodeType.SelectorPlaceholder);return this.accept(r.TokenType.Delim,"%")?(this._parseIdent(),this.finish(e)):null},t.prototype._parseWarnAndDebug=function(){if(!this.peek(r.TokenType.AtKeyword,"@debug")&&!this.peek(r.TokenType.AtKeyword,"@warn"))return null;var e=this.createNode(s.NodeType.Debug);return this.consumeToken(),e.addChild(this._parseExpr()),this.finish(e)},t.prototype._parseControlStatement=function(e){return void 0===e&&(e=this._parseRuleSetDeclaration.bind(this)),this.peek(r.TokenType.AtKeyword)?this._parseIfStatement(e)||this._parseForStatement(e)||this._parseEachStatement(e)||this._parseWhileStatement(e):null},t.prototype._parseIfStatement=function(e){return this.peek(r.TokenType.AtKeyword,"@if")?this._internalParseIfStatement(e):null},t.prototype._internalParseIfStatement=function(e){var t=this.create(s.IfStatement);if(this.consumeToken(),!t.setExpression(this._parseBinaryExpr()))return this.finish(t,a.ParseError.ExpressionExpected);if(this._parseBody(t,e),this.accept(r.TokenType.AtKeyword,"@else"))if(this.peek(r.TokenType.Ident,"if"))t.setElseClause(this._internalParseIfStatement(e));else if(this.peek(r.TokenType.CurlyL)){var n=this.create(s.ElseStatement);this._parseBody(n,e),t.setElseClause(n)}return this.finish(t)},t.prototype._parseForStatement=function(e){if(!this.peek(r.TokenType.AtKeyword,"@for"))return null;var t=this.create(s.ForStatement);return this.consumeToken(),t.setVariable(this._parseVariable())?this.accept(r.TokenType.Ident,"from")?t.addChild(this._parseBinaryExpr())?this.accept(r.TokenType.Ident,"to")||this.accept(r.TokenType.Ident,"through")?t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,a.ParseError.ExpressionExpected,[r.TokenType.CurlyR]):this.finish(t,i.ParseError.ThroughOrToExpected,[r.TokenType.CurlyR]):this.finish(t,a.ParseError.ExpressionExpected,[r.TokenType.CurlyR]):this.finish(t,i.ParseError.FromExpected,[r.TokenType.CurlyR]):this.finish(t,a.ParseError.VariableNameExpected,[r.TokenType.CurlyR])},t.prototype._parseEachStatement=function(e){if(!this.peek(r.TokenType.AtKeyword,"@each"))return null;var t=this.create(s.EachStatement);return this.consumeToken(),t.setVariable(this._parseVariable())?this.accept(r.TokenType.Ident,"in")?t.addChild(this._parseExpr())?this._parseBody(t,e):this.finish(t,a.ParseError.ExpressionExpected,[r.TokenType.CurlyR]):this.finish(t,i.ParseError.InExpected,[r.TokenType.CurlyR]):this.finish(t,a.ParseError.VariableNameExpected,[r.TokenType.CurlyR])},t.prototype._parseWhileStatement=function(e){if(!this.peek(r.TokenType.AtKeyword,"@while"))return null;var t=this.create(s.WhileStatement);return this.consumeToken(),t.addChild(this._parseBinaryExpr())?this._parseBody(t,e):this.finish(t,a.ParseError.ExpressionExpected,[r.TokenType.CurlyR])},t.prototype._parseFunctionBodyDeclaration=function(){return this._parseVariableDeclaration()||this._parseReturnStatement()||this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this))},t.prototype._parseFunctionDeclaration=function(){if(!this.peek(r.TokenType.AtKeyword,"@function"))return null;var e=this.create(s.FunctionDeclaration);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([s.ReferenceType.Function])))return this.finish(e,a.ParseError.IdentifierExpected,[r.TokenType.CurlyR]);if(!this.accept(r.TokenType.ParenthesisL))return this.finish(e,a.ParseError.LeftParenthesisExpected,[r.TokenType.CurlyR]);if(e.getParameters().addChild(this._parseParameterDeclaration()))for(;this.accept(r.TokenType.Comma);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,a.ParseError.VariableNameExpected);return this.accept(r.TokenType.ParenthesisR)?this._parseBody(e,this._parseFunctionBodyDeclaration.bind(this)):this.finish(e,a.ParseError.RightParenthesisExpected,[r.TokenType.CurlyR])},t.prototype._parseReturnStatement=function(){if(!this.peek(r.TokenType.AtKeyword,"@return"))return null;var e=this.createNode(s.NodeType.ReturnStatement);return this.consumeToken(),e.addChild(this._parseExpr())?this.finish(e):this.finish(e,a.ParseError.ExpressionExpected)},t.prototype._parseMixinDeclaration=function(){if(!this.peek(r.TokenType.AtKeyword,"@mixin"))return null;var e=this.create(s.MixinDeclaration);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([s.ReferenceType.Mixin])))return this.finish(e,a.ParseError.IdentifierExpected,[r.TokenType.CurlyR]);if(this.accept(r.TokenType.ParenthesisL)){if(e.getParameters().addChild(this._parseParameterDeclaration()))for(;this.accept(r.TokenType.Comma);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,a.ParseError.VariableNameExpected);if(!this.accept(r.TokenType.ParenthesisR))return this.finish(e,a.ParseError.RightParenthesisExpected,[r.TokenType.CurlyR])}return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},t.prototype._parseParameterDeclaration=function(){var e=this.create(s.FunctionParameter);return e.setIdentifier(this._parseVariable())?(this.accept(n.Ellipsis),this.accept(r.TokenType.Colon)&&!e.setDefaultValue(this._parseExpr(!0))?this.finish(e,a.ParseError.VariableValueExpected,[],[r.TokenType.Comma,r.TokenType.ParenthesisR]):this.finish(e)):null},t.prototype._parseMixinContent=function(){if(!this.peek(r.TokenType.AtKeyword,"@content"))return null;var e=this.createNode(s.NodeType.MixinContent);return this.consumeToken(),this.finish(e)},t.prototype._parseMixinReference=function(){if(!this.peek(r.TokenType.AtKeyword,"@include"))return null;var e=this.create(s.MixinReference);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([s.ReferenceType.Mixin])))return this.finish(e,a.ParseError.IdentifierExpected,[r.TokenType.CurlyR]);if(this.accept(r.TokenType.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(r.TokenType.Comma);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,a.ParseError.ExpressionExpected);if(!this.accept(r.TokenType.ParenthesisR))return this.finish(e,a.ParseError.RightParenthesisExpected)}if(this.peek(r.TokenType.CurlyL)){var t=this.create(s.BodyDeclaration);this._parseBody(t,this._parseMixinReferenceBodyStatement.bind(this)),e.setContent(t)}return this.finish(e)},t.prototype._parseMixinReferenceBodyStatement=function(){return this._parseRuleSetDeclaration()||this._parseKeyframeSelector()},t.prototype._parseFunctionArgument=function(){var e=this.create(s.FunctionArgument),t=this.mark(),i=this._parseVariable();if(i)if(this.accept(r.TokenType.Colon))e.setIdentifier(i);else{if(this.accept(n.Ellipsis))return e.setValue(i),this.finish(e);this.restoreAtMark(t)}return e.setValue(this._parseExpr(!0))?this.finish(e):null},t}(o.Parser);t.SassParser=c});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/sass/sassWorker",["require","exports","vs/languages/css/cssWorker","vs/languages/css/services/intelliSense","./parser/sassParser"],function(e,t,n,i,r){var o=function(e){function t(t,n,i){e.call(this,t,n,i)}return __extends(t,e),t.prototype.createIntellisense=function(){return new i.CSSIntellisense("$")},t.prototype.createParser=function(){return new r.SassParser},t}(n.CSSWorker);t.SassWorker=o});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/languages/sass/sassWorker.nls.keys",[],{vs_languages_sass_parser_sassErrors:{path:"vs/languages/sass/parser/sassErrors.js",keys:["expected.from","expected.through","expected.in"]}});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
"use strict";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=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return{dispose:function(){return n(e)}}}function i(e){return{dispose:function(){return n(e)}}}function o(e){return{dispose:function(){return e()}}}function s(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return i(e.map(o))}function a(e){if(e){if("function"==typeof e)return e(),null;if(Array.isArray(e)){for(;e.length>0;)e.pop()();return e}return null}return null}t.disposeAll=n,t.combinedDispose=r,t.combinedDispose2=i,t.fnToDisposable=o,t.toDisposable=s,t.cAll=a;var c=function(){function e(e){this._prefix=e,this._lastId=0}return e.prototype.generate=function(){return this._prefix+ ++this._lastId},e}();t.IdGenerator=c});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 c||n(e,"asHex",0)&&n(e,"equals",1)}function i(){return new c}function o(e){if(!l.test(e))throw new Error("invalid uuid");return new a(e)}function s(){return i().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}(),c=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/languages/javascript/jsdoc",["require","exports","vs/editor/modes/modes","vs/base/strings"],function(e,t,n,r){function i(e,t){if(0===e.getTokenCount())return null;var n=e.getLineContent(),i=n[t];if("*"!==i)return null;if(n.indexOf("*/",t)>=0)return null;var o=e.findIndexOfOffset(t);return r.startsWith(e.getTokenType(o),"comment.doc")?"/*"!==n.substring(e.getTokenStartIndex(o),t)?null:{appendText:"*/"}:null}function o(e,t){if(0===e.getTokenCount())return null;var i,o,s=e.getLineContent(),a=e.findIndexOfOffset(t);return r.startsWith(e.getTokenType(a),"comment.doc")?(i=s.indexOf("/**"),o=s.indexOf("*/"),-1===i&&-1===o?{indentAction:n.IndentAction.None,appendText:"* "}:-1!==i&&t>=i+3&&-1!==o&&o>=t?{indentAction:n.IndentAction.IndentOutdent,appendText:" * ",indentOutdentAppendText:" "}:-1!==i&&t>=i+3?{indentAction:n.IndentAction.None,appendText:" * "}:null):null}t.onElectricCharacter=i,t.onEnter=o}),define("vs/languages/typescript/features/tokenization",["require","exports","vs/base/strings","vs/base/arrays","vs/base/collections","vs/editor/modes/modes","vs/editor/modes/supports","vs/languages/vsxml/vsxml","vs/editor/modes/stream","vs/languages/typescript/lib/typescriptServices"],function(e,t,n,r,i,o,s,a,c,l){function u(e,t){var n=l.createClassifier({log:function(){}}),r=t===h.TypeScript?v:_,i=t===h.TypeScript?y:b;return{shouldGenerateEmbeddedModels:!1,getInitialState:function(){return new f(e,null,t,m.Unknown)},tokenize:function(e,t,o,s){return p(r,i,n,t,e,o,s)}}}function p(e,t,i,a,c,u){function p(e,t,n){(0===v.tokens.length||void 0!==n||r.tail(v.tokens).type!==t)&&v.tokens.push(new s.Token(e,t,n||o.Bracket.None))}void 0===u&&(u=0);var v={tokens:[],actualStopOffset:u+c.length,endState:new f(a.getMode(),a.getStateData(),a.language,m.Unknown),modeTransitions:[{startIndex:u,mode:a.getMode()}]};if(d(a,u,c,p))return v;var y=i.getClassificationsForLine(c,m.toEndOfLineState(a.errorState),!0),_=a.language===h.TypeScript,b=0;return v.endState.errorState=m.toErrorState(y.finalLexState,c,a.errorState),y.entries.forEach(function(r){var i,s=o.Bracket.None;if(r.classification===l.TokenClass.Punctuation){var d=c.charCodeAt(b);s=g[d]||o.Bracket.None,i=e[d]||t[r.classification],p(b+u,i,s)}else r.classification===l.TokenClass.Comment?a.errorState===m.InDocMultiLineCommentTrivia||c.match(/\/\*\*.*$/)&&!c.match(/^\s*\/\//)?p(b+u,_?"comment.doc.ts":"comment.doc.js",o.Bracket.None):a.errorState===m.InMultiLineCommentTrivia||c.match(/\/\*.*$/)&&!c.match(/^\s*\/\//)?p(b+u,_?"comment.block.ts":"comment.block.js",o.Bracket.None):p(b+u,_?"comment.line.ts":"comment.line.js",o.Bracket.None):p(b+u,t[r.classification]||n.empty,void 0);b+=r.length}),v}function d(e,t,n,r){if(!n.match(T))return!1;var i,s,l=new c.LineStream(n),u=new a.VSXMLExpression(e.getMode(),e);for(l.advanceIfRegExp(T).length>0&&r(t,"comment.vs",o.Bracket.None);!l.eos();){s=l.pos();do{if(i=u.tokenize(l),null===i||void 0===i||(void 0===i.type||null===i.type)&&(void 0===i.nextState||null===i.nextState))throw new Error("Tokenizer must return a valid state");if(i.nextState&&(i.nextState.setStateData(u.getStateData()),u=i.nextState),l.pos()<=s)throw new Error}while(!i.type&&""!==i.type);r(s+t,i.type,i.bracket)}return!0}!function(e){e[e.TypeScript=0]="TypeScript",e[e.EcmaScript5=1]="EcmaScript5"}(t.Language||(t.Language={}));var h=t.Language;t.createTokenizationSupport=u;var m;!function(e){e[e.Unknown=0]="Unknown",e[e.InMultiLineCommentTrivia=1]="InMultiLineCommentTrivia",e[e.InDocMultiLineCommentTrivia=2]="InDocMultiLineCommentTrivia",e[e.InSingleQuoteStringLiteral=3]="InSingleQuoteStringLiteral",e[e.InDoubleQuoteStringLiteral=4]="InDoubleQuoteStringLiteral"}(m||(m={}));var m;!function(e){function t(t){switch(t){case e.InSingleQuoteStringLiteral:return l.EndOfLineState.InSingleQuoteStringLiteral;case e.InDoubleQuoteStringLiteral:return l.EndOfLineState.InDoubleQuoteStringLiteral;case e.InMultiLineCommentTrivia:case e.InDocMultiLineCommentTrivia:return l.EndOfLineState.InMultiLineCommentTrivia}return l.EndOfLineState.Start}function n(t,n,r){switch(t){case l.EndOfLineState.Start:return e.Unknown;case l.EndOfLineState.InSingleQuoteStringLiteral:return e.InSingleQuoteStringLiteral;case l.EndOfLineState.InDoubleQuoteStringLiteral:return e.InDoubleQuoteStringLiteral;case l.EndOfLineState.InMultiLineCommentTrivia:return r===e.InDocMultiLineCommentTrivia||n.match(/\/\*\*.*$/)?e.InDocMultiLineCommentTrivia:e.InMultiLineCommentTrivia}}e.toEndOfLineState=t,e.toErrorState=n}(m||(m={}));var f=function(){function e(e,t,n,r){this._mode=e,this._state=t,this.language=n,this.errorState=r}return e.prototype.clone=function(){return new e(this._mode,this._state,this.language,this.errorState)},e.prototype.equals=function(t){return t===this?!0:t&&t instanceof e?this.errorState===t.errorState:!1},e.prototype.getMode=function(){return this._mode},e.prototype.tokenize=function(){throw new Error},e.prototype.getStateData=function(){return this._state},e.prototype.setStateData=function(e){this._state=e},e}(),g=i.createNumberDictionary();g["(".charCodeAt(0)]=o.Bracket.Open,g[")".charCodeAt(0)]=o.Bracket.Close,g["{".charCodeAt(0)]=o.Bracket.Open,g["}".charCodeAt(0)]=o.Bracket.Close,g["[".charCodeAt(0)]=o.Bracket.Open,g["]".charCodeAt(0)]=o.Bracket.Close;var v=i.createNumberDictionary();v["(".charCodeAt(0)]="delimiter.parenthesis.ts",v[")".charCodeAt(0)]="delimiter.parenthesis.ts",v["{".charCodeAt(0)]="delimiter.bracket.ts",v["}".charCodeAt(0)]="delimiter.bracket.ts",v["[".charCodeAt(0)]="delimiter.array.ts",v["]".charCodeAt(0)]="delimiter.array.ts";var y=i.createNumberDictionary();y[l.TokenClass.Identifier]="identifier.ts",y[l.TokenClass.Keyword]="keyword.ts",y[l.TokenClass.Operator]="delimiter.ts",y[l.TokenClass.Punctuation]="delimiter.ts",y[l.TokenClass.NumberLiteral]="number.ts",y[l.TokenClass.RegExpLiteral]="regexp.ts",y[l.TokenClass.StringLiteral]="string.ts";var _=i.createNumberDictionary();_["(".charCodeAt(0)]="delimiter.parenthesis.js",_[")".charCodeAt(0)]="delimiter.parenthesis.js",_["{".charCodeAt(0)]="delimiter.bracket.js",_["}".charCodeAt(0)]="delimiter.bracket.js",_["[".charCodeAt(0)]="delimiter.array.js",_["]".charCodeAt(0)]="delimiter.array.js";var b=i.createNumberDictionary();b[l.TokenClass.Identifier]="identifier.js",b[l.TokenClass.Keyword]="keyword.js",b[l.TokenClass.Operator]="delimiter.js",b[l.TokenClass.Punctuation]="delimiter.js",b[l.TokenClass.NumberLiteral]="number.js",b[l.TokenClass.RegExpLiteral]="regexp.js",b[l.TokenClass.StringLiteral]="string.js";var T=/^\s*\/\/\//}),define("vs/languages/typescript/typescript",["require","exports","vs/platform/platform"],function(e,t,n){var r;!function(e){e.ResourceSetChanged="typescript.resourceSetChanged"}(r=t.Events||(t.Events={}));var i;!function(e){function t(e){i=e}function r(){return i}e.Identifier="vs.languages.typescript",n.Registry.add(e.Identifier,e);var i;e.setProjectResolver=t,e.getProjectResolver=r}(i=t.Extensions||(t.Extensions={}))});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/typescriptMode",["require","exports","vs/base/lib/winjs.base","vs/base/strings","vs/base/lifecycle","vs/base/errors","vs/editor/modes/modesExtensions","vs/editor/modes/supports","vs/base/uuid","vs/languages/javascript/jsdoc","vs/base/arrays","vs/platform/services","vs/languages/typescript/features/tokenization","vs/editor/modes/autoIndentation/autoIndentation","vs/platform/thread/attribute","vs/languages/typescript/typescript"],function(e,t,n,r,i,o,s,a,c,l,u,p,d,h,m,f){var g=new h.Brackets([{tokenType:"delimiter.bracket.ts",open:"{",close:"}",isElectric:!0},{tokenType:"delimiter.array.ts",open:"[",close:"]",isElectric:!0},{tokenType:"delimiter.parenthesis.ts",open:"(",close:")",isElectric:!0}]),v=function(e){function t(t,n){var r=this;e.call(this,t,n,p.AsyncDescriptor.create("vs/languages/typescript/typescriptWorker2","TypeScriptWorker2")),this._disposables=[],this._projectResolverPromise=null,this._projectPromise=null,this._pendingCallbacks=[],this._telemetryService=t.telemetryService,t.eventService&&this._disposables.push(t.eventService.addListener2(f.Events.ResourceSetChanged,function(){return r._joinProjectResolver()})),this.tokenizationSupport=d.createTokenizationSupport(this,d.Language.TypeScript),this.electricCharacterSupport=new a.ElectricCharacterSupport(this,this),this.referenceSupport=this,this.navigateTypesSupport=this,this.extraInfoSupport=this,this.formattingSupport=this,this.declarationSupport=this,this.quickFixSupport=this,this.logicalSelectionSupport=this,this.parameterHintsSupport=this,this.outlineSupport=this,this.emitOutputSupport=this,this.codeLensSupport=this,this.characterPairSupport=new a.CharacterPairSupport(this,[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`"}])}return __extends(t,e),t.prototype.dispose=function(){this._disposables=i.disposeAll(this._disposables)},t.prototype._releaseCallbacks=function(e,t){for(;this._pendingCallbacks.length>0;){var n=this._pendingCallbacks.shift();t?n.error(t):n.completion(e)}},t.prototype._joinProjectResolver=function(){var e=this;if(!this._threadService.isInMainThread)return null;var t,r;if(r=new n.TPromise(function(n,r){t={completion:n,error:r},e._pendingCallbacks.push(t)},function(){var n=e._pendingCallbacks.indexOf(t);n>=0&&(e._pendingCallbacks.splice(n,1),t.error(o.canceled()))}),!this._projectPromise){if(!this._projectResolverPromise){var i=this._getProjectResolverDescription();if(!i)return null;this._projectResolverPromise=this._instantiationService.createInstance(i)}this._projectPromise=this._projectResolverPromise.then(function(e){var t=e.resolve();return n.Promise.is(t)?t:n.TPromise.as({})}).then(function(t){return t?t.hasChanges!==!0&&u.isFalsyOrEmpty(t.added)&&u.isFalsyOrEmpty(t.removed)?null:e._acceptProjectDelta(t):null});var s,a=Date.now(),l=c.v4().asHex();s=setInterval(function(){e._telemetryService.log("typescript.projectResolver.slow",{module:e._getProjectResolverDescription().moduleName,ctor:e._getProjectResolverDescription().ctorName,resolveCallUuid:l,totalWaitTime:Date.now()-a})},2e4),this._projectPromise.done(function(t){clearTimeout(s),e._projectPromise=null,e._releaseCallbacks(t,null)},function(t){clearTimeout(s),e._projectPromise=null,e._releaseCallbacks(null,t)})}return r},t.prototype._getProjectResolverDescription=function(){return f.Extensions.getProjectResolver()},t.prototype._acceptProjectDelta=function(e){return this._worker(function(t){return t.acceptProjectDelta(e)})},t.prototype.getNonWordTokenTypes=function(){return["delimiter.ts","delimiter.parenthesis.ts","delimiter.bracket.ts","delimiter.array.ts"]},t.prototype.getElectricCharacters=function(){return["*"].concat(g.getElectricBrackets())},t.prototype.onEnter=function(e,t){return l.onEnter(e,t)||g.onEnter(e,t)},t.prototype.onElectricCharacter=function(e,t){return l.onElectricCharacter(e,t)||g.onElectricCharacter(e,t)},t.prototype.getCommentsConfiguration=function(){return{lineCommentTokens:["//"],blockCommentStartToken:"/*",blockCommentEndToken:"*/"}},t.prototype.getTriggerCharacters=function(){return["."]},t.prototype.shouldAutotriggerSuggestImpl=function(e,t){if(0===e.getTokenCount())return!1;var n=e.findIndexOfOffset(t-1),r=e.getTokenType(n);return r.indexOf("string")>=0||r.indexOf("comment")>=0||r.indexOf("number")>=0?!1:!0},t.prototype._pickAWorkerToValidate=function(){return this._worker(function(e){return e.enableValidator()})},t.prototype.getOutline=function(e){return this._worker(function(t){return t.getOutline(e)})},t.prototype.findOccurrences=function(e,t,n){return void 0===n&&(n=!1),this._worker(function(r){return r.findOccurrences(e,t,n)})},t.prototype.suggest=function(e,t){return this._worker(function(n){return n.suggest(e,t)})},t.prototype.getSorter=function(){return function(e,t){if("reference"===e.type&&"reference"===t.type){var n=e.label.split("/"),i=t.label.split("/");if(n.length<i.length)return-1;if(n.length>i.length)return 1;for(var o=0;o<n.length;o++){var s=r.localeCompare(n[o],i[o]);if(0!=s)return s}return 0}return"reference"===e.type?-1:"reference"===t.type?1:r.localeCompare(e.label.toLowerCase(),t.label.toLowerCase())}},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){if(0===e.getTokenCount())return!1;var n=e.findIndexOfOffset(t-1),r=e.getTokenType(n);return"string.ts"===r?!1:!0},t.prototype.getEmitOutput=function(e,t){return void 0===t&&(t=void 0),this._worker(function(n){return n.getEmitOutput(e,t)})},t.prototype.getWordDefinition=function(){return t.WORD_DEFINITION},t.prototype.canFindReferences=function(e,t){return s.isLineToken(e,t,"identifier.ts")},t.prototype._worker=function(t){return e.prototype._worker.call(this,t)},t.prototype.findReferences=function(e,t,n){return this._worker(function(r){return r.findReferences(e,t,n)})},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 s.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.canFindTypeDeclaration=function(e,t){return s.isLineToken(e,t,"identifier.ts")},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[";","}","\n"]},t.prototype.formatDocument=function(e,t){return this._worker(function(n){return n.formatDocument(e,t)})},t.prototype.formatRange=function(e,t,n){return this._worker(function(r){return r.formatRange(e,t,n)})},t.prototype.formatAfterKeystroke=function(e,t,n,r){return this._worker(function(i){return i.formatAfterKeystroke(e,t,n,r)})},t.prototype.enableCodeLens=function(){return this._options&&this._options.enableCodeLens===!0},t.prototype.findCodeLensSymbols=function(e){return this._worker(function(t){return t.findCodeLensSymbols(e)})},t.prototype.findCodeLensReferences=function(e,t){return this._worker(function(n){return n.findCodeLensReferences(e,t)})},t.$_acceptProjectDelta=m.AllWorkers(t,t.prototype._acceptProjectDelta),t.$_pickAWorkerToValidate=m.OneWorker(t,t.prototype._pickAWorkerToValidate,t.prototype._joinProjectResolver,p.ThreadAffinity.Group3),t.$getOutline=m.OneWorker(t,t.prototype.getOutline,p.ThreadAffinity.Group1),t.$findOccurrences=m.OneWorker(t,t.prototype.findOccurrences,t.prototype._joinProjectResolver,p.ThreadAffinity.Group2),t.$suggest=m.OneWorker(t,t.prototype.suggest,t.prototype._joinProjectResolver,p.ThreadAffinity.Group2),t.$getSuggestionDetails=m.OneWorker(t,t.prototype.getSuggestionDetails,t.prototype._joinProjectResolver,p.ThreadAffinity.Group2),t.$getParameterHints=m.OneWorker(t,t.prototype.getParameterHints,t.prototype._joinProjectResolver,p.ThreadAffinity.Group2),t.$getEmitOutput=m.OneWorker(t,t.prototype.getEmitOutput,t.prototype._joinProjectResolver,p.ThreadAffinity.Group3),t.WORD_DEFINITION=s.createWordRegExp("$"),t.$findReferences=m.OneWorker(t,t.prototype.findReferences,t.prototype._joinProjectResolver,p.ThreadAffinity.Group3),t.$getNavigateToItems=m.OneWorker(t,t.prototype.getNavigateToItems,t.prototype._joinProjectResolver,p.ThreadAffinity.Group3),t.$quickFix=m.OneWorker(t,t.prototype.quickFix,t.prototype._joinProjectResolver,p.ThreadAffinity.Group2),t.$getRangesToPosition=m.OneWorker(t,t.prototype.getRangesToPosition,p.ThreadAffinity.Group1),t.$findDeclaration=m.OneWorker(t,t.prototype.findDeclaration,t.prototype._joinProjectResolver,p.ThreadAffinity.Group2),t.$findTypeDeclaration=m.OneWorker(t,t.prototype.findTypeDeclaration,t.prototype._joinProjectResolver,p.ThreadAffinity.Group2),t.$computeInfo=m.OneWorker(t,t.prototype.computeInfo,t.prototype._joinProjectResolver,p.ThreadAffinity.Group2),t.$formatDocument=m.OneWorker(t,t.prototype.formatDocument,p.ThreadAffinity.Group1),t.$formatRange=m.OneWorker(t,t.prototype.formatRange,p.ThreadAffinity.Group1),t.$formatAfterKeystroke=m.OneWorker(t,t.prototype.formatAfterKeystroke,p.ThreadAffinity.Group1),t.findCodeLensSymbols=m.OneWorker(t,t.prototype.findCodeLensSymbols,p.ThreadAffinity.Group1),t.findCodeLensReferences=m.OneWorker(t,t.prototype.findCodeLensReferences,t.prototype._joinProjectResolver,p.ThreadAffinity.Group3),t}(s.AbstractMode);t.TypeScriptMode=v});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/languages/typescript/typescriptMode.nls.keys",[],{});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
"use strict";define("vs/base/trie",["require","exports","vs/base/collections","vs/base/assert"],function(e,t,n,r){function i(e,t){void 0===t&&(t=h);var r,i;return r={_key:null,_parent:null,_children:{},parent:function(){return null},children:function(e){return void 0===e&&(e=!1),c(this,e)}},i={insert:function(e,n){return o(r,t(e),n)},lookUp:function(e,n){return void 0===n&&(n=!1),s(r,t(e),n)},roots:function(){return c(r,!1)},values:function(){return l(r)},fringe:function(){return u(r)},remove:function(e){return p(e)}},"undefined"!=typeof e&&n.forEach(e,function(e){i.insert(e.key,e.value)}),i}function o(e,t,n){for(var r=0,i=t.length,o=e;i>r&&(o=e._children[t[r]]);)e=o,r+=1;for(;i>r;)o={_key:t[r],_parent:e,_children:{},parent:function(){return a(this)},children:function(e){return void 0===e&&(e=!1),c(this,e)}},e._children[t[r]]=o,e=o,r+=1;return o.element=n,o}function s(e,t,n){for(var r=0,i=t.length,o=e,s=void 0!==o.element?o:void 0;i>r&&(o=e._children[t[r]]);)e=o,r+=1,void 0!==o.element&&(s=o);return o&&void 0!==o.element?o:n&&void 0!==s?s:null}function a(e){for(;e._parent;){if("undefined"!=typeof e._parent.element)return e._parent;e=e._parent}return null}function c(e,t){for(var r=[],i=n.values(e._children);i.length>0;)e=i.shift(),void 0!==e.element&&r.push(e),(t||void 0===e.element)&&i.push.apply(i,n.values(e._children));return r}function l(e){for(var t=[],r=[e];r.length>0;)e=r.pop(),void 0!==e.element&&t.push(e.element),n.forEach(e._children,function(e){r.push(e.value)});return t}function u(e){for(var t=[e],i=[];t.length>0;){var o=t.pop(),s=t.length;n.forEach(o._children,function(e){t.push(e.value)}),s===t.length&&null!==o._key&&(r.ok("undefined"!=typeof o.element),i.push(o))}return i}function p(e){return e._parent?e._parent._children[e._key]!==e?!1:(delete e._parent._children[e._key],"undefined"==typeof e._parent.element&&d(e._parent._children)&&p(e._parent),!0):!1}function d(e){if(!e)return!0;for(var t in e)if(m.call(e,t))return!1;return!0}var h=function(e){return e.split("")};t.newTrie=i;var m=Object.prototype.hasOwnProperty}),define("vs/languages/typescript/typescript.configuration",["require","exports","vs/base/objects","vs/base/severity","vs/base/paths","vs/base/trie","vs/base/strings"],function(e,t,n,r,i,o,s){function a(e,t,n){return e instanceof l?e:new l(e,t,n)}function c(e,t){return e instanceof l&&(e=e.raw),t instanceof l&&(t=t.raw),n.equals(e,t)}t.impilictAnyClassifier=function(e){return e.code>=7005&&e.code<=7018?r.Warning:r.Error},t.defaultLintSettings={emptyBlocksWithoutComment:"ignore",curlyBracketsMustNotBeOmitted:"ignore",comparisonOperatorsNotStrict:"ignore",missingSemicolon:"ignore",unknownTypeOfResults:"ignore",semicolonsInsteadOfBlocks:"ignore",functionsInsideLoops:"ignore",functionsWithoutReturnType:"ignore",tripleSlashReferenceAlike:"ignore",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.defaultSuggestSettings={alwaysAllWords:!1,useCodeSnippetsOnMethodSuggest:!1};var l=function(){function e(e,t,n){this._raw=e,this._defaultCompileSettings=t,this._defaultSuggestSettings=n}return Object.defineProperty(e.prototype,"raw",{get:function(){return this._raw},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validationSettings",{get:function(){return this._compileSettings||(this._compileSettings=this._ensureCompileSettings()),this._compileSettings.slice(0)},enumerable:!0,configurable:!0}),e.prototype._ensureCompileSettings=function(){var e=this;if(!this._raw||!this._raw.validationSettings)return[this._defaultCompileSettings];if(Array.isArray(this._raw.validationSettings)){if(0===this._raw.validationSettings.length)return[this._defaultCompileSettings]}else this._raw.validationSettings=[this._raw.validationSettings];var t=o.newTrie(),r=[],a=!1;this._raw.validationSettings.forEach(function(e){var r,o=e.scope;s.isFalsyOrWhitespace(o)?o=i.sep:(o=i.makeAbsolute(o),o=i.normalize(o)),e.scope=o,a=a||o===i.sep,s.isFalsyOrWhitespace(e.module)&&!s.isFalsyOrWhitespace(e.moduleGenTarget)&&(e.module=e.moduleGenTarget),s.isFalsyOrWhitespace(e.target)&&!s.isFalsyOrWhitespace(e.codeGenTarget)&&(e.target=e.codeGenTarget),r=t.lookUp(e.scope),r&&(e=n.withDefaults(e,r.element)),t.insert(e.scope,e)}),a||t.insert(i.sep,this._defaultCompileSettings);for(var c;(c=t.fringe()).length>0;)c.forEach(function(o){for(var s=o.element,a=o.parent(),c=[e._defaultCompileSettings];null!==a;)c.push(a.element),a=a.parent();for(;0!==c.length;)s=n.withDefaults(s,c.pop());s.baseUrl=i.normalize(s.baseUrl),s.baseUrl=i.makeAbsolute(s.baseUrl),t.remove(o),r.unshift(s)});return r.sort(function(e,t){return e.scope.length-t.scope.length}),r},Object.defineProperty(e.prototype,"suggestSettings",{get:function(){return this._suggestSettings||(this._suggestSettings=this._raw&&this._raw.suggestSettings?n.withDefaults(this._raw.suggestSettings,this._defaultSuggestSettings):this._defaultSuggestSettings),n.clone(this._suggestSettings)},enumerable:!0,configurable:!0}),e}();t.sanitize=a,t.equal=c}),define("vs/base/sortedList",["require","exports","vs/base/arrays"],function(e,t,n){var r=function(){function e(t){this.keys=[],this.values=[],this.comparator=t||e.DEFAULT_COMPARATOR}return Object.defineProperty(e.prototype,"count",{get:function(){return this.keys.length},enumerable:!0,configurable:!0}),e.prototype.getValueByIndex=function(e){return e>=0&&e<this.values.length?this.values[e]:null},e.prototype.getKey=function(e){return e>=0&&e<this.keys.length?this.keys[e]:null},e.prototype.getKeys=function(){return new o(this.keys)},e.prototype.getValue=function(e){if(!e)throw new Error("Key must be defined.");var t=this.indexOfKey(e);return t>=0?this.values[t]:null},e.prototype.getValues=function(){return new o(this.values)},e.prototype.indexOfKey=function(e){if(!e)throw new Error("Key must be defined.");return n.binarySearch(this.keys,e,this.comparator)},e.prototype.add=function(e,t){if(!e||!t)throw new Error("Key and value must be defined.");for(var n=0;n<this.keys.length&&this.comparator(e,this.keys[n])>0;)n++;this.keys.splice(n,0,e),this.values.splice(n,0,t)},e.prototype.remove=function(e){if(!e)throw new Error("Key must be defined.");var t=this.indexOfKey(e);return t>=0&&(this.values.splice(t,1),this.keys.splice(t,1)),t>=0},e.prototype.getIterator=function(){return new i(this.keys,this.values)},e.DEFAULT_COMPARATOR=function(e,t){return t>e?-1:e>t?1:0},e}();t.SortedList=r;var i=function(){function e(e,t){this.keys=e,this.values=t,this.index=-1}return Object.defineProperty(e.prototype,"current",{get:function(){return this.index<0||this.keys.length<this.index?null:{key:this.keys[this.index],value:this.values[this.index]}},enumerable:!0,configurable:!0}),e.prototype.moveNext=function(){return this.index++,this.index<this.keys.length},e.prototype.hasNext=function(){return this.index+1<this.keys.length},e.prototype.reset=function(){this.index=-1},e.prototype.dispose=function(){this.keys=null,this.values=null},e}(),o=function(){function e(e){this.values=e,this.index=-1}return Object.defineProperty(e.prototype,"current",{get:function(){return this.index<0||this.values.length<this.index?null:this.values[this.index]},enumerable:!0,configurable:!0}),e.prototype.moveNext=function(){return this.index++,this.index<this.values.length},e.prototype.hasNext=function(){return this.index+1<this.values.length},e.prototype.reset=function(){this.index=-1},e.prototype.dispose=function(){this.values=null},e}()}),define("vs/languages/typescript/features/validationStrategy",["require","exports","vs/base/lifecycle","vs/base/sortedList","vs/platform/services"],function(e,t,n,r,i){function o(e,t){var n=e.reason-t.reason;if(0!==n)return n;if(n=e.type-t.type,0!==n)return n;if(n=t.timestamp-e.timestamp,0!==n)return n;var r=e.resource.toExternal(),i=t.resource.toExternal();return i>r?-1:r>i?1:0}!function(e){e[e.ItChanged=1]="ItChanged",e[e.SomeChanged=2]="SomeChanged"}(t.ValidationReason||(t.ValidationReason={}));var s=t.ValidationReason;!function(e){e[e.Syntax=1]="Syntax",e[e.Semantic=2]="Semantic"}(t.ValidationType||(t.ValidationType={}));var a=t.ValidationType,c=function(){function e(e){this._data=new r.SortedList(e)}return Object.defineProperty(e.prototype,"count",{get:function(){return this._data.count},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this._data.indexOfKey(e);return 0>t?(this._data.add(e,!0),!0):!1},e.prototype.remove=function(e){for(var t=this.getIterator(),n=[],r=!1;t.moveNext();)e(t.current)&&(n.push(t.current),r=!0);for(;n.length>0;)this._data.remove(n.pop());return r},e.prototype.contains=function(e){return this._data.indexOfKey(e)>=0},e.prototype.first=function(){var e=this._data.getKey(0);return null!==e&&this._data.remove(e),e},e.prototype.peek=function(){return this._data.getKey(0)},e.prototype.getIterator=function(){return this._data.getKeys()},e}(),l=function(){function e(e,t){var n=this;this._disposeables=[],this._queue=new c(o),this._scheduleHandle=-1,this._resourceService=e.resourceService,this._disposeables.push(this._resourceService.addListener2(i.ResourceEvents.REMOVED,function(e){return n._onResourceRemoved(e.url)})),this._validationCallback=t}return e.prototype._onResourceRemoved=function(e){this._queue.remove(function(t){return t.resource.equals(e)}),0===this._queue.count&&clearTimeout(this._scheduleHandle)},e.prototype.dispose=function(){n.disposeAll(this._disposeables),clearTimeout(this._scheduleHandle),this._queue=null},e.prototype.scheduleValidation=function(e,t){if(e===s.ItChanged)this._queue.remove(function(e){return e.resource.equals(t.getAssociatedResource())}),this._queue.add({reason:e,type:a.Syntax,resource:t.getAssociatedResource(),timestamp:Date.now()}),this._queue.add({reason:e,type:a.Semantic,resource:t.getAssociatedResource(),timestamp:Date.now()});else{for(var n=!1,r=this._queue.getIterator();r.moveNext()&&!n;)r.current.resource.equals(t.getAssociatedResource())&&r.current.reason===s.ItChanged&&r.current.type===a.Semantic&&(n=!0);n||this._queue.add({reason:e,type:a.Semantic,resource:t.getAssociatedResource(),timestamp:Date.now()})}this._scheduleNext()},e.prototype._scheduleNext=function(){var e=this;if(0!==this._queue.count){clearTimeout(this._scheduleHandle);var t=this._queue.peek().reason===s.ItChanged?0:1e3;this._scheduleHandle=setTimeout(function(){var t=e._queue.first();e._validationCallback(t.resource,t.type,t.reason).then(function(){e._scheduleNext()},function(t){console.error(t),e._scheduleNext()}),e._scheduleNext()},t)}},e}();t.ValidationStrategy=l}),define("vs/languages/typescript/project/project",["require","exports","vs/base/lib/winjs.base"],function(e,t,n){var r=function(){function e(e){this._delegates=e}return e.prototype.resolve=function(e){return this._doResolve(e,0)},e.prototype._doResolve=function(e,t){var r=this;return t>=this._delegates.length?n.TPromise.as(null):this._delegates[t].resolve(e).then(function(i){return i?n.TPromise.as(i):r._doResolve(e,t+1)})},e.prototype.accept=function(e){return this._doAccept(e,0)},e.prototype._doAccept=function(e,t){var r=this;return t>=this._delegates.length?n.TPromise.as(null):this._delegates[t].accept(e).then(function(){return r._doAccept(e,t+1)})},e}();t.CompositeContentResolver=r}),define("vs/base/db/indexeddb",["require","exports","vs/base/types","vs/base/lib/winjs.base","vs/base/errors"],function(e,t,n,r,i){function o(){return"undefined"!=typeof indexedDB}function s(e,t,n){return new r.TPromise(function(r,i){var o;o="undefined"!=typeof t?indexedDB.open(e,t):indexedDB.open(e),o.onerror=function(e){return i(e)},o.onsuccess=function(e){return r(new u(e.target.result))},o.onupgradeneeded=function(e){if(!n)return i(e);var t=e.target.result;n({createDataStore:function(e){var n=t.createObjectStore(e.name,{keyPath:e.keyPath,autoIncrement:e.autoIncrement});e.index&&e.index.forEach(function(e){return n.createIndex(e.name,e.keyPath,e.options)})},deleteDataStore:function(e){t.deleteObjectStore(e)}},t)}})}function a(e){return new r.TPromise(function(t,n){e.onsuccess=function(){t(e)},e.onerror=function(t){n(e.error||t)}})}t.canBeUsed=o,function(e){e[e.ReadOnly=0]="ReadOnly",e[e.ReadWrite=1]="ReadWrite",e[e.VersionChange=2]="VersionChange"}(t.TransactionMode||(t.TransactionMode={}));var c,c=t.TransactionMode;!function(e){function t(t){return e[t]?e[t].toLowerCase():null}e.toString=t}(c=t.TransactionMode||(t.TransactionMode={})),function(e){e[e.Next=0]="Next",e[e.NextUnique=1]="NextUnique",e[e.Prev=2]="Prev",e[e.PrevUnique=3]="PrevUnique"}(t.Direction||(t.Direction={}));var l,l=t.Direction;!function(e){function t(t){return e[t]?e[t].toLowerCase():null}e.toString=t}(l=t.Direction||(t.Direction={})),t.openDatabase=s;var u=function(){function e(e){this._db=e}return Object.defineProperty(e.prototype,"db",{get:function(){return this._db},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._db.close()},e.prototype.createTransaction=function(e,t){return"undefined"!=typeof t?this._db.transaction(e,c.toString(t)):this._db.transaction(e)},e.prototype.objectStore=function(e){return this._db.objectStoreNames.contains(e)?new p(e,this):null},e}();t.Database=u;var p=function(){function e(e,t){this._name=e,this._database=t}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"store",{get:function(){return this._database.db.transaction(this._name).objectStore(this._name)},enumerable:!0,configurable:!0}),e.prototype.executeTransaction=function(e,t){var n=this;return new r.TPromise(function(r,o){var s,a;try{s=n._database.db.transaction(n._name,c.toString(e))}catch(l){return"InvalidStateError"===l.name&&(l=i.canceled()),o(l)}s.onerror=function(e){return o(e.target.error)},s.oncomplete=function(){return r(a)},s.onabort=function(){return o(i.canceled())};try{a=t(s.objectStore(n._name),s)}catch(l){s.abort(),o(l)}})},e.prototype.openCursor=function(e,t,n,r){return d.openCursor(this,null,e,t,n,r)},e.prototype.openIndexCursor=function(e,t,n,r,i){var o=this;return this.executeTransaction(t,function(){return d.openCursor(o,e,t,n,r,i)}).then(function(e){return e})},e.prototype.get=function(e){return this.executeTransaction(c.ReadOnly,function(t){return a(t.get(e))}).then(function(e){return e}).then(function(e){return e.result})},e}();t.ObjectStore=p;var d;!function(e){function t(e,t,i,o,s,a){var c,u=l.Next;return n.isFunction(o)?a=o:n.isFunction(s)?(c=o,a=s):(c=o,u=s),new r.TPromise(function(n,r){var o,s=[];e.executeTransaction(i,function(e){var n;n=t?e.index(t).openCursor(c,l.toString(u)):e.openCursor(c,l.toString(u)),n.onsuccess=function(t){var n=t.target;n.result&&s.push(a(n.result.value,n.result,e))},n.onerror=function(e){return o=e}}).then(function(){o?r(o):n(s)},r)})}e.openCursor=t}(d||(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/project/languageServiceHosts",["require","exports","vs/base/collections","vs/base/lifecycle"],function(e,t,n,r){var i=function(){function e(e){this._original=e}return e.NewInstanceIfRequired=function(t){return t.getLength()>1e6?new e(t):t},e.prototype._getEmptyValue=function(){if(!this._emptyValue){var e=this._original.getLength(),t=this._original.getText(0,e);this._emptyValue=t.replace(/[^\r\n]/g," ")}return this._emptyValue},e.prototype.getText=function(e,t){return this._getEmptyValue().substring(e,t)},e.prototype.getLength=function(){return this._getEmptyValue().length},e.prototype.isOpen=function(){return this._original.isOpen()},e.prototype.getVersionId=function(){return this._original.getVersionId()},e.prototype.getLineStartPositions=function(){return this._original.getLineStartPositions()},e.prototype.getChangeRange=function(e){return this._original.getChangeRange(e)},e}(),o=function(){function e(e,t){this._newSnapshot=e;var n=t.getVersionId()-this._newSnapshot.getVersionId();this._versionIdDelta=1+Math.max(0,n)}return e.prototype.isOpen=function(){return this._newSnapshot.isOpen()},e.prototype.getVersionId=function(){return this._newSnapshot.getVersionId()+this._versionIdDelta},e.prototype.getText=function(e,t){return this._newSnapshot.getText(e,t)},e.prototype.getLength=function(){return this._newSnapshot.getLength()},e.prototype.getLineStartPositions=function(){return this._newSnapshot.getLineStartPositions()},e.prototype.getChangeRange=function(e){return this._newSnapshot.getChangeRange(e)},e}(),s=function(){function e(e){this._versionId=e.getVersionId(),this._value=e.getValue(),this._length=this._value.length,this._lineStarts=[];for(var t=0,n=e.getLineCount();n>t;t++)this._lineStarts.push(e.getLineStart(t+1))}return e.prototype.isOpen=function(){return!0},e.prototype.getVersionId=function(){return this._versionId},e.prototype.getText=function(e,t){return this._value.substring(e,t)},e.prototype.getLength=function(){return this._length},e.prototype.getLineStartPositions=function(){return this._lineStarts},e.prototype.getChangeRange=function(){return null},e}(),a=function(){function e(e){this._snapshot=e}return e.prototype.isOpen=function(){return!1},e.prototype.getVersionId=function(){return-1},e.prototype.getText=function(e,t){return this._snapshot.getText(e,t)},e.prototype.getLength=function(){return this._snapshot.getLength()},e.prototype.getLineStartPositions=function(){return this._snapshot.getLineStartPositions()},e.prototype.getChangeRange=function(){return null},e}(),c=function(){function e(){}return e.prototype.log=function(){},e}();t.NullLogger=c;var l=function(e){function t(t,n,r){var i=this;e.call(this),this._snapshots=Object.create(null),this._disposables=[],this._resourceService=t.resourceService,this._mode=n,this._resourceFilter=r,this._compilationSettings=Object.create(null),this._disposables.push(this._resourceService.addListener2("resource.added",function(){return i._resetStateId()})),this._disposables.push(this._resourceService.addListener2("resource.removed",function(){return i._resetStateId()})),this._disposables.push(this._resourceService.addListener2("resource.changed",function(){return i._resetStateId()}))}return __extends(t,e),t.prototype.dispose=function(){this._snapshots=Object.create(null),r.disposeAll(this._disposables)},t.prototype.getStateId=function(){return this._stateId||(this._stateId=Math.random()),this._stateId},t.prototype._resetStateId=function(){this._stateId=null},t.prototype._insert=function(e,t){t=i.NewInstanceIfRequired(t);var n=this._snapshots[e];return!n||n.getVersionId()<t.getVersionId()?(this._snapshots[e]=t,!0):n.getVersionId()===t.getVersionId()?!1:n.getVersionId()>t.getVersionId()?(this._snapshots[e]=new o(t,n),!0):void 0},t.prototype._sync=function(){if(this._lastSyncedState!==this.getStateId()){var e=Object.create(null);for(var t in this._snapshots)this._snapshots[t]instanceof s&&(e[t]=!0);for(var n=this._resourceService.all(),r=0,i=n.length;i>r;r++)if(this._resourceFilter(n[r])){var o=n[r],a=o.getAssociatedResource().toExternal();this._insert(a,new s(o))&&this._resetStateId(),delete e[a]}for(var t in e)delete this._snapshots[t],this._stateId=null;this._lastSyncedState=this.getStateId()}},t.prototype.getScriptFileNames=function(){return this._sync(),Object.keys(this._snapshots)},t.prototype.getScriptVersion=function(e){return this._sync(),String(this._snapshots[e].getVersionId())},t.prototype.getScriptIsOpen=function(e){return this._sync(),this._snapshots[e].isOpen()},t.prototype.getScriptSnapshot=function(e){return this._sync(),this._snapshots[e]},t.prototype.getLocalizedDiagnosticMessages=function(){return null},t.prototype.getCancellationToken=function(){return{isCancellationRequested:function(){return!1}}},t.prototype.getCurrentDirectory=function(){return""},t.prototype.getDefaultLibFilename=function(){return"vs/text!vs/languages/typescript/lib/lib.d.ts"},t.prototype.getCompilationSettings=function(){return this._compilationSettings},t}(c);t.MirrorModelLanguageServiceHost=l;var u=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.addScriptSnapshot=function(e,t){return this.getScriptSnapshot(e)instanceof s?!1:this._insert(e,new a(t))},t.prototype.removeScriptSnapshot=function(e){return this.getScriptSnapshot(e)instanceof s?!1:n.contains(this._snapshots,e)?(delete this._snapshots[e],!0):!1},t}(l);t.ProjectLanguageServiceHost=u}),define("vs/base/graph",["require","exports","vs/base/types","vs/base/collections"],function(e,t,n,r){function i(e){return{data:e,incoming:{},outgoing:{}}}t.newNode=i;var o=function(){function e(e){this._hashFn=e,this._nodes=Object.create(null)}return e.prototype.roots=function(){var e=[];return r.forEach(this._nodes,function(t){n.isEmptyObject(t.value.outgoing)&&e.push(t.value)}),e},e.prototype.traverse=function(e,t,n){var r=this.lookup(e);r&&this._traverse(r,t,{},n)},e.prototype._traverse=function(e,t,n,i){var o=this,s=this._hashFn(e.data);if(!r.contains(n,s)){n[s]=!0,i(e.data);var a=t?e.outgoing:e.incoming;r.forEach(a,function(e){return o._traverse(e.value,t,n,i)})}},e.prototype.insertEdge=function(e,t){var n=this.lookupOrInsertNode(e),r=this.lookupOrInsertNode(t);n.outgoing[this._hashFn(t)]=r,r.incoming[this._hashFn(e)]=n},e.prototype.removeNode=function(e){var t=this._hashFn(e);delete this._nodes[t],r.forEach(this._nodes,function(e){delete e.value.outgoing[t],delete e.value.incoming[t]})},e.prototype.lookupOrInsertNode=function(e){var t=this._hashFn(e),n=r.lookup(this._nodes,t);return n||(n=i(e),this._nodes[t]=n),n},e.prototype.lookup=function(e){return r.lookup(this._nodes,this._hashFn(e))},Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this._nodes).length},enumerable:!0,configurable:!0}),e}();t.Graph=o}),define("vs/languages/typescript/modulePaths",["require","exports","vs/base/paths","vs/base/strings"],function(e,t,n,r){function i(e,t){return{value:n.join(n.dirname(t),e)}}function o(e,t,i){void 0===i&&(i=r.empty);var o=n.isRelative(e)?n.join(n.dirname(t),e):n.join(i,e);return{value:o+n.extname(t),alternateValue:o+s}}var s=".d.ts";t.internal=i,t.external=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/project/dependencyResolver",["require","exports","vs/nls!vs/languages/typescript/typescriptWorker2","vs/base/lib/winjs.base","vs/base/assert","vs/base/graph","vs/base/severity","vs/base/collections","vs/base/network","vs/base/hash","vs/base/strings","vs/base/paths","vs/languages/typescript/lib/typescriptServices","vs/languages/typescript/modulePaths","vs/base/lifecycle","vs/languages/typescript/typescript"],function(e,t,n,r,i,o,s,a,c,l,u,p,d,h,m,f){var g=function(){function t(e,t,n){this._implicitDependenciesLoaded=!1,this._disposables=[],this._requestService=e.requestService,this._markerService=e.markerService,this._compileConfig=n,this._basepath=this._requestService.getRequestUrl("root",u.empty,!0),this._resolver=t}return t.prototype.dispose=function(){this._disposables=m.disposeAll(this._disposables)},t.prototype.resolve=function(e,t){var n=this,i=[];if(this._implicitDependenciesLoaded||i.push(this._loadImplicitDependencies(t)),0===e.toExternal().indexOf(this._basepath)){var o,s=e.toExternal(),a=this._requestService.getPath("root",e);i.push(this._loadImplicitDeclaredDependencies(t,a)),o=t.getScriptSnapshot(s)?this._loadDeclaredDependencies(t,{filename:a,snapshot:t.getScriptSnapshot(s)}):this._resolver.resolve(a).then(function(e){var r=n._normalizedSnapshot(e.value);return t.addScriptSnapshot(s,r),n._loadDeclaredDependencies(t,{filename:a,snapshot:r})}),i.push(o)}return r.TPromise.join(i).then(function(e){var t=e.reduce(function(e,t){return e+t},0);return t})},t.prototype._loadDeclaredDependencies=function(e,t,n,i){var o=this;return void 0===n&&(n=Object.create(null)),void 0===i&&(i=!0),n[t.filename]=!0,this._loadDeclaredDependenciesFlat(e,t,i).then(function(t){for(var i=[],s=0,a=0,c=t.length;c>a;a++)n[t[a].filename]||(e.addScriptSnapshot(p.join(o._basepath,t[a].filename),t[a].snapshot)&&(s+=1),i.push(o._loadDeclaredDependencies(e,t[a],n,!1)));return r.TPromise.join(i).then(function(e){return e.reduce(function(e,t){return e+t},s)})})},t.prototype._loadDeclaredDependenciesFlat=function(e,t,i){var o=this,a=d.preProcessFile(t.snapshot.getText(0,t.snapshot.getLength()),!0),l=a.importedFiles.concat(a.referencedFiles),u=a.importedFiles.length,m=[],f=i?[]:void 0;return r.TPromise.join(l.map(function(e,r){var a=r>=u?h.internal(e.filename,t.filename):h.external(e.filename,t.filename,o._compileConfig.baseUrl);return o._loadWithContentResolver(a.value,a.alternateValue).then(function(o){if(o)m.push(o);else if(i&&r>=u){var c=t.snapshot.getLineStartPositions(),l=d.getLineAndCharacterOfPosition(c,e.pos),p=d.getLineAndCharacterOfPosition(c,e.end);f.push({message:n.localize("vs_languages_typescript_project_dependencyResolver",0,a.value),severity:s.Error,startLineNumber:l.line,startColumn:l.character,endLineNumber:p.line,endColumn:p.character})}})})).then(function(){return i&&o._markerService.changeOne("typescript.dependencies",c.URL.fromValue(p.join(o._basepath,t.filename)),f),m})},t.prototype._loadWithContentResolver=function(e,t){var n=this;return this._resolver.resolve(e).then(function(i){return i?r.TPromise.as({filename:e,snapshot:n._normalizedSnapshot(i.value)}):t?n._loadWithContentResolver(t,null):null})},t.prototype._loadImplicitDeclaredDependencies=function(e,t){var n=this,i=[],o=Object.create(null);do t=p.dirname(t),i.push(this._loadWithContentResolver(p.join(t,"_references.ts"),p.join(t,"_references.js")).then(function(t){return t?n._loadDeclaredDependencies(e,t,o,!1):r.TPromise.as(0)}));while("."!==t&&"/"!==t&&"\\"!==t);return r.TPromise.join(i).then(function(e){return e.reduce(function(e,t){return e+t},0)})},t.prototype._loadImplicitDependencies=function(e){var t=this,n=0;return r.Promise.join(this._compileConfig.extraLibs.map(function(r){return t._loadBaselib(r).then(function(t){t&&e.addScriptSnapshot(t.filename,t.snapshot)&&(n+=1)})})).then(function(){return t._implicitDependenciesLoaded=!0,n})},t.prototype._loadBaselib=function(t){var n=this;return 0===t.indexOf("vs/text!")||0===p.extname(t).length?new r.TPromise(function(r,i){e([t],function(e){r({filename:t,snapshot:n._normalizedSnapshot(e)})},i)}):this._requestService.makeRequest({url:t}).then(function(e){return 200===e.status?{filename:t,snapshot:n._normalizedSnapshot(e.responseText)}:null},function(e){return console.error("failed to load base lib with path "+t),console.error(e),null})},t.prototype._normalizedSnapshot=function(e){return d.ScriptSnapshot.fromString(e.replace(/\r\n/g,"\n"))},t}();t.DependencyResolver2=g;var v=function(e){function t(t,n,r){var i=this;e.call(this,t,n,r),this._resourceService=t.resourceService,this._disposables.push(t.eventService.addListener2(f.Events.ResourceSetChanged,function(){return i._resetGraph()})),this._disposables.push(this._resourceService.addListener2("resource.changed",function(e){e.url.toExternal().match(/_references\.(ts|js)$/)&&i._resetGraph()})),this._resetGraph()}return __extends(t,e),t.prototype._resetGraph=function(){this._cache=new o.Graph(function(e){return e.filename})},t.prototype._loadDeclaredDependenciesFlat=function(t,n,o){var s=this,c=this._cache.lookup({filename:n.filename,state:{}}),l=c?c.data.state:{},u=!1;if(this._validateState(n,t,l)){for(var d=a.values(c.outgoing),h=[],m=0,f=d.length;f>m&&!u;m++){var g=d[m].data,v=p.join(this._basepath,g.filename),y=t.getScriptSnapshot(v);y?h.push({filename:g.filename,snapshot:y}):u=!0}if(!u)return r.TPromise.as(h)}else u=!0;return i.ok(u),e.prototype._loadDeclaredDependenciesFlat.call(this,t,n,o).then(function(e){var t={filename:n.filename,state:l};return e.forEach(function(e){return s._cache.insertEdge(t,{filename:e.filename,state:{}})}),e})},t.prototype._validateState=function(e,t,n){var r,i=p.join(this._basepath,e.filename);return t.getScriptSnapshot(i)?n.version!==(r=t.getScriptVersion(i))?(n.version=r,n.referenceState=this._computeReferenceState(e),!1):!0:(n.version=void 0,n.referenceState=this._computeReferenceState(e),!1)},t.prototype._computeReferenceState=function(e){var t=d.preProcessFile(e.snapshot.getText(0,e.snapshot.getLength()),!0),n=11;return t.importedFiles.concat(t.referencedFiles).forEach(function(e){n=l.combine(n,l.computeMurmur2StringHashCode(e.filename)+(59+e.pos)+(61+e.end))}),n},t}(g);t.DependencyResolver3=v}),define("vs/languages/typescript/project/typescriptProject",["require","exports","vs/base/strings","vs/base/lifecycle","vs/languages/typescript/lib/typescriptServices","vs/languages/typescript/project/languageServiceHosts","vs/languages/typescript/project/dependencyResolver"],function(e,t,n,r,i,o,s){var a=function(){function e(e,t,n,r,i,o,a){this._disposables=[],this._instantiationService=e.instantiationService,this._requestService=e.requestService,this._dependencyResolver=e.instantiationService.createInstance(s.DependencyResolver3,i,o),this._contentResolver=i,this._mode=t,this._prefix=n,this._resourceFilter=r,this._compileConfig=o,this._suggestConfig=a}return e.prototype.dispose=function(){this._disposables=r.disposeAll(this._disposables)},e.prototype.root=function(){return this._prefix},e.prototype.compileConfiguration=function(){return this._compileConfig},e.prototype.suggestConfiguration=function(){return this._suggestConfig},e.prototype.documentRegistry=function(){return this._documentRegistry||(this._documentRegistry=i.createDocumentRegistry()),this._documentRegistry},e.prototype.syntaxLanguageService=function(){if(!this._syntaxLanguageService){var e=this._instantiationService.createInstance(o.MirrorModelLanguageServiceHost,this._mode,this._resourceFilter);this._applyCompileConfig(e.getCompilationSettings()),e.getCompilationSettings().noLib=!0;var t=i.createLanguageService(e,this.documentRegistry());t.host=e,this._syntaxLanguageService=t,this._disposables.push(e)}return this._syntaxLanguageService},e.prototype.semanticLanguageService=function(){if(!this._semanticLanguageService){var e=this._instantiationService.createInstance(o.ProjectLanguageServiceHost,this._mode,this._resourceFilter);this._applyCompileConfig(e.getCompilationSettings());var t=i.createLanguageService(e,this.documentRegistry());t.host=e,this._semanticLanguageService=t,this._disposables.push(e)}return this._semanticLanguageService},e.prototype.dependencyResolver=function(){return this._dependencyResolver},e.prototype.contentResolver=function(){return this._contentResolver},e.prototype.requestService=function(){return this._requestService},e.prototype._applyCompileConfig=function(e){e.allowNonTsExtensions=!0,e.noImplicitAny=this._compileConfig.noImplicitAny,e.target=n.equalsIgnoreCase("ES3",this._compileConfig.target)?i.ScriptTarget.ES3:i.ScriptTarget.ES5,e.module=n.equalsIgnoreCase("commonjs",this._compileConfig.module)?i.ModuleKind.CommonJS:n.equalsIgnoreCase("amd",this._compileConfig.module)?i.ModuleKind.AMD:i.ModuleKind.None},e}();t.TypeScriptProject=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/project/projectResolver",["require","exports","vs/base/env","vs/base/hash","vs/base/strings","vs/base/paths","vs/base/errors","vs/base/lifecycle","vs/base/collections","vs/base/db/indexeddb","vs/base/lib/winjs.base","vs/platform/services","vs/languages/typescript/typescript","vs/base/trie"],function(e,t,n,r,i,o,s,a,c,l,u,p,d,h){var m;
!function(e){function t(e){return"monaco_"+r.computeMurmur2StringHashCode(e)}function n(t,n){return l.openDatabase(t,1,function(t,n){for(var r=0,i=n.objectStoreNames.length;i>r;r++)t.deleteDataStore(n.objectStoreNames.item(r));t.createDataStore({name:e.storeName,keyPath:e.keyPath,index:[e.workspaceIndexOptions]})}).then(function(t){return n.push(t),t.objectStore(e.storeName)},function(){return null})}e.databaseName=t,e.keyPath="workspaceAbsolutePath",e.storeName="cache",e.workspaceIndexOptions={name:"workspaceName",keyPath:"workspaceName",options:{unique:!1}},e.openStore=n}(m||(m={}));var f=function(){function e(){}return e.prototype.resolve=function(){return null},e.Instance=new e,e}();t.NullProjectResolver=f;var g;!function(e){function t(e,t,n){for(var r=h.newTrie({},function(e){return e.split(o.sep).filter(function(e){return!i.isFalsyOrWhitespace(e)})}),s=h.newTrie(),a=!1,c=0,l=e.length;l>c;c++){var u=e[c];u&&(u.type===p.Files.FileChangeType.DELETED?s.insert(u.path,u):(u.type===p.Files.FileChangeType.ADDED||u.type===p.Files.FileChangeType.UPDATED)&&r.insert(u.path,u))}s.roots().forEach(function(e){n(e.element.path),a=!0});for(var d=r.roots();d.length>0;){var m=d.shift(),u=m.element;if(u.type===p.Files.FileChangeType.ADDED)t(u.path);else if(u.type===p.Files.FileChangeType.UPDATED){var f=m.children(),l=f.length;if(0===l)continue;for(var g=0,c=0;l>c;c++)f[c].element.type===p.Files.FileChangeType.ADDED&&(g+=1);g>1?(t(u.path),a=!0):d.push.apply(d,f)}}return a}e.minimize=t}(g=t.FileEventProcessing||(t.FileEventProcessing={}));var v=function(){function e(e,t){var n=this;this._fileService=e.fileService,this._eventService=e.eventService,this._options=t,this._disposables=[];var r=e.eventService.addListener(p.Files.EventType.FILE_CHANGES,function(e){var t=e.filter(function(e,t){return".git"!==t[0]}).changes;g.minimize(t,function(e){return n._handleAdded(e)},function(e){return n._handleDelete(e)})&&n._eventService.emit(d.Events.ResourceSetChanged)});this._disposables.push({dispose:r}),this._pendingOperations=[u.TPromise.timeout(0).then(function(){return n._resolveStatsAndContents("/")})]}return e.prototype.dispose=function(){this._disposables=a.disposeAll(this._disposables)},e.prototype._handleDelete=function(e){this._pendingOperations.push(u.TPromise.as({removed:[e]}))},e.prototype._handleAdded=function(e){this._pendingOperations.push(this._resolveStatsAndContents(e))},e.prototype.resolve=function(){var e=this,t=this._pendingOperations.length;if(0===t)return u.TPromise.as({});if(this._resolverError)return u.TPromise.wrapError(this._resolverError);var n={added:[],removed:[],hasChanges:!1};return u.TPromise.join(this._pendingOperations.splice(0,t).map(function(t){return t.then(function(e){n.added.push.apply(n.added,e.added),n.removed.push.apply(n.removed,e.removed),n.hasChanges=n.hasChanges||e.hasChanges},function(t){if(!s.isPromiseCanceledError(t))throw e._resolverError=t,t})})).then(function(){return n},function(t){e._resolverError=t})},e.prototype._resolveStatsAndContents=function(e){var t=this;return this._fetchStats(e).then(function(n){return t._fetchContents(e,n)},function(e){if(404===e.status)return[];throw e}).then(function(e){return{added:e}})},e.prototype._fetchStats=function(e){return this._fileService.resolveFileStats(e,this._options.pattern)},e.prototype._fetchContents=function(e,t){return this._fileService.resolveContents(t.map(function(e){return e.path}))},e}(),y=function(){function e(){this._value=Object.create(null)}return e.prototype.change=function(){this._value=Object.create(null)},Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}(),_=function(e){function t(t,n){e.call(this,t,n),this._workspaceName=t.contextService.getWorkspace().name,this._databaseName=m.databaseName(n.modeId),this._state=new y}return __extends(t,e),t.prototype._getObjectStore=function(){return this._objectStorePromise||(this._objectStorePromise=m.openStore(this._databaseName,this._disposables)),this._objectStorePromise},t.prototype._handleDelete=function(t){var n=this;this._pendingOperations.push(this._getObjectStore().then(function(e){return e?e.openIndexCursor(m.workspaceIndexOptions.name,l.TransactionMode.ReadWrite,IDBKeyRange.only(n._workspaceName),function(e,r,i){o.isEqualOrParent(e.content.path,t)&&(i.delete(e.workspaceAbsolutePath),n._state.change()),r.continue()}):void 0})),e.prototype._handleDelete.call(this,t)},t.prototype._resolveStatsAndContents=function(t){var n=this,r=this._state.value;return e.prototype._resolveStatsAndContents.call(this,t).then(function(e){return e.hasChanges=r!==n._state.value,e})},t.prototype._fetchContents=function(t,n){var r=this;return this._getObjectStore().then(function(i){return i?r._doFetchContents(i,t,n).then(function(e){return e.persistedContents.concat(e.volatileContents)}):e.prototype._fetchContents.call(r,t,n)})},t.prototype._doFetchContents=function(t,n,r){var i=this,a=o.join(this._workspaceName,n),u={},d={volatileContents:[],persistedContents:[]};return r.forEach(function(e){var t=o.join(i._workspaceName,e.path);if(c.lookupOrInsert(u,t,e)!==e)throw new Error("path collision between two different stat objects. path: "+t)}),t.openIndexCursor(m.workspaceIndexOptions.name,l.TransactionMode.ReadWrite,IDBKeyRange.only(this._workspaceName),function(e,t,n){var r=c.lookup(u,e.workspaceAbsolutePath);o.isEqualOrParent(e.workspaceAbsolutePath,a)&&(r&&r.etag===e.content.etag&&p.Files.isIContent(e.content)?(delete u[e.workspaceAbsolutePath],d.persistedContents.push(e.content)):(n.delete(e.workspaceAbsolutePath),i._state.change())),t.continue()}).then(function(){return e.prototype._fetchContents.call(i,n,c.values(u))}).then(function(e){return t.executeTransaction(l.TransactionMode.ReadWrite,function(t){e.forEach(function(e){t.put({workspaceName:i._workspaceName,workspaceAbsolutePath:o.join(i._workspaceName,e.path),content:{charset:e.charset,etag:e.etag,mime:e.mime,mtime:e.mtime,name:e.name,path:e.path,value:e.value}}),i._state.change(),d.persistedContents.push(e)})}).then(void 0,function(t){if(!s.isPromiseCanceledError(t))throw t;d.volatileContents=e})}).then(function(){return d})},t}(v),b=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype._doFetchContents=function(t,n,r){return e.prototype._doFetchContents.call(this,t,n,r).then(function(e){return e.persistedContents.length=0,e})},t}(_),T=function(){function e(e,t){this._delegate=e.fileService?l.canBeUsed()?n.browser.isFirefox?e.instantiationService.createInstance(_,t):e.instantiationService.createInstance(b,t):e.instantiationService.createInstance(v,t):f.Instance}return e.prototype.resolve=function(){return this._delegate.resolve()},e}();t.ProjectResolver=T;var E=function(){function e(e,t){this._disposables=[],this._workspaceName=e.contextService.getWorkspace().name,this._databaseName=m.databaseName(t)}return e.prototype.dispose=function(){this._disposables=a.disposeAll(this._disposables)},e.prototype.resolve=function(e){if(i.isFalsyOrWhitespace(this._workspaceName))return u.TPromise.as(null);var t=o.join(this._workspaceName,e);return this._getObjectStore().then(function(e){return e?e.get(t).then(function(e){return e?e.content:null}):null})},e.prototype.accept=function(e){var t,n=this;return new u.TPromise(function(r,i){n._getObjectStore().then(function(r){return r?r.openIndexCursor(m.workspaceIndexOptions.name,l.TransactionMode.ReadWrite,IDBKeyRange.only(n._workspaceName),function(n,r){e(n.content),t||r.continue()}):void 0}).then(function(){return r(null)},i)},function(){t=s.canceled()})},e.prototype._getObjectStore=function(){return this._objectStorePromise||(this._objectStorePromise=m.openStore(this._databaseName,this._disposables)),this._objectStorePromise},e}();t.DatabaseContentResolver=E}),define("vs/languages/typescript/features/converter",["require","exports"],function(e,t){function n(e,t){return e.getPositionFromLineAndCharacter(t.lineNumber,t.column)}function r(e,t){return e.getPositionFromLineAndCharacter(t.startLineNumber,t.startColumn)}function i(e,t){return e.getPositionFromLineAndCharacter(t.endLineNumber,t.endColumn)}function o(e,t){t=a(e,t);var n=e.getLineAndCharacterFromPosition(t);return{lineNumber:n.line,column:n.character}}function s(e,t,n,r){if(void 0===r&&(r=!1),t=a(e,t),n=a(e,n),r){var i=e.getLineAndCharacterFromPosition(t);return{startLineNumber:i.line,startColumn:i.character,endLineNumber:i.line,endColumn:i.character}}var i=e.getLineAndCharacterFromPosition(t),o=e.getLineAndCharacterFromPosition(n);return{startLineNumber:i.line,startColumn:i.character,endLineNumber:o.line,endColumn:o.character}}function a(e,t){var n=e.getFullWidth();return t>n?n:t}t.getOffset=n,t.getStartOffset=r,t.getEndOffset=i,t.getPosition=o,t.getRange=s}),define("vs/languages/typescript/features/moduleLinks",["require","exports","vs/base/network","vs/languages/typescript/lib/typescriptServices","vs/languages/typescript/modulePaths","vs/languages/typescript/features/converter"],function(e,t,n,r,i,o){function s(e,t){for(var n=0,r=e.referencedFiles.length;r>n;n++){var i=e.referencedFiles[n];if(t>=i.pos&&t<i.end)return{path:i.filename,external:!1}}}function a(e,t){var n=r.getTokenAtPosition(e,t);return n.kind===r.SyntaxKind.StringLiteral&&n.parent.kind===r.SyntaxKind.ImportDeclaration?{path:n.text,external:!0}:void 0}function c(e,t){var n=r.getTokenAtPosition(e,t);if(n.kind===r.SyntaxKind.StringLiteral&&n.parent.kind===r.SyntaxKind.CallExpression&&"require"===r.getTextOfNode(n.parent.expression))return{path:n.text,external:!0}}function l(e,t){var n=r.getTokenAtPosition(e,t);if(n.kind===r.SyntaxKind.StringLiteral&&n.parent.kind===r.SyntaxKind.ArrayLiteralExpression)return{path:n.text,external:!0}}function u(e,t,r,u,p){for(var d,h=o.getOffset(e,r),m=[s,a,c,l],f=0;!d&&f<m.length;f++)d=m[f](e,h);if(!d)return null;var g,v=d.external?i.external(d.path,t,p):i.internal(d.path,t);return u.getScriptSnapshot(v.value)?g=v.value:v.alternateValue&&u.getScriptSnapshot(v.alternateValue)&&(g=v.alternateValue),g?{resourceUrl:new n.URL(g),range:{startLineNumber:1,startColumn:1,endLineNumber:1,endColumn:1}}:null}t.findLink=u}),define("vs/languages/typescript/features/format",["require","exports","vs/languages/typescript/features/converter"],function(e,t,n){function r(e,t,r){var i=t.toExternal(),o=e.getSourceFile(i);return e.getFormattingEditsForDocument(i,s(r)).map(function(e){return{text:e.newText,range:n.getRange(o,e.span.start(),e.span.end())}})}function i(e,t,r,i){var o=t.toExternal(),a=e.getSourceFile(o),c=n.getStartOffset(a,r),l=n.getEndOffset(a,r);return e.getFormattingEditsForRange(o,c,l,s(i)).map(function(e){return{text:e.newText,range:n.getRange(a,e.span.start(),e.span.end())}})}function o(e,t,r,i,o){var a=t.toExternal(),c=e.getSourceFile(a),l=n.getOffset(c,r);return e.getFormattingEditsAfterKeystroke(a,l,i,s(o)).map(function(e){return{text:e.newText,range:n.getRange(c,e.span.start(),e.span.end())}})}function s(e){return{IndentSize:e.tabSize,TabSize:e.tabSize,NewLineCharacter:"\n",ConvertTabsToSpaces:e.insertSpaces,InsertSpaceAfterCommaDelimiter:!0,InsertSpaceAfterSemicolonInForStatements:!0,InsertSpaceBeforeAndAfterBinaryOperators:!0,InsertSpaceAfterKeywordsInControlFlowStatements:!0,InsertSpaceAfterFunctionKeywordForAnonymousFunctions:!0,InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,PlaceOpenBraceOnNewLineForFunctions:!1,PlaceOpenBraceOnNewLineForControlBlocks:!1}}t.formatDocument=r,t.formatRange=i,t.formatAfterKeystroke=o}),define("vs/languages/typescript/features/logicalSelection",["require","exports","vs/languages/typescript/lib/typescriptServices","vs/languages/typescript/features/converter"],function(e,t,n,r){function i(e,t,i){for(var o=e.getSourceFile(t.toExternal()),s=r.getOffset(o,i),a=n.getTokenAtPosition(o,s),c=-1,l=-1,u=[];a;){var p=a.getStart(),d=a.getEnd();(p!==c||d!==l)&&u.unshift({type:"node",range:r.getRange(o,p,d)}),c=p,l=d,a=a.parent}return u}t.compute=i}),define("vs/languages/typescript/features/previewer",["require","exports","vs/base/strings"],function(e,t,n){function r(e,t){if(void 0===t&&(t=n.empty),!e)return{};var r=e.map(function(e){return{tagName:"span",text:e.text,className:e.kind}});return{tagName:"div",className:"ts-symbol "+t,children:r}}function i(e){return e?e.map(function(e){return e.text}).join(n.empty):n.empty}t.html=r,t.plain=i}),define("vs/languages/typescript/features/extraInfo",["require","exports","vs/languages/typescript/features/converter","vs/languages/typescript/features/previewer"],function(e,t,n,r){function i(e,t,i){var o,s=t.toExternal(),a=e.getSourceFile(s),c=n.getOffset(a,i),l=e.getQuickInfoAtPosition(s,c);if(l){var u=[r.html(l.displayParts),r.html(l.documentation,"documentation")];o={value:"",htmlContent:u,className:"typeInfo ts",range:n.getRange(a,l.textSpan.start(),l.textSpan.end())}}return o}t.compute=i}),define("vs/languages/typescript/features/outline",["require","exports","vs/languages/typescript/features/converter","vs/languages/typescript/lib/typescriptServices"],function(e,t,n,r){function i(e,t){var r=t.spans[0],s=n.getRange(e,r.start(),r.end());return{label:t.text,type:a[t.kind]||"variable",range:s,children:t.childItems.map(function(t){return i(e,t)}).sort(o)}}function o(e,t){return e.range.startLineNumber<t.range.startLineNumber?-1:e.range.startLineNumber>t.range.startLineNumber?1:e.range.startColumn<t.range.startColumn?-1:e.range.startColumn>t.range.startColumn?1:0}function s(e,t){var n=e.getSourceFile(t.toExternal()),r=e.getNavigationBarItems(n.filename),s={type:"",label:"",range:void 0,children:[]};return r.filter(function(e){return"<global>"!==e.text}).forEach(function(e){return s.children.push(i(n,e))}),s.children.sort(o)}var a=Object.create(null);a[r.ScriptElementKind.moduleElement]="module",a[r.ScriptElementKind.classElement]="class",a[r.ScriptElementKind.enumElement]="enum",a[r.ScriptElementKind.interfaceElement]="interface",a[r.ScriptElementKind.memberFunctionElement]="method",a[r.ScriptElementKind.memberVariableElement]="property",a[r.ScriptElementKind.memberGetAccessorElement]="property",a[r.ScriptElementKind.memberSetAccessorElement]="property",a[r.ScriptElementKind.variableElement]="variable",a[r.ScriptElementKind.constElement]="variable",a[r.ScriptElementKind.localVariableElement]="variable",a[r.ScriptElementKind.variableElement]="variable",a[r.ScriptElementKind.functionElement]="function",a[r.ScriptElementKind.localFunctionElement]="function",t.compute=s}),define("vs/languages/typescript/features/occurrences",["require","exports","vs/languages/typescript/features/converter"],function(e,t,n){function r(e,t,r){var i=t.toExternal(),o=e.getSourceFile(i),s=n.getOffset(o,r),a=e.getOccurrencesAtPosition(i,s);return a?a.map(function(e){return{kind:e.isWriteAccess?"write":null,range:n.getRange(o,e.textSpan.start(),e.textSpan.end())}}):[]}t.compute=r}),define("vs/languages/typescript/features/definitions",["require","exports","vs/base/network","vs/languages/typescript/features/converter"],function(e,t,n,r){function i(e,t,i){var o=t.toString(),s=e.getSourceFile(o),a=r.getOffset(s,i),c=e.getDefinitionAtPosition(o,a);if(!c||0===c.length)return null;var l=c[0];if(!l.fileName)return null;var u=e.getSourceFile(l.fileName);return{resourceUrl:n.URL.fromValue(u.filename),range:r.getRange(u,l.textSpan.start(),l.textSpan.end(),!0)}}function o(){return null}t.findDeclaration=i,t.findTypeDeclaration=o}),define("vs/languages/typescript/features/references",["require","exports","vs/base/network","vs/base/lib/winjs.base","vs/languages/typescript/features/converter","vs/languages/typescript/lib/typescriptServices"],function(e,t,n,r,i,o){function s(e,t,s,l){var u=e.semanticLanguageService(),p=r.TPromise.as(null),d=n.schemas.inMemory===t.getScheme();if(!d&&a(u,t,s)){var h=u.getSourceFile(t.toExternal()),m=i.getOffset(h,s),f=o.getTokenAtPosition(h,m);if(!f)return console.warn("NO token found at offset"),r.TPromise.as([]);var g=e.dependencyResolver(),v=e.requestService(),y=[],_=o.getTextOfNode(f);p=e.contentResolver().accept(function(e){if(e.value.indexOf(_)>=0){var t=n.URL.fromEncoded(v.getRequestUrl("root",e.path,!0));y.push(g.resolve(t,u.host))}}).then(function(){return r.TPromise.join(y)})}return p.then(function(){return c(u,t,s,l,d)})}function a(e,t,n){var r=t.toExternal(),s=e.getSourceFile(r),a=i.getOffset(s,n),c=o.getTokenAtPosition(s,a);return c.symbol?c.symbol.declarations.some(function(e){return e.flags&o.NodeFlags.Export?!0:e.flags&o.NodeFlags.Public?!0:e.flags&o.NodeFlags.Protected?!0:!1}):!0}function c(e,t,r,o,s){var a,c=t.toExternal(),u=e.getSourceFile(c),p=i.getOffset(u,r);return a=s?e.getOccurrencesAtPosition(c,p):e.getReferencesAtPosition(c,p),a?a.filter(function(t){var n=e.getSourceFile(t.fileName);return o||!l(n,t.textSpan.start(),t.textSpan.end())}).map(function(t){var r=e.getSourceFile(t.fileName),o={resourceUrl:n.URL.fromValue(t.fileName),range:i.getRange(r,t.textSpan.start(),t.textSpan.end())};return o}):[]}function l(e,t){var n=o.getTokenAtPosition(e,t).parent;return n&&o.isDeclaration(n)}t.find=s}),define("vs/languages/typescript/features/codelens",["require","exports","vs/base/lib/winjs.base","vs/languages/typescript/lib/typescriptServices","vs/languages/typescript/features/converter","vs/languages/typescript/features/references"],function(e,t,n,r,i,o){function s(e,t){var n=t.toExternal(),r=e.getSourceFile(n),o=[];return r.getNamedDeclarations().forEach(function(e){c[e.kind]===!0&&o.push({range:i.getRange(r,e.name.getStart(),e.name.getEnd())})}),o}function a(e,t,r){var i=e.semanticLanguageService().host.getStateId(),s=r.map(function(r){return r.languageModeStateId===i?n.TPromise.as(null):o.find(e,t,r.position,!1)});return n.TPromise.join(s).then(function(e){return{references:e,languageModeStateId:i}})}var c=Object.create(null);c[r.SyntaxKind.ModuleDeclaration]=!0,c[r.SyntaxKind.InterfaceDeclaration]=!0,c[r.SyntaxKind.ClassDeclaration]=!0,c[r.SyntaxKind.ConstructSignature]=!0,c[r.SyntaxKind.GetAccessor]=!0,c[r.SyntaxKind.SetAccessor]=!0,c[r.SyntaxKind.Property]=!0,c[r.SyntaxKind.Method]=!0,c[r.SyntaxKind.FunctionDeclaration]=!0,c[r.SyntaxKind.FunctionExpression]=!0,c[r.SyntaxKind.EnumDeclaration]=!0,c[r.SyntaxKind.EnumMember]=!0,t.getCodeLensSymbols=s,t.findCodeLensReferences=a}),define("vs/languages/typescript/features/parameterHints",["require","exports","vs/base/strings","vs/languages/typescript/features/converter","vs/languages/typescript/features/previewer"],function(e,t,n,r,i){function o(e,t,o){var s=t.toExternal(),a=e.getSourceFile(s),c=r.getOffset(a,o),l=e.getSignatureHelpItems(s,c);if(!l)return null;var u={currentSignature:l.selectedItemIndex,currentParameter:l.argumentIndex,signatures:[]};return l.items.forEach(function(e){var t={label:n.empty,documentation:null,parameters:[]};t.label+=i.plain(e.prefixDisplayParts),e.parameters.forEach(function(n,r,o){var s=i.plain(n.displayParts),a={label:s,documentation:i.plain(n.documentation),signatureLabelOffset:t.label.length,signatureLabelEnd:t.label.length+s.length};t.label+=s,t.parameters.push(a),r<o.length-1&&(t.label+=i.plain(e.separatorDisplayParts))}),t.label+=i.plain(e.suffixDisplayParts),u.signatures.push(t)}),u}t.compute=o}),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:['/// <reference path="{{}}" />',""].join("\n"),documentationLabel:n.localize("vs_languages_lib_javascriptSnippets",14)}]}),define("vs/languages/typescript/features/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_features_typescriptSnippets",0)},{type:"snippet",label:"jsdoc comment",codeSnippet:["/**"," * {{}}"," */"].join("\n"),documentationLabel:n.localize("vs_languages_typescript_features_typescriptSnippets",1)},{type:"snippet",label:"ctor",codeSnippet:["/**"," *"," */","constructor() {","	super();","	{{}}","}"].join("\n"),documentationLabel:n.localize("vs_languages_typescript_features_typescriptSnippets",2)},{type:"snippet",label:"class",codeSnippet:["/**"," * {{name}}"," */","class {{name}} {","	constructor({{parameters}}) {","		{{}}","	}","}"].join("\n"),documentationLabel:n.localize("vs_languages_typescript_features_typescriptSnippets",3)},{type:"snippet",label:"public method",codeSnippet:["/**"," * {{name}}"," */","public {{name}}() {","	{{}}","}"].join("\n"),documentationLabel:n.localize("vs_languages_typescript_features_typescriptSnippets",4)},{type:"snippet",label:"private method",codeSnippet:["private {{name}}() {","	{{}}","}"].join("\n"),documentationLabel:n.localize("vs_languages_typescript_features_typescriptSnippets",5)},{type:"snippet",label:"import statement",codeSnippet:["import {{name}} = require('{{}}');"].join("\n"),documentationLabel:n.localize("vs_languages_typescript_features_typescriptSnippets",6)}]}),define("vs/languages/typescript/features/wordSuggestions",["require","exports","vs/languages/typescript/lib/typescriptServices","vs/base/collections"],function(e,t,n,r){function i(e,t,i){for(var o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];var a={};if(i&&r.forEach(e.identifiers,function(e){return a[e.value]=!0}),t)for(var c=n.createScanner(n.ScriptTarget.ES5,!1,e.getFullText()),l=c.scan();l!==n.SyntaxKind.EndOfFileToken;){switch(l){case n.SyntaxKind.SingleLineCommentTrivia:case n.SyntaxKind.MultiLineCommentTrivia:var u=c.getTokenText(),p=u.split(/[^\w]/);p.forEach(function(e){return a[e]=!0})}l=c.scan()}return o.push(""),o.forEach(function(e){return delete a[e]}),r.keys(a)}return i}),define("vs/languages/typescript/features/suggestions",["require","exports","vs/base/collections","vs/languages/typescript/lib/typescriptServices","vs/languages/typescript/features/converter","vs/languages/typescript/features/previewer","vs/languages/lib/javascriptSnippets","vs/languages/typescript/features/typescriptSnippets","vs/languages/typescript/features/wordSuggestions"],function(e,t,n,r,i,o,s,a,c){function l(e,t){for(var n=t;t>0&&/\w/.test(e.charAt(t-1));)t-=1;return e.substring(t,n)}function u(e){return e.type+e.label+e.codeSnippet}function p(e,t,r,o){var p=t.toExternal(),d=e.getSourceFile(p),m=i.getOffset(d,r),f=e.getCompletionsAtPosition(p,m),g=n.createStringDictionary();if(f)for(var v=0,y=f.entries.length;y>v;v++){var _=f.entries[v];n.insert(g,{label:_.name,codeSnippet:_.name,type:h(_.kind)},u)}if(!f||!f.isMemberCompletion){for(var v=0,y=s.snippets.length;y>v;v++)n.insert(g,s.snippets[v],u);for(var v=0,y=a.snippets.length;y>v;v++)n.insert(g,a.snippets[v],u)}var b=l(d.getFullText(),m);return o.alwaysAllWords&&c(d,!1,!0,b).every(function(e){return n.insert(g,{label:e,codeSnippet:e,type:"text"},u),!0}),{currentWord:b,suggestions:n.values(g)}}function d(e,t,n,r,s){if("snippet"===r.type)return r;var a=t.toExternal(),c=e.getSourceFile(a),l=i.getOffset(c,n),u=e.getCompletionEntryDetails(a,l,r.label);if(!u)return r;if(r.documentationLabel=o.plain(u.documentation),r.typeLabel=o.plain(u.displayParts),r.codeSnippet=u.name,s.useCodeSnippetsOnMethodSuggest&&"function"===h(u.kind)){var p,d=u.name;p=u.displayParts.filter(function(e){return"parameterName"===e.kind}).map(function(e){return"{{"+e.text+"}}"}),d+=p.length>0?"("+p.join(", ")+"){{}}":"()",r.codeSnippet=d}return r}function h(e){switch(e){case r.ScriptElementKind.primitiveType:case r.ScriptElementKind.keyword:return"keyword";case r.ScriptElementKind.variableElement:case r.ScriptElementKind.localVariableElement:case r.ScriptElementKind.memberVariableElement:case r.ScriptElementKind.memberGetAccessorElement:case r.ScriptElementKind.memberSetAccessorElement:return"field";case r.ScriptElementKind.functionElement:case r.ScriptElementKind.memberFunctionElement:case r.ScriptElementKind.constructSignatureElement:case r.ScriptElementKind.callSignatureElement:return"function"}return e}t.computeSuggestions=p,t.getSuggestionDetails=d}),define("vs/languages/typescript/features/quickFix",["require","exports","vs/base/strings","vs/languages/typescript/lib/typescriptServices","vs/languages/typescript/features/converter"],function(e,t,n,r,i){function o(e,t,o){var s=t.toExternal(),a=e.getSourceFile(s),c=i.getOffset(a,o),l=r.findTokenOnLeftOfPosition(a,c);if(!l||0===l.getWidth())return[];var u=r.getTextOfNode(l);u=u.substring(0,u.length-(l.getEnd()-c));var p=e.getCompletionsAtPosition(s,c),d=[];return p.entries.forEach(function(e){var t=n.difference(u,e.name);t<u.length/2||d.push({type:"field",label:e.name,codeSnippet:e.name,score:t})}),d.sort(function(e,t){return t.score-e.score}),d.slice(0,3)}t.compute=o}),define("vs/languages/typescript/lint/rules/layout",["require","exports","vs/base/strings","vs/languages/typescript/lib/typescriptServices"],function(e,t,n,r){var i=function(){function e(){this.code="SA1503",this.name="CurlyBracketsMustNotBeOmitted",this.filter=[r.SyntaxKind.IfStatement,r.SyntaxKind.ElseKeyword,r.SyntaxKind.DoStatement,r.SyntaxKind.ForInStatement,r.SyntaxKind.ForStatement,r.SyntaxKind.WhileStatement]}return e.prototype.checkNode=function(e,t){if(e.kind===r.SyntaxKind.IfStatement){var n=e;if(n.elseStatement&&n.elseStatement.kind===r.SyntaxKind.IfStatement)return;n.thenStatement&&n.thenStatement.kind!==r.SyntaxKind.Block&&t.reportError(n.thenStatement,this.name,this.code),n.elseStatement&&n.elseStatement.kind!==r.SyntaxKind.Block&&t.reportError(n.elseStatement,this.name,this.code)}else{var i=e;i.statement&&i.statement.kind!==r.SyntaxKind.Block&&t.reportError(i.statement,this.name,this.code)}},e}();t.CurlyBracketsMustNotBeOmitted=i;var o=function(){function e(){this.code="SA1514",this.name="EmptyBlocksWithoutComment",this.filter=[r.SyntaxKind.Block]}return e.prototype.checkNode=function(e,t){e.statements.pos<e.statements.end||r.getTextOfNode(e).match(/\/\/|\/|\*/)||t.reportError(e,this.name,this.code)},e.prototype._hasComment=function(e){var t=e.getChildAt(1);if(t){var i=r.getTextOfNode(t);if(i&&n.trimWhitespace(i).length>0)return!0}return!1},e}();t.EmptyBlocksWithoutComment=o}),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=[r.SyntaxKind.FunctionDeclaration,r.SyntaxKind.Method,r.SyntaxKind.ArrowFunction]}return e.prototype.checkNode=function(e,t){e.type||t.reportError(e.name,this.name,this.code)},e}();t.FunctionsWithoutReturnType=i;var o=function(){function e(){this.code="SA9056",this.name="TripleSlashReferenceAlike",this.filter=[r.SyntaxKind.SourceFile]}return e.prototype.checkNode=function(e,t){var n=e.getLeadingTriviaWidth(),r=e.getFullText().substr(0,n);this._couldMeanTripleSlash(r)&&t.reportError(e,this.name,this.code,0,n)},e.prototype._couldMeanTripleSlash=function(t){if(e._TripleSlashReference.test(t))return!1;var r=t.split(/[\s=]/);if(!(r.length>5)){for(var i=0,o=0,s=0,a=0,c=r.length;c>a;a++)i=Math.max(i,n.difference("reference",r[a])),o=Math.max(o,n.difference("path",r[a])),s=Math.max(s,(n.startsWith(r[a],'"')||n.startsWith(r[a],"'")?1:0)+(n.endsWith(r[a],'"')||n.endsWith(r[a],"'")?1:0));return(s>0||o>5)&&i>5?!0:!1}},e._TripleSlashReference=/^(\/\/\/\s*<reference\s+path=)('|")(.+?)\2\s*(static=('|")(.+?)\2\s*)*/im,e}();t.TripleSlashReferenceAlike=o;var s=function(){function e(){this.code="SA9057",this.name="UnusedImports",this.filter=[r.SyntaxKind.ImportDeclaration]}return e.prototype.checkNode=function(e,t){var n=r.getTokenPosOfNode(e.name),i=t.languageService().getOccurrencesAtPosition(t.filename(),n);i&&1===i.length&&t.reportError(e,this.name,this.code,r.getTokenPosOfNode(e))},e}();t.UnusedImports=s;var a=function(){function e(){this.code="SA9058",this.name="UnusedVariables",this.filter=[r.SyntaxKind.VariableStatement]}return e.prototype.checkNode=function(e,t){var n=this;e.flags&r.NodeFlags.Export||r.forEachChild(e,function(e){if(e.kind===r.SyntaxKind.VariableDeclaration){var i=e,o=r.getTokenPosOfNode(i.name),s=t.languageService().getOccurrencesAtPosition(t.filename(),o);s&&s.length<=1&&t.reportError(i.name,n.name,n.code,o)}})},e}();t.UnusedVariables=a;var c=function(){function e(){this.code="SA9059",this.name="UnusedFunctions",this.filter=[r.SyntaxKind.FunctionDeclaration]}return e.prototype.checkNode=function(e,t){if(!(e.flags&r.NodeFlags.Export||e.flags&r.NodeFlags.DeclarationFile)){var n=r.getTokenPosOfNode(e.name),i=t.languageService().getOccurrencesAtPosition(t.filename(),n);i&&i.length<=1&&t.reportError(e.name,this.name,this.code,n)}},e}();t.UnusedFunctions=c;var l=function(){function e(){this.code="SA9060",this.name="UnusedMembers",this.filter=[r.SyntaxKind.Property,r.SyntaxKind.Method]}return e.prototype.checkNode=function(e,t){if(e.flags&r.NodeFlags.Private&&e.name){var n=r.getTokenPosOfNode(e.name),i=t.languageService().getOccurrencesAtPosition(t.filename(),n);i&&i.length<=1&&t.reportError(e.name,this.name,this.code,n)}},e}();t.UnusedMembers=l}),define("vs/languages/typescript/lint/rules/javascript",["require","exports","vs/base/strings","vs/base/collections","vs/languages/typescript/lib/typescriptServices"],function(e,t,n,r,i){function o(e,t){var n=[],r=function(e){e&&n.push(e)
};e.getChildren().forEach(r);do e=n.shift(),e&&(t(e),e.getChildren().forEach(r));while(n.length>0)}var s=function(){function e(){this.code="SA9005",this.name="ComparisonOperatorsNotStrict",this.filter=[i.SyntaxKind.BinaryExpression]}return e.prototype.checkNode=function(e,t){if(e.operator===i.SyntaxKind.EqualsEqualsToken||e.operator===i.SyntaxKind.ExclamationEqualsToken){var n=e.right.pos-2;t.reportError(e,this.name,this.code,n,2)}},e}();t.ComparisonOperatorsNotStrict=s;var a=function(){function e(){this.code="SA9050",this.name="MissingSemicolon",this.filter=[i.SyntaxKind.VariableStatement,i.SyntaxKind.ExpressionStatement,i.SyntaxKind.ReturnStatement,i.SyntaxKind.Property]}return e.prototype.checkNode=function(e,t){var n=i.findChildOfKind(e,i.SyntaxKind.SemicolonToken);if(!n){var r=i.getTokenPosOfNode(e)+e.getWidth()-1;t.reportError(e,this.name,this.code,r,1)}},e}();t.MissingSemicolon=a;var c=r.createNumberDictionary();c[i.SyntaxKind.ClassKeyword]=!0,c[i.SyntaxKind.ConstKeyword]=!0,c[i.SyntaxKind.EnumKeyword]=!0,c[i.SyntaxKind.ExportKeyword]=!0,c[i.SyntaxKind.ExtendsKeyword]=!0,c[i.SyntaxKind.ImportKeyword]=!0,c[i.SyntaxKind.SuperKeyword]=!0;var l=function(){function e(){this.code="SA9051",this.name="ReservedKeywords",this.filter=[i.SyntaxKind.SourceFile]}return e.prototype.checkNode=function(e,t){var n=this;o(e,function(e){r.contains(c,e.kind)&&t.reportError(e,n.name,n.code)})},e}();t.ReservedKeywords=l;var u=r.createNumberDictionary();u[i.SyntaxKind.ImplementsKeyword]=!0,u[i.SyntaxKind.InterfaceKeyword]=!0,u[i.SyntaxKind.LetKeyword]=!0,u[i.SyntaxKind.PackageKeyword]=!0,u[i.SyntaxKind.PrivateKeyword]=!0,u[i.SyntaxKind.ProtectedKeyword]=!0,u[i.SyntaxKind.PublicKeyword]=!0,u[i.SyntaxKind.StaticKeyword]=!0,u[i.SyntaxKind.YieldKeyword]=!0,u[i.SyntaxKind.NumberKeyword]=!0,u[i.SyntaxKind.DeclareKeyword]=!0,u[i.SyntaxKind.StringKeyword]=!0,u[i.SyntaxKind.BooleanKeyword]=!0;var p=function(){function e(){this.code="SA9052",this.name="TypeScriptSpecifics",this.filter=[i.SyntaxKind.SourceFile]}return e.prototype.checkNode=function(e,t){var n=this;o(e,function(e){(r.contains(c,e.kind)||r.contains(u,e.kind))&&t.reportError(e,n.name,n.code)})},e}();t.TypeScriptSpecifics=p;var d=function(){function e(){this.code="SA9053",this.filter=[i.SyntaxKind.BinaryExpression],this.name="UnknownTypeOfResults"}return e.prototype.checkNode=function(t,o){if(t.left&&t.left.kind===i.SyntaxKind.TypeOfExpression){var s=!1;if(t.right.kind===i.SyntaxKind.StringLiteral){var a=i.getTextOfNode(t.right);a=n.trim(a,"'"),a=n.trim(a,'"'),s=!r.contains(e._AllowedStrings,a)}else t.right.kind===i.SyntaxKind.NullKeyword?s=!0:"undefined"===i.getTextOfNode(t.right)&&(s=!0);s&&o.reportError(t,this.name,this.code)}},e._AllowedStrings={undefined:!0,object:!0,function:!0,boolean:!0,number:!0,string:!0},e}();t.UnknownTypeOfResults=d;var h=function(){function e(){this.code="SA9054",this.name="SemicolonsInsteadOfBlocks",this.filter=[i.SyntaxKind.IfStatement,i.SyntaxKind.ElseKeyword,i.SyntaxKind.WhileStatement,i.SyntaxKind.ForStatement,i.SyntaxKind.ForInStatement]}return e.prototype.checkNode=function(e,t){if(e.kind===i.SyntaxKind.IfStatement){var n=e;(n.thenStatement&&n.thenStatement.kind===i.SyntaxKind.EmptyStatement||n.elseStatement&&n.elseStatement.kind===i.SyntaxKind.EmptyStatement)&&t.reportError(n,this.name,this.code)}var r=e;r&&r.statement&&r.statement.kind===i.SyntaxKind.EmptyStatement&&t.reportError(r,this.name,this.code)},e}();t.SemicolonsInsteadOfBlocks=h;var m=function(){function e(){this.code="SA9055",this.name="FunctionsInsideLoops",this.filter=[i.SyntaxKind.FunctionExpression,i.SyntaxKind.FunctionDeclaration,i.SyntaxKind.ArrowFunction]}return e.prototype.checkNode=function(e,t){for(var n=e.parent;n;){if(n.kind===i.SyntaxKind.ForStatement||n.kind===i.SyntaxKind.ForInStatement||n.kind===i.SyntaxKind.WhileStatement||n.kind===i.SyntaxKind.DoStatement){t.reportError(e,this.name,this.code);break}n=n.parent}},e}();t.FunctionsInsideLoops=m;var f=function(){function e(){this.code="SA9062",this.name="NewOnLowercaseFunctions",this.filter=[i.SyntaxKind.NewExpression]}return e.prototype.checkNode=function(e,t){var n=e.expression;n.kind===i.SyntaxKind.PropertyAccessExpression&&(n=n.name);var r=i.getTextOfNode(n);r&&!r.charAt(0).match(/[A-Z_]/)&&t.reportError(n,this.name,this.code)},e}();t.NewOnLowercaseFunctions=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/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,o,s,a,c,l){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(l,t),u(c,t);for(var s in e)if(e.hasOwnProperty(s)){var p=o.lookup(t,String(s).toLowerCase());p&&n.push({rule:i.create(p),severity:r.fromValue(e[s])})}return n}function d(e,t,n){var r=p(e),i=new f(t,r);return i.check(t.getSourceFile(n.toExternal()))}var h=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){o.lookupOrInsert(t._rules,n,[]).push(e)};e.rule.filter?e.rule.filter.forEach(n):n(-1)},e.prototype.check=function(e){return this._errors.length=0,this._currentSeverity=r.Warning,this._sourceFile=e,this._visit(e),this._errors.slice(0)},e.prototype.reportError=function(e,t,n,r,i){if(e){"undefined"==typeof r&&(r=s.getTokenPosOfNode(e)),"undefined"==typeof i&&(i=e.getWidth());var o=this._sourceFile.getLineAndCharacterFromPosition(r),a=this._sourceFile.getLineAndCharacterFromPosition(r+i);this._errors.push({message:t,code:n,severity:this._currentSeverity,range:{startLineNumber:o.line,startColumn:o.character,endLineNumber:a.line,endColumn:a.character}})}},e.prototype._visit=function(e){var t=this;e&&(this._checkNodeOrToken(e),s.forEachChild(e,function(e){t._visit(e)}))},e.prototype._checkNodeOrToken=function(e){for(var t=o.lookup(this._rules,e.kind,[]).concat(o.lookup(this._rules,-1,[])),n=0,i=t.length;i>n;n++)if(this._currentSeverity=t[n].severity,this._currentSeverity!==r.Ignore)try{t[n].rule.checkNode(e,this)}catch(s){console.error(s)}},e}();t.SimpleStyleRuleChecker=h;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}(h);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,o){return e.prototype.reportError.call(this,t,this._lookupMessage(n,r),r,i,o)},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=d}),define("vs/languages/typescript/features/diagnostics",["require","exports","vs/base/severity","vs/languages/typescript/features/converter","vs/languages/typescript/lint/lint"],function(e,t,n,r,i){function o(e,t,n){if(!n.syntaxValidation)return[];var r=t.toExternal(),i=e.getSyntacticDiagnostics(r);return i=i.filter(function(e){return 6053!==e.code&&1148!==e.code}),c(e.getSourceFile(r),i,n)}function s(e,t,n){if(!n.semanticValidation)return[];var r=t.toExternal(),i=e.getSemanticDiagnostics(r);return c(e.getSourceFile(r),i,n)}function a(e,t,n){return n.semanticValidation?i.check(n.lint,e,t).map(function(e){return{code:0,message:e.message,severity:e.severity,startLineNumber:e.range.startLineNumber,startColumn:e.range.startColumn,endLineNumber:e.range.endLineNumber,endColumn:e.range.endColumn}}):[]}function c(e,t,i){for(var o=[],s=0;s<t.length;s++){var a=t[s],c=n.Error;if(i.diagnosticClassifier&&(c=i.diagnosticClassifier(a)),c){var l=r.getRange(e,a.start,a.start+a.length);o.push({message:a.messageText,severity:c,startLineNumber:l.startLineNumber,startColumn:l.startColumn,endLineNumber:l.endLineNumber,endColumn:l.endColumn})}}return o}t.getSyntacticDiagnostics=o,t.getSemanticDiagnostics=s,t.getExtraDiagnostics=a}),define("vs/languages/typescript/features/navigation",["require","exports","vs/languages/typescript/features/converter"],function(e,t,n){function r(e,t){var r=[];return e.forEach(function(e){var i=e.syntaxLanguageService();i.getNavigateToItems(t).forEach(function(e){r.push({containerName:e.containerName,name:e.name,type:e.kind,resourceUrl:e.fileName,range:n.getRange(i.getSourceFile(e.fileName),e.textSpan.start(),e.textSpan.end())})})}),r}t.getNavigateToItems=r}),define("vs/languages/typescript/features/emitting",["require","exports","vs/base/strings"],function(e,t,n){function r(e,t,r){var i=e.getEmitOutput(t.toExternal()),o=i.outputFiles;if(!o)return null;for(var s=0,a=o.length;a>s;s++)if(n.endsWith(o[s].name,r))return{filename:o[s].name,content:o[s].text};return null}t.getEmitOutput=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/typescriptWorker2",["require","exports","vs/base/lib/winjs.base","vs/base/arrays","vs/base/network","vs/base/strings","vs/base/uuid","vs/base/trie","vs/base/errors","vs/base/collections","vs/base/lifecycle","vs/editor/worker/modesWorker","vs/editor/core/model/mirrorModel","vs/platform/services","vs/languages/typescript/typescript.configuration","vs/languages/typescript/features/validationStrategy","vs/languages/typescript/project/project","vs/languages/typescript/typescript","vs/base/db/indexeddb","vs/base/paths","vs/languages/typescript/project/typescriptProject","vs/languages/typescript/project/projectResolver","vs/languages/typescript/features/moduleLinks","vs/languages/typescript/features/format","vs/languages/typescript/features/logicalSelection","vs/languages/typescript/features/extraInfo","vs/languages/typescript/features/outline","vs/languages/typescript/features/occurrences","vs/languages/typescript/features/definitions","vs/languages/typescript/features/codelens","vs/languages/typescript/features/references","vs/languages/typescript/features/parameterHints","vs/languages/typescript/features/suggestions","vs/languages/typescript/features/quickFix","vs/languages/typescript/features/diagnostics","vs/languages/typescript/features/navigation","vs/languages/typescript/features/emitting","vs/editor/modes/supports"],function(e,t,n,r,i,o,s,a,c,l,u,p,d,h,m,f,g,v,y,_,b,T,E,S,C,k,x,w,L,A,N,P,M,O,I,R,D,V){var F=function(){function e(e,t){this._resourceService=e.resourceService,this._filter=t,this._basepath=e.requestService.getRequestUrl("root",o.empty,!0)}return e.prototype.resolve=function(e){var t=i.URL.fromValue(_.join(this._basepath,e)),r=this._resourceService.get(t);if(!(r instanceof d.AbstractMirrorModel&&this._filter(r)))return n.TPromise.as(null);var o=r;return n.TPromise.as({value:o.getValue(),path:e})},e.prototype.accept=function(e){var t=this,r=null;return new n.TPromise(function(n,i){t._resourceService.all().every(function(n){if(r)return i(r),!1;if(!(n instanceof d.AbstractMirrorModel))return!0;var s=n;return o.startsWith(s.getAssociatedResource().toString(),t._basepath)?t._filter(n)?(e({resource:s.getAssociatedResource(),value:s.getValue(),path:s.getAssociatedResource().toString().substring(t._basepath.length),name:void 0,mtime:void 0,etag:void 0,mime:void 0}),!0):!0:!0}),n(null)},function(){r=c.canceled()})},e}(),H=function(e){function t(t,n,r){var i=this;e.call(this,t,n,r),this._callOnDispose=[],this._disposables=[],this._contents=Object.create(null),this._instantiationService=t.instantiationService,this._telemetryService=t.telemetryService,this._requestService=t.requestService,this._uuid=s.v4().asHex(),this._validationStrategy=this._instantiationService.createInstance(f.ValidationStrategy,this._validate.bind(this)),this._disposables.push(this._validationStrategy),this._eventService=t.eventService,this._callOnDispose.push(this.resourceService.addListener(h.ResourceEvents.ADDED,function(e){return i._onResourceAddedOrRemoved(e.url)})),this._callOnDispose.push(this.resourceService.addListener(h.ResourceEvents.REMOVED,function(e){return i._onResourceAddedOrRemoved(e.url)})),this.configure(null)}return __extends(t,e),t.prototype._createInPlaceReplaceSupport=function(){return new V.InplaceReplaceSupport(this.resourceService,this)},t.prototype.dispose=function(){this._callOnDispose=u.cAll(this._callOnDispose),this._disposables=u.disposeAll(this._disposables)},t.prototype._doConfigure=function(e){var t=this,i=this._options,s=m.sanitize(e,m._internalDefaultValidationSettings,m.defaultSuggestSettings);if(i){var c={};i.validationSettings.forEach(function(e){return c[e.scope]=e.extraLibs}),s.validationSettings.forEach(function(e){return e.extraLibs=r.merge([e.extraLibs,l.lookup(c,e.scope,[])],function(e){return e})})}if(this._options&&m.equal(this._options,s))return n.TPromise.as(!1);this._projects&&u.disposeAll(this._projects.values()),this._projects=a.newTrie(),this._options=s;var p=r.coalesce([this._requestService.getRequestUrl("root",o.empty,!0),"inmemory://model/"]),d=[this._instantiationService.createInstance(F,this._isMirrorModelAndMyMode.bind(this)),this];y.canBeUsed()&&d.push(this._instantiationService.createInstance(T.DatabaseContentResolver,this._getMode().getId()));var h=new g.CompositeContentResolver(d);return p.forEach(function(e){t._options.validationSettings.forEach(function(n){var r,i=_.join(e,n.scope);r=function(e){if(!t._isMirrorModelAndMyMode(e))return!1;var n=t.findProject(e.getAssociatedResource()).root();return i===n},t._projects.insert(i,t._createProject(i,h,r,n,t._options.suggestSettings))})}),this._projects.insert(o.empty,this._createProject(o.empty,h,this._isMirrorModelAndMyMode.bind(this),m._internalDefaultValidationSettings,this._options.suggestSettings)),n.TPromise.as(!0)},t.prototype._isMirrorModelAndMyMode=function(e){return e instanceof d.AbstractMirrorModel?e.getModeId()!==this._getMode().getId()?!1:!0:!1},t.prototype._createProject=function(e,t,n,r,i){return this._instantiationService.createInstance(b.TypeScriptProject,this._getMode(),e,n,t,r,i)},t.prototype.findProject=function(e){var t=this._projects.lookUp(e.toExternal(),!0);if(t)return t.element;throw c.illegalState("no project found for: "+e.toExternal())},t.prototype.getProjects=function(){return this._projects.values().filter(function(e){return e.root()!==o.empty})},t.prototype.resolveDependenciesAndRun=function(e,t){var n=this.findProject(e);return n.dependencyResolver().resolve(e,n.semanticLanguageService().host).then(function(){try{return t(n)}catch(e){throw e}})},t.prototype.acceptProjectDelta=function(e){var t=this,n=e.hasChanges;r.isFalsyOrEmpty(e.added)||(e.added.forEach(function(e){return t._contents[e.path]=e}),n=!0),r.isFalsyOrEmpty(e.removed)||e.removed.forEach(function(e){e[0]!==_.sep&&(e=_.sep+e),Object.keys(t._contents).forEach(function(n){_.isEqualOrParent(n,e)&&delete t._contents[n]});var r=t._requestService.getRequestUrl("root","",!0);t.getProjects().forEach(function(t){var i=t.semanticLanguageService().host;n=i.getScriptFileNames().filter(function(t){return _.isEqualOrParent(t,_.join(r,e))}).map(function(e){return i.removeScriptSnapshot(e)}).reduce(function(e,t){return e||t},!1)||n})}),n&&(this._eventService.emit(v.Events.ResourceSetChanged),this._validationHelper.trigger())},t.prototype.resolve=function(e){return e[0]!==_.sep&&(e=_.sep+e),n.TPromise.as(this._contents[e])},t.prototype.accept=function(e){var t=this,r=null;return new n.TPromise(function(n,i){l.forEach(t._contents,function(t){e(t.value)}),r?i(r):n(null)},function(){r=c.canceled()})},t.prototype.doValidateOnChange=function(e,t,n){for(var r=0;r<e.length;r++){var i=this.resourceService.get(e[r]);this._validationStrategy.scheduleValidation(f.ValidationReason.ItChanged,i)}for(var r=0;r<t.length;r++){var i=this.resourceService.get(t[r]),o=f.ValidationReason.SomeChanged;n&&(o=f.ValidationReason.ItChanged),this._validationStrategy.scheduleValidation(o,i)}},t.prototype._onResourceAddedOrRemoved=function(e){var t=this.resourceService.get(e);this._shouldIncludeModelInValidation(t)&&(this._eventService.emit(v.Events.ResourceSetChanged),this._validationHelper.trigger())},t.prototype._validate=function(e,t,r){var i=this;if(t===f.ValidationType.Syntax){var o=this.findProject(e),s=I.getSyntacticDiagnostics(o.syntaxLanguageService(),e,o.compileConfiguration()),a=this._publishMarkersForResource(e,t,s);return n.TPromise.as(a)}return t===f.ValidationType.Semantic?this.resolveDependenciesAndRun(e,function(n){var o,s=n.semanticLanguageService(),a=n.compileConfiguration();o=I.getSemanticDiagnostics(s,e,a),r===f.ValidationReason.ItChanged&&o.push.apply(o,I.getExtraDiagnostics(s,e,a)),i._publishMarkersForResource(e,t,o)}):n.TPromise.as(null)},t.prototype._publishMarkersForResource=function(e,t,n){var r=o.format("{0}/{1}",this._uuid,t);return this.markerService.changeOne(r,e,n),n.length>0},t.prototype._getContextForValidationParticipants=function(e){var t=this.findProject(e).syntaxLanguageService(),n=t.host.getScriptFileNames(),r=e.toExternal();return n.indexOf(r)<0?null:this.findProject(e).syntaxLanguageService().getSourceFile(r)},t.prototype.doSuggest=function(e,t){return this.resolveDependenciesAndRun(e,function(n){return M.computeSuggestions(n.semanticLanguageService(),e,t,n.suggestConfiguration())})},t.prototype._getSuggestContext=function(e){var t=this.findProject(e);return n.TPromise.as({syntaxTree:t.syntaxLanguageService().getSourceFile(e.toExternal()),compilationSettings:t.compileConfiguration(),project:t})},t.prototype.getSuggestionDetails=function(e,t,n){return this.resolveDependenciesAndRun(e,function(r){return M.getSuggestionDetails(r.semanticLanguageService(),e,t,n,r.suggestConfiguration())})},t.prototype.quickFix=function(e,t){return this.resolveDependenciesAndRun(e,function(n){return O.compute(n.semanticLanguageService(),e,t)})},t.prototype.getEmitOutput=function(e,t){return this.resolveDependenciesAndRun(e,function(n){return D.getEmitOutput(n.semanticLanguageService(),e,t)})},t.prototype.getNavigateToItems=function(e){return R.getNavigateToItems(this.getProjects(),e)},t.prototype.getParameterHints=function(e,t){return this.resolveDependenciesAndRun(e,function(n){return P.compute(n.semanticLanguageService(),e,t)})},t.prototype.findDeclaration=function(e,t){return n.TPromise.join([this._findTypeScriptDeclaration(e,t),this._findLinkTarget(e,t)]).then(function(e){return r.coalesce(e)[0]||null})},t.prototype._findLinkTarget=function(e,t){return this.resolveDependenciesAndRun(e,function(n){var r=e.toExternal(),i=n.syntaxLanguageService().getSourceFile(r);return E.findLink(i,r,t,n.semanticLanguageService().host,n.root())})},t.prototype.textReplace=function(e,t){var n=[["true","false"],["string","number","boolean","void","any"],["private","public"]];return V.ReplaceSupport.valueSetsReplace(n,e,t)},t.prototype.findCodeLensSymbols=function(e){return A.getCodeLensSymbols(this.findProject(e).syntaxLanguageService(),e)},t.prototype.findCodeLensReferences=function(e,t){return this.resolveDependenciesAndRun(e,function(n){return A.findCodeLensReferences(n,e,t)}).then(function(e){return e})},t.prototype.findReferences=function(e,t,n){return this.resolveDependenciesAndRun(e,function(r){return N.find(r,e,t,n)}).then(function(e){return e})},t.prototype.computeInfo=function(e,t){return this.resolveDependenciesAndRun(e,function(n){return k.compute(n.semanticLanguageService(),e,t)})},t.prototype.findOccurrences=function(e,t,n){return this.resolveDependenciesAndRun(e,function(r){return w.compute(r.semanticLanguageService(),e,t,n)})},t.prototype._findTypeScriptDeclaration=function(e,t){return this.resolveDependenciesAndRun(e,function(n){return L.findDeclaration(n.semanticLanguageService(),e,t)})},t.prototype.findTypeDeclaration=function(e,t){return this.resolveDependenciesAndRun(e,function(n){return L.findTypeDeclaration(n.semanticLanguageService(),e,t)})},t.prototype.getOutline=function(e){return x.compute(this.findProject(e).syntaxLanguageService(),e)},t.prototype.formatDocument=function(e,t){return S.formatDocument(this.findProject(e).syntaxLanguageService(),e,t)},t.prototype.formatRange=function(e,t,n){return S.formatRange(this.findProject(e).syntaxLanguageService(),e,t,n)},t.prototype.formatAfterKeystroke=function(e,t,n,r){return S.formatAfterKeystroke(this.findProject(e).syntaxLanguageService(),e,t,n,r)},t.prototype.getRangesToPosition=function(e,t){return C.compute(this.findProject(e).syntaxLanguageService(),e,t)},t}(p.AbstractWorkerMode);t.TypeScriptWorker2=H});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/languages/typescript/typescriptWorker2.nls.keys",[],{vs_languages_typescript_project_dependencyResolver:{path:"vs/languages/typescript/project/dependencyResolver.js",keys:["ref.loadFailure"]},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_features_typescriptSnippets:{path:"vs/languages/typescript/features/typescriptSnippets.js",keys:["foreach.snippet","jsdoc.snippet","constructor.snippet","class.snippet","publicmethod.snippet","privatemethod.snippet","importstatement.snippet"]},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"]}});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
"use strict";define("vs/languages/typescript/js/globalVariableRewriter",["require","exports","vs/base/strings"],function(e,t,n){var i=function(){function e(){this._pattern=/(\/\* ?globals? )([\s\S]+)\*\//gm}return e.prototype.computeEdits=function(e){this._pattern.lastIndex=0;for(var t,i=e.sourceFile.getFullText(),r=[];t=this._pattern.exec(i);)t[2].split(",").forEach(function(e){e=e.trim();var t=e.indexOf(":");e=e.substring(0,~t?t:void 0),r.push(n.format("declare var {0}:any;\n",e))}),e.newInsert(Math.max(e.sourceUnitStart,t.index),r.join(n.empty))},e}();t.GlobalVariableCollector=i});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/languages/typescript/js/globalVariableRewriter.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 i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/typescript/js/importAndExportRewriter",["require","exports","vs/base/strings","vs/base/paths","vs/languages/typescript/lib/typescriptServices","vs/base/collections"],function(e,t,n,i,r,o){var s=function(){function e(e,t){this.offset=e,this.length=t}return e}();t.Node=s;var a=function(e){function t(){e.apply(this,arguments),this.items=[]}return __extends(t,e),t}(s);t.List=a;var c=function(e){function t(t,n,i){e.call(this,t,n),this.scope=i,this.requireStatements=[],this.exportsDotExpressions=[]}return __extends(t,e),t}(s);t.DefineNode=c;var l=function(e){function t(t,n,i){e.call(this,t,n),this.name=i}return __extends(t,e),t}(s);t.CallbackParameter=l;var u=function(e){function t(t,n,i){e.call(this,t,n),this.path=i}return __extends(t,e),t}(s);t.DependencyNode=u;var p=function(e){function t(t,n,i,r){e.call(this,t,n),this.name=i,this.path=r}return __extends(t,e),t}(s);t.RequireStatement=p;var h=function(e){function t(t,n,i){e.call(this,t,n),this.name=i}return __extends(t,e),t}(s);t.ExportsExpression=h;var d=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),t}(s);t.GlobalExportsExpression=d;var f=function(){function e(){}return e.prototype.computeEdits=function(e){e.newInsert("declare var exports:any; declare var module:any; declare var require:any;\n"),this._context=e,this._currentScopeId=0,this._currentNode=null,this._bucket=[],this._variableNames=new g,this._visitNode(this._context.sourceFile);for(var t=!1,n=0,i=this._bucket.length;i>n;n++){var r=this._bucket[n];r instanceof c&&!t&&0===r.scope?(this._translateDefineNode(r),t=!0):r instanceof d?this._translateGlobalExportsExpression(r):r instanceof h?this._translateExportsExpression(r):r instanceof p&&this._translateRequireStatement(r)}},Object.defineProperty(e.prototype,"nodes",{get:function(){return this._bucket},enumerable:!0,configurable:!0}),e.prototype._untilParent=function(e,t){for(var n=e.parent;n&&n.kind!==t;)n=n.parent;return n},e.prototype._store=function(e){this._currentNode?e instanceof p?this._currentNode.requireStatements.push(e):e instanceof h&&this._currentNode.exportsDotExpressions.push(e):this._bucket.push(e)},e.prototype.visitBinaryExpression=function(e){var t;if(e.operator===r.SyntaxKind.EqualsToken&&e.parent.kind===r.SyntaxKind.ExpressionStatement){var n,i;if(m.isIdentifier(e.left,"exports"))n=e.left.getStart(),i=e.left.getEnd(),t=new d(n,i-n);else if(e.left.kind===r.SyntaxKind.PropertyAccessExpression){var o=e.left,s=o.name.text;if(o.expression.kind===r.SyntaxKind.Identifier){var a=r.getTextOfNode(o.expression);"exports"===a?t=new h(o.getStart(),o.getWidth(),s):"module"===a&&"exports"===s&&(t=new d(o.getStart(),o.getWidth()))}else if(o.expression.kind===r.SyntaxKind.PropertyAccessExpression){var c=o.expression;m.isIdentifier(c.expression,"module")&&m.isIdentifier(c.name,"exports")&&(t=new h(o.getStart(),o.getWidth(),s))}}}t?this._store(t):this._visitNode(e)},e.prototype.visitCallExpression=function(t){if(m.isIdentifier(t.expression,e._Require)){var n=t.arguments;if(m.isPath(n,r.SyntaxKind.StringLiteral)){var i,o=this._untilParent(t,r.SyntaxKind.VariableDeclaration);o&&(i=o.name.text),this._store(new p(r.getTokenPosOfNode(t),t.getWidth(),i,r.getTextOfNode(n[0])))}}else if(m.isIdentifier(t.expression,e._Define)){this._currentNode=new c(r.getTokenPosOfNode(t),t.getWidth(),this._currentScopeId);var n=t.arguments;if(m.isPath(n,r.SyntaxKind.ObjectLiteralExpression)?this._currentNode.objectLiteral=new s(r.getTokenPosOfNode(n[0]),n[0].getWidth()):m.isPath(n,r.SyntaxKind.FunctionExpression)?this._fillInParametersAndBody(n[0],this._currentNode):m.isPath(n,r.SyntaxKind.ArrayLiteralExpression,r.SyntaxKind.FunctionExpression)?(this._fillInDependencies(n[0],this._currentNode),this._fillInParametersAndBody(n[1],this._currentNode)):m.isPath(n,r.SyntaxKind.StringLiteral,r.SyntaxKind.ArrayLiteralExpression,r.SyntaxKind.FunctionExpression)?(this._currentNode.identifier=n[0].text,this._fillInDependencies(n[1],this._currentNode),this._fillInParametersAndBody(n[2],this._currentNode)):this._currentNode=null,this._currentNode)return this._bucket.push(this._currentNode),this._visitNode(t),this._currentNode=null,void 0}this._visitNode(t)},e.prototype._fillInDependencies=function(e,t){t.dependencyArray=new a(r.getTokenPosOfNode(e),e.getWidth());for(var n=0,i=e.elements.length;i>n;n++){var o=e.elements[n];t.dependencyArray.items.push(new u(r.getTokenPosOfNode(o),o.getWidth(),r.getTextOfNode(o)))}},e.prototype._fillInParametersAndBody=function(e,t){var n,i;n=e.parameters.pos,i=e.parameters.end,t.callbackParameters=new a(n,i-n);for(var o=e.parameters,c=0,u=o.length;u>c;c++){var p=o[c];t.callbackParameters.items.push(new l(r.getTokenPosOfNode(p),p.getWidth(),r.getTextOfNode(p)))}n=e.body.getStart()+1,i=e.body.getEnd()-1,t.callbackBody=new s(n,i-n)},e.prototype._visitNode=function(e){var t=this;r.forEachChild(e,function(e){switch(e.kind){case r.SyntaxKind.BinaryExpression:t.visitBinaryExpression(e);break;case r.SyntaxKind.CallExpression:t.visitCallExpression(e);break;case r.SyntaxKind.FunctionDeclaration:case r.SyntaxKind.FunctionExpression:case r.SyntaxKind.ArrowFunction:t._currentScopeId+=1,t._visitNode(e),t._currentScopeId-=1;break;default:t._visitNode(e)}})},e.prototype._translateRequireStatement=function(e){var t=this._variableNames.next(e.name||e.path);this._context.newInsert(n.format("import {0} = require({1});\n",t,e.path)),this._context.newReplace(e.offset,e.length,t)},e.prototype._translateGlobalExportsExpression=function(e){var t=this._variableNames.next();this._context.newReplace(e.offset,e.length,n.format("var {0}",t)),this._context.newAppend(n.format("\nexport = {0};",t))},e.prototype._translateExportsExpression=function(e){this._context.newReplace(e.offset,e.length-e.name.length,"export var ")},e.prototype._translateDefineNode=function(t){if(t.objectLiteral)this._context.newInsert(e._DeclareWithLiteral);else{if(t.dependencyArray)for(var i=0,r=t.callbackParameters.items.length;r>i;i++){var o=t.callbackParameters.items[i],s=t.dependencyArray.items[i];if(!e._SpecialCallbackParams.hasOwnProperty(o.name)&&s){var a=this._variableNames.next();this._context.newInsert(n.format("import {0} = require({1});\n",a,s.path)),this._context.newInsert(o.offset+o.length,n.format(":typeof {0}",a))}}for(var c=[],i=0,r=t.requireStatements.length;r>i;i++){var l=t.requireStatements[i],u=this._variableNames.next(),p=this._variableNames.next();this._context.newInsert(n.format("import {0} = require({1});\n",u,l.path)),this._context.newReplace(l.offset,l.length,p),c.push(n.format("{0}:typeof {1}",p,u))}c.length>0&&this._context.newInsert(t.callbackParameters.offset+t.callbackParameters.length,n.format("{0}{1}",t.callbackParameters.items.length>0?",":"",c.join(",")));for(var h=[],i=0,r=t.exportsDotExpressions.length;r>i;i++){var d=t.exportsDotExpressions[i],f=this._variableNames.next();this._context.newReplace(d.offset,d.length,n.format("var {0}",f)),h.push(d.name),h.push(":"),h.push(f),h.push(",")}h.length>0&&(h.pop(),this._context.newInsert(t.callbackBody.offset+t.callbackBody.length,n.format("return {{0}};",h.join(n.empty))));var m=t.identifier?"id,":n.empty,g=t.dependencyArray?"dep,":n.empty,_=t.callbackParameters.items.map(function(e){return e.name}).concat(t.requireStatements.map(function(e,t){return n.format("_p{0}",t)})).join(",");this._context.newInsert(n.format(e._DeclareTemplate,m,g,_))}var y=this._variableNames.next();this._context.newInsert(t.offset,n.format("var {0} = ",y)),this._context.newAppend(n.format("\nexport = {0};",y))},e._SpecialCallbackParams={exports:!0,module:!0,require:!0},e._DeclareWithLiteral="declare function define<T>(literal:T):T;\n",e._DeclareTemplate="declare function define<T>({0}{1}callback:({2})=>T):T;\n",e._Define="define",e._Require="require",e}();t.ImportsAndExportsCollector=f;var m,g=function(){function e(){this._counter=0,this._proposalToName={},this._allNames={}}return e.prototype.next=function(t){if(!t)return n.format("_var_{0}",this._counter++);var r=o.lookup(this._proposalToName,t);if(r)return r;if(r=t.replace(/["']/g,n.empty),r=i.basename(r),r=r.replace(e._RegExp,n.empty),0===r.length)return this.next();r=r.split(n.empty).join(e._SpecialChar),r+=e._SpecialChar;for(var s=r,a=1;o.contains(this._allNames,r);a++)r=s+a;return this._allNames[r]=!0,this._proposalToName[t]=r,r},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}();!function(e){function t(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(t.length!==e.length)return!1;for(var i=0,r=t.length;r>i;i++)if(e[i].kind!==t[i])return!1;return!0}function n(e,t){return e.kind===r.SyntaxKind.Identifier&&r.getTextOfNode(e)===t}e.isPath=t,e.isIdentifier=n}(m||(m={}))});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/languages/typescript/js/importAndExportRewriter.nls.keys",[],{});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
var ts;!function(e){!function(e){e[e.Unknown=0]="Unknown",e[e.EndOfFileToken=1]="EndOfFileToken",e[e.SingleLineCommentTrivia=2]="SingleLineCommentTrivia",e[e.MultiLineCommentTrivia=3]="MultiLineCommentTrivia",e[e.NewLineTrivia=4]="NewLineTrivia",e[e.WhitespaceTrivia=5]="WhitespaceTrivia",e[e.NumericLiteral=6]="NumericLiteral",e[e.StringLiteral=7]="StringLiteral",e[e.RegularExpressionLiteral=8]="RegularExpressionLiteral",e[e.NoSubstitutionTemplateLiteral=9]="NoSubstitutionTemplateLiteral",e[e.TemplateHead=10]="TemplateHead",e[e.TemplateMiddle=11]="TemplateMiddle",e[e.TemplateTail=12]="TemplateTail",e[e.OpenBraceToken=13]="OpenBraceToken",e[e.CloseBraceToken=14]="CloseBraceToken",e[e.OpenParenToken=15]="OpenParenToken",e[e.CloseParenToken=16]="CloseParenToken",e[e.OpenBracketToken=17]="OpenBracketToken",e[e.CloseBracketToken=18]="CloseBracketToken",e[e.DotToken=19]="DotToken",e[e.DotDotDotToken=20]="DotDotDotToken",e[e.SemicolonToken=21]="SemicolonToken",e[e.CommaToken=22]="CommaToken",e[e.LessThanToken=23]="LessThanToken",e[e.GreaterThanToken=24]="GreaterThanToken",e[e.LessThanEqualsToken=25]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=26]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=27]="EqualsEqualsToken",e[e.ExclamationEqualsToken=28]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=29]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=30]="ExclamationEqualsEqualsToken",e[e.EqualsGreaterThanToken=31]="EqualsGreaterThanToken",e[e.PlusToken=32]="PlusToken",e[e.MinusToken=33]="MinusToken",e[e.AsteriskToken=34]="AsteriskToken",e[e.SlashToken=35]="SlashToken",e[e.PercentToken=36]="PercentToken",e[e.PlusPlusToken=37]="PlusPlusToken",e[e.MinusMinusToken=38]="MinusMinusToken",e[e.LessThanLessThanToken=39]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=40]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=41]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=42]="AmpersandToken",e[e.BarToken=43]="BarToken",e[e.CaretToken=44]="CaretToken",e[e.ExclamationToken=45]="ExclamationToken",e[e.TildeToken=46]="TildeToken",e[e.AmpersandAmpersandToken=47]="AmpersandAmpersandToken",e[e.BarBarToken=48]="BarBarToken",e[e.QuestionToken=49]="QuestionToken",e[e.ColonToken=50]="ColonToken",e[e.EqualsToken=51]="EqualsToken",e[e.PlusEqualsToken=52]="PlusEqualsToken",e[e.MinusEqualsToken=53]="MinusEqualsToken",e[e.AsteriskEqualsToken=54]="AsteriskEqualsToken",e[e.SlashEqualsToken=55]="SlashEqualsToken",e[e.PercentEqualsToken=56]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=57]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=58]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=59]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=60]="AmpersandEqualsToken",e[e.BarEqualsToken=61]="BarEqualsToken",e[e.CaretEqualsToken=62]="CaretEqualsToken",e[e.Identifier=63]="Identifier",e[e.BreakKeyword=64]="BreakKeyword",e[e.CaseKeyword=65]="CaseKeyword",e[e.CatchKeyword=66]="CatchKeyword",e[e.ClassKeyword=67]="ClassKeyword",e[e.ConstKeyword=68]="ConstKeyword",e[e.ContinueKeyword=69]="ContinueKeyword",e[e.DebuggerKeyword=70]="DebuggerKeyword",e[e.DefaultKeyword=71]="DefaultKeyword",e[e.DeleteKeyword=72]="DeleteKeyword",e[e.DoKeyword=73]="DoKeyword",e[e.ElseKeyword=74]="ElseKeyword",e[e.EnumKeyword=75]="EnumKeyword",e[e.ExportKeyword=76]="ExportKeyword",e[e.ExtendsKeyword=77]="ExtendsKeyword",e[e.FalseKeyword=78]="FalseKeyword",e[e.FinallyKeyword=79]="FinallyKeyword",e[e.ForKeyword=80]="ForKeyword",e[e.FunctionKeyword=81]="FunctionKeyword",e[e.IfKeyword=82]="IfKeyword",e[e.ImportKeyword=83]="ImportKeyword",e[e.InKeyword=84]="InKeyword",e[e.InstanceOfKeyword=85]="InstanceOfKeyword",e[e.NewKeyword=86]="NewKeyword",e[e.NullKeyword=87]="NullKeyword",e[e.ReturnKeyword=88]="ReturnKeyword",e[e.SuperKeyword=89]="SuperKeyword",e[e.SwitchKeyword=90]="SwitchKeyword",e[e.ThisKeyword=91]="ThisKeyword",e[e.ThrowKeyword=92]="ThrowKeyword",e[e.TrueKeyword=93]="TrueKeyword",e[e.TryKeyword=94]="TryKeyword",e[e.TypeOfKeyword=95]="TypeOfKeyword",e[e.VarKeyword=96]="VarKeyword",e[e.VoidKeyword=97]="VoidKeyword",e[e.WhileKeyword=98]="WhileKeyword",e[e.WithKeyword=99]="WithKeyword",e[e.ImplementsKeyword=100]="ImplementsKeyword",e[e.InterfaceKeyword=101]="InterfaceKeyword",e[e.LetKeyword=102]="LetKeyword",e[e.PackageKeyword=103]="PackageKeyword",e[e.PrivateKeyword=104]="PrivateKeyword",e[e.ProtectedKeyword=105]="ProtectedKeyword",e[e.PublicKeyword=106]="PublicKeyword",e[e.StaticKeyword=107]="StaticKeyword",e[e.YieldKeyword=108]="YieldKeyword",e[e.AnyKeyword=109]="AnyKeyword",e[e.BooleanKeyword=110]="BooleanKeyword",e[e.ConstructorKeyword=111]="ConstructorKeyword",e[e.DeclareKeyword=112]="DeclareKeyword",e[e.GetKeyword=113]="GetKeyword",e[e.ModuleKeyword=114]="ModuleKeyword",e[e.RequireKeyword=115]="RequireKeyword",e[e.NumberKeyword=116]="NumberKeyword",e[e.SetKeyword=117]="SetKeyword",e[e.StringKeyword=118]="StringKeyword",e[e.TypeKeyword=119]="TypeKeyword",e[e.QualifiedName=120]="QualifiedName",e[e.ComputedPropertyName=121]="ComputedPropertyName",e[e.TypeParameter=122]="TypeParameter",e[e.Parameter=123]="Parameter",e[e.Property=124]="Property",e[e.Method=125]="Method",e[e.Constructor=126]="Constructor",e[e.GetAccessor=127]="GetAccessor",e[e.SetAccessor=128]="SetAccessor",e[e.CallSignature=129]="CallSignature",e[e.ConstructSignature=130]="ConstructSignature",e[e.IndexSignature=131]="IndexSignature",e[e.TypeReference=132]="TypeReference",e[e.FunctionType=133]="FunctionType",e[e.ConstructorType=134]="ConstructorType",e[e.TypeQuery=135]="TypeQuery",e[e.TypeLiteral=136]="TypeLiteral",e[e.ArrayType=137]="ArrayType",e[e.TupleType=138]="TupleType",e[e.UnionType=139]="UnionType",e[e.ParenthesizedType=140]="ParenthesizedType",e[e.ArrayLiteralExpression=141]="ArrayLiteralExpression",e[e.ObjectLiteralExpression=142]="ObjectLiteralExpression",e[e.PropertyAccessExpression=143]="PropertyAccessExpression",e[e.ElementAccessExpression=144]="ElementAccessExpression",e[e.CallExpression=145]="CallExpression",e[e.NewExpression=146]="NewExpression",e[e.TaggedTemplateExpression=147]="TaggedTemplateExpression",e[e.TypeAssertionExpression=148]="TypeAssertionExpression",e[e.ParenthesizedExpression=149]="ParenthesizedExpression",e[e.FunctionExpression=150]="FunctionExpression",e[e.ArrowFunction=151]="ArrowFunction",e[e.DeleteExpression=152]="DeleteExpression",e[e.TypeOfExpression=153]="TypeOfExpression",e[e.VoidExpression=154]="VoidExpression",e[e.PrefixUnaryExpression=155]="PrefixUnaryExpression",e[e.PostfixUnaryExpression=156]="PostfixUnaryExpression",e[e.BinaryExpression=157]="BinaryExpression",e[e.ConditionalExpression=158]="ConditionalExpression",e[e.TemplateExpression=159]="TemplateExpression",e[e.YieldExpression=160]="YieldExpression",e[e.OmittedExpression=161]="OmittedExpression",e[e.TemplateSpan=162]="TemplateSpan",e[e.Block=163]="Block",e[e.VariableStatement=164]="VariableStatement",e[e.EmptyStatement=165]="EmptyStatement",e[e.ExpressionStatement=166]="ExpressionStatement",e[e.IfStatement=167]="IfStatement",e[e.DoStatement=168]="DoStatement",e[e.WhileStatement=169]="WhileStatement",e[e.ForStatement=170]="ForStatement",e[e.ForInStatement=171]="ForInStatement",e[e.ContinueStatement=172]="ContinueStatement",e[e.BreakStatement=173]="BreakStatement",e[e.ReturnStatement=174]="ReturnStatement",e[e.WithStatement=175]="WithStatement",e[e.SwitchStatement=176]="SwitchStatement",e[e.LabeledStatement=177]="LabeledStatement",e[e.ThrowStatement=178]="ThrowStatement",e[e.TryStatement=179]="TryStatement",e[e.TryBlock=180]="TryBlock",e[e.FinallyBlock=181]="FinallyBlock",e[e.DebuggerStatement=182]="DebuggerStatement",e[e.VariableDeclaration=183]="VariableDeclaration",e[e.FunctionDeclaration=184]="FunctionDeclaration",e[e.ClassDeclaration=185]="ClassDeclaration",e[e.InterfaceDeclaration=186]="InterfaceDeclaration",e[e.TypeAliasDeclaration=187]="TypeAliasDeclaration",e[e.EnumDeclaration=188]="EnumDeclaration",e[e.ModuleDeclaration=189]="ModuleDeclaration",e[e.ModuleBlock=190]="ModuleBlock",e[e.ImportDeclaration=191]="ImportDeclaration",e[e.ExportAssignment=192]="ExportAssignment",e[e.ExternalModuleReference=193]="ExternalModuleReference",e[e.CaseClause=194]="CaseClause",e[e.DefaultClause=195]="DefaultClause",e[e.HeritageClause=196]="HeritageClause",e[e.CatchClause=197]="CatchClause",e[e.PropertyAssignment=198]="PropertyAssignment",e[e.ShorthandPropertyAssignment=199]="ShorthandPropertyAssignment",e[e.EnumMember=200]="EnumMember",e[e.SourceFile=201]="SourceFile",e[e.Program=202]="Program",e[e.SyntaxList=203]="SyntaxList",e[e.Count=204]="Count",e[e.FirstAssignment=51]="FirstAssignment",e[e.LastAssignment=62]="LastAssignment",e[e.FirstReservedWord=64]="FirstReservedWord",e[e.LastReservedWord=99]="LastReservedWord",e[e.FirstKeyword=64]="FirstKeyword",e[e.LastKeyword=119]="LastKeyword",e[e.FirstFutureReservedWord=100]="FirstFutureReservedWord",e[e.LastFutureReservedWord=108]="LastFutureReservedWord",e[e.FirstTypeNode=132]="FirstTypeNode",e[e.LastTypeNode=140]="LastTypeNode",e[e.FirstPunctuation=13]="FirstPunctuation",e[e.LastPunctuation=62]="LastPunctuation",e[e.FirstToken=0]="FirstToken",e[e.LastToken=119]="LastToken",e[e.FirstTriviaToken=2]="FirstTriviaToken",e[e.LastTriviaToken=5]="LastTriviaToken",e[e.FirstLiteralToken=6]="FirstLiteralToken",e[e.LastLiteralToken=9]="LastLiteralToken",e[e.FirstTemplateToken=9]="FirstTemplateToken",e[e.LastTemplateToken=12]="LastTemplateToken",e[e.FirstOperator=21]="FirstOperator",e[e.LastOperator=62]="LastOperator",e[e.FirstBinaryOperator=23]="FirstBinaryOperator",e[e.LastBinaryOperator=62]="LastBinaryOperator",e[e.FirstNode=120]="FirstNode"}(e.SyntaxKind||(e.SyntaxKind={}));e.SyntaxKind;!function(e){e[e.Export=1]="Export",e[e.Ambient=2]="Ambient",e[e.Public=16]="Public",e[e.Private=32]="Private",e[e.Protected=64]="Protected",e[e.Static=128]="Static",e[e.MultiLine=256]="MultiLine",e[e.Synthetic=512]="Synthetic",e[e.DeclarationFile=1024]="DeclarationFile",e[e.Let=2048]="Let",e[e.Const=4096]="Const",e[e.OctalLiteral=8192]="OctalLiteral",e[e.Modifier=243]="Modifier",e[e.AccessibilityModifier=112]="AccessibilityModifier",e[e.BlockScoped=6144]="BlockScoped"}(e.NodeFlags||(e.NodeFlags={}));e.NodeFlags;!function(e){e[e.StrictMode=1]="StrictMode",e[e.DisallowIn=2]="DisallowIn",e[e.Yield=4]="Yield",e[e.GeneratorParameter=8]="GeneratorParameter",e[e.ContainsError=16]="ContainsError",e[e.HasPropagatedChildContainsErrorFlag=32]="HasPropagatedChildContainsErrorFlag"}(e.ParserContextFlags||(e.ParserContextFlags={}));e.ParserContextFlags;!function(e){e[e.Succeeded=0]="Succeeded",e[e.AllOutputGenerationSkipped=1]="AllOutputGenerationSkipped",e[e.JSGeneratedWithSemanticErrors=2]="JSGeneratedWithSemanticErrors",e[e.DeclarationGenerationSkipped=3]="DeclarationGenerationSkipped",e[e.EmitErrorsEncountered=4]="EmitErrorsEncountered",e[e.CompilerOptionsErrors=5]="CompilerOptionsErrors"}(e.EmitReturnStatus||(e.EmitReturnStatus={}));e.EmitReturnStatus;!function(e){e[e.None=0]="None",e[e.WriteArrayAsGenericType=1]="WriteArrayAsGenericType",e[e.UseTypeOfFunction=2]="UseTypeOfFunction",e[e.NoTruncation=4]="NoTruncation",e[e.WriteArrowStyleSignature=8]="WriteArrowStyleSignature",e[e.WriteOwnNameForAnyLike=16]="WriteOwnNameForAnyLike",e[e.WriteTypeArgumentsOfSignature=32]="WriteTypeArgumentsOfSignature",e[e.InElementType=64]="InElementType"}(e.TypeFormatFlags||(e.TypeFormatFlags={}));e.TypeFormatFlags;!function(e){e[e.None=0]="None",e[e.WriteTypeParametersOrArguments=1]="WriteTypeParametersOrArguments",e[e.UseOnlyExternalAliasing=2]="UseOnlyExternalAliasing"}(e.SymbolFormatFlags||(e.SymbolFormatFlags={}));e.SymbolFormatFlags;!function(e){e[e.Accessible=0]="Accessible",e[e.NotAccessible=1]="NotAccessible",e[e.CannotBeNamed=2]="CannotBeNamed"}(e.SymbolAccessibility||(e.SymbolAccessibility={}));e.SymbolAccessibility;!function(e){e[e.FunctionScopedVariable=1]="FunctionScopedVariable",e[e.BlockScopedVariable=2]="BlockScopedVariable",e[e.Property=4]="Property",e[e.EnumMember=8]="EnumMember",e[e.Function=16]="Function",e[e.Class=32]="Class",e[e.Interface=64]="Interface",e[e.ConstEnum=128]="ConstEnum",e[e.RegularEnum=256]="RegularEnum",e[e.ValueModule=512]="ValueModule",e[e.NamespaceModule=1024]="NamespaceModule",e[e.TypeLiteral=2048]="TypeLiteral",e[e.ObjectLiteral=4096]="ObjectLiteral",e[e.Method=8192]="Method",e[e.Constructor=16384]="Constructor",e[e.GetAccessor=32768]="GetAccessor",e[e.SetAccessor=65536]="SetAccessor",e[e.CallSignature=131072]="CallSignature",e[e.ConstructSignature=262144]="ConstructSignature",e[e.IndexSignature=524288]="IndexSignature",e[e.TypeParameter=1048576]="TypeParameter",e[e.TypeAlias=2097152]="TypeAlias",e[e.ExportValue=4194304]="ExportValue",e[e.ExportType=8388608]="ExportType",e[e.ExportNamespace=16777216]="ExportNamespace",e[e.Import=33554432]="Import",e[e.Instantiated=67108864]="Instantiated",e[e.Merged=134217728]="Merged",e[e.Transient=268435456]="Transient",e[e.Prototype=536870912]="Prototype",e[e.UnionProperty=1073741824]="UnionProperty",e[e.Enum=384]="Enum",e[e.Variable=3]="Variable",e[e.Value=107455]="Value",e[e.Type=3152352]="Type",e[e.Namespace=1536]="Namespace",e[e.Module=1536]="Module",e[e.Accessor=98304]="Accessor",e[e.Signature=917504]="Signature",e[e.FunctionScopedVariableExcludes=107454]="FunctionScopedVariableExcludes",e[e.BlockScopedVariableExcludes=107455]="BlockScopedVariableExcludes",e[e.ParameterExcludes=107455]="ParameterExcludes",e[e.PropertyExcludes=107455]="PropertyExcludes",e[e.EnumMemberExcludes=107455]="EnumMemberExcludes",e[e.FunctionExcludes=106927]="FunctionExcludes",e[e.ClassExcludes=3258879]="ClassExcludes",e[e.InterfaceExcludes=3152288]="InterfaceExcludes",e[e.RegularEnumExcludes=3258623]="RegularEnumExcludes",e[e.ConstEnumExcludes=3259263]="ConstEnumExcludes",e[e.ValueModuleExcludes=106639]="ValueModuleExcludes",e[e.NamespaceModuleExcludes=0]="NamespaceModuleExcludes",e[e.MethodExcludes=99263]="MethodExcludes",e[e.GetAccessorExcludes=41919]="GetAccessorExcludes",e[e.SetAccessorExcludes=74687]="SetAccessorExcludes",e[e.TypeParameterExcludes=2103776]="TypeParameterExcludes",e[e.TypeAliasExcludes=3152352]="TypeAliasExcludes",e[e.ImportExcludes=33554432]="ImportExcludes",e[e.ModuleMember=35653619]="ModuleMember",e[e.ExportHasLocal=944]="ExportHasLocal",e[e.HasLocals=1041936]="HasLocals",e[e.HasExports=1952]="HasExports",e[e.HasMembers=6240]="HasMembers",e[e.IsContainer=1048560]="IsContainer",e[e.PropertyOrAccessor=98308]="PropertyOrAccessor",e[e.Export=29360128]="Export"}(e.SymbolFlags||(e.SymbolFlags={}));e.SymbolFlags;!function(e){e[e.TypeChecked=1]="TypeChecked",e[e.LexicalThis=2]="LexicalThis",e[e.CaptureThis=4]="CaptureThis",e[e.EmitExtends=8]="EmitExtends",e[e.SuperInstance=16]="SuperInstance",e[e.SuperStatic=32]="SuperStatic",e[e.ContextChecked=64]="ContextChecked",e[e.EnumValuesComputed=128]="EnumValuesComputed"}(e.NodeCheckFlags||(e.NodeCheckFlags={}));e.NodeCheckFlags;!function(e){e[e.Any=1]="Any",e[e.String=2]="String",e[e.Number=4]="Number",e[e.Boolean=8]="Boolean",e[e.Void=16]="Void",e[e.Undefined=32]="Undefined",e[e.Null=64]="Null",e[e.Enum=128]="Enum",e[e.StringLiteral=256]="StringLiteral",e[e.TypeParameter=512]="TypeParameter",e[e.Class=1024]="Class",e[e.Interface=2048]="Interface",e[e.Reference=4096]="Reference",e[e.Tuple=8192]="Tuple",e[e.Union=16384]="Union",e[e.Anonymous=32768]="Anonymous",e[e.FromSignature=65536]="FromSignature",e[e.Intrinsic=127]="Intrinsic",e[e.StringLike=258]="StringLike",e[e.NumberLike=132]="NumberLike",e[e.ObjectType=48128]="ObjectType"}(e.TypeFlags||(e.TypeFlags={}));e.TypeFlags;!function(e){e[e.Call=0]="Call",e[e.Construct=1]="Construct"}(e.SignatureKind||(e.SignatureKind={}));e.SignatureKind;!function(e){e[e.String=0]="String",e[e.Number=1]="Number"}(e.IndexKind||(e.IndexKind={}));e.IndexKind;!function(e){e[e.Warning=0]="Warning",e[e.Error=1]="Error",e[e.Message=2]="Message"}(e.DiagnosticCategory||(e.DiagnosticCategory={}));e.DiagnosticCategory;!function(e){e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD"}(e.ModuleKind||(e.ModuleKind={}));e.ModuleKind;!function(e){e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES6=2]="ES6",e[e.Latest=2]="Latest"}(e.ScriptTarget||(e.ScriptTarget={}));e.ScriptTarget;!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.mathematicalSpace=8287]="mathematicalSpace",e[e.ogham=5760]="ogham",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",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.j=106]="j",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.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",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.backtick=96]="backtick",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}(ts||(ts={}));var ts;!function(e){function t(e,t){if(e)for(var n=0,r=e.length;r>n;n++){var i=t(e[n]);if(i)return i}return void 0}function n(e,t){if(e)for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return!0;return!1}function r(e,t){if(e)for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}function i(e,t){var n=0;if(e)for(var r=0,i=e.length;i>r;r++)t(e[r])&&n++;return n}function o(e,t){if(e)for(var n=[],r=0,i=e.length;i>r;r++){var o=e[r];t(o)&&n.push(o)}return n}function s(e,t){if(e)for(var n=[],r=0,i=e.length;i>r;r++)n.push(t(e[r]));return n}function a(e,t){return t&&t.length?e&&e.length?e.concat(t):t:e}function c(e){if(e)for(var t=[],r=0,i=e.length;i>r;r++){var o=e[r];n(t,o)||t.push(o)}return t}function l(e,t){for(var n=0,r=0;r<e.length;r++)n+=e[r][t];return n}function u(e){return 0===e.length?void 0:e[e.length-1]}function p(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}function d(e,t){return et.call(e,t)}function h(e,t){return et.call(e,t)?e[t]:void 0}function m(e){for(var t in e)if(d(e,t))return!1;return!0}function f(e){var t={};for(var n in e)t[n]=e[n];return t}function g(e,t){var n;for(var r in e)if(n=t(e[r]))break;return n}function v(e,t){var n;for(var r in e)if(n=t(r))break;return n}function y(e,t){return d(e,t)?e[t]:void 0}function _(e){var t=[];for(var n in e)t.push(e[n]);return t}function b(e,n){var r={};return t(e,function(e){r[n(e)]=e}),r}function T(e,t,n){return n=n||0,e.replace(/{(\d+)}/g,function(e,r){return t[+r+n]})}function E(t){return e.localizedDiagnosticMessages&&e.localizedDiagnosticMessages[t]?e.localizedDiagnosticMessages[t]:t}function S(e,t,n,r){it.assert(t>=0,"start must be non-negative, is "+t),it.assert(n>=0,"length must be non-negative, is "+n);var i=E(r.key);return arguments.length>4&&(i=T(i,arguments,4)),{file:e,start:t,length:n,messageText:i,category:r.category,code:r.code,isEarly:r.isEarly}}function C(e){var t=E(e.key);return arguments.length>1&&(t=T(t,arguments,1)),{file:void 0,start:void 0,length:void 0,messageText:t,category:e.category,code:e.code,isEarly:e.isEarly}}function k(e,t){var n=E(t.key);return arguments.length>2&&(n=T(n,arguments,2)),{messageText:n,category:t.category,code:t.code,next:e}}function x(e,t){return it.assert(!e.next),e.next=t,e}function w(e,t,n,r,i){it.assert(t>=0,"start must be non-negative, is "+t),it.assert(n>=0,"length must be non-negative, is "+n);for(var o=r.code,s=r.category,a="",c=0;r;){if(c){a+=i;for(var l=0;c>l;l++)a+="  "}a+=r.messageText,c++,r=r.next}return{file:e,start:t,length:n,code:o,category:s,messageText:a}}function L(e,t){return e===t?0:void 0===e?-1:void 0===t?1:t>e?-1:1}function A(e){return e.file?e.file.filename:void 0}function N(e,t){return L(A(e),A(t))||L(e.start,t.start)||L(e.length,t.length)||L(e.code,t.code)||L(e.messageText,t.messageText)||0}function M(e){if(e.length<2)return e;for(var t=[e[0]],n=e[0],r=1;r<e.length;r++){var i=e[r],o=0===N(i,n);o||(t.push(i),n=i)}return t}function P(e){return e.replace(/\\/g,"/")}function O(e){if(47===e.charCodeAt(0)){if(47!==e.charCodeAt(1))return 1;var t=e.indexOf("/",2);if(0>t)return 2;var n=e.indexOf("/",t+1);return 0>n?t+1:n+1}return 58===e.charCodeAt(1)?47===e.charCodeAt(2)?3:2:0}function I(t,n){for(var r=t.substr(n).split(e.directorySeparator),i=[],o=0;o<r.length;o++){var s=r[o];"."!==s&&(".."===s&&i.length>0&&".."!==i[i.length-1]?i.pop():i.push(s))}return i}function R(t){var t=P(t),n=O(t),r=I(t,n);return t.substr(0,n)+r.join(e.directorySeparator)}function D(t){return t.substr(0,Math.max(O(t),t.lastIndexOf(e.directorySeparator)))}function V(e){return e&&!F(e)&&-1!==e.indexOf("://")}function F(e){return 0!==O(e)}function H(e,t){var n=I(e,t);return[e.substr(0,t)].concat(n)}function B(e,t){var e=P(e),n=O(e);return 0==n&&(e=q(P(t),e),n=O(e)),H(e,n)}function $(e,t){return G(B(e,t))}function G(t){return t&&t.length?t[0]+t.slice(1).join(e.directorySeparator):void 0}function U(t){for(var n=t.length,r=t.indexOf("://")+"://".length;n>r&&47===t.charCodeAt(r);)r++;if(r===n)return[t];var i=t.indexOf(e.directorySeparator,r);return-1!==i?(r=i+1,H(t,r)):[t+e.directorySeparator]}function W(e,t){return V(e)?U(e):B(e,t)}function j(t,n,r,i,o){var s=W(n,r),a=W(t,r);a.length>1&&""===a[a.length-1]&&a.length--;for(var c=0;c<s.length&&c<a.length&&i(a[c])===i(s[c]);c++);if(c){for(var l="",u=s.slice(c,s.length);c<a.length;c++)""!==a[c]&&(l=l+".."+e.directorySeparator);return l+u.join(e.directorySeparator)}var p=G(s);return o&&F(p)&&(p="file:///"+p),p}function z(t){var n=t.lastIndexOf(e.directorySeparator);return 0>n?t:t.substring(n+1)}function q(t,n){return t&&t.length?n&&n.length?n.charAt(0)===e.directorySeparator?n:t.charAt(t.length-1)===e.directorySeparator?t+n:t+e.directorySeparator+n:t:n}function K(e,t){var n=e.length,r=t.length;return n>r&&e.substr(n-r,r)===t}function Y(e){for(var t=0;t<tt.length;t++){var n=tt[t];if(K(e,n))return e.substr(0,e.length-n.length)}return e}function X(e){return nt.test(e)?e.replace(nt,function(e){return rt[e]||e}):e}function Q(e,t){this.flags=e,this.name=t,this.declarations=void 0}function J(e,t){this.flags=t}function Z(){}!function(e){e[e.False=0]="False",e[e.Maybe=1]="Maybe",e[e.True=-1]="True"}(e.Ternary||(e.Ternary={}));e.Ternary;!function(e){e[e.LessThan=-1]="LessThan",e[e.EqualTo=0]="EqualTo",e[e.GreaterThan=1]="GreaterThan"}(e.Comparison||(e.Comparison={}));e.Comparison;e.forEach=t,e.contains=n,e.indexOf=r,e.countWhere=i,e.filter=o,e.map=s,e.concatenate=a,e.deduplicate=c,e.sum=l,e.lastOrUndefined=u,e.binarySearch=p;var et=Object.prototype.hasOwnProperty;e.hasProperty=d,e.getProperty=h,e.isEmpty=m,e.clone=f,e.forEachValue=g,e.forEachKey=v,e.lookUp=y,e.mapToArray=_,e.arrayToMap=b,e.localizedDiagnosticMessages=void 0,e.getLocaleSpecificMessage=E,e.createFileDiagnostic=S,e.createCompilerDiagnostic=C,e.chainDiagnosticMessages=k,e.concatenateDiagnosticMessageChains=x,e.flattenDiagnosticChain=w,e.compareValues=L,e.compareDiagnostics=N,e.deduplicateSortedDiagnostics=M,e.normalizeSlashes=P,e.getRootLength=O,e.directorySeparator="/",e.normalizePath=R,e.getDirectoryPath=D,e.isUrl=V,e.isRootedDiskPath=F,e.getNormalizedPathComponents=B,e.getNormalizedAbsolutePath=$,e.getNormalizedPathFromPathComponents=G,e.getRelativePathToDirectoryOrUrl=j,e.getBaseFilename=z,e.combinePaths=q,e.fileExtensionIs=K;var tt=[".d.ts",".ts",".js"];e.removeFileExtension=Y;var nt=/[\t\v\f\b\0\r\n\"\\\u2028\u2029\u0085]/g,rt={"	":"\\t","":"\\v","\f":"\\f","\b":"\\b","\x00":"\\0","\r":"\\r","\n":"\\n",'"':'\\"',"\u2028":"\\u2028","\u2029":"\\u2029","…":"\\u0085"};e.escapeString=X,e.objectAllocator={getNodeConstructor:function(e){function t(){}return t.prototype={kind:e,pos:0,end:0,flags:0,parent:void 0},t},getSymbolConstructor:function(){return Q},getTypeConstructor:function(){return J},getSignatureConstructor:function(){return Z}},function(e){e[e.None=0]="None",e[e.Normal=1]="Normal",e[e.Aggressive=2]="Aggressive",e[e.VeryAggressive=3]="VeryAggressive"}(e.AssertionLevel||(e.AssertionLevel={}));{var it;e.AssertionLevel}!function(e){function t(e){return i>=e}function n(e,t,n){if(!e){var r="";throw n&&(r="\r\nVerbose Debug Information: "+n()),new Error("Debug Failure. False expression: "+(t||"")+r)}}function r(t){e.assert(!1,t)}var i=0;e.shouldAssert=t,e.assert=n,e.fail=r}(it=e.Debug||(e.Debug={}))}(ts||(ts={}));var ts;!function(e){e.sys=function(){return void 0}()}(ts||(ts={}));var ts;!function(e){e.Diagnostics={Unterminated_string_literal:{code:1002,category:1,key:"Unterminated string literal."},Identifier_expected:{code:1003,category:1,key:"Identifier expected."},_0_expected:{code:1005,category:1,key:"'{0}' expected."},A_file_cannot_have_a_reference_to_itself:{code:1006,category:1,key:"A file cannot have a reference to itself."},Trailing_comma_not_allowed:{code:1009,category:1,key:"Trailing comma not allowed."},Asterisk_Slash_expected:{code:1010,category:1,key:"'*/' expected."},Unexpected_token:{code:1012,category:1,key:"Unexpected token."},Catch_clause_parameter_cannot_have_a_type_annotation:{code:1013,category:1,key:"Catch clause parameter cannot have a type annotation."},A_rest_parameter_must_be_last_in_a_parameter_list:{code:1014,category:1,key:"A rest parameter must be last in a parameter list."},Parameter_cannot_have_question_mark_and_initializer:{code:1015,category:1,key:"Parameter cannot have question mark and initializer."},A_required_parameter_cannot_follow_an_optional_parameter:{code:1016,category:1,key:"A required parameter cannot follow an optional parameter."},An_index_signature_cannot_have_a_rest_parameter:{code:1017,category:1,key:"An index signature cannot have a rest parameter."},An_index_signature_parameter_cannot_have_an_accessibility_modifier:{code:1018,category:1,key:"An index signature parameter cannot have an accessibility modifier."},An_index_signature_parameter_cannot_have_a_question_mark:{code:1019,category:1,key:"An index signature parameter cannot have a question mark."},An_index_signature_parameter_cannot_have_an_initializer:{code:1020,category:1,key:"An index signature parameter cannot have an initializer."},An_index_signature_must_have_a_type_annotation:{code:1021,category:1,key:"An index signature must have a type annotation."},An_index_signature_parameter_must_have_a_type_annotation:{code:1022,category:1,key:"An index signature parameter must have a type annotation."},An_index_signature_parameter_type_must_be_string_or_number:{code:1023,category:1,key:"An index signature parameter type must be 'string' or 'number'."},A_class_or_interface_declaration_can_only_have_one_extends_clause:{code:1024,category:1,key:"A class or interface declaration can only have one 'extends' clause."},An_extends_clause_must_precede_an_implements_clause:{code:1025,category:1,key:"An 'extends' clause must precede an 'implements' clause."},A_class_can_only_extend_a_single_class:{code:1026,category:1,key:"A class can only extend a single class."},A_class_declaration_can_only_have_one_implements_clause:{code:1027,category:1,key:"A class declaration can only have one 'implements' clause."},Accessibility_modifier_already_seen:{code:1028,category:1,key:"Accessibility modifier already seen."},_0_modifier_must_precede_1_modifier:{code:1029,category:1,key:"'{0}' modifier must precede '{1}' modifier."},_0_modifier_already_seen:{code:1030,category:1,key:"'{0}' modifier already seen."},_0_modifier_cannot_appear_on_a_class_element:{code:1031,category:1,key:"'{0}' modifier cannot appear on a class element."},An_interface_declaration_cannot_have_an_implements_clause:{code:1032,category:1,key:"An interface declaration cannot have an 'implements' clause."},super_must_be_followed_by_an_argument_list_or_member_access:{code:1034,category:1,key:"'super' must be followed by an argument list or member access."},Only_ambient_modules_can_use_quoted_names:{code:1035,category:1,key:"Only ambient modules can use quoted names."},Statements_are_not_allowed_in_ambient_contexts:{code:1036,category:1,key:"Statements are not allowed in ambient contexts."},A_function_implementation_cannot_be_declared_in_an_ambient_context:{code:1037,category:1,key:"A function implementation cannot be declared in an ambient context."},A_declare_modifier_cannot_be_used_in_an_already_ambient_context:{code:1038,category:1,key:"A 'declare' modifier cannot be used in an already ambient context."},Initializers_are_not_allowed_in_ambient_contexts:{code:1039,category:1,key:"Initializers are not allowed in ambient contexts."},_0_modifier_cannot_appear_on_a_module_element:{code:1044,category:1,key:"'{0}' modifier cannot appear on a module element."},A_declare_modifier_cannot_be_used_with_an_interface_declaration:{code:1045,category:1,key:"A 'declare' modifier cannot be used with an interface declaration."},A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file:{code:1046,category:1,key:"A 'declare' modifier is required for a top level declaration in a .d.ts file."},A_rest_parameter_cannot_be_optional:{code:1047,category:1,key:"A rest parameter cannot be optional."},A_rest_parameter_cannot_have_an_initializer:{code:1048,category:1,key:"A rest parameter cannot have an initializer."},A_set_accessor_must_have_exactly_one_parameter:{code:1049,category:1,key:"A 'set' accessor must have exactly one parameter."},A_set_accessor_cannot_have_an_optional_parameter:{code:1051,category:1,key:"A 'set' accessor cannot have an optional parameter."},A_set_accessor_parameter_cannot_have_an_initializer:{code:1052,category:1,key:"A 'set' accessor parameter cannot have an initializer."},A_set_accessor_cannot_have_rest_parameter:{code:1053,category:1,key:"A 'set' accessor cannot have rest parameter."},A_get_accessor_cannot_have_parameters:{code:1054,category:1,key:"A 'get' accessor cannot have parameters."},Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher:{code:1056,category:1,key:"Accessors are only available when targeting ECMAScript 5 and higher."},Enum_member_must_have_initializer:{code:1061,category:1,key:"Enum member must have initializer."},An_export_assignment_cannot_be_used_in_an_internal_module:{code:1063,category:1,key:"An export assignment cannot be used in an internal module."},Ambient_enum_elements_can_only_have_integer_literal_initializers:{code:1066,category:1,key:"Ambient enum elements can only have integer literal initializers."},Unexpected_token_A_constructor_method_accessor_or_property_was_expected:{code:1068,category:1,key:"Unexpected token. A constructor, method, accessor, or property was expected."},A_declare_modifier_cannot_be_used_with_an_import_declaration:{code:1079,category:1,key:"A 'declare' modifier cannot be used with an import declaration."},Invalid_reference_directive_syntax:{code:1084,category:1,key:"Invalid 'reference' directive syntax."},Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher:{code:1085,category:1,key:"Octal literals are not available when targeting ECMAScript 5 and higher."},An_accessor_cannot_be_declared_in_an_ambient_context:{code:1086,category:1,key:"An accessor cannot be declared in an ambient context."},_0_modifier_cannot_appear_on_a_constructor_declaration:{code:1089,category:1,key:"'{0}' modifier cannot appear on a constructor declaration."},_0_modifier_cannot_appear_on_a_parameter:{code:1090,category:1,key:"'{0}' modifier cannot appear on a parameter."},Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:{code:1091,category:1,key:"Only a single variable declaration is allowed in a 'for...in' statement."},Type_parameters_cannot_appear_on_a_constructor_declaration:{code:1092,category:1,key:"Type parameters cannot appear on a constructor declaration."},Type_annotation_cannot_appear_on_a_constructor_declaration:{code:1093,category:1,key:"Type annotation cannot appear on a constructor declaration."},An_accessor_cannot_have_type_parameters:{code:1094,category:1,key:"An accessor cannot have type parameters."},A_set_accessor_cannot_have_a_return_type_annotation:{code:1095,category:1,key:"A 'set' accessor cannot have a return type annotation."},An_index_signature_must_have_exactly_one_parameter:{code:1096,category:1,key:"An index signature must have exactly one parameter."},_0_list_cannot_be_empty:{code:1097,category:1,key:"'{0}' list cannot be empty."},Type_parameter_list_cannot_be_empty:{code:1098,category:1,key:"Type parameter list cannot be empty."},Type_argument_list_cannot_be_empty:{code:1099,category:1,key:"Type argument list cannot be empty."},Invalid_use_of_0_in_strict_mode:{code:1100,category:1,key:"Invalid use of '{0}' in strict mode."},with_statements_are_not_allowed_in_strict_mode:{code:1101,category:1,key:"'with' statements are not allowed in strict mode."},delete_cannot_be_called_on_an_identifier_in_strict_mode:{code:1102,category:1,key:"'delete' cannot be called on an identifier in strict mode."},A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement:{code:1104,category:1,key:"A 'continue' statement can only be used within an enclosing iteration statement."},A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:{code:1105,category:1,key:"A 'break' statement can only be used within an enclosing iteration or switch statement."},Jump_target_cannot_cross_function_boundary:{code:1107,category:1,key:"Jump target cannot cross function boundary."},A_return_statement_can_only_be_used_within_a_function_body:{code:1108,category:1,key:"A 'return' statement can only be used within a function body."},Expression_expected:{code:1109,category:1,key:"Expression expected."},Type_expected:{code:1110,category:1,key:"Type expected."},A_constructor_implementation_cannot_be_declared_in_an_ambient_context:{code:1111,category:1,key:"A constructor implementation cannot be declared in an ambient context."},A_class_member_cannot_be_declared_optional:{code:1112,category:1,key:"A class member cannot be declared optional."},A_default_clause_cannot_appear_more_than_once_in_a_switch_statement:{code:1113,category:1,key:"A 'default' clause cannot appear more than once in a 'switch' statement."},Duplicate_label_0:{code:1114,category:1,key:"Duplicate label '{0}'"},A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement:{code:1115,category:1,key:"A 'continue' statement can only jump to a label of an enclosing iteration statement."},A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:{code:1116,category:1,key:"A 'break' statement can only jump to a label of an enclosing statement."},An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode:{code:1117,category:1,key:"An object literal cannot have multiple properties with the same name in strict mode."},An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name:{code:1118,category:1,key:"An object literal cannot have multiple get/set accessors with the same name."},An_object_literal_cannot_have_property_and_accessor_with_the_same_name:{code:1119,category:1,key:"An object literal cannot have property and accessor with the same name."},An_export_assignment_cannot_have_modifiers:{code:1120,category:1,key:"An export assignment cannot have modifiers."},Octal_literals_are_not_allowed_in_strict_mode:{code:1121,category:1,key:"Octal literals are not allowed in strict mode."},A_tuple_type_element_list_cannot_be_empty:{code:1122,category:1,key:"A tuple type element list cannot be empty."},Variable_declaration_list_cannot_be_empty:{code:1123,category:1,key:"Variable declaration list cannot be empty."},Digit_expected:{code:1124,category:1,key:"Digit expected."},Hexadecimal_digit_expected:{code:1125,category:1,key:"Hexadecimal digit expected."},Unexpected_end_of_text:{code:1126,category:1,key:"Unexpected end of text."},Invalid_character:{code:1127,category:1,key:"Invalid character."},Declaration_or_statement_expected:{code:1128,category:1,key:"Declaration or statement expected."},Statement_expected:{code:1129,category:1,key:"Statement expected."},case_or_default_expected:{code:1130,category:1,key:"'case' or 'default' expected."},Property_or_signature_expected:{code:1131,category:1,key:"Property or signature expected."},Enum_member_expected:{code:1132,category:1,key:"Enum member expected."},Type_reference_expected:{code:1133,category:1,key:"Type reference expected."},Variable_declaration_expected:{code:1134,category:1,key:"Variable declaration expected."},Argument_expression_expected:{code:1135,category:1,key:"Argument expression expected."},Property_assignment_expected:{code:1136,category:1,key:"Property assignment expected."},Expression_or_comma_expected:{code:1137,category:1,key:"Expression or comma expected."},Parameter_declaration_expected:{code:1138,category:1,key:"Parameter declaration expected."},Type_parameter_declaration_expected:{code:1139,category:1,key:"Type parameter declaration expected."},Type_argument_expected:{code:1140,category:1,key:"Type argument expected."},String_literal_expected:{code:1141,category:1,key:"String literal expected."},Line_break_not_permitted_here:{code:1142,category:1,key:"Line break not permitted here."},or_expected:{code:1144,category:1,key:"'{' or ';' expected."},Modifiers_not_permitted_on_index_signature_members:{code:1145,category:1,key:"Modifiers not permitted on index signature members."},Declaration_expected:{code:1146,category:1,key:"Declaration expected."},Import_declarations_in_an_internal_module_cannot_reference_an_external_module:{code:1147,category:1,key:"Import declarations in an internal module cannot reference an external module."},Cannot_compile_external_modules_unless_the_module_flag_is_provided:{code:1148,category:1,key:"Cannot compile external modules unless the '--module' flag is provided."},Filename_0_differs_from_already_included_filename_1_only_in_casing:{code:1149,category:1,key:"Filename '{0}' differs from already included filename '{1}' only in casing"},new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead:{code:1150,category:1,key:"'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead."},var_let_or_const_expected:{code:1152,category:1,key:"'var', 'let' or 'const' expected."},let_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher:{code:1153,category:1,key:"'let' declarations are only available when targeting ECMAScript 6 and higher."},const_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher:{code:1154,category:1,key:"'const' declarations are only available when targeting ECMAScript 6 and higher."},const_declarations_must_be_initialized:{code:1155,category:1,key:"'const' declarations must be initialized"},const_declarations_can_only_be_declared_inside_a_block:{code:1156,category:1,key:"'const' declarations can only be declared inside a block."},let_declarations_can_only_be_declared_inside_a_block:{code:1157,category:1,key:"'let' declarations can only be declared inside a block."},Tagged_templates_are_only_available_when_targeting_ECMAScript_6_and_higher:{code:1159,category:1,key:"Tagged templates are only available when targeting ECMAScript 6 and higher."},Unterminated_template_literal:{code:1160,category:1,key:"Unterminated template literal."},Unterminated_regular_expression_literal:{code:1161,category:1,key:"Unterminated regular expression literal."},An_object_member_cannot_be_declared_optional:{code:1162,category:1,key:"An object member cannot be declared optional."},yield_expression_must_be_contained_within_a_generator_declaration:{code:1163,category:1,key:"'yield' expression must be contained_within a generator declaration."},Computed_property_names_are_not_allowed_in_enums:{code:1164,category:1,key:"Computed property names are not allowed in enums."},Computed_property_names_are_not_allowed_in_an_ambient_context:{code:1165,category:1,key:"Computed property names are not allowed in an ambient context."},Computed_property_names_are_not_allowed_in_class_property_declarations:{code:1166,category:1,key:"Computed property names are not allowed in class property declarations."},Computed_property_names_are_only_available_when_targeting_ECMAScript_6_and_higher:{code:1167,category:1,key:"Computed property names are only available when targeting ECMAScript 6 and higher."},Computed_property_names_are_not_allowed_in_method_overloads:{code:1168,category:1,key:"Computed property names are not allowed in method overloads."},Computed_property_names_are_not_allowed_in_interfaces:{code:1169,category:1,key:"Computed property names are not allowed in interfaces."},Computed_property_names_are_not_allowed_in_type_literals:{code:1170,category:1,key:"Computed property names are not allowed in type literals."},A_comma_expression_is_not_allowed_in_a_computed_property_name:{code:1171,category:1,key:"A comma expression is not allowed in a computed property name."},extends_clause_already_seen:{code:1172,category:1,key:"'extends' clause already seen."},extends_clause_must_precede_implements_clause:{code:1173,category:1,key:"'extends' clause must precede 'implements' clause."},Classes_can_only_extend_a_single_class:{code:1174,category:1,key:"Classes can only extend a single class."},implements_clause_already_seen:{code:1175,category:1,key:"'implements' clause already seen."},Interface_declaration_cannot_have_implements_clause:{code:1176,category:1,key:"Interface declaration cannot have 'implements' clause."},Binary_digit_expected:{code:1177,category:1,key:"Binary digit expected."},Octal_digit_expected:{code:1178,category:1,key:"Octal digit expected."},Unexpected_token_expected:{code:1179,category:1,key:"Unexpected token. '{' expected."},Duplicate_identifier_0:{code:2300,category:1,key:"Duplicate identifier '{0}'."},Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:{code:2301,category:1,key:"Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."},Static_members_cannot_reference_class_type_parameters:{code:2302,category:1,key:"Static members cannot reference class type parameters."},Circular_definition_of_import_alias_0:{code:2303,category:1,key:"Circular definition of import alias '{0}'."},Cannot_find_name_0:{code:2304,category:1,key:"Cannot find name '{0}'."},Module_0_has_no_exported_member_1:{code:2305,category:1,key:"Module '{0}' has no exported member '{1}'."},File_0_is_not_an_external_module:{code:2306,category:1,key:"File '{0}' is not an external module."},Cannot_find_external_module_0:{code:2307,category:1,key:"Cannot find external module '{0}'."},A_module_cannot_have_more_than_one_export_assignment:{code:2308,category:1,key:"A module cannot have more than one export assignment."},An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements:{code:2309,category:1,key:"An export assignment cannot be used in a module with other exported elements."},Type_0_recursively_references_itself_as_a_base_type:{code:2310,category:1,key:"Type '{0}' recursively references itself as a base type."},A_class_may_only_extend_another_class:{code:2311,category:1,key:"A class may only extend another class."},An_interface_may_only_extend_a_class_or_another_interface:{code:2312,category:1,key:"An interface may only extend a class or another interface."},Constraint_of_a_type_parameter_cannot_reference_any_type_parameter_from_the_same_type_parameter_list:{code:2313,category:1,key:"Constraint of a type parameter cannot reference any type parameter from the same type parameter list."},Generic_type_0_requires_1_type_argument_s:{code:2314,category:1,key:"Generic type '{0}' requires {1} type argument(s)."},Type_0_is_not_generic:{code:2315,category:1,key:"Type '{0}' is not generic."},Global_type_0_must_be_a_class_or_interface_type:{code:2316,category:1,key:"Global type '{0}' must be a class or interface type."},Global_type_0_must_have_1_type_parameter_s:{code:2317,category:1,key:"Global type '{0}' must have {1} type parameter(s)."},Cannot_find_global_type_0:{code:2318,category:1,key:"Cannot find global type '{0}'."},Named_properties_0_of_types_1_and_2_are_not_identical:{code:2319,category:1,key:"Named properties '{0}' of types '{1}' and '{2}' are not identical."},Interface_0_cannot_simultaneously_extend_types_1_and_2:{code:2320,category:1,key:"Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."},Excessive_stack_depth_comparing_types_0_and_1:{code:2321,category:1,key:"Excessive stack depth comparing types '{0}' and '{1}'."},Type_0_is_not_assignable_to_type_1:{code:2322,category:1,key:"Type '{0}' is not assignable to type '{1}'."},Property_0_is_missing_in_type_1:{code:2324,category:1,key:"Property '{0}' is missing in type '{1}'."},Property_0_is_private_in_type_1_but_not_in_type_2:{code:2325,category:1,key:"Property '{0}' is private in type '{1}' but not in type '{2}'."},Types_of_property_0_are_incompatible:{code:2326,category:1,key:"Types of property '{0}' are incompatible."},Property_0_is_optional_in_type_1_but_required_in_type_2:{code:2327,category:1,key:"Property '{0}' is optional in type '{1}' but required in type '{2}'."},Types_of_parameters_0_and_1_are_incompatible:{code:2328,category:1,key:"Types of parameters '{0}' and '{1}' are incompatible."},Index_signature_is_missing_in_type_0:{code:2329,category:1,key:"Index signature is missing in type '{0}'."},Index_signatures_are_incompatible:{code:2330,category:1,key:"Index signatures are incompatible."},this_cannot_be_referenced_in_a_module_body:{code:2331,category:1,key:"'this' cannot be referenced in a module body."},this_cannot_be_referenced_in_current_location:{code:2332,category:1,key:"'this' cannot be referenced in current location."},this_cannot_be_referenced_in_constructor_arguments:{code:2333,category:1,key:"'this' cannot be referenced in constructor arguments."},this_cannot_be_referenced_in_a_static_property_initializer:{code:2334,category:1,key:"'this' cannot be referenced in a static property initializer."},super_can_only_be_referenced_in_a_derived_class:{code:2335,category:1,key:"'super' can only be referenced in a derived class."},super_cannot_be_referenced_in_constructor_arguments:{code:2336,category:1,key:"'super' cannot be referenced in constructor arguments."},Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors:{code:2337,category:1,key:"Super calls are not permitted outside constructors or in nested functions inside constructors"},super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class:{code:2338,category:1,key:"'super' property access is permitted only in a constructor, member function, or member accessor of a derived class"},Property_0_does_not_exist_on_type_1:{code:2339,category:1,key:"Property '{0}' does not exist on type '{1}'."},Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword:{code:2340,category:1,key:"Only public and protected methods of the base class are accessible via the 'super' keyword"},Property_0_is_private_and_only_accessible_within_class_1:{code:2341,category:1,key:"Property '{0}' is private and only accessible within class '{1}'."},An_index_expression_argument_must_be_of_type_string_number_or_any:{code:2342,category:1,key:"An index expression argument must be of type 'string', 'number', or 'any'."},Type_0_does_not_satisfy_the_constraint_1:{code:2344,category:1,key:"Type '{0}' does not satisfy the constraint '{1}'."},Argument_of_type_0_is_not_assignable_to_parameter_of_type_1:{code:2345,category:1,key:"Argument of type '{0}' is not assignable to parameter of type '{1}'."},Supplied_parameters_do_not_match_any_signature_of_call_target:{code:2346,category:1,key:"Supplied parameters do not match any signature of call target."},Untyped_function_calls_may_not_accept_type_arguments:{code:2347,category:1,key:"Untyped function calls may not accept type arguments."},Value_of_type_0_is_not_callable_Did_you_mean_to_include_new:{code:2348,category:1,key:"Value of type '{0}' is not callable. Did you mean to include 'new'?"},Cannot_invoke_an_expression_whose_type_lacks_a_call_signature:{code:2349,category:1,key:"Cannot invoke an expression whose type lacks a call signature."},Only_a_void_function_can_be_called_with_the_new_keyword:{code:2350,category:1,key:"Only a void function can be called with the 'new' keyword."},Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature:{code:2351,category:1,key:"Cannot use 'new' with an expression whose type lacks a call or construct signature."},Neither_type_0_nor_type_1_is_assignable_to_the_other:{code:2352,category:1,key:"Neither type '{0}' nor type '{1}' is assignable to the other."},No_best_common_type_exists_among_return_expressions:{code:2354,category:1,key:"No best common type exists among return expressions."},A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_or_consist_of_a_single_throw_statement:{code:2355,category:1,key:"A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement."},An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type:{code:2356,category:1,key:"An arithmetic operand must be of type 'any', 'number' or an enum type."},The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer:{code:2357,category:1,key:"The operand of an increment or decrement operator must be a variable, property or indexer."},The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter:{code:2358,category:1,key:"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_of_a_type_assignable_to_the_Function_interface_type:{code:2359,category:1,key:"The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type."},The_left_hand_side_of_an_in_expression_must_be_of_types_any_string_or_number:{code:2360,category:1,key:"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:{code:2361,category:1,key:"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_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type:{code:2362,category:1,key:"The left-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:{code:2363,category:1,key:"The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type."},Invalid_left_hand_side_of_assignment_expression:{code:2364,category:1,key:"Invalid left-hand side of assignment expression."},Operator_0_cannot_be_applied_to_types_1_and_2:{code:2365,category:1,key:"Operator '{0}' cannot be applied to types '{1}' and '{2}'."},Type_parameter_name_cannot_be_0:{code:2368,category:1,key:"Type parameter name cannot be '{0}'"},A_parameter_property_is_only_allowed_in_a_constructor_implementation:{code:2369,category:1,key:"A parameter property is only allowed in a constructor implementation."},A_rest_parameter_must_be_of_an_array_type:{code:2370,category:1,key:"A rest parameter must be of an array type."},A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation:{code:2371,category:1,key:"A parameter initializer is only allowed in a function or constructor implementation."},Parameter_0_cannot_be_referenced_in_its_initializer:{code:2372,category:1,key:"Parameter '{0}' cannot be referenced in its initializer."},Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it:{code:2373,category:1,key:"Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it."},Duplicate_string_index_signature:{code:2374,category:1,key:"Duplicate string index signature."},Duplicate_number_index_signature:{code:2375,category:1,key:"Duplicate number index signature."},A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties:{code:2376,category:1,key:"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:{code:2377,category:1,key:"Constructors for derived classes must contain a 'super' call."},A_get_accessor_must_return_a_value_or_consist_of_a_single_throw_statement:{code:2378,category:1,key:"A 'get' accessor must return a value or consist of a single 'throw' statement."},Getter_and_setter_accessors_do_not_agree_in_visibility:{code:2379,category:1,key:"Getter and setter accessors do not agree in visibility."},get_and_set_accessor_must_have_the_same_type:{code:2380,category:1,key:"'get' and 'set' accessor must have the same type."},A_signature_with_an_implementation_cannot_use_a_string_literal_type:{code:2381,category:1,key:"A signature with an implementation cannot use a string literal type."},Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature:{code:2382,category:1,key:"Specialized overload signature is not assignable to any non-specialized signature."},Overload_signatures_must_all_be_exported_or_not_exported:{code:2383,category:1,key:"Overload signatures must all be exported or not exported."},Overload_signatures_must_all_be_ambient_or_non_ambient:{code:2384,category:1,key:"Overload signatures must all be ambient or non-ambient."},Overload_signatures_must_all_be_public_private_or_protected:{code:2385,category:1,key:"Overload signatures must all be public, private or protected."},Overload_signatures_must_all_be_optional_or_required:{code:2386,category:1,key:"Overload signatures must all be optional or required."},Function_overload_must_be_static:{code:2387,category:1,key:"Function overload must be static."},Function_overload_must_not_be_static:{code:2388,category:1,key:"Function overload must not be static."},Function_implementation_name_must_be_0:{code:2389,category:1,key:"Function implementation name must be '{0}'."},Constructor_implementation_is_missing:{code:2390,category:1,key:"Constructor implementation is missing."},Function_implementation_is_missing_or_not_immediately_following_the_declaration:{code:2391,category:1,key:"Function implementation is missing or not immediately following the declaration."},Multiple_constructor_implementations_are_not_allowed:{code:2392,category:1,key:"Multiple constructor implementations are not allowed."},Duplicate_function_implementation:{code:2393,category:1,key:"Duplicate function implementation."},Overload_signature_is_not_compatible_with_function_implementation:{code:2394,category:1,key:"Overload signature is not compatible with function implementation."},Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local:{code:2395,category:1,key:"Individual declarations in merged declaration {0} must be all exported or all local."},Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters:{code:2396,category:1,key:"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."},Duplicate_identifier_i_Compiler_uses_i_to_initialize_rest_parameter:{code:2397,category:1,key:"Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter."},Expression_resolves_to_variable_declaration_i_that_compiler_uses_to_initialize_rest_parameter:{code:2398,category:1,key:"Expression resolves to variable declaration '_i' that compiler uses to initialize rest parameter."},Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference:{code:2399,category:1,key:"Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."},Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference:{code:2400,category:1,key:"Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."},Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference:{code:2401,category:1,key:"Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference."},Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference:{code:2402,category:1,key:"Expression resolves to '_super' that compiler uses to capture base class reference."},Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2:{code:2403,category:1,key:"Subsequent variable declarations must have the same type.  Variable '{0}' must be of type '{1}', but here has type '{2}'."},The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:{code:2404,category:1,key:"The left-hand side of a 'for...in' statement cannot use a type annotation."},The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any:{code:2405,category:1,key:"The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."},Invalid_left_hand_side_in_for_in_statement:{code:2406,category:1,key:"Invalid left-hand side in 'for...in' statement."},The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter:{code:2407,category:1,key:"The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter."},Setters_cannot_return_a_value:{code:2408,category:1,key:"Setters cannot return a value."},Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class:{code:2409,category:1,key:"Return type of constructor signature must be assignable to the instance type of the class"},All_symbols_within_a_with_block_will_be_resolved_to_any:{code:2410,category:1,key:"All symbols within a 'with' block will be resolved to 'any'."},Property_0_of_type_1_is_not_assignable_to_string_index_type_2:{code:2411,category:1,key:"Property '{0}' of type '{1}' is not assignable to string index type '{2}'."},Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2:{code:2412,category:1,key:"Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'."},Numeric_index_type_0_is_not_assignable_to_string_index_type_1:{code:2413,category:1,key:"Numeric index type '{0}' is not assignable to string index type '{1}'."},Class_name_cannot_be_0:{code:2414,category:1,key:"Class name cannot be '{0}'"},Class_0_incorrectly_extends_base_class_1:{code:2415,category:1,key:"Class '{0}' incorrectly extends base class '{1}'."},Class_static_side_0_incorrectly_extends_base_class_static_side_1:{code:2417,category:1,key:"Class static side '{0}' incorrectly extends base class static side '{1}'."},Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0:{code:2419,category:1,key:"Type name '{0}' in extends clause does not reference constructor function for '{0}'."},Class_0_incorrectly_implements_interface_1:{code:2420,category:1,key:"Class '{0}' incorrectly implements interface '{1}'."},A_class_may_only_implement_another_class_or_interface:{code:2422,category:1,key:"A class may only implement another class or interface."},Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor:{code:2423,category:1,key:"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:{code:2424,category:1,key:"Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property."},Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function:{code:2425,category:1,key:"Class '{0}' defines instance member property '{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:{code:2426,category:1,key:"Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."},Interface_name_cannot_be_0:{code:2427,category:1,key:"Interface name cannot be '{0}'"},All_declarations_of_an_interface_must_have_identical_type_parameters:{code:2428,category:1,key:"All declarations of an interface must have identical type parameters."},Interface_0_incorrectly_extends_interface_1:{code:2430,category:1,key:"Interface '{0}' incorrectly extends interface '{1}'."},Enum_name_cannot_be_0:{code:2431,category:1,key:"Enum name cannot be '{0}'"},In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element:{code:2432,category:1,key:"In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."},A_module_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged:{code:2433,category:1,key:"A module declaration cannot be in a different file from a class or function with which it is merged"},A_module_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged:{code:2434,category:1,key:"A module declaration cannot be located prior to a class or function with which it is merged"},Ambient_external_modules_cannot_be_nested_in_other_modules:{code:2435,category:1,key:"Ambient external modules cannot be nested in other modules."},Ambient_external_module_declaration_cannot_specify_relative_module_name:{code:2436,category:1,key:"Ambient external module declaration cannot specify relative module name."},Module_0_is_hidden_by_a_local_declaration_with_the_same_name:{code:2437,category:1,key:"Module '{0}' is hidden by a local declaration with the same name"},Import_name_cannot_be_0:{code:2438,category:1,key:"Import name cannot be '{0}'"},Import_declaration_in_an_ambient_external_module_declaration_cannot_reference_external_module_through_relative_external_module_name:{code:2439,category:1,key:"Import declaration in an ambient external module declaration cannot reference external module through relative external module name."},Import_declaration_conflicts_with_local_declaration_of_0:{code:2440,category:1,key:"Import declaration conflicts with local declaration of '{0}'"},Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module:{code:2441,category:1,key:"Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of an external module."},Types_have_separate_declarations_of_a_private_property_0:{code:2442,category:1,key:"Types have separate declarations of a private property '{0}'."},Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2:{code:2443,category:1,key:"Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."},Property_0_is_protected_in_type_1_but_public_in_type_2:{code:2444,category:1,key:"Property '{0}' is protected in type '{1}' but public in type '{2}'."},Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses:{code:2445,category:1,key:"Property '{0}' is protected and only accessible within class '{1}' and its subclasses."},Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1:{code:2446,category:1,key:"Property '{0}' is protected and only accessible through an instance of class '{1}'."},The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead:{code:2447,category:1,key:"The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."},Block_scoped_variable_0_used_before_its_declaration:{code:2448,category:1,key:"Block-scoped variable '{0}' used before its declaration.",isEarly:!0},The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant:{code:2449,category:1,key:"The operand of an increment or decrement operator cannot be a constant.",isEarly:!0},Left_hand_side_of_assignment_expression_cannot_be_a_constant:{code:2450,category:1,key:"Left-hand side of assignment expression cannot be a constant.",isEarly:!0},Cannot_redeclare_block_scoped_variable_0:{code:2451,category:1,key:"Cannot redeclare block-scoped variable '{0}'.",isEarly:!0},An_enum_member_cannot_have_a_numeric_name:{code:2452,category:1,key:"An enum member cannot have a numeric name."},The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly:{code:2453,category:1,key:"The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly."},Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0:{code:2455,category:1,key:"Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'."},Type_alias_0_circularly_references_itself:{code:2456,category:1,key:"Type alias '{0}' circularly references itself."},Type_alias_name_cannot_be_0:{code:2457,category:1,key:"Type alias name cannot be '{0}'"},An_AMD_module_cannot_have_multiple_name_assignments:{code:2458,category:1,key:"An AMD module cannot have multiple name assignments."},Import_declaration_0_is_using_private_name_1:{code:4e3,category:1,key:"Import declaration '{0}' is using private name '{1}'."},Type_parameter_0_of_exported_class_has_or_is_using_private_name_1:{code:4002,category:1,key:"Type parameter '{0}' of exported class has or is using private name '{1}'."},Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1:{code:4004,category:1,key:"Type parameter '{0}' of exported interface has or is using private name '{1}'."},Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:{code:4006,category:1,key:"Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."},Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:{code:4008,category:1,key:"Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."},Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:{code:4010,category:1,key:"Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."},Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:{code:4012,category:1,key:"Type parameter '{0}' of public method from exported class has or is using private name '{1}'."},Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:{code:4014,category:1,key:"Type parameter '{0}' of method from exported interface has or is using private name '{1}'."},Type_parameter_0_of_exported_function_has_or_is_using_private_name_1:{code:4016,category:1,key:"Type parameter '{0}' of exported function has or is using private name '{1}'."},Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:{code:4019,category:1,key:"Implements clause of exported class '{0}' has or is using private name '{1}'."},Extends_clause_of_exported_class_0_has_or_is_using_private_name_1:{code:4020,category:1,key:"Extends clause of exported class '{0}' has or is using private name '{1}'."},Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1:{code:4022,category:1,key:"Extends clause of exported interface '{0}' has or is using private name '{1}'."},Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:{code:4023,category:1,key:"Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."},Exported_variable_0_has_or_is_using_name_1_from_private_module_2:{code:4024,category:1,key:"Exported variable '{0}' has or is using name '{1}' from private module '{2}'."},Exported_variable_0_has_or_is_using_private_name_1:{code:4025,category:1,key:"Exported variable '{0}' has or is using private name '{1}'."},Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:{code:4026,category:1,key:"Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."},Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:{code:4027,category:1,key:"Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."},Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:{code:4028,category:1,key:"Public static property '{0}' of exported class has or is using private name '{1}'."},Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:{code:4029,category:1,key:"Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."},Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:{code:4030,category:1,key:"Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."},Public_property_0_of_exported_class_has_or_is_using_private_name_1:{code:4031,category:1,key:"Public property '{0}' of exported class has or is using private name '{1}'."},Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:{code:4032,category:1,key:"Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."},Property_0_of_exported_interface_has_or_is_using_private_name_1:{code:4033,category:1,key:"Property '{0}' of exported interface has or is using private name '{1}'."},Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2:{code:4034,category:1,key:"Parameter '{0}' of public static property setter from exported class has or is using name '{1}' from private module '{2}'."},Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1:{code:4035,category:1,key:"Parameter '{0}' of public static property setter from exported class has or is using private name '{1}'."},Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2:{code:4036,category:1,key:"Parameter '{0}' of public property setter from exported class has or is using name '{1}' from private module '{2}'."},Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1:{code:4037,category:1,key:"Parameter '{0}' of public property setter from exported class has or is using private name '{1}'."},Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:{code:4038,category:1,key:"Return type of public static property getter from exported class has or is using name '{0}' from external module {1} but cannot be named."},Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1:{code:4039,category:1,key:"Return type of public static property getter from exported class has or is using name '{0}' from private module '{1}'."},Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0:{code:4040,category:1,key:"Return type of public static property getter from exported class has or is using private name '{0}'."},Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:{code:4041,category:1,key:"Return type of public property getter from exported class has or is using name '{0}' from external module {1} but cannot be named."},Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1:{code:4042,category:1,key:"Return type of public property getter from exported class has or is using name '{0}' from private module '{1}'."},Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0:{code:4043,category:1,key:"Return type of public property getter from exported class has or is using private name '{0}'."},Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:{code:4044,category:1,key:"Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."},Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0:{code:4045,category:1,key:"Return type of constructor signature from exported interface has or is using private name '{0}'."},Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:{code:4046,category:1,key:"Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."},Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0:{code:4047,category:1,key:"Return type of call signature from exported interface has or is using private name '{0}'."},Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:{code:4048,category:1,key:"Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."},Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0:{code:4049,category:1,key:"Return type of index signature from exported interface has or is using private name '{0}'."},Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:{code:4050,category:1,key:"Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."},Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:{code:4051,category:1,key:"Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."},Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:{code:4052,category:1,key:"Return type of public static method from exported class has or is using private name '{0}'."},Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:{code:4053,category:1,key:"Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."},Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:{code:4054,category:1,key:"Return type of public method from exported class has or is using name '{0}' from private module '{1}'."},Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:{code:4055,category:1,key:"Return type of public method from exported class has or is using private name '{0}'."},Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:{code:4056,category:1,key:"Return type of method from exported interface has or is using name '{0}' from private module '{1}'."},Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0:{code:4057,category:1,key:"Return type of method from exported interface has or is using private name '{0}'."},Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:{code:4058,category:1,key:"Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."},Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:{code:4059,category:1,key:"Return type of exported function has or is using name '{0}' from private module '{1}'."},Return_type_of_exported_function_has_or_is_using_private_name_0:{code:4060,category:1,key:"Return type of exported function has or is using private name '{0}'."},Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:{code:4061,category:1,key:"Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."},Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:{code:4062,category:1,key:"Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."},Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1:{code:4063,category:1,key:"Parameter '{0}' of constructor from exported class has or is using private name '{1}'."},Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:{code:4064,category:1,key:"Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."},Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:{code:4065,category:1,key:"Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."},Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:{code:4066,category:1,key:"Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."},Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:{code:4067,category:1,key:"Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."},Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:{code:4068,category:1,key:"Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."},Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:{code:4069,category:1,key:"Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."},Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:{code:4070,category:1,key:"Parameter '{0}' of public static method from exported class has or is using private name '{1}'."},Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:{code:4071,category:1,key:"Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."},Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:{code:4072,category:1,key:"Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."},Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:{code:4073,category:1,key:"Parameter '{0}' of public method from exported class has or is using private name '{1}'."},Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:{code:4074,category:1,key:"Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."},Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:{code:4075,category:1,key:"Parameter '{0}' of method from exported interface has or is using private name '{1}'."},Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:{code:4076,category:1,key:"Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."},Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:{code:4077,category:1,key:"Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."},Parameter_0_of_exported_function_has_or_is_using_private_name_1:{code:4078,category:1,key:"Parameter '{0}' of exported function has or is using private name '{1}'."},Exported_type_alias_0_has_or_is_using_private_name_1:{code:4081,category:1,key:"Exported type alias '{0}' has or is using private name '{1}'."},Enum_declarations_must_all_be_const_or_non_const:{code:4082,category:1,key:"Enum declarations must all be const or non-const."},In_const_enum_declarations_member_initializer_must_be_constant_expression:{code:4083,category:1,key:"In 'const' enum declarations member initializer must be constant expression.",isEarly:!0},const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment:{code:4084,category:1,key:"'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment."},Index_expression_arguments_in_const_enums_must_be_of_type_string:{code:4085,category:1,key:"Index expression arguments in 'const' enums must be of type 'string'."},const_enum_member_initializer_was_evaluated_to_a_non_finite_value:{code:4086,category:1,key:"'const' enum member initializer was evaluated to a non-finite value."},const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN:{code:4087,category:1,key:"'const' enum member initializer was evaluated to disallowed value 'NaN'."},The_current_host_does_not_support_the_0_option:{code:5001,category:1,key:"The current host does not support the '{0}' option."},Cannot_find_the_common_subdirectory_path_for_the_input_files:{code:5009,category:1,key:"Cannot find the common subdirectory path for the input files."},Cannot_read_file_0_Colon_1:{code:5012,category:1,key:"Cannot read file '{0}': {1}"},Unsupported_file_encoding:{code:5013,category:1,key:"Unsupported file encoding."},Unknown_compiler_option_0:{code:5023,category:1,key:"Unknown compiler option '{0}'."},Could_not_write_file_0_Colon_1:{code:5033,category:1,key:"Could not write file '{0}': {1}"},Option_mapRoot_cannot_be_specified_without_specifying_sourcemap_option:{code:5038,category:1,key:"Option mapRoot cannot be specified without specifying sourcemap option."},Option_sourceRoot_cannot_be_specified_without_specifying_sourcemap_option:{code:5039,category:1,key:"Option sourceRoot cannot be specified without specifying sourcemap option."},Concatenate_and_emit_output_to_single_file:{code:6001,category:2,key:"Concatenate and emit output to single file."},Generates_corresponding_d_ts_file:{code:6002,category:2,key:"Generates corresponding '.d.ts' file."},Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations:{code:6003,category:2,key:"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:{code:6004,category:2,key:"Specifies the location where debugger should locate TypeScript files instead of source locations."},Watch_input_files:{code:6005,category:2,key:"Watch input files."},Redirect_output_structure_to_the_directory:{code:6006,category:2,key:"Redirect output structure to the directory."},Do_not_erase_const_enum_declarations_in_generated_code:{code:6007,category:2,key:"Do not erase const enum declarations in generated code."},Do_not_emit_outputs_if_any_type_checking_errors_were_reported:{code:6008,category:2,key:"Do not emit outputs if any type checking errors were reported."},Do_not_emit_comments_to_output:{code:6009,category:2,key:"Do not emit comments to output."},Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES6_experimental:{code:6015,category:2,key:"Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES6' (experimental)"},Specify_module_code_generation_Colon_commonjs_or_amd:{code:6016,category:2,key:"Specify module code generation: 'commonjs' or 'amd'"},Print_this_message:{code:6017,category:2,key:"Print this message."},Print_the_compiler_s_version:{code:6019,category:2,key:"Print the compiler's version."},Syntax_Colon_0:{code:6023,category:2,key:"Syntax: {0}"},options:{code:6024,category:2,key:"options"},file:{code:6025,category:2,key:"file"},Examples_Colon_0:{code:6026,category:2,key:"Examples: {0}"},Options_Colon:{code:6027,category:2,key:"Options:"},Version_0:{code:6029,category:2,key:"Version {0}"},Insert_command_line_options_and_files_from_a_file:{code:6030,category:2,key:"Insert command line options and files from a file."},File_change_detected_Compiling:{code:6032,category:2,key:"File change detected. Compiling..."},KIND:{code:6034,category:2,key:"KIND"},FILE:{code:6035,category:2,key:"FILE"},VERSION:{code:6036,category:2,key:"VERSION"},LOCATION:{code:6037,category:2,key:"LOCATION"},DIRECTORY:{code:6038,category:2,key:"DIRECTORY"},Compilation_complete_Watching_for_file_changes:{code:6042,category:2,key:"Compilation complete. Watching for file changes."},Generates_corresponding_map_file:{code:6043,category:2,key:"Generates corresponding '.map' file."},Compiler_option_0_expects_an_argument:{code:6044,category:1,key:"Compiler option '{0}' expects an argument."},Unterminated_quoted_string_in_response_file_0:{code:6045,category:1,key:"Unterminated quoted string in response file '{0}'."},Argument_for_module_option_must_be_commonjs_or_amd:{code:6046,category:1,key:"Argument for '--module' option must be 'commonjs' or 'amd'."},Argument_for_target_option_must_be_es3_es5_or_es6:{code:6047,category:1,key:"Argument for '--target' option must be 'es3', 'es5', or 'es6'."},Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1:{code:6048,category:1,key:"Locale must be of the form <language> or <language>-<territory>. For example '{0}' or '{1}'."},Unsupported_locale_0:{code:6049,category:1,key:"Unsupported locale '{0}'."},Unable_to_open_file_0:{code:6050,category:1,key:"Unable to open file '{0}'."},Corrupted_locale_file_0:{code:6051,category:1,key:"Corrupted locale file {0}."},Warn_on_expressions_and_declarations_with_an_implied_any_type:{code:6052,category:2,key:"Warn on expressions and declarations with an implied 'any' type."},File_0_not_found:{code:6053,category:1,key:"File '{0}' not found."},File_0_must_have_extension_ts_or_d_ts:{code:6054,category:1,key:"File '{0}' must have extension '.ts' or '.d.ts'."},Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures:{code:6055,category:2,key:"Suppress noImplicitAny errors for indexing objects lacking index signatures."},Variable_0_implicitly_has_an_1_type:{code:7005,category:1,key:"Variable '{0}' implicitly has an '{1}' type."},Parameter_0_implicitly_has_an_1_type:{code:7006,category:1,key:"Parameter '{0}' implicitly has an '{1}' type."},Member_0_implicitly_has_an_1_type:{code:7008,category:1,key:"Member '{0}' implicitly has an '{1}' type."},new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type:{code:7009,category:1,key:"'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."},_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:{code:7010,category:1,key:"'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."},Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:{code:7011,category:1,key:"Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."},Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:{code:7013,category:1,key:"Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."},Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation:{code:7016,category:1,key:"Property '{0}' implicitly has type 'any', because its 'set' accessor lacks a type annotation."},Index_signature_of_object_type_implicitly_has_an_any_type:{code:7017,category:1,key:"Index signature of object type implicitly has an 'any' type."},Object_literal_s_property_0_implicitly_has_an_1_type:{code:7018,category:1,key:"Object literal's property '{0}' implicitly has an '{1}' type."},Rest_parameter_0_implicitly_has_an_any_type:{code:7019,category:1,key:"Rest parameter '{0}' implicitly has an 'any[]' type."},Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:{code:7020,category:1,key:"Call signature, which lacks return-type annotation, implicitly has an 'any' return type."},_0_implicitly_has_type_any_because_it_is_referenced_directly_or_indirectly_in_its_own_type_annotation:{code:7021,category:1,key:"'{0}' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation."},_0_implicitly_has_type_any_because_it_is_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer:{code:7022,category:1,key:"'{0}' implicitly has type 'any' because it is does not have a type annotation and is referenced directly or indirectly in its own initializer."},_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:{code:7023,category:1,key:"'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."},Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:{code:7024,category:1,key:"Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."},You_cannot_rename_this_element:{code:8e3,category:1,key:"You cannot rename this element."},yield_expressions_are_not_currently_supported:{code:9e3,category:1,key:"'yield' expressions are not currently supported."},Generators_are_not_currently_supported:{code:9001,category:1,key:"Generators are not currently supported."},Computed_property_names_are_not_currently_supported:{code:9002,category:1,key:"Computed property names are not currently supported."}}
}(ts||(ts={}));var ts;!function(e){function t(e,t){if(e<t[0])return!1;for(var n,r=0,i=t.length;i>r+1;){if(n=r+(i-r)/2,n-=n%2,t[n]<=e&&e<=t[n+1])return!0;e<t[n]?i=n:r=n+2}return!1}function n(e,n){return 0===n?t(e,E):t(e,C)}function r(e,n){return 0===n?t(e,S):t(e,k)}function i(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function o(e){return x[e]}function s(e){for(var t=new Array,n=0,r=0;n<e.length;){var i=e.charCodeAt(n++);switch(i){case 13:10===e.charCodeAt(n)&&n++;case 10:t.push(r),r=n;break;default:i>127&&p(i)&&(t.push(r),r=n)}}return t.push(r),t}function a(t,n,r){return e.Debug.assert(n>0),t[n-1]+r-1}function c(t,n){var r=e.binarySearch(t,n);return 0>r&&(r=~r-1),{line:r+1,character:n-t[r]+1}}function l(e,t){var n=s(e);return c(n,t)}function u(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&8203>=e||8239===e||8287===e||12288===e||65279===e}function p(e){return 10===e||13===e||8232===e||8233===e||133===e}function d(e){return e>=48&&57>=e}function h(e){return e>=48&&55>=e}function m(e,t,n){for(;;){var r=e.charCodeAt(t);switch(r){case 13:10===e.charCodeAt(t+1)&&t++;case 10:if(t++,n)return t;continue;case 9:case 11:case 12:case 32:t++;continue;case 47:if(47===e.charCodeAt(t+1)){for(t+=2;t<e.length&&!p(e.charCodeAt(t));)t++;continue}if(42===e.charCodeAt(t+1)){for(t+=2;t<e.length;){if(42===e.charCodeAt(t)&&47===e.charCodeAt(t+1)){t+=2;break}t++}continue}break;default:if(r>127&&(u(r)||p(r))){t++;continue}}return t}}function f(e,t,n){for(var r,i=n||0===t;;){var o=e.charCodeAt(t);switch(o){case 13:10===e.charCodeAt(t+1)&&t++;case 10:if(t++,n)return r;i=!0,r&&r.length&&(r[r.length-1].hasTrailingNewLine=!0);continue;case 9:case 11:case 12:case 32:t++;continue;case 47:var s=e.charCodeAt(t+1),a=!1;if(47===s||42===s){var c=t;if(t+=2,47===s)for(;t<e.length;){if(p(e.charCodeAt(t))){a=!0;break}t++}else for(;t<e.length;){if(42===e.charCodeAt(t)&&47===e.charCodeAt(t+1)){t+=2;break}t++}i&&(r||(r=[]),r.push({pos:c,end:t,hasTrailingNewLine:a}));continue}break;default:if(o>127&&(u(o)||p(o))){r&&r.length&&p(o)&&(r[r.length-1].hasTrailingNewLine=!0),t++;continue}}return r}}function g(e,t){return f(e,t,!1)}function v(e,t){return f(e,t,!0)}function y(e,t){return e>=65&&90>=e||e>=97&&122>=e||36===e||95===e||e>127&&n(e,t)}function _(e,t){return e>=65&&90>=e||e>=97&&122>=e||e>=48&&57>=e||36===e||95===e||e>127&&r(e,t)}function b(t,i,o,s){function a(e){s&&s(e)}function c(e){return e>=65&&90>=e||e>=97&&122>=e||36===e||95===e||e>127&&n(e,t)}function l(e){return e>=65&&90>=e||e>=97&&122>=e||e>=48&&57>=e||36===e||95===e||e>127&&r(e,t)}function m(){for(var t=R;d(o.charCodeAt(R));)R++;if(46===o.charCodeAt(R))for(R++;d(o.charCodeAt(R));)R++;var n=R;if(69===o.charCodeAt(R)||101===o.charCodeAt(R))if(R++,(43===o.charCodeAt(R)||45===o.charCodeAt(R))&&R++,d(o.charCodeAt(R))){for(R++;d(o.charCodeAt(R));)R++;n=R}else a(e.Diagnostics.Digit_expected);return+o.substring(t,n)}function f(){for(var e=R;h(o.charCodeAt(R));)R++;return+o.substring(e,R)}function g(e,t){for(var n=0,r=0;e>n||!t;){var i=o.charCodeAt(R);if(i>=48&&57>=i)r=16*r+i-48;else if(i>=65&&70>=i)r=16*r+i-65+10;else{if(!(i>=97&&102>=i))break;r=16*r+i-97+10}R++,n++}return e>n&&(r=-1),r}function v(){for(var t=o.charCodeAt(R++),n="",r=R;;){if(R>=D){n+=o.substring(r,R),G=!0,a(e.Diagnostics.Unterminated_string_literal);break}var i=o.charCodeAt(R);if(i===t){n+=o.substring(r,R),R++;break}if(92!==i){if(p(i)){n+=o.substring(r,R),G=!0,a(e.Diagnostics.Unterminated_string_literal);break}R++}else n+=o.substring(r,R),n+=_(),r=R}return n}function y(){var t=96===o.charCodeAt(R);R++;for(var n,r=R,i="";;){if(R>=D){i+=o.substring(r,R),G=!0,a(e.Diagnostics.Unterminated_template_literal),n=t?9:12;break}var s=o.charCodeAt(R);if(96===s){i+=o.substring(r,R),R++,n=t?9:12;break}if(36===s&&D>R+1&&123===o.charCodeAt(R+1)){i+=o.substring(r,R),R+=2,n=t?10:11;break}92!==s?13!==s?R++:(i+=o.substring(r,R),D>R+1&&10===o.charCodeAt(R+1)&&R++,R++,i+="\n",r=R):(i+=o.substring(r,R),i+=_(),r=R)}return e.Debug.assert(void 0!==n),B=i,n}function _(){if(R++,R>=D)return a(e.Diagnostics.Unexpected_end_of_text),"";var t=o.charCodeAt(R++);switch(t){case 48:return"\x00";case 98:return"\b";case 116:return"	";case 110:return"\n";case 118:return"";case 102:return"\f";case 114:return"\r";case 39:return"'";case 34:return'"';case 120:case 117:var t=g(120===t?2:4,!0);return t>=0?String.fromCharCode(t):(a(e.Diagnostics.Hexadecimal_digit_expected),"");case 13:D>R&&10===o.charCodeAt(R)&&R++;case 10:case 8232:case 8233:return"";default:return String.fromCharCode(t)}}function b(){if(D>R+5&&117===o.charCodeAt(R+1)){var e=R;R+=2;var t=g(4,!0);return R=e,t}return-1}function E(){for(var e="",t=R;D>R;){var n=o.charCodeAt(R);if(l(n))R++;else{if(92!==n)break;if(n=b(),!(n>=0&&l(n)))break;e+=o.substring(t,R),e+=String.fromCharCode(n),R+=6,t=R}}return e+=o.substring(t,R)}function S(){var e=B.length;if(e>=2&&11>=e){var t=B.charCodeAt(0);if(t>=97&&122>=t&&w.call(T,B))return H=T[B]}return H=63}function C(t){e.Debug.assert(2!==t||8!==t,"Expected either base 2 or base 8");for(var n=0,r=0;;){var i=o.charCodeAt(R),s=i-48;if(!d(i)||s>=t)break;n=n*t+s,R++,r++}return 0===r?-1:n}function k(){for(V=R,$=!1,G=!1;;){if(F=R,R>=D)return H=1;var t=o.charCodeAt(R);switch(t){case 10:case 13:if($=!0,i){R++;continue}return 13===t&&D>R+1&&10===o.charCodeAt(R+1)?R+=2:R++,H=4;case 9:case 11:case 12:case 32:if(i){R++;continue}for(;D>R&&u(o.charCodeAt(R));)R++;return H=5;case 33:return 61===o.charCodeAt(R+1)?61===o.charCodeAt(R+2)?(R+=3,H=30):(R+=2,H=28):(R++,H=45);case 34:case 39:return B=v(),H=7;case 96:return H=y();case 37:return 61===o.charCodeAt(R+1)?(R+=2,H=56):(R++,H=36);case 38:return 38===o.charCodeAt(R+1)?(R+=2,H=47):61===o.charCodeAt(R+1)?(R+=2,H=60):(R++,H=42);case 40:return R++,H=15;case 41:return R++,H=16;case 42:return 61===o.charCodeAt(R+1)?(R+=2,H=54):(R++,H=34);case 43:return 43===o.charCodeAt(R+1)?(R+=2,H=37):61===o.charCodeAt(R+1)?(R+=2,H=52):(R++,H=32);case 44:return R++,H=22;case 45:return 45===o.charCodeAt(R+1)?(R+=2,H=38):61===o.charCodeAt(R+1)?(R+=2,H=53):(R++,H=33);case 46:return d(o.charCodeAt(R+1))?(B=""+m(),H=6):46===o.charCodeAt(R+1)&&46===o.charCodeAt(R+2)?(R+=3,H=20):(R++,H=19);case 47:if(47===o.charCodeAt(R+1)){for(R+=2;D>R&&!p(o.charCodeAt(R));)R++;if(i)continue;return H=2}if(42===o.charCodeAt(R+1)){R+=2;for(var n=!1;D>R;){var t=o.charCodeAt(R);if(42===t&&47===o.charCodeAt(R+1)){R+=2,n=!0;break}p(t)&&($=!0),R++}if(n||a(e.Diagnostics.Asterisk_Slash_expected),i)continue;return G=!n,H=3}return 61===o.charCodeAt(R+1)?(R+=2,H=55):(R++,H=35);case 48:if(D>R+2&&(88===o.charCodeAt(R+1)||120===o.charCodeAt(R+1))){R+=2;var r=g(1,!1);return 0>r&&(a(e.Diagnostics.Hexadecimal_digit_expected),r=0),B=""+r,H=6}if(D>R+2&&(66===o.charCodeAt(R+1)||98===o.charCodeAt(R+1))){R+=2;var r=C(2);return 0>r&&(a(e.Diagnostics.Binary_digit_expected),r=0),B=""+r,6}if(D>R+2&&(79===o.charCodeAt(R+1)||111===o.charCodeAt(R+1))){R+=2;var r=C(8);return 0>r&&(a(e.Diagnostics.Octal_digit_expected),r=0),B=""+r,6}if(D>R+1&&h(o.charCodeAt(R+1)))return B=""+f(),H=6;case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return B=""+m(),H=6;case 58:return R++,H=50;case 59:return R++,H=21;case 60:return 60===o.charCodeAt(R+1)?61===o.charCodeAt(R+2)?(R+=3,H=57):(R+=2,H=39):61===o.charCodeAt(R+1)?(R+=2,H=25):(R++,H=23);case 61:return 61===o.charCodeAt(R+1)?61===o.charCodeAt(R+2)?(R+=3,H=29):(R+=2,H=27):62===o.charCodeAt(R+1)?(R+=2,H=31):(R++,H=51);case 62:return R++,H=24;case 63:return R++,H=49;case 91:return R++,H=17;case 93:return R++,H=18;case 94:return 61===o.charCodeAt(R+1)?(R+=2,H=62):(R++,H=44);case 123:return R++,H=13;case 124:return 124===o.charCodeAt(R+1)?(R+=2,H=48):61===o.charCodeAt(R+1)?(R+=2,H=61):(R++,H=43);case 125:return R++,H=14;case 126:return R++,H=46;case 92:var t=b();return t>=0&&c(t)?(R+=6,B=String.fromCharCode(t)+E(),H=S()):(a(e.Diagnostics.Invalid_character),R++,H=0);default:if(c(t)){for(R++;D>R&&l(t=o.charCodeAt(R));)R++;return B=o.substring(F,R),92===t&&(B+=E()),H=S()}if(u(t)){R++;continue}if(p(t)){$=!0,R++;continue}return a(e.Diagnostics.Invalid_character),R++,H=0}}}function x(){if(24===H){if(62===o.charCodeAt(R))return 62===o.charCodeAt(R+1)?61===o.charCodeAt(R+2)?(R+=3,H=59):(R+=2,H=41):61===o.charCodeAt(R+1)?(R+=2,H=58):(R++,H=40);if(61===o.charCodeAt(R))return R++,H=26}return H}function L(){if(35===H||55===H){for(var t=F+1,n=!1,r=!1;;){if(t>=D){G=!0,a(e.Diagnostics.Unterminated_regular_expression_literal);break}var i=o.charCodeAt(t);if(p(i)){G=!0,a(e.Diagnostics.Unterminated_regular_expression_literal);break}if(n)n=!1;else{if(47===i&&!r){t++;break}91===i?r=!0:92===i?n=!0:93===i&&(r=!1)}t++}for(;D>t&&l(o.charCodeAt(t));)t++;R=t,B=o.substring(F,R),H=8}return H}function A(){return e.Debug.assert(14===H,"'reScanTemplateToken' should only be called on a '}'"),R=F,H=y()}function N(e,t){var n=R,r=V,i=F,o=H,s=B,a=$,c=e();return(!c||t)&&(R=n,V=r,F=i,H=o,B=s,$=a),c}function M(e){return N(e,!0)}function P(e){return N(e,!1)}function O(e){o=e||"",D=o.length,I(0)}function I(e){R=e,V=e,F=e,H=0,$=!1}var R,D,V,F,H,B,$,G;return O(o),{getStartPos:function(){return V},getTextPos:function(){return R},getToken:function(){return H},getTokenPos:function(){return F},getTokenText:function(){return o.substring(F,R)},getTokenValue:function(){return B},hasPrecedingLineBreak:function(){return $},isIdentifier:function(){return 63===H||H>99},isReservedWord:function(){return H>=64&&99>=H},isUnterminated:function(){return G},reScanGreaterToken:x,reScanSlashToken:L,reScanTemplateToken:A,scan:k,setText:O,setTextPos:I,tryScan:P,lookAhead:M}}var T={any:109,boolean:110,break:64,case:65,catch:66,class:67,continue:69,const:68,constructor:111,debugger:70,declare:112,default:71,delete:72,do:73,else:74,enum:75,export:76,extends:77,false:78,finally:79,for:80,function:81,get:113,if:82,implements:100,import:83,in:84,instanceof:85,interface:101,let:102,module:114,new:86,null:87,number:116,package:103,private:104,protected:105,public:106,require:115,return:88,set:117,static:107,string:118,super:89,switch:90,this:91,throw:92,true:93,try:94,type:119,typeof:95,var:96,void:97,while:98,with:99,yield:108,"{":13,"}":14,"(":15,")":16,"[":17,"]":18,".":19,"...":20,";":21,",":22,"<":23,">":24,"<=":25,">=":26,"==":27,"!=":28,"===":29,"!==":30,"=>":31,"+":32,"-":33,"*":34,"/":35,"%":36,"++":37,"--":38,"<<":39,">>":40,">>>":41,"&":42,"|":43,"^":44,"!":45,"~":46,"&&":47,"||":48,"?":49,":":50,"=":51,"+=":52,"-=":53,"*=":54,"/=":55,"%=":56,"<<=":57,">>=":58,">>>=":59,"&=":60,"|=":61,"^=":62},E=[170,170,181,181,186,186,192,214,216,246,248,543,546,563,592,685,688,696,699,705,720,721,736,740,750,750,890,890,902,902,904,906,908,908,910,929,931,974,976,983,986,1011,1024,1153,1164,1220,1223,1224,1227,1228,1232,1269,1272,1273,1329,1366,1369,1369,1377,1415,1488,1514,1520,1522,1569,1594,1600,1610,1649,1747,1749,1749,1765,1766,1786,1788,1808,1808,1810,1836,1920,1957,2309,2361,2365,2365,2384,2384,2392,2401,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2699,2701,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2784,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2870,2873,2877,2877,2908,2909,2911,2913,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,2997,2999,3001,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3168,3169,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3294,3294,3296,3297,3333,3340,3342,3344,3346,3368,3370,3385,3424,3425,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3805,3840,3840,3904,3911,3913,3946,3976,3979,4096,4129,4131,4135,4137,4138,4176,4181,4256,4293,4304,4342,4352,4441,4447,4514,4520,4601,4608,4614,4616,4678,4680,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4742,4744,4744,4746,4749,4752,4782,4784,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4814,4816,4822,4824,4846,4848,4878,4880,4880,4882,4885,4888,4894,4896,4934,4936,4954,5024,5108,5121,5740,5743,5750,5761,5786,5792,5866,6016,6067,6176,6263,6272,6312,7680,7835,7840,7929,7936,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8319,8319,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8497,8499,8505,8544,8579,12293,12295,12321,12329,12337,12341,12344,12346,12353,12436,12445,12446,12449,12538,12540,12542,12549,12588,12593,12686,12704,12727,13312,19893,19968,40869,40960,42124,44032,55203,63744,64045,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65138,65140,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],S=[170,170,181,181,186,186,192,214,216,246,248,543,546,563,592,685,688,696,699,705,720,721,736,740,750,750,768,846,864,866,890,890,902,902,904,906,908,908,910,929,931,974,976,983,986,1011,1024,1153,1155,1158,1164,1220,1223,1224,1227,1228,1232,1269,1272,1273,1329,1366,1369,1369,1377,1415,1425,1441,1443,1465,1467,1469,1471,1471,1473,1474,1476,1476,1488,1514,1520,1522,1569,1594,1600,1621,1632,1641,1648,1747,1749,1756,1759,1768,1770,1773,1776,1788,1808,1836,1840,1866,1920,1968,2305,2307,2309,2361,2364,2381,2384,2388,2392,2403,2406,2415,2433,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2492,2494,2500,2503,2504,2507,2509,2519,2519,2524,2525,2527,2531,2534,2545,2562,2562,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2649,2652,2654,2654,2662,2676,2689,2691,2693,2699,2701,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2784,2790,2799,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2870,2873,2876,2883,2887,2888,2891,2893,2902,2903,2908,2909,2911,2913,2918,2927,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,2997,2999,3001,3006,3010,3014,3016,3018,3021,3031,3031,3047,3055,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3134,3140,3142,3144,3146,3149,3157,3158,3168,3169,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3262,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3297,3302,3311,3330,3331,3333,3340,3342,3344,3346,3368,3370,3385,3390,3395,3398,3400,3402,3405,3415,3415,3424,3425,3430,3439,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3769,3771,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3805,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3946,3953,3972,3974,3979,3984,3991,3993,4028,4038,4038,4096,4129,4131,4135,4137,4138,4140,4146,4150,4153,4160,4169,4176,4185,4256,4293,4304,4342,4352,4441,4447,4514,4520,4601,4608,4614,4616,4678,4680,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4742,4744,4744,4746,4749,4752,4782,4784,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4814,4816,4822,4824,4846,4848,4878,4880,4880,4882,4885,4888,4894,4896,4934,4936,4954,4969,4977,5024,5108,5121,5740,5743,5750,5761,5786,5792,5866,6016,6099,6112,6121,6160,6169,6176,6263,6272,6313,7680,7835,7840,7929,7936,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8255,8256,8319,8319,8400,8412,8417,8417,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8497,8499,8505,8544,8579,12293,12295,12321,12335,12337,12341,12344,12346,12353,12436,12441,12442,12445,12446,12449,12542,12549,12588,12593,12686,12704,12727,13312,19893,19968,40869,40960,42124,44032,55203,63744,64045,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65056,65059,65075,65076,65101,65103,65136,65138,65140,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65381,65470,65474,65479,65482,65487,65490,65495,65498,65500],C=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1319,1329,1366,1369,1369,1377,1415,1488,1514,1520,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2208,2208,2210,2220,2308,2361,2365,2365,2384,2384,2392,2401,2417,2423,2425,2431,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3133,3160,3161,3168,3169,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3294,3294,3296,3297,3313,3314,3333,3340,3342,3344,3346,3386,3389,3389,3406,3406,3424,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5905,5920,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6263,6272,6312,6314,6314,6320,6389,6400,6428,6480,6509,6512,6516,6528,6571,6593,6599,6656,6678,6688,6740,6823,6823,6917,6963,6981,6987,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7401,7404,7406,7409,7413,7414,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11823,11823,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42647,42656,42735,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43648,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],k=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1319,1329,1366,1369,1369,1377,1415,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1520,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2048,2093,2112,2139,2208,2208,2210,2220,2276,2302,2304,2403,2406,2415,2417,2423,2425,2431,2433,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2902,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3140,3142,3144,3146,3149,3157,3158,3160,3161,3168,3171,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3299,3302,3311,3313,3314,3330,3331,3333,3340,3342,3344,3346,3386,3389,3396,3398,3400,3402,3406,3415,3415,3424,3427,3430,3439,3450,3455,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3769,3771,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5908,5920,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6160,6169,6176,6263,6272,6314,6320,6389,6400,6428,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6617,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6912,6987,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7376,7378,7380,7414,7424,7654,7676,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8204,8205,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,11823,11823,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12442,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42647,42655,42737,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43047,43072,43123,43136,43204,43216,43225,43232,43255,43259,43259,43264,43309,43312,43347,43360,43388,43392,43456,43471,43481,43520,43574,43584,43597,43600,43609,43616,43638,43642,43643,43648,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65062,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],x=i(T);e.tokenToString=o,e.computeLineStarts=s,e.getPositionFromLineAndCharacter=a,e.getLineAndCharacterOfPosition=c,e.positionToLineAndCharacter=l;var w=Object.prototype.hasOwnProperty;e.isWhiteSpace=u,e.isLineBreak=p,e.isOctalDigit=h,e.skipTrivia=m,e.getLeadingCommentRanges=g,e.getTrailingCommentRanges=v,e.isIdentifierStart=y,e.isIdentifierPart=_,e.createScanner=b}(ts||(ts={}));var ts;!function(e){function t(e,t){for(var n=e.declarations,r=0;r<n.length;r++){var i=n[r];if(i.kind===t)return i}return void 0}function n(){if(0==at.length){var e="",t=function(t){return e+=t};return{string:function(){return e},writeKeyword:t,writeOperator:t,writePunctuation:t,writeSpace:t,writeStringLiteral:t,writeParameter:t,writeSymbol:t,writeLine:function(){return e+=" "},increaseIndent:function(){},decreaseIndent:function(){},clear:function(){return e=""},trackSymbol:function(){}}}return at.pop()}function r(e){e.clear(),at.push(e)}function i(e){return e.end-e.pos}function o(e,t){return 0!==(e&t)}function s(t){if(!o(t.parserContextFlags,32)){var n=o(t.parserContextFlags,16)||e.forEachChild(t,s);n&&(t.parserContextFlags|=16),t.parserContextFlags|=32}return o(t.parserContextFlags,16)}function a(e){for(;e&&201!==e.kind;)e=e.parent;return e}function c(e){var t=a(e),n=t.getLineAndCharacterFromPosition(e.pos);return t.filename+"("+n.line+","+n.character+")"}function l(e){return e.pos}function u(e){return e.pos===e.end&&1!==e.kind}function p(t,n){return u(t)?t.pos:e.skipTrivia((n||a(t)).text,t.pos)}function d(t,n){if(u(n))return"";var r=t.text;return r.substring(e.skipTrivia(r,n.pos),n.end)}function h(t,n){return u(n)?"":t.substring(e.skipTrivia(t,n.pos),n.end)}function m(e){return d(a(e),e)}function f(e){return e.length>=2&&95===e.charCodeAt(0)&&95===e.charCodeAt(1)?"_"+e:e}function g(e){return e.length>=3&&95===e.charCodeAt(0)&&95===e.charCodeAt(1)&&95===e.charCodeAt(2)?e.substr(1):e}function v(e){return 0===i(e)?"(Missing)":m(e)}function y(t,n,r,i,o){t=b(t);var s=a(t),c=p(t,s),l=t.end-c;return e.createFileDiagnostic(s,c,l,n,r,i,o)}function _(t,n,r){t=b(t);var i=a(t),o=e.skipTrivia(i.text,t.pos),s=t.end-o;return e.flattenDiagnosticChain(i,o,s,n,r)}function b(e){var t;switch(e.kind){case 183:case 185:case 186:case 189:case 188:case 200:t=e.name}return t&&t.pos<t.end?t:e}function T(e){return void 0!==e.externalModuleIndicator}function E(e){return 0!==(1024&e.flags)}function S(e){return 188===e.kind&&C(e)}function C(e){return!!(4096&e.flags)}function k(e){return!!(2048&e.flags)}function x(e){return 166===e.kind&&7===e.expression.kind}function w(t,n){return n=n||a(t),123===t.kind||122===t.kind?e.concatenate(e.getTrailingCommentRanges(n.text,t.pos),e.getLeadingCommentRanges(n.text,t.pos)):e.getLeadingCommentRanges(n.text,t.pos)}function L(t,n){function r(e){return 42===n.text.charCodeAt(e.pos+1)&&42===n.text.charCodeAt(e.pos+2)&&47!==n.text.charCodeAt(e.pos+3)}return e.filter(w(t,n),r)}function A(t,n){function r(t){switch(t.kind){case 174:return n(t);case 163:case 167:case 168:case 169:case 170:case 171:case 175:case 176:case 194:case 195:case 177:case 179:case 180:case 197:case 181:return e.forEachChild(t,r)}}return r(t)}function N(e){if(e)switch(e.kind){case 150:case 184:case 151:case 125:case 127:case 128:case 126:return!0}return!1}function M(e){return void 0!==e&&163===e.kind&&N(e.parent)}function P(e){return void 0!==e&&125===e.kind&&142===e.parent.kind}function O(e){for(;;)if(e=e.parent,!e||N(e))return e}function I(e,t){for(;;){if(e=e.parent,!e)return void 0;switch(e.kind){case 151:if(!t)continue;case 184:case 150:case 189:case 124:case 125:case 126:case 127:case 128:case 188:case 201:return e}}}function R(e){for(;;){if(e=e.parent,!e)return void 0;switch(e.kind){case 124:case 125:case 126:case 127:case 128:return e}}}function D(e){return 147===e.kind?e.tag:e.expression}function V(e){switch(e.kind){case 91:case 89:case 87:case 93:case 78:case 8:case 141:case 142:case 143:case 144:case 145:case 146:case 147:case 148:case 149:case 150:case 151:case 154:case 152:case 153:case 155:case 156:case 157:case 158:case 159:case 9:case 161:return!0;case 120:for(;120===e.parent.kind;)e=e.parent;return 135===e.parent.kind;case 63:if(135===e.parent.kind)return!0;case 6:case 7:var t=e.parent;switch(t.kind){case 183:case 123:case 124:case 200:case 198:return t.initializer===e;case 166:case 167:case 168:case 169:case 174:case 175:case 176:case 194:case 178:case 176:return t.expression===e;case 170:return t.initializer===e||t.condition===e||t.iterator===e;case 171:return t.variable===e||t.expression===e;case 148:return e===t.expression;case 162:return e===t.expression;default:if(V(t))return!0}}return!1}function F(e){return 191===e.kind&&193===e.moduleReference.kind}function H(t){return e.Debug.assert(F(t)),t.moduleReference.expression}function B(e){return 191===e.kind&&193!==e.moduleReference.kind}function $(e){return e&&123===e.kind&&void 0!==e.dotDotDotToken}function G(e){if(e)switch(e.kind){case 123:return void 0!==e.questionToken;case 125:return void 0!==e.questionToken;case 199:case 198:case 124:return void 0!==e.questionToken}return!1}function U(e){return e.parameters.length>0&&void 0!==e.parameters[e.parameters.length-1].dotDotDotToken}function W(e){return e>=6&&9>=e}function j(e){return 7===e||9===e}function z(e){return e>=9&&12>=e}function q(e){for(;e;){if(1026&e.flags)return!0;e=e.parent}return!1}function K(e){switch(e.kind){case 122:case 123:case 183:case 124:case 198:case 199:case 200:case 125:case 184:case 127:case 128:case 126:case 185:case 186:case 187:case 188:case 189:case 191:return!0}return!1}function Y(e){switch(e.kind){case 173:case 172:case 182:case 168:case 166:case 165:case 171:case 170:case 167:case 177:case 174:case 176:case 92:case 179:case 164:case 169:case 175:case 192:return!0;default:return!1}}function X(e){if(63!==e.kind&&7!==e.kind&&6!==e.kind)return!1;var t=e.parent;return K(t)||150===t.kind?t.name===e:197===t.kind?t.name===e:!1}function Q(e){var t=et(e.heritageClauses,77);return t&&t.types.length>0?t.types[0]:void 0}function J(e){var t=et(e.heritageClauses,100);return t?t.types:void 0}function Z(e){var t=et(e.heritageClauses,77);return t?t.types:void 0}function et(e,t){if(e)for(var n=0,r=e.length;r>n;n++)if(e[n].token===t)return e[n];return void 0}function tt(t,n,r){if(!t.getCompilerOptions().noResolve){var i=e.isRootedDiskPath(r.filename)?r.filename:e.combinePaths(e.getDirectoryPath(n.filename),r.filename);return i=e.getNormalizedAbsolutePath(i,t.getCompilerHost().getCurrentDirectory()),t.getSourceFile(i)}}function nt(e,t){switch(t){case 185:for(;e;)switch(e.kind){case 185:return e;case 188:case 186:case 187:case 189:case 191:return void 0;default:e=e.parent;continue}break;default:for(;e;){if(e.kind===t)return e;e=e.parent}}return void 0}function rt(t,n){var r=/^\/\/\/\s*<reference\s+/gim,i=/^(\/\/\/\s*<reference\s+no-default-lib\s*=\s*)('|")(.+?)\2\s*\/>/gim;if(r.exec(t)){if(i.exec(t))return{isNoDefaultLib:!0};var o=e.fullTripleSlashReferencePathRegEx.exec(t);if(o){var s=n.pos,a=n.end;return{fileReference:{pos:s,end:a,filename:o[3]},isNoDefaultLib:!1}
}return{diagnosticMessage:e.Diagnostics.Invalid_reference_directive_syntax,isNoDefaultLib:!1}}return void 0}function it(e){return e>=64&&119>=e}function ot(e){return e>=2&&5>=e}function st(e){switch(e){case 106:case 104:case 105:case 107:case 76:case 112:case 68:return!0}return!1}e.getDeclarationOfKind=t;var at=[];e.getSingleLineStringWriter=n,e.releaseStringWriter=r,e.getFullWidth=i,e.hasFlag=o,e.containsParseError=s,e.getSourceFileOfNode=a,e.nodePosToString=c,e.getStartPosOfNode=l,e.isMissingNode=u,e.getTokenPosOfNode=p,e.getSourceTextOfNodeFromSourceFile=d,e.getTextOfNodeFromSourceText=h,e.getTextOfNode=m,e.escapeIdentifier=f,e.unescapeIdentifier=g,e.declarationNameToString=v,e.createDiagnosticForNode=y,e.createDiagnosticForNodeFromMessageChain=_,e.getErrorSpanForNode=b,e.isExternalModule=T,e.isDeclarationFile=E,e.isConstEnumDeclaration=S,e.isConst=C,e.isLet=k,e.isPrologueDirective=x,e.getLeadingCommentRangesOfNode=w,e.getJsDocComments=L,e.fullTripleSlashReferencePathRegEx=/^(\/\/\/\s*<reference\s+path\s*=\s*)('|")(.+?)\2.*?\/>/,e.forEachReturnStatement=A,e.isAnyFunction=N,e.isFunctionBlock=M,e.isObjectLiteralMethod=P,e.getContainingFunction=O,e.getThisContainer=I,e.getSuperContainer=R,e.getInvokedExpression=D,e.isExpression=V,e.isExternalModuleImportDeclaration=F,e.getExternalModuleImportDeclarationExpression=H,e.isInternalModuleImportDeclaration=B,e.hasDotDotDotToken=$,e.hasQuestionToken=G,e.hasRestParameters=U,e.isLiteralKind=W,e.isTextualLiteralKind=j,e.isTemplateLiteralKind=z,e.isInAmbientContext=q,e.isDeclaration=K,e.isStatement=Y,e.isDeclarationOrFunctionExpressionOrCatchVariableName=X,e.getClassBaseTypeNode=Q,e.getClassImplementedTypeNodes=J,e.getInterfaceBaseTypeNodes=Z,e.getHeritageClause=et,e.tryResolveScriptReference=tt,e.getAncestor=nt,e.getFileReferenceFromReferencePath=rt,e.isKeyword=it,e.isTrivia=ot,e.isModifier=st}(ts||(ts={}));var ts;!function(e){function t(t){return m[t]||(m[t]=e.objectAllocator.getNodeConstructor(t))}function n(e,n,r,i){var o=new(t(e));return o.pos=n,o.end=r,o.flags=i,o}function r(e,t,n){function r(e){return e?t(e):void 0}function i(e){if(e){if(n)return n(e);for(var r=0,i=e.length;i>r;r++){var o=t(e[r]);if(o)return o}return void 0}}if(e)switch(e.kind){case 120:return r(e.left)||r(e.right);case 122:return r(e.name)||r(e.constraint);case 123:return i(e.modifiers)||r(e.dotDotDotToken)||r(e.name)||r(e.questionToken)||r(e.type)||r(e.initializer);case 124:case 198:case 199:return i(e.modifiers)||r(e.name)||r(e.questionToken)||r(e.type)||r(e.initializer);case 133:case 134:case 129:case 130:case 131:return i(e.modifiers)||i(e.typeParameters)||i(e.parameters)||r(e.type);case 125:case 126:case 127:case 128:case 150:case 184:case 151:return i(e.modifiers)||r(e.name)||r(e.questionToken)||i(e.typeParameters)||i(e.parameters)||r(e.type)||r(e.body);case 132:return r(e.typeName)||i(e.typeArguments);case 135:return r(e.exprName);case 136:return i(e.members);case 137:return r(e.elementType);case 138:return i(e.elementTypes);case 139:return i(e.types);case 140:return r(e.type);case 141:return i(e.elements);case 142:return i(e.properties);case 143:return r(e.expression)||r(e.name);case 144:return r(e.expression)||r(e.argumentExpression);case 145:case 146:return r(e.expression)||i(e.typeArguments)||i(e.arguments);case 147:return r(e.tag)||r(e.template);case 148:return r(e.type)||r(e.expression);case 149:return r(e.expression);case 152:return r(e.expression);case 153:return r(e.expression);case 154:return r(e.expression);case 155:return r(e.operand);case 156:return r(e.operand);case 157:return r(e.left)||r(e.right);case 158:return r(e.condition)||r(e.whenTrue)||r(e.whenFalse);case 163:case 180:case 181:case 190:return i(e.statements);case 201:return i(e.statements)||r(e.endOfFileToken);case 164:return i(e.modifiers)||i(e.declarations);case 166:return r(e.expression);case 167:return r(e.expression)||r(e.thenStatement)||r(e.elseStatement);case 168:return r(e.statement)||r(e.expression);case 169:return r(e.expression)||r(e.statement);case 170:return i(e.declarations)||r(e.initializer)||r(e.condition)||r(e.iterator)||r(e.statement);case 171:return i(e.declarations)||r(e.variable)||r(e.expression)||r(e.statement);case 172:case 173:return r(e.label);case 174:return r(e.expression);case 175:return r(e.expression)||r(e.statement);case 176:return r(e.expression)||i(e.clauses);case 194:return r(e.expression)||i(e.statements);case 195:return i(e.statements);case 177:return r(e.label)||r(e.statement);case 178:return r(e.expression);case 179:return r(e.tryBlock)||r(e.catchClause)||r(e.finallyBlock);case 197:return r(e.name)||r(e.type)||r(e.block);case 183:return i(e.modifiers)||r(e.name)||r(e.type)||r(e.initializer);case 185:return i(e.modifiers)||r(e.name)||i(e.typeParameters)||i(e.heritageClauses)||i(e.members);case 186:return i(e.modifiers)||r(e.name)||i(e.typeParameters)||i(e.heritageClauses)||i(e.members);case 187:return i(e.modifiers)||r(e.name)||r(e.type);case 188:return i(e.modifiers)||r(e.name)||i(e.members);case 200:return r(e.name)||r(e.initializer);case 189:return i(e.modifiers)||r(e.name)||r(e.body);case 191:return i(e.modifiers)||r(e.name)||r(e.moduleReference);case 192:return i(e.modifiers)||r(e.exportName);case 159:return r(e.head)||i(e.templateSpans);case 162:return r(e.expression)||r(e.literal);case 121:return r(e.expression);case 196:return i(e.types);case 193:return r(e.expression)}}function i(t){function n(t){return e.sys.useCaseSensitiveFileNames?t:t.toLowerCase()}function r(n,r,i){try{var o=e.sys.readFile(n,t.charset)}catch(s){i&&i(s.number===a?e.createCompilerDiagnostic(e.Diagnostics.Unsupported_file_encoding).messageText:s.message),o=""}return void 0!==o?l(n,o,r,"0"):void 0}function i(t,n,r,i){function o(t){return e.hasProperty(s,t)?!0:e.sys.directoryExists(t)?(s[t]=!0,!0):!1}function a(t){if(t.length>e.getRootLength(t)&&!o(t)){var n=e.getDirectoryPath(t);a(n),e.sys.createDirectory(t)}}try{a(e.getDirectoryPath(e.normalizePath(t))),e.sys.writeFile(t,n,r)}catch(c){i&&i(c.message)}}var o,s={},a=-2147024809;return{getSourceFile:r,getDefaultLibFilename:function(t){return e.combinePaths(e.getDirectoryPath(e.normalizePath(e.sys.getExecutingFilePath())),2===t.target?"lib.es6.d.ts":"lib.d.ts")},writeFile:i,getCurrentDirectory:function(){return o||(o=e.sys.getCurrentDirectory())},useCaseSensitiveFileNames:function(){return e.sys.useCaseSensitiveFileNames},getCanonicalFileName:n,getNewLine:function(){return e.sys.newLine}}}function o(t){switch(t){case 0:return e.Diagnostics.Declaration_or_statement_expected;case 1:return e.Diagnostics.Declaration_or_statement_expected;case 2:return e.Diagnostics.Statement_expected;case 3:return e.Diagnostics.case_or_default_expected;case 4:return e.Diagnostics.Statement_expected;case 5:return e.Diagnostics.Property_or_signature_expected;case 6:return e.Diagnostics.Unexpected_token_A_constructor_method_accessor_or_property_was_expected;case 7:return e.Diagnostics.Enum_member_expected;case 8:return e.Diagnostics.Type_reference_expected;case 9:return e.Diagnostics.Variable_declaration_expected;case 10:return e.Diagnostics.Argument_expression_expected;case 11:return e.Diagnostics.Property_assignment_expected;case 12:return e.Diagnostics.Expression_or_comma_expected;case 13:return e.Diagnostics.Parameter_declaration_expected;case 14:return e.Diagnostics.Type_parameter_declaration_expected;case 15:return e.Diagnostics.Type_argument_expected;case 16:return e.Diagnostics.Type_expected;case 17:return e.Diagnostics.Unexpected_token_expected}}function s(e){switch(e){case 107:return 128;case 106:return 16;case 105:return 64;case 104:return 32;case 76:return 1;case 112:return 2;case 68:return 4096}return 0}function a(e){return 63===e.kind&&("eval"===e.text||"arguments"===e.text)}function c(t,n){e.Debug.assert(e.isPrologueDirective(n));var r=e.getSourceTextOfNodeFromSourceFile(t,n.expression);return'"use strict"'===r||"'use strict'"===r}function l(t,r,i,a,l){function h(e,t){e?Pi|=t:Pi&=~t}function f(e){h(e,1)}function g(e){h(e,2)}function v(e){h(e,4)}function y(e){h(e,8)}function _(e){if(2&Pi){g(!1);var t=e();return g(!0),t}return e()}function b(e){if(2&Pi)return e();g(!0);var t=e();return g(!1),t}function T(e){if(4&Pi)return e();v(!0);var t=e();return v(!1),t}function E(e){if(4&Pi){v(!1);var t=e();return v(!0),t}return e()}function S(){return 0!==(4&Pi)}function C(){return 0!==(1&Pi)}function k(){return 0!==(8&Pi)}function x(){return 0!==(2&Pi)}function w(){return wi||(wi=e.computeLineStarts(r))}function L(t){return e.getLineAndCharacterOfPosition(w(),t)}function A(t,n){return e.getPositionFromLineAndCharacter(w(),t,n)}function N(e,t){var n=Vi.getTokenPos(),r=Vi.getTextPos()-n;M(n,r,e,t)}function M(t,n,r,i){var o=e.lastOrUndefined(Ri.parseDiagnostics);o&&t===o.start||Ri.parseDiagnostics.push(e.createFileDiagnostic(Ri,t,n,r,i)),Oi=!0}function P(e){var t=Vi.getTextPos();M(t,0,e)}function O(){return Vi.getStartPos()}function I(){return Vi.getStartPos()}function R(){return ki=Vi.scan()}function D(){return ki=Vi.reScanGreaterToken()}function V(){return ki=Vi.reScanSlashToken()}function F(){return ki=Vi.reScanTemplateToken()}function H(t,n){var r=ki,i=Ri.parseDiagnostics.length,o=Oi,s=Pi,a=n?Vi.lookAhead(t):Vi.tryScan(t);return e.Debug.assert(s===Pi),(!a||n)&&(ki=r,Ri.parseDiagnostics.length=i,Oi=o),a}function B(e){return H(e,!0)}function $(e){return H(e,!1)}function G(){return 63===ki?!0:108===ki&&S()?!1:C()?ki>108:ki>99}function U(t,n,r){return ki===t?(R(),!0):(n?N(n,r):N(e.Diagnostics._0_expected,e.tokenToString(t)),!1)}function W(e){return ki===e?(R(),!0):!1}function j(e){if(ki===e){var t=K(e);return R(),Y(t)}return void 0}function z(){return 21===ki?!0:14===ki||1===ki||Vi.hasPrecedingLineBreak()}function q(e){return z()?(21===ki&&R(),!0):U(21,e)}function K(t,n){Mi++;var r=new(m[t]||(m[t]=e.objectAllocator.getNodeConstructor(t)));return n>=0||(n=Vi.getStartPos()),r.pos=n,r.end=n,r}function Y(e){return e.end=Vi.getStartPos(),Pi&&(e.parserContextFlags=Pi),Oi&&(Oi=!1,e.parserContextFlags|=16),e}function X(e,t,n,r){t?M(Vi.getStartPos(),0,n,r):N(n,r);var i=K(e,Vi.getStartPos());return i.text="",Y(i)}function Q(t){return t=e.escapeIdentifier(t),e.hasProperty(Ai,t)?Ai[t]:Ai[t]=t}function J(t,n){if(Ni++,t){var r=K(63);return r.text=Q(Vi.getTokenValue()),R(),Y(r)}return X(63,!1,n||e.Diagnostics.Identifier_expected)}function Z(e){return J(G(),e)}function et(){return J(di())}function tt(){return di()||7===ki||6===ki}function nt(){return 7===ki||6===ki?kt(!0):17===ki?rt():et()}function rt(){var e=K(121);U(17);var t=S();return k()&&v(!1),e.expression=_(dn),k()&&v(t),U(18),Y(e)}function it(e){return ki===e&&$(ot)}function ot(){return R(),ct()}function st(){return e.isModifier(ki)&&$(at)}function at(){return 68===ki?75===R():(R(),ct())}function ct(){return 17===ki||34===ki||tt()}function lt(t,n){switch(t){case 0:case 1:return yi(n);case 2:case 4:return xr(n);case 3:return 65===ki||71===ki;case 5:return Ut();case 6:return B($r);case 7:return 17===ki||tt();case 11:return 17===ki||34===ki||tt();case 8:return G()&&!pt();case 9:case 14:return G();case 10:return 22===ki||un();case 12:return 22===ki||un();case 13:return Mt();case 15:case 16:return 22===ki||en();case 17:return Kr()}e.Debug.fail("Non-exhaustive case in 'isListElement'.")}function ut(){return R(),G()}function pt(){return 100===ki||77===ki?B(ut):!1}function dt(e){if(1===ki)return!0;switch(e){case 1:case 2:case 3:case 5:case 6:case 7:case 11:return 14===ki;case 4:return 14===ki||65===ki||71===ki;case 8:return 13===ki||77===ki||100===ki;case 9:return ht();case 14:return 24===ki||15===ki||13===ki||77===ki||100===ki;case 10:return 16===ki||21===ki;case 12:case 16:return 18===ki;case 13:return 16===ki||18===ki||13===ki;case 15:return 24===ki||15===ki;case 17:return 13===ki||14===ki}}function ht(){return z()?!0:84===ki?!0:31===ki?!0:!1}function mt(){for(var e=0;18>e;e++)if(xi&1<<e&&(lt(e,!0)||dt(e)))return!0;return!1}function ft(t,n,r){var i=xi;xi|=1<<t;var o=[];o.pos=O();for(var s=C();!dt(t);)if(lt(t,!1)){var a=r();o.push(a),n&&!C()&&(e.isPrologueDirective(a)?c(Ri,a)&&(f(!0),n=!1):n=!1)}else if(gt(t))break;return f(s),o.end=I(),xi=i,o}function gt(e){return N(o(e)),mt()?!0:(R(),!1)}function vt(e,t){var n=xi;xi|=1<<e;var r=[];r.pos=O();for(var i=-1;;)if(lt(e,!1)){if(r.push(t()),i=Vi.getTokenPos(),W(22))continue;if(i=-1,dt(e))break;U(22)}else{if(dt(e))break;if(gt(e))break}return i>=0&&(r.hasTrailingComma=!0),r.end=I(),xi=n,r}function yt(){var e=O(),t=[];return t.pos=e,t.end=e,t}function _t(e,t,n,r){if(U(n)){var i=vt(e,t);return U(r),i}return yt()}function bt(e,t){for(var n=Z(t);W(19);){var r=K(120,n.pos);r.left=n,r.right=Tt(e),n=Y(r)}return n}function Tt(t){if(Vi.hasPrecedingLineBreak()&&Vi.isReservedWord()){var n=B(Lr);if(n)return X(63,!0,e.Diagnostics.Identifier_expected)}return t?et():Z()}function Et(){var e=K(ki);return R(),Y(e)}function St(){var t=K(159);t.head=kt(),e.Debug.assert(10===t.head.kind,"Template head has wrong token kind");var n=[];n.pos=O();do n.push(Ct());while(11===n[n.length-1].literal.kind);return n.end=I(),t.templateSpans=n,Y(t)}function Ct(){var t=K(162);t.expression=_(dn);var n;return 14===ki?(F(),n=kt()):n=X(12,!1,e.Diagnostics._0_expected,e.tokenToString(14)),t.literal=n,Y(t)}function kt(t){var n=K(ki),i=Vi.getTokenValue();n.text=t?Q(i):i,Vi.isUnterminated()&&(n.isUnterminated=!0);var o=Vi.getTokenPos();return R(),Y(n),6===n.kind&&48===r.charCodeAt(o)&&e.isOctalDigit(r.charCodeAt(o+1))&&(n.flags|=8192),n}function xt(){var t=K(132);return t.typeName=bt(!1,e.Diagnostics.Type_expected),Vi.hasPrecedingLineBreak()||23!==ki||(t.typeArguments=_t(15,an,23,24)),Y(t)}function wt(){var e=K(135);return U(95),e.exprName=bt(!0),Y(e)}function Lt(){var e=K(122);return e.name=Z(),W(77)&&(en()||!un()?e.constraint=an():e.expression=Rn()),Y(e)}function At(){return 23===ki?_t(14,Lt,23,24):void 0}function Nt(){return W(50)?7===ki?kt(!0):an():void 0}function Mt(){return 20===ki||G()||e.isModifier(ki)}function Pt(e,t){t&&(e.flags|=t.flags,e.modifiers=t)}function Ot(){var t=K(123);return Pt(t,Gr()),t.dotDotDotToken=j(20),t.name=k()?T(Z):Z(),0===e.getFullWidth(t.name)&&0===t.flags&&e.isModifier(ki)&&R(),t.questionToken=j(49),t.type=Nt(),t.initializer=k()?E(It):It(),Y(t)}function It(){return hn(!0)}function Rt(e,t,n,r){var i=31===e;r.typeParameters=At(),r.parameters=Dt(t,n),i?(U(e),r.type=an()):W(e)&&(r.type=an())}function Dt(e,t){if(U(15)){var n=S(),r=k();v(e),y(e);var i=vt(13,Ot);return v(n),y(r),!U(16)&&t?void 0:i}return t?void 0:yt()}function Vt(){q()||W(22)}function Ft(e){var t=K(e);return 130===e&&U(86),Rt(50,!1,!1,t),Vt(),Y(t)}function Ht(){return 17!==ki?!1:B(Bt)}function Bt(){if(R(),20===ki||18===ki)return!0;if(e.isModifier(ki)){if(R(),G())return!0}else{if(!G())return!1;R()}return 50===ki||22===ki?!0:49!==ki?!1:(R(),50===ki||22===ki||18===ki)}function $t(e,t){var n=K(131,e);return Pt(n,t),n.parameters=_t(13,Ot,17,18),n.type=ln(),Vt(),Y(n)}function Gt(){var e=Vi.getStartPos(),t=nt(),n=j(49);if(15===ki||23===ki){var r=K(125,e);return r.name=t,r.questionToken=n,Rt(50,!1,!1,r),Vt(),Y(r)}var i=K(124,e);return i.name=t,i.questionToken=n,i.type=ln(),Vt(),Y(i)}function Ut(){switch(ki){case 15:case 23:case 17:return!0;default:return tt()&&B(Wt)}}function Wt(){return R(),15===ki||23===ki||49===ki||50===ki||z()}function jt(){switch(ki){case 15:case 23:return Ft(129);case 17:return Ht()?$t(Vi.getStartPos(),void 0):Gt();case 86:if(B(zt))return Ft(130);case 7:case 6:return Gt();default:if(di())return Gt()}}function zt(){return R(),15===ki||23===ki}function qt(){var e=K(136);return e.members=Kt(),Y(e)}function Kt(){var e;return U(13)?(e=ft(5,!1,jt),U(14)):e=yt(),e}function Yt(){var e=K(138);return e.elementTypes=_t(16,an,17,18),Y(e)}function Xt(){var e=K(140);return U(15),e.type=an(),U(16),Y(e)}function Qt(e){var t=K(e);return 134===e&&U(86),Rt(31,!1,!1,t),Y(t)}function Jt(){var e=Et();return 19===ki?void 0:e}function Zt(){switch(ki){case 109:case 118:case 116:case 110:var e=$(Jt);return e||xt();case 97:return Et();case 95:return wt();case 13:return qt();case 17:return Yt();case 15:return Xt();default:return xt()}}function en(){switch(ki){case 109:case 118:case 116:case 110:case 97:case 95:case 13:case 17:case 23:case 86:return!0;case 15:return B(tn);default:return G()}}function tn(){return R(),16===ki||Mt()||en()}function nn(){for(var e=Zt();!Vi.hasPrecedingLineBreak()&&W(17);){U(18);var t=K(137,e.pos);t.elementType=e,e=Y(t)}return e}function rn(){var e=nn();if(43===ki){var t=[e];for(t.pos=e.pos;W(43);)t.push(nn());t.end=I();var n=K(139,e.pos);n.types=t,e=Y(n)}return e}function on(){return 23===ki?!0:15===ki&&B(sn)}function sn(){if(R(),16===ki||20===ki)return!0;if(G()||e.isModifier(ki)){if(R(),50===ki||22===ki||49===ki||51===ki||G()||e.isModifier(ki))return!0;if(16===ki&&(R(),31===ki))return!0}return!1}function an(){var e=S(),t=k();v(!1),y(!1);var n=cn();return v(e),y(t),n}function cn(){return on()?Qt(133):86===ki?Qt(134):rn()}function ln(){return W(50)?an():void 0}function un(){switch(ki){case 91:case 89:case 87:case 93:case 78:case 6:case 7:case 9:case 10:case 15:case 17:case 13:case 81:case 86:case 35:case 55:case 32:case 33:case 46:case 45:case 72:case 95:case 97:case 37:case 38:case 23:case 63:case 108:return!0;default:return Ln()?!0:G()}}function pn(){return 13!==ki&&81!==ki&&un()}function dn(){for(var e=mn();W(22);)e=Nn(e,22,mn());return e}function hn(e){return 51!==ki&&(Vi.hasPrecedingLineBreak()||e&&13===ki||!un())?void 0:(U(51),mn())}function mn(){if(fn())return vn();var e=_n();if(e)return e;var t=xn(0);if(63===t.kind&&31===ki)return yn(t);if(u(t)&&p(D())){var n=ki;return R(),Nn(t,n,mn())}return kn(t)}function fn(){return 108===ki?S()?!0:C()?!0:B(gn):!1}function gn(){return R(),!Vi.hasPrecedingLineBreak()&&G()}function vn(){var e=K(160);return R(),Vi.hasPrecedingLineBreak()||34!==ki&&!un()?Y(e):(e.asteriskToken=j(34),e.expression=mn(),Y(e))}function yn(t){e.Debug.assert(31===ki,"parseSimpleArrowFunctionExpression should only have been called if we had a =>");var n=K(151,t.pos),r=K(123,t.pos);return r.name=t,Y(r),n.parameters=[r],n.parameters.pos=r.pos,n.parameters.end=r.end,U(31),n.body=Cn(),Y(n)}function _n(){var e=bn();if(0===e)return void 0;var t=1===e?Sn(!0):$(En);return t?(t.body=U(31)||13===ki?Cn():Z(),Y(t)):void 0}function bn(){return 15===ki||23===ki?B(Tn):31===ki?1:0}function Tn(){var t=ki,n=R();if(15===t){if(16===n){var r=R();switch(r){case 31:case 50:case 13:return 1;default:return 0}}return 20===n?1:G()?50===R()?1:2:0}return e.Debug.assert(23===t),G()?2:0}function En(){return Sn(!1)}function Sn(e){var t=K(151);return Rt(50,!1,!e,t),t.parameters?e||31===ki||13===ki?t:void 0:void 0}function Cn(){return 13===ki?ir(!1,!1):xr(!0)&&!pn()&&81!==ki?ir(!1,!0):mn()}function kn(e){if(!W(49))return e;var t=K(158,e.pos);return t.condition=e,t.whenTrue=_(mn),U(50),t.whenFalse=mn(),Y(t)}function xn(e){var t=Rn();return wn(e,t)}function wn(e,t){for(;;){D();var n=An();if(e>=n)break;if(84===ki&&x())break;var r=ki;R(),t=Nn(t,r,xn(n))}return t}function Ln(){return x()&&84===ki?!1:An()>0}function An(){switch(ki){case 48:return 1;case 47:return 2;case 43:return 3;case 44:return 4;case 42:return 5;case 27:case 28:case 29:case 30:return 6;case 23:case 24:case 25:case 26:case 85:case 84:return 7;case 39:case 40:case 41:return 8;case 32:case 33:return 9;case 34:case 35:case 36:return 10}return-1}function Nn(e,t,n){var r=K(157,e.pos);return r.left=e,r.operator=t,r.right=n,Y(r)}function Mn(){var e=K(155);return e.operator=ki,R(),e.operand=Rn(),Y(e)}function Pn(){var e=K(152);return R(),e.expression=Rn(),Y(e)}function On(){var e=K(153);return R(),e.expression=Rn(),Y(e)}function In(){var e=K(154);return R(),e.expression=Rn(),Y(e)}function Rn(){switch(ki){case 32:case 33:case 46:case 45:case 37:case 38:return Mn();case 72:return Pn();case 95:return On();case 97:return In();case 23:return Bn();default:return Dn()}}function Dn(){var t=Vn();if(e.Debug.assert(u(t)),(37===ki||38===ki)&&!Vi.hasPrecedingLineBreak()){var n=K(156,t.pos);return n.operand=t,n.operator=ki,R(),Y(n)}return t}function Vn(){var e=89===ki?Hn():Fn();return Gn(e)}function Fn(){var e=zn();return $n(e)}function Hn(){var t=Et();if(15===ki||19===ki)return t;var n=K(143,t.pos);return n.expression=t,U(19,e.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access),n.name=Tt(!0),Y(n)}function Bn(){var e=K(148);return U(23),e.type=an(),U(24),e.expression=Rn(),Y(e)}function $n(e){for(;;){{Vi.getTokenPos()}if(W(19)){var t=K(143,e.pos);t.expression=e,t.name=Tt(!0),e=Y(t)}else if(W(17)){var n=K(144,e.pos);if(n.expression=e,18!==ki&&(n.argumentExpression=_(dn),7===n.argumentExpression.kind||6===n.argumentExpression.kind)){var r=n.argumentExpression;r.text=Q(r.text)}U(18),e=Y(n)}else{if(9!==ki&&10!==ki)return e;var i=K(147,e.pos);i.tag=e,i.template=9===ki?kt():St(),e=Y(i)}}}function Gn(e){for(;;)if(e=$n(e),23!==ki){if(15!==ki)return e;var t=K(145,e.pos);t.expression=e,t.arguments=Un(),e=Y(t)}else{var n=$(Wn);if(!n)return e;var t=K(145,e.pos);t.expression=e,t.typeArguments=n,t.arguments=Un(),e=Y(t)}}function Un(){U(15);var e=vt(10,Xn);return U(16),e}function Wn(){if(!W(23))return void 0;var e=vt(15,an);return U(24)?e&&jn()?e:void 0:void 0}function jn(){switch(ki){case 15:case 19:case 16:case 18:case 50:case 21:case 22:case 49:case 27:case 29:case 28:case 30:case 47:case 48:case 44:case 42:case 43:case 14:case 1:return!0;default:return!1}}function zn(){switch(ki){case 6:case 7:case 9:return kt();case 91:case 89:case 87:case 93:case 78:return Et();case 15:return qn();case 17:return Qn();case 13:return Zn();case 81:return er();case 86:return nr();case 35:case 55:if(8===V())return kt();break;case 10:return St()}return Z(e.Diagnostics.Expression_expected)}function qn(){var e=K(149);return U(15),e.expression=_(dn),U(16),Y(e)}function Kn(){return 22===ki?K(161):mn()}function Yn(){return Kn()}function Xn(){return _(Kn)}function Qn(){var e=K(141);return U(17),Vi.hasPrecedingLineBreak()&&(e.flags|=256),e.elements=vt(12,Yn),U(18),Y(e)}function Jn(){var e=Vi.getStartPos(),t=ki;if(it(113)||it(117)){var n=113===t?127:128;return Br(n,e,void 0)}var r=j(34),i=G(),o=nt();if(r||15===ki||23===ki)return Vr(e,void 0,r,o,void 0,!0);var s=j(49);if(22!==ki&&14!==ki||!i){var a=K(198,e);return a.name=o,a.questionToken=s,U(50),a.initializer=_(mn),Y(a)}var c=K(199,e);return c.name=o,c.questionToken=s,Y(c)}function Zn(){var e=K(142);return U(13),Vi.hasPrecedingLineBreak()&&(e.flags|=256),e.properties=vt(11,Jn),U(14),Y(e)}function er(){var e=K(150);return U(81),e.asteriskToken=j(34),e.name=e.asteriskToken?T(tr):tr(),Rt(50,!!e.asteriskToken,!1,e),e.body=ir(!!e.asteriskToken,!1),Y(e)}function tr(){return G()?Z():void 0}function nr(){var e=K(146);return U(86),e.expression=Fn(),e.typeArguments=$(Wn),(e.typeArguments||15===ki)&&(e.arguments=Un()),Y(e)}function rr(e,t,n){var r=K(e);return U(13)||t?(r.statements=ft(2,n,Ar),U(14)):r.statements=yt(),Y(r)}function ir(e,t){var n=S();v(e);var r=rr(163,t,!0);return v(n),r}function or(){var e=K(165);return U(21),Y(e)}function sr(){var e=K(167);return U(82),U(15),e.expression=_(dn),U(16),e.thenStatement=Ar(),e.elseStatement=W(74)?Ar():void 0,Y(e)}function ar(){var e=K(168);return U(73),e.statement=Ar(),U(98),U(15),e.expression=_(dn),U(16),W(21),Y(e)}function cr(){var e=K(169);return U(98),U(15),e.expression=_(dn),U(16),e.statement=Ar(),Y(e)}function lr(){var e=O();if(U(80),U(15),21!==ki)if(W(96))var t=b(Or);else if(W(102))var t=Pr(b(Or),2048);else if(W(68))var t=Pr(b(Or),4096);else var n=b(dn);var r;if(W(84)){var i=K(171,e);t?i.declarations=t:i.variable=n,i.expression=_(dn),U(16),r=i}else{var o=K(170,e);t&&(o.declarations=t),n&&(o.initializer=n),U(21),21!==ki&&16!==ki&&(o.condition=_(dn)),U(21),16!==ki&&(o.iterator=_(dn)),U(16),r=o}return r.statement=Ar(),Y(r)}function ur(e){var t=K(e);return U(173===e?64:69),z()||(t.label=Z()),q(),Y(t)}function pr(){var e=K(174);return U(88),z()||(e.expression=_(dn)),q(),Y(e)}function dr(){var e=K(175);return U(99),U(15),e.expression=_(dn),U(16),e.statement=Ar(),Y(e)}function hr(){var e=K(194);return U(65),e.expression=_(dn),U(50),e.statements=ft(4,!1,Ar),Y(e)}function mr(){var e=K(195);return U(71),U(50),e.statements=ft(4,!1,Ar),Y(e)}function fr(){return 65===ki?hr():mr()}function gr(){var e=K(176);return U(90),U(15),e.expression=_(dn),U(16),U(13),e.clauses=ft(3,!1,fr),U(14),Y(e)}function vr(){var e=K(178);return U(92),e.expression=Vi.hasPrecedingLineBreak()?void 0:_(dn),q(),Y(e)}function yr(){var e=K(179);return e.tryBlock=_r(94),e.catchClause=66===ki?br():void 0,e.finallyBlock=e.catchClause&&79!==ki?void 0:_r(79),Y(e)}function _r(e){var t=O();U(e);var n=rr(94===e?180:181,!1,!1);return n.pos=t,n}function br(){var e=K(197);return U(66),U(15),e.name=Z(),e.type=ln(),U(16),e.block=rr(163,!1,!1),Y(e)}function Tr(){var e=K(182);return U(70),q(),Y(e)}function Er(){return G()&&B(Sr)}function Sr(){return 50===R()}function Cr(){var e=K(177);return e.label=Z(),U(50),e.statement=Ar(),Y(e)}function kr(){var e=K(166);return e.expression=_(dn),q(),Y(e)}function xr(e){switch(ki){case 21:return!e;case 13:case 96:case 102:case 81:case 82:case 73:case 98:case 80:case 69:case 64:case 88:case 99:case 90:case 92:case 94:case 70:case 66:case 79:return!0;case 68:var t=B(wr);return!t;case 101:case 67:case 114:case 75:case 119:if(pi())return!1;case 106:case 104:case 105:case 107:if(B(Lr))return!1;default:return un()}}function wr(){return R(),75===ki}function Lr(){return R(),di()&&!Vi.hasPrecedingLineBreak()}function Ar(){switch(ki){case 13:return rr(163,!1,!1);case 96:case 68:return Ir(Vi.getStartPos(),void 0);case 81:return Rr(Vi.getStartPos(),void 0);case 21:return or();case 82:return sr();case 73:return ar();case 98:return cr();case 80:return lr();case 69:return ur(172);case 64:return ur(173);case 88:return pr();case 99:return dr();case 90:return gr();case 92:return vr();case 94:case 66:case 79:return yr();case 70:return Tr();case 102:if(ui())return Ir(Vi.getStartPos(),void 0);default:return Er()?Cr():kr()}}function Nr(t){return 13===ki?ir(t,!1):(q(e.Diagnostics.or_expected),void 0)}function Mr(){var e=K(183);return e.name=Z(),e.type=ln(),e.initializer=hn(!1),Y(e)}function Pr(e,t){for(var n=0,r=e.length;r>n;n++)e[n].flags|=t;return e}function Or(){return vt(9,Mr)}function Ir(t,n){var r=K(164,t);return Pt(r,n),102===ki?r.flags|=2048:68===ki?r.flags|=4096:e.Debug.assert(96===ki),R(),r.declarations=_(Or),Pr(r.declarations,r.flags),q(),Y(r)}function Rr(e,t){var n=K(184,e);return Pt(n,t),U(81),n.asteriskToken=j(34),n.name=Z(),Rt(50,!!n.asteriskToken,!1,n),n.body=Nr(!!n.asteriskToken),Y(n)}function Dr(e,t){var n=K(126,e);return Pt(n,t),U(111),Rt(50,!1,!1,n),n.body=Nr(!1),Y(n)}function Vr(e,t,n,r,i,o){var s=K(125,e);return Pt(s,t),s.asteriskToken=n,s.name=r,s.questionToken=i,Rt(50,!!n,!1,s),s.body=o?ir(!!n,!1):Nr(!!n),Y(s)}function Fr(e,t){var n=j(34),r=nt(),i=j(49);if(n||15===ki||23===ki)return Vr(e,t,n,r,i,!1);var o=K(124,e);return Pt(o,t),o.name=r,o.questionToken=i,o.type=ln(),o.initializer=_(Hr),q(),Y(o)}function Hr(){return hn(!1)}function Br(e,t,n){var r=K(e,t);return Pt(r,n),r.name=nt(),Rt(50,!1,!1,r),r.body=Nr(!1),Y(r)}function $r(){for(var t;e.isModifier(ki);)t=ki,R();if(34===ki)return!0;if(tt()&&(t=ki,R()),17===ki)return!0;if(void 0!==t){if(!e.isKeyword(t)||117===t||113===t)return!0;switch(ki){case 15:case 23:case 50:case 51:case 49:return!0;default:return z()}}return!1}function Gr(){for(var e,t=0;;){var n=Vi.getStartPos(),r=ki;if(!st())break;e||(e=[],e.pos=n),t|=s(r),e.push(Y(K(r,n)))}return e&&(e.flags=t,e.end=Vi.getStartPos()),e}function Ur(){var t=O(),n=Gr();return it(113)?Br(127,t,n):it(117)?Br(128,t,n):111===ki?Dr(t,n):Ht()?$t(t,n):di()||7===ki||6===ki||34===ki||17===ki?Fr(t,n):(e.Debug.fail("Should not have attempted to parse class member declaration."),void 0)}function Wr(e,t){var n=K(185,e);return Pt(n,t),U(67),n.name=Z(),n.typeParameters=At(),n.heritageClauses=jr(!0),U(13)?(n.members=k()?E(Yr):Yr(),U(14)):n.members=yt(),Y(n)}function jr(e){return Kr()?e&&k()?E(zr):zr():void 0}function zr(){return ft(17,!1,qr)}function qr(){if(77===ki||100===ki){var e=K(196);return e.token=ki,R(),e.types=vt(8,xt),Y(e)}return void 0}function Kr(){return 77===ki||100===ki}function Yr(){return ft(6,!1,Ur)}function Xr(e,t){var n=K(186,e);return Pt(n,t),U(101),n.name=Z(),n.typeParameters=At(),n.heritageClauses=jr(!1),n.members=Kt(),Y(n)}function Qr(e,t){var n=K(187,e);return Pt(n,t),U(119),n.name=Z(),U(51),n.type=an(),q(),Y(n)}function Jr(){var e=K(200,Vi.getStartPos());return e.name=nt(),e.initializer=_(Hr),Y(e)}function Zr(e,t){var n=K(188,e);return Pt(n,t),U(75),n.name=Z(),U(13)?(n.members=vt(7,Jr),U(14)):n.members=yt(),Y(n)}function ei(){var e=K(190,Vi.getStartPos());return U(13)?(e.statements=ft(1,!1,bi),U(14)):e.statements=yt(),Y(e)}function ti(e,t,n){var r=K(189,e);return Pt(r,t),r.flags|=n,r.name=Z(),r.body=W(19)?ti(O(),void 0,1):ei(),Y(r)}function ni(e,t){var n=K(189,e);return Pt(n,t),n.name=kt(!0),n.body=ei(),Y(n)}function ri(e,t){return U(114),7===ki?ni(e,t):ti(e,t,t?t.flags:0)}function ii(){return 115===ki&&B(oi)}function oi(){return 15===R()}function si(e,t){var n=K(191,e);return Pt(n,t),U(83),n.name=Z(),U(51),n.moduleReference=ai(),q(),Y(n)}function ai(){return ii()?ci():bt(!1)}function ci(){var e=K(193);return U(115),U(15),e.expression=dn(),7===e.expression.kind&&Q(e.expression.text),U(16),Y(e)}function li(e,t){var n=K(192,e);return Pt(n,t),n.exportName=Z(),q(),Y(n)}function ui(){return C()||B(gn)}function pi(){switch(ki){case 96:case 68:case 81:return!0;case 102:return ui();case 67:case 101:case 75:case 83:case 119:return B(hi);case 114:return B(mi);case 76:return B(fi);case 112:case 106:case 104:case 105:case 107:return B(gi)}}function di(){return ki>=63}function hi(){return R(),di()}function mi(){return R(),di()||7===ki}function fi(){return R(),51===ki||pi()}function gi(){return R(),pi()}function vi(){var t=O(),n=Gr();if(76===ki&&(R(),W(51)))return li(t,n);switch(ki){case 96:case 102:case 68:return Ir(t,n);case 81:return Rr(t,n);case 67:return Wr(t,n);case 101:return Xr(t,n);case 119:return Qr(t,n);case 75:return Zr(t,n);case 114:return ri(t,n);case 83:return si(t,n);default:e.Debug.fail("Mismatch between isDeclarationStart and parseDeclaration")}}function yi(e){return pi()||xr(e)}function _i(){return Ti()}function bi(){return Ti()}function Ti(){return pi()?vi():Ar()}function Ei(){for(var t,n=e.createScanner(i,!1,r),o=[],s=[];;){var a=n.scan();if(5!==a&&4!==a&&3!==a){if(2!==a)break;var c={pos:n.getTokenPos(),end:n.getTextPos()},l=r.substring(c.pos,c.end),u=e.getFileReferenceFromReferencePath(l,c);if(u){var p=u.fileReference;Ri.hasNoDefaultLib=u.isNoDefaultLib;var d=u.diagnosticMessage;p&&o.push(p),d&&Ri.referenceDiagnostics.push(e.createFileDiagnostic(Ri,c.pos,c.end-c.pos,d))}else{var h=/^\/\/\/\s*<amd-module\s+name\s*=\s*('|")(.+?)\1/gim,m=h.exec(l);m&&(t&&Ri.referenceDiagnostics.push(e.createFileDiagnostic(Ri,c.pos,c.end-c.pos,e.Diagnostics.An_AMD_module_cannot_have_multiple_name_assignments)),t=m[2]);var f=/^\/\/\/\s*<amd-dependency\s+path\s*=\s*('|")(.+?)\1/gim,g=f.exec(l);g&&s.push(g[2])}}}return{referencedFiles:o,amdDependencies:s,amdModuleName:t}}function Si(){return e.forEach(Ri.statements,function(e){return 1&e.flags||191===e.kind&&193===e.moduleReference.kind||192===e.kind?e:void 0})}function Ci(){return void 0===Li&&(Ri.parseDiagnostics.length>0?Li=Ri.referenceDiagnostics.concat(Ri.parseDiagnostics):(d(r,i,Ri),Li=Ri.referenceDiagnostics.concat(Ri.grammarDiagnostics))),e.Debug.assert(void 0!==Li),Li}void 0===l&&(l=!1);var ki,xi,wi,Li,Ai={},Ni=0,Mi=0,Pi=0,Oi=!1,Ii=0;e.fileExtensionIs(t,".d.ts")&&(Ii=1024);var Ri=n(201,0,r.length,Ii);Ri.getLineAndCharacterFromPosition=L,Ri.getPositionFromLineAndCharacter=A,Ri.getLineStarts=w,Ri.getSyntacticDiagnostics=Ci,Ri.filename=e.normalizePath(t),Ri.text=r,Ri.referenceDiagnostics=[],Ri.parseDiagnostics=[],Ri.grammarDiagnostics=[],Ri.semanticDiagnostics=[];var Di=Ei();Ri.referencedFiles=Di.referencedFiles,Ri.amdDependencies=Di.amdDependencies,Ri.amdModuleName=Di.amdModuleName;var Vi=e.createScanner(i,!0,r,P);
return R(),Ri.statements=ft(0,!0,_i),e.Debug.assert(1===ki),Ri.endOfFileToken=Et(),Ri.externalModuleIndicator=Si(),Ri.nodeCount=Mi,Ri.identifierCount=Ni,Ri.version=a,Ri.isOpen=l,Ri.languageVersion=i,Ri.identifiers=Ai,Ri}function u(e){if(e)switch(e.kind){case 143:case 144:case 146:case 145:case 147:case 141:case 149:case 142:case 150:case 63:case 8:case 6:case 7:case 9:case 159:case 78:case 87:case 91:case 93:case 89:return!0}return!1}function p(e){return e>=51&&62>=e}function d(t,n,i){function o(t){var n=Ut;if(t.parent=Ut,Ut=t,!ut(t)){var r=qt;e.isFunctionBlock(t)&&(qt=!0);var i=zt;2&t.flags&&(zt=!0),c(t),zt=i,qt=r}Ut=n}function c(e){var t=e.kind;zt&&y(e,t)||l(e,t)||r(e,o)}function l(e,t){switch(t){case 151:case 129:case 134:case 130:case 133:return _(e);case 173:case 172:return S(e);case 145:case 146:return C(e);case 188:return F(e);case 157:return b(e);case 197:return N(e);case 185:return M(e);case 121:return vt(e);case 126:return I(e);case 152:return V(e);case 144:return X(e);case 192:return B(e);case 193:return $(e);case 171:return G(e);case 170:return U(e);case 184:return j(e);case 150:return q(e);case 127:return Y(e);case 196:return Q(e);case 131:return J(e);case 186:return tt(e);case 177:return E(e);case 198:return bt(e);case 125:return rt(e);case 189:return ot(e);case 142:return ct(e);case 6:return lt(e);case 123:return pt(e);case 156:return mt(e);case 155:return ft(e);case 124:return gt(e);case 174:return Et(e);case 128:return St(e);case 201:return kt(e);case 199:return Lt(e);case 176:return At(e);case 147:return Nt(e);case 178:return Mt(e);case 138:return Pt(e);case 122:return It(e);case 132:return Rt(e);case 183:return Dt(e);case 164:return Ft(e);case 175:return $t(e);case 160:return Gt(e)}}function d(n){var r=e.skipTrivia(t,n);return jt.setTextPos(r),jt.scan(),r}function h(t,n,r,o,s){var a=d(t.pos);return Wt.push(e.createFileDiagnostic(i,a,jt.getTextPos()-a,n,r,o,s)),!0}function m(t,n,r,o,s){return d(t.pos),Wt.push(e.createFileDiagnostic(i,jt.getTextPos(),0,n,r,o,s)),!0}function f(t,n,r,o,s){var a=e.getErrorSpanForNode(t),c=a.end>a.pos?e.skipTrivia(i.text,a.pos):a.pos,l=a.end-c;return Wt.push(e.createFileDiagnostic(i,c,l,n,r,o,s)),!0}function g(t,n,r,o,s,a){return Wt.push(e.createFileDiagnostic(i,t,n,r,o,s,a)),!0}function v(n){var r=t.substring(e.skipTrivia(t,n.pos),n.end);return f(n,e.Diagnostics.Invalid_use_of_0_in_strict_mode,r)}function y(t,n){switch(n){case 163:case 165:case 167:case 168:case 169:case 170:case 171:case 172:case 173:case 174:case 175:case 176:case 178:case 179:case 182:case 177:case 166:return h(t,e.Diagnostics.Statements_are_not_allowed_in_ambient_contexts)}}function _(e){return dt(e.typeParameters)||ht(e.parameters)}function b(e){return 1&e.parserContextFlags&&u(e.left)&&p(e.operator)&&a(e.left)?v(e.left):void 0}function T(e,t){switch(e.kind){case 170:case 171:case 168:case 169:return!0;case 177:return t&&T(e.statement,t)}return!1}function E(n){for(var r=n.parent;r&&!e.isAnyFunction(r);){if(177===r.kind&&r.label.text===n.label.text)return f(n.label,e.Diagnostics.Duplicate_label_0,e.getTextOfNodeFromSourceText(t,n.label));r=r.parent}}function S(t){for(var n=t;n;){if(e.isAnyFunction(n))return f(t,e.Diagnostics.Jump_target_cannot_cross_function_boundary);switch(n.kind){case 177:if(t.label&&n.label.text===t.label.text){var r=172===t.kind&&!T(n.statement,!0);return r?f(t,e.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement):!1}break;case 176:if(173===t.kind&&!t.label)return!1;break;default:if(T(n,!1)&&!t.label)return!1}n=n.parent}if(t.label){var i=173===t.kind?e.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:e.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement;return f(t,i)}var i=173===t.kind?e.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:e.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement;return f(t,i)}function C(e){return x(e.typeArguments)||k(e.arguments)}function k(e){return A(e)||w(e)}function x(e){return A(e)||L(e)}function w(t){if(t)for(var n=0,r=t.length;r>n;n++){var i=t[n];if(161===i.kind)return g(i.pos,0,e.Diagnostics.Argument_expression_expected)}}function L(n){if(n&&0===n.length){var r=n.pos-"<".length,i=e.skipTrivia(t,n.end)+">".length;return g(r,i-r,e.Diagnostics.Type_argument_list_cannot_be_empty)}}function A(t){if(t&&t.hasTrailingComma){var n=t.end-",".length,r=t.end;return g(n,r-n,e.Diagnostics.Trailing_comma_not_allowed)}}function N(n){if(n.type){var r=e.skipTrivia(t,n.name.end);return g(r,":".length,e.Diagnostics.Catch_clause_parameter_cannot_have_a_type_annotation)}return 1&n.parserContextFlags&&a(n.name)?v(n.name):void 0}function M(e){return P(e)}function P(t){var n=!1,r=!1;if(t.heritageClauses)for(var i=0,o=t.heritageClauses.length;o>i;i++){e.Debug.assert(2>=i);var s=t.heritageClauses[i];if(77===s.token){if(n)return h(s,e.Diagnostics.extends_clause_already_seen);if(r)return h(s,e.Diagnostics.extends_clause_must_precede_implements_clause);if(s.types.length>1)return h(s.types[1],e.Diagnostics.Classes_can_only_extend_a_single_class);n=!0}else{if(e.Debug.assert(100===s.token),r)return h(s,e.Diagnostics.implements_clause_already_seen);r=!0}}return!1}function O(t,n){return t&&0===t.length?g(t.pos,0,e.Diagnostics._0_list_cannot_be_empty,n):void 0}function I(e){return _(e)||R(e)||D(e)||it(e.body,!0)}function R(t){return t.typeParameters?g(t.typeParameters.pos,t.typeParameters.end-t.typeParameters.pos,e.Diagnostics.Type_parameters_cannot_appear_on_a_constructor_declaration):void 0}function D(t){return t.type?f(t.type,e.Diagnostics.Type_annotation_cannot_appear_on_a_constructor_declaration):void 0}function V(t){return 1&t.parserContextFlags&&63===t.expression.kind?f(t.expression,e.Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode):void 0}function F(t){var n=0!==(4096&t.flags),r=!1;if(!n)for(var i=!0,o=0,s=t.members.length;s>o;o++){var a=t.members[o];121===a.name.kind?r=f(a.name,e.Diagnostics.Computed_property_names_are_not_allowed_in_enums):zt?a.initializer&&!H(a.initializer)&&(r=f(a.name,e.Diagnostics.Ambient_enum_elements_can_only_have_integer_literal_initializers)||r):a.initializer?i=H(a.initializer):i||(r=f(a.name,e.Diagnostics.Enum_member_must_have_initializer)||r)}return r}function H(e){function t(e){return/^[0-9]+([eE]\+?[0-9]+)?$/.test(e.text)}if(155===e.kind){var n=e;(32===n.operator||33===n.operator)&&(e=n.operand)}return 6===e.kind?t(e):!1}function B(t){return 243&t.flags?h(t,e.Diagnostics.An_export_assignment_cannot_have_modifiers):void 0}function $(t){return 7!==t.expression.kind?f(t.expression,e.Diagnostics.String_literal_expected):void 0}function G(e){return Vt(e.declarations)||W(e.declarations)}function U(e){return Vt(e.declarations)}function W(t){return t&&t.length>1?h(t[1],e.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement):void 0}function j(e){return _(e)||K(e.name)||it(e.body,!1)||z(e)}function z(t){return t.asteriskToken?f(t.asteriskToken,e.Diagnostics.Generators_are_not_currently_supported):void 0}function q(e){return _(e)||K(e.name)||z(e)}function K(e){return e&&1&e.parserContextFlags&&a(e)?v(e):void 0}function Y(e){return _(e)||Ct(e)}function X(n){if(!n.argumentExpression){if(146===n.parent.kind&&n.parent.expression===n){var r=e.skipTrivia(t,n.expression.end),i=n.end;return g(r,i-r,e.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead)}var r=n.end-"]".length,i=n.end;return g(r,i-r,e.Diagnostics.Expression_expected)}}function Q(t){return A(t.types)||O(t.types,e.tokenToString(t.token))}function J(e){return et(e)||Z(e)}function Z(t){return 243&t.flags?h(t,e.Diagnostics.Modifiers_not_permitted_on_index_signature_members):void 0}function et(t){var n=t.parameters[0];return 1!==t.parameters.length?n?f(n.name,e.Diagnostics.An_index_signature_must_have_exactly_one_parameter):f(t,e.Diagnostics.An_index_signature_must_have_exactly_one_parameter):n.dotDotDotToken?f(n.dotDotDotToken,e.Diagnostics.An_index_signature_cannot_have_a_rest_parameter):243&n.flags?f(n.name,e.Diagnostics.An_index_signature_parameter_cannot_have_an_accessibility_modifier):n.questionToken?f(n.questionToken,e.Diagnostics.An_index_signature_parameter_cannot_have_a_question_mark):n.initializer?f(n.name,e.Diagnostics.An_index_signature_parameter_cannot_have_an_initializer):n.type?118!==n.type.kind&&116!==n.type.kind?f(n.name,e.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number):t.type?void 0:f(t,e.Diagnostics.An_index_signature_must_have_a_type_annotation):f(n.name,e.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation)}function tt(e){return nt(e)}function nt(t){var n=!1;if(t.heritageClauses)for(var r=0,i=t.heritageClauses.length;i>r;r++){e.Debug.assert(1>=r);var o=t.heritageClauses[r];if(77!==o.token)return e.Debug.assert(100===o.token),h(o,e.Diagnostics.Interface_declaration_cannot_have_implements_clause);if(n)return h(o,e.Diagnostics.extends_clause_already_seen);n=!0}return!1}function rt(t){if(_(t)||it(t.body,!1)||z(t))return!0;if(185===t.parent.kind){if(Tt(t,t.questionToken,e.Diagnostics.A_class_member_cannot_be_declared_optional))return!0;if(zt)return yt(t.name,e.Diagnostics.Computed_property_names_are_not_allowed_in_an_ambient_context);if(!t.body)return yt(t.name,e.Diagnostics.Computed_property_names_are_not_allowed_in_method_overloads)}else{if(186===t.parent.kind)return yt(t.name,e.Diagnostics.Computed_property_names_are_not_allowed_in_interfaces);if(136===t.parent.kind)return yt(t.name,e.Diagnostics.Computed_property_names_are_not_allowed_in_type_literals)}}function it(t,n){if(zt&&t&&163===t.kind){var r=n?e.Diagnostics.A_constructor_implementation_cannot_be_declared_in_an_ambient_context:e.Diagnostics.A_function_implementation_cannot_be_declared_in_an_ambient_context;return h(t,r)}}function ot(e){return st(e)||at(e)}function st(t){return zt||7!==t.name.kind?void 0:f(t.name,e.Diagnostics.Only_ambient_modules_can_use_quoted_names)}function at(t){if(63===t.name.kind&&190===t.body.kind)for(var n=t.body.statements,r=0,i=n.length;i>r;r++){var o=n[r];if(192===o.kind)return f(o,e.Diagnostics.An_export_assignment_cannot_be_used_in_an_internal_module);if(e.isExternalModuleImportDeclaration(o))return f(e.getExternalModuleImportDeclarationExpression(o),e.Diagnostics.Import_declarations_in_an_internal_module_cannot_reference_an_external_module)}}function ct(t){for(var n={},r=1,i=2,o=4,s=i|o,a=0!==(1&t.parserContextFlags),c=0,l=t.properties.length;l>c;c++){var u=t.properties[c],p=u.name;if(161!==u.kind&&121!==p.kind){var d;if(198===u.kind||199===u.kind||125===u.kind?d=r:127===u.kind?d=i:128===u.kind?d=o:e.Debug.fail("Unexpected syntax kind:"+u.kind),e.hasProperty(n,p.text)){var h=n[p.text];if(d===r&&h===r)a&&f(p,e.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode);else{if(!(d&s&&h&s))return f(p,e.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name);if(h===s||d===h)return f(p,e.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name);n[p.text]=d|h}}else n[p.text]=d}}}function lt(t){if(8192&t.flags){if(1&t.parserContextFlags)return f(t,e.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode);if(n>=1)return f(t,e.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher)}}function ut(t){switch(t.kind){case 127:case 128:case 126:case 124:case 125:case 131:case 185:case 186:case 189:case 188:case 192:case 164:case 184:case 187:case 191:case 123:break;default:return!1}if(t.modifiers){for(var n,r,i,o,a=0,c=0,l=t.modifiers.length;l>c;c++){var u=t.modifiers[c];switch(u.kind){case 106:case 105:case 104:var p;if(106===u.kind?p="public":105===u.kind?(p="protected",i=u):(p="private",r=u),112&a)return f(u,e.Diagnostics.Accessibility_modifier_already_seen);if(128&a)return f(u,e.Diagnostics._0_modifier_must_precede_1_modifier,p,"static");if(190===t.parent.kind||201===t.parent.kind)return f(u,e.Diagnostics._0_modifier_cannot_appear_on_a_module_element,p);a|=s(u.kind);break;case 107:if(128&a)return f(u,e.Diagnostics._0_modifier_already_seen,"static");if(190===t.parent.kind||201===t.parent.kind)return f(u,e.Diagnostics._0_modifier_cannot_appear_on_a_module_element,"static");if(123===t.kind)return f(u,e.Diagnostics._0_modifier_cannot_appear_on_a_parameter,"static");a|=128,n=u;break;case 76:if(1&a)return f(u,e.Diagnostics._0_modifier_already_seen,"export");if(2&a)return f(u,e.Diagnostics._0_modifier_must_precede_1_modifier,"export","declare");if(185===t.parent.kind)return f(u,e.Diagnostics._0_modifier_cannot_appear_on_a_class_element,"export");if(123===t.kind)return f(u,e.Diagnostics._0_modifier_cannot_appear_on_a_parameter,"export");a|=1;break;case 112:if(2&a)return f(u,e.Diagnostics._0_modifier_already_seen,"declare");if(185===t.parent.kind)return f(u,e.Diagnostics._0_modifier_cannot_appear_on_a_class_element,"declare");if(123===t.kind)return f(u,e.Diagnostics._0_modifier_cannot_appear_on_a_parameter,"declare");if(zt&&190===t.parent.kind)return f(u,e.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context);a|=2,o=u}}if(126===t.kind){if(128&a)return f(n,e.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration,"static");if(64&a)return f(i,e.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration,"protected");if(32&a)return f(r,e.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration,"private")}else{if(191===t.kind&&2&a)return f(o,e.Diagnostics.A_declare_modifier_cannot_be_used_with_an_import_declaration,"declare");if(186===t.kind&&2&a)return f(o,e.Diagnostics.A_declare_modifier_cannot_be_used_with_an_interface_declaration,"declare")}}}function pt(e){return 1&e.parserContextFlags&&a(e.name)?v(e.name):void 0}function dt(n){if(A(n))return!0;if(n&&0===n.length){var r=n.pos-"<".length,i=e.skipTrivia(t,n.end)+">".length;return g(r,i-r,e.Diagnostics.Type_parameter_list_cannot_be_empty)}}function ht(t){if(A(t))return!0;for(var n=!1,r=t.length,i=0;r>i;i++){var o=t[i];if(o.dotDotDotToken){if(i!==r-1)return f(o.dotDotDotToken,e.Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list);if(o.questionToken)return f(o.questionToken,e.Diagnostics.A_rest_parameter_cannot_be_optional);if(o.initializer)return f(o.name,e.Diagnostics.A_rest_parameter_cannot_have_an_initializer)}else if(o.questionToken||o.initializer){if(n=!0,o.questionToken&&o.initializer)return f(o.name,e.Diagnostics.Parameter_cannot_have_question_mark_and_initializer)}else if(n)return f(o.name,e.Diagnostics.A_required_parameter_cannot_follow_an_optional_parameter)}}function mt(e){return 1&e.parserContextFlags&&a(e.operand)?v(e.operand):void 0}function ft(e){return 1&e.parserContextFlags&&(37===e.operator||38===e.operator)&&a(e.operand)?v(e.operand):void 0}function gt(t){if(185===t.parent.kind){if(Tt(t,t.questionToken,e.Diagnostics.A_class_member_cannot_be_declared_optional)||yt(t.name,e.Diagnostics.Computed_property_names_are_not_allowed_in_class_property_declarations))return!0}else if(186===t.parent.kind){if(yt(t.name,e.Diagnostics.Computed_property_names_are_not_allowed_in_interfaces))return!0}else if(136===t.parent.kind&&yt(t.name,e.Diagnostics.Computed_property_names_are_not_allowed_in_type_literals))return!0;return _t(t)}function vt(t){return f(t,e.Diagnostics.Computed_property_names_are_not_currently_supported)}function yt(e,t){return 121===e.kind?f(e,t):void 0}function _t(t){return zt&&t.initializer?h(t.initializer,e.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts):void 0}function bt(t){return Tt(t,t.questionToken,e.Diagnostics.An_object_member_cannot_be_declared_optional)}function Tt(e,t,n){return t?f(t,n):void 0}function Et(t){return qt?void 0:h(t,e.Diagnostics.A_return_statement_can_only_be_used_within_a_function_body)}function St(e){return _(e)||Ct(e)}function Ct(t){var r=t.kind;if(1>n)return f(t.name,e.Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher);if(zt)return f(t.name,e.Diagnostics.An_accessor_cannot_be_declared_in_an_ambient_context);if(void 0===t.body)return g(t.end-1,";".length,e.Diagnostics._0_expected,"{");if(t.typeParameters)return f(t.name,e.Diagnostics.An_accessor_cannot_have_type_parameters);if(127===r&&t.parameters.length)return f(t.name,e.Diagnostics.A_get_accessor_cannot_have_parameters);if(128===r){if(t.type)return f(t.name,e.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation);if(1!==t.parameters.length)return f(t.name,e.Diagnostics.A_set_accessor_must_have_exactly_one_parameter);var i=t.parameters[0];if(i.dotDotDotToken)return f(i.dotDotDotToken,e.Diagnostics.A_set_accessor_cannot_have_rest_parameter);if(243&i.flags)return f(t.name,e.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation);if(i.questionToken)return f(i.questionToken,e.Diagnostics.A_set_accessor_cannot_have_an_optional_parameter);if(i.initializer)return f(t.name,e.Diagnostics.A_set_accessor_parameter_cannot_have_an_initializer)}}function kt(){return zt&&xt(i)}function xt(t){for(var n=0,r=t.statements.length;r>n;n++){var i=t.statements[n];if((e.isDeclaration(i)||164===i.kind)&&wt(i))return!0}}function wt(t){return 186===t.kind||191===t.kind||192===t.kind||2&t.flags?!1:h(t,e.Diagnostics.A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file)}function Lt(t){return Tt(t,t.questionToken,e.Diagnostics.An_object_member_cannot_be_declared_optional)}function At(t){for(var n,r=0,o=t.clauses.length;o>r;r++){var s=t.clauses[r];if(195===s.kind){if(void 0!==n){var a=e.skipTrivia(i.text,s.pos),c=s.statements.length>0?s.statements[0].pos:s.end;return g(a,c-a,e.Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement)}n=s}}}function Nt(t){return 2>n?h(t.template,e.Diagnostics.Tagged_templates_are_only_available_when_targeting_ECMAScript_6_and_higher):void 0}function Mt(t){return void 0===t.expression?m(t,e.Diagnostics.Line_break_not_permitted_here):void 0}function Pt(e){return A(e.elementTypes)||Ot(e)}function Ot(t){return 0===t.elementTypes.length?f(t,e.Diagnostics.A_tuple_type_element_list_cannot_be_empty):void 0}function It(t){return t.expression?h(t.expression,e.Diagnostics.Type_expected):void 0}function Rt(e){return x(e.typeArguments)}function Dt(n){if(zt&&n.initializer){var r=n.type?e.skipTrivia(t,n.type.end):e.skipTrivia(t,n.name.end);return g(r,"=".length,e.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts)}return zt||n.initializer||!e.isConst(n)?1&n.parserContextFlags&&a(n.name)?v(n.name):void 0:f(n,e.Diagnostics.const_declarations_must_be_initialized)}function Vt(t){if(t){if(A(t))return!0;if(!t.length)return g(t.pos,t.end-t.pos,e.Diagnostics.Variable_declaration_list_cannot_be_empty);var r=t[0];if(2>n){if(e.isLet(r))return h(r,e.Diagnostics.let_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher);if(e.isConst(r))return h(r,e.Diagnostics.const_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher)}}}function Ft(e){return Vt(e.declarations)||Ht(e)}function Ht(t){if(!Bt(t.parent)){if(e.isLet(t))return f(t,e.Diagnostics.let_declarations_can_only_be_declared_inside_a_block);if(e.isConst(t))return f(t,e.Diagnostics.const_declarations_can_only_be_declared_inside_a_block)}}function Bt(e){switch(e.kind){case 167:case 168:case 169:case 175:case 170:case 171:return!1;case 177:return Bt(e.parent)}return!0}function $t(t){return 1&t.parserContextFlags?h(t,e.Diagnostics.with_statements_are_not_allowed_in_strict_mode):void 0}function Gt(t){return 4&t.parserContextFlags?h(t,e.Diagnostics.yield_expressions_are_not_currently_supported):h(t,e.Diagnostics.yield_expression_must_be_contained_within_a_generator_declaration)}var Ut,Wt=i.grammarDiagnostics,jt=e.createScanner(n,!0,t),zt=e.fileExtensionIs(i.filename,".d.ts"),qt=!1;o(i)}function h(t,n,i){function o(t){return t=i.getCanonicalFileName(t),e.hasProperty(y,t)?y[t]:void 0}function s(t){return t?e.filter(_,function(e){return e.file===t}):_}function a(){return e.filter(_,function(e){return!e.file})}function c(t){return e.getBaseFilename(t).indexOf(".")>=0}function l(t,n){u(e.normalizePath(t),n)}function u(t,r,o,s,a){if(void 0!==a&&void 0!==s)var l=s,u=a-s;var d;c(t)?n.allowNonTsExtensions||e.fileExtensionIs(t,".ts")?p(t,r,o,s,a)?o&&i.getCanonicalFileName(t)===i.getCanonicalFileName(o.filename)&&(d=e.Diagnostics.A_file_cannot_have_a_reference_to_itself):d=e.Diagnostics.File_0_not_found:d=e.Diagnostics.File_0_must_have_extension_ts_or_d_ts:n.allowNonTsExtensions&&p(t,r,o,s,a)||p(t+".ts",r,o,s,a)||p(t+".d.ts",r,o,s,a)||(d=e.Diagnostics.File_0_not_found,t+=".ts"),d&&(o?_.push(e.createFileDiagnostic(o,l,u,d,t)):_.push(e.createCompilerDiagnostic(d,t)))}function p(t,r,o,s,a){function c(t,n,r){var c=y[n];if(c&&i.useCaseSensitiveFileNames()){var l=r?e.getNormalizedAbsolutePath(c.filename,i.getCurrentDirectory()):c.filename;n!==l&&_.push(e.createFileDiagnostic(o,s,a,e.Diagnostics.Filename_0_differs_from_already_included_filename_1_only_in_casing,t,l))}return c}var l=i.getCanonicalFileName(t);if(e.hasProperty(y,l))return c(t,l,!1);var u=e.getNormalizedAbsolutePath(t,i.getCurrentDirectory()),p=i.getCanonicalFileName(u);if(e.hasProperty(y,p))return c(u,p,!0);var m=y[l]=i.getSourceFile(t,n.target,function(n){_.push(e.createFileDiagnostic(o,s,a,e.Diagnostics.Cannot_read_file_0_Colon_1,t,n))});if(m){if(b=b||m.hasNoDefaultLib,y[p]=m,!n.noResolve){var f=e.getDirectoryPath(t);d(m,f),h(m,f)}r?v.unshift(m):v.push(m),e.forEach(m.getSyntacticDiagnostics(),function(e){_.push(e)})}return m}function d(t,n){e.forEach(t.referencedFiles,function(r){var i=e.isRootedDiskPath(r.filename)?r.filename:e.combinePaths(n,r.filename);u(e.normalizePath(i),!1,t,r.pos,r.end)})}function h(t,n){function i(e,n){return p(e,!1,t,n.pos,n.end-n.pos)}e.forEach(t.statements,function(o){if(e.isExternalModuleImportDeclaration(o)&&7===e.getExternalModuleImportDeclarationExpression(o).kind){var s=e.getExternalModuleImportDeclarationExpression(o),a=s.text;if(a)for(var c=n;;){var l=e.normalizePath(e.combinePaths(c,a));if(i(l+".ts",s)||i(l+".d.ts",s)||i(l+".js",s))break;var u=e.getDirectoryPath(c);if(u===c)break;c=u}}else 189===o.kind&&7===o.name.kind&&(2&o.flags||e.isDeclarationFile(t))&&r(o.body,function(t){if(e.isExternalModuleImportDeclaration(t)&&7===e.getExternalModuleImportDeclarationExpression(t).kind){var r=e.getExternalModuleImportDeclarationExpression(t),o=r.text;if(o){var s=e.normalizePath(e.combinePaths(n,o)),a=i(s+".ts",r);a||i(s+".d.ts",r)}}})})}function m(){if(!n.sourceMap&&(n.mapRoot||n.sourceRoot))return n.mapRoot&&_.push(e.createCompilerDiagnostic(e.Diagnostics.Option_mapRoot_cannot_be_specified_without_specifying_sourcemap_option)),n.sourceRoot&&_.push(e.createCompilerDiagnostic(e.Diagnostics.Option_sourceRoot_cannot_be_specified_without_specifying_sourcemap_option)),void 0;var t=e.forEach(v,function(t){return e.isExternalModule(t)?t:void 0});if(t&&0===n.module){var r=e.getErrorSpanForNode(t.externalModuleIndicator),o=e.skipTrivia(t.text,r.pos),s=r.end-o;_.push(e.createFileDiagnostic(t,o,s,e.Diagnostics.Cannot_compile_external_modules_unless_the_module_flag_is_provided))}if(n.outDir||n.sourceRoot||n.mapRoot&&(!n.out||void 0!==t)){var a;e.forEach(v,function(t){if(!(1024&t.flags||e.fileExtensionIs(t.filename,".js"))){var n=e.getNormalizedPathComponents(t.filename,i.getCurrentDirectory());if(n.pop(),a){for(var r=0;r<Math.min(a.length,n.length);r++)if(a[r]!==n[r]){if(0===r)return _.push(e.createCompilerDiagnostic(e.Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files)),void 0;a.length=r;break}n.length<a.length&&(a.length=n.length)}else a=n}}),g=e.getNormalizedPathFromPathComponents(a),g&&(g+=e.directorySeparator)}}var f,g,v=[],y={},_=[],b=n.noLib;return e.forEach(t,function(e){return l(e,!1)}),b||l(i.getDefaultLibFilename(n),!0),m(),_.sort(e.compareDiagnostics),f={getSourceFile:o,getSourceFiles:function(){return v},getCompilerOptions:function(){return n},getCompilerHost:function(){return i},getDiagnostics:s,getGlobalDiagnostics:a,getTypeChecker:function(t){return e.createTypeChecker(f,t)},getCommonSourceDirectory:function(){return g}}}var m=new Array(204);e.getNodeConstructor=t,e.forEachChild=r,e.createCompilerHost=i;var f;!function(e){e[e.SourceElements=0]="SourceElements",e[e.ModuleElements=1]="ModuleElements",e[e.BlockStatements=2]="BlockStatements",e[e.SwitchClauses=3]="SwitchClauses",e[e.SwitchClauseStatements=4]="SwitchClauseStatements",e[e.TypeMembers=5]="TypeMembers",e[e.ClassMembers=6]="ClassMembers",e[e.EnumMembers=7]="EnumMembers",e[e.TypeReferences=8]="TypeReferences",e[e.VariableDeclarations=9]="VariableDeclarations",e[e.ArgumentExpressions=10]="ArgumentExpressions",e[e.ObjectLiteralMembers=11]="ObjectLiteralMembers",e[e.ArrayLiteralMembers=12]="ArrayLiteralMembers",e[e.Parameters=13]="Parameters",e[e.TypeParameters=14]="TypeParameters",e[e.TypeArguments=15]="TypeArguments",e[e.TupleElementTypes=16]="TupleElementTypes",e[e.HeritageClauses=17]="HeritageClauses",e[e.Count=18]="Count"}(f||(f={}));var g;!function(e){e[e.False=0]="False",e[e.True=1]="True",e[e.Unknown=2]="Unknown"}(g||(g={})),e.createSourceFile=l,e.createProgram=h}(ts||(ts={}));var ts;!function(e){function t(n){if(186===n.kind)return 0;if(e.isConstEnumDeclaration(n))return 2;if(191!==n.kind||1&n.flags){if(190===n.kind){var r=0;return e.forEachChild(n,function(e){switch(t(e)){case 0:return!1;case 2:return r=2,!1;case 1:return r=1,!0}}),r}return 189===n.kind?t(n.body):1}return 0}function n(e){return e.name&&121===e.name.kind}function r(r){function i(e,t){return C++,new k(e,t)}function o(e,t,n){e.flags|=n,e.declarations||(e.declarations=[]),e.declarations.push(t),1952&n&&!e.exports&&(e.exports={}),6240&n&&!e.members&&(e.members={}),t.symbol=e,107455&n&&!e.valueDeclaration&&(e.valueDeclaration=t)}function s(t){if(t.name)return 189===t.kind&&7===t.name.kind?'"'+t.name.text+'"':(e.Debug.assert(!n(t)),t.name.text);switch(t.kind){case 134:case 126:return"__constructor";case 133:case 129:return"__call";case 130:return"__new";case 131:return"__index"}}function a(t){return t.name?e.declarationNameToString(t.name):s(t)}function c(t,c,l,u,p){if(n(l))return void 0;var d=s(l);if(void 0!==d){var h=e.hasProperty(t,d)?t[d]:t[d]=i(0,d);if(h.flags&p){l.name&&(l.name.parent=l);var m=2&h.flags?e.Diagnostics.Cannot_redeclare_block_scoped_variable_0:e.Diagnostics.Duplicate_identifier_0;e.forEach(h.declarations,function(t){r.semanticDiagnostics.push(e.createDiagnosticForNode(t.name,m,a(t)))}),r.semanticDiagnostics.push(e.createDiagnosticForNode(l.name,m,a(l))),h=i(0,d)}}else h=i(0,"__missing");if(o(h,l,u),h.parent=c,185===l.kind&&h.exports){var f=i(536870916,"prototype");e.hasProperty(h.exports,f.name)&&(l.name&&(l.name.parent=l),r.semanticDiagnostics.push(e.createDiagnosticForNode(h.exports[f.name].declarations[0],e.Diagnostics.Duplicate_identifier_0,f.name))),h.exports[f.name]=f,f.parent=h}return h}function l(e){for(;e;){if(2&e.flags)return!0;e=e.parent}return!1}function u(e,t,n){var r=0;if(107455&t&&(r|=4194304),3152352&t&&(r|=8388608),1536&t&&(r|=16777216),1&e.flags||191!==e.kind&&l(T))if(r){var i=c(T.locals,void 0,e,r,n);i.exportSymbol=c(T.symbol.exports,T.symbol,e,t,n),e.localSymbol=i}else c(T.symbol.exports,T.symbol,e,t,n);else c(T.locals,void 0,e,t,n)}function p(t,n,r){1041936&n&&(t.locals={});var i=b,o=T,s=E;b=t,1048560&n&&(T=t,S===T||T.nextContainer||(S&&(S.nextContainer=T),S=T)),r&&(E=t),e.forEachChild(t,_),T=o,b=i,E=s}function d(t,n,r,i){switch(T.kind){case 189:u(t,n,r);break;case 201:if(e.isExternalModule(T)){u(t,n,r);break}case 133:case 134:case 129:case 130:case 131:case 125:case 126:case 127:case 128:case 184:case 150:case 151:c(T.locals,void 0,t,n,r);break;case 185:if(128&t.flags){c(T.symbol.exports,T.symbol,t,n,r);break}case 136:case 142:case 186:c(T.symbol.members,T.symbol,t,n,r);break;case 188:c(T.symbol.exports,T.symbol,t,n,r)}p(t,n,i)}function h(t){d(t,16384,0,!0),e.forEach(t.parameters,function(e){112&e.flags&&d(e,4,107455,!1)})}function m(e){if(7===e.name.kind)d(e,512,106639,!0);else{var n=t(e);0===n?d(e,1024,0,!0):(d(e,512,106639,!0),2===n?e.symbol.constEnumOnlyModule=!0:e.symbol.constEnumOnlyModule&&(e.symbol.constEnumOnlyModule=!1))}}function f(e){var t=133===e.kind?131072:262144,n=i(t,s(e));o(n,e,t),p(e,t,!1);var r=i(2048,"__type");o(r,e,2048),r.members={},r.members[133===e.kind?"__call":"__new"]=n}function g(e,t,n,r){var s=i(t,n);o(s,e,t),p(e,t,r)}function v(t){var n=i(1,t.name.text||"__missing");o(n,t,1);var r=b,s=E;b=E=t,e.forEachChild(t,_),b=r,E=s}function y(t){switch(E.kind){case 189:u(t,2,107455);break;case 201:if(e.isExternalModule(T)){u(t,2,107455);break}default:E.locals||(E.locals={}),c(E.locals,void 0,t,2,107455)}p(t,2,!1)}function _(t){switch(t.parent=b,t.kind){case 122:d(t,1048576,2103776,!1);break;case 123:d(t,1,107455,!1);break;case 183:6144&t.flags?y(t):d(t,1,107454,!1);break;case 124:case 198:case 199:d(t,4,107455,!1);break;case 200:d(t,8,107455,!1);break;case 129:d(t,131072,0,!1);break;case 130:d(t,262144,0,!0);break;case 125:d(t,8192,e.isObjectLiteralMethod(t)?107455:99263,!0);break;case 131:d(t,524288,0,!1);break;case 184:d(t,16,106927,!0);break;case 126:h(t);break;case 127:d(t,32768,41919,!0);break;case 128:d(t,65536,74687,!0);break;case 133:case 134:f(t);break;case 136:g(t,2048,"__type",!1);break;case 142:g(t,4096,"__object",!1);break;case 150:case 151:g(t,16,"__function",!0);break;case 197:v(t);break;case 185:d(t,32,3258879,!1);break;case 186:d(t,64,3152288,!1);break;case 187:d(t,2097152,3152352,!1);break;case 188:e.isConst(t)?d(t,128,3259263,!1):d(t,256,3258623,!1);break;case 189:m(t);break;case 191:d(t,33554432,33554432,!1);break;case 201:if(e.isExternalModule(t)){g(t,512,'"'+e.removeFileExtension(t.filename)+'"',!0);break}case 163:case 180:case 197:case 181:case 170:case 171:case 176:p(t,0,!0);break;default:var n=b;b=t,e.forEachChild(t,_),b=n}}var b,T,E,S,C=0,k=e.objectAllocator.getSymbolConstructor();r.locals||(r.locals={},T=E=r,_(r),r.symbolCount=C)}!function(e){e[e.NonInstantiated=0]="NonInstantiated",e[e.Instantiated=1]="Instantiated",e[e.ConstEnumOnly=2]="ConstEnumOnly"}(e.ModuleInstanceState||(e.ModuleInstanceState={}));e.ModuleInstanceState;e.getModuleInstanceState=t,e.hasComputedNameButNotSymbol=n,e.bindSourceFile=r}(ts||(ts={}));var ts;!function(e){function t(e){return void 0===y[e]&&(y[e]=t(e-1)+y[1]),y[e]}function n(){return y[1].length}function r(t,n){return e.isDeclarationFile(t)?!1:!e.isExternalModule(t)&&n.out||e.fileExtensionIs(t.filename,".js")?!1:!0}function i(t){return e.isExternalModule(t)||e.isDeclarationFile(t)}function o(r){function i(e){e&&e.length&&(p&&(l+=t(u),p=!1),l+=e)}function o(e){void 0!==e&&(p&&(p=!1),l+=e)}function s(t){if(t&&t.length){i(t);var n=e.computeLineStarts(t);n.length>1&&(d=d+n.length-1,h=l.length-t.length+n[n.length-1])}}function a(){p||(l+=r,d++,h=l.length,p=!0)}function c(t,n){i(e.getSourceTextOfNodeFromSourceFile(t,n))}var l="",u=0,p=!0,d=0,h=0;return{write:i,rawWrite:o,writeTextOfNode:c,writeLiteral:s,writeLine:a,increaseIndent:function(){return u++},decreaseIndent:function(){return u--},getIndent:function(){return u},getTextPos:function(){return l.length},getLine:function(){return d+1},getColumn:function(){return p?u*n()+1:l.length-h+1},getText:function(){return l}}}function s(e,t){return e.getLineAndCharacterFromPosition(t).line}function a(e,t,n,r){r&&r.length&&n.pos!==r[0].pos&&s(e,n.pos)!==s(e,r[0].pos)&&t.writeLine()}function c(t,n,r,i,o,s){var a=!i;e.forEach(r,function(e){a&&(n.write(" "),a=!1),s(t,n,e,o),e.hasTrailingNewLine?n.writeLine():i?n.write(" "):a=!0})}function l(r,i,o,s){function a(e,t){var n=Math.min(o.end,t-1),a=r.text.substring(e,n).replace(/^\s+|\s+$/g,"");a?(i.write(a),n!==o.end&&i.writeLine()):i.writeLiteral(s)}function c(t,i){for(var o=0;i>t&&e.isWhiteSpace(r.text.charCodeAt(t));t++)9===r.text.charCodeAt(t)?o+=n()-o%n():o++;return o}if(42===r.text.charCodeAt(o.pos+1))for(var l,u=r.getLineAndCharacterFromPosition(o.pos),p=o.pos,d=u.line;p<o.end;d++){var h=r.getPositionFromLineAndCharacter(d+1,1);
if(p!==o.pos){void 0===l&&(l=c(r.getPositionFromLineAndCharacter(u.line,1),o.pos));var m=i.getIndent()*n(),f=m-l+c(p,h);if(f>0){var g=f%n(),v=t((f-g)/n());for(i.rawWrite(v);g;)i.rawWrite(" "),g--}else i.rawWrite("")}a(p,h),p=h}else i.write(r.text.substring(o.pos,o.end))}function u(t){return e.forEach(t.members,function(e){return 126===e.kind&&e.body?e:void 0})}function p(t,n){var r,i,o;return 121===n.name.kind?(r=n,127===n.kind?i=n:128===n.kind?o=n:e.Debug.fail("Accessor has wrong kind")):e.forEach(t.members,function(e){127!==e.kind&&128!==e.kind||e.name.text!==n.name.text||(128&e.flags)!==(128&n.flags)||(r||(r=e),127!==e.kind||i||(i=e),128!==e.kind||o||(o=e))}),{firstAccessor:r,getAccessor:i,setAccessor:o}}function d(t,n,r){var i=n.getCompilerHost(),o=e.getNormalizedAbsolutePath(t.filename,i.getCurrentDirectory());return o=o.replace(n.getCommonSourceDirectory(),""),e.combinePaths(r,o)}function h(t,n,r){var i=n.getCompilerOptions();if(i.outDir)var o=e.removeFileExtension(d(t,n,i.outDir));else var o=e.removeFileExtension(t.filename);return o+r}function m(t,n,r,i,o){t.writeFile(r,i,o,function(t){n.push(e.createCompilerDiagnostic(e.Diagnostics.Could_not_write_file_0_Colon_1,r,t))})}function f(t,n,s,d,m){function f(){var e=o(st);return e.trackSymbol=_,e.writeKeyword=e.write,e.writeOperator=e.write,e.writePunctuation=e.write,e.writeSpace=e.write,e.writeStringLiteral=e.writeLiteral,e.writeParameter=e.write,e.writeSymbol=e.write,g(e),e}function g(e){lt=e,Z=e.write,rt=e.writeTextOfNode,et=e.writeLine,tt=e.increaseIndent,nt=e.decreaseIndent}function v(t){var n=lt;e.forEach(t,function(t){var n=e.forEach(dt,function(e){return e.declaration===t?e:void 0});if(n){f();for(var r=n.indent;r;r--)tt();O(t),n.asynchronousOutput=lt.getText()}}),g(n)}function y(t){if(0===t.accessibility)t&&t.aliasesToMakeVisible&&v(t.aliasesToMakeVisible);else{ut=!0;var n=lt.getSymbolAccessibilityDiagnostic(t);n&&(n.typeName?s.push(e.createDiagnosticForNode(t.errorNode||n.errorNode,n.diagnosticMessage,e.getSourceTextOfNodeFromSourceFile(ot,n.typeName),t.errorSymbolName,t.errorModuleName)):s.push(e.createDiagnosticForNode(t.errorNode||n.errorNode,n.diagnosticMessage,t.errorSymbolName,t.errorModuleName)))}}function _(e,t,r){y(n.isSymbolAccessible(e,t,r))}function b(e,t,r){lt.getSymbolAccessibilityDiagnostic=r,Z(": "),t?w(t):n.writeTypeOfDeclaration(e,it,2,lt)}function T(e,t){lt.getSymbolAccessibilityDiagnostic=t,Z(": "),e.type?w(e.type):n.writeReturnTypeOfSignatureDeclaration(e,it,2,lt)}function E(e){for(var t=0,n=e.length;n>t;t++)Q(e[t])}function S(e,t,n){for(var r=lt.getTextPos(),i=0,o=e.length;o>i;i++)r!==lt.getTextPos()&&Z(t),r=lt.getTextPos(),n(e[i])}function C(e,t){S(e,", ",t)}function k(t){if(t){var n=e.getJsDocComments(t,ot);a(ot,lt,t,n),c(ot,lt,n,!0,st,l)}}function x(e,t){lt.getSymbolAccessibilityDiagnostic=t,w(e)}function w(t){function r(e){function t(e){if(63===e.kind)rt(ot,e);else{var n=e;t(n.left),Z("."),rt(ot,n.right)}}var r=n.isEntityNameVisible(e,191===e.parent.kind?e.parent:it);y(r),t(e)}function i(e){r(e.typeName),e.typeArguments&&(Z("<"),C(e.typeArguments,w),Z(">"))}function o(e){Z("typeof "),r(e.exprName)}function s(e){w(e.elementType),Z("[]")}function a(e){Z("["),C(e.elementTypes,w),Z("]")}function c(e){S(e.types," | ",w)}function l(e){Z("("),w(e.type),Z(")")}function u(e){Z("{"),e.members.length&&(et(),tt(),E(e.members),nt()),Z("}")}switch(t.kind){case 109:case 118:case 116:case 110:case 97:case 7:return rt(ot,t);case 132:return i(t);case 135:return o(t);case 137:return s(t);case 138:return a(t);case 139:return c(t);case 140:return l(t);case 133:case 134:return K(t);case 136:return u(t);case 63:return r(t);case 120:return r(t);default:e.Debug.fail("Unknown type annotation: "+t.kind)}}function L(e){ot=e,it=e,E(e.statements)}function A(e){Z("export = "),rt(ot,e.exportName),Z(";"),et()}function N(e){e.parent===ot&&(1&e.flags&&Z("export "),186!==e.kind&&Z("declare "))}function M(e){32&e.flags?Z("private "):64&e.flags&&Z("protected "),128&e.flags&&Z("static ")}function P(e){var t={declaration:e,outputPos:lt.getTextPos(),indent:lt.getIndent(),hasWritten:n.isDeclarationVisible(e)};dt.push(t),t.hasWritten&&O(e)}function O(t){function n(){return{diagnosticMessage:e.Diagnostics.Import_declaration_0_is_using_private_name_1,errorNode:t,typeName:t.name}}pt(t),1&t.flags&&Z("export "),Z("import "),rt(ot,t.name),Z(" = "),e.isInternalModuleImportDeclaration(t)?(x(t.moduleReference,n),Z(";")):(Z("require("),rt(ot,e.getExternalModuleImportDeclarationExpression(t)),Z(");")),lt.writeLine()}function I(e){if(n.isDeclarationVisible(e)){for(pt(e),N(e),Z("module "),rt(ot,e.name);190!==e.body.kind;)e=e.body,Z("."),rt(ot,e.name);var t=it;it=e,Z(" {"),et(),tt(),E(e.body.statements),nt(),Z("}"),et(),it=t}}function R(t){function r(){return{diagnosticMessage:e.Diagnostics.Exported_type_alias_0_has_or_is_using_private_name_1,errorNode:t.type,typeName:t.name}}n.isDeclarationVisible(t)&&(pt(t),N(t),Z("type "),rt(ot,t.name),Z(" = "),x(t.type,r),Z(";"),et())}function D(t){n.isDeclarationVisible(t)&&(pt(t),N(t),e.isConst(t)&&Z("const "),Z("enum "),rt(ot,t.name),Z(" {"),et(),tt(),E(t.members),nt(),Z("}"),et())}function V(e){pt(e),rt(ot,e.name);var t=n.getEnumMemberValue(e);void 0!==t&&(Z(" = "),Z(t.toString())),Z(","),et()}function F(t){function n(t){function n(){var n;switch(t.parent.kind){case 185:n=e.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1;break;case 186:n=e.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1;break;case 130:n=e.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 129:n=e.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 125:n=128&t.parent.flags?e.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:185===t.parent.parent.kind?e.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:e.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;break;case 184:n=e.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1;break;default:e.Debug.fail("This is unknown parent for type parameter: "+t.parent.kind)}return{diagnosticMessage:n,errorNode:t,typeName:t.name}}tt(),pt(t),nt(),rt(ot,t.name),!t.constraint||125===t.parent.kind&&32&t.parent.flags||(Z(" extends "),133===t.parent.kind||134===t.parent.kind||t.parent.parent&&136===t.parent.parent.kind?(e.Debug.assert(125===t.parent.kind||133===t.parent.kind||134===t.parent.kind||129===t.parent.kind||130===t.parent.kind),w(t.constraint)):x(t.constraint,n))}t&&(Z("<"),C(t,n),Z(">"))}function H(t,n){function r(t){function r(){var r;return r=185===t.parent.parent.kind?n?e.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:e.Diagnostics.Extends_clause_of_exported_class_0_has_or_is_using_private_name_1:e.Diagnostics.Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1,{diagnosticMessage:r,errorNode:t,typeName:t.parent.parent.name}}x(t,r)}t&&(Z(n?" implements ":" extends "),C(t,r))}function B(t){function r(t){t&&e.forEach(t.parameters,function(e){112&e.flags&&G(e)})}if(n.isDeclarationVisible(t)){pt(t),N(t),Z("class "),rt(ot,t.name);var i=it;it=t,F(t.typeParameters);var o=e.getClassBaseTypeNode(t);o&&H([o],!1),H(e.getClassImplementedTypeNodes(t),!0),Z(" {"),et(),tt(),r(u(t)),E(t.members),nt(),Z("}"),et(),it=i}}function $(t){if(n.isDeclarationVisible(t)){pt(t),N(t),Z("interface "),rt(ot,t.name);var r=it;it=t,F(t.typeParameters),H(e.getInterfaceBaseTypeNodes(t),!1),Z(" {"),et(),tt(),E(t.members),nt(),Z("}"),et(),it=r}}function G(e){pt(e),M(e),U(e),Z(";"),et()}function U(t){function r(n){var r;return 183===t.kind?r=n.errorModuleName?2===n.accessibility?e.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1:124===t.kind&&(r=128&t.flags?n.errorModuleName?2===n.accessibility?e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:185===t.parent.kind?n.errorModuleName?2===n.accessibility?e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1:n.errorModuleName?e.Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1),void 0!==r?{diagnosticMessage:r,errorNode:t,typeName:t.name}:void 0}(183!==t.kind||n.isDeclarationVisible(t))&&(rt(ot,t.name),124===t.kind&&e.hasQuestionToken(t)&&Z("?"),124===t.kind&&136===t.parent.kind?W(t):32&t.flags||b(t,t.type,r))}function W(e){e.type&&(Z(": "),w(e.type))}function j(t){var r=e.forEach(t.declarations,function(e){return n.isDeclarationVisible(e)});r&&(pt(t),N(t),e.isLet(t)?Z("let "):e.isConst(t)?Z("const "):Z("var "),C(t.declarations,U),Z(";"),et())}function z(t){function n(e){return e?127===e.kind?e.type:e.parameters[0].type:void 0}function r(t){var n;return 128===o.kind?(n=128&o.parent.flags?t.errorModuleName?e.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1:t.errorModuleName?e.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1,{diagnosticMessage:n,errorNode:o.parameters[0],typeName:o.name}):(n=128&o.flags?t.errorModuleName?2===t.accessibility?e.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:e.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0:t.errorModuleName?2===t.accessibility?e.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:e.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0,{diagnosticMessage:n,errorNode:o.name,typeName:void 0})}var i=p(t.parent,t);if(t===i.firstAccessor){if(pt(i.getAccessor),pt(i.setAccessor),M(t),rt(ot,t.name),!(32&t.flags)){var o=t,s=n(t);if(!s){var a=127===t.kind?i.setAccessor:i.getAccessor;s=n(a),s&&(o=a)}b(t,s,r)}Z(";"),et()}}function q(t){184===t.kind&&!n.isDeclarationVisible(t)||n.isImplementationOfOverload(t)||(pt(t),184===t.kind?N(t):125===t.kind&&M(t),184===t.kind?(Z("function "),rt(ot,t.name)):126===t.kind?Z("constructor"):(rt(ot,t.name),e.hasQuestionToken(t)&&Z("?")),Y(t))}function K(e){pt(e),Y(e)}function Y(t){function n(n){var r;switch(t.kind){case 130:r=n.errorModuleName?e.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 129:r=n.errorModuleName?e.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 131:r=n.errorModuleName?e.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 125:r=128&t.flags?n.errorModuleName?2===n.accessibility?e.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:e.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:185===t.parent.kind?n.errorModuleName?2===n.accessibility?e.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:e.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:n.errorModuleName?e.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0;break;case 184:r=n.errorModuleName?2===n.accessibility?e.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:e.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0;break;default:e.Debug.fail("This is unknown kind for signature: "+t.kind)}return{diagnosticMessage:r,errorNode:t.name||t}}(130===t.kind||134===t.kind)&&Z("new "),F(t.typeParameters),131===t.kind?Z("["):Z("(");var r=it;it=t,C(t.parameters,X),131===t.kind?Z("]"):Z(")");var i=133===t.kind||134===t.kind;i||136===t.parent.kind?t.type&&(Z(i?" => ":": "),w(t.type)):126===t.kind||32&t.flags||T(t,n),it=r,i||(Z(";"),et())}function X(t){function n(n){var r;switch(t.parent.kind){case 126:r=n.errorModuleName?2===n.accessibility?e.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1;break;case 130:r=n.errorModuleName?e.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 129:r=n.errorModuleName?e.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 125:r=128&t.parent.flags?n.errorModuleName?2===n.accessibility?e.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:185===t.parent.parent.kind?n.errorModuleName?2===n.accessibility?e.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:n.errorModuleName?e.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;break;case 184:r=n.errorModuleName?2===n.accessibility?e.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1;break;default:e.Debug.fail("This is unknown parent for parameter: "+t.parent.kind)}return{diagnosticMessage:r,errorNode:t,typeName:t.name}}tt(),pt(t),t.dotDotDotToken&&Z("..."),rt(ot,t.name),(t.initializer||e.hasQuestionToken(t))&&Z("?"),nt(),133===t.parent.kind||134===t.parent.kind||136===t.parent.parent.kind?W(t):32&t.parent.flags||b(t,t.type,n)}function Q(e){switch(e.kind){case 126:case 184:case 125:return q(e);case 130:case 129:case 131:return K(e);case 127:case 128:return z(e);case 164:return j(e);case 124:return G(e);case 186:return $(e);case 185:return B(e);case 187:return R(e);case 200:return V(e);case 188:return D(e);case 189:return I(e);case 191:return P(e);case 192:return A(e);case 201:return L(e)}}function J(n){var i=1024&n.flags?n.filename:r(n,at)?h(n,t,".d.ts"):e.removeFileExtension(at.out)+".d.ts";i=e.getRelativePathToDirectoryOrUrl(e.getDirectoryPath(e.normalizeSlashes(d)),i,ct.getCurrentDirectory(),ct.getCanonicalFileName,!1),ht+='/// <reference path="'+i+'" />'+st}var Z,et,tt,nt,rt,it,ot,st=t.getCompilerHost().getNewLine(),at=t.getCompilerOptions(),ct=t.getCompilerHost(),lt=f(),ut=!1,pt=at.removeComments?function(){}:k,dt=[],ht="";if(m){if(!at.noResolve){var mt=!1;e.forEach(m.referencedFiles,function(n){var o=e.tryResolveScriptReference(t,m,n);o&&(1024&o.flags||r(o,at)||!mt)&&(J(o),i(o)||(mt=!0))})}Q(m)}else{var ft=[];e.forEach(t.getSourceFiles(),function(n){i(n)||(at.noResolve||e.forEach(n.referencedFiles,function(r){var o=e.tryResolveScriptReference(t,n,r);o&&i(o)&&!e.contains(ft,o)&&(J(o),ft.push(o))}),Q(n))})}return{reportedDeclarationError:ut,aliasDeclarationEmitInfo:dt,synchronousDeclarationOutput:lt.getText(),referencePathsOutput:ht}}function g(e,t,n){var r=[],i=h(n,e,".js");return f(e,t,r,i,n),r}function v(t,n){function g(n,r){function h(){function t(){return N.length?N[N.length-1]:-1}function i(){function e(e){function t(e){if(64>e)return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e);throw TypeError(e+": not a 64 based value")}0>e?e=(-e<<1)+1:e<<=1;var n="";do{var r=31&e;e>>=5,e>0&&(r=32|r),n+=t(r)}while(e>0);return n}if(w&&w!==M){var t=M.emittedColumn;if(M.emittedLine==w.emittedLine)fn.sourceMapMappings&&(fn.sourceMapMappings+=",");else{for(var n=M.emittedLine;n<w.emittedLine;n++)fn.sourceMapMappings+=";";t=1}fn.sourceMapMappings+=e(w.emittedColumn-t),fn.sourceMapMappings+=e(w.sourceIndex-M.sourceIndex),fn.sourceMapMappings+=e(w.sourceLine-M.sourceLine),fn.sourceMapMappings+=e(w.sourceColumn-M.sourceColumn),w.nameIndex>=0&&(fn.sourceMapMappings+=e(w.nameIndex-P),P=w.nameIndex),M=w,fn.sourceMapDecodedMappings.push(M)}}function o(e){var n=hn.getLineAndCharacterFromPosition(e),r=gn.getLine(),o=gn.getColumn();!w||w.emittedLine!=r||w.emittedColumn!=o||w.sourceIndex===L&&(w.sourceLine>n.line||w.sourceLine===n.line&&w.sourceColumn>n.character)?(i(),w={emittedLine:r,emittedColumn:o,sourceLine:n.line,sourceColumn:n.character,nameIndex:t(),sourceIndex:L}):(w.sourceLine=n.line,w.sourceColumn=n.character,w.sourceIndex=L)}function s(t){o(e.skipTrivia(hn.text,t.pos))}function a(e){o(e.end)}function c(t,n,r){var i=e.skipTrivia(hn.text,n);o(i);var s=g(t,i,r);return o(s),s}function u(t){var n=T.sourceRoot?_.getCommonSourceDirectory():x;fn.sourceMapSources.push(e.getRelativePathToDirectoryOrUrl(n,t.filename,b.getCurrentDirectory(),b.getCanonicalFileName,!0)),L=fn.sourceMapSources.length-1,fn.inputSourceFileNames.push(t.filename)}function p(n,r){function i(e){N.push(e)}function o(n){var r=-1;if(n){var o=t();-1!==o&&(n=fn.sourceMapNames[o]+"."+n),r=e.getProperty(A,n),void 0===r&&(r=fn.sourceMapNames.length,fn.sourceMapNames.push(n),A[n]=r)}i(r)}r?o(r):184===n.kind||150===n.kind||125===n.kind||127===n.kind||128===n.kind||189===n.kind||185===n.kind||188===n.kind?(n.name&&(r=n.name.text),o(r)):i(t())}function h(){N.pop()}function v(e,t,n,r){o(n.pos),l(hn,t,n,r),o(n.end)}function y(t,n,r,i,o,s){function a(t){for(var n="",r=0,i=t.length;i>r;r++)r&&(n+=","),n+='"'+e.escapeString(t[r])+'"';return n}return"undefined"!=typeof JSON?JSON.stringify({version:t,file:n,sourceRoot:r,sources:i,names:o,mappings:s}):'{"version":'+t+',"file":"'+e.escapeString(n)+'","sourceRoot":"'+e.escapeString(r)+'","sources":['+a(i)+'],"names":['+a(o)+'],"mappings":"'+e.escapeString(s)+'"}'}function C(e,t){i(),m(b,S,fn.sourceMapFilePath,y(3,fn.sourceMapFile,fn.sourceMapSourceRoot,fn.sourceMapSources,fn.sourceMapNames,fn.sourceMapMappings),!1),E.push(fn),f(e+"//# sourceMappingURL="+fn.jsSourceMappingURL,t)}function k(e){e&&(201!=e.kind?(s(e),rn(e),a(e)):(u(e),rn(e)))}var x,w,L=-1,A={},N=[],M={emittedLine:1,emittedColumn:1,sourceLine:1,sourceColumn:1,sourceIndex:0},P=0,O=e.getBaseFilename(e.normalizeSlashes(n));fn={sourceMapFilePath:n+".map",jsSourceMappingURL:O+".map",sourceMapFile:O,sourceMapSourceRoot:T.sourceRoot||"",sourceMapSources:[],inputSourceFileNames:[],sourceMapNames:[],sourceMapMappings:"",sourceMapDecodedMappings:[]},fn.sourceMapSourceRoot=e.normalizeSlashes(fn.sourceMapSourceRoot),fn.sourceMapSourceRoot.length&&47!==fn.sourceMapSourceRoot.charCodeAt(fn.sourceMapSourceRoot.length-1)&&(fn.sourceMapSourceRoot+=e.directorySeparator),T.mapRoot?(x=e.normalizeSlashes(T.mapRoot),r&&(x=e.getDirectoryPath(d(r,_,x))),e.isRootedDiskPath(x)||e.isUrl(x)?fn.jsSourceMappingURL=e.combinePaths(x,fn.jsSourceMappingURL):(x=e.combinePaths(_.getCommonSourceDirectory(),x),fn.jsSourceMappingURL=e.getRelativePathToDirectoryOrUrl(e.getDirectoryPath(e.normalizePath(n)),e.combinePaths(x,fn.jsSourceMappingURL),b.getCurrentDirectory(),b.getCanonicalFileName,!0))):x=e.getDirectoryPath(e.normalizePath(n)),Sn=C,Nn=k,Mn=s,Pn=a,On=c,In=p,Rn=h,An=v}function f(e,t){m(b,S,n,e,t)}function g(t,n,r){var i=e.tokenToString(t);return r?r():vn(i),n+i.length}function v(e,t){t&&(vn(e),Nn(t))}function y(e,t){e.hasTrailingComma&&(vn(","),t&&_n())}function k(e,t,n){if(n>=0||(n=e.length),e){for(var r=0;n>r;r++)r&&vn(", "),Nn(e[r]);t&&y(e,!1)}}function x(e,t){if(e){for(var n=0;n<e.length;n++)n&&vn(","),_n(),Nn(e[n]);t&&y(e,!0)}}function w(e){L(e,0)}function L(e,t){for(var n=t;n<e.length;n++)_n(),Nn(e[n])}function A(e){return e.length<=0?!1:66===e.charCodeAt(1)||98===e.charCodeAt(1)||79===e.charCodeAt(1)||111===e.charCodeAt(1)?!0:!1}function N(t){function n(){return T.target<2&&e.isTemplateLiteralKind(t.kind)?M(t):e.getSourceTextOfNodeFromSourceFile(hn,t)}var r=n();T.sourceMap&&(7===t.kind||e.isTemplateLiteralKind(t.kind))?gn.writeLiteral(r):T.target<2&&6===t.kind&&A(r)?vn(t.text):vn(r)}function M(t){return'"'+e.escapeString(t.text)+'"'}function P(t){function n(t,n){switch(n.kind){case 145:case 146:return n.expression===t;case 149:return!1;case 147:e.Debug.fail("Path should be unreachable; tagged templates not supported pre-ES6.");default:return-1!==r(n)}}function r(t){switch(e.Debug.assert(T.target<=1),t.kind){case 157:switch(t.operator){case 34:case 35:case 36:return 1;case 32:return 0;default:return-1}case 158:return-1;default:return 1}}if(T.target>=2)return e.forEachChild(t,Nn),void 0;e.Debug.assert(147!==t.parent.kind);var i=e.isExpression(t.parent)&&n(t,t.parent);i&&vn("("),N(t.head),e.forEach(t.templateSpans,function(e){var t=149!==e.expression.kind&&1!==r(e.expression);vn(" + "),t&&vn("("),Nn(e.expression),t&&vn(")"),0!==e.literal.text.length&&(vn(" + "),N(e.literal))}),i&&vn(")")}function O(e){Nn(e.expression),Nn(e.literal)}function I(e){7===e.kind?N(e):121===e.kind?Nn(e.expression):(vn('"'),6===e.kind?vn(e.text):yn(hn,e),vn('"'))}function R(e){var t=e.parent;switch(t.kind){case 123:case 183:case 124:case 198:case 199:case 200:case 125:case 184:case 127:case 128:case 150:case 185:case 186:case 188:case 189:case 191:return t.name===e;case 173:case 172:case 192:return!1;case 177:return e.parent.label===e;case 197:return e.parent.name===e}}function D(e){var n=t.getExpressionNamePrefix(e);n&&(vn(n),vn(".")),yn(hn,e)}function V(e){R(e)?yn(hn,e):D(e)}function F(e){2&t.getNodeCheckFlags(e)?vn("_this"):vn("this")}function H(e){var n=t.getNodeCheckFlags(e);16&n?vn("_super.prototype"):32&n?vn("_super"):vn("super")}function B(e){256&e.flags?(vn("["),bn(),x(e.elements,!0),Tn(),_n(),vn("]")):(vn("["),k(e.elements,!0),vn("]"))}function $(e){e.properties.length?256&e.flags?(vn("{"),bn(),x(e.properties,T.target>=1),Tn(),_n(),vn("}")):(vn("{ "),k(e.properties,T.target>=1),vn(" }")):vn("{}")}function G(e){vn("["),Nn(e.expression),vn("]")}function U(t){e.isObjectLiteralMethod(t)&&(Cn(t),Nn(t.name),vn(": "),vn("function "),Ht(t),kn(t))}function W(t){e.isObjectLiteralMethod(t)&&(Cn(t),Nn(t.name),Ht(t),kn(t))}function j(e){Cn(e),Nn(e.name),vn(": "),Nn(e.initializer),kn(e)}function z(e){Cn(e),Nn(e.name),vn(": "),D(e.name),kn(e)}function q(e){var n=t.getExpressionNamePrefix(e.name);n?z(e):(Cn(e),Nn(e.name),kn(e))}function K(n){var r=t.getConstantValue(n);if(void 0!==r){var i=143===n.kind?e.declarationNameToString(n.name):e.getTextOfNode(n.argumentExpression);return vn(r.toString()+" /* "+i+" */"),!0}return!1}function Y(e){K(e)||(Nn(e.expression),vn("."),Nn(e.name))}function X(e){Nn(e.left),vn("."),Nn(e.right)}function Q(e){K(e)||(Nn(e.expression),vn("["),Nn(e.argumentExpression),vn("]"))}function J(e){var t=!1;89===e.expression.kind?(vn("_super"),t=!0):(Nn(e.expression),t=143===e.expression.kind&&89===e.expression.expression.kind),t?(vn(".call("),F(e.expression),e.arguments.length&&(vn(", "),k(e.arguments,!1)),vn(")")):(vn("("),k(e.arguments,!1),vn(")"))}function Z(e){vn("new "),Nn(e.expression),e.arguments&&(vn("("),k(e.arguments,!1),vn(")"))}function et(t){e.Debug.assert(T.target>=2,"Trying to emit a tagged template in pre-ES6 mode."),Nn(t.tag),vn(" "),Nn(t.template)}function tt(e){if(148===e.expression.kind){for(var t=e.expression.expression;148==t.kind;)t=t.expression;if(!(155===t.kind||154===t.kind||153===t.kind||152===t.kind||156===t.kind||146===t.kind||145===t.kind&&146===e.parent.kind||150===t.kind&&145===e.parent.kind))return Nn(t),void 0}vn("("),Nn(e.expression),vn(")")}function nt(t){vn(e.tokenToString(72)),vn(" "),Nn(t.expression)}function rt(t){vn(e.tokenToString(97)),vn(" "),Nn(t.expression)}function it(t){vn(e.tokenToString(95)),vn(" "),Nn(t.expression)}function ot(t){if(vn(e.tokenToString(t.operator)),155===t.operand.kind){var n=t.operand;32!==t.operator||32!==n.operator&&37!==n.operator?33!==t.operator||33!==n.operator&&38!==n.operator||vn(" "):vn(" ")}Nn(t.operand)}function st(t){Nn(t.operand),vn(e.tokenToString(t.operator))}function at(t){Nn(t.left),22!==t.operator&&vn(" "),vn(e.tokenToString(t.operator)),vn(" "),Nn(t.right)}function ct(e){Nn(e.condition),vn(" ? "),Nn(e.whenTrue),vn(" : "),Nn(e.whenFalse)}function lt(t){On(13,t.pos),bn(),In(t.parent),190===t.kind&&(e.Debug.assert(189===t.parent.kind),Vt(t.parent)),w(t.statements),Tn(),_n(),On(14,t.statements.end),Rn()}function ut(e){163===e.kind?(vn(" "),Nn(e)):(bn(),_n(),Nn(e),Tn())}function pt(e){var t=151===e.expression.kind;Cn(e),t&&vn("("),Nn(e.expression),t&&vn(")"),vn(";"),kn(e)}function dt(e){Cn(e);var t=On(82,e.pos);vn(" "),t=On(15,t),Nn(e.expression),On(16,e.expression.end),ut(e.thenStatement),e.elseStatement&&(_n(),On(74,e.thenStatement.end),167===e.elseStatement.kind?(vn(" "),Nn(e.elseStatement)):ut(e.elseStatement)),kn(e)}function ht(e){vn("do"),ut(e.statement),163===e.statement.kind?vn(" "):_n(),vn("while ("),Nn(e.expression),vn(");")}function mt(e){vn("while ("),Nn(e.expression),vn(")"),ut(e.statement)}function ft(t){var n=On(80,t.pos);vn(" "),n=On(15,n),t.declarations&&(t.declarations[0]&&e.isLet(t.declarations[0])?On(102,n):t.declarations[0]&&e.isConst(t.declarations[0])?On(68,n):On(96,n),vn(" "),k(t.declarations,!1)),t.initializer&&Nn(t.initializer),vn(";"),v(" ",t.condition),vn(";"),v(" ",t.iterator),vn(")"),ut(t.statement)}function gt(t){var n=On(80,t.pos);if(vn(" "),n=On(15,n),t.declarations){if(t.declarations.length>=1){var r=t.declarations[0];e.isLet(r)?On(102,n):On(96,n),vn(" "),Nn(r)}}else Nn(t.variable);vn(" in "),Nn(t.expression),On(16,t.expression.end),ut(t.statement)}function vt(e){On(173===e.kind?64:69,e.pos),v(" ",e.label),vn(";")}function yt(e){Cn(e),On(88,e.pos),v(" ",e.expression),vn(";"),kn(e)}function _t(e){vn("with ("),Nn(e.expression),vn(")"),ut(e.statement)}function bt(e){var t=On(90,e.pos);vn(" "),On(15,t),Nn(e.expression),t=On(16,e.expression.end),vn(" "),On(13,t),bn(),w(e.clauses),Tn(),_n(),On(14,e.clauses.end)}function Tt(t,n){return s(hn,e.skipTrivia(hn.text,t.pos))===s(hn,e.skipTrivia(hn.text,n.pos))}function Et(e){194===e.kind?(vn("case "),Nn(e.expression),vn(":")):vn("default:"),1===e.statements.length&&Tt(e,e.statements[0])?(vn(" "),Nn(e.statements[0])):(bn(),w(e.statements),Tn())}function St(e){vn("throw "),Nn(e.expression),vn(";")}function Ct(e){vn("try "),Nn(e.tryBlock),Nn(e.catchClause),e.finallyBlock&&(_n(),vn("finally "),Nn(e.finallyBlock))}function kt(e){_n();var t=On(66,e.pos);vn(" "),On(15,t),Nn(e.name),On(16,e.name.end),vn(" "),lt(e.block)}function xt(e){On(70,e.pos),vn(";")}function wt(e){Nn(e.label),vn(": "),Nn(e.statement)}function Lt(e){do e=e.parent;while(e&&189!==e.kind);return e}function At(e){if(Mn(e.name),1&e.flags){var n=Lt(e);vn(n?t.getLocalNameOfContainer(n):"exports"),vn(".")}rn(e.name),Pn(e.name)}function Nt(e){Cn(e),At(e),v(" = ",e.initializer),kn(e)}function Mt(t){Cn(t),1&t.flags||(e.isLet(t)?vn("let "):e.isConst(t)?vn("const "):vn("var ")),k(t.declarations,!1),vn(";"),kn(t)}function Pt(e){Cn(e),Nn(e.name),kn(e)}function Ot(t){e.forEach(t.parameters,function(e){e.initializer&&(_n(),Mn(e),vn("if ("),rn(e.name),vn(" === void 0)"),Pn(e),vn(" { "),Mn(e),rn(e.name),vn(" = "),rn(e.initializer),Pn(e),vn("; }"))})}function It(t){if(e.hasRestParameters(t)){var n=t.parameters.length-1,r=t.parameters[n];_n(),Cn(r),Mn(r),vn("var "),rn(r.name),vn(" = [];"),Pn(r),kn(r),_n(),vn("for ("),Mn(r),vn("var _i = "+n+";"),Pn(r),vn(" "),Mn(r),vn("_i < arguments.length;"),Pn(r),vn(" "),Mn(r),vn("_i++"),Pn(r),vn(") {"),bn(),_n(),Mn(r),rn(r.name),vn("[_i - "+n+"] = arguments[_i];"),Pn(r),Tn(),_n(),vn("}")}}function Rt(e){Cn(e),vn(127===e.kind?"get ":"set "),Nn(e.name),Ht(e),kn(e)}function Dt(e){return e.body?(125!==e.kind&&Cn(e),vn("function "),(184===e.kind||150===e.kind&&e.name)&&Nn(e.name),Ht(e),125!==e.kind&&kn(e),void 0):Ln(e)}function Vt(e){4&t.getNodeCheckFlags(e)&&(_n(),Mn(e),vn("var _this = this;"),Pn(e))}function Ft(t){bn(),vn("("),t&&k(t.parameters,!1,t.parameters.length-(e.hasRestParameters(t)?1:0)),vn(")"),Tn()}function Ht(e){Ft(e),vn(" {"),In(e),bn(),wn(163===e.body.kind?e.body.statements:e.body);var t=0;163===e.body.kind&&(t=tn(e.body.statements,!0));var n=gn.getTextPos();Vt(e),Ot(e),It(e),163!==e.body.kind&&n===gn.getTextPos()?(Tn(),vn(" "),Mn(e.body),vn("return "),rn(e.body),Pn(e.body),vn("; "),Mn(e.body),vn("}"),Pn(e.body)):(163===e.body.kind?L(e.body.statements,t):(_n(),Cn(e.body),vn("return "),Nn(e.body),vn(";"),kn(e.body)),_n(),163===e.body.kind?(xn(e.body.statements.end),Tn(),On(14,e.body.statements.end)):(Tn(),Mn(e.body),vn("}"),Pn(e.body))),Rn(),1&e.flags&&(_n(),Mn(e),At(e),vn(" = "),Nn(e.name),Pn(e),vn(";"))}function Bt(e){if(e.body){var t=e.body.statements[0];if(t&&166===t.kind){var n=t.expression;if(n&&145===n.kind){var r=n.expression;if(r&&89===r.kind)return t}}}}function $t(t){e.forEach(t.parameters,function(e){112&e.flags&&(_n(),Mn(e),Mn(e.name),vn("this."),rn(e.name),Pn(e.name),vn(" = "),Nn(e.name),vn(";"),Pn(e))})}function Gt(e){7===e.kind||6===e.kind?(vn("["),rn(e),vn("]")):121===e.kind?G(e):(vn("."),rn(e))}function Ut(t,n){e.forEach(t.members,function(e){124===e.kind&&(128&e.flags)===n&&e.initializer&&(_n(),Cn(e),Mn(e),Mn(e.name),n?rn(t.name):vn("this"),Gt(e.name),Pn(e.name),vn(" = "),Nn(e.initializer),vn(";"),Pn(e),kn(e))
})}function Wt(t){e.forEach(t.members,function(e){if(125===e.kind){if(!e.body)return Ln(e);_n(),Cn(e),Mn(e),Mn(e.name),rn(t.name),128&e.flags||vn(".prototype"),Gt(e.name),Pn(e.name),vn(" = "),Mn(e),Dt(e),Pn(e),Pn(e),vn(";"),kn(e)}else if(127===e.kind||128===e.kind){var n=p(t,e);e===n.firstAccessor&&(_n(),Mn(e),vn("Object.defineProperty("),Mn(e.name),rn(t.name),128&e.flags||vn(".prototype"),vn(", "),I(e.name),Pn(e.name),vn(", {"),bn(),n.getAccessor&&(_n(),Cn(n.getAccessor),vn("get: "),Mn(n.getAccessor),vn("function "),Ht(n.getAccessor),Pn(n.getAccessor),kn(n.getAccessor),vn(",")),n.setAccessor&&(_n(),Cn(n.setAccessor),vn("set: "),Mn(n.setAccessor),vn("function "),Ht(n.setAccessor),Pn(n.setAccessor),kn(n.setAccessor),vn(",")),_n(),vn("enumerable: true,"),_n(),vn("configurable: true"),Tn(),_n(),vn("});"),Pn(e))}})}function jt(t){function n(){vn("return "),rn(t.name)}function r(){e.forEach(t.members,function(e){126!==e.kind||e.body||Ln(e)});var n=u(t);if(n&&Cn(n),Mn(n||t),vn("function "),Nn(t.name),Ft(n),vn(" {"),In(t,"constructor"),bn(),n&&wn(n.body.statements),Vt(t),n){if(Ot(n),It(n),i){var r=Bt(n);r&&(_n(),Nn(r))}$t(n)}else i&&(_n(),Mn(i),vn("_super.apply(this, arguments);"),Pn(i));if(Ut(t,0),n){var o=n.body.statements;r&&(o=o.slice(1)),w(o)}_n(),n&&xn(n.body.statements.end),Tn(),On(14,n?n.body.statements.end:t.members.end),Rn(),Pn(n||t),n&&kn(n)}Cn(t),vn("var "),Nn(t.name),vn(" = (function (");var i=e.getClassBaseTypeNode(t);i&&vn("_super"),vn(") {"),bn(),In(t),i&&(_n(),Mn(i),vn("__extends("),Nn(t.name),vn(", _super);"),Pn(i)),_n(),r(),Wt(t),Ut(t,128),_n(),On(14,t.members.end,n),vn(";"),Tn(),_n(),On(14,t.members.end),Rn(),Mn(t),vn(")("),i&&Nn(i.typeName),vn(");"),Pn(t),1&t.flags&&(_n(),Mn(t),At(t),vn(" = "),Nn(t.name),Pn(t),vn(";")),kn(t)}function zt(e){Ln(e)}function qt(n){function r(r){e.forEach(n.members,function(e){_n(),Cn(e),Mn(e),vn(t.getLocalNameOfContainer(n)),vn("["),vn(t.getLocalNameOfContainer(n)),vn("["),I(e.name),vn("] = "),e.initializer&&!r?Nn(e.initializer):vn(t.getEnumMemberValue(e).toString()),vn("] = "),I(e.name),Pn(e),vn(";"),kn(e)})}var i=e.isConst(n);(!i||T.preserveConstEnums)&&(Cn(n),1&n.flags||(Mn(n),vn("var "),Nn(n.name),Pn(n),vn(";")),_n(),Mn(n),vn("(function ("),Mn(n.name),vn(t.getLocalNameOfContainer(n)),Pn(n.name),vn(") {"),bn(),In(n),r(i),Tn(),_n(),On(14,n.members.end),Rn(),vn(")("),At(n),vn(" || ("),At(n),vn(" = {}));"),Pn(n),1&n.flags&&(_n(),Mn(n),vn("var "),Nn(n.name),vn(" = "),At(n),Pn(n),vn(";")),kn(n))}function Kt(e){if(189===e.body.kind){var t=Kt(e.body);return t||e.body}}function Yt(n){var r=1===e.getModuleInstanceState(n)||2===e.getModuleInstanceState(n)&&T.preserveConstEnums;if(!r)return Ln(n);if(Cn(n),Mn(n),vn("var "),Nn(n.name),vn(";"),Pn(n),_n(),Mn(n),vn("(function ("),Mn(n.name),vn(t.getLocalNameOfContainer(n)),Pn(n.name),vn(") "),190===n.body.kind)Nn(n.body);else{vn("{"),bn(),In(n),Vt(n),_n(),Nn(n.body),Tn(),_n();var i=Kt(n).body;On(14,i.statements.end),Rn()}vn(")("),1&n.flags&&(Nn(n.name),vn(" = ")),At(n),vn(" || ("),At(n),vn(" = {}));"),Pn(n),kn(n)}function Xt(n){var r=t.isReferencedImportDeclaration(n);if(r||(r=!e.isExternalModule(hn)&&t.isTopLevelValueImportWithEntityName(n)),r)if(e.isExternalModuleImportDeclaration(n)&&201===n.parent.kind&&2===T.module)1&n.flags&&(_n(),Cn(n),Mn(n),At(n),vn(" = "),Nn(n.name),vn(";"),Pn(n),kn(n));else{if(_n(),Cn(n),Mn(n),1&n.flags||vn("var "),At(n),vn(" = "),e.isInternalModuleImportDeclaration(n))Nn(n.moduleReference);else{var i=e.getExternalModuleImportDeclarationExpression(n);vn("require("),Mn(i),N(i),Pn(i),On(16,i.end)}vn(";"),Pn(n),kn(n)}}function Qt(n){var r=[];return e.forEach(n.statements,function(n){e.isExternalModuleImportDeclaration(n)&&t.isReferencedImportDeclaration(n)&&r.push(n)}),r}function Jt(t){return e.forEach(t.statements,function(e){return 192===e.kind?e:void 0})}function Zt(n,r){var i=Qt(n);_n(),vn("define("),n.amdModuleName&&vn('"'+n.amdModuleName+'", '),vn('["require", "exports"'),e.forEach(i,function(t){vn(", "),N(e.getExternalModuleImportDeclarationExpression(t))}),e.forEach(n.amdDependencies,function(e){var t='"'+e+'"';vn(", "),vn(t)}),vn("], function (require, exports"),e.forEach(i,function(e){vn(", "),Nn(e.name)}),vn(") {"),bn(),Vt(n),L(n.statements,r);var o=t.getExportAssignmentName(n);if(o){_n();var s=Jt(n);Mn(s),vn("return "),Mn(s.exportName),vn(o),Pn(s.exportName),vn(";"),Pn(s)}Tn(),_n(),vn("});")}function en(e,n){Vt(e),L(e.statements,n);var r=t.getExportAssignmentName(e);if(r){_n();var i=Jt(e);Mn(i),vn("module.exports = "),Mn(i.exportName),vn(r),Pn(i.exportName),vn(";"),Pn(i)}}function tn(t,n){for(var r=0;r<t.length;++r){if(!e.isPrologueDirective(t[r]))return r;(n||r>0)&&_n(),Nn(t[r])}return t.length}function nn(n){hn=n,_n(),wn(n);var r=tn(n.statements,!1);!En&&8&t.getNodeCheckFlags(n)&&(_n(),vn("var __extends = this.__extends || function (d, b) {"),bn(),_n(),vn("for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];"),_n(),vn("function __() { this.constructor = d; }"),_n(),vn("__.prototype = b.prototype;"),_n(),vn("d.prototype = new __();"),Tn(),_n(),vn("};"),En=!0),e.isExternalModule(n)?2===T.module?Zt(n,r):en(n,r):(Vt(n),L(n.statements,r)),Cn(n.endOfFileToken)}function rn(t){if(t){if(2&t.flags)return Ln(t);switch(t.kind){case 63:return V(t);case 123:return Pt(t);case 127:case 128:return Rt(t);case 91:return F(t);case 89:return H(t);case 87:return vn("null");case 93:return vn("true");case 78:return vn("false");case 6:case 7:case 8:case 9:case 10:case 11:case 12:return N(t);case 159:return P(t);case 162:return O(t);case 120:return X(t);case 141:return B(t);case 142:return $(t);case 198:return j(t);case 121:return G(t);case 143:return Y(t);case 144:return Q(t);case 145:return J(t);case 146:return Z(t);case 147:return et(t);case 148:return Nn(t.expression);case 149:return tt(t);case 184:case 150:case 151:return Dt(t);case 152:return nt(t);case 153:return it(t);case 154:return rt(t);case 155:return ot(t);case 156:return st(t);case 157:return at(t);case 158:return ct(t);case 161:return;case 163:case 180:case 181:case 190:return lt(t);case 164:return Mt(t);case 165:return vn(";");case 166:return pt(t);case 167:return dt(t);case 168:return ht(t);case 169:return mt(t);case 170:return ft(t);case 171:return gt(t);case 172:case 173:return vt(t);case 174:return yt(t);case 175:return _t(t);case 176:return bt(t);case 194:case 195:return Et(t);case 177:return wt(t);case 178:return St(t);case 179:return Ct(t);case 197:return kt(t);case 182:return xt(t);case 183:return Nt(t);case 185:return jt(t);case 186:return zt(t);case 188:return qt(t);case 189:return Yt(t);case 191:return Xt(t);case 201:return nn(t)}if(T.target<2)switch(t.kind){case 199:return z(t);case 125:return U(t)}else switch(e.Debug.assert(T.target>=2,"Invalid ScriptTarget. We should emit as ES6 or above"),t.kind){case 199:return q(t);case 125:return W(t)}}}function on(e){return void 0!==mn&&mn[mn.length-1].nodePos===e}function sn(){var t=e.getLeadingCommentRanges(hn.text,mn[mn.length-1].detachedCommentEndPos);return mn.length-1?mn.pop():mn=void 0,t}function an(t){if(201===t.parent.kind||t.pos!==t.parent.pos){var n;return n=on(t.pos)?sn():e.getLeadingCommentRangesOfNode(t,hn)}}function cn(e){var t=an(e);a(hn,gn,e,t),c(hn,gn,t,!0,C,An)}function ln(t){if(201===t.parent.kind||t.end!==t.parent.end){var n=e.getTrailingCommentRanges(hn.text,t.end);c(hn,gn,n,!1,C,An)}}function un(t){var n;n=on(t)?sn():e.getLeadingCommentRanges(hn.text,t),a(hn,gn,{pos:t,end:t},n),c(hn,gn,n,!0,C,An)}function pn(t){var n=e.getLeadingCommentRanges(hn.text,t.pos);if(n){var r,i=[];if(e.forEach(n,function(e){if(r){var t=s(hn,r.end),n=s(hn,e.pos);if(n>=t+2)return i}i.push(e),r=e}),i.length){var o=s(hn,i[i.length-1].end),l=s(hn,e.skipTrivia(hn.text,t.pos));if(l>=o+2){a(hn,gn,t,n),c(hn,gn,i,!0,C,An);var u={nodePos:t.pos,detachedCommentEndPos:i[i.length-1].end};mn?mn.push(u):mn=[u]}}}}function dn(t){function n(t){return 42===hn.text.charCodeAt(t.pos+1)?33===hn.text.charCodeAt(t.pos+2):47===hn.text.charCodeAt(t.pos+1)&&t.pos+2<t.end&&47===hn.text.charCodeAt(t.pos+2)&&hn.text.substring(t.pos,t.end).match(e.fullTripleSlashReferencePathRegEx)?!0:void 0}var r=e.filter(an(t),n);a(hn,gn,t,r),c(hn,gn,r,!0,C,An)}var hn,mn,fn,gn=o(C),vn=gn.write,yn=gn.writeTextOfNode,_n=gn.writeLine,bn=gn.increaseIndent,Tn=gn.decreaseIndent,En=!1,Sn=f,Cn=T.removeComments?function(){}:cn,kn=T.removeComments?function(){}:ln,xn=T.removeComments?function(){}:un,wn=T.removeComments?function(){}:pn,Ln=T.removeComments?function(){}:dn,An=l,Nn=rn,Mn=function(){},Pn=function(){},On=g,In=function(){},Rn=function(){};T.sourceMap&&h(),r?Nn(r):e.forEach(_.getSourceFiles(),function(e){i(e)||Nn(e)}),_n(),Sn(gn.getText(),T.emitBOM)}function v(n,r){var i=f(_,t,S,n,r);if(!i.reportedDeclarationError){var o=i.referencePathsOutput,s=0;e.forEach(i.aliasDeclarationEmitInfo,function(e){e.asynchronousOutput&&(o+=i.synchronousDeclarationOutput.substring(s,e.outputPos),o+=e.asynchronousOutput,s=e.outputPos)}),o+=i.synchronousDeclarationOutput.substring(s),m(b,S,e.removeFileExtension(n)+".d.ts",o,T.emitBOM)}}function y(e,t){x||(g(e,t),!k&&T.declaration&&v(e,t))}var _=t.getProgram(),b=_.getCompilerHost(),T=_.getCompilerOptions(),E=T.sourceMap?[]:void 0,S=[],C=_.getCompilerHost().getNewLine(),k=!1,x=!1;if(void 0===n)k=t.hasSemanticErrors(),x=t.isEmitBlocked(),e.forEach(_.getSourceFiles(),function(e){if(r(e,T)){var t=h(e,_,".js");y(t,e)}}),T.out&&y(T.out);else if(r(n,T)){k=t.hasSemanticErrors(n),x=t.isEmitBlocked(n);var w=h(n,_,".js");y(w,n)}else!e.isDeclarationFile(n)&&T.out&&(e.forEach(_.getSourceFiles(),function(e){r(e,T)||(k=k||t.hasSemanticErrors(e),x=x||t.isEmitBlocked(e))}),y(T.out));S.sort(e.compareDiagnostics),S=e.deduplicateSortedDiagnostics(S);var L,A=e.forEach(S,function(e){return 1===e.category});return L=x?1:A?4:k&&T.declaration?3:k&&!T.declaration?2:0,{emitResultStatus:L,diagnostics:S,sourceMaps:E}}var y=["","    "];e.getIndentString=t,e.shouldEmitToOwnFile=r,e.isExternalModuleOrDeclarationFile=i,e.getDeclarationDiagnostics=g,e.emitFiles=v}(ts||(ts={}));var ts;!function(e){function t(t,o){function s(e){uc.push(e),pc=!0}function a(t,n,r,i,o){var a=t?e.createDiagnosticForNode(t,n,r,i,o):e.createCompilerDiagnostic(n,r,i,o);s(a)}function c(e,t){return new La(e,t)}function l(e){var t=0;return 2&e&&(t|=107455),1&e&&(t|=107454),4&e&&(t|=107455),8&e&&(t|=107455),16&e&&(t|=106927),32&e&&(t|=3258879),64&e&&(t|=3152288),256&e&&(t|=3258623),128&e&&(t|=3259263),512&e&&(t|=106639),8192&e&&(t|=99263),32768&e&&(t|=41919),65536&e&&(t|=74687),1048576&e&&(t|=2103776),2097152&e&&(t|=3152352),33554432&e&&(t|=33554432),t}function u(e,t){t.mergeId||(t.mergeId=i++),sc[t.mergeId]=e}function p(e){var t=c(134217728|e.flags,e.name);return t.declarations=e.declarations.slice(0),t.parent=e.parent,e.valueDeclaration&&(t.valueDeclaration=e.valueDeclaration),e.constEnumOnlyModule&&(t.constEnumOnlyModule=!0),e.members&&(t.members=h(e.members)),e.exports&&(t.exports=h(e.exports)),u(t,e),t}function d(t,n){if(t.flags&l(n.flags)){var r=2&t.flags||2&n.flags?e.Diagnostics.Cannot_redeclare_block_scoped_variable_0:e.Diagnostics.Duplicate_identifier_0;e.forEach(n.declarations,function(e){a(e.name?e.name:e,r,rt(n))}),e.forEach(t.declarations,function(e){a(e.name?e.name:e,r,rt(n))})}else 512&n.flags&&512&t.flags&&t.constEnumOnlyModule&&!n.constEnumOnlyModule&&(t.constEnumOnlyModule=!1),t.flags|=n.flags,!t.valueDeclaration&&n.valueDeclaration&&(t.valueDeclaration=n.valueDeclaration),e.forEach(n.declarations,function(e){t.declarations.push(e)}),n.members&&(t.members||(t.members={}),m(t.members,n.members)),n.exports&&(t.exports||(t.exports={}),m(t.exports,n.exports)),u(t,n)}function h(t){var n={};for(var r in t)e.hasProperty(t,r)&&(n[r]=t[r]);return n}function m(t,n){for(var r in n)if(e.hasProperty(n,r))if(e.hasProperty(t,r)){var i=t[r];134217728&i.flags||(t[r]=i=p(i)),d(i,n[r])}else t[r]=n[r]}function f(e){return 268435456&e.flags?e:(e.id||(e.id=n++),ac[e.id]||(ac[e.id]={}))}function g(e){return e.id||(e.id=r++),cc[e.id]||(cc[e.id]={})}function v(t){return e.getAncestor(t,201)}function y(t){return 201===t.kind&&!e.isExternalModule(t)}function _(t,n,r){if(r&&e.hasProperty(t,n)){var i=t[n];if(e.Debug.assert(0===(67108864&i.flags),"Should never get an instantiated symbol here."),i.flags&r)return i;if(33554432&i.flags){var o=E(i);if(o===Fa||o.flags&r)return i}}}function b(n,r){var i=e.getSourceFileOfNode(n),o=e.getSourceFileOfNode(r);if(i===o)return n.pos<=r.pos;if(!Ia.out)return!0;var s=t.getSourceFiles();return s.indexOf(i)<=s.indexOf(o)}function T(t,n,r,i,o){var s,c,l,u=t;e:for(;t&&(!t.locals||y(t)||!(s=_(t.locals,n,r)));){switch(t.kind){case 201:if(!e.isExternalModule(t))break;case 189:if(s=_(O(t).exports,n,35653619&r))break e;break;case 188:if(s=_(O(t).exports,n,8&r))break e;break;case 124:if(185===t.parent.kind&&!(128&t.flags)){var p=V(t.parent);p&&p.locals&&_(p.locals,n,107455&r)&&(l=t)}break;case 185:case 186:if(s=_(O(t).members,n,3152352&r)){if(c&&128&c.flags)return a(u,e.Diagnostics.Static_members_cannot_reference_class_type_parameters),void 0;break e}break;case 125:case 126:case 127:case 128:case 184:case 151:if("arguments"===n){s=Va;break e}break;case 150:if("arguments"===n){s=Va;break e}var d=t.name;if(d&&n===d.text){s=t.symbol;break e}break;case 197:var d=t.name;if(n===d.text){s=t.symbol;break e}}c=t,t=t.parent}if(s||(s=_(tc,n,r)),!s)return i&&a(u,i,"string"==typeof o?o:e.declarationNameToString(o)),void 0;if(i){if(l){var h=l.name;return a(u,e.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor,e.declarationNameToString(h),"string"==typeof o?o:e.declarationNameToString(o)),void 0}if(2&s.flags){var m=e.forEach(s.declarations,function(e){return 6144&e.flags?e:void 0});e.Debug.assert(void 0!==m,"Block-scoped variable declaration is undefined"),b(m,u)||a(u,e.Diagnostics.Block_scoped_variable_0_used_before_its_declaration,e.declarationNameToString(m.name))}}return s}function E(t){e.Debug.assert(0!==(33554432&t.flags),"Should only get Imports here.");var n=f(t);if(n.target)n.target===Ha&&(n.target=Fa);else{n.target=Ha;var r=e.getDeclarationOfKind(t,191),i=193===r.moduleReference.kind?w(r,e.getExternalModuleImportDeclarationExpression(r)):S(r.moduleReference,r);n.target===Ha?n.target=i||Fa:a(r,e.Diagnostics.Circular_definition_of_import_alias_0,rt(t))}return n.target}function S(t,n){return n||(n=e.getAncestor(t,191),e.Debug.assert(void 0!==n)),63===t.kind&&$s(t)&&(t=t.parent),63===t.kind||120===t.parent.kind?k(n,t,1536):(e.Debug.assert(191===t.parent.kind),k(n,t,3260415))}function C(e){return e.parent?C(e.parent)+"."+rt(e):rt(e)}function k(t,n,r){if(0===e.getFullWidth(n))return void 0;if(63===n.kind){var i=T(t,n.text,r,e.Diagnostics.Cannot_find_name_0,n);if(!i)return}else if(120===n.kind){var o=k(t,n.left,1536);if(!o||o===Fa||0===e.getFullWidth(n.right))return;var i=_(o.exports,n.right.text,r);if(!i)return a(t,e.Diagnostics.Module_0_has_no_exported_member_1,C(o),e.declarationNameToString(n.right)),void 0}return e.Debug.assert(0===(67108864&i.flags),"Should never get an instantiated symbol here."),i.flags&r?i:E(i)}function x(e){return"./"===e.substr(0,2)||"../"===e.substr(0,3)||".\\"===e.substr(0,2)||"..\\"===e.substr(0,3)}function w(n,r){if(7===r.kind){var i=r,o=e.getDirectoryPath(v(n).filename),s=e.escapeIdentifier(i.text);if(s){var c=x(s);if(!c){var l=_(tc,'"'+s+'"',512);if(l)return L(l)}for(;;){var u=e.normalizePath(e.combinePaths(o,s)),p=t.getSourceFile(u+".ts")||t.getSourceFile(u+".d.ts")||t.getSourceFile(u+".js");if(p||c)break;var d=e.getDirectoryPath(o);if(d===o)break;o=d}return p?p.symbol?L(p.symbol):(a(i,e.Diagnostics.File_0_is_not_an_external_module,p.filename),void 0):(a(i,e.Diagnostics.Cannot_find_external_module_0,s),void 0)}}}function L(e){var t=A(e);if(t){if(3260415&t.flags)return t;if(33554432&t.flags)return E(t)}return e}function A(e){N(e);var t=f(e);return t.exportAssignSymbol===Fa?void 0:t.exportAssignSymbol}function N(t){var n=f(t);if(!n.exportAssignSymbol){var r=M(t);if(r.exportAssignments.length){r.exportAssignments.length>1&&e.forEach(r.exportAssignments,function(t){return a(t,e.Diagnostics.A_module_cannot_have_more_than_one_export_assignment)});var i=r.exportAssignments[0];if(r.hasExportedMember&&a(i,e.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements),i.exportName.text)var o=3260415,s=T(i,i.exportName.text,o,e.Diagnostics.Cannot_find_name_0,i.exportName)}n.exportAssignSymbol=s||Fa}}function M(t){var n=!1,r=[];return e.forEach(t.declarations,function(t){var i=201===t.kind?t:t.body;e.forEach(i.statements,function(e){192===e.kind?r.push(e):n=n||0!==(1&e.flags)})}),{hasExportedMember:n,exportAssignments:r}}function P(e){var t;return e&&e.mergeId&&(t=sc[e.mergeId])?t:e}function O(e){return P(e.symbol)}function I(e){return P(e.parent)}function R(e){return e&&0!==(4194304&e.flags)?P(e.exportSymbol):e}function D(e){return 67108864&e.flags?D(f(e).target):107455&e.flags?!0:33554432&e.flags?0!==(107455&E(e).flags):!1}function V(e){for(var t=e.members,n=0;n<t.length;n++){var r=t[n];if(126===r.kind&&r.body)return r}}function F(e){var t=new Aa(Ra,e);return t.id=Ma++,t}function H(e,t){var n=F(e);return n.intrinsicName=t,n}function B(e,t){var n=F(e);return n.symbol=t,n}function $(e){return 95===e.charCodeAt(0)&&95===e.charCodeAt(1)&&95!==e.charCodeAt(2)}function G(t){var n;for(var r in t)if(e.hasProperty(t,r)&&!$(r)){n||(n=[]);var i=t[r];D(i)&&n.push(i)}return n||Pa}function U(e,t,n,r,i,o){return e.members=t,e.properties=G(t),e.callSignatures=n,e.constructSignatures=r,i&&(e.stringIndexType=i),o&&(e.numberIndexType=o),e}function W(e,t,n,r,i,o){return U(B(32768,e),t,n,r,i,o)}function j(t){return t.valueDeclaration&&e.hasQuestionToken(t.valueDeclaration)&&123!==t.valueDeclaration.kind}function z(t,n){for(var r,i=t;i;i=i.parent){if(i.locals&&!y(i)&&(r=n(i.locals)))return r;switch(i.kind){case 201:if(!e.isExternalModule(i))break;case 189:if(r=n(O(i).exports))return r;break;case 185:case 186:if(r=n(O(i).members))return r}}return n(tc)}function q(e){return 107455===e?107455:1536}function K(t,n,r,i){function o(s){function a(e,t){if(!Y(e,n,t))return!0;var r=K(e.parent,n,q(t),i);return!!r}function c(n,i){return t===(i||n)?!e.forEach(n.declarations,function(e){return Q(e)})&&a(n,r):void 0}return c(e.lookUp(s,t.name))?[t]:e.forEachValue(s,function(t){if(33554432&t.flags&&(!i||e.forEach(t.declarations,e.isExternalModuleImportDeclaration))){var n=E(t);if(c(t,E(t)))return[t];var s=n.exports?o(n.exports):void 0;if(s&&a(t,q(r)))return[t].concat(s)}})}return t?z(n,o):void 0}function Y(t,n,r){var i=!1;return z(n,function(n){if(!e.hasProperty(n,t.name))return!1;var o=n[t.name];return o===t?!0:(o=33554432&o.flags?E(o):o,o.flags&r?(i=!0,!0):!1)}),i}function X(t,n,r){function i(e){for(;e;e=e.parent)if(Q(e))return O(e)}if(t&&n&&!(1048576&t.flags)){for(var o=t,s=r;t;){var a=K(t,n,s,!1);if(a){var c=J(a[0]);return c?c:{accessibility:1,errorSymbolName:rt(o,n,r),errorModuleName:t!==o?rt(t,n,1536):void 0}}s=q(r),t=I(t)}var l=e.forEach(o.declarations,function(e){return i(e)});if(l){var u=i(n);if(l!==u)return{accessibility:2,errorSymbolName:rt(o,n,r),errorModuleName:rt(l)}}return{accessibility:1,errorSymbolName:rt(o,n,r)}}return{accessibility:0}}function Q(t){return 189===t.kind&&7===t.name.kind||201===t.kind&&e.isExternalModule(t)}function J(t){function n(t){return at(t)?!0:191!==t.kind||1&t.flags||!at(t.parent)?!1:(g(t).isVisible=!0,r?e.contains(r,t)||r.push(t):r=[t],!0)}var r;return e.forEach(t.declarations,function(e){return!n(e)})?void 0:{accessibility:0,aliasesToMakeVisible:r}}function Z(t,n){var r;r=135===t.parent.kind?4301759:120===t.kind||191===t.parent.kind?1536:3152352;var i=Cs(t),o=T(n,i.text,r,void 0,void 0);return o&&J(o)||{accessibility:1,errorSymbolName:e.getTextOfNode(i),errorNode:i}}function et(t,n){t.writeKeyword(e.tokenToString(n))}function tt(t,n){t.writePunctuation(e.tokenToString(n))}function nt(e){e.writeSpace(" ")}function rt(t,n,r){var i=e.getSingleLineStringWriter();st().buildSymbolDisplay(t,i,n,r);var o=i.string();return e.releaseStringWriter(i),o}function it(t,n,r){var i=e.getSingleLineStringWriter();st().buildTypeDisplay(t,i,n,r);var o=i.string();e.releaseStringWriter(i);var s=Ia.noErrorTruncation||4&r?void 0:100;return s&&o.length>=s&&(o=o.substr(0,s-"...".length)+"..."),o}function ot(e){if(e.symbol&&2048&e.symbol.flags){for(var t=e.symbol.declarations[0].parent;140===t.kind;)t=t.parent;if(187===t.kind)return O(t)}return void 0}function st(){function t(t,n){if(t.declarations&&t.declarations.length>0){var r=t.declarations[0];if(r.name)return n.writeSymbol(e.declarationNameToString(r.name),t),void 0}n.writeSymbol(t.name,t)}function n(n,r,o,s,a){function l(e){p&&(1&a&&(67108864&e.flags?c(Et(p),e.mapper,r,o):i(p,r,o)),tt(r,19)),p=e,t(e,r)}function u(t,n){if(t){var r=K(t,o,n,!!(2&a));if((!r||Y(r[0],o,1===r.length?n:q(n)))&&u(I(r?r[0]:t),q(n)),r)for(var i=0,s=r.length;s>i;i++)l(r[i]);else{if(!p&&e.forEach(t.declarations,function(e){return Q(e)}))return;if(2048&t.flags||4096&t.flags)return;l(t)}}}var p;return r.trackSymbol(n,o,s),!o||1048576&n.flags?l(n):(u(n,s),void 0)}function r(t,r,i,o,s){function a(e,t){127&e.flags?r.writeKeyword(!(16&o)&&1&e.flags?"any":e.intrinsicName):4096&e.flags?l(e,t):3712&e.flags?n(e.symbol,r,i,3152352):8192&e.flags?u(e):16384&e.flags?d(e,t):32768&e.flags?h(e,t):256&e.flags?r.writeStringLiteral(e.text):(tt(r,13),nt(r),tt(r,20),nt(r),tt(r,14))}function c(e,t){for(var n=0;n<e.length;n++)n>0&&(t&&nt(r),tt(r,t?43:22),nt(r)),a(e[n],t?64:0)}function l(e,t){e.target!==Ta||1&t?(n(e.target.symbol,r,i,3152352),tt(r,23),c(e.typeArguments,!1),tt(r,24)):(a(e.typeArguments[0],64),tt(r,17),tt(r,18))}function u(e){tt(r,17),c(e.elementTypes,!1),tt(r,18)}function d(e,t){64&t&&tt(r,15),c(e.types,!0),64&t&&tt(r,16)}function h(t,o){function a(){if(t.symbol){var n=!!(8192&t.symbol.flags&&e.forEach(t.symbol.declarations,function(e){return 128&e.flags})),r=!!(16&t.symbol.flags)&&(t.symbol.parent||e.forEach(t.symbol.declarations,function(e){return 201===e.parent.kind||190===e.parent.kind}));if(n||r)return!!(2&o)||s&&e.contains(s,t)}}if(t.symbol&&928&t.symbol.flags)m(t);else if(a())m(t);else if(s&&e.contains(s,t)){var c=ot(t);c?n(c,r,i,3152352):et(r,109)}else s||(s=[]),s.push(t),g(t,o),s.pop()}function m(e){et(r,95),nt(r),n(e.symbol,r,i,107455)}function f(t,n,r){var i=mn(t.symbol,n);return i?(e.Debug.assert(0!==i.parameters.length),e.declarationNameToString(i.parameters[0].name)):r}function g(e,t){var o=jt(e);if(!o.properties.length&&!o.stringIndexType&&!o.numberIndexType){if(!o.callSignatures.length&&!o.constructSignatures.length)return tt(r,13),tt(r,14),void 0;if(1===o.callSignatures.length&&!o.constructSignatures.length)return 64&t&&tt(r,15),p(o.callSignatures[0],r,i,8|v,s),64&t&&tt(r,16),void 0;if(1===o.constructSignatures.length&&!o.callSignatures.length)return 64&t&&tt(r,15),et(r,86),nt(r),p(o.constructSignatures[0],r,i,8|v,s),64&t&&tt(r,16),void 0}tt(r,13),r.writeLine(),r.increaseIndent();for(var c=0;c<o.callSignatures.length;c++)p(o.callSignatures[c],r,i,v,s),tt(r,21),r.writeLine();for(var c=0;c<o.constructSignatures.length;c++)et(r,86),nt(r),p(o.constructSignatures[c],r,i,v,s),tt(r,21),r.writeLine();o.stringIndexType&&(tt(r,17),r.writeParameter(f(o,0,"x")),tt(r,50),nt(r),et(r,118),tt(r,18),tt(r,50),nt(r),a(o.stringIndexType,0),tt(r,21),r.writeLine()),o.numberIndexType&&(tt(r,17),r.writeParameter(f(o,1,"x")),tt(r,50),nt(r),et(r,116),tt(r,18),tt(r,50),nt(r),a(o.numberIndexType,0),tt(r,21),r.writeLine());for(var c=0;c<o.properties.length;c++){var l=o.properties[c],u=_t(l);if(8208&l.flags&&!zt(u).length)for(var d=tn(u,0),h=0;h<d.length;h++)n(l,r),j(l)&&tt(r,49),p(d[h],r,i,v,s),tt(r,21),r.writeLine();else n(l,r),j(l)&&tt(r,49),tt(r,50),nt(r),a(u,0),tt(r,21),r.writeLine()}r.decreaseIndent(),tt(r,14)}var v=16&o;return a(t,o)}function i(e,t,n,r){var i=hs(e);(32&i.flags||64&i.flags)&&a(Et(e),t,n,r)}function o(e,n,i,o,s){t(e.symbol,n);var a=gn(e);a&&(nt(n),et(n,77),nt(n),r(a,n,i,o,s))}function s(n,i,o,s,a){e.hasDotDotDotToken(n.valueDeclaration)&&tt(i,20),t(n,i),(e.hasQuestionToken(n.valueDeclaration)||n.valueDeclaration.initializer)&&tt(i,49),tt(i,50),nt(i),r(_t(n),i,o,s,a)}function a(e,t,n,r,i){if(e&&e.length){tt(t,23);for(var s=0;s<e.length;s++)s>0&&(tt(t,22),nt(t)),o(e[s],t,n,r,i);tt(t,24)}}function c(e,t,n,i){if(e&&e.length){tt(n,23);for(var o=0;o<e.length;o++)o>0&&(tt(n,22),nt(n)),r(t(e[o]),n,i,0);tt(n,24)}}function l(e,t,n,r,i){tt(t,15);for(var o=0;o<e.length;o++)o>0&&(tt(t,22),nt(t)),s(e[o],t,n,r,i);tt(t,16)}function u(e,t,n,i,o){8&i?(nt(t),tt(t,31)):tt(t,50),nt(t),r(cn(e),t,n,i,o)}function p(e,t,n,r,i){e.target&&32&r?c(e.target.typeParameters,e.mapper,t,n):a(e.typeParameters,t,n,r,i),l(e.parameters,t,n,r,i),u(e,t,n,r,i)}return wa||(wa={symbolToString:rt,typeToString:it,buildSymbolDisplay:n,buildTypeDisplay:r,buildTypeParameterDisplay:o,buildParameterDisplay:s,buildDisplayForParametersAndDelimiters:l,buildDisplayForTypeParametersAndDelimiters:a,buildDisplayForTypeArgumentsAndDelimiters:c,buildTypeParameterDisplayFromSymbol:i,buildSignatureDisplay:p,buildReturnTypeDisplay:u})}function at(t){function n(t){for(;t;t=t.parent)if(189===t.kind){if(7===t.name.kind)return t}else if(201===t.kind)return e.isExternalModule(t)?t:void 0;e.Debug.fail("getContainingModule cant reach here")}function r(t){function r(n){return a===n?!0:a&&33554432&a.flags?(o=o||E(a),o===n?!0:e.forEach(o.declarations,function(e){for(;e;){if(e===t)return!0;e=e.parent}})):void 0}var i=n(t);if(i){var o,s=O(i),a=A(s),c=O(t);if(r(c))return!0;if(33554432&c.flags)return r(E(c))}}function i(){switch(t.kind){case 183:case 189:case 185:case 186:case 187:case 184:case 188:case 191:var n=183===t.kind?t.parent.parent:t.parent;return 1&t.flags||191!==t.kind&&201!==n.kind&&e.isInAmbientContext(n)?at(n):y(n)||r(t);case 124:case 127:case 128:case 125:if(96&t.flags)return!1;case 126:case 130:case 129:case 131:case 123:case 190:case 122:case 133:case 134:case 136:case 132:case 137:case 138:case 139:case 140:return at(t.parent);case 201:return!0;default:e.Debug.fail("isDeclarationVisible unknown: SyntaxKind: "+t.kind)}}if(t){var o=g(t);return void 0===o.isVisible&&(o.isVisible=!!i()),o.isVisible}}function ct(t){var n=At(t.parent);return n.typeParameters?yn(n,e.map(n.typeParameters,function(){return Ba})):n}function lt(t){function n(n){if(o&&Ia.noImplicitAny&&Er(n)===Ba&&!(Mo(t)||123===t.kind&&Mo(t.parent))){switch(t.kind){case 124:var r=e.Diagnostics.Member_0_implicitly_has_an_1_type;break;case 123:var r=e.hasDotDotDotToken(t)?e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type:e.Diagnostics.Parameter_0_implicitly_has_an_1_type;break;default:var r=e.Diagnostics.Variable_0_implicitly_has_an_1_type}a(t,r,e.declarationNameToString(t.name),it(n))}}if(171===t.parent.kind)return Ba;if(t.type)return $n(t.type);if(123===t.kind){var r=t.parent;if(128===r.kind&&!e.hasComputedNameButNotSymbol(r)){var i=e.getDeclarationOfKind(t.parent.symbol,127);if(i)return cn(sn(i))}var s=jr(t);if(s)return s}if(t.initializer){var s=uo(t.initializer);if(198!==t.kind){var c=s;s=Sr(s),s!==c&&n(s)}return s}if(199===t.kind){var s=Hr(t.name);return s}var s=e.hasDotDotDotToken(t)?xn(Ba):Ba;return n(s),s}function ut(t){var n=f(t);if(n.type){if(n.type===Ka&&(n.type=Ba,Ia.noImplicitAny)){var r=t.valueDeclaration.type?e.Diagnostics._0_implicitly_has_type_any_because_it_is_referenced_directly_or_indirectly_in_its_own_type_annotation:e.Diagnostics._0_implicitly_has_type_any_because_it_is_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer;a(t.valueDeclaration,r,rt(t))}}else{if(536870912&t.flags)return n.type=ct(t);var i=t.valueDeclaration;if(197===i.kind)return n.type=Ba;n.type=Ka;var o=lt(i);n.type===Ka&&(n.type=o)}return n.type}function pt(e){return e&&e.parameters.length>0&&e.parameters[0].type}function dt(e){if(e){if(127===e.kind)return e.type&&$n(e.type);var t=pt(e);return t&&$n(t)}return void 0}function ht(e){var t=f(e);return mt(e,t),t.type}function mt(t,n){if(n=n||f(t),n.type){if(n.type===Ka&&(n.type=Ba,Ia.noImplicitAny)){var r=e.getDeclarationOfKind(t,127);a(r,e.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,rt(t))}}else{n.type=Ka;var i,r=e.getDeclarationOfKind(t,127),o=e.getDeclarationOfKind(t,128),s=dt(r);if(s)i=s;else{var c=dt(o);c?i=c:r&&r.body?i=$i(r):(Ia.noImplicitAny&&a(o,e.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation,rt(t)),i=Ba)}n.type===Ka&&(n.type=i)}}function ft(e){var t=f(e);return t.type||(t.type=B(32768,e)),t.type}function gt(e){var t=f(e);return t.type||(t.type=xt(I(e))),t.type}function vt(e){var t=f(e);return t.type||(t.type=_t(E(e))),t.type}function yt(e){var t=f(e);return t.type||(t.type=nr(_t(t.target),t.mapper)),t.type}function _t(e){return 67108864&e.flags?yt(e):7&e.flags?ut(e):9136&e.flags?ft(e):8&e.flags?gt(e):98304&e.flags?ht(e):33554432&e.flags?vt(e):qa}function bt(e){return 4096&e.flags?e.target:e}function Tt(t,n){function r(t){var i=bt(t);return i===n||e.forEach(i.baseTypes,r)}return r(t)}function Et(t){var n;return e.forEach(t.declarations,function(t){if(186===t.kind||185===t.kind){var r=t;r.typeParameters&&r.typeParameters.length&&e.forEach(r.typeParameters,function(t){var r=wt(O(t));n?e.contains(n,r)||n.push(r):n=[r]})}}),n}function St(t){var n=f(t);if(!n.declaredType){var r=n.declaredType=B(1024,t),i=Et(t);i&&(r.flags|=4096,r.typeParameters=i,r.instantiations={},r.instantiations[vn(r.typeParameters)]=r,r.target=r,r.typeArguments=r.typeParameters),r.baseTypes=[];var o=e.getDeclarationOfKind(t,185),s=e.getClassBaseTypeNode(o);if(s){var c=Tn(s);c!==qa&&(1024&bt(c).flags?r===c||Tt(c,r)?a(o,e.Diagnostics.Type_0_recursively_references_itself_as_a_base_type,it(r,void 0,1)):r.baseTypes.push(c):a(s,e.Diagnostics.A_class_may_only_extend_another_class))}r.declaredProperties=G(t.members),r.declaredCallSignatures=Pa,r.declaredConstructSignatures=Pa,r.declaredStringIndexType=fn(t,0),r.declaredNumberIndexType=fn(t,1)}return n.declaredType}function Ct(t){var n=f(t);if(!n.declaredType){var r=n.declaredType=B(2048,t),i=Et(t);i&&(r.flags|=4096,r.typeParameters=i,r.instantiations={},r.instantiations[vn(r.typeParameters)]=r,r.target=r,r.typeArguments=r.typeParameters),r.baseTypes=[],e.forEach(t.declarations,function(t){186===t.kind&&e.getInterfaceBaseTypeNodes(t)&&e.forEach(e.getInterfaceBaseTypeNodes(t),function(n){var i=Tn(n);i!==qa&&(3072&bt(i).flags?r===i||Tt(i,r)?a(t,e.Diagnostics.Type_0_recursively_references_itself_as_a_base_type,it(r,void 0,1)):r.baseTypes.push(i):a(n,e.Diagnostics.An_interface_may_only_extend_a_class_or_another_interface))})}),r.declaredProperties=G(t.members),r.declaredCallSignatures=an(t.members.__call),r.declaredConstructSignatures=an(t.members.__new),r.declaredStringIndexType=fn(t,0),r.declaredNumberIndexType=fn(t,1)}return n.declaredType}function kt(t){var n=f(t);if(n.declaredType){if(n.declaredType===Ka){n.declaredType=qa;var r=e.getDeclarationOfKind(t,187);a(r.name,e.Diagnostics.Type_alias_0_circularly_references_itself,rt(t))}}else{n.declaredType=Ka;var r=e.getDeclarationOfKind(t,187),i=$n(r.type);n.declaredType===Ka&&(n.declaredType=i)}return n.declaredType}function xt(e){var t=f(e);if(!t.declaredType){var n=F(128);n.symbol=e,t.declaredType=n}return t.declaredType}function wt(t){var n=f(t);if(!n.declaredType){var r=F(512);r.symbol=t,e.getDeclarationOfKind(t,122).constraint||(r.constraint=Qa),n.declaredType=r}return n.declaredType}function Lt(e){var t=f(e);return t.declaredType||(t.declaredType=At(E(e))),t.declaredType}function At(t){return e.Debug.assert(0===(67108864&t.flags)),32&t.flags?St(t):64&t.flags?Ct(t):2097152&t.flags?kt(t):384&t.flags?xt(t):1048576&t.flags?wt(t):33554432&t.flags?Lt(t):qa}function Nt(e){for(var t={},n=0;n<e.length;n++){var r=e[n];t[r.name]=r}return t}function Mt(e,t){for(var n={},r=0;r<e.length;r++){var i=e[r];n[i.name]=er(i,t)}return n
}function Pt(t,n){for(var r=0;r<n.length;r++){var i=n[r];e.hasProperty(t,i.name)||(t[i.name]=i)}}function Ot(t){var n=t.symbol.members,r=t.declaredCallSignatures,i=t.declaredConstructSignatures,o=t.declaredStringIndexType,s=t.declaredNumberIndexType;t.baseTypes.length&&(n=Nt(t.declaredProperties),e.forEach(t.baseTypes,function(t){Pt(n,zt(t)),r=e.concatenate(r,tn(t,0)),i=e.concatenate(i,tn(t,1)),o=o||rn(t,0),s=s||rn(t,1)})),U(t,n,r,i,o,s)}function It(t){var n=t.target,r=jn(n.typeParameters,t.typeArguments),i=Mt(n.declaredProperties,r),o=Gn(n.declaredCallSignatures,r,Zn),s=Gn(n.declaredConstructSignatures,r,Zn),a=n.declaredStringIndexType?nr(n.declaredStringIndexType,r):void 0,c=n.declaredNumberIndexType?nr(n.declaredNumberIndexType,r):void 0;e.forEach(n.baseTypes,function(t){var n=nr(t,r);Pt(i,zt(n)),o=e.concatenate(o,tn(n,0)),s=e.concatenate(s,tn(n,1)),a=a||rn(n,0),c=c||rn(n,1)}),U(t,i,o,s,a,c)}function Rt(e,t,n,r,i,o,s){var a=new Na(Ra);return a.declaration=e,a.typeParameters=t,a.parameters=n,a.resolvedReturnType=r,a.minArgumentCount=i,a.hasRestParameter=o,a.hasStringLiterals=s,a}function Dt(e){return Rt(e.declaration,e.typeParameters,e.parameters,e.resolvedReturnType,e.minArgumentCount,e.hasRestParameter,e.hasStringLiterals)}function Vt(t){if(t.baseTypes.length){var n=t.baseTypes[0],r=tn(_t(n.symbol),1);return e.map(r,function(e){var r=4096&n.flags?un(e,n.typeArguments):Dt(e);return r.typeParameters=t.typeParameters,r.resolvedReturnType=t,r})}return[Rt(void 0,t.typeParameters,Pa,t,0,!1,!1)]}function Ft(e){for(var t={},n=0;n<e.length;n++){var r=c(268435460,""+n);r.type=e[n],t[n]=r}return t}function Ht(e){var t=jt(xn(Dn(e.elementTypes))),n=Ft(e.elementTypes);Pt(n,t.properties),U(e,n,t.callSignatures,t.constructSignatures,t.stringIndexType,t.numberIndexType)}function Bt(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!gr(e[n],t[n],!1,ar))return!1;return!0}function $t(t,n){for(var r=e.map(t,function(e){return tn(e,n)}),i=r[0],o=0;o<i.length;o++)if(i[o].typeParameters)return Pa;for(var o=1;o<r.length;o++)if(!Bt(i,r[o]))return Pa;for(var s=e.map(i,Dt),o=0;o<s.length;o++){var a=s[o];a.resolvedReturnType=void 0,a.unionSignatures=e.map(r,function(e){return e[o]})}return s}function Gt(e,t){for(var n=[],r=0;r<e.length;r++){var i=rn(e[r],t);if(!i)return void 0;n.push(i)}return Dn(n)}function Ut(e){var t=$t(e.types,0),n=$t(e.types,1),r=Gt(e.types,0),i=Gt(e.types,1);U(e,Oa,t,n,r,i)}function Wt(e){var t=e.symbol;if(2048&t.flags)var n=t.members,r=an(n.__call),i=an(n.__new),o=fn(t,0),s=fn(t,1);else{var n=Oa,r=Pa,i=Pa;if(1952&t.flags&&(n=t.exports),8208&t.flags&&(r=an(t)),32&t.flags){var a=St(t);i=an(t.members.__constructor),i.length||(i=Vt(a)),a.baseTypes.length&&(n=Nt(G(n)),Pt(n,zt(_t(a.baseTypes[0].symbol))))}var o=void 0,s=384&t.flags?$a:void 0}U(e,n,r,i,o,s)}function jt(e){return e.members||(3072&e.flags?Ot(e):32768&e.flags?Wt(e):8192&e.flags?Ht(e):16384&e.flags?Ut(e):It(e)),e}function zt(e){return 48128&e.flags?jt(e).properties:Pa}function qt(t,n){if(48128&t.flags){var r=jt(t);if(e.hasProperty(r.members,n)){var i=r.members[n];if(D(i))return i}}}function Kt(t){var n=[];return e.forEach(Yt(t.types[0]),function(e){var r=Jt(t,e.name);r&&n.push(r)}),n}function Yt(e){return 16384&e.flags?Kt(e):zt(Xt(e))}function Xt(e){if(512&e.flags){do e=gn(e);while(e&&512&e.flags);e||(e=Ya)}return 258&e.flags?e=Ea:132&e.flags?e=Sa:8&e.flags&&(e=Ca),e}function Qt(e,t){for(var n,r=e.types,i=0;i<r.length;i++){var o=Xt(r[i]);if(o!==qa){var s=Zt(o,t);if(!s)return void 0;n?n.push(s):n=[s]}}for(var a=[],l=[],i=0;i<n.length;i++){var s=n[i];s.declarations&&l.push.apply(l,s.declarations),a.push(_t(s))}var u=c(1342177284,t);return u.unionType=e,u.declarations=l,u.type=Dn(a),u}function Jt(t,n){var r=t.resolvedProperties||(t.resolvedProperties={});if(e.hasProperty(r,n))return r[n];var i=Qt(t,n);return i&&(r[n]=i),i}function Zt(t,n){if(16384&t.flags)return Jt(t,n);if(!(48128&t.flags||(t=Xt(t),48128&t.flags)))return void 0;var r=jt(t);if(e.hasProperty(r.members,n)){var i=r.members[n];if(D(i))return i}if(r===Xa||r.callSignatures.length||r.constructSignatures.length){var i=qt(ba,n);if(i)return i}return qt(_a,n)}function en(e,t){if(64512&e.flags){var n=jt(e);return 0===t?n.callSignatures:n.constructSignatures}return Pa}function tn(e,t){return en(Xt(e),t)}function nn(e,t){if(64512&e.flags){var n=jt(e);return 0===t?n.stringIndexType:n.numberIndexType}}function rn(e,t){return nn(Xt(e),t)}function on(t){var n=[];return e.forEach(t,function(t){var r=wt(t.symbol);e.contains(n,r)||n.push(r)}),n}function sn(t){var n=g(t);if(!n.resolvedSignature){for(var r=126===t.kind?St(t.parent.symbol):void 0,i=r?r.typeParameters:t.typeParameters?on(t.typeParameters):void 0,o=[],s=!1,a=-1,c=0,l=t.parameters.length;l>c;c++){var u=t.parameters[c];o.push(u.symbol),u.type&&7===u.type.kind&&(s=!0),0>a&&(u.initializer||u.questionToken||u.dotDotDotToken)&&(a=c)}0>a&&(a=t.parameters.length);var p;if(r)p=r;else if(t.type)p=$n(t.type);else{if(127===t.kind&&!e.hasComputedNameButNotSymbol(t)){var d=e.getDeclarationOfKind(t.symbol,128);p=dt(d)}p||t.body||(p=Ba)}n.resolvedSignature=Rt(t,i,o,p,a,e.hasRestParameters(t),s)}return n.resolvedSignature}function an(e){if(!e)return Pa;for(var t=[],n=0,r=e.declarations.length;r>n;n++){var i=e.declarations[n];switch(i.kind){case 133:case 134:case 184:case 125:case 126:case 129:case 130:case 131:case 127:case 128:case 150:case 151:if(n>0&&i.body){var o=e.declarations[n-1];if(i.parent===o.parent&&i.kind===o.kind&&i.pos===o.end)break}t.push(sn(i))}}return t}function cn(t){if(t.resolvedReturnType){if(t.resolvedReturnType===Ka&&(t.resolvedReturnType=Ba,Ia.noImplicitAny)){var n=t.declaration;n.name?a(n.name,e.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,e.declarationNameToString(n.name)):a(n,e.Diagnostics.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions)}}else{if(t.resolvedReturnType=Ka,t.target)var r=nr(cn(t.target),t.mapper);else if(t.unionSignatures)var r=Dn(e.map(t.unionSignatures,cn));else var r=$i(t.declaration);t.resolvedReturnType===Ka&&(t.resolvedReturnType=r)}return t.resolvedReturnType}function ln(e){if(e.hasRestParameter){var t=_t(e.parameters[e.parameters.length-1]);if(4096&t.flags&&t.target===Ta)return t.typeArguments[0]}return Ba}function un(e,t){return Zn(e,jn(e.typeParameters,t),!0)}function pn(e){return e.typeParameters?(e.erasedSignatureCache||(e.erasedSignatureCache=e.target?Zn(pn(e.target),e.mapper):Zn(e,Kn(e.typeParameters),!0)),e.erasedSignatureCache):e}function dn(e){if(!e.isolatedSignatureType){var t=126===e.declaration.kind||130===e.declaration.kind,n=B(98304);n.members=Oa,n.properties=Pa,n.callSignatures=t?Pa:[e],n.constructSignatures=t?[e]:Pa,e.isolatedSignatureType=n}return e.isolatedSignatureType}function hn(e){return e.members.__index}function mn(e,t){var n=1===t?116:118,r=hn(e);if(r)for(var i=r.declarations.length,o=0;i>o;o++){var s=r.declarations[o];if(1===s.parameters.length){var a=s.parameters[0];if(a&&a.type&&a.type.kind===n)return s}}return void 0}function fn(e,t){var n=mn(e,t);return n?n.type?$n(n.type):Ba:void 0}function gn(t){if(!t.constraint)if(t.target){var n=gn(t.target);t.constraint=n?nr(n,t.mapper):Qa}else t.constraint=$n(e.getDeclarationOfKind(t.symbol,122).constraint);return t.constraint===Qa?void 0:t.constraint}function vn(e){switch(e.length){case 1:return""+e[0].id;case 2:return e[0].id+","+e[1].id;default:for(var t="",n=0;n<e.length;n++)n>0&&(t+=","),t+=e[n].id;return t}}function yn(e,t){var n=vn(t),r=e.instantiations[n];return r||(r=e.instantiations[n]=B(4096,e.symbol),r.target=e,r.typeArguments=t),r}function _n(t,n){var r=g(t);if(void 0!==r.isIllegalTypeReferenceInConstraint)return r.isIllegalTypeReferenceInConstraint;for(var i=t;!e.forEach(n.declarations,function(e){return e.parent===i.parent});)i=i.parent;return r.isIllegalTypeReferenceInConstraint=122===i.kind,r.isIllegalTypeReferenceInConstraint}function bn(t){function n(r){if(132===r.kind&&63===r.typeName.kind){var i=g(r);if(void 0===i.isIllegalTypeReferenceInConstraint){var o=T(t,r.typeName.text,3152352,void 0,void 0);o&&1048576&o.flags&&(i.isIllegalTypeReferenceInConstraint=e.forEach(o.declarations,function(e){return e.parent==t.parent}))}i.isIllegalTypeReferenceInConstraint&&a(t,e.Diagnostics.Constraint_of_a_type_parameter_cannot_reference_any_type_parameter_from_the_same_type_parameter_list)}e.forEachChild(r,n)}var r;t.constraint&&(r=O(t),n(t.constraint))}function Tn(t){var n=g(t);if(!n.resolvedType){var r=k(t,t.typeName,3152352);if(r){var i;if(1048576&r.flags&&_n(t,r))i=qa;else if(i=At(r),3072&i.flags&&4096&i.flags){var o=i.typeParameters;t.typeArguments&&t.typeArguments.length===o.length?i=yn(i,e.map(t.typeArguments,$n)):(a(t,e.Diagnostics.Generic_type_0_requires_1_type_argument_s,it(i,void 0,1),o.length),i=void 0)}else t.typeArguments&&(a(t,e.Diagnostics.Type_0_is_not_generic,it(i)),i=void 0)}n.resolvedType=i||qa}return n.resolvedType}function En(e){var t=g(e);return t.resolvedType||(t.resolvedType=Sr(fo(e.exprName))),t.resolvedType}function Sn(t,n){function r(e){for(var t=e.declarations,n=0;n<t.length;n++){var r=t[n];switch(r.kind){case 185:case 186:case 188:return r}}}if(!t)return Ya;var i=At(t);return 48128&i.flags?(i.typeParameters?i.typeParameters.length:0)!==n?(a(r(t),e.Diagnostics.Global_type_0_must_have_1_type_parameter_s,t.name,n),Ya):i:(a(r(t),e.Diagnostics.Global_type_0_must_be_a_class_or_interface_type,t.name),Ya)}function Cn(t){return T(void 0,t,3152352,e.Diagnostics.Cannot_find_global_type_0,t)}function kn(e){return Sn(Cn(e),0)}function xn(e){var t=Ta||At(ya);return t!==Ya?yn(t,[e]):Ya}function wn(e){var t=g(e);return t.resolvedType||(t.resolvedType=xn($n(e.elementType))),t.resolvedType}function Ln(e){var t=vn(e),n=nc[t];return n||(n=nc[t]=B(8192),n.elementTypes=e),n}function An(t){var n=g(t);return n.resolvedType||(n.resolvedType=Ln(e.map(t.elementTypes,$n))),n.resolvedType}function Nn(e,t){if(16384&t.flags)Mn(e,t.types);else{for(var n=0,r=t.id;n<e.length&&e[n].id<r;)n++;(n===e.length||e[n].id!==r)&&e.splice(n,0,t)}}function Mn(e,t){for(var n=0,r=t.length;r>n;n++)Nn(e,t[n])}function Pn(e,t){for(var n=0,r=t.length;r>n;n++)if(e!==t[n]&&cr(e,t[n]))return!0;return!1}function On(e){for(var t=e.length;t>0;)t--,Pn(e[t],e)&&e.splice(t,1)}function In(e){for(var t=0;t<e.length;t++)if(1&e[t].flags)return!0;return!1}function Rn(e,t){for(var n=e.length;n>0&&e.length>1;)n--,e[n]===t&&e.splice(n,1)}function Dn(e,t){if(0===e.length)return Ya;var n=[];if(Mn(n,e),t){if(In(n))return Ba;Rn(n,ja),Rn(n,za)}else On(n);if(1===n.length)return n[0];var r=vn(n),i=rc[r];return i||(i=rc[r]=B(16384),i.types=n),i}function Vn(t){var n=g(t);return n.resolvedType||(n.resolvedType=Dn(e.map(t.types,$n),!0)),n.resolvedType}function Fn(e){var t=g(e);return t.resolvedType||(t.resolvedType=B(32768,e.symbol)),t.resolvedType}function Hn(t){if(e.hasProperty(ic,t.text))return ic[t.text];var n=ic[t.text]=F(256);return n.text=e.getTextOfNode(t),n}function Bn(e){var t=g(e);return t.resolvedType||(t.resolvedType=Hn(e)),t.resolvedType}function $n(e){switch(e.kind){case 109:return Ba;case 118:return $a;case 116:return Ga;case 110:return Ua;case 97:return Wa;case 7:return Bn(e);case 132:return Tn(e);case 135:return En(e);case 137:return wn(e);case 138:return An(e);case 139:return Vn(e);case 140:return $n(e.type);case 133:case 134:case 136:return Fn(e);case 63:case 120:var t=Us(e);return t&&At(t);default:return qa}}function Gn(e,t,n){if(e&&e.length){for(var r=[],i=0;i<e.length;i++)r.push(n(e[i],t));return r}return e}function Un(e,t){return function(n){return n===e?t:n}}function Wn(e,t,n,r){return function(i){return i===e?t:i===n?r:i}}function jn(e,t){switch(e.length){case 1:return Un(e[0],t[0]);case 2:return Wn(e[0],t[0],e[1],t[1])}return function(n){for(var r=0;r<e.length;r++)if(n===e[r])return t[r];return n}}function zn(e){return function(t){return t===e?Ba:t}}function qn(e,t){return function(n){return n===e||n===t?Ba:n}}function Kn(e){switch(e.length){case 1:return zn(e[0]);case 2:return qn(e[0],e[1])}return function(t){for(var n=0;n<e.length;n++)if(t===e[n])return Ba;return t}}function Yn(e){return function(t){for(var n=0;n<e.typeParameters.length;n++)if(t===e.typeParameters[n])return Lr(e,n);return t}}function Xn(e){return e}function Qn(e,t){return function(n){return t(e(n))}}function Jn(e,t){var n=F(512);return n.symbol=e.symbol,e.constraint?n.constraint=nr(e.constraint,t):(n.target=e,n.mapper=t),n}function Zn(e,t,n){if(e.typeParameters&&!n){var r=Gn(e.typeParameters,t,Jn);t=Qn(jn(e.typeParameters,r),t)}var i=Rt(e.declaration,r,Gn(e.parameters,t,er),e.resolvedReturnType?nr(e.resolvedReturnType,t):void 0,e.minArgumentCount,e.hasRestParameter,e.hasStringLiterals);return i.target=e,i.mapper=t,i}function er(e,t){if(67108864&e.flags){var n=f(e);e=n.target,t=Qn(n.mapper,t)}var r=c(335544320|e.flags,e.name);return r.declarations=e.declarations,r.parent=e.parent,r.target=e,r.mapper=t,e.valueDeclaration&&(r.valueDeclaration=e.valueDeclaration),r}function tr(e,t){var n=B(32768,e.symbol);n.properties=Gn(zt(e),t,er),n.members=Nt(n.properties),n.callSignatures=Gn(tn(e,0),t,Zn),n.constructSignatures=Gn(tn(e,1),t,Zn);var r=rn(e,0),i=rn(e,1);return r&&(n.stringIndexType=nr(r,t)),i&&(n.numberIndexType=nr(i,t)),n}function nr(e,t){if(t!==Xn){if(512&e.flags)return t(e);if(32768&e.flags)return e.symbol&&14352&e.symbol.flags?tr(e,t):e;if(4096&e.flags)return yn(e.target,Gn(e.typeArguments,t,nr));if(8192&e.flags)return Ln(Gn(e.elementTypes,t,nr));if(16384&e.flags)return Dn(Gn(e.types,t,nr),!0)}return e}function rr(t){switch(e.Debug.assert(125!==t.kind||e.isObjectLiteralMethod(t)),t.kind){case 150:case 151:return ir(t);case 142:return e.forEach(t.properties,rr);case 141:return e.forEach(t.elements,rr);case 158:return rr(t.whenTrue)||rr(t.whenFalse);case 157:return 48===t.operator&&(rr(t.left)||rr(t.right));case 198:return rr(t.initializer);case 125:return ir(t)}return!1}function ir(t){return!t.typeParameters&&!e.forEach(t.parameters,function(e){return e.type})}function or(e){if(48128&e.flags){var t=jt(e);if(t.constructSignatures.length){var n=B(32768,e.symbol);n.members=t.members,n.properties=t.properties,n.callSignatures=t.callSignatures,n.constructSignatures=Pa,e=n}}return e}function sr(e,t){return hr(e,t,mc,void 0)}function ar(e,t){return hr(e,t,mc,void 0)?-1:0}function cr(e,t){return ur(e,t,void 0)}function lr(e,t){return pr(e,t,void 0)}function ur(e,t,n,r,i){return hr(e,t,dc,n,r,i)}function pr(e,t,n,r){return hr(e,t,hc,n,r)}function dr(e,t){var n=dn(e),r=dn(t);return hr(n,r,hc,void 0)}function hr(n,r,i,o,c,l){function u(t,n,r,i){x=e.chainDiagnosticMessages(x,t,n,r,i)}function p(t,n,r,o){var s;if(i===mc){if(t===n)return-1}else{if(t===n)return-1;if(1&n.flags)return-1;if(t===ja)return-1;if(t===za&&n!==ja)return-1;if(128&t.flags&&n===Ga)return-1;if(256&t.flags&&n===$a)return-1;if(i===hc){if(1&t.flags)return-1;if(t===Ga&&128&n.flags)return-1}}if(16384&t.flags){if(s=h(t,n,r))return s}else if(16384&n.flags){if(s=d(t,n,r))return s}else if(512&t.flags&&512&n.flags){if(s=f(t,n,r))return s}else{var a=x;if(4096&t.flags&&4096&n.flags&&t.target===n.target&&(s=m(t.typeArguments,n.typeArguments,r)))return s;var c=r&&x===a,l=i===mc?t:Xt(t);if(48128&l.flags&&48128&n.flags&&(s=g(l,n,c)))return x=a,s}return r&&(o=o||e.Diagnostics.Type_0_is_not_assignable_to_type_1,u(o,it(t),it(n))),0}function d(e,t,n){for(var r=t.types,i=0,o=r.length;o>i;i++){var s=p(e,r[i],n&&i===o-1);if(s)return s}return 0}function h(e,t,n){for(var r=-1,i=e.types,o=0,s=i.length;s>o;o++){var a=p(i[o],t,n);if(!a)return 0;r&=a}return r}function m(e,t,n){for(var r=-1,i=0,o=e.length;o>i;i++){var s=p(e[i],t[i],n);if(!s)return 0;r&=s}return r}function f(e,t,n){if(i===mc)return e.symbol.name!==t.symbol.name?0:e.constraint===t.constraint?-1:e.constraint===Qa||t.constraint===Qa?0:p(e.constraint,t.constraint,n);for(;;){var r=gn(e);if(r===t)return-1;if(!(r&&512&r.flags))break;e=r}return 0}function g(e,t,n){if(P)return 0;var r=e.id+","+t.id,o=i[r];if(void 0!==o)return o?-1:0;if(M>0){for(var s=0;M>s;s++)if(A[s][r])return 1;if(100===M)return P=!0,0}else w=[],L=[],A=[],N=0;w[M]=e,L[M]=t,A[M]={},A[M][r]=!0,M++;var a=N;if(1&N||!v(e,w)||(N|=1),2&N||!v(t,L)||(N|=2),3===N)var c=1;else{var c=y(e,t,n);c&&(c&=b(e,t,0,n),c&&(c&=b(e,t,1,n),c&&(c&=S(e,t,n),c&&(c&=C(e,t,n)))))}if(N=a,M--,c){var l=A[M],u=-1===c||0===M?i:A[M-1];for(var p in l)u[p]=l[p]}else i[r]=!1;return c}function v(e,t){if(4096&e.flags&&M>=10)for(var n=e.target,r=0,i=0;M>i;i++){var o=t[i];if(4096&o.flags&&o.target===n&&(r++,r>=10))return!0}return!1}function y(t,n,r){if(i===mc)return _(t,n);for(var o=-1,s=zt(n),a=0;a<s.length;a++){var c=s[a],l=Zt(t,c.name);if(l!==c)if(l){if(!(536870912&c.flags)){var d=fi(l),h=fi(c);if(32&d||32&h){if(l.valueDeclaration!==c.valueDeclaration)return r&&(32&d&&32&h?u(e.Diagnostics.Types_have_separate_declarations_of_a_private_property_0,rt(c)):u(e.Diagnostics.Property_0_is_private_in_type_1_but_not_in_type_2,rt(c),it(32&d?t:n),it(32&d?n:t))),0}else if(64&h){var m=l.parent&&32&l.parent.flags,f=m?At(l.parent):void 0,g=At(c.parent);if(!f||!Tt(f,g))return r&&u(e.Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2,rt(c),it(f||t),it(g)),0}else if(64&d)return r&&u(e.Diagnostics.Property_0_is_protected_in_type_1_but_public_in_type_2,rt(c),it(t),it(n)),0;var v=p(_t(l),_t(c),r);if(!v)return r&&u(e.Diagnostics.Types_of_property_0_are_incompatible,rt(c)),0;if(o&=v,j(l)&&!j(c))return r&&u(e.Diagnostics.Property_0_is_optional_in_type_1_but_required_in_type_2,rt(c),it(t),it(n)),0}}else if(i===dc||!j(c))return r&&u(e.Diagnostics.Property_0_is_missing_in_type_1,rt(c),it(t)),0}return o}function _(e,t){var n=zt(e),r=zt(t);if(n.length!==r.length)return 0;for(var i=-1,o=0,s=n.length;s>o;++o){var a=n[o],c=qt(t,a.name);if(!c)return 0;var l=fr(a,c,p);if(!l)return 0;i&=l}return i}function b(e,t,n,r){if(i===mc)return E(e,t,n);if(t===Xa||e===Xa)return-1;var o=tn(e,n),s=tn(t,n),a=-1,c=x;e:for(var l=0;l<s.length;l++){var u=s[l];if(!u.hasStringLiterals||65536&t.flags){for(var p=r,d=0;d<o.length;d++){var h=o[d];if(!h.hasStringLiterals||65536&e.flags){var m=T(h,u,p);if(m){a&=m,x=c;continue e}p=!1}}return 0}}return a}function T(t,n,r){if(t===n)return-1;if(!n.hasRestParameter&&t.minArgumentCount>n.parameters.length)return 0;var i,o=t.parameters.length,s=n.parameters.length;t.hasRestParameter&&n.hasRestParameter?(i=o>s?o:s,o--,s--):t.hasRestParameter?(o--,i=s):n.hasRestParameter?(s--,i=o):i=s>o?o:s,t=pn(t),n=pn(n);for(var a=-1,c=0;i>c;c++){var l=o>c?_t(t.parameters[c]):ln(t),d=s>c?_t(n.parameters[c]):ln(n),h=x,m=p(l,d,r);if(!m){if(m=p(d,l,!1),!m)return r&&u(e.Diagnostics.Types_of_parameters_0_and_1_are_incompatible,t.parameters[o>c?c:o].name,n.parameters[s>c?c:s].name),0;x=h}a&=m}var d=cn(n);if(d===Wa)return a;var l=cn(t);return a&p(l,d,r)}function E(e,t,n){var r=tn(e,n),i=tn(t,n);if(r.length!==i.length)return 0;for(var o=-1,s=0,a=r.length;a>s;++s){var c=gr(r[s],i[s],!0,p);if(!c)return 0;o&=c}return o}function S(t,n,r){if(i===mc)return k(0,t,n);var o=rn(n,0);if(o){var s=rn(t,0);if(!s)return r&&u(e.Diagnostics.Index_signature_is_missing_in_type_0,it(t)),0;var a=p(s,o,r);return a?a:(r&&u(e.Diagnostics.Index_signatures_are_incompatible),0)}return-1}function C(t,n,r){if(i===mc)return k(1,t,n);var o=rn(n,1);if(o){var s=rn(t,0),a=rn(t,1);if(!s&&!a)return r&&u(e.Diagnostics.Index_signature_is_missing_in_type_0,it(t)),0;if(s&&a)var c=p(s,o,!1)||p(a,o,r);else var c=p(s||a,o,r);return c?c:(r&&u(e.Diagnostics.Index_signatures_are_incompatible),0)}return-1}function k(e,t,n){var r=rn(n,e),i=rn(t,e);return i||r?i&&r?p(i,r):0:-1}var x,w,L,A,N,M=0,P=!1;e.Debug.assert(i!==mc||!o,"no error reporting in identity checking");var O=p(n,r,void 0!==o,c);return P?a(o,e.Diagnostics.Excessive_stack_depth_comparing_types_0_and_1,it(n),it(r)):x&&(l&&(x=e.concatenateDiagnosticMessageChains(l,x)),s(e.createDiagnosticForNodeFromMessageChain(o,x,t.getCompilerHost().getNewLine()))),0!==O}function mr(e,t){return 0!==fr(e,t,ar)}function fr(e,t,n){if(e===t)return-1;var r=96&fi(e),i=96&fi(t);if(r!==i)return 0;if(r){if(hs(e)!==hs(t))return 0}else if(j(e)!==j(t))return 0;return n(_t(e),_t(t))}function gr(e,t,n,r){if(e===t)return-1;if(e.parameters.length!==t.parameters.length||e.minArgumentCount!==t.minArgumentCount||e.hasRestParameter!==t.hasRestParameter)return 0;var i=-1;if(e.typeParameters&&t.typeParameters){if(e.typeParameters.length!==t.typeParameters.length)return 0;for(var o=0,s=e.typeParameters.length;s>o;++o){var a=r(e.typeParameters[o],t.typeParameters[o]);if(!a)return 0;i&=a}}else if(e.typeParameters||e.typeParameters)return 0;e=pn(e),t=pn(t);for(var o=0,s=e.parameters.length;s>o;o++){var c=e.hasRestParameter&&o===s-1?ln(e):_t(e.parameters[o]),l=t.hasRestParameter&&o===s-1?ln(t):_t(t.parameters[o]),a=r(c,l);if(!a)return 0;i&=a}return n&&(i&=r(cn(e),cn(t))),i}function vr(e,t){for(var n=0,r=t.length;r>n;n++)if(e!==t[n]&&!cr(t[n],e))return!1;return!0}function yr(t){return e.forEach(t,function(e){return vr(e,t)?e:void 0})}function _r(t,n,r){for(var i,o,s=0,a=0;a<t.length;a++){for(var c=0,l=void 0,u=0;u<t.length;u++)cr(t[u],t[a])?c++:l||(l=t[u]);if(c>s&&(i=t[a],o=l,s=c),s===t.length-1)break}ur(o,i,n,e.Diagnostics.Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0,r)}function br(e){return 32768&e.flags&&e.symbol&&4096&e.symbol.flags?!0:!1}function Tr(e){return 4096&e.flags&&e.target===Ta}function Er(e){for(;Tr(e);)e=e.typeArguments[0];return e}function Sr(t,n){function r(t){return Dn(e.map(t.types,function(e){return Sr(e,n)}))}function i(t){var r=zt(t);if(r.length){var i=[],o=!1;if(e.forEach(r,function(t){var r=_t(t),s=Sr(r);r!==s&&(o=!0,!n&&Ia.noImplicitAny&&Er(s)===Ba&&a(t.valueDeclaration,e.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type,t.name,it(s))),i.push(s)}),o){var s={},l=0;e.forEach(r,function(e){var t=c(268435460|e.flags,e.name);t.declarations=e.declarations,t.parent=e.parent,t.type=i[l++],t.target=e,e.valueDeclaration&&(t.valueDeclaration=e.valueDeclaration),s[t.name]=t});var u=rn(t,0),p=rn(t,1);u&&(u=Sr(u)),p&&(p=Sr(p)),t=W(t.symbol,s,Pa,Pa,u,p)}}return t}function o(e){var t=e.typeArguments[0],r=Sr(t,n);return e=t!==r?xn(r):e}return 96&t.flags?Ba:16384&t.flags?r(t):br(t)?i(t):Tr(t)?o(t):t}function Cr(e,t,n){var r,i=e.parameters.length,o=t.parameters.length;e.hasRestParameter&&t.hasRestParameter?(r=i>o?i:o,i--,o--):e.hasRestParameter?(i--,r=o):t.hasRestParameter?(o--,r=i):r=o>i?i:o;for(var s=0;r>s;s++){var a=i>s?_t(e.parameters[s]):ln(e),c=o>s?_t(t.parameters[s]):ln(t);n(a,c)}}function kr(e,t){for(var n=[],r=0;r<e.length;r++)n.push({primary:void 0,secondary:void 0});return{typeParameters:e,inferUnionTypes:t,inferenceCount:0,inferences:n,inferredTypes:new Array(e.length)}}function xr(t,n,r){function i(e,t){for(var n=0;h>n;n++)if(e===p[n]&&t===d[n])return!0;return!1}function o(e,t){if(h>=5){for(var n=e.target,r=0,i=0;h>i;i++){var o=t[i];4096&o.flags&&o.target===n&&r++}return 5>r}return!0}function s(n,r){if(512&r.flags){for(var l=t.typeParameters,f=0;f<l.length;f++)if(r===l[f]){var g=t.inferences[f],v=m?g.secondary||(g.secondary=[]):g.primary||(g.primary=[]);e.contains(v,n)||v.push(n);break}}else if(4096&n.flags&&4096&r.flags&&n.target===r.target)for(var y=n.typeArguments,_=r.typeArguments,f=0;f<y.length;f++)s(y[f],_[f]);else if(16384&r.flags){for(var b,_=r.types,T=0,f=0;f<_.length;f++){var E=_[f];512&E.flags&&e.contains(t.typeParameters,E)?(b=E,T++):s(n,E)}1===T&&(m++,s(n,b),m--)}else if(16384&n.flags)for(var y=n.types,f=0;f<y.length;f++)s(y[f],r);else 48128&n.flags&&(12288&r.flags||32768&r.flags&&r.symbol&&10240&r.symbol.flags)&&!i(n,r)&&o(n,p)&&o(r,d)&&(0===h&&(p=[],d=[]),p[h]=n,d[h]=r,h++,a(n,r),c(n,r,0),c(n,r,1),u(n,r,0,0),u(n,r,1,1),u(n,r,0,1),h--)}function a(e,t){for(var n=zt(t),r=0;r<n.length;r++){var i=n[r],o=qt(e,i.name);o&&s(_t(o),_t(i))}}function c(e,t,n){for(var r=tn(e,n),i=tn(t,n),o=r.length,s=i.length,a=s>o?o:s,c=0;a>c;c++)l(pn(r[o-a+c]),pn(i[s-a+c]))}function l(e,t){Cr(e,t,s),s(cn(e),cn(t))}function u(e,t,n,r){var i=rn(t,r);if(i){var o=rn(e,n);o&&s(o,i)}}var p,d,h=0,m=0;s(n,r)}function wr(e,t){var n=e.inferences[t];return n.primary||n.secondary||Pa}function Lr(e,t){var n=e.inferredTypes[t];if(!n){var r=wr(e,t);if(r.length){var i=e.inferUnionTypes?Dn(r):yr(r);n=i?Sr(i):Ja}else n=Ya;if(n!==Ja){var o=gn(e.typeParameters[t]);n=o&&!lr(n,o)?o:n}e.inferredTypes[t]=n}return n}function Ar(e){for(var t=0;t<e.inferredTypes.length;t++)Lr(e,t);return e.inferredTypes}function Nr(t){var n=g(t);return n.resolvedSymbol||(n.resolvedSymbol=e.getFullWidth(t)>0&&T(t,t.text,4301759,e.Diagnostics.Cannot_find_name_0,t)||Fa),n.resolvedSymbol}function Mr(t){for(;t;)switch(t.kind){case 135:return!0;case 63:case 120:t=t.parent;continue;default:return!1}e.Debug.fail("should not get here")}function Pr(t,n){if(16384&t.flags){var r=t.types;if(e.forEach(r,function(e){return e.flags&n}))return Dn(e.filter(r,function(e){return!(e.flags&n)}))}return t}function Or(t,n){function r(n){if(n.operator>=51&&n.operator<=62){for(var r=n.left;149===r.kind;)r=r.expression;if(63===r.kind&&Nr(r)===t)return!0}return e.forEachChild(n,o)}function i(n){return O(n)===t&&n.initializer?!0:e.forEachChild(n,o)}function o(t){switch(t.kind){case 157:return r(t);case 183:return i(t);case 141:case 142:case 143:case 144:case 145:case 146:case 148:case 149:case 155:case 152:case 153:case 154:case 156:case 158:case 163:case 164:case 166:case 167:case 168:case 169:case 170:case 171:case 174:case 175:case 176:case 194:case 195:case 177:case 178:case 179:case 180:case 197:case 181:return e.forEachChild(t,o)}return!1}var s=g(n);if(s.assignmentChecks){var a=s.assignmentChecks[t.id];if(void 0!==a)return a}else s.assignmentChecks={};return s.assignmentChecks[t.id]=o(n)}function Ir(t){for(var n=[],r=t.parent;r;r=r.parent)(e.isExpression(r)||e.isObjectLiteralMethod(t))&&rr(r)&&n.unshift(r);e.forEach(n,function(e){js(e)})}function Rr(e){return Ir(e),Us(e)}function Dr(e){return Ir(e),js(e)}function Vr(e,t){return Ir(t),Fr(e,t)}function Fr(e,t){function n(t,n,r){if(153!==n.left.kind||7!==n.right.kind)return t;var i=n.left,o=n.right;if(63!==i.expression.kind||Nr(i.expression)!==e)return t;var s=o.text,a="string"===s?$a:"number"===s?Ga:"boolean"===s?Ua:Ya;return 30===n.operator&&(r=!r),r?a===Ya?Pr(t,14):a:a===Ya?t:Pr(t,a.flags)}function r(e,t,n){return n?s(s(e,t.left,!0),t.right,!0):Dn([s(e,t.left,!1),s(s(e,t.left,!0),t.right,!1)])}function i(e,t,n){return n?Dn([s(e,t.left,!0),s(s(e,t.left,!1),t.right,!0)]):s(s(e,t.left,!1),t.right,!1)}function o(t,n,r){if(!r||63!==n.left.kind||Nr(n.left)!==e)return t;var i=mo(n.right);if(!cr(i,ba))return t;var o=Zt(i,"prototype");if(!o)return t;var s=_t(o);return cr(s,t)?s:t}function s(e,t,a){switch(t.kind){case 149:return s(e,t.expression,a);case 157:var c=t.operator;if(29===c||30===c)return n(e,t,a);if(47===c)return r(e,t,a);if(48===c)return i(e,t,a);if(85===c)return o(e,t,a);break;case 155:if(45===t.operator)return s(e,t.operand,!a)}return e}var a=_t(e);if(t&&3&e.flags&&65024&a.flags)e:for(;t.parent;){var c=t;t=t.parent;var l=a;switch(t.kind){case 167:c!==t.expression&&(l=s(a,t.expression,c===t.thenStatement));break;case 158:c!==t.condition&&(l=s(a,t.condition,c===t.whenTrue));break;case 157:c===t.right&&(47===t.operator?l=s(a,t.left,!0):48===t.operator&&(l=s(a,t.left,!1)));break;case 201:case 189:case 184:case 125:case 127:case 128:case 126:break e}if(l!==a&&cr(l,a)){if(Or(e,t))break;a=l}}return a}function Hr(e){var t=Nr(e);return 33554432&t.flags&&(f(t).referenced=f(t).referenced||!Mr(e)&&!aa(E(t))),Wo(e,e),Go(e,e),Bo(e,e),Fr(R(t),e)}function Br(e,t){var n=t.parent&&185===t.parent.kind?t.parent:void 0;g(e).flags|=2,124===t.kind||126===t.kind?g(n).flags|=4:g(t).flags|=4}function $r(t){var n=e.getThisContainer(t,!0),r=!1;switch(151===n.kind&&(n=e.getThisContainer(n,!1),r=!0),n.kind){case 189:a(t,e.Diagnostics.this_cannot_be_referenced_in_a_module_body);break;case 188:a(t,e.Diagnostics.this_cannot_be_referenced_in_current_location);break;case 126:Ur(t,n)&&a(t,e.Diagnostics.this_cannot_be_referenced_in_constructor_arguments);break;case 124:128&n.flags&&a(t,e.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer)}r&&Br(t,n);var i=n.parent&&185===n.parent.kind?n.parent:void 0;if(i){var o=O(i);return 128&n.flags?_t(o):At(o)}return Ba}function Gr(e){for(;;){if(e=e.parent,!e)return e;switch(e.kind){case 184:case 150:case 151:case 124:case 125:case 126:case 127:case 128:return e}}}function Ur(e,t){for(var n=e;n&&n!==t;n=n.parent)if(123===n.kind)return!0;return!1}function Wr(t){var n,r=145===t.parent.kind&&t.parent.expression===t,i=e.getAncestor(t,185);if(i&&e.getClassBaseTypeNode(i)){var o=At(O(i));n=o.baseTypes.length&&o.baseTypes[0]}if(!n)return a(t,e.Diagnostics.super_can_only_be_referenced_in_a_derived_class),qa;var s=Gr(t);if(s){var c=!1;if(r)c=126===s.kind;else{for(var l=!1;s&&151===s.kind;)s=Gr(s),l=!0;s&&s.parent&&185===s.parent.kind&&(c=128&s.flags?125===s.kind||127===s.kind||128===s.kind:125===s.kind||127===s.kind||128===s.kind||124===s.kind||126===s.kind)}if(c){var u;return 128&s.flags||r?(g(t).flags|=32,u=_t(n.symbol)):(g(t).flags|=16,u=n),126===s.kind&&Ur(t,s)&&(a(t,e.Diagnostics.super_cannot_be_referenced_in_constructor_arguments),u=qa),!r&&l&&Br(t.parent,s),u}}return r?a(t,e.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors):a(t,e.Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class),qa}function jr(t){if(ci(t.parent)){var n=t.parent;if(rr(n)){var r=ui(n);if(r){var i=e.hasRestParameters(n),o=n.parameters.length-(i?1:0),s=e.indexOf(n.parameters,t);if(o>s)return Hi(r,s);if(s===n.parameters.length-1&&i&&r.hasRestParameter&&n.parameters.length>=r.parameters.length)return _t(r.parameters[r.parameters.length-1])}}}return void 0}function zr(e){var t=e.parent;if(e===t.initializer){if(t.type)return $n(t.type);if(123===t.kind)return jr(t)}return void 0}function qr(t){var n=e.getContainingFunction(t);if(n){if(n.type||126===n.kind||127===n.kind&&pt(e.getDeclarationOfKind(n.symbol,128)))return cn(sn(n));var r=li(n);if(r)return cn(r)}return void 0}function Kr(t,n){var r=Ni(t),i=e.indexOf(r,n);if(i>=0){var o=Ri(t);return Hi(o,i)}return void 0}function Yr(e,t){return 147===e.parent.kind?Kr(e.parent,t):void 0}function Xr(e){var t=e.parent,n=t.operator;if(n>=51&&62>=n){if(e===t.right)return mo(t.left)}else if(48===n){var r=si(t);return r||e!==t.right||(r=mo(t.left)),r}return void 0}function Qr(e,t){if(!(16384&e.flags))return t(e);for(var n,r,i=e.types,o=0;o<i.length;o++){var s=t(i[o]);s&&(n?r?r.push(s):r=[n,s]:n=s)}return r?Dn(r):n}function Jr(e,t){return Qr(e,function(e){var n=qt(e,t);return n?_t(n):void 0})}function Zr(e,t){return Qr(e,function(e){return nn(e,t)})}function ei(t){return!!(16384&t.flags?e.forEach(t.types,function(e){return qt(e,"0")}):qt(t,"0"))}function ti(t,n){return!!(16384&t.flags?e.forEach(t.types,function(e){return nn(e,n)}):nn(t,n))}function ni(t){return e.Debug.assert(e.isObjectLiteralMethod(t)),Is(t)?void 0:ri(t)}function ri(e){var t=e.parent,n=si(t),r=e.name.text;return n&&r?Jr(n,r)||di(r)&&Zr(n,1)||Zr(n,0):void 0}function ii(t){var n=t.parent,r=si(n);if(r){var i=e.indexOf(n.elements,t);return Jr(r,""+i)||Zr(r,1)}return void 0}function oi(e){var t=e.parent;return e===t.whenTrue||e===t.whenFalse?si(t):void 0}function si(t){if(Is(t))return void 0;if(t.contextualType)return t.contextualType;var n=t.parent;switch(n.kind){case 183:case 123:case 124:return zr(t);case 151:case 174:return qr(t);case 145:case 146:return Kr(n,t);case 148:return $n(n.type);case 157:return Xr(t);case 198:return ri(n);case 141:return ii(t);case 158:return oi(t);case 162:return e.Debug.assert(159===n.parent.kind),Yr(n.parent,t)}return void 0}function ai(e){var t=en(e,0);
if(1===t.length){var n=t[0];if(!n.typeParameters)return n}}function ci(e){return 150===e.kind||151===e.kind}function li(e){return ci(e)?ui(e):void 0}function ui(t){e.Debug.assert(125!==t.kind||e.isObjectLiteralMethod(t));var n=e.isObjectLiteralMethod(t)?ni(t):si(t);if(!n)return void 0;if(!(16384&n.flags))return ai(n);for(var r,i=n.types,o=0;o<i.length;o++){if(r&&en(i[o],0).length>1)return void 0;var s=ai(i[o]);if(s)if(r){if(!gr(r[0],s,!1,ar))return void 0;r.push(s)}else r=[s]}var a;return r&&(a=Dt(r[0]),a.resolvedReturnType=void 0,a.unionSignatures=r),a}function pi(t,n){var r=t.elements;if(!r.length)return xn(ja);var i=e.map(r,function(e){return mo(e,n)}),o=si(t);return o&&ei(o)?Ln(i):xn(Dn(i))}function di(e){return(+e).toString()===e}function hi(t,n){function r(t){if(s&&ti(s,t)){var n=[];for(var r in o)if(e.hasProperty(o,r)&&(0===t||di(r))){var i=_t(o[r]);e.contains(n,i)||n.push(i)}return n.length?Dn(n):ja}return void 0}var i=t.symbol.members,o={},s=si(t);for(var a in i)if(e.hasProperty(i,a)){var l=i[a];if(4&l.flags||e.isObjectLiteralMethod(l.declarations[0])){var u,p=l.declarations[0];198===p.kind?u=mo(p.initializer,n):125===p.kind?u=po(p,n):(e.Debug.assert(199===p.kind),u=121===p.name.kind?qa:mo(p.name,n));var d=c(268435460|l.flags,l.name);d.declarations=l.declarations,d.parent=l.parent,l.valueDeclaration&&(d.valueDeclaration=l.valueDeclaration),d.type=u,d.target=l,l=d}else{var h=e.getDeclarationOfKind(l,127);h&&Co(h);var m=e.getDeclarationOfKind(l,128);m&&Co(m)}o[l.name]=l}var f=r(0),g=r(1);return W(t.symbol,o,Pa,Pa,f,g)}function mi(e){return e.valueDeclaration?e.valueDeclaration.kind:124}function fi(e){return e.valueDeclaration?e.valueDeclaration.flags:536870912&e.flags?144:0}function gi(t,n,r,i){var o=fi(i);if(96&o){var s=e.getAncestor(t,185),c=s?At(O(s)):void 0,l=At(i.parent);if(32&o)return l!==c&&a(t,e.Diagnostics.Property_0_is_private_and_only_accessible_within_class_1,rt(i),it(l)),void 0;if(89!==n.kind)return c&&Tt(c,l)?(128&o||3072&bt(r).flags&&Tt(r,c)||a(t,e.Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1,rt(i),it(c)),void 0):(a(t,e.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses,rt(i),it(l)),void 0)}}function vi(e){return _i(e,e.expression,e.name)}function yi(e){return _i(e,e.left,e.right)}function _i(t,n,r){var i=fo(n);if(i===qa)return i;if(i!==Ba){var o=Xt(Sr(i));if(o===qa)return qa;var s=Zt(o,r.text);return s?(g(t).resolvedSymbol=s,s.parent&&32&s.parent.flags&&(89===n.kind&&125!==mi(s)?a(r,e.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword):gi(t,n,i,s)),_t(s)):(r.text&&a(r,e.Diagnostics.Property_0_does_not_exist_on_type_1,e.declarationNameToString(r),it(i)),qa)}return Ba}function bi(e,t){var n=143===e.kind?e.expression:e.left,r=fo(n);if(r!==qa&&r!==Ba){var i=Zt(Sr(r),t);if(i&&i.parent&&32&i.parent.flags){if(89===n.kind&&125!==mi(i))return!1;var o=uc.length;return gi(e,n,r,i),uc.length===o}}return!0}function Ti(t){var n=Xt(mo(t.expression)),r=t.argumentExpression?mo(t.argumentExpression):qa;if(n===qa)return qa;if(no(n)&&t.argumentExpression&&7!==t.argumentExpression.kind&&a(t.argumentExpression,e.Diagnostics.Index_expression_arguments_in_const_enums_must_be_of_type_string),t.argumentExpression&&(7===t.argumentExpression.kind||6===t.argumentExpression.kind)){var i=t.argumentExpression.text,o=Zt(n,i);if(o)return g(t).resolvedSymbol=o,_t(o)}if(391&r.flags){if(133&r.flags){var s=rn(n,1);if(s)return s}var c=rn(n,0);return c?c:(Ia.noImplicitAny&&!Ia.suppressImplicitAnyIndexErrors&&n!==Ba&&a(t,e.Diagnostics.Index_signature_of_object_type_implicitly_has_an_any_type),Ba)}return a(t,e.Diagnostics.An_index_expression_argument_must_be_of_type_string_number_or_any),qa}function Ei(t){return 147===t.kind?mo(t.template):e.forEach(t.arguments,function(e){mo(e)}),Za}function Si(e){return Ei(e),ec}function Ci(t,n,r){function i(e,t,n,r){if(!r.hasRestParameter&&e>r.parameters.length)return!1;var i=!t||r.typeParameters&&t.length===r.typeParameters.length;if(!i)return!1;var o=e>=r.minArgumentCount;return n||o}var o,s,a;if(147===t.kind){var c=t;if(o=n.length,s=void 0,159===c.template.kind){var l=c.template,u=e.lastOrUndefined(l.templateSpans);e.Debug.assert(void 0!==u),a=0===e.getFullWidth(u.literal)||!!u.literal.isUnterminated}else{var p=c.template;e.Debug.assert(9===p.kind),a=!!p.isUnterminated}}else{var d=t;if(!d.arguments)return e.Debug.assert(146===d.kind),0===r.minArgumentCount;o=d.arguments.hasTrailingComma?n.length+1:n.length,a=d.arguments.end===d.end,s=d.typeArguments}return e.Debug.assert(void 0!==o,"'adjustedArgCount' undefined"),e.Debug.assert(void 0!==a,"'callIsIncomplete' undefined"),i(o,s,a,r)}function ki(e){if(48128&e.flags){var t=jt(e);if(1===t.callSignatures.length&&0===t.constructSignatures.length&&0===t.properties.length&&!t.stringIndexType&&!t.numberIndexType)return t.callSignatures[0]}return void 0}function xi(e,t,n){var r=kr(e.typeParameters,!0);return Cr(t,e,function(e,t){xr(r,nr(e,n),t)}),un(e,Ar(r))}function wi(t,n,r){for(var i=t.typeParameters,o=kr(i,!1),s=Yn(o),a=0;a<n.length;a++)if(161!==n[a].kind&&(!r||void 0===r[a])){var c=Hi(t,a);if(0===a&&147===n[a].parent.kind){xr(o,xa,c);continue}xr(o,lo(n[a],c,s),c)}if(r)for(var a=0;a<n.length;a++)if(161!==n[a].kind&&r[a]===!1){var c=Hi(t,a);xr(o,lo(n[a],c,s),c)}var l=Ar(o);o.failedTypeParameterIndex=e.indexOf(l,Ja);for(var a=0;a<l.length;a++)l[a]===Ja&&(l[a]=qa);return o}function Li(t,n,r,i){for(var o=t.typeParameters,s=!0,a=0;a<o.length;a++){var c=n[a],l=$n(c);if(r[a]=l,s){var u=gn(o[a]);u&&(s=pr(l,u,i?c:void 0,e.Diagnostics.Type_0_does_not_satisfy_the_constraint_1))}}return s}function Ai(t,n,r,i,o,s){for(var a=0;a<n.length;a++){var c,l=n[a];if(161!==l.kind){var u=Hi(r,a);c=0===a&&147===t.kind?xa:7!==l.kind||s?lo(l,u,o&&o[a]?Xn:void 0):Hn(l);var p=hr(c,u,i,s?l:void 0,e.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1);if(!p)return!1}}return!0}function Ni(t){var n;if(147===t.kind){var r=t.template;n=[r],159===r.kind&&e.forEach(r.templateSpans,function(e){n.push(e.expression)})}else n=t.arguments||Pa;return n}function Mi(t,n,r){function i(n,r){for(var i=0;i<n.length;i++)if(Ci(t,d,n[i])){for(var o,s=n[i];;){var a=s;if(a.typeParameters){var c,u;if(l?(c=new Array(a.typeParameters.length),u=Li(a,l,c,!1)):(o=wi(a,d,p),u=o.failedTypeParameterIndex<0,c=o.inferredTypes),!u)break;a=un(a,c)}if(!Ai(t,d,a,r,p,!1))break;var h=p?e.indexOf(p,!0):-1;if(0>h)return a;p[h]=!1}if(s.typeParameters){var v=a;u?m=v:(f=s,l||(g=o))}else e.Debug.assert(s===a),m=s}return void 0}function s(){var t,r,i,o=u,s=0;e.Debug.assert(!o.length);for(var a=0;a<n.length;a++){var c=n[a],l=c.declaration&&O(c.declaration),p=c.declaration&&c.declaration.parent;r&&l!==r?(i=s=o.length,t=p):t&&p===t?i++:(t=p,i=s),r=l;for(var d=o.length;d>i;d--)o[d]=o[d-1];o[i]=c}}var c=147===t.kind,l=c?void 0:t.typeArguments;e.forEach(l,ws);var u=r||[];if(s(),!u.length)return a(t,e.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target),Si(t);for(var p,d=Ni(t),h=c?1:0;h<d.length;h++)rr(d[h])&&(p||(p=new Array(d.length)),p[h]=!0);var m,f,g,v;if(u.length>1&&(v=i(u,dc)),v||(m=void 0,f=void 0,g=void 0,v=i(u,hc)),v)return v;if(m)Ai(t,d,m,hc,void 0,!0);else if(f)if(!c&&t.typeArguments)Li(f,t.typeArguments,[],!0);else{e.Debug.assert(g.failedTypeParameterIndex>=0);var y=f.typeParameters[g.failedTypeParameterIndex],_=wr(g,g.failedTypeParameterIndex),b=e.chainDiagnosticMessages(void 0,e.Diagnostics.The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly,it(y));_r(_,t.expression||t.tag,b)}else a(t,e.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target);if(!o)for(var h=0,T=u.length;T>h;h++)if(Ci(t,d,u[h]))return u[h];return Si(t)}function Pi(t,n){if(89===t.expression.kind){var r=Wr(t.expression);return r!==qa?Mi(t,tn(r,1),n):Ei(t)}var i=mo(t.expression),o=Xt(i);if(o===qa)return Si(t);var s=tn(o,0),c=tn(o,1);return i!==Ba&&(s.length||c.length||16384&i.flags||!lr(i,ba))?s.length?Mi(t,s,n):(c.length?a(t,e.Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new,it(i)):a(t,e.Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature),Si(t)):(t.typeArguments&&a(t,e.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments),Ei(t))}function Oi(t,n){var r=mo(t.expression);if(r===Ba)return t.typeArguments&&a(t,e.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments),Ei(t);if(r=Xt(r),r===qa)return Si(t);var i=tn(r,1);if(i.length)return Mi(t,i,n);var o=tn(r,0);if(o.length){var s=Mi(t,o,n);return cn(s)!==Wa&&a(t,e.Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword),s}return a(t,e.Diagnostics.Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature),Si(t)}function Ii(t,n){var r=mo(t.tag),i=Xt(r);if(i===qa)return Si(t);var o=tn(i,0);return r!==Ba&&(o.length||16384&r.flags||!lr(r,ba))?o.length?Mi(t,o,n):(a(t,e.Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature),Si(t)):Ei(t)}function Ri(t,n){var r=g(t);return(!r.resolvedSignature||n)&&(r.resolvedSignature=Za,145===t.kind?r.resolvedSignature=Pi(t,n):146===t.kind?r.resolvedSignature=Oi(t,n):147===t.kind?r.resolvedSignature=Ii(t,n):e.Debug.fail("Branch in 'getResolvedSignature' should be unreachable.")),r.resolvedSignature}function Di(t){var n=Ri(t);if(89===t.expression.kind)return Wa;if(146===t.kind){var r=n.declaration;if(r&&126!==r.kind&&130!==r.kind&&134!==r.kind)return Ia.noImplicitAny&&a(t,e.Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type),Ba}return cn(n)}function Vi(e){return cn(Ri(e))}function Fi(t){var n=mo(t.expression),r=$n(t.type);if(o&&r!==qa){var i=Sr(n,!0);lr(r,i)||pr(n,r,t,e.Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other)}return r}function Hi(e,t){return e.hasRestParameter?t<e.parameters.length-1?_t(e.parameters[t]):ln(e):t<e.parameters.length?_t(e.parameters[t]):Ba}function Bi(e,t,n){for(var r=e.parameters.length-(e.hasRestParameter?1:0),i=0;r>i;i++){var o=e.parameters[i],s=f(o);s.type=nr(Hi(t,i),n)}if(e.hasRestParameter&&t.hasRestParameter&&e.parameters.length>=t.parameters.length){var o=e.parameters[e.parameters.length-1],s=f(o);s.type=nr(_t(t.parameters[t.parameters.length-1]),n)}}function $i(t,n){var r=li(t);if(163!==t.body.kind){var i=uo(t.body,n),s=Sr(i);return o&&Ia.noImplicitAny&&!r&&s!==i&&Er(s)===Ba&&a(t,e.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,it(s)),s}var c=Gi(t.body,n);if(c.length>0){var l=r?Dn(c):yr(c);if(!l)return a(t,e.Diagnostics.No_best_common_type_exists_among_return_expressions),qa;var s=Sr(l);if(o&&Ia.noImplicitAny&&!r&&s!==l&&Er(s)===Ba){var u=it(s);t.name?a(t,e.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type,e.declarationNameToString(t.name),u):a(t,e.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,u)}return s}return Wa}function Gi(t,n){var r=[];return e.forEachReturnStatement(t,function(t){var i=t.expression;if(i){var o=uo(i,n);e.contains(r,o)||r.push(o)}}),r}function Ui(t){return e.forEachReturnStatement(t,function(){return!0})}function Wi(e){return 1===e.statements.length&&178===e.statements[0].kind}function ji(t,n){if(o&&n!==Wa&&n!==Ba&&t.body&&163===t.body.kind){var r=t.body;Ui(r)||Wi(r)||a(t.type,e.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_or_consist_of_a_single_throw_statement)}}function zi(t,n){if(e.Debug.assert(125!==t.kind||e.isObjectLiteralMethod(t)),n===Xn)return Xa;var r=g(t),i=_t(t.symbol);if(!(64&r.flags)){var s=ui(t);if(!(64&r.flags)){if(r.flags|=64,s){var a=tn(i,0)[0];if(rr(t)&&Bi(a,s,n||Xn),!t.type){a.resolvedReturnType=Ka;var c=$i(t,n);a.resolvedReturnType===Ka&&(a.resolvedReturnType=c)}}_o(t)}}return o&&125!==t.kind&&(Wo(t,t.name),Go(t,t.name)),i}function qi(t){if(e.Debug.assert(125!==t.kind||e.isObjectLiteralMethod(t)),t.type&&ji(t,$n(t.type)),t.body)if(163===t.body.kind)ws(t.body);else{var n=mo(t.body);t.type&&pr(n,$n(t.type),t.body,void 0),Ls(t.body)}}function Ki(e,t,n){return 133&t.flags?!0:(a(e,n),!1)}function Yi(e,t,n){function r(e){var t=g(e).resolvedSymbol;return t&&R(t)}function i(e){switch(e.kind){case 63:var t=r(e);return!t||t===Fa||t===Va||0!==(3&t.flags);case 143:var t=r(e);return!t||t===Fa||0!==(-9&t.flags);case 144:return!0;case 149:return i(e.expression);default:return!1}}function o(e){switch(e.kind){case 63:case 143:var t=r(e);return t&&0!==(3&t.flags)&&0!==(4096&fi(t));case 144:var n=e.argumentExpression,t=r(e.expression);if(t&&n&&7===n.kind){var i=n.text,s=Zt(_t(t),i);return s&&0!==(3&s.flags)&&0!==(4096&fi(s))}return!1;case 149:return o(e.expression);default:return!1}}return i(e)?o(e)?(a(e,n),!1):!0:(a(e,t),!1)}function Xi(e){mo(e.expression);return Ua}function Qi(e){mo(e.expression);return $a}function Ji(e){mo(e.expression);return ja}function Zi(t){var n=mo(t.operand);switch(t.operator){case 32:case 33:case 46:return Ga;case 45:return Ua;case 37:case 38:var r=Ki(t.operand,n,e.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);return r&&Yi(t.operand,e.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer,e.Diagnostics.The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant),Ga}return qa}function eo(t){var n=mo(t.operand),r=Ki(t.operand,n,e.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type);return r&&Yi(t.operand,e.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer,e.Diagnostics.The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant),Ga}function to(t){return 16384&t.flags?!e.forEach(t.types,function(e){return!to(e)}):0!==(48640&t.flags)}function no(e){return 48128&e.flags&&e.symbol&&ro(e.symbol)}function ro(e){return 0!==(128&e.flags)}function io(t,n,r){return 1&n.flags||to(n)||a(t.left,e.Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter),1&r.flags||cr(r,ba)||a(t.right,e.Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type),Ua}function oo(t,n,r){return n!==Ba&&n!==$a&&n!==Ga&&a(t.left,e.Diagnostics.The_left_hand_side_of_an_in_expression_must_be_of_types_any_string_or_number),1&r.flags||to(r)||a(t.right,e.Diagnostics.The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter),Ua}function so(t,n){function r(e){switch(e){case 43:case 61:return 48;case 44:case 62:return 30;case 42:case 60:return 47;default:return void 0}}function i(n){if(o&&c>=51&&62>=c){var r=Yi(t.left,e.Diagnostics.Invalid_left_hand_side_of_assignment_expression,e.Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant);r&&pr(n,l,t.left,void 0)}}function s(){a(t,e.Diagnostics.Operator_0_cannot_be_applied_to_types_1_and_2,e.tokenToString(t.operator),it(l),it(u))}var c=t.operator,l=mo(t.left,n),u=mo(t.right,n);switch(c){case 34:case 54:case 35:case 55:case 36:case 56:case 33:case 53:case 39:case 57:case 40:case 58:case 41:case 59:case 43:case 61:case 44:case 62:case 42:case 60:96&l.flags&&(l=u),96&u.flags&&(u=l);var p;if(8&l.flags&&8&u.flags&&void 0!==(p=r(t.operator)))a(t,e.Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead,e.tokenToString(t.operator),e.tokenToString(p));else{var d=Ki(t.left,l,e.Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type),h=Ki(t.right,u,e.Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type);d&&h&&i(Ga)}return Ga;case 32:case 52:96&l.flags&&(l=u),96&u.flags&&(u=l);var m;return 132&l.flags&&132&u.flags?m=Ga:258&l.flags||258&u.flags?m=$a:(1&l.flags||l===qa||1&u.flags||u===qa)&&(m=Ba),m?(52===c&&i(m),m):(s(),Ba);case 27:case 28:case 29:case 30:case 23:case 24:case 25:case 26:return lr(l,u)||lr(u,l)||s(),Ua;case 85:return io(t,l,u);case 84:return oo(t,l,u);case 47:return u;case 48:return Dn([l,u]);case 51:return i(u),u;case 22:return u}}function ao(e,t){mo(e.condition);var n=mo(e.whenTrue,t),r=mo(e.whenFalse,t);return Dn([n,r])}function co(t){return e.forEach(t.templateSpans,function(e){mo(e.expression)}),$a}function lo(e,t,n){var r=e.contextualType;e.contextualType=t;var i=mo(e,n);return e.contextualType=r,i}function uo(e,t){var n=mo(e,t);return g(e).flags|=1,n}function po(e,t){var n=zi(e,t);return ho(e,n,t)}function ho(e,t,n){if(n&&n!==Xn){var r=ki(t);if(r&&r.typeParameters){var i=si(e);if(i){var o=ki(i);if(o&&!o.typeParameters)return dn(xi(r,o,n))}}}return t}function mo(e,t){return fo(e,t)}function fo(t,n){var r;if(120==t.kind)r=yi(t);else{var i=go(t,n);r=ho(t,i,n)}if(no(r)){var o=143===t.parent.kind&&t.parent.expression===t||144===t.parent.kind&&t.parent.expression===t||(63===t.kind||120===t.kind)&&Bs(t);o||a(t,e.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment)}return r}function go(e,t){switch(e.kind){case 63:return Hr(e);case 91:return $r(e);case 89:return Wr(e);case 87:return za;case 93:case 78:return Ua;case 6:return Ga;case 159:return co(e);case 7:case 9:return $a;case 8:return ka;case 141:return pi(e,t);case 142:return hi(e,t);case 143:return vi(e);case 144:return Ti(e);case 145:case 146:return Di(e);case 147:return Vi(e);case 148:return Fi(e);case 149:return mo(e.expression);case 150:case 151:return zi(e,t);case 153:return Qi(e);case 152:return Xi(e);case 154:return Ji(e);case 155:return Zi(e);case 156:return eo(e);case 157:return so(e,t);case 158:return ao(e,t);case 161:return ja}return qa}function vo(t){ws(t.constraint),o&&(bn(t),us(t.name,e.Diagnostics.Type_parameter_name_cannot_be_0))}function yo(t){function n(r){if(63===r.kind){var i=g(r).resolvedSymbol;if(i&&i!==Fa&&_(t.parent.locals,i.name,107455)===i){if(123===i.valueDeclaration.kind){if(i.valueDeclaration===t)return a(r,e.Diagnostics.Parameter_0_cannot_be_referenced_in_its_initializer,e.declarationNameToString(t.name)),void 0;var o=e.forEach(t.parent.parameters,function(e){return e===t||e===i.valueDeclaration?e:void 0});if(o===i.valueDeclaration)return}a(r,e.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it,e.declarationNameToString(t.name),e.declarationNameToString(r))}}else e.forEachChild(r,n)}Ko(t),o&&(Bo(t,t.name),112&t.flags&&(126!==t.parent.kind||!t.parent.body)&&a(t,e.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation),t.dotDotDotToken?Tr(_t(t.symbol))||a(t,e.Diagnostics.A_rest_parameter_must_be_of_an_array_type):t.initializer&&!t.parent.body&&a(t,e.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation)),t.initializer&&n(t.initializer)}function _o(t){if(ps(t.typeParameters),e.forEach(t.parameters,yo),t.type&&ws(t.type),o&&(Ho(t),Ia.noImplicitAny&&!t.type))switch(t.kind){case 130:a(t,e.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);break;case 129:a(t,e.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type)}Po(t)}function bo(t){if(186===t.kind){var n=O(t);if(n.declarations.length>0&&n.declarations[0]!==t)return}var r=hn(O(t));if(r)for(var i=!1,o=!1,s=0,c=r.declarations.length;c>s;++s){var l=r.declarations[s];if(1==l.parameters.length&&l.parameters[0].type)switch(l.parameters[0].type.kind){case 118:o?a(l,e.Diagnostics.Duplicate_string_index_signature):o=!0;break;case 116:i?a(l,e.Diagnostics.Duplicate_number_index_signature):i=!0}}}function To(e){o&&qo(e)}function Eo(e){Vo(e)}function So(t){function n(e){return 145===e.kind&&89===e.expression.kind}function r(t){if(n(t))return!0;switch(t.kind){case 150:case 184:case 151:case 142:return!1;default:return e.forEachChild(t,r)}}function i(t){91===t.kind?a(t,e.Diagnostics.this_cannot_be_referenced_in_current_location):150!==t.kind&&184!==t.kind&&e.forEachChild(t,i)}function s(e){return!(124!==e.kind||128&e.flags||!e.initializer)}_o(t),ws(t.body);var c=O(t),l=e.getDeclarationOfKind(c,t.kind);if(t===l&&Io(c),t.body&&o&&e.getClassBaseTypeNode(t.parent))if(r(t.body)){var u=e.forEach(t.parent.members,s)||e.forEach(t.parameters,function(e){return 112&e.flags});if(u){var p=t.body.statements;p.length&&166===p[0].kind&&n(p[0].expression)?i(p[0].expression):a(t,e.Diagnostics.A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties)}}else a(t,e.Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call)}function Co(t){if(o&&(127===t.kind&&(e.isInAmbientContext(t)||!t.body||Ui(t.body)||Wi(t.body)||a(t.name,e.Diagnostics.A_get_accessor_must_return_a_value_or_consist_of_a_single_throw_statement)),!e.hasComputedNameButNotSymbol(t))){var n=127===t.kind?128:127,r=e.getDeclarationOfKind(t.symbol,n);if(r){(112&t.flags)!==(112&r.flags)&&a(t.name,e.Diagnostics.Getter_and_setter_accessors_do_not_agree_in_visibility);var i=dt(t),s=dt(r);i&&s&&(sr(i,s)||a(t,e.Diagnostics.get_and_set_accessor_must_have_the_same_type))}mt(O(t))}Vo(t)}function ko(t){var n=Tn(t);if(n!==qa&&t.typeArguments)for(var r=t.typeArguments.length,i=0;r>i;i++){ws(t.typeArguments[i]);var s=gn(n.target.typeParameters[i]);if(o&&s){var a=n.typeArguments[i];pr(a,s,t,e.Diagnostics.Type_0_does_not_satisfy_the_constraint_1)}}}function xo(e){En(e)}function wo(t){if(e.forEach(t.members,ws),o){var n=Fn(t);ls(n),bo(t)}}function Lo(e){ws(e.elementType)}function Ao(t){e.forEach(t.elementTypes,ws)}function No(t){e.forEach(t.types,ws)}function Mo(t){return 32&t.flags&&e.isInAmbientContext(t)}function Po(t){if(o){var n=sn(t);if(n.hasStringLiterals){if(t.body)return a(t,e.Diagnostics.A_signature_with_an_implementation_cannot_use_a_string_literal_type),void 0;var r;if(!t.name&&t.parent&&186===t.parent.kind){e.Debug.assert(129===t.kind||130===t.kind);var i=129===t.kind?0:1,s=O(t.parent),c=At(s);r=tn(c,i)}else r=an(O(t));for(var l=0;l<r.length;l++){var u=r[l];if(!u.hasStringLiterals&&dr(n,u))return}a(t,e.Diagnostics.Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature)}}}function Oo(t,n){var r=t.flags;return 186!==t.parent.kind&&e.isInAmbientContext(t)&&(2&r||(r|=1),r|=2),r&n}function Io(t){function n(e,t){var n=void 0!==t&&t.parent===e[0].parent;return n?t:e[0]}function r(t,r,i,o,s){var c=o^s;if(0!==c){var l=Oo(n(t,r),i);e.forEach(t,function(t){var n=Oo(t,i)^l;1&n?a(t.name,e.Diagnostics.Overload_signatures_must_all_be_exported_or_not_exported):2&n?a(t.name,e.Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient):96&n&&a(t.name,e.Diagnostics.Overload_signatures_must_all_be_public_private_or_protected)})}}function i(t,r,i,o){if(i!==o){var s=e.hasQuestionToken(n(t,r));e.forEach(t,function(t){var n=e.hasQuestionToken(t)!==s;n&&a(t.name,e.Diagnostics.Overload_signatures_must_all_be_optional_or_required)})}}function s(t){if(!t.name||0!==e.getFullWidth(t.name)){var n=!1,r=e.forEachChild(t.parent,function(e){return n?e:(n=e===t,void 0)});if(r&&r.kind===t.kind){var i=r.name||r;if(t.name&&r.name&&t.name.text===r.name.text){e.Debug.assert(125===t.kind),e.Debug.assert((128&t.flags)!==(128&r.flags));var o=128&t.flags?e.Diagnostics.Function_overload_must_be_static:e.Diagnostics.Function_overload_must_not_be_static;return a(i,o),void 0}if(r.body)return a(i,e.Diagnostics.Function_implementation_name_must_be_0,e.declarationNameToString(t.name)),void 0}var i=t.name||t;y?a(i,e.Diagnostics.Constructor_implementation_is_missing):a(i,e.Diagnostics.Function_implementation_is_missing_or_not_immediately_following_the_declaration)}}if(o){for(var c,l,u,p=99,d=0,h=p,m=!1,f=!0,g=!1,v=t.declarations,y=0!==(16384&t.flags),_=t.parent&&1536&t.parent.flags,b=!1,T=!1,E=0;E<v.length;E++){var S=v[E],C=e.isInAmbientContext(S),k=186===S.parent.kind||136===S.parent.kind||C;if(k&&(u=void 0),184===S.kind||125===S.kind||126===S.kind){var x=Oo(S,p);d|=x,h&=x,m=m||e.hasQuestionToken(S),f=f&&e.hasQuestionToken(S),S.body&&c?y?T=!0:b=!0:!_&&u&&u.parent===S.parent&&u.end!==S.pos&&s(u),S.body?c||(c=S):g=!0,u=S,k||(l=S)}}if(T&&e.forEach(v,function(t){a(t,e.Diagnostics.Multiple_constructor_implementations_are_not_allowed)}),b&&e.forEach(v,function(t){a(t.name,e.Diagnostics.Duplicate_function_implementation)}),_||!l||l.body||s(l),g&&(r(v,c,p,d,h),i(v,c,m,f),c)){var w=an(t),L=sn(c);if(!L.hasStringLiterals)for(var E=0,A=w.length;A>E;++E)if(!w[E].hasStringLiterals&&!dr(L,w[E])){a(w[E].declaration,e.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation);break}}}}function Ro(t){function n(t){switch(t.kind){case 186:return 8388608;case 189:return 7===t.name.kind||0!==e.getModuleInstanceState(t)?20971520:16777216;case 185:case 188:return 12582912;case 191:var r=0,i=E(O(t));return e.forEach(i.declarations,function(e){r|=n(e)}),r;default:return 4194304}}if(o){var r,r=t.localSymbol;if((r||(r=O(t),29360128&r.flags))&&e.getDeclarationOfKind(r,t.kind)===t){var i=0,s=0;e.forEach(r.declarations,function(e){var t=n(e);Oo(e,1)?i|=t:s|=t});var c=i&s;c&&e.forEach(r.declarations,function(t){n(t)&c&&a(t.name,e.Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local,e.declarationNameToString(t.name))})}}}function Do(e){Vo(e),o&&(Wo(e,e.name),Go(e,e.name),jo(e,e.name))}function Vo(t){if(_o(t),!e.hasComputedNameButNotSymbol(t)){var n=O(t),r=t.localSymbol||n,i=e.getDeclarationOfKind(r,t.kind);t===i&&Io(r),n.parent&&e.getDeclarationOfKind(n,t.kind)===t&&Io(n)}if(ws(t.body),t.type&&!fs(t.kind)&&ji(t,$n(t.type)),o&&Ia.noImplicitAny&&!t.body&&!t.type&&!Mo(t)){var s=it(Ba);t.name?a(t,e.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type,e.declarationNameToString(t.name),s):a(t,e.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,s)}}function Fo(t){e.forEach(t.statements,ws),(e.isFunctionBlock(t)||190===t.kind)&&Ls(t)}function Ho(t){e.hasRestParameters(t)&&!e.isInAmbientContext(t)&&t.body&&e.forEach(t.parameters,function(t){t.name&&t.name.text===Va.name&&a(t,e.Diagnostics.Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters)})}function Bo(t,n){if(n&&"_i"===n.text){if(123===t.kind)return t.parent.body&&e.hasRestParameters(t.parent)&&!e.isInAmbientContext(t)&&a(t,e.Diagnostics.Duplicate_identifier_i_Compiler_uses_i_to_initialize_rest_parameter),void 0;var r=g(t).resolvedSymbol;if(r!==Fa)for(var i=t;i;){var o=e.forEach(r.declarations,function(e){return e.parent===i?e:void 0});if(o)return;switch(i.kind){case 184:case 150:case 125:case 151:case 126:if(e.hasRestParameters(i))return a(t,e.Diagnostics.Expression_resolves_to_variable_declaration_i_that_compiler_uses_to_initialize_rest_parameter),void 0}i=i.parent}}}function $o(t,n,r){return n&&n.text===r?124===t.kind||125===t.kind||127===t.kind||128===t.kind?!1:e.isInAmbientContext(t)?!1:123!==t.kind||t.parent.body?!0:!1:!1}function Go(e,t){$o(e,t,"_this")&&lc.push(e)}function Uo(t){for(var n=t;n;){if(4&ua(n)){var r=63!==t.kind;return r?a(t.name,e.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference):a(t,e.Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference),void 0}n=n.parent}}function Wo(t,n){if($o(t,n,"_super")){var r=e.getAncestor(t,185);if(r&&!e.isInAmbientContext(r)&&e.getClassBaseTypeNode(r)){var i=63!==t.kind;i?a(t,e.Diagnostics.Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference):a(t,e.Diagnostics.Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference)}}}function jo(t,n){if(($o(t,n,"require")||$o(t,n,"exports"))&&(189!==t.kind||1===e.getModuleInstanceState(t))){var r=183===t.kind?t.parent.parent:t.parent;201===r.kind&&e.isExternalModule(r)&&a(n,e.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module,e.declarationNameToString(n),e.declarationNameToString(n))}}function zo(t){if(t.initializer&&0===(6144&t.flags)){var n=O(t);if(1&n.flags){var r=T(t,t.name.text,3,void 0,void 0);r&&r!==n&&2&r.flags&&4096&fi(r)&&a(t,e.Diagnostics.Cannot_redeclare_block_scoped_variable_0,rt(r))}}}function qo(t){if(e.Debug.assert(o),ws(t.type),e.hasComputedNameButNotSymbol(t))return t.initializer?uo(t.initializer):Ba;var n,r=O(t);return n=r.valueDeclaration!==t?lt(t):ut(r),!t.initializer||1&g(t.initializer).flags||pr(uo(t.initializer),n,t,void 0),n}function Ko(t){if(o){var n=qo(t);Ro(t),t.initializer&&zo(t),Wo(t,t.name),Go(t,t.name),jo(t,t.name);var r=O(t);if(t!==r.valueDeclaration){var i=ut(r);i===qa||n===qa||sr(i,n)||a(t.name,e.Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2,e.declarationNameToString(t.name),it(i),it(n))}}}function Yo(t){e.forEach(t.declarations,Ko)}function Xo(e){mo(e.expression)}function Qo(e){mo(e.expression),ws(e.thenStatement),ws(e.elseStatement)}function Jo(e){ws(e.statement),mo(e.expression)}function Zo(e){mo(e.expression),ws(e.statement)}function es(t){t.declarations&&e.forEach(t.declarations,Ko),t.initializer&&mo(t.initializer),t.condition&&mo(t.condition),t.iterator&&mo(t.iterator),ws(t.statement)}function ts(t){if(t.declarations&&t.declarations.length>=1){var n=t.declarations[0];Ko(n),n.type&&a(n,e.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation)}if(t.variable){var r=mo(t.variable);r!==Ba&&r!==$a?a(t.variable,e.Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any):Yi(t.variable,e.Diagnostics.Invalid_left_hand_side_in_for_in_statement,e.Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant)}var r=mo(t.expression);1&r.flags||to(r)||a(t.expression,e.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter),ws(t.statement)}function ns(){}function rs(t){if(t.expression&&!(1&g(t.expression).flags)){var n=e.getContainingFunction(t);if(n)if(128===n.kind)t.expression&&a(t.expression,e.Diagnostics.Setters_cannot_return_a_value);else{var r=cn(sn(n)),i=n.type||127===n.kind&&pt(e.getDeclarationOfKind(n.symbol,128));i?pr(mo(t.expression),r,t.expression,void 0):126==n.kind&&(lr(mo(t.expression),r)||a(t.expression,e.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class))}}}function is(t){mo(t.expression),a(t.expression,e.Diagnostics.All_symbols_within_a_with_block_will_be_resolved_to_any)}function os(t){var n=mo(t.expression);e.forEach(t.clauses,function(t){if(o&&194===t.kind){var r=t,i=mo(r.expression);lr(n,i)||pr(i,n,r.expression,void 0)}e.forEach(t.statements,ws)})}function ss(e){ws(e.statement)}function as(e){e.expression&&mo(e.expression)}function cs(e){Fo(e.tryBlock),e.catchClause&&Fo(e.catchClause.block),e.finallyBlock&&Fo(e.finallyBlock)}function ls(t){function n(n,r,i,o,s){if(o&&(1!==s||di(n.name))){var c;if(n.parent===t.symbol)c=n.valueDeclaration;else if(i)c=i;else if(2048&t.flags){var l=e.forEach(t.baseTypes,function(e){return qt(e,n.name)&&rn(e,s)});c=l?void 0:t.symbol.declarations[0]}if(c&&!lr(r,o)){var u=0===s?e.Diagnostics.Property_0_of_type_1_is_not_assignable_to_string_index_type_2:e.Diagnostics.Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2;a(c,u,rt(n),it(r),it(o))}}}var r=mn(t.symbol,1),i=mn(t.symbol,0),o=rn(t,0),s=rn(t,1);(o||s)&&e.forEach(zt(t),function(e){var t=_t(e);n(e,t,i,o,0),n(e,t,r,s,1)});var c;if(o&&s&&(c=r||i,!c&&2048&t.flags)){var l=e.forEach(t.baseTypes,function(e){return rn(e,0)&&rn(e,1)});c=l?void 0:t.symbol.declarations[0]}c&&!lr(s,o)&&a(c,e.Diagnostics.Numeric_index_type_0_is_not_assignable_to_string_index_type_1,it(s),it(o))}function us(e,t){switch(e.text){case"any":case"number":case"boolean":case"string":case"void":a(e,t,e.text)
}}function ps(t){if(t)for(var n=0;n<t.length;n++){var r=t[n];if(vo(r),o)for(var i=0;n>i;i++)t[i].symbol===r.symbol&&a(r.name,e.Diagnostics.Duplicate_identifier_0,e.declarationNameToString(r.name))}}function ds(t){us(t.name,e.Diagnostics.Class_name_cannot_be_0),ps(t.typeParameters),Go(t,t.name),jo(t,t.name),Ro(t);var n=O(t),r=At(n),i=_t(n),s=e.getClassBaseTypeNode(t);if(s&&(oc=oc||!e.isInAmbientContext(t),ko(s)),r.baseTypes.length){if(o){var c=r.baseTypes[0];pr(r,c,t.name,e.Diagnostics.Class_0_incorrectly_extends_base_class_1);var l=_t(c.symbol);pr(i,or(l),t.name,e.Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1),c.symbol!==k(t,s.typeName,107455)&&a(s,e.Diagnostics.Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0,it(c)),ms(r,c)}fo(s.typeName)}var u=e.getClassImplementedTypeNodes(t);u&&e.forEach(u,function(n){if(ko(n),o){var i=Tn(n);if(i!==qa){var s=4096&i.flags?i.target:i;3072&s.flags?pr(r,i,t.name,e.Diagnostics.Class_0_incorrectly_implements_interface_1):a(n,e.Diagnostics.A_class_may_only_implement_another_class_or_interface)}}}),e.forEach(t.members,ws),o&&(ls(r),bo(t))}function hs(e){return 67108864&e.flags?f(e).target:e}function ms(t,n){for(var r=zt(n),i=0,o=r.length;o>i;++i){var s=hs(r[i]);if(!(536870912&s.flags)){var c=hs(qt(t,s.name));if(c){var l=fi(s),u=fi(c);if(32&l||32&u)continue;if((128&l)!==(128&u))continue;if(s.flags&c.flags&8192||98308&s.flags&&98308&c.flags)continue;var p;8192&s.flags?98304&c.flags?p=e.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor:(e.Debug.assert(0!==(4&c.flags)),p=e.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property):4&s.flags?(e.Debug.assert(0!==(8192&c.flags)),p=e.Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function):(e.Debug.assert(0!==(98304&s.flags)),e.Debug.assert(0!==(8192&c.flags)),p=e.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function),a(c.valueDeclaration.name,p,it(n),rt(s),it(t))}}}}function fs(e){return 127===e||128===e}function gs(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!==t.length)return!1;for(var n=0,r=e.length;r>n;n++){var i=e[n],o=t[n];if(i.name.text!==o.name.text)return!1;if(i.constraint||o.constraint){if(!i.constraint||!o.constraint)return!1;if(!sr($n(i.constraint),$n(o.constraint)))return!1}}return!0}function vs(n,r){if(!n.baseTypes.length||1===n.baseTypes.length)return!0;var i={};e.forEach(n.declaredProperties,function(e){i[e.name]={prop:e,containingType:n}});for(var o=!0,a=0,c=n.baseTypes.length;c>a;++a)for(var l=n.baseTypes[a],u=zt(l),p=0,d=u.length;d>p;++p){var h=u[p];if(e.hasProperty(i,h.name)){var m=i[h.name],f=m.containingType!==n;if(f&&!mr(m.prop,h)){o=!1;var g=it(m.containingType),v=it(l),y=e.chainDiagnosticMessages(void 0,e.Diagnostics.Named_properties_0_of_types_1_and_2_are_not_identical,h.name,g,v);y=e.chainDiagnosticMessages(y,e.Diagnostics.Interface_0_cannot_simultaneously_extend_types_1_and_2,it(n),g,v),s(e.createDiagnosticForNodeFromMessageChain(r,y,t.getCompilerHost().getNewLine()))}}else i[h.name]={prop:h,containingType:l}}return o}function ys(t){if(ps(t.typeParameters),o){us(t.name,e.Diagnostics.Interface_name_cannot_be_0),Ro(t);var n=O(t),r=e.getDeclarationOfKind(n,186);if(n.declarations.length>1&&(t===r||gs(r.typeParameters,t.typeParameters)||a(t.name,e.Diagnostics.All_declarations_of_an_interface_must_have_identical_type_parameters)),t===r){var i=At(n);vs(i,t.name)&&(e.forEach(i.baseTypes,function(n){pr(i,n,t.name,e.Diagnostics.Interface_0_incorrectly_extends_interface_1)}),ls(i))}}e.forEach(e.getInterfaceBaseTypeNodes(t),ko),e.forEach(t.members,ws),o&&bo(t)}function _s(t){us(t.name,e.Diagnostics.Type_alias_name_cannot_be_0),ws(t.type)}function bs(t){function n(e,t){function n(r){switch(r.kind){case 155:var i=n(r.operand);if(void 0===i)return void 0;switch(r.operator){case 32:return i;case 33:return-i;case 46:return t?~i:void 0}return void 0;case 157:if(!t)return void 0;var o=n(r.left);if(void 0===o)return void 0;var s=n(r.right);if(void 0===s)return void 0;switch(r.operator){case 43:return o|s;case 42:return o&s;case 40:return o>>s;case 41:return o>>>s;case 39:return o<<s;case 44:return o^s;case 34:return o*s;case 35:return o/s;case 32:return o+s;case 33:return o-s;case 36:return o%s}return void 0;case 6:return+r.text;case 149:return t?n(r.expression):void 0;case 63:case 144:case 143:if(!t)return void 0;var a,c,l=e.parent,u=_t(O(l.parent));if(63===r.kind)a=u,c=r.text;else{if(144===r.kind){if(void 0===r.argumentExpression||7!==r.argumentExpression.kind)return void 0;var a=js(r.expression);c=r.argumentExpression.text}else{var a=js(r.expression);c=r.name.text}if(a!==u)return void 0}if(void 0===c)return void 0;var p=qt(a,c);if(!(p&&8&p.flags))return void 0;var d=p.valueDeclaration;return l===d?void 0:b(d,l)?g(d).enumMemberValue:void 0}}return n(e)}var r=g(t);if(!(128&r.flags)){var i=O(t),o=At(i),s=0,c=e.isInAmbientContext(t),l=e.isConst(t);e.forEach(t.members,function(t){di(t.name.text)&&a(t.name,e.Diagnostics.An_enum_member_cannot_have_a_numeric_name);var r=t.initializer;r?(s=n(r,l),void 0===s?l?a(r,e.Diagnostics.In_const_enum_declarations_member_initializer_must_be_constant_expression):c||pr(mo(r),o,r,void 0):l&&(isNaN(s)?a(r,e.Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN):isFinite(s)||a(r,e.Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value))):c&&!l&&(s=void 0),void 0!==s&&(g(t).enumMemberValue=s++)}),r.flags|=128}}function Ts(t){if(o){us(t.name,e.Diagnostics.Enum_name_cannot_be_0),Go(t,t.name),jo(t,t.name),Ro(t),bs(t);var n=O(t),r=e.getDeclarationOfKind(n,t.kind);if(t===r){if(n.declarations.length>1){var i=e.isConst(t);e.forEach(n.declarations,function(t){e.isConstEnumDeclaration(t)!==i&&a(t.name,e.Diagnostics.Enum_declarations_must_all_be_const_or_non_const)})}var s=!1;e.forEach(n.declarations,function(t){if(188!==t.kind)return!1;var n=t;if(!n.members.length)return!1;var r=n.members[0];r.initializer||(s?a(r.name,e.Diagnostics.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element):s=!0)})}}}function Es(t){for(var n=t.declarations,r=0;r<n.length;r++){var i=n[r];if((185===i.kind||184===i.kind&&i.body)&&!e.isInAmbientContext(i))return i}return void 0}function Ss(t){if(o){Go(t,t.name),jo(t,t.name),Ro(t);var n=O(t);if(512&n.flags&&n.declarations.length>1&&!e.isInAmbientContext(t)){var r=Es(n);r&&(e.getSourceFileOfNode(t)!==e.getSourceFileOfNode(r)?a(t.name,e.Diagnostics.A_module_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged):t.pos<r.pos&&a(t.name,e.Diagnostics.A_module_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged))}7===t.name.kind&&(y(t.parent)||a(t.name,e.Diagnostics.Ambient_external_modules_cannot_be_nested_in_other_modules),x(t.name.text)&&a(t.name,e.Diagnostics.Ambient_external_module_declaration_cannot_specify_relative_module_name))}ws(t.body)}function Cs(e){for(;120===e.kind;)e=e.left;return e}function ks(t){Go(t,t.name),jo(t,t.name);var n,r=O(t);if(e.isInternalModuleImportDeclaration(t)){if(n=E(r),n!==Fa){if(107455&n.flags){var i=Cs(t.moduleReference);1536&k(t,i,108479).flags?fo(t.moduleReference):a(i,e.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name,e.declarationNameToString(i))}3152352&n.flags&&us(t.name,e.Diagnostics.Import_name_cannot_be_0)}}else 201===t.parent.kind?n=E(r):190===t.parent.kind&&7===t.parent.parent.name.kind?7===e.getExternalModuleImportDeclarationExpression(t).kind?x(e.getExternalModuleImportDeclarationExpression(t).text)?(a(t,e.Diagnostics.Import_declaration_in_an_ambient_external_module_declaration_cannot_reference_external_module_through_relative_external_module_name),n=Fa):n=E(r):n=Fa:n=Fa;if(n!==Fa){var o=(107455&r.flags?107455:0)|(3152352&r.flags?3152352:0)|(1536&r.flags?1536:0);n.flags&o&&a(t,e.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0,rt(r))}}function xs(e){var t=e.parent;201!==t.kind&&(t=t.parent),N(O(t))}function ws(t){if(t)switch(t.kind){case 122:return vo(t);case 123:return yo(t);case 124:return To(t);case 133:case 134:case 129:case 130:case 131:return _o(t);case 125:return Eo(t);case 126:return So(t);case 127:case 128:return Co(t);case 132:return ko(t);case 135:return xo(t);case 136:return wo(t);case 137:return Lo(t);case 138:return Ao(t);case 139:return No(t);case 140:return ws(t.type);case 184:return Do(t);case 163:case 190:return Fo(t);case 164:return Yo(t);case 166:return Xo(t);case 167:return Qo(t);case 168:return Jo(t);case 169:return Zo(t);case 170:return es(t);case 171:return ts(t);case 172:case 173:return ns(t);case 174:return rs(t);case 175:return is(t);case 176:return os(t);case 177:return ss(t);case 178:return as(t);case 179:return cs(t);case 183:return e.Debug.fail("Checker encountered variable declaration");case 185:return ds(t);case 186:return ys(t);case 187:return _s(t);case 188:return Ts(t);case 189:return Ss(t);case 191:return ks(t);case 192:return xs(t)}}function Ls(t){switch(t.kind){case 150:case 151:e.forEach(t.parameters,Ls),qi(t);break;case 125:e.forEach(t.parameters,Ls),e.isObjectLiteralMethod(t)&&qi(t);break;case 126:case 127:case 128:case 184:e.forEach(t.parameters,Ls);break;case 175:Ls(t.expression);break;case 123:case 124:case 141:case 142:case 198:case 143:case 144:case 145:case 146:case 147:case 159:case 162:case 148:case 149:case 153:case 154:case 152:case 155:case 156:case 157:case 158:case 163:case 190:case 164:case 166:case 167:case 168:case 169:case 170:case 171:case 172:case 173:case 174:case 176:case 194:case 195:case 177:case 178:case 179:case 180:case 197:case 181:case 183:case 185:case 188:case 200:case 201:e.forEachChild(t,Ls)}}function As(t){var n=g(t);if(!(1&n.flags)){if(oc=!1,lc.length=0,e.forEach(t.statements,ws),Ls(t),e.isExternalModule(t)){var r=A(t.symbol);r&&33554432&r.flags&&(f(r).referenced=!0)}lc.length&&(e.forEach(lc,Uo),lc.length=0),oc&&(n.flags|=8),n.flags|=1}}function Ns(){return e.Debug.assert(o,"diagnostics are available only in the full typecheck mode"),pc&&(uc.sort(e.compareDiagnostics),uc=e.deduplicateSortedDiagnostics(uc),pc=!1),uc}function Ms(n){return n?(As(n),e.filter(Ns(),function(e){return e.file===n})):(e.forEach(t.getSourceFiles(),As),Ns())}function Ps(n){var r=fa();return As(n),e.getDeclarationDiagnostics(t,r,n)}function Os(){return e.filter(Ns(),function(e){return!e.file})}function Is(e){if(e)for(;e.parent;){if(175===e.parent.kind&&e.parent.statement===e)return!0;e=e.parent}return!1}function Rs(t,n){function r(t,n){if(t.flags&n){var r=t.name;$(r)||e.hasProperty(o,r)||(o[r]=t)}}function i(t,n){if(n)for(var i in t)e.hasProperty(t,i)&&r(t[i],n)}var o={},s=0;if(Is(t))return[];for(;t;){switch(t.locals&&!y(t)&&i(t.locals,n),t.kind){case 201:if(!e.isExternalModule(t))break;case 189:i(O(t).exports,35653619&n);break;case 188:i(O(t).exports,8&n);break;case 185:case 186:128&s||i(O(t).members,3152352&n);break;case 150:t.name&&r(t.symbol,n);break;case 197:t.name.text&&r(t.symbol,n)}s=t.flags,t=t.parent}return i(tc,n),e.mapToArray(o)}function Ds(e){return 63==e.kind&&Vs(e.parent)&&e.parent.name===e}function Vs(e){switch(e.kind){case 122:case 185:case 186:case 187:case 188:return!0}}function Fs(e){for(var t=e;t.parent&&120===t.parent.kind;)t=t.parent;return t.parent&&132===t.parent.kind}function Hs(t){if(132<=t.kind&&t.kind<=140)return!0;switch(t.kind){case 109:case 116:case 118:case 110:return!0;case 97:return 154!==t.parent.kind;case 7:return 123===t.parent.kind;case 63:120===t.parent.kind&&t.parent.right===t&&(t=t.parent);case 120:e.Debug.assert(63===t.kind||120===t.kind,"'node' was expected to be a qualified name or identifier in 'isTypeNode'.");var n=t.parent;if(135===n.kind)return!1;if(132<=n.kind&&n.kind<=140)return!0;switch(n.kind){case 122:return t===n.constraint;case 124:case 123:case 183:return t===n.type;case 184:case 150:case 151:case 126:case 125:case 127:case 128:return t===n.type;case 129:case 130:case 131:return t===n.type;case 148:return t===n.type;case 145:case 146:return n.typeArguments&&e.indexOf(n.typeArguments,t)>=0;case 147:return!1}}return!1}function Bs(e){for(;120===e.parent.kind;)e=e.parent;return 191===e.parent.kind?e.parent.moduleReference===e:192===e.parent.kind?e.parent.exportName===e:!1}function $s(e){return 120===e.parent.kind&&e.parent.right===e||143===e.parent.kind&&e.parent.name===e}function Gs(t){if(e.isDeclarationOrFunctionExpressionOrCatchVariableName(t))return O(t.parent);if(192===t.parent.kind)return k(t.parent.parent,t,36814847);if(143!==t.kind&&Bs(t))return S(t);if($s(t)&&(t=t.parent),e.isExpression(t)){if(0===e.getFullWidth(t))return void 0;if(63===t.kind){var n=33661887;return k(t,t,n)}if(143===t.kind){var r=g(t).resolvedSymbol;return r||vi(t),g(t).resolvedSymbol}if(120===t.kind){var r=g(t).resolvedSymbol;return r||yi(t),g(t).resolvedSymbol}}else if(Fs(t)){var n=132===t.parent.kind?3152352:1536;return n|=33554432,k(t,t,n)}return void 0}function Us(t){if(Is(t))return void 0;if(e.isDeclarationOrFunctionExpressionOrCatchVariableName(t))return O(t.parent);if(63===t.kind&&Bs(t))return 192===t.parent.kind?Gs(t):S(t);switch(t.kind){case 63:case 143:case 120:return Gs(t);case 91:case 89:var n=mo(t);return n.symbol;case 111:var r=t.parent;return r&&126===r.kind?r.parent.symbol:void 0;case 7:if(e.isExternalModuleImportDeclaration(t.parent.parent)&&e.getExternalModuleImportDeclarationExpression(t.parent.parent)===t){var i=O(t.parent.parent),o=_t(i);return o?o.symbol:void 0}case 6:if(144==t.parent.kind&&t.parent.argumentExpression===t){var s=mo(t.parent.expression);if(s===qa)return void 0;var a=Xt(s);return a===qa?void 0:Zt(a,t.text)}}return void 0}function Ws(e){return e&&199===e.kind?k(e,e.name,107455):void 0}function js(t){if(Is(t))return qa;if(e.isExpression(t))return zs(t);if(Hs(t))return $n(t);if(Vs(t)){var n=O(t);return At(n)}if(Ds(t)){var n=Us(t);return n&&At(n)}if(e.isDeclaration(t)){var n=O(t);return _t(n)}if(e.isDeclarationOrFunctionExpressionOrCatchVariableName(t)){var n=Us(t);return n&&_t(n)}if(Bs(t)){var n=Us(t),r=n&&At(n);return r!==qa?r:_t(n)}return qa}function zs(e){return $s(e)&&(e=e.parent),mo(e)}function qs(t){var t=Xt(t),n=Nt(Yt(t));return(tn(t,0).length||tn(t,1).length)&&e.forEach(Yt(ba),function(t){e.hasProperty(n,t.name)||(n[t.name]=t)}),G(n)}function Ks(t){if(1073741824&t.flags){var n=[],r=t.name;return e.forEach(f(t).unionType.types,function(e){n.push(Zt(e,r))}),n}if(268435456&t.flags){var i=f(t).target;if(i)return[i]}return[t]}function Ys(e){return 512&e.flags&&1===e.declarations.length&&201===e.declarations[0].kind}function Xs(e,t){for(;e;){if(e===t)return!0;e=e.parent}return!1}function Qs(t,n){for(var r=n;Xs(r,n);r=r.nextContainer)if(r.locals&&e.hasProperty(r.locals,t)){var i=r.locals[t];if(4301759&i.flags)return!1;if(33554432&i.flags){var o=e.getDeclarationOfKind(i,191);if(ca(o))return!1}}return!0}function Js(t){var n=g(t);if(!n.localModuleName){for(var r="",i=e.unescapeIdentifier(t.name.text);!Qs(e.escapeIdentifier(r+i),t);)r+="_";n.localModuleName=r+e.getTextOfNode(t.name)}return n.localModuleName}function Zs(t,n){for(var r=n;r;){if((189===r.kind||188===r.kind)&&O(r)===t)return Js(r);r=r.parent}e.Debug.fail("getLocalNameForSymbol failed")}function ea(e){var t=g(e).resolvedSymbol;if(t){var n=R(t);if(t===n||944&n.flags||(t=n),t.parent)return Ys(t.parent)?"exports":Zs(I(t),e.parent)}}function ta(e){var t=A(O(e));return t&&D(t)&&!ro(t)?rt(t):void 0}function na(t){return 201===t.parent.kind&&e.isInternalModuleImportDeclaration(t)?sa(O(t)):!1}function ra(e){return Ms(e).length>0||Os().length>0}function ia(e){return 0!==t.getDiagnostics(e).length||oa(e)||Ia.noEmitOnError&&0!==Ms(e).length}function oa(t){return e.forEach(Ms(t),function(e){return e.isEarly})}function sa(e){var t=E(e);return t!==Fa&&107455&t.flags&&!aa(t)}function aa(e){return ro(e)||e.constEnumOnlyModule}function ca(e){var t=O(e);return f(t).referenced?!0:1&e.flags?sa(t):!1}function la(e){if(e.body){var t=O(e),n=an(t);return n.length>1||1===n.length&&n[0].declaration!==e}return!1}function ua(e){return g(e).flags}function pa(e){return bs(e.parent),g(e).enumMemberValue}function da(e){var t=g(e).resolvedSymbol;if(t&&8&t.flags){var n,r=t.valueDeclaration;if(200===r.kind&&void 0!==(n=g(r).enumMemberValue))return n}return void 0}function ha(e,t,n,r){var i=O(e),o=!i||395264&i.flags?qa:_t(i);st().buildTypeDisplay(o,r,t,n)}function ma(e,t,n,r){var i=sn(e);st().buildTypeDisplay(cn(i),r,t,n)}function fa(){return{getProgram:function(){return t},getLocalNameOfContainer:Js,getExpressionNamePrefix:ea,getExportAssignmentName:ta,isReferencedImportDeclaration:ca,getNodeCheckFlags:ua,getEnumMemberValue:pa,isTopLevelValueImportWithEntityName:na,hasSemanticErrors:ra,isEmitBlocked:ia,isDeclarationVisible:at,isImplementationOfOverload:la,writeTypeOfDeclaration:ha,writeReturnTypeOfSignatureDeclaration:ma,isSymbolAccessible:X,isEntityNameVisible:Z,getConstantValue:da}}function ga(t){var n=fa();return e.emitFiles(n,t)}function va(){e.forEach(t.getSourceFiles(),function(t){e.bindSourceFile(t),e.forEach(t.semanticDiagnostics,s)}),e.forEach(t.getSourceFiles(),function(t){e.isExternalModule(t)||m(tc,t.locals)}),f(Da).type=ja,f(Va).type=kn("IArguments"),f(Fa).type=qa,tc[Da.name]=Da,ya=Cn("Array"),Ta=Sn(ya,1),_a=kn("Object"),ba=kn("Function"),Ea=kn("String"),Sa=kn("Number"),Ca=kn("Boolean"),ka=kn("RegExp"),xa=Ia.target>=2?kn("TemplateStringsArray"):qa}var ya,_a,ba,Ta,Ea,Sa,Ca,ka,xa,wa,La=e.objectAllocator.getSymbolConstructor(),Aa=e.objectAllocator.getTypeConstructor(),Na=e.objectAllocator.getSignatureConstructor(),Ma=0,Pa=[],Oa={},Ia=t.getCompilerOptions(),Ra={getProgram:function(){return t},getNodeCount:function(){return e.sum(t.getSourceFiles(),"nodeCount")},getIdentifierCount:function(){return e.sum(t.getSourceFiles(),"identifierCount")},getSymbolCount:function(){return e.sum(t.getSourceFiles(),"symbolCount")},getTypeCount:function(){return Ma},isUndefinedSymbol:function(e){return e===Da},isArgumentsSymbol:function(e){return e===Va},emitFiles:ga,getDiagnostics:Ms,getDeclarationDiagnostics:Ps,getGlobalDiagnostics:Os,getTypeOfSymbolAtLocation:Vr,getDeclaredTypeOfSymbol:At,getPropertiesOfType:Yt,getPropertyOfType:Zt,getSignaturesOfType:tn,getIndexTypeOfType:rn,getReturnTypeOfSignature:cn,getSymbolsInScope:Rs,getSymbolAtLocation:Rr,getShorthandAssignmentValueSymbol:Ws,getTypeAtLocation:Dr,typeToString:it,getSymbolDisplayBuilder:st,symbolToString:rt,getAugmentedPropertiesOfType:qs,getRootSymbols:Ks,getContextualType:si,getFullyQualifiedName:C,getResolvedSignature:Ri,getEnumMemberValue:pa,isValidPropertyAccess:bi,getSignatureFromDeclaration:sn,isImplementationOfOverload:la,getAliasedSymbol:E,hasEarlyErrors:oa,isEmitBlocked:ia},Da=c(268435460,"undefined"),Va=c(268435460,"arguments"),Fa=c(268435460,"unknown"),Ha=c(268435456,"__resolving__"),Ba=H(1,"any"),$a=H(2,"string"),Ga=H(4,"number"),Ua=H(8,"boolean"),Wa=H(16,"void"),ja=H(32,"undefined"),za=H(64,"null"),qa=H(1,"unknown"),Ka=H(1,"__resolving__"),Ya=W(void 0,Oa,Pa,Pa,void 0,void 0),Xa=W(void 0,Oa,Pa,Pa,void 0,void 0),Qa=W(void 0,Oa,Pa,Pa,void 0,void 0),Ja=W(void 0,Oa,Pa,Pa,void 0,void 0),Za=Rt(void 0,void 0,Pa,Ba,0,!1,!1),ec=Rt(void 0,void 0,Pa,qa,0,!1,!1),tc={},nc={},rc={},ic={},oc=!1,sc=[],ac=[],cc=[],lc=[],uc=[],pc=!1,dc={},hc={},mc={};return va(),Ra}var n=1,r=1,i=1;e.createTypeChecker=t}(ts||(ts={}));var ts;!function(e){var t;!function(t){function n(t){function n(t,n,r,i){if(t&&n&&r){var a={textSpan:e.TextSpan.fromBounds(n.pos,r.end),hintSpan:e.TextSpan.fromBounds(t.getStart(),t.end),bannerText:s,autoCollapse:i};o.push(a)}}function r(e){switch(e.kind){case 190:case 185:case 186:case 188:return!1}return!0}function i(l){if(!(a>c)){switch(l.kind){case 163:if(!e.isFunctionBlock(l)){var u=l.parent,p=e.findChildOfKind(l,13,t),d=e.findChildOfKind(l,14,t);if(168===u.kind||171===u.kind||170===u.kind||167===u.kind||169===u.kind||175===u.kind||197===u.kind)n(u,p,d,r(l));else{var h=e.TextSpan.fromBounds(l.getStart(),l.end);o.push({textSpan:h,hintSpan:h,bannerText:s,autoCollapse:r(l)})}break}case 190:case 180:case 181:var p=e.findChildOfKind(l,13,t),d=e.findChildOfKind(l,14,t);n(l.parent,p,d,r(l));break;case 185:case 186:case 188:case 142:case 176:var p=e.findChildOfKind(l,13,t),d=e.findChildOfKind(l,14,t);n(l,p,d,r(l));break;case 141:var m=e.findChildOfKind(l,17,t),f=e.findChildOfKind(l,18,t);n(l,m,f,r(l))}a++,e.forEachChild(l,i),a--}}var o=[],s="...",a=0,c=20;return i(t),o}t.collectElements=n}(t=e.OutliningElementsCollector||(e.OutliningElementsCollector={}))}(ts||(ts={}));var ts;!function(e){var t;!function(t){function n(t){function n(e){for(var t=y?1:0,n=e.parent;n;){switch(n.kind){case 189:do n=n.parent;while(189===n.kind);case 185:case 188:case 186:case 184:t++}n=n.parent}return t}function r(e){for(var t=[],n=0,r=e.length;r>n;n++){var i=e[n];185===i.kind||188===i.kind||186===i.kind||189===i.kind||184===i.kind?t.push(i):164===i.kind&&t.push.apply(t,i.declarations)}return o(t)}function i(e){var t=[];return t.push(e),s(e.statements,t),t}function o(e){return e.slice(0).sort(function(e,t){return e.name&&t.name?e.name.text.localeCompare(t.name.text):e.name?1:t.name?-1:e.kind-t.kind})}function s(e,t){e=o(e);for(var n=0,r=e.length;r>n;n++){var i=e[n];switch(i.kind){case 185:case 188:case 186:t.push(i);break;case 189:var c=i;t.push(i),s(f(c).body.statements,t);break;case 184:var l=i;a(l)&&(t.push(i),s(l.body.statements,t))}}}function a(t){if(184===t.kind&&t.body&&163===t.body.kind){if(e.forEach(t.body.statements,function(e){return 184===e.kind&&!p(e.name.text)}))return!0;if(!e.isFunctionBlock(t.parent))return!0}return!1}function c(e,t){for(var n=[],r={},i=0,o=e.length;o>i;i++){var s=e[i],a=t(s);if(void 0!==a&&a.text.length>0){var c=a.text+"-"+a.kind+"-"+a.indent,u=r[c];u?l(u,a):(r[c]=a,n.push(a))}}return n}function l(e,t){if(e.spans.push.apply(e.spans,t.spans),t.childItems){e.childItems||(e.childItems=[]);e:for(var n=0,r=t.childItems.length;r>n;n++){for(var i=t.childItems[n],o=0,s=e.childItems.length;s>o;o++){var a=e.childItems[o];if(a.text===i.text&&a.kind===i.kind){l(a,i);continue e}}e.childItems.push(i)}}}function u(t){function n(t,n,r){return d(n,r,e.getNodeModifiers(t),[g(t)])}switch(t.kind){case 123:return 0===(243&t.flags)?void 0:n(t,v(t.name),e.ScriptElementKind.memberVariableElement);case 125:return n(t,v(t.name),e.ScriptElementKind.memberFunctionElement);case 127:return n(t,v(t.name),e.ScriptElementKind.memberGetAccessorElement);case 128:return n(t,v(t.name),e.ScriptElementKind.memberSetAccessorElement);case 131:return n(t,"[]",e.ScriptElementKind.indexSignatureElement);case 200:return n(t,v(t.name),e.ScriptElementKind.memberVariableElement);case 129:return n(t,"()",e.ScriptElementKind.callSignatureElement);case 130:return n(t,"new()",e.ScriptElementKind.constructSignatureElement);case 124:return n(t,v(t.name),e.ScriptElementKind.memberVariableElement);case 184:return n(t,v(t.name),e.ScriptElementKind.functionElement);case 183:return e.isConst(t)?n(t,v(t.name),e.ScriptElementKind.constElement):e.isLet(t)?n(t,v(t.name),e.ScriptElementKind.letElement):n(t,v(t.name),e.ScriptElementKind.variableElement);case 126:return n(t,"constructor",e.ScriptElementKind.constructorImplementationElement)}return void 0}function p(e){return!e||""===e.trim()}function d(e,t,n,r,i,o){return void 0===i&&(i=[]),void 0===o&&(o=0),p(e)?void 0:{text:e,kind:t,kindModifiers:n,spans:r,childItems:i,indent:o,bolded:!1,grayed:!1}}function h(t){function i(e){if(7===e.name.kind)return v(e.name);var t=[];for(t.push(e.name.text);e.body&&189===e.body.kind;)e=e.body,t.push(e.name.text);return t.join(".")}function s(t){var o=i(t),s=c(r(f(t).body.statements),u);return d(o,e.ScriptElementKind.moduleElement,e.getNodeModifiers(t),[g(t)],s,n(t))}function a(t){if(t.name&&t.body&&163===t.body.kind){var r=c(o(t.body.statements),u);return d(t.name.text,e.ScriptElementKind.functionElement,e.getNodeModifiers(t),[g(t)],r,n(t))}return void 0}function l(t){var n=c(r(t.statements),u);if(void 0===n||0===n.length)return void 0;y=!0;var i=e.isExternalModule(t)?'"'+e.escapeString(e.getBaseFilename(e.removeFileExtension(e.normalizePath(t.filename))))+'"':"<global>";return d(i,e.ScriptElementKind.moduleElement,e.ScriptElementKindModifier.none,[g(t)],n)}function p(t){var r;if(t.members){var i=e.forEach(t.members,function(e){return 126===e.kind&&e}),s=m(t);i&&s.push.apply(s,i.parameters);var r=c(o(s),u)}return d(t.name.text,e.ScriptElementKind.classElement,e.getNodeModifiers(t),[g(t)],r,n(t))}function h(t){var r=c(o(m(t)),u);return d(t.name.text,e.ScriptElementKind.enumElement,e.getNodeModifiers(t),[g(t)],r,n(t))}function _(t){var r=c(o(m(t)),u);return d(t.name.text,e.ScriptElementKind.interfaceElement,e.getNodeModifiers(t),[g(t)],r,n(t))}switch(t.kind){case 201:return l(t);case 185:return p(t);case 188:return h(t);case 186:return _(t);case 189:return s(t);case 184:return a(t)}return void 0}function m(t){return e.filter(t.members,function(e){return void 0===e.name||121!==e.name.kind})}function f(e){for(;189===e.body.kind;)e=e.body;return e}function g(t){return 201===t.kind?e.TextSpan.fromBounds(t.getFullStart(),t.getEnd()):e.TextSpan.fromBounds(t.getStart(),t.getEnd())}function v(n){return e.getTextOfNodeFromSourceText(t.text,n)}var y=!1;return c(i(t),h)}t.getNavigationBarItems=n}(t=e.NavigationBar||(e.NavigationBar={}))}(ts||(ts={}));var ts;!function(e){var t;!function(t){function n(t,n,r,o){function s(r){if(145===r.parent.kind||146===r.parent.kind){var i=r.parent;if(23===r.kind||15===r.kind){var o=h(i,r,t),s=i.typeArguments&&i.typeArguments.pos===o.pos;return e.Debug.assert(void 0!==o),{kind:s?0:1,invocation:i,argumentsSpan:u(o),argumentIndex:0,argumentCount:a(o)}}var p=e.findListItemInfo(r);if(p){var o=p.list,s=i.typeArguments&&i.typeArguments.pos===o.pos,d=p.listItemIndex+1>>1;return{kind:s?0:1,invocation:i,argumentsSpan:u(o),argumentIndex:d,argumentCount:a(o)}}}else if(9===r.kind&&147===r.parent.kind){if(e.isInsideTemplateLiteral(r,n))return l(r.parent,0)}else{if(10===r.kind&&147===r.parent.parent.kind){var m=r.parent,f=m.parent;e.Debug.assert(159===m.kind);var d=e.isInsideTemplateLiteral(r,n)?0:1;return l(f,d)}if(162===r.parent.kind&&147===r.parent.parent.parent.kind){var g=r.parent,m=g.parent,f=m.parent;if(e.Debug.assert(159===m.kind),12===r.kind&&n>=r.getEnd()&&!r.isUnterminated)return void 0;var v=m.templateSpans.indexOf(g),d=c(v,r);return l(f,d)}}return void 0}function a(t){return 0===t.getChildCount()?0:1+e.countWhere(t.getChildren(),function(e){return 22===e.kind})}function c(t,r){return e.Debug.assert(n>=r.getStart(),"Assumed 'position' could not occur before node."),e.isTemplateLiteralKind(r.kind)?e.isInsideTemplateLiteral(r,n)?0:t+2:t+1}function l(e,t){var n=9===e.template.kind?1:e.template.templateSpans.length+1;return{kind:2,invocation:e,argumentsSpan:p(e),argumentIndex:t,argumentCount:n}}function u(n){var r=n.getFullStart(),i=e.skipTrivia(t.text,n.getEnd(),!1);return new e.TextSpan(r,i-r)}function p(n){var r=n.template,i=r.getStart(),o=r.getEnd();if(159===r.kind){var s=e.lastOrUndefined(r.templateSpans);0===s.literal.getFullWidth()&&(o=e.skipTrivia(t.text,o,!1))}return new e.TextSpan(i,o-i)}function d(t){for(var n=t;201!==n.kind;n=n.parent){if(e.isFunctionBlock(n))return void 0;(n.pos<n.parent.pos||n.end>n.parent.end)&&e.Debug.fail("Node of kind "+n.kind+" is not a subspan of its parent of kind "+n.parent.kind);var r=s(n);if(r)return r}return void 0}function h(t,n,r){var i=t.getChildren(r),o=i.indexOf(n);return e.Debug.assert(o>=0&&i.length>o+1),i[o+1]}function m(e,t){for(var n=-1,r=-1,i=0;i<e.length;i++){var o=e[i];if(o.hasRestParameter||o.parameters.length>=t)return i;o.parameters.length>r&&(r=o.parameters.length,n=i)}return n}function f(t,n,o){function s(t){var n=e.mapToDisplayParts(function(e){return r.getSymbolDisplayBuilder().buildParameterDisplay(t,e,u)}),i=e.hasQuestionToken(t.valueDeclaration);return{name:t.name,documentation:t.getDocumentationComment(),displayParts:n,isOptional:i}}function a(t){var n=e.mapToDisplayParts(function(e){return r.getSymbolDisplayBuilder().buildTypeParameterDisplay(t,e,u)});return{name:t.symbol.name,documentation:i,displayParts:n,isOptional:!1}}var c=o.argumentsSpan,l=0===o.kind,u=o.invocation,p=e.getInvokedExpression(u),d=r.getSymbolAtLocation(p),h=d&&e.symbolToDisplayParts(r,d,void 0,void 0),f=e.map(t,function(t){var n,o=[],c=[];if(h&&o.push.apply(o,h),l){o.push(e.punctuationPart(23));var p=t.typeParameters;n=p&&p.length>0?e.map(p,a):i,c.push(e.punctuationPart(24));var d=e.mapToDisplayParts(function(e){return r.getSymbolDisplayBuilder().buildDisplayForParametersAndDelimiters(t.parameters,e,u)});c.push.apply(c,d)}else{var m=e.mapToDisplayParts(function(e){return r.getSymbolDisplayBuilder().buildDisplayForTypeParametersAndDelimiters(t.typeParameters,e,u)});o.push.apply(o,m),o.push(e.punctuationPart(15));var f=t.parameters;n=f.length>0?e.map(f,s):i,c.push(e.punctuationPart(16))}var g=e.mapToDisplayParts(function(e){return r.getSymbolDisplayBuilder().buildReturnTypeDisplay(t,e,u)});return c.push.apply(c,g),{isVariadic:t.hasRestParameter,prefixDisplayParts:o,suffixDisplayParts:c,separatorDisplayParts:[e.punctuationPart(22),e.spacePart()],parameters:n,documentation:t.getDocumentationComment()}}),g=o.argumentIndex,v=o.argumentCount,y=t.indexOf(n);return 0>y&&(y=m(t,v)),{items:f,applicableSpan:c,selectedItemIndex:y,argumentIndex:g,argumentCount:v}}var g=e.findTokenOnLeftOfPosition(t,n);if(!g)return void 0;var v=d(g);if(o.throwIfCancellationRequested(),!v)return void 0;var y=v.invocation,_=[],b=r.getResolvedSignature(y,_);return o.throwIfCancellationRequested(),_.length?f(_,b,v):void 0}var r,i=[];!function(e){e[e.TypeArguments=0]="TypeArguments",e[e.CallArguments=1]="CallArguments",e[e.TaggedTemplateArguments=2]="TaggedTemplateArguments"}(r||(r={})),t.getSignatureHelpItems=n}(t=e.SignatureHelp||(e.SignatureHelp={}))}(ts||(ts={}));var ts;!function(e){function t(t,n){e.Debug.assert(t>=1);var r=n.getLineStarts(),i=t-1;if(i===r.length-1)return n.text.length-1;var o=r[i],s=r[i+1]-1;for(e.Debug.assert(e.isLineBreak(n.text.charCodeAt(s)));s>=o&&e.isLineBreak(n.text.charCodeAt(s));)s--;return s}function n(t,n){return e.Debug.assert(t>=1),n.getLineStarts()[t-1]}function r(e,t){var n=t.getLineStarts(),r=t.getLineAndCharacterFromPosition(e).line;return n[r-1]}function i(e,t){return o(e.pos,e.end,t)}function o(e,t,n){return e<=n.pos&&t>=n.end}function s(e,t,n){return e.pos<=t&&e.end>=n}function a(e,t,n){return c(e.pos,e.end,t,n)}function c(e,t,n,r){var i=Math.max(e,n),o=Math.min(t,r);return o>i}function l(t){var n=p(t);if(!n)return void 0;var r=n.getChildren(),i=e.indexOf(r,t);return{listItemIndex:i,list:n}}function u(t,n,r){return e.forEach(t.getChildren(r),function(e){return e.kind===n&&e})}function p(t){var n=e.forEach(t.parent.getChildren(),function(e){return 203===e.kind&&e.pos<=t.pos&&e.end>=t.end?e:void 0});return n}function d(e,t){return m(e,t,function(e){return C(e.kind)})}function h(e,t){return m(e,t,function(e){return k(e.kind)})}function m(e,t,n){return g(e,t,!1,n)}function f(e,t){return g(e,t,!0,void 0)}function g(e,t,n,r){var i=e;e:for(;;){if(S(i))return i;for(var o=0,s=i.getChildCount(e);s>o;o++){var a=i.getChildAt(o),c=n?a.getFullStart():a.getStart(e);if(t>=c){var l=a.getEnd();if(l>t||t===l&&1===a.kind){i=a;continue e}if(r&&l===t){var u=_(t,e,a);if(u&&r(u))return u}}}return i}}function v(e,t){var n=f(e,t);return S(n)&&t>n.getStart(e)&&t<n.getEnd()?n:_(t,e)}function y(e,t){function n(t){if(S(t)&&t.pos===e.end)return t;for(var r=t.getChildren(),i=0,o=r.length;o>i;++i){var s=r[i],a=s.pos<=e.pos&&s.end>e.end||s.pos===e.end;if(a&&b(s))return n(s)}return void 0}return n(t)}function _(t,n,r){function i(e){if(S(e))return e;var t=e.getChildren(),n=s(t,t.length);return n&&i(n)}function o(a){if(S(a))return a;for(var c=a.getChildren(),l=0,u=c.length;u>l;++l){var p=c[l];
if(b(p)&&t<=p.end){if(p.getStart(n)>=t){var d=s(c,l);return d&&i(d)}return o(p)}}if(e.Debug.assert(void 0!==r||201===a.kind),c.length){var d=s(c,c.length);return d&&i(d)}}function s(e,t){for(var n=t-1;n>=0;--n)if(b(e[n]))return e[n]}return o(r||n)}function b(e){return 0!==e.getWidth()}function T(t){var n=t.flags,r=[];return 32&n&&r.push(e.ScriptElementKindModifier.privateMemberModifier),64&n&&r.push(e.ScriptElementKindModifier.protectedMemberModifier),16&n&&r.push(e.ScriptElementKindModifier.publicMemberModifier),128&n&&r.push(e.ScriptElementKindModifier.staticModifier),1&n&&r.push(e.ScriptElementKindModifier.exportedModifier),e.isInAmbientContext(t)&&r.push(e.ScriptElementKindModifier.ambientModifier),r.length>0?r.join(","):e.ScriptElementKindModifier.none}function E(t){return 132===t.kind||145===t.kind?t.typeArguments:e.isAnyFunction(t)||185===t.kind||186===t.kind?t.typeParameters:void 0}function S(e){return e.kind>=0&&e.kind<=119}function C(t){return 63===t||e.isKeyword(t)}function k(e){return 7===e||6===e||C(e)}function x(e){return 2===e||3===e}function w(e){return e>=13&&62>=e}function L(t,n){return e.isTemplateLiteralKind(t.kind)&&t.getStart()<n&&n<t.getEnd()||!!t.isUnterminated&&n===t.getEnd()}function A(e,t){for(var n in e)if("object"==typeof e[n]){if(!A(e[n],t[n]))return!1}else if("function"!=typeof e[n]&&e[n]!==t[n])return!1;return!0}e.getEndLinePosition=t,e.getStartPositionOfLine=n,e.getStartLinePositionForPosition=r,e.rangeContainsRange=i,e.startEndContainsRange=o,e.rangeContainsStartEnd=s,e.rangeOverlapsWithStartEnd=a,e.startEndOverlapsWithStartEnd=c,e.findListItemInfo=l,e.findChildOfKind=u,e.findContainingList=p,e.getTouchingWord=d,e.getTouchingPropertyName=h,e.getTouchingToken=m,e.getTokenAtPosition=f,e.findTokenOnLeftOfPosition=v,e.findNextToken=y,e.findPrecedingToken=_,e.getNodeModifiers=T,e.getTypeArgumentOrTypeParameterList=E,e.isToken=S,e.isComment=x,e.isPunctuation=w,e.isInsideTemplateLiteral=L,e.compareDataObjects=A}(ts||(ts={}));var ts;!function(e){function t(e){return e.declarations&&e.declarations.length>0&&123===e.declarations[0].kind}function n(){function t(){if(l){var t=e.getIndentString(p);t&&c.push(i(t,16)),l=!1}}function n(e,n){t(),c.push(i(e,n))}function o(e,n){t(),c.push(r(e,n))}function s(){c.push(u()),l=!0}function a(){c=[],l=!0,p=0}var c,l,p;return a(),{displayParts:function(){return c},writeKeyword:function(e){return n(e,5)},writeOperator:function(e){return n(e,12)},writePunctuation:function(e){return n(e,15)},writeSpace:function(e){return n(e,16)},writeStringLiteral:function(e){return n(e,8)},writeParameter:function(e){return n(e,13)},writeSymbol:o,writeLine:s,increaseIndent:function(){p++},decreaseIndent:function(){p--},clear:a,trackSymbol:function(){}}}function r(e,n){function r(e){var n=e.flags;return 3&n?t(e)?13:9:4&n?14:32768&n?14:65536&n?14:8&n?19:16&n?20:32&n?1:64&n?4:384&n?2:1536&n?11:8192&n?10:1048576&n?18:2097152&n?0:33554432&n?0:17}return i(e,r(n),n)}function i(t,n){return{text:t,kind:e.SymbolDisplayPartKind[n]}}function o(){return i(" ",16)}function s(t){return i(e.tokenToString(t),5)}function a(t){return i(e.tokenToString(t),15)}function c(t){return i(e.tokenToString(t),12)}function l(e){return i(e,17)}function u(){return i("\n",6)}function p(e){e(f);var t=f.displayParts();return f.clear(),t}function d(e,t,n,r){return p(function(i){e.getSymbolDisplayBuilder().buildTypeDisplay(t,i,n,r)})}function h(e,t,n,r,i){return p(function(o){e.getSymbolDisplayBuilder().buildSymbolDisplay(t,o,n,r,i)})}function m(e,t,n,r){return p(function(i){e.getSymbolDisplayBuilder().buildSignatureDisplay(t,i,n,r)})}e.isFirstDeclarationOfSymbolParameter=t;var f=n();e.symbolPart=r,e.displayPart=i,e.spacePart=o,e.keywordPart=s,e.punctuationPart=a,e.operatorPart=c,e.textPart=l,e.lineBreakPart=u,e.mapToDisplayParts=p,e.typeToDisplayParts=d,e.symbolToDisplayParts=h,e.signatureToDisplayParts=m}(ts||(ts={}));var ts;!function(e){var t;!function(t){function n(t,n,r){function o(){v=void 0;var t=i.getStartPos()!==n;t&&(m?(e.Debug.assert(0!==m.length),y=4===m[m.length-1].kind):y=!1),h=void 0,m=void 0,t||i.scan();for(var o,s=i.getStartPos();r>s;){var o=i.getToken();if(!e.isTrivia(o))break;i.scan();var a={pos:s,end:i.getStartPos(),kind:o};s=i.getStartPos(),h||(h=[]),h.push(a)}f=i.getStartPos()}function s(e){if(157!==e.kind)return!1;switch(e.operator){case 26:case 58:case 59:case 41:case 40:return!0}return!1}function a(e){return 8===e.kind}function c(e){return 11===e.kind||12===e.kind}function l(e){return 35===e||55===e}function u(t){if(!p())return{leadingTrivia:h,trailingTrivia:void 0,token:void 0};var n=s(t)?1:a(t)?2:c(t)?3:0;if(v&&n===g)return d(v,t);i.getStartPos()!==f&&(e.Debug.assert(void 0!==v),i.setTextPos(f),i.scan());var o=i.getToken();1===n&&24===o?(o=i.reScanGreaterToken(),e.Debug.assert(t.operator===o),g=1):2===n&&l(o)?(o=i.reScanSlashToken(),e.Debug.assert(t.kind===o),g=2):3===n&&14===o?(o=i.reScanTemplateToken(),g=3):g=0;for(var u={pos:i.getStartPos(),end:i.getTextPos(),kind:o};i.getStartPos()<r&&(o=i.scan(),e.isTrivia(o));){var y={pos:i.getStartPos(),end:i.getTextPos(),kind:o};if(m||(m=[]),m.push(y),4===o){i.scan();break}}return v={leadingTrivia:h,trailingTrivia:m,token:u},d(v,t)}function p(){var t=v&&v.token.kind||i.getToken(),n=v&&v.token.pos||i.getStartPos();return r>n&&1!==t&&!e.isTrivia(t)}function d(t,n){return e.isToken(n)&&t.token.kind!==n.kind&&(t.token.kind=n.kind),t}i.setText(t.text),i.setTextPos(n);var h,m,f,g,v,y=!0;return{advance:o,readTokenInfo:u,isOnToken:p,lastTrailingTriviaWasNewLine:function(){return y},close:function(){v=void 0,i.setText(void 0)}}}var r,i=e.createScanner(2,!1);!function(e){e[e.Scan=0]="Scan",e[e.RescanGreaterThanToken=1]="RescanGreaterThanToken",e[e.RescanSlashToken=2]="RescanSlashToken",e[e.RescanTemplateToken=3]="RescanTemplateToken"}(r||(r={})),t.getFormattingScanner=n}(t=e.formatting||(e.formatting={}))}(ts||(ts={}));var ts;!function(e){var t;!function(t){var n=function(){function t(e,t){this.sourceFile=e,this.formattingRequestKind=t}return t.prototype.updateContext=function(t,n,r,i,o){e.Debug.assert(void 0!==t,"currentTokenSpan is null"),e.Debug.assert(void 0!==n,"currentTokenParent is null"),e.Debug.assert(void 0!==r,"nextTokenSpan is null"),e.Debug.assert(void 0!==i,"nextTokenParent is null"),e.Debug.assert(void 0!==o,"commonParent is null"),this.currentTokenSpan=t,this.currentTokenParent=n,this.nextTokenSpan=r,this.nextTokenParent=i,this.contextNode=o,this.contextNodeAllOnSameLine=void 0,this.nextNodeAllOnSameLine=void 0,this.tokensAreOnSameLine=void 0,this.contextNodeBlockIsOnOneLine=void 0,this.nextNodeBlockIsOnOneLine=void 0},t.prototype.ContextNodeAllOnSameLine=function(){return void 0===this.contextNodeAllOnSameLine&&(this.contextNodeAllOnSameLine=this.NodeIsOnOneLine(this.contextNode)),this.contextNodeAllOnSameLine},t.prototype.NextNodeAllOnSameLine=function(){return void 0===this.nextNodeAllOnSameLine&&(this.nextNodeAllOnSameLine=this.NodeIsOnOneLine(this.nextTokenParent)),this.nextNodeAllOnSameLine},t.prototype.TokensAreOnSameLine=function(){if(void 0===this.tokensAreOnSameLine){var e=this.sourceFile.getLineAndCharacterFromPosition(this.currentTokenSpan.pos).line,t=this.sourceFile.getLineAndCharacterFromPosition(this.nextTokenSpan.pos).line;this.tokensAreOnSameLine=e==t}return this.tokensAreOnSameLine},t.prototype.ContextNodeBlockIsOnOneLine=function(){return void 0===this.contextNodeBlockIsOnOneLine&&(this.contextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.contextNode)),this.contextNodeBlockIsOnOneLine},t.prototype.NextNodeBlockIsOnOneLine=function(){return void 0===this.nextNodeBlockIsOnOneLine&&(this.nextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.nextTokenParent)),this.nextNodeBlockIsOnOneLine},t.prototype.NodeIsOnOneLine=function(e){var t=this.sourceFile.getLineAndCharacterFromPosition(e.getStart(this.sourceFile)).line,n=this.sourceFile.getLineAndCharacterFromPosition(e.getEnd()).line;return t==n},t.prototype.BlockIsOnOneLine=function(t){var n=e.findChildOfKind(t,13,this.sourceFile),r=e.findChildOfKind(t,14,this.sourceFile);if(n&&r){var i=this.sourceFile.getLineAndCharacterFromPosition(n.getEnd()).line,o=this.sourceFile.getLineAndCharacterFromPosition(r.getStart(this.sourceFile)).line;return i===o}return!1},t}();t.FormattingContext=n}(t=e.formatting||(e.formatting={}))}(ts||(ts={}));var ts;!function(e){var t;!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.FormattingRequestKind||(e.FormattingRequestKind={}));e.FormattingRequestKind}(t=e.formatting||(e.formatting={}))}(ts||(ts={}));var ts;!function(e){var t;!function(e){var t=function(){function e(e,t,n){void 0===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}(t=e.formatting||(e.formatting={}))}(ts||(ts={}));var ts;!function(e){var t;!function(e){!function(e){e[e.Ignore=1]="Ignore",e[e.Space=2]="Space",e[e.NewLine=4]="NewLine",e[e.Delete=8]="Delete"}(e.RuleAction||(e.RuleAction={}));e.RuleAction}(t=e.formatting||(e.formatting={}))}(ts||(ts={}));var ts;!function(e){var t;!function(e){var t=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.Shared.TokenRange.FromToken(n),e.Shared.TokenRange.FromToken(r))},t.create2=function(n,r){return t.create4(n,e.Shared.TokenRange.FromToken(r))},t.create3=function(n,r){return t.create4(e.Shared.TokenRange.FromToken(n),r)},t.create4=function(e,n){return new t(e,n)},t}();e.RuleDescriptor=t}(t=e.formatting||(e.formatting={}))}(ts||(ts={}));var ts;!function(e){var t;!function(e){!function(e){e[e.None=0]="None",e[e.CanDeleteNewLines=1]="CanDeleteNewLines"}(e.RuleFlags||(e.RuleFlags={}));e.RuleFlags}(t=e.formatting||(e.formatting={}))}(ts||(ts={}));var ts;!function(e){var t;!function(e){var t=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.RuleOperationContext.Any,n)},t.create2=function(e,n){var r=new t;return r.Context=e,r.Action=n,r},t}();e.RuleOperation=t}(t=e.formatting||(e.formatting={}))}(ts||(ts={}));var ts;!function(e){var t;!function(e){var t=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];this.customContextChecks=e}return e.prototype.IsAny=function(){return this==e.Any},e.prototype.InContext=function(e){if(this.IsAny())return!0;for(var t=0,n=this.customContextChecks.length;n>t;t++)if(!this.customContextChecks[t](e))return!1;return!0},e.Any=new e,e}();e.RuleOperationContext=t}(t=e.formatting||(e.formatting={}))}(ts||(ts={}));var ts;!function(e){var t;!function(e){var t=function(){function t(){this.IgnoreBeforeComment=new e.Rule(e.RuleDescriptor.create4(e.Shared.TokenRange.Any,e.Shared.TokenRange.Comments),e.RuleOperation.create1(1)),this.IgnoreAfterLineComment=new e.Rule(e.RuleDescriptor.create3(2,e.Shared.TokenRange.Any),e.RuleOperation.create1(1)),this.NoSpaceBeforeSemicolon=new e.Rule(e.RuleDescriptor.create2(e.Shared.TokenRange.Any,21),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),8)),this.NoSpaceBeforeColon=new e.Rule(e.RuleDescriptor.create2(e.Shared.TokenRange.Any,50),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsNotBinaryOpContext),8)),this.NoSpaceBeforeQMark=new e.Rule(e.RuleDescriptor.create2(e.Shared.TokenRange.Any,49),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsNotBinaryOpContext),8)),this.SpaceAfterColon=new e.Rule(e.RuleDescriptor.create3(50,e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsNotBinaryOpContext),2)),this.SpaceAfterQMark=new e.Rule(e.RuleDescriptor.create3(49,e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsNotBinaryOpContext),2)),this.SpaceAfterSemicolon=new e.Rule(e.RuleDescriptor.create3(21,e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),2)),this.SpaceAfterCloseBrace=new e.Rule(e.RuleDescriptor.create3(14,e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsAfterCodeBlockContext),2)),this.SpaceBetweenCloseBraceAndElse=new e.Rule(e.RuleDescriptor.create1(14,74),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),2)),this.SpaceBetweenCloseBraceAndWhile=new e.Rule(e.RuleDescriptor.create1(14,98),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),2)),this.NoSpaceAfterCloseBrace=new e.Rule(e.RuleDescriptor.create3(14,e.Shared.TokenRange.FromTokens([16,18,22,21])),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),8)),this.NoSpaceBeforeDot=new e.Rule(e.RuleDescriptor.create2(e.Shared.TokenRange.Any,19),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),8)),this.NoSpaceAfterDot=new e.Rule(e.RuleDescriptor.create3(19,e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),8)),this.NoSpaceBeforeOpenBracket=new e.Rule(e.RuleDescriptor.create2(e.Shared.TokenRange.Any,17),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),8)),this.NoSpaceAfterOpenBracket=new e.Rule(e.RuleDescriptor.create3(17,e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),8)),this.NoSpaceBeforeCloseBracket=new e.Rule(e.RuleDescriptor.create2(e.Shared.TokenRange.Any,18),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),8)),this.NoSpaceAfterCloseBracket=new e.Rule(e.RuleDescriptor.create3(18,e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),8)),this.FunctionOpenBraceLeftTokenRange=e.Shared.TokenRange.AnyIncludingMultilineComments,this.SpaceBeforeOpenBraceInFunction=new e.Rule(e.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange,13),e.RuleOperation.create2(new e.RuleOperationContext(t.IsFunctionDeclContext,t.IsNotFormatOnEnter,t.IsSameLineTokenOrBeforeMultilineBlockContext),2),1),this.TypeScriptOpenBraceLeftTokenRange=e.Shared.TokenRange.FromTokens([63,3]),this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock=new e.Rule(e.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange,13),e.RuleOperation.create2(new e.RuleOperationContext(t.IsTypeScriptDeclWithBlockContext,t.IsNotFormatOnEnter,t.IsSameLineTokenOrBeforeMultilineBlockContext),2),1),this.ControlOpenBraceLeftTokenRange=e.Shared.TokenRange.FromTokens([16,3,73,94,79,74]),this.SpaceBeforeOpenBraceInControl=new e.Rule(e.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange,13),e.RuleOperation.create2(new e.RuleOperationContext(t.IsControlDeclContext,t.IsNotFormatOnEnter,t.IsSameLineTokenOrBeforeMultilineBlockContext),2),1),this.SpaceAfterOpenBrace=new e.Rule(e.RuleDescriptor.create3(13,e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSingleLineBlockContext),2)),this.SpaceBeforeCloseBrace=new e.Rule(e.RuleDescriptor.create2(e.Shared.TokenRange.Any,14),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSingleLineBlockContext),2)),this.NoSpaceBetweenEmptyBraceBrackets=new e.Rule(e.RuleDescriptor.create1(13,14),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsObjectContext),8)),this.NewLineAfterOpenBraceInBlockContext=new e.Rule(e.RuleDescriptor.create3(13,e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsMultilineBlockContext),4)),this.NewLineBeforeCloseBraceInBlockContext=new e.Rule(e.RuleDescriptor.create2(e.Shared.TokenRange.AnyIncludingMultilineComments,14),e.RuleOperation.create2(new e.RuleOperationContext(t.IsMultilineBlockContext),4)),this.NoSpaceAfterUnaryPrefixOperator=new e.Rule(e.RuleDescriptor.create4(e.Shared.TokenRange.UnaryPrefixOperators,e.Shared.TokenRange.UnaryPrefixExpressions),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsNotBinaryOpContext),8)),this.NoSpaceAfterUnaryPreincrementOperator=new e.Rule(e.RuleDescriptor.create3(37,e.Shared.TokenRange.UnaryPreincrementExpressions),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),8)),this.NoSpaceAfterUnaryPredecrementOperator=new e.Rule(e.RuleDescriptor.create3(38,e.Shared.TokenRange.UnaryPredecrementExpressions),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),8)),this.NoSpaceBeforeUnaryPostincrementOperator=new e.Rule(e.RuleDescriptor.create2(e.Shared.TokenRange.UnaryPostincrementExpressions,37),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),8)),this.NoSpaceBeforeUnaryPostdecrementOperator=new e.Rule(e.RuleDescriptor.create2(e.Shared.TokenRange.UnaryPostdecrementExpressions,38),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),8)),this.SpaceAfterPostincrementWhenFollowedByAdd=new e.Rule(e.RuleDescriptor.create1(37,32),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),2)),this.SpaceAfterAddWhenFollowedByUnaryPlus=new e.Rule(e.RuleDescriptor.create1(32,32),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),2)),this.SpaceAfterAddWhenFollowedByPreincrement=new e.Rule(e.RuleDescriptor.create1(32,37),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),2)),this.SpaceAfterPostdecrementWhenFollowedBySubtract=new e.Rule(e.RuleDescriptor.create1(38,33),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),2)),this.SpaceAfterSubtractWhenFollowedByUnaryMinus=new e.Rule(e.RuleDescriptor.create1(33,33),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),2)),this.SpaceAfterSubtractWhenFollowedByPredecrement=new e.Rule(e.RuleDescriptor.create1(33,38),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),2)),this.NoSpaceBeforeComma=new e.Rule(e.RuleDescriptor.create2(e.Shared.TokenRange.Any,22),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),8)),this.SpaceAfterCertainKeywords=new e.Rule(e.RuleDescriptor.create4(e.Shared.TokenRange.FromTokens([96,92,86,72,88,95]),e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),2)),this.NoSpaceBeforeOpenParenInFuncCall=new e.Rule(e.RuleDescriptor.create2(e.Shared.TokenRange.Any,15),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsFunctionCallOrNewContext),8)),this.SpaceAfterFunctionInFuncDecl=new e.Rule(e.RuleDescriptor.create3(81,e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsFunctionDeclContext),2)),this.NoSpaceBeforeOpenParenInFuncDecl=new e.Rule(e.RuleDescriptor.create2(e.Shared.TokenRange.Any,15),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsFunctionDeclContext),8)),this.SpaceAfterVoidOperator=new e.Rule(e.RuleDescriptor.create3(97,e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsVoidOpContext),2)),this.NoSpaceBetweenReturnAndSemicolon=new e.Rule(e.RuleDescriptor.create1(88,21),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),8)),this.SpaceBetweenStatements=new e.Rule(e.RuleDescriptor.create4(e.Shared.TokenRange.FromTokens([16,73,74,65]),e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsNotForContext),2)),this.SpaceAfterTryFinally=new e.Rule(e.RuleDescriptor.create2(e.Shared.TokenRange.FromTokens([94,79]),13),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),2)),this.SpaceAfterGetSetInMember=new e.Rule(e.RuleDescriptor.create2(e.Shared.TokenRange.FromTokens([113,117]),63),e.RuleOperation.create2(new e.RuleOperationContext(t.IsFunctionDeclContext),2)),this.SpaceBeforeBinaryKeywordOperator=new e.Rule(e.RuleDescriptor.create4(e.Shared.TokenRange.Any,e.Shared.TokenRange.BinaryKeywordOperators),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),2)),this.SpaceAfterBinaryKeywordOperator=new e.Rule(e.RuleDescriptor.create4(e.Shared.TokenRange.BinaryKeywordOperators,e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),2)),this.NoSpaceAfterConstructor=new e.Rule(e.RuleDescriptor.create1(111,15),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),8)),this.NoSpaceAfterModuleImport=new e.Rule(e.RuleDescriptor.create2(e.Shared.TokenRange.FromTokens([114,115]),15),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),8)),this.SpaceAfterCertainTypeScriptKeywords=new e.Rule(e.RuleDescriptor.create4(e.Shared.TokenRange.FromTokens([67,112,75,76,77,113,100,83,101,114,104,106,117,107]),e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),2)),this.SpaceBeforeCertainTypeScriptKeywords=new e.Rule(e.RuleDescriptor.create4(e.Shared.TokenRange.Any,e.Shared.TokenRange.FromTokens([77,100])),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),2)),this.SpaceAfterModuleName=new e.Rule(e.RuleDescriptor.create1(7,13),e.RuleOperation.create2(new e.RuleOperationContext(t.IsModuleDeclContext),2)),this.SpaceAfterArrow=new e.Rule(e.RuleDescriptor.create3(31,e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),2)),this.NoSpaceAfterEllipsis=new e.Rule(e.RuleDescriptor.create1(20,63),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),8)),this.NoSpaceAfterOptionalParameters=new e.Rule(e.RuleDescriptor.create3(49,e.Shared.TokenRange.FromTokens([16,22])),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsNotBinaryOpContext),8)),this.NoSpaceBeforeOpenAngularBracket=new e.Rule(e.RuleDescriptor.create2(e.Shared.TokenRange.TypeNames,23),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsTypeArgumentOrParameterContext),8)),this.NoSpaceBetweenCloseParenAndAngularBracket=new e.Rule(e.RuleDescriptor.create1(16,23),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsTypeArgumentOrParameterContext),8)),this.NoSpaceAfterOpenAngularBracket=new e.Rule(e.RuleDescriptor.create3(23,e.Shared.TokenRange.TypeNames),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsTypeArgumentOrParameterContext),8)),this.NoSpaceBeforeCloseAngularBracket=new e.Rule(e.RuleDescriptor.create2(e.Shared.TokenRange.Any,24),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsTypeArgumentOrParameterContext),8)),this.NoSpaceAfterCloseAngularBracket=new e.Rule(e.RuleDescriptor.create3(24,e.Shared.TokenRange.FromTokens([15,17,24,22])),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsTypeArgumentOrParameterContext),8)),this.NoSpaceBetweenEmptyInterfaceBraceBrackets=new e.Rule(e.RuleDescriptor.create1(13,14),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsObjectTypeContext),8)),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.Rule(e.RuleDescriptor.create3(22,e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),2)),this.NoSpaceAfterComma=new e.Rule(e.RuleDescriptor.create3(22,e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),8)),this.SpaceBeforeBinaryOperator=new e.Rule(e.RuleDescriptor.create4(e.Shared.TokenRange.Any,e.Shared.TokenRange.BinaryOperators),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),2)),this.SpaceAfterBinaryOperator=new e.Rule(e.RuleDescriptor.create4(e.Shared.TokenRange.BinaryOperators,e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),2)),this.NoSpaceBeforeBinaryOperator=new e.Rule(e.RuleDescriptor.create4(e.Shared.TokenRange.Any,e.Shared.TokenRange.BinaryOperators),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),8)),this.NoSpaceAfterBinaryOperator=new e.Rule(e.RuleDescriptor.create4(e.Shared.TokenRange.BinaryOperators,e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),8)),this.SpaceAfterKeywordInControl=new e.Rule(e.RuleDescriptor.create2(e.Shared.TokenRange.Keywords,15),e.RuleOperation.create2(new e.RuleOperationContext(t.IsControlDeclContext),2)),this.NoSpaceAfterKeywordInControl=new e.Rule(e.RuleDescriptor.create2(e.Shared.TokenRange.Keywords,15),e.RuleOperation.create2(new e.RuleOperationContext(t.IsControlDeclContext),8)),this.NewLineBeforeOpenBraceInFunction=new e.Rule(e.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange,13),e.RuleOperation.create2(new e.RuleOperationContext(t.IsFunctionDeclContext,t.IsBeforeMultilineBlockContext),4),1),this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock=new e.Rule(e.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange,13),e.RuleOperation.create2(new e.RuleOperationContext(t.IsTypeScriptDeclWithBlockContext,t.IsBeforeMultilineBlockContext),4),1),this.NewLineBeforeOpenBraceInControl=new e.Rule(e.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange,13),e.RuleOperation.create2(new e.RuleOperationContext(t.IsControlDeclContext,t.IsBeforeMultilineBlockContext),4),1),this.SpaceAfterSemicolonInFor=new e.Rule(e.RuleDescriptor.create3(21,e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsForContext),2)),this.NoSpaceAfterSemicolonInFor=new e.Rule(e.RuleDescriptor.create3(21,e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext,t.IsForContext),8)),this.SpaceAfterOpenParen=new e.Rule(e.RuleDescriptor.create3(15,e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),2)),this.SpaceBeforeCloseParen=new e.Rule(e.RuleDescriptor.create2(e.Shared.TokenRange.Any,16),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),2)),this.NoSpaceBetweenParens=new e.Rule(e.RuleDescriptor.create1(15,16),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),8)),this.NoSpaceAfterOpenParen=new e.Rule(e.RuleDescriptor.create3(15,e.Shared.TokenRange.Any),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),8)),this.NoSpaceBeforeCloseParen=new e.Rule(e.RuleDescriptor.create2(e.Shared.TokenRange.Any,16),e.RuleOperation.create2(new e.RuleOperationContext(t.IsSameLineTokenContext),8)),this.SpaceAfterAnonymousFunctionKeyword=new e.Rule(e.RuleDescriptor.create1(81,15),e.RuleOperation.create2(new e.RuleOperationContext(t.IsFunctionDeclContext),2)),this.NoSpaceAfterAnonymousFunctionKeyword=new e.Rule(e.RuleDescriptor.create1(81,15),e.RuleOperation.create2(new e.RuleOperationContext(t.IsFunctionDeclContext),8))}return t.prototype.getRuleName=function(e){var t=this;for(var n in t)if(t[n]===e)return n;throw new Error("Unknown rule")},t.IsForContext=function(e){return 170===e.contextNode.kind},t.IsNotForContext=function(e){return!t.IsForContext(e)},t.IsBinaryOpContext=function(e){switch(e.contextNode.kind){case 157:case 158:return!0;case 191:case 183:case 123:case 200:case 124:return 51===e.currentTokenSpan.kind||51===e.nextTokenSpan.kind;case 171:return 84===e.currentTokenSpan.kind||84===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 163:case 176:case 142:case 180:case 181:case 190:return!0}return!1},t.IsFunctionDeclContext=function(e){switch(e.contextNode.kind){case 184:case 125:case 127:case 128:case 129:case 150:case 126:case 151:case 186:return!0}return!1},t.IsTypeScriptDeclWithBlockContext=function(e){return t.NodeIsTypeScriptDeclWithBlockContext(e.contextNode)},t.NodeIsTypeScriptDeclWithBlockContext=function(e){switch(e.kind){case 185:case 186:case 188:case 136:case 189:return!0}return!1},t.IsAfterCodeBlockContext=function(e){switch(e.currentTokenParent.kind){case 185:case 189:case 188:case 163:case 180:case 197:case 181:case 190:case 176:return!0}return!1},t.IsControlDeclContext=function(e){switch(e.contextNode.kind){case 167:case 176:case 170:case 171:case 169:case 179:case 168:case 175:case 197:case 181:return!0;default:return!1
}},t.IsObjectContext=function(e){return 142===e.contextNode.kind},t.IsFunctionCallContext=function(e){return 145===e.contextNode.kind},t.IsNewContext=function(e){return 146===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 189===e.contextNode.kind},t.IsObjectTypeContext=function(e){return 136===e.contextNode.kind},t.IsTypeArgumentOrParameter=function(e,t){if(23!==e.kind&&24!==e.kind)return!1;switch(t.kind){case 132:case 185:case 186:case 184:case 150:case 151:case 125:case 129:case 130:case 145:case 146:return!0;default:return!1}},t.IsTypeArgumentOrParameterContext=function(e){return t.IsTypeArgumentOrParameter(e.currentTokenSpan,e.currentTokenParent)||t.IsTypeArgumentOrParameter(e.nextTokenSpan,e.nextTokenParent)},t.IsVoidOpContext=function(e){return 97===e.currentTokenSpan.kind&&154===e.currentTokenParent.kind},t}();e.Rules=t}(t=e.formatting||(e.formatting={}))}(ts||(ts={}));var ts;!function(e){var t;!function(t){var n=function(){function e(){this.map=[],this.mapRowLength=0}return e.create=function(t){var n=new e;return n.Initialize(t),n},e.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},e.prototype.FillRules=function(e,t){var n=this;e.forEach(function(e){n.FillRule(e,t)})},e.prototype.GetRuleBucketIndex=function(e,t){var n=e*this.mapRowLength+t;return n},e.prototype.FillRule=function(e,n){var r=this,i=e.Descriptor.LeftTokenRange!=t.Shared.TokenRange.Any&&e.Descriptor.RightTokenRange!=t.Shared.TokenRange.Any;e.Descriptor.LeftTokenRange.GetTokens().forEach(function(t){e.Descriptor.RightTokenRange.GetTokens().forEach(function(o){var s=r.GetRuleBucketIndex(t,o),c=r.map[s];void 0==c&&(c=r.map[s]=new a),c.AddRule(e,i,n,s)})})},e.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},e}();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,s=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<<t);r|=n<<t,this.rulesInsertionIndexBitmap=r},t}();t.RulesBucketConstructionState=s;var a=function(){function e(){this.rules=[]}return e.prototype.Rules=function(){return this.rules},e.prototype.AddRule=function(e,t,n,r){var i;i=1==e.Operation.Action?t?0:o.IgnoreRulesAny:e.Operation.Context.IsAny()?t?o.NoContextRulesSpecific:o.NoContextRulesAny:t?o.ContextRulesSpecific:o.ContextRulesAny;var a=n[r];void 0===a&&(a=n[r]=new s);var c=a.GetInsertionIndex(i);this.rules.splice(c,0,e),a.IncreaseInsertionIndex(i)},e}();t.RulesBucket=a}(t=e.formatting||(e.formatting={}))}(ts||(ts={}));var ts;!function(e){var t;!function(e){var t;!function(e){var t=function(){function e(e,t,n){this.tokens=[];for(var r=e;t>=r;r++)n.indexOf(r)<0&&this.tokens.push(r)}return e.prototype.GetTokens=function(){return this.tokens},e.prototype.Contains=function(e){return this.tokens.indexOf(e)>=0},e}();e.TokenRangeAccess=t;var n=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}();e.TokenValuesAccess=n;var r=function(){function e(e){this.token=e}return e.prototype.GetTokens=function(){return[this.token]},e.prototype.Contains=function(e){return e==this.token},e}();e.TokenSingleValueAccess=r;var i=function(){function e(){}return e.prototype.GetTokens=function(){for(var e=[],t=0;119>=t;t++)e.push(t);return e},e.prototype.Contains=function(){return!0},e.prototype.toString=function(){return"[allTokens]"},e}();e.TokenAllAccess=i;var o=function(){function e(e){this.tokenAccess=e}return e.FromToken=function(t){return new e(new r(t))},e.FromTokens=function(t){return new e(new n(t))},e.FromRange=function(n,r,i){return void 0===i&&(i=[]),new e(new t(n,r,i))},e.AllTokens=function(){return new e(new i)},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([3])),e.Keywords=e.FromRange(64,119),e.Operators=e.FromRange(21,62),e.BinaryOperators=e.FromRange(23,62),e.BinaryKeywordOperators=e.FromTokens([84,85]),e.ReservedKeywords=e.FromRange(100,108),e.UnaryPrefixOperators=e.FromTokens([37,38,46,45]),e.UnaryPrefixExpressions=e.FromTokens([6,63,15,17,13,91,86]),e.UnaryPreincrementExpressions=e.FromTokens([63,15,91,86]),e.UnaryPostincrementExpressions=e.FromTokens([63,16,18,86]),e.UnaryPredecrementExpressions=e.FromTokens([63,15,91,86]),e.UnaryPostdecrementExpressions=e.FromTokens([63,16,18,86]),e.Comments=e.FromTokens([2,3]),e.TypeNames=e.FromTokens([63,116,118,110,97,109]),e}();e.TokenRange=o}(t=e.Shared||(e.Shared={}))}(t=e.formatting||(e.formatting={}))}(ts||(ts={}));var ts;!function(e){var t;!function(t){var n=function(){function n(e){this.logger=e,this.globalRules=new t.Rules}return n.prototype.getRuleName=function(e){return this.globalRules.getRuleName(e)},n.prototype.getRuleByName=function(e){return this.globalRules[e]},n.prototype.getRulesMap=function(){return this.rulesMap},n.prototype.ensureUpToDate=function(n){if(null==this.options||!e.compareDataObjects(this.options,n)){var r=this.createActiveRules(n),i=t.RulesMap.create(r);this.activeRules=r,this.rulesMap=i,this.options=e.clone(n)}},n.prototype.createActiveRules=function(e){var t=this.globalRules.HighPriorityCommonRules.slice(0);return e.InsertSpaceAfterCommaDelimiter?t.push(this.globalRules.SpaceAfterComma):t.push(this.globalRules.NoSpaceAfterComma),e.InsertSpaceAfterFunctionKeywordForAnonymousFunctions?t.push(this.globalRules.SpaceAfterAnonymousFunctionKeyword):t.push(this.globalRules.NoSpaceAfterAnonymousFunctionKeyword),e.InsertSpaceAfterKeywordsInControlFlowStatements?t.push(this.globalRules.SpaceAfterKeywordInControl):t.push(this.globalRules.NoSpaceAfterKeywordInControl),e.InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?(t.push(this.globalRules.SpaceAfterOpenParen),t.push(this.globalRules.SpaceBeforeCloseParen),t.push(this.globalRules.NoSpaceBetweenParens)):(t.push(this.globalRules.NoSpaceAfterOpenParen),t.push(this.globalRules.NoSpaceBeforeCloseParen),t.push(this.globalRules.NoSpaceBetweenParens)),e.InsertSpaceAfterSemicolonInForStatements?t.push(this.globalRules.SpaceAfterSemicolonInFor):t.push(this.globalRules.NoSpaceAfterSemicolonInFor),e.InsertSpaceBeforeAndAfterBinaryOperators?(t.push(this.globalRules.SpaceBeforeBinaryOperator),t.push(this.globalRules.SpaceAfterBinaryOperator)):(t.push(this.globalRules.NoSpaceBeforeBinaryOperator),t.push(this.globalRules.NoSpaceAfterBinaryOperator)),e.PlaceOpenBraceOnNewLineForControlBlocks&&t.push(this.globalRules.NewLineBeforeOpenBraceInControl),e.PlaceOpenBraceOnNewLineForFunctions&&(t.push(this.globalRules.NewLineBeforeOpenBraceInFunction),t.push(this.globalRules.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock)),t=t.concat(this.globalRules.LowPriorityCommonRules)},n}();t.RulesProvider=n}(t=e.formatting||(e.formatting={}))}(ts||(ts={}));var ts;!function(e){var t;!function(t){function n(t,n,r,i){var o=n.getLineAndCharacterFromPosition(t).line;e.Debug.assert(o>=2);var s={pos:e.getStartPositionOfLine(o-1,n),end:e.getEndLinePosition(o,n)+1};return m(s,n,i,r,2)}function r(e,t,n,r){return a(e,21,t,r,n,3)}function i(e,t,n,r){return a(e,14,t,r,n,4)}function o(e,t,n){var r={pos:0,end:e.text.length};return m(r,e,n,t,0)}function s(t,n,r,i,o){var s={pos:e.getStartLinePositionForPosition(t,r),end:n};return m(s,r,o,i,1)}function a(t,n,r,i,o,s){var a=c(t,n,r);if(!a)return[];var l={pos:e.getStartLinePositionForPosition(a.getStart(r),r),end:a.end};return m(l,r,i,o,s)}function c(t,n,r){var i=e.findPrecedingToken(t,r);if(!i||i.kind!==n)return void 0;for(var o=i;o&&o.parent&&o.parent.end===i.end&&!l(o.parent,o);)o=o.parent;return o}function l(t,n){switch(t.kind){case 185:case 186:return e.rangeContainsRange(t.members,n);case 189:var r=t.body;return r&&163===r.kind&&e.rangeContainsRange(r.statements,n);case 201:case 163:case 180:case 181:case 190:return e.rangeContainsRange(t.statements,n);case 197:return e.rangeContainsRange(t.block.statements,n)}return!1}function u(t,n){function r(i){var o=e.forEachChild(i,function(r){return e.startEndContainsRange(r.getStart(n),r.end,t)&&r});if(o){var s=r(o);if(s)return s}return i}return r(n)}function p(t,n){function r(){return!1}if(!t.length)return r;var i=t.filter(function(t){return e.rangeOverlapsWithStartEnd(n,t.start,t.start+t.length)}).sort(function(e,t){return e.start-t.start});if(!i.length)return r;var o=0;return function(t){for(;;){if(o>=i.length)return!1;var n=i[o];if(t.end<=n.start)return!1;if(e.startEndOverlapsWithStartEnd(t.pos,t.end,n.start,n.start+n.length))return!0;o++}}}function d(t,n,r){var i=t.getStart(r);if(i===n.pos&&t.end===n.end)return i;var o=e.findPrecedingToken(n.pos,r);return o?o.end:t.pos}function h(e,n,r){for(var i=-1,o=0;e;){var s=r.getLineAndCharacterFromPosition(e.getStart(r)).line;if(-1!==i&&s!==i)break;if(t.SmartIndenter.shouldIndentChildNode(e.kind,o))return n.IndentSize;i=s,o=e.kind,e=e.parent}return 0}function m(n,r,i,o,s){function a(n,o,s,a,c){if(e.rangeOverlapsWithStartEnd(a,n,o)){if(-1!==c)return c}else{var l=r.getLineAndCharacterFromPosition(n).line,u=e.getStartLinePositionForPosition(n,r),p=t.SmartIndenter.findFirstNonWhitespaceColumn(u,n,r,i);if(l!==s||n===p)return p}return-1}function c(e,n,o,s,a,c){var l=o;-1===l&&(l=f(e.kind)?f(s.kind)||201===s.kind||194===s.kind||195===s.kind?a.getIndentation()+a.getDelta():a.getIndentation():t.SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(s,e,n,r)?a.getIndentation():a.getIndentation()+a.getDelta());var u=t.SmartIndenter.shouldIndentChildNode(e.kind,0)?i.IndentSize:0;return c===n&&(l=a.getIndentation(),u=Math.min(i.IndentSize,a.getDelta()+u)),{indentation:l,delta:u}}function l(e,n,r,o){return{getIndentationForComment:function(e){switch(e){case 14:case 18:return r+o}return r},getIndentationForToken:function(e,t){switch(t){case 13:case 14:case 17:case 18:case 74:case 98:return r;default:return n!==e?r+o:r}},getIndentation:function(){return r},getDelta:function(){return o},recomputeIndentation:function(n){e.parent&&t.SmartIndenter.shouldIndentChildNode(e.parent.kind,e.kind)&&(n?r+=i.IndentSize:r-=i.IndentSize,o=t.SmartIndenter.shouldIndentChildNode(e.kind,0)?i.IndentSize:0)}}}function m(t,i,o,s,u){function p(i,o,s,l,u,p){var d=i.getStart(r),f=r.getLineAndCharacterFromPosition(d),g=-1;if(p&&(g=a(d,i.end,u,n,o),-1!==g&&(o=g)),!e.rangeOverlapsWithStartEnd(n,i.pos,i.end))return o;if(0===i.getFullWidth())return o;for(;D.isOnToken();){var v=D.readTokenInfo(t);if(v.token.end>d)break;h(v,t,l)}if(!D.isOnToken())return o;if(e.isToken(i)){var v=D.readTokenInfo(i);return e.Debug.assert(v.token.end===i.end),h(v,t,l),o}var _=c(i,f.line,g,t,l,u);return m(i,y,f.line,_.indentation,_.delta),y=t,o}function d(e,n,i,o){var s=g(n,e),a=v(s),u=o,d=i;if(0!==s)for(;D.isOnToken();){var m=D.readTokenInfo(n);if(m.token.end>e.pos)break;if(m.token.kind===s){d=r.getLineAndCharacterFromPosition(m.token.pos).line;var f=c(m.token,d,-1,n,o,d);u=l(n,i,f.indentation,f.delta),h(m,n,u)}else h(m,n,o)}for(var y=-1,_=0,b=e.length;b>_;++_)y=p(e[_],y,t,u,d,!0);if(0!==a&&D.isOnToken()){var m=D.readTokenInfo(n);m.token.kind===a&&h(m,n,u)}}function h(t,i,o){e.Debug.assert(e.rangeContainsRange(i,t.token));var s=D.lastTrailingTriviaWasNewLine(),a=!1;t.leadingTrivia&&_(t.leadingTrivia,i,y,o);var c,l=e.rangeContainsRange(n,t.token),u=r.getLineAndCharacterFromPosition(t.token.pos);if(l){var p=O(t.token),d=P;c=b(t.token,u,i,y,o),a=p?!1:void 0!==c?c:s&&u.line!==d}if(t.trailingTrivia&&_(t.trailingTrivia,i,y,o),a){var h=!0;if(t.leadingTrivia)for(var m=0,f=t.leadingTrivia.length;f>m;++m){var g=t.leadingTrivia[m];if(e.rangeContainsRange(n,g)){{r.getLineAndCharacterFromPosition(g.pos).line}switch(g.kind){case 3:var v=o.getIndentationForComment(t.token.kind);S(g,v,!h),h=!1;break;case 2:if(h){var v=o.getIndentationForComment(t.token.kind);E(g.pos,v,!1),h=!1}break;case 4:h=!0}}}if(l&&!O(t.token)){var T=o.getIndentationForToken(u.line,t.token.kind);E(t.token.pos,T,c)}}D.advance(),y=i}if(e.rangeOverlapsWithStartEnd(n,t.getStart(r),t.getEnd())){var f=l(t,o,s,u),y=i;for(e.forEachChild(t,function(e){p(e,-1,t,f,o,!1)},function(e){d(e,t,o,f)});D.isOnToken();){var T=D.readTokenInfo(t);if(T.token.end>t.end)break;h(T,t,f)}}}function _(t,i,o,s){for(var a=0,c=t.length;c>a;++a){var l=t[a];if(e.isComment(l.kind)&&e.rangeContainsRange(n,l)){var u=r.getLineAndCharacterFromPosition(l.pos);b(l,u,i,o,s)}}}function b(e,t,i,o,s){var a,c=O(e);if(!c&&!A)if(N)a=T(e,t.line,i,N,P,M,o,s);else{var l=r.getLineAndCharacterFromPosition(n.pos);C(l.line,t.line)}return N=e,M=i,P=t.line,A=c,a}function T(e,t,n,i,s,a,c,l){I.updateContext(i,a,e,n,c);var u,p,d=o.getRulesMap().GetRule(I);return d?(L(d,i,s,e,t),10&d.Operation.Action&&t!==s?(p=!1,n.getStart(r)===e.pos&&l.recomputeIndentation(!1)):4&d.Operation.Action&&t===s&&(p=!0,n.getStart(r)===e.pos&&l.recomputeIndentation(!0)),u=6&d.Operation.Action&&1!==d.Flag):u=!0,t!==s&&u&&C(s,t,i),p}function E(t,n,o){var s=y(n,i);if(o)w(t,0,s);else{var a=r.getLineAndCharacterFromPosition(t);if(n!==a.character-1){var c=e.getStartPositionOfLine(a.line,r);w(c,a.character-1,s)}}}function S(n,o,s){var a=r.getLineAndCharacterFromPosition(n.pos).line,c=r.getLineAndCharacterFromPosition(n.end).line;if(a===c)return s||E(n.pos,o,!1),void 0;for(var l=[],u=n.pos,p=a;c>p;++p){var d=e.getEndLinePosition(p,r);l.push({pos:u,end:d}),u=e.getStartPositionOfLine(p+1,r)}l.push({pos:u,end:n.end});var h=e.getStartPositionOfLine(a,r),m=t.SmartIndenter.findFirstNonWhitespaceColumn(h,l[0].pos,r,i);if(o!==m){var f=0;s&&(f=1,a++);for(var g=o-m,v=f,_=l.length;_>v;++v,++a){var h=e.getStartPositionOfLine(a,r),b=0===v?m:t.SmartIndenter.findFirstNonWhitespaceColumn(l[v].pos,l[v].end,r,i),T=b+g;if(T>0){var S=y(T,i);w(h,b,S)}else x(h,b)}}}function C(t,n,i){for(var o=t;n>o;++o){var s=e.getStartPositionOfLine(o,r),a=e.getEndLinePosition(o,r);if(!(i&&e.isComment(i.kind)&&i.pos<=a&&i.end>a)){for(var c=a;c>=s&&e.isWhiteSpace(r.text.charCodeAt(c));)c--;c!==a&&(e.Debug.assert(c===s||!e.isWhiteSpace(r.text.charCodeAt(c))),x(c+1,a-c))}}}function k(t,n,r){return{span:new e.TextSpan(t,n),newText:r}}function x(e,t){t&&F.push(k(e,t,""))}function w(e,t,n){(t||n)&&F.push(k(e,t,n))}function L(e,t,n,o,s){switch(e.Operation.Action){case 1:return;case 8:t.end!==o.pos&&x(t.end,o.pos-t.end);break;case 4:if(1!==e.Flag&&n!==s)return;var a=s-n;1!==a&&w(t.end,o.pos-t.end,i.NewLineCharacter);break;case 2:if(1!==e.Flag&&n!==s)return;var c=o.pos-t.end;(1!==c||32!==r.text.charCodeAt(t.end))&&w(t.end,o.pos-t.end," ")}}var A,N,M,P,O=p(r.parseDiagnostics,n),I=new t.FormattingContext(r,s),R=u(n,r),D=t.getFormattingScanner(r,d(R,n,r),n.end),V=t.SmartIndenter.getIndentationForNode(R,n,r,i),F=[];if(D.advance(),D.isOnToken()){var H=r.getLineAndCharacterFromPosition(R.getStart(r)).line,B=h(R,i,r);m(R,R,H,V,B)}return D.close(),F}function f(e){switch(e){case 163:case 163:case 180:case 181:case 190:return!0}return!1}function g(e,t){switch(e.kind){case 126:case 184:case 150:case 125:case 151:if(e.typeParameters===t)return 23;if(e.parameters===t)return 15;break;case 145:case 146:if(e.typeArguments===t)return 23;if(e.arguments===t)return 15;break;case 132:if(e.typeArguments===t)return 23}return 0}function v(e){switch(e){case 15:return 16;case 23:return 24}return 0}function y(e,t){function n(e,t){for(var n="",r=0;t>r;++r)n+=e;return n}if(t.ConvertTabsToSpaces){var r,i=Math.floor(e/t.IndentSize),o=e%t.IndentSize;return T||(T=[]),void 0===T[i]?(r=n(" ",t.IndentSize*i),T[i]=r):r=T[i],o?r+n(" ",o):r}var s,a=Math.floor(e/t.TabSize),c=e-a*t.TabSize;return b||(b=[]),void 0===b[a]?b[a]=s=n("	",a):s=b[a],c?s+n(" ",c):s}var _;!function(e){e[e.Unknown=-1]="Unknown"}(_||(_={})),t.formatOnEnter=n,t.formatOnSemicolon=r,t.formatOnClosingCurly=i,t.formatDocument=o,t.formatSelection=s;var b,T;t.getIndentationString=y}(t=e.formatting||(e.formatting={}))}(ts||(ts={}));var ts;!function(e){var t;!function(t){var n;!function(t){function n(t,n,r){if(t>n.text.length)return 0;var o=e.findPrecedingToken(t,n);if(!o)return 0;if((7===o.kind||8===o.kind)&&o.getStart(n)<=t&&o.end>t)return 0;var a=n.getLineAndCharacterFromPosition(t).line;if(22===o.kind&&157!==o.parent.kind){var p=s(o,n,r);if(-1!==p)return p}for(var d,m,f,g=o;g;){if(u(g,t,n)&&y(g.kind,d?d.kind:0)){m=l(g,n),f=c(o,g,a,n)?0:a!==m.line?r.IndentSize:0;break}var p=h(g,n,r);if(-1!==p)return p;d=g,g=g.parent}return g?i(g,m,void 0,f,n,r):0}function r(e,t,n,r){var o=n.getLineAndCharacterFromPosition(e.getStart(n));return i(e,o,t,0,n,r)}function i(e,t,n,r,i,s){for(var c,l=e.parent;l;){var u=!0;if(n){var d=e.getStart(i);u=d<n.pos||d>n.end}if(u){var m=h(e,i,s);if(-1!==m)return m+r}c=o(l,e,i);var f=c.line===t.line||p(l,e,t.line,i);if(u){var m=a(e,l,t,f,i,s);if(-1!==m)return m+r}y(l.kind,e.kind)&&!f&&(r+=s.IndentSize),e=l,t=c,l=e.parent}return r}function o(e,t,n){var r=d(t,n);return r?n.getLineAndCharacterFromPosition(r.pos):n.getLineAndCharacterFromPosition(e.getStart(n))}function s(t,n,r){var i=e.findListItemInfo(t);return e.Debug.assert(i&&i.listItemIndex>0),m(i.list.getChildren(),i.listItemIndex-1,n,r)}function a(t,n,r,i,o,s){var a=(e.isDeclaration(t)||e.isStatement(t))&&(201===n.kind||!i);return a?f(r,o,s):-1}function c(t,n,r,i){var o=e.findNextToken(t,n);if(!o)return!1;if(13===o.kind)return!0;if(14===o.kind){var s=l(o,i).line;return r===s}return!1}function l(e,t){return t.getLineAndCharacterFromPosition(e.getStart(t))}function u(e,t,n){return e.end>t||!b(e,n)}function p(t,n,r,i){if(167===t.kind&&t.elseStatement===n){var o=e.findChildOfKind(t,74,i);e.Debug.assert(void 0!==o);var s=l(o,i).line;return s===r}return!1}function d(t,n){if(t.parent)switch(t.parent.kind){case 132:if(t.parent.typeArguments&&e.rangeContainsStartEnd(t.parent.typeArguments,t.getStart(n),t.getEnd()))return t.parent.typeArguments;break;case 142:return t.parent.properties;case 141:return t.parent.elements;case 184:case 150:case 151:case 125:case 129:case 130:var r=t.getStart(n);if(t.parent.typeParameters&&e.rangeContainsStartEnd(t.parent.typeParameters,r,t.getEnd()))return t.parent.typeParameters;if(e.rangeContainsStartEnd(t.parent.parameters,r,t.getEnd()))return t.parent.parameters;break;case 146:case 145:var r=t.getStart(n);if(t.parent.typeArguments&&e.rangeContainsStartEnd(t.parent.typeArguments,r,t.getEnd()))return t.parent.typeArguments;if(t.parent.arguments&&e.rangeContainsStartEnd(t.parent.arguments,r,t.getEnd()))return t.parent.arguments}return void 0}function h(t,n,r){function i(i){var o=e.indexOf(i,t);return-1!==o?m(i,o,n,r):-1}var o=d(t,n);return o?i(o):-1}function m(t,n,r,i){e.Debug.assert(n>=0&&n<t.length);for(var o=t[n],s=l(o,r),a=n-1;a>=0;--a)if(22!==t[a].kind){var c=r.getLineAndCharacterFromPosition(t[a].end).line;if(c!==s.line)return f(s,r,i);s=l(t[a],r)}return-1}function f(e,t,n){var r=t.getPositionFromLineAndCharacter(e.line,1);return g(r,r+e.character,t,n)}function g(t,n,r,i){for(var o=0,s=t;n>s;++s){var a=r.text.charCodeAt(s);if(!e.isWhiteSpace(a))return o;9===a?o+=i.TabSize+o%i.TabSize:o++}return o}function v(e){switch(e){case 185:case 186:case 188:case 141:case 163:case 180:case 181:case 190:case 142:case 136:case 176:case 195:case 194:case 149:case 145:case 146:case 164:case 183:case 192:case 174:case 158:return!0}return!1}function y(e,t){if(v(e))return!0;switch(e){case 168:case 169:case 171:case 170:case 167:case 184:case 150:case 125:case 151:case 126:case 127:case 128:return 163!==t;default:return!1}}function _(e,t,n){var r=e.getChildren(n);if(r.length){var i=r[r.length-1];if(i.kind===t)return!0;if(21===i.kind&&1!==r.length)return r[r.length-2].kind===t}return!1}function b(t,n){if(0===t.getFullWidth())return!1;switch(t.kind){case 185:case 186:case 188:case 142:case 163:case 181:case 190:case 176:return _(t,14,n);case 197:return b(t.block,n);case 149:case 129:case 145:case 130:return _(t,16,n);case 184:case 150:case 125:case 151:return!t.body||b(t.body,n);case 189:return t.body&&b(t.body,n);case 167:return t.elseStatement?b(t.elseStatement,n):b(t.thenStatement,n);case 166:return b(t.expression,n);case 141:return _(t,18,n);case 194:case 195:return!1;case 169:return b(t.statement,n);case 168:var r=e.findChildOfKind(t,98,n);return r?_(t,16,n):b(t.statement,n);default:return!0}}t.getIndentation=n,t.getIndentationForNode=r,t.childStartsOnTheSameLineWithElseInIfStatement=p,t.findFirstNonWhitespaceColumn=g,t.shouldIndentChildNode=y}(n=t.SmartIndenter||(t.SmartIndenter={}))}(t=e.formatting||(e.formatting={}))}(ts||(ts={}));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},ts;!function(e){function t(t,n,r,i,o){var s=new(e.getNodeConstructor(t));return s.pos=n,s.end=r,s.flags=i,s.parent=o,s}function n(t,n,r){function i(){function i(t,n){return e.map(e.getJsDocComments(t,n),function(e){return{pos:e.pos+"/*".length,end:e.end-"*/".length}})}function o(t,n,r,i){for(void 0!==i&&(n=Math.min(n,t+i));n>t;t++){var o=r.text.charCodeAt(t);if(!e.isWhiteSpace(o)||e.isLineBreak(o))return t}return n}function s(t,n,r){for(;n>t&&e.isLineBreak(r.text.charCodeAt(t));)t++;return t}function a(t,n,r,i){return t+i.length<n&&r.text.substr(t,i.length)===i&&(e.isWhiteSpace(r.text.charCodeAt(t+i.length))||e.isLineBreak(r.text.charCodeAt(t+i.length)))}function c(e,t,n){return a(e,t,n,d)}function l(t,n,r){for(;r--;)t.push(e.textPart(""));t.push(e.textPart(n))}function u(t,n,r){for(var i,a=[],u=0,p=!1;n>t;){var h="";if(t=o(t,n,r),n>t&&42===r.text.charCodeAt(t)){var m=t+1;t=o(t+1,n,r,i),void 0===i&&n>t&&!e.isLineBreak(r.text.charCodeAt(t))&&(i=t-m)}else void 0===i&&(i=0);for(;n>t&&!e.isLineBreak(r.text.charCodeAt(t));){var f=r.text.charAt(t);if("@"===f){if(c(t,n,r)){p=!0,t+=d.length;continue}p=!1}p||(h+=f),t++}t=s(t,n,r),h?(l(a,h,u),u=0):!p&&a.length&&u++}return a}function p(t,r,i){function u(t){for(;r>t&&e.isWhiteSpace(i.text.charCodeAt(t));)t++;return t}function p(e){if(t=s(t,r,i),!(t>=r)){void 0===h&&(h=i.getLineAndCharacterFromPosition(e).character-1);var n=t;if(t=o(t,r,i,h),!(t>=r)){var a=t-n;if(h>a){var c=i.text.charCodeAt(t);42===c&&(t=o(t+1,r,i,h-a-1))}}}}for(var h,m=[];r>t;){if(c(t,r,i)){var f=0,g=!1;if(t=u(t+d.length),t>=r)break;if(123===i.text.charCodeAt(t)){t++;for(var v=1;r>t;t++){var y=i.text.charCodeAt(t);if(123!==y){if(125!==y){if(64===y)break}else if(v--,0===v){t++;break}}else v++}if(t=u(t),t>=r)break}if(a(t,r,i,n)){if(t=u(t+n.length),t>=r)break;for(var _="",b=t;r>t;){var T=i.text.charCodeAt(t);if(e.isLineBreak(T))_?(l(m,_,f),_="",f=0,g=!0):g&&f++,p(b);else{if(64===T)break;_+=i.text.charAt(t),t++}}_&&l(m,_,f),h=void 0}if(64===i.text.charCodeAt(t))continue}t++}return m}var d="@param",h=[];return e.forEach(t,function(t){var n=e.getSourceFileOfNode(t);if(r&&123===t.kind&&e.forEach(i(t.parent,n),function(e){var t=p(e.pos,e.end,n);t&&h.push.apply(h,t)}),189!==t.kind||189!==t.body.kind){for(;189===t.kind&&189===t.parent.kind;)t=t.parent;e.forEach(i(183===t.kind?t.parent:t,n),function(e){var t=u(e.pos,e.end,n);t&&h.push.apply(h,t)})}}),h}var o=[],s=i();return e.forEach(s,function(t){o.length&&o.push(e.lineBreakPart()),o.push(t)}),o}function r(t){return t?e.map(t,function(e){return e.text}).join(""):""}function i(t){return t.parent?!1:e.forEach(t.declarations,function(t){if(150===t.kind)return!0;if(183!==t.kind&&184!==t.kind)return!1;for(var n=t.parent;!e.isFunctionBlock(n);n=n.parent)if(201===n.kind||190===n.kind)return!1;return!0})}function o(){return{target:2,module:0}}function s(e,t,n,r,i){return I.createSourceFileObject(e,t,n.target,r,i)}function a(){function t(e){return"_"+e.target}function n(n,r){var i=t(n),o=e.lookUp(c,i);return!o&&r&&(c[i]=o={}),o}function r(){var t=Object.keys(c).filter(function(e){return e&&"_"===e.charAt(0)}).map(function(t){var n=e.lookUp(c,t),r=[];for(var i in n){var o=n[i];r.push({name:i,refCount:o.refCount,references:o.owners.slice(0)})}return r.sort(function(e,t){return t.refCount-e.refCount}),{bucket:t,sourceFiles:r}});return JSON.stringify(t,null,2)}function i(t,r,i,o,a){var c=n(r,!0),l=e.lookUp(c,t);if(!l){var u=s(t,i,r,o,a);c[t]=l={sourceFile:u,refCount:0,owners:[]}}return l.refCount++,l.sourceFile}function o(t,r,i,o,s,a,c){var l=n(i,!1);e.Debug.assert(void 0!==l);var u=e.lookUp(l,r);return e.Debug.assert(void 0!==u),u.sourceFile.isOpen===a&&u.sourceFile.version===s?u.sourceFile:(u.sourceFile=u.sourceFile.update(o,s,a,c),u.sourceFile)}function a(t,r){var i=n(r,!1);e.Debug.assert(void 0!==i);var o=e.lookUp(i,t);o.refCount--,e.Debug.assert(o.refCount>=0),0===o.refCount&&delete i[t]}var c={};return{acquireDocument:i,updateDocument:o,releaseDocument:a,reportStats:r}}function c(t,n){function r(){var n=e.getLeadingCommentRanges(t,0);e.forEach(n,function(n){var r=t.substring(n.pos,n.end),i=e.getFileReferenceFromReferencePath(r,n);if(i){a=i.isNoDefaultLib;var s=i.fileReference;s&&o.push(s)}})}function i(){L.setText(t);for(var e=L.scan();1!==e;){if(83===e&&(e=L.scan(),63===e&&(e=L.scan(),51===e&&(e=L.scan(),115===e&&(e=L.scan(),15===e&&(e=L.scan(),7===e)))))){var n=L.getTokenValue(),r=L.getTokenPos();s.push({filename:n,pos:r,end:r+n.length})}e=L.scan()}L.setText(void 0)}void 0===n&&(n=!0);var o=[],s=[],a=!1;return n&&i(),r(),{referencedFiles:o,importedFiles:s,isLibFile:a}}function l(e,t){for(;e;){if(177===e.kind&&e.label.text===t)return e.label;e=e.parent}return void 0}function u(e){return 63===e.kind&&(173===e.parent.kind||172===e.parent.kind)&&e.parent.label===e}function p(e){return 63===e.kind&&177===e.parent.kind&&e.parent.label===e}function d(e,t){for(var n=e.parent;177===n.kind;n=n.parent)if(n.label.text===t)return!0;return!1}function h(e){return p(e)||u(e)}function m(e){return 120===e.parent.kind&&e.parent.right===e}function f(e){return e&&e.parent&&143===e.parent.kind&&e.parent.name===e}function g(e){return f(e)&&(e=e.parent),e&&e.parent&&145===e.parent.kind&&e.parent.expression===e}function v(e){return f(e)&&(e=e.parent),e&&e.parent&&146===e.parent.kind&&e.parent.expression===e}function y(e){return 189===e.parent.kind&&e.parent.name===e}function _(t){return 63===t.kind&&e.isAnyFunction(t.parent)&&t.parent.name===t}function b(e){return!(63!==e.kind&&7!==e.kind&&6!==e.kind||198!==e.parent.kind&&199!==e.parent.kind||e.parent.name!==e)}function T(e){if(7===e.kind||6===e.kind)switch(e.parent.kind){case 124:case 198:case 200:case 125:case 127:case 128:case 189:return e.parent.name===e;case 144:return e.parent.argumentExpression===e}return!1}function E(t){return 7===t.kind?y(t)||e.isExternalModuleImportDeclaration(t.parent.parent)&&e.getExternalModuleImportDeclarationExpression(t.parent.parent)===t:!1}function S(t,n,r){function i(n){return e.forEach(n,function(e){if(e.pos<r&&r<e.end)return!0;if(r===e.end){var n=t.text,i=e.end-e.pos;return 2>=i||47===n.charCodeAt(e.pos+1)?!0:!(47===n.charCodeAt(e.end-1)&&42===n.charCodeAt(e.end-2))}return!1})}return r<=n.getStart(t)&&(i(e.getTrailingCommentRanges(t.text,n.getFullStart()))||i(e.getLeadingCommentRanges(t.text,n.getFullStart())))}function C(t,n){function r(e){return Rt?e:e.toLowerCase()}function o(t){return e.lookUp(Dt,r(t))}function s(){return Pt||(Pt=Nt.getTypeChecker(!0))}function a(n){return Lt||(Lt=new e.formatting.RulesProvider(t)),Lt.ensureUpToDate(n),Lt}function c(){return{getSourceFile:function(e){var t=o(e);return t&&t.getSourceFile()},getCancellationToken:function(){return Vt},getCanonicalFileName:function(e){return Rt?e:e.toLowerCase()},useCaseSensitiveFileNames:function(){return Rt},getNewLine:function(){return"\r\n"},getDefaultLibFilename:function(e){return t.getDefaultLibFilename(e)},writeFile:function(e,t,n){Ft(e,t,n)},getCurrentDirectory:function(){return t.getCurrentDirectory()}}}function p(e){return e&&e.version===At.getVersion(e.filename)&&e.isOpen===At.isOpen(e.filename)}function C(){if(!Nt)return!1;var t=At.getFilenames();if(Nt.getSourceFiles().length!==t.length)return!1;for(var n=0,r=t.length;r>n;n++)if(!p(Nt.getSourceFile(t[n])))return!1;return e.compareDataObjects(Nt.getCompilerOptions(),At.compilationSettings())}function k(){if(At=new W(t),!C()){var i=At.compilationSettings(),s=Nt;if(s)for(var a=Nt.getCompilerOptions(),l=a.target!==i.target||a.module!==i.module,u=a&&i&&!e.compareDataObjects(a,i)&&l,d=Nt.getSourceFiles(),h=0,m=d.length;m>h;h++){Vt.throwIfCancellationRequested();var f=d[h].filename;(!At.contains(f)||u)&&(n.releaseDocument(f,a),delete Dt[r(f)])}for(var g=At.getFilenames(),h=0,m=g.length;m>h;h++){var f=g[h],v=At.getVersion(f),y=At.isOpen(f),_=At.getScriptSnapshot(f),b=o(f);if(b){if(p(b))continue;var T=null;b.isOpen&&y&&(T=At.getChangeRange(f,b.version,b.getScriptSnapshot())),b=n.updateDocument(b,f,i,_,v,y,T)}else b=n.acquireDocument(f,i,_,v,y);Dt[r(f)]=b}Nt=e.createProgram(g,i,c()),Mt=Nt.getTypeChecker(!1),Pt=void 0}}function x(){Nt&&(Mt=Nt.getTypeChecker(!1),Pt=void 0)}function w(){Nt&&e.forEach(Nt.getSourceFiles(),function(e){n.releaseDocument(e.filename,Nt.getCompilerOptions())})}function L(t){return k(),t=e.normalizeSlashes(t),Nt.getDiagnostics(o(t))}function A(t){k(),t=e.normalizeSlashes(t);var n=Nt.getCompilerOptions(),r=s(),i=o(t),a=r.getDiagnostics(i);return n.declaration&&(a=a.concat(r.getDeclarationDiagnostics(i))),a}function N(){return k(),Nt.getGlobalDiagnostics()}function M(t,n){var r=t.getName();if(r&&r.length>0){var i=r.charCodeAt(0);if(1536&t.flags&&(39===i||34===i))return void 0;r&&r.length>=2&&i===r.charCodeAt(r.length-1)&&(39===i||34===i)&&(r=r.substring(1,r.length-1));for(var o=e.isIdentifierStart(r.charCodeAt(0),n),s=1,a=r.length;o&&a>s;s++)o=e.isIdentifierPart(r.charCodeAt(s),n);if(o)return e.unescapeIdentifier(r)}return void 0}function P(e,t,n){var r=M(e,Nt.getCompilerOptions().target);return r?{name:r,kind:V(e,t,n),kindModifiers:q(e)}:void 0}function O(n,r){function i(n,r){var i=(new Date).getTime();e.forEach(n,function(t){var n=P(t,r.typeChecker,T);if(n){var i=e.escapeIdentifier(n.name);e.lookUp(r.symbols,i)||(r.entries.push(n),r.symbols[i]=t)}}),t.log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: "+((new Date).getTime()-i))}function s(e){var n=(new Date).getTime(),r=a(e)||u(e)||p(e);return t.log("getCompletionsAtPosition: isCompletionListBlocker: "+((new Date).getTime()-n)),r}function a(t){if(7===t.kind||8===t.kind||e.isTemplateLiteralKind(t.kind)){var n=t.getStart(),i=t.getEnd();if(r>n&&i>r)return!0;if(r===i)return!!t.isUnterminated}return!1}function c(e){if(e){var t=e.parent;switch(e.kind){case 13:case 22:if(t&&142===t.kind)return t}}return void 0}function l(e){switch(e){case 150:case 151:case 184:case 125:case 126:case 127:case 128:case 129:case 130:case 131:return!0}return!1}function u(e){if(e){var t=e.parent.kind;switch(e.kind){case 22:return 183===t||164===t||188===t||l(t);case 15:return 197===t||l(t);case 13:return 188===t||186===t;case 21:return 124===t&&186===e.parent.parent.kind;
case 106:case 104:case 107:case 20:return 123===t;case 67:case 114:case 75:case 101:case 81:case 96:case 113:case 117:case 83:return!0}switch(e.getText()){case"class":case"interface":case"enum":case"module":case"function":case"var":return!0}}return!1}function p(e){if(e&&6===e.kind){var t=e.getFullText();return"."===t.charAt(t.length-1)}return!1}function d(t,n){if(!n||0===n.length)return t;var i={};e.forEach(n,function(e){(198===e.kind||199===e.kind)&&(e.getStart()<=r&&r<=e.getEnd()||(i[e.name.text]=!0))});var o=[];return e.forEach(t,function(e){i[e.name]||o.push(e)}),o}k(),n=e.normalizeSlashes(n);var h=(new Date).getTime(),m=o(n),f=(new Date).getTime(),g=e.getTokenAtPosition(m,r);t.log("getCompletionsAtPosition: Get current token: "+((new Date).getTime()-f));var f=(new Date).getTime(),v=S(m,g,r);if(t.log("getCompletionsAtPosition: Is inside comment: "+((new Date).getTime()-f)),v)return t.log("Returning an empty list because completion was inside a comment."),void 0;var f=(new Date).getTime(),y=e.findPrecedingToken(r,m);if(t.log("getCompletionsAtPosition: Get previous token 1: "+((new Date).getTime()-f)),y&&r<=y.end&&63===y.kind){var f=(new Date).getTime();y=e.findPrecedingToken(y.pos,m),t.log("getCompletionsAtPosition: Get previous token 2: "+((new Date).getTime()-f))}if(y&&s(y))return t.log("Returning an empty list because completion was requested in an invalid position."),void 0;var _,b;y&&19===y.kind&&143===y.parent.kind?(_=y.parent.expression,b=!0):y&&19===y.kind&&120===y.parent.kind?(_=y.parent.left,b=!0):(_=g,b=!1),Ot={filename:n,position:r,entries:[],symbols:{},typeChecker:Mt},t.log("getCompletionsAtPosition: Syntactic work: "+((new Date).getTime()-h));var T=e.getTouchingPropertyName(m,r),E=(new Date).getTime();if(b){var C=[],x=!0;if(63===_.kind||120===_.kind||143===_.kind){var w=Mt.getSymbolAtLocation(_);w&&33554432&w.flags&&(w=Mt.getAliasedSymbol(w)),w&&1952&w.flags&&e.forEachValue(w.exports,function(e){Mt.isValidPropertyAccess(_.parent,e.name)&&C.push(e)})}var L=Mt.getTypeAtLocation(_);L&&e.forEach(L.getApparentProperties(),function(e){Mt.isValidPropertyAccess(_.parent,e.name)&&C.push(e)}),i(C,Ot)}else{var A=c(y);if(A){x=!0;var N=Mt.getContextualType(A);if(!N)return void 0;var M=Mt.getPropertiesOfType(N);if(M&&M.length>0){var O=d(M,A.properties);i(O,Ot)}}else{x=!1;var I=36814847,C=Mt.getSymbolsInScope(_,I);i(C,Ot)}}return x||Array.prototype.push.apply(Ot.entries,K),t.log("getCompletionsAtPosition: Semantic work: "+((new Date).getTime()-E)),{isMemberCompletion:x,entries:Ot.entries}}function I(t,n,r){t=e.normalizeSlashes(t);var i=o(t),s=Ot;if(!s||s.filename!==t||s.position!==n)return void 0;var a=e.lookUp(Ot.symbols,e.escapeIdentifier(r));if(a){var c=e.getTouchingPropertyName(i,n),l=P(a,s.typeChecker,c);e.Debug.assert(void 0!==s.typeChecker.getTypeOfSymbolAtLocation(a,c),"Could not find type for symbol");var u=Y(a,o(t),c,s.typeChecker,c,7);return{name:r,kind:u.symbolKind,kindModifiers:l.kindModifiers,displayParts:u.displayParts,documentation:u.documentation}}return{name:r,kind:F.keyword,kindModifiers:H.none,displayParts:[e.displayPart(r,5)],documentation:void 0}}function D(e){for(;;){if(e=e.parent,!e)return void 0;switch(e.kind){case 201:case 125:case 184:case 150:case 127:case 128:case 185:case 186:case 188:case 189:return e}}}function V(e,t,n){var r=e.getFlags();if(32&r)return F.classElement;if(384&r)return F.enumElement;if(2097152&r)return F.typeElement;if(64&r)return F.interfaceElement;if(1048576&r)return F.typeParameterElement;var i=G(e,r,t,n);if(i===F.unknown){if(1048576&r)return F.typeParameterElement;if(8&r)return F.variableElement;if(33554432&r)return F.alias;if(1536&r)return F.moduleElement}return i}function G(t,n,r,o){if(r.isUndefinedSymbol(t))return F.variableElement;if(r.isArgumentsSymbol(t))return F.localVariableElement;if(3&n)return e.isFirstDeclarationOfSymbolParameter(t)?F.parameterElement:t.valueDeclaration&&e.isConst(t.valueDeclaration)?F.constElement:e.forEach(t.declarations,function(t){return e.isLet(t)})?F.letElement:i(t)?F.localVariableElement:F.variableElement;if(16&n)return i(t)?F.localFunctionElement:F.functionElement;if(32768&n)return F.memberGetAccessorElement;if(65536&n)return F.memberSetAccessorElement;if(8192&n)return F.memberFunctionElement;if(16384&n)return F.constructorImplementationElement;if(4&n){if(1073741824&n){var s=e.forEach(Mt.getRootSymbols(t),function(t){var n=t.getFlags();return 98311&n?F.memberVariableElement:(e.Debug.assert(!!(8192&n)),void 0)});if(!s){var a=Mt.getTypeOfSymbolAtLocation(t,o);return a.getCallSignatures().length?F.memberFunctionElement:F.memberVariableElement}return s}return F.memberVariableElement}return F.unknown}function z(t){switch(t.kind){case 189:return F.moduleElement;case 185:return F.classElement;case 186:return F.interfaceElement;case 187:return F.typeElement;case 188:return F.enumElement;case 183:return e.isConst(t)?F.constElement:2048&t.flags?F.letElement:F.variableElement;case 184:return F.functionElement;case 127:return F.memberGetAccessorElement;case 128:return F.memberSetAccessorElement;case 125:return F.memberFunctionElement;case 124:return F.memberVariableElement;case 131:return F.indexSignatureElement;case 130:return F.constructSignatureElement;case 129:return F.callSignatureElement;case 126:return F.constructorImplementationElement;case 122:return F.typeParameterElement;case 200:return F.variableElement;case 123:return 112&t.flags?F.memberVariableElement:F.parameterElement}return F.unknown}function q(t){return t&&t.declarations&&t.declarations.length>0?e.getNodeModifiers(t.declarations[0]):H.none}function Y(t,n,r,i,o,s){function a(){m.length&&m.push(e.lineBreakPart())}function c(t,r){var o=e.symbolToDisplayParts(i,t,r||n,void 0,3);m.push.apply(m,o)}function l(t,n){a(),n&&(m.push(e.punctuationPart(15)),m.push(e.textPart(n)),m.push(e.punctuationPart(16)),m.push(e.spacePart()),c(t))}function u(t,n,o){m.push.apply(m,e.signatureToDisplayParts(i,t,r,32|o)),n.length>1&&(m.push(e.spacePart()),m.push(e.punctuationPart(15)),m.push(e.operatorPart(32)),m.push(e.displayPart((n.length-1).toString(),7)),m.push(e.spacePart()),m.push(e.textPart(2===n.length?"overload":"overloads")),m.push(e.punctuationPart(16))),d=t.getDocumentationComment()}function p(t,n){var r=e.mapToDisplayParts(function(e){i.getSymbolDisplayBuilder().buildTypeParameterDisplayFromSymbol(t,e,n)});m.push.apply(m,r)}void 0===s&&(s=dt(o));var d,h,m=[],f=t.flags,y=G(t,f,i,o);if(y!==F.unknown||32&f||33554432&f){(y===F.memberGetAccessorElement||y===F.memberSetAccessorElement)&&(y=F.memberVariableElement);var b=i.getTypeOfSymbolAtLocation(t,o);if(b){if(o.parent&&143===o.parent.kind){var T=o.parent.name;(T===o||T&&0===T.getFullWidth())&&(o=o.parent)}var E;if(145===o.kind||146===o.kind?E=o:(g(o)||v(o))&&(E=o.parent),E){var S=[];x=i.getResolvedSignature(E,S),!x&&S.length&&(x=S[0]);var C=146===E.kind||89===E.expression.kind,k=C?b.getConstructSignatures():b.getCallSignatures();if(e.contains(k,x.target||x)||(x=k.length?k[0]:void 0),x){switch(C&&32&f?(y=F.constructorImplementationElement,l(b.symbol,y)):33554432&f?(y=F.alias,m.push(e.punctuationPart(15)),m.push(e.textPart(y)),m.push(e.punctuationPart(16)),m.push(e.spacePart()),C&&(m.push(e.keywordPart(86)),m.push(e.spacePart())),c(t)):l(t,y),y){case F.memberVariableElement:case F.variableElement:case F.constElement:case F.letElement:case F.parameterElement:case F.localVariableElement:m.push(e.punctuationPart(50)),m.push(e.spacePart()),C&&(m.push(e.keywordPart(86)),m.push(e.spacePart())),32768&b.flags||m.push.apply(m,e.symbolToDisplayParts(i,b.symbol,r,void 0,1)),u(x,k,8);break;default:u(x,k)}h=!0}}else if(_(o)&&!(98304&t.flags)||111===o.kind&&126===o.parent.kind){var x,w=o.parent,k=126===w.kind?b.getConstructSignatures():b.getCallSignatures();x=i.isImplementationOfOverload(w)?k[0]:i.getSignatureFromDeclaration(w),126===w.kind?(y=F.constructorImplementationElement,l(b.symbol,y)):l(129!==w.kind||2048&b.symbol.flags||4096&b.symbol.flags?t:b.symbol,y),u(x,k),h=!0}}}if(32&f&&!h&&(m.push(e.keywordPart(67)),m.push(e.spacePart()),c(t),p(t,n)),64&f&&2&s&&(a(),m.push(e.keywordPart(101)),m.push(e.spacePart()),c(t),p(t,n)),2097152&f&&(a(),m.push(e.keywordPart(119)),m.push(e.spacePart()),c(t),m.push(e.spacePart()),m.push(e.operatorPart(51)),m.push(e.spacePart()),m.push.apply(m,e.typeToDisplayParts(i,i.getDeclaredTypeOfSymbol(t),r))),384&f&&(a(),e.forEach(t.declarations,function(t){return e.isConstEnumDeclaration(t)})&&(m.push(e.keywordPart(68)),m.push(e.spacePart())),m.push(e.keywordPart(75)),m.push(e.spacePart()),c(t)),1536&f&&(a(),m.push(e.keywordPart(114)),m.push(e.spacePart()),c(t)),1048576&f&&2&s)if(a(),m.push(e.punctuationPart(15)),m.push(e.textPart("type parameter")),m.push(e.punctuationPart(16)),m.push(e.spacePart()),c(t),m.push(e.spacePart()),m.push(e.keywordPart(84)),m.push(e.spacePart()),t.parent)c(t.parent,r),p(t.parent,r);else{var L=e.getDeclarationOfKind(t,122).parent,x=i.getSignatureFromDeclaration(L);130===L.kind?(m.push(e.keywordPart(86)),m.push(e.spacePart())):129!==L.kind&&L.name&&c(L.symbol),m.push.apply(m,e.signatureToDisplayParts(i,x,n,32))}if(8&f){l(t,"enum member");var A=t.declarations[0];if(200===A.kind){var N=i.getEnumMemberValue(A);void 0!==N&&(m.push(e.spacePart()),m.push(e.operatorPart(51)),m.push(e.spacePart()),m.push(e.displayPart(N.toString(),7)))}}if(33554432&f&&(a(),m.push(e.keywordPart(83)),m.push(e.spacePart()),c(t),e.forEach(t.declarations,function(t){if(191===t.kind){var n=t;if(e.isExternalModuleImportDeclaration(n))m.push(e.spacePart()),m.push(e.operatorPart(51)),m.push(e.spacePart()),m.push(e.keywordPart(115)),m.push(e.punctuationPart(15)),m.push(e.displayPart(e.getTextOfNode(e.getExternalModuleImportDeclarationExpression(n)),8)),m.push(e.punctuationPart(16));else{var o=i.getSymbolAtLocation(n.moduleReference);o&&(m.push(e.spacePart()),m.push(e.operatorPart(51)),m.push(e.spacePart()),c(o,r))}return!0}})),!h)if(y!==F.unknown){if(b)if(l(t,y),y===F.memberVariableElement||3&f||y===F.localVariableElement)if(m.push(e.punctuationPart(50)),m.push(e.spacePart()),b.symbol&&1048576&b.symbol.flags){var M=e.mapToDisplayParts(function(e){i.getSymbolDisplayBuilder().buildTypeParameterDisplay(b,e,r)});m.push.apply(m,M)}else m.push.apply(m,e.typeToDisplayParts(i,b,r));else if(16&f||8192&f||16384&f||917504&f||98304&f||y===F.memberFunctionElement){var k=b.getCallSignatures();u(k[0],k)}}else y=V(t,i,o);return d||(d=t.getDocumentationComment()),{displayParts:m,documentation:d,symbolKind:y}}function X(t,n){k(),t=e.normalizeSlashes(t);var r=o(t),i=e.getTouchingPropertyName(r,n);if(!i)return void 0;var s=Mt.getSymbolAtLocation(i);if(!s){switch(i.kind){case 63:case 143:case 120:case 91:case 89:var a=Mt.getTypeAtLocation(i);if(a)return{kind:F.unknown,kindModifiers:H.none,textSpan:new R(i.getStart(),i.getWidth()),displayParts:e.typeToDisplayParts(Mt,a,D(i)),documentation:a.symbol?a.symbol.getDocumentationComment():void 0}}return void 0}var c=Y(s,r,D(i),Mt,i);return{kind:c.symbolKind,kindModifiers:q(s),textSpan:new R(i.getStart(),i.getWidth()),displayParts:c.displayParts,documentation:c.documentation}}function Q(t,n){function r(e,t,n,r){return{fileName:e.getSourceFile().filename,textSpan:R.fromBounds(e.getStart(),e.getEnd()),kind:t,name:n,containerKind:void 0,containerName:r}}function i(t,n,i,o,s,a){var c,l=[];return e.forEach(t,function(e){(n&&126===e.kind||!n&&(184===e.kind||125===e.kind))&&(l.push(e),e.body&&(c=e))}),c?(a.push(r(c,i,o,s)),!0):l.length?(a.push(r(l[l.length-1],i,o,s)),!0):!1}function s(t,n,r,o,s,a){if((v(n)||111===n.kind)&&32&t.flags){var c=t.getDeclarations()[0];return e.Debug.assert(c&&185===c.kind),i(c.members,!0,r,o,s,a)}return!1}function a(e,t,n,r,o,s){return g(t)||v(t)||_(t)?i(e.declarations,!1,n,r,o,s):!1}k(),t=e.normalizeSlashes(t);var c=o(t),p=e.getTouchingPropertyName(c,n);if(!p)return void 0;if(u(p)){var d=p.text,h=l(p.parent,p.text);return h?[r(h,F.label,d,void 0)]:void 0}var m=e.forEach(c.referencedFiles,function(e){return e.pos<=n&&n<e.end?e:void 0});if(m){var f=e.tryResolveScriptReference(Nt,c,m);return f?[{fileName:f.filename,textSpan:R.fromBounds(0,0),kind:F.scriptElement,name:m.filename,containerName:void 0,containerKind:void 0}]:void 0}var y=Mt.getSymbolAtLocation(p);if(!y)return void 0;var b=[];if(199===p.parent.kind){var T=Mt.getShorthandAssignmentValueSymbol(y.valueDeclaration),E=T.getDeclarations(),S=V(T,Mt),C=Mt.symbolToString(T),x=Mt.symbolToString(y.parent,p);return e.forEach(E,function(e){b.push(r(e,S,C,x))}),b}var w=y.getDeclarations(),L=Mt.symbolToString(y),A=V(y,Mt),N=y.parent,M=N?Mt.symbolToString(N,p):"";return s(y,p,A,L,M,b)||a(y,p,A,L,M,b)||e.forEach(w,function(e){b.push(r(e,A,L,M))}),b}function J(t,n){function r(n){for(var r=[];b(n.parent,167)&&n.parent.elseStatement===n;)n=n.parent;for(;n;){var i=n.getChildren();C(r,i[0],82);for(var o=i.length-1;o>=0&&!C(r,i[o],74);o--);if(!b(n.elseStatement,167))break;n=n.elseStatement}for(var s=[],o=0;o<r.length;o++){if(74===r[o].kind&&o<r.length-1){for(var a=r[o],c=r[o+1],l=!0,u=c.getStart()-1;u>=a.end;u--)if(!e.isWhiteSpace(x.text.charCodeAt(u))){l=!1;break}if(l){s.push({fileName:t,textSpan:R.fromBounds(a.getStart(),c.end),isWriteAccess:!1}),o++;continue}}s.push(rt(r[o]))}return s}function i(t){var n=e.getContainingFunction(t);if(!n||!b(n.body,163))return void 0;var r=[];return e.forEachReturnStatement(n.body,function(e){C(r,e.getFirstToken(),88)}),e.forEach(a(n.body),function(e){C(r,e.getFirstToken(),92)}),e.map(r,rt)}function s(t){var n=c(t);if(!n)return void 0;var r=[];return e.forEach(a(n),function(e){C(r,e.getFirstToken(),92)}),e.isFunctionBlock(n)&&e.forEachReturnStatement(n,function(e){C(r,e.getFirstToken(),88)}),e.map(r,rt)}function a(t){function n(t){if(178===t.kind)r.push(t);else if(179===t.kind){var i=t;i.catchClause?n(i.catchClause):n(i.tryBlock),i.finallyBlock&&n(i.finallyBlock)}else e.isAnyFunction(t)||e.forEachChild(t,n)}var r=[];return n(t),r}function c(t){for(var n=t;n.parent;){var r=n.parent;if(e.isFunctionBlock(r)||201===r.kind)return r;if(179===r.kind){var i=r;if(i.tryBlock===n&&i.catchClause)return n}n=r}return void 0}function l(t){var n=[];return C(n,t.getFirstToken(),94),t.catchClause&&C(n,t.catchClause.getFirstToken(),66),t.finallyBlock&&C(n,t.finallyBlock.getFirstToken(),79),e.map(n,rt)}function u(t){var n=[];if(C(n,t.getFirstToken(),80,98,73)&&168===t.kind)for(var r=t.getChildren(),i=r.length-1;i>=0&&!C(n,r[i],98);i--);var o=m(t.statement);return e.forEach(o,function(e){f(t,e)&&C(n,e.getFirstToken(),64,69)}),e.map(n,rt)}function p(t){var n=[];return C(n,t.getFirstToken(),90),e.forEach(t.clauses,function(r){C(n,r.getFirstToken(),65,71);var i=m(r);e.forEach(i,function(e){f(t,e)&&C(n,e.getFirstToken(),64)})}),e.map(n,rt)}function h(e){var t=g(e);if(t)switch(t.kind){case 170:case 171:case 168:case 169:return u(t);case 176:return p(t)}return void 0}function m(t){function n(t){173===t.kind||172===t.kind?r.push(t):e.isAnyFunction(t)||e.forEachChild(t,n)}var r=[];return n(t),r}function f(e,t){var n=g(t);return n&&n===e}function g(t){for(var n=t.parent;n;n=n.parent)switch(n.kind){case 176:if(172===t.kind)continue;case 170:case 171:case 169:case 168:if(!t.label||d(n,t.label.text))return n;break;default:if(e.isAnyFunction(n))return void 0}return void 0}function v(t){var n=t.symbol.getDeclarations(),r=[];return e.forEach(n,function(t){e.forEach(t.getChildren(),function(e){return C(r,e,111)})}),e.map(r,rt)}function y(t){function n(t,n){var i=e.getDeclarationOfKind(t,n);i&&e.forEach(i.getChildren(),function(e){return C(r,e,113,117)})}var r=[];return n(t.symbol,127),n(t.symbol,128),e.map(r,rt)}function _(t,n){function r(t){switch(t){case 106:return 16;case 104:return 32;case 105:return 64;case 107:return 128;case 76:return 1;case 112:return 2;default:e.Debug.fail()}}var i=n.parent;if(112&n.flags){if(!(185===i.kind||123===n.kind&&b(i,126)))return void 0}else if(128&n.flags){if(185!==i.kind)return void 0}else{if(!(3&n.flags))return void 0;if(190!==i.kind&&201!==i.kind)return void 0}var o,s=[],a=r(t);switch(i.kind){case 190:case 201:o=i.statements;break;case 126:o=i.parameters.concat(i.parent.members);break;case 185:if(o=i.members,112&a){var c=e.forEach(i.members,function(e){return 126===e.kind&&e});c&&(o=o.concat(c.parameters))}break;default:e.Debug.fail("Invalid container kind.")}return e.forEach(o,function(n){n.modifiers&&n.flags&a&&e.forEach(n.modifiers,function(e){return C(s,e,t)})}),e.map(s,rt)}function b(e,t){return void 0!==e&&e.kind===t}function S(e){return e&&e.parent}function C(t,n){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return n&&e.contains(r,n.kind)?(t.push(n),!0):!1}k(),t=e.normalizeSlashes(t);var x=o(t),w=e.getTouchingWord(x,n);if(!w)return void 0;if(63===w.kind||91===w.kind||89===w.kind||T(w)||E(w))return nt(w,[x],!1,!1);switch(w.kind){case 82:case 74:if(b(w.parent,167))return r(w.parent);break;case 88:if(b(w.parent,174))return i(w.parent);break;case 92:if(b(w.parent,178))return s(w.parent);break;case 94:case 66:case 79:if(b(S(S(w)),179))return l(w.parent.parent);break;case 90:if(b(w.parent,176))return p(w.parent);break;case 65:case 71:if(b(S(S(w)),176))return p(w.parent.parent);break;case 64:case 69:if(b(w.parent,173)||b(w.parent,172))return h(w.parent);break;case 80:if(b(w.parent,170)||b(w.parent,171))return u(w.parent);break;case 98:case 73:if(b(w.parent,169)||b(w.parent,168))return u(w.parent);break;case 111:if(b(w.parent,126))return v(w.parent);break;case 113:case 117:if(b(w.parent,127)||b(w.parent,128))return y(w.parent);default:if(e.isModifier(w.kind)&&w.parent&&(e.isDeclaration(w.parent)||164===w.parent.kind))return _(w.kind,w.parent)}return void 0}function Z(e,t,n,r){return tt(e,t,n,r)}function et(e,t){return tt(e,t,!1,!1)}function tt(t,n,r,i){k(),t=e.normalizeSlashes(t);var s=o(t),a=e.getTouchingPropertyName(s,n);return a?63===a.kind||T(a)||E(a)?(e.Debug.assert(63===a.kind||6===a.kind||7===a.kind),nt(a,Nt.getSourceFiles(),r,i)):void 0:void 0}function nt(t,n,r,i){function o(e){var t=Mt.symbolToString(e);return a(t)}function s(t,n){var r=e.forEach(n,function(e){return 150===e.kind?e:void 0});if(r&&r.name)var i=r.name.text;else var i=t.name;return a(i)}function a(e){var t=e.length;return t>=2&&34===e.charCodeAt(0)&&34===e.charCodeAt(t-1)?e.substring(1,t-1):e}function c(t){if(t.getFlags()){var n=e.forEach(t.getDeclarations(),function(e){return 32&e.flags?e:void 0});if(n)return e.getAncestor(n,185)}if(t.parent)return void 0;var r=void 0,i=t.getDeclarations();if(i)for(var o=0,s=i.length;s>o;o++){var a=D(i[o]);if(!a)return void 0;if(r&&r!==a)return void 0;if(201===a.kind&&!e.isExternalModule(a))return void 0;r=a}return r}function p(t,n,r,i){var o=[];if(!n||!n.length)return o;for(var s=t.text,a=s.length,c=n.length,l=s.indexOf(n,r);l>=0&&(Vt.throwIfCancellationRequested(),!(l>i));){var u=l+c;0!==l&&e.isIdentifierPart(s.charCodeAt(l-1),2)||u!==a&&e.isIdentifierPart(s.charCodeAt(u),2)||o.push(l),l=s.indexOf(n,l+c+1)}return o}function d(t,n){var r=[],i=t.getSourceFile(),o=n.text,s=p(i,o,t.getStart(),t.getEnd());return e.forEach(s,function(t){Vt.throwIfCancellationRequested();var s=e.getTouchingWord(i,t);s&&s.getWidth()===o.length&&(s===n||u(s)&&l(s,o)===n)&&r.push(rt(s))}),r}function m(e,t){if(e)switch(e.kind){case 63:return e.getWidth()===t.length;case 7:if(T(e)||E(e))return e.getWidth()===t.length+2;break;case 6:if(T(e))return e.getWidth()===t.length}return!1}function f(t,n,r,i,o,s,a,c){function l(t){var n=e.getTokenAtPosition(d,t);return n&&7===n.kind&&t>n.getStart()}function u(t){var n=e.getTokenAtPosition(d,t);if(n&&t<n.getStart()){var r=e.getLeadingCommentRanges(d.text,n.pos);return e.forEach(r,function(e){if(e.pos<t&&t<e.end){var n=d.text.substring(e.pos,e.end);if(!h.test(n))return!0}})}return!1}var d=t.getSourceFile(),h=/^\/\/\/\s*</,f=p(d,r,t.getStart(),t.getEnd());if(f.length){var g=y(n,i);e.forEach(f,function(t){Vt.throwIfCancellationRequested();var n=e.getTouchingPropertyName(d,t);if(!m(n,r))return(s&&l(t)||a&&u(t))&&c.push({fileName:d.filename,textSpan:new R(t,r.length),isWriteAccess:!1}),void 0;if(dt(n)&o){var i=Mt.getSymbolAtLocation(n);if(i){var p=i.valueDeclaration,h=Mt.getShorthandAssignmentValueSymbol(p);S(g,i,n)?c.push(rt(n)):!(268435456&i.flags)&&g.indexOf(h)>=0&&c.push(rt(p.name))}}})}}function g(t){var n=e.getSuperContainer(t);if(!n)return void 0;var r=128;switch(n.kind){case 124:case 125:case 126:case 127:case 128:r&=n.flags,n=n.parent;break;default:return void 0}var i=[],o=n.getSourceFile(),s=p(o,"super",n.getStart(),n.getEnd());return e.forEach(s,function(t){Vt.throwIfCancellationRequested();var s=e.getTouchingWord(o,t);if(s&&89===s.kind){var a=e.getSuperContainer(s);a&&(128&a.flags)===r&&a.parent.symbol===n.symbol&&i.push(rt(s))}}),i}function v(t,n){function r(t,n,r,i){e.forEach(r,function(r){Vt.throwIfCancellationRequested();var s=e.getTouchingWord(t,r);if(s&&91===s.kind){var a=e.getThisContainer(s,!1);switch(n.kind){case 150:case 184:n.symbol===a.symbol&&i.push(rt(s));break;case 125:e.isObjectLiteralMethod(n)&&n.symbol===a.symbol&&i.push(rt(s));break;case 185:a.parent&&n.symbol===a.parent.symbol&&(128&a.flags)===o&&i.push(rt(s));break;case 201:201!==a.kind||e.isExternalModule(a)||i.push(rt(s))}}})}var i=e.getThisContainer(t,!1),o=128;switch(i.kind){case 125:if(e.isObjectLiteralMethod(i))break;case 124:case 126:case 127:case 128:o&=i.flags,i=i.parent;break;case 201:if(e.isExternalModule(i))return void 0;case 184:case 150:break;default:return void 0}var s=[];if(201===i.kind)e.forEach(n,function(e){var t=p(e,"this",e.getStart(),e.getEnd());r(e,e,t,s)});else{var a=i.getSourceFile(),c=p(a,"this",i.getStart(),i.getEnd());r(a,i,c,s)}return s}function y(t,n){var r=[t];if(b(n)){e.forEach(C(n),function(e){r.push.apply(r,Mt.getRootSymbols(e))});var i=Mt.getShorthandAssignmentValueSymbol(n.parent);i&&r.push(i)}return e.forEach(Mt.getRootSymbols(t),function(e){e!==t&&r.push(e),e.parent&&96&e.parent.flags&&_(e.parent,e.getName(),r)}),r}function _(t,n,r){function i(e){if(e){var t=Mt.getTypeAtLocation(e);if(t){var i=Mt.getPropertyOfType(t,n);i&&r.push(i),_(t.symbol,n,r)}}}t&&96&t.flags&&e.forEach(t.getDeclarations(),function(t){185===t.kind?(i(e.getClassBaseTypeNode(t)),e.forEach(e.getClassImplementedTypeNodes(t),i)):186===t.kind&&e.forEach(e.getInterfaceBaseTypeNodes(t),i)})}function S(t,n,r){return t.indexOf(n)>=0?!0:b(r)?e.forEach(C(r),function(n){return e.forEach(Mt.getRootSymbols(n),function(e){return t.indexOf(e)>=0})}):e.forEach(Mt.getRootSymbols(n),function(n){if(t.indexOf(n)>=0)return!0;if(n.parent&&96&n.parent.flags){var r=[];return _(n.parent,n.getName(),r),e.forEach(r,function(e){return t.indexOf(e)>=0})}return!1})}function C(t){if(b(t)){var n=t.parent.parent,r=Mt.getContextualType(n),i=t.text;if(r){if(16384&r.flags){var o=r.getProperty(i);if(o)return[o];var s=[];return e.forEach(r.types,function(e){var t=e.getProperty(i);t&&s.push(t)}),s}var a=r.getProperty(i);if(a)return[a]}}return void 0}function k(e,t){if(t)do for(var n=e,r=0,i=t.length;i>r;r++){var o=at(t[r]);o&e&&(e|=o)}while(e!==n);return e}if(h(t)){if(u(t)){var x=l(t.parent,t.text);return x?d(x.parent,x):[rt(t)]}return d(t.parent,t)}if(91===t.kind)return v(t,n);if(89===t.kind)return g(t);var w=Mt.getSymbolAtLocation(t);if(!w)return[rt(t)];var L=w.declarations;if(!L||!L.length)return void 0;var A,N=k(dt(t),L),M=o(w),P=c(w);if(P)A=[],f(P,w,M,t,N,r,i,A);else{var O=s(w,L);e.forEach(n,function(n){Vt.throwIfCancellationRequested(),e.lookUp(n.identifiers,O)&&(A=A||[],f(n,w,M,t,N,r,i,A))})}return A}function rt(e){var t=e.getStart(),n=e.getEnd();return 7===e.kind&&(t+=1,n-=1),{fileName:e.getSourceFile().filename,textSpan:R.fromBounds(t,n),isWriteAccess:it(e)}}function it(t){if(63===t.kind&&e.isDeclarationOrFunctionExpressionOrCatchVariableName(t))return!0;var n=t.parent;if(n){if(156===n.kind||155===n.kind)return!0;if(157===n.kind&&n.left===t){var r=n.operator;return r>=51&&62>=r}}return!1}function ot(t){function n(e){for(var t=0,n=e.length;n>t;t++){var r=e.charCodeAt(t);if(r>=65&&90>=r||r>=127&&e.charAt(t).toLocaleLowerCase()!==e.charAt(t))return!0}return!1}function r(e,t){var n=0;if(t)for(var r=0,i=e.length;i>r;r++){var o=e[r],s=o.caseSensitive?t:t.toLocaleLowerCase(),a=s.indexOf(o.term);if(0>a)return 0;var c=2;0===a&&(c=t.length===o.term.length?1:3),(0===n||n>c)&&(n=c)}return n}k();var i=t.split(" "),o=e.map(i,function(e){return{caseSensitive:n(e),term:e}}),s=[];return e.forEach(Nt.getSourceFiles(),function(t){Vt.throwIfCancellationRequested();for(var n=t.filename,i=t.getNamedDeclarations(),a=0,c=i.length;c>a;a++){var l=i[a],u=l.name.text,p=r(o,u);if(0!==p){var d=D(l);s.push({name:u,kind:z(l),kindModifiers:e.getNodeModifiers(l),matchKind:$[p],fileName:n,textSpan:R.fromBounds(l.getStart(),l.getEnd()),containerName:d&&d.name?d.name.text:"",containerKind:d&&d.name?z(d):""})}}}),s}function st(t){function n(e,t,n){i.push({name:e,writeByteOrderMark:n,text:t})}k(),t=e.normalizeSlashes(t);var r=o(t),i=[];Ft=n;var a=s().emitFiles(r);return Ft=void 0,{outputFiles:i,emitOutputStatus:a.emitResultStatus}}function at(t){switch(t.kind){case 123:case 183:case 124:case 198:case 199:case 200:case 125:case 126:case 127:case 128:case 184:case 150:case 151:case 197:return 1;case 122:case 186:case 187:case 136:return 2;case 185:case 188:return 3;case 189:return 7===t.name.kind?5:1===e.getModuleInstanceState(t)?5:4;case 191:return 7;case 201:return 5}e.Debug.fail("Unknown declaration type")}function ct(e){return m(e)&&(e=e.parent),132===e.parent.kind}function lt(e){var t=e,n=!0;if(120===t.parent.kind){for(;t.parent&&120===t.parent.kind;)t=t.parent;n=t.right===e}return 132===t.parent.kind&&!n}function ut(t){for(;120===t.parent.kind;)t=t.parent;return e.isInternalModuleImportDeclaration(t.parent)&&t.parent.moduleReference===t}function pt(t){return e.Debug.assert(63===t.kind),120===t.parent.kind&&t.parent.right===t&&191===t.parent.parent.kind?7:4}function dt(t){return 192===t.parent.kind?7:ut(t)?pt(t):e.isDeclarationOrFunctionExpressionOrCatchVariableName(t)?at(t.parent):ct(t)?2:lt(t)?4:1}function ht(t,n){k(),t=e.normalizeSlashes(t);var r=o(t);return e.SignatureHelp.getSignatureHelpItems(r,n,Mt,Vt)}function mt(t){t=e.normalizeSlashes(t);var n=It.getCurrentSourceFile(t);return n}function ft(t,n){t=e.normalizeSlashes(t);var r=e.getTouchingPropertyName(mt(t),n);if(r){switch(r.kind){case 143:case 120:case 7:case 78:case 93:case 87:case 89:case 91:case 63:break;default:return}for(var i=r;;)if(f(i)||m(i))i=i.parent;else{if(!y(i))break;if(189!==i.parent.parent.kind||i.parent.parent.body!==i.parent)break;i=i.parent.parent.name}return R.fromBounds(i.getStart(),r.getEnd())}}function gt(t,n){return t=e.normalizeSlashes(t),e.BreakpointResolver.spanInSourceFileAtLocation(mt(t),n)}function vt(t){return t=e.normalizeSlashes(t),e.NavigationBar.getNavigationBarItems(mt(t))}function yt(t,n){function r(t,n){function r(t){return e.forEach(t.declarations,function(t){return 189===t.kind&&1==e.getModuleInstanceState(t)})}var i=t.getFlags();if(32&i)return B.className;if(384&i)return B.enumName;if(2097152&i)return B.typeAlias;if(2&n){if(64&i)return B.interfaceName;if(1048576&i)return B.typeParameterName}else if(1536&i&&(4&n||1&n&&r(t)))return B.moduleName;return void 0}function i(t){if(t&&n.intersectsWith(t.getStart(),t.getWidth())){if(63===t.kind&&t.getWidth()>0){var o=Mt.getSymbolAtLocation(t);if(o){var s=r(o,dt(t));s&&a.push({textSpan:new R(t.getStart(),t.getWidth()),classificationType:s})}}e.forEachChild(t,i)}}k(),t=e.normalizeSlashes(t);var s=o(t),a=[];return i(s),a}function _t(t,n){function r(e){var t=e.end-e.pos;n.intersectsWith(e.pos,t)&&c.push({textSpan:new R(e.pos,t),classificationType:B.comment})}function i(t){if(e.forEach(e.getLeadingCommentRanges(a.text,t.getFullStart()),r),t.getWidth()>0){var n=o(t);n&&c.push({textSpan:new R(t.getStart(),t.getWidth()),classificationType:n})}e.forEach(e.getTrailingCommentRanges(a.text,t.getEnd()),r)}function o(t){var n=t.kind;if(e.isKeyword(n))return B.keyword;if((23===n||24===n)&&e.getTypeArgumentOrTypeParameterList(t.parent))return B.punctuation;if(e.isPunctuation(t.kind))return 157===t.parent.kind||183===t.parent.kind||155===t.parent.kind||156===t.parent.kind||158===t.parent.kind?B.operator:B.punctuation;if(6===n)return B.numericLiteral;if(7===n)return B.stringLiteral;if(8===n)return B.stringLiteral;if(e.isTemplateLiteralKind(n))return B.stringLiteral;if(63===n)switch(t.parent.kind){case 185:if(t.parent.name===t)return B.className;return;case 122:if(t.parent.name===t)return B.typeParameterName;return;case 186:if(t.parent.name===t)return B.interfaceName;return;case 188:if(t.parent.name===t)return B.enumName;return;case 189:if(t.parent.name===t)return B.moduleName;return;default:return B.text}}function s(t){if(n.intersectsWith(t.getFullStart(),t.getFullWidth()))for(var r=t.getChildren(),o=0,a=r.length;a>o;o++){var c=r[o];e.isToken(c)?i(c):s(c)}}t=e.normalizeSlashes(t);var a=mt(t),c=[];return s(a),c}function bt(t){t=e.normalizeSlashes(t);var n=mt(t);return e.OutliningElementsCollector.collectElements(n)}function Tt(t,n){function r(e){switch(e.kind){case 13:return 14;case 15:return 16;case 17:return 18;case 23:return 24;case 14:return 13;case 16:return 15;case 18:return 17;case 24:return 23}return void 0}var i=mt(t),o=[],s=e.getTouchingToken(i,n);if(s.getStart(i)===n){var a=r(s);if(a)for(var c=s.parent,l=c.getChildren(i),u=0,p=l.length;p>u;u++){var d=l[u];if(d.kind===a){var h=new R(s.getStart(i),s.getWidth(i)),m=new R(d.getStart(i),d.getWidth(i));h.start()<m.start()?o.push(h,m):o.push(m,h);break}}}return o}function Et(n,r,i){n=e.normalizeSlashes(n);var o=(new Date).getTime(),s=mt(n);t.log("getIndentationAtPosition: getCurrentSourceFile: "+((new Date).getTime()-o));var o=(new Date).getTime(),a=e.formatting.SmartIndenter.getIndentation(r,s,i);return t.log("getIndentationAtPosition: computeIndentation  : "+((new Date).getTime()-o)),a}function St(t,n,r,i){t=e.normalizeSlashes(t);var o=mt(t);return e.formatting.formatSelection(n,r,o,a(i),i)}function Ct(t,n){t=e.normalizeSlashes(t);var r=mt(t);return e.formatting.formatDocument(r,a(n),n)}function kt(t,n,r,i){t=e.normalizeSlashes(t);var o=mt(t);return"}"===r?e.formatting.formatOnClosingCurly(n,o,a(i),i):";"===r?e.formatting.formatOnSemicolon(n,o,a(i),i):"\n"===r?e.formatting.formatOnEnter(n,o,a(i),i):[]}function xt(t,n){function r(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function i(){var t=/(?:\/\/+\s*)/.source,i=/(?:\/\*+\s*)/.source,o=/(?:^(?:\s|\*)*)/.source,s="("+o+"|"+t+"|"+i+")",a="(?:"+e.map(n,function(e){return"("+r(e.text)+")"}).join("|")+")",c=/(?:$|\*\/)/.source,l=/(?:.*?)/.source,u="("+a+l+")",p=s+u+c;return new RegExp(p,"gim")}function s(e){return e>=97&&122>=e||e>=65&&90>=e||e>=48&&57>=e}k(),t=e.normalizeSlashes(t);var a=o(t);Vt.throwIfCancellationRequested();var c=a.text;Vt.throwIfCancellationRequested();var l=[];if(n.length>0)for(var u,p=i();u=p.exec(c);){Vt.throwIfCancellationRequested();var d=3;e.Debug.assert(u.length===n.length+d);var h=u[1],m=u.index+h.length,f=e.getTokenAtPosition(a,m);if(S(a,f,m)){for(var g=void 0,v=0,y=n.length;y>v;v++)u[v+d]&&(g=n[v]);if(e.Debug.assert(void 0!==g),!s(c.charCodeAt(m+g.text.length))){var _=u[2];l.push({descriptor:g,message:_,position:m})}}}return l}function wt(t,n){function r(){return{canRename:!1,localizedErrorMessage:e.getLocaleSpecificMessage(e.Diagnostics.You_cannot_rename_this_element.key),displayName:void 0,fullDisplayName:void 0,kind:void 0,kindModifiers:void 0,triggerSpan:void 0}}function i(e,t,n,r,i){return{canRename:!0,localizedErrorMessage:void 0,displayName:e,fullDisplayName:t,kind:n,kindModifiers:r,triggerSpan:i}}k(),t=e.normalizeSlashes(t);var s=o(t),a=e.getTouchingWord(s,n);if(a&&63===a.kind){var c=Mt.getSymbolAtLocation(a);if(c&&c.getDeclarations()&&c.getDeclarations().length>0){var l=V(c,Mt);if(l)return i(c.name,Mt.getFullyQualifiedName(c),l,q(c),new R(a.getStart(),a.getWidth()))}}return r(e.getLocaleSpecificMessage(e.Diagnostics.You_cannot_rename_this_element.key))}var Lt,At,Nt,Mt,Pt,Ot,It=new j(t),Rt=!1,Dt={},n=n,Vt=new U(t.getCancellationToken&&t.getCancellationToken()),Ft=void 0;
return!e.localizedDiagnosticMessages&&t.getLocalizedDiagnosticMessages&&(e.localizedDiagnosticMessages=t.getLocalizedDiagnosticMessages()),{dispose:w,cleanupSemanticCache:x,getSyntacticDiagnostics:L,getSemanticDiagnostics:A,getCompilerOptionsDiagnostics:N,getSyntacticClassifications:_t,getSemanticClassifications:yt,getCompletionsAtPosition:O,getCompletionEntryDetails:I,getSignatureHelpItems:ht,getQuickInfoAtPosition:X,getDefinitionAtPosition:Q,getReferencesAtPosition:et,getOccurrencesAtPosition:J,getNameOrDottedNameSpan:ft,getBreakpointStatementAtPosition:gt,getNavigateToItems:ot,getRenameInfo:wt,findRenameLocations:Z,getNavigationBarItems:vt,getOutliningSpans:bt,getTodoComments:xt,getBraceMatchingAtPosition:Tt,getIndentationAtPosition:Et,getFormattingEditsForRange:St,getFormattingEditsForDocument:Ct,getFormattingEditsAfterKeystroke:kt,getEmitOutput:st,getSourceFile:mt}}function k(){function t(e){switch(e){case 106:case 104:case 105:return!0}return!1}function n(e,n){return t(e)?113===n||117===n||111===n||107===n?!0:!1:!0}function r(t,r,i){function o(){var e=c.getTokenPos(),n=c.getTextPos();if(u(n-e,a(d)),n>=t.length)if(7===d){var r=c.getTokenText();if(c.isUnterminated()){for(var i=r.length-1,o=0;92===r.charCodeAt(i-o);)o++;if(1&o){var s=r.charCodeAt(0);m.finalLexState=34===s?3:2}}}else 3===d&&c.isUnterminated()&&(m.finalLexState=1)}function u(e,t){e>0&&(0===m.entries.length&&(e-=p),m.entries.push({length:e,classification:t}))}var p=0,d=0,h=0;switch(r){case 3:t='"\\\n'+t,p=3;break;case 2:t="'\\\n"+t,p=3;break;case 1:t="/*\n"+t,p=3}c.setText(t);var m={finalLexState:0,entries:[]},f=0;do d=c.scan(),e.isTrivia(d)||(35!==d&&55!==d||l[h]?19===h&&s(d)?d=63:s(h)&&s(d)&&!n(h,d)?d=63:63===h&&23===d?f++:24===d&&f>0?f--:(109===d||118===d||116===d||110===d)&&f>0&&!i&&(d=63):8===c.reScanSlashToken()&&(d=8),h=d),o();while(1!==d);return m}function i(e){switch(e){case 34:case 35:case 36:case 32:case 33:case 39:case 40:case 41:case 23:case 24:case 25:case 26:case 85:case 84:case 27:case 28:case 29:case 30:case 42:case 44:case 43:case 47:case 48:case 61:case 60:case 62:case 57:case 58:case 59:case 52:case 53:case 54:case 55:case 56:case 51:case 22:return!0;default:return!1}}function o(e){switch(e){case 32:case 33:case 46:case 45:case 37:case 38:return!0;default:return!1}}function s(e){return e>=64&&119>=e}function a(e){if(s(e))return 1;if(i(e)||o(e))return 2;if(e>=13&&62>=e)return 0;switch(e){case 6:return 6;case 7:return 7;case 8:return 8;case 3:case 2:return 3;case 5:return 4;case 63:default:return 5}}var c=e.createScanner(2,!1),l=[];return l[63]=!0,l[7]=!0,l[6]=!0,l[8]=!0,l[91]=!0,l[37]=!0,l[38]=!0,l[16]=!0,l[18]=!0,l[14]=!0,l[93]=!0,l[78]=!0,{getClassificationsForLine:r}}function x(){e.objectAllocator={getNodeConstructor:function(e){function t(){}var n=201===e?new I:new N;return n.kind=e,n.pos=0,n.end=0,n.flags=0,n.parent=void 0,t.prototype=n,t},getSymbolConstructor:function(){return M},getTypeConstructor:function(){return P},getSignatureConstructor:function(){return O}}}e.servicesVersion="0.4";var w;!function(t){function n(e){return new r(e)}var r=function(){function t(e){this.text=e,this._lineStartPositions=void 0}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.computeLineStarts(this.text)),this._lineStartPositions},t.prototype.getChangeRange=function(){throw new Error("not yet implemented")},t}();t.fromString=n}(w=e.ScriptSnapshot||(e.ScriptSnapshot={}));var L=e.createScanner(2,!0),A=[],N=function(){function n(){}return n.prototype.getSourceFile=function(){return e.getSourceFileOfNode(this)},n.prototype.getStart=function(t){return e.getTokenPosOfNode(this,t)},n.prototype.getFullStart=function(){return this.pos},n.prototype.getEnd=function(){return this.end},n.prototype.getWidth=function(e){return this.getEnd()-this.getStart(e)},n.prototype.getFullWidth=function(){return this.end-this.getFullStart()},n.prototype.getLeadingTriviaWidth=function(e){return this.getStart(e)-this.pos},n.prototype.getFullText=function(e){return(e||this.getSourceFile()).text.substring(this.pos,this.end)},n.prototype.getText=function(e){return(e||this.getSourceFile()).text.substring(this.getStart(),this.getEnd())},n.prototype.addSyntheticNodes=function(e,n,r){for(L.setTextPos(n);r>n;){var i=L.scan(),o=L.getTextPos();e.push(t(i,n,o,512,this)),n=o}return n},n.prototype.createSyntaxList=function(e){var n=t(203,e.pos,e.end,512,this);n._children=[];for(var r=e.pos,i=0,o=e.length;o>i;i++){var s=e[i];r<s.pos&&(r=this.addSyntheticNodes(n._children,r,s.pos)),n._children.push(s),r=s.end}return r<e.end&&this.addSyntheticNodes(n._children,r,e.end),n},n.prototype.createChildren=function(t){var n=this;if(this.kind>=120){L.setText((t||this.getSourceFile()).text);var r=[],i=this.pos,o=function(e){i<e.pos&&(i=n.addSyntheticNodes(r,i,e.pos)),r.push(e),i=e.end},s=function(e){i<e.pos&&(i=n.addSyntheticNodes(r,i,e.pos)),r.push(n.createSyntaxList(e)),i=e.end};e.forEachChild(this,o,s),i<this.end&&this.addSyntheticNodes(r,i,this.end),L.setText(void 0)}this._children=r||A},n.prototype.getChildCount=function(e){return this._children||this.createChildren(e),this._children.length},n.prototype.getChildAt=function(e,t){return this._children||this.createChildren(t),this._children[e]},n.prototype.getChildren=function(e){return this._children||this.createChildren(e),this._children},n.prototype.getFirstToken=function(e){for(var t=this.getChildren(),n=0;n<t.length;n++){var r=t[n];return r.kind<120?r:r.getFirstToken(e)}},n.prototype.getLastToken=function(e){for(var t=this.getChildren(e),n=t.length-1;n>=0;n--){var r=t[n];return r.kind<120?r:r.getLastToken(e)}},n}(),M=function(){function e(e,t){this.flags=e,this.name=t}return e.prototype.getFlags=function(){return this.flags},e.prototype.getName=function(){return this.name},e.prototype.getDeclarations=function(){return this.declarations},e.prototype.getDocumentationComment=function(){return void 0===this.documentationComment&&(this.documentationComment=n(this.declarations,this.name,!(4&this.flags))),this.documentationComment},e}(),P=function(){function e(e,t){this.checker=e,this.flags=t}return e.prototype.getFlags=function(){return this.flags},e.prototype.getSymbol=function(){return this.symbol},e.prototype.getProperties=function(){return this.checker.getPropertiesOfType(this)},e.prototype.getProperty=function(e){return this.checker.getPropertyOfType(this,e)},e.prototype.getApparentProperties=function(){return this.checker.getAugmentedPropertiesOfType(this)},e.prototype.getCallSignatures=function(){return this.checker.getSignaturesOfType(this,0)},e.prototype.getConstructSignatures=function(){return this.checker.getSignaturesOfType(this,1)},e.prototype.getStringIndexType=function(){return this.checker.getIndexTypeOfType(this,0)},e.prototype.getNumberIndexType=function(){return this.checker.getIndexTypeOfType(this,1)},e}(),O=function(){function e(e){this.checker=e}return e.prototype.getDeclaration=function(){return this.declaration},e.prototype.getTypeParameters=function(){return this.typeParameters},e.prototype.getParameters=function(){return this.parameters},e.prototype.getReturnType=function(){return this.checker.getReturnTypeOfSignature(this)},e.prototype.getDocumentationComment=function(){return void 0===this.documentationComment&&(this.documentationComment=this.declaration?n([this.declaration],void 0,!1):[]),this.documentationComment},e}(),I=function(t){function n(){t.apply(this,arguments)}return __extends(n,t),n.prototype.getScriptSnapshot=function(){return this.scriptSnapshot},n.prototype.getNamedDeclarations=function(){if(!this.namedDeclarations){var t=this,n=[];e.forEachChild(t,function r(t){switch(t.kind){case 184:case 125:var i=t;if(i.name&&i.name.getFullWidth()>0){var o=n.length>0?n[n.length-1]:void 0;o&&i.symbol===o.symbol?i.body&&!o.body&&(n[n.length-1]=i):n.push(i),e.forEachChild(t,r)}break;case 185:case 186:case 187:case 188:case 189:case 191:case 127:case 128:case 136:t.name&&n.push(t);case 126:case 164:case 190:e.forEachChild(t,r);break;case 163:e.isFunctionBlock(t)&&e.forEachChild(t,r);break;case 123:if(!(112&t.flags))break;case 183:case 200:case 124:n.push(t)}}),this.namedDeclarations=n}return this.namedDeclarations},n.prototype.update=function(t,r,i,o){if(o&&e.Debug.shouldAssert(1)){var s=this.scriptSnapshot,a=t;if(e.Debug.assert(s.getLength()-o.span().length()+o.newLength()===a.getLength()),e.Debug.shouldAssert(3)){var c=s.getText(0,o.span().start()),l=a.getText(0,o.span().start());e.Debug.assert(c===l);var u=s.getText(o.span().end(),s.getLength()),p=a.getText(o.newSpan().end(),a.getLength());e.Debug.assert(u===p)}}return n.createSourceFileObject(this.filename,t,this.languageVersion,r,i)},n.createSourceFileObject=function(t,n,r,i,o){var s=e.createSourceFile(t,n.getText(0,n.getLength()),r,i,o);return s.scriptSnapshot=n,s},n}(N),R=function(){function t(t,n){e.Debug.assert(t>=0,"start"),e.Debug.assert(n>=0,"length"),this._start=t,this._length=n}return t.prototype.toJSON=function(){return{start:this._start,length:this._length}},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.end()},t.prototype.containsTextSpan=function(e){return e._start>=this._start&&e.end()<=this.end()},t.prototype.overlapsWith=function(e){var t=Math.max(this._start,e._start),n=Math.min(this.end(),e.end());return n>t},t.prototype.overlap=function(e){var n=Math.max(this._start,e._start),r=Math.min(this.end(),e.end());return r>n?t.fromBounds(n,r):void 0},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(e){var n=Math.max(this._start,e._start),r=Math.min(this.end(),e.end());return r>=n?t.fromBounds(n,r):void 0},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=R;var D=function(){function t(t,n){e.Debug.assert(n>=0,"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 R(this.span().start(),this.newLength())},t.prototype.isUnchanged=function(){return this.span().isEmpty()&&0===this.newLength()},t.collapseChangesAcrossMultipleVersions=function(e){if(0===e.length)return t.unchanged;if(1===e.length)return e[0];for(var n=e[0],r=n.span().start(),i=n.span().end(),o=r+n.newLength(),s=1;s<e.length;s++){var a=e[s],c=r,l=i,u=o,p=a.span().start(),d=a.span().end(),h=p+a.newLength();r=Math.min(c,p),i=Math.max(l,l+(d-u)),o=Math.max(h,h+(u-d))}return new t(R.fromBounds(r,i),o-r)},t.unchanged=new t(new R(0,0),0),t}();e.TextChangeRange=D;var V=function(){function e(){}return e}();e.TextChange=V,function(e){e[e.aliasName=0]="aliasName",e[e.className=1]="className",e[e.enumName=2]="enumName",e[e.fieldName=3]="fieldName",e[e.interfaceName=4]="interfaceName",e[e.keyword=5]="keyword",e[e.lineBreak=6]="lineBreak",e[e.numericLiteral=7]="numericLiteral",e[e.stringLiteral=8]="stringLiteral",e[e.localName=9]="localName",e[e.methodName=10]="methodName",e[e.moduleName=11]="moduleName",e[e.operator=12]="operator",e[e.parameterName=13]="parameterName",e[e.propertyName=14]="propertyName",e[e.punctuation=15]="punctuation",e[e.space=16]="space",e[e.text=17]="text",e[e.typeParameterName=18]="typeParameterName",e[e.enumMemberName=19]="enumMemberName",e[e.functionName=20]="functionName",e[e.regularExpressionLiteral=21]="regularExpressionLiteral"}(e.SymbolDisplayPartKind||(e.SymbolDisplayPartKind={}));e.SymbolDisplayPartKind;!function(e){e[e.JavaScript=0]="JavaScript",e[e.SourceMap=1]="SourceMap",e[e.Declaration=2]="Declaration"}(e.OutputFileType||(e.OutputFileType={}));e.OutputFileType;!function(e){e[e.Start=0]="Start",e[e.InMultiLineCommentTrivia=1]="InMultiLineCommentTrivia",e[e.InSingleQuoteStringLiteral=2]="InSingleQuoteStringLiteral",e[e.InDoubleQuoteStringLiteral=3]="InDoubleQuoteStringLiteral"}(e.EndOfLineState||(e.EndOfLineState={}));e.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"}(e.TokenClass||(e.TokenClass={}));var F=(e.TokenClass,function(){function e(){}return e.unknown="",e.keyword="keyword",e.scriptElement="script",e.moduleElement="module",e.classElement="class",e.interfaceElement="interface",e.typeElement="type",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.label="label",e.alias="alias",e.constElement="const",e.letElement="let",e}());e.ScriptElementKind=F;var H=function(){function e(){}return e.none="",e.publicMemberModifier="public",e.privateMemberModifier="private",e.protectedMemberModifier="protected",e.exportedModifier="export",e.ambientModifier="declare",e.staticModifier="static",e}();e.ScriptElementKindModifier=H;var B=function(){function e(){}return e.comment="comment",e.identifier="identifier",e.keyword="keyword",e.numericLiteral="number",e.operator="operator",e.stringLiteral="string",e.whiteSpace="whitespace",e.text="text",e.punctuation="punctuation",e.className="class name",e.enumName="enum name",e.interfaceName="interface name",e.moduleName="module name",e.typeParameterName="type parameter name",e.typeAlias="type alias name",e}();e.ClassificationTypeNames=B;var $;!function(e){e[e.none=0]="none",e[e.exact=1]="exact",e[e.substring=2]="substring",e[e.prefix=3]="prefix"}($||($={})),e.displayPartsToString=r,e.getDefaultCompilerOptions=o;var G=function(){function e(){}return e}();e.OperationCanceledException=G;var U=function(){function e(e){this.cancellationToken=e}return e.prototype.isCancellationRequested=function(){return this.cancellationToken&&this.cancellationToken.isCancellationRequested()},e.prototype.throwIfCancellationRequested=function(){if(this.isCancellationRequested())throw new G},e.None=new e(null),e}();e.CancellationTokenObject=U;var W=function(){function t(t){this.host=t,this.filenameToEntry={};for(var n=t.getScriptFileNames(),r=0,i=n.length;i>r;r++){var s=n[r];this.filenameToEntry[e.normalizeSlashes(s)]={filename:s,version:t.getScriptVersion(s),isOpen:t.getScriptIsOpen(s)}}this._compilationSettings=t.getCompilationSettings()||o()}return t.prototype.compilationSettings=function(){return this._compilationSettings},t.prototype.getEntry=function(t){return t=e.normalizeSlashes(t),e.lookUp(this.filenameToEntry,t)},t.prototype.contains=function(e){return!!this.getEntry(e)},t.prototype.getHostfilename=function(e){var t=this.getEntry(e);return t?t.filename:e},t.prototype.getFilenames=function(){var t=this,n=[];return e.forEachKey(this.filenameToEntry,function(r){e.hasProperty(t.filenameToEntry,r)&&n.push(r)}),n},t.prototype.getVersion=function(e){return this.getEntry(e).version},t.prototype.isOpen=function(e){return this.getEntry(e).isOpen},t.prototype.getScriptSnapshot=function(e){var t=this.getEntry(e);return t.sourceText||(t.sourceText=this.host.getScriptSnapshot(t.filename)),t.sourceText},t.prototype.getChangeRange=function(e,t,n){var r=this.getVersion(e);if(t===r)return D.unchanged;var i=this.getScriptSnapshot(e);return i.getChangeRange(n)},t}(),j=function(){function t(e){this.host=e,this.currentFilename="",this.currentFileVersion=null,this.currentSourceFile=null}return t.prototype.initialize=function(t){function n(t){function n(t){t.parent=r;var i=r;r=t,e.forEachChild(t,n),r=i}var r=t;e.forEachChild(t,n)}var r=(new Date).getTime();this.hostCache=new W(this.host),this.host.log("SyntaxTreeCache.Initialize: new HostCache: "+((new Date).getTime()-r));var i,a=this.hostCache.getVersion(t);if(this.currentFilename!==t){var c=this.hostCache.getScriptSnapshot(t),r=(new Date).getTime();i=s(t,c,o(),a,!0),this.host.log("SyntaxTreeCache.Initialize: createSourceFile: "+((new Date).getTime()-r));var r=(new Date).getTime();n(i),this.host.log("SyntaxTreeCache.Initialize: fixupParentRefs : "+((new Date).getTime()-r))}else if(this.currentFileVersion!==a){var c=this.hostCache.getScriptSnapshot(t),l=this.hostCache.getChangeRange(t,this.currentFileVersion,this.currentSourceFile.getScriptSnapshot()),r=(new Date).getTime();i=l?this.currentSourceFile.update(c,a,!0,l):s(t,c,o(),a,!0),this.host.log("SyntaxTreeCache.Initialize: updateSourceFile: "+((new Date).getTime()-r));var r=(new Date).getTime();n(i),this.host.log("SyntaxTreeCache.Initialize: fixupParentRefs : "+((new Date).getTime()-r))}i&&(this.currentFileVersion=a,this.currentFilename=t,this.currentSourceFile=i)},t.prototype.getCurrentSourceFile=function(e){return this.initialize(e),this.currentSourceFile},t.prototype.getCurrentScriptSnapshot=function(e){return this.getCurrentSourceFile(e).getScriptSnapshot()},t}();e.createDocumentRegistry=a,e.preProcessFile=c;var z;!function(e){e[e.None=0]="None",e[e.Value=1]="Value",e[e.Type=2]="Type",e[e.Namespace=4]="Namespace",e[e.All=7]="All"}(z||(z={}));var q;!function(e){e[e.None=0]="None",e[e.Unlabeled=1]="Unlabeled",e[e.Labeled=2]="Labeled",e[e.All=3]="All"}(q||(q={}));for(var K=[],Y=64;119>=Y;Y++)K.push({name:e.tokenToString(Y),kind:F.keyword,kindModifiers:H.none});e.createLanguageService=C,e.createClassifier=k,x()}(ts||(ts={}));var ts;!function(e){var t;!function(t){function n(t,n){function r(t,n){return e.TextSpan.fromBounds(t.getStart(),(n||t).getEnd())}function i(e,n){return e&&l===t.getLineAndCharacterFromPosition(e.getStart()).line?a(e):a(n)}function o(n){return a(e.findPrecedingToken(n.pos,t))}function s(t){return a(e.findNextToken(t,t.parent))}function a(n){function c(n){if(171===n.parent.kind)return a(n.parent);var i=164===n.parent.kind,o=170===n.parent.kind&&e.contains(n.parent.declarations,n),s=i?n.parent.declarations:o?n.parent.declarations:void 0;if(n.initializer||1&n.flags)return s&&s[0]===n?i?r(n.parent,n):(e.Debug.assert(o),r(e.findPrecedingToken(n.pos,t,n.parent),n)):r(n);if(s&&s[0]!==n){var l=e.indexOf(s,n);return c(s[l-1])}}function l(e){return!!e.initializer||void 0!==e.dotDotDotToken||!!(16&e.flags)||!!(32&e.flags)}function u(t){if(l(t))return r(t);var n=t.parent,i=e.indexOf(n.parameters,t);return i?u(n.parameters[i-1]):a(n.body)}function p(e){return!!(1&e.flags)||185===e.parent.kind&&126!==e.kind}function d(e){return e.body?p(e)?r(e):a(e.body):void 0}function h(e){var t=e.statements.length?e.statements[0]:e.getLastToken();return p(e.parent)?i(e.parent,t):a(t)}function m(n){switch(n.parent.kind){case 189:if(1!==e.getModuleInstanceState(n.parent))return void 0;case 169:case 167:case 171:return i(n.parent,n.statements[0]);case 170:return i(e.findPrecedingToken(n.pos,t,n.parent),n.statements[0])}return a(n.statements[0])}function f(e){return e.declarations?a(e.declarations[0]):e.initializer?a(e.initializer):e.condition?r(e.condition):e.iterator?r(e.iterator):void 0}function g(n){switch(n.parent.kind){case 188:var r=n.parent;return i(e.findPrecedingToken(n.pos,t,n.parent),r.members.length?r.members[0]:r.getLastToken(t));case 185:var o=n.parent;return i(e.findPrecedingToken(n.pos,t,n.parent),o.members.length?o.members[0]:o.getLastToken(t));case 176:return i(n.parent,n.parent.clauses[0])}return a(n.parent)}function v(t){switch(t.parent.kind){case 190:if(1!==e.getModuleInstanceState(t.parent.parent))return void 0;case 188:case 185:return r(t);case 163:if(e.isFunctionBlock(t.parent))return r(t);case 180:case 197:case 181:return a(t.parent.statements[t.parent.statements.length-1]);case 176:var n=t.parent,i=n.clauses[n.clauses.length-1];return i?a(i.statements[i.statements.length-1]):void 0;default:return a(t.parent)}}function y(e){return 168===e.parent.kind?o(e):a(e.parent)}function _(e){switch(e.parent.kind){case 150:case 184:case 151:case 125:case 127:case 128:case 126:case 169:case 168:case 170:return o(e);default:return a(e.parent)}return a(e.parent)}function b(t){return e.isAnyFunction(t.parent)||198===t.parent.kind?o(t):a(t.parent)}function T(e){return 148===e.parent.kind?a(e.parent.expression):a(e.parent)}function E(t){return 168===t.parent.kind?r(t,e.findNextToken(t.parent.expression,t.parent)):a(t.parent)}if(n){if(e.isExpression(n)){if(168===n.parent.kind)return o(n);if(170===n.parent.kind)return r(n);if(157===n.parent.kind&&22===n.parent.operator)return r(n);if(151==n.parent.kind&&n.parent.body==n)return r(n)}switch(n.kind){case 164:return c(n.declarations[0]);case 183:case 124:return c(n);case 123:return u(n);case 184:case 125:case 127:case 128:case 126:case 150:case 151:return d(n);case 163:if(e.isFunctionBlock(n))return h(n);case 180:case 181:case 190:return m(n);case 197:return m(n.block);case 166:return r(n.expression);case 174:return r(n.getChildAt(0),n.expression);case 169:return r(n,e.findNextToken(n.expression,n));case 168:return a(n.statement);case 182:return r(n.getChildAt(0));case 167:return r(n,e.findNextToken(n.expression,n));case 177:return a(n.statement);case 173:case 172:return r(n.getChildAt(0),n.label);case 170:return f(n);case 171:return r(n,e.findNextToken(n.expression,n));case 176:return r(n,e.findNextToken(n.expression,n));case 194:case 195:return a(n.statements[0]);case 179:return m(n.tryBlock);case 178:return r(n,n.expression);case 192:return r(n,n.exportName);case 191:return r(n,n.moduleReference);case 189:if(1!==e.getModuleInstanceState(n))return void 0;case 185:case 188:case 200:case 145:case 146:return r(n);case 175:return a(n.statement);case 186:case 187:return void 0;case 21:case 1:return i(e.findPrecedingToken(n.pos,t));case 22:return o(n);case 13:return g(n);case 14:return v(n);case 15:return y(n);case 16:return _(n);case 50:return b(n);case 24:case 23:return T(n);case 98:return E(n);case 74:case 66:case 79:return s(n);default:return 198===n.parent.kind&&n.parent.name===n?a(n.parent.initializer):148===n.parent.kind&&n.parent.type===n?a(n.parent.expression):e.isAnyFunction(n.parent)&&n.parent.type===n?o(n):a(n.parent)}}}if(1024&t.flags)return void 0;var c=e.getTokenAtPosition(t,n),l=t.getLineAndCharacterFromPosition(n).line;return t.getLineAndCharacterFromPosition(c.getStart()).line>l&&(c=e.findPrecedingToken(c.pos,t),!c||t.getLineAndCharacterFromPosition(c.getEnd()).line!==l)?void 0:e.isInAmbientContext(c)?void 0:a(c)}t.spanInSourceFileAtLocation=n}(t=e.BreakpointResolver||(e.BreakpointResolver={}))}(ts||(ts={}));var debugObjectHost=this,ts;!function(e){function t(e,t){e.log("*INTERNAL ERROR* - Exception in typescript services: "+t.message)}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 s=i;s.length>128&&(s=s.substring(0,128)+"..."),e.log("  result.length="+s.length+", result='"+JSON.stringify(s)+"'")}return i}function r(r,i,o){try{var s=n(r,i,o);return JSON.stringify({result:s})}catch(a){return a instanceof e.OperationCanceledException?JSON.stringify({canceled:!0}):(t(r,a),a.description=i,JSON.stringify({error:a}))}}var i=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.getChangeRange=function(t){var n=t,r=this.scriptSnapshotShim.getChangeRange(n.scriptSnapshotShim);if(null==r)return null;var i=JSON.parse(r);return new e.TextChangeRange(new e.TextSpan(i.span.start,i.span.length),i.newLength)},t}(),o=function(){function e(e){this.shimHost=e}return e.prototype.log=function(e){this.shimHost.log(e)},e.prototype.getCompilationSettings=function(){var e=this.shimHost.getCompilationSettings();if(null==e||""==e)throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings");return JSON.parse(e)},e.prototype.getScriptFileNames=function(){var e=this.shimHost.getScriptFileNames();return JSON.parse(e)},e.prototype.getScriptSnapshot=function(e){return new i(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.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.getCancellationToken=function(){return this.shimHost.getCancellationToken()},e.prototype.getDefaultLibFilename=function(e){return this.shimHost.getDefaultLibFilename(JSON.stringify(e))},e.prototype.getCurrentDirectory=function(){return this.shimHost.getCurrentDirectory()},e}();e.LanguageServiceShimHostAdapter=o;var s=function(){function e(e){this.factory=e,e.registerShim(this)}return e.prototype.dispose=function(){this.factory.unregisterShim(this)},e}(),a=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(e,t){return r(this.logger,e,t)},n.prototype.dispose=function(e){this.logger.log("dispose()"),this.languageService.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){this.forwardJSONCall("refresh("+e+")",function(){return null})},n.prototype.cleanupSemanticCache=function(){var e=this;this.forwardJSONCall("cleanupSemanticCache()",function(){return e.languageService.cleanupSemanticCache(),null})},n.realizeDiagnostic=function(t){return{message:t.messageText,start:t.start,length:t.length,category:e.DiagnosticCategory[t.category].toLowerCase(),code:t.code}},n.prototype.getSyntacticClassifications=function(t,n,r){var i=this;return this.forwardJSONCall("getSyntacticClassifications('"+t+"', "+n+", "+r+")",function(){var o=i.languageService.getSyntacticClassifications(t,new e.TextSpan(n,r));return o})},n.prototype.getSemanticClassifications=function(t,n,r){var i=this;return this.forwardJSONCall("getSemanticClassifications('"+t+"', "+n+", "+r+")",function(){var o=i.languageService.getSemanticClassifications(t,new e.TextSpan(n,r));return o})},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.getCompilerOptionsDiagnostics=function(){var e=this;return this.forwardJSONCall("getCompilerOptionsDiagnostics()",function(){var t=e.languageService.getCompilerOptionsDiagnostics();return t.map(n.realizeDiagnostic)})},n.prototype.getQuickInfoAtPosition=function(e,t){var n=this;return this.forwardJSONCall("getQuickInfoAtPosition('"+e+"', "+t+")",function(){var r=n.languageService.getQuickInfoAtPosition(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.getSignatureHelpItems=function(e,t){var n=this;return this.forwardJSONCall("getSignatureHelpItems('"+e+"', "+t+")",function(){var r=n.languageService.getSignatureHelpItems(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.getRenameInfo=function(e,t){var n=this;return this.forwardJSONCall("getRenameInfo('"+e+"', "+t+")",function(){return n.languageService.getRenameInfo(e,t)})},n.prototype.findRenameLocations=function(e,t,n,r){var i=this;return this.forwardJSONCall("findRenameLocations('"+e+"', "+t+", "+n+", "+r+")",function(){return i.languageService.findRenameLocations(e,t,n,r)})},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);return r.languageService.getIndentationAtPosition(e,t,i)})},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.getCompletionsAtPosition=function(e,t){var n=this;return this.forwardJSONCall("getCompletionsAtPosition('"+e+"', "+t+")",function(){var r=n.languageService.getCompletionsAtPosition(e,t);return r})},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),s=i.languageService.getFormattingEditsForRange(e,t,n,o);return s})},n.prototype.getFormattingEditsForDocument=function(e,t){var n=this;return this.forwardJSONCall("getFormattingEditsForDocument('"+e+"')",function(){var r=JSON.parse(t),i=n.languageService.getFormattingEditsForDocument(e,r);return i})},n.prototype.getFormattingEditsAfterKeystroke=function(e,t,n,r){var i=this;return this.forwardJSONCall("getFormattingEditsAfterKeystroke('"+e+"', "+t+", '"+n+"')",function(){var o=JSON.parse(r),s=i.languageService.getFormattingEditsAfterKeystroke(e,t,n,o);return s})},n.prototype.getNavigateToItems=function(e){var t=this;return this.forwardJSONCall("getNavigateToItems('"+e+"')",function(){var n=t.languageService.getNavigateToItems(e);return n})},n.prototype.getNavigationBarItems=function(e){var t=this;return this.forwardJSONCall("getNavigationBarItems('"+e+"')",function(){var n=t.languageService.getNavigationBarItems(e);return n})},n.prototype.getOutliningSpans=function(e){var t=this;return this.forwardJSONCall("getOutliningSpans('"+e+"')",function(){var n=t.languageService.getOutliningSpans(e);
return n})},n.prototype.getTodoComments=function(e,t){var n=this;return this.forwardJSONCall("getTodoComments('"+e+"')",function(){var r=n.languageService.getTodoComments(e,JSON.parse(t));return r})},n.prototype.getEmitOutput=function(e){var t=this;return this.forwardJSONCall("getEmitOutput('"+e+"')",function(){var n=t.languageService.getEmitOutput(e);return n})},n}(s),c=function(t){function n(n,r){t.call(this,n),this.logger=r,this.classifier=e.createClassifier(this.logger)}return __extends(n,t),n.prototype.getClassificationsForLine=function(e,t,n){for(var r=this.classifier.getClassificationsForLine(e,t,n),i=r.entries,o="",s=0;s<i.length;s++)o+=i[s].length+"\n",o+=i[s].classification+"\n";return o+=r.finalLexState},n}(s),l=function(t){function n(e,n){t.call(this,e),this.logger=n}return __extends(n,t),n.prototype.forwardJSONCall=function(e,t){return r(this.logger,e,t)},n.prototype.getPreProcessedFileInfo=function(t,n){return this.forwardJSONCall("getPreProcessedFileInfo('"+t+"')",function(){var t=e.preProcessFile(n.getText(0,n.getLength())),r={referencedFiles:[],importedFiles:[],isLibFile:t.isLibFile};return e.forEach(t.referencedFiles,function(t){r.referencedFiles.push({path:e.normalizePath(t.filename),position:t.pos,length:t.end-t.pos})}),e.forEach(t.importedFiles,function(t){r.importedFiles.push({path:e.normalizeSlashes(t.filename),position:t.pos,length:t.end-t.pos})}),r})},n.prototype.getDefaultCompilationSettings=function(){return this.forwardJSONCall("getDefaultCompilationSettings()",function(){return e.getDefaultCompilerOptions()})},n}(s),u=function(){function n(){this._shims=[],this.documentRegistry=e.createDocumentRegistry()}return n.prototype.getServicesVersion=function(){return e.servicesVersion},n.prototype.createLanguageServiceShim=function(n){try{var r=new o(n),i=e.createLanguageService(r,this.documentRegistry);return new a(this,n,i)}catch(s){throw t(n,s),s}},n.prototype.createClassifierShim=function(e){try{return new c(this,e)}catch(n){throw t(e,n),n}},n.prototype.createCoreServicesShim=function(e){try{return new l(this,e)}catch(n){throw t(e,n),n}},n.prototype.close=function(){this._shims=[],this.documentRegistry=e.createDocumentRegistry()},n.prototype.registerShim=function(e){this._shims.push(e)},n.prototype.unregisterShim=function(e){for(var t=0,n=this._shims.length;n>t;t++)if(this._shims[t]===e)return delete this._shims[t],void 0;throw new Error("Invalid operation")},n}();e.TypeScriptServicesFactory=u,"undefined"!=typeof module&&module.exports&&(module.exports=e)}(ts||(ts={}));var TypeScript;!function(e){var t;!function(e){e.TypeScriptServicesFactory=ts.TypeScriptServicesFactory}(t=e.Services||(e.Services={}))}(TypeScript||(TypeScript={})),this.ts=ts,this.TypeScript=TypeScript,define("vs/languages/typescript/lib/raw.typescriptServices",[],function(){return this.ts}),define("vs/text!vs/languages/typescript/lib/lib.d.ts",function(){return''
}),require.config({shim:{"vs/languages/typescript/lib/raw.typescriptServices":{exports:function(){return this.ts}}}}),define("vs/languages/typescript/lib/typescriptServices",["./raw.typescriptServices","vs/text!./lib.d.ts"],function(e){return e});/*---------------------------------------------------------
 * 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/languages/typescript/participants/filenameSuggestions",["require","exports","vs/base/strings","vs/base/paths","vs/base/collections","vs/base/lib/winjs.base","vs/base/network","vs/languages/typescript/lib/typescriptServices","vs/languages/typescript/project/typescriptProject"],function(e,t,n,r,i,o,s,a,c){var l=function(){function e(e,t,n){this._requestService=e,this._amd=t,this.basepath=n,"/"===this.basepath&&(this.basepath=null)}return e.prototype.makeModulePath=function(e,t,n){return e?this._toRequirePath(t,n):this._toReferencesPath(t,n)},e.prototype._toRequirePath=function(e,t){var i,o=r.dirname(t);if(this._amd&&this.basepath){var a=this._requestService.getPath("root",s.URL.fromValue(e));i=a.substr(this.basepath.length),i=n.ltrim(i,"/")}else i=r.join(r.relative(o,r.dirname(e)),r.basename(e)),n.startsWith(i,"..")||(i="./"+i);return i=n.rtrim(i,".ts"),i=n.rtrim(i,".js")},e.prototype._toReferencesPath=function(e,t){var n=r.dirname(t);return r.join(r.relative(n,r.dirname(e)),r.basename(e))},e}();t.PathMaker=l;var u=function(){function e(e){this._resourceServices=e.resourceService,this._requestService=e.requestService}return e.prototype.suggest=function(e,t,s){if(!(s&&s.syntaxTree&&s.project instanceof c.TypeScriptProject))return o.TPromise.as(null);var a=s.syntaxTree,u=this._findCurrentWord(e,t,a);if(!u)return o.TPromise.as(null);var p=s.project,d=p.compileConfiguration(),h=new l(this._requestService,n.equalsIgnoreCase(d.module,"amd"),d.baseUrl),m=e.toExternal(),f=this._requestService.getRequestUrl("root",n.empty,!0),g=this._requestService.getRequestUrl("root",d.scope,!0),v=/^['"]/.test(u.wordUntilPosition)?u.wordUntilPosition[0]:'"',y={currentWord:u.wordUntilPosition,suggestions:[]},_=Object.create(null);return p.contentResolver().accept(function(t){if(u.external&&n.endsWith(t.path,".d.ts"))return!0;var i=r.join(f,t.path);if(i===e.toExternal()||!r.isEqualOrParent(i,g))return!0;if(_[i])return!0;var o=h.makeModulePath(u.external,i,m);return _[i]={label:n.format("{0}{1}{0}",v,o),codeSnippet:n.rtrim(n.format("{0}{1}{0}",v,o),u.wordAfterPosition),documentationLabel:"."!==r.dirname(t.path)?n.format("{0} - {1}",r.basename(t.path),r.dirname(t.path)):t.path,type:"reference"},!0}).then(function(){return y.suggestions=i.values(_),y})},e.prototype._findCurrentWord=function(t,n,r){var i=this._resourceServices.get(t),o=i.getOffsetFromPosition(n),s=a.findTokenOnLeftOfPosition(r,o),c=r.referencedFiles.length;if(c>0&&r.referencedFiles[0].pos<=o&&o<=r.referencedFiles[c-1].end){var l=i.getLineContent(n.lineNumber),u=i.getOffsetFromPosition({lineNumber:n.lineNumber,column:1}),d=e._TrippleSlashReference.exec(l);if(d)return{wordUntilPosition:d[2].substring(0,o-(u+d[1].length)),wordAfterPosition:d[2].substring(o-(u+d[1].length)),external:!1}}else{if(p.isTokenPath(s,a.SyntaxKind.StringLiteral,a.SyntaxKind.ExternalModuleReference))return{wordUntilPosition:a.getTextOfNode(s).substr(0,o-s.getStart()),wordAfterPosition:a.getTextOfNode(s).substr(o-s.getStart()),external:!0};if(p.isTokenPath(s,a.SyntaxKind.StringLiteral,a.SyntaxKind.ArrayLiteralExpression,a.SyntaxKind.CallExpression)){var h=p.parent(s,2);if("require"===a.getTextOfNode(h.expression))return{wordUntilPosition:a.getTextOfNode(s).substr(0,o-s.getStart()),wordAfterPosition:a.getTextOfNode(s).substr(o-s.getStart()),external:!0}}else if(p.isTokenPath(s,a.SyntaxKind.StringLiteral,a.SyntaxKind.ArrayLiteralExpression,a.SyntaxKind.CallExpression)){var h=p.parent(s,2);if("define"===a.getTextOfNode(h.expression))return{wordUntilPosition:a.getTextOfNode(s).substr(0,o-s.getStart()),wordAfterPosition:a.getTextOfNode(s).substr(o-s.getStart()),external:!0}}}},e._TrippleSlashReference=/^(\/\/\/\s*<reference\s+path=)([^\s>]+)/i,e}();t.FilenameSuggestions=u;var p;!function(e){function t(e,t){for(;t-->0&&e;)e=e.parent;return e}function n(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(;t.length>0&&e;){var r=t.shift();if(r!==e.kind)return!1;e=e.parent}return!0}e.parent=t,e.isTokenPath=n}(p||(p={}))});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/languages/typescript/participants/filenameSuggestions.nls.keys",[],{});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
"use strict";define("vs/languages/typescript/participants/nlsParticipant",["require","exports","vs/nls!vs/languages/typescript/participants/nlsParticipant","vs/base/severity","vs/base/strings","vs/languages/typescript/lib/typescriptServices"],function(e,t,n,r,i,o){var s=function(){function e(e,t){this._sourceFile=e,this._model=t}return e.prototype.MarkNotLocalizedStrings=function(e){var t=[];this._markers=e;var n=function(e){e&&t.push(e)};t.push(this._sourceFile);do{var r=t.shift();r&&(this.isNlsLocalizeCall(r)||(this.markDoubleQuoteString(r),o.forEachChild(r,n)))}while(t.length>0)},e.prototype.isNlsLocalizeCall=function(e){if(e.kind===o.SyntaxKind.CallExpression){var t=e;if(t.expression.kind===o.SyntaxKind.PropertyAccessExpression){var n=t.expression;return i.equalsIgnoreCase(o.getTextOfNode(n.expression),"nls")&&i.equalsIgnoreCase(o.getTextOfNode(n.name),"localize")}}return!1},e.prototype.markDoubleQuoteString=function(t){if(t.kind===o.SyntaxKind.StringLiteral&&o.getTextOfNode(t).charCodeAt(0)===e._DoubleQuote){var i=this._model.getRangeFromOffsetAndLength(o.getTokenPosOfNode(t),t.getWidth());this._markers.push({severity:r.Info,message:n.localize("vs_languages_typescript_participants_nlsParticipant",0),startLineNumber:i.startLineNumber,startColumn:i.startColumn,endLineNumber:i.endLineNumber,endColumn:i.endColumn})}},e._DoubleQuote='"'.charCodeAt(0),e}(),a=function(){function e(){this._markers=[]}return e.prototype.validate=function(t,n,r){this._markers.length=0;var i=new s(r,t);i.MarkNotLocalizedStrings(this._markers),n.changeOne(e.ID,t.getAssociatedResource(),this._markers)},e.ID="vs.languages.typescript.nlsParticipant",e}();t.WorkerParticipant=a});/*---------------------------------------------------------
 * 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";define("vs/base/db/indexeddb",["require","exports","vs/base/types","vs/base/lib/winjs.base","vs/base/errors"],function(e,t,n,r,i){function o(){return"undefined"!=typeof indexedDB}function s(e,t,n){return new r.TPromise(function(r,i){var o;o="undefined"!=typeof t?indexedDB.open(e,t):indexedDB.open(e),o.onerror=function(e){return i(e)},o.onsuccess=function(e){return r(new u(e.target.result))},o.onupgradeneeded=function(e){if(!n)return i(e);var t=e.target.result;n({createDataStore:function(e){var n=t.createObjectStore(e.name,{keyPath:e.keyPath,autoIncrement:e.autoIncrement});e.index&&e.index.forEach(function(e){return n.createIndex(e.name,e.keyPath,e.options)})},deleteDataStore:function(e){t.deleteObjectStore(e)}},t)}})}function a(e){return new r.TPromise(function(t,n){e.onsuccess=function(){t(e)},e.onerror=function(t){n(e.error||t)}})}t.canBeUsed=o,function(e){e[e.ReadOnly=0]="ReadOnly",e[e.ReadWrite=1]="ReadWrite",e[e.VersionChange=2]="VersionChange"}(t.TransactionMode||(t.TransactionMode={}));var c,c=t.TransactionMode;!function(e){function t(t){return e[t]?e[t].toLowerCase():null}e.toString=t}(c=t.TransactionMode||(t.TransactionMode={})),function(e){e[e.Next=0]="Next",e[e.NextUnique=1]="NextUnique",e[e.Prev=2]="Prev",e[e.PrevUnique=3]="PrevUnique"}(t.Direction||(t.Direction={}));var l,l=t.Direction;!function(e){function t(t){return e[t]?e[t].toLowerCase():null}e.toString=t}(l=t.Direction||(t.Direction={})),t.openDatabase=s;var u=function(){function e(e){this._db=e}return Object.defineProperty(e.prototype,"db",{get:function(){return this._db},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._db.close()},e.prototype.createTransaction=function(e,t){return"undefined"!=typeof t?this._db.transaction(e,c.toString(t)):this._db.transaction(e)},e.prototype.objectStore=function(e){return this._db.objectStoreNames.contains(e)?new p(e,this):null},e}();t.Database=u;var p=function(){function e(e,t){this._name=e,this._database=t}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"store",{get:function(){return this._database.db.transaction(this._name).objectStore(this._name)},enumerable:!0,configurable:!0}),e.prototype.executeTransaction=function(e,t){var n=this;return new r.TPromise(function(r,o){var s,a;try{s=n._database.db.transaction(n._name,c.toString(e))}catch(l){return"InvalidStateError"===l.name&&(l=i.canceled()),o(l)}s.onerror=function(e){return o(e.target.error)},s.oncomplete=function(){return r(a)},s.onabort=function(){return o(i.canceled())};try{a=t(s.objectStore(n._name),s)}catch(l){s.abort(),o(l)}})},e.prototype.openCursor=function(e,t,n,r){return d.openCursor(this,null,e,t,n,r)},e.prototype.openIndexCursor=function(e,t,n,r,i){var o=this;return this.executeTransaction(t,function(){return d.openCursor(o,e,t,n,r,i)}).then(function(e){return e})},e.prototype.get=function(e){return this.executeTransaction(c.ReadOnly,function(t){return a(t.get(e))}).then(function(e){return e}).then(function(e){return e.result})},e}();t.ObjectStore=p;var d;!function(e){function t(e,t,i,o,s,a){var c,u=l.Next;return n.isFunction(o)?a=o:n.isFunction(s)?(c=o,a=s):(c=o,u=s),new r.TPromise(function(n,r){var o,s=[];e.executeTransaction(i,function(e){var n;n=t?e.index(t).openCursor(c,l.toString(u)):e.openCursor(c,l.toString(u)),n.onsuccess=function(t){var n=t.target;n.result&&s.push(a(n.result.value,n.result,e))},n.onerror=function(e){return o=e}}).then(function(){o?r(o):n(s)},r)})}e.openCursor=t}(d||(d={}))}),define("vs/languages/typescript/typescript",["require","exports","vs/platform/platform"],function(e,t,n){var r;!function(e){e.ResourceSetChanged="typescript.resourceSetChanged"}(r=t.Events||(t.Events={}));var i;!function(e){function t(e){i=e}function r(){return i}e.Identifier="vs.languages.typescript",n.Registry.add(e.Identifier,e);var i;e.setProjectResolver=t,e.getProjectResolver=r}(i=t.Extensions||(t.Extensions={}))}),define("vs/base/trie",["require","exports","vs/base/collections","vs/base/assert"],function(e,t,n,r){function i(e,t){void 0===t&&(t=h);var r,i;return r={_key:null,_parent:null,_children:{},parent:function(){return null},children:function(e){return void 0===e&&(e=!1),c(this,e)}},i={insert:function(e,n){return o(r,t(e),n)},lookUp:function(e,n){return void 0===n&&(n=!1),s(r,t(e),n)},roots:function(){return c(r,!1)},values:function(){return l(r)},fringe:function(){return u(r)},remove:function(e){return p(e)}},"undefined"!=typeof e&&n.forEach(e,function(e){i.insert(e.key,e.value)}),i}function o(e,t,n){for(var r=0,i=t.length,o=e;i>r&&(o=e._children[t[r]]);)e=o,r+=1;for(;i>r;)o={_key:t[r],_parent:e,_children:{},parent:function(){return a(this)},children:function(e){return void 0===e&&(e=!1),c(this,e)}},e._children[t[r]]=o,e=o,r+=1;return o.element=n,o}function s(e,t,n){for(var r=0,i=t.length,o=e,s=void 0!==o.element?o:void 0;i>r&&(o=e._children[t[r]]);)e=o,r+=1,void 0!==o.element&&(s=o);return o&&void 0!==o.element?o:n&&void 0!==s?s:null}function a(e){for(;e._parent;){if("undefined"!=typeof e._parent.element)return e._parent;e=e._parent}return null}function c(e,t){for(var r=[],i=n.values(e._children);i.length>0;)e=i.shift(),void 0!==e.element&&r.push(e),(t||void 0===e.element)&&i.push.apply(i,n.values(e._children));return r}function l(e){for(var t=[],r=[e];r.length>0;)e=r.pop(),void 0!==e.element&&t.push(e.element),n.forEach(e._children,function(e){r.push(e.value)});return t}function u(e){for(var t=[e],i=[];t.length>0;){var o=t.pop(),s=t.length;n.forEach(o._children,function(e){t.push(e.value)}),s===t.length&&null!==o._key&&(r.ok("undefined"!=typeof o.element),i.push(o))}return i}function p(e){return e._parent?e._parent._children[e._key]!==e?!1:(delete e._parent._children[e._key],"undefined"==typeof e._parent.element&&d(e._parent._children)&&p(e._parent),!0):!1}function d(e){if(!e)return!0;for(var t in e)if(m.call(e,t))return!1;return!0}var h=function(e){return e.split("")};t.newTrie=i;var m=Object.prototype.hasOwnProperty});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/project/projectResolver",["require","exports","vs/base/env","vs/base/hash","vs/base/strings","vs/base/paths","vs/base/errors","vs/base/lifecycle","vs/base/collections","vs/base/db/indexeddb","vs/base/lib/winjs.base","vs/platform/services","vs/languages/typescript/typescript","vs/base/trie"],function(e,t,n,r,i,o,s,a,c,l,u,p,d,h){var m;!function(e){function t(e){return"monaco_"+r.computeMurmur2StringHashCode(e)}function n(t,n){return l.openDatabase(t,1,function(t,n){for(var r=0,i=n.objectStoreNames.length;i>r;r++)t.deleteDataStore(n.objectStoreNames.item(r));t.createDataStore({name:e.storeName,keyPath:e.keyPath,index:[e.workspaceIndexOptions]})}).then(function(t){return n.push(t),t.objectStore(e.storeName)},function(){return null})}e.databaseName=t,e.keyPath="workspaceAbsolutePath",e.storeName="cache",e.workspaceIndexOptions={name:"workspaceName",keyPath:"workspaceName",options:{unique:!1}},e.openStore=n}(m||(m={}));var f=function(){function e(){}return e.prototype.resolve=function(){return null},e.Instance=new e,e}();t.NullProjectResolver=f;var g;!function(e){function t(e,t,n){for(var r=h.newTrie({},function(e){return e.split(o.sep).filter(function(e){return!i.isFalsyOrWhitespace(e)})}),s=h.newTrie(),a=!1,c=0,l=e.length;l>c;c++){var u=e[c];u&&(u.type===p.Files.FileChangeType.DELETED?s.insert(u.path,u):(u.type===p.Files.FileChangeType.ADDED||u.type===p.Files.FileChangeType.UPDATED)&&r.insert(u.path,u))}s.roots().forEach(function(e){n(e.element.path),a=!0});for(var d=r.roots();d.length>0;){var m=d.shift(),u=m.element;if(u.type===p.Files.FileChangeType.ADDED)t(u.path);else if(u.type===p.Files.FileChangeType.UPDATED){var f=m.children(),l=f.length;if(0===l)continue;for(var g=0,c=0;l>c;c++)f[c].element.type===p.Files.FileChangeType.ADDED&&(g+=1);g>1?(t(u.path),a=!0):d.push.apply(d,f)}}return a}e.minimize=t}(g=t.FileEventProcessing||(t.FileEventProcessing={}));var v=function(){function e(e,t){var n=this;this._fileService=e.fileService,this._eventService=e.eventService,this._options=t,this._disposables=[];var r=e.eventService.addListener(p.Files.EventType.FILE_CHANGES,function(e){var t=e.filter(function(e,t){return".git"!==t[0]}).changes;g.minimize(t,function(e){return n._handleAdded(e)},function(e){return n._handleDelete(e)})&&n._eventService.emit(d.Events.ResourceSetChanged)});this._disposables.push({dispose:r}),this._pendingOperations=[u.TPromise.timeout(0).then(function(){return n._resolveStatsAndContents("/")})]}return e.prototype.dispose=function(){this._disposables=a.disposeAll(this._disposables)},e.prototype._handleDelete=function(e){this._pendingOperations.push(u.TPromise.as({removed:[e]}))},e.prototype._handleAdded=function(e){this._pendingOperations.push(this._resolveStatsAndContents(e))},e.prototype.resolve=function(){var e=this,t=this._pendingOperations.length;if(0===t)return u.TPromise.as({});if(this._resolverError)return u.TPromise.wrapError(this._resolverError);var n={added:[],removed:[],hasChanges:!1};return u.TPromise.join(this._pendingOperations.splice(0,t).map(function(t){return t.then(function(e){n.added.push.apply(n.added,e.added),n.removed.push.apply(n.removed,e.removed),n.hasChanges=n.hasChanges||e.hasChanges},function(t){if(!s.isPromiseCanceledError(t))throw e._resolverError=t,t})})).then(function(){return n},function(t){e._resolverError=t})},e.prototype._resolveStatsAndContents=function(e){var t=this;return this._fetchStats(e).then(function(n){return t._fetchContents(e,n)},function(e){if(404===e.status)return[];throw e}).then(function(e){return{added:e}})},e.prototype._fetchStats=function(e){return this._fileService.resolveFileStats(e,this._options.pattern)},e.prototype._fetchContents=function(e,t){return this._fileService.resolveContents(t.map(function(e){return e.path}))},e}(),y=function(){function e(){this._value=Object.create(null)}return e.prototype.change=function(){this._value=Object.create(null)},Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e}(),_=function(e){function t(t,n){e.call(this,t,n),this._workspaceName=t.contextService.getWorkspace().name,this._databaseName=m.databaseName(n.modeId),this._state=new y}return __extends(t,e),t.prototype._getObjectStore=function(){return this._objectStorePromise||(this._objectStorePromise=m.openStore(this._databaseName,this._disposables)),this._objectStorePromise},t.prototype._handleDelete=function(t){var n=this;this._pendingOperations.push(this._getObjectStore().then(function(e){return e?e.openIndexCursor(m.workspaceIndexOptions.name,l.TransactionMode.ReadWrite,IDBKeyRange.only(n._workspaceName),function(e,r,i){o.isEqualOrParent(e.content.path,t)&&(i.delete(e.workspaceAbsolutePath),n._state.change()),r.continue()}):void 0})),e.prototype._handleDelete.call(this,t)},t.prototype._resolveStatsAndContents=function(t){var n=this,r=this._state.value;return e.prototype._resolveStatsAndContents.call(this,t).then(function(e){return e.hasChanges=r!==n._state.value,e})},t.prototype._fetchContents=function(t,n){var r=this;return this._getObjectStore().then(function(i){return i?r._doFetchContents(i,t,n).then(function(e){return e.persistedContents.concat(e.volatileContents)}):e.prototype._fetchContents.call(r,t,n)})},t.prototype._doFetchContents=function(t,n,r){var i=this,a=o.join(this._workspaceName,n),u={},d={volatileContents:[],persistedContents:[]};return r.forEach(function(e){var t=o.join(i._workspaceName,e.path);if(c.lookupOrInsert(u,t,e)!==e)throw new Error("path collision between two different stat objects. path: "+t)}),t.openIndexCursor(m.workspaceIndexOptions.name,l.TransactionMode.ReadWrite,IDBKeyRange.only(this._workspaceName),function(e,t,n){var r=c.lookup(u,e.workspaceAbsolutePath);o.isEqualOrParent(e.workspaceAbsolutePath,a)&&(r&&r.etag===e.content.etag&&p.Files.isIContent(e.content)?(delete u[e.workspaceAbsolutePath],d.persistedContents.push(e.content)):(n.delete(e.workspaceAbsolutePath),i._state.change())),t.continue()}).then(function(){return e.prototype._fetchContents.call(i,n,c.values(u))}).then(function(e){return t.executeTransaction(l.TransactionMode.ReadWrite,function(t){e.forEach(function(e){t.put({workspaceName:i._workspaceName,workspaceAbsolutePath:o.join(i._workspaceName,e.path),content:{charset:e.charset,etag:e.etag,mime:e.mime,mtime:e.mtime,name:e.name,path:e.path,value:e.value}}),i._state.change(),d.persistedContents.push(e)})}).then(void 0,function(t){if(!s.isPromiseCanceledError(t))throw t;d.volatileContents=e})}).then(function(){return d})},t}(v),b=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype._doFetchContents=function(t,n,r){return e.prototype._doFetchContents.call(this,t,n,r).then(function(e){return e.persistedContents.length=0,e})},t}(_),T=function(){function e(e,t){this._delegate=e.fileService?l.canBeUsed()?n.browser.isFirefox?e.instantiationService.createInstance(_,t):e.instantiationService.createInstance(b,t):e.instantiationService.createInstance(v,t):f.Instance}return e.prototype.resolve=function(){return this._delegate.resolve()},e}();t.ProjectResolver=T;var E=function(){function e(e,t){this._disposables=[],this._workspaceName=e.contextService.getWorkspace().name,this._databaseName=m.databaseName(t)}return e.prototype.dispose=function(){this._disposables=a.disposeAll(this._disposables)},e.prototype.resolve=function(e){if(i.isFalsyOrWhitespace(this._workspaceName))return u.TPromise.as(null);var t=o.join(this._workspaceName,e);return this._getObjectStore().then(function(e){return e?e.get(t).then(function(e){return e?e.content:null}):null})},e.prototype.accept=function(e){var t,n=this;return new u.TPromise(function(r,i){n._getObjectStore().then(function(r){return r?r.openIndexCursor(m.workspaceIndexOptions.name,l.TransactionMode.ReadWrite,IDBKeyRange.only(n._workspaceName),function(n,r){e(n.content),t||r.continue()}):void 0}).then(function(){return r(null)},i)},function(){t=s.canceled()})},e.prototype._getObjectStore=function(){return this._objectStorePromise||(this._objectStorePromise=m.openStore(this._databaseName,this._disposables)),this._objectStorePromise},e}();t.DatabaseContentResolver=E});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/languages/typescript/project/projectResolver.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/xml/xml",["require","exports","vs/editor/modes/modes","vs/editor/modes/supports","vs/editor/modes/modesExtensions","vs/platform/services","vs/platform/thread/attribute"],function(e,t,n,r,i,o,s){var a=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n):!1},t.prototype.nextName=function(e){return e.advanceIfRegExp(/^[_:\w][_:\w-.\d]*/)},t.prototype.nextAttrValue=function(e){return e.advanceIfRegExp(/^("|').*?\1/)},t}(i.AbstractState),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.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n):!1},t.prototype.tokenize=function(e){return e.advanceIfString("<!--").length>0?{type:"comment.xml",bracket:n.Bracket.Open,nextState:new l(this.getMode())}:e.advanceIfString("<![CDATA[").length>0?{type:"delimiter.start.xml",bracket:n.Bracket.Open,nextState:new b(this.getMode())}:e.advanceIfString("</").length>0?{type:"delimiter.end.xml",bracket:n.Bracket.Open,nextState:new g(this.getMode())}:e.advanceIfString("<?").length>0?{type:"delimiter.start.xml",bracket:n.Bracket.Open,nextState:new v(this.getMode())}:e.advanceIfString("<").length>0?{type:"delimiter.start.xml",bracket:n.Bracket.Open,nextState:new u(this.getMode())}:(e.next(),{type:"",bracket:n.Bracket.None})},t}(a),l=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode())},t.prototype.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n):!1},t.prototype.tokenize=function(e){return e.advanceUntil("-->",!1).length>0?{type:"comment.xml.content"}:e.advanceIfString("-->").length>0?{type:"comment.xml",bracket:n.Bracket.Close,nextState:new c(this.getMode())}:(e.next(),{type:"comment.xml.content"})},t}(a),u=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode())},t.prototype.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n):!1},t.prototype.tokenize=function(e){var t=this.nextName(e);return t.length>0?{type:"tag.xml.tag-"+t,bracket:n.Bracket.Open,nextState:new d(this.getMode(),t)}:(e.next(),{type:""})},t}(a),p=function(){function e(e){this.tagName=e}return e.prototype.create=function(e){return new d(e,this.tagName)},e.prototype.equals=function(t){return t instanceof e?this.tagName===t.tagName:!1},e}(),d=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(n){return n instanceof t?e.prototype.equals.call(this,n)&&this.tagName===n.tagName:!1},t.prototype.tokenize=function(e){if(e.skipWhitespace().length>0)return{type:""};var t=this.nextName(e),r=null;return t.length>0?{type:"attribute.name.xml",bracket:n.Bracket.None,nextState:new h(this.getMode(),new p(this.tagName))}:(r=e.advanceIfRegExp(/^\/?>/)).length>0?"/"===r.charAt(0)?(e.goBack(1),{type:"tag.xml.tag-"+this.tagName,bracket:n.Bracket.Close,nextState:new f(this.getMode())}):{type:"delimiter.start.xml",bracket:n.Bracket.Close,nextState:new c(this.getMode())}:(e.next(),{type:""})},t}(a),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.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n)&&this.tagStateCreator.equals(n.tagStateCreator):!1},t.prototype.tokenize=function(e){return e.skipWhitespace().length>0||e.eos()?{type:""}:"="===e.peek()?(e.next(),{type:"",bracket:n.Bracket.None,nextState:new m(this.getMode(),this.tagStateCreator)}):this.tagStateCreator.create(this.getMode()).tokenize(e)},t}(a),m=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.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n)&&this.tagStateCreator.equals(n.tagStateCreator):!1},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:n.Bracket.None,nextState:this.tagStateCreator.create(this.getMode())}:this.tagStateCreator.create(this.getMode()).tokenize(e)},t}(a),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.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n):!1},t.prototype.tokenize=function(e){var t=e.next();if(">"!==t)throw new Error("Should never happen");return{type:"delimiter.start.xml",bracket:n.Bracket.Close,nextState:new c(this.getMode())}},t}(a),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.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n):!1},t.prototype.tokenize=function(e){var t=this.nextName(e);return t.length>0?{type:"tag.xml.tag-"+t,bracket:n.Bracket.Close}:e.advanceIfString(">").length>0?{type:"delimiter.end.xml",bracket:n.Bracket.Close,nextState:new c(this.getMode())}:e.advanceUntil(">",!1).length>0?{type:""}:(e.next(),{type:""})},t}(a),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.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n):!1},t.prototype.tokenize=function(e){var t=this.nextName(e);return t.length>0?{type:"meta.xml."+t,bracket:n.Bracket.None,nextState:new _(this.getMode())}:(e.next(),{type:"meta.xml"})},t}(a),y=function(){function e(){}return e.prototype.create=function(e){return new _(e)},e.prototype.equals=function(e){return e instanceof p?!0:!1},e.INSTANCE=new e,e}(),_=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode())},t.prototype.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n):!1},t.prototype.tokenize=function(e){if(e.skipWhitespace().length>0)return{type:""};var t=this.nextName(e);return t.length>0?{type:"attribute.name.xml",bracket:n.Bracket.None,nextState:new h(this.getMode(),y.INSTANCE)}:e.advanceIfString("?>").length>0?{type:"delimiter.start.xml",bracket:n.Bracket.Close,nextState:new c(this.getMode())}:(e.next(),{type:""})},t}(a),b=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode())},t.prototype.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n):!1},t.prototype.tokenize=function(e){return e.advanceUntil("]]>",!1).length>0?{type:""}:e.advanceIfString("]]>").length>0?{type:"delimiter.start.xml",bracket:n.Bracket.Close,nextState:new c(this.getMode())}:(e.next(),{type:""})},t}(a),T=function(e){function t(t,n){var i=this;e.call(this,t,n,o.AsyncDescriptor.create("vs/languages/xml/xmlWorker","XMLWorker")),this.tokenizationSupport=new r.TokenizationSupport(this,{getInitialState:function(){return new c(i)}},!1),this.electricCharacterSupport=new r.ElectricCharacterSupport(this),this.formattingSupport=this,this.characterPairSupport=new r.CharacterPairSupport(this,[{open:'"',close:'"'}],[{open:"<",close:">"},{open:'"',close:'"'}])}return __extends(t,e),t.prototype.getNonWordTokenTypes=function(){return["delimiter.xml"]},t.prototype.getCommentsConfiguration=function(){return{blockCommentStartToken:"<!--",blockCommentEndToken:"-->"}},t.prototype.getElectricCharacters=function(){return[">"]},t.prototype.onEnter=function(e,t){if(0===e.getTokenCount())return null;for(var r=e.findIndexOfOffset(t-1),i=r;i>0&&""===e.getTokenType(i);)i--;return 0>i||"delimiter.start.html"!==e.getTokenType(i)?null:"/>"===e.getTokenText(i)?null:(i=r+1,i<e.getTokenCount()&&"delimiter.end.html"===e.getTokenType(i)?{indentAction:n.IndentAction.IndentOutdent}:{indentAction:n.IndentAction.Indent})},t.prototype.onElectricCharacter=function(e,n){var r=e.getLineContent();if(""===r)return null;var i=e.findIndexOfOffset(n),o={startIndex:e.getTokenStartIndex(i),type:e.getTokenType(i)};if(i>1&&"delimiter.end.xml"!==o.type){if("delimiter.start.xml"===o.type){var s;do s=o.startIndex,i--,o={startIndex:e.getTokenStartIndex(i),type:e.getTokenType(i)};while(i>=0&&0!==o.type.indexOf("tag.xml.tag-"));if(i>=0){var a=r.substring(o.startIndex,s);return"/"===a?null:{appendText:"</"+r.substring(o.startIndex,s)+">"}}return null}return null}do i--;while(i>=0&&""===e.getTokenType(i));return 0>i||!t.tagRegExp.test(e.getTokenType(i))?null:{matchBracketType:e.getTokenType(i)}},t.prototype._worker=function(t){return e.prototype._worker.call(this,t)},t.prototype.formatDocument=function(e,t){return this._worker(function(n){return n.format(e,null,t)})},t.prototype.formatRange=function(e,t,n){return this._worker(function(r){return r.format(e,t,n)})},t.tagRegExp=/^tag\.xml\./,t.$formatDocument=s.OneWorker(t,t.prototype.formatDocument),t.$formatRange=s.OneWorker(t,t.prototype.formatRange),t}(i.AbstractMode);t.XMLMode=T});/*---------------------------------------------------------
 * 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 o=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.format=function(e,t,r){var o=this.resourceService.get(e),s=t?o.getValueInRange(t):o.getValue(),a=i.style_html(s,{indent_size:r.insertSpaces?r.tabSize:1,indent_char:r.insertSpaces?" ":"	",max_char:256});return n.TPromise.as([{range:t,text:a}])},t}(r.AbstractWorkerMode);t.XMLWorker=o});/*---------------------------------------------------------
 * 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 o='<>"=/',s="	 ",a=n.createKeywordMatcher(["summary","reference","returns","param","loc"]),c=n.createKeywordMatcher(["type","path","name","locid","filename","format","optional"]),l=n.createKeywordMatcher(o.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(),i.safeStateClone(this.state),i.safeStateClone(this.parentState))},t.prototype.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n)&&i.safeStateEquals(this.state,n.state)&&i.safeStateEquals(this.parentState,n.parentState):!1},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.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n):!1},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 d=function(e){function t(t,n,r,i){void 0===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 n instanceof t?e.prototype.equals.call(this,n)&&this.whitespaceTokenType===n.whitespaceTokenType&&this.name===n.name&&i.safeStateEquals(this.parent,n.parent):!1},t.prototype.tokenize=function(e){return e.setTokenRules(o,s),e.skipWhitespace().length>0?{type:this.whitespaceTokenType}:this.stateTokenize(e)},t.prototype.stateTokenize=function(){throw r.notImplemented()},t}(i.AbstractState);t.VSXMLState=d;var h=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.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n):!1},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}(d);t.VSXMLString=h;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.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n):!1},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 h(this.getMode(),this)}:(a(t)?n="tag.vs":c(t)?n="attribute.name.vs":l(t)&&(n="delimiter.vs"),{type:n,nextState:this})},t}(d);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.equals=function(n){return n instanceof t?e.prototype.equals.call(this,n):!1},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}(d);t.VSXMLExpression=f});/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/
define("vs/languages/vsxml/vsxml.nls.keys",[],{});html, body {
    overflow: hidden;
}

#f12ConsoleSplitter {
    left: 0;
    right: 0;
    background-color: TRANSPARENT; /*[{plugin-perftools-grid-column-sizer}]*/
    cursor: ns-resize;
    height: 3px;
    display: none;
}
    body.showSplitter > #f12ConsoleSplitter {
        display: block;
    }

#mainContainer {
    display: -ms-grid;
    -ms-grid-rows: auto 1fr auto;
    -ms-grid-columns: 100%;
    height: 100%;
    width: 100%;
    position: relative;
}
    body.showSplitter > #mainContainer {
        height: calc(100% - 3px);
    }

#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 {
    background-color: TRANSPARENT;  /*[{plugin-font-console-inputarea-background-color}]*/  /* redline has #e8eef6 */
}
#input-singleLine::-ms-clear {
    display:none;
}

#input-multiLine {
    display: inline-block;
    border: none;
    height: inherit;
    width: inherit;
    background-color: TRANSPARENT;  /*[{plugin-font-console-inputarea-background-color}]*/  /* redline has #e8eef6 */
}

#input-singleLine,
#input-multiLine {
	/* Could have font: inherit, but Spartan sometimes reports the wrong value via getComputedStyle */
    font-family: Consolas, 'Lucida Console', monospace; /*[{plugin-font-console} , Lucida Console, monospace]*/
    font-size: 9pt; /*[{plugin-font-console-size}]*/
}

#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}]*/
}<!DOCTYPE html>
<!-- saved from url=(0016)http://localhost -->
<html>
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=11">
        <meta http-equiv="Content-Type" content="text/html">
        <meta http-equiv="format-detection" content="telephone=no">
        <title>Console</title>

        <link id="toolwindow.css" rel="stylesheet" href="../common/toolwindow.css" type="text/css" data-plugin-theme="true" />
        <link id="toolwindow.f12.css" rel="stylesheet" href="../common/toolwindow.f12.css" type="text/css" data-plugin-theme="true" />
        <link id="toolwindow.vs.css" rel="stylesheet" href="../common/toolwindow.vs.css" type="text/css" data-plugin-theme="true" />
        <link id="controls.css" rel="stylesheet" href="../common/controls/controls.css" type="text/css" data-plugin-theme="true" />
        <link id="intellisenseListBox.css" rel="stylesheet" href="../common/Intellisense/intellisenseListBox.css" type="text/css" data-plugin-theme="true" />
        <link id="console.css" rel="stylesheet" href="console.css" type="text/css" data-plugin-theme="true" />
        <link id="console.f12.css" rel="stylesheet" href="console.f12.css" type="text/css" data-plugin-theme="true" />
        <link id="console.vs.css" rel="stylesheet" href="console.vs.css" type="text/css" data-plugin-theme="true" />
        <link id="objectTreeView.css" rel="stylesheet" href="../common/ObjectView/objectTreeView.css" type="text/css" data-plugin-theme="true" />

        <!-- Daytona Includes -->
        <script type="text/javascript" src="../Common/isDebugBuild.js"></script>
        <script type="text/javascript" src="../Common/plugin.js"></script>

        <script id="intellisenseListBox" type="text/html">
            <ul class="intellisenseListBox"></ul>
        </script>

        <script type="text/javascript" src="../Common/CommonMerged.js"></script>  
        <script type="text/javascript" src="ConsoleMerged.js"></script>
        <script type="text/javascript" src="res://f12test.dll/23/selftest/SelfTestConsole.js"></script>

        <script type="text/javascript">
            // The main entry point
            F12.Tools.Console.App.main();
        </script>
    </head>
    <body tabindex="-1">
        <div id="f12ConsoleSplitter"></div>
        <div id="mainContainer">
            <div id="inputArea">
                <div id="inputSplitter"></div>
                <div id="inputLabel"><div>&nbsp;</div></div>
                <div id="inputBoxContainer">
                    <input id="input-singleLine" class="BPT-ConsoleInput" type="text" tabindex="1" />
                    <div id="inputMultilineContainer">
                        <textarea id="input-multiLine" class="BPT-ConsoleInput" tabindex="1" spellcheck="false"></textarea>
                    </div>
                </div>
                <div id="inputButtonContainer">
                    <div class="BPT-ConsoleButton">
                        <div id="clearInputButton" role="button" tabindex="1"></div>
                    </div>
                    <div class="BPT-ConsoleButton">
                        <div id="executeButton" role="button" tabindex="1"></div>
                    </div>
                    <div class="BPT-ConsoleButton">
                        <div id="toggleButton" class="BPT-Toggle-MultiIcon" role="button" tabindex="1"></div>
                    </div>
                </div>
            </div>
            <div id="outputArea">
                <div id="warningSection" style="display: none;" role="alert">
                    <div class="BPT-WarnMessageIcon"></div>
                    <div id="warningMessageText" class='BPT-WarnMessage'></div>
                </div>
                <div id="outputList"></div>
            </div>
            <div id="toolbar"></div>
        </div>
    </body>
</html>
//! Copyright (C) Microsoft. All rights reserved.
var ControlTemplates,__extends,F12;(function(F12){"use strict";var ScriptedHost=Microsoft.Plugin,Tools;(function(Tools){var Console;(function(Console){var VSBridge=function(){function VSBridge(proxy,vs,traceWriter){this._proxy=proxy;this._vs=vs;this._traceWriter=traceWriter;this._breakpointState=new Console.VSBreakpointState(this._proxy);this._breakpointState.initialize();this._attach=new Common.EventSource;this._proxy.addEventListener("attach",this.onAttach.bind(this))}return Object.defineProperty(VSBridge.prototype,"breakpointState",{get:function(){return this._breakpointState},enumerable:!0,configurable:!0}),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(){var _this=this;return this._proxy._call("getScriptEngines").then(function(result){for(var e,engine,engines=[],i=0,n=result.length;i<n;i++)e=result[i],engine=_this.createScriptEngine(e.engineId,e.id,e.targetEngineKind),engines.push(engine);return engines})},VSBridge.prototype.selectDomElement=function(engineId,uidChain){var message=JSON.stringify({type:"selectDomElement",uidChain:uidChain});this._proxy._post("sendToolMessage","dom",engineId,message)},VSBridge.prototype.addEventListener=function(eventName,callback){switch(eventName){case"connect":case"detach":case"break":case"run":case"scriptError":case"toggleFilter":case"load":this._proxy.addEventListener(eventName,callback);break;case"attach":this._attach.addHandler(callback);break;default:throw new Error("Invalid eventName.")}},VSBridge.prototype.onAttach=function(e){this._traceWriter.raiseEvent(403);var engine=this.createScriptEngine(e.engineId,e.id,e.targetEngineKind);this._attach.invoke({engine:engine});this._traceWriter.raiseEvent(404)},VSBridge.prototype.createScriptEngine=function(engineId,id,targetEngineKind){switch(targetEngineKind){case 1:var channel=new Console.VSConsoleChannel(this._proxy,this._breakpointState,this._traceWriter);return new F12.Tools.Console.ScriptEngine.TridentScriptEngine(engineId,this._proxy,channel);case 2:return new F12.Tools.Console.ScriptEngine.ChromiumScriptEngine(engineId,id,this._proxy,this._breakpointState,this._traceWriter);default:throw new Error("Unsupported engine kind.")}},VSBridge.prototype.removeEventListener=function(eventName,callback){switch(eventName){case"attach":this._attach.removeHandler(callback);break;default:this._proxy.removeEventListener(eventName,callback)}},VSBridge.prototype.getTranslatedLocation=function(documentPath,oneBasedLine,oneBasedColumn){return ScriptedHost.Promise.wrap({documentPath:documentPath,oneBasedLine:oneBasedLine,oneBasedColumn:oneBasedColumn})},VSBridge}(),IEBridge;Console.VSBridge=VSBridge;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);this._attach=new Common.EventSource;this._external.addEventListener("attach",this.onAttach.bind(this))}return Object.defineProperty(IEBridge.prototype,"breakpointState",{get:function(){return this._breakpointState},enumerable:!0,configurable:!0}),IEBridge.prototype.start=function(){},IEBridge.prototype.fireCodeMarker=function(codeMarker){ScriptedHost.VS.Internal.CodeMarkers.fire(codeMarker)},IEBridge.prototype.openF1HelpLink=function(keyword,url){this._external.openBrowser(url)},IEBridge.prototype.getScriptEngines=function(){var engine=new F12.Tools.Console.ScriptEngine.TridentScriptEngine(IEBridge.ENGINE_ID,this._external,this._channel);return ScriptedHost.Promise.wrap([engine])},IEBridge.prototype.addEventListener=function(eventName,callback){switch(eventName){case"connect":case"detach":case"break":case"run":case"scriptError":case"toggleFilter":case"load":this._external.addEventListener(eventName,callback);break;case"attach":this._attach.addHandler(callback);break;default:throw new Error("Invalid eventName."+eventName)}},IEBridge.prototype.removeEventListener=function(eventName,callback){this._external.removeEventListener(eventName,callback)},IEBridge.prototype.onAttach=function(){this._traceWriter.raiseEvent(403);var channel=new Console.IEConsoleChannel(this._f12,this._external,this._breakpointState,this._traceWriter),engine=new F12.Tools.Console.ScriptEngine.TridentScriptEngine(IEBridge.ENGINE_ID,this._external,channel);this._attach.invoke({engine:engine});this._traceWriter.raiseEvent(404)},IEBridge.prototype.selectDomElement=function(engineId,uidChain){ScriptedHost.F12.Communications.fireEvent("toolMessage",ScriptedHost.F12.PluginId.Dom,{type:"selectDomElement",uidChain:uidChain})},IEBridge.prototype.getTranslatedLocation=function(documentPath,oneBasedLine,oneBasedColumn,createNonRunTimeDocs){return this._f12.Debugger.getTranslatedLocation(documentPath,oneBasedLine,oneBasedColumn,createNonRunTimeDocs)},IEBridge.ENGINE_ID="F12Engine",IEBridge}();Console.IEBridge=IEBridge})(Console=Tools.Console||(Tools.Console={}))})(Tools=F12.Tools||(F12.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(F12){"use strict";var Tools;(function(Tools){var Console;(function(Console){var Chromium;(function(Chromium){var ChannelAdapter=function(){function ChannelAdapter(channel){this._frameTreeRoot={frame:null,childFrames:[],resources:[]};this._messageHandlersInitialized=!1;this._channel=channel}return Object.defineProperty(ChannelAdapter.prototype,"engine",{get:function(){return this._engine},enumerable:!0,configurable:!0}),Object.defineProperty(ChannelAdapter.prototype,"target",{get:function(){return this._target},set:function(target){this._target=target},enumerable:!0,configurable:!0}),ChannelAdapter.prototype.connect=function(engine){if(this._engine&&this.forgetTargets(),this._engine=engine,this._engine.addEventListener("handshake",this.onHandshake.bind(this)),this._channel.connect(engine),this._runtime=new Common.Chromium.Runtime(this._channel),this._console=new Common.Chromium.Console(this._channel),this._page=new Common.Chromium.Page(this._channel),this._debugger=new Common.Chromium.Debugger(this._channel),!this._messageHandlersInitialized){this._runtime.onExecutionContextCreated(this.runtimeExecutionContextCreated.bind(this));this._console.onMessageAdded(this.consoleMessageAdded.bind(this));this._console.onMessageRepeatCountUpdated(this.consoleRepeatedMessageCountUpdated.bind(this));this._page.onFrameNavigated(this.pageFrameNavigated.bind(this));this._page.onFrameDetached(this.pageFrameDetached.bind(this));this._messageHandlersInitialized=!0}this._console.enable();this._page.enable();this._debuggerBreakstateWatcher=new Chromium.DebuggerBreakstateWatcher(this._debugger)},ChannelAdapter.prototype.detach=function(){this.forgetTargets();this._engine&&(this._lastConsoleMessage&&this._lastConsoleMessage.has(this._engine.engineId)&&this._lastConsoleMessage.delete(this._engine.engineId),this._engine=null);this._channel&&(this._channel.detach(),this._channel=null)},ChannelAdapter.prototype.post=function(message){this._channel.post(message)},ChannelAdapter.prototype.loadScript=function(){},ChannelAdapter.prototype.call=function(command,args,callback,preMessageCallback){var _this=this,newTargetId,switchTarget,expression,localsAndKeywords,currentWindow,evalParams;switch(command){case"processInput":case"getObjectChildren":if(this._target){var executionContext={id:this._target.contextId,frameId:this._target.targetId},executionContextEvaluator=new Chromium.ExecutionContextEvaluator(this._runtime,executionContext),evaluator=new Chromium.ExpressionEvaluator(this._runtime,executionContextEvaluator,callback,this._engine,new Chromium.ExceptionHandler(function(notifyObject,engineId){return _this._onConsoleNotification(notifyObject,engineId)},this._target));evaluator.evaluate(args,command)}break;case"clearConsoleData":this._clearManager&&this._clearManager.clear();break;case"registerConsoleCallbacks":args&&args.length===3?this._clearManager||(this._onConsoleOutput=args[0],this._onConsoleNotification=args[1],this._onRemoteCleared=args[2],this._clearManager=new Chromium.ClearManager(this._console,this._runtime,this._onRemoteCleared)):Tools.Utility.Assert.failDebugOnly("Unexpected number of arguments.");break;case"switchTarget":!args||args.length<1?Tools.Utility.Assert.failDebugOnly("Unexpected number of arguments."):(newTargetId=args[0],switchTarget=this._engine.targets.get(newTargetId),this._target=switchTarget,this.notifyItemCDContext(this._target));break;case"getIntellisenseItemsForExpression":args&&args.length===1?(expression=args[0],localsAndKeywords=[],expression===""&&(expression="window",localsAndKeywords=localsAndKeywords.concat(Common.Intellisense.IntellisenseRemoteHelpers.JSKeywords)),currentWindow=this,evalParams={expression:expression,objectGroup:"completion",contextId:this.target.contextId,returnByValue:!1,includeCommandLineAPI:!0,doNotPauseOnExceptionsAndMuteConsole:!0,generatePreview:!1},this._runtime.evaluate(evalParams).done(function(results){results.result.objectId!==undefined&&currentWindow.getProperties(results.result.objectId,callback,currentWindow,localsAndKeywords)})):Tools.Utility.Assert.failDebugOnly("Unexpected number of arguments.");default:return this._channel.call(command,args,callback,preMessageCallback)}},ChannelAdapter.prototype.getPropertiesName=function(object){var choices=[],propertyNames={choices:choices},length,index,currentType,choice;if(!object)return propertyNames;for(length=object.length,index=0;index<length;index++)currentType=typeof object[index],object[index].name!=="__proto__"&&(choice={name:object[index].name,info:""},choices.push(choice));return propertyNames.choices=choices,propertyNames},ChannelAdapter.prototype.addMessageProcessor=function(stepName,processor){this._channel.addMessageProcessor(stepName,processor)},ChannelAdapter.prototype.addMessageHandler=function(stepName,handler){var chromiumHandler;switch(stepName){case"TargetUpdated":this._targetUpdatedHandler=handler;break;case"TargetCreated":this._targetCreatedHandler=handler;break;case"TargetClosed":this._targetClosedHandler=handler;break;case"TargetChanged":this._targetChangedHandler=handler;break;case"ClearTargets":this._clearTargetsHandler=handler;break;case"ClearOnNavigate":this._clearOnNavigateHandler=handler;break;default:chromiumHandler=handler}chromiumHandler&&this._channel.addMessageHandler(stepName,chromiumHandler)},ChannelAdapter.prototype.clearCallbacks=function(){this._channel.clearCallbacks()},ChannelAdapter.prototype.executeBreakModeCommand=function(remoteFunction,id,input,callback){var _this=this,object,expression,localsAndKeywords,currentWindow,params,breakpointEvaluator,evaluator;switch(remoteFunction){case"performBreakmodeIntellisense":try{object=JSON.parse(input)}catch(e){break}object.searchExpression===undefined?Tools.Utility.Assert.failDebugOnly("Unexpected arguments"):(expression=object.searchExpression,localsAndKeywords=[],expression===""&&(expression="window",object.locals&&(localsAndKeywords=object.locals),localsAndKeywords=localsAndKeywords.concat(Common.Intellisense.IntellisenseRemoteHelpers.JSKeywords)),currentWindow=this,this._debuggerBreakstateWatcher.callFrame&&(params={callFrameId:this._debuggerBreakstateWatcher.callFrame.callFrameId,expression:expression,objectGroup:"completion",returnByValue:!1,includeCommandLineAPI:!0,doNotPauseOnExceptionsAndMuteConsole:!0,generatePreview:!1},this._debuggerBreakstateWatcher.debugger.evaluateOnCallFrame(params).done(function(results){results.result.objectId!==undefined&&currentWindow.getProperties(results.result.objectId,callback,currentWindow,localsAndKeywords)})));break;default:breakpointEvaluator=new Chromium.BreakpointEvaluator(this._debuggerBreakstateWatcher);evaluator=new Chromium.ExpressionEvaluator(this._runtime,breakpointEvaluator,callback,this._engine,new Chromium.ExceptionHandler(function(notifyObject,engineId){return _this._onConsoleNotification(notifyObject,engineId)},this._target));evaluator.evaluate([id,input],"processInput")}},ChannelAdapter.prototype.getProperties=function(objectId,callback,window,localsAndKeywords){localsAndKeywords===void 0&&(localsAndKeywords=[]);var getPropertiesParams={objectId:objectId,ownProperties:!1};window._runtime.getProperties(getPropertiesParams).done(function(outputs){for(var choice,results=outputs.result,choices=window.getPropertiesName(results),length=localsAndKeywords.length,index=0;index<length;index++)choice={name:localsAndKeywords[index],info:""},choices.choices.push(choice);callback(choices)})},ChannelAdapter.prototype.onHandshake=function(){this._page.getResourceTree().done(this.pageGetResourceTreeResult.bind(this))},ChannelAdapter.getTargetType=function(frameInfo){return frameInfo?frameInfo.parentId?"frame":"_top":"frame"},ChannelAdapter.prototype.notifyItemCDContext=function(target){this._onConsoleNotification&&this._onConsoleNotification({inputId:null,notifyType:"consoleItemCDContext",message:target.href,target:target},this._engine.engineId)},ChannelAdapter.prototype.runtimeExecutionContextCreated=function(executionContextCreatedParams){var target={engineId:this._engine.engineId,portName:this._engine.portName,targetType:"frame",targetId:executionContextCreatedParams.context.frameId,href:"",contextId:executionContextCreatedParams.context.id},frameInfo=this.getFrameInfo(target.targetId,this._frameTreeRoot);target.targetType=ChannelAdapter.getTargetType(frameInfo);frameInfo&&frameInfo.url&&(target.href=frameInfo.url);this._target&&this._target.targetId===target.targetId&&(this._target=target);this.updateOrAddTarget(target);this.defaultTargetIfRippleAppRoot(target,frameInfo)},ChannelAdapter.prototype.updateOrAddTarget=function(target){this._engine.targets.has(target.targetId)?this._targetUpdatedHandler&&this._targetUpdatedHandler({engineId:this._engine.engineId,data:"TargetUpdated:"+JSON.stringify(target),handled:!1}):this._targetCreatedHandler&&this._targetCreatedHandler({engineId:this._engine.engineId,data:"TargetCreated:"+JSON.stringify(target),handled:!1})},ChannelAdapter.prototype.targetChanged=function(target){this._targetChangedHandler&&this._targetChangedHandler({engineId:this._engine.engineId,data:"TargetChanged:"+JSON.stringify(target),handled:!1})},ChannelAdapter.prototype.pageGetResourceTreeResult=function(resourceTreeResponse){this._frameTreeRoot.childFrames=[resourceTreeResponse.frameTree];this._runtime.enable()},ChannelAdapter.prototype.pageFrameNavigated=function(frame){var targetType=ChannelAdapter.getTargetType(frame),isRippleEmulatorSubframe=targetType==="frame",target={engineId:this._engine.engineId,portName:this._engine.portName,targetType:targetType,targetId:frame.id,href:frame.url,kind:2};frame.parentId?this.updateFrameInfo(this._frameTreeRoot,frame)||this.insertFrameInfo(this._frameTreeRoot,frame):(this.sendTargetClosedForSubTree(this._frameTreeRoot),this._frameTreeRoot.childFrames=[{frame:frame,childFrames:[],resources:[]}]);this.updateOrAddTarget(target);this._onConsoleNotification&&this._onConsoleNotification(Chromium.NotifyObject.createPageNavigatedNotification(target,frame.url),this._engine.engineId);this.defaultTargetIfRippleAppRoot(target,frame)},ChannelAdapter.prototype.defaultTargetIfRippleAppRoot=function(target,frame){target&&frame&&frame.parentId&&this._frameTreeRoot&&this._frameTreeRoot.childFrames&&this._frameTreeRoot.childFrames[0]&&this._frameTreeRoot.childFrames[0].frame.id===frame.parentId&&this._frameTreeRoot.childFrames[0].frame.url&&this._frameTreeRoot.childFrames[0].frame.url.indexOf("?enableripple=")>=0&&(!this._target||this._target.targetId!==target.targetId)&&(this._target=target,this.targetChanged(target),this.notifyItemCDContext(target))},ChannelAdapter.prototype.pageFrameDetached=function(frameId){var currentTargetId,target;this.trimFrameSubTree(frameId,this._frameTreeRoot);target=this._engine.targets.get(frameId);target&&this._targetClosedHandler&&this._targetClosedHandler({engineId:this._engine.engineId,data:"TargetClosed:"+JSON.stringify(target),handled:!1});this._frameTreeRoot&&this._frameTreeRoot.childFrames&&this._frameTreeRoot.childFrames[0]&&(currentTargetId=this._frameTreeRoot.childFrames[0].frame.id,target=this._engine.targets.get(currentTargetId),target&&(this.targetChanged(target),this.notifyItemCDContext(target)))},ChannelAdapter.prototype.forgetTargets=function(){this._clearTargetsHandler&&this._clearTargetsHandler({engineId:this._engine.engineId,data:"ClearTargets",handled:!1})},ChannelAdapter.prototype.consoleMessageAdded=function(notifyParams,engineId){if(this._lastConsoleMessage||(this._lastConsoleMessage=new Map),this._engine.engineId===engineId?this._lastConsoleMessage.set(engineId,notifyParams):Tools.Utility.Assert.failDebugOnly("Console notification from unknown Script Engine"),this._onConsoleNotification){if(notifyParams.message.level===Chromium.ConsoleMessageLevels.Log&&notifyParams.message.type==="clear")return;var target=this._engine.targets.get(notifyParams.message.url),ieData=Chromium.NotifyObject.converterFunction(notifyParams,target);this._onConsoleNotification(ieData,this._engine.engineId)}},ChannelAdapter.prototype.consoleRepeatedMessageCountUpdated=function(repeatMsgCountParams,engineId){if(this._lastConsoleMessage)if(engineId){var notifyParams=this._lastConsoleMessage.get(engineId);notifyParams&&(notifyParams.timestamp=repeatMsgCountParams.timestamp,notifyParams.message.timestamp=repeatMsgCountParams.timestamp,notifyParams.message.repeatCount=repeatMsgCountParams.count,this.consoleMessageAdded(notifyParams,engineId))}else Tools.Utility.Assert.failDebugOnly("Console repeat message count update from unknown Script Engine")},ChannelAdapter.prototype.getFrameInfo=function(frameId,tree){var i,frameInfo;if(tree){if(tree.frame&&tree.frame.id===frameId)return tree.frame;if(tree.childFrames)for(i=0;i<tree.childFrames.length;i++)if(frameInfo=this.getFrameInfo(frameId,tree.childFrames[i]),frameInfo)return frameInfo}return null},ChannelAdapter.prototype.trimFrameSubTree=function(frameId,tree){var i;if(tree&&tree.childFrames){for(i=0;i<tree.childFrames.length;i++)if(tree.childFrames[i].frame.id===frameId)break;if(i<tree.childFrames.length)this.sendTargetClosedForSubTree(tree.childFrames[i]),tree.childFrames.splice(i,1);else for(i=0;i<tree.childFrames.length;i++)this.trimFrameSubTree(frameId,tree.childFrames[i])}},ChannelAdapter.prototype.sendTargetClosedForSubTree=function(tree){var wasClosed,target,i;if(tree&&tree.frame&&this._targetClosedHandler&&(wasClosed=[],target=this._engine.targets.get(tree.frame.id),target&&this._targetClosedHandler&&this._targetClosedHandler({engineId:this._engine.engineId,data:"TargetClosed:"+JSON.stringify(target),handled:!1})),tree&&tree.childFrames)for(i=0;i<tree.childFrames.length;i++)this.sendTargetClosedForSubTree(tree.childFrames[i])},ChannelAdapter.prototype.updateFrameInfo=function(tree,newFrame){if(tree){if(tree.frame&&tree.frame.id===newFrame.id)return tree.frame=newFrame,!0;if(tree.childFrames)for(var i=0;i<tree.childFrames.length;i++)if(this.updateFrameInfo(tree.childFrames[i],newFrame))return!0}return!1},ChannelAdapter.prototype.insertFrameInfo=function(tree,newFrame){if(tree&&newFrame.parentId){if(tree.frame&&tree.frame.id===newFrame.parentId)return tree.childFrames||(tree.childFrames=[]),tree.childFrames.push({frame:newFrame,resources:[]}),!0;if(tree.childFrames)for(var i=0;i<tree.childFrames.length;i++)if(this.insertFrameInfo(tree.childFrames[i],newFrame))return!0}return!1},ChannelAdapter}();Chromium.ChannelAdapter=ChannelAdapter})(Chromium=Console.Chromium||(Console.Chromium={}))})(Console=Tools.Console||(Tools.Console={}))})(Tools=F12.Tools||(F12.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(F12){"use strict";var Tools;(function(Tools){var Console;(function(Console){var Chromium;(function(Chromium){var ClearManager=function(){function ClearManager(console,runtime,clearCallback){Tools.Utility.Assert.isTrue(console&&runtime&&clearCallback,"Invalid arguments for ClearManager");this._console=console;this._runtime=runtime;this._clearConsoleCallback=clearCallback;this._console.onMessagesCleared(this.onMessagesCleared.bind(this))}return ClearManager.prototype.clear=function(){var _this=this;this._isInitiatedByUserState=!0;setTimeout(function(){_this._isInitiatedByUserState=!1},2e3);this.processReleaseObjectGroupRequest();this.processConsoleClearRequest()},ClearManager.prototype.processConsoleClearRequest=function(){var _this=this;this._console.clearMessages().done(function(){return _this.processConsoleClearResponse()})},ClearManager.prototype.processConsoleClearResponse=function(){},ClearManager.prototype.processReleaseObjectGroupRequest=function(){var _this=this;this._runtime.releaseObjectGroup({objectGroup:"Console"}).done(function(){return _this.processReleaseObjectGroupResponse()})},ClearManager.prototype.processReleaseObjectGroupResponse=function(){},ClearManager.prototype.onMessagesCleared=function(arg,engineId){this._clearConsoleCallback?this._isInitiatedByUserState?this._isInitiatedByUserState=!1:this._clearConsoleCallback(!1,engineId):Tools.Utility.Assert.failDebugOnly("Invalid state of Chromium.ClearManager")},ClearManager}();Chromium.ClearManager=ClearManager})(Chromium=Console.Chromium||(Console.Chromium={}))})(Console=Tools.Console||(Tools.Console={}))})(Tools=F12.Tools||(F12.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);__.prototype=b.prototype;d.prototype=new __},function(F12){"use strict";var Tools;(function(Tools){var Console;(function(Console){var ConsoleChannel=function(_super){function ConsoleChannel(breakpointState,traceWriter){_super.call(this,traceWriter);this._breakpointState=breakpointState}return __extends(ConsoleChannel,_super),ConsoleChannel.prototype.runExecuteBreakModeCommand=function(){throw new Error("Not implemented")},Object.defineProperty(ConsoleChannel.prototype,"target",{get:function(){return this._target},set:function(target){this._target=target},enumerable:!0,configurable:!0}),ConsoleChannel.prototype.executeBreakModeCommand=function(remoteFunction,id,input,callback,createInvoker){var _this=this,uid=this.getUid();this.addCallback(uid,{synced:!0,callback:callback||function(){}});var invoker=createInvoker||ConsoleChannel.defaultInvoker,command=invoker(remoteFunction+":"+id+":"+uid,input,this._breakpointState.atBreakpointInWorker),sendBreakCommand=function(){_this._breakpointState.atBreakpoint&&_this.runExecuteBreakModeCommand(command).done(function(result){if(!result){var jsonObj={uid:uid,command:remoteFunction,args:[id,input]},message=JSON.stringify([jsonObj]);try{_this.post(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:!1,result:result}}}catch(e){__BROWSERTOOLS_CONSOLE_BREAKMODE_FUNC.INVOKER={returnValue:{isError:!0,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:!1};try{typeof window.cd=="undefined"&&(window.cd=window.console.cd,window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER.inline.push({name:"cd",func:window.console.cd}));typeof window.dir=="undefined"&&(window.dir=window.console.dir,window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER.inline.push({name:"dir",func:window.console.dir}));typeof window.select=="undefined"&&(window.select=window.console.select,window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER.inline.push({name:"select",func:window.console.select}));typeof window.$=="undefined"&&(window.$=window.__BROWSERTOOLS_CONSOLE.$,window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER.inline.push({name:"$",func:window.$}));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);window.$_===window.__BROWSERTOOLS_CONSOLE.$_||isNaN(window.$_)&&isNaN(window.__BROWSERTOOLS_CONSOLE.$_)?window.__BROWSERTOOLS_CONSOLE.$_=window.$_=window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER.result:delete window.__BROWSERTOOLS_CONSOLE.$_}catch(e){window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER.result=e;window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER.isError=!0}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++)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,escapedCommand=JSON.stringify(command).slice(1,-1);return id&&isWorker?invokerString=ConsoleChannel.workerBreakpointInvokerString():id&&!isWorker&&(invokerString=ConsoleChannel.breakpointInvokerString()),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+'"')):invokerString='__BROWSERTOOLS_CONSOLE_BREAKMODE_FUNC("","'+escapedCommand+'");',invokerString},ConsoleChannel}(Common.Channel),VSConsoleChannel,IEConsoleChannel,VSConsoleChromeChannel;Console.ConsoleChannel=ConsoleChannel;VSConsoleChannel=function(_super){function VSConsoleChannel(proxy,breakpointState,traceWriter){this._proxy=proxy;this._proxy.addEventListener("message",this._onmessage=this.onmessage.bind(this));_super.call(this,breakpointState,traceWriter)}return __extends(VSConsoleChannel,_super),VSConsoleChannel.prototype.runExecuteBreakModeCommand=function(command){return this._proxy._call("executeBreakModeCommand",command)},VSConsoleChannel.prototype.runSendMessage=function(message){if(this.engine.portName)return this._proxy._post("sendMessage",this.engine.engineId,this.engine.portName,message)},VSConsoleChannel.prototype.loadScript=function(fileName){this._proxy._post("loadScript",this.engine.engineId,fileName)},VSConsoleChannel.prototype.detach=function(){this._proxy.removeEventListener("message",this._onmessage)},VSConsoleChannel}(ConsoleChannel);Console.VSConsoleChannel=VSConsoleChannel;IEConsoleChannel=function(_super){function IEConsoleChannel(f12,external,breakpointState,traceWriter){_super.call(this,breakpointState,traceWriter);this._f12=f12;this._external=external;this._external.addEventListener("connect",this._onconnect=this.onConnect.bind(this))}return __extends(IEConsoleChannel,_super),IEConsoleChannel.prototype.runExecuteBreakModeCommand=function(command){return this._f12.Debugger.executeBreakModeCommand(command)},IEConsoleChannel.prototype.runSendMessage=function(message){this._port.postMessage(message)},IEConsoleChannel.prototype.loadScript=function(fileName){this._external.loadScriptInProc(fileName)},IEConsoleChannel.prototype.detach=function(){this._external.removeEventListener("connect",this._onconnect);this._port&&this._port.removeEventListener("message",this._onmessage)},IEConsoleChannel.prototype.onConnect=function(port){this._port=port;this._port.addEventListener("message",this._onmessage=this.onmessage.bind(this))},IEConsoleChannel}(ConsoleChannel);Console.IEConsoleChannel=IEConsoleChannel;VSConsoleChromeChannel=function(_super){function VSConsoleChromeChannel(proxy,breakpointState,traceWriter){_super.call(this,proxy,traceWriter);this._breakpointState=breakpointState}return __extends(VSConsoleChromeChannel,_super),Object.defineProperty(VSConsoleChromeChannel.prototype,"target",{get:function(){return this._target},set:function(target){this._target=target},enumerable:!0,configurable:!0}),VSConsoleChromeChannel.prototype.executeBreakModeCommand=function(){},VSConsoleChromeChannel.prototype.detach=function(){_super.prototype.detach.call(this)},VSConsoleChromeChannel}(Common.ChromiumChannel);Console.VSConsoleChromeChannel=VSConsoleChromeChannel})(Console=Tools.Console||(Tools.Console={}))})(Tools=F12.Tools||(F12.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);__.prototype=b.prototype;d.prototype=new __},function(F12){"use strict";var ScriptedHost=Microsoft.Plugin,Tools;(function(Tools){var Console;(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));Microsoft&&ScriptedHost&&ScriptedHost.F12&&ScriptedHost.F12.addEventListener("activeframechanged",function(){_this._breakpointLocals=null})}return Object.defineProperty(BreakpointState.prototype,"atBreakpoint",{get:function(){return this._atBreakpoint},enumerable:!0,configurable:!0}),Object.defineProperty(BreakpointState.prototype,"atBreakpointInWorker",{get:function(){return this._atBreakpointInWorker},enumerable:!0,configurable:!0}),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;return this._breakpointLocals?ScriptedHost.Promise.wrap(this._breakpointLocals):this.getLocalsForCurrentStackFrame().then(function(data){return _this._breakpointLocals=data,data})},BreakpointState.prototype.onbreak=function(){var _this=this;this._breakpointLocals=null;this._atBreakpoint=!0;this.getIsAtBreakpointInWorker().done(function(data){_this._atBreakpointInWorker=data})},BreakpointState.prototype.onrun=function(){this._breakpointLocals=null;this._atBreakpoint=!1;this._atBreakpointInWorker=!1},BreakpointState}(),VSBreakpointState,IEBreakpointState;Console.BreakpointState=BreakpointState;VSBreakpointState=function(_super){function VSBreakpointState(proxy){_super.call(this,proxy);this._proxy=proxy}return __extends(VSBreakpointState,_super),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")},VSBreakpointState}(BreakpointState);Console.VSBreakpointState=VSBreakpointState;IEBreakpointState=function(_super){function IEBreakpointState(f12,external){_super.call(this,external);this._f12=f12}return __extends(IEBreakpointState,_super),IEBreakpointState.prototype.getIsAtBreakpoint=function(){return ScriptedHost.Promise.as(this._f12.Debugger.getIsAtBreakpoint())},IEBreakpointState.prototype.getIsAtBreakpointInWorker=function(){return ScriptedHost.Promise.wrap(this._f12.Debugger.getIsAtBreakpointInWorker())},IEBreakpointState.prototype.getLocalsForCurrentStackFrame=function(){return this._f12.Debugger.getLocalsForCurrentStackFrame()},IEBreakpointState}(BreakpointState);Console.IEBreakpointState=IEBreakpointState})(Console=Tools.Console||(Tools.Console={}))})(Tools=F12.Tools||(F12.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);__.prototype=b.prototype;d.prototype=new __},function(F12){var Tools;(function(Tools){var Console;(function(Console){"use strict";var ConsoleModel=function(_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:!0,warnings:!0,messages:!0,log:!0});this.targets=new Common.ObservableCollection}return __extends(ConsoleModel,_super),ConsoleModel.initialize=function(){Common.ObservableHelpers.defineProperty(ConsoleModel,"listViewItemCount",0);Common.ObservableHelpers.defineProperty(ConsoleModel,"shouldClearOnNavigate",!0);Common.ObservableHelpers.defineProperty(ConsoleModel,"currentTarget","",function(obj,oldValue,newValue){return obj.currentTargetChanged.invoke(newValue)});Common.ObservableHelpers.defineProperty(ConsoleModel,"canSelectTargets",!0);Common.ObservableHelpers.defineProperty(ConsoleModel,"isClearOnNavigateVisible",!0)},ConsoleModel}(Common.Observable);Console.ConsoleModel=ConsoleModel;ConsoleModel.initialize()})(Console=Tools.Console||(Tools.Console={}))})(Tools=F12.Tools||(F12.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(F12){var Tools;(function(Tools){var Console;(function(Console){"use strict";var ScriptedHost=Microsoft.Plugin,Converters=function(){function Converters(){}return 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.notificationCountTooltip=function(singleResourceKey,multiResourceKey){return{convertTo:function(from){return ScriptedHost.Resources.getString(from===1?singleResourceKey:multiResourceKey,from)},convertFrom:null}},Converters.valueToBool=function(comparer,defaultValue){return defaultValue===void 0&&(defaultValue=!1),{convertTo:function(from){return from?comparer(from):defaultValue},convertFrom:null}},Converters}();Console.Converters=Converters;Converters.initialize()})(Console=Tools.Console||(Tools.Console={}))})(Tools=F12.Tools||(F12.Tools={}))})(F12||(F12={})),function(ControlTemplates){var Console=function(){function Console(){}return Console.consoleToolbarTemplate='<div class="BPT-Toolbar" role="toolbar">            <div class="BPT-ToolbarContents">                <span class="BPT-ToolTitle" data-controlbinding="innerText:title,                                             attr-aria-label:title"><\/span>                <div data-name="_toolbarPanel" data-control="Common.TemplateControl" data-controlbinding="model:model,                                           templateId:panelTemplateId" data-options="className:buttons"><\/div>                <div class="labeledComboBox">                    <label id="targetLabel" data-name="targetLabel" data-options="innerText:TargetSelectorLabel; converter=Common.CommonConverters.ResourceConverter"><\/label>                    <div aria-labelledby="targetLabel" data-options="tabIndex:1" data-name="targetsComboBox" data-control="Common.Controls.ComboBox" data-binding="items:targets,                                        isEnabled:canSelectTargets; mode=twoway,                                        selectedValue:currentTarget; mode=twoway"><\/div>                <\/div>            <\/div>        <\/div>',Console.consoleButtonsPanel='<div>            <div data-name="errorsButton" data-control="Common.Controls.ToggleButton" data-controlbinding="isChecked:model.notificationFilters.errors; mode=twoway,                                       content:model.notificationCounts.errors,                                       tooltip:model.notificationCounts.errors; converter=F12.Tools.Console.Converters.ToErrorsLabel" data-control-templateid="Common.labeledIconButton" data-options="className:errorButton"><\/div>            <div data-name="warningsButton" data-control="Common.Controls.ToggleButton" data-controlbinding="isChecked:model.notificationFilters.warnings; mode=twoway,                                       content:model.notificationCounts.warnings,                                       tooltip:model.notificationCounts.warnings; converter=F12.Tools.Console.Converters.ToWarningsLabel" data-control-templateid="Common.labeledIconButton" data-options="className:warnButton"><\/div>            <div data-name="messagesButton" data-control="Common.Controls.ToggleButton" data-controlbinding="content:model.notificationCounts.messages,                                       isChecked:model.notificationFilters.messages; mode=twoway,                                       tooltip:model.notificationCounts.messages; converter=F12.Tools.Console.Converters.ToMessagesLabel" data-control-templateid="Common.labeledIconButton" data-options="className:infoButton"><\/div>            <div data-name="clearOnNavigateButton" data-control="Common.Controls.ToggleButton" data-controlbinding="isChecked:model.shouldClearOnNavigate; mode=twoway,                                                                           isVisible:model.isClearOnNavigateVisible" data-control-templateid="Common.iconButton" data-options="className:clearOnNavigateButton,                                tooltip:ClearOnNavigate; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="clearButton" data-control="Common.Controls.Button" data-controlbinding="isEnabled:model.listViewItemCount; converter=F12.Tools.Console.Converters.ToClearButtonEnabled" data-control-templateid="Common.iconButton" data-options="className:clearButton,                                tooltip:ClearButtonText; converter=Common.CommonConverters.ResourceConverter"><\/div>        <\/div>',Console}();ControlTemplates.Console=Console}(ControlTemplates||(ControlTemplates={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(F12){"use strict";var Tools;(function(Tools){var Console;(function(Console){var Chromium;(function(Chromium){var ConsoleMessageLevels=function(){function ConsoleMessageLevels(){}return ConsoleMessageLevels.parseChromeMessageLevel=function(level,key){switch(level){case ConsoleMessageLevels.Error:case ConsoleMessageLevels.Assert:return Common.ObjectView.TreeViewUtils.ConsoleNotifyType.error;case ConsoleMessageLevels.Log:switch(key){case Common.ObjectView.TreeViewUtils.ConsoleInternalMessage.startGroup:case Common.ObjectView.TreeViewUtils.ConsoleInternalMessage.startGroupCollapsed:case Common.ObjectView.TreeViewUtils.ConsoleInternalMessage.endGroup:case Common.ObjectView.TreeViewUtils.ConsoleInternalMessage.displayTraceStyles:return Common.ObjectView.TreeViewUtils.ConsoleNotifyType.internalMessage;default:return Common.ObjectView.TreeViewUtils.ConsoleNotifyType.log}case ConsoleMessageLevels.Debug:return Common.ObjectView.TreeViewUtils.ConsoleNotifyType.log;case ConsoleMessageLevels.Info:return Common.ObjectView.TreeViewUtils.ConsoleNotifyType.info;case ConsoleMessageLevels.Warning:return Common.ObjectView.TreeViewUtils.ConsoleNotifyType.warn}return null},ConsoleMessageLevels.Error="error",ConsoleMessageLevels.Log="log",ConsoleMessageLevels.Info="info",ConsoleMessageLevels.Warning="warning",ConsoleMessageLevels.Debug="debug",ConsoleMessageLevels.Assert="assert",ConsoleMessageLevels}(),NotifyObject;Chromium.ConsoleMessageLevels=ConsoleMessageLevels;NotifyObject=function(){function NotifyObject(notifyParams,target){this._notifyParams=notifyParams;this._target=target}return Object.defineProperty(NotifyObject.prototype,"treeViewNotifyObject",{get:function(){var notifyObject={inputId:"-1",notifyType:ConsoleMessageLevels.parseChromeMessageLevel(this._notifyParams.message.level,this._notifyParams.message.type),target:this._target,message:{message:this._notifyParams.message.text,name:this._notifyParams.message.text,fileUrl:this._notifyParams.message.url,lineNumber:this._notifyParams.message.line,columnNumber:this._notifyParams.message.column,key:this._notifyParams.message.type}},isExpandableNotification=!1,i,consoleOutputObject;if(this._notifyParams.message.parameters&&this._notifyParams.message.parameters.length>0)for(notifyObject.message.viewableObject=[],i=0;i<this._notifyParams.message.parameters.length;i++)consoleOutputObject=Chromium.RemoteObject.convert(this._notifyParams.message.parameters[i]),(consoleOutputObject.isExpandable||i>0)&&(isExpandableNotification=!0),notifyObject.message.viewableObject.push(consoleOutputObject),this._notifyParams.message.parameters[i].toString=function(){return Chromium.RemoteObject.createStringValue(this)};return isExpandableNotification?notifyObject.message.viewableObject.length>1&&(notifyObject.message.message=Common.ObjectView.TreeViewStringFormatter.formatConsoleMessage.apply(this,this._notifyParams.message.parameters)):notifyObject.message.viewableObject=null,notifyObject},enumerable:!0,configurable:!0}),NotifyObject.converterFunction=function(notification,target){var chromeNotificationConverter=new NotifyObject(notification,target);return chromeNotificationConverter.treeViewNotifyObject},NotifyObject.createPageNavigatedNotification=function(targetEngine,url){return{inputId:"-1",notifyType:Common.ObjectView.TreeViewUtils.ConsoleNotifyType.info,target:targetEngine,message:{messageId:"HTML1300",message:"HTML1300: Navigation occurred",fileUrl:url,columnNumber:null,lineNumber:null}}},NotifyObject.createExpressionEvaluationErrorNotification=function(target,errorObject,inputId){var consoleOutputObject=Chromium.RemoteObject.convert(errorObject);return{inputId:inputId,notifyType:Common.ObjectView.TreeViewUtils.ConsoleNotifyType.error,engine:target,message:{message:errorObject.description,viewableObject:[consoleOutputObject]}}},NotifyObject}();Chromium.NotifyObject=NotifyObject})(Chromium=Console.Chromium||(Console.Chromium={}))})(Console=Tools.Console||(Tools.Console={}))})(Tools=F12.Tools||(F12.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(F12){"use strict";var Tools;(function(Tools){var Console;(function(Console){var Chromium;(function(Chromium){var ExceptionHandler=function(){function ExceptionHandler(notificationCallback,target){this._notificationCallback=notificationCallback;this._target=target}return ExceptionHandler.prototype.handleException=function(exception,engine,inputId){var consoleNotification=Chromium.NotifyObject.createExpressionEvaluationErrorNotification(this._target,exception,inputId);this._notificationCallback(consoleNotification,engine.engineId)},ExceptionHandler}(),DebuggerBreakstateWatcher,ExecutionContextEvaluator,BreakpointEvaluator,ExpressionEvaluator;Chromium.ExceptionHandler=ExceptionHandler;DebuggerBreakstateWatcher=function(){function DebuggerBreakstateWatcher(remoteDebugger){this._debugger=remoteDebugger;this._debugger.onPaused(this.onDebuggerPaused.bind(this));this._debugger.onResumed(this.onDebuggerResumed.bind(this));this._debugger.enable().done(this.debuggerEnableResult.bind(this))}return Object.defineProperty(DebuggerBreakstateWatcher.prototype,"callFrame",{get:function(){return this._callFrame},enumerable:!0,configurable:!0}),Object.defineProperty(DebuggerBreakstateWatcher.prototype,"debugger",{get:function(){return this._debugger},enumerable:!0,configurable:!0}),DebuggerBreakstateWatcher.prototype.onDebuggerPaused=function(param){this._callFrame=param.callFrames[0]},DebuggerBreakstateWatcher.prototype.onDebuggerResumed=function(){this._callFrame=null},DebuggerBreakstateWatcher.prototype.debuggerEnableResult=function(){},DebuggerBreakstateWatcher}();Chromium.DebuggerBreakstateWatcher=DebuggerBreakstateWatcher;ExecutionContextEvaluator=function(){function ExecutionContextEvaluator(runtime,executionContext){this._runtime=runtime;this._executionContext=executionContext}return ExecutionContextEvaluator.prototype.evaluate=function(consoleInputId,expression,processEvaluationResponse){var params={expression:expression,objectGroup:"console",contextId:this._executionContext.id,returnByValue:!1,includeCommandLineAPI:!0,doNotPauseOnExceptionsAndMuteConsole:!1,generatePreview:!0};this._runtime.evaluate(params).done(function(chromiumData){return processEvaluationResponse(consoleInputId,chromiumData)})},ExecutionContextEvaluator}();Chromium.ExecutionContextEvaluator=ExecutionContextEvaluator;BreakpointEvaluator=function(){function BreakpointEvaluator(debuggerBreakstateWatcher){this._debuggerBreakstateWatcher=debuggerBreakstateWatcher}return BreakpointEvaluator.prototype.evaluate=function(consoleInputId,expression,processEvaluationResponse){if(this._debuggerBreakstateWatcher.callFrame){var params={callFrameId:this._debuggerBreakstateWatcher.callFrame.callFrameId,expression:expression,objectGroup:"console",returnByValue:!1,includeCommandLineAPI:!0,doNotPauseOnExceptionsAndMuteConsole:!1,generatePreview:!0};this._debuggerBreakstateWatcher.debugger.evaluateOnCallFrame(params).done(function(chromiumData){return processEvaluationResponse(consoleInputId,chromiumData)})}},BreakpointEvaluator}();Chromium.BreakpointEvaluator=BreakpointEvaluator;ExpressionEvaluator=function(){function ExpressionEvaluator(runtime,evaluator,callback,engine,exceptionHandler){this._runtime=runtime;this._evaluator=evaluator;this._callback=callback;this._engine=engine;this._exceptionHandler=exceptionHandler}return ExpressionEvaluator.prototype.evaluate=function(args,command){switch(command){case"processInput":this.processExpressionEvaluationRequest(args[0],args[1]);break;case"getObjectChildren":this._treeViewOutputObject={isExpandable:!0};this.processGetPropertiesRequest(args[0]);break;default:throw"Unknown remote call"}return},ExpressionEvaluator.prototype.processExpressionEvaluationRequest=function(consoleInputId,evaluationExpression){var _this=this;this._evaluator.evaluate(consoleInputId,evaluationExpression,function(consoleInputId,data){return _this.processExpressionEvaluationResponse(consoleInputId,data)})},ExpressionEvaluator.prototype.processExpressionEvaluationResponse=function(inputId,chromiumData){var remoteObject=chromiumData.result,treeViewOutputObject=Chromium.RemoteObject.convert(remoteObject);treeViewOutputObject.inputId=inputId;treeViewOutputObject.engine=this._engine;this._treeViewOutputObject=treeViewOutputObject;chromiumData.wasThrown?this._exceptionHandler.handleException(remoteObject,this._engine,inputId):treeViewOutputObject.isExpandable?this.processGetPropertiesRequest(remoteObject.objectId):this._callback(this._treeViewOutputObject,this._engine.engineId)},ExpressionEvaluator.prototype.processGetPropertiesRequest=function(remoteObjectId){var _this=this,params={objectId:remoteObjectId,ownProperties:!0};this._runtime.getProperties(params).done(function(getPropertiesResult){_this.processGetPropertiesResponse(getPropertiesResult)})},ExpressionEvaluator.prototype.processGetPropertiesResponse=function(getPropertiesResult){this._treeViewOutputObject.value=Chromium.PropertyConverter.convertProperties(getPropertiesResult.result);this._treeViewOutputObject.valueString=Common.ObjectView.TreeViewValueStringBuilder.createValueString(this._treeViewOutputObject.value,this._treeViewOutputObject.detailedType);this._callback(this._treeViewOutputObject,this._engine.engineId)},ExpressionEvaluator}();Chromium.ExpressionEvaluator=ExpressionEvaluator})(Chromium=Console.Chromium||(Console.Chromium={}))})(Console=Tools.Console||(Tools.Console={}))})(Tools=F12.Tools||(F12.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(F12){"use strict";var Tools;(function(Tools){var Console;(function(Console){var Chromium;(function(Chromium){var RemoteObjectSubtype=function(){function RemoteObjectSubtype(){}return RemoteObjectSubtype.isExpandable=function(chromiumRemoteObject){switch(chromiumRemoteObject.subtype){case RemoteObjectSubtype.NullType:return!1;default:return!0}},RemoteObjectSubtype.ArrayType="array",RemoteObjectSubtype.DateType="date",RemoteObjectSubtype.NodeType="node",RemoteObjectSubtype.NullType="null",RemoteObjectSubtype.RegexpType="regexp",RemoteObjectSubtype}(),RemoteObject,PropertyConverter;Chromium.RemoteObjectSubtype=RemoteObjectSubtype;RemoteObject=function(){function RemoteObject(){}return RemoteObject.isExpandable=function(chromiumRemoteObject){switch(chromiumRemoteObject.type){case RemoteObject.FunctionType:return!0;case RemoteObject.ObjectType:return RemoteObjectSubtype.isExpandable(chromiumRemoteObject);case RemoteObject.NumberType:return!1;case RemoteObject.StringType:return!1;case RemoteObject.BooleanType:return!1;case RemoteObject.UndefinedType:return!1;default:throw"Unknown Chromium object type"}},RemoteObject.getDetailedType=function(chromiumRemoteObject){var detailedType;switch(chromiumRemoteObject.type){case RemoteObject.ObjectType:detailedType=chromiumRemoteObject.subtype||chromiumRemoteObject.type;break;default:detailedType=chromiumRemoteObject.type}if(!detailedType)throw"Unknown detailed type";return detailedType},RemoteObject.convert=function(remoteObject){var outputObject={},detailedType=RemoteObject.getDetailedType(remoteObject),isExpandable=RemoteObject.isExpandable(remoteObject);return outputObject.detailedType=detailedType,outputObject.consoleType="consoleItemOutput",outputObject.isHtmlViewableType=!1,outputObject.inputId="-1",outputObject.uid=remoteObject.objectId,outputObject.value=isExpandable?remoteObject.objectId:RemoteObject.createPrimitiveValue(detailedType,remoteObject.value),outputObject.isExpandable=isExpandable,outputObject.name=isExpandable?remoteObject.description:null,outputObject.valueString=isExpandable?Common.EncodingUtilities.escapeHtml(remoteObject.description):null,outputObject},RemoteObject.createStringValue=function(remoteObject){if(!remoteObject||!remoteObject.type)return RemoteObject.UndefinedType;switch(remoteObject.type){case RemoteObject.FunctionType:return remoteObject.description;case RemoteObject.ObjectType:if(remoteObject.subtype)switch(remoteObject.subtype){case RemoteObjectSubtype.NullType:return RemoteObjectSubtype.NullType;case RemoteObjectSubtype.ArrayType:case RemoteObjectSubtype.RegexpType:case RemoteObjectSubtype.DateType:return remoteObject.description;default:return"["+remoteObject.type+" "+remoteObject.className+"]"}else return"["+remoteObject.type+" "+remoteObject.className+"]";break;case RemoteObject.UndefinedType:return RemoteObject.UndefinedType;default:return remoteObject.value?remoteObject.value.toString():RemoteObject.UndefinedType}},RemoteObject.createPrimitiveValue=function(detailedType,obj){switch(detailedType){case"null":return"null";case"string":return'"'+obj+'"';case"undefined":return"undefined";case"boolean":case"number":default:return""+obj}},RemoteObject.BooleanType="boolean",RemoteObject.FunctionType="function",RemoteObject.StringType="string",RemoteObject.ObjectType="object",RemoteObject.NumberType="number",RemoteObject.UndefinedType="undefined",RemoteObject}();Chromium.RemoteObject=RemoteObject;PropertyConverter=function(){function PropertyConverter(){}return PropertyConverter.convertProperty=function(chromiumPropertyDescriptor){var propertyValue,remoteObject=chromiumPropertyDescriptor.value?chromiumPropertyDescriptor.value:chromiumPropertyDescriptor.get,isExpandable=RemoteObject.isExpandable(remoteObject),remoteObjectValue=isExpandable?remoteObject.objectId:remoteObject.value,detailedType=RemoteObject.getDetailedType(remoteObject);return propertyValue={detailedType:detailedType,isExpandable:isExpandable,isHtmlViewableType:!1,name:remoteObject&&remoteObject.description?remoteObject&&remoteObject.description:chromiumPropertyDescriptor.name,value:remoteObjectValue,valueString:null},propertyValue.valueString=propertyValue.isExpandable?Common.ObjectView.TreeViewValueStringBuilder.createPropertyValueString(propertyValue,null):Common.ObjectView.TreeViewValueStringBuilder.formatPropertyValueString(propertyValue.value),{propertyName:chromiumPropertyDescriptor.name,propertyValue:propertyValue}},PropertyConverter.convertProperties=function(chromiumProperties){for(var property,functionsProperty,resultProp=[],i=0;i<chromiumProperties.length;i++)property=PropertyConverter.convertProperty(chromiumProperties[i]),property.propertyValue.detailedType==="function"?(functionsProperty||(functionsProperty={propertyName:"[functions]",propertyValue:{detailedType:"internal",isExpandable:!0,isHtmlViewableType:!1,name:" ",isInternalProperty:!0,value:[],valueString:null}}),functionsProperty.propertyValue.value.push(property)):resultProp.push(property);return functionsProperty&&resultProp.push(functionsProperty),resultProp},PropertyConverter}();Chromium.PropertyConverter=PropertyConverter})(Chromium=Console.Chromium||(Console.Chromium={}))})(Console=Tools.Console||(Tools.Console={}))})(Tools=F12.Tools||(F12.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);__.prototype=b.prototype;d.prototype=new __},function(F12){"use strict";var Tools;(function(Tools){var Console;(function(Console){var ConsoleIntellisenseProvider=function(_super){function ConsoleIntellisenseProvider(bridge,engine,breakpointState,toolTraceWriter){_super.call(this);this._bridge=bridge;this._engine=engine;this._breakpointState=breakpointState;this._traceWriter=toolTraceWriter.traceWriter}return __extends(ConsoleIntellisenseProvider,_super),Object.defineProperty(ConsoleIntellisenseProvider.prototype,"traceWriter",{get:function(){return this._traceWriter},enumerable:!0,configurable:!0}),ConsoleIntellisenseProvider.prototype.getIntellisenseChoices=function(searchExpression,completeCallback,cancelToken,etwKey){var _this=this,remoteCallback,engine;this._breakpointState.atBreakpointInWorker||(remoteCallback=function(results){var choices,i,engine;if(_this.fireGetIntellisenseItemsEndEvent(etwKey),cancelToken.isCanceled)completeCallback([]);else{if(choices=[],results&&results.choices)for(i=0;i<results.choices.length;++i)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));engine=_this._engine();engine.targetEngineKind===2&&(choices&&choices.length>1&&(choices=choices.sort(function(l,r){return l.optionName.toUpperCase()<r.optionName.toUpperCase()?-1:1})),_this.completePromiseResults(choices));completeCallback(choices)}},engine=this._engine(),this.fireGetIntellisenseItemsStartEvent(etwKey),this._breakpointState.atBreakpoint?this._breakpointState.getBreakpointLocals().done(function(breakpointLocals){if(cancelToken.isCanceled)remoteCallback(null);else{var context={searchExpression:searchExpression,searchContext:"window",locals:breakpointLocals.map(function(value){return value.name})},expressionTerms=context.searchExpression.split(".");expressionTerms.length>0&&context.locals.indexOf(expressionTerms[0])>=0&&(context.searchContext=expressionTerms[0],context.searchExpression=expressionTerms.slice(1).join("."));engine.channel.executeBreakModeCommand("performBreakmodeIntellisense",ConsoleIntellisenseProvider.getNextId(),JSON.stringify(context),remoteCallback,ConsoleIntellisenseProvider.createInvoker)}}):engine.channel.call("getIntellisenseItemsForExpression",[searchExpression],remoteCallback))},ConsoleIntellisenseProvider.prototype.fireGetCurrentExpressionStartEvent=function(etwKey){this.traceWriter.raiseEventWithKey(429,etwKey)},ConsoleIntellisenseProvider.prototype.fireGetCurrentExpressionEndEvent=function(etwKey){this.traceWriter.raiseEventWithKey(430,etwKey)},ConsoleIntellisenseProvider.prototype.fireUpdateIntellisenseStartEvent=function(etwKey){this.traceWriter.raiseEventWithKey(431,etwKey)},ConsoleIntellisenseProvider.prototype.fireUpdateIntellisenseEndEvent=function(etwKey){this.traceWriter.raiseEventWithKey(432,etwKey)},ConsoleIntellisenseProvider.createInvoker=function(id,searchContextString){var context=JSON.parse(searchContextString);return'__BROWSERTOOLS_CONSOLE.performBreakmodeIntellisense("'+id+'", "'+context.searchExpression+'", window, '+context.searchContext+", "+JSON.stringify(context.locals)+")"},ConsoleIntellisenseProvider.getNextId=function(){return ConsoleIntellisenseProvider.NextId++},ConsoleIntellisenseProvider.prototype.fireGetIntellisenseItemsStartEvent=function(etwKey){this.traceWriter.raiseEventWithKey(433,etwKey)},ConsoleIntellisenseProvider.prototype.fireGetIntellisenseItemsEndEvent=function(etwKey){this.traceWriter.raiseEventWithKey(434,etwKey)},ConsoleIntellisenseProvider.NextId=0,ConsoleIntellisenseProvider}(Common.Intellisense.IntellisenseProviderBase);Console.ConsoleIntellisenseProvider=ConsoleIntellisenseProvider})(Console=Tools.Console||(Tools.Console={}))})(Tools=F12.Tools||(F12.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(F12){"use strict";var ScriptedHost=Microsoft.Plugin,Tools;(function(Tools){var Console;(function(Console){var Controls;(function(Controls){var InputControl=function(){function InputControl(executeCallback,intellisenseContext,resizeListViewCommand,bridge){this._executeCallback=executeCallback;this._intellisenseContext=intellisenseContext;this._bridge=bridge;this._resizeListView=resizeListViewCommand;this._commandItems=[];this._commandIndex=-1;this._isSingleLineMode=!0;this._savedSelectionValid=!1;this.initialize()}return Object.defineProperty(InputControl.prototype,"commandItems",{get:function(){return this._commandItems},enumerable:!0,configurable:!0}),Object.defineProperty(InputControl.prototype,"isSingleLineMode",{get:function(){return this._isSingleLineMode},set:function(value){value?this.switchToSingleLineConsole():this.switchToMultiLineConsole()},enumerable:!0,configurable:!0}),Object.defineProperty(InputControl.prototype,"inputText",{get:function(){return this._isSingleLineMode?this._singleInputElement.value:this._multiInputElement.value},set:function(text){this._isSingleLineMode?this._singleInputElement.value=text:this._multiInputElement.value=text},enumerable:!0,configurable:!0}),Object.defineProperty(InputControl.prototype,"inputElement",{get:function(){return this._isSingleLineMode?this._singleInputElement:this._multiInputElement},enumerable:!0,configurable:!0}),InputControl.prototype.enable=function(){this._inputPanelElement.style.display="block"},InputControl.prototype.disable=function(){this._inputPanelElement.style.display="none"},InputControl.prototype.executeCommandApi=function(command){return this.inputElement.value=command,this.executeCommand(),this._inputId},InputControl.prototype.onInputKeyDownApi=function(e){e.target=this.inputElement;return this.onInputKeyDown(e)},InputControl.prototype.focusOnInput=function(){this.inputElement.focus()},InputControl.prototype.setSelectionRange=function(start,end){this.inputElement.setSelectionRange(start,end)},InputControl.prototype.handleContextMenu=function(e){return this.showContextMenu(e.clientX,e.clientY),e.stopImmediatePropagation(),e.preventDefault(),!1},InputControl.prototype.invokeContextMenu=function(menuId,menuItem){switch(menuItem.id){case"menuConsoleInputCut":Common.ClipboardHelper.fireCutEvent(this._inputBoxContainer);break;case"menuConsoleInputCopy":Common.ClipboardHelper.fireCopyEvent(this._inputBoxContainer);break;case"menuConsoleInputPaste":Common.ClipboardHelper.firePasteEvent(this._inputBoxContainer)}},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._inputBoxContainer=document.getElementById("inputBoxContainer");Common.ClipboardHelper.addCutListener(this._inputBoxContainer,this.onCut.bind(this));Common.ClipboardHelper.addCopyListener(this._inputBoxContainer,this.onCopy.bind(this));Common.ClipboardHelper.addPasteListener(this._inputBoxContainer,this.onPaste.bind(this));this.attachButtonEvents(this._executeButton,function(){return _this.executeButtonPressed()});this.attachButtonEvents(this._toggleButton,function(){_this._isSingleLineMode?F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.SINGLE_LINE_TO_MULTI_LINE,0):F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.MULTI_LINE_TO_SINGLE_LINE,0);_this.toggleLineMode()});this.attachButtonEvents(this._clearInputButton,function(){_this._isSingleLineMode?F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.SINGLE_LINE_CLEAR_INPUT,0):F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.MULTI_LINE_CLEAR_INPUT,0);_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(){return ScriptedHost.Tooltip.show({content:Common.ToolWindowHelpers.loadString("ConsoleClearInputButtonTooltip")}),!0};this._singleInputElement.onmouseover=function(){return ScriptedHost.Tooltip.show({content:Common.ToolWindowHelpers.loadString("ConsoleInputTooltipSingleLine")}),!0};this._multiInputElement.onmouseover=function(){return ScriptedHost.Tooltip.show({content:Common.ToolWindowHelpers.loadString("ConsoleInputTooltipMultiLine")}),!0};this._singleInputElement.setAttribute("aria-label",Common.ToolWindowHelpers.loadString("ConsoleInputTooltipSingleLine"));this._multiInputElement.setAttribute("aria-label",Common.ToolWindowHelpers.loadString("ConsoleInputTooltipMultiLine"));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)});ScriptedHost.F12&&ScriptedHost.F12.addEventListener("keydown",function(e){e.keyCode===73&&!e.ctrlKey&&e.altKey&&e.shiftKey&&_this.inputElement.focus()})},InputControl.prototype.attachButtonEvents=function(button,callback){button.addEventListener("click",function(){callback()});button.addEventListener("keydown",function(e){(e.keyCode===13||e.keyCode===32)&&(callback(),e.preventDefault())})},InputControl.prototype.onDividerMouseDown=function(e){var _this=this,startY=e.clientY,startHeight=this._inputPanelElement.clientHeight,maxHeight=this._mainContainer.clientHeight-this._toolbar.clientHeight,mouseMoveHandler=function(e){_this.setPaneHeight(Math.min(maxHeight,startHeight+startY-e.clientY))},mouseUpHandler=function(){document.removeEventListener("mousemove",mouseMoveHandler);document.removeEventListener("mouseup",mouseUpHandler)};document.addEventListener("mousemove",mouseMoveHandler);document.addEventListener("mouseup",mouseUpHandler)},InputControl.prototype.onInputKeyDown=function(e){var shiftKey,navigateToNextCommand,length,inputText,start,end;if(this._intellisenseContext.intellisenseMenu.isOpen&&(this._intellisenseContext.intellisenseMenu.hasSelection||e.keyCode!==13))return!0;if(shiftKey=event.shiftKey&&!event.ctrlKey&&!event.altKey,event.keyCode===121&&shiftKey)return this.showContextMenu(0,0),e.stopImmediatePropagation(),e.preventDefault(),!1;if(e.target===this._singleInputElement)if(inputText=this._singleInputElement.value,this._commandItems.length>0&&e.keyCode===38){for(this._commandIndex=this._commandIndex<this._commandItems.length-1?this._commandIndex:this._commandItems.length-1;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();this._commandIndex<0?this._singleInputElement.setSelectionRange(0,0):(length=this._commandItems[this._commandIndex].length,this._singleInputElement.setSelectionRange(length,length));F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.ARROW_UP,1);this._intellisenseContext.initialize(this._singleInputElement)}else if(this._commandItems.length>0&&e.keyCode===40){for(navigateToNextCommand=this._commandIndex>=0,this._commandIndex=this._commandIndex<0?0:this._commandIndex;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._commandItems[this._commandIndex]&&(length=this._commandItems[this._commandIndex].length,this._singleInputElement.setSelectionRange(length,length));F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.ARROW_DOWN,1);this._intellisenseContext.initialize(this._singleInputElement)}else{if(e.keyCode===77&&e.shiftKey&&e.ctrlKey&&!e.altKey)return F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.SINGLE_LINE_TO_MULTI_LINE,1),this.toggleLineMode(),e.preventDefault(),!1;if(e.keyCode!==13||e.shiftKey||e.ctrlKey||e.altKey)if(e.keyCode!==13||!e.shiftKey||e.ctrlKey||e.altKey){if(!this._intellisenseContext.intellisenseMenu.isOpen&&e.keyCode===27)return F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.SINGLE_LINE_CLEAR_INPUT,1),this.setSingleLineInputElementText(""),e.preventDefault(),e.stopPropagation(),!1}else F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.FORCE_INTO_MULTI_LINE,1),start=this._singleInputElement.selectionStart,end=this._singleInputElement.selectionEnd,this.toggleLineMode(),this._multiInputElement.setSelectionRange(start,end);else this._intellisenseContext.uninitialize(),F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.SINGLE_LINE_RUN_SCRIPT,1),this.executeCommand(),this._intellisenseContext.initialize(this._singleInputElement)}else if(inputText=this._multiInputElement.value,e.keyCode!==9||e.shiftKey||e.altKey||e.ctrlKey)if(e.keyCode!==13||!e.ctrlKey||e.shiftKey||e.altKey){if(e.keyCode===77&&e.ctrlKey&&e.shiftKey&&!e.altKey)return F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.MULTI_LINE_TO_SINGLE_LINE,1),this.toggleLineMode(),e.preventDefault(),!1;if(!this._intellisenseContext.intellisenseMenu.isOpen&&e.keyCode===27)return F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.MULTI_LINE_CLEAR_INPUT,1),this.setMultiLineInputElementText(""),e.preventDefault(),e.stopPropagation(),!1}else this._intellisenseContext.intellisenseMenu.isOpen=!1,F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.MULTI_LINE_RUN_SCRIPT,1),this.executeCommand();else return this._intellisenseContext.uninitialize(),start=this._multiInputElement.selectionStart,end=this._multiInputElement.selectionEnd,this.updateInputElementTextRange(start,end,"\t"),this._multiInputElement.setSelectionRange(start+1,start+1),this._intellisenseContext.initialize(this._multiInputElement),e.preventDefault(),!1;return!0},InputControl.prototype.onCut=function(){var selection=Common.ToolWindowHelpers.getSelection(this.inputElement),cutText=this.onCopy();return this.updateInputElementTextRange(selection.start,selection.end,""),this.inputElement.setSelectionRange(selection.start,selection.start),cutText},InputControl.prototype.onCopy=function(){var selection=Common.ToolWindowHelpers.getSelection(this.inputElement);return this.inputElement.focus(),this.inputElement.value.substring(selection.start,selection.end)},InputControl.prototype.onPaste=function(pasteText){var _this=this,selection=Common.ToolWindowHelpers.getSelection(this.inputElement),cursorPos;return pasteText.indexOf("\n")>=0&&this._isSingleLineMode?(pasteText=pasteText.replace(/\r\n/g,"\n"),this.switchToMultiLineConsole(),this._intellisenseContext.uninitialize(),this.updateInputElementTextRange(selection.start,selection.end,pasteText),cursorPos=selection.start+pasteText.length,this._multiInputElement.setSelectionRange(cursorPos,cursorPos),this._intellisenseContext.initialize(this._multiInputElement),setImmediate(function(){return _this.inputElement.focus()}),!1):(this.updateInputElementTextRange(selection.start,selection.end,pasteText),cursorPos=selection.start+pasteText.length,setImmediate(function(){return _this.inputElement.setSelectionRange(cursorPos,cursorPos)}),!1)},InputControl.prototype.multiOnBlur=function(){return this._savedSelectionEnd=this._multiInputElement.selectionEnd,this._savedSelectionValid=!0,!0},InputControl.prototype.multiOnFocus=function(){return this._savedSelectionValid&&this._multiInputElement.selectionEnd>=this._multiInputElement.value.length&&this._multiInputElement.setSelectionRange(this._savedSelectionEnd,this._savedSelectionEnd),!0},InputControl.prototype.setPaneHeight=function(newHeight){if(newHeight=Math.round(newHeight),!(newHeight<InputControl.MinPaneSize)){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();newHeight<InputControl.MinMultiLineConsolePaneSize?this.switchToSingleLineConsole(newHeight):this._isSingleLineMode&&newHeight>=InputControl.MinMultiLineConsolePaneSize&&this.switchToMultiLineConsole(newHeight)}},InputControl.prototype.switchToSingleLineConsole=function(paneHeight){if(!this._isSingleLineMode){this._isSingleLineMode=!0;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(){ScriptedHost.Tooltip.show({content:Common.ToolWindowHelpers.loadString("ToggleToMultiLineTooltip")})};this._toggleButton.setAttribute("aria-label",Common.ToolWindowHelpers.loadString("ToggleToMultiLineTooltip"));this._executeButton.onmouseover=function(){ScriptedHost.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){var text,inputContainer;this._isSingleLineMode&&(this._isSingleLineMode=!1,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(){ScriptedHost.Tooltip.show({content:Common.ToolWindowHelpers.loadString("ToggleToSingleLineTooltip")})},this._toggleButton.setAttribute("aria-label",Common.ToolWindowHelpers.loadString("ToggleToSingleLineTooltip")),this._executeButton.onmouseover=function(){ScriptedHost.Tooltip.show({content:Common.ToolWindowHelpers.loadString("RunScriptButtonTextMultiLine")})},this._executeButton.setAttribute("aria-label",Common.ToolWindowHelpers.loadString("RunScriptButtonTextMultiLine")),this._intellisenseContext.uninitialize(),this._intellisenseContext.initialize(this._multiInputElement),inputContainer=document.getElementById("inputBoxContainer"),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();this._isSingleLineMode?(F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.SINGLE_LINE_RUN_SCRIPT,0),this._singleInputElement.focus()):(F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.MULTI_LINE_RUN_SCRIPT,0),this._multiInputElement.focus())},InputControl.prototype.executeCommand=function(){var inputText="",inputId;this._isSingleLineMode?(inputText=this._singleInputElement.value,this._singleInputElement.value=""):inputText=this._multiInputElement.value;inputText=inputText.trim();inputId=this._executeCallback(inputText);this._inputId=inputId;inputId>=0&&this._isSingleLineMode&&(this._commandItems[this._commandItems.length-1]!==inputText&&this._commandItems.push(inputText),this._commandIndex=this._commandItems.length-1)},InputControl.prototype.toggleLineMode=function(){this._isSingleLineMode?this.switchToMultiLineConsole():this.switchToSingleLineConsole()},InputControl.prototype.clearInput=function(){this._isSingleLineMode?(this.setSingleLineInputElementText(""),this._singleInputElement.focus()):(this.setMultiLineInputElementText(""),this._multiInputElement.focus())},InputControl.prototype.setSingleLineInputElementText=function(text){var useUndo=document.queryCommandSupported("ms-beginUndoUnit");useUndo&&document.execCommand("ms-beginUndoUnit");this._singleInputElement.value=text;useUndo&&document.execCommand("ms-endUndoUnit")},InputControl.prototype.setMultiLineInputElementText=function(text){var useUndo=document.queryCommandSupported("ms-beginUndoUnit");useUndo&&document.execCommand("ms-beginUndoUnit");this._multiInputElement.value=text;useUndo&&document.execCommand("ms-endUndoUnit");this._savedSelectionValid=!1},InputControl.prototype.updateInputElementTextRange=function(start,end,text){var useUndo=document.queryCommandSupported("ms-beginUndoUnit"),fixFocus;useUndo&&document.execCommand("ms-beginUndoUnit");fixFocus=document.activeElement===this.inputElement;this.inputElement.value=Common.ToolWindowHelpers.replaceTextInRange(this.inputElement.value,start,end,text);fixFocus&&this.inputElement.focus();useUndo&&document.execCommand("ms-endUndoUnit")},InputControl.prototype.showContextMenu=function(clientX,clientY){var _this=this,x=clientX,y=clientY,offset,_menuItems,contextMenu;(clientX<=0||clientY<=0)&&(offset=this.inputElement.getBoundingClientRect(),x=offset.left,y=offset.top);_menuItems=[{id:"menuConsoleInputCut",type:1,label:ScriptedHost.Resources.getString("/Common/CutMenuText"),accessKey:ScriptedHost.Resources.getString("AccessKeyCtrlX")},{id:"menuConsoleInputCopy",type:1,label:ScriptedHost.Resources.getString("/Common/CopyMenuText"),accessKey:ScriptedHost.Resources.getString("AccessKeyCtrlC")},{id:"menuConsoleInputPaste",type:1,label:ScriptedHost.Resources.getString("/Common/PasteMenuText"),accessKey:ScriptedHost.Resources.getString("AccessKeyCtrlV")}];contextMenu=ScriptedHost.ContextMenu.create(_menuItems,null,null,null,function(menuId,menuItem){return _this.invokeContextMenu(menuId,menuItem)});contextMenu.addEventListener("dismiss",function(){contextMenu.dispose()});contextMenu.attach(this.inputElement);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,InputControl}();Controls.InputControl=InputControl})(Controls=Console.Controls||(Console.Controls={}))})(Console=Tools.Console||(Tools.Console={}))})(Tools=F12.Tools||(F12.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(F12){"use strict";var ScriptedHost=Microsoft.Plugin,Tools;(function(Tools){var Console;(function(Console){var MenuOutputAreaItems,ContextMenuController;(function(MenuOutputAreaItems){MenuOutputAreaItems[MenuOutputAreaItems.MenuConsoleViewAsHtml=0]="MenuConsoleViewAsHtml";MenuOutputAreaItems[MenuOutputAreaItems.MenuConsoleViewAsObject=1]="MenuConsoleViewAsObject";MenuOutputAreaItems[MenuOutputAreaItems.MenuConsoleShowInDom=2]="MenuConsoleShowInDom";MenuOutputAreaItems[MenuOutputAreaItems.MenuConsoleAddToWatch=3]="MenuConsoleAddToWatch";MenuOutputAreaItems[MenuOutputAreaItems.MenuConsoleCopy=5]="MenuConsoleCopy";MenuOutputAreaItems[MenuOutputAreaItems.MenuConsoleCopyItem=6]="MenuConsoleCopyItem";MenuOutputAreaItems[MenuOutputAreaItems.MenuConsoleCopyAll=7]="MenuConsoleCopyAll";MenuOutputAreaItems[MenuOutputAreaItems.MenuConsoleClear=9]="MenuConsoleClear";MenuOutputAreaItems[MenuOutputAreaItems.MenuConsoleFilterErrors=11]="MenuConsoleFilterErrors";MenuOutputAreaItems[MenuOutputAreaItems.MenuConsoleFilterWarnings=12]="MenuConsoleFilterWarnings";MenuOutputAreaItems[MenuOutputAreaItems.MenuConsoleFilterMessages=13]="MenuConsoleFilterMessages";MenuOutputAreaItems[MenuOutputAreaItems.MenuConsoleFilterLog=14]="MenuConsoleFilterLog";MenuOutputAreaItems[MenuOutputAreaItems.MenuConsoleFilterAll=15]="MenuConsoleFilterAll"})(MenuOutputAreaItems||(MenuOutputAreaItems={}));ContextMenuController=function(){function ContextMenuController(console,listview,bridge){this._menuId="ConsoleOutputContextMenu";this._selectedItem=null;this._menuItems=[{id:"menuConsoleViewAsHtml",type:1,label:ScriptedHost.Resources.getString("/Common/ViewAsHtmlMenuText")},{id:"menuConsoleViewAsObject",type:1,label:ScriptedHost.Resources.getString("/Common/ViewAsObjectMenuText")},{id:"menuConsoleShowInDom",type:1,label:ScriptedHost.Resources.getString("/Common/SelectInDom")},{id:"menuConsoleAddToWatch",type:1,label:ScriptedHost.Resources.getString("/Common/AddToWatch")},{id:"separator",type:3},{id:"menuConsoleCopy",type:1,label:ScriptedHost.Resources.getString("/Common/CopyMenuText")},{id:"menuConsoleCopyItem",type:1,label:ScriptedHost.Resources.getString("/Common/CopyItemMenuText")},{id:"menuConsoleCopyAll",type:1,label:ScriptedHost.Resources.getString("/Common/CopyAllMenuText")},{id:"separator",type:3},{id:"menuConsoleClear",type:1,label:ScriptedHost.Resources.getString("/Common/ClearMenuText")},{id:"separator",type:3},{id:"menuConsoleFilterErrors",type:0,label:ScriptedHost.Resources.getString("/Common/FilterErrorsMenuText")},{id:"menuConsoleFilterWarnings",type:0,label:ScriptedHost.Resources.getString("/Common/FilterWarningsMenuText")},{id:"menuConsoleFilterMessages",type:0,label:ScriptedHost.Resources.getString("/Common/FilterMessagesMenuText")},{id:"menuConsoleFilterLog",type:0,label:ScriptedHost.Resources.getString("/Common/FilterLogMenuText")},{id:"menuConsoleFilterAll",type:0,label:ScriptedHost.Resources.getString("/Common/FilterDisplayAllMenuText")}];this._console=console;this._listview=listview;this._bridge=bridge;this.initialize()}return ContextMenuController.prototype.canViewAsHtml=function(){if(this._selectedItem&&this._selectedItem instanceof Common.ObjectView.TreeViewOutputItem&&!this._selectedItem.isStale){var item=this._selectedItem;return(item.viewableTypeFlags&2)==2}return!1},ContextMenuController.prototype.canViewAsObject=function(){if(this._selectedItem&&this._selectedItem instanceof Common.ObjectView.TreeViewOutputItem&&!this._selectedItem.isStale){var item=this._selectedItem;return(item.viewableTypeFlags&1)==1}return!1},ContextMenuController.prototype.canViewInDom=function(){return this.canViewAsObject()&&this._selectedItem.uidChain!==null},ContextMenuController.prototype.canAddToWatch=function(){return this._selectedItem&&this._selectedItem.getWatchExpression()!==undefined&&!this._selectedItem.isStale},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;return event.keyCode===121&&shiftKey&&(this.showContextMenu(0,0),event.preventDefault(),event.stopImmediatePropagation()),this._console.onConsoleMenuLoaded(),!0},ContextMenuController.prototype.onOutputAreaContextMenu=function(e){return this._console.onConsoleBeforeMenuLoaded(),this.showContextMenu(e.clientX,e.clientY),e.preventDefault(),e.stopImmediatePropagation(),this._console.onConsoleMenuLoaded(),!1},ContextMenuController.prototype.showContextMenu=function(x,y){var _this=this,selectedRow=null,rect;this._selectedItem=null;this._selectedText=Common.ToolWindowHelpers.getSelectedText();x<=0||y<=0?(x=0,y=0,document.activeElement&&(this._selectedItem=this._listview.getSelectedItem(),this._selectedItem&&(selectedRow=this._listview.getSelectedRow(),selectedRow&&(rect=selectedRow.getBoundingClientRect(),x=rect.left+20,y=rect.top+rect.height/2)))):(this._selectedItem=this._listview.getSelectedItem(),selectedRow=this._listview.getSelectedRow());this._contextMenu||(this._menuItems[0].disabled=function(){return!_this.canViewAsHtml()},this._menuItems[1].disabled=function(){return!_this.canViewAsObject()},this._menuItems[2].disabled=function(){return!_this.canViewInDom()},this._menuItems[3].disabled=function(){return!_this.canAddToWatch()},this._menuItems[3].hidden=function(){return!_this.hasAddToWatch()},this._menuItems[5].disabled=function(){return!_this._selectedText},this._menuItems[6].disabled=function(){return!(_this._selectedItem!==null)},this._menuItems[7].disabled=function(){return!(_this._listview.getItemCount()>0)},this._menuItems[9].disabled=function(){return!(_this._listview.getUnfilteredItemCount()>0)},this._menuItems[11].checked=function(){return _this._console.notificationFilters.errors},this._menuItems[12].checked=function(){return _this._console.notificationFilters.warnings},this._menuItems[13].checked=function(){return _this._console.notificationFilters.messages},this._menuItems[14].checked=function(){return _this._console.notificationFilters.log},this._menuItems[15].checked=function(){return _this._console.notificationFilters.errors&&_this._console.notificationFilters.warnings&&_this._console.notificationFilters.messages&&_this._console.notificationFilters.log},this._contextMenu=ScriptedHost.ContextMenu.create(this._menuItems,this._menuId,null,null,function(menuId,menuItem){return _this.onMenuItemClicked(menuId,menuItem.id,_this._selectedItem,selectedRow,_this._selectedText)}));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].id:selectedItem&&selectedItem instanceof Common.ObjectView.TreeViewOutputItem&&(F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.VIEW_AS_HTML,2),this._console.evaluateItemAsType(selectedItem,2));break;case menuItems[1].id:selectedItem&&selectedItem instanceof Common.ObjectView.TreeViewOutputItem&&(F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.VIEW_AS_OBJECT,2),this._console.evaluateItemAsType(selectedItem,1));break;case menuItems[2].id:selectedItem&&selectedItem instanceof Common.ObjectView.TreeViewHtmlItem&&(F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.VIEW_IN_DOM_EXPLORER,2),this._console.selectItemInDom(selectedItem));break;case menuItems[3].id:F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.ADD_TO_WATCH,2);this._console.addToWatch(selectedItem);break;case menuItems[5].id:F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.COPY,2);this._console.copySelectedTextToClipboard(selectedText);break;case menuItems[6].id:F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.COPY_ITEM,2);this._console.copyItemToClipboard(selectedItem);break;case menuItems[7].id:F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.COPY_ALL,2);this._console.copyAll();break;case menuItems[9].id:F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.CLEAR_CONSOLE,2);this._console.clear();break;case menuItems[11].id:this._console.toggleFilter(Common.ObjectView.TreeViewUtils.ConsoleFilterId.error);break;case menuItems[12].id:this._console.toggleFilter(Common.ObjectView.TreeViewUtils.ConsoleFilterId.warning);break;case menuItems[13].id:this._console.toggleFilter(Common.ObjectView.TreeViewUtils.ConsoleFilterId.message);break;case menuItems[14].id:this._console.toggleFilter(Common.ObjectView.TreeViewUtils.ConsoleFilterId.log);break;case menuItems[15].id:this._console.toggleFilter(Common.ObjectView.TreeViewUtils.ConsoleFilterId.all,!0)}}},ContextMenuController}();Console.ContextMenuController=ContextMenuController})(Console=Tools.Console||(Tools.Console={}))})(Tools=F12.Tools||(F12.Tools={}))})(F12||(F12={})),function(F12){"use strict";var ScriptedHost=Microsoft.Plugin,Tools;(function(Tools){var Console;(function(Console){var ConsoleWindow=function(){function ConsoleWindow(bridge,traceWriter){var _this=this,splitter,isMouseHooked,toggleSplitterState,eventData;this._telemetryLoadStartTime=Date.now();this._bridge=bridge;this._breakpointState=this._bridge.breakpointState;this._throttle=new Common.MessageThrottle;this._traceWriter=traceWriter;this.traceWriter.raiseEvent(401);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._targetManager.currentEngine},this._breakpointState,this));this._outputList=document.getElementById("outputList");this._warningSection=document.getElementById("warningSection");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._bridge);this._contextMenuController=new Console.ContextMenuController(this,this._listview,this._bridge);this._model=new Console.ConsoleModel;this._inputItemsMap={};this._countItemsMap={};this._groupStack=[new Common.ObjectView.TreeViewGroupItem];this._consoleOutputCallback=function(outputObj,engineId){_this.onConsoleOutput(outputObj,engineId)};this._targetManager=new Console.TargetManager(this._model,this._bridge,this._breakpointState);this._targetManager.ready.addHandler(function(e){return _this.onTargetManagerReady(e)});this._targetManager.updated.addHandler(function(){return _this.onTargetManagerUpdated()});this._targetManager.added.addHandler(function(t){return _this.onTargetManagerAdded(t)});this._targetManager.removed.addHandler(function(t){return _this.onTargetManagerRemoved(t)});this._targetManager.targetUpdated.addHandler(function(e){return _this.onTargetManagerTargetUpdated(e)});this.initialize();ScriptedHost.F12?(ScriptedHost.F12.Communications.addEventListener("onUnhandledException",function(e){var info=e.customData;_this.writeMessage({messageId:info.messageId,messageText:info.messageText,fileUrl:info.fileName,lineNumber:info.lineNumber,columnNumber:info.columnNumber},Console.IEBridge.ENGINE_ID,2)}),ScriptedHost.F12.Communications.addEventListener("onDebuggerEvent",function(e){var info=e.customData;_this.writeMessage({messageId:info.messageId,messageText:info.messageText,fileUrl:info.fileName,lineNumber:info.lineNumber,columnNumber:info.columnNumber},Console.IEBridge.ENGINE_ID,info.messageType)})):this._bridge.addEventListener("scriptError",function(e){_this.writeMessage({messageId:e.messageId,messageText:e.messageText,fileUrl:e.fileName,lineNumber:e.lineNumber,columnNumber:e.columnNumber},e.engineId,2)});ScriptedHost.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(ScriptedHost.F12.PluginId.Console),splitter=document.getElementById("f12ConsoleSplitter"),isMouseHooked=!1,splitter.addEventListener("mousedown",function(){if(!isMouseHooked){document.body.classList.add("splitterNS");var mouseUpHandler=function(){document.body.classList.remove("splitterNS");document.removeEventListener("mousemove",mouseMoveHandler,!0);document.removeEventListener("mouseup",mouseUpHandler,!0);isMouseHooked=!1},mouseMoveHandler=function(e){e.buttons?ScriptedHost.F12.setConsoleClientArea(0,e.screenY,0,0):mouseUpHandler(e)};splitter.focus();document.addEventListener("mousemove",mouseMoveHandler,!0);document.addEventListener("mouseup",mouseUpHandler,!0);isMouseHooked=!0}}),toggleSplitterState=function(show){show&&ScriptedHost.F12.activePluginId!==ScriptedHost.F12.myPluginId&&ScriptedHost.F12.activePluginId!==ScriptedHost.F12.PluginId.Debugger?document.body.classList.add("showSplitter"):document.body.classList.remove("showSplitter");show&&_this.inputControl.focusOnInput()},ScriptedHost.F12.addEventListener("consolestateshown",toggleSplitterState.bind(this,!0)),ScriptedHost.F12.addEventListener("consolestatehidden",toggleSplitterState.bind(this,!1)),ScriptedHost.F12.addEventListener("activated",toggleSplitterState.bind(this,!1)),ScriptedHost.F12.addEventListener("selectedpluginchanged",function(){toggleSplitterState(ScriptedHost.F12.activePluginId===ScriptedHost.F12.myPluginId||ScriptedHost.F12.getIsShowingConsole())}),toggleSplitterState(ScriptedHost.F12.getIsShowingConsole()));this._bridge.addEventListener("toggleFilter",function(e){return _this.toggleFilter(e.filterIndex)});this._bridge.addEventListener("break",this.onBreak.bind(this));this._bridge.addEventListener("load",this.onLoad.bind(this));Common.ToolWindowHelpers.initializeToolWindow();ScriptedHost.F12&&this._model.notificationCounts.propertyChanged.addHandler(this.onConsoleNotificationCountsChanged.bind(this));eventData={toolName:Common.ToolName.CONSOLE,durationMs:Date.now()-this._telemetryLoadStartTime};F12.Console.Telemetry.analytics.log(Common.TelemetryEventName.TOOL_LOADED,eventData,2);this.traceWriter.raiseEvent(402)}return Object.defineProperty(ConsoleWindow.prototype,"onConsoleUpdated",{get:function(){return this._onConsoleUpdated},set:function(callback){this._onConsoleUpdated=callback;this._listview.onUpdated=callback},enumerable:!0,configurable:!0}),Object.defineProperty(ConsoleWindow.prototype,"onConsoleBeforeRendering",{get:function(){return this._onConsoleBeforeRendering},set:function(callback){this._onConsoleBeforeRendering=callback},enumerable:!0,configurable:!0}),Object.defineProperty(ConsoleWindow.prototype,"onConsoleRendered",{get:function(){return this._onConsoleRendered},set:function(callback){this._onConsoleRendered=callback},enumerable:!0,configurable:!0}),Object.defineProperty(ConsoleWindow.prototype,"onConsoleReady",{get:function(){return this._onConsoleReady},set:function(callback){this._onConsoleReady=callback},enumerable:!0,configurable:!0}),Object.defineProperty(ConsoleWindow.prototype,"isConsoleTargetSet",{get:function(){return this._isConsoleTargetSet},enumerable:!0,configurable:!0}),Object.defineProperty(ConsoleWindow.prototype,"onConsoleTargetSet",{get:function(){return this._onConsoleTargetSet},set:function(callback){this._onConsoleTargetSet=callback},enumerable:!0,configurable:!0}),Object.defineProperty(ConsoleWindow.prototype,"onConsoleBreak",{get:function(){return this._onConsoleBreak},set:function(callback){this._onConsoleBreak=callback},enumerable:!0,configurable:!0}),Object.defineProperty(ConsoleWindow.prototype,"traceWriter",{get:function(){return this._traceWriter},enumerable:!0,configurable:!0}),Object.defineProperty(ConsoleWindow.prototype,"contextMenuController",{get:function(){return this._contextMenuController},enumerable:!0,configurable:!0}),Object.defineProperty(ConsoleWindow.prototype,"notificationFilters",{get:function(){return this._model.notificationFilters},enumerable:!0,configurable:!0}),Object.defineProperty(ConsoleWindow.prototype,"listView",{get:function(){return this._listview},enumerable:!0,configurable:!0}),Object.defineProperty(ConsoleWindow.prototype,"inputControl",{get:function(){return this._inputControl},enumerable:!0,configurable:!0}),Object.defineProperty(ConsoleWindow.prototype,"intellisenseContext",{get:function(){return this._intellisenseContext},enumerable:!0,configurable:!0}),Object.defineProperty(ConsoleWindow.prototype,"atBreakpoint",{get:function(){return this._breakpointState.atBreakpoint},enumerable:!0,configurable:!0}),Object.defineProperty(ConsoleWindow.prototype,"documentMode",{get:function(){return this._docMode},enumerable:!0,configurable:!0}),ConsoleWindow.prototype.getTargets=function(){var targets=[];return this._targetManager.forEachTarget(function(value){targets.push(value)}),targets},ConsoleWindow.prototype.getCurrentTarget=function(){return this._targetManager.current},ConsoleWindow.prototype.setCurrentTarget=function(target){var _this=this;return new ScriptedHost.Promise(function(completed){if(_this._model.currentTarget===target.targetId){completed();return}var onchanged=function(){_this._targetManager.changed.removeHandler(onchanged);completed()};_this._targetManager.changed.addHandler(onchanged);_this._model.currentTarget=target.targetId})},ConsoleWindow.prototype.onError=function(message,file,line,additionalInfo,column){var parts,errorMessage;try{file&&(parts=file.split("/"),parts.length>0&&(file=parts[parts.length-1]));errorMessage=Common.ToolWindowHelpers.loadString("ConsoleScriptError")+"\r\n"+message+"\r\n"+Common.FormattingHelpers.fileLineColumnFormat(file,line,column)+"\r\n"+additionalInfo;this.showNotification(2,errorMessage)}catch(ex){}},ConsoleWindow.prototype.onListViewToggle=function(item){var _this=this,objectItem=item;objectItem.isExpandable&&objectItem.getChildren(function(command,args,callback,preMessageCallback){var engine=_this._targetManager.getEngine(objectItem.target.engineId);return engine.channel.call(command,args,callback,preMessageCallback)},function(children){_this._listview.addItems(children,item);_this._onConsoleUpdated&&_this._onConsoleUpdated(children,item)})},ConsoleWindow.prototype.copySelectedTextToClipboard=function(){this._copyText=Common.ToolWindowHelpers.getTextForClipboard();Common.ClipboardHelper.fireCopyEvent(this._outputList)},ConsoleWindow.prototype.copyItemToClipboard=function(item){this._copyText=item.getCopyText();Common.ClipboardHelper.fireCopyEvent(this._outputList)},ConsoleWindow.prototype.copyAll=function(){var _this=this;this._copyText=this._groupStack[0].getCopyText("",function(item){return _this.notificationFilter(item)},!0);Common.ClipboardHelper.fireCopyEvent(this._outputList)},ConsoleWindow.prototype.getCopyText=function(){return this._copyText},ConsoleWindow.prototype.evaluateItemAsType=function(item,viewType){var engine=this._targetManager.getEngine(item.target.engineId);return item.evaluateAsType(function(command,args,callback,preMessageCallback){return engine.channel.call(command,args,callback,preMessageCallback)},viewType,this.onConsoleOutput.bind(this))},ConsoleWindow.prototype.selectItemInDom=function(item){this._bridge.selectDomElement(item.target.engineId,item.uidChain)},ConsoleWindow.prototype.addToWatch=function(consoleItem){if(consoleItem){var watchExpression=consoleItem.getWatchExpression();if(watchExpression!=undefined)return ScriptedHost.F12.Debugger.addToWatch(watchExpression)}},ConsoleWindow.prototype.hasAddToWatch=function(){return typeof ScriptedHost.F12!="undefined"&&typeof ScriptedHost.F12.Debugger!="undefined"&&typeof ScriptedHost.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.writeMessage=function(e,engineId,messageType){e.lineNumber+=1;e.columnNumber+=1;e.messageId&&(e.messageText=e.messageId+": "+e.messageText);var notifyObject={inputId:"-1",notifyType:Common.ObjectView.TreeViewNotifyItem.getNotifyTypeString(messageType),message:{messageId:e.messageId,message:e.messageText,fileUrl:e.fileUrl,lineNumber:e.lineNumber,columnNumber:e.columnNumber}},engine=this._targetManager.getEngine(engineId);this.onConsoleNotification(notifyObject,engineId)},ConsoleWindow.prototype.toggleFilter=function(filterIndex,displayAllShouldDefaultToOn){if(typeof displayAllShouldDefaultToOn!="boolean"&&(displayAllShouldDefaultToOn=!1),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);onCount===4||onCount>0&&!displayAllShouldDefaultToOn?(this._model.notificationFilters.errors=!1,this._model.notificationFilters.warnings=!1,this._model.notificationFilters.messages=!1,this._model.notificationFilters.log=!1):(this._model.notificationFilters.errors=!0,this._model.notificationFilters.warnings=!0,this._model.notificationFilters.messages=!0,this._model.notificationFilters.log=!0);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)},ConsoleWindow.prototype.onConsoleMenuLoaded=function(){this.traceWriter.raiseEvent(418)},ConsoleWindow.prototype.fireBuildListBoxStartEvent=function(etwKey){this.traceWriter.raiseEventWithKey(421,etwKey)},ConsoleWindow.prototype.fireBuildListBoxEndEvent=function(etwKey){this.traceWriter.raiseEventWithKey(422,etwKey)},ConsoleWindow.prototype.fireResetListBoxStartEvent=function(etwKey){this.traceWriter.raiseEventWithKey(423,etwKey)},ConsoleWindow.prototype.fireResetListBoxEndEvent=function(etwKey){this.traceWriter.raiseEventWithKey(424,etwKey)},ConsoleWindow.prototype.fireSetFilterStartEvent=function(etwKey){this.traceWriter.raiseEventWithKey(425,etwKey)},ConsoleWindow.prototype.fireSetFilterEndEvent=function(etwKey){this.traceWriter.raiseEventWithKey(426,etwKey)},ConsoleWindow.prototype.fireUpdateLayoutStartEvent=function(etwKey){this.traceWriter.raiseEventWithKey(427,etwKey)},ConsoleWindow.prototype.fireUpdateLayoutEndEvent=function(etwKey){this.traceWriter.raiseEventWithKey(428,etwKey)},ConsoleWindow.prototype.expandMultiLineItem=function(item){if(this.traceWriter.raiseEvent(415),item instanceof Common.ObjectView.TreeViewItem){var expanded=item.expandLines();expanded&&this._listview.updateItemLines(item,1)}this.traceWriter.raiseEvent(416)},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,toggleButton,errorsButton;this._toolbar=new Common.Controls.ToolbarControl("Console.consoleToolbarTemplate");this._toolbar.title=ScriptedHost.Resources.getString("ConsoleToolLabelText");this._toolbar.model=this._model;this._toolbar.panelTemplateId="Console.consoleButtonsPanel";document.getElementById("toolbar").appendChild(this._toolbar.rootElement);this._toolbar.addClickHandlerToButton("clearButton",function(){F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.CLEAR_CONSOLE,0);_this.clear()});this._model.notificationFilters.propertyChanged.addHandler(function(){return _this.resetFilter()});Common.ClipboardHelper.addCopyListener(this._outputList,this.onCopy.bind(this));ScriptedHost.F12||(toggleButton=document.getElementById("toggleButton"),errorsButton=this._toolbar.getNamedElement("errorsButton"),toggleButton.addEventListener("keydown",function(e){if(e.keyCode===9&&!e.altKey&&!e.ctrlKey&&!e.shiftKey)return errorsButton.focus(),e.preventDefault(),!1}),errorsButton.addEventListener("keydown",function(e){if(e.keyCode===9&&!e.altKey&&!e.ctrlKey&&e.shiftKey)return toggleButton.focus(),e.preventDefault(),!1}));document.addEventListener("click",function(e){if(e.target instanceof HTMLElement){var target=e.target;target.classList.contains("BPT-FileLink")?_this.openTargetElementFileLink(target):(target.classList.contains("BPT-HelpLink")||target.classList.contains("BPT-IELink"))&&_this.openTargetElementIELink(target)}},!0);document.addEventListener("keydown",function(e){var handled=!1,target=document.activeElement,fileLink;target&&(e.keyCode===112?(_this.handleHelpLinkRequest(target)&&e.preventDefault(),handled=!0):e.keyCode===13?(fileLink=target.querySelector(".BPT-FileLink"),!fileLink&&target.nextElementSibling&&(fileLink=target.nextElementSibling.querySelector(".BPT-FileLink")),fileLink&&(_this.openTargetElementFileLink(fileLink),e.preventDefault()),handled=!0):e.keyCode!==90&&e.keyCode!==89||!e.ctrlKey||e.altKey||e.shiftKey||(handled=!0));!handled&&ScriptedHost.F12&&_this.notifyOnKeydown(e)},!0);ScriptedHost.F12?ScriptedHost.F12.addEventListener("browsershortcut",function(e){if(e.ctrlKey&&!e.altKey&&!e.shiftKey&&e.keyCode===79||e.ctrlKey&&e.shiftKey&&!e.altKey&&e.keyCode===80)return _this.notifyOnKeydown(e),!1;if(e.ctrlKey||e.altKey||e.shiftKey||e.keyCode!==112){if(e.ctrlKey&&!e.altKey&&!e.shiftKey&&e.keyCode===76)return F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.CLEAR_CONSOLE,1,0),_this.clear(),!1}else{var target=document.activeElement;if(target)return!_this.handleHelpLinkRequest(target)}return!0}):this._clearConsoleCommandBinding=ScriptedHost.VS.Commands.bindCommand({name:"clearconsole",onexecute:function(){F12.Console.Telemetry.analytics.logExecuteCommand(F12.Console.Telemetry.CommandName.CLEAR_CONSOLE,1,1);_this.clear()}});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();ScriptedHost.F12&&Console.SelfTest&&Console.SelfTest.init(this)},ConsoleWindow.prototype.onCopy=function(){return this._copyText},ConsoleWindow.prototype.notifyOnKeydown=function(e){ScriptedHost.F12&&ScriptedHost.F12.notifyOnKeydown(e.keyCode,(e.altKey?4:0)|(e.ctrlKey?2:0)|(e.shiftKey?1:0))},ConsoleWindow.prototype.openTargetElementIELink=function(target){var url=target.getAttribute("data-linkUrl");ScriptedHost.F12.openBrowser(url)},ConsoleWindow.prototype.openTargetElementFileLink=function(target){var url=target.getAttribute(target.hasAttribute("data-originalLinkUrl")?"data-originalLinkUrl":"data-linkUrl"),line=target.getAttribute(target.hasAttribute("data-originalLinkLine")?"data-originalLinkLine":"data-linkLine"),col=target.getAttribute(target.hasAttribute("data-originalLinkCol")?"data-originalLinkCol":"data-linkCol"),lineNumber=0,colNumber;line&&(lineNumber=parseInt(line,10));colNumber=0;col&&(colNumber=parseInt(col,10));Common.ProjectDocuments.showDocument(url,lineNumber,colNumber)},ConsoleWindow.prototype.handleHelpLinkRequest=function(target){var helpLink=target.querySelector(".BPT-HelpLink");return helpLink?(this.openTargetElementHelpLink(helpLink),!0):!1},ConsoleWindow.prototype.openTargetElementHelpLink=function(target){var keyword=target.getAttribute("data-linkKeyword"),url=target.getAttribute("data-linkUrl");this._bridge.openF1HelpLink(keyword,url)},ConsoleWindow.prototype.attachButtonEvents=function(button,callback){button.addEventListener("click",function(e){callback(e)});button.addEventListener("keydown",function(e){(e.keyCode===13||e.keyCode===32)&&(callback(e),e.preventDefault())})},ConsoleWindow.prototype.onTargetManagerReady=function(engine){engine&&(engine.addEventListener("clearOnNavigate",this.clearOnNavigate.bind(this)),engine.channel.clearCallbacks(),engine.channel.call("registerConsoleCallbacks",[this.onConsoleOutput.bind(this),this.onConsoleNotification.bind(this),this.onRemoteCleared.bind(this),]),this._inputControl.enable(),this.clearWarningText(),engine.connectionInfo.docMode<9&&this.setWarningText(Common.ToolWindowHelpers.loadString("ConsoleUnsupportedDocumentModeError",[engine.connectionInfo.docMode])),ScriptedHost.F12&&ScriptedHost.F12.TraceWriter.markToolReady(),Common.ToolWindowHelpers.codeMarker(Common.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsConsoleReady),this._onConsoleReady&&this._onConsoleReady())},ConsoleWindow.prototype.onTargetManagerUpdated=function(){var _this=this;this._breakpointState.atBreakpoint||(this._model.targets.length>0?(this._inputControl.enable(),this._targetManager.currentEngine&&this._targetManager.currentEngine.connectionInfo&&this._targetManager.currentEngine.connectionInfo.docMode<9?this.setWarningText(Common.ToolWindowHelpers.loadString("ConsoleUnsupportedDocumentModeError",[this._targetManager.currentEngine.connectionInfo.docMode])):this.clearWarningText()):(this._inputControl.disable(),setTimeout(function(){_this._model.targets.length===0&&_this.setWarningText(Common.ToolWindowHelpers.loadString("DiagnosticsDisabled"))},3e3)))},ConsoleWindow.prototype.onTargetManagerAdded=function(target){this._isConsoleTargetSet=!0;this._onConsoleTargetSet&&this._onConsoleTargetSet();target&&ScriptedHost.F12&&ScriptedHost.F12.Communications.fireEvent("targetAdded",ScriptedHost.F12.PluginId.Debugger,target)},ConsoleWindow.prototype.onTargetManagerRemoved=function(target){target&&(this.listView.markItemsAsStale(target.targetId,target.engineId),ScriptedHost.F12&&ScriptedHost.F12.Communications.fireEvent("targetRemoved",ScriptedHost.F12.PluginId.Debugger,target))},ConsoleWindow.prototype.onTargetManagerTargetUpdated=function(args){ScriptedHost.F12&&(ScriptedHost.F12.Communications.fireEvent("targetRemoved",ScriptedHost.F12.PluginId.Debugger,args.originalTarget),ScriptedHost.F12.Communications.fireEvent("targetAdded",ScriptedHost.F12.PluginId.Debugger,args.newTarget))},ConsoleWindow.prototype.onBreak=function(){this.onConsoleBreak&&this.onConsoleBreak()},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.setWarningText=function(text){document.getElementById("warningMessageText").innerText=text;this._warningSection.style.display="block";this._outputList.style.height="calc(100% - "+this._warningSection.clientHeight+"px)"},ConsoleWindow.prototype.clearWarningText=function(){var toolLabelText=Common.ToolWindowHelpers.loadString("ConsoleToolLabelText");document.getElementById("warningMessageText").innerText=toolLabelText;this._warningSection.style.display="none";this._outputList.style.height="100%"},ConsoleWindow.prototype.addItemToListView=function(item,linkedTo,linkAsSibling){var currentGroup=this._groupStack[this._groupStack.length-1];(this._groupStack.length===1||this._listview.isItemExpanded(currentGroup)||currentGroup.isFirstUIChildNeeded())&&(linkedTo&&currentGroup.isItemInGroup(linkedTo)?this._listview.addItems([item],linkedTo,linkAsSibling):this._listview.addItems([item],currentGroup,!1,!0),this._listview.isAutoScrollToItemEnabled(item)&&(this._listview.selectItem(item,!1),this._listview.scrollToBottom()));linkAsSibling&&linkedTo?currentGroup.addChild(item,linkedTo):currentGroup.addChild(item);this._model.listViewItemCount++;this._onConsoleUpdated&&this._onConsoleUpdated([item],linkedTo)},ConsoleWindow.prototype.onInput=function(command,onCompleteCallback){if(!this._targetManager.currentEngine)return this.showNotification(5,Common.ToolWindowHelpers.loadString("NotAttached"),null),-1;if(typeof command!="string")return-1;if(command&&/\S/.test(command)){if(command==="console.test_exception")throw"Test Exception";this.traceWriter.raiseEvent(407);var inputItem=new Common.ObjectView.TreeViewInputItem(command,onCompleteCallback);return this._inputItemsMap[inputItem.id]=inputItem,this.addItemToListView(inputItem),window.msWriteProfilerMark("ConsoleWindow:BeginPostInput"),this._breakpointState.atBreakpoint?this._targetManager.currentEngine.channel.executeBreakModeCommand("processInput",inputItem.consoleItemId,command,this._consoleOutputCallback):this._targetManager.currentEngine.channel.call("processInput",[inputItem.id,command],this._consoleOutputCallback),window.msWriteProfilerMark("ConsoleWindow:EndPostInput"),this.traceWriter.raiseEvent(408),inputItem.consoleItemId}return-1},ConsoleWindow.prototype.onOutput=function(item){if(item){this.traceWriter.raiseEvent(409);var matchingInputItem=null;this._inputItemsMap.hasOwnProperty(item.matchingInputId)&&(matchingInputItem=this._inputItemsMap[item.matchingInputId]);this.addItemToListView(item,matchingInputItem,!0);matchingInputItem&&matchingInputItem.executeCallback(item);Common.ToolWindowHelpers.codeMarker(Common.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsConsoleEvalEnd);this.traceWriter.raiseEvent(410)}},ConsoleWindow.prototype.onConsoleOutput=function(outputObject,engineId){var engine=this._targetManager.getEngine(engineId),targetInfo,matchingInputItem,watchExpression,outputItem;if(!outputObject){this.showNotification(2,Common.ToolWindowHelpers.loadString("ConsoleObjectNotFoundError"),engineId);return}targetInfo=engine.channel.target;ScriptedHost.F12&&ScriptedHost.F12.Communications.fireEvent("consoleOutput",ScriptedHost.F12.PluginId.Debugger);outputObject.inputId&&this._inputItemsMap.hasOwnProperty(outputObject.inputId)&&(matchingInputItem=this._inputItemsMap[outputObject.inputId],watchExpression="("+matchingInputItem.getWatchExpression()+")");outputItem=outputObject.detailedType!=="htmlElement"?new Common.ObjectView.TreeViewObjectItem(outputObject,targetInfo,null,watchExpression):new Common.ObjectView.TreeViewHtmlItem(outputObject,targetInfo,null,null,null,null,watchExpression);this.onOutput(outputItem)},ConsoleWindow.prototype.onConsoleNotification=function(notifyObject,engineId){var _this=this,engine,lineNumber,columnNumber,fileUrl;if(notifyObject.targetInfo||(notifyObject.targetInfo={engineId:engineId,kind:0,targetType:"unknown",targetId:"unknown"},engineId!==undefined&&(engine=this._targetManager.getEngine(engineId),engine&&(notifyObject.targetInfo.kind=engine.targetEngineKind))),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,!0);break;case Common.ObjectView.TreeViewUtils.ConsoleInternalMessage.endGroup:this.endGroup();break;case Common.ObjectView.TreeViewUtils.ConsoleInternalMessage.displayTraceStyles:this.displayTraceStyles(notifyObject.message.viewableObject)}else if(notifyObject.notifyType==="count")this.addOrUpdateCountItem(notifyObject);else{if(notifyObject.notifyType===Common.ObjectView.TreeViewUtils.ConsoleNotifyType.error&&notifyObject.message.messageId==="HTTP404"&&/(\.css\.map|\.js\.map)$/i.test(notifyObject.message.message))return;typeof notifyObject.message=="object"&&(lineNumber=notifyObject.message.lineNumber,columnNumber=notifyObject.message.columnNumber,fileUrl=notifyObject.message.fileUrl,notifyObject.message.originalLineNumber=lineNumber,notifyObject.message.originalColumnNumber=columnNumber,notifyObject.message.originalFileUrl=fileUrl);this._bridge.getTranslatedLocation(fileUrl,lineNumber,columnNumber,!1).done(function(translatedLocation){var notifyItem,notifyType;typeof notifyObject.message=="object"&&(notifyObject.message.fileUrl=translatedLocation.documentPath,notifyObject.message.lineNumber&&translatedLocation.oneBasedLine&&(notifyObject.message.lineNumber=translatedLocation.oneBasedLine),notifyObject.message.columnNumber&&translatedLocation.oneBasedColumn&&(notifyObject.message.columnNumber=translatedLocation.oneBasedColumn));notifyObject&&notifyObject.message&&notifyObject.message.viewableObject&&notifyObject.message.viewableObject.length===1&&notifyObject.message.viewableObject[0].detailedType==="htmlElement"?(notifyType=Common.ObjectView.TreeViewNotifyItem.parseNotifyTypeString(notifyObject.notifyType),notifyItem=new Common.ObjectView.TreeViewHtmlItem(notifyObject.message.viewableObject[0],notifyObject.targetInfo,null,null,notifyType,!0)):notifyItem=new Common.ObjectView.TreeViewNotifyItem(notifyObject);switch(notifyItem.notifyType){case 1:case 2:_this._model.notificationCounts.errors++;break;case 3:_this._model.notificationCounts.messages++;break;case 5:_this._model.notificationCounts.warnings++}_this.onOutput(notifyItem)})}},ConsoleWindow.prototype.addOrUpdateCountItem=function(notifyObject){var newCountItem=new Common.ObjectView.TreeViewCountItem(notifyObject),targetId,name,targetCountItemMap;if(targetId=notifyObject&&notifyObject.targetInfo?notifyObject.targetInfo.targetId:"__DefaultTarget__",name=notifyObject.message.name,(name===undefined||name===null)&&(name="__DefaultCounterIndex__"),this._countItemsMap||(this._countItemsMap={}),targetCountItemMap=this._countItemsMap.hasOwnProperty(targetId)?this._countItemsMap[targetId]:this._countItemsMap[targetId]={},targetCountItemMap.hasOwnProperty(name))targetCountItemMap[name].value=newCountItem.value,this._listview.refresh(),this._onConsoleUpdated&&this._onConsoleUpdated([targetCountItemMap[name]]);else{targetCountItemMap[name]=newCountItem;this.onOutput(newCountItem)}},ConsoleWindow.prototype.onClearHost=function(clearOutput,engine,callRemote){if(clearOutput===void 0&&(clearOutput=!0),engine===void 0&&(engine=null),callRemote===void 0&&(callRemote=!0),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{engine&&this.listView.markItemsAsStale(null,engine.engineId);var separator=new Common.ObjectView.TreeViewSeparatorItem;this.addItemToListView(separator)}engine&&!clearOutput?(callRemote&&engine.channel.call("clearConsoleData"),delete this._countItemsMap[engine.engineId]):callRemote&&this._targetManager.forEachEngine(function(e){e.channel.call("clearConsoleData")})},ConsoleWindow.prototype.onRemoteCleared=function(callRemote,engineId){var engine=this._targetManager.getEngine(engineId);if(!this._model.shouldClearOnNavigate&&engine&&engine.targetEngineKind===2)this.clearOnNavigate(engine,callRemote);else this.onClearHost(!0,engine,callRemote)},ConsoleWindow.prototype.clearOnNavigate=function(e,callRemote){var _this=this,ignoreClearRequestFromEmptyTarget,isTargetEmpty,emptyTargets,engine;callRemote===void 0&&(callRemote=!0);ignoreClearRequestFromEmptyTarget=!1;this._targetManager.current&&this._targetManager.currentEngine.engineId!==e.engineId&&(isTargetEmpty=function(item){var currentTarget=_this._targetManager.getTarget(item.value);return currentTarget&&currentTarget.engineId===e.engineId&&currentTarget.href==="about:blank"&&currentTarget.targetType==="_top"},emptyTargets=this._model.targets.filter(isTargetEmpty),ignoreClearRequestFromEmptyTarget=emptyTargets&&emptyTargets.length===1);engine=this._targetManager.getEngine(e.engineId);this.onClearHost(this._model.shouldClearOnNavigate&&!ignoreClearRequestFromEmptyTarget,engine,callRemote)},ConsoleWindow.prototype.onListViewClick=function(item,row,cell){(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],newGroup;this._groupStack.length>1&&!this._listview.isItemExpanded(currentGroup)&&(isCollapsed=!0);newGroup=new Common.ObjectView.TreeViewGroupItem(title,isCollapsed);this.addItemToListView(newGroup,currentGroup);this._groupStack.push(newGroup)},ConsoleWindow.prototype.endGroup=function(){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:!1,name:"",value:styles,uid:"0"});this.onOutput(outputItem)},ConsoleWindow.prototype.showNotification=function(type,message,engineId){var notifyObject={inputId:"-1",notifyType:Common.ObjectView.TreeViewNotifyItem.getNotifyTypeString(type),message:message};this.onConsoleNotification(notifyObject,engineId)},ConsoleWindow.prototype.resetFilter=function(){var _this=this;this._listview.setFilter(function(item){return _this.notificationFilter(item)})},ConsoleWindow.prototype.notificationFilter=function(item){if(item instanceof Common.ObjectView.TreeViewItem){var consoleItem=item;if(consoleItem.notifyType===2&&!this._model.notificationFilters.errors||consoleItem.notifyType===1&&!this._model.notificationFilters.errors||consoleItem.notifyType===5&&!this._model.notificationFilters.warnings||consoleItem.notifyType===3&&!this._model.notificationFilters.messages||consoleItem.notifyType===4&&!this._model.notificationFilters.log)return!1}return!0},ConsoleWindow.prototype.onConsoleBeforeRenderingHandler=function(){this.traceWriter.raiseEvent(411);this._onConsoleBeforeRendering&&this._onConsoleBeforeRendering()},ConsoleWindow.prototype.onConsoleRenderedHandler=function(){this.traceWriter.raiseEvent(412);this._onConsoleRendered&&this._onConsoleRendered()},ConsoleWindow.prototype.onConsoleBeforeItemToggled=function(){this.traceWriter.raiseEvent(413)},ConsoleWindow.prototype.onConsoleItemToggled=function(){this.traceWriter.raiseEvent(414)},ConsoleWindow.prototype.onConsoleBeforeScroll=function(){this.traceWriter.raiseEvent(419)},ConsoleWindow.prototype.onConsoleScrolled=function(){this.traceWriter.raiseEvent(420)},ConsoleWindow.prototype.onConsoleNotificationCountsChanged=function(propertyName){propertyName==="errors"&&ScriptedHost.F12.Header.notifyConsoleErrorsUpdated(this._model.notificationCounts.errors)},ConsoleWindow}();Console.ConsoleWindow=ConsoleWindow})(Console=Tools.Console||(Tools.Console={}))})(Tools=F12.Tools||(F12.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(F12){"use strict";var ScriptedHost=Microsoft.Plugin,Tools;(function(Tools){var Console;(function(Console){var ConsoleApp=function(){function ConsoleApp(){}return ConsoleApp.prototype.main=function(){var _this=this;ScriptedHost.addEventListener("pluginready",function(){var traceWriter=new Common.TraceWriter,bridge,proxy;if(Microsoft&&ScriptedHost&&(ScriptedHost.Tooltip&&(ScriptedHost.Tooltip.defaultTooltipContentToHTML=!1),ScriptedHost.F12?bridge=new Console.IEBridge(ScriptedHost.F12,window.external,traceWriter):ScriptedHost.VS&&(proxy=ScriptedHost.Utilities.JSONMarshaler.attachToPublishedObject("F12.Console.Bridge.IConsoleBridge",{},!0),bridge=new Console.VSBridge(proxy,ScriptedHost.VS,traceWriter)),F12.Console.Telemetry.initializeAnalytics()),document.documentMode<10){window.navigate("about:blank");return}_this.console=new Console.ConsoleWindow(bridge,traceWriter);_this.onConsoleAppLoaded&&_this.onConsoleAppLoaded()});Common.ErrorHandling.addPromiseErrorListener()},ConsoleApp}();Console.ConsoleApp=ConsoleApp;Console.App=new ConsoleApp})(Console=Tools.Console||(Tools.Console={}))})(Tools=F12.Tools||(F12.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(F12){"use strict";var ScriptedHost=Microsoft.Plugin,Tools;(function(Tools){var Console;(function(Console){var ConsoleItemContractApi=function(){function ConsoleItemContractApi(consoleItem){this._consoleItem=consoleItem}return Object.defineProperty(ConsoleItemContractApi.prototype,"consoleItem",{get:function(){return this._consoleItem},enumerable:!0,configurable:!0}),Object.defineProperty(ConsoleItemContractApi.prototype,"id",{get:function(){return this.consoleItem.id},enumerable:!0,configurable:!0}),Object.defineProperty(ConsoleItemContractApi.prototype,"htmlLinesFileLine",{get:function(){return this.consoleItem.htmlLinesFileLine},enumerable:!0,configurable:!0}),Object.defineProperty(ConsoleItemContractApi.prototype,"htmlLines",{get:function(){return this.consoleItem.htmlLines},enumerable:!0,configurable:!0}),Object.defineProperty(ConsoleItemContractApi.prototype,"isExpandable",{get:function(){if(this.consoleItem.isExpandable!=undefined)return this.consoleItem.isExpandable;throw new Error("Selected console item  does not have a property 'isExpandable'.")},enumerable:!0,configurable:!0}),Object.defineProperty(ConsoleItemContractApi.prototype,"value",{get:function(){return this.consoleItem.value},enumerable:!0,configurable:!0}),Object.defineProperty(ConsoleItemContractApi.prototype,"name",{get:function(){return this.consoleItem.name},enumerable:!0,configurable:!0}),Object.defineProperty(ConsoleItemContractApi.prototype,"isStale",{get:function(){return this.consoleItem.isStale},enumerable:!0,configurable:!0}),ConsoleItemContractApi.prototype.getObjectName=function(){var results=/function (.{1,})\(/.exec(this._consoleItem.constructor.toString());return results&&results.length>1?results[1]:""},ConsoleItemContractApi.prototype.exists=function(){return this.consoleItem?!0:!1},ConsoleItemContractApi}(),ConsoleUpdatedEventArguments,IntellisenseResultsAvailableEventArguments,NotificationFilter,MenuItems,ContractApiHelper;Console.ConsoleItemContractApi=ConsoleItemContractApi;ConsoleUpdatedEventArguments=function(){function ConsoleUpdatedEventArguments(consoleItems,consoleLinkedItem){this.items=consoleItems;this.linkedItem=consoleLinkedItem}return ConsoleUpdatedEventArguments}();Console.ConsoleUpdatedEventArguments=ConsoleUpdatedEventArguments;IntellisenseResultsAvailableEventArguments=function(){function IntellisenseResultsAvailableEventArguments(){}return IntellisenseResultsAvailableEventArguments}();Console.IntellisenseResultsAvailableEventArguments=IntellisenseResultsAvailableEventArguments,function(NotificationFilter){NotificationFilter[NotificationFilter.Error=0]="Error";NotificationFilter[NotificationFilter.Warning=1]="Warning";NotificationFilter[NotificationFilter.Info=2]="Info";NotificationFilter[NotificationFilter.Log=3]="Log";NotificationFilter[NotificationFilter.All=4]="All"}(Console.NotificationFilter||(Console.NotificationFilter={}));NotificationFilter=Console.NotificationFilter,function(MenuItems){MenuItems[MenuItems.Copy=0]="Copy";MenuItems[MenuItems.Cut=1]="Cut";MenuItems[MenuItems.Paste=2]="Paste"}(Console.MenuItems||(Console.MenuItems={}));MenuItems=Console.MenuItems;ContractApiHelper=function(){function ContractApiHelper(consoleWindow){var _this=this;this._consoleWindow=consoleWindow;this._consoleWindow.onConsoleUpdated=function(items,linkedItem){_this.onConsoleUpdatedHandler(items,linkedItem)};this._consoleWindow.intellisenseContext.intellisenseProvider.onIntellisenseResultsAvailable=function(){return _this.onIntellisenseResultsAvailableHandler()};this._consoleWindow.onConsoleRendered=function(){_this.onConsoleRenderedHandler()};this._consoleWindow.onConsoleBeforeRendering=function(){_this.onConsoleBeforeRenderingHandler()};this._consoleWindow.onConsoleReady=function(){_this.onConsoleReadyHandler()};this._consoleWindow.onConsoleBreak=function(){_this.onConsoleBreakHandler()};this._consoleWindow.listView.setFilter(function(item){return item&&item.value&&item.value.indexOf("DOM7005")!==-1?!1:!0})}return Object.defineProperty(ContractApiHelper.prototype,"atBreakpoint",{get:function(){return this._consoleWindow.atBreakpoint},enumerable:!0,configurable:!0}),Object.defineProperty(ContractApiHelper.prototype,"docMode",{get:function(){return this._consoleWindow.documentMode},enumerable:!0,configurable:!0}),Object.defineProperty(ContractApiHelper.prototype,"commandItems",{get:function(){return this._consoleWindow.inputControl.commandItems},enumerable:!0,configurable:!0}),Object.defineProperty(ContractApiHelper.prototype,"isSingleLineMode",{get:function(){return this._consoleWindow.inputControl.isSingleLineMode},set:function(value){this._consoleWindow.inputControl.isSingleLineMode=value},enumerable:!0,configurable:!0}),Object.defineProperty(ContractApiHelper.prototype,"isIntellisenseMenuOpen",{get:function(){return this._consoleWindow.intellisenseContext.intellisenseMenu.isOpen},enumerable:!0,configurable:!0}),Object.defineProperty(ContractApiHelper.prototype,"willIntellisenseMenuBeOpen",{get:function(){return this._consoleWindow.intellisenseContext.intellisenseMenu.willIntellisenseMenuBeOpen},enumerable:!0,configurable:!0}),ContractApiHelper.prototype.canViewAsHtml=function(item){return this._consoleWindow.contextMenuController.setSelectedItem(item.consoleItem),this._consoleWindow.contextMenuController.canViewAsHtml()},ContractApiHelper.prototype.canViewAsObject=function(item){return this._consoleWindow.contextMenuController.setSelectedItem(item.consoleItem),this._consoleWindow.contextMenuController.canViewAsObject()},ContractApiHelper.prototype.evaluateItemAsObject=function(item){return this.canViewAsObject(item)?this._consoleWindow.evaluateItemAsType(item.consoleItem,1):!1},ContractApiHelper.prototype.evaluateItemAsHtml=function(item){return this.canViewAsHtml(item)?this._consoleWindow.evaluateItemAsType(item.consoleItem,2):!1},ContractApiHelper.prototype.canAddToWatch=function(item){return this._consoleWindow.contextMenuController.setSelectedItem(item.consoleItem),this._consoleWindow.contextMenuController.canAddToWatch()},ContractApiHelper.prototype.addItemToWatch=function(item){return this._consoleWindow.addToWatch(item.consoleItem)},ContractApiHelper.prototype.copyConsoleItemToClipboard=function(item){this._consoleWindow.copyItemToClipboard(item.consoleItem)},ContractApiHelper.prototype.copyAllConsoleItems=function(){this._consoleWindow.copyAll()},ContractApiHelper.prototype.getClipboardText=function(){return this._consoleWindow.getCopyText()},ContractApiHelper.prototype.enableNotificationFilter=function(filter){this.isNotificationFilterEnabled(filter)||this.toggleNotificationFilter(filter)},ContractApiHelper.prototype.disableNotificationFilter=function(filter){this.isNotificationFilterEnabled(filter)&&this.toggleNotificationFilter(filter)},ContractApiHelper.prototype.toggleNotificationFilter=function(filter){switch(filter){case 0:this._consoleWindow.toggleFilter(Common.ObjectView.TreeViewUtils.ConsoleFilterId.error);break;case 1:this._consoleWindow.toggleFilter(Common.ObjectView.TreeViewUtils.ConsoleFilterId.warning);break;case 2:this._consoleWindow.toggleFilter(Common.ObjectView.TreeViewUtils.ConsoleFilterId.message);break;case 3:this._consoleWindow.toggleFilter(Common.ObjectView.TreeViewUtils.ConsoleFilterId.log);break;case 4:this._consoleWindow.toggleFilter(Common.ObjectView.TreeViewUtils.ConsoleFilterId.all)}},ContractApiHelper.prototype.isNotificationFilterEnabled=function(filter){switch(filter){case 0:return this._consoleWindow.notificationFilters.errors;case 1:return this._consoleWindow.notificationFilters.warnings;case 2:return this._consoleWindow.notificationFilters.messages;case 3:return this._consoleWindow.notificationFilters.log;case 4:return this._consoleWindow.notificationFilters.errors&&this._consoleWindow.notificationFilters.warnings&&this._consoleWindow.notificationFilters.messages&&this._consoleWindow.notificationFilters.log}},ContractApiHelper.prototype.processInput=function(input){return this._consoleWindow.inputControl.executeCommandApi(input)},ContractApiHelper.prototype.executeCommand=function(command,expectedResult){var _this=this;return new ScriptedHost.Promise(function(completed){var inputItemId="",onConsoleUpdated=function(args){var consoleItem=args.items[0],parentItem=args.linkedItem;consoleItem&&consoleItem.exists()&&inputItemId===""&&consoleItem.value===command&&(inputItemId=consoleItem.id);parentItem.exists()&&parentItem.id===inputItemId&&(_this.removeEventListener("onConsoleUpdated",onConsoleUpdated),completed(typeof expectedResult=="undefined"||consoleItem.value===expectedResult))};_this.addEventListener("onConsoleUpdated",onConsoleUpdated);_this.processInput(command)})},ContractApiHelper.prototype.setInputText=function(text){this._consoleWindow.inputControl.inputText=text},ContractApiHelper.prototype.getInputText=function(){return this._consoleWindow.inputControl.inputText},ContractApiHelper.prototype.typeInputText=function(text,clearLastValues){var _this=this;return clearLastValues===void 0&&(clearLastValues=!0),new ScriptedHost.Promise(function(completed){var onResultsAvailable=function(){completed(_this.getIntellisenseCompletionList());_this.removeEventListener("onIntellisenseResultsAvailable",onResultsAvailable)};clearLastValues&&_this._consoleWindow.intellisenseContext.intellisenseProvider.clearLastValues();text.length>1&&(_this._consoleWindow.inputControl.inputText=text.substr(0,text.length-1),_this._consoleWindow.inputControl.setSelectionRange(text.length-1,text.length-1),_this._consoleWindow.intellisenseContext.textEditorBridge.fireTextChanged());_this.addEventListener("onIntellisenseResultsAvailable",onResultsAvailable);_this._consoleWindow.inputControl.inputText=text;_this._consoleWindow.inputControl.setSelectionRange(text.length,text.length);_this._consoleWindow.intellisenseContext.textEditorBridge.fireTextChanged()})},ContractApiHelper.prototype.setCaretPosition=function(position){this._consoleWindow.intellisenseContext.textEditorBridge.caretPosition=position},ContractApiHelper.prototype.clear=function(){this._consoleWindow.clear()},ContractApiHelper.prototype.getConsoleItemCount=function(){var lineCount=this._consoleWindow.listView.getItemCount();return this._consoleWindow.listView.lineIndexToItemIndex(lineCount-1)+1},ContractApiHelper.prototype.getConsoleRowCount=function(){return this._consoleWindow.listView.getItemCount()},ContractApiHelper.prototype.getConsoleItemAt=function(itemIndex){var lineIndex=this._consoleWindow.listView.itemIndexToLineIndex(itemIndex);return new ConsoleItemContractApi(this._consoleWindow.listView.getItemAt(lineIndex))},ContractApiHelper.prototype.getConsoleItemsInRange=function(start,end){for(var items=[],i=start;i<end;i++)items.push(this.getConsoleItemAt(i));return items},ContractApiHelper.prototype.getConsoleItemIndentAt=function(index){return this._consoleWindow.listView.getTreeViewItemIndent(index)},ContractApiHelper.prototype.getConsoleItemIndent=function(consoleItemContract){var index=this._consoleWindow.listView.getIndex(consoleItemContract.consoleItem);return this._consoleWindow.listView.getTreeViewItemIndent(index)},ContractApiHelper.prototype.toggleItemAt=function(itemIndex,async){var _this=this;return async===void 0&&(async=!1),new ScriptedHost.Promise(function(completed){var onConsoleUpdated,lineIndex;async&&(onConsoleUpdated=function(){_this.removeEventListener("onConsoleUpdated",onConsoleUpdated);completed()},_this.addEventListener("onConsoleUpdated",onConsoleUpdated));lineIndex=_this._consoleWindow.listView.itemIndexToLineIndex(itemIndex);_this._consoleWindow.listView.toggleRowAt(lineIndex);async||completed()})},ContractApiHelper.prototype.toggleItem=function(consoleItemContract){var index=this._consoleWindow.listView.getIndex(consoleItemContract.consoleItem);this._consoleWindow.listView.toggleRowAt(index)},ContractApiHelper.prototype.isItemExpanded=function(consoleItemContract){return this._consoleWindow.listView.isItemExpanded(consoleItemContract.consoleItem)},ContractApiHelper.prototype.isItemExpandedAt=function(itemIndex){var lineIndex=this._consoleWindow.listView.itemIndexToLineIndex(itemIndex),consoleItem=this._consoleWindow.listView.getItemAt(lineIndex);if(consoleItem)return this._consoleWindow.listView.isItemExpanded(consoleItem)},ContractApiHelper.prototype.expandMultiLineItemAt=function(index){var item=this.getConsoleItemAt(index);this._consoleWindow.expandMultiLineItem(item.consoleItem)},ContractApiHelper.prototype.getIndex=function(consoleItemContract){return this._consoleWindow.listView.getIndex(consoleItemContract.consoleItem)},ContractApiHelper.prototype.getIntellisenseCompletionList=function(){return this._consoleWindow.intellisenseContext.intellisenseProvider.getCurrentFilteredIntellisenseCompletionList()},ContractApiHelper.prototype.getCurrentIntellisenseSelection=function(){return this._consoleWindow.intellisenseContext.intellisenseMenu.currentSelection},ContractApiHelper.prototype.sendInputKeyDownEvent=function(e){return this._consoleWindow.inputControl.onInputKeyDownApi(e)},ContractApiHelper.prototype.forceOpenIntellisenseMenu=function(caretPosition){var _this=this;return new ScriptedHost.Promise(function(completed){var onResultsAvailable=function(){completed(_this.getIntellisenseCompletionList());_this.removeEventListener("onIntellisenseResultsAvailable",onResultsAvailable)};_this.addEventListener("onIntellisenseResultsAvailable",onResultsAvailable);caretPosition||(caretPosition=_this._consoleWindow.intellisenseContext.textEditorBridge.text.length);_this._consoleWindow.intellisenseContext.textEditorBridge.caretPosition=caretPosition;_this._consoleWindow.intellisenseContext.textEditorBridge.onMenuRequested()})},ContractApiHelper.prototype.closeIntellisenseMenu=function(){this._consoleWindow.intellisenseContext.intellisenseMenu.isOpen=!1},ContractApiHelper.prototype.invokeInputBoxContextMenu=function(menuItem){switch(menuItem){case 0:this._consoleWindow.invokeInputBoxContextMenu("menuConsoleInputCopy");break;case 1:this._consoleWindow.invokeInputBoxContextMenu("menuConsoleInputCut");break;case 2:this._consoleWindow.invokeInputBoxContextMenu("menuConsoleInputPaste")}},ContractApiHelper.prototype.addEventListener=function(eventName,eventHandler){if(eventHandler){var eventListeners;switch(eventName){case"onConsoleUpdated":this._onConsoleUpdatedListeners||(this._onConsoleUpdatedListeners=[]);eventListeners=this._onConsoleUpdatedListeners;break;case"onIntellisenseResultsAvailable":this._onIntellisenseResultsAvailableListeners||(this._onIntellisenseResultsAvailableListeners=[]);eventListeners=this._onIntellisenseResultsAvailableListeners;break;case"onConsoleRendered":this._onConsoleRenderedListeners||(this._onConsoleRenderedListeners=[]);eventListeners=this._onConsoleRenderedListeners;break;case"onConsoleBeforeRendering":this._onConsoleBeforeRenderingListeners||(this._onConsoleBeforeRenderingListeners=[]);eventListeners=this._onConsoleBeforeRenderingListeners;break;case"onConsoleReady":this._onConsoleReadyListeners||(this._onConsoleReadyListeners=[]);eventListeners=this._onConsoleReadyListeners;break;case"onConsoleBreak":this._onConsoleBreakListeners||(this._onConsoleBreakListeners=[]);eventListeners=this._onConsoleBreakListeners}eventListeners&&eventListeners.push(eventHandler)}},ContractApiHelper.prototype.removeEventListener=function(eventName,eventHandler){var eventListeners,i;if(eventHandler){switch(eventName){case"onConsoleUpdated":eventListeners=this._onConsoleUpdatedListeners;break;case"onIntellisenseResultsAvailable":eventListeners=this._onIntellisenseResultsAvailableListeners;break;case"onConsoleRendered":eventListeners=this._onConsoleRenderedListeners;break;case"onConsoleBeforeRendering":eventListeners=this._onConsoleBeforeRenderingListeners;break;case"onConsoleReady":eventListeners=this._onConsoleReadyListeners;break;case"onConsoleBreak":eventListeners=this._onConsoleBreakListeners}eventListeners&&(i=-1,i=eventListeners.indexOf(eventHandler),i>=0&&eventListeners.splice(i,1))}},ContractApiHelper.prototype.getTargets=function(){return this._consoleWindow.getTargets()},ContractApiHelper.prototype.setTarget=function(target){return this._consoleWindow.setCurrentTarget(target)},ContractApiHelper.prototype.getCurrentTarget=function(){return this._consoleWindow.getCurrentTarget()},ContractApiHelper.prototype.enableClearOnNavigate=function(enable){this._consoleWindow.enableClearOnNavigate(enable)},ContractApiHelper.prototype.onConsoleUpdatedHandler=function(items,linkedItem){var consoleItems=[],i;if(items)for(i=0;i<items.length;i++)items[i]&&(!items[i].value||items[i].value&&items[i].value.indexOf("DOM7005")===-1)&&consoleItems.push(new ConsoleItemContractApi(items[i]));if(consoleItems.length!==0&&(this._onConsoleUpdated&&this._onConsoleUpdated(consoleItems,new ConsoleItemContractApi(linkedItem)),this._onConsoleUpdatedListeners))for(i=0;i<this._onConsoleUpdatedListeners.length;i++)this._onConsoleUpdatedListeners[i](new ConsoleUpdatedEventArguments(consoleItems,new ConsoleItemContractApi(linkedItem)))},ContractApiHelper.prototype.onConsoleRenderedHandler=function(){if(this._onConsoleRenderedListeners)for(var i=0;i<this._onConsoleRenderedListeners.length;i++)this._onConsoleRenderedListeners[i](null)},ContractApiHelper.prototype.onConsoleBeforeRenderingHandler=function(){if(this._onConsoleBeforeRenderingListeners)for(var i=0;i<this._onConsoleBeforeRenderingListeners.length;i++)this._onConsoleBeforeRenderingListeners[i](null)},ContractApiHelper.prototype.onConsoleReadyHandler=function(){if(this._onConsoleReadyListeners)for(var i=0;i<this._onConsoleReadyListeners.length;i++)this._onConsoleReadyListeners[i](null)},ContractApiHelper.prototype.onConsoleBreakHandler=function(){if(this._onConsoleBreakListeners)for(var i=0;i<this._onConsoleBreakListeners.length;i++)this._onConsoleBreakListeners[i](null)},ContractApiHelper.prototype.onIntellisenseResultsAvailableHandler=function(){if(this._onIntellisenseResultsAvailableListeners)for(var i=0;i<this._onIntellisenseResultsAvailableListeners.length;i++)this._onIntellisenseResultsAvailableListeners[i](new IntellisenseResultsAvailableEventArguments)},ContractApiHelper}();Console.ContractApiHelper=ContractApiHelper})(Console=Tools.Console||(Tools.Console={}))})(Tools=F12.Tools||(F12.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);__.prototype=b.prototype;d.prototype=new __},function(F12){"use strict";var Tools;(function(Tools){var Console;(function(Console){var ScriptEngine;(function(_ScriptEngine){function getNextTargetId(){return""+nextTargetId++}var nextTargetId=0,ScriptEngine=function(){function ScriptEngine(engineId){this._targets=new Map;this._events=new Map;this._engineId=engineId}return Object.defineProperty(ScriptEngine.prototype,"engineId",{get:function(){return this._engineId},enumerable:!0,configurable:!0}),Object.defineProperty(ScriptEngine.prototype,"targets",{get:function(){return this._targets},enumerable:!0,configurable:!0}),Object.defineProperty(ScriptEngine.prototype,"connectionInfo",{get:function(){return this._connectionInfo},enumerable:!0,configurable:!0}),ScriptEngine.prototype.addEventListener=function(eventType,callback){this._events.has(eventType)||this._events.set(eventType,new Common.EventSource);this._events.get(eventType).addHandler(callback)},ScriptEngine.prototype.removeEventListener=function(eventType,callback){this._events.has(eventType)&&this._events.get(eventType).removeHandler(callback)},ScriptEngine.prototype.start=function(){throw new Error("not implemented.")},ScriptEngine.prototype.filter=function(message){message.engineId!==this._engineId&&(message.handled=!0)},ScriptEngine.prototype.handleHandshake=function(message){message.data.substr(0,10)==="Handshake:"&&(this._connectionInfo=JSON.parse(message.data.substring(10)),this._targets.clear(),this._events.get("clearTargets").invoke({engine:this}),this._events.get("handshake").invoke({engine:this}),message.handled=!0)},ScriptEngine.prototype.targetCreated=function(message){if(message.data.substr(0,14)==="TargetCreated:"){var targetInfo=JSON.parse(message.data.substring(14));targetInfo.engineId=this._engineId;this._targets.set(targetInfo.targetId,targetInfo);this._events.get("targetCreated").invoke({engine:this,targetInfo:targetInfo});message.handled=!0}},ScriptEngine.prototype.targetsCleared=function(message){message.data==="ClearTargets"&&(this._targets.clear(),this._events.get("clearTargets").invoke({engine:this}),message.handled=!0)},ScriptEngine.prototype.targetClosed=function(message){if(message.data.substr(0,13)==="TargetClosed:"){var targetInfo=JSON.parse(message.data.substring(13));targetInfo.engineId=this._engineId;this._targets.delete(targetInfo.targetId);this._events.get("targetClosed").invoke({engine:this,targetInfo:targetInfo});message.handled=!0}},ScriptEngine.prototype.clearOnNavigate=function(message){message.data==="ClearOnNavigate"&&(this._events.has("clearOnNavigate")&&this._events.get("clearOnNavigate").invoke({engineId:this.engineId}),message.handled=!0)},ScriptEngine.prototype.targetUpdated=function(message){if(message.data.substr(0,14)==="TargetUpdated:"){var targetInfo=JSON.parse(message.data.substring(14));targetInfo.engineId=this._engineId;this._targets.set(targetInfo.targetId,targetInfo);this._events.get("targetUpdated").invoke({engine:this,targetInfo:targetInfo});message.handled=!0}},ScriptEngine.prototype.targetChanged=function(message){var targetInfo,localTargetInfo;message.data.substr(0,14)==="TargetChanged:"&&(targetInfo=JSON.parse(message.data.substring(14)),message.handled=!0,targetInfo&&targetInfo.targetId!==undefined?localTargetInfo=this._targets.get(targetInfo.targetId):targetInfo.targetType==="_top"&&this._targets.forEach(function(value){value.targetType==="_top"&&(localTargetInfo=value)}),localTargetInfo?this._events.get("targetChanged").invoke({engine:this,target:localTargetInfo}):Tools.Utility.Assert.failDebugOnly("Unexpected target: target shall be created before it can be changed."))},ScriptEngine}(),ChromiumScriptEngine,TridentScriptEngine;_ScriptEngine.ScriptEngine=ScriptEngine;ChromiumScriptEngine=function(_super){function ChromiumScriptEngine(engineId,targetId,proxy,breakpointState,traceWriter){_super.call(this,engineId);this._targetid=targetId;this._proxy=proxy;this._proxy.addEventListener("connect",this._onconnect=this.onConnectChromium.bind(this));this._proxy.addEventListener("detach",this._ondetach=this.onDetachChromium.bind(this));var vsChannel=new Console.VSConsoleChromeChannel(this._proxy,breakpointState,traceWriter);this._channel=new Console.Chromium.ChannelAdapter(vsChannel);this._channel.addMessageHandler("filter",this.filter.bind(this));this._channel.addMessageHandler("TargetCreated",this.targetCreated.bind(this));this._channel.addMessageHandler("ClearTargets",this.targetsCleared.bind(this));this._channel.addMessageHandler("TargetUpdated",this.targetUpdated.bind(this));this._channel.addMessageHandler("TargetClosed",this.targetClosed.bind(this));this._channel.addMessageHandler("ClearOnNavigate",this.clearOnNavigate.bind(this));this._channel.addMessageHandler("TargetChanged",this.targetChanged.bind(this))}return __extends(ChromiumScriptEngine,_super),Object.defineProperty(ChromiumScriptEngine.prototype,"id",{get:function(){return this._targetid},enumerable:!0,configurable:!0}),Object.defineProperty(ChromiumScriptEngine.prototype,"portName",{get:function(){return""},enumerable:!0,configurable:!0}),Object.defineProperty(ChromiumScriptEngine.prototype,"targetEngineKind",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(ChromiumScriptEngine.prototype,"channel",{get:function(){return this._channel},enumerable:!0,configurable:!0}),ChromiumScriptEngine.prototype.start=function(){this._channel.connect(this);this._channel.post("Connect")},ChromiumScriptEngine.prototype.onConnectChromium=function(e){if(e.engineId===this.engineId){var data="Handshake:"+JSON.stringify({docMode:11,contextInfo:"chromium"}),message={engineId:this.engineId,handled:!1,data:data};this.handleHandshake(message)}},ChromiumScriptEngine.prototype.onDetachChromium=function(e){var engineId=""+e.engineId;e.engineId===this.engineId&&(this._channel.detach(),this._proxy.removeEventListener("connect",this._onconnect),this._proxy.removeEventListener("detach",this._ondetach))},ChromiumScriptEngine}(ScriptEngine);_ScriptEngine.ChromiumScriptEngine=ChromiumScriptEngine;TridentScriptEngine=function(_super){function TridentScriptEngine(engineId,external,channel){_super.call(this,engineId);this._external=external;this._external.addEventListener("connect",this._onconnect=this.onConnectTrident.bind(this));this._external.addEventListener("detach",this._ondetach=this.onDetachTrident.bind(this));this._throttle=new Common.MessageThrottle;this._channel=channel;this._channel.addMessageProcessor("Throttle Messages",Common.MessageThrottle.splitMessage);this._channel.addMessageHandler("Combine Messages",this._throttle.combineMessages.bind(this._throttle));this._channel.addMessageHandler("filter",this.filter.bind(this));this._channel.addMessageHandler("Handshake",this.handleHandshake.bind(this));this._channel.addMessageHandler("TargetCreated",this.targetCreated.bind(this));this._channel.addMessageHandler("TargetClosed",this.targetClosed.bind(this));this._channel.addMessageHandler("TargetChanged",this.targetChanged.bind(this));this._channel.addMessageHandler("TargetUpdated",this.targetUpdated.bind(this));this._channel.addMessageHandler("ClearTargets",this.targetsCleared.bind(this));this._channel.addMessageHandler("ClearOnNavigate",this.clearOnNavigate.bind(this));this.addEventListener("handshake",this.onHandshakeTrident.bind(this))}return __extends(TridentScriptEngine,_super),Object.defineProperty(TridentScriptEngine.prototype,"id",{get:function(){return""},enumerable:!0,configurable:!0}),Object.defineProperty(TridentScriptEngine.prototype,"portName",{get:function(){return this._portName},enumerable:!0,configurable:!0}),Object.defineProperty(TridentScriptEngine.prototype,"targetEngineKind",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(TridentScriptEngine.prototype,"channel",{get:function(){return this._channel},enumerable:!0,configurable:!0}),TridentScriptEngine.prototype.start=function(){this._channel.connect(this);this._channel.loadScript("../Common/messageThrottle.js");this._channel.loadScript("../Common/isDebugBuild.js");this._channel.loadScript("../Common/assert.js");this._channel.loadScript("../Common/remoteHelpers.js");this._channel.loadScript("../Common/encodingUtilities.js");this._channel.loadScript("../Common/ObjectView/treeViewUtilities.js");this._channel.loadScript("../Common/ObjectView/treeViewRemoteHelpers.js");this._channel.loadScript("../Common/Intellisense/intellisenseRemoteHelpers.js");this._channel.loadScript("remoteConsoleHelpers.js");this._channel.loadScript("remote.js");this._channel.loadScript("remoteMain.js")},TridentScriptEngine.prototype.onConnectTrident=function(e){e.engineId===this.engineId&&(this._portName=e.portName)},TridentScriptEngine.prototype.onHandshakeTrident=function(){var target={targetId:getNextTargetId(),targetType:"_top",href:this.connectionInfo.contextInfo,origin:this.connectionInfo.origin,engineId:this.engineId};this.targets.set(target.targetId,target)},TridentScriptEngine.prototype.onDetachTrident=function(){this._external.removeEventListener("connect",this._onconnect);this._external.removeEventListener("detach",this._ondetach);this.channel.detach()},TridentScriptEngine}(ScriptEngine);_ScriptEngine.TridentScriptEngine=TridentScriptEngine})(ScriptEngine=Console.ScriptEngine||(Console.ScriptEngine={}))})(Console=Tools.Console||(Tools.Console={}))})(Tools=F12.Tools||(F12.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(F12){"use strict";var Tools;(function(Tools){var Console;(function(Console){var assert=F12.Tools.Utility.Assert,TargetManager=function(){function TargetManager(model,bridge,breakpointState){var _this=this;this._engines=new Map;this._targets=new Map;this._ready=new Common.EventSource;this._updated=new Common.EventSource;this._changed=new Common.EventSource;this._added=new Common.EventSource;this._removed=new Common.EventSource;this._targetUpdated=new Common.EventSource;this._closed=new Common.EventSource;assert.hasValue(model,"Invalid model.");assert.hasValue(bridge,"Invalid bridge.");assert.hasValue(breakpointState,"Invalid breakpointState.");this._model=model;this._bridge=bridge;this._breakpointState=breakpointState;this._model.currentTargetChanged.addHandler(function(newValue){return _this.onCurrentTargetChanged(newValue)});this._bridge.getScriptEngines().done(function(scriptEngines){for(var i=0;i<scriptEngines.length;++i)_this.onattach({engine:scriptEngines[i]});_this._bridge.addEventListener("attach",_this.onattach.bind(_this));_this._bridge.addEventListener("detach",_this.ondetach.bind(_this))});this._bridge.addEventListener("break",this.update.bind(this));this._bridge.addEventListener("run",this.update.bind(this))}return Object.defineProperty(TargetManager.prototype,"current",{get:function(){return this._targets.get(this._currentTarget)},enumerable:!0,configurable:!0}),Object.defineProperty(TargetManager.prototype,"currentEngine",{get:function(){if(this._currentTarget){var target=this._targets.get(this._currentTarget);if(target)return this._engines.get(target.engineId)}},enumerable:!0,configurable:!0}),Object.defineProperty(TargetManager.prototype,"ready",{get:function(){return this._ready},enumerable:!0,configurable:!0}),Object.defineProperty(TargetManager.prototype,"updated",{get:function(){return this._updated},enumerable:!0,configurable:!0}),Object.defineProperty(TargetManager.prototype,"changed",{get:function(){return this._changed},enumerable:!0,configurable:!0}),Object.defineProperty(TargetManager.prototype,"added",{get:function(){return this._added},enumerable:!0,configurable:!0}),Object.defineProperty(TargetManager.prototype,"removed",{get:function(){return this._removed},enumerable:!0,configurable:!0}),Object.defineProperty(TargetManager.prototype,"targetUpdated",{get:function(){return this._targetUpdated},enumerable:!0,configurable:!0}),Object.defineProperty(TargetManager.prototype,"closed",{get:function(){return this._closed},enumerable:!0,configurable:!0}),TargetManager.prototype.getEngine=function(engineId){return this._engines.get(engineId)},TargetManager.prototype.getTarget=function(targetId){return this._targets.get(targetId)},TargetManager.prototype.forEachEngine=function(callback){this._engines.forEach(callback)},TargetManager.prototype.forEachTarget=function(callback){this._targets.forEach(callback)},TargetManager.prototype.onCurrentTargetChanged=function(targetId){if(this._targets.has(targetId)){this._currentTarget=targetId;var target=this._targets.get(targetId),engine=this._engines.get(target.engineId);engine&&engine.channel&&engine.channel.target!==target?(engine.channel.target=target,engine.channel.call("switchTarget",[target.targetId,target.targetType])):this._changed.invoke(target)}},TargetManager.prototype.onattach=function(e){var engine=e.engine;engine.addEventListener("handshake",this.onhandshake.bind(this));engine.addEventListener("targetCreated",this.targetCreated.bind(this));engine.addEventListener("targetClosed",this.targetClosed.bind(this));engine.addEventListener("clearTargets",this.clearTargets.bind(this));engine.addEventListener("targetUpdated",this.onTargetUpdated.bind(this));engine.addEventListener("targetChanged",this.targetChanged.bind(this));engine.start();this._engines.set(engine.engineId,engine)},TargetManager.prototype.ondetach=function(e){var engineId=typeof e!="undefined"?e.engineId:null,engine=this._engines.get(engineId);assert.hasValue(engine,"Invalid engineId: "+engineId);engine&&(this._engines.delete(engineId),this.removeTargets(engine),this.update())},TargetManager.prototype.onhandshake=function(e){this.addTargets(e.engine);this._ready.invoke(e.engine)},TargetManager.prototype.targetCreated=function(e){this.addTarget(e.targetInfo);this.update()},TargetManager.prototype.onTargetUpdated=function(e){this.updateTarget(e.targetInfo)},TargetManager.prototype.clearTargets=function(e){this.removeTargets(e.engine);this.update()},TargetManager.prototype.targetClosed=function(e){this.removeTarget(e.targetInfo);this.update()},TargetManager.prototype.addTargets=function(engine){var _this=this;engine.targets.forEach(function(value){_this.addTarget(value)});this.update()},TargetManager.prototype.addTarget=function(target){if(this._targets.has(target.targetId))throw new Error("Target already added: "+target.targetId);this._targets.set(target.targetId,target);this._added.invoke(target)},TargetManager.prototype.updateTarget=function(targetInfo){var i,modelTarget,originalTargetInfo;if(!this._targets.has(targetInfo.targetId))throw new Error("Target not found: "+targetInfo.targetId);for(i=0;i<this._model.targets.length;i++)if(modelTarget=this._model.targets.getItem(i),targetInfo.targetId===modelTarget.value){modelTarget.text=targetInfo.targetType+": "+Common.ToolWindowHelpers.createShortenedUrlText(targetInfo.href);modelTarget.tooltip=targetInfo.href;modelTarget.label=modelTarget.text+": "+targetInfo.href;break}originalTargetInfo=this._targets.get(targetInfo.targetId);this._targets.set(targetInfo.targetId,targetInfo);this._targetUpdated.invoke({originalTarget:originalTargetInfo,newTarget:targetInfo})},TargetManager.prototype.removeTargets=function(engine){var _this=this;this._targets.forEach(function(target){target.engineId===engine.engineId&&_this.removeTarget(target)})},TargetManager.prototype.removeTarget=function(target){var i,targetId;for(this._targets.delete(target.targetId),i=0;i<this._model.targets.length;i++)if(targetId=this._model.targets.getItem(i).value,target.targetId===targetId){this._model.targets.splice(i,1);break}this._model.currentTarget===target.targetId&&(this._currentTarget=null,this._model.currentTarget=null);this._removed.invoke(target)},TargetManager.prototype.targetChanged=function(e){var target=e.target?this._targets.get(e.target.targetId):null,engine=this._engines.get(e.engine.engineId);target||this._targets.forEach(function(value){target||value.engineId!==engine.engineId||value.targetType!=="_top"||(target=value)});target&&(engine.channel.target=target,this._model.currentTarget=target.targetId,this._currentTarget=target.targetId);this._changed.invoke(target)},TargetManager.prototype.getSortedTargets=function(){var _this=this,targets=[],engineSort;return this._targets.forEach(function(value){var targetText=value.targetType+": "+Common.ToolWindowHelpers.createShortenedUrlText(value.href);targets.push({text:targetText,value:value.targetId,tooltip:value.href,label:targetText+": "+value.href})}),engineSort=function(a,b){var left=_this._targets.get(a.value),right=_this._targets.get(b.value);return left.engineId<right.engineId?-1:left.engineId>right.engineId?1:left.targetType==="_top"?-1:left.targetId<right.targetId?-1:left.targetId>right.targetId?1:0},targets.sort(engineSort),targets},TargetManager.prototype.update=function(){var targets,breakpointMessage,targetsUpdate,length,x;if(this._currentTarget&&this._targets.has(this._currentTarget)||(targets=this.getSortedTargets(),targets.length>0&&(this._currentTarget=targets[0].value)),this._breakpointState.atBreakpoint)breakpointMessage={value:"breakpoint",text:Common.ToolWindowHelpers.loadString("PausedAtABreakpoint")},this._model.targets.splice(0,this._model.targets.length),this._model.targets.push(breakpointMessage),this._model.currentTarget="breakpoint",this._model.canSelectTargets=!1;else{for(targets||(targets=this.getSortedTargets()),targetsUpdate=targets,length=targets.length,x=0;x<length;x++)targetsUpdate[x].text=targets[x].text.replace(/ /g," ");this._model.targets.splice.apply(this._model.targets,[0,this._model.targets.length].concat(targetsUpdate));this._model.canSelectTargets=this._targets.size>0;this._model.canSelectTargets?this._model.currentTarget=this._currentTarget:(this._model.currentTarget=null,this._currentTarget=null);this._model.currentTarget==="breakpoint"&&(this._model.currentTarget=this._currentTarget)}this._updated.invoke()},TargetManager}();Console.TargetManager=TargetManager})(Console=Tools.Console||(Tools.Console={}))})(Tools=F12.Tools||(F12.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(F12){var Console;(function(Console){var Telemetry;(function(Telemetry){"use strict";function initializeAnalytics(){ScriptedHost.F12?Telemetry.analytics=new Common.F12AnalyticsProxy(Common.ToolName.CONSOLE):ScriptedHost.VS&&(Telemetry.analytics=new Common.VsAnalyticsProxy("ConsoleTelemetry",Common.ToolName.CONSOLE))}var ScriptedHost=Microsoft.Plugin,CommandName;Telemetry.analytics=new Common.DoNothingAnalyticsProxy;CommandName=function(){function CommandName(){}return CommandName.CLEAR_CONSOLE="ClearConsole",CommandName.COPY_ALL="CopyAll",CommandName.COPY_ITEM="CopyItem",CommandName.COPY="Copy",CommandName.ADD_TO_WATCH="AddToWatch",CommandName.VIEW_AS_OBJECT="ViewAsObject",CommandName.VIEW_AS_HTML="ViewAsHTML",CommandName.SINGLE_LINE_TO_MULTI_LINE="SingleLineToMultiLine",CommandName.MULTI_LINE_TO_SINGLE_LINE="MultiLineToSingleLine",CommandName.FORCE_INTO_MULTI_LINE="ForceIntoMultipleLine",CommandName.SINGLE_LINE_CLEAR_INPUT="SingleLineClearInput",CommandName.MULTI_LINE_CLEAR_INPUT="MultiLineClearInput",CommandName.ARROW_UP="ArrowUp",CommandName.ARROW_DOWN="ArrowDown",CommandName.SINGLE_LINE_RUN_SCRIPT="SingleLineRunScript",CommandName.MULTI_LINE_RUN_SCRIPT="MultiLineRunScript",CommandName.VIEW_IN_DOM_EXPLORER="ViewInDomExplorer",CommandName}();Telemetry.CommandName=CommandName;Telemetry.initializeAnalytics=initializeAnalytics})(Telemetry=Console.Telemetry||(Console.Telemetry={}))})(Console=F12.Console||(F12.Console={}))})(F12||(F12={}))
//# sourceMappingURL=ConsoleMerged.min.js.map
{
	"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"
			},
			"vs-image-icon-tree-collapsed": {
				"bitmap_source": "..\\Common\\images\\itemCollapsedIcon.png",
				"background_color": "plugin-font-console-background-color"
			},
			"vs-image-icon-tree-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.Common.Resources",
				"is_default": true
			}
		},
		"guid_symbols": {
			"guidHtmlToolHostCmdSet": "a654f3df-4bdb-4863-a750-75cdb50a03bc"
		},
		"command_aliases": {
			"clearconsole": {
				"guid": "guidHtmlToolHostCmdSet",
				"id": 336,
				"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-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-checked-hover-color": {
				"category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d",
				"key_type": "BackgroundColor",
				"name": "CommandBarHoverOverSelectedIcon"
			},
			"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"
			},
			"vs-image-icon-tree-collapsed": {
				"bitmap_source": "common/images/itemCollapsedIcon.png",
				"background_color": "plugin-background-color"
			},
			"vs-image-icon-tree-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(n){"use strict";var t;(function(n){var t;(function(n){var i=new n.Helpers,t=Common.RemoteHelpers,u=function(){function n(){this._defaultTimerName="default";this._defaultTimeStampName="timestamp";this._consoleTimers={};this._consoleCounters={};this._consoleDefaultCounter=0;this._messagesInCurrentInterval=0;this.targetQueue=[];this.consoleNotificationQueue=[];this.writeToNotificationQueue=!0;this.currentWindowContext=null;this.frames={};this.resultMap={}}return Object.defineProperty(n.prototype,"suppressPostCode",{get:function(){return"suppressOutput-{9724EC8B-E0A8-4B3B-94CB-AB1F31CB47DB}"},enumerable:!0,configurable:!0}),n.getInstance=function(){return consoleRemoteCode},n.prototype.initialize=function(){typeof browser!="undefined"&&(t.addListener(browser,"beforeScriptExecute",consoleRemoteCode.onBeforeScriptExecute),t.addListener(browser,"consoleMessage",function(n){consoleRemoteCode.onConsoleMessage(n.source,n.level,n.messageId,n.messageText,n.fileUrl,n.line,n.column)}));remoteHelpers.initialize("ConsolePort",consoleRemoteCode.initializePage,"__BROWSERTOOLS_CONSOLE_BREAKMODE_FUNC");this.initializeWebWorkers()},n.prototype.clearTargets=function(){consoleRemoteCode.frames={};consoleRemoteCode.writeToNotificationQueue?consoleRemoteCode.targetQueue=[]:remoteHelpers.port.postMessage("ClearTargets")},n.prototype.callInvoker=function(n,i){var e,u,r,o,f;if(!n.execScript&&(e=n.eval.toString(),e!=="function eval() { [native code] }"&&e!=="\nfunction eval() {\n    [native code]\n}\n"&&consoleRemoteCode.notifyCallback)){consoleRemoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.error,{localizeId:"ModifiedEvalFunction"});remoteHelpers.isEvalModified=!0}u={result:undefined,isError:!1};r=[];try{typeof n.cd=="undefined"&&(n.cd=n.console.cd,r.push({name:"cd",func:n.console.cd}));typeof n.dir=="undefined"&&(n.dir=n.console.dir,r.push({name:"dir",func:n.console.dir}));typeof n.select=="undefined"&&(n.select=n.console.select,r.push({name:"select",func:n.console.select}));typeof n.$=="undefined"&&(n.$=n.__BROWSERTOOLS_CONSOLE.$,r.push({name:"$",func:n.$}));typeof n.$$=="undefined"&&(n.$$=n.__BROWSERTOOLS_CONSOLE.$$,r.push({name:"$$",func:n.$$}));o=JSON.stringify(i).slice(1,-1);try{u.result=browser.executeScript(o+t.getJMCScriptUrl("console"),n);try{n.$_===n.__BROWSERTOOLS_CONSOLE.$_||isNaN(n.$_)&&isNaN(n.__BROWSERTOOLS_CONSOLE.$_)?n.__BROWSERTOOLS_CONSOLE.$_=n.$_=u.result:delete n.__BROWSERTOOLS_CONSOLE.$_}catch(s){if(s.description.toLowerCase().indexOf("permission denied")!==-1)n.__BROWSERTOOLS_CONSOLE.$_=n.$_=u.result;else throw s}}catch(s){u.result=n.document.__IE_DEVTOOLBAR_CONSOLE_EVAL_RESULT;u.isError=!0}}catch(h){u={result:undefined,isError:!1}}try{for(f=0;f<r.length;f++)n[r[f].name]===r[f].func&&(t.getDocumentMode()<9?n[r[f].name]=undefined:delete n[r[f].name])}catch(c){}return u},n.prototype.onConsoleFunc=function(t,i,r){var e=this,f,u;if(consoleRemoteCode.writeToNotificationQueue){consoleRemoteCode.consoleNotificationQueue.push({functionId:t,data:i});return}if(this._messagesInCurrentInterval===0&&setTimeout(function(){return e._messagesInCurrentInterval=0},n.MessageThrottleInterval),this._messagesInCurrentInterval++,this._messagesInCurrentInterval>n.MaxMessagesPerInterval){this._messagesInCurrentInterval===n.MaxMessagesPerInterval+1&&consoleRemoteCode.notifyCallback({notifyType:Common.ObjectView.TreeViewUtils.ConsoleNotifyType.warn,message:{localizeId:"ConsoleTooManyMessagesError"}},null,!0);return}switch(t){case"cd":consoleRemoteCode.cd(i.obj);break;case"clear":consoleRemoteCode.clearCallback&&(consoleRemoteCode.reset(),consoleRemoteCode.clearCallback());break;case"dir":consoleRemoteCode.outputCallback&&(u=consoleRemoteCode.createOutputObject(-1,i),u.detailedType!=="undefined"&&consoleRemoteCode.outputCallback(u));break;case"dirxml":consoleRemoteCode.outputCallback&&(f=consoleRemoteCode.getHtmlViewableTypeName(i),u=f!==null?consoleRemoteCode.createOutputHtmlElement(-1,i,f):consoleRemoteCode.createOutputObject(-1,i),u.detailedType!=="undefined"&&consoleRemoteCode.outputCallback(u));break;default:consoleRemoteCode.notifyCallback({notifyType:t,message:i},null,r)}},n.prototype.cd=function(n){var i,u,f,e,r;if(consoleRemoteCode.notifyCallback)try{if(n)if(u=t.getValidWindow(consoleRemoteCode.currentWindowContext,n),u.isValid){i=u.window;for(f in consoleRemoteCode.frames)if(consoleRemoteCode.frames[f]===i){consoleRemoteCode.processTargetMessage("TargetChanged:"+JSON.stringify({targetType:"Frame",targetId:f}));break}}else i=consoleRemoteCode.currentWindowContext;else i=t.getDefaultView(browser.document),consoleRemoteCode.processTargetMessage("TargetChanged:"+JSON.stringify({targetType:"_top"}));consoleRemoteCode.currentWindowContext=i;e=i.location.href;r=i.location.hostname+i.location.pathname;r=String.prototype.replace.call(r,/\/$/,"");consoleRemoteCode.notifyCallback({notifyType:"consoleItemCDContext",message:r,contextInfo:e})}catch(o){consoleRemoteCode.notifyCallback({notifyType:Common.ObjectView.TreeViewUtils.ConsoleNotifyType.error,message:o.message||o.description})}},n.prototype.getHtmlViewableTypeName=function(n){var i,u,r;if(consoleRemoteCode.ensureConstructorsAreAvailable(),consoleRemoteCode.constructors&&t.getDocumentMode()>=9)for(i=0;i<consoleRemoteCode.constructors.length;i++)try{if(consoleRemoteCode.constructors[i].htmlElement&&n instanceof consoleRemoteCode.constructors[i].htmlElement){try{u=n.id}catch(f){return null}return"HtmlElement"}if(consoleRemoteCode.constructors[i].htmlNode&&n instanceof consoleRemoteCode.constructors[i].htmlNode){try{r=n.nodeType}catch(f){return null}return r===n.DOCUMENT_NODE?"DocumentNode":r===n.ATTRIBUTE_NODE?"AttributeNode":"HtmlNode"}if(consoleRemoteCode.constructors[i].nodeList&&n instanceof consoleRemoteCode.constructors[i].nodeList)return"NodeList";if(consoleRemoteCode.constructors[i].htmlCollection&&n instanceof consoleRemoteCode.constructors[i].htmlCollection)return"HtmlCollection"}catch(f){}return null},n.prototype.createConsoleResult=function(n,i,r){var u,e,f;return i.isError?consoleRemoteCode.notifyCallback&&(u={inputId:n,notifyType:Common.ObjectView.TreeViewUtils.ConsoleNotifyType.error},i.result?(u.message=i.result.message&&i.result.name?{message:i.result.message,localizeId:i.result.name}:i.result.message||i.result.description||i.result.toString(),consoleRemoteCode.notifyCallback(u)):u.suppressPostObject=!0):(e=t.getDefaultView(mainBrowser.document),e.msWriteProfilerMark("ConsoleRemote:BeginCreateResultObject"),f=consoleRemoteCode.getHtmlViewableTypeName(i.result),f!==null&&f!=="DocumentNode"?u=consoleRemoteCode.createOutputHtmlElement(n,i.result,f):(u=consoleRemoteCode.createOutputObject(n,i.result),f==="DocumentNode"&&(u.isHtmlViewableType=!0)),e.msWriteProfilerMark("ConsoleRemote:EndCreateResultObject")),i&&(i.isError||i.result===consoleRemoteCode.suppressPostCode)&&(u.suppressPostObject=!0),r&&(u.targetId=r),u},n.prototype.createOutputHtmlElement=function(n,t,r){var f,u,e;try{f=Object.prototype.toString.call(t)}catch(o){f=null}return u=i.createMappedNode(t,!0),(r==="NodeList"||r==="HtmlCollection")&&(u.tag=r,i.mapping[u.uid].listType=r,u.attributes=[{name:"length",value:t.length}]),e=i.findParentChainForElement(t),{inputId:n,consoleType:"consoleItemOutput",detailedType:"htmlElement",isExpandable:!0,isHtmlViewableType:!0,name:f,value:u,uid:e}},n.prototype.createOutputObject=function(n,i,r,u){var f,e;return f=t.getDocumentMode()>=9?new Common.ObjectView.TreeViewRemoteObjectExplorer(this):new Common.ObjectView.TreeViewDirectObjectExplorer,e=new Common.ObjectView.TreeViewRemoteHelpers(this,f),consoleRemoteCode.ensureConstructorsAreAvailable(),e.createOutputObject(n,i,r,u)},n.prototype.reset=function(){consoleRemoteCode.resultMap={};i.reset()},n.prototype.getIntellisenseItemsForExpression=function(n,i,r,u){var e=t.getDocumentMode()>=9,f;return e?(f=new Common.Intellisense.IntellisenseRemoteHelpers(consoleRemoteCode),i?f.getIntellisenseItemsForExpressionUsingWindowContext(n,i,r,u):f.getIntellisenseItemsForExpression(n)):{choices:[]}},n.prototype.addNodeRemovedEventListener=function(n){if(t.getDocumentMode()>8)if(consoleRemoteCode._onMainWindowNodeRemovedSafeEventListener)t.addListener(n.document,"DOMNodeRemoved",consoleRemoteCode._onMainWindowNodeRemovedSafeEventListener);else{var i=t.addSafeListener(n,n.document,"DOMNodeRemoved",consoleRemoteCode.onDomNodeRemoved);consoleRemoteCode._onMainWindowNodeRemovedSafeEventListener=i}},n.prototype.removeNodeRemovedEventListener=function(n){var i,u,f,r;if(n){t.removeListener(n.document,"DOMNodeRemoved",consoleRemoteCode._onMainWindowNodeRemovedSafeEventListener);try{if(n.frames)for(i=0,u=n.frames.length;i<u;i++)f=n.frames[i],r=t.getValidWindow(n,f),r.isValid&&this.removeNodeRemovedEventListener(r.window)}catch(e){}}else consoleRemoteCode._onMainWindowNodeRemovedSafeEventListener&&(this.removeNodeRemovedEventListener(t.getDefaultView(browser.document)),consoleRemoteCode._onMainWindowNodeRemovedSafeEventListener=null)},n.prototype.onDomNodeRemoved=function(n){for(var i,u,f=n.target.nodeName==="IFRAME"?[n.target]:n.target.getElementsByTagName?n.target.getElementsByTagName("IFRAME"):[],r=0,e=f.length;r<e;r++)if(i=f[r].contentWindow,u=t.getValidWindow(t.getDefaultView(browser.document),i),u.isValid&&(i=u.window,consoleRemoteCode.removeIframeTargets(i),i&&consoleRemoteCode.anyIFrames(i,function(n){return n===consoleRemoteCode.currentWindowContext}))){consoleRemoteCode.onConsoleFunc("cd",{argsCount:0},!0);break}consoleRemoteCode.constructors=null},n.prototype.removeIframeTarget=function(n,i){consoleRemoteCode.processTargetMessage("TargetClosed:"+JSON.stringify({targetType:"Frame",targetId:n,origin:t.originForWindow(i)}));delete consoleRemoteCode.frames[n]},n.prototype.removeIframeTargets=function(n){var i,e,o,u,s,f,r;try{if(n.frames)for(i=0,e=n.frames.length;i<e;i++)o=n.frames[i],u=t.getValidWindow(n,o),u.isValid&&(s=u.window,consoleRemoteCode.removeIframeTargets(s))}catch(h){}f=!1;for(r in consoleRemoteCode.frames){try{f=n===consoleRemoteCode.frames[r]}catch(h){consoleRemoteCode.removeIframeTarget(r,n)}if(f){consoleRemoteCode.removeIframeTarget(r,n);break}}},n.prototype.anyIFrames=function(n,i){var s=i(n),r,e,o,u,f;if(s)return!0;if(n.frames)for(r=0,e=n.frames.length;r<e;r++)if(o=n.frames[r],u=t.getValidWindow(n,o),u.isValid&&(f=u.window,f&&this.anyIFrames(f,i)))return!0;return!1},n.prototype.initializeConsoles=function(n){var f=!1,e,c,o,r,s,h,u,l,a,i;try{f=consoleRemoteCode.initializeConsole(n)}catch(v){}e=t.getDefaultView(browser.document);try{if(!browser||!browser.document)return;c=n===e}catch(v){return}if(c)consoleRemoteCode.removeNodeRemovedEventListener();else{if(i=t.getValidWindow(e,n),!i.isValid)return;if(n=i.window,f&&t.getDocumentMode()>8){o=!1;for(r in consoleRemoteCode.frames)try{consoleRemoteCode.frames[r]===n&&(o=!0,consoleRemoteCode.frames[r]=n,consoleRemoteCode.processTargetMessage("TargetUpdated:"+JSON.stringify({targetType:"Frame",targetId:r,href:n.location.href,origin:t.originForWindow(n)})))}catch(v){consoleRemoteCode.removeIframeTarget(r,n)}o||(s=remoteHelpers.getUid(),consoleRemoteCode.frames[s]=n,consoleRemoteCode.processTargetMessage("TargetCreated:"+JSON.stringify({targetType:"Frame",targetId:s,href:n.location.href,origin:t.originForWindow(n)})))}}consoleRemoteCode.addNodeRemovedEventListener(n);try{h=n.frames&&f}catch(v){h=!1}if(h)for(u=0,l=n.frames.length;u<l;u++)a=n.frames[u],i=t.getValidWindow(n,a),i.isValid&&consoleRemoteCode.initializeConsoles(t.getDefaultView(i.window.document))},n.prototype.processTargetMessage=function(n){consoleRemoteCode.writeToNotificationQueue?consoleRemoteCode.targetQueue.push(n):remoteHelpers.port.postMessage(n)},n.prototype.initializeConsole=function(n){var i=n.console,r={},s=function(){t.removeListener(toolUI,"detach",e)},f=function(){var t;for(var i in consoleRemoteCode.frames)if(consoleRemoteCode.frames[i]===n){t=i;break}return t},e=function(){consoleRemoteCode.onDetach(n,r);t.removeListener(toolUI,"detach",e)},u;t.addListener(toolUI,"detach",e);consoleRemoteCode._unloadSafe||(consoleRemoteCode._unloadSafe=t.addSafeListener(n,n,"unload",s));n.__BROWSERTOOLS_CONSOLE_BREAKMODE_FUNC=t.createSafeFunction(n,function(n,t){consoleRemoteCode.onBreakModeFunc(n,t)});var h=function(n,t){return t?t.querySelector.call(t,n):window.document.querySelector.apply(window.document,arguments)},c=function(n,t){return t?t.querySelectorAll.call(t,n):window.document.querySelectorAll.apply(window.document,arguments)},l="window.__BROWSERTOOLS_CONSOLE = {};window.__BROWSERTOOLS_CONSOLE.$ = "+h.toString()+";window.__BROWSERTOOLS_CONSOLE.$$ = "+c.toString()+";";if(t.executeScript(l,n,!0),n.__BROWSERTOOLS_CONSOLE.performBreakmodeIntellisense=browser.createSafeFunction(n,function(n,t,i,r,u){consoleRemoteCode.performBreakmodeIntellisense(n,t,i,r,u)}),i||typeof console=="undefined"?n.console||typeof console!="undefined"||(n.eval?n.eval("{ document.parentWindow['console'] = {};}"):n.execScript("{ document.defaultView['console'] = {};}"),i=n.console):i=n.console=console,u=function(n,t){var r=typeof diagnosticsScript!="undefined"?diagnosticsScript.getStackTrace(1):null,i;if(r&&r[0]){i=r[0];t.fileUrl=i.documentUrl;t.lineNumber=i.line+1;t.columnNumber=i.column+1;consoleRemoteCode.onConsoleFunc(n,t,!0)}else consoleRemoteCode.onConsoleFunc(n,t,!0)},this.defineInjectedConsoleObjFunction(r,i,n,"log",function(){var n=consoleRemoteCode.createOutputNotifyMessageObject.apply(this,arguments);n.targetId=f();u(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.log,n)}),this.defineInjectedConsoleObjFunction(r,i,n,"info",function(){var n=consoleRemoteCode.createOutputNotifyMessageObject.apply(this,arguments);n.targetId=f();u(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.info,n)}),this.defineInjectedConsoleObjFunction(r,i,n,"warn",function(){var n=consoleRemoteCode.createOutputNotifyMessageObject.apply(this,arguments);n.targetId=f();u(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.warn,n)}),this.defineInjectedConsoleObjFunction(r,i,n,"error",function(){var n=consoleRemoteCode.createOutputNotifyMessageObject.apply(this,arguments);n.message==="$$ConsoleSelectError$$"&&(n.localizeId="ConsoleSelectError");n.targetId=f();u(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.error,n)}),this.defineInjectedConsoleObjFunction(r,i,n,"debug",function(){try{var n=consoleRemoteCode.createOutputNotifyMessageObject.apply(this,arguments);u(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.log,n)}catch(t){consoleRemoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.error,t,!0)}}),this.defineInjectedConsoleObjFunction(r,i,n,"assert",function(n){var t,i,r;if(!n){for(i=1;i<arguments.length;i++)t||(t=[]),t.push(arguments[i]);r=consoleRemoteCode.createOutputNotifyMessageObject.apply(this,t);consoleRemoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.assert,r,!0)}}),this.defineInjectedConsoleObjFunction(r,i,n,"time",function(n){consoleRemoteCode.createConsoleTimer(n)}),this.defineInjectedConsoleObjFunction(r,i,n,"timeEnd",function(n){consoleRemoteCode.endConsoleTimer(n)}),this.defineInjectedConsoleObjFunction(r,i,n,"timeStamp",function(n){consoleRemoteCode.timeStamp(n)}),this.defineInjectedConsoleObjFunction(r,i,n,"group",function(n){consoleRemoteCode.startGroup(n,!1)}),this.defineInjectedConsoleObjFunction(r,i,n,"groupCollapsed",function(n){consoleRemoteCode.startGroup(n,!0)}),this.defineInjectedConsoleObjFunction(r,i,n,"groupEnd",function(){consoleRemoteCode.endGroup()}),t.getDocumentMode()>=10){var a=function __BROWSERTOOLS_CONSOLE_TRACE(){var n=function(){try{throw new Error("")}catch(n){return n.stack}}(),t=n?n.split("\n"):"";t.splice(0,123);console.log("console.trace()\n"+t.join("\n"))},o="console.trace = "+a.toString(),v=typeof diagnosticsScript!="undefined"&&diagnosticsScript.debugEval?1:3;o=o.replace("123",v.toString());t.executeScript(o,n,!0);r.trace=i.trace}else this.defineInjectedConsoleObjFunction(r,i,n,"trace",function(){consoleRemoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.warn,{localizeId:"ConsoleUnsupportedDocumentModeAPIError",args:[String(t.getDocumentMode()),String("console.trace")]})});return this.defineInjectedConsoleObjFunction(r,i,n,"clear",function(){consoleRemoteCode.onConsoleFunc("clear");return consoleRemoteCode.suppressPostCode}),this.defineInjectedConsoleObjFunction(r,i,n,"dir",function(n){consoleRemoteCode.onConsoleFunc("dir",n)}),this.defineInjectedConsoleObjFunction(r,i,n,"dirxml",function(n){consoleRemoteCode.onConsoleFunc("dirxml",n)}),this.defineInjectedConsoleObjFunction(r,i,n,"count",function(n){consoleRemoteCode.count(n)}),this.defineInjectedConsoleObjFunction(r,i,n,"countReset",function(n){consoleRemoteCode.countReset(n)}),this.defineInjectedConsoleObjFunction(r,i,n,"cd",function(n){consoleRemoteCode.onConsoleFunc("cd",{obj:n,argsCount:arguments.length})}),(i.select===undefined||i.select&&i.select.toString&&(i.select.toString()==="function select() { [native code] }"||i.select.toString()==="\nfunction select() {\n    [native code]\n}\n"))&&this.defineInjectedConsoleObjFunction(r,i,n,"select",function(){consoleRemoteCode.consoleSelectNotInitialized()}),!0},n.prototype.initializeWebWorkers=function(){var u,i,n,r;t.addListener(browser,"webWorkerCreated",consoleRemoteCode.onWebWorkerCreated);u=function(n,t){try{t.isError||t.result&&(t.result=typeof t.result=="object"?t.result.toString():t.result);diagnostics.postMessage("breakmode_func",JSON.stringify({id:n,data:t}))}catch(i){diagnostics.postMessage("breakmode_func",JSON.stringify({id:n,data:{isError:!0,result:i}}))}};i="worker.worker.__BROWSERTOOLS_CONSOLE_BREAKMODE_FUNC = worker.createSafeFunction(worker.worker, "+u.toString()+");";browser.workerStartupScript=i;n=browser.workers;for(r in n)n[r].addEventListener("message",this.onWorkerMessage),n[r].executeScriptAsync(i,"breakmode_func")},n.prototype.onWorkerMessage=function(n){if(n.type&&n.type==="breakmode_func"&&n.message){var t=JSON.parse(n.message);consoleRemoteCode.onBreakModeFunc(t.id,t.data)}},n.prototype.onWebWorkerCreated=function(n){var t=browser.workers;n.id&&t[n.id]&&t[n.id].addEventListener("message",consoleRemoteCode.onWorkerMessage)},n.prototype.onBeforeScriptExecute=function(n){var i,r;n&&n.browserOrWindow&&(n=n.browserOrWindow);try{i=t.getDefaultView(n.document)}catch(u){return}if(i===t.getDefaultView(mainBrowser.document))consoleRemoteCode.currentWindowContext=i,remoteHelpers.port&&(remoteHelpers.postAllMessages(),consoleRemoteCode.initializePage());else{try{r=t.getDefaultView(consoleRemoteCode.currentWindowContext.document)}catch(f){consoleRemoteCode.cd()}consoleRemoteCode.initializeConsoles(i)}consoleRemoteCode.ensureConstructorsAreAvailable(!0)},n.prototype.onDetach=function(n,i){var u,r,f,e;t.removeListener(browser,"beforeScriptExecute",consoleRemoteCode.onBeforeScriptExecute);consoleRemoteCode.removeNodeRemovedEventListener();try{if(n.console){u=0;for(r in i)n.console[r]===i[r]?t.getDocumentMode()<9?n.console[r]=null:delete n.console[r]:u++;if(u===0){f=!0;for(e in n.console)if(n.console[e]){f=!1;break}f&&delete n.console}}n.__BROWSERTOOLS_CONSOLE_BREAKMODE_FUNC&&delete n.__BROWSERTOOLS_CONSOLE_BREAKMODE_FUNC;consoleRemoteCode._unloadSafe&&(t.removeListener(n,"unload",consoleRemoteCode._unloadSafe),consoleRemoteCode._unloadSafe=null)}catch(o){}consoleRemoteCode.frames={};i=null},n.prototype.onConsoleMessage=function(n,t,i,r,u,f,e){if(n==="HTML"&&i===1300&&(consoleRemoteCode.reset(),remoteHelpers.port.postMessage("ClearOnNavigate")),i!==7002||u!=="about:blank"){if(n==="CONSOLE")switch(i){case 6e3:consoleRemoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.log,r,!0);return;case 6001:consoleRemoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.warn,r,!0);return;case 6002:consoleRemoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.error,r,!0);return;case 6003:consoleRemoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.assert,r,!0);return;case 6004:consoleRemoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.info,r,!0);return}var s=n+i,o={messageId:s,message:s+": "+r,fileUrl:u,lineNumber:f,columnNumber:e};switch(t){case 0:consoleRemoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.info,o);break;case 1:consoleRemoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.warn,o);break;case 2:consoleRemoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.error,o)}}},n.prototype.onBreakModeFunc=function(n,t){var i;if(n!==null&&typeof n!="undefined")if(n===""&&t)remoteHelpers.processMessages({data:t});else if(i=n.split(":"),i.length===3){var u=i[0],f=parseInt(i[1],10),e=i[2],r;if(u==="processInput"&&(r=consoleRemoteCode.createConsoleResult(f,t)),r&&r.suppressPostObject)return;r!==undefined&&remoteHelpers.postObject({uid:e,args:[r]})}},n.prototype.ensureConstructorsAreAvailable=function(n){if(!consoleRemoteCode.constructors||n){var i=t.getDefaultView(browser.document);consoleRemoteCode.constructors=consoleRemoteCode.getAllConstructors(i)}},n.prototype.getAllConstructors=function(n){var i=[],r,f,u;i.push(consoleRemoteCode.getWindowConstructors(n));try{if(n.frames&&n.frames.length>0)for(r=0;r<n.frames.length;r++)f=n.frames[r],u=t.getValidWindow(n,f),u.isValid&&(i=i.concat(consoleRemoteCode.getAllConstructors(u.window)))}catch(e){}return i},n.prototype.getWindowConstructors=function(n){var t={};try{t.array=n.Array;t.date=n.Date;t.regex=n.RegExp;t.htmlElement=n.HTMLElement;t.htmlNode=n.Node;t.nodeList=n.NodeList;t.htmlCollection=n.HTMLCollection}catch(i){}return t},n.prototype.createOutputNotifyMessageObject=function(){for(var r,u,f,t,e,n=[],i=0;i<arguments.length;i++)n[+i]=arguments[i];if(r={},r.message=Common.ObjectView.TreeViewStringFormatter.formatConsoleMessage.apply(this,n),n.length>0)for(u=!1,f=[],t=0;t<n.length;t++)e=consoleRemoteCode.createConsoleResult(-1,{result:n[t]}),typeof n[t]=="object"&&(u=!0),f.push(e);return u&&(r.viewableObject=f),r},n.prototype.createConsoleTimer=function(n){if(n||(n=consoleRemoteCode._defaultTimerName),consoleRemoteCode._consoleTimers.hasOwnProperty(n)&&consoleRemoteCode._consoleTimers[n])consoleRemoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.warn,{localizeId:"ConsoleTimerWarning",args:[String(n)]});else consoleRemoteCode._consoleTimers[n]=this.getTimeStamp(),t.getDefaultView(browser.document).msWriteProfilerMark("console.time:"+n)},n.prototype.endConsoleTimer=function(n){var i=this.getTimeStamp();if(n||(n=consoleRemoteCode._defaultTimerName),consoleRemoteCode._consoleTimers.hasOwnProperty(n)&&consoleRemoteCode._consoleTimers[n]){i=i-consoleRemoteCode._consoleTimers[n];delete consoleRemoteCode._consoleTimers[n];consoleRemoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.log,{localizeId:"ConsoleTimerDisplay",args:[String(n),i.toFixed(4)]});t.getDefaultView(browser.document).msWriteProfilerMark("console.timeEnd:"+n)}else consoleRemoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.warn,{localizeId:"NonExistentConsoleTimerWarning",args:[String(n)]})},n.prototype.timeStamp=function(n){var i=this.getTimeStamp();n||(n=this._defaultTimeStampName);consoleRemoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.log,{localizeId:"ConsoleTimerDisplay",args:[String(n),Number(i)]});t.getDefaultView(browser.document).msWriteProfilerMark("console.timeStamp:"+n)},n.prototype.count=function(n){if(n===undefined||n===null){consoleRemoteCode._consoleDefaultCounter=consoleRemoteCode._consoleDefaultCounter+1;consoleRemoteCode.onConsoleFunc("count",{name:null,message:consoleRemoteCode._consoleDefaultCounter.toString()})}else{var t=1;consoleRemoteCode._consoleCounters.hasOwnProperty(n)&&consoleRemoteCode._consoleCounters[n]!==null&&(t=consoleRemoteCode._consoleCounters[n]+1);consoleRemoteCode._consoleCounters[n]=t;consoleRemoteCode.onConsoleFunc("count",{name:String(n),message:t.toString()})}},n.prototype.countReset=function(n){if(n===undefined||n===null){consoleRemoteCode._consoleDefaultCounter=0;consoleRemoteCode.onConsoleFunc("count",{name:null,message:consoleRemoteCode._consoleDefaultCounter.toString()})}else{consoleRemoteCode._consoleCounters[n]=0;consoleRemoteCode.onConsoleFunc("count",{name:String(n),message:consoleRemoteCode._consoleCounters[n].toString()})}},n.prototype.endGroup=function(){consoleRemoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.internalMessage,{key:Common.ObjectView.TreeViewUtils.ConsoleInternalMessage.endGroup})},n.prototype.startGroup=function(n,t){n=n?String(n):"";var i=t?Common.ObjectView.TreeViewUtils.ConsoleInternalMessage.startGroupCollapsed:Common.ObjectView.TreeViewUtils.ConsoleInternalMessage.startGroup;consoleRemoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.internalMessage,{key:i,name:n})},n.prototype.consoleSelectNotInitialized=function(){consoleRemoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.error,{localizeId:"ConsoleSelectNotInitializedError"})},n.prototype.performBreakmodeIntellisense=function(n,t,i,r,u){var e,f;if(typeof n=="string"&&typeof t=="string"&&(e=Array.prototype.map.call(u,function(n){return""+n}),f=n.split(":"),f.length===3)){var h=f[0],c=parseInt(f[1],10),o=f[2],s=consoleRemoteCode.getIntellisenseItemsForExpression(t,i,r,e);remoteHelpers.postObject({uid:o,args:[s]})}},n.prototype.initializePage=function(){var n=consoleRemoteCode.currentWindowContext=t.getDefaultView(mainBrowser.document),i;try{browser.executeScript(t.getJMCScriptUrl("library"),n)}catch(r){return}try{consoleRemoteCode.clearTargets();i={docMode:t.getDocumentMode(),contextInfo:n.location.href,origin:t.originForWindow(n)};consoleRemoteCode.writeToNotificationQueue=!0;remoteHelpers.port.postMessage("Handshake:"+JSON.stringify(i));consoleRemoteCode.initializeConsoles(n);consoleRemoteCode._consoleCounters={};consoleRemoteCode._consoleDefaultCounter=0}catch(r){}},n.prototype.defineInjectedConsoleObjFunction=function(n,i,r,u,f){i[u]=t.createSafeFunction(r,f);n[u]=i[u]},n.prototype.createNotifyMessageObject=function(){var n={};return n.message=Common.ObjectView.TreeViewStringFormatter.formatConsoleMessage.apply(this,arguments),n.localizeId=n.message,arguments.length>0&&(n.viewableObject=consoleRemoteCode.createOutputObject(-1,arguments)),n},n.prototype.getTimeStamp=function(){var n=t.getDefaultView(mainBrowser.document);return n.performance&&n.performance.now?n.performance.now():new Date},n.MaxMessagesPerInterval=1e3,n.MessageThrottleInterval=0,n}(),r;n.RemoteCode=u;r=function(){function r(){}return r.prototype.clearConsoleData=function(){consoleRemoteCode.reset()},r.prototype.registerConsoleCallbacks=function(n,t,i){var u,f,r,e;for(consoleRemoteCode.outputCallback=n,consoleRemoteCode.notifyCallback=t,consoleRemoteCode.clearCallback=i,consoleRemoteCode.writeToNotificationQueue=!1,u=consoleRemoteCode.targetQueue,consoleRemoteCode.targetQueue=[],r=0;r<u.length;r++)remoteHelpers.port.postMessage(u[r]);for(f=consoleRemoteCode.consoleNotificationQueue,consoleRemoteCode.consoleNotificationQueue=[],r=0;r<f.length;r++){e=f[r];consoleRemoteCode.onConsoleFunc(e.functionId,e.data)}},r.prototype.switchTarget=function(n,t){if(t==="Frame"){var i=consoleRemoteCode.frames[n];consoleRemoteCode.cd(i)}else t==="_top"&&consoleRemoteCode.cd()},r.prototype.processInput=function(n,i){var r,f,u;if(consoleRemoteCode.currentWindowContext){r=t.getDefaultView(mainBrowser.document);try{r.msWriteProfilerMark("ConsoleRemote:BeginConsoleInvoke");f=consoleRemoteCode.currentWindowContext.window}catch(e){return}u=consoleRemoteCode.callInvoker(consoleRemoteCode.currentWindowContext,i);try{r.msWriteProfilerMark("ConsoleRemote:EndConsoleInvoke")}catch(e){}return consoleRemoteCode.createConsoleResult(n,u)}},r.prototype.getObjectChildren=function(n){var i=n.indexOf(":"),t,r,u;return i!==-1&&(t=[],t.push(n.substr(0,i)),t.push(n.substr(i+1)),r=t[0].split("#"),u=consoleRemoteCode.resultMap[r[0]],u)?consoleRemoteCode.createOutputObject(-1,u,t[1],r.length===2):null},r.prototype.getHtmlChildren=function(t){var r=i.mapping[t],u,f;if(r&&n.Helpers.isElementAccessible(r.ele))return u=consoleRemoteCode.getHtmlViewableTypeName(r.ele),f=u==="NodeList",i.getChildrenForMappedNode(t,f)},r.prototype.getObjectItemAsHtml=function(n){var t=null,i=n.split(":",2),r;return(i.length===2?(r=consoleRemoteCode.resultMap[i[0]],r&&(t=r[i[1]])):i.length===1&&(t=consoleRemoteCode.resultMap[n]),t)?consoleRemoteCode.createOutputHtmlElement(-1,t,consoleRemoteCode.getHtmlViewableTypeName(t)):null},r.prototype.getHtmlItemAsObject=function(t){var r=i.mapping[t];return!r||!n.Helpers.isElementAccessible(r.ele)?null:consoleRemoteCode.createOutputObject(-1,r.ele)},r.prototype.getIntellisenseItemsForExpression=function(n){try{return consoleRemoteCode.getIntellisenseItemsForExpression(n)}catch(t){return{choices:[]}}},r}();n.MessageHandlers=r})(t=n.Console||(n.Console={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}))
//# sourceMappingURL=remote.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var remoteHelpers,consoleRemoteCode;(function(){"use strict";remoteHelpers=new Common.RemoteHelpers(new F12.Tools.Console.MessageHandlers);consoleRemoteCode=new F12.Tools.Console.RemoteCode;consoleRemoteCode.initialize()})()
//# sourceMappingURL=remoteMain.min.js.map
var F12;(function(n){"use strict";var t;(function(n){var t;(function(n){var t=function(){function n(){this.mapping={}}return n.prototype.reset=function(){for(var n in this.mapping)this.deleteMappedNode(n);this.mapping={}},n.prototype.getChildrenForMappedNode=function(t,i){var r=this.mapping[t],f,u,e;if(r&&n.isElementAccessible(r.ele)){if(r.ele.nodeName==="STYLE")return[{uid:"style"+t,parentUid:t,tag:null,hasChildren:!1,text:r.ele.styleSheet?r.ele.styleSheet.cssText:Common.RemoteHelpers.getLeafTextContent(r.ele)}];if(r.ele.nodeName==="SCRIPT")return[{uid:"script"+t,parentUid:t,tag:null,hasChildren:!1,text:r.ele.innerHTML}];var s=r.isIframeElement?this.getIframeRootForMappedNode(t):r.ele,h=r.listType?s:s.childNodes,o=[],c={};for(f=0;f<h.length;f++)u=this.createMappedNode(h[f],i),u&&(o.push(u),c[u.uid]=u);if(r.isLimited=!1,r.childrenNodes)for(e=0;e<r.childrenNodes.length;e++)t=r.childrenNodes[e].uid,c[t]||this.deleteMappedNode(t);return r.childrenNodes=o,r.isExpanded=!0,o}},n.isElementAccessible=function(n){var t=null,i=null;try{i=n.nodeName;t=typeof n}catch(r){return!1}return t==="object"},n.prototype.createMappedNode=function(t,i){var f,r,w,s,v,e,b,k,y,l,a,o,h,p,d;if(Common.RemoteHelpers.getDocumentMode()<9&&!t.tagName&&t.nodeType===1&&t.childNodes&&t.childNodes.length===1&&(t.childNodes[0].tagName==="IFRAME"||t.childNodes[0].tagName==="FRAME")&&(f=this.findParentChainForElement(t),this.mapping[f]={uid:f,ele:t,isIframeElement:!1,mapped:{tag:"#hidden",text:null,hasChildren:!0,attributes:[],parentUid:this.findParentChainForElement(t.parentNode)}},t=t.childNodes[0]),f=this.findParentChainForElement(t),r={uid:f},t.nodeType===n.DOCUMENT_NODE||t.nodeType===n.DOCUMENT_FRAGMENT_NODE)r.tag="#document",r.hasChildren=!0,r.text=null,r.rootTag=t.nodeName;else if(t.tagName){var c=null,o=t.tagName.toLowerCase(),u=t.childNodes.length>0;if(t.nodeName==="STYLE"?(u=!0,s=t.styleSheet?t.styleSheet.cssText:Common.RemoteHelpers.getLeafTextContent(t),s&&s.trim()?!String.prototype.match.call(s,/\n/g)&&s.length<n.MAX_INLINE_LENGTH&&(u=!1,c=s):u=!1):t.nodeName==="SCRIPT"&&Common.RemoteHelpers.getDocumentMode()<9?u=!0:t.tagName==="!"&&t.nodeName==="#comment"&&Common.RemoteHelpers.getDocumentMode()<9?(o=t.nodeName,c=Common.RemoteHelpers.getLeafTextContent(t)):t.tagName==="COMMENT"&&Common.RemoteHelpers.getDocumentMode()<9?c=Common.RemoteHelpers.getLeafTextContent(t):t.childNodes.length===1&&(v=t.childNodes[0],e=Common.RemoteHelpers.getLeafTextContent(v),!v.tagName&&e&&(e&&e.trim()?!String.prototype.match.call(e,/\n/g)&&e.length<n.MAX_INLINE_LENGTH&&(u=!1,c=e):u=!1)),(t.tagName==="IFRAME"||t.tagName==="FRAME")&&(w=!0,b=Common.RemoteHelpers.getDefaultView(t.ownerDocument),k=Common.RemoteHelpers.getValidWindow(b,t.contentWindow),u=k.isValid),y=[],t.attributes)for(l=0;l<t.attributes.length;l++)a=t.attributes[l],a&&y.push({name:a.name,value:a.value});r.tag=o;r.hasChildren=u;r.text=c;r.attributes=y}else if(t.nodeType){if(o=null,h=Common.RemoteHelpers.getLeafTextContent(t),t.nodeType===t.DOCUMENT_TYPE_NODE)o="#doctype",h=Common.RemoteHelpers.getDocumentTypeNodeText(t);else if(t.nodeType===t.COMMENT_NODE)o="#comment";else if(t.nodeType===t.TEXT_NODE)if(p=h.trim(),p.length===0){if(!i)return null;d=h="EmptyTextNode"}else h=p;r.tag=o;r.localizeId=d;r.hasChildren=!1;r.text=h;r.parentUid=this.findParentChainForElement(t.parentNode)}else r.tag=null,r.text=null,r.hasChildren=t.length&&t.length>0,r.parentUid=this.getAssignedUid(t.parentNode);return this.mapping[f]={ele:t,isIframeElement:w,mapped:r},n.hasSpecialValueAttribute(t)&&(this.mapping[f].hasValueAttribute=t.hasAttribute("value")),r},n.prototype.getIframeRootForMappedNode=function(t){var i=this.mapping[t];if(!i||!n.isElementAccessible(i.ele))return null;if(i.iframeRoot)return i.iframeRoot;if(i.ele.tagName==="IFRAME"||i.ele.tagName==="FRAME"){var r=i.ele,f=Common.RemoteHelpers.getDefaultView(r.parentNode.ownerDocument),u=Common.RemoteHelpers.getValidWindow(f,r.contentWindow);if(u.isValid)return i.iframeRoot=u.window.document,i.iframeRoot}return null},n.prototype.deleteMappedNode=function(n,t){var i=this.mapping[n],r;if(i){if(i.childrenNodes){for(r=0;r<i.childrenNodes.length;r++)this.deleteMappedNode(i.childrenNodes[r].uid,!1);i.childrenNodes=null}t?i.isExpanded=!1:delete this.mapping[n]}},n.hasSpecialValueAttribute=function(n){switch(n.nodeName){case"INPUT":case"FORM":case"SELECT":case"OPTION":case"TEXTAREA":return!0}return!1},n.prototype.getAssignedUid=function(n){var t,i,r;if(n){if((t=this.getUid(n),t)||(t=n["bpt-console-uid"],t))return t;if(Common.RemoteHelpers.getDocumentMode()<9)for(i in this.mapping)if(r=this.mapping[i],r.ele===n)return i;return t=remoteHelpers.getUid(),Common.RemoteHelpers.getDocumentMode()>=9&&Object.defineProperty(n,"bpt-console-uid",{value:t,enumerable:!1}),t}},n.prototype.getIFrameChain=function(n,t){for(var r,u=n.querySelectorAll("iframe, frame"),i=0,e=u.length;i<e;i++){var o=u[i],s=Common.RemoteHelpers.getDefaultView(n),f=Common.RemoteHelpers.getValidWindow(s,o.contentWindow);if(f.isValid){if(f.window.document===t)return[this.getUid(u[i])];if(r=this.getIFrameChain(f.window.document,t),r&&r.length>0)return r.push(this.getUid(u[i])),r}}return[]},n.prototype.findParentChainForElement=function(n){var t,r,i;try{return t=[],Common.RemoteHelpers.getDefaultView(n.ownerDocument)!==Common.RemoteHelpers.getDefaultView(browser.document)&&(t=this.getIFrameChain(mainBrowser.document,n.ownerDocument)),r=this.getUid(n),i=r?r:this.getAssignedUid(n.parentNode),t&&t.length>0&&(i=i+" "+t.join(" ")),i}catch(u){return""}},n.prototype.getUid=function(n){return n?browser.getUniqueID?browser.getUniqueID(n):n.uniqueID:null},n.DOCUMENT_NODE=9,n.DOCUMENT_FRAGMENT_NODE=11,n.MAX_INLINE_LENGTH=70,n}();n.Helpers=t})(t=n.Console||(n.Console={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}))
//# sourceMappingURL=remoteConsoleHelpers.min.js.map
�PNG


IHDRH�'�=	pHYs����k�gAMA���a�PLTEOOOWWWUUUSSSVVVUUUTTTUUUUUUTTTTTTUUUTTTTTTUUUUUU��������������������������������������������������'�%�'�&�'�&�'�'�&�&�'�&�'�'����/tRNS 0@P`p����������Ͽ����p`P@0  0@P`p�������h��f�IDATx�Œ�r�0�CU���EZ�xA�T����f7K�
�_�t��p�&~gE�?k��yS�a���d,b]3�{�n�hBzԭ�x��Yb��S�	A���@'�p��}yb̉#o���a��tD6hnMA��T>6{x�����8)M�{�S�~�Fh�7��11�����s��\�{節���hV�J�VZ������:w=��_��9U�S�եŇ�S�UTJ��Щ�]�V�����e$eӣ
^q���a5�@�����$u��f�&n�W�@h�G��^�`��pB,Ϗq�|��?�o室E�$��g�D���^��#ݓ�v+!)8+�+R~*8�I�f���n�rܣ�R�9IZC"[1>�ј��ͭ�9�������8��A�-'�	��vj�����D}�"43&��w�?x�"�<��{�:�3��IEND�B`��PNG


IHDRJ~�s	pHYs���+ cHRMz%������u0�`:�o�_�FHIDATx�c`�3=:�4��X-��ʉ��aT
� b�<��CF�#)�'I9P�A�{�õ��E������g9{
IEND�B`��PNG


IHDR$l5��	pHYs����k��PLTEWWWUUUVVVUUUUUUUUUTTTUUUUUU```uuu����������������������������������������'�%�'�&�'�&�'�'�&�'�&�'�'�,5�HP����������������������������"�4tRNS 0P`�����������Ͽ�`P0  0@P`p��������������������� cHRMz%������u0�`:�o�_�F�IDATx�Քas�0�����i��h	�;B
���o+QlI��3���~��O,��^��n�Z���	�ѽ�G�Q�w��X�48��W,�@t���wAc�j���v��/h�ul�����u�3��)�����P�����Pp�3bH�F�3M��@qF�eZ��(ӂ�f���SB�Q��O̩���rjH��xԔ^Ks�1��#޻1��o:1%�8��}�!l�†3l������Stɲ�_��n�j�w�d���^��S��ѾuڶP-�a[��6�a�r���&.��֏%2&�y���֥ell����VZF��T���P����P�Nq�3jG�F�3M�ߥ}y�Qʁ,E���6E�5�_�t����a���Sr
,x����z-�C��Z�|%�ĦW6f=�8�M��Cۦ�EW�)6����:Rg��3sG8�]&O=�Aư<�xW���Z��i�+�i��Z��y�K���Y%�Q�r��L�4[:��W,�Rv����uA3�j~8Wv��	/��ue�����u�*�h}���J
���a�_HNqF.H�Hq�)��/2R:��(ӂE�5�_>�0��2�b*N%�L�Sz-�C�N�Z���?$��ޭ��/y������m�4a#6�ac�`>=��?���%܃��IEND�B`��PNG


IHDRH�5'IDATx��Gu�`q��3��9*Б��$�DR��:�ͦN��7�C[�R�����.���z��E��ҏ��nFjQ94�>�`WA��� ����G@��Ŋ�jC�Bc�!�u�c�!��<`�!`�"�/�����ˇa�3e�iE܌Ԣ2rh

}D��>�`wA��� ��$��7�!��Ն օ�jC�f�jC�y�jC�c��|������a�3e�iE܌Ԣ2rh

}D��>�`wA��� ��$��7�!��Ն օ�jC�f�jC�y�jC�^�"|��VS-_IEND�B`��PNG


IHDR$l5��	pHYs����k��PLTEOOOWWWUUUSSSVVVUUUUUUUUUUUUTTTTTTUUUUUUjjj�����������������������������������������������������������������������������:��V��d�󻻻�������������zTT~-tRNS 0@P`�����������Ͽ��`P@0  0@P`p��������ҙ� cHRMz%������u0�`:�o�_�FKIDATx�Ք}s�0���(а��P���J�{M��f#Œe��]��=���!=�%9�_��Wp�j/����(A$)xG��"��̋��4��cw|O �r��;�����]�A�W‘D�{aO}�G�Q��f�C�5��Q�9����Ll��� �tV��J�!ߡ�	�*X�BU�����
D�j!о0!�4� ��yd�C2檥�z�{��2��p��w�d:�8�L�\`�;�A�n�F*�T*�/-��2S1�J��
2����ܝ����`
��8��X7��u<6�О�#�	�屧1T��*L���j�7n~8p��!va66��� �Pˡ����(�sh
�qh>zy�54v݋��nuP�o۪�v�EP�LO5��[�
J�٫vƦ��j��=EY���P���_)O1��)� Y%�TQ���gfͥ`Y�T�a~�����b� ש�(|�k�~�!�+
�H"�#����^��بk�S3�Dl�Q�9���¬l��� �tV��J���ԡ�	�+X�U��P�m��6j���	1�eo�<#c��1W-���1��e:�K�ܸ�V��ꏖ�o�^(�ۺsIEND�B`��PNG


IHDRH�'�='PLTEUUU"y�"y�"y�"y�UUUUUUUUU������������b���
tRNS���ϟ����m�IDATx�͑�� D���Z��{7���f��b|�������8���~6c��exZ�<s^�4�Ʀa��2�i$�c�ۣ����Ө�l����u��)u��o�skߪ1��2<�F��,�
ZjeS��@��4��1��QK���_@�iTx6�q�zEѺ��P�~�W�=�ܚ��ns�O��'�bޠ�;���"��H�ǐۣS���_@�iTx6�q�zEѺ�8
��y�IIEND�B`��PNG


IHDRH�'�='PLTEUUU"y�"y�"y�"y�UUUUUUUUU������������b���
tRNS���ϟ����m�IDATx�͑K� �D���wJE�,�t/x�t��Wn��9�Fgwg�J�£�5'�Fr0�{fpv�^fp�c��y8��[�(y��c��Q����~�
��ntvW�-&*�_s�m$#y`g'�e�=�����!���걁�7Z=��8�A���W��ϭ�Fg�4�j����5'�Fr0��fpv�Yfp�c��y8ڻ�[�(y��c��Q���/����?G��IEND�B`��PNG


IHDR$l5���PLTETTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT!x�!x�!x�!x�!x�!x�!x�!x�!x�!x�!x�!x�!x��������������������������������������������������"�"�"�"�"�"�"�"�"�"�"�"�"�"�"a�[:tRNS 0@`p�������Ͽ���p`@0  0@P`p����������Ͽ����p`P0 ��i\SIDATx�Ք�v�0��Ǫ$(U�E����t��b� �@Ћ�kf�J���'�q{O������$I�t�^�.�y���`�#M?[T1�#I�K���N{���Lf��w5
�$ �ω�̡*��'z�^o0l"]{y�){�@�wF�[2g`���D��m�3g�&<��^%]M��?)���^^�w��#4YI c&�gca��|o��,��b���,
��P�C�_Nvf���XPc4�\o�AUMA
�YYE�g ŀ�!tJ���@7\w��"2�� �ˆ`�%k�gҒ�P>�$���TcJ��R��k��r���+�'�7B��J�m-UF��9�K���y����מ�̥ma0�^>�f��Ys��\`<[<�-f�M��3s!��68[]��p��Vf�63W��3sn�j3s��\��~(f��~�{6��*3�����eef�xV����a�r��U5��Ve�G+�#�%���B���M��&���(!ȃ�0"��r�<Ӑ����!%��M�SJE�"��R[t���֖�X��F(շ�T����̧���h������(�y:PJ#~\;:ȉ�:2&w�l!P�O�U;�(��6d~i6����
��&W�(���m�Sz�s���=1("fxG�<⺄=Q�@�/�	���PI�8�������Yabx�s�^6�w�q��p�|�k�[���4��>2��,3�A-Q�
���K=�*�G��/�j�^(5�;J�>40�2sSg6TJ�Cʰ�i	+u`��K|K�NL�fqI�j���6	��+�P�tBJ����h�Î�3�qc�:)�M]�;�c�wNk;o<o�MS�/��j�L��IEND�B`�#outputList .consoleItemAssert > .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})]*/
}<!DOCTYPE html>
<!-- saved from url=(0016)http://localhost -->
<html>
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=11">
        <meta http-equiv="Content-Type" content="text/html">
        <meta http-equiv="format-detection" content="telephone=no">
        <title>DOM Explorer</title>

        <link id="toolwindow.css" rel="stylesheet" href="../common/toolwindow.css" type="text/css" data-plugin-theme="true">
        <link id="toolwindow.f12.css" rel="stylesheet" href="../common/toolwindow.f12.css" type="text/css" data-plugin-theme="true">
        <link id="toolwindow.vs.css" rel="stylesheet" href="../common/toolwindow.vs.css" type="text/css" data-plugin-theme="true">
        <link id="controls.css" rel="stylesheet" href="../common/controls/controls.css" type="text/css" data-plugin-theme="true">
        <link id="datatree.css" rel="stylesheet" href="../common/dataTreeView.css" type="text/css" data-plugin-theme="true">
        <link id="domExplorer.css" rel="stylesheet" href="domExplorer.css" type="text/css" data-plugin-theme="true" data-necessary-for-tooltip="true">
        <link id="domExplorer.f12.css" rel="stylesheet" href="domExplorer.f12.css" type="text/css" data-plugin-theme="true">
        <link id="domExplorer.vs.css" rel="stylesheet" href="domExplorer.vs.css" type="text/css" data-plugin-theme="true">
        <link id="layout.css" rel="stylesheet" href="layout.css" type="text/css" data-plugin-theme="true">
        <link id="listControl.css" rel="stylesheet" href="../common/controls/listControl/listControl.css" type="text/css" data-plugin-theme="true" />
        <link id="htmltree.css" rel="stylesheet" href="../common/htmlTreeView.css" type="text/css" data-plugin-theme="true">
        <link id="domTree.css" rel="stylesheet" href="DomTree/domTree.css" type="text/css" data-plugin-theme="true">
        <link rel="stylesheet" href="Styles/StyleView/styleView.css" type="text/css" data-plugin-theme="true">
        <link rel="stylesheet" href="expandingListView.css" type="text/css" data-plugin-theme="true">
        <link rel="stylesheet" href="events.css" type="text/css" data-plugin-theme="true">
        <link rel="stylesheet" href="Styles/WinningView/winningStyles.css" type="text/css" data-plugin-theme="true">
        <link rel="stylesheet" href="Styles/ChangesView/changesView.css" type="text/css" data-plugin-theme="true">
        <link id="intellisenseListBox.css" rel="stylesheet" href="../common/Intellisense/intellisenseListBox.css" type="text/css" data-plugin-theme="true">

        <!-- Daytona Includes -->
        <script type="text/javascript" src="../Common/isDebugBuild.js"></script>
        <script type="text/javascript" src="../Common/plugin.js"></script>
        <script type="text/javascript" src="../Common/CommonMerged.js"></script>
        <script type="text/javascript" src="DomExplorerMerged.js"></script>
        <script type="text/javascript" src="res://f12test.dll/23/selftest/SelfTestDomExplorer.js"></script>
        <script type="text/javascript">
            // The main entry point
            F12.DomExplorer.App.main();
        </script>
        <script id="intellisenseListBox" type="text/html">
            <ul class="intellisenseListBox"></ul>
        </script>
        <script id="styleSubPropertyTemplate" type="text/html">
            <div class="BPT-Style-SubProperty ##if(isStrikeThrough)##BPT-Style-NotWinning##endIf##" data-uid="%%uid%%" role="treeitem" aria-checked="%%isEnabled%%">
                <div class="BPT-Style-ChangeBar" data-change="%%changeState%%"></div>
                <span class="BPT-Style-PropertyAriaChangeState" style="display: none;">%%ariaChangeStateString%%</span>
                <input class="BPT-Style-Property-Checkbox" type="checkbox" ##if(isEnabled)##checked##endIf## tabindex="-1" ##if(!@canToggleStyleSubpropertyEnable)##style="display: none;" ##endIf##>
                <span class="BPT-Style-PropertyAriaOverridden" style="display: none;">%%ariaOverriddenString%%</span>
                <div class="BPT-Style-PropertyName-Container BPT-EditBox-MaxHeightOverride">
                    <span class="BPT-Style-PropertyNameAriaInvalid" style="display: none;">%%ariaInvalidNameString%%</span>
                    <span class="BPT-Style-SubPropertyName">%%name%%</span>
                </div>
                <div class="BPT-Style-PropertyName-Colon">:</div>
                <div class="BPT-Style-Color ##if(!isDisplayableColor)##BPT-Style-Color-Hidden##endIf##" style="##if(isDisplayableColor)##background-color: %%colorForDisplay%%;##endIf##"></div>
                <div class="BPT-Style-PropertyValue-Container BPT-EditBox-MaxHeightOverride">
                    <span class="BPT-Style-PropertyValueAriaInvalid" style="display: none;">%%ariaInvalidValueString%%</span>
                    <span class="BPT-Style-SubPropertyValue">%%valueForDisplay%%</span><span class="BPT-Style-Property-SemiColon">;</span>
                </div>
            </div>
        </script>
        <script id="stylePropertyTemplate" type="text/html">
            <div class="BPT-Style-Property-Container BPT-EditBox-MarkActive ##if(!isApplied)##BPT-Style-Property-NotApplied##endIf##">
                <div class="BPT-Style-Property ##if(isStrikeThrough)##BPT-Style-NotWinning##endIf## ##if(!isShorthand)##BPT-Style-Property-LongHand##endIf##"
                      data-uid="%%uid%%" data-removed="##if(isDeleted)##true##endIf##"
                      role="treeitem" ##if(isShorthand)##aria-expanded="false" aria-setsize="%%properties.length%%" ##endIf## aria-checked="%%enabledMixedState%%" aria-invalid="%%isInvalid%%">
                    <div class="BPT-Style-ChangeBar" data-change="%%changeState%%"></div>
                    <span class="BPT-Style-PropertyAriaChangeState" style="display: none;">%%ariaChangeStateString%%</span>
                    <input class="BPT-Style-Property-Checkbox" type="checkbox" ##if(isEnabled)##checked##endIf## tabindex="-1" ##if(!@canToggleStylePropertyEnable)##style="display: none;" ##endIf##>
                    <span class="BPT-Style-PropertyAriaOverridden" style="display: none;">%%ariaOverriddenString%%</span>
                    <div class="BPT-Style-PropertyName-Container BPT-EditBox-MaxHeightOverride">
                        <span class="BPT-Style-PropertyNameAriaInvalid" style="display: none;">%%ariaInvalidNameString%%</span>
                        <span class="BPT-Style-PropertyName ##if(isNameDisplayedAsInvalid)##BPT-Style-InvalidProperty##endIf##">%%name%%</span>
                    </div>
                    <div class="BPT-Style-PropertyName-Colon">:</div>
                    <div class="BPT-Style-PropertyValue-ExpandIcon"></div>
                    <div class="BPT-Style-Color ##if(!isDisplayableColor)##BPT-Style-Color-Hidden##endIf##" style="##if(isDisplayableColor)##background-color: %%colorForDisplay%%;##endIf##"></div>
                    <div class="BPT-Style-PropertyValue-Container BPT-EditBox-MaxHeightOverride">
                        <span class="BPT-Style-PropertyValueAriaInvalid" style="display: none;">%%ariaInvalidValueString%%</span>
                        <span class="BPT-Style-PropertyValue ##if(!isValidValue)##BPT-Style-InvalidProperty##endIf##">%%valueForDisplay%%</span><span class="BPT-Style-Property-SemiColon">;</span>
                    </div>
                </div>
                <div class="BPT-Style-Properties" role="group">
                    ##forEach(properties)##
                    ##include(styleSubPropertyTemplate)##
                    ##endForEach##
                </div>
            </div>
        </script>
        <script id="styleRuleTemplate" type="text/html">
            <div class="BPT-Style-Item">
            ##if(isFirstRuleInTargetGroup)##<div class="BPT-Style-InheritedFrom">%L%DOMExplorerInheritedFromText%L% <a class="BPT-Style-InheritedFromTarget BPT-Tooltip-Item" data-id="%%target.uid%%" href="#" tabindex="-1" data-tooltip="%%target.description%%">%%displayInheritedFrom%%</a></div>##endIf##
            ##if(parent)##<div class="BPT-Style-ParentRule" data-change="%%changeState%%">%%parent%%</div>##endIf##
                <div class="BPT-Style-Rule BPT-EditBox-MarkActive" data-uid="%%uid%%" role="group" aria-expanded="true" aria-label="%%ariaLabel%%">
                    <div class="BPT-Style-ChangeBar" data-change="%%changeState%%"></div>
                    <div class="BPT-Style-ExpandIcon"></div>
                    <div class="BPT-Style-Selector-Container BPT-EditBox-MaxHeightOverride">
                        ##if(fileUrl)##<span class="BPT-Style-FileReference ##if(@showSourceFileLinks)##BPT-FileLink##endIf## ##if(@showSourceTooltips)##BPT-Tooltip-Item##endIf##" role="##if(@showSourceFileLinks)##link##endIf##" data-tooltip="##if(@showSourceTooltips)##%%tooltip%%##endIf##">%%fileLinkText%%</span>##endIf##
                        <span class="BPT-Style-Selector BPT-Tooltip-Item" data-tooltip="%%selectorText%%">%%selectorText%%</span>
                        <span class="BPT-Style-BlockOpener">
                            <span>{</span><span class="BPT-Style-CollapsedBlockFooter">...}</span>
                        </span>
                    </div>
                </div>
                <div class="BPT-Style-Properties" role="group">
                    ##forEach(properties)##
                    ##include(stylePropertyTemplate)##
                    ##endForEach##
                    <div class="BPT-Style-BlockFooter">
                        <div class="BPT-Style-EmptyRuleSpace"></div>
                        }
                    </div>
                </div>
            </div>
        </script>
        <script id="winningStylesPropertyTemplate" type="text/html">
            <div class="BPT-ExpandingList-Child-Value-Container BPT-EditBox-MarkActive ##if(!isWinningAndEnabled)##BPT-WinningStyle-NotWinning##endIf##" data-uid="%%propertyId%%" role="treeitem" aria-checked="%%isEnabled%%" aria-invalid="%%isInvalid%%">
                <div class="BPT-WinningStyle-LeftSide" data-removed="##if(isDeleted)##true##endIf##">
                    <div class="BPT-Style-ChangeBar" data-change="%%changeState%%"></div>
                    <span class="BPT-WinningStyle-PropertyAriaChangeState" style="display: none;">%%ariaChangeStateString%%</span>
                    <span class="BPT-WinningStyle-PropertyAriaOverridden" style="display: none;">%%ariaOverriddenString%%</span>
                    <input class="BPT-WinningStyle-SourceCheckBox" type="checkbox" ##if(isEnabled)##checked##endIf## tabindex="-1" ##if(!@canToggleComputedPropertyEnable)##style="display: none;" ##endIf##>
                    <span class="BPT-WinningStyle-PropertyAriaOverridden" style="display: none;">%%ariaOverriddenString%%</span>
                    <div class="BPT-HTML-Tag BPT-Tooltip-Item" data-tooltip="%%selector%%"><div>%%selector%%</div></div>
                    <div class="BPT-WinningStyle-Separator">-</div>
                    <div class="BPT-WinningStyle-SourceColor BPT-WinningStyle-Color BPT-EditBox-HideOnEdit" style="##if(isDisplayableColor)##background-color: %%value%%;##endIf## ##if(!isDisplayableColor)##display: none;##endIf##"></div>
                    <div class="BPT-Style-PropertyValue-Container BPT-EditBox-MaxHeightOverride">
                        <span class="BPT-Style-PropertyValueAriaInvalid" style="display: none;">%%ariaInvalidString%%</span>
                        <span class="BPT-Style-PropertyValue ##if(isInvalid)##BPT-Style-InvalidProperty##endIf##">%%valueForDisplay%%</span>
                    </div>
                </div>
                ##if(fileUrl)##<div class="BPT-WinningStyle-FileReference BPT-EditBox-HideOnEdit"><span class="##if(@showSourceFileLinks)##BPT-FileLink##endIf## ##if(@showSourceTooltips)##BPT-Tooltip-Item##endIf##" role="##if(@showSourceFileLinks)##link##endIf##" data-tooltip="##if(@showSourceTooltips)##%%tooltip%%##endIf##">%%fileLinkText%%</span></div>##endIf##
            </div>
        </script>
        <script id="winningStylesItemTemplate" type="text/html">
            <div class="BPT-ExpandingList-Item" data-listid="%%uniqueId%%" data-name="%%propertyName%%">
                <div class="BPT-ExpandingList-Header" role="group" aria-expanded="%%expanded%%" data-name="%%propertyName%%">
                    <div class="BPT-Style-ChangeBar" data-change="%%changeState%%"></div>
                    <span class="BPT-WinningStyle-PropertyAriaChangeState" style="display: none;">%%ariaChangeStateString%%</span>
                    ##if(hasChildren)##<div class="BPT-ExpandingList-ExpandIcon"></div>
                    <input class="BPT-WinningStyle-HeaderCheckBox" type="checkbox" ##if(isEnabled)##checked##endIf## tabindex="-1" ##if(!@canToggleComputedPropertyEnable)##style="display: none;" ##endIf##>##endIf##
                    <div class="BPT-WinningStyle-PropertyName">%%propertyName%%</div>
                    <div class="BPT-WinningStyle-HeaderColon">:</div>
                    <div class="BPT-Style-PropertyValue BPT-WinningStyle-PropertyValue-Grid">%%propertyValue%%</div>
                    ##if(isColor)##<div class="BPT-WinningStyle-Color" style="background-color: %%propertyValue%%"></div>##endIf##
                </div>
                ##if(hasChildren)##<div class="BPT-ExpandingList-Collapsed-Section">
                    ##forEach(children)##
                    ##include(winningStylesPropertyTemplate)##
                    ##endForEach##
                </div>##endIf##
            </div>
        </script>
        <script id="eventsTemplate" type="text/html">
            <div class="BPT-ExpandingList-Item" data-listid="%%uniqueId%%">
                <div class="BPT-ExpandingList-Header" role="group" aria-expanded="%%expanded%%">
                    ##if(hasChildren)##<div class="BPT-ExpandingList-ExpandIcon"></div>##endIf##
                    <div class="BPT-Events-EventName">%%eventName%%:</div>
                </div>
                ##if(hasChildren)##<div class="BPT-ExpandingList-Collapsed-Section">##forEach(children)##
                    <div class="BPT-ExpandingList-Child-Value-Container ##if(@showSourceTooltips)##BPT-Tooltip-Item##endIf##" role="treeitem" data-tooltip="##if(@showSourceTooltips)##%%tooltip%%##endIf##" aria-label="%%functionName%%.##if(@showSourceTooltips)## %%tooltip%%##endIf##">
                    <div class="BPT-HTML-Value BPT-Events-Function-Name">%%functionName%%</div>
                    <div class="BPT-Events-Location ##if(@showSourceFileLinks)##BPT-FileLink##endIf## BPT-Events-Handler-Link" role="##if(@showSourceFileLinks)##link##endIf##" data-linkcol="##if(@showSourceFileLinks)##%%column%%##endIf##" data-linkline="##if(@showSourceFileLinks)##%%line%%##endIf##" data-linkurl="##if(@showSourceFileLinks)##%%documentUrl%%##endIf##">%%text%%</div>
                </div>##endForEach##
                </div>##endIf##
            </div>
        </script>
        <script id="changesTemplate" type="text/html">
            <div class="BPT-ExpandingList-Item" data-listid="%%uniqueId%%">
                <div class="BPT-ExpandingList-Header" role="group" aria-expanded="%%expanded%%">
                    <div class="BPT-ExpandingList-ExpandIcon"></div>
                    <div class="BPT-Changes-Source BPT-Tooltip-Item" data-tooltip="%%displaySourceTooltip%%">%%displaySource%%</div>
                </div>
                <div class="BPT-ExpandingList-Collapsed-Section">##forEach(children)##
                    <div class="BPT-ExpandingList-Child-Value-Container" data-listsubid="%%uid%%" role="treeitem">
                        ##if(hasFileLink)##<div class="BPT-Changes-Link BPT-FileLink BPT-Tooltip-Item" role="link" data-tooltip="%%tooltip%%">%%fileLink%%</div>##endIf##
                        <div class="BPT-Changes-Rule" data-uid="%%uid%%">
                            ##if(parent)##<div class="BPT-Changes-ParentRule">%%parent%%</div>##endIf##
                            ##forEach(selectors)##
                            <div class="BPT-Changes-Selector" data-change="%%changeState%%">
                                <span class="BPT-Style-SelectorAriaChangeState" style="display: none;">%%ariaChangeStateString%%</span>
                                <span ##if(isSelectorChanged)##class="BPT-Changes-Highlight"##endIf##>%%selectorText%%</span><span> {</span>
                            </div>
                            ##endForEach##
                            <div class="BPT-Changes-Properties">
                                ##forEach(properties)##
                                <div class="BPT-Changes-Property" data-change="%%changeState%%">
                                    <span class="BPT-Style-PropertyAriaChangeState" style="display: none;">%%ariaChangeStateString%%</span>
                                    <div class="BPT-Changes-PropertyName">
                                        <span ##if(isNameChanged)##class="BPT-Changes-Highlight"##endIf##>%%name%%</span>:
                                    </div>
                                    <div class="BPT-Changes-PropertyValue">
                                        <span ##if(isValueChanged)##class="BPT-Changes-Highlight"##endIf##>%%value%%</span><span ##if(isPriorityChanged)##class="BPT-Changes-Highlight"##endIf##>%%priority%%</span>;
                                    </div>
                                </div>
                                ##endForEach##
                            </div>
                            <div class="BPT-Changes-BlockFooter" data-change="%%footerState%%">}</div>
                        </div>
                    </div>##endForEach##
                </div>
            </div>
        </script>
        <script id="breadcrumbsTemplate" type="text/html">
            <div class="BPT-Breadcrumb-Container">
                <span ##if(isSelected)##role="link" tabindex="1" ##endIf## class="BPT-HorizontalPane-BreadcrumbBar-Item BPT-Breadcrumb##if(isSelected)##-Selected##endIf##" bc-data-uid="%%elementUID%%">%%breadcrumbName%%</span>
                <svg width="8" height="24" xmlns="http://www.w3.org/2000/svg" class="BPT-HorizontalPane-BreadcrumbChevron" focusable="false">
                    <g>
                        <path d="m-1,0 L0,0 L8,12 L0,24 L-1,24" class="BPT-BreadcrumbChevron##if(isSelected)##-Selected##endIf##" />
                        <path d="m0,0 L8,12 L0,24" class="BPT-BreadcrumbChevron-Edge" />
                    </g>
                </svg>
           </div>
        </script>
        <script id="breadcrumbTooltip" type="text/html">
            <div role="tooltip" class="BPT-Breadcrumb-Tooltip">
                <div class="BPT-Breadcrumb-TooltipTableRow"##if(!elementName)##style="display:none"##endIf##>
                    <div class="BPT-Breadcrumb-TooltipTableCell">element</div>
                    <div class="BPT-Breadcrumb-TooltipTableCell BPT-Breadcrumb-Tooltip-Data">%%elementName%%</div>
                </div>
                <div class="BPT-Breadcrumb-TooltipTableRow" ##if(!id)##style="display:none"##endIf##>
                    <div class="BPT-Breadcrumb-TooltipTableCell">id</div>
                    <div class="BPT-Breadcrumb-TooltipTableCell BPT-Breadcrumb-Tooltip-Data">%%id%%</div>
                </div>
                <div class="BPT-Breadcrumb-TooltipTableRow"##if(!classNames)##style="display:none"##endIf##>
                    <div class="BPT-Breadcrumb-TooltipTableCell">class</div>
                    <div class="BPT-Breadcrumb-TooltipTableCell BPT-Breadcrumb-Tooltip-ClassNames">%%classNames%%</div>
                </div>
            </div>
        </script>

        <script id="domTreeItemDataTemplate" type="text/html">
            <div class="domTreeItemDataTemplate">
                <div id="domTreeItemDataTemplateNameCell" class="domTreeItemDataTemplateNameCell">
                    <div id="expander">
                    </div>
                    <div id="elementDescription" class="domTreeItemDataTemplateName">
                    </div>
                </div>
            </div>
        </script>

        <script id="domTreeElementTemplate" type="text/html">
            <div class="BPT-HTML">
                <span class="BPT-HTML-Punctuation">&lt;</span>
                <span class="BPT-HTML-HtmlElement" data-id="%%uid%%">
                    <span class="BPT-HTML-NewTag">
                        </>%%tag%%</>
                    </span>
                    </>##if(hasDebugUid)##</>
                        </> ##include(domTreeDebugUidTemplate)##</>
                    </>##endIf##</>
                    </>##forEach(attributes)##</>
                    </>##include(attributeTemplate)##</>
                    </>##endForEach##</>
                </span>
                <span class="BPT-HTML-Punctuation">&gt;</span>
                </>##if(hasImmediateClosingTag)##</>
                    </>##include(domTreeClosingTagTemplate)##</>
                </>##endIf##</>
                </>##if(hasEllipsisClosingTag)##</>
                    </>&hellip;</>
                    </>##include(domTreeClosingTagTemplate)##</>
                </>##endIf##</>
            </div>
        </script>

        <script id="domTreeTextElementTemplate" type="text/html">
            <div class="BPT-HTML">
                </>##if(hasDebugUid)##</>
                    </>##include(domTreeDebugUidTemplate)## </>
                </>##endIf##</>
                <span class="BPT-HTML-Text" data-id="%%uid%%">
                    </>%%textNodeText%%</>
                </span>
            </div>
        </script>

        <script id="domTreeCommentTemplate" type="text/html">
            <div class="BPT-HTML">
                <span class="BPT-HTML-Comment" data-id="%%uid%%">
                    </>&lt;!--</>
                    </>%%commentText%%</>
                    </>--&gt;</>
                </span>
            </div>
        </script>

        <script id="domTreeDocTypeTemplate" type="text/html">
            <div class="BPT-HTML">
                <span class="BPT-HTML-DocType" data-id="%%uid%%">
                    </>DOCTYPE %%docTypeText%%</>
                </span>
            </div>
        </script>

        <script id="domTreeClosingElementTemplate" type="text/html">
            <div class="BPT-HTML BPT-HTML-Standalone-ClosingTag">
                </>##include(domTreeClosingTagTemplate)##</>
            </div>
        </script>

        <script id="domTreeClosingTagTemplate" type="text/html">
            <span class="BPT-HTML-NewTag BPT-HTML-ClosingTag" data-id="%%uid%%">
                </>%%tag%%</>
            </span>
            </>##if(hasDebugUid)##</>
                </> ##include(domTreeDebugUidTemplate)##</>
            </>##endIf##</>
        </script>

        <script id="attributeTemplate" type="text/html">
            <span class="BPT-HTML-Attribute-Section" data-attrName="%%name%%">
                </> </>
                <span class="BPT-HTML-Attribute">
                    </>%%name%%</>
                </span>
                <span class="BPT-HTML-Value">
                    </>%%value%%</>
                </span>
            </span>
        </script>

        <script id="newAttributeTemplate" type="text/html">
            <span class="BPT-HTML-Attribute-Section BPT-HTML-Attribute-Section-New" data-attrName="%%name%%">
                </> </>
                <span class="BPT-HTML-Attribute">
                    </>%%name%%</>
                </span>
                <span class="BPT-HTML-Value">
                    </>%%value%%</>
                </span>
            </span>
        </script>

        <script id="domTreeDebugUidTemplate" type="text/html">
            <span class="BPT-HTML-Debug-Uid">%%uid%%</span>
        </script>
    </head>
    <body tabindex="-1" onLoad="document.getElementById('domTreeView').focus();">
        <div id="tabStartMarker" style="height: 0; width: 0;" tabindex="1"></div>
        <div id="mainContainer">
            <div id="toolbar"></div>
            <div class="BPT-HorizontalPane" id="pane">
                <div class="BPT-HorizontalPane-Left BPT-HtmlTree-ScrollContainer">
                   <div id="warningSection" style="display: none;">
                        <div class="BPT-WarnMessageIcon"></div>
                        <div id="warningMessageText" class='BPT-WarnMessage'></div>
                   </div>
                   <div id="scriptErrorSection" style="display: none;">
                        <div class="BPT-ScriptErrorMessageIcon"></div>
                        <div id="scriptErrorMessageText" class='BPT-ScriptErrorMessage'></div>
                    </div>

                    <div id="domTreeView" class="BPT-DataTree-Container-KeepSelection" tabindex="-1">
                        <div id="treeContainer" style="height: 100%; width: 100%"></div>
                    </div>

                    <div class="BPT-HorizontalPane-BreadcrumbBar">
                        <div id="breadcrumbLeftArrow" class="BPT-HorizontalPane-BreadcrumbBar-Arrow" role="button"></div>
                        <div id="BreadcrumbsView"></div>
                        <div id="breadcrumbRightArrow" class="BPT-HorizontalPane-BreadcrumbBar-Arrow" role="button"></div>
                    </div>
                </div>
                <div id="paneRight" class="BPT-HorizontalPane-Right BPT-EditBox-MarkActive" style="height: 100%; width: 100%">
                    <div class="BPT-Tab-Container">
                        <div class="BPT-Tabbar BPT-TabCycle-Horizontal" role="tablist">
                            <div id="stylesTabButton" class="BPT-Tab-Item BPT-TabCycle-Item" tabindex="1" role="tab" aria-selected="true">Styles</div>
                            <div id="winningStylesTabButton" class="BPT-Tab-Item BPT-TabCycle-Item" role="tab" aria-selected="false">Computed</div>
                            <div id="layoutTabButton" class="BPT-Tab-Item BPT-TabCycle-Item" role="tab" aria-selected="false">Layout</div>
                            <div id="eventsTabButton" class="BPT-Tab-Item BPT-TabCycle-Item" role="tab" aria-selected="false">Events</div>
                            <div id="changesTabButton" class="BPT-Tab-Item BPT-TabCycle-Item" role="tab" aria-selected="false">Changes</div>
                        </div>
                    </div>

                    <div id="optionalButtonsPanel" class="BPT-OptionsPanel-Hidden">
                        <div id="optionalButtonsPanelGroup">
                            <div id="pseudoStatesToggle" class="BPT-ToolbarButton BPT-ToolbarToggleButton BPT-OptionsPanel-Button" role="button" aria-pressed="false" tabindex="1">
                                <div class="buttonIcon pseudoStatesToggle"></div>
                            </div>
                            <div id="allWinningStylesButton" class="BPT-ToolbarButton BPT-ToolbarToggleButton BPT-BypassDisableReset BPT-OptionsPanel-Button" role="button" aria-pressed="false" tabindex="1" style="display: none;">
                                <div class="buttonIcon allWinningStylesButton"></div>
                            </div>
                        </div>
                    </div>

                    <div id="pseudoStatesPanel" data-show="false">
                        <div class="BPT-PseudoSelector" data-name="hover">
                            <input class="BPT-PseudoCheckbox" type="checkbox" tabindex="1" aria-labelledby="pseudoHoverLabel" id="checkbox_hover">
                            <label id="pseudoHoverLabel" for="checkbox_hover"></label>
                        </div>
                        <div id="pseudoVisited" class="BPT-PseudoSelector" data-name="visited">
                            <input class="BPT-PseudoCheckbox" type="checkbox" tabindex="1" aria-labelledby="pseudoVisitedLabel" id="checkbox_visited">
                            <label id="pseudoVisitedLabel" for="checkbox_visited"></label>
                        </div>
                    </div>

                    <div id="pane-right" class="BPT-HorizontalPane-Right-Content BPT-DataTree-ScrollContainer" role="tabpanel" style="height: 100%; width: 100%">
                        <div id="stylesView" class="BPT-HorizontalPane-Right-Tab BPT-DataTree-Container BPT-DataTree-Container-KeepSelection" aria-labelledby="stylesTabButton">
                            <div id="styleList" role="tree"></div>
                        </div>
                        <div id="winningStylesView" class="BPT-HorizontalPane-Right-Tab BPT-DataTree-Container BPT-DataTree-Container-KeepSelection" aria-labelledby="winningStylesTabButton" role="tabpanel">
                            <div>
                                <div class="BPT-WinningStyle-Filter">
                                    <input id="winningStylesFilterTextBox" class="BPT-WinningStyle-Filter-InputText" type="text" placeholder="[Filter Properties...]" tabindex="1" role="textbox" aria-readonly="false">
                                </div>
                            </div>
                            <div id="winningStylesNoResultsMessage">[No properties found.]</div>
                            <div id="winningStylesList" role="tree"></div>
                        </div>

                        <div id="layoutView" class="BPT-HorizontalPane-Right-Tab" aria-labelledby="layoutTabButton" role="tabpanel">
                            <div id="Layout-EditContainer" class="BPT-NoTabStop" style="display: none; position: absolute; z-index: 999"><span></span></div>
                            <div id="layoutViewTable">
                                <div id="layout-offset-layer" class="BPT-Layout-Layer" style="text-align: left;">
                                    <div id="offsetLabel" class="BPT-Layout-Label">Offset</div>
                                    <div id="Layout-Offset-Top" class="BPT-Layout-Top" data-layoutProperty="offsetTop"></div>
                                    <div class="BPT-Layout-Left-Outer-Cell"><div class="BPT-Layout-Left-Coord"><div id="Layout-Offset-Left" class="BPT-Layout-Left" data-layoutProperty="offsetLeft"></div></div></div>

                                    <div id="layout-margin-layer" class="BPT-Layout-Layer">
                                        <div id="marginLabel" class="BPT-Layout-Label">Margin</div>
                                        <div id="Layout-Margin-Top" class="BPT-Layout-Top" data-layoutProperty="margin-top"></div>

                                        <div class="BPT-Layout-Left-Outer-Cell"><div class="BPT-Layout-Left-Coord"><div id="Layout-Margin-Left" class="BPT-Layout-Left" data-layoutProperty="margin-left"></div></div></div>

                                        <div id="layout-border-layer" class="BPT-Layout-Layer">
                                            <div id="borderLabel" class="BPT-Layout-Label">Border</div>
                                            <div id="Layout-Border-Top" class="BPT-Layout-Top" data-layoutProperty="border-top-width"></div>

                                            <div class="BPT-Layout-Left-Outer-Cell"><div class="BPT-Layout-Left-Coord"><div id="Layout-Border-Left" class="BPT-Layout-Left" data-layoutProperty="border-left-width"></div></div></div>

                                            <div id="layout-padding-layer" class="BPT-Layout-Layer">
                                                <div id="paddingLabel" class="BPT-Layout-Label">Padding</div>
                                                <div id="Layout-Padding-Top" class="BPT-Layout-Top" data-layoutProperty="padding-top"></div>

                                                <div class="BPT-Layout-Left-Outer-Cell"><div class="BPT-Layout-Left-Coord"><div id="Layout-Padding-Left" class="BPT-Layout-Left" data-layoutProperty="padding-left"></div></div></div>

                                                <div id="layout-size-layer" class="BPT-Layout-Layer">
                                                    <div id="Layout-Size">
                                                        <span id="Layout-Size-Width" data-layoutProperty="width"></span> ×
                                                        <span id="Layout-Size-Height" data-layoutProperty="height"></span>
                                                    </div>
                                                </div>

                                                <div class="BPT-Layout-Right-Outer-Cell"><div class="BPT-Layout-Right-Coord"><div id="Layout-Padding-Right" class="BPT-Layout-Right" data-layoutProperty="padding-right"></div></div></div>

                                                <div id="Layout-Padding-Bottom" class="BPT-Layout-Bottom" data-layoutProperty="padding-bottom"></div>
                                            </div>
                                            <div class="BPT-Layout-Right-Outer-Cell"><div class="BPT-Layout-Right-Coord"><div id="Layout-Border-Right" class="BPT-Layout-Right" data-layoutProperty="border-right-width"></div></div></div>
                                            <div id="Layout-Border-Bottom" class="BPT-Layout-Bottom" data-layoutProperty="border-bottom-width"></div>
                                        </div>
                                        <div class="BPT-Layout-Right-Outer-Cell"><div class="BPT-Layout-Right-Coord"><div id="Layout-Margin-Right" class="BPT-Layout-Right" data-layoutProperty="margin-right"></div></div></div>
                                        <div id="Layout-Margin-Bottom" class="BPT-Layout-Bottom" data-layoutProperty="margin-bottom"></div>
                                    </div>
                                    <div class="BPT-Layout-Right-Outer-Cell"><div class="BPT-Layout-Right-Coord"><div id="Layout-Offset-Right" class="BPT-Layout-Right BPT-NoTabStop"></div></div></div>
                                    <div id="Layout-Offset-Bottom" class="BPT-Layout-Bottom BPT-NoTabStop"></div>
                                </div>
                            </div>
                        </div>

                        <div id="eventsView" class="BPT-HorizontalPane-Right-Tab BPT-DataTree-Container BPT-DataTree-Container-KeepSelection" aria-labelledby="eventsTabButton" role="tabpanel">
                            <div id="eventsList" role="list"></div>
                        </div>

                        <div id="changesView" class="BPT-HorizontalPane-Right-Tab BPT-DataTree-Container BPT-DataTree-Container-KeepSelection" aria-labelledby="changesTabButton" role="tabpanel">
                            <div id="changesEmptyMessage" role="note"></div>
                            <div id="changesList" role="list"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div id="tabEndMarker" style="height: 0; width: 0;" tabindex="1"></div>
    </body>
</html>
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;
        }

        .BPT-Toolbar .BPT-SearchBox-HideButtons .BPT-Search-Button {
            display: none;
        }

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

/* Css styling for the tree view and html elements */
#tree {
    margin-top: 5px;
}

/* Ensure a usable width for a DOM tree item -- this should stay in sync with TreeDataItem.MinSizingParentWidth in treeDataItem.ts */
.BPT-HTML {
    min-width: 400px;
}

/* 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;
    }

.BPT-HorizontalPane-Left {
    -ms-grid-columns: 1fr;
    -ms-grid-rows: auto auto 1fr;
    box-sizing: border-box;
    display: -ms-grid;
    height: calc(100% - 25px);
    overflow-x: auto;
    width: 100%;
}

    .BPT-HorizontalPane-Left > #warningSection {
        -ms-grid-row: 1;
        border-bottom: 1px solid TRANSPARENT; /*[1px solid {plugin-breadcrumb-border-color}]*/
    }

    .BPT-HorizontalPane-Left > #scriptErrorSection {
        -ms-grid-row: 2;
        border-bottom: 1px solid TRANSPARENT; /*[1px solid {plugin-breadcrumb-border-color}]*/
    }

    .BPT-HorizontalPane-Left > #domTreeView {
          -ms-grid-row: 3;
          display: block;
          height: 100%;
          margin: 0;
          padding: 0;
          width: 100%;
    }

.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-Virtualizing-Tree-Container {
    position: absolute;
}

.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: 24px;
        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 rgba(0.5)}]*/
}

#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-HTML div {
    display: inline;
}

.BPT-HTML .BPT-HTML-No-Closing-Slash,
.BPT-HTML .BPT-HTML-No-Self-Closing-Slash,
.BPT-HTML .BPT-HTML-No-Closing-Tag,
.BPT-HTML .BPT-HTML-No-TextContentPreview {
    display: none;
}

.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-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,
.BPT-HTML-CData {
    cursor: text;
}

::selection {
    background-color: rgba(0, 0, 255, 0.5); /*[{plugin-highlight-background-color rgba(0.5)}]*/
}

#BreadcrumbsView {
    height: 0;
}

#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: inherit;
    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.
function diagnosticOutput(n,t){"use strict";var i,u,f,r;try{i=document.querySelector("#diagnostic-output");i||(i=document.createElement("div"),i.setAttribute("id","diagnostic-output"),i.innerHTML="Diagnostic:",document.body.insertBefore(i,document.body.firstChild),i=document.querySelector("#diagnostic-output"));i&&(u=document.createElement("br"),i.appendChild(u),f=document.createTextNode(n),i.appendChild(f));t&&(r=document.querySelector("#diagnostic-trace"),r||(r=document.createElement("div"),r.setAttribute("id","diagnostic-trace"),r.innerHTML="StackTrace:",i.appendChild(r),r=document.querySelector("#diagnostic-trace")),r&&(i.innerHTML+="<br>"+t))}catch(e){}}var __extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},DomTree,ControlTemplates,F12,Dom;(function(n){"use strict";var t=function(n){function t(t){n.call(this);this.attributes=new Common.ObservableCollection;this._item=t}return __extends(t,n),Object.defineProperty(t.prototype,"childIndex",{get:function(){return this._item.childIndex},set:function(n){this._item.childIndex=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._item.children},set:function(n){this._item.children=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clickSelectAlternative",{get:function(){return this._item},set:function(){throw new Error("Can't set clickSelectAlternative")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dontVirtualize",{get:function(){return this._item.dontVirtualize},set:function(n){this._item.dontVirtualize=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isGettingDetails",{get:function(){return this._item.isGettingDetails},set:function(n){this._item.isGettingDetails=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasChildren",{get:function(){return!1},set:function(){throw Error("Cannot set hasChildren")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return-1},set:function(){throw Error("Cannot set id")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isBeingDragged",{get:function(){return this._item.isBeingDragged},set:function(n){this._item.isBeingDragged=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isBeingEdited",{get:function(){return this._item.isBeingEdited},set:function(n){this._item.isBeingEdited=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isClosingTag",{get:function(){return!0},set:function(){throw Error("Cannot set isClosingTag")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isExpanded",{get:function(){return this._item.isExpanded},set:function(n){this._item.isExpanded=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isForceExpanded",{get:function(){return!1},set:function(){throw Error("Cannot set isForceExpanded")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSelectable",{get:function(){return!1},set:function(){throw Error("Cannot set isSelectable")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSelfClosing",{get:function(){return!1},set:function(){throw Error("Cannot set isSelfClosing")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dontKeyboardSelect",{get:function(){return!0},set:function(){throw new Error("Can't set dontKeyboardSelect")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"level",{get:function(){return this._item.level},set:function(n){this._item.level=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"needsRefresh",{get:function(){return!1},set:function(){throw Error("Cannot set needsRefresh")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"node",{get:function(){return this._item.node},set:function(n){this._item.node=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this._item.parentNode},set:function(n){this._item.parentNode=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentItem",{get:function(){return this._item.parentItem},set:function(n){this._item.parentItem=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"potentiallyHasChildren",{get:function(){return this._item.potentiallyHasChildren},set:function(n){this._item.potentiallyHasChildren=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tag",{get:function(){return this._item.tag},set:function(n){this._item.tag=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"uid",{get:function(){return this._item.uid},set:function(){throw Error("Cannot set uid")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"visibleDescendantRowCount",{get:function(){return this._item.visibleDescendantRowCount},set:function(n){this._item.visibleDescendantRowCount=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"visibleRowCount",{get:function(){return this._item.visibleRowCount},set:function(n){this._item.visibleRowCount=n},enumerable:!0,configurable:!0}),t.prototype.getElement=function(){return this._item.getElement()},t.prototype.getItemContainerElement=function(){return this._item.getItemContainerElement()},t.prototype.getNextSibling=function(){return this._item.getNextSibling()},t.prototype.getPreviousSibling=function(){return this._item.getPreviousSibling()},t.prototype.isDraggable=function(){return!1},t.prototype.isItemAChild=function(){return!1},t}(Common.Observable);n.ClosingTreeDataItem=t})(DomTree||(DomTree={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(n,t,i){this.listChanged=new Common.EventSource;this._remoteDom=n;this._capabilities=t;this._documentMode=i}return Object.defineProperty(i.prototype,"count",{get:function(){return this.domTree.count},set:function(){throw new Error("Cannot set count")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"indentIndexStart",{get:function(){return this._selectedItem&&this._selectedItem.isExpanded&&this._selectedItem.hasChildren?this._selectedItemIndex:undefined},set:function(){throw new Error("Cannot set indentIndexStart")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"indentIndexEnd",{get:function(){return this._selectedItem&&this._selectedItem.isExpanded&&this._selectedItem.hasChildren?this.indentIndexStart+this._selectedItem.visibleDescendantRowCount+1:undefined},set:function(){throw new Error("Cannot set indentIndexEnd")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"indentLevel",{get:function(){return this._selectedItem&&this._selectedItem.isExpanded?this._selectedItem.level:0},set:function(){throw new Error("Cannot set indentLevel")},enumerable:!0,configurable:!0}),i.prototype.clear=function(){this.domTree&&this.domTree.clear()},i.prototype.init=function(){var t=this;return this.domTree=new n.SparseDomTree(this._remoteDom,this._capabilities),this.domTree.listChanged.addHandler(function(n){t.listChanged.invoke(n)}),this.domTree.init().then(function(){return t.domTree.addChangeListener(t.handleDomMutation.bind(t))})},i.prototype.collapseBranch=function(n){return this.domTree.collapseItem(this.domTree.getItemAtVisibleIndex(n)),Common.PromiseUtilities.EmptyPromise},i.prototype.collapseUid=function(n){return this.domTree.collapseUid(n),Common.PromiseUtilities.EmptyPromise},i.prototype.expandBranch=function(n){return this.domTree.expandItem(this.domTree.getItemAtVisibleIndex(n)),this.primeAtIndex(n,!0)},i.prototype.expandUid=function(n,t){return t===void 0&&(t=!1),this.domTree.expandUid(n,t),this.primeAtUid(n,!0)},i.prototype.expandUidChain=function(n){var r=this,i;return n&&n.length>0?(i=n[n.length-1],this.domTree.expandUidChain(n).then(function(n){return r.primeAtUid(i).then(function(){return n})})):t.Promise.as(null)},i.prototype.getItemByUid=function(n){return this.domTree.findItemByUid(n)},i.prototype.fetchItems=function(){var r=this,i,n;if(Object.keys(this._itemsToFetch).length){i=[];for(n in this._itemsToFetch)i.push({parentUid:n,childIndexes:this._itemsToFetch[n].indexes,childUids:this._itemsToFetch[n].uids});return this._itemsToFetch={},new t.Promise(function(n){r._remoteDom.getBulkChildNodesDetails(i,function(i){t.Promise.join(i.map(function(n){var i=n.childNodesDetails,u=i.map(function(n){return r.domTree.ingestNodeDescription(n)});return t.Promise.join(u)})).done(n)})})}return Common.PromiseUtilities.EmptyPromise},i.prototype.getIndexChain=function(n){var t=this.domTree.findItemByUid(n);return t?t.node.getIndexChain():null},i.prototype.getNext=function(n){for(n===void 0&&(n=0);n>0;n--){if(this._enumerationItem=this.domTree.findNextItem(this._enumerationItem),!this._enumerationItem)return null;this._enumerationItem.needsRefresh&&this.addItemToFetch(this._enumerationItem)}var t=this._enumerationItem;return this._enumerationItem=this.domTree.findNextItem(this._enumerationItem),this._enumerationItem&&this._enumerationItem.needsRefresh&&this.addItemToFetch(this._enumerationItem),t},i.prototype.hasCollapsedAncestor=function(n){var t=this.getItemByUid(n);return this.domTree.hasCollapsedAncestor(t)},i.prototype.indexOfParent=function(n){var r=-1,u=this.domTree.findItemById(n),i;return u&&(i=u.parentItem,i&&(r=this.domTree.getVisibleIndexOfItem(i))),t.Promise.wrap(r)},i.prototype.isUnderEditableItem=function(n){var t=["#doctype","script","style"];for(this._documentMode<9&&t.push("#comment");n;){if(!n.node||t.indexOf(n.node.tagLowerCase)>=0)return!1;n=n.parentItem}return!0},i.prototype.indexOfItem=function(n){var t=-1,i=this.domTree.findItemById(n);return i&&(t=this.domTree.getVisibleIndexOfItem(i)),t},i.prototype.indexOfItemAsync=function(n){return t.Promise.wrap(this.indexOfItem(n))},i.prototype.potentiallyHasChildren=function(n){var t=this.getItemByUid(n);return!!t&&(t.potentiallyHasChildren||t.areChildrenInline)},i.prototype.refreshTree=function(){return this._selectedItem=undefined,this.updateSelectedItemIndex(),this.domTree.refreshTree()},i.prototype.reparent=function(n,t,i){return this._remoteDom.reparentNode(n,t,i)},i.prototype.startAt=function(n){this._enumeratedParents={};this._enumerationItem=this.domTree.getItemAtVisibleIndex(n);this._itemsToFetch={}},i.prototype.selectedItemMutated=function(){},i.prototype.selectionChanged=function(n){this._selectedItem=n;this.updateSelectedItemIndex()},i.prototype.setDragUid=function(n){var t;this._dragUid&&(t=this.getItemByUid(this._dragUid),t&&(t.isBeingDragged=!1));this._dragUid=n;this._dragUid&&(t=this.getItemByUid(this._dragUid),t&&(t.isBeingDragged=!0))},i.prototype.stop=function(){return this.fetchItems()},i.prototype.primeAtIndex=function(n,t){var f=i.PRIME_REACH_COUNT,r=n,e,u;for(t||(r=Math.max(0,n-f)),e=Math.min(this.count,n+f),this.startAt(r),u=r;u<e;u++)this.getNext();return this.stop()},i.prototype.primeAtUid=function(n,t){var i=this.getItemByUid(n),r;return i?(r=this.domTree.getVisibleIndexOfItem(i),this.primeAtIndex(r,t)):Common.PromiseUtilities.EmptyPromise},i.prototype.addItemToFetch=function(n){this._itemsToFetch[n.parentItem.uid]||(this._itemsToFetch[n.parentItem.uid]={indexes:[],uids:[]});n.uid?this._itemsToFetch[n.parentItem.uid].uids.push(n.uid):this._itemsToFetch[n.parentItem.uid].indexes.push(n.childIndex)},i.prototype.handleDomMutation=function(n){switch(n){case 0:case 1:this.updateSelectedItemIndex()}},i.prototype.updateSelectedItemIndex=function(){this._selectedItemIndex=this._selectedItem?this.domTree.getVisibleIndexOfItem(this._selectedItem):undefined},i.PRIME_REACH_COUNT=60,i}();n.DomTreeDataSource=i})(DomTree||(DomTree={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=function(n){function t(){n.apply(this,arguments)}return __extends(t,n),t.prototype.render=function(){this.clearSelectionHighlight();this.clearHoverHighlight();n.prototype.render.call(this)},t.prototype.allContainersRenderedOverride=function(t,i){var u=n.prototype.allContainersRenderedOverride.call(this,t,i),r;return this._highlightWidth=this.rootElement.scrollWidth+"px",this._panelMouseYOffset=this.rootElement.offsetTop-this.scrollTop,this._highlightIndex>=0&&(r=this.getItemRowInfoFromIndex(this._highlightIndex),r&&t<=r.topRow+r.rowsSpan&&i>=r.topRow&&this.updateSelectionHighlight(r)),u},t.prototype.onApplyTemplate=function(){n.prototype.onApplyTemplate.call(this);this._selectionHighlightElement=null;this._hoverHighlightElement=null;this.rootElement.addEventListener("mousemove",this.handleMouseMove.bind(this));this.rootElement.addEventListener("mouseleave",this.handleMouseLeave.bind(this))},t.prototype.clearSelectionHighlightIndex=function(){this._highlightIndex=-1;this.clearSelectionHighlight()},t.prototype.setSelectionHighlightIndex=function(n){this._highlightIndex=n;var t=this.getItemRowInfoFromIndex(this._highlightIndex);t?this.updateSelectionHighlight(t):this.clearSelectionHighlightIndex()},t.isInlineElement=function(n){return window.getComputedStyle(n).display==="inline"},t.prototype.clearHoverHighlight=function(){this.getHoverHighlightElement().style.width="0px"},t.prototype.clearSelectionHighlight=function(){this.getSelectionHighlightElement().style.width="0px"},t.prototype.getHoverHighlightElement=function(){return this._hoverHighlightElement||(this._hoverHighlightElement=document.createElement("div"),this._hoverHighlightElement.className="BPT-Hover-Highlight",this.rootElement.appendChild(this._hoverHighlightElement)),this._hoverHighlightElement},t.prototype.getSelectionHighlightElement=function(){return this._selectionHighlightElement||(this._selectionHighlightElement=document.createElement("div"),this._selectionHighlightElement.className="BPT-Selected-Element-Highlight",this.rootElement.appendChild(this._selectionHighlightElement)),this._selectionHighlightElement},t.prototype.handleMouseMove=function(n){var i=n.target,r;if(i!==this.getSelectionHighlightElement()){if(i===this.rootElement){this.updateHoverHighlight(n.offsetY+this.scrollTop);return}for(t.isInlineElement(i)&&(i=i.offsetParent),r=n.offsetY;i&&i!==this.rootElement;)r+=i.offsetTop,i=i.offsetParent;this.updateHoverHighlight(r)}},t.prototype.handleMouseLeave=function(){this.clearHoverHighlight()},t.prototype.updateHighlightElement=function(n,t){n.style.height=t.rowsSpan*this.rowHeight+"px";n.style.top=t.topRow*this.rowHeight+"px";n.style.width=this._highlightWidth},t.prototype.updateHoverHighlight=function(n){var i=this.getContainerAt(n+this._panelMouseYOffset),u=!1,r,t;i&&(r=i.style.top,r!==this.getSelectionHighlightElement().style.top&&(t=this.getHoverHighlightElement(),t.style.height=i.clientHeight+"px",t.style.top=r,t.style.width=this._highlightWidth,u=!0));u||this.clearHoverHighlight()},t.prototype.updateSelectionHighlight=function(n){this.updateHighlightElement(this.getSelectionHighlightElement(),n)},t.prototype.getContainerAt=function(n){for(var t=document.elementFromPoint(0,n),i;t&&t!==document;){if(i=t,i.msMatchesSelector&&i.msMatchesSelector(".BPT-listItemContainer"))return i;t=t.parentNode}return null},t}(Common.Controls.VirtualizingMultiRowStackPanel);n.DomTreeVirtualizingMultiRowStackPanel=t}(DomTree||(DomTree={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t=Microsoft.Plugin,i=F12.Tools.Utility.Assert,r=function(){function r(n,t){this._relativeVisibleIndexes=new Map;this._itemVisibleIndexCache=new Map;this.listChanged=new Common.EventSource;this._remote=n;this._capabilities=t}return Object.defineProperty(r.prototype,"count",{get:function(){return this._rootItem?this._rootItem.visibleRowCount:0},set:function(){throw Error("Cannot set count")},enumerable:!0,configurable:!0}),r.prototype.addChangeListener=function(n){this._changeListeners=this._changeListeners||[];this._changeListeners.push(n)},r.prototype.addItem=function(n){this.ingestItem(n)},r.prototype.clear=function(){this._uidToItemMap={};this._uidToClosingItemMap={};this._idToItemMap={};this._changeListeners=[];this._expandedItems={};this._pauseMutationRequestCount=0;this._pausedMutationQueue=[];this.clearItemIndexCache();this._rootItem&&this._rootItem.visibleDescendantRowCount!==0&&(this.reportCountChanged(this._rootItem,0,-this._rootItem.visibleDescendantRowCount),this._rootItem=null)},r.prototype.init=function(){var t=this;return this.clear(),this._remote.getDomNodeDetails("#root").then(function(i){if(i.childCount===0)throw new Error("Invalid root element. The root element contains no children.");var r=new n.DomTreeElement("#root",i.childCount,null,0,"root");return t._rootItem=new n.TreeDataItem(t._capabilities,r,0,null,"#root",i.childCount),t.ingestItem(t._rootItem)})},r.prototype.ingestItem=function(n){var t=this,i;if(!this._uidToItemMap[n.uid])return this._uidToItemMap[n.uid]=n,this._idToItemMap[n.id]=n,i=Common.PromiseUtilities.EmptyPromise,(n.uid==="#root"||n.tag==="frame"||n.tag==="iframe")&&(i=this.setupMutationListener(n.uid)),i.then(function(){if(n.parentItem&&(n.parentItem.node.setChild(n.node,n.childIndex),n.parentItem.children[n.childIndex]=n),-1!==r.TAGS_TO_EXPAND.indexOf(n.tag)){if(t.expandItem(n))return t.validateTree(),t.loadFirstChildren(n)}else t.validateTree()});F12.Tools.Utility.Assert.failDebugOnly("Ingesting an item that already exists. uid: "+n.uid)},r.prototype.ingestNodeDescription=function(i){var h=this,u,f,o,e,s;return i.tag?(u=this._uidToItemMap[i.uid],f=this._uidToItemMap[i.parentUid],!f)?t.Promise.as(null):(o=f?f.level+1:0,!u&&f&&(u=f.children[i.childIndex]),(!u||u.uid&&u.uid!==i.uid)&&(u=this.findChildByUid(f,i.uid)),u&&!u.needsRefresh)?t.Promise.wrap(u):(u||(u=new n.TreeDataItem(this._capabilities,null,o,null),u.childIndex=i.childIndex),e=new n.DomTreeElement(i.uid,i.childCount,s),e.tag=i.tag,i.attributes&&i.attributes.forEach(function(n){return e.addAttribute(n)}),u.node=e,u.uid=i.uid,u.level=o,u.hasChildren=i.childCount>0,u.children=new Array(i.childCount),u.isClosingTag=!1,u.isSelfClosing=r.isSelfClosingTag(i.tag,i.childCount>0),u.textPreview=i.textPreview,u.parentItem=this.isChildOfRoot(i)?this._rootItem:this.findItemByUid(i.parentUid),s=u.parentItem?u.parentItem.node:null,!u.isClosingTag&&u.parentItem&&u.parentItem.node.setChild(e,u.childIndex),this.reportInvalidateRowSpan(u),u.needsRefresh=!1,this.ingestItem(u).then(function(){return h.fireChange(2,u.node),u})):t.Promise.as(null)},r.prototype.isChildOfRoot=function(n){if(2===this._remote.getTargetEngineKind()){var t=n;return t.parent&&t.parent.tag==="#document"}return"#root"===n.parentUid},r.prototype.insertChild=function(n,t,i){var u,r=this.findItemByUid(n),f,e,o;if(r){if(this.clearItemIndexCache(r,t),this.findChildByUid(r,i))return F12.Tools.Utility.Assert.failDebugOnly("Adding a child that already exists"),r.node.insertChildUid({uid:null,childCount:0},r.children.length),r.children.length+=1,this.changeVisibleDescendantRowCounts(r,1),this.reportCountChanged(r,r.children.length-1,1),undefined;f=r.children.length;t>r.children.length?r.children[t]=null:r.children.splice(t,0,null);u=this.getItemPlaceholder(r,t);u.uid=i;r.node.insertChildUid({uid:i,childCount:0},t);r.children[t]=u;e=r.children.length-f;r.hasChildren=!0;this.updateChildIndexes(r);r.isExpanded&&(r.visibleDescendantRowCount+=e,o=e+(f?0:1),this.changeVisibleDescendantRowCounts(r.parentItem,o),this.hasCollapsedAncestor(r)||this.reportCountChanged(r,t,o))}return u},r.prototype.findChildByUid=function(n,t){var i=null;return n.children&&n.children.every(function(n){return n&&n.uid===t?(i=n,!1):!0}),i},r.prototype.getItemAtVisibleIndex=function(n){for(var t=this._rootItem,i=this.getChildIndexByVisibleIndex(t,n),u=this.getRelativeVisibleIndex(t,i),r;u<this.count;){if(r=t.children[i],u===n)return r||this.getItemPlaceholder(t,i);if(u+r.visibleRowCount-1===n)return this.getClosingTreeDataItem(r);t=r;i=this.getChildIndexByVisibleIndex(t,n);u+=this.getRelativeVisibleIndex(t,i)}},r.prototype.getFirstItemByTag=function(n){return this.findItemByPredicate(function(t){return t.tag===n})},r.prototype.getVisibleIndexOfItem=function(n){var c=this,t=0,f=n,h=this._itemVisibleIndexCache.get(n),o,u,e,r,s;if(h!==undefined)return h;for(o=function(){return n.isClosingTag&&(t+=n.visibleRowCount-1),c._itemVisibleIndexCache.set(n,t),t};f!==this._rootItem;){for(u=f.parentItem,e=f.childIndex-1;e>=0;e--){if(r=u.children[e],r&&(s=this._itemVisibleIndexCache.get(r),s!==undefined))return t+=s+r.visibleRowCount,o();t+=r?r.visibleRowCount:1}u!==this._rootItem&&(t+=1);f=u;i.isTrue(u!==null,"getIndexOfItem called for item that is not a descendent of current tree root")}return o()},r.prototype.findItemByUid=function(n){return this._uidToItemMap[n]},r.prototype.findItemById=function(n){return this._idToItemMap[n]},r.prototype.findItemByTag=function(n,t){return t===void 0&&(t=0),this.findItemByPredicate(function(i){if(i&&!i.isClosingTag&&i.tag===n){if(t<=0)return!0;t--}return!1})},r.prototype.findItemWithAttrNameValue=function(n,t,i,r){return r===void 0&&(r=0),this.findItemByPredicate(function(u){if(u&&!u.isClosingTag&&u.node){var f=u.node.getAttributeByName(n);if(f&&(!i&&f.value===t||i&&f.value.indexOf(t)!==-1)){if(r<=0)return!0;r--}return!1}})},r.prototype.findItemByPredicate=function(n){for(var t=this._rootItem;t;){if(n(t))return t;t=this.findNextItem(t)}return null},r.prototype.findNextItem=function(n){var t;if(n.isClosingTag)this.hasNextSibling(n)?(t=this.findSibling(n),t||(t=this.getItemPlaceholder(n.parentItem,n.childIndex+1))):t=n.parentItem&&"#root"!==n.parentItem.uid?this.getClosingTreeDataItem(n.parentItem):null;else if(n.isExpanded&&n.children&&n.children.length)t=n.children[0],t||(t=this.getItemPlaceholder(n,0));else if(n.isForceExpanded)t=this.getClosingTreeDataItem(n);else if(this.hasNextSibling(n))t=this.findSibling(n),t||(t=this.getItemPlaceholder(n.parentItem,n.childIndex+1));else if(n.parentItem)t=this.getClosingTreeDataItem(n.parentItem);else return null;return t},r.prototype.expandItem=function(n,t){var r,i,u,e,f;if((t===void 0&&(t=!1),!n)||!t&&n.areChildrenInline)return!1;if(n.isExpanded||!n.hasChildren||n.areChildrenInline||n.isSelfClosing)t&&!n.isForceExpanded&&(this.clearItemIndexCache(n.parentItem,n.childIndex),n.isExpanded=!0,n.isForceExpanded=!0,n.areChildrenInline&&(n.areChildrenInline=!1),this.changeVisibleDescendantRowCounts(n.parentItem,1),this.reportCountChanged(n,0,1));else{for(this.clearItemIndexCache(n.parentItem,n.childIndex),r=0,i=0;i<n.children.length;i++)u=n.children[i],r+=u?u.visibleRowCount:1;e=n.visibleRowCount;n.isExpanded=!0;n.visibleDescendantRowCount=r;f=n.visibleRowCount-e;this.changeVisibleDescendantRowCounts(n.parentItem,f);this.reportCountChanged(n,0,f)}return n.isExpanded},r.prototype.expandUid=function(n,t){return t===void 0&&(t=!1),this.expandItem(this.findItemByUid(n),t)},r.prototype.expandUidChain=function(n){var i=this;return this._remote.getDomNodesDetails(n).then(function(r){if(r.length!==n.length)return F12.DomExplorer.DomExplorerWindow.showMissingElementError(),t.Promise.as(null);var u,f=function(){if(r.length===0)return t.Promise.as(u?u.uid:null);var n=r.shift();return n.parentUid=u?u.uid:"#root",u=n,i.ingestNodeDescription(n).then(function(n){return i.expandItem(n)?f():t.Promise.as(n.uid)})};return f()})},r.prototype.collapseItem=function(n){if(!n.isClosingTag||(n=this.findItemByUid(n.uid),n)){this.clearItemIndexCache(n.parentItem,n.childIndex);var t=-(n.visibleRowCount-1);n.isExpanded=!1;n.isForceExpanded=!1;n.visibleDescendantRowCount=0;this.changeVisibleDescendantRowCounts(n.parentItem,t);this.reportCountChanged(n,0,t)}},r.prototype.collapseUid=function(n){var t=this.findItemByUid(n);t&&this.collapseItem(t)},r.prototype.hasCollapsedAncestor=function(n){while(n&&n.isExpanded)n=n.parentItem;return!!n},r.prototype.loadFirstChildren=function(n,i){var f=this,u,r;for(i===void 0&&(i=10),u={parentUid:n.uid,childIndexes:[],childUids:[]},r=0;r<n.children.length&&r<i;r++)u.childIndexes.push(r);return u.childIndexes.length===0?Common.PromiseUtilities.EmptyPromise:new t.Promise(function(n){f._remote.getBulkChildNodesDetails([u],function(i){var r=i[0];return t.Promise.join(r.childNodesDetails.map(function(n){return f.ingestNodeDescription(n)})).done(n)})})},r.prototype.pauseDomMutations=function(){this._pauseMutationRequestCount===0&&this._pausedMutationQueue.length>0&&F12.Tools.Utility.Assert.failDebugOnly("The DOM mutation queue wasn't properly cleaned.");this._pauseMutationRequestCount++},r.prototype.refreshItem=function(i,r){var u=this,f;return r===void 0&&(r=!0),this.removeChild(i.parentItem.uid,i.childIndex,i.uid),f=[],f.push({parentUid:i.parentItem.uid,childIndexes:[],childUids:[i.uid]}),new t.Promise(function(t){u._remote.getBulkChildNodesDetails(f,function(f){var o=f[0],e,s;o.childNodesDetails.length>0?(e=o.childNodesDetails[0],e.childIndex=i.childIndex,s=u.insertChild(i.parentItem.uid,i.childIndex,i.uid),n.GleamingBehaviour.allowGleamingIf(r,s,function(){u.ingestNodeDescription(e).done(t)})):t()})})},r.prototype.refreshTree=function(){return this.init()},r.prototype.removeChangeListener=function(n){for(var i=this._changeListeners.length,t=0;t<i;t++)if(this._changeListeners[t]===n)return this._changeListeners.splice(t,1),!0;return!1},r.prototype.removeChild=function(n,t,i){var r=this.findItemByUid(n),u;r&&r.children.length>t?(u=r.children[t],u?(u.uid&&u.uid!==i&&F12.Tools.Utility.Assert.failDebugOnly("Removing a child by childIndex, but its uid doesn't match the one we want to remove!"),this.removeItem(u)):(this._uidToItemMap[i]&&F12.Tools.Utility.Assert.failDebugOnly("Removing a non-loaded child by childIndex, but the child with this uid is actually loaded somewhere else!"),this.removeChildAt(r,t))):r.children.length<=t&&F12.Tools.Utility.Assert.failDebugOnly("Requested a removal on a child past the end of the parent's child array!")},r.prototype.removeChildAt=function(n,t){var r,u,i;this.clearItemIndexCache(n,t);r=n.children[t];u=r?r.visibleRowCount:1;n.node.removeChildByIndex(t);n.children.splice(t,1);n.hasChildren=n.children.length>0;this.updateChildIndexes(n);n.isExpanded&&(0===n.children.length?(n.visibleDescendantRowCount=0,i=-1-u,this.changeVisibleDescendantRowCounts(n.parentItem,i),this.hasCollapsedAncestor(n.parentItem)||this.reportCountChanged(n,0,i)):(i=-u,this.changeVisibleDescendantRowCounts(n,i),this.hasCollapsedAncestor(n)||this.reportCountChanged(n,t,i)))},r.prototype.removeForceExpand=function(n){return n.isForceExpanded?(this.clearItemIndexCache(n.parentItem,n.childIndex),n.isForceExpanded=!1,n.hasChildren||(this.changeVisibleDescendantRowCounts(n.parentItem,-1),this.reportCountChanged(n.parentItem,n.childIndex,-1)),!0):!1},r.prototype.removeItemByUid=function(n){var t=this._uidToItemMap[n];t&&this.removeItem(t)},r.prototype.resumeDomMutations=function(){var n=this;this._pauseMutationRequestCount<1&&F12.Tools.Utility.Assert.failDebugOnly("Number of requests to pause mutation is negative - there must be a resumeDomMutations() without a matching pauseDomMutations()");this._pauseMutationRequestCount===1&&(this._pausedMutationQueue.forEach(function(t){t.forEach(function(t){n.domMutationHandler(t,!1)})}),this._pausedMutationQueue=[]);this._pauseMutationRequestCount--},r.isSelfClosingTag=function(n,t){return!t&&r.VOID_TAG[n.toLowerCase()]},r.prototype.clearItemIndexCache=function(n,t){if(this._itemVisibleIndexCache=new Map,n)while(n){var i=this._relativeVisibleIndexes.get(n);i&&(i.length=t);t=n.childIndex;n=n.parentItem}else this._relativeVisibleIndexes=new Map},r.prototype.getChildIndexByVisibleIndex=function(n,t){var f,r,u,i,e,o;for(f=n===this._rootItem?t:t-this.getVisibleIndexOfItem(n),r=0,u=n.children.length-1;r<u;)if(i=Math.floor((r+u)/2),e=this.getRelativeVisibleIndex(n,i),o=n.children[i]?n.children[i].visibleRowCount:1,e>f)u=i-1;else if(e+o<=f)r=i+1;else return i;return r},r.prototype.getRelativeVisibleIndex=function(n,t){var r=this._relativeVisibleIndexes.get(n),f,i,e,o,u,s;if(r){if(f=r[t],f!==undefined&&f!==null)return f}else r=[],this._relativeVisibleIndexes.set(n,r);for(i=t;i>=0&&undefined===r[i];)i--;for(i+=1,0===i?e=n===this._rootItem?0:1:(o=n.children[i-1],e=r[i-1]+(o?o.visibleRowCount:1)),u=i;u<=t;u++)s=n.children[u],r[u]=e,e+=s?s.visibleRowCount:1;return r[t]},r.prototype.removeItem=function(n,t){var i,r;if(t===void 0&&(t=!0),n.children)for(i=0;i<n.children.length;i++)r=n.children[i],r&&this.removeItem(r,!1);t&&n.parentItem&&this.removeChildAt(n.parentItem,n.childIndex);delete this._uidToItemMap[n.uid];delete this._uidToClosingItemMap[n.uid];delete this._idToItemMap[n.id]},r.prototype.domMutationHandler=function(t,i){var c=this,r,s,e,u,h,o,f;i===void 0&&(i=!0);r=this.findItemByUid(t.targetUid);switch(t.type){case"DOMCharacterDataModified":r&&(s=r.parentItem,s&&n.GleamingBehaviour.allowGleamingIf(i,s,function(){return s.textPreview=t.parentTextPreview}),e=r.node,e&&(e.textContent=t.newValue,this.fireChange(2,e,e.parent),this.reportInvalidateRowSpan(r)));break;case"DOMNodeRefresh":r&&this.refreshItem(r,i).done(function(){c.fireChange(6,r.node,r.node?r.node.parent:null)});break;case"DOMAttrModified":case"DOMAttributeNameChanged":r&&(u=r.node,u&&(t.attrChange===3?(h=5,u.removeAttribute(t.attrName)):(o=u.getAttributeByName(t.attrName),h=4,o?n.GleamingBehaviour.allowGleamingIf(i,o,function(){return o.value=t.newValue}):o=u.addAttribute({name:t.attrName,value:t.newValue})),this.fireChange(h,u,u.parent,t.attrName),this.reportInvalidateRowSpan(r)));break;case"DOMNodeInserted":f=this.findItemByUid(t.parentUid);f&&(this.insertChild(t.parentUid,t.targetChildIndex,t.targetUid),this.fireChange(0,null,f.node));break;case"DOMNodeRemoved":f=this.findItemByUid(t.parentUid);f&&(this.removeChild(t.parentUid,t.targetChildIndex,t.targetUid),this.fireChange(1,r?r.node:null,f.node));break;case"DOMSubtreeModified":r&&(n.GleamingBehaviour.allowGleaming(r,function(){return r.textPreview=t.textPreview}),this.reportInvalidateRowSpan(r))}},r.prototype.fireChange=function(n,t,i,r){var u=this._changeListeners.slice(0);u.forEach(function(u){return u(n,t,i,r)})},r.prototype.getItemPlaceholder=function(t,i){var r=new n.TreeDataItem(this._capabilities,null,0,t);return r.needsRefresh=!0,r.childIndex=i,t.children[i]=r,this._idToItemMap[r.id]=r,r},r.prototype.handleMutation=function(n){var t=this;this._pauseMutationRequestCount?this._pausedMutationQueue.push(n):n.forEach(function(n){return t.domMutationHandler(n)})},r.prototype.setupMutationListener=function(n){var t=this;return this._remote.addDocumentModifiedListener(n,function(n){return t.handleMutation(n)})},r.prototype.changeVisibleDescendantRowCounts=function(n,t){n&&n.isExpanded?(n.visibleDescendantRowCount+=t,this.changeVisibleDescendantRowCounts(n.parentItem,t)):this.validateTree()},r.prototype.findSibling=function(n){return n.parentItem.children[n.childIndex+1]},r.prototype.updateChildIndexes=function(n){n.children.forEach(function(n,t){n&&(n.childIndex=t)})},r.prototype.getClosingTreeDataItem=function(t){return this._uidToClosingItemMap[t.uid]||(this._uidToClosingItemMap[t.uid]=new n.ClosingTreeDataItem(t)),this._uidToClosingItemMap[t.uid]},r.prototype.hasNextSibling=function(n){return n.parentItem&&n.parentItem.children&&n.parentItem.children.length-1>n.childIndex},r.prototype.reportCountChanged=function(n,t,i){var u,r,f,o,e,s;if(i!==0&&t<=n.children.length){for(u=n.uid==="#root"?0:1,r=0;r<t;r++)f=n.children[r],o=f?f.visibleRowCount:1,u+=o;e=this.getVisibleIndexOfItem(n)+u;s=i>0?{action:0,newStartingIndex:e,newCount:i}:{action:1,oldStartingIndex:e,oldCount:-1*i};this.listChanged.invoke(s)}else t>n.children.length&&F12.Tools.Utility.Assert.failDebugOnly("Reporting count changed for child index beyond parent's child array")},r.prototype.reportInvalidateRowSpan=function(n){var t=this.getVisibleIndexOfItem(n),i;t>=0&&(i={action:0,rowSpanIndexToInvalidate:t},this.listChanged.invoke(i))},r.prototype.validateTree=function(){var f,t,n,e,o,s,r,u;if(F12.DomExplorer.DomExplorerWindow.DEBUG_UID_DISPLAY)for(f=this.count,t=0;t<f;t++)if(n=this.getItemAtVisibleIndex(t),n||i.fail("Unexpected null item at index "+t),e=this.getVisibleIndexOfItem(n),i.areEqual(t,e,"item index"),e<f-1&&(o=this.findNextItem(n),s=this.getVisibleIndexOfItem(o),i.areEqual(t+1,s)),this.validateVisibleRowCount(n),this.validateNodeChildren(n),!n.isClosingTag&&n.children)for(r=0;r<n.children.length;r++)u=n.children[r],u&&(i.areEqual(n.id,u.parentItem.id,"parent item"),i.areEqual(r,u.childIndex,"child index"))},r.prototype.validateVisibleRowCount=function(n){var u=0,t,r;if(n.isExpanded&&n.children)for(t=0;t<n.children.length;t++)r=n.children[t],u+=r?r.visibleRowCount:1;i.areEqual(n.visibleDescendantRowCount,u,"descendant row count")},r.prototype.validateNodeChildren=function(n){var t,r,u;if(n.node)for(i.areEqual(n.node.childUidCount,n.children.length),t=0;t<n.children.length;t++)r=n.children[t],u=n.node.getChild(t),r&&!r.needsRefresh&&i.areEqual(r.uid,u.uid)},r.TAGS_TO_EXPAND=["root","html","body"],r.VOID_TAG={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,menuitem:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},r}();n.SparseDomTree=r})(DomTree||(DomTree={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.isWhitespace=function(t){return t.nodeType!==3?!1:!n.NON_WHITESPACE.test(t.nodeValue)},n.hasImmediateClosingTag=function(t,i){return!i&&n.VOID_TAG[t.toLowerCase()]},n.VOID_TAG={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,menuitem:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},n.NON_WHITESPACE=/\S/,n}();n.RemoteStatic=t})(t=n.Chromium||(n.Chromium={}))})(t=n.DomExplorer||(n.DomExplorer={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t;(function(n){var t=function(){function n(){}return n.isSupported=function(n){return this.SUPPORTED_PROPERTIES.hasOwnProperty(n)},n.isShorthand=function(n){return!!this.SUPPORTED_PROPERTIES[n]},n.getLonghands=function(n){return this.SUPPORTED_PROPERTIES[n]},n.isInheritable=function(n){return this.INHERITABLE_PROPERTIES.indexOf(n)>=0},n.getAllProperties=function(){if(!n.ALL_PROPERTIES){n.ALL_PROPERTIES=[];for(var t in n.SUPPORTED_PROPERTIES)n.ALL_PROPERTIES.push(t)}return n.ALL_PROPERTIES},n.SUPPORTED_PROPERTIES={"-internal-callback":null,"-internal-marquee-direction":null,"-internal-marquee-increment":null,"-internal-marquee-repetition":null,"-internal-marquee-speed":null,"-internal-marquee-style":null,"-webkit-animation":["-webkit-animation-name","-webkit-animation-duration","-webkit-animation-timing-function","-webkit-animation-delay","-webkit-animation-iteration-count","-webkit-animation-direction","-webkit-animation-fill-mode","-webkit-animation-play-state"],"-webkit-animation-delay":null,"-webkit-animation-direction":null,"-webkit-animation-duration":null,"-webkit-animation-fill-mode":null,"-webkit-animation-iteration-count":null,"-webkit-animation-name":null,"-webkit-animation-play-state":null,"-webkit-animation-timing-function":null,"-webkit-app-region":null,"-webkit-appearance":null,"-webkit-aspect-ratio":null,"-webkit-backface-visibility":null,"-webkit-background-clip":null,"-webkit-background-composite":null,"-webkit-background-origin":null,"-webkit-background-size":null,"-webkit-border-after":["-webkit-border-after-width","-webkit-border-after-style","-webkit-border-after-color"],"-webkit-border-after-color":null,"-webkit-border-after-style":null,"-webkit-border-after-width":null,"-webkit-border-before":["-webkit-border-before-width","-webkit-border-before-style","-webkit-border-before-color"],"-webkit-border-before-color":null,"-webkit-border-before-style":null,"-webkit-border-before-width":null,"-webkit-border-end":["-webkit-border-end-width","-webkit-border-end-style","-webkit-border-end-color"],"-webkit-border-end-color":null,"-webkit-border-end-style":null,"-webkit-border-end-width":null,"-webkit-border-fit":null,"-webkit-border-horizontal-spacing":null,"-webkit-border-image":null,"-webkit-border-radius":["border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius"],"-webkit-border-start":["-webkit-border-start-width","-webkit-border-start-style","-webkit-border-start-color"],"-webkit-border-start-color":null,"-webkit-border-start-style":null,"-webkit-border-start-width":null,"-webkit-border-vertical-spacing":null,"-webkit-box-align":null,"-webkit-box-decoration-break":null,"-webkit-box-direction":null,"-webkit-box-flex":null,"-webkit-box-flex-group":null,"-webkit-box-lines":null,"-webkit-box-ordinal-group":null,"-webkit-box-orient":null,"-webkit-box-pack":null,"-webkit-box-reflect":null,"-webkit-box-shadow":null,"-webkit-clip-path":null,"-webkit-column-axis":null,"-webkit-column-break-after":null,"-webkit-column-break-before":null,"-webkit-column-break-inside":null,"-webkit-column-count":null,"-webkit-column-gap":null,"-webkit-column-progression":null,"-webkit-column-rule":["-webkit-column-rule-width","-webkit-column-rule-style","-webkit-column-rule-color"],"-webkit-column-rule-color":null,"-webkit-column-rule-style":null,"-webkit-column-rule-width":null,"-webkit-column-span":null,"-webkit-column-width":null,"-webkit-columns":["-webkit-column-width","-webkit-column-count"],"-webkit-filter":null,"-webkit-font-feature-settings":null,"-webkit-font-size-delta":null,"-webkit-font-smoothing":null,"-webkit-highlight":null,"-webkit-hyphenate-character":null,"-webkit-line-box-contain":null,"-webkit-line-break":null,"-webkit-line-clamp":null,"-webkit-locale":null,"-webkit-logical-height":null,"-webkit-logical-width":null,"-webkit-margin-after":null,"-webkit-margin-after-collapse":null,"-webkit-margin-before":null,"-webkit-margin-before-collapse":null,"-webkit-margin-bottom-collapse":null,"-webkit-margin-collapse":["-webkit-margin-before-collapse","-webkit-margin-after-collapse"],"-webkit-margin-end":null,"-webkit-margin-start":null,"-webkit-margin-top-collapse":null,"-webkit-mask":["-webkit-mask-image","-webkit-mask-position-x","-webkit-mask-position-y","-webkit-mask-size","-webkit-mask-repeat-x","-webkit-mask-repeat-y","-webkit-mask-origin","-webkit-mask-clip"],"-webkit-mask-box-image":["-webkit-mask-box-image-source","-webkit-mask-box-image-slice","-webkit-mask-box-image-width","-webkit-mask-box-image-outset","-webkit-mask-box-image-repeat"],"-webkit-mask-box-image-outset":null,"-webkit-mask-box-image-repeat":null,"-webkit-mask-box-image-slice":null,"-webkit-mask-box-image-source":null,"-webkit-mask-box-image-width":null,"-webkit-mask-clip":null,"-webkit-mask-composite":null,"-webkit-mask-image":null,"-webkit-mask-origin":null,"-webkit-mask-position":["-webkit-mask-position-x","-webkit-mask-position-y"],"-webkit-mask-position-x":null,"-webkit-mask-position-y":null,"-webkit-mask-repeat":["-webkit-mask-repeat-x","-webkit-mask-repeat-y"],"-webkit-mask-repeat-x":null,"-webkit-mask-repeat-y":null,"-webkit-mask-size":null,"-webkit-max-logical-height":null,"-webkit-max-logical-width":null,"-webkit-min-logical-height":null,"-webkit-min-logical-width":null,"-webkit-padding-after":null,"-webkit-padding-before":null,"-webkit-padding-end":null,"-webkit-padding-start":null,"-webkit-perspective":null,"-webkit-perspective-origin":null,"-webkit-perspective-origin-x":null,"-webkit-perspective-origin-y":null,"-webkit-print-color-adjust":null,"-webkit-rtl-ordering":null,"-webkit-ruby-position":null,"-webkit-tap-highlight-color":null,"-webkit-text-combine":null,"-webkit-text-decorations-in-effect":null,"-webkit-text-emphasis":["-webkit-text-emphasis-style","-webkit-text-emphasis-color"],"-webkit-text-emphasis-color":null,"-webkit-text-emphasis-position":null,"-webkit-text-emphasis-style":null,"-webkit-text-fill-color":null,"-webkit-text-orientation":null,"-webkit-text-security":null,"-webkit-text-stroke":["-webkit-text-stroke-width","-webkit-text-stroke-color"],"-webkit-text-stroke-color":null,"-webkit-text-stroke-width":null,"-webkit-transform":null,"-webkit-transform-origin":["-webkit-transform-origin-x","-webkit-transform-origin-y","-webkit-transform-origin-z"],"-webkit-transform-origin-x":null,"-webkit-transform-origin-y":null,"-webkit-transform-origin-z":null,"-webkit-transform-style":null,"-webkit-transition":["-webkit-transition-property","-webkit-transition-duration","-webkit-transition-timing-function","-webkit-transition-delay"],"-webkit-transition-delay":null,"-webkit-transition-duration":null,"-webkit-transition-property":null,"-webkit-transition-timing-function":null,"-webkit-user-drag":null,"-webkit-user-modify":null,"-webkit-user-select":null,"-webkit-wrap-flow":null,"-webkit-wrap-through":null,"-webkit-writing-mode":null,"align-content":null,"align-items":null,"align-self":null,"alignment-baseline":null,animation:["animation-name","animation-duration","animation-timing-function","animation-delay","animation-iteration-count","animation-direction","animation-fill-mode","animation-play-state"],"animation-delay":null,"animation-direction":null,"animation-duration":null,"animation-fill-mode":null,"animation-iteration-count":null,"animation-name":null,"animation-play-state":null,"animation-timing-function":null,background:["background-image","background-position-x","background-position-y","background-size","background-repeat-x","background-repeat-y","background-attachment","background-origin","background-clip","background-color"],"background-attachment":null,"background-blend-mode":null,"background-clip":null,"background-color":null,"background-image":null,"background-origin":null,"background-position":["background-position-x","background-position-y"],"background-position-x":null,"background-position-y":null,"background-repeat":["background-repeat-x","background-repeat-y"],"background-repeat-x":null,"background-repeat-y":null,"background-size":null,"baseline-shift":null,border:["border-top-color","border-top-style","border-top-width","border-right-color","border-right-style","border-right-width","border-bottom-color","border-bottom-style","border-bottom-width","border-left-color","border-left-style","border-left-width"],"border-bottom":["border-bottom-width","border-bottom-style","border-bottom-color"],"border-bottom-color":null,"border-bottom-left-radius":null,"border-bottom-right-radius":null,"border-bottom-style":null,"border-bottom-width":null,"border-collapse":null,"border-color":["border-top-color","border-right-color","border-bottom-color","border-left-color"],"border-image":["border-image-source","border-image-slice","border-image-width","border-image-outset","border-image-repeat"],"border-image-outset":null,"border-image-repeat":null,"border-image-slice":null,"border-image-source":null,"border-image-width":null,"border-left":["border-left-width","border-left-style","border-left-color"],"border-left-color":null,"border-left-style":null,"border-left-width":null,"border-radius":["border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius"],"border-right":["border-right-width","border-right-style","border-right-color"],"border-right-color":null,"border-right-style":null,"border-right-width":null,"border-spacing":["-webkit-border-horizontal-spacing","-webkit-border-vertical-spacing"],"border-style":["border-top-style","border-right-style","border-bottom-style","border-left-style"],"border-top":["border-top-width","border-top-style","border-top-color"],"border-top-color":null,"border-top-left-radius":null,"border-top-right-radius":null,"border-top-style":null,"border-top-width":null,"border-width":["border-top-width","border-right-width","border-bottom-width","border-left-width"],bottom:null,"box-shadow":null,"box-sizing":null,"buffered-rendering":null,"caption-side":null,clear:null,clip:null,"clip-path":null,"clip-rule":null,color:null,"color-interpolation":null,"color-interpolation-filters":null,"color-profile":null,"color-rendering":null,"column-fill":null,content:null,"counter-increment":null,"counter-reset":null,cursor:null,direction:null,display:null,"dominant-baseline":null,"empty-cells":null,"enable-background":null,fill:null,"fill-opacity":null,"fill-rule":null,filter:null,flex:["flex-grow","flex-shrink","flex-basis"],"flex-basis":null,"flex-direction":null,"flex-flow":["flex-direction","flex-wrap"],"flex-grow":null,"flex-shrink":null,"flex-wrap":null,float:null,"flood-color":null,"flood-opacity":null,font:["font-family","font-size","font-style","font-variant","font-weight","line-height"],"font-family":null,"font-kerning":null,"font-size":null,"font-stretch":null,"font-style":null,"font-variant":null,"font-variant-ligatures":null,"font-weight":null,"glyph-orientation-horizontal":null,"glyph-orientation-vertical":null,"grid-area":["grid-row-start","grid-column-start","grid-row-end","grid-column-end"],"grid-auto-columns":null,"grid-auto-flow":null,"grid-auto-rows":null,"grid-column":["grid-column-start","grid-column-end"],"grid-column-end":null,"grid-column-start":null,"grid-row":["grid-row-start","grid-row-end"],"grid-row-end":null,"grid-row-start":null,"grid-template-areas":null,"grid-template-columns":null,"grid-template-rows":null,height:["min-height","max-height"],"image-rendering":null,isolation:null,"justify-content":null,"justify-self":null,kerning:null,left:null,"letter-spacing":null,"lighting-color":null,"line-height":null,"list-style":["list-style-type","list-style-position","list-style-image"],"list-style-image":null,"list-style-position":null,"list-style-type":null,margin:["margin-top","margin-right","margin-bottom","margin-left"],"margin-bottom":null,"margin-left":null,"margin-right":null,"margin-top":null,marker:["marker-start","marker-mid","marker-end"],"marker-end":null,"marker-mid":null,"marker-start":null,mask:null,"mask-source-type":null,"mask-type":null,"max-height":null,"max-width":null,"max-zoom":null,"min-height":null,"min-width":null,"min-zoom":null,"mix-blend-mode":null,"object-fit":null,"object-position":null,opacity:null,order:null,orientation:null,orphans:null,outline:["outline-color","outline-style","outline-width"],"outline-color":null,"outline-offset":null,"outline-style":null,"outline-width":null,overflow:["overflow-x","overflow-y"],"overflow-wrap":null,"overflow-x":null,"overflow-y":null,padding:["padding-top","padding-right","padding-bottom","padding-left"],"padding-bottom":null,"padding-left":null,"padding-right":null,"padding-top":null,page:null,"page-break-after":null,"page-break-before":null,"page-break-inside":null,"paint-order":null,"pointer-events":null,position:null,quotes:null,resize:null,right:null,"scroll-behavior":null,"shape-image-threshold":null,"shape-inside":null,"shape-margin":null,"shape-outside":null,"shape-padding":null,"shape-rendering":null,size:null,speak:null,src:null,"stop-color":null,"stop-opacity":null,stroke:null,"stroke-dasharray":null,"stroke-dashoffset":null,"stroke-linecap":null,"stroke-linejoin":null,"stroke-miterlimit":null,"stroke-opacity":null,"stroke-width":null,"tab-size":null,"table-layout":null,"text-align":null,"text-align-last":null,"text-anchor":null,"text-decoration":["text-decoration-line","text-decoration-style","text-decoration-color"],"text-decoration-color":null,"text-decoration-line":null,"text-decoration-style":null,"text-indent":null,"text-justify":null,"text-line-through-color":null,"text-line-through-mode":null,"text-line-through-style":null,"text-line-through-width":null,"text-overflow":null,"text-overline-color":null,"text-overline-mode":null,"text-overline-style":null,"text-overline-width":null,"text-rendering":null,"text-shadow":null,"text-transform":null,"text-underline-color":null,"text-underline-mode":null,"text-underline-position":null,"text-underline-style":null,"text-underline-width":null,top:null,"touch-action":null,"touch-action-delay":null,transition:["transition-property","transition-duration","transition-timing-function","transition-delay"],"transition-delay":null,"transition-duration":null,"transition-property":null,"transition-timing-function":null,"unicode-bidi":null,"unicode-range":null,"user-zoom":null,"vector-effect":null,"vertical-align":null,visibility:null,"white-space":null,widows:null,width:["min-width","max-width"],"word-break":null,"word-spacing":null,"word-wrap":null,"writing-mode":null,"z-index":null,zoom:null},n.INHERITABLE_PROPERTIES=["azimuth","border-collapse","border-spacing","caption-side","color","cursor","direction","elevation","empty-cells","font-family","font-size","font-style","font-variant","font-weight","font","letter-spacing","line-height","list-style-image","list-style-position","list-style-type","list-style","orphans","pitch-range","pitch","quotes","resize","richness","speak-header","speak-numeral","speak-punctuation","speak","speech-rate","stress","text-align","text-indent","text-transform","text-shadow","visibility","voice-family","volume","white-space","widows","word-spacing","zoom"],n}();n.Properties=t})(t=n.Chromium||(n.Chromium={}))})(t=n.DomExplorer||(n.DomExplorer={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(t){this._remoteDebug=t;this._remoteDebug.page.enable();this._remoteDebug.dom.enable().done(function(){},function(){});this._tree=new n.Tree(this._remoteDebug.dom,this._remoteDebug.inspect,this._remoteDebug.runtime,this._remoteDebug.page);this._styles=new n.Styles(this._remoteDebug.dom,this._remoteDebug.css,this._tree)}return i.convertNodeIdToUid=function(n){return i.UID_LEADER+n},i.convertUidToNodeId=function(n){return parseInt(n.substr(i.UID_LEADER.length),10)},i.prototype.abortPaletteCollection=function(){return null},i.prototype.addElement=function(){return t.Promise.wrap(!1)},i.prototype.addDocumentModifiedListener=function(n,i){return this._tree.mutationCallback=i,t.Promise.as(0)},i.prototype.allowProcessToTakeForeground=function(){return t.Promise.as(0)},i.prototype.attachMediaQueryEvents=function(n){return this._styles.onStyleChangeCallback=n,t.Promise.as(0)},i.prototype.cancelSelectElementByClick=function(){return this._tree.setSelectElementByClick(null),t.Promise.as(0)},i.prototype.clearCurrentEventProxy=function(){return t.Promise.as(0)},i.prototype.clearStyleCache=function(){return t.Promise.as(0)},i.prototype.collectEvents=function(){return t.Promise.as(0)},i.prototype.copyElementWithStyle=function(){return t.Promise.wrap("")},i.prototype.deleteElement=function(n){var r=this;return new t.Promise(function(t){r._tree.deleteNode(i.convertUidToNodeId(n),t)})},i.prototype.disableEditChaining=function(){return this._tree.setEditChainMode(!1),t.Promise.as(0)},i.prototype.editAttribute=function(n,r,u){var f=this;return new t.Promise(function(t){f._tree.setAttribute(i.convertUidToNodeId(n),r,u,t)})},i.prototype.editStylePropertyAdd=function(n,i,r,u,f){var e=this;return new t.Promise(function(t){e._styles.addProperty(n,i,r,u,f,t)})},i.prototype.editStylePropertyEnable=function(n,i){var r=this;return new t.Promise(function(t){r._styles.enableProperty(n,i,t)})},i.prototype.editStylePropertyName=function(n,i){var r=this;return new t.Promise(function(t){r._styles.setPropertyName(n,i,t)})},i.prototype.editStylePropertyValue=function(n,i,r){var u=this;return new t.Promise(function(t){u._styles.setPropertyValue(n,i,r,t)})},i.prototype.editStyleRuleAdd=function(n,i,r,u,f){var e=this;return new t.Promise(function(t){e._styles.addRule(n,i,r,u,f,t)})},i.prototype.editStyleRuleRemove=function(n){return t.Promise.wrap(this._styles.getRule(n))},i.prototype.editStyleRuleSelector=function(n,i){var r=this;return new t.Promise(function(t){r._styles.setRuleSelector(n,i,t)})},i.prototype.editText=function(n,r){var u=this;return new t.Promise(function(t){u._tree.setText(i.convertUidToNodeId(n),r,t)})},i.prototype.enableEditChaining=function(){return this._tree.setEditChainMode(!0),t.Promise.as(0)},i.prototype.endSingleEdit=function(){return this._tree.setSingleEditMode(!1),t.Promise.as(0)},i.prototype.findTerm=function(n,i,r){var u=this;return new t.Promise(function(t){u._tree.search(n,i,r,t)})},i.prototype.getBulkChildNodesDetails=function(n,i){var r=this;t.Promise.join(n.map(function(n){return new t.Promise(function(t){r._tree.getChildren(n.parentUid,function(i){i=i||[];var u=n.childIndexes.map(function(n){return i[n]}).filter(function(n){return!!n}),f=i.filter(function(t){return-1!==n.childUids.indexOf(t.uid)}),r=u.concat(f);r.forEach(function(t){return t.parentUid=n.parentUid});t({parentUid:n.parentUid,childNodesDetails:r})})})})).done(i)},i.prototype.getChangedStyles=function(){return t.Promise.wrap([])},i.prototype.getComputedBox=function(n){var i=this;return new t.Promise(function(t){i._styles.getComputed(n,t)})},i.prototype.getComputedStyles=function(n){var i=this;return new t.Promise(function(t){i._styles.getComputed(n,function(n){return t([n])})})},i.prototype.getCssClassesUsedInCurrentDocument=function(){return t.Promise.wrap([])},i.prototype.getLoadDocumentData=function(){return t.Promise.wrap(null)},i.prototype.getDomNodeDetails=function(n){var i=this;return new t.Promise(function(t){t(i._tree.getNodeDetails(n))})},i.prototype.getDomNodesDetails=function(n){var i=this;return new t.Promise(function(t){var r=[];n.forEach(function(n){r.push(i._tree.getNodeDetails(n))});t(r)})},i.prototype.getHTMLString=function(n){var r=this;return new t.Promise(function(t){r._tree.getHTML(i.convertUidToNodeId(n),t)})},i.prototype.getHWND=function(){return t.Promise.wrap(0)},i.prototype.getParentChainForElement=function(n){var i=this;return new t.Promise(function(t){t(i._tree.getChainFromRootToNode(i._tree.getNode(n)))})},i.prototype.getParentChainForSelectedElement=function(){var n=this;return new t.Promise(function(t){t(n._tree.getChainFromRootToNode(n._tree.getSelectedElement()))})},i.prototype.getSelectedElement=function(){var n=this;return new t.Promise(function(t){t(n._tree.getSelectedElement().uid)})},i.prototype.getParentChainForStyle=function(){return t.Promise.wrap([])},i.prototype.getPseudoStyling=function(n,i){var r=this._styles.getPseudoStates(n),u=r&&r.indexOf(i)>=0;return t.Promise.wrap(u)},i.prototype.getRootElement=function(){var n=this;return new t.Promise(function(t){n._remoteDebug.css.enable().done(function(){n._tree.getDocumentRoot(t)})})},i.prototype.getStyles=function(n){var i=this;return new t.Promise(function(t){i._styles.getAppliedStyles(n,t)})},i.prototype.getTargetEngineKind=function(){return 2},i.prototype.getWinningProperty=function(n){return t.Promise.wrap(this._styles.calculateWinningProperty(n))},i.prototype.hideHoverItem=function(){return this._tree.setHighlight(),t.Promise.as(0)},i.prototype.hoverItem=function(n){var r=this._tree.setHighlight(i.convertUidToNodeId(n));return t.Promise.wrap(r)},i.prototype.initializeHost=function(){return t.Promise.as(0)},i.prototype.inspectElementById=function(n){var i=this;return new t.Promise(function(t){i._tree.inspectElementById(n,t)})},i.prototype.performNextEdit=function(){return this._tree.redo(),t.Promise.as(0)},i.prototype.querySelector=function(n,r,u){var f=this;return new t.Promise(function(t){var e;u&&(e=f._tree.getFrameRootId(n))&&(n=e);f._tree.querySelector(i.convertUidToNodeId(n),r,function(n){n?t(i.convertNodeIdToUid(n)):t(null)})})},i.prototype.removeAttribute=function(n,r){var u=this;return new t.Promise(function(t){u._tree.deleteAttribute(i.convertUidToNodeId(n),r,t)})},i.prototype.removeStyleProperty=function(n){var i=this;return new t.Promise(function(t){i._styles.deleteProperty(n,function(){return t(null)})})},i.prototype.reparentNode=function(n,i,r){var u=this;return new t.Promise(function(t){u._tree.reparent(n,i,r,t)})},i.prototype.replaceElement=function(n,r){var u=this;return new t.Promise(function(t){u._tree.setHTML(i.convertUidToNodeId(n),r,t)})},i.prototype.revertProperty=function(){return t.Promise.wrap(null)},i.prototype.revertRule=function(){return t.Promise.wrap(null)},i.prototype.runPaletteCollection=function(){return null},i.prototype.selectElement=function(){return t.Promise.as(null)},i.prototype.selectElementByClick=function(n){return this._tree.setSelectElementByClick(n),t.Promise.as(null)},i.prototype.setKeyBindCallbacks=function(n,i,r,u){return this._tree.expandToRemoteSelectedElementCallback=u,t.Promise.as(null)},i.prototype.setPseudoStyling=function(n,i,r){var u=this;return new t.Promise(function(t){u._styles.setPseudoStates(n,i,r,t)})},i.prototype.setTestEditCallbacks=function(n,i){return this._tree.setTestEditCallbacks(n,i),t.Promise.as(0)},i.prototype.startSingleEdit=function(){return this._tree.setSingleEditMode(!0),t.Promise.as(0)},i.prototype.storeElementForConsole=function(n){return this._tree.setSelectedElement(this._tree.getNode(n)),this._remoteDebug.console.addInspectedNode(i.convertUidToNodeId(n))},i.prototype.takeForeground=function(){return t.Promise.wrap(!1)},i.prototype.undoLastEdit=function(){return this._tree.undo(),t.Promise.as(0)},i.UID_LEADER="uid",i}();n.RemoteDom=i})(t=n.Chromium||(n.Chromium={}))})(t=n.DomExplorer||(n.DomExplorer={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function t(n,t,i){this._css=t;this._tree=i;this._inspectorStyleSheets=[];this._nextUniqueLonghandId=0;this._newRuleOrdinals={};this._ordinalsPerStyleSheetId={};this._propertyCache={};this._pseudoClasses={};this._rangeCache={};this._ruleCache={};this._stylesheetCache={};n.onDocumentUpdated(this.onDocumentUpdated.bind(this));this._css.onStyleSheetAdded(this.onStyleSheetAdded.bind(this));this._css.onStyleSheetChanged(this.onStyleSheetChanged.bind(this));this._css.onStyleSheetRemoved(this.onStyleSheetRemoved.bind(this));this._tree.inlineStyleChangedCallback=this.onInlineStyleChanged.bind(this)}return t.prototype.addProperty=function(n,t,i,r,u,f){for(var h=this,e=this._ruleCache[n],o=u?this.convertIdToIndex(u):e.properties.length,l=this.convertStyleIdToUid(n,o),c=[],s=o;s<e.properties.length;s++)c.push(e.properties[s].uid);this.editProperty(l,t,i,r,!0,!0,function(n){var t,i,r,u;if(n&&(n.wasCreatedInSession=!0,h.onStyleChangeCallback)){for(t=[],i=e.properties.length-1;i>=o+1;i--)r=e.properties[i],u=c.pop(),t.push({event:"updatePropertyUid",uid:u,obj:r});if(t.length)h.onStyleChangeCallback(t)}f(n)})},t.prototype.addRule=function(t,i,r,u,f,e){var o=this,s=function(n){var s,f,h,c;o.checkStyleId(n.style,o._newRuleOrdinals);s=o.getSelectorInfo(n);f=o.convertInRule(o._tree.getSelectedElementContext(),n.style.styleId,n.media,n.style,t,null,0,0,!1,!1,1,s.range,!0);f.wasCreatedInSession=!0;h=f.uid;c=o.convertStyleIdToUid(h,0);o._currentRules.splice(1,0,f);o.editProperty(c,i,r,u,!0,!0,function(){o._addRuleStyleSheetId=null;e(f)})},h=function(n){o._css.getStyleSheetText(n).done(function(i){var r=(i.match(/\n/g)||[]).length,u={startLine:r,endLine:r,startColumn:0,endColumn:0};o._css.addRuleByText(n,"\n"+t+" {\n}\n",u).done(s,function(){o._addRuleStyleSheetId=null;e(null)})})};this._css.addRule(n.RemoteDom.convertUidToNodeId(this._tree.getSelectedElementContext().uid),t).done(s,function(){o._tree.getFrameIdForSelectedElement(function(n){o._css.createStyleSheet(n).done(function(n){o._addRuleStyleSheetId=n;o._css.addRuleByStyleSheetId(n,t).done(s,function(){return h(n)})})})})},t.prototype.calculateWinningProperty=function(n){var r,s=0,f,u,e,t,o,i;if(this._currentRules)for(f=0;f<this._currentRules.length;f++){if(u=this._currentRules[f],r&&u.level>s)return r;for(e=u.properties.length-1;e>=0;e--)if(t=u.properties[e],t.longhand&&t.longhand.length){for(o=0;o<t.longhand.length;o++)if(i=t.longhand[o],i.current.name===n&&i.current.isEnabled&&!i.isDeleted&&i.status===Dom.ElementStyleModel.VALID_STATUS){if(i.current.isImportant)return i.uid;r||(r=i.uid,s=u.level)}}else if(t.current.name===n&&t.current.isEnabled&&!t.isDeleted&&t.status===Dom.ElementStyleModel.VALID_STATUS){if(t.current.isImportant)return t.uid;r||(r=t.uid,s=u.level)}}return r},t.prototype.deleteProperty=function(n,t){for(var r=this,e=this._propertyCache[n],u=this.convertPropertyIdToRuleId(n),i=this._ruleCache[u],o=this.convertIdToIndex(n),s=[],h=i.properties.length-1,f=o+1;f<i.properties.length;f++)s.push(i.properties[f].uid);this.editProperty(n,"","",!1,!1,!1,function(){var f,c,l,a;if(i.properties.length===h&&(delete r._propertyCache[r.convertStyleIdToUid(u,i.properties.length)],r.onStyleChangeCallback)){for(f=[],e.uid=r.convertStyleIdToUid(u,-1),f.push({event:"updatePropertyUid",uid:n,obj:e}),c=o;c<i.properties.length;c++)l=i.properties[c],a=s.shift(),f.push({event:"updatePropertyUid",uid:a,obj:l});if(f.length)r.onStyleChangeCallback(f)}t()})},t.prototype.enableProperty=function(n,t,i){var o=this,r=this._propertyCache[n],u,f,e;r?(u=r.current,u.isEnabled===t?i():(f=this.convertIdToStyleId(r.uid),e=this.convertIdToIndex(r.uid),this._css.toggleProperty(f,e,!t).done(i,function(){o.editProperty(r.uid,u.name,u.value,u.isImportant,t,!1,function(){i()})}))):i()},t.prototype.getComputed=function(t,i){this._css.getComputedStyleForNode(n.RemoteDom.convertUidToNodeId(t)).done(function(n){var t={};n.forEach(function(n){t[n.name]=n.value});i(t)})},t.prototype.getPseudoStates=function(n){return this._pseudoClasses[n]},t.prototype.getRule=function(n){return this._ruleCache[n]},t.prototype.getAppliedStyles=function(t,i){var r=this,u=n.RemoteDom.convertUidToNodeId(t);this._currentRules=null;this.getCurrentStyles(t,null,!0,function(n){r._currentRules=n;r.updateWinningProperties();i(n)})},t.prototype.setPropertyName=function(n,t,i){var u=this._propertyCache[n],r=u.current;r.name===t?i(u):this.editProperty(u.uid,t,r.value,r.isImportant,r.isEnabled,!1,function(n){i(n)})},t.prototype.setPseudoStates=function(t,i,r,u){var f=this._pseudoClasses[t],e=f&&f.indexOf(i);r!==e>=0?(f||(this._pseudoClasses[t]=f=[]),r?f.push(i):f.splice(e,1),this._css.forcePseudoState(n.RemoteDom.convertUidToNodeId(t),f).done(u)):u()},t.prototype.setPropertyValue=function(n,t,i,r){var f=this._propertyCache[n],u=f.current;u.value===t&&u.isImportant===i?r(f):this.editProperty(f.uid,u.name,t,i,u.isEnabled,!1,function(n){r(n)})},t.prototype.setRuleSelector=function(n,t,i){var r=this,u=function(t){var f=r._ruleCache[n],o=f.level,u,e;if(t.style.styleId||(t.style.styleId=r.convertIdToStyleId(f.uid)),u=r.getSelectorInfo(t),e=r.convertInRule(r._tree.getSelectedElementContext(),t.style.styleId,t.media,t.style,u.selector,t.sourceURL,u.startLine,u.startColumn,f.isInherited,f.isInlined,o,u.range),r._tree.setUndoState(),i(e),r.onStyleChangeCallback)r.onStyleChangeCallback(null)},f=this.convertIdToStyleId(n);if(this._editUsingRange){var s=this._ruleCache[n],e=f.styleSheetId,o=this._rangeCache[n];this._css.setRuleSelectorByRange(e,o,t).done(u,function(){return i(null)})}else this._css.setRuleSelector(f,t).done(u,function(){return i(null)})},t.prototype.onDocumentUpdated=function(){this._ordinalsPerStyleSheetId={};this._propertyCache={};this._ruleCache={};this._rangeCache={};this._stylesheetCache={};this._newRuleOrdinals={};this._inspectorStyleSheets=[];this._currentRules=null},t.prototype.checkStyleId=function(n,t){if(!n.styleId){var i=t[n.styleSheetId];i===undefined?i=0:i++;t[n.styleSheetId]=i;n.styleId={styleSheetId:n.styleSheetId,ordinal:i}}},t.prototype.assignStyleIdsAsNeeded=function(n,t){var r=this,i=[];n.matchedCSSRules.forEach(function(n){r.isEditableRule(n.rule)&&i.push(n.rule)});n.inherited.forEach(function(n){n.matchedCSSRules.forEach(function(n){r.isEditableRule(n.rule)&&i.push(n.rule)})});i.sort(function(n,t){if(n.styleSheetId!==t.styleSheetId)return n.styleSheetId>t.styleSheetId?1:-1;var i=n.style.range,r=t.style.range;return!i||!r?0:i.startLine!==r.startLine?i.startLine-r.startLine:i.startColumn-r.startColumn});i.forEach(function(n){r.checkStyleId(n.style,t)})},t.prototype.getCurrentStyles=function(t,i,r,u){var f=this,e=n.RemoteDom.convertUidToNodeId(t);r&&(this._rangeCache={});this._css.getInlineStylesForNode(e).done(function(n){var s,o,h,c;if(f._editUsingRange=!n.styleId,s=f._tree.getNode(t),f.checkStyleId(n,f._ordinalsPerStyleSheetId),o=f.convertInRule(s,n.styleId,null,n,null,null,0,0,!1,!0,c,null,r),i===n.styleId.styleSheetId){u([o]);return}h=[];i||h.push(o);c=0;f._css.getMatchedStylesForNode(e,!0).done(function(t){var e,l;for(f._editUsingRange&&f.assignStyleIdsAsNeeded(t,f._ordinalsPerStyleSheetId),f.convertInMatchedRules(s,i,t.matchedCSSRules,!1,h,c,r,f._ordinalsPerStyleSheetId),c++,e=0;e<t.inherited.length;e++){if(l=t.inherited[e],s=s.parent,n=l.inlineStyle,n&&(f.checkStyleId(n,f._ordinalsPerStyleSheetId),o=f.convertInRule(s,n.styleId,null,n,null,null,0,0,!0,!0,c,null,r),f.ruleContainsAppliedProperties(o)||!r&&f.findRuleInCurrentRules(o.uid)>=0)){if(i===n.styleId.styleSheetId){u([o]);return}h.push(o)}l.matchedCSSRules&&f.convertInMatchedRules(s,i,l.matchedCSSRules,!0,h,c,r,f._ordinalsPerStyleSheetId)}u(h)})})},t.prototype.onStyleSheetAdded=function(n){this._stylesheetCache[n.styleSheetId]=n;n.origin==="inspector"?this._inspectorStyleSheets.push(n.styleSheetId):this.updateRulesForChangedStyleSheet(n.styleSheetId)},t.prototype.onStyleSheetChanged=function(n){this._addRuleStyleSheetId!==n&&this.updateRulesForChangedStyleSheet(n)},t.prototype.onStyleSheetRemoved=function(n){var i=this._stylesheetCache[n],t;i&&(t=this._inspectorStyleSheets.indexOf(n),t>=0&&this._inspectorStyleSheets.splice(t,1),delete this._stylesheetCache[n]);this.updateRulesForChangedStyleSheet(n)},t.prototype.updateRulesForChangedStyleSheet=function(n){var t=this;this._currentRules&&this.onStyleChangeCallback&&this.getCurrentStyles(this._tree.getSelectedElementContext().uid,n,!1,function(i){var u,r,f,e;if(t._currentRules){for(u=[],r=0;r<t._currentRules.length;r++)f=t._currentRules[r],e=t.convertIdToStyleId(f.uid),e.styleSheetId===n&&u.push({index:r,rule:f});(u.length||i.length)&&t.determineStyleChanges(u,i)}})},t.prototype.onInlineStyleChanged=function(t){var i=this,r=this._tree.getNode(n.RemoteDom.convertNodeIdToUid(t));r&&this._css.getInlineStylesForNode(t).done(function(n){var f,t,u,e;i.checkStyleId(n,{});f=i.convertStyleIdToUid(n.styleId);t=i.findRuleInCurrentRules(f);t>=0&&(u=i._currentRules[t],e=i.convertInRule(r,n.styleId,null,n,null,null,0,0,!1,!0,u.level,null,!1),i.determineStyleChanges([{index:t,rule:u}],[e]))})},t.prototype.determineStyleChanges=function(n,t){var u,i,r;if(n.length===t.length)for(u=[],i=0;i<t.length;i++)r=n[i],this.determineRuleChanges(r.index,r.rule,t[i],u);else if(!t.length)for(u=[],i=0;i<n.length;i++)r=n[i],r.rule.wasCreatedInSession||(u.push({event:"removeRule",uid:r.rule.uid,isDynamic:!0}),this.removeRuleFromCache(r.rule));this.onStyleChangeCallback(u)},t.prototype.determineRuleChanges=function(n,t,i,r){var f=t.properties.length,e=i.properties.length,o,u;if(f!==e){for(o=Math.min(f,e),u=0;u<o;u++)r.push({event:"updateProperty",uid:t.properties[u].uid,obj:i.properties[u],isDynamic:!0});if(f>e)for(u=e;u<f;u++)r.push({event:"removeProperty",uid:t.properties[u].uid,isDynamic:!0});else for(u=f;u<e;u++)r.push({event:"addProperty",uid:t.uid,obj:i.properties[u],isDynamic:!0})}r.push({event:"updateRule",uid:t.uid,obj:i,isDynamic:!0});this.removeRuleFromCache(t);this.addNewRuleToCache(i,n)},t.prototype.removeRuleFromCache=function(n){var t=this;delete this._ruleCache[n.uid];n.properties.forEach(function(n){delete t._propertyCache[n.uid]})},t.prototype.addNewRuleToCache=function(n,t){var i=this;this._currentRules[t]=n;this._ruleCache[n.uid]=n;n.properties.forEach(function(n){i._propertyCache[n.uid]=n})},t.prototype.getSelectorInfo=function(n){var i=n.selectorList,t=i.range||i.selectors[0].range;return{selector:i.text,startLine:t?t.startLine:0,startColumn:t?t.startColumn:0,range:t}},t.prototype.ruleContainsAppliedProperties=function(n){for(var t=0;t<n.properties.length;t++)if(n.properties[t].isApplied)return!0;return!1},t.prototype.findRuleInCurrentRules=function(n){if(this._currentRules)for(var t=0;t<this._currentRules.length;t++)if(this._currentRules[t].uid===n)return t;return-1},t.prototype.rangesAreEqual=function(n,t){return n&&t&&n.startLine===t.startLine&&n.startColumn===t.startColumn&&n.endLine===t.endLine&&n.endColumn===t.endColumn},t.prototype.convertInMatchedRules=function(n,t,i,r,u,f,e){for(var o,v,h,y,p,a,c=i.length-1;c>=0;c--)if(o=i[c].rule,this.isEditableRule(o)){var l=o.ruleId||o.style.styleId,w=this.convertStyleIdToUid(l),s=this.getSelectorInfo(o);if(!t||t===l.styleSheetId){for(v=!1,h=u.length-1;h>=0;h--)if(y=this._rangeCache[u[h].uid],p=this.convertIdToStyleId(u[h].uid),l.styleSheetId===p.styleSheetId&&(u[h].uid===w||this.rangesAreEqual(y,s.range))){v=!0;break}v||(a=this.convertInRule(n,l,o.media,o.style,s.selector,o.sourceURL,s.startLine,s.startColumn,r,!s.selector,f,s.range,e),(o.origin==="inspector"||this.ruleContainsAppliedProperties(a)||!e&&this.findRuleInCurrentRules(a.uid)>=0)&&u.push(a))}}},t.prototype.isEditableRule=function(n){return this._editUsingRange?n.origin==="inspector"||n.origin==="regular":!!n.ruleId},t.prototype.convertInRule=function(n,t,i,r,u,f,e,o,s,h,c,l,a){var b,v;a===void 0&&(a=!0);var y=this.convertStyleIdToUid(t),w=this.convertInProperties(r.styleSheetId,r.cssProperties,r.shorthandEntries,y,s),p=this._stylesheetCache[t.styleSheetId];return p&&(p.isInline&&(e===0&&(o+=p.startColumn),e+=p.startLine),f||(f=p.sourceURL)),i&&(b=(i[0].source==="mediaRule"?"@":"")+"media "+i[0].text),v=a?this._ruleCache[y]:null,v?(v.selector=u,v.uid=y,v.properties=w,v.isInherited=s,v.level=c):(v={declarationLocation:f?{uri:f,line:e,column:o}:null,isDeleted:!1,isInherited:s,isInlined:h,level:c,originalSelector:null,parent:b,properties:w,selector:u,styleHref:f,target:{description:this._tree.getNodeDescription(n),uid:n.uid},uid:y,wasCreatedInSession:!1},a&&(this._ruleCache[y]=v)),l&&(this._rangeCache[y]=l),v},t.prototype.convertInProperties=function(t,i,r,u,f){var p=u+"/",k=p.length,v,c,e,o,s,h,l,w,b,a,y;for(v in this._rangeCache)v.substr(0,k)===p&&delete this._rangeCache[v];if(c=[],i&&i.length){for(o=0;o<i.length;o++)s=i[o],s.text&&(h=this.convertStyleIdToUid(u,o),e=this.convertInProperty(s,h),c.push(e),this._propertyCache[h]=e,this._rangeCache[h]=s.range,f&&!n.Properties.isInheritable(e.current.name)&&(e.isApplied=!1));for(o=0;o<c.length;o++)if(e=c[o],l=e.current.name,w=this.findShorthandEntry(r,l),e.current.isEnabled&&n.Properties.isShorthand(l)&&w)for(e.longhand=[],b=n.Properties.getLonghands(l),a=0;a<i.length;a++)s=i[a],b.indexOf(s.name)>=0&&(h=n.RemoteDom.UID_LEADER+this._nextUniqueLonghandId++,y=this.convertInProperty(s,h),y.current.isEnabled=!0,e.longhand.push(y))}return c},t.prototype.findShorthandEntry=function(n,t){for(var r,i=0;i<n.length;i++)if(r=n[i],r.name===t)return r;return null},t.prototype.convertValuetoValueAndPriority=function(n){var t=!1;return n.substr(n.length-10)==="!important"&&(t=!0,n=n.substr(0,n.length-10),n.substr(n.length-1)===" "&&(n=n.substr(0,n.length-1))),{value:n,isImportant:t}},t.prototype.convertInProperty=function(t,i){var r=this.convertValuetoValueAndPriority(t.value),u={name:t.name,value:r.value,isImportant:r.isImportant,isEnabled:t.hasOwnProperty("disabled")?!t.disabled:t.status!=="disabled"};return{current:u,uid:i,isApplied:!0,isWinning:!0,status:t.parsedOk===!1?n.Properties.isSupported(t.name)?Dom.ElementStyleModel.INVALID_VALUE_STATUS:Dom.ElementStyleModel.UNRECOGNIZED_STATUS:Dom.ElementStyleModel.VALID_STATUS,longhand:[],wasCreatedInSession:!1,isDeleted:!1,original:null,originalLonghand:null}},t.prototype.convertIdToStyleId=function(n){var t=n.split("/");return{styleSheetId:t[0],ordinal:parseInt(t[1],10)}},t.prototype.convertIdToIndex=function(n){var t=n.split("/");return parseInt(t[2],10)},t.prototype.convertPropertyIdToRuleId=function(n){var t=n.split("/");return t.pop(),t.join("/")},t.prototype.convertStyleIdToUid=function(n,t){var i;return i=typeof n=="string"?n:n.styleSheetId+"/"+n.ordinal,typeof t!="undefined"&&(i+="/"+t),i},t.prototype.editProperty=function(n,t,i,r,u,f,e){var s=this,l=this.convertIdToStyleId(n),a=this.convertIdToIndex(n),o="",h,c;t&&(o=t+": "+i,r&&(o+=" !important"),o+=";",u||(o="/* "+o+" */"));h=function(n){var t;s._tree.setUndoState();var i=s.convertStyleIdToUid(l),r=s._ruleCache[i],u=s.convertInProperties(n.styleSheetId,n.cssProperties,n.shorthandEntries,i,r.isInherited);r.properties=u;o&&(t=u[a]);e(t)};this._editUsingRange?(c=this.convertIdToStyleId(n).styleSheetId,this.getEditRange(n,c,f,function(n){s._css.setPropertyTextByRange(c,n,o).done(h,function(){return e(null)})})):this._css.setPropertyText(l,a,o,!f).done(h,function(){return e(null)})},t.prototype.getEditRange=function(n,t,i,r){var u=this._rangeCache[n],s,f,h,e,o;if(u&&!i){r(u);return}if(u){r({startLine:u.startLine,startColumn:u.startColumn,endLine:u.startLine,endColumn:u.startColumn});return}if(s=this.convertPropertyIdToRuleId(n),f=this._ruleCache[s],f.properties.length){h=f.properties[f.properties.length-1];e=this._rangeCache[h.uid];r({startLine:e.endLine,startColumn:e.endColumn,endLine:e.endLine,endColumn:e.endColumn});return}if(f.isInlined){r({startLine:0,startColumn:0,endLine:0,endColumn:0});return}o=this._rangeCache[s];this._css.getStyleSheetText(t).done(function(n){var t=o.endLine,i,e=n.split("\n"),f=e[t],u=f.substr(o.endColumn).indexOf("{");u>=0?i=o.endColumn+u+1:(f=e[++t],u=f.indexOf("{"),i=u+1);r({startLine:t,startColumn:i,endLine:t,endColumn:i})})},t.prototype.getWinningStatus=function(n,t){var r=n.current.name,i=t[r];return i||(i=this.calculateWinningProperty(r),t[r]=i),n.uid===i},t.prototype.updateWinningProperties=function(){var n=this,t={};this._currentRules.forEach(function(i){i.properties.forEach(function(i){var r;i.longhand&&i.longhand.length?(r=0,i.longhand.forEach(function(i){i.isWinning=n.getWinningStatus(i,t);i.isWinning&&r++}),i.isWinning=r>0):i.isWinning=n.getWinningStatus(i,t)})})},t}();n.Styles=t})(t=n.Chromium||(n.Chromium={}))})(t=n.DomExplorer||(n.DomExplorer={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function t(n,t,i,r){var u=this;this._dom=n;this._inspect=t;this._runtime=i;this._page=r;this._childInfoCache={};this._frames={};this._nodeCache={};this._nodesWaitingForAncestors=[];this._setChildNodeWaiting={};this._testEditCallback=null;this._testUndoCallback=null;this._dom.onSetChildNodes(this.onSetChildNodes.bind(this));this._dom.onDocumentUpdated(this.onDocumentUpdated.bind(this));this._dom.onInspectNodeRequested(this.onInspectNodeRequested.bind(this));this._dom.onInlineStyleInvalidated(this.onInlineStyleInvalidated.bind(this));this._dom.onAttributeModified(this.onAttributeModified.bind(this));this._dom.onAttributeRemoved(this.onAttributeRemoved.bind(this));this._dom.onCharacterDataModified(this.onCharacterDataModified.bind(this));this._dom.onChildNodeCountUpdated(this.onChildNodeCountUpdated.bind(this));this._dom.onChildNodeInserted(this.onChildNodeInserted.bind(this));this._dom.onChildNodeRemoved(this.onChildNodeRemoved.bind(this));this._inspect.enable();this._inspect.onInspect(function(n){return u.onInspect(n.objectId)})}return t.prototype.deleteNode=function(n,t){var i=this;this._dom.removeNode(n).done(function(){i.setUndoState();t(!0)},function(){return t(!1)})},t.prototype.deleteAttribute=function(n,t,i){var r=this;this._dom.removeAttribute(n,t).done(function(){r.setUndoState();i(!0)},function(){return i(!1)})},t.prototype.getChainFromRootToNode=function(n){var t=[];if(n)while(n.parent)this._frames[n.parent.uid]||t.unshift(n.uid),n=n.parent;return t},t.prototype.getChildren=function(t,i){var e=this,u=this.getNode(t),r=u,f;this._frames[t]&&(r=r.children[0]);r&&(!r.hasChildren||r.children)?(this._frames[t]&&r.children.forEach(function(n){n.parentUid=t;n.parent=u}),i(r.children)):(f=n.RemoteDom.convertUidToNodeId(r.uid),this._dom.requestChildNodes(f),this.waitForNode(f,!0,function(n){e._frames[t]&&n.children.forEach(function(n){n.parentUid=t;n.parent=u});i(n.children)}))},t.prototype.getDocumentRoot=function(n){var t=this;this._dom.getDocument().done(function(i){var r=t.cache(i);t._rootId=r.uid;n(t._rootId)})},t.prototype.getFrameRootId=function(n){var t=this._frames[n];return t?t.node.children[0].uid:null},t.prototype.getFrameIdForSelectedElement=function(n){for(var r=this,t=this.getSelectedElement(),i;t;){if(i=this._frames[t.uid],i){n(i.frameId);return}t=t.parent}this._rootFrameId?n(this._rootFrameId):this._page.getResourceTree().done(function(t){r._rootFrameId=t.frameTree.frame.id;n(r._rootFrameId)})},t.prototype.getNode=function(n){return this._nodeCache[n==="#root"?this._rootId:n]},t.prototype.getNodeDescription=function(n){var t=n.tag,i,r;return n.attributes&&(i=this.getAttributeValueByName(n.attributes,"id"),i?t+="#"+i:(r=this.getAttributeValueByName(n.attributes,"class"),r&&(t+="."+r.split(" ",1)[0]))),t},t.prototype.getNodeDetails=function(n){var t=this.getNode(n),i=[],r,u;return t.attributes.forEach(function(n){i.push({name:n.name,value:n.value,mutated:!1})}),t.text&&i.push({name:"textContent",value:t.text,mutated:!1}),r="#root"===n?null:t.parent.uid,u={attributes:i,childCount:t.childCount,childIndex:t.childIndex,parentUid:r,tag:t.tag,uid:t.uid},u},t.prototype.getHTML=function(n,t){this._dom.getOuterHTML(n).done(t,function(){return t("")})},t.prototype.getSelectedElement=function(){return this._selectedElement},t.prototype.getSelectedElementContext=function(){return!this._selectedElement||this._selectedElement.tag?this._selectedElement:this._selectedElement.parent},t.prototype.inspectElementById=function(n,t){var i=this.getNode(n);if(i&&(this.setSelectedElement(i),this.expandToRemoteSelectedElementCallback)){this.expandToRemoteSelectedElementCallback();t(!0);return}t(!1)},t.prototype.querySelector=function(n,t,i){var r=this;this._dom.querySelector(n,t).done(function(n){n?r.waitForNode(n,!1,function(){i(n)}):i(null)},function(){return i(null)})},t.prototype.redo=function(){var n=this;this._dom.redo().done(function(){n._testEditCallback&&n._testEditCallback(!0)},function(){n._testEditCallback&&n._testEditCallback(!1)})},t.prototype.reparent=function(t,i,r,u){var h=this,c=this.getNode(t),e=this.getNode(i),f,s,o;if(c&&e){switch(r){case"first child":f=e;f.children.length&&(s=f.children[0].uid);break;case"last child":f=e;break;case"before sibling":f=e.parent;s=e.uid;break;case"after sibling":for(f=e.parent,o=0;o<f.children.length;o++)if(f.children[o]===e){o<f.children.length-1&&(s=f.children[o+1].uid);break}}f?this._dom.moveTo(n.RemoteDom.convertUidToNodeId(t),n.RemoteDom.convertUidToNodeId(f.uid),s?n.RemoteDom.convertUidToNodeId(s):0).done(function(){h.setUndoState();u(!0)},function(){return u(!1)}):u(!1)}else u(!1)},t.prototype.search=function(n,t,i,r){var u=this;this._searchId&&this._searchHitCount&&t===this._searchTerm?(this._searchNext=(this._searchNext+i)%this._searchHitCount,this._searchNext<0&&(this._searchNext=this._searchHitCount-1),this._dom.getSearchResults(this._searchId,this._searchNext,this._searchNext+1).done(function(n){var t=n[0];u.waitForNode(t,!1,function(n){r(u.getChainFromRootToNode(n))})},function(){return r([])})):(this._searchId&&(this._dom.discardSearchResults(this._searchId),this._searchId=null,this._searchTerm=null),this._dom.performSearch(t).done(function(n){n.resultCount&&(u._searchId=n.searchId,u._searchHitCount=n.resultCount,u._searchNext=0,u._searchTerm=t);u._dom.getSearchResults(u._searchId,u._searchNext,u._searchNext+1).done(function(n){var t=n[0];u.waitForNode(t,!1,function(n){r(u.getChainFromRootToNode(n))})},function(){return r([])})}))},t.prototype.setAttribute=function(n,t,i,r){var u=this;this._dom.setAttributeValue(n,t,i).done(function(){u.setUndoState();r(!0)},function(){return r(!1)})},t.prototype.setEditChainMode=function(n){this._isInEditChain=n;n||this.completeEditChain()},t.prototype.setHighlight=function(n){return n?(this._dom.highlightNode(n,t.HIGHLIGHT_CONFIG),!0):(this._dom.hideHighlight(),!1)},t.prototype.setHTML=function(n,t,i){var r=this;this._dom.setOuterHTML(n,t).done(function(){r.setUndoState();i()},i)},t.prototype.setSelectedElement=function(n){this._selectedElement=n},t.prototype.setSelectElementByClick=function(n){this._selectElementByClickCallback=n;this._dom.setInspectModeEnabled(!!n,t.HIGHLIGHT_CONFIG)},t.prototype.setSingleEditMode=function(n){this._isInSingleEdit=n;n||this.completeEditChain()},t.prototype.setTestEditCallbacks=function(n,t){this._testEditCallback=n;this._testUndoCallback=t},t.prototype.setText=function(n,t,i){var r=this;this._textNodeEditing=n;this._dom.setNodeValue(n,t).done(function(){r.setUndoState();r._textNodeEditing=null;i(!0)},function(){r._textNodeEditing=null;i(!1)})},t.prototype.setUndoState=function(){this._isInEditChain||this._isInSingleEdit?this._hasEditOccurredInChain=!0:this._dom.markUndoableState()},t.prototype.undo=function(){var n=this;this._dom.undo().done(function(){n._testUndoCallback&&n._testUndoCallback(!0)},function(){n._testUndoCallback&&n._testUndoCallback(!1)})},t.prototype.waitForNode=function(t,i,r){var u=this.getNode(n.RemoteDom.convertNodeIdToUid(t)),f;if(u){if(!i){r(u);return}if(i&&(!u.hasChildren||u.children)){r(u);return}}f=n.RemoteDom.convertNodeIdToUid(t);this._setChildNodeWaiting[f]||(this._setChildNodeWaiting[f]=[]);this._setChildNodeWaiting[f].push(r)},t.prototype.onSetChildNodes=function(t,i){var r=n.RemoteDom.convertNodeIdToUid(t),u;this._frames[r]||(u=this.getNode(r),u?this.cacheChildren(u,i):this._childInfoCache[r]=i);this.checkNodesWaitingForAncestors()},t.prototype.callbackTreeModified=function(n){this.mutationCallback&&this.mutationCallback([n])},t.prototype.convertInNode=function(t){var i,e=t.nodeValue,u,r,f;switch(t.nodeType){case 3:i="#text";t.attributes=t.attributes||[];t.attributes.push("textContent",t.nodeValue);break;case 8:i="#comment";t.attributes=t.attributes||[];t.attributes.push("textContent",t.nodeValue);break;case 9:case 11:i="#document";break;case 10:i="#doctype";t.attributes=t.attributes||[];t.attributes.push("textContent",t.nodeName);e="<!DOCTYPE "+t.nodeName+">";break;default:i=t.nodeName.toLowerCase()}return u=t.contentDocument?t.contentDocument.childNodeCount:t.childNodeCount,r={attributes:this.convertInAttributes(t.attributes),childCount:u,childIndex:-1,hasChildren:u>0,parentUid:null,tag:i,uid:n.RemoteDom.convertNodeIdToUid(t.nodeId),text:e},t.contentDocument&&(f=this.cache(t.contentDocument),r.children=[f],f.parent=r,this._frames[r.uid]={frameId:t.frameId,node:r}),r},t.prototype.getAttributeValueByName=function(n,t){for(var r,i=0;i<n.length;i++)if(r=n[i],r.name===t)return r.value;return null},t.prototype.convertInAttributes=function(n){var i=[],t;if(n)for(t=0;t<n.length;t+=2)i.push({name:n[t],value:n[t+1]});return i},t.prototype.cache=function(n){var t=this.convertInNode(n),i;return this._nodeCache[t.uid]=t,t.hasChildren&&!t.children&&(n.children?this.cacheChildren(t,n.children):(i=this._childInfoCache[t.uid],i&&(delete this._childInfoCache[t.uid],this.cacheChildren(t,i)))),t},t.prototype.uncache=function(n){var t=this;n.children&&n.children.forEach(function(n){t.uncache(n)});delete this._nodeCache[n.uid]},t.prototype.cacheChildren=function(t,i){var u=this,r;t.children=[];r=this._setChildNodeWaiting[t.uid]?t:null;i.forEach(function(i,f){var e=u.cache(i);e.parent=t;e.parentUid=t.uid;e.childIndex=f;t.children.push(e);u._setChildNodeWaiting[n.RemoteDom.convertNodeIdToUid(i.nodeId)]&&(r=e)});r&&this._nodesWaitingForAncestors.push(r)},t.prototype.checkNodesWaitingForAncestors=function(){for(var t=0,r=[],n,i;t<this._nodesWaitingForAncestors.length;)n=this._nodesWaitingForAncestors[t],this.isNodeRooted(n)?(this._nodesWaitingForAncestors.splice(t,1),i=this._setChildNodeWaiting[n.uid],i&&(delete this._setChildNodeWaiting[n.uid],i.forEach(function(t){return r.push(function(){return t(n)})}))):t++;r.forEach(function(n){n()})},t.prototype.isNodeRooted=function(n){while(n.parent){if(n.parent.uid===this._rootId)return!0;n=n.parent}return!1},t.prototype.onDocumentUpdated=function(){this._nodeCache={};this._searchId=null;this._frames={};this._childInfoCache={}},t.prototype.onInspectNodeRequested=function(t){var i=n.RemoteDom.convertNodeIdToUid(t);this.setSelectedElement(this.getNode(i));this._selectElementByClickCallback&&this._selectElementByClickCallback()},t.prototype.onInlineStyleInvalidated=function(t){var i=this;t.forEach(function(t){var u=n.RemoteDom.convertNodeIdToUid(t),r=i.getNode(u);r&&i._dom.getAttributes(t).done(function(n){var t=i.convertInAttributes(n);i.updateAttributes(r,t)})})},t.prototype.onAttributeModified=function(t,i,r){var s=n.RemoteDom.convertNodeIdToUid(t),u=this.getNode(s),e,f,o;if(u){for(e=!1,f=0;f<u.attributes.length;f++)if(o=u.attributes[f],o.name===i){o.value=r;e=!0;break}i==="style"&&(r=r.replace(/\n\s*/g," ").trim(),this.inlineStyleChangedCallback&&this.inlineStyleChangedCallback(n.RemoteDom.convertUidToNodeId(u.uid)));e||u.attributes.push({name:i,value:r});this.callbackAttrModified(1,s,i,r)}},t.prototype.onAttributeRemoved=function(t,i){var f=n.RemoteDom.convertNodeIdToUid(t),u=this.getNode(f),r,e;if(u){for(r=0;r<u.attributes.length;r++)if(e=u.attributes[r],e.name===i){u.attributes.splice(r,1);break}this.callbackAttrModified(3,f,i)}},t.prototype.callbackAttrModified=function(n,t,i,r){if(this.mutationCallback){var u={type:"DOMAttrModified",targetUid:t,attrChange:n,attrName:i,newValue:r};this.mutationCallback([u])}},t.prototype.onCharacterDataModified=function(t,i){var r=n.RemoteDom.convertNodeIdToUid(t),u=this.getNode(r),f;u&&(u.text=i,t!==this._textNodeEditing&&(f={type:"DOMCharacterDataModified",targetUid:r,newValue:i},this.callbackTreeModified(f)))},t.prototype.onChildNodeCountUpdated=function(t,i){var f=this,r=this.getNode(n.RemoteDom.convertNodeIdToUid(t)),u;r&&r.childCount!==i&&(r.childCount=i,r.hasChildren=i>0,r.children=null,u={type:"DOMNodeRefresh",targetUid:r.uid},i?this.getChildren(r.uid,function(n){r.children=n;f.callbackTreeModified(u)}):this.callbackTreeModified(u))},t.prototype.onChildNodeInserted=function(t,i,r){var u=this.getNode(n.RemoteDom.convertNodeIdToUid(t)),e,f,s,o,h;if(u){if(e=this.cache(r),e.parent=u,u.childCount++,u.hasChildren=!0,u.children||(u.children=[]),f=0,i){for(s=n.RemoteDom.convertNodeIdToUid(i),o=!1;f<u.children.length;){if(u.children[f].uid===s){u.children.splice(f+1,0,e);o=!0;break}f++}o?f++:u.children.push(e)}else u.children.unshift(e);h={type:"DOMNodeInserted",targetUid:e.uid,parentUid:u.uid,targetChildIndex:f};this.callbackTreeModified(h)}},t.prototype.onChildNodeRemoved=function(t,i){var f=n.RemoteDom.convertNodeIdToUid(i),e=this.getNode(f),r,u,o;if(e&&(this.uncache(e),this._frames[f]&&delete this._frames[f],u=0,r=this.getNode(n.RemoteDom.convertNodeIdToUid(t)),r&&r.children))while(u<r.children.length){if(r.children[u].uid===f){r.childCount--;r.hasChildren=r.childCount>0;r.children.splice(u,1);break}u++}r&&(o={type:"DOMNodeRemoved",targetUid:e.uid,parentUid:r.uid,targetChildIndex:u},this.callbackTreeModified(o))},t.prototype.inspect=function(n){if(typeof n=="object"&&typeof n.nodeId=="number"){var t=n.nodeId;this.onInspectNodeRequested(t)}},t.prototype.onInspect=function(n){var t=this;this._dom.requestNode(n).then(function(n){return t.inspect(n)}).done(function(){return t._runtime.releaseObject({objectId:n})})},t.prototype.updateAttributes=function(t,i){var r,f=t.attributes,e,u,o;for(t.attributes=i,u=0;u<f.length;u++)r=f[u],this.getAttributeValueByName(i,r.name)===null&&(this.callbackAttrModified(3,t.uid,r.name),r.name==="style"&&(e=""));for(u=0;u<i.length;u++)r=i[u],o=this.getAttributeValueByName(f,r.name),(o===null||o!==r.value)&&(this.callbackAttrModified(1,t.uid,r.name,r.value),r.name==="style"&&(e=r.value));this.inlineStyleChangedCallback&&e!==undefined&&this.inlineStyleChangedCallback(n.RemoteDom.convertUidToNodeId(t.uid))},t.prototype.completeEditChain=function(){!this._hasEditOccurredInChain||this._isInEditChain||this._isInSingleEdit||(this._dom.markUndoableState(),this._hasEditOccurredInChain=!1)},t.HOVER_BORDER={a:.5,r:120,g:181,b:51},t.HOVER_CONTENT={a:.5,r:168,g:221,b:246},t.HOVER_MARGIN={a:.5,r:250,g:212,b:107},t.HOVER_PADDING={a:.5,r:247,g:163,b:153},t.HIGHLIGHT_CONFIG={borderColor:t.HOVER_BORDER,contentColor:t.HOVER_CONTENT,marginColor:t.HOVER_MARGIN,paddingColor:t.HOVER_PADDING,showInfo:!1},t}();n.Tree=t})(t=n.Chromium||(n.Chromium={}))})(t=n.DomExplorer||(n.DomExplorer={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=function(n){function t(){n.apply(this,arguments)}return __extends(t,n),t.initialize=function(){Common.ObservableHelpers.defineProperty(t,t.IsGleamingPropertyName,!1)},t.allowGleaming=function(n,i){if(!n){i();return}try{t.markObject(n);i()}finally{t.unmarkObject(n)}},t.allowGleamingIf=function(n,i,r){n?t.allowGleaming(i,r):r()},t.prototype.gleam=function(n){var i=this;t.isObjectMarked(n)&&(this.isGleaming=!0,window.clearTimeout(this._timeoutId),this._timeoutId=window.setTimeout(function(){i.isGleaming=!1},t.GLEAM_DURATION_MS))},t.isObjectMarked=function(n){return n?t.MarkedObjects.get(n)>0:!1},t.markObject=function(n){var i=t.MarkedObjects.get(n)||0;i++;t.MarkedObjects.set(n,i)},t.unmarkObject=function(n){var i=t.MarkedObjects.get(n);i--;i===0?t.MarkedObjects.delete(n):i>0&&t.MarkedObjects.set(n,i)},t.GLEAM_DURATION_MS=1e3,t.MarkedObjects=new Map,t.IsGleamingPropertyName="isGleaming",t}(Common.Observable);n.GleamingBehaviour=t;t.initialize()}(DomTree||(DomTree={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=function(n){function t(t,i){n.call(this);this.name=t;this.value=i}return __extends(t,n),t.initialize=function(){Common.ObservableHelpers.defineProperty(t,t.NamePropertyName,null);Common.ObservableHelpers.defineProperty(t,t.ValuePropertyName,null)},t.NamePropertyName="name",t.ValuePropertyName="value",t}(Common.Observable);n.ObservableAttribute=t;t.initialize()}(DomTree||(DomTree={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var r=Microsoft.Plugin,u=function(t){function i(n,i){t.call(this);this._eyedropperPromise=null;this._bridge=n;this.palette=i;this._traceWriter=new Common.TraceWriter}return __extends(i,t),i.initialize=function(){Common.ObservableHelpers.defineProperty(i,i.CancellationColorPropertyName,null);Common.ObservableHelpers.defineProperty(i,i.ColorPropertyName,i.DEFAULT_COLOR,function(n){return n.onIsColorChanged()},function(n){return n.onIsColorChanging()});Common.ObservableHelpers.defineProperty(i,i.DockElementPropertyName,null);Common.ObservableHelpers.defineProperty(i,i.IsEyedropperActivePropertyName,!1,function(n){return n.onIsEyedropperActiveChanged()});r.F12&&r.F12.isTargetEdge?Common.ObservableHelpers.defineProperty(i,i.IsSlidersShownPropertyName,!0):Common.ObservableHelpers.defineProperty(i,i.IsSlidersShownPropertyName,!1);Common.ObservableHelpers.defineProperty(i,i.IsVisiblePropertyName,!1,function(n){return n.onIsVisibleChanged()},function(n){return n.onIsVisibleChanging()});Common.ObservableHelpers.defineProperty(i,i.PalettePropertyName,null)},i.prototype.setOriginalColor=function(n){this.cancellationColor=n;this.color=n},i.prototype.onIsColorChanged=function(){this._traceWriter.raiseEvent(552)},i.prototype.onIsColorChanging=function(){this._traceWriter.raiseEvent(551)},i.prototype.onIsVisibleChanged=function(){this.isVisible?(this._traceWriter.raiseEvent(548),n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.SHOW_COLOR_PICKER,5)):(this.isEyedropperActive&&(n.Tools.Utility.Assert.isTrue(this._eyedropperPromise),this._eyedropperPromise.cancel()),this._traceWriter.raiseEvent(550),n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.HIDE_COLOR_PICKER,5))},i.prototype.onIsVisibleChanging=function(){this.isVisible?this._traceWriter.raiseEvent(549):this._traceWriter.raiseEvent(547)},i.prototype.onIsEyedropperActiveChanged=function(){var t=this;n.Tools.Utility.Assert.hasValue(this.color);this.isEyedropperActive?(this._eyedropperOriginalColor=this.color,n.Tools.Utility.Assert.isNull(this._eyedropperPromise),this._eyedropperPromise=this._bridge.runEyedropper().then(function(i){n.Tools.Utility.Assert.isTrue(t.isEyedropperActive);t.stopEyedropper(i)},function(){t.stopEyedropper()}),this._eyedropperIntervalId=window.setInterval(function(){t._bridge.getEyedropperColor().done(function(n){t.isEyedropperActive&&n&&(t.color=n)},function(){window.clearInterval(t._eyedropperIntervalId);t.stopEyedropper()})},100)):this._eyedropperPromise&&this._eyedropperPromise.cancel()},i.prototype.stopEyedropper=function(n){window.clearInterval(this._eyedropperIntervalId);n?this.color=n:this._eyedropperOriginalColor&&(this.color=this._eyedropperOriginalColor);this._eyedropperPromise&&this._eyedropperPromise.cancel();this._eyedropperIntervalId=null;this._eyedropperOriginalColor=null;this._eyedropperPromise=null;this.isEyedropperActive=!1},i.DEFAULT_COLOR="rgba(0, 0, 0, 1)",i.CancellationColorPropertyName="cancellationColor",i.ColorPropertyName="color",i.DockElementPropertyName="dockElement",i.IsEyedropperActivePropertyName="isEyedropperActive",i.IsSlidersShownPropertyName="isSlidersShown",i.IsVisiblePropertyName="isVisible",i.PalettePropertyName="palette",i}(Common.Observable),i;t.ColorPickerViewModel=u;u.initialize();i=function(n){function t(i){n.call(this);this.colors=new Common.ObservableCollection(t.DEFAULT_COLORS);this._paletteCollector=i;this._paletteCompletionId=null}return __extends(t,n),t.initialize=function(){Common.ObservableHelpers.defineProperty(t,t.ColorsPropertyName,null);Common.ObservableHelpers.defineProperty(t,t.IsLoadingPropertyName,!1)},t.prototype.runColorCollection=function(){var n=this;if(this.isLoading){this._paletteCollector.abortPaletteCollection().done(function(){n.clearPendingActions();n.isLoading=!1;n.runColorCollection()},this.onError.bind(this));return}this.isLoading=!0;this.colors.clear();this._paletteTimer=window.setTimeout(function(){return n.onError()},2e4);this._paletteCollector.runPaletteCollection(function(t){return n.onColorCollectionComplete(t)}).done(null,function(){return n.onError()})},t.prototype.onColorCollectionComplete=function(n){var i=this;this.clearPendingActions();this._paletteCompletionId=window.setImmediate(function(){var u={},f=[],e,r;if(n){for(e=0;e<n.length;e++)r=Common.RgbaColor.getString(n[e]),r&&(u[r]||(u[r]=0,f.push(r)),u[r]++);f.sort(function(n,t){return u[t]-u[n]})}f.length!==0?i.colors.resetItems(f):i.colors.resetItems(t.DEFAULT_COLORS);i.isLoading=!1})},t.prototype.clearPendingActions=function(){window.clearTimeout(this._paletteTimer);window.clearTimeout(this._paletteCompletionId)},t.prototype.onError=function(){if(this.isLoading)this.onColorCollectionComplete(t.DEFAULT_COLORS)},t.DEFAULT_COLORS=["rgba(255, 255, 255, 1)","rgba(0, 0, 0, 1)"],t.ColorsPropertyName="colors",t.IsLoadingPropertyName="isLoading",t}(Common.Observable);t.PaletteViewModel=i;i.initialize()})(t=n.DomExplorer||(n.DomExplorer={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=function(t){function i(i){t.call(this,i||"DomExplorer.domTreeItemAttributeTemplate");this.valueGleaming=new n.GleamingBehaviour}return __extends(i,t),i.initialize=function(){Common.ObservableHelpers.defineProperty(i,i.ValueGleamingPropertyName,null)},i.prototype.onModelChanged=function(){if(t.prototype.onModelChanged.call(this),this._modelPropertyChangedEventRegistration&&(this._modelPropertyChangedEventRegistration.unregister(),this._modelPropertyChangedEventRegistration=null),this.model){var n=this.model;n.propertyChanged&&(this._modelPropertyChangedEventRegistration=n.propertyChanged.addHandler(this.onModelPropertyChanged.bind(this)))}},i.prototype.onModelPropertyChanged=function(t){switch(t){case n.ObservableAttribute.ValuePropertyName:this.valueGleaming.gleam(this.model)}},i.ValueGleamingPropertyName="valueGleaming",i}(Common.TemplateControl);n.ItemAttributeTemplate=t;t.initialize()}(DomTree||(DomTree={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=function(t){function i(r){t.call(this,r);this.itemContainerControl=n.ItemAttributeTemplate;this.itemControlsPoolSizeLimit=i.ITEMS_CONTROLS_POOL_SIZE_LIMIT}return __extends(i,t),i.ITEMS_CONTROLS_POOL_SIZE_LIMIT=20,i}(Common.Controls.ItemsControl);n.NodeAttributeItemsControl=t}(DomTree||(DomTree={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var i=F12.Tools.Utility.Assert,t=function(t){function r(i,u,f,e,o,s,h){t.call(this,r.getTemplateMap()[1]);this.textContentPreviewGleaming=new n.GleamingBehaviour;this._htmlElementSource=i;this._domExplorer=u;this._domTree=f;this._domTreeDataSource=e;this._bridge=o;this._styleComputer=s;this._remoteDom=h;this._nodeChangedListener=this.onNodeChanged.bind(this)}return __extends(r,t),Object.defineProperty(r.prototype,"isVirtualizingDisabled",{get:function(){return this.model&&this.model.dontVirtualize},set:function(n){this.model&&(this.model.dontVirtualize=n)},enumerable:!0,configurable:!0}),r.initialize=function(){Common.ObservableHelpers.defineProperty(r,r.TextContentPreviewGleamingPropertyName,null);Common.ObservableHelpers.defineProperty(r,r.TextContentPreviewPropertyName,"",function(n){return n.onTextContentPreviewChanged()});Common.ObservableHelpers.defineProperty(r,r.CollapsedNodeClosingTagClassPropertyName,r.NO_CLOSING_TAG_CLASS)},r.prototype.onApplyTemplate=function(){t.prototype.onApplyTemplate.call(this);this._mainElement=this.getNamedElement("domTreeItemDataTemplateName");i.isTrue(!!this._mainElement,"Expecting domTreeItemDataTemplateName element.")},r.prototype.onModelChanged=function(){t.prototype.onModelChanged.call(this);this.model?this._domTreeDataSource.domTree.addChangeListener(this._nodeChangedListener):this._domTreeDataSource.domTree.removeChangeListener(this._nodeChangedListener);this.updateTreeItemUi()},r.prototype.onModelChanging=function(){t.prototype.onModelChanging.call(this);this.updateTemplate();this.updateTextContentPreview()},r.prototype.onModelPropertyChangedOverride=function(t){switch(t){case n.TreeDataItem.HasChildrenPropertyName:case n.TreeDataItem.IsExpandedPropertyName:case n.TreeDataItem.TextPreviewPropertyName:this.recalculateDisplayClasses();this.updateTextContentPreview();this.ownerListControl.invalidateItemRowSpan(this.model);break;case n.TreeDataItem.IsForceExpandedPropertyName:this.updateExpanderCss();this.recalculateDisplayClasses();this.ownerListControl.invalidateItemRowSpan(this.model);break;case n.TreeDataItem.NodePropertyName:this.updateTemplate();break;case n.TreeDataItem.NeedsRefreshPropertyName:this.updateTreeItemUi();break;case n.TreeDataItem.DebugUidPropertyName:this.updateDebugUid()}},r.prototype.updateTemplate=function(){if(this.model)if(this.model.node){var n=r.getTemplateMap()[this.model.node.type];if(n)this.templateId=n;else throw Error("Can not get template for node of type ="+this.model.node.type)}else this.templateId="DomExplorer.domTreeEmptyItemTemplate";this.updateDebugUid()},r.getTemplateMap=function(){return r.TemplateMapCache||(r.TemplateMapCache={},r.TemplateMapCache[1]="DomExplorer.domTreeElementTemplate",r.TemplateMapCache[5]="DomExplorer.domTreeTextElementTemplate",r.TemplateMapCache[4]="DomExplorer.domTreeDocTypeTemplate",r.TemplateMapCache[2]="DomExplorer.domTreeCDataTemplate",r.TemplateMapCache[3]="DomExplorer.domTreeCommentTemplate"),r.TemplateMapCache},r.prototype.updateTreeItemUi=function(){this.model&&(this.updateExpanderCss(),this.recalculateDisplayClasses(),this.updateDraggable(this.model))},r.prototype.updateDraggable=function(n){var t=this.getClosestAncestor(this._mainElement,".BPT-listItemContainer"),i;t&&(t.draggable=!!n.isDraggable&&n.isDraggable(),i=t.classList.contains("drag-item"),n.isBeingDragged?i||t.classList.add("drag-item"):i&&t.classList.remove("drag-item"))},r.prototype.getClosestAncestor=function(n,t){while(n&&n!==document){var i=n;if(i.msMatchesSelector&&i.msMatchesSelector(t))return i;n=n.parentNode}},r.prototype.raiseEvent=function(){this._domExplorer.traceWriter&&this._domExplorer.traceWriter.raiseEvent(545)},r.prototype.isInDocument=function(n){for(var t=n.parentElement;t;){if(t.nodeName==="#document")return!0;t=t.parentNode}return!1},r.prototype.onNodeChanged=function(n,t){if(this.model&&this.model.node===t)switch(n){case 5:case 4:this.ownerListControl.invalidateItemRowSpan(this.model)}},r.prototype.getAssociatedUid=function(n){var t,i;if(n)return(t=this.getClosestAncestor(n,".BPT-listItemContainer"),!t)?void 0:(i=t.querySelector("DIV.BPT-HTML [data-id]"),!i)?void 0:i.getAttribute("data-id")},r.prototype.setupEditAttribute=function(n,t){var u=this.getAssociatedUid(n),i,r;u&&(i=this._domExplorer.getItemByUid(u),i)&&this._domTreeDataSource.isUnderEditableItem(i)&&(r=this._domExplorer.getEditAttributeController(),t?r.editAttributeName(i,$m(n)):r.editAttributeValue(i,$m(n)))},r.prototype.onAttributeItemsDblClickHandler=function(n){var t=n.target,i=!1;t.classList.contains("BPT-HTML-Attribute")?(this.setupEditAttribute(t,!0),i=!0):t.classList.contains("BPT-HTML-Value")&&(this.setupEditAttribute(t,!1),i=!0);i&&(n.preventDefault(),n.stopPropagation())},r.prototype.onTextContentPreviewChanged=function(){this.textContentPreview&&this.textContentPreview!==r.ELLIPSIS&&this.textContentPreviewGleaming.gleam(this.model)},r.prototype.onTextDblClickHandler=function(n){var t=this,i=n.target,r=!1,u,e,f;i.classList.contains("BPT-HTML-TextPreview")&&this.textContentPreview?(u=this._domExplorer.domTreeDataSource.indexOfItem(this.model.id),u>=0&&(e=this.model.areChildrenInline,this.model.areChildrenInline=!1,this._domExplorer.domTree.expandItem(u).done(function(){if(t.model.children&&t.model.children[0]){var n=t.model.children[0];t._domExplorer.setupEditText(n.uid,!1).done(function(){t.model.areChildrenInline=e})}}),r=!0)):i.classList.contains("BPT-HTML-Text")&&(f=this.getAssociatedUid(i),f&&(this._domExplorer.setupEditText(f,!1).done(),r=!0));r&&(n.preventDefault(),n.stopPropagation())},r.prototype.recalculateDisplayClasses=function(){this.collapsedNodeClosingTagClass=this.hasCollapsedNodeClosingTag()?"":r.NO_CLOSING_TAG_CLASS},r.prototype.hasCollapsedNodeClosingTag=function(){return this.model.isForceExpanded?!1:this.model.isSelfClosing||this.model.isClosingTag?!1:!this.model.isExpanded||!this.model.hasChildren},r.prototype.updateDebugUid=function(){var n,t;if(this.model&&this.model.debugUid){if(n=this.getNamedControl("debugUid"),!n){if(t=this.rootElement.querySelector(".BPT-HTML-HtmlElement"),!t)return;n=new Common.TemplateControl("DomExplorer.debugUidTemplate");n.rootElement.setAttribute("data-name","debugUid");t.appendChild(n.rootElement)}n.model=this.model.debugUid}},r.prototype.updateTextContentPreview=function(){this.model&&(this.textContentPreview=this.model.textPreview||r.ELLIPSIS)},r.CLOSING_TAG_CLASS="BPT-HTML-ClosingTag",r.ELLIPSIS="…",r.NO_TEXTCONTENTPREVIEW_CLASS="BPT-HTML-No-TextContentPreview",r.NO_CLOSING_TAG_CLASS="BPT-HTML-No-Closing-Tag",r.OPENING_TAG_CLASS="BPT-HTML-OpeningTag",r.SELF_CLOSING_TAG_CLASS="BPT-HTML-SelfClosingTag",r.CollapsedNodeClosingTagClassPropertyName="collapsedNodeClosingTagClass",r.TextContentPreviewGleamingPropertyName="textContentPreviewGleaming",r.TextContentPreviewPropertyName="textContentPreview",r}(Common.Controls.TreeItemDataTemplate);n.TreeItemDataTemplate=t;t.initialize()}(DomTree||(DomTree={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i;(function(n){var i=function(){function n(n,t){this._ignoredAttributes={};this._uidToElementIdMap={};this._elementIdToUidMap={};this._isDesignerEnabled=!1;this._bridge=n;this._target=t}return n.prototype.setDesignerEnabled=function(n){var t=this;n!==this._isDesignerEnabled&&(this._isDesignerEnabled=n,n?(this._bridge.addEventListener("selectElement",this._selectElementListener=function(n){return t.designerElementSelected(n)}),this._bridge.getDesignerConfiguration().done(function(n){t._elementIdAttribute=n.elementIdAttribute.toLowerCase();n.ignoredAttributes&&n.ignoredAttributes.forEach(function(n){t._ignoredAttributes[n.toLowerCase()]=!0})})):(this._elementIdAttribute=undefined,this._ignoredAttributes={},this._uidToElementIdMap={},this._elementIdToUidMap={},this._rootUid=undefined,this._selectElementListener&&(this._bridge.removeEventListener("selectElement",this._selectElementListener),this._selectElementListener=undefined)))},n.prototype.abortPaletteCollection=function(){return this._target.abortPaletteCollection()},n.prototype.addDocumentModifiedListener=function(n,t){var i=this;return this._isDesignerEnabled?this._target.addDocumentModifiedListener(n,function(n){for(var r,u,f,e,o=[],s=0;s<n.length;s++){r=n[s];switch(r.type){case"DOMNodeRemoved":u=r.targetUid;f=i._uidToElementIdMap[u];f&&(delete i._uidToElementIdMap[u],delete i._elementIdToUidMap[f]);o.push(r);break;case"DOMAttrModified":e=r.attrName.toLowerCase();i._ignoredAttributes[e]||(i._elementIdAttribute===e?(u=r.targetUid,i._uidToElementIdMap[u]=r.newValue,i._elementIdToUidMap[r.newValue]=u):o.push(r));break;case"DOMAttrRemoved":e=r.attrName.toLowerCase();i._ignoredAttributes[e]||(i._elementIdAttribute===e?(u=r.targetUid,f=i._uidToElementIdMap[u],f&&(delete i._uidToElementIdMap[u],delete i._elementIdToUidMap[f])):o.push(r));break;default:o.push(r)}}t(o)}):this._target.addDocumentModifiedListener(n,t)},n.prototype.addElement=function(n,t,i){return this._target.addElement(n,t,i)},n.prototype.allowProcessToTakeForeground=function(){return this._target.allowProcessToTakeForeground()},n.prototype.attachMediaQueryEvents=function(n){return this._target.attachMediaQueryEvents(n)},n.prototype.cancelSelectElementByClick=function(){return this._target.cancelSelectElementByClick()},n.prototype.clearCurrentEventProxy=function(){return this._target.clearCurrentEventProxy()},n.prototype.clearStyleCache=function(){return this._target.clearStyleCache()},n.prototype.collectEvents=function(n,t,i,r){return this._target.collectEvents(n,t,i,r)},n.prototype.copyElementWithStyle=function(n){return this._target.copyElementWithStyle(n)},n.prototype.deleteElement=function(n){return this._target.deleteElement(n)},n.prototype.disableEditChaining=function(){return this._target.disableEditChaining()},n.prototype.editAttribute=function(n,t,i){return this._target.editAttribute(n,t,i)},n.prototype.editStylePropertyAdd=function(n,t,i,r,u){return this._target.editStylePropertyAdd(n,t,i,r,u)},n.prototype.editStylePropertyEnable=function(n,t){return this._target.editStylePropertyEnable(n,t)},n.prototype.editStylePropertyName=function(n,t){return this._target.editStylePropertyName(n,t)},n.prototype.editStylePropertyValue=function(n,t,i){return this._target.editStylePropertyValue(n,t,i)},n.prototype.editStyleRuleAdd=function(n,t,i,r,u){return this._target.editStyleRuleAdd(n,t,i,r,u)},n.prototype.editStyleRuleRemove=function(n){return this._target.editStyleRuleRemove(n)},n.prototype.editStyleRuleSelector=function(n,t){return this._target.editStyleRuleSelector(n,t)},n.prototype.editText=function(n,t){return this._target.editText(n,t)},n.prototype.enableEditChaining=function(){return this._target.enableEditChaining()},n.prototype.endSingleEdit=function(){return this._target.endSingleEdit()},n.prototype.findTerm=function(n,t,i,r){var u=this.concatIgnoredAttributes(r);return this._target.findTerm(n,t,i,u)},n.prototype.getBulkChildNodesDetails=function(n,t){this._target.getBulkChildNodesDetails(n,t)},n.prototype.getChangedStyles=function(n){return this._target.getChangedStyles(n)},n.prototype.getComputedBox=function(n){return this._target.getComputedBox(n)},n.prototype.getComputedStyles=function(n){return this._target.getComputedStyles(n)},n.prototype.getCssClassesUsedInCurrentDocument=function(n){return this._target.getCssClassesUsedInCurrentDocument(n)},n.prototype.getLoadDocumentData=function(){return this._target.getLoadDocumentData()},n.prototype.getHTMLString=function(n,t,i){var r=this.concatIgnoredAttributes(i);return this._target.getHTMLString(n,t,r)},n.prototype.getHWND=function(){return this._target.getHWND()},n.prototype.getParentChainForElement=function(n){return this._target.getParentChainForElement(n)},n.prototype.getParentChainForSelectedElement=function(){return this._target.getParentChainForSelectedElement()},n.prototype.getSelectedElement=function(){return this._target.getSelectedElement()},n.prototype.getDomNodeDetails=function(n){var i=this;return this._isDesignerEnabled?new t.Promise(function(t){i._target.getDomNodeDetails(n).done(function(n){i.mapNode(n);t(n)})}):this._target.getDomNodeDetails(n)},n.prototype.getDomNodesDetails=function(n){var i=this;return this._isDesignerEnabled?new t.Promise(function(t){i._target.getDomNodesDetails(n).done(function(n){n.forEach(function(n){i.mapNode(n)});t(n)})}):this._target.getDomNodesDetails(n)},n.prototype.getParentChainForStyle=function(n){return this._target.getParentChainForStyle(n)},n.prototype.getPseudoStyling=function(n,t){return this._target.getPseudoStyling(n,t)},n.prototype.getRootElement=function(){var n=this;return this._isDesignerEnabled?new t.Promise(function(t){n._target.getRootElement().done(function(i){n._rootUid=i;t(i)})}):this._target.getRootElement()},n.prototype.getStyles=function(n){return this._target.getStyles(n)},n.prototype.getTargetEngineKind=function(){return this._target.getTargetEngineKind()},n.prototype.getWinningProperty=function(n){return this._target.getWinningProperty(n)},n.prototype.hideHoverItem=function(){return this._target.hideHoverItem()},n.prototype.hoverItem=function(n){return this._target.hoverItem(n)},n.prototype.initializeHost=function(n){return this._target.initializeHost(n)},n.prototype.inspectElementById=function(n){return this._target.inspectElementById(n)},n.prototype.performNextEdit=function(){return this._target.performNextEdit()},n.prototype.querySelector=function(n,t,i){return this._target.querySelector(n,t,i)},n.prototype.removeAttribute=function(n,t){return this._target.removeAttribute(n,t)},n.prototype.removeStyleProperty=function(n){return this._target.removeStyleProperty(n)},n.prototype.reparentNode=function(n,t,i){return this._target.reparentNode(n,t,i)},n.prototype.replaceElement=function(n,t){return this._target.replaceElement(n,t)},n.prototype.revertProperty=function(n){return this._target.revertProperty(n)},n.prototype.revertRule=function(n){return this._target.revertRule(n)},n.prototype.runPaletteCollection=function(n){return this._target.runPaletteCollection(n)},n.prototype.selectElement=function(n){if(this._isDesignerEnabled){var i=this._uidToElementIdMap[n];i&&this._bridge.selectElement(i)}return t.Promise.as(null)},n.prototype.selectElementByClick=function(n){return this._target.selectElementByClick(n)},n.prototype.setKeyBindCallbacks=function(n,t,i,r){return this._target.setKeyBindCallbacks(n,t,i,r)},n.prototype.setPseudoStyling=function(n,t,i){return this._target.setPseudoStyling(n,t,i)},n.prototype.setTestEditCallbacks=function(n,t){return this._target.setTestEditCallbacks(n,t)},n.prototype.startSingleEdit=function(){return this._target.startSingleEdit()},n.prototype.storeElementForConsole=function(n){return this._target.storeElementForConsole(n)},n.prototype.takeForeground=function(){return this._target.takeForeground()},n.prototype.undoLastEdit=function(){return this._target.undoLastEdit()},n.prototype.designerElementSelected=function(n){var t=this,i=n.uid,r=this._elementIdToUidMap[i],u;r?this._target.inspectElementById(r):(u="["+this._elementIdAttribute+"='"+i+"']",this._target.querySelector(this._rootUid,u).done(function(n){n&&t._target.getDomNodeDetails(n).done(function(i){t.mapNode(i);t._target.inspectElementById(n)})}))},n.prototype.concatIgnoredAttributes=function(n){var t=(n||[]).splice(0);for(var i in this._ignoredAttributes)this._ignoredAttributes[i]&&t.push(i);return t},n.prototype.mapNode=function(n){var t,i,r;if(n.attributes)for(t=0;t<n.attributes.length;)i=n.attributes[t],r=i.name.toLowerCase(),r===this._elementIdAttribute?(this._uidToElementIdMap[n.uid]=i.value,this._elementIdToUidMap[i.value]=n.uid,n.attributes.splice(t,1)):this._ignoredAttributes[r]?n.attributes.splice(t,1):t++},n}();n.DesignerHook=i})(i=n.DomExplorer||(n.DomExplorer={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i;(function(n){var r=function(){function n(n,i){this._vs=n;this._proxy=t.Utilities.JSONMarshaler.attachToPublishedObject("F12.Common.Bridge.IDomBridge",{},!0);this._designTimeProxy=t.Utilities.JSONMarshaler.attachToPublishedObject("F12.Common.Bridge.IDesignTimeDomBridge",{},!0);this._engine={engineId:undefined,portName:""};this._traceWriter=i;this._proxy.addEventListener("attach",this.onAttach.bind(this));this._proxy.addEventListener("connect",this.onConnect.bind(this))}return Object.defineProperty(n.prototype,"channel",{get:function(){return this._channel},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"engine",{get:function(){return this._engine},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"targetEngineKind",{get:function(){return this._targetEngineKind},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inspectElementId",{get:function(){return""},enumerable:!0,configurable:!0}),n.prototype.initialize=function(){var n=this;return this._proxy._call("getTargetEngineKind").then(function(t){n._targetEngineKind=t;switch(t){case 1:n._channel=new Common.VSChannel(n._proxy,n._traceWriter);break;case 2:n._channel=new Common.ChromiumChannel(n._proxy,n._traceWriter)}n._channel.connect(n._engine)})},n.prototype.setForeground=function(n){var i=this;return this._proxy._call("getHostProcessId").then(function(r){return t.Host.allowSetForeground(r),i._proxy._call("setForeground",n)})},n.prototype.takeForeground=function(){this._proxy._post("takeForeground")},n.prototype.bringRemoteToForeground=function(){},n.prototype.allowRemoteToTakeForeground=function(){return this._proxy._call("getRemoteProcessId").then(function(n){return t.Host.allowSetForeground(n)})},n.prototype.activateDomTab=function(){},n.prototype.fireAttachedEvent=function(){},n.prototype.fireDetachedEvent=function(){},n.prototype.runEyedropper=function(){return t.Promise.as("")},n.prototype.getEyedropperColor=function(){return t.Promise.as("")},n.prototype.clickEyedropper=function(){return null},n.prototype.addEventListener=function(n,t){switch(n){case"attach":case"detach":case"switchTab":case"activated":case"deactivated":case"break":case"run":case"load":case"toolMessage":break;case"selectElement":this._designTimeProxy.addEventListener(n,t);return;case"onSourceMapStateChanged":return;default:throw new Error("Invalid eventName: "+n)}this._proxy.addEventListener(n,t);n==="attach"&&this.trySendAttachEventRundown(t)},n.prototype.removeEventListener=function(n,t){this._proxy.removeEventListener(n,t)},n.prototype.getTranslatedLocation=function(n,i,r){return t.Promise.wrap({documentPath:n,oneBasedLine:i,oneBasedColumn:r})},n.prototype.getDesignerConfiguration=function(){return this._designTimeProxy._call("getDesignerConfiguration")},n.prototype.selectElement=function(n){return this._designTimeProxy._call("selectElement",n)},n.prototype.onAttach=function(n){this._attachArgs=n;this._engine.engineId=n.engineId},n.prototype.onConnect=function(n){this._engine.engineId=n.engineId;this._engine.portName=n.portName},n.prototype.trySendAttachEventRundown=function(n){if(this._attachArgs&&n){var t=n;t(this._attachArgs)}},n}(),i;n.VSBridge=r;i=function(){function n(t,i,r){this._f12=t;this._external=i;this._engine={engineId:n.ENGINE_ID,portName:"",targetEngineKind:1};this._channel=new Common.IEChannel(i,r)}return Object.defineProperty(n.prototype,"channel",{get:function(){return this._channel},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"engine",{get:function(){return this._engine},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"targetEngineKind",{get:function(){return 1},enumerable:!0,configurable:!0}),n.prototype.initialize=function(){return this._channel.connect(this._engine),t.Promise.as(null)},n.prototype.setForeground=function(n){var i=this._f12.setForeground(n);return t.Promise.as(i)},n.prototype.takeForeground=function(){this._f12.bringPluginToForeground()},n.prototype.bringRemoteToForeground=function(){this._f12.bringRemoteToForeground()},n.prototype.allowRemoteToTakeForeground=function(){var n=this._f12.getRemoteProcessId(),i=this._f12.allowSetForeground(n);return t.Promise.as(i)},n.prototype.activateDomTab=function(){t.F12.activateTab(t.F12.PluginId.Dom)},n.prototype.runEyedropper=function(){var n=this;return new t.Promise(function(t,i){n._external.utilities.hookEyedropper(function(r){try{n._external.utilities.unhookEyedropper();t(r)}catch(u){i(new Error(u.toString()))}})},function(){n._external.utilities.unhookEyedropper()})},n.prototype.getEyedropperColor=function(){var n=this;return new t.Promise(function(t,i){try{var r=n._external.utilities.getEyedropperColor();t(r)}catch(u){i(new Error(u.toString()))}})},n.prototype.clickEyedropper=function(n,i,r){var u=this;return new t.Promise(function(t,f){try{u._external.utilities.clickEyedropper(n,i,r);t()}catch(e){f(new Error(e.toString()))}})},n.prototype.fireAttachedEvent=function(){this._external.fireAttachedEvent()},n.prototype.fireDetachedEvent=function(){this._external.fireDetachedEvent()},n.prototype.addEventListener=function(n,i){switch(n){case"attach":case"detach":case"connect":case"switchTab":case"activated":case"deactivated":case"break":case"run":case"load":break;case"toolMessage":t.F12.Communications.addEventListener("toolMessage",i);return;case"onSourceMapStateChanged":t.F12.Communications.addEventListener("onSourceMapStateChanged",i);return;default:throw new Error("Invalid eventName: "+n)}this._external.addEventListener(n,i);n==="attach"&&this.trySendAttachEventRundown(i)},n.prototype.getTranslatedLocation=function(n,t,i,r){return this._f12.Debugger.getTranslatedLocation(n,t,i,r)},n.prototype.removeEventListener=function(n,t){this._external.removeEventListener(n,t)},n.prototype.getDesignerConfiguration=function(){return t.Promise.as(null)},n.prototype.selectElement=function(){return t.Promise.as(null)},n.prototype.trySendAttachEventRundown=function(n){if(n){var t={engineId:this._engine.engineId,targetEngineKind:this.engine.targetEngineKind,isDesignerConnected:!1},i=n;i(t)}},n.ENGINE_ID="F12Engine",n}();n.IEBridge=i})(i=n.DomExplorer||(n.DomExplorer={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){n.cssPropertyMetadata={animation:{name:"animation",enumValueListName:"",shorthand:!0},"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:!0},"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:!0},"-ms-flex":{name:"-ms-flex",enumValueListName:"",shorthand:!0},"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:!0},"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:!0},"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:!0},"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:!0},"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:!0},"-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:!0},"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:!0},"background-color":{name:"background-color",enumValueListName:"ColorName"},border:{name:"border",enumValueListName:"",shorthand:!0},"border-image-repeat":{name:"border-image-repeat",enumValueListName:"BorderImageRepeat"},"border-width":{name:"border-width",enumValueListName:"",shorthand:!0},"border-style":{name:"border-style",enumValueListName:"",shorthand:!0},"border-color":{name:"border-color",enumValueListName:"",shorthand:!0},"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:!0},"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:!0},"stop-color":{name:"stop-color",enumValueListName:"ColorName"}}})(t=n.DomExplorer||(n.DomExplorer={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t,i;(function(n){n[n.Root=0]="Root";n[n.HtmlElement=1]="HtmlElement";n[n.Cdata=2]="Cdata";n[n.Comment=3]="Comment";n[n.DocType=4]="DocType";n[n.Text=5]="Text"})(n.DomElementType||(n.DomElementType={}));t=n.DomElementType,function(n){n[n.NodeAdded=0]="NodeAdded";n[n.NodeDeleted=1]="NodeDeleted";n[n.NodeUpdated=2]="NodeUpdated";n[n.TreeCleared=3]="TreeCleared";n[n.AttributeSet=4]="AttributeSet";n[n.AttributeDeleted=5]="AttributeDeleted";n[n.NodeRefreshed=6]="NodeRefreshed"}(n.DomTreeModelEventType||(n.DomTreeModelEventType={}));i=n.DomTreeModelEventType})(DomTree||(DomTree={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(n){this.initialize(n)}return n.prototype.initialize=function(n,t){t===void 0&&(t=!1);this._engineKind=n;this.canAddStyleProperty=!1;this.canAddStyleRule=!1;this.canCopyElementsWithStyle=!1;this.canDeleteNodes=!1;this.canDragAndDropElements=!1;this.canEditAttributes=!1;this.canEditLayout=!1;this.canEditPropertyName=!1;this.canEditPropertyValue=!1;this.canEditRuleSelector=!1;this.canPasteElements=!1;this.canRemoveStyleProperties=!1;this.canRemoveStyleRules=!1;this.canRevertStyles=!1;this.canToggleComputedPropertyEnable=!1;this.canToggleStylePropertyEnable=!1;this.canToggleStyleSubpropertyEnable=!1;this.canViewSource=!1;this.showChangeBars=!1;this.showChangesPane=!1;this.showEventsPane=!1;this.showHighlightingButton=!1;this.showSelectElementButton=!1;this.showSourceFileLinks=!1;this.showSourceTooltips=!1;switch(n){case 1:this.showEventsPane=!0;t||(this.canAddStyleProperty=!0,this.canAddStyleRule=!0,this.canCopyElementsWithStyle=!0,this.canDeleteNodes=!0,this.canDragAndDropElements=!0,this.canEditAttributes=!0,this.canEditLayout=!0,this.canEditPropertyName=!0,this.canEditPropertyValue=!0,this.canEditRuleSelector=!0,this.canPasteElements=!0,this.canRemoveStyleProperties=!0,this.canRemoveStyleRules=!0,this.canRevertStyles=!0,this.canToggleComputedPropertyEnable=!0,this.canToggleStylePropertyEnable=!0,this.canToggleStyleSubpropertyEnable=!0,this.canViewSource=!0,this.showChangeBars=!0,this.showChangesPane=!0,this.showHighlightingButton=!0,this.showSelectElementButton=!0,this.showSourceFileLinks=!0,this.showSourceTooltips=!0);break;case 2:t||(this.canAddStyleProperty=!0,this.canAddStyleRule=!0,this.canDeleteNodes=!0,this.canDragAndDropElements=!0,this.canEditAttributes=!0,this.canEditLayout=!0,this.canEditPropertyName=!0,this.canEditPropertyValue=!0,this.canEditRuleSelector=!0,this.canRemoveStyleProperties=!0,this.canToggleStylePropertyEnable=!0,this.canViewSource=!0,this.showHighlightingButton=!0,this.showSelectElementButton=!0,this.showSourceFileLinks=!0,this.showSourceTooltips=!0)}},n.prototype.filterByDocMode=function(n){this._engineKind===1&&(this.showEventsPane=n>=9)},n}();n.Capabilities=t})(t=n.DomExplorer||(n.DomExplorer={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(n,t,i,r,u){this._htmlElementSource=n;this._domExplorer=t;this._domTree=i;this._bridge=r;this._dataSource=u}return n.prototype.cancel=function(){this._editor&&this._editor.forcedClose()},n.prototype.edit=function(n,t,i){var r=this,a=t?Number.MAX_VALUE:20,o,s,h,c,l;this._editor=new Dom.ValueEditor(document,this._domExplorer,this._bridge,window,a,null,i);this._editor.doTrim=!1;var v=n.getElement(),u=v.get(0),f=this.getContainerCell(u),e;return t?(o=new Dom.ValueEditorKey("Enter",!1,!0),this._editor.stopPropagation=!1,this._editor.addExitKeys(o),this._editor.enableTabsInData(),this._editor.removeExitKeys(Dom.ValueEditorKey.EnterKey),this._editor.shouldContinueEdit=function(n){return n.className.indexOf("BPT-stackPanel")>-1&&n.tagName==="DIV"||n.className.indexOf("hostedF12")>-1&&n.tagName==="HTML"?!0:!1},u=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(f,"domTreeItemDataTemplateName").firstElementChild,e=f.clientWidth*.8):(s=u.getBoundingClientRect(),h=f.getBoundingClientRect(),e=h.right-s.left-20),c=this.createOnSizeChangeHandler(n),this.preEditRenderPrep(n),l=this._editor.show(u,e,undefined,c),n.isBeingEdited=!0,t&&(this._editor.textBox.style.overflowY="hidden"),l.then(function(i){n.isBeingEdited=!1;i.wasCancelled||i.oldValue===i.newValue||(r._domTree.selectedItem=n.parentItem,t?r._domExplorer.setEditAsHtmlText(n.uid,i.newValue):r._domExplorer.editTextRemote(n.uid,i.newValue));r._domExplorer.focusToTree();r.postEditRenderCleanup(n);r._editor=null})},n.prototype.getContainerCell=function(n){return F12.DomExplorer.DomExplorerWindow.findAncestorByClass(n,"domTreeItemDataTemplateNameCell")},n.prototype.preEditRenderPrep=function(n){var t=this._htmlElementSource.querySelector("#treeContainer .BPT-listItemContainer[data-id='"+n.id+"']");n.dontVirtualize=!0;this._dataSource.domTree.pauseDomMutations()},n.prototype.postEditRenderCleanup=function(n){this._domTree.invalidateItemRowSpan(n);n.dontVirtualize=!1;this._dataSource.domTree.resumeDomMutations()},n.prototype.createOnSizeChangeHandler=function(n){var t=this;return function(){t._domTree.invalidateItemRowSpan(n)}},n}();n.TextEditController=t})(DomTree||(DomTree={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){n.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","rebeccapurple","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"]}}})(t=n.DomExplorer||(n.DomExplorer={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){n.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"}}}}})(t=n.DomExplorer||(n.DomExplorer={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){"use strict";var i=function(){function t(){this._cssMetadata=n.DomExplorer.cssPropertyMetadata;this._enumValueLists=n.DomExplorer.enumMetadata;this._htmlMetadata=n.DomExplorer.htmlMetadata;this._htmlTagNames=[];for(var t in this._htmlMetadata)this._htmlTagNames.push(t);this.sortEnumValueListContents()}return t.prototype.getCssShorthandList=function(){var n=[];for(var t in this._cssMetadata)this._cssMetadata[t].shorthand&&n.push(this._cssMetadata[t].name);return n.sort(),n},t.prototype.getCssValueList=function(n){var t=this._cssMetadata[n],i;return!t||!t.enumValueListName?null:(i=this._enumValueLists[t.enumValueListName].values,i.sort(),i)},t.prototype.getHtmlValueList=function(n,t){var u=this._htmlMetadata[n],i,r;return u?(i=u[t],!i)?null:(r=this._enumValueLists[i.enumValueListName].values,r.sort(),r):null},t.prototype.getHtmlTagNames=function(){return this._htmlTagNames},t.prototype.getHtmlAttributeNames=function(n){var t=[],i=this._htmlMetadata[n],r;if(!i)return null;for(r in i)t.push(r);return t.sort(),t},t.prototype.sortEnumValueListContents=function(){var n,t;for(n in this._enumValueLists)t=this._enumValueLists[n],t.values.sort()},t}();t.CssAndHtmlMetadataSource=i})(t=n.DomExplorer||(n.DomExplorer={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t;(function(n){var t=function(n){function t(t,i){n.call(this,!1);this._metadataSource=i;this.updateChoices(t);this._traceWriter=new Common.TraceWriter}return __extends(t,n),Object.defineProperty(t.prototype,"hasChoices",{get:function(){return this._hasChoices},enumerable:!0,configurable:!0}),t.prototype.updateChoices=function(n){var r=[],i=this._metadataSource.getCssValueList(n),t;if(i)for(this._hasChoices=!0,t=0;t<i.length;t++)r.push(new Common.Intellisense.IntellisenseChoice(i[t],""));else this._hasChoices=!1;this.choices=r},t.prototype.clearChoices=function(){this.choices=[];this._hasChoices=!1},t.prototype.fireSetFilterStartEvent=function(){},t.prototype.fireSetFilterEndEvent=function(){},t.prototype.fireUpdateLayoutStartEvent=function(){this._traceWriter.raiseEvent(523)},t.prototype.fireUpdateLayoutEndEvent=function(){this._traceWriter.raiseEvent(524)},t}(Common.Intellisense.StaticContentProvider);n.StylePropertyValueIntellisenseProvider=t})(t=n.DomExplorer||(n.DomExplorer={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var r,t,i;(function(n){n[n.None=0]="None";n[n.Name=1]="Name";n[n.Value=2]="Value";n[n.Add=3]="Add";n[n.Selector=4]="Selector"})(n.StyleEditMode||(n.StyleEditMode={}));r=n.StyleEditMode;t=function(){function n(n,t){this.selection=n;this.editMode=t}return n}();n.StyleEditLocation=t;i=function(n){function i(t,i,r){var u=this;n.call(this);this._remoteDom=t;this._domExplorer=i;this._styleCache=r;this._collapsedProperties={};this._styleProperties=[];this.listSource=function(n,t){var i=t[0];u._styleCache.updateView(i,function(t){u._styles=t;n(u._styles.rules);u._collapsedProperties={};u.currentSelection=null;u._styles.rules.forEach(function(n){n.properties.forEach(function(n){u._collapsedProperties[n.uid]=!0})})});u._styleProperties.length===0&&(u._remoteDom.getTargetEngineKind()===2?u._styleProperties=F12.DomExplorer.Chromium.Properties.getAllProperties():u._remoteDom.getComputedStyles(i).done(function(n){var r,i,t;if(n){r=n[0];for(t in r)u._styleProperties.push(t);i=u.cssAndHtmlMetadataSource.getCssShorthandList();for(t in i)u._styleProperties.push(i[t]);u._styleProperties.sort()}}))};this.cssAndHtmlMetadataSource=new F12.DomExplorer.CssAndHtmlMetadataSource}return __extends(i,n),i.clearCollapsedRules=function(){i.CollapsedRules={}},i.prototype.forEachRule=function(n){this._styles.rules.forEach(n)},i.prototype.addUpdateListeners=function(n){this._styles.addUpdateListener(n)},i.prototype.select=function(n){this.currentSelection=n},i.prototype.previousSelection=function(n,t,i){if(i===void 0&&(i=!0),t)return n.container?n.container.container||n.container:this.previousRule(n);var u,r;return n.isRule?(u=this.previousRule(n),u&&this.isExpanded(u)&&!this.isEmpty(u))?(r=this.lastProperty(u),i&&this.isExpanded(r)&&!this.isEmpty(r))?this.lastProperty(r):r:u:n.isProperty?(r=this.previousProperty(n),!r)?n.container:i&&this.isExpanded(r)&&!this.isEmpty(r)?this.lastProperty(r):r:(r=this.previousProperty(n),i?r||n.container:n.container)},i.prototype.nextSelection=function(n,t,i){var u,r;return(i===void 0&&(i=!0),t)?(u=n.isRule?n:n.isProperty?n.container:n.container.container,this.nextRule(u)):this.isExpanded(n)&&!this.isEmpty(n)&&(i||n.isRule)?this.firstProperty(n):n.isRule?this.nextRule(n):(r=this.nextProperty(n),r&&(i||r.isProperty))?r:n.isSubProperty&&i?(r=this.nextProperty(n.container),r||this.nextRule(n.container.container)):this.nextRule(n.container)},i.prototype.outSelection=function(){var n=this.currentSelection;return n.container},i.prototype.inSelection=function(){var n=this.currentSelection;return this.firstProperty(n)},i.prototype.firstRule=function(){return this._styles.rules[0]},i.prototype.lastRule=function(){return this._styles.rules[this._styles.rules.length-1]},i.prototype.lastSelection=function(n){n===void 0&&(n=!0);var t=this.lastRule();return this.isExpanded(t)&&!this.isEmpty(t)&&(t=this.lastProperty(t),this.isExpanded(t)&&!this.isEmpty(t)&&(t=this.lastProperty(t))),t},i.prototype.nextRule=function(n){for(var i=this._styles.rules,t=0;t<i.length;t++)if(i[t]===n)return t<i.length-1?i[t+1]:null},i.prototype.previousRule=function(n){for(var i=this._styles.rules,t=0;t<i.length;t++)if(i[t]===n)return t>0?i[t-1]:null},i.prototype.firstProperty=function(n){for(var i,t=0;t<n.properties.length;t++)if(i=n.properties[t],i.isApplied)return i},i.prototype.lastProperty=function(n){for(var i,t=n.properties.length-1;t>=0;t--)if(i=n.properties[t],i.isApplied)return i},i.prototype.nextProperty=function(n){for(var t,r=n.container.properties,u=!1,i=0;i<r.length;i++){if(t=r[i],u&&t.isApplied)return t;t===n&&(u=!0)}},i.prototype.previousProperty=function(n){for(var t,r=n.container.properties,u,i=0;i<r.length;i++){if(t=r[i],t===n)return u;t.isApplied&&(u=t)}},i.prototype.isExpanded=function(n){return!n||(n.isRule?!i.CollapsedRules[n.uid]:n.properties.length>0&&!this._collapsedProperties[n.uid])},i.prototype.isEmpty=function(n){for(var t=0;t<n.properties.length;t++)if(n.properties[t].isApplied)return!1;return!0},i.prototype.setExpanded=function(n,t){if(n.isRule||n.isProperty&&n.properties.length){var r=n.isRule?i.CollapsedRules:this._collapsedProperties;t?delete r[n.uid]:r[n.uid]=!0}},i.prototype.getStyleProperties=function(){return this._styleProperties},i.prototype.getPropertyById=function(n){return this._styles.getPropertyById(n)},i.prototype.getRuleById=function(n){return this._styles.getRuleById(n)},i.prototype.createNewRule=function(n){return this._styles.createNewRule(n)},i.prototype.getNextEdit=function(n,i,r,u){var o,f,s=!1,y=!1,c,l,e,w,a,v,h,p;if(!r&&!n.isDeleted){if(!u&&i===1)return new t(n,2);if(u&&i===2)return new t(n,1)}for(c=this._styles.rules,l=0;l<c.length;l++){if(e=c[l],e===n&&u){if(f)return f;y=!0}if(!e.isInlined&&!e.isDeleted){if(f=new t(e,4),s)return f;o||(o=f)}if(e!==n||u||(s=!0),!e.isDeleted&&this.isExpanded(e)){for(w=e.properties,a=e.properties.length,v=0;v<a;v++)if(h=w[v],h===n)if(u){if(f)return f;y=!0}else s=!0;else if(!h.isDeleted){if(f=new t(h,1),s)return f;o||(o=f);f=new t(h,2)}if(p=e.properties[a-1],n!==p||!r){if(f=new t(a?p:e,3),s)return f;o||(o=f)}}}return y&&f?f:s&&o?o:new t(c[0],3)},i.prototype.hoverElement=function(n,t){t?this._domExplorer.temporaryShowElementHighlight(n):this._domExplorer.restoreElementHighlight()},i.prototype.enableEditChaining=function(){this._remoteDom.enableEditChaining()},i.prototype.disableEditChaining=function(){this._remoteDom.disableEditChaining()},i.prototype.startSingleEdit=function(){this._remoteDom.startSingleEdit()},i.prototype.endSingleEdit=function(){this._remoteDom.endSingleEdit()},i.prototype.handleFileLinkClick=function(n,t,i){Common.ProjectDocuments.showDocument(n,t,i)},i.CollapsedRules={},i}(Common.ModelView.ListModel);n.StyleModel=i}(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t;(function(n){var t=function(n){function t(t){var r,u,i;for(n.call(this,!1),r=[],u=t.getStyleProperties(),i=0;i<u.length;i++)r.push(new Common.Intellisense.IntellisenseChoice(u[i],""));this.choices=r;this._traceWriter=new Common.TraceWriter}return __extends(t,n),t.prototype.fireSetFilterStartEvent=function(){},t.prototype.fireSetFilterEndEvent=function(){},t.prototype.fireUpdateLayoutStartEvent=function(){this._traceWriter.raiseEvent(523)},t.prototype.fireUpdateLayoutEndEvent=function(){this._traceWriter.raiseEvent(524)},t}(Common.Intellisense.StaticContentProvider);n.StylePropertyIntellisenseProvider=t})(t=n.DomExplorer||(n.DomExplorer={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,u=Common.Templating,f=function(r){function f(n,t,u,e,o,s,h,c,l){r.call(this,e,o,s,h,n.capabilities,l,c);this._domExplorer=n;this._htmlElementSource=e;this._rightPaneElement=e.getElementById("paneRight");this._bridge=t;this._remoteDom=u;this._stylesListElement=this.htmlElementSource.getElementById(this.listViewDivId);this._model=h;this._domExplorer.horizontalPane.addResizeListener(this);this._scrollContainer=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(this._stylesListElement,f.CssScrollContainer);this._hotElement=undefined;this._hotElementTimeoutToken=0;this.initializeColorPicker();this._styleViewMenuController=new i(this,this.htmlElementSource.getElementById("paneRight"),this._stylesListElement,this._domExplorer.capabilities,this._bridge);this.addEventHandlers()}return __extends(f,r),Object.defineProperty(f.prototype,"currentSelection",{get:function(){var n=this._model.currentSelection,t;return n||(t=this.currentElementSelection,t&&(n=this.findClosestItem(t),this._model.select(n))),n},set:function(n){this._model.currentSelection=n;var t=this.findElementForSelection(n);t?this.setFocus(t):this._rightPaneElement.focus()},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"currentElementSelection",{get:function(){return this._stylesListElement.querySelector(":focus")},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"ruleCount",{get:function(){return this._stylesListElement.children.length},set:function(){throw new Error("set ruleCount not supported")},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"propertyCount",{get:function(){var n=0;return this._model.forEachRule(function(t){n+=t.properties.length}),n},enumerable:!0,configurable:!0}),f.isRuleExpanded=function(n){return n=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(n,f.CssRule),n.getAttribute("aria-expanded")==="true"},f.isPropertyExpanded=function(n){return n=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(n,f.CssProperty),n.getAttribute("aria-expanded")==="true"},f.prototype.onPropertyChange=function(n,t,i){switch(n){case 3:this.onPropertyWinningRuleChange(t,i);break;case 4:this.onPropertyEnableChange(t,i);break;case 5:this.onPropertyAppliedChange(t,i);break;case 6:this.onPropertyStatusChange(t,i);break;case 0:this.onPropertyUidChange(t,i);break;case 1:this.onPropertyNameChange(t,i);break;case 2:this.onPropertyValueChange(t,i);break;case 7:this.onPropertyClearSubproperties(t);break;case 8:this.onPropertyAddSubproperty(t,i);break;case 9:this.onPropertySelectChange(t);break;case 10:this.onPropertyRemoveChange(t,i);break;case 11:this.setPropertyChangeBar(t)}this.checkPropertyColorUpdate(t)},f.prototype.onRuleChange=function(n,t,i){switch(n){case 0:this.onRuleUidChange(t,i);break;case 1:this.onRuleSelectorChange(t,i);break;case 2:this.onRuleAddPropertyChange(t,i);break;case 5:this.onRuleSelectChange(t);break;case 6:this.setRuleChangeBar(t);break;case 7:this.setRuleFileLinkTooltipChange(t,i);break;case 3:this.onRuleAddRuleChange(t);break;case 4:this.onRuleRemoveChange(t);break;case 8:this.setRuleFileLinkChange(t,i)}},f.prototype.postViewProcessing=function(){var t=this,i,n;r.prototype.postViewProcessing.call(this);this._model.forEachRule(function(n){if(!t._model.isExpanded(n)){var i=t.findElementForSelection(n);t.toggleExpander(i,f.CssRule)}});this._model.addUpdateListeners(this);this.adjustToPaneSize();i=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(this._stylesListElement,f.CssRule);i&&(i.tabIndex=1);this._model.forEachRule(function(n){n.properties.forEach(function(n){if(n.isEnabledIndeterminate){t.onPropertyChange(4,n,undefined);t.setPropertyChangeBar(n)}})});this._htmlElementSource.querySelector(":focus")===this._rightPaneElement&&(this._selectionBeforeRefresh&&(n=this._model.getRuleById(this._selectionBeforeRefresh)||this._model.getPropertyById(this._selectionBeforeRefresh),this._selectionBeforeRefresh=null),n||(n=this._model.firstRule()),n&&(this.currentSelection=n.isSubProperty?n.container:n));this._refreshCallback&&(this._refreshCallback(),this._refreshCallback=null)},f.prototype.addEventHandlers=function(){this.addMouseEventHandlers();this.addKeyboardEventHandlers();this.addMutationEventHandlers();Common.ClipboardHelper.addCopyListener(this.listRoot,this.onCopy.bind(this))},f.prototype.toggleExpander=function(n,i){var r=this;return new t.Promise(function(t,u){var e,f;n=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(n,i);n?(e=n.getAttribute("aria-expanded")!=="true",n.setAttribute("aria-expanded",e?"true":"false"),f=r.findClosestItem(n),f.isRule&&r.setRuleChangeBar(f,!1),t()):u(new Error("Expander not found in view"))})},f.prototype.togglePropertyCheckbox=function(n){return n.toggleEnable()},f.prototype.refresh=function(n){this._refreshCallback=n;this._rightPaneElement.focus();var t=this.currentSelection;t&&(this._selectionBeforeRefresh=t.uid);this._domExplorer.refreshCSSView()},f.prototype.revertSelection=function(n){var i=this;return new t.Promise(function(t){n.revert().done(function(){n.isRule&&!i._model.isExpanded(n)&&i.toggleExpander(i.findElementForSelection(n),f.CssRule);t()})})},f.prototype.removeRuleOrProperty=function(n,t){var i=this,f=this.findElementForSelection(n),u,r;n.isProperty?(u=n,u.commitDelete(!0).done(function(){i.currentSelection=i.currentSelection;t&&t(!0)})):(r=n,r.isInlined||r.commitDelete().done(function(){i.currentSelection=i.currentSelection;t&&t(!0)}))},f.prototype.addProperty=function(n,i,r,u){var h=this,o,l,s,e,c;return u===void 0&&(u=!0),o=this.findElementForSelection(n),l=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(o,f.CssItem),this._model.isExpanded(n)||this.toggleExpander(o,f.CssRule),s=this._model.nextSelection(i,!1,!1),e=n.addProperty(null,!1,!s||s.isRule?null:s),this._model.setExpanded(e,!1),c=function(n,t){var i=h.insertNewPropertyIntoView(o,e);i&&(Common.ToolWindowHelpers.scrollIntoView(i,h._scrollContainer),u&&h.prepareEditBox(e,n));t(e)},new t.Promise(function(n){r?e.commitName(r).done(function(){return c(2,n)}):c(1,n)})},f.prototype.addRule=function(n,i){var s=this,r="",o=this._domExplorer.getSelectedDomTreeItem(),e,u,h;return o&&(e=o.node.getAttributeByName("id"),r=e?e.value:undefined,r?r="#"+r.trim():(e=o.node.getAttributeByName("class"),e&&(r=e.value),r=r?"."+r.trim().split(" ")[0]:o.tag)),u=this._model.createNewRule(n||r),h=this.insertNewRuleIntoView(u),this.adjustToPaneSize(),Common.ToolWindowHelpers.scrollIntoView(h,this._scrollContainer),new t.Promise(function(t,r){if(n)s.addProperty(u,u,i,!1).done(function(){t(u.properties[0])},r);else{var e=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(h,f.CssSelector);s._selectionInEditMode=u;s.editSelector(u,function(n){n?t(u.properties[0]):(u.commitDelete(),r())})}})},f.prototype.findClosestItem=function(n){var i,t=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(n,f.CssSubProperty);return t&&(i=this._model.getPropertyById(f.getSubpropertyId(t))),i||(t=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(n,f.CssProperty),t&&(i=this._model.getPropertyById(f.getPropertyId(t)))),i||(t=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(n,f.CssRule),t&&(i=this._model.getRuleById(f.getRuleId(t)))),i||(t=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(n,f.CssItem),t&&(t=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(t,f.CssRule),t&&(i=this._model.getRuleById(f.getRuleId(t))))),i},f.prototype.select=function(n){var t=this.findClosestItem(n);return t?(this.currentSelection=t,!0):!1},f.prototype.findRuleElement=function(n){return n>=0&&n<this._stylesListElement.children.length?this._stylesListElement.children[n]:null},f.prototype.findPropertyElementForRule=function(n,t){for(var r,u=F12.DomExplorer.DomExplorerWindow.findAllDescendentsByClass(n,f.CssPropertyName),i=0;i<u.length;i++)if(r=u[i],r.textContent===t)return F12.DomExplorer.DomExplorerWindow.findAncestorByClass(r,f.CssProperty);return null},f.prototype.findSubPropertyElementForProperty=function(n,t){for(var r,u=F12.DomExplorer.DomExplorerWindow.findAllDescendentsByClass(n,f.CssSubPropertyName),i=0;i<u.length;i++)if(r=u[i],r.textContent===t)return F12.DomExplorer.DomExplorerWindow.findAncestorByClass(r,f.CssSubProperty);return null},f.prototype.setPropertyValue=function(n,t){var i=f.getPropertyId(n),r=this._model.getPropertyById(i);return r.commitValue(t)},f.prototype.setPropertyName=function(n,t){var i=f.getPropertyId(n),r=this._model.getPropertyById(i);return r.commitName(t)},f.prototype.setPropertyRevert=function(n){var t=f.getPropertyId(n),i=this._model.getPropertyById(t);return this.revertSelection(i)},f.prototype.setRuleSelector=function(n,t){var i=f.getRuleId(n),r=this._model.getRuleById(i);return r.commitSelector(t)},f.prototype.setRuleRevert=function(n){var t=f.getRuleId(n),i=this._model.getRuleById(t);return this.revertSelection(i)},f.prototype.onPaneResize=function(n,t){this._stylesListElement.style.maxWidth=t+"px"},f.prototype.getRuleByElement=function(n){var t=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(n,f.CssRule),i=f.getRuleId(t);return this._model.getRuleById(i)},f.prototype.openTargetElementFileLink=function(n){var t=n.styleHref;t||(t=n.fileUrl);this._model.handleFileLinkClick(t,n.fileLine,n.fileColumn)},f.prototype.enterEditMode=function(n,t){var i=this,f=function(n,t){i._selectionInEditMode=n;setTimeout(t,0)},r,u;if(n.isSubProperty&&(n=n.container),n.isProperty&&!n.isDeleted){r=n;switch(t){case 1:return f(r,function(){i.editPropertyName(r)}),!0;case 2:return f(r,function(){i.editPropertyValue(r)}),!0}}if(u=n.isRule?n:n.container,!u.isDeleted)switch(t){case 3:return f(null,function(){i.addProperty(u,n)}),!0;case 4:return f(u,function(){i.editSelector(u)}),!0}return this._selectionInEditMode=null,!1},f.prototype.findElementForSelection=function(n,t){return n?this._stylesListElement.querySelector("[data-uid='"+n.uid+"']"+(t?" ."+t:"")):null},Object.defineProperty(f.prototype,"isFocusWithinInlineStyle",{get:function(){var i=this.currentElementSelection,n,t;return i?(n=this.findClosestItem(i),!n)?!1:(t=n.isRule?n:n.container,t&&t.isInlined):!1},enumerable:!0,configurable:!0}),f.isSubProperty=function(n){return n.classList.contains(f.CssSubProperty)},f.isProperty=function(n){return n.classList.contains(f.CssProperty)},f.isRule=function(n){return n.classList.contains(f.CssRule)},f.getSubpropertyId=function(n){return n=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(n,f.CssSubProperty),n?n.getAttribute(f.ATTR_UID):null},f.getPropertyId=function(n){return n=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(n,f.CssProperty),n.getAttribute(f.ATTR_UID)},f.getRuleId=function(n){return n=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(n,f.CssRule),n.getAttribute(f.ATTR_UID)},f.findAncestorRuleOrProperty=function(n){var r=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(n,f.CssSubProperty),t,i;return r?r:(t=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(n,f.CssProperty),t)?t:(i=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(n,f.CssRule),i)?i:null},f.prototype.onPropertyWinningRuleChange=function(n){var t=this.findPropertyElement(n),i;t&&(n.isStrikeThrough?t.classList.add(f.CssNotWinning):t.classList.remove(f.CssNotWinning),i=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(t,f.CssPropertyAriaOverridden),i&&(i.innerText=n.ariaOverriddenString))},f.prototype.adjustToPaneSize=function(){var n=this._domExplorer.horizontalPane;this.onPaneResize(n.leftWidth,n.rightWidth)},f.prototype.validateHotElement=function(){for(var n=this._hotElement;n;){if(n===this._stylesListElement)return!0;n=n.parentNode}return this._hotElementTimeoutToken&&window.clearTimeout(this._hotElementTimeoutToken),this._hotElement=undefined,!1},f.prototype.addMouseEventHandlers=function(){var t=this;this.addHandler(this.listRoot,"mousedown",null,function(n){return t._isInEditModeOnMouseDown=!!t._selectionInEditMode,t._hotElementTimeoutToken&&(window.clearTimeout(t._hotElementTimeoutToken),t._hotElementTimeoutToken=0),t._hotElement=n.target,t._hotElementTimeoutToken=window.setTimeout(function(){t._hotElement=undefined;t._hotElementTimeoutToken=0},250),!0});this.addHandler(this.listRoot,"click",null,function(i){var u,o,s,r,e;if(t.validateHotElement(),u=t._hotElement||i.target,o=t._isInEditModeOnMouseDown,t._isInEditModeOnMouseDown=!1,u.classList.contains(f.CssInheritedFromTarget))return s=i.target.getAttribute("data-id"),n.Utility.domTreeSelect(s),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.SELECT_INHERITED_FROM_TARGET,0),!1;if(r=t.findClosestItem(u),e=t._domExplorer.capabilities,r){if(u.classList.contains(f.CssExpandRuleIcon))return t.toggleExpander(u,f.CssRule),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.TOGGLE_GROUP,0),t.currentSelection=r,!1;if(u.classList.contains(f.CssExpandShorthandIcon))return t.toggleExpander(u,f.CssProperty),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.TOGGLE_GROUP,0),t.currentSelection=r,!1;if((e.canToggleStylePropertyEnable&&r.isProperty||e.canToggleStyleSubpropertyEnable&&r.isSubProperty)&&u.classList.contains(f.CssCheckbox)&&r.status===1)return t.togglePropertyCheckbox(r),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.TOGGLE_PROPERTY_CHECKBOX,0),t.currentSelection=r,!1;if(u.classList.contains(f.CssPropertyName)&&e.canEditPropertyName)return t.prepareEditBox(r,1),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.EDIT_PROPERTY_NAME,0),!0;if(u.classList.contains(f.CssPropertyColor)&&r.isProperty&&e.canEditPropertyValue&&(F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.ATTACH_COLOR_PICKER,0,0),t.attachColorPicker(r)))return!1;if(u.classList.contains(f.CssPropertyValue)&&e.canEditPropertyValue)return t.prepareEditBox(r,2),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.EDIT_PROPERTY_VALUE,0),!0;if(u.classList.contains(f.CssSubPropertyValue)&&e.canAddStyleProperty)return t.editSubproperty(r),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.EDIT_SUBPROPERTY_VALUE,0),!0;if(e.canAddStyleProperty&&(u.classList.contains(f.CssPropertyValueContainer)||u.classList.contains(f.CssEmptyRuleSpace)||u.classList.contains(f.CssBlockFooter)||u.classList.contains(f.CssSelectorContainer)))return o||(u.classList.contains(f.CssBlockFooter)&&(r=t._model.lastProperty(r)||r),t.prepareEditBox(r,3),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.ADD_PROPERTY,0)),!0;if(u.classList.contains(f.CssSelector)&&r.isEditable&&e.canEditRuleSelector)return t.prepareEditBox(r,4),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.EDIT_RULE_SELECTOR,0),!0;if(u.classList.contains(f.CssFileLink))return t.openTargetElementFileLink(r),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.VIEW_SOURCE,0),!1;t.currentSelection=r}return!r});this.addHandler(this.listRoot,"mouseover",[f.CssInheritedFromTarget],function(n){return t.hoverRuleTarget(n,!0),!0});this.addHandler(this.listRoot,"mouseout",[f.CssInheritedFromTarget],function(n){return t.hoverRuleTarget(n,!1),!0})},f.prototype.addKeyboardEventHandlers=function(){var n=this;this.addHandler(this.listRoot,"keydown",null,function(t){var i=n.currentSelection,e=t.shiftKey&&!t.ctrlKey&&!t.altKey,h=t.ctrlKey&&!t.shiftKey&&!t.altKey,r=!t.shiftKey&&!t.ctrlKey&&!t.altKey,o,u,s,c;if(t.keyCode===75&&h&&i)return n.attachColorPicker(i),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.ATTACH_COLOR_PICKER,1,0),!1;if(n._selectionInEditMode)return!0;if(i){if(t.keyCode===38&&(r||e))return n.moveSelection(n._model.previousSelection(i,e)),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.MOVE_SELECTION_PREV,1),!1;if(t.keyCode===40&&(r||e))return n.moveSelection(n._model.nextSelection(i,e)),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.MOVE_SELECTION_NEXT,1),!1;if(o=n.findElementForSelection(i),t.keyCode===37&&r)return!i.isSubProperty&&n._model.isExpanded(i)?(n.toggleExpander(o,i.isRule?f.CssRule:f.CssProperty),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.TOGGLE_GROUP,1)):(n.moveSelection(n._model.outSelection()),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.MOVE_SELECTION_OUT,1)),!1;if(t.keyCode===39&&r)return i.isSubProperty||(n._model.isExpanded(i)?(n.moveSelection(n._model.inSelection()),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.MOVE_SELECTION_IN,1)):(n.toggleExpander(o,i.isRule?f.CssRule:f.CssProperty),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.TOGGLE_GROUP,1))),!1;if(t.keyCode===36&&r)return n.moveSelection(n._model.firstRule()),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.MOVE_SELECTION_FIRST,1),!1;if(t.keyCode===35&&r)return n.moveSelection(n._model.lastRule()),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.MOVE_SELECTION_LAST,1),!1;if(u=n._domExplorer.capabilities,!i.isDeleted){if(t.keyCode===46&&r)return(i.isRule&&u.canRemoveStyleRules||i.isProperty&&u.canRemoveStyleProperties)&&!i.isDeleted&&(n.removeRuleOrProperty(i),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.DELETE_ITEM,1)),!1;if(i.isProperty||i.isSubProperty){if(s=i,(u.canToggleStylePropertyEnable&&i.isProperty||u.canToggleStyleSubpropertyEnable&&i.isSubProperty)&&t.keyCode===32&&r&&s.status===1)return n.togglePropertyCheckbox(s),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.TOGGLE_PROPERTY_CHECKBOX,1),!1;if(t.keyCode===13&&r&&u.canEditPropertyValue)return i.isProperty&&u.canEditPropertyValue?(n.prepareEditBox(i,2),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.EDIT_PROPERTY_VALUE,1)):i.isSubProperty&&u.canAddStyleProperty&&(n.editSubproperty(i),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.EDIT_SUBPROPERTY_VALUE,1)),!1;if(t.keyCode===113&&r&&i.isProperty&&u.canEditPropertyName)return n.prepareEditBox(i,1),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.EDIT_PROPERTY_NAME,1),!1}else if(t.keyCode===13&&r&&u.canEditRuleSelector&&(c=i,c.isEditable))return n.prepareEditBox(i,4),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.EDIT_RULE_SELECTOR,1),!1}if(t.keyCode===32&&(r||h))return!1}return!0});t.F12&&(this.colorPickerControl.onCustomKeyDown=function(t){var i=t.ctrlKey&&!t.shiftKey&&!t.altKey;return t.keyCode===75&&i?(n.colorPickerViewModel.isVisible=!1,!0):!1})},f.prototype.onCopy=function(){if(F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.COPY_STYLES_VIEW_SELECTION_TO_CLIPBOARD,1),Common.ToolWindowHelpers.hasSelectedText())return Common.ToolWindowHelpers.getTextForClipboard();var n=this.currentSelection;return n?n.formatForCopy:undefined},f.prototype.addMutationEventHandlers=function(){var n=this;this.addHandler(this.listRoot,"DOMAttrModified",[f.CssRule,f.CssProperty,f.CssSubProperty],function(t){var f=t.target,i=n.findClosestItem(f),r,u;return i&&(t.attrName==="aria-expanded"&&n._model.setExpanded(i,t.newValue==="true"),t.attrName==="aria-checked"&&(i.isProperty||i.isSubProperty)&&t.newValue!=="mixed"&&(r=i,u=t.newValue==="true",r.isEnabled!==u&&n.togglePropertyCheckbox(r))),!0})},f.prototype.editSubproperty=function(n){for(var t,r=n.container,i=n.rule.properties.length-1;i>=0;i--){if(t=n.rule.properties[i],t===r)break;if(t.name===n.name){this.prepareEditBox(t,2);return}}this.addProperty(n.rule,n.container,n.name)},f.prototype.moveEditBox=function(t,i,r,u,f){var s=i||!r||r.equalTo(n.ValueEditorKey.EnterKey),h=r&&r.equalTo(n.ValueEditorKey.ShiftTabKey),e,o;s?(o=!f?t:this._model.previousSelection(t,!1,!1),e=new n.StyleEditLocation(o,0)):e=this._model.getNextEdit(t,u,!!f,h);f&&f.remove(!1);this.prepareEditBox(e.selection,e.editMode)},f.prototype.prepareEditBox=function(n,t){this.enterEditMode(n,t)||(this.currentSelection=n)},f.prototype.hoverRuleTarget=function(n,t){var i=$m(n.target).attr("data-id"),r=this.model;this._model.hoverElement(i,t)},f.prototype.findPropertyElement=function(n,t){var i="."+(n.isSubProperty?f.CssSubProperty:f.CssProperty)+"[data-uid='"+n.uid+"']";return t&&(i+=" ."+t),this._stylesListElement.querySelector(i)},f.prototype.findRuleElementById=function(n,t){var i="."+f.CssRule+"[data-uid='"+n+"']";return t&&(i+=" ."+t),this._stylesListElement.querySelector(i)},f.prototype.moveSelection=function(n){if(n)return this.currentSelection=n,!0},f.prototype.onPropertyEnableChange=function(n,t){var i=this.findPropertyElement(n,f.CssCheckbox),r,u;i&&(i.checked=t!==!1,i.indeterminate=t===undefined,r=i.parentElement,u=i.indeterminate?"mixed":""+t,r.setAttribute("aria-checked",u))},f.prototype.onPropertyAppliedChange=function(n,t){var i=this.findPropertyElement(n);i&&(i=i.parentElement,t&&i.classList.contains(f.CssNotApplied)?i.classList.remove(f.CssNotApplied):t||i.classList.contains(f.CssNotApplied)||this._selectionInEditMode===n||i.classList.add(f.CssNotApplied))},f.prototype.onPropertyUidChange=function(n,t){var i=this.findPropertyElement(n);i&&i.setAttribute(f.ATTR_UID,t)},f.prototype.onPropertySelectChange=function(n){var t=n.container,i;this._model.isExpanded(t)||(i=n.isSubProperty?this.findPropertyElement(t):this.findRuleElementById(t.uid),this.toggleExpander(i,n.isSubProperty?f.CssProperty:f.CssRule));this.currentSelection=n},f.prototype.onPropertyRemoveChange=function(n,t){var r=this.findPropertyElement(n),i;r&&(i=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(r,f.CssPropertyContainer),i.parentElement.removeChild(i));t&&(this.currentSelection=t)},f.prototype.setPropertyChangeBar=function(t){var i=this.findPropertyElement(t),r,u;if(i){var e=this._model.isExpanded(t),s=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(i,f.CssChangeBar),o=e?t.changeState:t.extendedChangeState;s.setAttribute("data-change",o);r=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(i,f.CssPropertyAriaChangeState);r&&(r.innerText=t.ariaChangeStateString);u=o===n.StyleChangeNotifier.CHANGE_BAR_REMOVE;i.setAttribute("data-removed",u);u&&!t.isSubProperty&&e&&this.toggleExpander(i,f.CssProperty)}},f.prototype.setRuleChangeBar=function(t,i){var r,o,u,e;if(i===void 0&&(i=!0),r=this.findRuleElementById(t.uid),r){var h=this._model.isExpanded(t),c=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(r.parentElement,f.CssChangeBar),s=h?t.changeState:t.extendedChangeState;c.setAttribute("data-change",s);o=t;o&&r.setAttribute("aria-label",o.ariaLabel);u=s===n.StyleChangeNotifier.CHANGE_BAR_REMOVE;r.setAttribute("data-removed",u);e=r.previousElementSibling;e&&e.classList.contains(f.CssParentRule)&&e.setAttribute("data-removed",u);u&&i&&this._model.isExpanded(t)&&this.toggleExpander(r,f.CssRule)}},f.prototype.setRuleFileLinkChange=function(n){var t=this.findRuleElementById(n.uid,f.CssFileLink),i;t&&(i=n,i&&(t.innerText=n.fileLinkText))},f.prototype.setRuleFileLinkTooltipChange=function(n,t){var i=this.findRuleElementById(n.uid,f.CssFileLink),r;i&&(r=n,r&&i.setAttribute("data-tooltip",t))},f.prototype.onRuleUidChange=function(n,t){var i=this.findRuleElementById(n.uid);i&&i.setAttribute(f.ATTR_UID,t)},f.prototype.onRuleSelectorChange=function(n,t){var i=this.findRuleElementById(n.uid,f.CssSelector);i&&(i.textContent=t,i.setAttribute("data-tooltip",t))},f.prototype.onRuleAddPropertyChange=function(n,t){var i=this.findRuleElementById(n.uid);i&&(this.insertNewPropertyIntoView(i,t),this._model.setExpanded(t,!1))},f.prototype.onRuleAddRuleChange=function(n){var t=this.insertNewRuleIntoView(n);this._model.setExpanded(n,!0)},f.prototype.onRuleRemoveChange=function(n){var i=this.findRuleElementById(n.uid),t;i&&(t=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(i,f.CssItem),t.parentElement.removeChild(t))},f.prototype.onRuleSelectChange=function(n){if(!this._model.isExpanded(n)){var t=this.findRuleElementById(n.uid);this.toggleExpander(t,f.CssRule)}this.currentSelection=n},f.prototype.onPropertyStatusChange=function(n,t){var i=this.findPropertyElement(n);if(i){var r=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(i,f.CssPropertyName),u=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(i,f.CssPropertyValue),e=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(i,f.CssPropertyNameAriaInvalid),o=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(i,f.CssPropertyValueAriaInvalid);r&&r.classList.remove(f.CssInvalidProperty);u&&u.classList.remove(f.CssInvalidProperty);i.setAttribute("aria-invalid",""+(t!==1));switch(t){case 2:r&&n.isNameDisplayedAsInvalid&&r.classList.add(f.CssInvalidProperty);break;case 3:u&&u.classList.add(f.CssInvalidProperty);break;case 0:r&&r.classList.add(f.CssInvalidProperty);u&&u.classList.add(f.CssInvalidProperty)}e&&(e.innerText=n.ariaInvalidNameString);o&&(o.innerText=n.ariaInvalidValueString)}},f.prototype.onPropertyNameChange=function(n,t){var i=this.findPropertyElement(n,n.isSubProperty?f.CssSubPropertyName:f.CssPropertyName);i&&(i.textContent=t)},f.prototype.onPropertyValueChange=function(n,t){var i=this.findPropertyElement(n,n.isSubProperty?f.CssSubPropertyValue:f.CssPropertyValue);i&&(i.textContent=t)},f.prototype.onPropertyClearSubproperties=function(n){var t=this.findPropertyElement(n),i;t&&(t.classList.contains(f.CssPropertyLonghand)||(t.classList.add(f.CssPropertyLonghand),t.setAttribute("aria-expanded","false"),t.removeAttribute("aria-setsize")),this._model.isExpanded(n)&&(this._model.setExpanded(n,!1),this.toggleExpander(t,f.CssProperty)),i=t.nextElementSibling,i.innerHTML="");this._model.setExpanded(n,!1)},f.prototype.onPropertyAddSubproperty=function(n,t){var i=this.findPropertyElement(n),r,u;i&&(i.classList.contains(f.CssPropertyLonghand)&&(i.classList.remove(f.CssPropertyLonghand),i.setAttribute("aria-expanded","false")),r=i.nextElementSibling,u=this.instantiateTemplate("styleSubPropertyTemplate",t),r.appendChild(u),i.setAttribute("aria-setsize",n.properties.length))},f.prototype.checkPropertyColorUpdate=function(n){var t=this.findPropertyElement(n,f.CssPropertyColor);t&&(n.isDisplayableColor?(t.style.backgroundColor=n.colorForDisplay,t.classList.remove(f.CssPropertyColorHidden)):(t.style.backgroundColor="",t.classList.add(f.CssPropertyColorHidden)));n.isSubProperty&&this.checkPropertyColorUpdate(n.owner)},f.prototype.instantiateTemplate=function(n,t){var r=new u.Template(this._domExplorer.capabilities,{htmlElementSource:document,templateId:n}),i=this.htmlElementSource.createElement("div");return i.innerHTML=r.createTemplateText(t),i.firstElementChild},f.prototype.editPropertyName=function(i){var l=this,r,o,u,s,e,h,c;(this.currentSelection=i,r=this.findElementForSelection(i,f.CssPropertyName),r)&&(o=new n.ValueEditorKey(":",!0),this._domExplorer.traceWriter.raiseEvent(511),e=new F12.DomExplorer.StylePropertyIntellisenseProvider(this._model),h=new Common.Intellisense.IntellisenseMenu("intellisenseListBox",null,null,500,!0,e),s=new Common.Intellisense.IntellisenseContext(new Common.Intellisense.InputElementTextEditorBridge,h,e,this._bridge),this._domExplorer.traceWriter.raiseEvent(512),u=new n.ValueEditor(document,this._domExplorer,this._bridge,window,f.MAX_PROPERTY_NAME_ROWS,s),u.addExitKeys(o),c=i.isNew,u.show(r,Math.max((r&&r.offsetWidth||0)+2,100),function(n){return new t.Promise(function(t){i.commitName(n).done(function(){return t(!0)},function(){return t(!1)})})}).done(function(t){c&&t.newValue&&!t.wasCancelled&&t.exitKey&&t.exitKey.equalTo(n.ValueEditorKey.EnterKey)&&(t.exitKey=n.ValueEditorKey.TabKey);i.isDeleted=!t.wasCancelled&&!t.newValue;l.moveEditBox(i,t.wasCancelled,t.exitKey,1,i.isNew&&(t.wasCancelled||!t.newValue)?i:null);t.wasCancelled||t.newValue||i.isNew?i.refreshNameDisplay():i.commitDelete(!1).done(function(){i.refreshNameDisplay()})}))},f.prototype.editPropertyValue=function(i){var r=this,u,o,h,y,s,p,d,e,v;if(this.currentSelection=i,u=this.findElementForSelection(i,f.CssPropertyValue),u){o=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(u,f.CssProperty);this._domExplorer.traceWriter.raiseEvent(511);h=new F12.DomExplorer.StylePropertyValueIntellisenseProvider(i.name,this._model.cssAndHtmlMetadataSource);h.onShouldOpenOnTextChange=function(n){return!n.match(/^-?\d/)&&!n.match(/!important$/)};y=new Common.Intellisense.IntellisenseContext(new Common.Intellisense.InputElementTextEditorBridge,new Common.Intellisense.IntellisenseMenu("intellisenseListBox",null,null,500,!0,h,null,!0),h,this._bridge);this._domExplorer.traceWriter.raiseEvent(512);p=new n.ValueEditorKey(";");s=new n.ValueEditor(document,this._domExplorer,this._bridge,window,f.MAX_PROPERTY_VALUE_ROWS,y);s.addExitKeys(p);s.enableCommitOnChange();s.enableNumericChanges();d=i.isNew;this._model.enableEditChaining();var c=!1,w=(o&&o.offsetWidth||0)-u.offsetLeft,l=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(o,f.CssPropertyColor),a=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(o,f.CssExpandShorthandIcon),b=window.getComputedStyle(l),k=window.getComputedStyle(a);w+=(l&&l.offsetWidth||0)+parseInt(b.marginLeft,10)+parseInt(b.marginRight,10)+(a&&a.offsetWidth||0)+parseInt(k.marginLeft,10)+parseInt(k.marginRight,10);u.textContent=u.textContent.trim();e=null;s.show(u,w,function(n){return new t.Promise(function(t){i.isNew||c||(r._model.startSingleEdit(),c=!0);e!==null&&window.clearTimeout(e);v=n;e=window.setTimeout(function(){i.commitValue(v);e=null},200);t(!0)})}).done(function(t){var u,f;e!==null&&(window.clearTimeout(e),i.commitValue(v));c&&r._model.endSingleEdit();r._model.disableEditChaining();i.refreshValueDisplay();r.moveEditBox(i,t.wasCancelled,t.exitKey,2,t.wasCancelled&&i.isNew?i:null);u=t.wasCancelled||!t.exitKey||t.exitKey.equalTo(n.ValueEditorKey.EnterKey);r._domExplorer.documentMode<9&&(!r.isFocusWithinInlineStyle||u)&&(f=r._domExplorer.selectedItem,r._domExplorer.refreshElementForLowDocModes(f,!1,!1))})}},f.prototype.editSelector=function(i,r){var s=this,u,e,o;(this.currentSelection=i,u=this.findElementForSelection(i,f.CssSelector),u)&&(e=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(u,f.CssRule),o=new n.ValueEditor(document,this._domExplorer,this._bridge,window,f.MAX_SELECTOR_ROWS),o.addExitKeys(new n.ValueEditorKey("{",!0),new n.ValueEditorKey("{")),o.show(u,(e&&e.offsetWidth||0)-u.offsetLeft,function(n){return new t.Promise(function(t){n?i.commitSelector(n).done(function(){return t(!0)},function(){return t(!1)}):i.commitDelete().done(function(){return t(!0)},function(){return t(!1)})})}).done(function(n){var t=n.newValue&&!n.wasCancelled;t||(u.textContent=n.oldValue);r&&r(t);s.moveEditBox(i,n.wasCancelled,n.exitKey,4)}))},f.prototype.insertNewRuleIntoView=function(n){var t=this.instantiateTemplate("styleRuleTemplate",n),i=this._model.nextRule(n),r;return i&&(r=this.findElementForSelection(i)),i&&r?this._stylesListElement.insertBefore(t,r.parentElement):this._stylesListElement.appendChild(t),t},f.prototype.insertNewPropertyIntoView=function(n,t){var u=this.instantiateTemplate("stylePropertyTemplate",t),o=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(n,f.CssItem),i=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(o,f.CssPropertiesCollection),r,e;if(i)return r=this._model.nextProperty(t),e=r?this.findElementForSelection(r).parentElement:F12.DomExplorer.DomExplorerWindow.findDescendentByClass(i,f.CssBlockFooter),i.insertBefore(u,e),u},f.prototype.initializeColorPicker=function(){if(t.F12){this.colorPickerViewModel=new F12.DomExplorer.ColorPickerViewModel(this._bridge,this._domExplorer.paletteViewModel);var n=new Common.TemplateControl("DomExplorer.colorPickerHost");n.model=this.colorPickerViewModel;this.colorPickerViewModel.propertyChanged.addHandler(this.onColorPickerChanged.bind(this));this.colorPickerControl=n.getNamedControl("colorPicker");this.colorPickerControl.disablePopupActiveIndicator=!0;this.colorPickerControl.isCompactView=!0;this.colorPickerControl.viewportMargin={top:30};document.body.appendChild(this.colorPickerControl.rootElement)}},f.prototype.attachColorPicker=function(n){var r=this.findElementForSelection(n),i;return t.F12&&this._domExplorer.documentMode>8&&n&&n.isDisplayableColor&&n.colorForDisplay&&!n.isShorthand&&!n.isSubProperty&&r&&(i=r.querySelector("."+f.CssPropertyColor),i&&i.offsetParent)?(this._colorPickerProperty=n,this.colorPickerViewModel.dockElement=i,this.colorPickerViewModel.isVisible=!0,!0):!1},f.prototype.onColorPickerChanged=function(n){n===F12.DomExplorer.ColorPickerViewModel.IsVisiblePropertyName?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)):(this._model.endSingleEdit(),this.colorPickerViewModel.isSlidersShown=!1,this.colorPickerViewModel.dockElement=null,this.currentSelection=this._colorPickerProperty,this._colorPickerProperty=null):n===F12.DomExplorer.ColorPickerViewModel.ColorPropertyName&&this.colorPickerViewModel.isVisible&&this._colorPickerProperty&&this._colorPickerProperty.commitValue(this.colorPickerViewModel.color,this._colorPickerProperty.isImportant)},f.MAX_PROPERTY_NAME_ROWS=2,f.MAX_PROPERTY_VALUE_ROWS=5,f.MAX_SELECTOR_ROWS=10,f.ATTR_UID="data-uid",f.CssBlockFooter="BPT-Style-BlockFooter",f.CssChangeBar="BPT-Style-ChangeBar",f.CssCheckbox="BPT-Style-Property-Checkbox",f.CssEmptyRuleSpace="BPT-Style-EmptyRuleSpace",f.CssExpandRuleIcon="BPT-Style-ExpandIcon",f.CssExpandShorthandIcon="BPT-Style-PropertyValue-ExpandIcon",f.CssFileLink="BPT-FileLink",f.CssInheritedFromTarget="BPT-Style-InheritedFromTarget",f.CssInvalidProperty="BPT-Style-InvalidProperty",f.CssItem="BPT-Style-Item",f.CssNotApplied="BPT-Style-Property-NotApplied",f.CssNotWinning="BPT-Style-NotWinning",f.CssParentRule="BPT-Style-ParentRule",f.CssPropertiesCollection="BPT-Style-Properties",f.CssProperty="BPT-Style-Property",f.CssPropertyAriaChangeState="BPT-Style-PropertyAriaChangeState",f.CssPropertyAriaOverridden="BPT-Style-PropertyAriaOverridden",f.CssPropertyColor="BPT-Style-Color",f.CssPropertyColorHidden="BPT-Style-Color-Hidden",f.CssPropertyContainer="BPT-Style-Property-Container",f.CssPropertyLonghand="BPT-Style-Property-LongHand",f.CssPropertyName="BPT-Style-PropertyName",f.CssPropertyNameAriaInvalid="BPT-Style-PropertyNameAriaInvalid",f.CssPropertyNameContainer="BPT-Style-PropertyName-Container",f.CssPropertyValue="BPT-Style-PropertyValue",f.CssPropertyValueAriaInvalid="BPT-Style-PropertyValueAriaInvalid",f.CssPropertyValueContainer="BPT-Style-PropertyValue-Container",f.CssRule="BPT-Style-Rule",f.CssScrollContainer="BPT-DataTree-ScrollContainer",f.CssSelector="BPT-Style-Selector",f.CssSelectorContainer="BPT-Style-Selector-Container",f.CssSubProperty="BPT-Style-SubProperty",f.CssSubPropertyName="BPT-Style-SubPropertyName",f.CssSubPropertyValue="BPT-Style-SubPropertyValue",f}(Common.ModelView.ListView),r,i;n.StyleView=f,function(n){n[n.AddRule=0]="AddRule";n[n.AddProperty=1]="AddProperty";n[n.Remove=3]="Remove";n[n.Revert=4]="Revert";n[n.CopyRule=6]="CopyRule";n[n.CopyProperty=7]="CopyProperty";n[n.RefreshStyles=9]="RefreshStyles";n[n.ViewSource=10]="ViewSource"}(r||(r={}));i=function(){function n(n,t,i,r,u){this._styleView=n;this._elementListener=t;this._stylesListElement=i;this._capabilities=r;this._bridge=u;this._menuId="StyleViewContextMenu_";this._menuItems=[{id:"addRule",type:1,label:Common.ToolWindowHelpers.loadString("AddRuleMenuText")},{id:"addProperty",type:1,label:Common.ToolWindowHelpers.loadString("AddPropertyMenuText")},{id:"separator",type:3},{id:"remove",type:1,label:Common.ToolWindowHelpers.loadString("RemoveStyleMenuText")},{id:"revert",type:1,label:Common.ToolWindowHelpers.loadString("RevertStyleMenuText")},{id:"separator",type:3},{id:"copyRule",type:1,label:Common.ToolWindowHelpers.loadString("CopyRuleMenuText")},{id:"copyProperty",type:1,label:Common.ToolWindowHelpers.loadString("CopyPropertyMenuText")},{id:"separator",type:3},{id:"refreshStyles",type:1,label:Common.ToolWindowHelpers.loadString("RefreshStyleMenuText")},{id:"viewSource",type:1,label:Common.ToolWindowHelpers.loadString("ViewSourceMenuText")}];this.initialize()}return n.prototype.showContextMenu=function(n,i,r){var u=this,f;return n!=null&&(f=this._styleView.findClosestItem(n)),this._selection=f,this._hasSelectedItem=!!f,this._hasNonDeletedSelection=this._hasSelectedItem&&!f.isDeleted,this._isProperty=this._hasSelectedItem&&f.isProperty,this._isSubProperty=this._hasSelectedItem&&f.isSubProperty,this._isRule=this._hasSelectedItem&&f.isRule,this._hasSelectedText=Common.ToolWindowHelpers.hasSelectedText(),this._rule=this._hasSelectedItem&&(this._isRule?f:f.rule),this._hasChanged=f?!!f.extendedChangeState:!1,this._contextMenu||(this._menuItems[0].disabled=function(){return!u._capabilities.canAddStyleRule},this._menuItems[1].disabled=function(){return!(u._capabilities.canAddStyleProperty&&u._hasSelectedItem)},this._menuItems[3].disabled=function(){return!(u._hasNonDeletedSelection&&(u._capabilities.canRemoveStyleProperties&&u._isProperty||u._capabilities.canRemoveStyleRules&&u._isRule&&!u._rule.isInlined))},this._menuItems[4].disabled=function(){return!u._capabilities.canRevertStyles||!u._hasChanged||u._rule.isDeleted&&u._isProperty||u._isSubProperty},this._menuItems[6].disabled=function(){return!u._rule||u._rule.isDeleted},this._menuItems[7].disabled=function(){return!u._hasNonDeletedSelection||!(u._isProperty||u._isSubProperty)},this._menuItems[9].disabled=function(){return!1},this._menuItems[10].disabled=function(){return!u.canViewSource(u._rule)},this._contextMenu=t.ContextMenu.create(this._menuItems,this._menuId,null,null,function(n,t){return u.onMenuItemClicked(n,t.id,u._selection,u._rule)}),this._dismissHandler=function(){u._styleView.currentSelection=u._styleView.currentSelection;u.dismiss()}),this._contextMenu.addEventListener("dismiss",this._dismissHandler),this._contextMenu.show(parseInt(i.toFixed(0)),parseInt(r.toFixed(0))),Common.ToolWindowHelpers.contextMenuUp(!0),!1},n.prototype.canViewSource=function(n){return this._capabilities.canViewSource&&!!(n&&n.fileUrl)},n.prototype.onCopy=function(){return this._copyText},n.prototype.initialize=function(){var n=this;this._elementListener.addEventListener("contextmenu",function(t){return n.onContextMenu(t)});this._elementListener.addEventListener("keydown",function(t){return n.onKeydown(t)});Common.ClipboardHelper.addCopyListener(this._elementListener,this.onCopy.bind(this))},n.prototype.eventIsForThisPane=function(n){if(this._stylesListElement.clientHeight){var t=n.target;do{if(t===this._elementListener||t===this._stylesListElement)return!0;t=t.parentElement}while(t)}return!1},n.prototype.onKeydown=function(n){var r,t,i;return this.eventIsForThisPane(n)?(r=n.shiftKey&&!n.ctrlKey&&!n.altKey,n.keyCode===121&&r&&(this.dismiss(),t=this._styleView.findElementForSelection(this._styleView.currentSelection)||this._elementListener,i=t.getBoundingClientRect(),this.showContextMenu(t,i.left,i.top),n.preventDefault(),n.stopImmediatePropagation()),!0):!0},n.prototype.onContextMenu=function(n){var u;if(this.dismiss(),!this.eventIsForThisPane(n))return!0;var t=null,i=n.clientX,r=n.clientY;return i<=0||r<=0?(t=this._styleView.currentElementSelection,t&&(u=t.getBoundingClientRect(),i=u.left,r=u.top)):(t=this._styleView.htmlElementSource.elementFromPoint(i,r),t&&this._styleView.select(t)),this.showContextMenu(t,i,r),n.preventDefault(),n.stopImmediatePropagation(),!1},n.prototype.onMenuItemClicked=function(n,t,i,r){var u=this,f;if(n===this._menuId){switch(t){case this._menuItems[0].id:this._styleView.addRule();F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.ADD_RULE,2);break;case this._menuItems[1].id:this._styleView.enterEditMode(i,3);F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.ADD_PROPERTY,2);break;case this._menuItems[3].id:this._styleView.removeRuleOrProperty(i);F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.DELETE_ITEM,2);break;case this._menuItems[4].id:this._styleView.revertSelection(i);F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.REVERT_ITEM,2);break;case this._menuItems[6].id:this._copyText=r.formatForCopy;Common.ClipboardHelper.fireCopyEvent(this._elementListener);F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.COPY_RULE,2);break;case this._menuItems[7].id:f=i;this._copyText=f.formatForCopy;Common.ClipboardHelper.fireCopyEvent(this._elementListener);F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.COPY_PROPERTY,2);break;case this._menuItems[9].id:this._styleView.refresh();F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.REFRESH_STYLES,2);break;case this._menuItems[10].id:window.setTimeout(function(){u.canViewSource(r)&&(u._styleView.openTargetElementFileLink(r),F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.VIEW_SOURCE,2))},0)}this.dismiss()}},n.prototype.dismiss=function(){this._contextMenu&&(this._contextMenu.removeEventListener("dismiss",this._dismissHandler),this._contextMenu.dismiss(),this._contextMenu.dispose(),this._contextMenu=null);Common.ToolWindowHelpers.contextMenuUp(!1)},n}();n.StyleViewMenuController=i}(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(n,t){this._element=n;this._domTree=t;this._uid=this._element.uid}return Object.defineProperty(n.prototype,"elementName",{get:function(){switch(this._element.node.type){case 1:return this._element.tag;case 2:return this._element.tag;case 4:return"(DOCTYPE)";case 3:return Common.ToolWindowHelpers.loadString("CommentElement");case 5:return Common.ToolWindowHelpers.loadString("TextElement")}return null},set:function(){throw new Error("Cannot set elementName")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"breadcrumbName",{get:function(){var n=this.elementName,t;return n&&(this.id?n+="#"+this.id:this.classNames&&(t=this.classNames.trim().split(" "),t.length>0&&(n+="."+t[0]))),n},set:function(){throw new Error("Cannot set breadcrumbName")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isSelected",{get:function(){return this._domTree.selectedItem===this._element},set:function(){throw new Error("Cannot set selected")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"elementUID",{get:function(){return this._uid},set:function(){throw new Error("Cannot set elementUID")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"element",{get:function(){return this._element},set:function(){throw new Error("Cannot set element")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return this.getAttribute("id")},set:function(){throw new Error("Cannot set id")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"classNames",{get:function(){var n=this.getAttribute("class");return n?n:""},set:function(){throw new Error("Cannot set classNames")},enumerable:!0,configurable:!0}),n.prototype.getAttribute=function(n){var t=this._element.node.getAttributeByName(n);return t?t.value:undefined},n}();n.BreadcrumbItem=t})(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=function(t){function i(n,i){var r=this;t.call(this);this.skipNextLoad=!1;this._selectedElement=n;this._domTree=i;this.listSource=function(n){r.skipNextLoad?r.verifyTrail():r.buildBreadcrumbs();r.skipNextLoad=!1;n(r._breadcrumbs)}}return __extends(i,t),Object.defineProperty(i.prototype,"numberOfBreadcrumbs",{get:function(){return this._breadcrumbs.length},enumerable:!0,configurable:!0}),i.prototype.findBreadcrumbByTagName=function(n,t){for(var r,i=0;i<this.numberOfBreadcrumbs;i++)if(r=this.breadcrumb(i),n===r.elementName){if(t===0)return r;t--}return null},i.prototype.findBreadcrumbByClass=function(n,t){for(var u,f,r,i=0;i<this.numberOfBreadcrumbs;i++)for(u=this.breadcrumb(i),f=u.classNames.split(" "),r=0;r<f.length;r++)if(f[r]===n){if(t===0)return u;t--}return null},i.prototype.findBreadcrumbById=function(n){for(var i,t=0;t<this.numberOfBreadcrumbs;t++)if(i=this.breadcrumb(t),n===i.id)return i;return null},i.prototype.breadcrumb=function(n){return this._breadcrumbs[n]},i.prototype.clearSelection=function(){this._selectedElement=undefined},i.prototype.setSelectedElement=function(n){var i,t;if(n)for(i=n.uid,t=0;t<this._breadcrumbs.length;t++)this._breadcrumbs[t].elementUID===i&&this._breadcrumbs[t].element.id===n.id&&(this.skipNextLoad=!0);this._selectedElement=n},i.prototype.findPreviousBreadcrumb=function(n){for(var i,t=0;t<this.numberOfBreadcrumbs;t++)if(i=this._breadcrumbs[t],i.elementUID===n)return t>0?this._breadcrumbs[t-1]:null;return null},i.prototype.findNextBreadcrumb=function(n){for(var i,t=0;t<this.numberOfBreadcrumbs;t++)if(i=this._breadcrumbs[t],i.elementUID===n)return t<this.numberOfBreadcrumbs-1?this._breadcrumbs[t+1]:null;return null},i.prototype.verifyTrail=function(){for(var n=this.numberOfBreadcrumbs-1,t,i;n>=0;)t=this.breadcrumb(n),i=t.elementUID,t.element.parentItem&&t.element.parentItem.isExpanded&&t.element.parentItem.isItemAChild(t.element)||this._breadcrumbs.splice(n,this.numberOfBreadcrumbs-n),n--,n>=this.numberOfBreadcrumbs&&(n=this.numberOfBreadcrumbs-1)},i.prototype.buildBreadcrumbs=function(){var t,i;for(this._breadcrumbs=[],t=this._selectedElement;t&&t.isSelectable;)i=new n.BreadcrumbItem(t,this._domTree),this._breadcrumbs.unshift(i),t=t.parentItem;return this.newBreadcrumbs=!0,this._breadcrumbs},i}(Common.ModelView.ListModel);n.BreadcrumbsModel=t}(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,i=Common.Templating,r=function(n){function r(t,r,u,f,e,o){n.call(this,u,f,e,r,t.capabilities,o);this._forceSelectedIntoView=!0;this._grabKeyFocus=!1;this._disableKeyBoardTooltip=!1;this._domExplorerWindow=t;this._htmlElementSource=u;this._listElement=this._htmlElementSource.getElementById(this.listViewDivId);this._tooltipTemplate=new i.Template(this._domExplorerWindow.capabilities,{htmlElementSource:this._htmlElementSource,templateId:"breadcrumbTooltip"});this.init();t.horizontalPane.addResizeListener(this);this.setWidth(t.horizontalPane.leftWidth);this.addEventHandlers();this.updateView()}return __extends(r,n),r.prototype.selectedItemMutated=function(n){this.selectionChanged(n)},r.prototype.selectionChanged=function(n){this._breadcrumbModel.setSelectedElement(n);this.updateView()},r.prototype.updateView=function(){!this._grabKeyFocus&&document.activeElement&&!Common.ToolWindowHelpers.isContextMenuUp()&&F12.DomExplorer.DomExplorerWindow.findAncestorByClass(document.activeElement,"BPT-HorizontalPane-BreadcrumbBar")&&(this._grabKeyFocus=!0);this._breadcrumbModel||(this._breadcrumbModel=this.model);n.prototype.updateView.call(this)},r.prototype.skipNextLoad=function(){this._breadcrumbModel.skipNextLoad=!0},r.prototype.preViewProcessing=function(){$m("#BreadcrumbsView").show()},r.prototype.checkToPullDownTooltip=function(){var n=this;window.setTimeout(function(){document.activeElement&&!F12.DomExplorer.DomExplorerWindow.findAncestorByClass(document.activeElement,"BPT-HorizontalPane-BreadcrumbBar")&&n.closeTooltip()},0)},r.prototype.postViewProcessing=function(){var i=this,e,r,t,s,l,h;n.prototype.postViewProcessing.call(this);this._disableKeyBoardTooltip=!1;this._firstBreadcrumbToShow===undefined&&this._lastBreadcrumbToShow===undefined||this._breadcrumbModel.newBreadcrumbs?(this._firstBreadcrumbToShow=0,this._lastBreadcrumbToShow=undefined,this._breadcrumbModel.newBreadcrumbs=!1):(this._lastBreadcrumbToShow&&this._lastBreadcrumbToShow>=this._breadcrumbModel.numberOfBreadcrumbs&&(this._lastBreadcrumbToShow=this._breadcrumbModel.numberOfBreadcrumbs-1),this._firstBreadcrumbToShow&&this._firstBreadcrumbToShow>=this._breadcrumbModel.numberOfBreadcrumbs&&(this._firstBreadcrumbToShow=0,this._lastBreadcrumbToShow=undefined,this._breadcrumbModel.newBreadcrumbs=!1));var o=$m(".BPT-HorizontalPane-BreadcrumbBar"),u=o.find(".BPT-Breadcrumb, .BPT-Breadcrumb-Selected"),c=o.find(".BPT-HorizontalPane-BreadcrumbChevron"),f=this._lastBreadcrumbToShow===undefined,r;do e=!1,r=this.calculateFirstOrLastElementToDisplay(o,u),this._forceSelectedIntoView&&(r<this._firstBreadcrumbToShow||r>this._lastBreadcrumbToShow)?(e=!0,f?(r<this._firstBreadcrumbToShow?this._firstBreadcrumbToShow--:this._firstBreadcrumbToShow++,this._lastBreadcrumbToShow=undefined):(r>this._lastBreadcrumbToShow?this._lastBreadcrumbToShow++:this._lastBreadcrumbToShow--,this._firstBreadcrumbToShow=undefined)):(this._firstBreadcrumbToShow!==0||this._lastBreadcrumbToShow!==this._breadcrumbModel.numberOfBreadcrumbs-1)&&(f||this._firstBreadcrumbToShow!==0?f&&this._lastBreadcrumbToShow===this._breadcrumbModel.numberOfBreadcrumbs-1&&(e=!0,f=!1,this._firstBreadcrumbToShow=undefined):(e=!0,f=!0,this._lastBreadcrumbToShow=undefined));while(e);for(t=0;t<this._breadcrumbModel.numberOfBreadcrumbs;t++)t===r&&(this._selectedElement=$m(u.get(t)).get(0)),t>=this._firstBreadcrumbToShow&&t<=this._lastBreadcrumbToShow?($m(u.get(t)).show(),$m(c.get(t)).show(),s=u.get(t).parentNode,s.setAttribute("bcIndex",t),l=this,s.onmouseenter=function(n){if(!Common.ToolWindowHelpers.isContextMenuUp()){var t=n.target,r=t.children[0],f=t.children[1],u=f.querySelector("path"),e=r.getAttribute("bc-data-uid");i._domExplorerWindow.temporaryShowElementHighlight(e);t.savebackgroundColor=u.className.baseVal;r.classList.add("BPT-Breadcrumb-Hover");u.className.baseVal="BPT-BreadcrumbChevron-Hover";i._tooltipComingId||(i.closeTooltip(),i.showTooltipOnBreadcrumb(!1,t));i._disableKeyBoardTooltip=!0}},s.onmouseleave=function(n){var t=n.target,r=t.children[0],u=t.children[1],f=u.querySelector("path");i._domExplorerWindow.restoreElementHighlight();i.closeTooltip();t.savebackgroundColor!==undefined&&(i._disableKeyBoardTooltip=!1,r.classList.remove("BPT-Breadcrumb-Hover"),f.className.baseVal=t.savebackgroundColor,t.savebackgroundColor=undefined)}):($m(u.get(t)).hide(),$m(c.get(t)).hide());this._firstBreadcrumbToShow>0?$m("#breadcrumbLeftArrow").show():$m("#breadcrumbLeftArrow").hide();this._lastBreadcrumbToShow<this._breadcrumbModel.numberOfBreadcrumbs-1?$m("#breadcrumbRightArrow").show():$m("#breadcrumbRightArrow").hide();this._grabKeyFocus&&(h=o.find(".BPT-Breadcrumb-Selected"),h&&h.focus(),this._grabKeyFocus=!1,this._disableKeyBoardTooltip||this.showTooltipOnBreadcrumb(!0));this._forceSelectedIntoView=!0},r.prototype.selectBreadcrumbNodeByTagName=function(n,t){t||(t=0);var i=this._breadcrumbModel.findBreadcrumbByTagName(n,t);this.selectElementByUid(i.elementUID)},r.prototype.selectBreadcrumbNodeByClass=function(n,t){t||(t=0);var i=this._breadcrumbModel.findBreadcrumbByClass(n,t);this.selectElementByUid(i.elementUID)},r.prototype.selectBreadcrumbNodeById=function(n){var t=this._breadcrumbModel.findBreadcrumbById(n);this.selectElementByUid(t.elementUID)},r.prototype.showTooltipOnBreadcrumb=function(n,t){var u,i,o;if(t)var h=t.children[0].getBoundingClientRect(),l=t.children[1].getBoundingClientRect(),s=t;else{if(u=$m(".BPT-HorizontalPane-BreadcrumbBar"),i=u.find(".BPT-Breadcrumb-Selected").get(0),!i)return;var s=i.parentNode,h=i.getBoundingClientRect(),l=i.nextElementSibling.getBoundingClientRect()}var r=h,c=r.width,f=r.left,e=$m("#breadcrumbLeftArrow").get(0);e.style.display!=="none"&&(o=e.getBoundingClientRect(),f-=o.width);this.popupTooltip(s,f+c/2,r.top+r.height/2,!1,n)},r.prototype.onPaneResize=function(n){this.setWidth(n);this.skipNextLoad();this.updateView()},r.prototype.addEventHandlers=function(){var n=this;this.addHandler(this._listElement,"click",["BPT-Breadcrumb","BPT-Breadcrumb-Selected"],function(t){var r,u,i;if(n.takeDownContextMenu(),n._grabKeyFocus=!0,r=t.target,!r.hasAttribute("bc-data-uid")){for(u=!1,i=r;i!==n._listElement;){if(i.classList&&i.classList.contains("BPT-Breadcrumb-Container")){u=!0;break}i=i.parentNode}u&&(r=i.querySelector("[bc-data-uid]"))}n.selectBreadcrumb(r);n.updateView()});this._htmlElementSource.addEventListener("mousedown",function(){n.checkToPullDownTooltip()})},r.prototype.lastKey=function(n){this._lastKey=n},r.prototype.setWidth=function(n){$m("#BreadcrumbsView").parent(".BPT-HorizontalPane-BreadcrumbBar").css("width",n+"px")},r.prototype.calculateFirstOrLastElementToDisplay=function(n,t){var s=this,c=n.get(0).getBoundingClientRect(),i=c.width-r.ARROW_WIDTH*2-40,e=-1,f,u,h,o;if(this._lastBreadcrumbToShow===undefined)t.each(function(n,t){if(t.getAttribute("class").indexOf("BPT-Breadcrumb-Selected")>=0&&(e=n),n>=s._firstBreadcrumbToShow&&i>0){var r=t.getBoundingClientRect();i>r.width?(i-=r.width,s._lastBreadcrumbToShow=n):i=0}});else for(f=[],t.each(function(n,t){t.getAttribute("class").indexOf("BPT-Breadcrumb-Selected")>=0&&(e=n);f[n]=t}),u=f.length-1;u>=0&&i>0;u--)u<=this._lastBreadcrumbToShow&&(h=f[u],o=h.getBoundingClientRect(),i>o.width?(i-=o.width,this._firstBreadcrumbToShow=u):i=0);return e},r.prototype.selectBreadcrumb=function(n){this._selectedElement=n;var t=n?n.getAttribute("bc-data-uid"):"";this.selectElementByUid(t)},r.prototype.selectElementByUid=function(n){this._domExplorerWindow.domTreeDataSource&&this._domExplorerWindow.domTree&&(this._domExplorerWindow.domTree.selectedItem=this._domExplorerWindow.domTreeDataSource.getItemByUid(n),this.skipNextLoad())},r.prototype.takeDownContextMenu=function(){this._domExplorerWindow.takeDownContextMenu()},r.prototype.popupTooltip=function(n,i,r,u,f){var l=this,o,s,h,a,e,v,c;if(!Common.ToolWindowHelpers.isContextMenuUp()){if(!u){this._tooltipComingId&&window.clearTimeout(this._tooltipComingId);this._tooltipComingId=window.setTimeout(function(){l._tooltipComingId=null;l.popupTooltip(n,i,r,!0,f)},500);return}o=n.getBoundingClientRect();s=n.getAttribute("bcIndex");s&&(h=parseInt(s),h<this._breadcrumbModel.numberOfBreadcrumbs&&(a=this._breadcrumbModel.breadcrumb(h),this._tooltip=this._tooltipTemplate.createTemplateElement(a),$m("#BreadcrumbsView").get(0).appendChild(this._tooltip),e=this._tooltip.getBoundingClientRect(),$m("#BreadcrumbsView").get(0).removeChild(this._tooltip),this._tooltip.style.left=Math.max(1,i-e.width/2)+"px",this._tooltip.style.top=0-(e.height+2)+"px",this._tooltipConfig={content:this._tooltip.innerHTML,contentContainsHTML:!0,x:Math.max(1,o.left+o.width/2-e.width/2),y:o.top-(e.height+9)},t.Tooltip.show(this._tooltipConfig),v=$m(".BPT-HorizontalPane-BreadcrumbBar"),c=v.find(".BPT-Breadcrumb-Selected"),c&&f&&c.focus()));this._tooltipComingId=undefined}},r.prototype.isActiveElementInBreadcrumb=function(n){var t=document.activeElement,i;if(!t)return!1;for(i=n.get(0);t.parentNode;){if(t===i)return!0;t=t.parentNode}return!1},r.prototype.closeTooltip=function(){var n,r,i;if(this._tooltipComingId){window.clearTimeout(this._tooltipComingId);this._tooltipComingId=undefined;return}this._tooltipConfig&&(n=$m(".BPT-HorizontalPane-BreadcrumbBar"),r=this.isActiveElementInBreadcrumb(n),t.Tooltip.dismiss(!0),i=n.find(".BPT-Breadcrumb-Selected"),i&&r&&i.focus())},r.prototype.handleKeyPress=function(n){var t,i;if(n.ctrlKey||n.shiftKey||n.altKey)return!0;var f=$m(".BPT-Breadcrumb-Selected"),r=f.attr("bc-data-uid"),u=n;this.lastKey(u.keyCode);switch(u.keyCode){case 37:case 38:return t=this._breadcrumbModel.findPreviousBreadcrumb(r),t&&(this.closeTooltip(),i=t.elementUID,this.selectElementByUid(i),this._grabKeyFocus=!0,this.updateView()),!1;case 39:case 40:return t=this._breadcrumbModel.findNextBreadcrumb(r),t&&(this.closeTooltip(),i=t.elementUID,this.selectElementByUid(i),this._grabKeyFocus=!0,this.updateView()),!1;case 34:return this.shiftPage(!0),!1;case 33:return this.shiftPage(!1),!1;case 27:return this.closeTooltip(),!1;case 9:return this.closeTooltip(),!0}return!0},r.prototype.init=function(){var n=this,t=$m(".BPT-HorizontalPane-BreadcrumbBar");t.bind("contextmenu",function(i){var e,o;n.takeDownContextMenu();n.closeTooltip();var r=i.target,u=i.clientX,f=i.clientY;u<=0||f<=0||n._lastKey===93?(n._lastKey!==93&&n.selectBreadcrumb(r),n._lastKey=undefined,e=n._selectedElement.getBoundingClientRect(),u=e.left,f=e.top,r=n._selectedElement):n.selectBreadcrumb(r);n._domExplorerWindow.domTreeDataSource&&(o=r.getAttribute("bc-data-uid"),n._grabKeyFocus=!1,window.setTimeout(function(){t.focus();var i=n._domExplorerWindow.domTreeDataSource.getItemByUid(o);n._domExplorerWindow.htmlContextMenu(i,u,f);n.skipNextLoad();n.updateView()},1))});t.bind("keydown",function(t){return(n.takeDownContextMenu(),!n.handleKeyPress(t))?(t.preventDefault(),!1):!0},!0);$m(".BPT-HorizontalPane-BreadcrumbBar-Arrow").bind("click",function(t){var i=t.target;return n.shiftPage(i.getAttribute("id")==="breadcrumbRightArrow"),!1})},r.prototype.shiftPage=function(n){if(this.takeDownContextMenu(),n)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=!1;this._grabKeyFocus=!0;this.updateView()},r.ARROW_WIDTH=16,r}(Common.ModelView.ListView);n.BreadcrumbsView=r}(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,i;(function(i){var r=function(){function t(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w){this.selector=n;this.value=t;this.fileUrl=i;this.fileLine=r;this.fileColumn=u;this.fileLinkText=f;this.tooltip=e;this.isWinning=o;this.isImportant=s;this.isEnabled=h;this.isDeleted=c;this.changeState=l;this.ariaChangeStateString=a;this.ariaOverriddenString=v;this.status=y;this.isColor=p;this.propertyId=w}return Object.defineProperty(t.prototype,"isWinningAndEnabled",{get:function(){return this.isWinning&&this.isEnabled},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valueForDisplay",{get:function(){var n=this.valueWithPriority;return n.length?n:" "},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valueWithPriority",{get:function(){return this.value+(this.isImportant?" !important":"")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDisplayableColor",{get:function(){return this.isValid&&this.isColor},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.status===1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalid",{get:function(){return this.status!==1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"arialInvalidString",{get:function(){return this.isValid?"":n.StyleProperty.AriaInvalidString},enumerable:!0,configurable:!0}),t}(),u,f;i.Source=r;u=function(){function t(t,i,r){this._model=t;this.propertyName=i;this.propertyValue=r;this.sources=[];this.enabledCount=0;this.changeState=n.StyleChangeNotifier.CHANGE_BAR_NONE}return t.prototype.isColor=function(){return this.propertyName.indexOf("color")>-1?!0:!1},t.prototype.hasChildren=function(){return!!this.sources&&this.sources.length>0},t.prototype.addSource=function(n){this.sources.unshift(n);n.isEnabled&&!n.isDeleted&&this.enabledCount++},Object.defineProperty(t.prototype,"children",{get:function(){return this.sources},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"uniqueId",{get:function(){return"Dom_Wsp_Style"+this.propertyName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"expanded",{get:function(){return this._model.isExpanded(this.uniqueId)},set:function(n){this._model.setExpansionState(this.uniqueId,n)},enumerable:!0,configurable:!0}),t.prototype.equals=function(n){var r,t,i;if(!n||this.propertyName!==n.propertyName||this.propertyValue!==n.propertyValue||this.sources.length!==n.sources.length)return!1;for(r=0;r<this.sources.length;r++)if(t=this.sources[r],i=n.sources[r],t.selector!==i.selector||t.value!==i.value||t.isWinning!==i.isWinning||t.fileLinkText!==i.fileLinkText||t.fileUrl!==i.fileUrl)return!1;return!0},Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this.enabledCount>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEnabledIndeterminate",{get:function(){var t,n;if(this.enabledCount<=0)return!1;for(t=0,n=0;n<this.sources.length;n++)this.sources[n].isDeleted||t++;return this.enabledCount<t},enumerable:!0,configurable:!0}),t.prototype.recalculateEnabledCount=function(){for(var t=0,n=0;n<this.sources.length;n++)this.sources[n].isEnabled&&!this.sources[n].isDeleted&&t++;this.enabledCount=t},t.prototype.updateChangeState=function(){for(var i=n.StyleChangeNotifier.CHANGE_BAR_NONE,r="",t=0;t<this.sources.length;t++)if(this.sources[t].changeState!==n.StyleChangeNotifier.CHANGE_BAR_NONE){i=n.StyleChangeNotifier.CHANGE_BAR_UPDATE;this.expanded||(r=n.StyleRule.AriaChangeStateUpdateString);break}this.changeState=i;this.ariaChangeStateString=r},t}();i.Style=u;f=function(i){function f(n,t,r){var u=this;i.call(this);this._remoteDom=n;this._getStyleResults={};this._listenerArray=[];this._showAllStyles=!1;this._styleList=[];this.allStylesChanged=new Common.EventSource;this.listSource=function(n,i){t.updateView(i[0],function(t){u._elementStyleModel=t;u._getStyleRuleResults=t.rules;u._elementStyleModel.addUpdateListener(u);u._remoteDom.getComputedStyles(i[0]).done(function(t){t&&(u._getStyleResults=t[0],u._styleList=u.determineWinningStyles(u._getStyleResults,u._getStyleRuleResults),n(u._styleList))})})};this._uniqueIdsOfExpandedStyles={};this._createShortenedUrlText=function(n){if(!n)return undefined;var t=r(n);return t.replace(/\\"/g,'"')}}return __extends(f,i),f.prototype.clearModel=function(){this._getStyleResults={};this._getStyleRuleResults=[];this._styleList=[];this.cache=this._styleList},f.prototype.isExpanded=function(n){return this._uniqueIdsOfExpandedStyles[n]===!0},f.prototype.setExpansionState=function(n,t){this.isExpanded(n)!==t&&(t?this._uniqueIdsOfExpandedStyles[n]=!0:delete this._uniqueIdsOfExpandedStyles[n])},Object.defineProperty(f.prototype,"showAllStyles",{get:function(){return this._showAllStyles},set:function(n){this._showAllStyles!==n&&(this._showAllStyles=n,this._getStyleResults&&this._getStyleRuleResults&&(this._styleList=this.determineWinningStyles(this._getStyleResults,this._getStyleRuleResults),this.cache=this._styleList),this.allStylesChanged.invoke(n))},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"nameFilter",{get:function(){return this._nameFilter},set:function(n){this._nameFilter!==n&&(this._nameFilter=n,this._getStyleResults&&this._getStyleRuleResults&&(this._styleList=this.determineWinningStyles(this._getStyleResults,this._getStyleRuleResults),this.cache=this._styleList))},enumerable:!0,configurable:!0}),f.prototype.determineWinningStyles=function(t,i){for(var v,l,o,f,p,w=[],s,a={},e=[],b=function(n){n.isApplied&&n.isValidName&&(a[n.name]||(a[n.name]=[],e.push(n.name)),a[n.name].unshift(n))},h=0;h<i.length;h++)for(v=i[h],o=v.properties.length-1;o>=0;o--)l=v.properties[o],l.isShorthand?l.isApplied&&l.properties.forEach(b):b(l);if(this.showAllStyles){e=[];for(s in t)t.hasOwnProperty(s)&&e.push(s)}for(e=this.applyPropertyNameFilter(e),e.sort(),h=0;h<e.length;h++){s=e[h];var y=a[s],c=new u(this,s,t[s]),k=n.StyleChangeNotifier.CHANGE_BAR_NONE;if(y)for(o=0;o<y.length;o++)f=y[o],p=new r(f.rule.selectorText,f.value,f.rule.fileUrl,f.rule.fileLine,f.rule.fileColumn,f.rule.fileLinkText,f.rule.tooltip,f.isWinning,f.isImportant,f.isEnabled,f.isSubProperty?f.container.isDeleted:f.isDeleted,f.changeState,f.ariaChangeStateString,f.ariaOverriddenString,f.status,c.isColor(),f.uid),c.addSource(p),c.expanded||p.changeState===n.StyleChangeNotifier.CHANGE_BAR_NONE||(c.changeState=n.StyleChangeNotifier.CHANGE_BAR_UPDATE,c.ariaChangeStateString=n.StyleRule.AriaChangeStateUpdateString);w.push(c)}return w},f.prototype.applyPropertyNameFilter=function(n){var i,t,r;if(!this._nameFilter||this._nameFilter.trim().length===0)return n;if(i=[],this._nameFilter&&this._nameFilter.length>0)for(t=0;t<n.length;t++)r=n[t],r.indexOf(this._nameFilter)>-1&&i.push(r);return i},f.prototype.toggleEnabled=function(n,i){var r=this;return new t.Promise(function(t,u){var f=r._elementStyleModel.getPropertyById(n),e;f?(e=f.isSubProperty?f.owner:f,e.isDeleted||i!==undefined&&i===f.isEnabled?t():f.toggleEnable().done(t)):u("Property not found")})},f.prototype.forEachStyle=function(n){this._styleList.forEach(n)},f.prototype.addUpdateListener=function(n){this._listenerArray.indexOf(n)<0&&this._listenerArray.push(n)},f.prototype.removeUpdateListener=function(n){var t=this._listenerArray.indexOf(n);t>=0&&this._listenerArray.splice(t,1)},f.prototype.onRuleChange=function(n,t,i){this.fireRuleChange(n,t,i)},f.prototype.onPropertyChange=function(n,t,i){if(n===3)this.onPropertyWinningRuleChange(t,i);else if(n===4)this.onPropertyEnableChange(t,i);else if(n===2)this.onPropertyValueChange(t,i);else if(n===6)this.onPropertyStatusChange(t,i);else if(n===11)this.onPropertyChangeStateChange(t);else this.firePropertyChange(n,t,i)},f.prototype.fireRuleChange=function(n,t,i){for(var f,u=this._listenerArray.slice(0),r=0,e=u.length;r<e;r++){f=u[r];f.onRuleChange(n,t,i)}},f.prototype.firePropertyChange=function(n,t,i){for(var f,u=this._listenerArray.slice(0),r=0,e=u.length;r<e;r++){f=u[r];f.onPropertyChange(n,t,i)}},f.prototype.onPropertyStatusChange=function(n,t){var i=this.findSourceByUid(n.uid),r;i&&i.status!==t&&(r=i.status,i.status=t,this.firePropertyChange(6,n,t))},f.prototype.onPropertyChangeStateChange=function(n){var t=this.findSourceByUid(n.uid),r,i;t&&t.changeState!==n.changeState&&(r=t.changeState,t.changeState=n.changeState,i=this.findStyleByName(n.name),i.updateChangeState(),this.firePropertyChange(11,n))},f.prototype.onPropertyValueChange=function(n,t){var i=this.findSourceByUid(n.uid),r;i&&i.valueForDisplay!==t&&(r=i.value,i.value=n.value,i.isImportant=n.isImportant,this.firePropertyChange(2,n,t))},f.prototype.onPropertyEnableChange=function(n,t){var i=this.findSourceByUid(n.uid),r;i&&i.isEnabled!==t&&(r=i.isEnabled,i.isEnabled=t,this.firePropertyChange(4,n,t))},f.prototype.onPropertyWinningRuleChange=function(n,t){var i=this.findSourceByUid(n.uid),r;i&&i.isWinning!==t&&(r=i.isWinning,i.isWinning=t,this.firePropertyChange(3,n,t))},f.prototype.findSourceByUid=function(n){for(var e,r,i,o,u,t=0,f=this._styleList.length;t<f;t++)for(e=this._styleList[t],r=e.children,i=0,o=r.length;i<o;i++)if(u=r[i],u.propertyId===n)return u;return null},f.prototype.findStyleByName=function(n){for(var i,t=0,r=this._styleList.length;t<r;t++)if(i=this._styleList[t],i.propertyName===n)return i},f.prototype.getPropertyById=function(n){return n?this._elementStyleModel.getPropertyById(n):null},f.prototype.handleFileLinkClick=function(n,t,i){Common.ProjectDocuments.showDocument(n,t,i)},f.prototype.startSingleEdit=function(){this._remoteDom.startSingleEdit()},f.prototype.endSingleEdit=function(){this._remoteDom.endSingleEdit()},f.prototype.toggleEnableForStyle=function(n,i){var f=this,u=[],r;return(i===undefined||i!==n.isEnabled)&&(r=!n.isEnabled,n.sources.forEach(function(t){var i=f.getPropertyById(t.propertyId),e=i.isSubProperty?i.owner:i;i&&!e.isDeleted&&i.isEnabled!==r&&(u.push(i.toggleEnable()),n.enabledCount+=r?1:-1)})),t.Promise.join(u).then(function(){return n.recalculateEnabledCount()})},f.prototype.insertNewSource=function(n,t){for(var o,e,i,h,u,f=0,s=this._styleList.length;f<s;f++)for(o=this._styleList[f],e=o.children,i=0,h=e.length;i<h;i++)if(u=e[i],u.propertyId===t.uid)return u=new r(n.rule.selectorText,n.value,n.rule.fileUrl,n.rule.fileLine,n.rule.fileColumn,n.rule.fileLinkText,n.rule.tooltip,n.isWinning,n.isImportant,n.isEnabled,n.isSubProperty?n.container.isDeleted:n.isDeleted,n.changeState,n.ariaChangeStateString,n.ariaOverriddenString,n.status,o.isColor(),n.uid),e.splice(i,0,u),u},f.prototype.tcGetStyleList=function(){return this._styleList},f}(Common.ModelView.ListModel);i.Model=f})(i=n.Wsp||(n.Wsp={}))}(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=function(t){function i(i,r,u){var f=this;t.call(this);this._remoteDom=i;this._domExplorer=r;this._bridge=u;this._changedSources=[];this._ruleMap={};this._collapsedStyles={};this.listSource=function(t){n.ElementStyleModel.create(f._remoteDom,null,f._bridge,f._domExplorer.capabilities,function(i){f._changedSources=[];f._ruleMap={};f._styles=i;i.addUpdateListener(f);i.rules.forEach(function(t){var i,r,u;f.changesInRuleAreSignificant(t)&&(i=t.styleHref||t.fileUrl,t.isInlined?i=f._inlineStyleString||(f._inlineStyleString=Common.ToolWindowHelpers.loadString("InlineStyleSelector")):t.wasCreatedInSession?i=f._newRuleString||(f._newRuleString=Common.ToolWindowHelpers.loadString("ChangesViewNewInSessionCSSSource")):i||(i=f._unknownSourceString||(f._unknownSourceString=Common.ToolWindowHelpers.loadString("ChangesViewUnknownCSSSource"))),r=f.findSource(i),r||(r=new n.ChangedSource(i,f,t.isInlined),f._changedSources.push(r)),u=new n.ChangedRule(r,t,i),f._ruleMap[t.uid]=u,r.add(u))});f._changedSources.forEach(function(n){n.sort()});t(f._changedSources);i.addUpdateListener(f)})}}return __extends(i,t),Object.defineProperty(i.prototype,"changes",{get:function(){return this._changedSources},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"textForCopy",{get:function(){var t=!0,n="";return this._changedSources.forEach(function(i){t||(n+="\r\n");n+=i.textForCopy;t=!1}),n},enumerable:!0,configurable:!0}),i.prototype.isCollapsed=function(n){return!!this._collapsedStyles[n]},i.prototype.setCollapsedState=function(n,t){this.isCollapsed(n)!==t&&(t?this._collapsedStyles[n]=!0:delete this._collapsedStyles[n])},i.prototype.lookupSource=function(n){for(var i,t=0;t<this._changedSources.length;t++)if(i=this._changedSources[t],i.uniqueId===n)return i},i.prototype.lookupRule=function(n){return this._ruleMap[n]},i.prototype.selectElement=function(n){var t=this;this._remoteDom.getParentChainForStyle(n).done(function(n){n&&t._domExplorer.domTreeDataSource&&t._domExplorer.domTreeDataSource.expandUidChain(n).done(function(){t._domExplorer.selectItemByUid(n[n.length-1])})})},i.prototype.navigateFileLink=function(n,t,i){Common.ProjectDocuments.showDocument(n,t,i)},i.prototype.addUpdateListener=function(n){this._styles.addUpdateListener(n)},i.prototype.onRuleChange=function(n,t,i){n===7&&this._changedSources.forEach(function(n){n.updateTooltip(t,i)})},i.prototype.onPropertyChange=function(){},i.prototype.findSource=function(n){for(var i,t=0;t<this._changedSources.length;t++)if(i=this._changedSources[t],i.source===n)return i},i.prototype.changesInRuleAreSignificant=function(n){var i,t;if(!n.isOriginal)return!0;for(i=0;i<n.properties.length;i++)if(t=n.properties[i],!t.isOriginal&&!(t.wasCreatedInSession&&!t.isEnabled&&t.status===1))return!0;return!1},i}(Common.ModelView.ListModel);n.ChangesModel=t}(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,r=function(){function n(n,t,i,r,u,f,e,o){this.column=n;this.cookie=t;this.documentUrl=i;this.functionName=r;this.line=u;this.eventName=f;this.usesCapture=e;this.documentLocation=o;this.translatedLocation={documentPath:this.documentLocation,oneBasedLine:this.line,oneBasedColumn:this.column};this.updateInternal()}return n.prototype.onTranslatedLocationChanged=function(n){this.translatedLocation=n;this.updateInternal()},n.prototype.updateInternal=function(){this.text=Common.ToolWindowHelpers.createFileLinkText(this.translatedLocation.documentPath,this.translatedLocation.oneBasedLine);this.tooltip=typeof this.documentUrl!="undefined"&&this.documentUrl!==""?this.documentUrl.indexOf("eval code")===0?Common.ToolWindowHelpers.loadString("EvalCodeEventHandlerToolTip"):this.documentUrl.indexOf("Function code")===0?Common.ToolWindowHelpers.loadString("FunctionCodeEventHandlerToolTip"):this.documentUrl.indexOf("script block")===0?Common.ToolWindowHelpers.loadString("DynamicScriptBlockEventHandlerToolTip"):Common.ToolWindowHelpers.loadString("EventHandlerTooltip",[this.eventName,this.usesCapture,this.translatedLocation.documentPath,this.translatedLocation.oneBasedLine,this.translatedLocation.oneBasedColumn]):Common.ToolWindowHelpers.loadString("ExternalEventHandlerTooltip",[this.eventName,this.usesCapture])},n}(),i,u;n.EventHandler=r;i=function(){function n(n,t,i){this._model=n;this.eventName=t;this.children=i;this.isDirty=!1;this._model.bridge.addEventListener("onSourceMapStateChanged",this.onSourceMapStateChanged.bind(this))}return Object.defineProperty(n.prototype,"uniqueId",{get:function(){return this.eventName},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"expanded",{get:function(){return!this._model.isCollapsed(this.uniqueId)},set:function(n){this._model.setCollapsedState(this.uniqueId,!n)},enumerable:!0,configurable:!0}),n.prototype.hasChildren=function(){return!!this.children&&this.children.length>0},n.prototype.onSourceMapStateChanged=function(n){var r=this,s=n.customData,f,u,e,i,o;if(this.children){for(f=[],u=0,e=this.children.length;u<e;u++)i=this.children[u],i.documentUrl===s&&(o=this._model.getTranslatedLocation(i.documentUrl,i.line,i.column,!0).then(function(n){i.onTranslatedLocationChanged(n);r.isDirty=!0}),f.push(o));t.Promise.join(f).done(function(){r.isDirty&&r._model.updateCallback&&r._model.updateCallback()})}},n}();n.EventAndHandlers=i;u=function(n){function u(t,i){var r=this;n.call(this);this._bridge=t;this._uniqueIdsOfCollapsedStyles={};this.listSource=function(n,t){i.collectEvents(t[0],function(t){r.onEventHandlersRetrieved(t,n)},function(t){r.onEventHandlerAdded(t,n)},function(t){r.onEventHandlerRemoved(t,n)})}}return __extends(u,n),Object.defineProperty(u.prototype,"bridge",{get:function(){return this._bridge},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"updateCallback",{get:function(){return this._updateCallback},set:function(n){this._updateCallback=n},enumerable:!0,configurable:!0}),u.prototype.isCollapsed=function(n){return this._uniqueIdsOfCollapsedStyles[n]===!0},u.prototype.setCollapsedState=function(n,t){this.isCollapsed(n)!==t&&(t?this._uniqueIdsOfCollapsedStyles[n]=!0:delete this._uniqueIdsOfCollapsedStyles[n])},u.prototype.onEventHandlerAdded=function(n,i){var u=this,r;n&&(r=this.cache,t.Host.getDocumentLocation(n.document).done(function(t){u.processAddedEventHandler(r,n,t);i&&i(r)}))},u.prototype.onEventHandlerRemoved=function(n,t){n&&(this.processRemovedEventHandler(this.cache,n),t&&t(this.cache))},u.prototype.onEventHandlersRetrieved=function(n,i){var e=this,f=[],u=n.length,o=function(n,r){t.Host.getDocumentLocation(n.document).done(function(t){e.processAddedEventHandler(r,n,t);u--;u||i(r)})},r;if(u)for(r=0;r<n.length;r++)o(n[r],f);else i(f)},u.prototype.getTranslatedLocation=function(n,i,r){return this._bridge.getTranslatedLocation(n,i,r,!0).then(function(n){return t.Host.getDocumentLocation(n.documentPath).then(function(t){return n.documentPath=t,n})})},u.prototype.processAddedEventHandler=function(n,t,u){var o=this,f=this.findMatchingEventAndHandlers(t.eventName,n),e;if(f){for(e=0;e<f.children.length;e++)if(f.children[e].cookie===t.cookie)return}else f=new i(this,t.eventName,[]),n.push(f);var s=t.line+1,h=t.column+1,c=new r(h,t.cookie,t.document,t.functionName,s,t.eventName,t.usesCapture,u);f.children.push(c);f.isDirty=!0;this.getTranslatedLocation(t.document,s,h,!0).done(function(n){c.onTranslatedLocationChanged(n);f.isDirty=!0;o.updateCallback&&o.updateCallback()})},u.prototype.processRemovedEventHandler=function(n,t){var r=this.findMatchingEventAndHandlers(t.eventName,n),i;if(r)for(i=0;i<r.children.length;i++)if(r.children[i].cookie===t.cookie){r.children.splice(i,1);return}},u.prototype.findMatchingEventAndHandlers=function(n,t){for(var i=0;i<t.length;i++)if(t[i].eventName===n)return t[i];return null},u}(Common.ModelView.ListModel);n.EventsModel=u}(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var r=Microsoft.Plugin,u=function(i){function r(n,t,r,u,f,e,o,s,h,c,l,a){i.call(this,n,t,r,u,f,o,s,h,c,l,a);this._expansionChangeCallback=e;this.addClickHandlerThatExpandsAndCollapsesChildren();this.addKeyboardNavigationHandlers();this.addFocusSettingDivClickHandler()}return __extends(r,i),r.prototype.postViewProcessing=function(){var n,u;i.prototype.postViewProcessing.call(this);n=this.getMenuConfig();n&&(this._contextMenuController=new t(this,this.listRoot,n));u=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(this.listRoot,r.HEADER_CLASS);u&&(u.tabIndex=1)},r.prototype.findHeaderOrChild=function(n){while(n.parentElement&&!(n.classList.contains(r.HEADER_CLASS)||n.classList.contains(r.CHILD_VALUE_CONTAINER_CLASS)))n=n.parentElement;return n},r.prototype.getMenuConfig=function(){return null},r.prototype.beforeUpdate=function(n,t,i){var u;if(this._lastItemHadFocus=!1,this._subItemWithFocus=null,this.idPropertyName&&(u=this.htmlElementSource.activeElement,u)){var f=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(i,r.HEADER_CLASS),e=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(u,r.LIST_ITEM_CLASS),o=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(e,r.HEADER_CLASS);this._lastItemHadFocus=f===o;u.classList.contains(r.CHILD_VALUE_CONTAINER_CLASS)&&(this._subItemWithFocus=u.getAttribute("data-listsubid"))}},r.prototype.afterUpdate=function(n,t){if(this._lastItemHadFocus){var i;this._subItemWithFocus&&(i=this.listRoot.querySelector("[data-listsubid='"+this._subItemWithFocus+"']"));i||(i=this.listRoot.querySelector("[data-listid='"+t[this.idPropertyName]+"'] > ."+r.HEADER_CLASS));i&&this.setFocus(i)}},r.prototype.beforeDelete=function(n,t){var i=this.htmlElementSource.activeElement,u=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(i,r.LIST_ITEM_CLASS);this._lastItemHadFocus=u===t},r.prototype.afterDelete=function(){if(this._lastItemHadFocus){var n=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(this.listRoot,r.HEADER_CLASS);n&&this.setFocus(n)}},r.prototype.toggleExpander=function(n){var t=n.parentElement,i=t.getAttribute("aria-expanded")==="true";t.setAttribute("aria-expanded",i?"false":"true");this._expansionChangeCallback&&this._expansionChangeCallback(n.parentElement.parentElement.getAttribute("data-listid"),!i)},r.prototype.addClickHandlerThatExpandsAndCollapsesChildren=function(){var n=this;this.addHandler(this.listRoot,"click",[r.EXPAND_ICON_CLASS],function(t){return n.toggleExpander(t.target),!1})},r.prototype.addKeyboardNavigationHandlers=function(){var t=this;this.addHandler(this.listRoot,"keydown",null,function(i){if(i.ctrlKey||i.shiftKey||i.altKey||Common.ToolWindowHelpers.isContextMenuUp()||n.Utility.isCurrentFocusOnInput())return!0;var u=i.target,r=i.srcElement;if(i.key===Common.Keys.DOWN)t.moveFocusDown(r);else if(i.key===Common.Keys.UP)t.moveFocusUp(r);else if(i.key===Common.Keys.LEFT)t.focusParentOrCollapse(r);else if(i.key===Common.Keys.RIGHT)t.expandOrFocusChild(r);else if(i.key===Common.Keys.HOME)t.moveFocusToFirst(r);else if(i.key===Common.Keys.END)t.moveFocusToLast(r);else return!0;return!1})},r.prototype.focusParentOrCollapse=function(n){var i,u,t,f,e;if(this.isChild(n)){i=n.parentElement.parentElement;u=i.children[0];this.setFocus(u);return}t=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(n.parentElement,r.EXPAND_ICON_CLASS);t&&(f=t.parentElement,e=f.getAttribute("aria-expanded")==="true",e&&this.toggleExpander(t))},r.prototype.expandOrFocusChild=function(n){var i,t,u;if(!this.isChild(n)){if(n.getAttribute("aria-expanded")!=="true"){i=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(n,r.EXPAND_ICON_CLASS);i&&this.toggleExpander(i);return}t=n.nextElementSibling;t&&t.children&&t.children.length&&(u=t.children[0],this.setFocus(u))}},r.prototype.findFocusableUp=function(n){var f=n.previousElementSibling,i,t,u,e;return f?f:this.isChild(n)?(i=n.parentElement.parentElement,F12.DomExplorer.DomExplorerWindow.findDescendentByClass(i,r.HEADER_CLASS)):(i=n.parentElement,t=i.previousElementSibling,!t)?null:(u=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(t,r.HEADER_CLASS),u.getAttribute("aria-expanded")==="true"&&t.children&&t.children.length>=2)?(e=t.children[1],e.lastElementChild):u},r.prototype.moveFocusUp=function(n){var t=this.findFocusableUp(n);t&&this.setFocus(t)},r.prototype.moveFocusToFirst=function(n){for(var t=n,i;i=this.findFocusableUp(t);)t=i;t&&this.setFocus(t)},r.prototype.findFocusableDown=function(n){var f=n.nextElementSibling,i,t,u;if(f&&this.isChild(n))return f;if(this.isChild(n))i=n.parentElement.parentElement;else{if(n.getAttribute("aria-expanded")==="true"&&(t=n.nextElementSibling,t&&t.children.length))return t.children[0];i=n.parentElement}return(u=i.nextElementSibling,u)?F12.DomExplorer.DomExplorerWindow.findDescendentByClass(u,r.HEADER_CLASS):null},r.prototype.moveFocusDown=function(n){var t=this.findFocusableDown(n);t&&this.setFocus(t)},r.prototype.moveFocusToLast=function(n){for(var t=n,i;i=this.findFocusableDown(t);)t=i;t&&this.setFocus(t)},r.prototype.isChild=function(n){return n.classList.contains(r.CHILD_VALUE_CONTAINER_CLASS)},r.prototype.addFocusSettingDivClickHandler=function(){var n=this;this.addHandler(this.listRoot,"click",null,function(t){var i=n.findHeaderOrChild(t.target);return i.focus&&n.setFocus(i),!0})},r.LIST_ITEM_CLASS="BPT-ExpandingList-Item",r.EXPAND_ICON_CLASS="BPT-ExpandingList-ExpandIcon",r.HEADER_CLASS="BPT-ExpandingList-Header",r.CHILD_VALUE_CONTAINER_CLASS="BPT-ExpandingList-Child-Value-Container",r}(Common.ModelView.ReconcilingListView),i,t;n.ExpandingListView=u,function(n){n[n.CopyObject=0]="CopyObject"}(i||(i={}));t=function(){function n(t,i,r){var u=this;this._menuId="ExpandingViewContextMenu"+n.Uid++;this._expandingView=t;this._elementListener=i;this._config=r;this.initialize();this._menuItems=[];this._config.menuItems.forEach(function(n){u._menuItems.push({id:n.name,type:1,label:Common.ToolWindowHelpers.loadString(n.textIdentifier)})})}return n.prototype.uninitialize=function(){this._elementListener.removeEventListener("contextmenu",this._contextMenuListener);this._elementListener.removeEventListener("keydown",this._keydownListener)},n.prototype.dismiss=function(){this._contextMenu&&(this._contextMenu.removeEventListener("dismiss",this._dismissHandler),this._contextMenu.dismiss(),this._contextMenu.dispose(),this._contextMenu=null);Common.ToolWindowHelpers.contextMenuUp(!1)},n.prototype.initialize=function(){var n=this;this._contextMenuListener=function(t){return n.onContextMenu(t)};this._keydownListener=function(t){return n.onKeydown(t)};this._elementListener.addEventListener("contextmenu",this._contextMenuListener);this._elementListener.addEventListener("keydown",this._keydownListener)},n.prototype.onKeydown=function(n){var r=n.shiftKey&&!n.ctrlKey&&!n.altKey,t,i;return n.keyCode===121&&r&&(t=document.querySelector("#"+this._expandingView.listViewDivId+" :focus")||this._elementListener,i=t.getBoundingClientRect(),this.showContextMenu(t,i.left,i.top),n.preventDefault(),n.stopImmediatePropagation()),!0},n.prototype.onContextMenu=function(n){var t=null,i=n.clientX,r=n.clientY,u;return this._config.getSelectedItem?t=this._config.getSelectedItem(i,r):this._expandingView&&(i<=0||r<=0?(t=document.querySelector("#"+this._expandingView.listViewDivId+" :focus"),t&&(u=t.getBoundingClientRect(),i=u.left,r=u.top)):(t=this._expandingView.findHeaderOrChild(document.elementFromPoint(i,r)),t&&this._expandingView.setFocus(t))),this.showContextMenu(t,i,r),n.preventDefault(),n.stopImmediatePropagation(),!1},n.prototype.onMenuItemClicked=function(n,t,i){for(var r=0;r<this._menuItems.length;r++)if(this._menuItems[r].id===t){this._config.menuItems[r].execute(i);break}this.dismiss()},n.prototype.showContextMenu=function(n,t,i){var f=this,u;if(this.dismiss(),this._selection=n,!this._contextMenu){for(u=0;u<this._menuItems.length;u++)this._menuItems[u].disabled=this.createIsDisabledFunction(this._config.menuItems[u].isDisabled);this._contextMenu=r.ContextMenu.create(this._menuItems,this._menuId,null,null,function(n,t){return f.onMenuItemClicked(n,t.id,f._selection)});this._dismissHandler=function(){f.dismiss()}}return this._elementListener&&this._contextMenu.attach(this._elementListener),this._contextMenu.addEventListener("dismiss",this._dismissHandler),this._contextMenu.show(parseInt(t.toFixed(0)),parseInt(i.toFixed(0))),Common.ToolWindowHelpers.contextMenuUp(!0),!1},n.prototype.createIsDisabledFunction=function(n){var t=this;return n?function(){return n(t._selection)}:function(){return!1}},n.Uid=0,n}();n.ExpandingContextMenuController=t}(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,i;(function(i){var u=Common.Templating,r=function(){function n(){}return n.getPropertyId=function(t){var i=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(t,n.CSS_SOURCE);return(i?i.getAttribute("data-uid"):"")||""},n.isHeader=function(t){return t.classList.contains(n.CSS_HEADER)},n.isSource=function(t){return t.classList.contains(n.CSS_SOURCE)},n.findHeaderOrSourceAncestor=function(t){while(t){if(n.isHeader(t)||n.isSource(t))return t;t=t.parentElement}return null},n.isCurrentFocusOnInput=function(){var n=document.activeElement;if(!n)return!1;var t=n.tagName,i=t==="INPUT"&&n.getAttribute("type")==="text",r=t==="TEXTAREA";return i||r},n.ALL_STYLES_BUTTON_ID="allWinningStylesButton",n.CSS_ARIA_INVALID="BPT-Style-PropertyValueAriaInvalid",n.CSS_ARIA_CHANGE_STATE="BPT-WinningStyle-PropertyAriaChangeState",n.CSS_ARIA_OVERRIDDEN="BPT-WinningStyle-PropertyAriaOverridden",n.CSS_BPT_TOOLBAR_TOGGLE_BUTTON_STATE_ON="BPT-ToolbarToggleButton-StateOn",n.CSS_CHANGE_BAR="BPT-Style-ChangeBar",n.CSS_FILE_LINK="BPT-FileLink",n.CSS_HEADER="BPT-ExpandingList-Header",n.CSS_HEADER_CHECKBOX="BPT-WinningStyle-HeaderCheckBox",n.CSS_HEADER_COLOR="BPT-WinningStyle-Color",n.CSS_HEADER_COLOR_HIDDEN="BPT-WinningStyle-Color-Hidden",n.CSS_HEADER_VALUE="BPT-WinningStyle-PropertyValue-Grid",n.CSS_INVALID_PROPERTY="BPT-Style-InvalidProperty",n.CSS_NOT_WINNING="BPT-WinningStyle-NotWinning",n.CSS_PROPERTY_NAME="BPT-WinningStyle-PropertyName",n.CSS_PROPERTY_VALUE="BPT-Style-PropertyValue",n.CSS_SCROLL_CONTAINER="BPT-DataTree-ScrollContainer",n.CSS_SOURCE="BPT-ExpandingList-Child-Value-Container",n.CSS_SOURCE_CHECKBOX="BPT-WinningStyle-SourceCheckBox",n.CSS_SOURCE_COLOR="BPT-WinningStyle-SourceColor",n.FILTER_TEXT_BOX_ID="winningStylesFilterTextBox",n.MAX_PROPERTY_VALUE_ROWS=5,n.NO_RESULTS_MESSAGE_ID="winningStylesNoResultsMessage",n}(),f=function(i){function f(n,t,u,f,e,o,s){var h=this;i.call(this,u,f,e,o,n.capabilities,function(n,t){return o.setExpansionState(n,t)},s,null,"uniqueId","propertyName",function(n,t){return!n.equals(t)});this._domExplorer=n;this._bridge=t;this._model=o;this._tcPropertyEnableCallback=null;this._listElement=this.htmlElementSource.getElementById(this.listViewDivId);this.initializeAllStylesButton();this._model.allStylesChanged.addHandler(function(n){if(h._allStylesButton){var t=""+!n;h._allStylesButton.getAttribute("aria-pressed")!==t&&h._allStylesButton.setAttribute("aria-pressed",t);n?h._allStylesButton.classList.remove(r.CSS_BPT_TOOLBAR_TOGGLE_BUTTON_STATE_ON):h._allStylesButton.classList.add(r.CSS_BPT_TOOLBAR_TOGGLE_BUTTON_STATE_ON);h.renderView()}});this.menuItems=[{name:"copyProperty",textIdentifier:"CopyPropertyMenuText",execute:function(n){return Common.ClipboardHelper.fireCopyEvent(n)}},{name:"viewSource",textIdentifier:"ViewSourceMenuText",execute:function(n){window.setTimeout(function(){h.canViewSource(n)&&h.viewSource(n)},0)},isDisabled:function(n){return!h.canViewSource(n)}}];this._model.addUpdateListener(this);this.registerClickHandler();this.registerKeydownHandler();this.registerDOMAttrModifiedHandler();this.initializeAllStylesButton();this.addNameFilterHandlers();Common.ClipboardHelper.addCopyListener(this._listElement,this.onCopy.bind(this))}return __extends(f,i),f.prototype.clearView=function(){i.prototype.clearView.call(this);this._model.clearModel();this.initializeAllStylesButton();this.synchronizeNoResultsMessage()},f.prototype.toggleExpander=function(n){i.prototype.toggleExpander.call(this,n);var r=n.parentElement.getAttribute("data-name"),t=this._model.findStyleByName(r);t&&(t.updateChangeState(),this.updateStyleChangeBar(t))},f.prototype.registerClickHandler=function(){var n=this;this.addHandler(this._listElement,"click",[r.CSS_SOURCE_CHECKBOX,r.CSS_FILE_LINK,r.CSS_HEADER_CHECKBOX,r.CSS_PROPERTY_VALUE],function(t){var i=t.target,u,f;return i.classList.contains(r.CSS_SOURCE_CHECKBOX)?(n.togglePropertyCheckBox(i),n.select(i.parentElement),!1):i.classList.contains(r.CSS_FILE_LINK)?(n.viewSource(i),!1):i.classList.contains(r.CSS_HEADER_CHECKBOX)&&n._domExplorer.capabilities.canToggleComputedPropertyEnable?(n.toggleHeaderCheckBox(i),n.select(i.parentElement),!1):i.classList.contains(r.CSS_PROPERTY_VALUE)&&n._domExplorer.capabilities.canEditPropertyValue&&(u=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(i,r.CSS_SOURCE),u)?(n.select(u),f=n.findClosestProperty(i),n.editProperty(f),!0):!0})},f.prototype.viewSource=function(n){var t=this.findClosestProperty(n);t&&this.openTargetElementFileLink(t)},f.prototype.canViewSource=function(n){if(!this._domExplorer.capabilities.canViewSource)return!1;var t=this.findClosestProperty(n);return!!t},f.prototype.editProperty=function(n){n&&!n.isDeleted&&(n.isProperty?this.prepareEditBox(n):this.editSubproperty(n))},f.prototype.registerKeydownHandler=function(){var n=this;this.addHandler(this._listElement,"keydown",null,function(t){var u,f,o;if(n._isInEditMode)return!0;var i=t.target,e=!t.ctrlKey&&!t.shiftKey&&!t.altKey,s=t.ctrlKey&&!t.shiftKey&&!t.altKey;return t.key===Common.Keys.SPACEBAR&&e&&n._domExplorer.capabilities.canToggleComputedPropertyEnable&&(u=r.findHeaderOrSourceAncestor(i),u)?(f=i.firstElementChild,r.isHeader(u)?n.toggleHeaderCheckBox(f):n.togglePropertyCheckBox(f),!1):t.key===Common.Keys.ENTER&&e&&n._domExplorer.capabilities.canEditPropertyValue?(o=n.findClosestProperty(i),n.editProperty(o),!1):!0})},f.prototype.prepareEditBox=function(n){this.enterEditValue(n)||this.setCurrentSelection(n)},f.prototype.editSubproperty=function(n){for(var t,r=n.container,i=n.rule.properties.length-1;i>=0;i--){if(t=n.rule.properties[i],t===r)break;if(t.name===n.name){this.prepareEditBox(t);return}}this.editAddedLonghandPropertyFromShorthandSubproperty(n)},f.prototype.editAddedLonghandPropertyFromShorthandSubproperty=function(n){var u=this,f=n.name,e=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(this._listElement,r.CSS_SCROLL_CONTAINER),o=this.findElementForProperty(n),i=n.rule.addProperty(),s=function(t){var r=u._model.insertNewSource(i,n),f=u.insertNewPropertyIntoView(o,r);Common.ToolWindowHelpers.scrollIntoView(f,e);u.prepareEditBox(i);t(i)};return new t.Promise(function(n){i.commitName(f).done(function(){return s(n)})})},f.prototype.insertNewPropertyIntoView=function(n,t){var i=this.instantiateTemplate("winningStylesPropertyTemplate",t);return n.parentElement.insertBefore(i,n),i},f.prototype.instantiateTemplate=function(n,t){var r=new u.Template(this._domExplorer.capabilities,{htmlElementSource:document,templateId:n}),i=this.htmlElementSource.createElement("div");return i.innerHTML=r.createTemplateText(t),i.firstElementChild},f.prototype.setCurrentSelection=function(n){var t=this.findElementForProperty(n);t&&this.setFocus(t)},f.prototype.findElementForProperty=function(n,t){var i="."+r.CSS_SOURCE+"[data-uid='"+n.uid+"']"+(t?" ."+t:"");return this._listElement.querySelector(i)},f.prototype.enterEditValue=function(n){var t=this,i=function(n){t._isInEditMode=!0;setTimeout(n,0)};return i(function(){return t.editPropertyValue(n)}),!0},f.prototype.editPropertyValue=function(i){var u=this,e=this.findElementForProperty(i,r.CSS_PROPERTY_VALUE),o,p,c,w,b,s,h,f,y;if(e&&(o=F12.DomExplorer.DomExplorerWindow.findAncestorByClass(e,r.CSS_SOURCE),o)){this._domExplorer.traceWriter.raiseEvent(511);p=new F12.DomExplorer.CssAndHtmlMetadataSource;c=new F12.DomExplorer.StylePropertyValueIntellisenseProvider(i.name,p);c.onShouldOpenOnTextChange=function(n){return!n.match(/^-?\d/)};w=new Common.Intellisense.IntellisenseContext(new Common.Intellisense.InputElementTextEditorBridge,new Common.Intellisense.IntellisenseMenu("intellisenseListBox",null,null,500,!0,c,null,!0),c,this._bridge);this._domExplorer.traceWriter.raiseEvent(512);b=new n.ValueEditorKey(";");s=new n.ValueEditor(document,this._domExplorer,this._bridge,window,r.MAX_PROPERTY_VALUE_ROWS,w);s.addExitKeys(b);s.enableCommitOnChange();s.enableNumericChanges();var l=!1,a=o.offsetWidth+o.offsetLeft-e.offsetLeft-3,v=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(o,r.CSS_SOURCE_COLOR);v&&(h=window.getComputedStyle(v),h&&h.display!=="none"&&(a+=v.offsetWidth,a+=parseInt(h.marginLeft,10)+parseInt(h.marginRight,10)));e.textContent=e.textContent.trim();f=null;s.show(e,a,function(n){return new t.Promise(function(t){l||(u._model.startSingleEdit(),l=!0);f!==null&&window.clearTimeout(f);y=n;f=window.setTimeout(function(){i.commitValue(y);f=null},200);t(!0)})}).done(function(){var n,t;f!==null&&(window.clearTimeout(f),i.commitValue(y));l&&u._model.endSingleEdit();u._isInEditMode=!1;i.refreshValueDisplay();u.updateViewSetFocus(i);n=u.findElementForProperty(i);n&&u.updateStatus(i,n);u._domExplorer.documentMode<9&&(t=u._domExplorer.selectedItem,u._domExplorer.refreshElementForLowDocModes(t,!1,!1))})}},f.prototype.updateViewSetFocus=function(n){this._isInEditMode||(this._oneShotPropertyFocus=n,this.updateView())},f.prototype.registerDOMAttrModifiedHandler=function(){var n=this;this.addHandler(this._listElement,"DOMAttrModified",null,function(t){var i,u,f;return t.attrName==="aria-checked"&&(i=r.findHeaderOrSourceAncestor(t.target),i&&(u=t.newValue==="true",f=i.firstElementChild,r.isHeader(i)?n.toggleHeaderCheckBox(f,u):n.togglePropertyCheckBox(f,u))),!0})},f.prototype.postViewProcessing=function(){if(i.prototype.postViewProcessing.call(this),this.synchronizeCheckBoxState(),this._oneShotPropertyFocus){if(!r.isCurrentFocusOnInput()){var n=this.findElementForProperty(this._oneShotPropertyFocus);n&&this.select(n)}this._oneShotPropertyFocus=null}},f.prototype.synchronizeCheckBoxState=function(){var n=this;this._model.forEachStyle(function(t){return n.setCheckBoxState(t)})},f.prototype.openTargetElementFileLink=function(n){var t=n.rule,i=t.styleHref||t.fileUrl;this._model.handleFileLinkClick(i,t.fileLine,t.fileColumn)},f.prototype.findFocus=function(){return this._listElement.querySelector(":focus")},f.prototype.findClosestProperty=function(n){var t;if(n)return(t=r.getPropertyId(n),!t)?void 0:this._model.getPropertyById(t)},f.prototype.getMenuConfig=function(){return this},f.prototype.preViewProcessing=function(){i.prototype.preViewProcessing.call(this);this.synchronizeViewAndModel()},f.prototype.synchronizeViewAndModel=function(){this._model.showAllStyles=this.getAllStylesButtonState();this._model.nameFilter=this.htmlElementSource.getElementById(r.FILTER_TEXT_BOX_ID).value;this.synchronizeNoResultsMessage()},f.prototype.synchronizeNoResultsMessage=function(){var n=this.htmlElementSource.getElementById(r.NO_RESULTS_MESSAGE_ID);n.style.display=this._model.length===0?"block":"none"},f.prototype.onCopy=function(n){var i=this.findClosestProperty(n),t;return i?i.formatForCopy:(t=this._model.findStyleByName(n.getAttribute("data-name")),t)?t.propertyName+": "+t.propertyValue+";":undefined},f.prototype.initializeAllStylesButton=function(){var n=this;(this._allStylesButton=this.htmlElementSource.getElementById(r.ALL_STYLES_BUTTON_ID),this._allStylesButton)&&(this._allStylesButtonInitialized||(this._allStylesButton.classList.add(r.CSS_BPT_TOOLBAR_TOGGLE_BUTTON_STATE_ON),this._allStylesButton.setAttribute("aria-pressed","true"),this._allStylesButtonInitialized=!0),this.addHandler(this._allStylesButton,"mouseover",null,function(){return t.Tooltip.show({content:n.getAllStylesButtonToolTip()}),!0}),this._allStylesButton.setAttribute("aria-label",this.getAllStylesButtonToolTip()),this.addHandler(this._allStylesButton,"click",null,function(){return n.synchronizeAllStylesModelStateWithButtonState(),!1}),this.addHandler(this._allStylesButton,"keydown",null,function(t){if(n._isInEditMode)return!0;var i=!t.ctrlKey&&!t.shiftKey&&!t.altKey;return(t.key===Common.Keys.SPACEBAR||t.key===Common.Keys.ENTER)&&i?(n.synchronizeAllStylesModelStateWithButtonState(),!1):!0}),this.addHandler(this._allStylesButton,"DOMAttrModified",null,function(t){if(t.attrName==="aria-pressed"&&t.target===n._allStylesButton){var i=t.newValue==="true";i===n._model.showAllStyles&&(n._model.showAllStyles=!n._model.showAllStyles)}return!0}))},f.prototype.synchronizeAllStylesModelStateWithButtonState=function(){this._model.showAllStyles=this.getAllStylesButtonState()},f.prototype.getAllStylesButtonState=function(){return this._allStylesButton||(this._allStylesButton=this.htmlElementSource.getElementById(r.ALL_STYLES_BUTTON_ID)),!this._allStylesButton.classList.contains(r.CSS_BPT_TOOLBAR_TOGGLE_BUTTON_STATE_ON)},f.prototype.getAllStylesButtonToolTip=function(){return t.Resources.getString("UserStylesDomExplorerButtonTooltip")},f.prototype.addNameFilterHandlers=function(){var t=this,i=this.htmlElementSource.getElementById(r.FILTER_TEXT_BOX_ID);i&&(this.addHandler(i,"input",null,function(n){var i=n.target;return t._model.nameFilter!==i.value&&(t._model.nameFilter=i.value,t.renderView()),!0}),this._filterTextBoxContextMenu=new n.TextControlMenuController(this._bridge,i))},f.prototype.select=function(n){return n?(this.setFocus(n),!0):!1},f.prototype.togglePropertyCheckBox=function(n,t){this._model.toggleEnabled(r.getPropertyId(n),t)},f.prototype.toggleHeaderCheckBox=function(n,t){var r=n.parentElement,u=r.getAttribute("data-name"),i=this._model.findStyleByName(u);i&&this._model.toggleEnableForStyle(i,t)},f.prototype.onRuleChange=function(n){n===2&&this.updateViewSetFocus(this.findClosestProperty(this.findFocus()))},f.prototype.onPropertyChange=function(n,t,i){if(n===3)this.onPropertyWinningRuleChange(t,i);else if(n===4)this.onPropertyEnableChange(t,i);else if(n===2)this.onPropertyValueChange(t,i);else if(n===6)this.onPropertyStatusChange(t,i);else if(n===11)this.onPropertyChangeStatusChange(t);this.synchronizeStyle(t);var r=this._model.findStyleByName(t.name);r&&this.setCheckBoxState(r)},f.prototype.synchronizeStyle=function(n){var i=n.name,f="."+r.CSS_HEADER+"[data-name='"+i+"']",t=this._listElement.querySelector(f),e,u;t&&(e=F12.DomExplorer.DomExplorerWindow,u=this._model.findStyleByName(i),u)&&(n.isWinning?t.setAttribute("data-uid",n.uid):t.getAttribute("data-uid")===n.uid&&t.setAttribute("data-uid",""),this.updateViewSetFocus(this.findClosestProperty(this.findFocus())))},f.prototype.onPropertyStatusChange=function(n){var t=this.findElementForProperty(n);t&&(this.updateStatus(n,t),this.updateColorDisplay(n,t))},f.prototype.onPropertyChangeStatusChange=function(n){var t=this.findElementForProperty(n);t&&this.updateSourceChangeBar(n,t,n.changeState)},f.prototype.onPropertyWinningRuleChange=function(n,t){var f=n.uid,e="."+r.CSS_SOURCE+"[data-uid='"+f+"']",i=this._listElement.querySelector(e),u;i&&(t?i.classList.remove(r.CSS_NOT_WINNING):i.classList.add(r.CSS_NOT_WINNING),u=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(i,r.CSS_ARIA_OVERRIDDEN),u&&(u.innerText=n.ariaOverriddenString))},f.prototype.onPropertyEnableChange=function(n,t){var f="."+r.CSS_SOURCE+"[data-uid='"+n.uid+"'] ."+r.CSS_SOURCE_CHECKBOX,i=this._listElement.querySelector(f),u;i&&(i.checked=t,u=this._model.findStyleByName(n.name),u.enabledCount+=t?1:-1,i.parentElement.setAttribute("aria-checked",t));this._tcPropertyEnableCallback&&(this._tcPropertyEnableCallback(t),this._tcPropertyEnableCallback=null)},f.prototype.onPropertyValueChange=function(n){var u="."+r.CSS_SOURCE+"[data-uid='"+n.uid+"']",t=this._listElement.querySelector(u),i;t&&(i=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(t,r.CSS_PROPERTY_VALUE),i&&(i.textContent=n.valueForDisplay),this.updateColorDisplay(n,t))},f.prototype.updateStatus=function(t,i){var f=t.status===1,u,e;i.setAttribute("aria-invalid",""+!f);u=this.findElementForProperty(t,r.CSS_PROPERTY_VALUE);u&&(f?u.classList.remove(r.CSS_INVALID_PROPERTY):u.classList.add(r.CSS_INVALID_PROPERTY));e=this.findElementForProperty(t,r.CSS_ARIA_INVALID);e&&(e.innerText=f?"":n.StyleProperty.AriaInvalidString)},f.prototype.updateSourceChangeBar=function(t,i,u){var e=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(i,r.CSS_CHANGE_BAR),f,o;e.setAttribute("data-change",u);f=this.findElementForProperty(t,r.CSS_ARIA_CHANGE_STATE);f&&(f.innerText=t.ariaChangeStateString);o=u===n.StyleChangeNotifier.CHANGE_BAR_REMOVE;e.parentElement.setAttribute("data-removed",o);this.updateStyleChangeBar(this._model.findStyleByName(t.name))},f.prototype.updateStyleChangeBar=function(t){var e="."+r.CSS_HEADER+"[data-name='"+t.propertyName+"'] > ."+r.CSS_CHANGE_BAR,u=this._listElement.querySelector(e),f,i;u&&(f=t.expanded?n.StyleChangeNotifier.CHANGE_BAR_NONE:t.changeState,u.setAttribute("data-change",f),i=u.nextElementSibling,i&&i.classList.contains(r.CSS_ARIA_CHANGE_STATE)&&(i.innerText=t.expanded?"":n.StyleRule.AriaChangeStateUpdateString))},f.prototype.updateColorDisplay=function(n,t){var i=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(t,r.CSS_SOURCE_COLOR);i&&(n.isDisplayableColor?(i.style.backgroundColor=n.value,i.classList.remove(r.CSS_HEADER_COLOR_HIDDEN)):i.classList.add(r.CSS_HEADER_COLOR_HIDDEN))},f.prototype.setCheckBoxState=function(n){var i="."+r.CSS_HEADER+"[data-name='"+n.propertyName+"'] > ."+r.CSS_HEADER_CHECKBOX,t=this._listElement.querySelector(i);t&&(t.checked=n.isEnabled,t.indeterminate=n.isEnabledIndeterminate,t.parentElement.setAttribute("aria-checked",n.isEnabled))},Object.defineProperty(f.prototype,"tcPropertyEnableCallback",{get:function(){return this._tcPropertyEnableCallback},set:function(n){this._tcPropertyEnableCallback=n},enumerable:!0,configurable:!0}),f.prototype.tcQuery=function(n){return this._listElement.querySelector(n)},f}(n.ExpandingListView);i.View=f})(i=n.Wsp||(n.Wsp={}))}(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=function(t){function i(n,i,r,u,f,e,o,s,h){var c=this;t.call(this,r,u,f,e,n.capabilities,function(n,t){e.setCollapsedState(n,!t)},h,s,"uniqueId","source");this._domExplorer=n;this._bridge=i;this._changesListElement=this.htmlElementSource.getElementById(this.listViewDivId);this._emptyMessageElement=this.htmlElementSource.getElementById("changesEmptyMessage");this._emptyMessageElement.textContent=Common.ToolWindowHelpers.loadString("ChangesViewEmptyMessage");this._model=e;this._styleCache=o;this.setupEventHandlers();this.menuItems=[{name:"copy",textIdentifier:"CopyMenuText",execute:function(n){return c.copyObject(n)},isDisabled:function(n){return c.isCopyDisabled(n)}},{name:"copyAll",textIdentifier:"CopyAllMenuText",execute:function(){return c.copyAll()}},{name:"revert",textIdentifier:"RevertStyleMenuText",execute:function(n){return c.revert(n)},isDisabled:function(n){return c.isRevertDisabled(n)}},{name:"viewSource",textIdentifier:"ViewSourceMenuText",execute:function(n){window.setTimeout(function(){c.canViewSource(n)&&c.viewSource(n)},0)},isDisabled:function(n){return!c.canViewSource(n)}}]}return __extends(i,t),i.prototype.postViewProcessing=function(){this._model.addUpdateListener(this);t.prototype.postViewProcessing.call(this);this._emptyMessageElement.style.display=this._model.changes.length?"none":"block"},i.prototype.navigateLink=function(n){n.isInline?this._model.selectElement(n.uid):this._model.navigateFileLink(n.url,n.line,n.column)},i.prototype.getMenuConfig=function(){return this},i.prototype.isCopyDisabled=function(t){var f=t.classList.contains(n.ExpandingListView.HEADER_CLASS),r,u;return f?!1:(r=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(t,i.RULE_CLASS),u=this.getRuleForElement(r),u.isDeleted)},i.prototype.copyObject=function(t){var e=t.classList.contains(n.ExpandingListView.HEADER_CLASS),r,u,f;e?(u=t.parentElement.getAttribute("data-listid"),r=this._model.lookupSource(u)):(f=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(t,i.RULE_CLASS),r=this.getRuleForElement(f));this.setClipboard(r)},i.prototype.copyAll=function(){this.setClipboard(this._model)},i.prototype.isRevertDisabled=function(n){var t=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(n,i.RULE_CLASS);return!t},i.prototype.revert=function(n){var t=this,u=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(n,i.RULE_CLASS),r=this.getRuleForElement(u),f=r.uid;r.revert().done(function(n){t._styleCache.applyChanges([{event:"revertRule",uid:f,obj:n}]);t.updateView()})},i.prototype.viewQuery=function(t,i,r){var u="."+n.ExpandingListView.LIST_ITEM_CLASS+"[data-listid='"+t.uniqueId+"']";return i&&(u+=" [data-listsubid='"+i.uid+"']"),r&&(u+=" ."+r),this.listRoot.querySelector(u)},i.prototype.onRuleChange=function(n,t,r){var u,e,f;n===7&&(u=this._model.lookupRule(t.uid),u&&(f=this.viewQuery(u.source,u,i.LINK_CLASS),f&&(f.setAttribute("data-tooltip",r),f=this.viewQuery(u.source,null,i.SOURCE_CLASS),f&&f.setAttribute("data-tooltip",r))));n===8&&(u=this._model.lookupRule(t.uid),u&&(e=r,u.url=e.documentPath,u.line=e.oneBasedLine,u.column=e.oneBasedColumn,f=this.viewQuery(u.source,u,i.LINK_CLASS),f&&(f.innerText=Common.ToolWindowHelpers.createFileLinkText(null,e.oneBasedLine,e.oneBasedColumn)),f=this.viewQuery(u.source,null,i.SOURCE_CLASS),f&&(f.innerText=Common.ToolWindowHelpers.getTruncatedFileName(e.documentPath,50))))},i.prototype.onPropertyChange=function(){},i.prototype.getRuleForElement=function(n){if(n&&n.classList.contains(i.RULE_CLASS)){var t=n.getAttribute("data-uid");return this._model.lookupRule(t)}},i.prototype.setClipboard=function(n){this._copyText=n?n.textForCopy:null;Common.ClipboardHelper.fireCopyEvent(this.listRoot)},i.prototype.viewSource=function(n){var r=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(n,i.RULE_CLASS),t;r&&(t=this.getRuleForElement(r),t&&t.hasFileLink&&this.navigateLink(t))},i.prototype.canViewSource=function(n){var t,r;return this._domExplorer.capabilities.canViewSource?(t=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(n,i.RULE_CLASS),!t)?!1:(r=this.getRuleForElement(t),r?r.hasFileLink:!1):!1},i.prototype.setupEventHandlers=function(){var t=this;this.addHandler(this.listRoot,"click",[i.LINK_CLASS],function(n){var i=n.target.nextElementSibling;return t.navigateLink(t.getRuleForElement(i)),!1});this.addHandler(this.listRoot,"keydown",[n.ExpandingListView.HEADER_CLASS,n.ExpandingListView.CHILD_VALUE_CONTAINER_CLASS],function(n){var i=n.target,u=n.ctrlKey&&!n.shiftKey&&!n.altKey,r;return event.keyCode===67&&u?(t.copyObject(i),!1):(r=!n.ctrlKey&&!n.shiftKey&&!n.altKey,t.canViewSource(i)&&(event.keyCode===32||event.keyCode===13)&&r)?(t.viewSource(i),!1):!0});Common.ClipboardHelper.addCopyListener(this.listRoot,this.onCopy.bind(this))},i.prototype.onCopy=function(){return this._copyText},i.SOURCE_CLASS="BPT-Changes-Source",i.RULE_CLASS="BPT-Changes-Rule",i.LINK_CLASS="BPT-Changes-Link",i}(n.ExpandingListView);n.ChangesView=t}(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=function(n){function t(t,i,r,u,f,e,o){n.call(this,t,i,r,u,f,function(n,t){u.setCollapsedState(n,!t)},o,null,"uniqueId","eventName",function(n){return n.isDirty},function(n){n.isDirty=!1});this._focusSettingDivClickHandlerApplied=!1;this._addKeyboardNavigationHandlersApplied=!1;this._documentOpener=e;this._defaultItemTemplateId=r;this.addEventHandlers()}return __extends(t,n),t.prototype.collapseChange=function(n,t){this.model.setCollapsedState(n,t)},t.prototype.addEventHandlers=function(){var n=this;this.addHandler(this.listRoot,"click",["BPT-Events-Handler-Link"],function(t){return n._documentOpener.openDocumentLinkFromEvent(t),!1});this.addHandler(this.listRoot,"keydown",null,function(t){var i=t.target;return(t.key==="Enter"||t.key==="Spacebar")&&!t.ctrlKey&&!t.shiftKey&&!t.altKey?(n.openDocument(t),!1):!0})},t.prototype.openDocument=function(n){if(n.target){var t=$m(n.target).children(".BPT-FileLink").get(0);this._documentOpener.openDocumentLinkFromElement(t)}},t}(n.ExpandingListView);n.EventsView=t}(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(){}return n.init=function(n,t){n.addClass("BPT-Tab-Item");F12.Tools.Utility.Assert.areEqual(n.attr("role"),"tab","Missing tab role");F12.Tools.Utility.Assert.areEqual(n.parent().attr("role"),"tablist","Missing tablist role");n.bind("click focus",function(){var t=n.parent().find(".BPT-Tab-Item[aria-selected='true']");t.length>0&&t.get(0)!==n.get(0)&&t.attr("aria-selected","false");n.attr("aria-selected")!=="true"&&n.attr("aria-selected","true")});n.get(0).addEventListener("DOMAttrModified",function(i){if(i.attrName==="aria-selected"){var r=i.newValue==="true";r?(n.attr("tabindex","1"),t()):n.removeAttr("tabindex")}})},n.isActive=function(n){return n.attr("aria-selected")==="true"},n}();n.TabItem=t})(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(n){var t=this,i;this._listeners=[];this._minPaneSize=240;this._container=n;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");i=window.outerWidth;this._curWidth=i>0?Math.max(300,i/100*30):300;this._divider=$m("<div>");this._divider.addClass("BPT-Pane-Divider");this._rightPane.parent().get(0).insertBefore(this._divider.get(0),this._rightPane.get(0));window.onresize=function(){t.refreshPaneWidth()};this.refreshPaneWidth();this._divider.bind("mousedown",function(n){var u=document.body.style.cursor,i,r;document.body.style.cursor="w-resize";i=function(n){var i=t._divider.get(0).getBoundingClientRect().left;t.setPaneWidth(t._rightPane.width()-n.pageX+i)};r=function(){$m(document).unbind("mousemove",i);$m(document).unbind("mouseup",r);document.body.style.cursor=u};$m(document).bind("mousemove",i);$m(document).bind("mouseup",r);n.stopImmediatePropagation();n.preventDefault()})}return Object.defineProperty(n.prototype,"leftWidth",{get:function(){return this._leftWidth},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"rightWidth",{get:function(){return this._rightWidth},enumerable:!0,configurable:!0}),n.prototype.addResizeListener=function(n){this._listeners.indexOf(n)<0&&this._listeners.push(n)},n.prototype.refreshPaneWidth=function(){this.setPaneWidth(this._curWidth)},n.prototype.removeResizeListener=function(n){var t=this._listeners.indexOf(n);t>=0&&this._listeners.splice(t,1)},n.prototype.setPaneWidth=function(n){var i=this,t;n<=0||(this._curWidth=n=Math.max(this._minPaneSize,n),this._curWidth=n=Math.round(this._curWidth),t=this._container.outerWidth(!0),t<this._minPaneSize*2?n=t>>1:t-n<this._minPaneSize&&(n=t-this._minPaneSize),this._leftPane.css("width","calc(100% - "+(n+this._divider.width())+"px)"),this._rightPane.css("width",n+"px"),this._leftWidth=this._leftPane.outerWidth(!1),this._rightWidth=this._rightPane.outerWidth(!1),this._listeners.forEach(function(n){n.onPaneResize(i._leftWidth,i._rightWidth)}))},n}();n.HorizontalPane=t})(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var i=Microsoft.Plugin,t=function(){function n(n,t,i,r,u){t===void 0&&(t=!1);i===void 0&&(i=!1);r===void 0&&(r=!1);u===void 0&&(u=!1);this.key=n;this.shiftKey=t;this.ctrlKey=i;this.altKey=r;this.metaKey=u}return n.prototype.equalTo=function(n){return this.key===n.key&&this.shiftKey===n.shiftKey&&this.ctrlKey===n.ctrlKey&&this.altKey===n.altKey&&this.metaKey===n.metaKey},n.EnterKey=new n("Enter"),n.CtrlEnterKey=new n("Enter",!1,!0),n.TabKey=new n("Tab"),n.ShiftTabKey=new n("Tab",!0),n.EscapeKey=new n("Esc"),n.UpKey=new n("Up"),n.DownKey=new n("Down"),n.ShiftUpKey=new n("Up",!0),n.ShiftDownKey=new n("Down",!0),n.ShiftF10Key=new n("F10",!0),n}(),u,f,r;n.ValueEditorKey=t,function(n){n[n.Cancelled=0]="Cancelled";n[n.Dismissed=1]="Dismissed";n[n.Committed=2]="Committed"}(u||(u={}));f=function(){function u(n,i,r,u,f,e,o){f===void 0&&(f=1);this._htmlElementSource=n;this._domExplorer=i;this._bridge=r;this._view=u;this._maxRows=f;this._intellisenseContext=e;this._oldValue=o;this._exitKeys=[t.EnterKey,t.TabKey,t.ShiftTabKey];this._cancelKey=t.EscapeKey;this._arrowKeys=[t.UpKey,t.DownKey,t.ShiftUpKey,t.ShiftDownKey];this._reportedRowCount=0;this.doTrim=!0;this.stopPropagation=!0}return Object.defineProperty(u.prototype,"textBox",{get:function(){return this._textBox},enumerable:!0,configurable:!0}),u.prototype.addExitKeys=function(){for(var t=[],n=0;n<arguments.length;n++)t[+n]=arguments[n];this._exitKeys=this._exitKeys.concat(t)},u.prototype.removeExitKeys=function(){for(var t=this,i=[],n=0;n<arguments.length;n++)i[+n]=arguments[n];i.forEach(function(n){for(var i=0;i<t._exitKeys.length;i++)if(t._exitKeys[i]===n){t._exitKeys.splice(i,1);break}})},u.prototype.enableNumericChanges=function(){this._isNumericArrowsEnabled=!0},u.prototype.enableStripDelimiter=function(n){this._stripDelimiter=n},u.prototype.enableTabsInData=function(){this.removeExitKeys(n.ValueEditorKey.TabKey,n.ValueEditorKey.ShiftTabKey);this._allowTabs=!0},u.prototype.enableCommitOnChange=function(){this._isCommitOnChangeEnabled=!0},u.prototype.show=function(f,e,o,s){var h=this,a,c,v,l,y,p,w;for(this._onSizeChange=s,this._element=f,this._onCommit=o,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",f.getAttribute("aria-label")),this._maxRows===1?(this._textBox.rows=1,this._textBox.removeAttribute("aria-multiline")):this._textBox.setAttribute("aria-multiline","true"),c=f.parentNode;c;)c.draggable&&(this._dragElements.push(c),c.draggable=!1),c=c.parentNode;return a=this._view.getComputedStyle(f),this._textBox.style.fontFamily=a.fontFamily,this._textBox.style.fontSize=a.fontSize,this._textBox.style.fontWeight=a.fontWeight,this._textBox.style.fontStyle=a.fontStyle,this._textBox.style.lineHeight=a.lineHeight,this._textBox.style.width=(e||f.offsetWidth+10)+"px",this._textBox.style.overflowX="hidden",this._markActiveElements=F12.DomExplorer.DomExplorerWindow.findAllAncestorsByClass(f,"BPT-EditBox-MarkActive"),this._markActiveElements.forEach(function(n){n.classList.add("BPT-EditBox-Active")}),c=this._element.parentElement,this._originalOverflow=c.style.overflow,c.style.overflow="visible",this._originalMaxHeight=c.style.maxHeight,this._textBox.rows=1,u.replace(this._element,this._textBox),v=this._textBox.clientHeight,this.setInitialValue(this._lastCommitValue=this._originalValue=this._oldValue||this._element.textContent),this._updateHandler=function(){h._maxRows>1&&(h._textBox.rows=Math.max(Math.min(Math.ceil(h._textBox.scrollHeight/v),h._maxRows),1));h._textBox.style.height=h._textBox.rows*v+"px";h._isCommitOnChangeEnabled?h.checkForValueCommit(!1):h._textBox.classList.remove(u.InvalidValueClass);h._reportedRowCount!==h._textBox.rows&&(h._reportedRowCount=h._textBox.rows,h._onSizeChange&&h._onSizeChange(h._textBox.rows))},this._dismissContextMenuAndStopPropagation=function(n){h.stopPropagation&&n.stopPropagation();i.ContextMenu.dismissAll()},this._updateHandler(),c.classList.contains("BPT-EditBox-MaxHeightOverride")&&(c.style.maxHeight=this._maxRows*v+"px"),this._textBox.addEventListener("input",this._updateHandler),this._intellisenseContext&&this._intellisenseContext.initialize(this._textBox),this._keyDownHandler=function(n){h.onKeyPress(n)||(n.preventDefault(),n.stopPropagation())},this._textBox.addEventListener("keydown",this._keyDownHandler),this._textBox.addEventListener("mousedown",this._dismissContextMenuAndStopPropagation,!0),this._textBox.addEventListener("mouseup",this._dismissContextMenuAndStopPropagation,!0),this._textBox.addEventListener("click",this._dismissContextMenuAndStopPropagation,!0),this._textBox.addEventListener("dblclick",this._dismissContextMenuAndStopPropagation,!0),this._bridge.addEventListener("deactivated",this._forcedCloseHandler=this.forcedClose.bind(this)),i.F12&&(i.F12.addEventListener("navigatesubframes",this._forcedCloseHandler),Common.NavigationUtilities.disableNavigation()),this._textBoxContextMenu=new n.TextControlMenuController(this._bridge,this._textBox),this._mouseWheelHandler=function(n){if(h._isNumericArrowsEnabled){var t=Math.floor(n.wheelDelta/120);n.shiftKey&&(t*=10);h.numericValueChange(t);F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.CHANGE_VALUE_EDITOR_NUMERIC_VALUE,0);n.preventDefault();n.stopPropagation()}},this._textBox.addEventListener("mousewheel",this._mouseWheelHandler),this._intellisenseContext&&(l=this._intellisenseContext.intellisenseMenu,this._isCommitOnChangeEnabled&&(y=l.onSelectionChanged,l.onSelectionChanged=function(n){y&&y(n);h.checkForValueCommit(!1,n.text)},p=l.onClosing,l.onClosing=function(){p&&p();h.checkForValueCommit(!1)}),w=l.onChoiceCommitted,l.onChoiceCommitted=function(n,i){w&&w(n,i);h.checkForValueCommit(!1,n.text);h.completeEdit(2,i===0?t.TabKey:t.EnterKey)}),this._dismissCheck=function(n){var t,i;h._isDismissed||(t=n.target,t!==h._textBox)&&(Common.ToolWindowHelpers.isContextMenuUp()||(i=t.parentElement,t.className==="intellisenseListBox"||i&&i.className==="intellisenseListBox")||h.shouldContinueEdit&&h.shouldContinueEdit(t)||t.nodeName!=="HTML"&&(h._isDismissed=!0,h.completeEdit(1)))},this._htmlElementSource.addEventListener("mousedown",this._dismissCheck),this._htmlElementSource.addEventListener("mouseup",this._dismissCheck,!0),this._htmlElementSource.addEventListener("click",this._dismissCheck,!0),this._htmlElementSource.addEventListener("dblclick",this._dismissCheck,!0),this._textBox.select(),this._textBox.focus(),this._promiseExec=new r,new i.Promise(this._promiseExec.init.bind(this._promiseExec))},u.prototype.forcedClose=function(){this.completeEdit(2)},u.replace=function(n,t){var i=n.parentElement,r;i&&(r=n.nextSibling,i.removeChild(n),r?i.insertBefore(t,r):i.appendChild(t))},u.prototype.setInitialValue=function(n){this._textBox.value=n;var t=document.queryCommandSupported("ms-clearUndoStack");t&&document.execCommand("ms-clearUndoStack")},u.prototype.setValue=function(n,t,i){var r=document.queryCommandSupported("ms-beginUndoUnit");r&&document.execCommand("ms-beginUndoUnit");this._textBox.value=Common.ToolWindowHelpers.replaceTextInRange(this._textBox.value,t,i,n);r&&document.execCommand("ms-endUndoUnit")},u.prototype.checkForValueCommit=function(n,t){var r=this;return new i.Promise(function(i){t===undefined&&(t=n?r._originalValue:r._textBox.value,r.doTrim&&(t=t.trim()));r._lastCommitValue!==t?r._onCommit?r._onCommit(t,r._originalValue).done(function(n){n?(r._lastCommitValue=t,r._textBox.classList.remove(u.InvalidValueClass)):r._textBox.classList.add(u.InvalidValueClass);i(n)}):(r._lastCommitValue=t,i(!0)):i(!0)})},u.prototype.completeEdit=function(n,t){var r=this,f,e,o;switch(n){case 0:F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.EXIT_VALUE_EDIT_CANCELLED,5);break;case 1:F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.EXIT_VALUE_EDIT_DISMISSED,5);break;case 2:F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.EXIT_VALUE_EDIT_COMMITTED,5)}this._promiseExec.isCompleted||(this._stripDelimiter&&(f=this._textBox.value,f.length>=2&&(e=f[0],o=f[f.length-1],e===o&&this._stripDelimiter.indexOf(e)!==-1&&(this._textBox.value=f.substr(1,f.length-2)))),this.checkForValueCommit(n===0).done(function(f){var e,s,o,h;if(r._element&&(f||n===1)){for(f&&!r._oldValue&&n!==0&&(r._element.textContent=r._textBox.value),r._intellisenseContext&&r._intellisenseContext.uninitialize(),e=r._textBox.parentElement,e&&e.style&&(e.style.overflow=r._originalOverflow,e.classList.contains("BPT-EditBox-MaxHeightOverride")&&(e.style.maxHeight=r._originalMaxHeight)),u.replace(r._textBox,r._element),r._element=null,r._markActiveElements.forEach(function(n){n.classList.remove("BPT-EditBox-Active")}),r._textBox.removeEventListener("keydown",r._keyDownHandler),r._textBox.removeEventListener("input",r._updateHandler),r._textBox.removeEventListener("mousedown",r._dismissContextMenuAndStopPropagation),r._textBox.removeEventListener("mouseup",r._dismissContextMenuAndStopPropagation),r._textBox.removeEventListener("click",r._dismissContextMenuAndStopPropagation),r._textBox.removeEventListener("dblclick",r._dismissContextMenuAndStopPropagation),r._textBox.removeEventListener("mousewheel",r._mouseWheelHandler),r._htmlElementSource.removeEventListener("mousedown",r._dismissCheck),r._htmlElementSource.removeEventListener("mouseup",r._dismissCheck,!0),r._htmlElementSource.removeEventListener("click",r._dismissCheck,!0),r._htmlElementSource.removeEventListener("dblclick",r._dismissCheck,!0),r._bridge.removeEventListener("deactivated",r._forcedCloseHandler),i.F12&&(i.F12.removeEventListener("navigatesubframes",r._forcedCloseHandler),Common.NavigationUtilities.enableNavigation()),r._textBoxContextMenu.uninitialize(),s=r._dragElements,r._dragElements=[],o=0,h=s.length;o<h;o++)s[o].draggable=!0;r._promiseExec.completed({newValue:r._lastCommitValue,oldValue:r._originalValue,exitKey:t,wasCancelled:n===0||!f})}}))},u.prototype.onKeyPress=function(i){var r,f,e,u,o;if(this._element){if(r=new t(i.key,i.shiftKey,i.ctrlKey,i.altKey,i.metaKey),r.equalTo(t.EscapeKey))return this.completeEdit(0,r),!1;for(u=0;u<this._exitKeys.length;u++)if(r.equalTo(this._exitKeys[u]))return this.completeEdit(2,r),!1;if(this._allowTabs&&(r.equalTo(n.ValueEditorKey.TabKey)||r.equalTo(n.ValueEditorKey.ShiftTabKey)))return r.equalTo(n.ValueEditorKey.TabKey)&&(f=this._textBox.selectionStart,e=this._textBox.selectionEnd,this.setValue("\t",f,e)),!1;if(this._isNumericArrowsEnabled&&(!this._intellisenseContext||!this._intellisenseContext.intellisenseMenu.isOpen))for(u=0;u<this._arrowKeys.length;u++)if(r.equalTo(this._arrowKeys[u])){if(o=(r.shiftKey?10:1)*(r.key==="Up"?1:-1),this.numericValueChange(o))return F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.CHANGE_VALUE_EDITOR_NUMERIC_VALUE,1),!1;break}}return!0},u.prototype.numericValueChange=function(n){var f=this._textBox.selectionStart,t=this.findNumberAtCaret();if(t){var i=t.length-t.extraLength,u=i?parseInt(this._textBox.value.substr(t.start,i)):0,r=(u+n).toString();this.setValue(r,t.start,t.start+i);this._textBox.selectionStart=t.start;this._textBox.selectionEnd=t.start+r.length+t.extraLength;this.checkForValueCommit(!1)}return!!t},u.prototype.findNumberAtCaret=function(){var t=this._textBox.selectionStart||0,r=this._textBox.value,n,u,i,f,e;do n=r.substr(t).match(/^-?\d*(\.?\d*(%|[a-zA-Z]+)?)/),e=n&&/\d/.test(r.substr(t,n[0].length)),e&&(u=t,i=n[0].length,f=n[1].length),t--;while(t>=0&&(n&&n[0].length||t===this._textBox.selectionStart-1));if(i)return{start:u,length:i,extraLength:f}},u.InvalidValueClass="BPT-EditBox-Invalid",u}();n.ValueEditor=f;r=function(){function n(){this._hasCompleted=!1}return Object.defineProperty(n.prototype,"isCompleted",{get:function(){return this._hasCompleted},enumerable:!0,configurable:!0}),n.prototype.init=function(n){this._completed=n},n.prototype.completed=function(n){this._hasCompleted=!0;this._completed(n)},n}();n.EditorShowPromiseExecutive=r})(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(n,t,r,u){var f=this;this._bridge=n;this._remoteDom=t;this._styleCache=r;this._domExplorer=u;this.activeTab=null;this._scrollPositions={};this._pseudoStatesToggle=document.getElementById("pseudoStatesToggle");this._pseudoStatesPanel=document.getElementById("pseudoStatesPanel");this._rightPane=document.getElementById("pane-right");this.installPseudoStateEvents();i.PseudoStatesToggleTooltipOn||(i.PseudoStatesToggleTooltipOn=Common.ToolWindowHelpers.loadString("PseudoClassesButtonTooltipOn"),i.PseudoStatesToggleTooltipOff=Common.ToolWindowHelpers.loadString("PseudoClassesButtonTooltipOff"));this.initializePseudoStatesToggle();window.addEventListener("resize",function(){f.setScrollHeight()})}return i.prototype.initializePseudoStatesToggle=function(){var n=this;this._pseudoStatesToggle&&(this._pseudoStatesToggle.setAttribute("aria-pressed","false"),this._pseudoStatesToggleTooltip=i.PseudoStatesToggleTooltipOff,$m(this._pseudoStatesToggle).bind("mouseover",function(){return Common.ToolWindowHelpers.isContextMenuUp()?!0:(t.Tooltip.show({content:n._pseudoStatesToggleTooltip}),!1)}),this._pseudoStatesToggle.addEventListener("DOMAttrModified",function(t){if(t.attrName==="aria-pressed"&&t.target===n._pseudoStatesToggle&&t.newValue!==t.prevValue){var i=t.newValue==="true";n.displayPseudoState(i)}return!0}))},Object.defineProperty(i.prototype,"isTabLoaded",{get:function(){return this._isTabLoaded},enumerable:!0,configurable:!0}),i.prototype.addTabLoadedCallback=function(n){n&&(this._tabLoadedCallbackList?this._tabLoadedCallbackList.push(n):this._tabLoadedCallbackList=[n])},i.prototype.executeCleanup=function(){this.storeScrollPosition();$m(".BPT-HorizontalPane-Right-Tab").hide().addClass("BPT-Tab-Inactive");this._cleanup&&(this._cleanup(),this._cleanup=null)},i.prototype.onDetach=function(){this.displayPseudoState(!1);this.executeCleanup()},i.prototype.clearLayoutAndStylesState=function(){$m(".BPT-HorizontalPane-Right-Content > .BPT-DataTree-Container").data("previousUid","");this._styleCache.clearState();this._styleView&&this._styleView.clearView();this.clearLayoutView()},i.prototype.clearState=function(){this.clearLayoutAndStylesState();this._winningStyleView&&this._winningStyleView.clearView()},i.prototype.storeScrollPosition=function(){var n=$m("#pane-right");this._scrollPositions[this.activeTab]={left:n.scrollLeft(),top:n.scrollTop()}},i.prototype.restoreScrollPosition=function(){var n=this._scrollPositions[this.activeTab],t;n||(n={left:0,top:0},this._scrollPositions[this.activeTab]=n);t=$m("#pane-right");t.scrollLeft(n.left);t.scrollTop(n.top)},i.prototype.applyRemoteStyleChanges=function(n){this._styleCache.applyChanges(n);this.activeTab==="changesView"&&this._changesView&&this._changesView.updateView()},i.prototype.setHorizontalPane=function(n){n.addResizeListener(this)},i.prototype.onPaneResize=function(){for(var r=$m(".BPT-Tabbar > .BPT-Tab-Item"),i=r.length,u=$m(".BPT-Tabbar").width(),n,f=0,t=0;t<i;t++)n=r.get(t),n.style.padding="",f+=n.scrollWidth+1;var o=i*6,s=Math.max(u-f,o),e=Math.min(s/i,28)/2,h=(u-e)/i+"px";for(t=0;t<i;t++)n=r.get(t),n.style.maxWidth=h,n.style.paddingLeft=n.style.paddingRight=e+"px"},i.prototype.showStyles=function(r,u){var f=this,e;if(this._telemetryStartTime=Date.now(),this.setActiveTab(i.STYLES_VIEW,r,u,{pseudo:!0,allStyles:!1},function(){f._styleView&&f._styleView.clearView()},521),!r||!u||/^#/.test(u)){this._styleView&&this._styleView.clearView();this.onTabLoadComplete(522);e={LoadTime:Date.now()-this._telemetryStartTime};F12.DomExplorer.Telemetry.analytics.log(F12.DomExplorer.Telemetry.EventName.LOAD_STYLES_TAB,e);return}this._styleModel?this._styleModel.setLoadArgs([r]):(this._styleModel=new n.StyleModel(this._remoteDom,this._domExplorer,this._styleCache),this._styleModel.setLoadArgs([r]),this._styleView=new n.StyleView(this._domExplorer,this._bridge,this._remoteDom,document,i.StyleListId,i.StyleRuleTemplateId,this._styleModel,t.Resources),this._styleView.renderViewCallback=function(){f.onTabLoadComplete(522);var n={ElementPropertyCount:f._styleView.propertyCount,ElementRuleCount:f._styleView.ruleCount,LoadTime:Date.now()-f._telemetryStartTime};F12.DomExplorer.Telemetry.analytics.log(F12.DomExplorer.Telemetry.EventName.LOAD_STYLES_TAB,n)});this._styleView.updateView()},i.prototype.getStyleModel=function(){return this._styleModel},i.prototype.getStyleView=function(){return this._styleView},i.prototype.showWinningStyles=function(t,r){var u=this;if(this._winningStyleModel||(this._winningStyleModel=new n.Wsp.Model(this._remoteDom,this._styleCache,Common.ToolWindowHelpers.createShortenedUrlText),this._winningStyleView=new n.Wsp.View(this._domExplorer,this._bridge,document,i.WinningStyleListId,i.WinningStyleItemTemplateId,this._winningStyleModel),this._winningStyleView.renderViewCallback=function(){return u.onTabLoadComplete(528)}),this.setActiveTab(i.WINNING_STYLES_VIEW,t,r,{pseudo:!0,allStyles:!0},function(){u._winningStyleView&&u._winningStyleView.clearView()},527),!t||!r||/^#/.test(r)){this._winningStyleView.clearView();this.onTabLoadComplete(528);return}this._winningStyleModel.setLoadArgs([t]);this._winningStyleView.updateView()},i.prototype.getWinningStyleModel=function(){return this._winningStyleModel},i.prototype.getWinningStyleView=function(){return this._winningStyleView},i.prototype.showLayout=function(n,t,r){var u=$m("#"+i.LAYOUT_VIEW);this.setActiveTab(i.LAYOUT_VIEW,n,t,{pseudo:!0,allStyles:!1},function(){u.attr("data-uid","");u.attr("data-tag","")},531);this.refreshLayoutView(n,t,!0,r)},i.prototype.refreshLayoutView=function(n,t,r,u){var s=this,f=$m("#"+i.LAYOUT_VIEW),e,o;if(!n||!t||/^#/.test(t)||u){if(this.clearLayoutView(),r)this.onTabLoadComplete(532);return}$m("#layout-offset-layer").show();e=f.attr("data-uid");o=n===e;f.attr("data-uid",n);f.attr("data-tag",t);this._remoteDom.getComputedBox(n).done(function(n){if(n&&f.find("[data-layoutProperty]").each(function(){var r=$m(this),f=r.attr("data-layoutProperty"),t=n[f]==null?"":n[f]+"",u;t=t.replace(/px$/,"");u=parseFloat(t);isNaN(u)||(t=(Math.round(u*100)/100).toString());o&&r.text()!==t&&i.gleamLayoutChange(r);r.text(t)}),r)s.onTabLoadComplete(532)})},i.prototype.showEvents=function(t,r){var u=this;if(this.setActiveTab(i.EVENTS_VIEW,t,r,{pseudo:!1,allStyles:!1},function(){u._eventsView&&u._eventsView.clearView();u._remoteDom.clearCurrentEventProxy()},533),!t||!r||/^#/.test(r)){this._eventsView&&this._eventsView.clearView();this.onTabLoadComplete(534);return}this._eventsModel?this._eventsModel.setLoadArgs([t]):(this._eventsModel=new n.EventsModel(this._bridge,this._remoteDom,Common.ToolWindowHelpers.createShortenedUrlText),this._eventsModel.setLoadArgs([t]),this._eventsView=new n.EventsView(document,i.EventsListId,i.EventsTemplateId,this._eventsModel,this._domExplorer.capabilities,this._domExplorer),this._eventsModel.updateCallback=this._eventsView.renderView.bind(this._eventsView),this._eventsView.renderViewCallback=function(){return u.onTabLoadComplete(534)});this._eventsView.updateView()},i.prototype.showChanges=function(){var t=this;this.setActiveTab(i.CHANGES_VIEW,null,null,{pseudo:!1,allStyles:!1},function(){t._changesView&&t._changesView.clearView()},529);this._changesModel||(this._changesModel=new n.ChangesModel(this._remoteDom,this._domExplorer,this._bridge),this._changesView=new n.ChangesView(this._domExplorer,this._bridge,document,i.ChangesListId,i.ChangesItemTemplateId,this._changesModel,this._styleCache),this._changesView.renderViewCallback=function(){return t.onTabLoadComplete(530)});this._changesView.updateView()},i.prototype.getChangesModel=function(){return this._changesModel},i.prototype.getChangesView=function(){return this._changesView},i.prototype.isPseudoStatePanelAvailable=function(){return this._pseudoStatesToggle.getAttribute("data-show")==="true"},i.prototype.isPseudoStatePanelOpen=function(){return this._pseudoStatesPanel.getAttribute("data-show")==="true"},i.prototype.togglePseudoStatePanel=function(){var n,t;if(this.isPseudoStatePanelAvailable())return n=this._pseudoStatesToggle.classList.contains(i.ToggleButtonOn),n?this._pseudoStatesToggle.classList.remove(i.ToggleButtonOn):this._pseudoStatesToggle.classList.add(i.ToggleButtonOn),t=!n,this.displayPseudoState(t),t},i.prototype.isPseudoClassEnabled=function(n){var t=this._pseudoStatesPanel.querySelector(".BPT-PseudoSelector[data-name='"+n+"']"),i;if(t)return i=t.firstElementChild,!i.disabled},i.prototype.getPseudoClassState=function(n){if(this.isPseudoStatePanelAvailable()&&!!this.isPseudoClassEnabled(n)){var t=this._pseudoStatesPanel.querySelector(".BPT-PseudoSelector[data-name='"+n+"']"),i=t.firstElementChild;return i.checked}},i.prototype.setPseudoClassState=function(n){var i=this;return new t.Promise(function(t,r){if(i.isPseudoStatePanelAvailable())if(i.isPseudoClassEnabled(n)){var u=i._pseudoStatesPanel.querySelector(".BPT-PseudoSelector[data-name='"+n+"']"),f=u.firstElementChild;i.addTabLoadedCallback(t);f.click()}else r(new Error(n+" state is unavailable for the current element"));else r(new Error("Pseudo state panel not available"))})},i.gleamLayoutChange=function(n){var t=n&&n.get&&n.get(0);t&&(t.gleamToken?(window.clearTimeout(t.gleamToken),delete t.gleamToken):n.addClass("BPT-HTML-Mutation"),t.gleamToken=window.setTimeout(function(){n.removeClass("BPT-HTML-Mutation");delete t.gleamToken},1e3))},i.prototype.setActiveTab=function(n,t,r,u,f,e){var c=this,o;e&&this.raiseTraceEvents(e);this._currentUid=t;this.executeCleanup();this.activeTab=n;var a=$m("#"+n).show().removeClass("BPT-Tab-Inactive"),s=u.pseudo&&this._domExplorer.documentMode>=7,l=s||u.allStyles,h=$m("#optionalButtonsPanel");l?h.removeClass("BPT-OptionsPanel-Hidden"):h.addClass("BPT-OptionsPanel-Hidden");this.updatePseudoStates(s,r?r.toLowerCase():r);o=$m("#allWinningStylesButton");u.allStyles?o.show():o.hide();this.restoreScrollPosition();this.setPaneLeftJustification();this._cleanup=function(){i.PseudoStateList.forEach(function(n){var t=c._pseudoStatesPanel.querySelector(".BPT-PseudoSelector[data-name='"+n+"']"),i=t.firstElementChild;i.checked=!1});f()}},i.prototype.onTabLoadComplete=function(n){var i,t,r,u;if(Common.ToolWindowHelpers.codeMarker(Common.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsDomExplorerTabChanged),n&&this.raiseTraceEvents(n),this._isTabLoaded=!0,this._tabLoadedCallbackList)for(i=this._tabLoadedCallbackList,this._tabLoadedCallbackList=null,t=0,r=i.length;t<r;t++)u=i[t],u()},i.prototype.setPaneLeftJustification=function(){var n=document.getElementsByClassName("BPT-Tab-Container")[0].getBoundingClientRect().left,t=document.getElementsByClassName("BPT-Pane-Divider")[0].getBoundingClientRect().left,i=t-n+3;$m(document.getElementById("pane-right")).css("left",i+"px")},i.prototype.clearLayoutView=function(){var n=$m("#"+i.LAYOUT_VIEW);n.find("[data-layoutProperty]").text("");$m("#layout-offset-layer").hide()},i.prototype.installPseudoStateEvents=function(){var t=this,i,n;if(this._pseudoStatesPanel)for(i=this._pseudoStatesPanel.querySelectorAll(".BPT-PseudoCheckbox"),n=0;n<i.length;n++)i[n].addEventListener("change",function(n){var i=n.target,r=i.parentElement.getAttribute("data-name");t._remoteDom.setPseudoStyling(t._currentUid,r,i.checked).done(function(){t._domExplorer.refreshCSSView()})})},i.prototype.updatePseudoStates=function(n,t){var r=this;this._pseudoStatesToggle.setAttribute("data-show",n);n?(this.displayPseudoState(this._pseudoStatesToggle.classList.contains(i.ToggleButtonOn)),i.PseudoStateList.forEach(function(n){var u=r._pseudoStatesPanel.querySelector(".BPT-PseudoSelector[data-name='"+n+"']"),i=u.firstElementChild;n==="visited"&&t!=="a"?(i.checked=!1,i.disabled=!0,u.classList.add("BPT-PseudoSelector-Disabled")):(i.disabled=!1,u.classList.remove("BPT-PseudoSelector-Disabled"),r._remoteDom.getPseudoStyling(r._currentUid,n).done(function(n){i.checked=n}))})):this.displayPseudoState(!1)},i.prototype.displayPseudoState=function(n){n?this._pseudoStatesToggle.classList.add(i.ToggleButtonOn):this._pseudoStatesToggle.classList.remove(i.ToggleButtonOn);this._pseudoStatesPanel.setAttribute("data-show",n);this._pseudoStatesToggleTooltip=n?i.PseudoStatesToggleTooltipOff:i.PseudoStatesToggleTooltipOn;this._pseudoStatesToggle.setAttribute("aria-label",this._pseudoStatesToggleTooltip);var t=this._pseudoStatesToggle.getAttribute("aria-pressed")==="true";t!==n&&this._pseudoStatesToggle.setAttribute("aria-pressed",n?"true":"false");this.setScrollHeight()},i.prototype.setScrollHeight=function(){this._rightPane.style.maxHeight=this._rightPane.parentElement.clientHeight-this._rightPane.offsetTop+"px"},i.prototype.raiseTraceEvents=function(n){this._domExplorer&&this._domExplorer.raiseTraceEvents(n)},i.EVENTS_VIEW="eventsView",i.CHANGES_VIEW="changesView",i.LAYOUT_VIEW="layoutView",i.STYLES_VIEW="stylesView",i.WINNING_STYLES_VIEW="winningStylesView",i.PseudoStateList=["hover","visited"],i.StyleListId="styleList",i.StyleRuleTemplateId="styleRuleTemplate",i.WinningStyleListId="winningStylesList",i.WinningStyleItemTemplateId="winningStylesItemTemplate",i.EventsTemplateId="eventsTemplate",i.EventsListId="eventsList",i.ChangesListId="changesList",i.ChangesItemTemplateId="changesTemplate",i.ToggleButtonOn="BPT-ToolbarToggleButton-StateOn",i}();n.TabPanes=i})(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(){}return n.isSelfClosingTag=function(t,i){return!i&&n.VOID_TAG[t.toLowerCase()]},n.domTreeSelect=function(n){F12.DomExplorer.App.domExplorer.selectItemByUid(n)},n.isCurrentFocusOnInput=function(){var t=document.activeElement;return n.isTextArea(t)||n.isInputText(t)},n.isTextArea=function(n){if(!n)return!1;var t=n.tagName;return typeof t!="string"?!1:t.toUpperCase()==="TEXTAREA"},n.isInputText=function(n){if(!n)return!1;var t=n.tagName;return typeof t!="string"?!1:t.toUpperCase()==="INPUT"&&n.hasAttribute("type")&&n.getAttribute("type")==="text"},n.VOID_TAG={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,menuitem:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},n}();n.Utility=t})(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var i,r,t;(function(n){n[n.Uid=0]="Uid";n[n.Selector=1]="Selector";n[n.AddProperty=2]="AddProperty";n[n.AddRule=3]="AddRule";n[n.Remove=4]="Remove";n[n.Select=5]="Select";n[n.Change=6]="Change";n[n.FileLinkTooltip=7]="FileLinkTooltip";n[n.FileLinkText=8]="FileLinkText"})(n.StyleRuleChangeEvent||(n.StyleRuleChangeEvent={}));i=n.StyleRuleChangeEvent,function(n){n[n.Uid=0]="Uid";n[n.Name=1]="Name";n[n.Value=2]="Value";n[n.IsWinning=3]="IsWinning";n[n.IsEnabled=4]="IsEnabled";n[n.IsApplied=5]="IsApplied";n[n.Status=6]="Status";n[n.ClearSubproperties=7]="ClearSubproperties";n[n.AddSubproperty=8]="AddSubproperty";n[n.Select=9]="Select";n[n.Remove=10]="Remove";n[n.Change=11]="Change"}(n.StylePropertyChangeEvent||(n.StylePropertyChangeEvent={}));r=n.StylePropertyChangeEvent;t=function(){function n(n){this.listeners=n}return n.prototype.notifyRuleChange=function(n,t,i){this.listeners.forEach(function(r){r.onRuleChange(n,t,i)})},n.prototype.notifyPropertyChange=function(n,t,i){this.listeners.forEach(function(r){r.onPropertyChange(n,t,i)})},n.CHANGE_BAR_ADD="add",n.CHANGE_BAR_REMOVE="remove",n.CHANGE_BAR_UPDATE="update",n.CHANGE_BAR_NONE="",n}();n.StyleChangeNotifier=t})(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,i=function(i){function r(n,u,f,e,o,s){i.call(this,u);this._model=n;this._uid=f;this.wasCreatedInSession=e;this.isDeleted=o;this._selectorText=s;this.properties=[];r.InheritedFromString||(r.InheritedFromString=typeof Plugin!="undefined"&&typeof t.Resources!="undefined"?Common.ToolWindowHelpers.loadString("DOMExplorerInheritedFromText",[""]):"");r.AriaChangeStateRemoveString||(r.AriaChangeStateRemoveString=typeof Plugin!="undefined"&&typeof t.Resources!="undefined"?Common.ToolWindowHelpers.loadString("AriaChangeStateRemove"):"");r.AriaChangeStateAddString||(r.AriaChangeStateAddString=typeof Plugin!="undefined"&&typeof t.Resources!="undefined"?Common.ToolWindowHelpers.loadString("AriaChangeStateAdd"):"");r.AriaChangeStateUpdateString||(r.AriaChangeStateUpdateString=typeof Plugin!="undefined"&&typeof t.Resources!="undefined"?Common.ToolWindowHelpers.loadString("AriaChangeStateUpdate"):"");this.updateChangeState()}return __extends(r,i),Object.defineProperty(r.prototype,"ariaLabel",{get:function(){var n="";return n+=this.ariaChangeStateString,this.isInherited&&(n+=r.InheritedFromString+" ",n+=this.displayInheritedFrom+" : "),this.parent&&(n+=this.parent+" : "),this.selectorText&&(n+=this.selectorText+" "),this.fileLinkText&&(n+=" : "+this.fileLinkText),n},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isRule",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isProperty",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isSubProperty",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"container",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"uid",{get:function(){return this._uid},set:function(n){if(n!==this._uid){var t=this._uid;this._model.remapRuleId(this,t,n);this.notifyRuleChange(0,this,n);this._uid=n}},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"selectorText",{get:function(){return this._selectorText},set:function(n){n!==this._selectorText&&(this._selectorText=n,this.notifyRuleChange(1,this,n))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"formatForCopy",{get:function(){var t=(this.isInlined?"":this._selectorText+" ")+"{\r\n",i,n;for(this.parent&&(t="/*"+this.parent+"*/\r\n"+t),i=0;i<this.properties.length;i++)n=this.properties[i],(n.isEnabled||n.status!==1)&&!n.isDeleted&&(n.isShorthand&&n.isEnabledIndeterminate?n.properties.forEach(function(n){n.isEnabled&&(t+="    "+n.formatForCopy+"\r\n")}):t+="    "+n.formatForCopy+"\r\n");return t+"}\r\n"},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isNew",{get:function(){return n.ElementStyleModel.isNew(this._uid)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isEditable",{get:function(){return!this.isInlined},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isOriginal",{get:function(){return!this.isDeleted&&(this.isInlined||this._selectorText===this.originalSelectorText)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"displayInheritedFrom",{get:function(){return this.target.description},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"ariaChangeStateString",{get:function(){switch(this.changeState){case n.StyleChangeNotifier.CHANGE_BAR_REMOVE:return r.AriaChangeStateRemoveString;case n.StyleChangeNotifier.CHANGE_BAR_ADD:return r.AriaChangeStateAddString;case n.StyleChangeNotifier.CHANGE_BAR_UPDATE:return r.AriaChangeStateUpdateString}return""},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"changeState",{get:function(){return this._changeState},set:function(n){this._changeState!==n&&(this._changeState=n,this.notifyRuleChange(6,this,n))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"extendedChangeState",{get:function(){return this._extendedChangeState},set:function(n){this._extendedChangeState!==n&&(this._extendedChangeState=n,this.notifyRuleChange(6,this,n))},enumerable:!0,configurable:!0}),r.prototype.setOriginal=function(n){this.originalSelectorText=n;this.updateChangeState()},r.prototype.addProperty=function(t,i,r){var f=this,u,e;return i===void 0&&(i=!1),u=t?new n.StyleProperty(this._model,this.listeners,t.wasCreatedInSession,t.current,t.original,t.originalLonghand,t.isApplied,t.isWinning,t.isDeleted,t.status,t.uid,this):new n.StyleProperty(this._model,this.listeners,!0,{name:"",value:"",isImportant:!1,isEnabled:!0},null,null,!0,!0,!1,"Valid",n.ElementStyleModel.createNewId(),this),this._model.remapPropertyId(u,null,u.uid),e=this.getPositionForRule(r),this.properties.splice(e,0,u),i&&this.notifyRuleChange(2,this,u),t&&(t.longhand.forEach(function(t){var r=new n.StyleProperty(f._model,f.listeners,!1,t.current,null,null,t.isApplied,t.isWinning,!1,t.status,t.uid,f);u.addSubproperty(r,i)}),u.lookupLonghandOriginals()),this.updateChangeState(),u},r.prototype.recalculateWinning=function(){this.properties.forEach(function(n){n.recalculateWinning()})},r.prototype.remove=function(){this.recalculateWinning();this._model.removeRule(this);this.notifyRuleChange(4,this)},r.prototype.removeProperty=function(n){var i=this.properties,t;for(n.clearSubproperties(),t=0;t<i.length;t++)if(i[t]===n)return i.splice(t,1),this._model.removeProperty(n),this.updateChangeState(),t;return-1},r.prototype.revert=function(){var n=this;return this.wasCreatedInSession?this.commitDelete():new t.Promise(function(t,i){n._model.editRuleRevert(n._uid,function(r){r?(n.removeNewProperties(),n.updateFromRemote(r),t(r)):i()})})},r.prototype.updateWinningProperty=function(n,t){this.properties.forEach(function(i){i.updateWinning(n,t)})},r.prototype.commitDelete=function(){var n=this;return new t.Promise(function(t){n.isNew?(n.remove(),t()):n._model.editRuleDelete(n._uid,function(i){i?n.updateFromRemote(i):n.remove();t()})})},r.prototype.select=function(){this.notifyRuleChange(5,this)},r.prototype.updateFromRemote=function(n){this.uid=n.uid;this.isDeleted=n.isDeleted;this.isInlined||(this.selectorText=n.selector,this.originalSelectorText=n.originalSelector);for(var t=0;t<this.properties.length;t++)this.properties[t].updateFromRemote(n.properties[t]);this.updateChangeState()},r.prototype.removeNewProperties=function(){var n=[];this.properties.forEach(function(t){t.wasCreatedInSession&&n.push(t)});n.forEach(function(n){n.remove(!1)})},r.prototype.commitSelector=function(n){var i=this;return new t.Promise(function(t,r){if(n!==i._selectorText){var u=i;i.isNew?(i._selectorText=n,t()):i._model.editRuleSelector(i._uid,n,function(n){n?(u.updateFromRemote(n),t()):(u.notifyRuleChange(1,i,i._selectorText),r())})}else t()})},r.prototype.commitNewRule=function(n){var i=this,r=this.getPositionForRule(this);return new t.Promise(function(t,u){i._model.addRule(i._selectorText,n.name,n.value,n.isImportant,r,function(n){n&&n.properties.length?(i.updateFromRemote(n),t()):u()})})},r.prototype.addRemoteProperty=function(n,t,i){var r=this;this._model.addProperty(this.uid,n,t,i,null,function(n){if(n){var t=r.addProperty(n,!0);t.recalculateWinning()}})},r.prototype.setExistingOrAddNewProperty=function(n,t,i){for(var u,r=this.properties.length-1;r>=0;r--)if(this.properties[r].name===n){u=this.properties[r];break}u?u.commitValue(t+(i?" !important":"")):this.addRemoteProperty(n,t,i)},r.prototype.updateChangeState=function(){var t,i;if(this._model.capabilities.showChangeBars)if(this.isDeleted)this.changeState=this.extendedChangeState=n.StyleChangeNotifier.CHANGE_BAR_REMOVE;else if(this.wasCreatedInSession)this.changeState=this.extendedChangeState=n.StyleChangeNotifier.CHANGE_BAR_ADD;else if(this.isOriginal)for(this.changeState=this.extendedChangeState=n.StyleChangeNotifier.CHANGE_BAR_NONE,t=0;t<this.properties.length;t++)i=this.properties[t],i.isApplied&&i.changeState&&(this.extendedChangeState=n.StyleChangeNotifier.CHANGE_BAR_UPDATE);else this.changeState=this.extendedChangeState=n.StyleChangeNotifier.CHANGE_BAR_UPDATE},r.prototype.getPositionForRule=function(n){var i=this.properties.length,t;if(n)for(t=0;t<this.properties.length;t++)if(this.properties[t].uid===n.uid){i=t;break}return i},r}(n.StyleChangeNotifier);n.StyleRule=i}(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function t(n,t,i){this._remoteDom=n;this._bridge=t;this._capabilities=i}return Object.defineProperty(t.prototype,"bridge",{get:function(){return this._bridge},enumerable:!0,configurable:!0}),t.prototype.clearState=function(){this._cache=null},t.prototype.updateView=function(t,i){var r=this;this._cache?i(this._cache):n.ElementStyleModel.create(this._remoteDom,t,this._bridge,this._capabilities,function(n){r._cache=n;i(n)})},t.prototype.applyChanges=function(n){this._cache&&this._cache.applyChanges(n)},t}();n.StyleCache=t})(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i;(function(n){var i=function(){function i(){}return i.prototype.main=function(){var i=this;t.addEventListener("pluginready",function(){try{if(Microsoft&&t){t.Tooltip&&(t.Tooltip.defaultTooltipContentToHTML=!1);var u=new Common.TraceWriter;t.F12?i.bridge=new n.IEBridge(t.F12,window.external,u):t.VS&&(i.bridge=new n.VSBridge(t.VS,u));n.Telemetry.initializeAnalytics()}i.bridge.initialize().done(function(){var t=new Common.TraceWriter;i.domExplorer=new n.DomExplorerWindow(i.bridge,t);i.domExplorer.initialize();i.onDomExplorerAppLoaded&&i.onDomExplorerAppLoaded()})}catch(r){diagnosticOutput("Exception in window.onload: "+r.toString(),r.stack);throw r}});Common.ErrorHandling.addPromiseErrorListener()},i}();n.DomExplorerApp=i;n.App=new i})(i=n.DomExplorer||(n.DomExplorer={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=t.Promise,r;(function(r){var f=n.Tools.Utility.Assert,e,u;(function(n){n[n.Next=1]="Next";n[n.Previous=-1]="Previous"})(r.SearchDirection||(r.SearchDirection={}));e=r.SearchDirection;u=function(){function u(n,i){var f=this,u;this._log=[];this._selectedItemMutatedTimeoutMap={};this._activatedFocusToken=Number.NaN;this._initializationErrorMessage=null;this._currentElementHighlightUid="";this._temporaryElementHighlightUid="";this._lastKnownElementHighlightUid="";this._highlightIsShown=!1;this._selectionListeners=[];this.currentSelectedId="";this._telemetryLoadStartTime=Date.now();this.capabilities=new r.Capabilities(n.targetEngineKind);this.eventManager=new t.Utilities.EventManager;this._bridge=n;switch(this._bridge.targetEngineKind){case 1:u=new r.RemoteDom(this._bridge);break;case 2:u=new r.Chromium.RemoteDom(new Common.Chromium.RemoteDebug(this._bridge.channel))}this._remoteDom=new r.DesignerHook(n,u);this._traceWriter=i;this.traceWriter.raiseEvent(501);this._state="initializing";this._throttle=new Common.MessageThrottle;this._styleCache=new Dom.StyleCache(this._remoteDom,this.bridge,this.capabilities);this.tabPanes=new Dom.TabPanes(this._bridge,this._remoteDom,this._styleCache,this);this._domExplorerModel=new r.DomExplorerModel;this._bridge.addEventListener("switchTab",function(n){return f.switchTab(n.tabIndex)});this._bridge.addEventListener("toolMessage",function(n){return f.handleToolMessage(n)})}return Object.defineProperty(u.prototype,"log",{get:function(){return this._log},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"bridge",{get:function(){return this._bridge},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"selectedItem",{get:function(){var n=this.domTree.selectedItem;return this.domTreeDataSource.indexOfItem(n.id)<0?null:n},set:function(n){this.domTree.selectedItem=n},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"traceWriter",{get:function(){return this._traceWriter},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"documentMode",{get:function(){return this._domExplorerModel.currentDocMode},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"targetEngineKind",{get:function(){return this._bridge.targetEngineKind},enumerable:!0,configurable:!0}),u.findAncestorByClass=function(n,t){while(n){if(n.classList.contains(t))return n;n=n.parentElement}return null},u.findAllAncestorsByClass=function(n,t){for(var i=[];n;)n.classList.contains(t)&&i.push(n),n=n.parentElement;return i},u.findDescendentByClass=function(n,t){return n?n.querySelector("."+t):null},u.findAllDescendentsByClass=function(n,t){return n?n.querySelectorAll("."+t):null},u.detabify=function(n,t){var r,i;t===undefined&&(t=8);var f="",u=0,e=n.length;for(r=0;r<e;r++)i=n.charAt(r),f+=i==="\t"?Array(t-u+1).join(" "):i,u=i==="\n"||i==="\t"?0:(u+1)%t;return f},u.showMissingElementError=function(){if(t.F12){var n=t.Resources.getString("/Common/DOMExplorerMissingElementError");t.F12.ErrorDisplay.show(n)}},u.prototype.getToolbar=function(){return this._toolbar},u.prototype.timeLog=function(n,t){var r,i,u,f;t&&(this._log=[],this._lastLog=0,this._startLog=0);r=new Date;i=r.getTime();this._lastLog?(u=i-this._lastLog,f=i-this._startLog,this._log.push(n+": "+u+"ms from start: "+f)):(this._startLog=i,this._log.push(n+": "+r.toDateString()));this._lastLog=i},u.prototype.getPageUri=function(){return this._pageUri},u.prototype.onDomExplorerBeforeMenuLoaded=function(){},u.prototype.onDomExplorerMenuLoaded=function(){},u.prototype.temporaryShowElementHighlight=function(n){n&&this._domExplorerModel.showLayoutIsEnabled&&(this._temporaryElementHighlightUid=n===this._currentElementHighlightUid?"":n,this.remoteHighlight(n))},u.prototype.showElementHighlight=function(n){n&&(this._currentElementHighlightUid=n,this._temporaryElementHighlightUid="",this._domExplorerModel.showLayoutIsEnabled&&this.remoteHighlight(n))},u.prototype.hideElementHighlight=function(n){n===void 0&&(n=!1);this._temporaryElementHighlightUid="";this._lastKnownElementHighlightUid="";this._state==="ready"&&(this._highlightIsShown||n)&&(this._remoteDom.hideHoverItem(),this._highlightIsShown=!1)},u.prototype.refreshElementHighlight=function(){this._currentElementHighlightUid&&!this._temporaryElementHighlightUid&&this.restoreElementHighlight()},u.prototype.restoreElementHighlight=function(){this._temporaryElementHighlightUid="";this._lastKnownElementHighlightUid="";this._state==="ready"&&(this._currentElementHighlightUid?this.showElementHighlight(this._currentElementHighlightUid):this.hideElementHighlight())},u.prototype.mouseoverUid=function(n,t,i){var r;(t==="#text"||t==="")&&i&&(r=i);this.temporaryShowElementHighlight(r||n)},u.prototype.mouseoutUid=function(){this._currentElementHighlightUid?this.showElementHighlight(this._currentElementHighlightUid):this.hideElementHighlight()},u.prototype.initialize=function(){var i=this,n,e,f;this._initializationErrorMessage="";n=function(n,t){return Common.ToolWindowHelpers.loadString(n,t)};e=function(n){diagnosticOutput("Issue in DomExplorer.initialize with selector: "+n.selector)};try{if(t.F12&&t.F12.isTargetEdge&&document.body.classList.add("xamlWindow"),this._toolbar=new Common.Controls.ToolbarControl("Common.toolbarTemplateWithSearchBox"),this._toolbar.title=t.Resources.getString("DomToolLabelText"),this._toolbar.model=this._domExplorerModel,this._toolbar.panelTemplateId="DomExplorer.domExplorerButtonPanel",document.getElementById("toolbar").appendChild(this._toolbar.rootElement),this._bridge.targetEngineKind===1?(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.channel.addMessageHandler("DOM.documentUpdated",this.handleRefreshTree.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.registerErrorComponent("DomExplorerWindow",this.onError),Common.ToolWindowHelpers.initializeToolWindow(),this.initializeTabs(),this.initializeToolbarButtons(),this.initializeGlobalCommands(),this.initializeLayoutButtons(),this.initializeContextMenus(),this._bridge.addEventListener("attach",this.onAttach.bind(this)),$m("#attributeNodeLabel > div > span:first-child").text(n("AttributeNodeLabel")),$m("#stylesTabButton").text(n("StylesTabButtonText")).bind("mouseover",function(){return i.showToolTip(n("StylesTabButtonTooltip"))}),$m("#layoutTabButton").text(n("LayoutTabButtonText")).bind("mouseover",function(){return i.showToolTip(n("LayoutTabButtonTooltip"))}),$m("#eventsTabButton").text(n("EventsTabButtonText")).bind("mouseover",function(){return i.showToolTip(n("EventsTabButtonTooltip"))}),$m("#changesTabButton").text(n("ChangesTabButtonText")).bind("mouseover",function(){return i.showToolTip(n("ChangesTabButtonTooltip"))}),$m("#searchbox").placeholder(n("DOMExplorerFindBoxHinting")).bind("mouseover",function(){return i.showToolTip(n("DOMSearchBoxToolTip"))}),$m("#searchNextResult").bind("mouseover",function(){return i.showToolTip(n("DOMSearchNextButtonToolTip"))}),$m("#searchNextResult").attr("aria-label",n("DOMSearchNextButtonToolTip")),$m("#searchPreviousResult").bind("mouseover",function(){return i.showToolTip(n("DOMSearchPreviousButtonToolTip"))}),$m("#searchPreviousResult").attr("aria-label",n("DOMSearchPreviousButtonToolTip")),$m("#pseudoStatesPanel [data-name='hover']").bind("mouseover",function(){return i.showToolTip(n("PseudoClassHoverTooltip"))}),$m("#pseudoStatesPanel [data-name='visited']").bind("mouseover",function(){return i.showToolTip(n("PseudoClassVisitedTooltip"))}),$m("#pseudoHoverLabel").text(n("PseudoClassHover")),$m("#pseudoVisitedLabel").text(n("PseudoClassVisited")),$m("#pseudoHoverLabel").text(":hover"),$m("#pseudoVisitedLabel").text(":visited"),$m("#winningStylesTabButton").text(n("ComputedStylesTabButtonText")).bind("mouseover",function(){return i.showToolTip(n("ComputedStylesTabButtonTooltip"))}),$m("#winningStylesFilterTextBox").placeholder(n("DOMExplorerComputedStylesFilterTextBoxPlaceholder")),$m("#winningStylesFilterTextBox").bind("mouseover",function(){return i.showToolTip(n("DOMExplorerComputedStylesFilterTextBoxPlaceholder"))}),$m("#winningStylesNoResultsMessage").text(n("DOMExplorerComputedStylesNoResultsMessage")),$m("*.BPT-HorizontalPane-Right-Tab").hide(),$m("#breadcrumbRightArrow").hide(),$m("#breadcrumbLeftArrow").hide(),$m("#searchBoxBorder").addClass("BPT-SearchBox-HideButtons"),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));t.F12&&(Common.NavigationUtilities.registerNavigationFrames([Common.NavigationUtilities.makeNavigationFrameFromCallback(document.body,function(){return i._toolbar.getActiveElement()}),Common.NavigationUtilities.makeNavigationFrameFromCallback(document.getElementById("paneRight"),function(){return i.getActiveTabElement()})]),Common.NavigationUtilities.registerFocusHandlers(t.F12.PluginId.Dom));t.F12&&t.F12.TraceWriter.markToolReady();this._bridge.targetEngineKind===2&&(this._chromiumPopulateTimer=window.setTimeout(function(){i.populateTree(11)},1e3));this.traceWriter.raiseEvent(502);f={toolName:Common.ToolName.DOM_EXPLORER,durationMs:Date.now()-this._telemetryLoadStartTime};r.Telemetry.analytics.log(Common.TelemetryEventName.TOOL_LOADED,f,2);t.F12&&r.SelfTest&&r.SelfTest.init(this)}catch(u){diagnosticOutput("Exception during DomExplorer.initialize: "+u.toString(),u.stack);throw u}},u.prototype.onBreak=function(){this.stopSelectElementByClick();this._domExplorerModel.domExplorerIsReady=!1},u.prototype.onRun=function(){this._domExplorerModel.currentDocMode>=9&&(this._domExplorerModel.domExplorerIsReady=!0)},u.prototype.getSelectedDomTreeItem=function(){var n=this.domTree?this.domTree.selectedItem:null;return n&&n.node?n:null},u.prototype.onError=function(n,t,i,r){var u,f;try{t&&(u=t.split("/"),u.length>0&&(t=u[u.length-1]));f=Common.EncodingUtilities.escapeHtml(Common.ToolWindowHelpers.loadString("DomExplorerScriptError"))+"<br/>"+Common.EncodingUtilities.escapeHtml(Common.ToolWindowHelpers.loadString("ScriptErrorMessage",[n]))+"<br/>"+Common.EncodingUtilities.escapeHtml(Common.ToolWindowHelpers.loadString("ScriptErrorFile",[t]))+"<br/>"+Common.EncodingUtilities.escapeHtml(Common.ToolWindowHelpers.loadString("ScriptErrorLine",[i]))+"\r\n"+r;$m("#scriptErrorMessageText").html(f);$m("#scriptErrorSection").show();typeof this._initializationErrorMessage=="string"&&(this._initializationErrorMessage+=f)}catch(e){}},u.prototype.populateTree=function(n){var t,i;this._domExplorerModel.currentDocMode=n;this.capabilities.filterByDocMode(n);t=document.getElementById("eventsTabButton");this.capabilities.showEventsPane?(t.style.display="",t.classList.contains("BPT-TabCycle-Item")||t.classList.add("BPT-TabCycle-Item"),document.getElementById("eventsView").style.display=""):(t.style.display="none",t.classList.contains("BPT-TabCycle-Item")&&t.classList.remove("BPT-TabCycle-Item"),document.getElementById("eventsView").style.display="none");i=document.getElementById("changesTabButton");this.capabilities.showChangesPane||(i.style.display="none");this.refreshTree()},u.prototype.refreshElementForLowDocModes=function(n,t,i){var f=this,u,r;this._domExplorerModel.currentDocMode<=8&&(t&&this.refreshCSSView(),u=this.domTree.selectedItem?this.domTree.selectedItem.uid:null,this.domTreeDataSource&&(i?(r=this.domTreeDataSource.refreshTree(),u&&(r=r.then(function(){return f._remoteDom.getParentChainForElement(u)}).then(function(n){return f.domTreeDataSource.expandUidChain(n)}).then(function(){}))):r=this.domTreeDataSource.domTree.refreshItem(n),r.done(function(){f.afterRefresh(u)})))},u.prototype.giveHostForeground=function(){var n=this;this._bridge instanceof r.IEBridge?this._bridge.takeForeground():this._remoteDom.allowProcessToTakeForeground().done(function(){return n._bridge.takeForeground()})},u.prototype.tcSearchNext=function(n,t){this.searchDomTree(1,n,t)},u.prototype.tcSearchPrevious=function(n,t){this.searchDomTree(-1,n,t)},u.prototype.tcSetSearchText=function(n){if(typeof n=="string"){var t=document.getElementById("searchbox");if(t)return t.value=n,!0}return!1},u.prototype.performUndo=function(){var n=this;this.traceWriter.raiseEvent(505);this._remoteDom.undoLastEdit().done(function(){return n.traceWriter.raiseEvent(506)})},u.prototype.performNextEdit=function(){var n=this;this.traceWriter.raiseEvent(505);this._remoteDom.performNextEdit().done(function(){return n.traceWriter.raiseEvent(506)})},u.prototype.setTestEditCallbacks=function(n,t){this._remoteDom.setTestEditCallbacks(n,t)},u.prototype.deleteElement=function(n,t){var i=this,r=t.getNextSibling()||t.getPreviousSibling()||t.parentItem;return this._remoteDom.deleteElement(n).then(function(n){return n&&(i.domTree&&(i.domTree.selectedItem=r,i.refreshElementForLowDocModes(t.parentItem,!0,!1),i.updateBreadcrumbs()),i.render()),n})},u.prototype.isEditableElement=function(n){return typeof n!="string"?!1:["html","head","body","script","#doctype"].indexOf(n.toLowerCase())<0},u.prototype.raiseTraceEvents=function(n){this.traceWriter&&this.traceWriter.raiseEvent(n)},u.prototype.canDeleteItem=function(n){var t=!!n&&!!n.node;if(t&&this.domTreeDataSource){var i=n.parentItem,r=!!i&&!!i.node&&i.node.type!==0,u=r&&this.domTreeDataSource&&this.domTreeDataSource.isUnderEditableItem(n),f=t&&n.node.type===5;return this.capabilities.canDeleteNodes&&t&&(f||this.isEditableElement(n.node.tagLowerCase))&&u}return!1},u.prototype.getItemContainerFromItem=function(n,t){var i=this.domTree.itemContainerGenerator.getItemContainerFromItemId(n.id);return!i&&t&&(this.domTree.scrollToItem(n),i=this.domTree.itemContainerGenerator.getItemContainerFromItemId(n.id)),i},u.prototype.getSelectedItemContainer=function(n){return this.selectedItem?this.getItemContainerFromItem(this.selectedItem,n):null},u.prototype.getSelectedTreeItemDataTemplate=function(){var n=this.getSelectedItemContainer();return n?n.template:null},u.prototype.onShowContextMenu=function(){var t=this.getSelectedTreeItemDataTemplate(),n;t&&this._domTreeContextMenuController&&(n=t.rootElement.getBoundingClientRect(),this.htmlContextMenu(this.domTree.selectedItem,n.left+n.width/2,n.top+n.height/2))},u.prototype.htmlContextMenu=function(n,t,i){this._domTreeContextMenuController.showContextMenu(n,t,i)},u.prototype.takeDownContextMenu=function(){this._domTreeContextMenuController.dismiss()},u.prototype.openDocumentLinkFromEvent=function(n){if(n.type==="click"||n.keyCode===13||n.keyCode===32){var t=$m(n.target),i=t.get(0);this.openDocumentLinkFromElement(i)}},u.prototype.openDocumentLinkFromElement=function(n){var t;if(n){var f=n.getAttribute("data-linkUrl"),i=n.getAttribute("data-linkLine"),r=n.getAttribute("data-linkCol"),u=0;i&&(u=parseInt(i,10));t=0;r&&(t=parseInt(r,10));Common.ProjectDocuments.showDocument(f,u,t)}},u.prototype.startSelectElementByClick=function(){this._domExplorerModel.selectElementIsEnabled=!0},u.prototype.stopSelectElementByClick=function(){this._domExplorerModel.selectElementIsEnabled=!1},u.prototype.getAttributeCopyText=function(n){if(n.length===1){var t=DataTreeView.getName(n).text(),i=DataTreeView.getValue(n).text();return t+'="'+i+'"'}return""},u.prototype.getEventCopyText=function(n){var t="",i,r,f;if(n.length===1)if(t=DataTreeView.getName(n).text(),i=DataTreeView.getChildren(n),i.length>0)for(t+="\r\n",r=0;r<i.length;r++)f=$m(i.get(r)),t+=DataTreeView.getName(f).text()+" "+DataTreeView.getValue(f).text()+"\r\n"+u.detabify(f.attr("title"))+(r<i.length-2?"\r\n\r\n":"");else t+=" "+DataTreeView.getValue(n).text().replace(/\t+/g,"\t")+"\r\n"+u.detabify(n.attr("title"));return t},u.prototype.render=function(n){n===void 0&&(n=!1);this.domTree&&this.domTree.render(n)},u.prototype.scheduleRender=function(n){var t=this;return n===void 0&&(n=300),this._scheduledRenderPromise||(this._scheduledRenderPromise=new i(function(i){window.setTimeout(function(){t._scheduledRenderPromise=null;t.render();i()},n)})),this._scheduledRenderPromise},u.prototype.selectItemByUid=function(n,t){t===void 0&&(t=!1);var i=this.domTreeDataSource.getItemByUid(n);return i?(this.domTree.scrollToItem(i,t),this.domTree.selectedItem=i,i):null},u.prototype.getItemByUid=function(n){return this.domTreeDataSource.getItemByUid(n)},u.prototype.getFirstElement=function(){this.domTreeDataSource.startAt(0);var n=this.domTreeDataSource.getNext();return this.domTreeDataSource.stop().done(),n},u.prototype.refreshTree=function(n){var i=this,r;this._state="refreshing";this._initializationErrorMessage?($m("#scriptErrorMessageText").html(this._initializationErrorMessage),$m("#scriptErrorSection").show()):($m("#scriptErrorMessagetext").html(""),$m("#scriptErrorSection").hide());this.domTree&&(this.domTree.selectedItem=null);this._textEditController&&(this._textEditController.cancel(),this._textEditController=null);this.domTreeDataSource&&(this.domTreeDataSource.clear(),this.render(!0));this._initializationErrorMessage=null;this.currentSelectedId="";this._currentElementHighlightUid="";this._temporaryElementHighlightUid="";this.hideElementHighlight(!0);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(n,t){DataTreeView.clear($m(t))});this.tabPanes.clearState();this.tabPanes.executeCleanup();Dom.StyleModel.clearCollapsedRules();$m("#layoutView[data-layoutProperty]").text("");this._domExplorerModel.domExplorerIsReady=!1;this._domExplorerModel.selectElementIsEnabled=!1;r=typeof t.F12=="undefined"?"vs":"f12";this._remoteDom.initializeHost(r);this._remoteDom.setKeyBindCallbacks(function(){i.giveHostForeground()},function(){i.startSelectElementByClick()},function(){i.stopSelectElementByClick()},function(){i.expandToRemoteSelectedElement()});this.tabPanes.activeTab&&$m("#"+this.tabPanes.activeTab).show();t.Promise.timeout(15e3,this._remoteDom.getRootElement()).then(function(n){return i._rootUid=n,i.showDomTree()}).done(function(){i._domExplorerModel.domExplorerIsReady=!0;i.registerStyleChangeEvents();i._state==="refreshing"&&(i._state="ready");n&&n()},function(){i.refreshTree(n)})},u.prototype.expandToRemoteSelectedElement=function(){var t=this;this.domTreeDataSource&&this._remoteDom.getParentChainForSelectedElement().done(function(i){i&&i.length>0?t.domTreeDataSource.expandUidChain(i).then(function(){return t._remoteDom.getSelectedElement()}).done(function(i){t.selectItemByUid(i,!0);n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.EXPAND_TO_REMOTE_SELECTED_ELEMENT,0)}):u.showMissingElementError()})},u.prototype.showDomTree=function(){var n=this;if(this.domTreeDataSource){if(this.domTree)return this.domTreeDataSource.refreshTree().then(function(){n.domTreeDataSource.domTree.addChangeListener(n.handleMutations.bind(n));n.selectBodyOrHtml();n.render(!0);n.capabilities.canDragAndDropElements&&n._dragDropController&&n._dragDropController.attachAllHandlers()})}else return this.createNewDomTreeAndDataSource();return t.Promise.wrap(null)},u.prototype.handleMutations=function(n,t,i,r){var f=this,e,o,u;switch(n){case 0:i&&!this.domTreeDataSource.hasCollapsedAncestor(i.uid)&&this.scheduleRender().done(function(){f.domTree.updateSelectionHighlight(f.domTree.selectedItem)});break;case 1:this.domTree.selectedItem&&(e=this.findAncestorStillInTree(this.domTree.selectedItem),this.domTree.selectedItem=e?e:this.domTreeDataSource.domTree.getFirstItemByTag("body"));i&&!this.domTreeDataSource.hasCollapsedAncestor(i.uid)&&this.scheduleRender().done(function(){f.domTree.updateSelectionHighlight(f.domTree.selectedItem)});break;case 6:o=this.domTree.selectedItem?this.domTree.selectedItem.uid:null;this.afterRefresh(o);break;case 2:case 4:case 5:t&&(u=this.domTreeDataSource.getItemByUid(t.uid),u&&(this.domTree.invalidateItemRowSpan(u),u===this.domTree.selectedItem&&this.scheduleSelectedItemMutatedEvent(u,r)))}},u.prototype.onPaneResize=function(){this.domTree&&this.domTree.onWindowResize()},u.prototype.setupEditText=function(n,t){var r=this,i=this.domTreeDataSource.getItemByUid(n);return i?this.domTreeDataSource.isUnderEditableItem(i)?this.canDeleteItem(i)?(this._textEditController=new DomTree.TextEditController(document,this,this.domTree,this._bridge,this.domTreeDataSource),t?(this.traceWriter&&this.traceWriter.raiseEvent(541),this.getEditAsHtmlText(n).then(function(n){return i.isExpanded?r.domTreeDataSource.collapseUid(i.uid).then(function(){return r.render(),r._textEditController.edit(i,!0,n)}).then(function(){r._textEditController=null}):r._textEditController.edit(i,!0,n).then(function(){r._textEditController=null})})):this._textEditController.edit(i,!1).then(function(){r._textEditController=null})):Common.PromiseUtilities.EmptyPromise:Common.PromiseUtilities.EmptyPromise:Common.PromiseUtilities.EmptyPromise},u.prototype.editNewAttribute=function(n,t){t===void 0&&(t=!1);var i=n.getElement();this.getEditAttributeController().editNewAttribute(n,i,t)},u.prototype.getEditAttributeController=function(){var n=this;if(!this._editAttributeController){var t=function(){return n.domTreeDataSource.domTree.pauseDomMutations()},i=function(){n.focusToTree();n.domTreeDataSource.domTree.resumeDomMutations()},r=function(t){n.domTree.invalidateItemRowSpan(t)};this._editAttributeController=new DomTree.EditAttributeController(document,this,this.domTree,this._bridge,window,this._remoteDom,t,i,r)}return this._editAttributeController},u.prototype.tryEditAttribute=function(n,t){this.canEditAttribute(n,t)&&this.editNewAttribute(t,!0)},u.prototype.registerStyleChangeEvents=function(){var n=this;this._remoteDom.attachMediaQueryEvents(function(t){t?n.tabPanes.applyRemoteStyleChanges(t):n.refreshCSSView()})},u.prototype.addSelectionListener=function(n){this._selectionListeners.push(n)},u.prototype.updateBreadcrumbs=function(n){this._breadcrumbsModel?this._breadcrumbsModel.setSelectedElement(this.domTree.selectedItem):(this._breadcrumbsModel=new Dom.BreadcrumbsModel(this.domTree.selectedItem,this.domTree),this.breadcrumbsView=new Dom.BreadcrumbsView(this,this._breadcrumbsModel,document,u.BreadcrumbsListId,u.BreadcrumbsTemplateId),this.addSelectionListener(this.breadcrumbsView));n&&this.breadcrumbsView.skipNextLoad();this.breadcrumbsView.updateView();this.refreshElementHighlight()},u.prototype.selectBreadcrumbNodeByTagName=function(n,t){this.breadcrumbsView.selectBreadcrumbNodeByTagName(n,t)},u.prototype.selectBreadcrumbNodeByClass=function(n,t){this.breadcrumbsView.selectBreadcrumbNodeByClass(n,t)},u.prototype.selectBreadcrumbNodeById=function(n){this.breadcrumbsView.selectBreadcrumbNodeById(n)},u.prototype.showTooltipOnSelectedBreadcrumb=function(){this.breadcrumbsView.showTooltipOnBreadcrumb(!0)},u.prototype.refreshCSSView=function(t){var i,e,r,u,f;if(t===void 0&&(t=!1),i=this.getSelectedDomTreeItem(),i){if(e=i.node&&i.node.type===5,i=this.elementOrTextParent(i),!i){n.Tools.Utility.Assert.failDebugOnly("Unexpected: text node with no parent.");this.tabPanes.clearState();return}r=i.uid;u=i.tag;switch(this.tabPanes.activeTab){case Dom.TabPanes.WINNING_STYLES_VIEW:t||(f=this.tabPanes.getWinningStyleView(),f?(this.tabPanes.clearLayoutAndStylesState(),f.updateView()):this.tabPanes.clearState());break;case Dom.TabPanes.STYLES_VIEW:t||(this.tabPanes.clearState(),this.tabPanes.showStyles(r,u));break;case Dom.TabPanes.LAYOUT_VIEW:this.tabPanes.refreshLayoutView(r,u,!1,e)}}else this.tabPanes.clearState();this.updateBreadcrumbs()},u.prototype.refreshEventsView=function(){var r=this.tabPanes.activeTab===Dom.TabPanes.EVENTS_VIEW,n,t,i;r&&(n=this.getSelectedDomTreeItem(),this.tabPanes.clearState(),n?(t=n.uid,i=n.tag,this.tabPanes.showEvents(t,i)):this.tabPanes.showEvents())},u.prototype.isColorProperty=function(n){switch(n.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!0}return!1},u.prototype.elementOrTextParent=function(n){return n&&n.node&&n.node.type===5?n.parentItem:n},u.prototype.canPasteAsChild=function(n){var t=!!n,r=t&&this.domTreeDataSource?n.parentItem:null,u=!!r,i=n.node.tagLowerCase,f=t&&!!i&&this.isPasteAsChildCapableElement(i),e=u&&this.domTreeDataSource&&this.domTreeDataSource.isUnderEditableItem(n);return t&&e&&f},u.prototype.cut=function(t){var u=this,i,r;return n.Tools.Utility.Assert.isTrue(!!t,"cut item parameter cannot be null/undefined"),i=t.node.type,n.Tools.Utility.Assert.isTrue(i===1||i===5,"cut item parameter must be a Html element or text"),this.raiseTraceEvents(515),this.copy(t),r=t.node.uid,this.deleteElement(r,t).then(function(n){n&&u.raiseTraceEvents(516)})},u.prototype.getContextMenuTarget=function(t){var i=null,f=t instanceof MouseEvent?t.clientX:0,r=t instanceof MouseEvent?t.clientY:0,e,u;return this.domTree&&(t instanceof MouseEvent?i=this.getItem(0,r):(n.Tools.Utility.Assert.failDebugOnly("Trying to get context menu target for non-mouse event"),i=this.domTree.selectedItem,e=i.getElement().get(0),u=e.getBoundingClientRect(),f=u.left,r=u.top),i&&(this.domTree.selectedItem=i)),{target:i,x:f,y:r}},u.prototype.getItem=function(n,t){var f=document.elementFromPoint(n,t),r=this.closest(f,".BPT-listItemContainer"),i,u;return r&&(i=r.querySelector("DIV.BPT-HTML [data-id]"),i)?(u=i.getAttribute("data-id"),this.domTreeDataSource.getItemByUid(u)):null},u.prototype.copy=function(n){var i=this,t=n,r;(t.node.type!==5||(t=t.parentItem,t&&t.node.type!==0))&&(r=t.uid,this._remoteDom.getHTMLString(r,!1,null).then(function(n){i._textToCopy=n;Common.ClipboardHelper.fireCopyEvent(i._domTreeViewElement)}))},u.prototype.paste=function(n,t){this._pasteParentElement=n;this._pasteBeforeChild=t;Common.ClipboardHelper.firePasteEvent(this._domTreeViewElement)},u.prototype.getEditAsHtmlText=function(n){return this._remoteDom.getHTMLString(n,!1,null)},u.prototype.setEditAsHtmlText=function(n,t,i){var r=this,f,u;this.traceWriter&&this.traceWriter.raiseEvent(543);this.domTreeDataSource&&(f=this.domTreeDataSource.getItemByUid(n),u=f.parentItem,this._remoteDom.replaceElement(n,t).done(function(n){n&&(r.domTree&&(r.domTree.selectedItem=u),r.refreshElementForLowDocModes(u,!1,!1));i&&i(n);r.traceWriter&&r.traceWriter.raiseEvent(544)}))},u.prototype.doesAttributeForceCSSRefresh=function(n){return u.ForceRefreshAttributes.indexOf(n)>=0},u.prototype.editAttribute=function(n,t,i,r){var u=this;this.traceWriter&&this.traceWriter.raiseEvent(545);this._remoteDom.editAttribute(n,t,i).done(function(i){var f=u.domTreeDataSource.getItemByUid(n);u.refreshElementForLowDocModes(f,u.doesAttributeForceCSSRefresh(t),!1);r&&r(i);u.traceWriter&&u.traceWriter.raiseEvent(546)})},u.prototype.removeAttribute=function(n,t,i){this._remoteDom.removeAttribute(n,t).done(i)},u.prototype.editTextRemote=function(n,t,i){var r=this,f=this.domTreeDataSource.getItemByUid(n),u=f.parentItem;this._remoteDom.editText(n,t).done(function(n){n&&(r.domTree&&(r.domTree.selectedItem=u),r.refreshElementForLowDocModes(u,!1,!1));i&&i(n)})},u.prototype.getCssClassesUsedInCurrentDocument=function(n){this._remoteDom.getCssClassesUsedInCurrentDocument(this.currentSelectedId).done(function(t){for(var r,u=[],i=0;i<t.length;i++)r=t[i],u.push(new Common.Intellisense.IntellisenseChoice(r,r));n(u)})},u.prototype.getLoadDocumentData=function(n){this._remoteDom.getLoadDocumentData().done(function(t){return n(t)})},u.prototype.selectedItemMutated=function(n,t){t&&(this.doesAttributeForceCSSRefresh(t)?this.refreshCSSView(t==="style"):t.indexOf("on")===0&&this.refreshEventsView())},u.prototype.selectionChanged=function(n){var t=this,u,i,r;for(u in this._selectedItemMutatedTimeoutMap)window.clearTimeout(this._selectedItemMutatedTimeoutMap[u]);this._selectedItemMutatedTimeoutMap={};n&&(i=n.uid,this._tabRefreshTimeout&&window.clearTimeout(this._tabRefreshTimeout),r=function(){t.traceWriter.raiseEvent(513);t.tabPanes.clearState();var u=n.node&&n.node.type===5,r=t.elementOrTextParent(n);Dom.TabItem.isActive($m("#stylesTabButton"))?t.tabPanes.showStyles(r.uid,r.tag):Dom.TabItem.isActive($m("#winningStylesTabButton"))?t.tabPanes.showWinningStyles(r.uid,r.tag):Dom.TabItem.isActive($m("#layoutTabButton"))?t.tabPanes.showLayout(r.uid,r.tag,u):Dom.TabItem.isActive($m("#eventsTabButton"))&&t.tabPanes.showEvents(n.uid,n.tag);t.updateBreadcrumbs();t.showElementHighlight(n.uid);t._remoteDom.storeElementForConsole(i);t.traceWriter.raiseEvent(514)},this.currentSelectedId=i,this._immediateTabRefresh?(r(),this._immediateTabRefresh=!1):this._tabRefreshTimeout=window.setTimeout(r,100),this._remoteDom.selectElement(n.uid))},u.prototype.focusToTree=function(){this.domTree&&this.domTree.forceFocusToSelectedItem()},u.prototype.domExplorerLoaded=function(){var i=this,r=!1,n;t.F12&&t.F12.getInspectElementId&&(n=t.F12.getInspectElementId(),n&&(this.domTree.selectedItem=this.domTreeDataSource.getItemByUid(n),this._remoteDom.inspectElementById(n).done(function(n){n||u.showMissingElementError()}),r=!0));r||this._bridge.targetEngineKind!==2||this.selectRippleAppRoot();this._state="ready";this.eventManager.dispatchEvent("domExplorerLoaded");window.setTimeout(function(){i._state!=="detached"&&i.logLoadDocumentData()},500)},u.getItemContainerAriaLabel=function(n){var i=n.item,r,u,f;if(i&&i.node){r="";switch(i.node.type){case 1:if(r=i.tag,i.attributes)for(u=0;u<i.attributes.length;u++)f=i.attributes.getItem(u),r+=";"+t.Resources.getString("EditAttributeNameAriaLabel"),r+=":"+f.name,r+=";"+t.Resources.getString("EditAttributeValueAriaLabel"),r+=":"+f.value;i.textPreview&&(r+=";"+t.Resources.getString("SearchContentText"),r+=":"+i.textPreview);break;case 5:r=i.textNodeText;break;case 2:r="CDATA:"+i.cDataText;break;case 4:r="DOCTYPE:"+i.docTypeText;break;case 3:r="COMMENT:"+i.commentText}}return r},u.prototype.scheduleSelectedItemMutatedEvent=function(t,i,r){var u=this;r===void 0&&(r=300);this._selectedItemMutatedTimeoutMap[i]||(this._selectedItemMutatedTimeoutMap[i]=window.setTimeout(function(){delete u._selectedItemMutatedTimeoutMap[i];t===u.domTree.selectedItem?u.fireSelectedItemMutated(t,i):n.Tools.Utility.Assert.failDebugOnly("Firing selectedItemMutated on an item that is not selected")},r))},u.prototype.afterRefresh=function(n){if(this.render(),n){var t=this.domTreeDataSource.getItemByUid(n);t?this.domTree.selectedItem=t:this.selectBodyOrHtml()}else this.selectBodyOrHtml()},u.prototype.createNewDomTreeAndDataSource=function(){var n=this,r;f.isTrue(!this.domTreeDataSource,"Should not attempt to create a DomTreeDataSource if one already exists");var i=new DomTree.NotifyingItemContainerGenerator,e=this.capabilities.canDeleteNodes,s=e?function(t,i){return n.setupEditText(t,i).done()}:null,h=e?function(t,i){return n.tryEditAttribute(t,i)}:null,o=document.getElementById("treeContainer"),t=new DomTree.DomTreeListControl(s,h,this.onShowContextMenu.bind(this));return t.dataItemTemplate=function(){return new DomTree.TreeItemDataTemplate(document,n,t,n.domTreeDataSource,n.bridge,window,n._remoteDom)},t.itemContainerGenerator=i,t.onGetItemContainerAriaLabel=u.getItemContainerAriaLabel,t.selectedItemChanged=function(t){return n.fireSelectionChanged(t)},this.addSelectionListener(t),r=new DomTree.DomTreeDataSource(this._remoteDom,this.capabilities,this.documentMode),r.init().then(function(){n.domTreeDataSource||(n.domTree=t,n.domTreeDataSource=r,o.appendChild(n.domTree.rootElement),n.domTreeDataSource.domTree.addChangeListener(n.handleMutations.bind(n)),n.addSelectionListener(n.domTreeDataSource),n.domTree.dataSource=n.domTreeDataSource,n.capabilities.canDragAndDropElements&&(n._dragDropController=new DomTree.DragDropController(n,n.domTreeDataSource,o,i,null)),n.horizontalPane.addResizeListener(n),n.breadcrumbsView&&n.addSelectionListener(n.breadcrumbsView),n.addSelectionListener(n),n.selectBodyOrHtml(),i.hoverStateChangeEvent.addHandler(function(t){if(t.hovering){var i=t.container.item;i&&i.parentItem&&n.mouseoverUid(i.uid,i.tag,i.parentItem.uid)}else n.mouseoutUid()}),n.render(!0),n.capabilities.canDragAndDropElements&&n._dragDropController.attachAllHandlers(),n.domExplorerLoaded())})},u.prototype.findAncestorStillInTree=function(n){return this.domTreeDataSource.getItemByUid(n.uid)?n:n.parentItem&&n.parentItem.uid!=="#root"?this.findAncestorStillInTree(n.parentItem):null},u.prototype.showToolTip=function(n){var i={content:n};t.Tooltip.show(i)},u.prototype.onAttach=function(t){n.Tools.Utility.Assert.isTrue(typeof t!="undefined","args is invalid");this.traceWriter.raiseEvent(539);try{this._bridge.channel.loadScript("../Common/messageThrottle.js");this._bridge.channel.loadScript("../Common/isDebugBuild.js");this._bridge.channel.loadScript("../Common/assert.js");this._bridge.channel.loadScript("../Common/encodingUtilities.js");this._bridge.channel.loadScript("../Common/remoteHelpers.js");this._bridge.channel.loadScript("../Common/remoteEditStack.js");this._bridge.channel.loadScript("DomExplorerRemote.js")}catch(r){this.traceWriter.raiseEvent(540);return}this.traceWriter.raiseEvent(540);var i=!!t.isDesignerConnected;this.capabilities.initialize(this._bridge.targetEngineKind,i);this._remoteDom.setDesignerEnabled(i);this._domExplorerModel.selectElementIsVisible=this.capabilities.showSelectElementButton;this._domExplorerModel.showLayoutIsVisible=this.capabilities.showHighlightingButton},u.prototype.onDetach=function(){this._remoteDom.setDesignerEnabled(!1);this._domExplorerModel.currentDocMode=undefined;for(var n=document.getElementById("treeContainer");n&&n.firstChild;)n.removeChild(n.firstChild);this._dragDropController&&(this._dragDropController.detachAllHandlers(),this._dragDropController=undefined);this.domTree=undefined;this.domTreeDataSource=undefined;this._selectionListeners=[];$m(".BPT-DataTree-Container").each(function(n,t){DataTreeView.clear($m(t))});$m("#pane").hide();this.tabPanes.onDetach();$m("#layoutView[data-layoutProperty]").text("");this._domExplorerModel.domExplorerIsReady=!1;this._domExplorerModel.selectElementIsEnabled=!1;this._state="detached";t.F12&&(this.colorPickerViewModel.isVisible=!1)},u.prototype.onLoad=function(n){var t=document.createElement("script");t.src=n.url;t.type="text/javascript";document.getElementsByTagName("head").item(0).appendChild(t)},u.prototype.handleRefreshTree=function(n){var i,r,u;this._chromiumPopulateTimer&&(window.clearTimeout(this._chromiumPopulateTimer),this._chromiumPopulateTimer=undefined);i="RefreshTree:";(this._bridge.targetEngineKind===2||n.data.substr(0,i.length)===i)&&(r=11,this._bridge.targetEngineKind===1&&(u=JSON.parse(n.data.substring(i.length)),r=parseFloat(u.docMode),this._pageUri=u.contextInfo,t.F12&&t.F12.getRegEntryForF12("EnableColorPicker")&&this.paletteViewModel.runColorCollection()),this.populateTree(r),t.F12&&this.paletteViewModel.runColorCollection(),Common.ToolWindowHelpers.codeMarker(Common.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsDomExplorerReady),n.handled=!0)},u.prototype.handleToolMessage=function(n){var i=n.customData,t;i&&(t=typeof i=="string"?JSON.parse(i):i,t.type==="selectDomElement"&&t.uidChain?(this._remoteDom.inspectElementById(t.uidChain).done(function(n){n||u.showMissingElementError()}),this._bridge.activateDomTab()):t.type==="highlightDomElement"&&t.uidChain?this._remoteDom.hoverItem(t.uidChain):t.type==="removeDomHighlight"&&this._remoteDom.hideHoverItem())},u.prototype.canEditAttribute=function(n,t){if(!n||!t||!this.capabilities.canEditAttributes||this.domTree.selectedItem!==t||!this.domTreeDataSource.isUnderEditableItem(t))return!1;var i=t.node.type,r=i===1?t.node.tag:null;return i===5||i===3||i===4||r==="script"||r==="style"?!1:!0},u.prototype.fireSelectionChanged=function(t){for(var r=this._selectionListeners.slice(0),u=r.length,i=0;i<u;i++)r[i].selectionChanged(t);n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.SELECTED_ITEM_CHANGED,5)},u.prototype.fireSelectedItemMutated=function(n,t){for(var r=this._selectionListeners.slice(0),u=r.length,i=0;i<u;i++)r[i].selectedItemMutated(n,t)},u.prototype.onActivated=function(){var n=this;this.restoreElementHighlight();this._activatedFocusToken&&(window.clearTimeout(this._activatedFocusToken),this._activatedFocusToken=Number.NaN);this._activatedFocusToken=window.setTimeout(function(){n.focusToTree();n._activatedFocusToken=Number.NaN},0)},u.prototype.onDeactivated=function(){this._activatedFocusToken&&(window.clearTimeout(this._activatedFocusToken),this._activatedFocusToken=Number.NaN);this._domExplorerModel.selectElementIsEnabled=!1;this.hideElementHighlight(!0)},u.prototype.initializeTabs=function(){var t=this;this.horizontalPane=new Dom.HorizontalPane($m("#pane"));this.tabPanes.setHorizontalPane(this.horizontalPane);Dom.TabItem.init($m("#stylesTabButton"),function(){var i=t.getSelectedDomTreeItem();i?(i=t.elementOrTextParent(i),t.tabPanes.showStyles(i.uid,i.tag)):t.tabPanes.showStyles();n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.SHOW_STYLES_TAB,0)});Dom.TabItem.init($m("#winningStylesTabButton"),function(){var i=t.getSelectedDomTreeItem();i?(i=t.elementOrTextParent(i),t.tabPanes.showWinningStyles(i.uid,i.tag)):t.tabPanes.showWinningStyles();n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.SHOW_COMPUTED_TAB,0)});Dom.TabItem.init($m("#layoutTabButton"),function(){var i=t.getSelectedDomTreeItem(),r=i&&i.node&&i.node.type===5;i=t.elementOrTextParent(i);i?t.tabPanes.showLayout(i.uid,i.tag,r):t.tabPanes.showLayout();n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.SHOW_LAYOUT_TAB,0)});Dom.TabItem.init($m("#eventsTabButton"),function(){var i=t.getSelectedDomTreeItem();i?t.tabPanes.showEvents(i.uid,i.tag):t.tabPanes.showEvents();n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.SHOW_EVENTS_TAB,0)});Dom.TabItem.init($m("#changesTabButton"),function(){t.tabPanes.showChanges();n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.SHOW_CHANGES_TAB,0)})},u.prototype.searchDomTree=function(n,t,i){var r=this,u=null,e=$m("#searchbox"),f;document.activeElement===e.get(0)&&(u=document.activeElement);f=e.val();f?(this.traceWriter.raiseEvent(537),this._remoteDom.findTerm(this.currentSelectedId,f,n,null).done(function(n){var i=n.length!==0;i?($m("#searchBoxBorder").removeClass("BPT-SearchBox-NoResult"),$m("#searchBoxBorder").removeClass("BPT-SearchBox-HideButtons"),r.domTreeDataSource&&r.domTreeDataSource.expandUidChain(n).done(function(n){n&&(r.selectItemByUid(n),u&&u.focus())})):($m("#searchBoxBorder").addClass("BPT-SearchBox-NoResult"),$m("#searchBoxBorder").addClass("BPT-SearchBox-HideButtons"));t&&t(i);r.traceWriter.raiseEvent(538)})):i&&i("Invalid searchterm")},u.prototype.initializeGlobalCommands=function(){var i=this,r;t.F12?(r=function(t){var e=t.shiftKey&&t.ctrlKey&&!t.altKey,o=t.shiftKey&&!t.ctrlKey&&!t.altKey,r=t.ctrlKey&&!t.shiftKey&&!t.altKey,f=!t.shiftKey&&!t.ctrlKey&&!t.altKey,u;return t.keyCode===66&&r?(i._domExplorerModel.selectElementIsEnabled=!i._domExplorerModel.selectElementIsEnabled,!1):t.keyCode===73&&e?(i._domExplorerModel.showLayoutIsEnabled=!i._domExplorerModel.showLayoutIsEnabled,!1):t.keyCode===70&&r?(document.getElementById("searchbox").focus(),n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.FIND,1,0),!1):t.keyCode===75&&r?(i.colorPickerViewModel.isVisible=!0,!1):t.keyCode===114&&f?(i.searchDomTree(1),n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.FIND_NEXT,1,0),!1):t.keyCode===116&&f&&i._domExplorerModel.currentDocMode<9?(u=i.getSelectedDomTreeItem(),u&&i.refreshElementForLowDocModes(u,!0,!0),n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.REFRESH,1,0),!1):t.keyCode===114&&o?(i.searchDomTree(-1),n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.FIND_PREV,1,0),!1):t.keyCode===90&&r&&!i.isInTextControl()?(i.performUndo(),n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.UNDO,1,0),!1):t.keyCode===89&&r&&!i.isInTextControl()?(i.performNextEdit(),n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.REDO,1,0),!1):!0},document.addEventListener("keydown",function(n){return r(n)}),t.F12.addEventListener("keydown",function(n){return r(n)}),this.colorPickerControl.onCustomKeyDown=function(n){var t=n.ctrlKey&&!n.shiftKey&&!n.altKey;return n.keyCode===75&&t?(i.colorPickerViewModel.isVisible=!1,!0):!1}):(this._findCommandBinding=t.VS.Commands.bindCommand({name:"find",onexecute:function(){document.getElementById("searchbox").focus();n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.FIND,1,1)}}),this._findNextCommandBinding=t.VS.Commands.bindCommand({name:"findnext",onexecute:function(){i.searchDomTree(1);n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.FIND_NEXT,1,1)}}),this._findPrevCommandBinding=t.VS.Commands.bindCommand({name:"findprev",onexecute:function(){i.searchDomTree(-1);n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.FIND_PREV,1,1)}}),this._redoCommandBinding=t.VS.Commands.bindCommand({name:"redo",onexecute:function(){i.isInTextControl()||(i.performNextEdit(),n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.REDO,1,1))}}),this._refreshCommandBinding=t.VS.Commands.bindCommand({name:"refresh",onexecute:function(){if(i._domExplorerModel.currentDocMode<9){var t=i.getSelectedDomTreeItem();t&&i.refreshElementForLowDocModes(t,!0,!0);n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.REFRESH,1,1)}}}),this._selectElementCommandBinding=t.VS.Commands.bindCommand({name:"selectelement",onexecute:function(){i._domExplorerModel.selectElementIsEnabled=!i._domExplorerModel.selectElementIsEnabled}}),this._showLayoutCommandBinding=t.VS.Commands.bindCommand({name:"showlayout",onexecute:function(){i._domExplorerModel.showLayoutIsEnabled=!i._domExplorerModel.showLayoutIsEnabled}}),this._undoCommandBinding=t.VS.Commands.bindCommand({name:"undo",onexecute:function(){i.isInTextControl()||(i.performUndo(),n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.UNDO,1,1))}}))},u.prototype.initializeToolbarButtons=function(){var i=this,f;this._domExplorerModel.selectElementIsEnabledChanged.addHandler(function(t){t?(i._bridge instanceof r.IEBridge?i._bridge.bringRemoteToForeground():i._bridge instanceof r.VSBridge&&i._bridge.allowRemoteToTakeForeground().done(function(){i._remoteDom.takeForeground().done(function(n){n||i._remoteDom.getHWND().done(function(n){i._bridge.setForeground(n.toString()).done()})})}),i._remoteDom.selectElementByClick(function(){i._domExplorerModel.selectElementIsEnabled=!1;i.giveHostForeground();i._remoteDom.getParentChainForSelectedElement().done(function(n){n&&n.length>0?i.domTreeDataSource&&i.domTreeDataSource.expandUidChain(n).done(function(){while(n.length>0){var t=n.pop(),r=i.selectItemByUid(t,!0);if(r){i.focusToTree();break}}}):u.showMissingElementError()})}),n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.START_SELECT_ELEMENT,5)):(i._remoteDom.cancelSelectElementByClick(),n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.STOP_SELECT_ELEMENT,5))});this._domExplorerModel.showLayoutIsEnabledChanged.addHandler(function(t){t?(i.restoreElementHighlight(),n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.START_SHOW_LAYOUT,5)):(i.hideElementHighlight(),n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.STOP_SHOW_LAYOUT,5))});t.F12?(this.paletteViewModel=new r.PaletteViewModel(this._remoteDom),this.colorPickerViewModel=new r.ColorPickerViewModel(this._bridge,this.paletteViewModel),f=new Common.TemplateControl("DomExplorer.colorPickerHost"),f.model=this.colorPickerViewModel,this.colorPickerControl=f.getNamedControl("colorPicker"),document.getElementById("toolbar").appendChild(this.colorPickerControl.rootElement),this.colorPickerViewModel.dockElement=this._toolbar.getNamedElement("colorPickerButton")):this._toolbar.getNamedControl("colorPickerButton").isVisible=!1;this._toolbar.addClickHandlerToButton("refreshButton",function(){if(i.domTreeDataSource){var t=i.getSelectedDomTreeItem(),r=t||i.domTreeDataSource.domTree.getFirstItemByTag("html");i.refreshElementForLowDocModes(r,!0,!0);n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.REFRESH,0)}return!1});this._domTreeContextMenuController=new Dom.DomTreeContextMenuController(this,this._remoteDom,this._bridge,"treeContainer");this._findBoxContextMenu=new Dom.TextControlMenuController(this._bridge,document.getElementById("searchbox"));$m("#searchbox").bind("keydown",function(t){var u=t.shiftKey&&!t.ctrlKey&&!t.altKey,r=!t.shiftKey&&!t.ctrlKey&&!t.altKey;return t.keyCode===13&&r?(i.searchDomTree(1),n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.FIND_NEXT,0),!1):!0});document.getElementById("searchbox").addEventListener("input",function(){$m("#searchBoxBorder").removeClass("BPT-SearchBox-NoResult");$m("#searchBoxBorder").addClass("BPT-SearchBox-HideButtons")});$m("#searchbox").bind("click keydown",function(){return $m("#searchbox").focus(),n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.FIND,0),!0});$m("#searchNextResult").bind("click keydown",function(t){return t.type==="click"||t.keyCode===13||t.keyCode===32?(i.searchDomTree(1),n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.FIND_NEXT,0),!1):!0});$m("#searchPreviousResult").bind("click keydown",function(t){var r=t;return t.type==="click"||r.keyCode===13||r.keyCode===32?(i.searchDomTree(-1),n.DomExplorer.Telemetry.analytics.logExecuteCommand(n.DomExplorer.Telemetry.CommandName.FIND_PREV,0),!1):!0});t.F12?(document.getElementById("tabStartMarker").setAttribute("tabindex","-1"),document.getElementById("tabEndMarker").setAttribute("tabindex","-1")):$m("#tabStartMarker,#tabEndMarker").bind("focus",function(n){var r=$m("[tabindex='1']"),t,i,u,f,e;if(r.length>2){for(t=[],i=1;i<r.length-1;i++)u=r.get(i),f=$m(u).closest(".BPT-Tab-Inactive"),f.length||t.push(u);e=n.target.id==="tabStartMarker"?t[t.length-1]:t[0];e.focus()}})},u.prototype.initializeLayoutButtons=function(){var n=this,r=$m("#layoutView"),i=document.getElementById("Layout-EditContainer"),u=i.firstElementChild,f=function(f){var p,s;if(document.activeElement&&document.activeElement.type!=="text"&&n.capabilities.canEditLayout&&n.capabilities.canAddStyleProperty&&(f.type==="click"||f.type==="keydown"&&(f.keyCode===13||f.keyCode===32)&&!f.ctrlKey&&!f.shiftKey&&!f.altKey)){var e=f.target,h=r.attr("data-uid"),v=r.attr("data-tag"),c=e.getAttribute("data-layoutProperty");if(h&&v){var o=e.getBoundingClientRect(),l=r.get(0).getBoundingClientRect(),w=document.getElementById("layout-offset-layer").getBoundingClientRect(),b=window.getComputedStyle(e),k=b.transform==="none"?o.height:o.width,a=60,d=o.top+o.height/2-k/2-l.top,y=w.left-l.left-l.left;y+=c==="height"||e.classList.contains("BPT-Layout-Left")?o.left:c==="width"||e.classList.contains("BPT-Layout-Right")?o.right-a:o.left+o.width/2-a/2;i.style.left=y+"px";i.style.top=d+"px";i.style.display="block";u.textContent=e.textContent;p=e.style.color;e.style.color="transparent";s=new Dom.ValueEditor(document,n,n._bridge,window);s.enableCommitOnChange();s.enableNumericChanges();n._remoteDom.enableEditChaining();s.show(u,a,function(i){return new t.Promise(function(t){i&&(/^\d*(\.\d+)?$/.test(i)&&(i+="px"),n.editLayoutValue(h,c,i));t(!0)})}).done(function(t){n._remoteDom.disableEditChaining();i.style.display="none";e.style.color=p;t.wasCancelled||(e.textContent=t.newValue,n.tabPanes.showLayout(h,v))})}return!1}};r.find("[data-layoutProperty]").bind("click keydown",f)},u.prototype.isInTextControl=function(){return document.activeElement instanceof HTMLTextAreaElement||document.activeElement instanceof HTMLInputElement&&document.activeElement.type.toLowerCase()==="text"},u.prototype.editLayoutValue=function(n,t,i){t==="offsetLeft"?t="left":t==="offsetTop"?t="top":t==="clientWidth"?t="width":t==="clientHeight"&&(t="height");this._styleCache.updateView(n,function(n){n.setInlineProperty(t,i,!1)})},u.prototype.addElements=function(n,t,i,r){var u=this;this._remoteDom.addElement(n,t,i).done(function(t){if(t&&u.domTreeDataSource){var i=u.domTreeDataSource.getItemByUid(n);u.refreshElementForLowDocModes(i,!0,!1);u.updateBreadcrumbs();r&&r(t)}})},u.prototype.remoteHighlight=function(n){this._lastKnownElementHighlightUid!==n&&(this._lastKnownElementHighlightUid=n,this._remoteDom.hoverItem(n),this._highlightIsShown=!0)},u.prototype.isPasteAsChildCapableElement=function(n){switch(n){case"html":case"script":case"style":case"#doctype":case"#comment":case"iframe":case"frame":case"#text":return!1}return!Dom.Utility.isSelfClosingTag(n,!1)},u.prototype.logLoadDocumentData=function(){this.getLoadDocumentData(function(n){if(n){var t={SerializedLength:n.serializedLength,NodeCount:n.nodeCount,NestedLevel:n.nestedLevel,IframeCount:n.iframeCount,ScriptFileCount:n.scriptFileCount,StylesheetLinkCount:n.stylesheetLinkCount};r.Telemetry.analytics.log(r.Telemetry.EventName.LOAD_DOCUMENT,t)}})},u.prototype.selectRippleAppRoot=function(){var n=this;this.domTreeDataSource&&this.findRippleAppFrame(function(t){t&&n._remoteDom.querySelector(t,"body",!0).then(function(t){return n._remoteDom.inspectElementById(t)}).then(function(){return n.domTreeDataSource.expandUid(t)}).done()})},u.prototype.findRippleAppFrame=function(n){var t=this;this._remoteDom.querySelector(this._rootUid,"head link[href^='/ripple/']").done(function(i){i?t._remoteDom.querySelector(t._rootUid,"body iframe#document").done(function(t){n(t)}):n(i)})},u.prototype.selectBodyOrHtml=function(){var n=this.domTreeDataSource.domTree.getFirstItemByTag("body");n||(n=this.domTreeDataSource.domTree.getFirstItemByTag("html"));this.domTree.selectedItem=n},u.prototype.switchTab=function(n){switch(n){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()}},u.prototype.getActiveTabElement=function(){for(var i=["stylesTabButton","winningStylesTabButton","layoutTabButton","eventsTabButton","changesTabButton"],n,t=0;t<i.length;t++)if(n=document.getElementById(i[t]),Dom.TabItem.isActive($m(n)))break;return n},u.prototype.closest=function(n,t){while(n&&n!==document){var i=n;if(i.msMatchesSelector&&i.msMatchesSelector(t))return i;n=n.parentNode}},u.prototype.initializeContextMenus=function(){var n=this;this._domTreeViewElement=document.getElementById("domTreeView");this._domTreeViewElement.addEventListener("keydown",function(t){var r=!1,i;if(!n.isInTextControl()){if(!Common.ToolWindowHelpers.hasSelectedText()&&n.domTree&&(i=n.domTree.selectedItem,i&&i.node)){var f=i.uid,u=n.canDeleteItem(i),s=t.shiftKey&&!t.ctrlKey&&!t.altKey,e=t.ctrlKey&&!t.shiftKey&&!t.altKey,o=!t.shiftKey&&!t.ctrlKey&&!t.altKey;u&&t.keyCode===88&&e?(r=!0,n.cut(i)):u&&t.keyCode===46&&o&&(r=!0,n.deleteElement(f,i).done())}r&&(t.preventDefault(),t.stopPropagation())}});Common.ClipboardHelper.addPasteListener(this._domTreeViewElement,this.onPaste.bind(this));Common.ClipboardHelper.addCopyListener(document.body,Common.ToolWindowHelpers.getTextForClipboard);Common.ClipboardHelper.addCopyListener(this._domTreeViewElement,this.onCopy.bind(this))},u.prototype.onPaste=function(n){var u=this,t,i,r;if(this._textEditController)return!0;try{if(t=this._pasteParentElement||this.domTree.selectedItem,this.canPasteAsChild(t)){if(this.raiseTraceEvents(517),n)return i=t.uid,r=this._pasteBeforeChild&&this._pasteBeforeChild.uid,this.addElements(i,r,n,function(){u.raiseTraceEvents(518)}),!1;this.raiseTraceEvents(518)}}finally{this._pasteParentElement=null;this._pasteBeforeChild=null}return!0},u.prototype.onCopy=function(){return this._textEditController?null:this._textToCopy},u.BreadcrumbsListId="BreadcrumbsView",u.BreadcrumbsTemplateId="breadcrumbsTemplate",u.ForceRefreshAttributes=["style","class","id","checked","color","type","align","valign"],u.HiddenRootSelector=".BPT-HtmlTreeItem-HiddenRoot",u.ItemSelector=".BPT-HtmlTreeItem",u.DEBUG_UID_DISPLAY=!1,u}();r.DomExplorerWindow=u})(r=n.DomExplorer||(n.DomExplorer={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=function(t){function i(n,i,r,u,f,e){var o,h,s;if(t.call(this),this._autoExpanded=!1,this._childReadInCount=0,this._parent=r,this._tag=f,this._type=u,this._uid=n,this._attributeLookup={},this._hasChildren=i>0,this.textContentChanged=new Common.EventSource,this.attributes=new Common.ObservableCollection(e),e)for(o=0,h=this.attributes.length;o<h;o++)s=this.attributes.getItem(o),this._attributeLookup[s.name]=s;this._children=Array(i);this._childUidLookup={}}return __extends(i,t),Object.defineProperty(i.prototype,"isFrame",{get:function(){var n=this.tagLowerCase;return n==="frame"||n==="iframe"},set:function(){throw new Error("Can not set the isFrame property")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hasChildren",{get:function(){return this.hasChildUids()&&this.childUidCount>0?!0:this._hasChildren},set:function(n){this._hasChildren=n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"childUidCount",{get:function(){return this._children?this._children.length:0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"autoExpanded",{get:function(){return this._autoExpanded},set:function(n){this._autoExpanded=n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"uid",{get:function(){return this._uid},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"type",{get:function(){return this._type},set:function(n){this._type=n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"parent",{get:function(){return this._parent},set:function(n){this._parent=n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tag",{get:function(){return this._tag},set:function(n){this._tag=n;this._tagLowerCase=undefined;switch(n){case"#root":this._type=0;break;case"#text":this._type=5;break;case"#comment":this._type=3;break;case"#doctype":this._type=4;break;case"#cdata-section":this._type=2;break;default:this._type=1}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tagLowerCase",{get:function(){return this._tagLowerCase===undefined&&this._tag!==undefined&&(this._tagLowerCase=this._tag.toLowerCase()),this._tagLowerCase},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"attributeCount",{get:function(){return this.attributes?this.attributes.length:0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"textContent",{get:function(){var n=this.getAttributeByName(i.TextContentAttributeName);return n?n.value:""},set:function(n){this.addAttribute({name:i.TextContentAttributeName,value:n})},enumerable:!0,configurable:!0}),i.initialize=function(){Common.ObservableHelpers.defineProperty(i,i.AttributesPropertyName,null)},i.prototype.clearNode=function(){this._attributeLookup={};this._children=[];this._childUidLookup={};this._childReadInCount=0;this._hasChildren=undefined;this._autoExpanded=!1;this.attributes=new Common.ObservableCollection},i.prototype.getChildIndex=function(n){var t,r,i;if(this._children)for(t=0,r=this._children.length;t<r;t++)if(i=this._children[t],i&&i.child===n)return t;return-1},i.prototype.isNodeAChild=function(n){return this.getChildIndex(n)>=0},i.prototype.isParentTagName=function(n){for(var i=n.toLocaleLowerCase(),t=this;t;){if(t.tagLowerCase===i)return!0;t=t.parent}return!1},i.prototype.findChildIndexByUid=function(n){var t,r,i;if(this._children)for(t=0,r=this._children.length;t<r;t++)if(i=this._children[t],i&&i.uid===n)return t;return-1},i.prototype.findChildInfoByUid=function(n){return this._childUidLookup[n]},i.prototype.doesChildHaveChildren=function(n){if(this._children&&n<this._children.length&&this._children[n])return this._children[n].childCount>0?!0:!1;throw new Error("accessing childIndex that doesn't exist")},i.prototype.hasChildUids=function(){return this._children?!0:!1},i.prototype.appendChildUids=function(n){var f,i,u,r,t;for(this._children||(this._children=[],this._childUidLookup={}),f=[],i=0,u=n.length;i<u;i++)r=n[i].uid,this._childUidLookup[r]||(t={},t.childCount=n[i].childCount,t.uid=r,t.child=null,this._children.push(t),this._childUidLookup[r]=t)},i.prototype.setChildUids=function(n){var i,t,u,r;for(this._children&&(i=this._children.slice(0)),this._children=[],this._childUidLookup={},t=0,u=n.length;t<u;t++)r=n[t].uid,this._children[t]={},this._children[t].childCount=n[t].childCount,this._children[t].uid=r,i&&i[t]&&i[t].uid===r&&(this._children[t].child=i[t].child),this._childUidLookup[r]=this._children[t]},i.prototype.insertChildUid=function(n,t){if(!this._children){if(this._hasChildren)return!1;this._children=[];this._childUidLookup={}}var i={uid:n.uid,childCount:n.childCount,child:null};return t>this._children.length?this._children[t]=i:this._children.splice(t,0,i),this._childUidLookup[i.uid]=i,!0},i.prototype.isWhitespace=function(){return this._type!==5?!1:!this.textContent||i.WHITESPACE_REGEXP.test(this.textContent)},i.prototype.toString=function(){var t,n,r,i;if(this._type===5)return this.textContent;if(this._type===3)return"<!--"+this.textContent+"-->";if(this._type===4)return"<!DOCTYPE "+this.textContent+">";if(this._type===2)return"<![CDATA[ "+this.textContent+" ]\]>";if(t="<"+this.tagLowerCase,this.attributes)for(n=0,r=this.attributes.length;n<r;n++)i=this.attributes.getItem(n),t+=" "+i.name+" = '"+i.value+"'";return t+">"},i.prototype.getChild=function(n){return this._children&&n<this._children.length&&n>=0&&this._children[n]?this._children[n].child:undefined},i.prototype.getChildUid=function(n){return this._children&&n<this._children.length&&n>=0?this._children[n].uid:undefined},i.prototype.getIndexChain=function(){for(var i=[],n=this.parent,r=this,t,u;n;){if(t=n.findChildIndexByUid(r.uid),t===-1)return undefined;u=this.isFrame;i.unshift({index:t,isDocumentBreak:u});r=n;n=n.parent}return i},i.prototype.setChild=function(n,t){if(this._children&&!(t>=this._children.length)){var i=this._children[t];i?(i.uid=n.uid,i.childCount=n.childUidCount,i.child=n):this._children[t]={uid:n.uid,child:n,childCount:n.childUidCount};n.parent=this;this._childUidLookup[n.uid]=i}},i.prototype.removeChild=function(n){var i,t,r;if(!this._children)return!1;for(i=-1,t=0,r=this._children.length;t<r;t++)if(this._children[t].child===n){i=t;break}return i>=0?(this._children.splice(i,1),delete this._childUidLookup[n.uid],this._childReadInCount--,!0):!1},i.prototype.removeChildByIndex=function(n){if(!this._children)return!1;if(n!==-1){var t=this._children[n];return t&&t.child&&(delete this._childUidLookup[t.uid],this._childReadInCount--),this._children.splice(n,1),this._children.length===0&&this.removeAllChildren(),!0}return!1},i.prototype.removeChildByUid=function(n){var i,t,r;if(!this._children)return!1;for(i=-1,t=0,r=this._children.length;t<r;t++)if(this._children[t]&&this._children[t].uid===n){i=t;break}return i!==-1?(this._children[i].child&&this._childReadInCount--,this._children.splice(i,1),delete this._childUidLookup[n],this._children.length===0&&this.removeAllChildren(),!0):!1},i.prototype.removeAllChildren=function(){this._childReadInCount=0;this._children=[];this._childUidLookup={};this._hasChildren=!1},i.prototype.getAttribute=function(n){return n<this.attributes.length?this.attributes.getItem(n):null},i.prototype.getAttributeByName=function(n){return this._attributeLookup[n]},i.prototype.removeAttribute=function(n){var t,i;if(this.attributes){for(t=this.attributes.length;t>0;t--)if(i=t-1,this.attributes.getItem(i).name===n){this.attributes.splice(i,1);break}delete this._attributeLookup[n]}},i.prototype.addAttribute=function(t,r){var u=this.getAttributeByName(t.name);return u?u.value=t.value:(u=new n.ObservableAttribute(t.name,t.value),this.attributes=this.attributes||new Common.ObservableCollection,r&&r<this.attributes.length?this.attributes.splice(r,0,u):this.attributes.push(u),this._attributeLookup[t.name]=u),u.name===i.TextContentAttributeName&&this.textContentChanged.invoke(),u},i.prototype.dumpNode=function(n,t){var i="",r;if(this.isWhitespace())return"";for(r=0;r<n;r++)i+=" ";if(i+=this.toString(),t&&this._children){for(i+="\n",this._children.forEach(function(r){i+="uid:"+r.uid+" count="+r.childCount+" info="+(r.child?r.child.dumpNode(n+1,t):"null")}),r=0;r<n;r++)i+=" ";i+="<\\"+this.tagLowerCase+">\n"}return i},i.WHITESPACE_REGEXP=/^\s+$/,i.AttributesPropertyName="attributes",i.TextContentAttributeName="textContent",i}(Common.Observable);n.DomTreeElement=t;t.initialize()}(DomTree||(DomTree={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,r,i;(function(n){n[n.None=0]="None";n[n.Name=1]="Name";n[n.Value=2]="Value";n[n.Add=3]="Add"})(n.EditMode||(n.EditMode={}));r=n.EditMode;i=function(){function n(n,t,i,r,u,f,e,o,s){this._inEditMode=!1;this._htmlElementSource=n;this._domExplorer=t;this._domTree=i;this._bridge=r;this._styleComputer=u;this._remoteDom=f;this._enterEditModeCallback=e;this._exitEditModeCallback=o;this._onSizeChangedCallback=s}return n.prototype.editNewAttribute=function(n,t,i){var r,u,f;(i===void 0&&(i=!1),this._domExplorer.capabilities.canEditAttributes)&&(r=i?this.findFirstAttribute(t):null,r&&r.length||(u={name:"",value:""},r=$m(this._domTree.addAttributeTemplateToItemView(this._domExplorer.capabilities,t.get(0),u))),f=this.findNameForAttribute(r),this.editAttributeName(n,f))},n.prototype.editAttributeName=function(n,i){var e=this,u,o,r;if(this._domExplorer.capabilities.canEditAttributes&&(u=i.next(".BPT-HTML-Value"),u.get(0))){this.enterEditMode(n.uid);var s=u.text(),f=new Dom.ValueEditor(this._htmlElementSource,this._domExplorer,this._bridge,this._styleComputer),h=new Dom.ValueEditorKey("=");f.addExitKeys(h);o=this.calculateEditWidth(i.get(0));r=$m("<span>").text(i.text());r.attr("aria-label",t.Resources.getString("/Common/EditAttributeNameAriaLabel"));i.text("");i.append(r);var c=r.get(0),l=this.findOwnerItem(r),a=function(r,u){return new t.Promise(function(t){return e.editAttributeNameCommit(n.uid,i,s,r,u,t)})},v=this.createOnSizeChangeHandler(n,f),y=f.show(c,o,a,v);y.done(function(t){return e.editAttributeNameCleanup(n,t,i,l)})}},n.prototype.editAttributeNameCommit=function(n,t,i,r,u,f){var s=this,e,o;u=u.toLowerCase();r=r.toLowerCase();r&&r!==u?(e=this.findAttributeNameByName(this.findOwnerItem(t),r,t.get(0)),e?f(!0):(this._remoteDom.enableEditChaining(),o=function(i){return s.editAttributeNameCompleted(i,n,t,r,u,f)},this.editAttribute(n,r,i,o))):f(!0)},n.prototype.editAttributeNameCompleted=function(n,t,i,r,u,f){if(n){i.text(r);var e=i.parent(".BPT-HTML-Attribute-Section");e.attr("data-attrName",r);this.removeAttribute(t,u)}this._remoteDom.disableEditChaining();f(n)},n.prototype.editAttributeNameCleanup=function(n,t,i,r){var o=t.oldValue.toLowerCase(),s=t.newValue.toLowerCase(),h=!1,y=this.findPreviousAttribute(i),e,c,l,a,v,u,f;if(s){if(e=this.findAttributeNameByName(this.findOwnerItem(i),s,i.get(0)),c=t.wasCancelled||!!e,i.text(c?o:s),e){l=this.findAttribute(e);a=this.findValueForAttribute(l);this.editAttributeValue(n,a);this.cleanupTempEditSections(this.findOwnerItem(i));return}}else o?this.removeAttribute(n.uid,o):(v=i.parent(".BPT-HTML-Attribute-Section"),v.remove(),h=!0);t.wasCancelled||!t.exitKey||t.exitKey.equalTo(Dom.ValueEditorKey.EnterKey)?this.exitEditMode(n,this.findOwnerItem(i)):(f=0,t.exitKey.equalTo(Dom.ValueEditorKey.ShiftTabKey)?(u=h?y:this.findPreviousAttribute(i),f=2):h?(u=this.findFirstAttribute(r),f=1):(u=this.findAttribute(i),f=2),u&&u.length?this.moveEditor(n,u,f,r):this.moveEditor(n,i,3,r))},n.prototype.editAttributeValue=function(n,i){var f=this,u;if(this._domExplorer.capabilities.canEditAttributes&&(u=i.prev(".BPT-HTML-Attribute"),u.get(0))){this.enterEditMode(n.uid);var o=u.text(),s=i.text(),e=new Dom.ValueEditor(this._htmlElementSource,this._domExplorer,this._bridge,this._styleComputer),h=this.calculateEditWidth(i.get(0)),r=$m("<span>").text(s);r.attr("aria-label",t.Resources.getString("/Common/EditAttributeValueAriaLabel"));i.text("");i.append(r);var c=r.get(0),l=this.findOwnerItem(r),a=function(r,u){return new t.Promise(function(t){return f.editAttributeValueCommit(n.uid,i,o,r,u,t)})},v=this.createOnSizeChangeHandler(n,e),y=e.show(c,h,a,v);y.done(function(t){return f.editAttributeValueCleanup(n,t,i,l)})}},n.prototype.editAttributeValueCommit=function(n,t,i,r,u,f){var o=this,e;r!==u?(this._remoteDom.enableEditChaining(),e=function(n){return o.editAttributeValueCompleted(n,t,r,f)},this.editAttribute(n,i,r,e)):f(!0)},n.prototype.editAttributeValueCompleted=function(n,t,i,r){n&&t.text(i);this._remoteDom.disableEditChaining();r(n)},n.prototype.editAttributeValueCleanup=function(n,t,i,r){var e=t.oldValue,o=t.newValue,s=t.wasCancelled,u,f;i.text(s?e:o);t.wasCancelled||!t.exitKey||t.exitKey.equalTo(Dom.ValueEditorKey.EnterKey)?this.exitEditMode(n,this.findOwnerItem(i)):(f=1,u=t.exitKey.equalTo(Dom.ValueEditorKey.ShiftTabKey)?this.findAttribute(i):this.findNextAttribute(i),u&&u.length?this.moveEditor(n,u,f,r):this.moveEditor(n,i,3,r))},n.prototype.removeAttribute=function(n,t,i){var r=function(n){i&&i(n)};this._remoteDom.removeAttribute(n,t).done(r)},n.prototype.editAttribute=function(n,t,i,r){var f=this,u;this.raiseEvent(545);u=function(n){r&&r(n);f.raiseEvent(546)};this._remoteDom.editAttribute(n,t,i).done(u)},n.prototype.calculateEditWidth=function(n){var t=30,i=70+t,r=this.width(n)+t,u=this.findWidthForTreeItem(n)-4,f=Math.min(r,u);return Math.max(f,i)},n.prototype.findWidthForTreeItem=function(n){var t,i;return n?(t=this.closest(n,".domTreeItemDataTemplateName"),!t)?0:(i=this.width(t),i||0):0},n.prototype.width=function(n){if(n&&n.getBoundingClientRect){var t=n.getBoundingClientRect().width,i=window.getComputedStyle(n,null);return t-=parseInt(i.paddingLeft,10),t-=parseInt(i.paddingRight,10),t-=parseInt(i.borderLeftWidth,10),t-parseInt(i.borderRightWidth,10)}},n.prototype.closest=function(n,t){while(n&&n!==document){var i=n;if(i.msMatchesSelector&&i.msMatchesSelector(t))return i;n=n.parentNode}},n.prototype.findOwnerItem=function(n){return n.closest(".BPT-HTML-HtmlElement")},n.prototype.findAttributeNameByName=function(n,t,i){for(var r,f=n.find(".BPT-HTML-Attribute"),u=0,e=f.length;u<e;u++)if((r=$m(f.get(u)),r.get(0)!==i)&&r.text().toLowerCase()===t)return this.findAttribute(r)},n.prototype.findAttribute=function(n){return n.closest(".BPT-HTML-Attribute-Section")},n.prototype.findNameForAttribute=function(n){return n.find(".BPT-HTML-Attribute")},n.prototype.findValueForAttribute=function(n){return n.find(".BPT-HTML-Value")},n.prototype.findNextAttribute=function(n){return n.closest(".BPT-HTML-Attribute-Section").next(".BPT-HTML-Attribute-Section")},n.prototype.findPreviousAttribute=function(n){return n.closest(".BPT-HTML-Attribute-Section").prev(".BPT-HTML-Attribute-Section")},n.prototype.findFirstAttribute=function(n){return n.find(".BPT-HTML-Attribute-Section").first()},n.prototype.moveEditor=function(n,t,i,r){var u=this;window.setTimeout(function(){var e=r.attr("data-id"),f=u.findAttribute(t);f.hasClass("BPT-HTML-Attribute-Section")&&i!==3?i===2?u.editAttributeValue(n,u.findValueForAttribute(f)):u.editAttributeName(n,u.findNameForAttribute(f)):u.editNewAttribute(n,r)},0)},n.prototype.raiseEvent=function(){this._domExplorer.traceWriter&&this._domExplorer.traceWriter.raiseEvent(545)},n.prototype.enterEditMode=function(n){this._inEditMode||(this._inEditMode=!0,this._enterEditModeCallback&&this._enterEditModeCallback(n))},n.prototype.exitEditMode=function(n,t){this._inEditMode&&(this._inEditMode=!1,this.cleanupTempEditSections(t),this._domExplorer.refreshElementForLowDocModes(n,!0,!1),n.renderedElement=null,this._domTree.invalidateItemRowSpan(n),n.dontVirtualize=!1,this._domTree.render(!1),this._exitEditModeCallback&&this._exitEditModeCallback())},n.prototype.createOnSizeChangeHandler=function(n){var t=this,i=this._htmlElementSource.querySelector("#treeContainer .BPT-listItemContainer[data-id='"+n.id+"']"),r=F12.DomExplorer.DomExplorerWindow.findDescendentByClass(i,"domTreeItemDataTemplateName").firstElementChild;return function(){n.dontVirtualize=!0;t._onSizeChangedCallback&&t._onSizeChangedCallback(n)}},n.prototype.cleanupTempEditSections=function(n){n.find(".BPT-HTML-Attribute-Section-New").remove()},n}();n.EditAttributeController=i})(DomTree||(DomTree={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=function(t){function i(i,r,u){t.call(this);this._onEditTextCallback=i;this._onEditAttributeOnEnter=r;this._showContextMenuCallback=u;this.panel=new n.DomTreeVirtualizingMultiRowStackPanel}return __extends(i,t),i.prototype.onApplyTemplate=function(){t.prototype.onApplyTemplate.call(this);this.rootElement.tabIndex=1},i.prototype.currentFocusOnInput=function(){var n=document.activeElement;return this.isTextArea(n)||this.isInputText(n)},i.prototype.onShowContextMenu=function(){t.prototype.onShowContextMenu.call(this);this._showContextMenuCallback&&this._showContextMenuCallback()},i.prototype.onKeyDownOverride=function(n){if(this.currentFocusOnInput())return!1;var i=!1,u=!n.ctrlKey&&!n.shiftKey&&!n.altKey,f=n.ctrlKey&&!n.shiftKey&&!n.altKey,r=this.selectedItem;return r&&n.keyCode===13&&(f&&this._onEditTextCallback?(this._onEditTextCallback(r.uid,!0),i=!0):u&&(r.node.type===5&&this._onEditTextCallback?(this._onEditTextCallback(r.uid,!1),i=!0):this._onEditAttributeOnEnter&&(this._onEditAttributeOnEnter(r.uid,r),i=!0))),i||(i=t.prototype.onKeyDownOverride.call(this,n)),i},i.prototype.addAttributeTemplateToItemView=function(n,t,i,r){var o=new Common.Templating.Template(n,{htmlElementSource:document,templateId:"newAttributeTemplate"}),s=o.createTemplateText(i),e=document.createElement("div"),u,f;return e.innerHTML=s,u=e.children[0],f=F12.DomExplorer.DomExplorerWindow.findAllDescendentsByClass(t,"BPT-HTML-Attribute-Section"),f.length&&f.length<r?t.insertBefore(u,f[r]):t.appendChild(u),u},i.prototype.selectedItemMutated=function(){},i.prototype.updateSelectionHighlight=function(n){if(n){var t=this.dataSource.indexOfItem(n.id);this.panel.setSelectionHighlightIndex(t)}else this.panel.clearSelectionHighlightIndex()},i.prototype.selectionChanged=function(n){this.updateSelectionHighlight(n)},i.prototype.isInputText=function(n){if(!n)return!1;var t=n.tagName;return typeof t!="string"?!1:t.toUpperCase()==="INPUT"&&n.hasAttribute("type")&&n.getAttribute("type")==="text"},i.prototype.isTextArea=function(n){if(!n)return!1;var t=n.tagName;return typeof t!="string"?!1:t.toUpperCase()==="TEXTAREA"},i}(Common.Controls.TreeListControl);n.DomTreeListControl=t}(DomTree||(DomTree={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=function(n){function t(i,r,u,f,e,o,s,h){o===void 0&&(o=0);n.call(this);this.isGettingDetails=!1;this.isBeingDragged=!1;this.isBeingEdited=!1;this.isClosingTag=!1;this.isExpanding=!1;this.isForceExpanded=!1;this._capabilities=i;this.node=r;this.level=u;this.parentItem=f;this.uid=e;this.children=new Array(o);this.hasChildren=o>0;this.parentNode=s;this.childIndex=h;this.uid||this.node&&(this.uid=this.node.uid);this.dontVirtualize=!1;this._id=t.IdSource++;this.isExpanded=!1;this.visibleDescendantRowCount=0;this.propertyChanged.addHandler(this.handlePropertyChanged.bind(this))}return __extends(t,n),Object.defineProperty(t.prototype,"dontKeyboardSelect",{get:function(){return this.isClosingTag},set:function(){throw new Error("Can't set dontKeyboardSelect")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clickSelectAlternative",{get:function(){return this.isClosingTag?this.parentItem:this},set:function(){throw new Error("Can't set clickSelectAlternative")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){return this.node&&this.node.attributes?this.node.attributes:new Common.ObservableCollection},set:function(){throw new Error("Cannot set attributes")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tag",{get:function(){return this.node&&this.node.tag?this.node.tagLowerCase:""},set:function(){throw new Error("Cannot set tag")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textNodeText",{get:function(){if(this.node.type===5)return this.node.textContent.trim();throw Error()},set:function(){throw new Error("Cannot set textNodeText")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cDataText",{get:function(){if(this.node.type===2)return this.node.textContent;throw Error()},set:function(){throw new Error("Cannot set cDataText")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"docTypeText",{get:function(){if(this.node.type===4)return this.node.getAttributeByName("textContent").value;throw Error()},set:function(){throw new Error("Cannot set docTypeText")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"commentText",{get:function(){if(this.node.type===3){var n=this.node.getAttributeByName("textContent");return n?n.value:" "}throw Error()},set:function(){throw new Error("Cannot set commentText")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this._id},set:function(n){this._id=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderedElement",{get:function(){return this._renderedElement},set:function(n){this._renderedElement=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSelectable",{get:function(){return this.node&&this.node.type!==0},set:function(){throw new Error("Cannot set isSelectable")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasDebugUid",{get:function(){return F12.DomExplorer.DomExplorerWindow.DEBUG_UID_DISPLAY&&!!this.uid},set:function(){throw new Error("Cannot set hasDebugUid")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasImmediateClosingTag",{get:function(){return!this.hasChildren&&this.canHaveClosingTag()},set:function(){throw new Error("Cannot set hasImmediateClosingTag")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"potentiallyHasChildren",{get:function(){return!this.hasChildren&&this.canHaveClosingTag()},set:function(){throw new Error("Cannot set potentiallyHasChildren")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasEllipsisClosingTag",{get:function(){return this.hasChildren&&!this.isExpanded},set:function(){throw new Error("Cannot set hasEllipsisClosingTag")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"visibleRowCount",{get:function(){return this.uid==="#root"?this.visibleDescendantRowCount:this.isExpanded&&(this.hasChildren||this.isForceExpanded)?this.visibleDescendantRowCount+2:1},set:function(){throw new Error("Cannot set visibleRowCount")},enumerable:!0,configurable:!0}),t.initialize=function(){Common.ObservableHelpers.defineProperty(t,t.AreChildrenInlinePropertyName,undefined);Common.ObservableHelpers.defineProperty(t,t.DebugUidPropertyName,"");Common.ObservableHelpers.defineProperty(t,t.HasChildrenPropertyName,!1);Common.ObservableHelpers.defineProperty(t,t.IsExpandedPropertyName,!1);Common.ObservableHelpers.defineProperty(t,t.IsForceExpandedPropertyName,!1);Common.ObservableHelpers.defineProperty(t,t.IsSelfClosingPropertyName,!1);Common.ObservableHelpers.defineProperty(t,t.LevelPropertyName,0);Common.ObservableHelpers.defineProperty(t,t.UidPropertyName,null);Common.ObservableHelpers.defineProperty(t,t.NodePropertyName,null);Common.ObservableHelpers.defineProperty(t,t.NeedsRefreshPropertyName,!1);Common.ObservableHelpers.defineProperty(t,t.TextPreviewPropertyName,undefined,function(n){return n.onTextPreviewChanged()})},t.prototype.isItemAChild=function(n){return this.node.isNodeAChild(n.node)},t.prototype.isWhitespace=function(){return this.node.isWhitespace()},t.prototype.clearCachedContent=function(){this._contentCached=undefined},t.prototype.instantiateTemplate=function(n,t){var i=new Common.Templating.Template(this._capabilities,{htmlElementSource:document,templateId:n});return i.createTemplateText(t)},t.prototype.getItemContainerElement=function(){var n=this.getElement();return n&&n.length>0?$m(F12.DomExplorer.DomExplorerWindow.findAncestorByClass(n.get(0),"BPT-listItemContainer")):n},t.prototype.getElement=function(){var n=$m("#treeContainer").find(".BPT-listItemContainer[data-id='"+this.id+"'] .BPT-HTML");switch(this.node.type){case 1:return n.find(".BPT-HTML-HtmlElement");case 5:return n.find(".BPT-HTML-Text");case 2:return n.find(".BPT-HTML-CData");case 3:return n.find(".BPT-HTML-Comment");case 4:return n.find(".BPT-HTML-DocType")}throw new Error("getting element for element type = "+this.node.type)},t.prototype.getNextSibling=function(){var n;return this.parentItem&&(n=this.parentItem.children[this.childIndex+1]),n},t.prototype.getPreviousSibling=function(){var n;return this.parentItem&&(n=this.parentItem.children[this.childIndex-1]),n},t.prototype.isDraggable=function(){if(!this.node)return!1;var n=this.node.type;return n===1?!t.NO_DRAG_TAG[this.tag]:n===5||n===3},t.prototype.handlePropertyChanged=function(n){var i=this;switch(n){case"uid":this.debugUid=this.hasDebugUid?this.uid:"";break;case"node":this.node&&this.node.textContentChanged.addHandler(function(){i.propertyChanged.invoke(t.TextNodeTextPropertyName)})}},t.prototype.canHaveClosingTag=function(){return!t.VOID_TAG[this.tag]},t.prototype.onTextPreviewChanged=function(){if(this.textPreview){var n=this.textPreview.charAt(this.textPreview.length-1)!=="…";if(n){this.areChildrenInline=!0;return}}this.areChildrenInline=undefined},t.IdSource=0,t.NO_DRAG_TAG={html:!0,head:!0,body:!0,script:!0},t.VOID_TAG={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,menuitem:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},t.AreChildrenInlinePropertyName="areChildrenInline",t.DebugUidPropertyName="debugUid",t.ID="BPT-TreeDataItemId-",t.MinSizingParentWidth=400,t.HasChildrenPropertyName="hasChildren",t.IsExpandedPropertyName="isExpanded",t.IsForceExpandedPropertyName="isForceExpanded",t.IsSelfClosingPropertyName="isSelfClosing",t.LevelPropertyName="level",t.NeedsRefreshPropertyName="needsRefresh",t.NodePropertyName="node",t.TextNodeTextPropertyName="textNodeText",t.TextPreviewPropertyName="textPreview",t.UidPropertyName="uid",t}(Common.Observable);n.TreeDataItem=t;t.initialize()}(DomTree||(DomTree={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var r,u,f;(function(n){n[n.Unknown=0]="Unknown";n[n.BeforeSibling=1]="BeforeSibling";n[n.AfterSibling=2]="AfterSibling";n[n.FirstChild=3]="FirstChild";n[n.LastChild=4]="LastChild";n[n.NoDropHere=5]="NoDropHere"})(n.ReparentAction||(n.ReparentAction={}));var e=n.ReparentAction,i=F12.Tools.Utility.Assert,t=function(){function n(){}return n.ReparentActionToString=function(n){switch(n){case 1:return"before sibling";case 2:return"after sibling";case 3:return"first child";case 4:return"last child";default:return undefined}},n.isExpandableAndExpanded=function(n){return n.isForceExpanded||n.isExpanded&&n.hasChildren},n.isStandaloneClosingTag=function(n){var t=n.querySelector("DIV.domTreeItemDataTemplate > DIV.domTreeItemDataTemplateNameCell > DIV.domTreeItemDataTemplateName > DIV > DIV > DIV.BPT-HTML-ClosingTag");return!!t},n.nearby=function(n,t,i){return t+i<n||t-i>n?!1:!0},n.AUTOSCROLL_PIXELS_PER_SECOND=30,n.AUTOSCROLL_ACCELERATION=5,n.AUTOEXPAND_DISCLOSURE_TRIANGLE_MILLISECOND_DELAY=500,n.AUTOEXPAND_NONEXPANDABLE_MILLISECOND_DELAY=1e3,n.AUTOEXPAND_PIXEL_DRIFT=2,n}();n.Static=t;r=function(n){function t(){n.call(this);this.hoverStateChangeEvent=new Common.EventSource;this.newItemContainerEvent=new Common.EventSource}return __extends(t,n),t.prototype.newItemContainer=function(){var t=this,n=new Common.Controls.ItemContainer;return n.selectedTabIndex=1,n.hoverStateChangeEvent.addHandler(function(n){t.hoverStateChangeEvent.invoke(n)}),this.newItemContainerEvent.invoke(n),n},t}(Common.Controls.ItemContainerGenerator);n.NotifyingItemContainerGenerator=r;u=function(){function n(n){this._traceWriter=n}return n}();f=function(){function n(n,t,r,f,e){var o=this;this._autoscrollLastTimeStamp=0;n||i.failDebugOnly("DragDropController must have a domExplorer window");t||i.failDebugOnly("DragDropController must have a dataSource");r||i.failDebugOnly("DragDropController must have a root");f||i.failDebugOnly("DragDropController must have a generator");this._domExplorer=n;this._dataSource=t;this._root=r;this._generator=f;this._trace=new u(e);this._shimDragStart=function(n){return o.handleDragStart(n)};this._shimDragEnter=function(n){return o.handleDragEnter(n)};this._shimDragOver=function(n){return o.handleDragOver(n)};this._shimDragLeave=function(n){return o.handleDragLeave(n)};this._shimDragEnd=function(n){return o.handleDragEnd(n)};this._shimDrag=function(n){return o.handleDrag(n)};this._shimDrop=function(n){return o.handleDrop(n)};this._newItemContainerRegistration=this._generator.newItemContainerEvent.addHandler(function(n){return o.attachHandlers(n.rootElement)})}return n.prototype.attachHandlers=function(n){n&&(n.addEventListener("dragstart",this._shimDragStart,!1),n.addEventListener("dragenter",this._shimDragEnter,!1),n.addEventListener("dragover",this._shimDragOver,!1),n.addEventListener("dragleave",this._shimDragLeave,!1),n.addEventListener("dragend",this._shimDragEnd,!1),n.addEventListener("drag",this._shimDrag,!1),n.addEventListener("drop",this._shimDrop,!1))},n.prototype.detachHandlers=function(n){n&&(n.removeEventListener("dragstart",this._shimDragStart,!1),n.removeEventListener("dragenter",this._shimDragEnter,!1),n.removeEventListener("dragover",this._shimDragOver,!1),n.removeEventListener("dragleave",this._shimDragLeave,!1),n.removeEventListener("dragend",this._shimDragEnd,!1),n.removeEventListener("drag",this._shimDrag,!1),n.removeEventListener("drop",this._shimDrop,!1))},n.prototype.attachAllHandlers=function(){var t=this._root.querySelectorAll("DIV.BPT-listItemContainer"),n,i,r;if(t)for(n=0,i=t.length;n<i;n++)r=t[n],this.attachHandlers(r)},n.prototype.detachAllHandlers=function(){var t=this._root.querySelectorAll("DIV.BPT-listItemContainer"),n,i,r;if(t)for(n=0,i=t.length;n<i;n++)r=t[n],this.detachHandlers(r)},n.prototype.getDataId=function(n){var t=n.querySelector("DIV.BPT-HTML [data-id]");if(t)return t.getAttribute("data-id")},n.prototype.handleDragStart=function(n){var t=n.currentTarget,i;if(n.srcElement.tagName==="TEXTAREA"||n.srcElement.tagName==="INPUT"){n.preventDefault();return}(this._dragDataId=this.getDataId(t),this._dragDataId)&&(i=this._dataSource.getIndexChain(this._dragDataId),i)&&(this.beginDrag(t,this._dragDataId),n.stopPropagation(),n.dataTransfer.setData("Text",""),n.dataTransfer.effectAllowed="move",this._autoscrollLastTimeStamp=n.timeStamp)},n.prototype.handleDragEnter=function(n){var r=n.currentTarget,i=this.calculateReparentAction(r),u;return t.ReparentActionToString(i)&&(u=i===1||i===4,this.removeAllHighlightHover(),this.addHighlightHover(r,u),n.dataTransfer.dropEffect="move"),n.preventDefault(),n.stopPropagation(),!1},n.prototype.handleDragOver=function(n){return n.dataTransfer.dropEffect="move",this.autoExpand(n),n.preventDefault(),n.stopPropagation(),!1},n.prototype.handleDragLeave=function(n){var r=n.currentTarget,i,t;this.removeHighlightHover(r);i=this.getDataId(r);i&&(t=this._dataSource.getItemByUid(i),t&&this._dataSource.domTree.removeForceExpand(t)&&this._domExplorer.domTree.invalidateItemRowSpan(t));n.preventDefault();n.stopPropagation()},n.prototype.handleDragEnd=function(n){this.finishDrag();this.removeAllHighlightHover();this._dragDataId=undefined;this._autoscrollLastTimeStamp=0;n.preventDefault();n.stopPropagation()},n.prototype.handleDrag=function(n){var r=this._root.querySelector("DIV.BPT-stackPanel"),f;if(!r)return!1;f=n.timeStamp-this._autoscrollLastTimeStamp;this._autoscrollLastTimeStamp=n.timeStamp;var e=this.calcAbove(n,r),o=this.calcBelow(n,r),i=t.AUTOSCROLL_PIXELS_PER_SECOND,u=10;return e?(e>u&&(i+=(e-u)*t.AUTOSCROLL_ACCELERATION),i=Math.ceil(i*f/1e3),i=Math.min(i,r.scrollTop),i&&(r.scrollTop-=i)):o&&(o>u&&(i+=(o-u)*t.AUTOSCROLL_ACCELERATION),i=Math.ceil(i*f/1e3),i=Math.min(i,r.scrollHeight-r.scrollTop-r.offsetHeight),i&&(r.scrollTop+=i)),!1},n.prototype.calcAbove=function(n,t){if(!n||!t)return NaN;var i=t.offsetTop-n.clientY;return i<0&&(i=0),i},n.prototype.calcBelow=function(n,t){if(!n||!t)return NaN;var i=n.clientY-(t.offsetHeight+t.offsetTop);return i<0&&(i=0),i},n.prototype.handleDrop=function(n){var o=this,i=n.currentTarget,e,r,u,f;return this.removeHighlightHover(i),n.stopPropagation(),e=this.calculateReparentAction(i),r=t.ReparentActionToString(e),r&&(u=this.getDataId(i),this._dataSource.reparent(this._dragDataId,u,r).done(function(n){n&&o._domExplorer.refreshElementForLowDocModes(null,!0,!0)}),f=this._dataSource.getItemByUid(u),f&&this._dataSource.domTree.removeForceExpand(f)),!1},n.prototype.calculateReparentAction=function(n){var i=this.getDataId(n),r,f,u,e,o;return i?(r=this._dataSource.getIndexChain(this._dragDataId),!r)?0:(f=this._dataSource.getItemByUid(i),u=this._dataSource.getIndexChain(i),!u)?0:(e=t.isExpandableAndExpanded(f),o=t.isStandaloneClosingTag(n),this.compareIndexChain(r,u,e,o)):0},n.prototype.compareIndexChain=function(n,t,i,r){var u;if(!n||!t)return 0;while(n.length&&t.length)if(n[0].index===t[0].index)n.shift(),t.shift();else break;if(n.length===0)return 5;for(u=0;u<n.length;++u)if(n[u].isDocumentBreak)return 5;for(u=0;u<t.length;++u)if(t[u].isDocumentBreak)return 5;return t.length===0?r?2:1:t[0].index<n[0].index?r?4:1:i?3:2},n.prototype.addHighlightHover=function(n,t){n&&(t?n.classList.add("drag-hover-before"):n.classList.add("drag-hover"))},n.prototype.removeHighlightHover=function(n){n&&n.classList&&(n.classList.remove("drag-hover"),n.classList.remove("drag-hover-before"))},n.prototype.removeAllHighlightHover=function(){var n=this._root.querySelectorAll("DIV.drag-hover"),t,i,r;if(n&&n.length)for(t=0,i=n.length;t<i;t++)r=n[t],this.removeHighlightHover(r);if(n=this._root.querySelectorAll("DIV.drag-hover-before"),n&&n.length)for(t=0,i=n.length;t<i;t++)r=n[t],this.removeHighlightHover(r)},n.prototype.beginDrag=function(n,t){if(!n)throw new Error("DragDropController.beginDrag must have an element");this._dragListItemContainer=n;this._dragListItemContainer.classList.add("drag-item");this._root.classList.add("drag-and-drop");this._dataSource.setDragUid(t)},n.prototype.finishDrag=function(){var n=this._root.querySelectorAll("DIV.drag-item"),t,i;if(n&&n.length)for(t=0,i=n.length;t<i;t++)n[t].classList.remove("drag-item");this._root.classList.remove("drag-and-drop");this._dragListItemContainer=undefined;this._dataSource.setDragUid(undefined)},n.prototype.autoExpand=function(n){var t=n.target;t&&t.classList.contains("BPT-listItemContainer")&&this.isWithinRoot(t)&&(this.autoExpandUpdate(n,t)||this.autoExpandIcon(n,t)||this.autoExpandNonExpandable(n,t))},n.prototype.autoExpandUpdate=function(n,i){if(!this._lastExpandIcon||this._lastExpandIcon.element!==i)return this.autoExpandReset(n,i),!0;var r=t.nearby,f=n.clientX,e=n.clientY,o=this._lastExpandIcon.clientX,s=this._lastExpandIcon.clientY,u=t.AUTOEXPAND_PIXEL_DRIFT;return!r(f,o,u)||!r(e,s,u)?(this.autoExpandReset(n,i),!0):!1},n.prototype.autoExpandReset=function(n,t){this._lastExpandIcon={element:t,timeStamp:n.timeStamp,clientX:n.clientX,clientY:n.clientY}},n.prototype.autoExpandIcon=function(n,i){var f=this,u,r;return n.timeStamp-this._lastExpandIcon.timeStamp<t.AUTOEXPAND_DISCLOSURE_TRIANGLE_MILLISECOND_DELAY?!1:(u=i.querySelector("DIV."+Common.Controls.TreeItemDataTemplate.COLLAPSED_CSS_CLASS),!u)?!1:(r=this.getDataId(i),!r)?!1:(this._lastExpandIcon=undefined,this.removeAllHighlightHover(),this._dataSource.expandUid(r),setTimeout(function(){f._domExplorer.render()},1e3/60),!0)},n.prototype.autoExpandNonExpandable=function(n,i){var u=this,r;return n.timeStamp-this._lastExpandIcon.timeStamp<t.AUTOEXPAND_NONEXPANDABLE_MILLISECOND_DELAY?!1:(r=this.getDataId(i),!r)?!1:this._dataSource.potentiallyHasChildren(r)?(this.removeAllHighlightHover(),this._dataSource.expandUid(r,!0).done(function(){u._domExplorer.render();u.addHighlightHover(i,!1)}),!0):!1},n.prototype.isWithinRoot=function(n){while(n){if(n===this._root)return!0;n=n.parentNode}return!1},n}();n.DragDropController=f}(DomTree||(DomTree={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i,r,u,f;(function(n){n[n.MenuTreeCut=0]="MenuTreeCut";n[n.MenuTreeCopy=1]="MenuTreeCopy";n[n.MenuTreePaste=2]="MenuTreePaste"})(i||(i={}));r=function(){function n(i,r){this._bridge=i;this._textArea=r;this._menuId="TextControlContextMenu"+n.MenuUid++;this._menuItems=[{id:"menuTextControlCut",type:1,label:t.Resources.getString("/Common/CutMenuText"),accessKey:t.Resources.getString("AccessKeyCtrlX")},{id:"menuTextControlCopy",type:1,label:t.Resources.getString("/Common/CopyMenuText"),accessKey:t.Resources.getString("AccessKeyCtrlC")},{id:"menuTextControlPaste",type:1,label:t.Resources.getString("/Common/PasteMenuText"),accessKey:t.Resources.getString("AccessKeyCtrlV")}];this.initialize()}return n.prototype.initialize=function(){var n=this;this._contextMenuListener=function(t){return n.onContextMenu(t)};this._keydownListener=function(t){return n.onKeydown(t)};this._textArea.addEventListener("contextmenu",this._contextMenuListener);this._textArea.addEventListener("keydown",this._keydownListener);Common.ClipboardHelper.addCopyListener(this._textArea,this.onCopy.bind(this));Common.ClipboardHelper.addCutListener(this._textArea,this.onCut.bind(this));Common.ClipboardHelper.addPasteListener(this._textArea,this.onPaste.bind(this))},n.prototype.uninitialize=function(){this._textArea.removeEventListener("contextmenu",this._contextMenuListener);this._textArea.removeEventListener("keydown",this._keydownListener)},n.prototype.onKeydown=function(n){var i=n.shiftKey&&!n.ctrlKey&&!n.altKey,t;return n.keyCode===121&&i&&(this._textArea=n.target,t=this._textArea.getBoundingClientRect(),this.showContextMenu(this._textArea,t.left,t.top),n.preventDefault(),n.stopImmediatePropagation()),!0},n.prototype.onContextMenu=function(n){return this.showContextMenu(n.target,n.clientX,n.clientY),n.preventDefault(),n.stopImmediatePropagation(),!1},n.prototype.onMenuItemClicked=function(n,t){if(n===this._menuId){switch(t){case this._menuItems[0].id:Common.ClipboardHelper.fireCutEvent(this._textArea);F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.CUT_TEXT,2);break;case this._menuItems[1].id:Common.ClipboardHelper.fireCopyEvent(this._textArea);F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.COPY_TEXT,2);break;case this._menuItems[2].id:Common.ClipboardHelper.firePasteEvent(this._textArea);F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.PASTE_TEXT,2)}this.dismiss()}},n.prototype.onCopy=function(){var n=Common.ToolWindowHelpers.getSelection(this._textArea);return this._textArea.value.substring(n.start,n.end)},n.prototype.onCut=function(){var n=this.onCopy();this.onPaste("");return n},n.prototype.onPaste=function(n){var u=this,t=Common.ToolWindowHelpers.getSelection(this._textArea),r=document.queryCommandSupported("ms-beginundounit"),i;return r&&document.execCommand("ms-beginundounit"),this._textArea.value=Common.ToolWindowHelpers.replaceTextInRange(this._textArea.value,t.start,t.end,n),i=t.start+n.length,setImmediate(function(){return u._textArea.setSelectionRange(i,i)}),r&&document.execCommand("ms-endundounit"),!1},n.prototype.showContextMenu=function(n,i,r){var u=this,f,e,o;return(this.dismiss(),(i<=0||r<=0)&&(f=n.getBoundingClientRect(),i=f.left,r=f.top),!n||n.tagName!=="TEXTAREA"&&(n.tagName!=="INPUT"||!n.hasAttribute("type")||n.getAttribute("type")!=="text"))?!0:(e=Common.ToolWindowHelpers.getSelection(this._textArea),o=n.value.substring(e.start,e.end),this._canCut=o!=="",this._canCopy=o!=="",this._canPaste=typeof clipboardData=="undefined"||!!clipboardData.getData("text"),this._contextMenu||(this._menuItems[0].disabled=function(){return!u._canCut},this._menuItems[1].disabled=function(){return!u._canCopy},this._menuItems[2].disabled=function(){return!u._canPaste},this._contextMenu=t.ContextMenu.create(this._menuItems,this._menuId,null,null,function(n,t){return u.onMenuItemClicked(n,t.id)}),this._dismissHandler=function(){u.dismiss()}),n&&this._contextMenu.attach(n),this._contextMenu.addEventListener("dismiss",this._dismissHandler),this._contextMenu.show(parseInt(i.toFixed(0)),parseInt(r.toFixed(0))),Common.ToolWindowHelpers.contextMenuUp(!0),!1)},n.prototype.dismiss=function(){this._contextMenu&&(this._contextMenu.removeEventListener("dismiss",this._dismissHandler),this._contextMenu.dismiss(),this._contextMenu.dispose(),this._contextMenu=null);Common.ToolWindowHelpers.contextMenuUp(!1)},n.MenuUid=0,n}();n.TextControlMenuController=r,function(n){n[n.MenuTreeAddAttribute=0]="MenuTreeAddAttribute";n[n.MenuTreeDelete=1]="MenuTreeDelete";n[n.MenuTreeEditAsHtml=3]="MenuTreeEditAsHtml";n[n.MenuTreeCut=4]="MenuTreeCut";n[n.MenuTreeCopy=5]="MenuTreeCopy";n[n.MenuTreePasteAsChild=6]="MenuTreePasteAsChild";n[n.MenuTreePasteBefore=7]="MenuTreePasteBefore";n[n.MenuTreeCopyElementWithStyles=8]="MenuTreeCopyElementWithStyles"}(u||(u={}));f=function(){function n(n,i,r,u){this._domExplorer=n;this._remoteDom=i;this._bridge=r;this._htmlID=u;this._menuId="DomExplorerMenuTreeView";this._menuItems=[{id:"menuTreeAddAttribute",type:1,label:t.Resources.getString("/Common/AddAttributeMenuText")},{id:"menuTreeDelete",type:1,label:t.Resources.getString("/Common/DeleteElement"),accessKey:t.Resources.getString("AccessKeyDel")},{id:"separator",type:3},{id:"menuTreeEditAsHtml",type:1,label:t.Resources.getString("/Common/EditAsHtmlMenuText")},{id:"menuTreeCut",type:1,label:t.Resources.getString("/Common/CutMenuText"),accessKey:t.Resources.getString("AccessKeyCtrlX")},{id:"menuTreeCopy",type:1,label:t.Resources.getString("/Common/CopyMenuText"),accessKey:t.Resources.getString("AccessKeyCtrlC")},{id:"menuTreePasteAsChild",type:1,label:t.Resources.getString("/Common/PasteAsChildMenuText"),accessKey:t.Resources.getString("AccessKeyCtrlV")},{id:"menuTreePasteBefore",type:1,label:t.Resources.getString("/Common/PasteBeforeMenuText")},{id:"menuTreeCopyElementWithStyles",type:1,label:t.Resources.getString("/Common/CopyElementWithStylesMenuText")}];this.initialize()}return n.prototype.initialize=function(){var n=this;this._contextMenuListener=document.getElementById(this._htmlID);Common.ClipboardHelper.addCopyListener(this._contextMenuListener,this.onCopy.bind(this));this._contextMenuListener.addEventListener("contextmenu",function(t){return n.onContextMenu(t)})},Object.defineProperty(n.prototype,"_domTreeDataSource",{get:function(){return this._domExplorer.domTreeDataSource},enumerable:!0,configurable:!0}),n.prototype.onCopy=function(){return this._copyText},n.prototype.onContextMenu=function(n){var i,t;if(this._domExplorer.onDomExplorerBeforeMenuLoaded(),i=$m(n.target),!i.hasClass("BPT-HtmlTree-ChildCollection-ShowAll"))return t=this._domExplorer.getContextMenuTarget(n),this._selectedItem=t.target,this._selectedItem&&(this.showContextMenu(this._selectedItem,t.x,t.y),n.preventDefault(),n.stopPropagation()),this._domExplorer.onDomExplorerMenuLoaded(),!1},n.prototype.onMenuItemClicked=function(n,t,i){var f=this,r,u;if(n===this._menuId){r=i.uid;u=function(){f._domExplorer.focusToTree()};switch(t){case this._menuItems[0].id:this._domExplorer&&this._domExplorer.editNewAttribute(i);F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.ADD_ATTRIBUTE,2);break;case this._menuItems[1].id:this._domExplorer.deleteElement(r,i).done(function(n){u(n)});F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.DELETE_ELEMENT,2);break;case this._menuItems[4].id:this._domExplorer.cut(i).done();F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.CUT_ELEMENT,2);break;case this._menuItems[5].id:Common.ToolWindowHelpers.hasSelectedText()&&F12.Tools.Utility.Assert.failDebugOnly("There is selected text in the dom tree");this._domExplorer.copy(i);F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.COPY_TO_CLIPBOARD,2);break;case this._menuItems[3].id:this._domExplorer&&(this._domExplorer.setupEditText(r,!0).done(),this._domExplorer.focusToTree());F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.EDIT_AS_HTML,2);break;case this._menuItems[6].id:this._domExplorer.paste(i,null);F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.PASTE_AS_CHILD,2);break;case this._menuItems[7].id:this._domExplorer.paste(this._parentOfSelected,i);F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.PASTE_BEFORE,2);this._domExplorer.focusToTree();break;case this._menuItems[8].id:this.copySelectedElementWithStyles(r);F12.DomExplorer.Telemetry.analytics.logExecuteCommand(F12.DomExplorer.Telemetry.CommandName.COPY_ELEMENT_WITH_STYLES,2);break;default:this._domExplorer.focusToTree()}this.dismiss()}else this._domExplorer.focusToTree()},n.prototype.dismiss=function(){this._contextMenu&&(this._contextMenu.removeEventListener("dismiss",this._dismissHandler),this._contextMenu.dismiss(),this._contextMenu.dispose(),this._contextMenu=null);Common.ToolWindowHelpers.contextMenuUp(!1)},n.prototype.copySelectedElementWithStyles=function(n){var t=this;this._remoteDom.copyElementWithStyle(n).done(function(n){n&&(t._copyText=n,Common.ClipboardHelper.fireCopyEvent(t._contextMenuListener))})},n.prototype.showContextMenu=function(n,i,r){var u=this,f,o,e;this.dismiss();this._selectedItem=n;f=this._selectedItem!=null;f&&(o=this._selectedItem.node.type,e=this._selectedItem.tag);this._isTextNode=o===5;var h=o===3,c=o===4,v=e==="script",y=e==="style",p=e==="body"||f&&this._selectedItem.node.isParentTagName("body"),b=Common.ToolWindowHelpers.hasSelectedText();this._parentOfSelected=f?this._selectedItem.parentItem:null;var w=this._parentOfSelected!=null,s=w&&this._domExplorer.domTreeDataSource&&this._domExplorer.domTreeDataSource.isUnderEditableItem(this._selectedItem),l=this._domExplorer.capabilities.canPasteElements,a=this._domExplorer.capabilities;this._canAddAttribute=a.canEditAttributes&&f&&s&&!this._isTextNode&&!h&&!c&&!v&&!y;this._canDelete=a.canDeleteNodes&&this._domExplorer.canDeleteItem(this._selectedItem)&&f;this._canEditAsHtml=this._canDelete;this._canCut=this._canDelete;this._canCopy=Common.ToolWindowHelpers.hasSelectedText()||f;this._canCopyWithStyles=this._domExplorer.capabilities.canCopyElementsWithStyle&&f&&!this._isTextNode&&!h&&p;this._canPaste=l&&f&&s&&this._domExplorer.canPasteAsChild(this._selectedItem);this._canPasteBefore=l&&f&&s&&(this._isTextNode||this._domExplorer.isEditableElement(e))&&!c;this._contextMenu||(this._menuItems[0].disabled=function(){return!u._canAddAttribute},this._menuItems[1].disabled=function(){return!u._canDelete},this._menuItems[3].disabled=function(){return!u._canEditAsHtml},this._menuItems[4].disabled=function(){return!u._canCut},this._menuItems[5].disabled=function(){return!u._canCopy},this._menuItems[6].disabled=function(){return!u._canPaste},this._menuItems[7].disabled=function(){return!u._canPasteBefore},this._menuItems[8].disabled=function(){return!u._canCopyWithStyles},this._contextMenu=t.ContextMenu.create(this._menuItems,this._menuId,null,null,function(n,t){var i=u._selectedItem&&u._domExplorer.selectedItem&&u._selectedItem.uid===u._domExplorer.selectedItem.uid;if(i)u.onMenuItemClicked(n,t.id,u._domExplorer.selectedItem)}),this._dismissHandler=function(){u.dismiss()});f&&(this._domExplorer.domTree.scrollToItem(this._selectedItem),this._contextMenu.attach(this._selectedItem.getElement().get(0)));this._contextMenu.addEventListener("dismiss",this._dismissHandler);this._contextMenu.show(parseInt(i.toFixed(0)),parseInt(r.toFixed(0)));Common.ToolWindowHelpers.contextMenuUp(!0)},n}();n.DomTreeContextMenuController=f})(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";function u(){t.F12?n.analytics=new Common.F12AnalyticsProxy(Common.ToolName.DOM_EXPLORER):t.VS&&(n.analytics=new Common.VsAnalyticsProxy("DomExplorerTelemetry",Common.ToolName.DOM_EXPLORER))}var t=Microsoft.Plugin,i,r;n.analytics=new Common.DoNothingAnalyticsProxy;i=function(){function n(){}return n.LOAD_DOCUMENT="LoadDocument",n.LOAD_STYLES_TAB="LoadStylesTab",n.TREE_ITEM_EXPAND_END="TreeItemExpandEnd",n}();n.EventName=i;r=function(){function n(){}return n.ADD_ATTRIBUTE="AddAttribute",n.ADD_PROPERTY="AddProperty",n.ADD_RULE="AddRule",n.ATTACH_COLOR_PICKER="AttachColorPicker",n.CHANGE_VALUE_EDITOR_NUMERIC_VALUE="ChangeValueEditorNumericValue",n.COPY_ELEMENT_WITH_STYLES="CopyElementWithStyles",n.COPY_PROPERTY="CopyProperty",n.COPY_RULE="CopyRule",n.COPY_STYLES_VIEW_SELECTION_TO_CLIPBOARD="CopyStylesViewSelectionToClipboard",n.COPY_TEXT="CopyText",n.COPY_TO_CLIPBOARD="CopyToClipboard",n.CUT_ELEMENT="CutElement",n.CUT_TEXT="CutText",n.DELETE_ELEMENT="DeleteElement",n.DELETE_ITEM="DeleteItem",n.EDIT_AS_HTML="EditAsHtml",n.EDIT_PROPERTY_NAME="EditPropertyName",n.EDIT_PROPERTY_VALUE="EditPropertyValue",n.EDIT_RULE_SELECTOR="EditRuleSelector",n.EDIT_SUBPROPERTY_VALUE="EditSubpropertyValue",n.EXIT_VALUE_EDIT_CANCELLED="ExitValueEditCancelled",n.EXIT_VALUE_EDIT_COMMITTED="ExitValueEditCommitted",n.EXIT_VALUE_EDIT_DISMISSED="ExitValueEditDismissed",n.EXPAND_TO_REMOTE_SELECTED_ELEMENT="ExpandToRemoteSelectedElement",n.FIND="Find",n.FIND_NEXT="FindNext",n.FIND_PREV="FindPrev",n.HIDE_COLOR_PICKER="HideColorPicker",n.MOVE_SELECTION_FIRST="MoveSelectionFirst",n.MOVE_SELECTION_IN="MoveSelectionIn",n.MOVE_SELECTION_LAST="MoveSelectionLast",n.MOVE_SELECTION_NEXT="MoveSelectionNext",n.MOVE_SELECTION_OUT="MoveSelectionOut",n.MOVE_SELECTION_PREV="MoveSelectionPrev",n.PASTE_AS_CHILD="PasteAsChild",n.PASTE_BEFORE="PasteBefore",n.PASTE_TEXT="PasteText",n.REDO="Redo",n.REFRESH="Refresh",n.REFRESH_STYLES="RefreshStyles",n.REVERT_ITEM="RevertItem",n.SELECT_INHERITED_FROM_TARGET="SelectInheritedFromTarget",n.SELECTED_ITEM_CHANGED="SelectedItemChanged",n.SHOW_CHANGES_TAB="ShowChangesTab",n.SHOW_COLOR_PICKER="ShowColorPicker",n.SHOW_COMPUTED_TAB="ShowComputedTab",n.SHOW_EVENTS_TAB="ShowEventsTab",n.SHOW_LAYOUT_TAB="ShowLayoutTab",n.SHOW_STYLES_TAB="ShowStylesTab",n.START_SELECT_ELEMENT="StartSelectElement",n.START_SHOW_LAYOUT="StartShowLayout",n.STOP_SELECT_ELEMENT="StopSelectElement",n.STOP_SHOW_LAYOUT="StopShowLayout",n.TOGGLE_GROUP="ToggleGroup",n.TOGGLE_PROPERTY_CHECKBOX="TogglePropertyCheckbox",n.UNDO="Undo",n.VIEW_SOURCE="ViewSource",n}();n.CommandName=r;n.initializeAnalytics=u})(t=n.Telemetry||(n.Telemetry={}))})(t=n.DomExplorer||(n.DomExplorer={}))})(F12||(F12={})),function(n){var t=function(){function n(){}return n.domExplorerButtonPanel='<div class="buttons">            <div data-name="selectElementByClick" data-control="Common.Controls.ToggleButton" data-control-templateid="Common.iconButton" data-binding="isEnabled:domExplorerIsReady,                                isChecked:selectElementIsEnabled; mode=twoway,                                isVisible:selectElementIsVisible" data-options="className:selectElementButton,                                tooltip:SelectElementButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="showLayoutButton" data-control="Common.Controls.ToggleButton" data-control-templateid="Common.iconButton" data-binding="isEnabled:domExplorerIsReady,                                isChecked:showLayoutIsEnabled; mode=twoway,                                isVisible:showLayoutIsVisible" data-options="className:showLayoutButton,                                tooltip:ShowLayoutButtonTooltipWithShortcut; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="colorPickerButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton" data-binding="isEnabled:domExplorerIsReady" data-options="className:colorPickerButton,                                tooltip:DomColorPickerButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="refreshButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton" data-binding="isEnabled:domExplorerIsReady,                                isVisible:currentDocMode; converter=F12.DomExplorer.Converters.ToRefreshButtonEnabled" data-options="className:refreshButton,                                tooltip:RefreshDomExplorerButtonTooltipWithShortcut; converter=Common.CommonConverters.ResourceConverter"><\/div>        <\/div>',n.colorPickerHost='<div>            <div data-name="colorPicker" data-control="Common.Controls.ColorPickerControl" data-control-templateid="Common.defaultColorPickerTemplate" data-binding="color:color; mode=twoway,                                cancellationColor: cancellationColor; mode=twoway,                                isEyedropperActive: isEyedropperActive; mode=twoway,                                paletteColors: palette.colors,                                isPaletteLoading: palette.isLoading,                                isVisible: isVisible; mode=twoway,                                isSlidersShown: isSlidersShown; mode=twoway,                                targetButtonElement: dockElement; converter=Common.CommonConverters.NullPermittedConverter"><\/div>        <\/div>',n.debugUidTemplate='<span class="BPT-HTML-Debug-Uid" data-controlbinding="textContent:model"><\/span>',n.domTreeEmptyItemTemplate='<div class="domTreeItemDataTemplate">            <div class="domTreeItemDataTemplateNameCell">                <div data-name="expander"><\/div>                <div data-name="domTreeItemDataTemplateName" class="domTreeItemDataTemplateName">                <\/div>            <\/div>        <\/div>',n.domTreeElementTemplate='<div class="domTreeItemDataTemplate">            <div class="domTreeItemDataTemplateNameCell">                <div data-name="expander"><\/div>                <div data-name="domTreeItemDataTemplateName" class="domTreeItemDataTemplateName">                    <div class="BPT-HTML">                        <div class="element" data-binding="attr-data-id:uid">                            <!-- The strange "empty" comments below allow us to format the tags without introducing whitespace into the template -->                            <div class="BPT-HTML-HtmlElement BPT-HTML-OpeningTag" data-binding="class-BPT-HTML-ClosingTag:isClosingTag, class-BPT-HTML-SelfClosingTag:isSelfClosing"><!--                             --><div class="BPT-HTML-NewTag" data-binding="textContent:tag"><\/div><!--                             --><div data-control="DomTree.NodeAttributeItemsControl" data-controlbinding="event-dblclick:onAttributeItemsDblClickHandler" data-binding="items:attributes"><\/div><!--                         --><\/div><!--                         --><div data-name="collapsedNodeClosingTag" data-controlbinding="className:collapsedNodeClosingTagClass"><!--                             --><div class="BPT-HTML-Punctuation" data-binding="class-BPT-HTML-TextPreview:textPreview,                                                    class-BPT-HTML-No-TextContentPreview:isExpanded,                                                    class-BPT-HTML-No-TextContentPreview:hasChildren; converter=Common.CommonConverters.InvertBool" data-controlbinding="class-BPT-HTML-Mutation:textContentPreviewGleaming.isGleaming,                                                           textContent:textContentPreview,                                                           event-dblclick:onTextDblClickHandler"><\/div><!--                             --><div class="BPT-HTML-NewTag BPT-HTML-ClosingTag" data-binding="textContent:tag"><\/div><\/div>                        <\/div>                    <\/div>                <\/div>            <\/div>        <\/div>',n.domTreeTextElementTemplate='<div class="domTreeItemDataTemplate">            <div class="domTreeItemDataTemplateNameCell">                <div data-name="expander"><\/div>                <div data-name="domTreeItemDataTemplateName" class="domTreeItemDataTemplateName">                    <div class="BPT-HTML">                        <div class="element" data-binding="attr-data-id:uid">                            <span class="BPT-HTML-Text" data-binding="textContent:textNodeText" data-controlbinding="event-dblclick:onTextDblClickHandler">                            <\/span>                        <\/div>                    <\/div>                <\/div>            <\/div>        <\/div>',n.domTreeCDataTemplate='<div class="domTreeItemDataTemplate">            <div class="domTreeItemDataTemplateNameCell">                <div data-name="expander"><\/div>                <div data-name="domTreeItemDataTemplateName" class="domTreeItemDataTemplateName">                    <div class="BPT-HTML">                        <div class="element" data-binding="attr-data-id:uid">                            <span class="BPT-HTML-CData" data-binding="textContent:cDataText">                            <\/span>                        <\/div>                    <\/div>                <\/div>            <\/div>        <\/div>',n.domTreeCommentTemplate='<div class="domTreeItemDataTemplate">            <div class="domTreeItemDataTemplateNameCell">                <div data-name="expander"><\/div>                <div data-name="domTreeItemDataTemplateName" class="domTreeItemDataTemplateName">                    <div class="BPT-HTML">                        <div class="element" data-binding="attr-data-id:uid">                            <span class="BPT-HTML-Comment" data-binding="textContent:commentText"><\/span>                        <\/div>                    <\/div>                <\/div>            <\/div>        <\/div>',n.domTreeDocTypeTemplate='<div class="domTreeItemDataTemplate">            <div class="domTreeItemDataTemplateNameCell">                <div data-name="expander"><\/div>                <div data-name="domTreeItemDataTemplateName" class="domTreeItemDataTemplateName">                    <div class="BPT-HTML">                        <div class="element&gt;" data-binding="attr-data-id:uid">                            <!-- The strange "empty" comments below allow us to format the tags without introducing whitespace into the template -->                            <span class="BPT-HTML-DocType"><span>DOCTYPE<\/span>                                <span data-binding="textContent:docTypeText"><\/span><\/span>                        <\/div>                    <\/div>                <\/div>            <\/div>        <\/div>',n.domTreeItemAttributeTemplate='<span class="BPT-HTML-Attribute-Section">            <!-- The strange "empty" comments below allow us to format the tags without introducing whitespace into the template -->            <span class="BPT-HTML-Attribute" data-binding="textContent:name"><\/span><!--         --><span class="BPT-HTML-Value" data-binding="textContent:value" data-controlbinding="class-BPT-HTML-Mutation:valueGleaming.isGleaming"><\/span><\/span>',n}();n.DomExplorer=t}(ControlTemplates||(ControlTemplates={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(){}return n.initialize=function(){n.ToRefreshButtonEnabled=n.isDocModeLessThanMinimum(n.ADVANCED_FEATURES_DOCMODE_MINIMUM)},n.isDocModeLessThanMinimum=function(n){return{convertTo:function(t){return t?t<n:!1},convertFrom:null}},n.ADVANCED_FEATURES_DOCMODE_MINIMUM=9,n}();n.Converters=t;t.initialize()})(t=n.DomExplorer||(n.DomExplorer={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t;(function(n){var t=function(n){function t(){n.call(this);this.showLayoutIsEnabledChanged=new Common.EventSource;this.selectElementIsEnabledChanged=new Common.EventSource}return __extends(t,n),t.initialize=function(){Common.ObservableHelpers.defineProperty(t,"domExplorerIsReady",!1);Common.ObservableHelpers.defineProperty(t,"showLayoutIsVisible",!0);Common.ObservableHelpers.defineProperty(t,"showLayoutIsEnabled",!1,function(n,t,i){return n.showLayoutIsEnabledChanged.invoke(i)});Common.ObservableHelpers.defineProperty(t,"selectElementIsVisible",!0);Common.ObservableHelpers.defineProperty(t,"selectElementIsEnabled",!1,function(n,t,i){return n.selectElementIsEnabledChanged.invoke(i)});Common.ObservableHelpers.defineProperty(t,"currentDocMode",undefined)},t}(Common.Observable);n.DomExplorerModel=t;t.initialize()})(t=n.DomExplorer||(n.DomExplorer={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i;(function(n){var i=function(){function n(n){this._channel=n.channel;this._engine=n.engine}return n.prototype.abortPaletteCollection=function(){return this.call("abortPaletteCollection",[])},n.prototype.addDocumentModifiedListener=function(n,t){return this.call("addDocumentModifiedListener",[n,t])},n.prototype.addElement=function(n,t,i){return this.call("addElement",[n,t,i])},n.prototype.allowProcessToTakeForeground=function(){return this.call("allowProcessToTakeForeground",[])},n.prototype.attachMediaQueryEvents=function(n){return this.call("attachMediaQueryEvents",[n])},n.prototype.cancelSelectElementByClick=function(){return this.call("cancelSelectElementByClick",[])},n.prototype.clearCurrentEventProxy=function(){return this.call("clearCurrentEventProxy",[])},n.prototype.clearStyleCache=function(){return this.call("clearStyleCache",[])},n.prototype.collectEvents=function(n,t,i,r){return this.call("collectEvents",[n,t,i,r])},n.prototype.copyElementWithStyle=function(n){return this.call("copyElementWithStyle",[n])},n.prototype.deleteElement=function(n){return this.call("deleteElement",[n])},n.prototype.disableEditChaining=function(){return this.call("disableEditChaining",[])},n.prototype.editAttribute=function(n,t,i){return this.call("editAttribute",[n,t,i])},n.prototype.editStylePropertyAdd=function(n,t,i,r,u){return this.call("editStylePropertyAdd",[n,t,i,r,u])},n.prototype.editStylePropertyEnable=function(n,t){return this.call("editStylePropertyEnable",[n,t])},n.prototype.editStylePropertyName=function(n,t){return this.call("editStylePropertyName",[n,t])},n.prototype.editStylePropertyValue=function(n,t,i){return this.call("editStylePropertyValue",[n,t,i])},n.prototype.editStyleRuleAdd=function(n,t,i,r,u){return this.call("editStyleRuleAdd",[n,t,i,r,u])},n.prototype.editStyleRuleRemove=function(n){return this.call("editStyleRuleRemove",[n])},n.prototype.editStyleRuleSelector=function(n,t){return this.call("editStyleRuleSelector",[n,t])},n.prototype.editText=function(n,t){return this.call("editText",[n,t])},n.prototype.enableEditChaining=function(){return this.call("enableEditChaining",[])},n.prototype.endSingleEdit=function(){return this.call("endSingleEdit",[])},n.prototype.findTerm=function(n,t,i,r){return this.call("findTerm",[n,t,i,r])},n.prototype.getBulkChildNodesDetails=function(n,t){return this.call("getBulkChildNodesDetails",[n,t])},n.prototype.getChangedStyles=function(n){return this.call("getChangedStyles",[n])},n.prototype.getComputedBox=function(n){return this.call("getComputedBox",[n])},n.prototype.getComputedStyles=function(n){return this.call("getComputedStyles",[n])},n.prototype.getCssClassesUsedInCurrentDocument=function(n){return this.call("getCssClassesUsedInCurrentDocument",[n])},n.prototype.getLoadDocumentData=function(){return this.call("getLoadDocumentData",[])},n.prototype.getHTMLString=function(n,t,i){return this.call("getHTMLString",[n,t,i])},n.prototype.getHWND=function(){return this.call("getHWND",[])},n.prototype.getParentChainForElement=function(n){return this.call("getParentChainForElement",[n])},n.prototype.getParentChainForSelectedElement=function(){return this.call("getParentChainForSelectedElement",[])},n.prototype.getDomNodeDetails=function(n){return this.call("getDomNodeDetails",[n])},n.prototype.getDomNodesDetails=function(n){return this.call("getDomNodesDetails",[n])},n.prototype.getParentChainForStyle=function(n){return this.call("getParentChainForStyle",[n])},n.prototype.getPseudoStyling=function(n,t){return this.call("getPseudoStyling",[n,t])},n.prototype.getRootElement=function(){return this.call("getRootElement",[])},n.prototype.getSelectedElement=function(){return this.call("getSelectedElement",[])},n.prototype.getStyles=function(n){return this.call("getStyles",[n])},n.prototype.getTargetEngineKind=function(){return 1},n.prototype.getWinningProperty=function(n){return this.call("getWinningProperty",[n])},n.prototype.hideHoverItem=function(){return this.call("hideHoverItem",[])},n.prototype.hoverItem=function(n){return this.call("hoverItem",[n])},n.prototype.initializeHost=function(n){return this.call("initializeHost",[n])},n.prototype.inspectElementById=function(n){return this.call("inspectElementById",[n])},n.prototype.performNextEdit=function(){return this.call("performNextEdit",[])},n.prototype.querySelector=function(n,t){return this.call("querySelector",[n,t])},n.prototype.removeAttribute=function(n,t){return this.call("removeAttribute",[n,t])},n.prototype.removeStyleProperty=function(n){return this.call("removeStyleProperty",[n])},n.prototype.reparentNode=function(n,t,i){return this.call("reparentNode",[n,t,i])},n.prototype.replaceElement=function(n,t){return this.call("replaceElement",[n,t])},n.prototype.revertProperty=function(n){return this.call("revertProperty",[n])},n.prototype.revertRule=function(n){return this.call("revertRule",[n])},n.prototype.runPaletteCollection=function(n){return this.call("runPaletteCollection",[n])},n.prototype.selectElement=function(){return t.Promise.as(null)},n.prototype.selectElementByClick=function(n){return this.call("selectElementByClick",[n])},n.prototype.setKeyBindCallbacks=function(n,t,i,r){return this.call("setKeyBindCallbacks",[n,t,i,r])},n.prototype.setPseudoStyling=function(n,t,i){return this.call("setPseudoStyling",[n,t,i])},n.prototype.setTestEditCallbacks=function(n,t){return this.call("setTestEditCallbacks",[n,t])},n.prototype.startSingleEdit=function(){return this.call("startSingleEdit",[])},n.prototype.storeElementForConsole=function(n){return this.call("storeElementForConsole",[n])},n.prototype.takeForeground=function(){return this.call("takeForeground",[])},n.prototype.undoLastEdit=function(){return this.call("undoLastEdit",[])},n.prototype.call=function(n,i){var r=this;return new t.Promise(function(t){r._channel.call(n,i,t)})},n}();n.RemoteDom=i})(i=n.DomExplorer||(n.DomExplorer={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(n,r,u){this.selectorText=n;this.changeState=r;this.isSelectorChanged=u;i.AriaChangeStateRemoveString||(i.AriaChangeStateRemoveString=typeof Plugin!="undefined"&&typeof t.Resources!="undefined"?Common.ToolWindowHelpers.loadString("AriaChangeStateRemove"):"");i.AriaChangeStateAddString||(i.AriaChangeStateAddString=typeof Plugin!="undefined"&&typeof t.Resources!="undefined"?Common.ToolWindowHelpers.loadString("AriaChangeStateAdd"):"")}return Object.defineProperty(i.prototype,"ariaChangeStateString",{get:function(){switch(this.changeState){case n.StyleChangeNotifier.CHANGE_BAR_REMOVE:return i.AriaChangeStateRemoveString;case n.StyleChangeNotifier.CHANGE_BAR_ADD:return i.AriaChangeStateAddString}return""},enumerable:!0,configurable:!0}),i}();n.ChangedSelector=i})(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(n,r,u,f,e,o,s){e===void 0&&(e=!1);o===void 0&&(o=!1);s===void 0&&(s=!1);this.name=n;this.value=r;this.isImportant=u;this.changeState=f;this.isNameChanged=e;this.isValueChanged=o;this.isPriorityChanged=s;i.AriaChangeStateRemoveString||(i.AriaChangeStateRemoveString=typeof Plugin!="undefined"&&typeof t.Resources!="undefined"?Common.ToolWindowHelpers.loadString("AriaChangeStateRemove"):"");i.AriaChangeStateAddString||(i.AriaChangeStateAddString=typeof Plugin!="undefined"&&typeof t.Resources!="undefined"?Common.ToolWindowHelpers.loadString("AriaChangeStateAdd"):"")}return Object.defineProperty(i.prototype,"priority",{get:function(){return this.isImportant?" !important":""},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"ariaChangeStateString",{get:function(){switch(this.changeState){case n.StyleChangeNotifier.CHANGE_BAR_REMOVE:return i.AriaChangeStateRemoveString;case n.StyleChangeNotifier.CHANGE_BAR_ADD:return i.AriaChangeStateAddString}return""},enumerable:!0,configurable:!0}),i}();n.ChangedProperty=i})(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function t(t,i,r){var f=this,e,o,u;this.source=t;this._rule=i;this._url=r;this._selectors=[];this._properties=[];e=this._rule.changeState===n.StyleChangeNotifier.CHANGE_BAR_UPDATE;e?(this._selectors.push(new n.ChangedSelector(this._rule.originalSelectorText,n.StyleChangeNotifier.CHANGE_BAR_REMOVE,e)),this._selectors.push(new n.ChangedSelector(this._rule.selectorText,n.StyleChangeNotifier.CHANGE_BAR_ADD,e))):(o=this._rule.isDeleted?this._rule.originalSelectorText:this._rule.selectorText,this._selectors.push(new n.ChangedSelector(o,this._rule.changeState,e)));this._displayedColumn=this._rule.fileColumn;this._displayedLine=this._rule.fileLine;u=[];this._rule.properties.forEach(function(t){var o;if(!(t.wasCreatedInSession&&!t.isEnabled&&t.status===1))if(t.isDeleted||!t.isEnabled&&t.status===1)f._properties.push(new n.ChangedProperty(t.originalName,t.originalValue,t.originalIsImportant,n.StyleChangeNotifier.CHANGE_BAR_REMOVE,i,r,e));else if(t.changeState===n.StyleChangeNotifier.CHANGE_BAR_UPDATE)if(t.isShorthand&&t.isEnabledIndeterminate)f._properties.push(new n.ChangedProperty(t.originalName,t.originalValue,t.originalIsImportant,n.StyleChangeNotifier.CHANGE_BAR_REMOVE)),t.properties.forEach(function(t){t.isEnabled&&u.push(new n.ChangedProperty(t.name,t.value,t.isImportant,n.StyleChangeNotifier.CHANGE_BAR_ADD))});else{var i=t.name!==t.originalName,r=t.value!==t.originalValue,e=t.isImportant!==t.originalIsImportant;f._properties.push(new n.ChangedProperty(t.originalName,t.originalValue,t.originalIsImportant,n.StyleChangeNotifier.CHANGE_BAR_REMOVE,i,r,e));u.push(new n.ChangedProperty(t.name,t.value,t.isImportant,n.StyleChangeNotifier.CHANGE_BAR_ADD,i,r,e))}else o=new n.ChangedProperty(t.name,t.value,t.isImportant,t.changeState),t.changeState===n.StyleChangeNotifier.CHANGE_BAR_NONE?(u.length&&(f._properties=f._properties.concat(u),u=[]),f._properties.push(o)):t.changeState===n.StyleChangeNotifier.CHANGE_BAR_ADD&&t.isShorthand&&t.isEnabledIndeterminate?t.properties.forEach(function(t){t.isEnabled&&u.push(new n.ChangedProperty(t.name,t.value,t.isImportant,n.StyleChangeNotifier.CHANGE_BAR_ADD))}):u.push(o)});u.length&&(this._properties=this._properties.concat(u))}return Object.defineProperty(t.prototype,"uid",{get:function(){return this._rule.uid},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"url",{get:function(){return this._url},set:function(n){this._url=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInline",{get:function(){return this._rule.isInlined},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDeleted",{get:function(){return this._rule.isDeleted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"line",{get:function(){return this._displayedLine},set:function(n){this._displayedLine=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"column",{get:function(){return this._displayedColumn},set:function(n){this._displayedColumn=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasFileLink",{get:function(){return this._rule.isInlined||!this._rule.wasCreatedInSession&&this._rule.fileLine>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fileLink",{get:function(){return this._rule.isInlined?this._rule.target.description:Common.ToolWindowHelpers.createFileLinkText(null,this._rule.fileLine,this._rule.fileColumn)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectors",{get:function(){return this._selectors},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return this._properties},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._rule.parent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tooltip",{get:function(){return this.source.displaySourceTooltip},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"footerState",{get:function(){var t=this._rule.changeState;return t===n.StyleChangeNotifier.CHANGE_BAR_ADD||t===n.StyleChangeNotifier.CHANGE_BAR_REMOVE?t:n.StyleChangeNotifier.CHANGE_BAR_NONE},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textForCopy",{get:function(){return this._rule.formatForCopy},enumerable:!0,configurable:!0}),t.prototype.revert=function(){return this._rule.revert()},t.prototype.matches=function(n){return this._rule===n},t.compare=function(n,t){if(n._rule.isInlined){if(t._rule.isInlined){var i=n._rule.target.description,r=t._rule.target.description;return i===r?0:i>r?1:-1}return-1}return t._rule.isInlined?1:n.line===t.line?n.column-t.column:n.line-t.line},t}();n.ChangedRule=t})(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function t(n,i){this.source=n;this._model=i;this.children=[];var r=t.ID_MAP[this.source];r||(r="changeId"+t.NEXT_UNIQUE_ID++,t.ID_MAP[this.source]=r);this.uniqueId=r;this._tooltip=n}return Object.defineProperty(t.prototype,"displaySource",{get:function(){return Common.ToolWindowHelpers.getTruncatedFileName(this.source,50)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"displaySourceTooltip",{get:function(){return this._tooltip},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"expanded",{get:function(){return!this._model.isCollapsed(this.source)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textForCopy",{get:function(){var t=!0,n="";return this.children.forEach(function(i){t||(n+="\r\n");n+="/* ";i.isDeleted&&(n+=Common.ToolWindowHelpers.loadString("RemoveStyleMenuText")+" ");n+=i.hasFileLink?i.isInline?i.url+" "+i.fileLink:Common.ToolWindowHelpers.createFileLinkText(i.url,i.line,i.column,Number.MAX_VALUE):i.url;n+=" */\r\n";i.isDeleted||(n+=i.textForCopy);t=!1}),n},enumerable:!0,configurable:!0}),t.prototype.add=function(n){this.children.push(n)},t.prototype.sort=function(){this.children.sort(n.ChangedRule.compare)},t.prototype.updateTooltip=function(n,t){for(var i=0;i<this.children.length;i++)if(this.children[i].matches(n)){this._tooltip=t;break}},t.NEXT_UNIQUE_ID=0,t.ID_MAP={},t}();n.ChangedSource=t})(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(n,t,i){this._remoteDom=n;this._bridge=t;this.capabilities=i;this._ruleMap={};this._propertyMap={};this._inheritedTargets={};this._inlinedStyleName=Common.ToolWindowHelpers.loadString("InlineStyleSelector");this._listeners=[];this.rules=[]}return i.create=function(n,t,r,u,f){var e=new i(n,r,u),o,s;t?(o=n.getStyles,s=[t]):(o=n.getChangedStyles,s=[]);o.apply(n,s).done(function(n){if(n){for(var t=0;t<n.length;t++)e.processRawStyle(n[t],t);f(e)}});r.addEventListener("onSourceMapStateChanged",e.onSourceMapStateChanged.bind(e))},i.createNewId=function(){return i.NewUidTag+i.NextUid++},i.prototype.addUpdateListener=function(n){this._listeners.indexOf(n)<0&&this._listeners.push(n)},i.prototype.removeUpdateListener=function(n){var t=this._listeners.indexOf(n);t>=0&&this._listeners.splice(t,1)},i.prototype.updateWinningRule=function(n){var t=this;this._remoteDom.getWinningProperty(n).done(function(i){t.rules.forEach(function(t){t.updateWinningProperty(n,i)})})},i.prototype.togglePropertyEnable=function(n,t,i){this._remoteDom.editStylePropertyEnable(n.uid,t).done(i)},i.prototype.editRuleSelector=function(n,t,i){this._remoteDom.editStyleRuleSelector(n,t).done(i)},i.prototype.editRuleDelete=function(n,t){this._remoteDom.editStyleRuleRemove(n).done(t)},i.prototype.editRuleRevert=function(n,t){this._remoteDom.revertRule(n).done(t)},i.prototype.addRule=function(n,t,i,r,u,f){this._remoteDom.editStyleRuleAdd(n,t,i,r,u).done(f)},i.prototype.addProperty=function(n,t,i,r,u,f){this._remoteDom.editStylePropertyAdd(n,t,i,r,u).done(f)},i.prototype.editPropertyName=function(n,t,i){this._remoteDom.editStylePropertyName(n,t).done(i)},i.prototype.editPropertyValue=function(n,t,i,r){this._remoteDom.editStylePropertyValue(n,t,i).done(r)},i.prototype.editPropertyRevert=function(n,t){this._remoteDom.revertProperty(n).done(t)},i.prototype.editPropertyDelete=function(n,t){this._remoteDom.removeStyleProperty(n).done(t)},i.prototype.applyChanges=function(n){var i=this,t;n.forEach(function(n){var r,f,u;switch(n.event){case"updateProperty":r=i.getPropertyById(n.uid);r&&(r.updateFromRemote(n.obj),n.isDynamic||r.select());break;case"updatePropertyUid":r=i.getPropertyById(n.uid);r&&(r.uid=n.obj.uid);break;case"removeProperty":r=i.getPropertyById(n.uid);r&&r.remove(!n.isDynamic);break;case"addProperty":t=i.getRuleById(n.uid);t&&(r=t.addProperty(n.obj,!0,i.getPropertyById(n.beforeUid)),r.recalculateWinning(),n.isDynamic||r.select());break;case"updateRule":t=i.getRuleById(n.uid);t&&(t.updateFromRemote(n.obj),n.isDynamic||t.select());break;case"revertRule":t=i.getRuleById(n.uid);t&&(n.obj?(t.removeNewProperties(),t.updateFromRemote(n.obj)):t.remove());break;case"removeRule":t=i.getRuleById(n.uid);t&&t.remove();break;case"addRule":if(f=i.rules.length,n.beforeUid)for(u=0;u<i.rules.length;u++)if(i.rules[u].uid===n.beforeUid){f=u;break}t=i.processRawStyle(n.obj,f,!0);n.isDynamic||t.select()}})},i.prototype.getRuleById=function(n){return this._ruleMap[n]},i.prototype.getPropertyById=function(n){return this._propertyMap[n]},i.prototype.remapPropertyId=function(n,t,i){t&&delete this._propertyMap[t];i&&(this._propertyMap[i]=n)},i.prototype.remapRuleId=function(n,t,i){delete this._ruleMap[t];this._ruleMap[i]=n},i.prototype.removeProperty=function(n){delete this._propertyMap[n.uid]},i.prototype.createNewRule=function(t){var r=new n.StyleRule(this,this._listeners,i.createNewId(),!0,!1,t);return this._ruleMap[r.uid]=r,this.rules.splice(1,0,r),r},i.prototype.removeRule=function(n){var i,t;if(n.isInlined)return!1;for(delete this._ruleMap[n.uid],i=this.rules,t=0;t<i.length;t++)if(i[t]===n)return i.splice(t,1),!0;return!1},i.prototype.setInlineProperty=function(n,t,i){for(var u,r=0;r<this.rules.length;r++)if(u=this.rules[r],u.isInlined&&!u.isInherited)return u.setExistingOrAddNewProperty(n,t,i),!0;return!1},i.isNew=function(n){return n.substr(0,i.NewUidTagLength)===i.NewUidTag},i.prototype.getTargetEngineKind=function(){return this._remoteDom.getTargetEngineKind()},i.prototype.onSourceMapStateChanged=function(n){var u=n.customData,t,r,i;if(this.rules)for(t=0,r=this.rules.length;t<r;t++)i=this.rules[t],i.fileUrl===u&&this.generateRuleLink(i)},i.prototype.processRawStyle=function(t,i,r){var e,u,f,o;if(r===void 0&&(r=!1),e=t.uid,u=new n.StyleRule(this,this._listeners,e,t.wasCreatedInSession,t.isDeleted,t.isInlined?this._inlinedStyleName:t.selector),t.declarationLocation?(u.fileUrl=t.declarationLocation.uri,u.fileLine=t.declarationLocation.line+1,u.fileColumn=t.declarationLocation.column+1):u.fileUrl=t.styleHref,this.generateRuleLink(u),u.styleHref=t.styleHref,u.target=t.target,u.isInherited=t.isInherited,u.isInlined=t.isInlined,u.parent=t.parent,u.isFirstRuleInTargetGroup=t.isInherited&&t.target&&!this._inheritedTargets[t.target.uid],u.setOriginal(t.originalSelector),this.rules.splice(i,0,u),this._ruleMap[e]=u,t.properties)for(f=0;f<t.properties.length;f++)o=u.addProperty(t.properties[f]);return u.isFirstRuleInTargetGroup&&u.target&&(this._inheritedTargets[u.target.uid]=u.target),r&&(u.notifyRuleChange(3,u),u.recalculateWinning()),u},i.prototype.generateRuleLink=function(n){n.fileUrl&&this._bridge.getTranslatedLocation(n.fileUrl,n.fileLine,n.fileColumn,!0).done(function(i){n.fileLinkText=Common.ToolWindowHelpers.createFileLinkText(i.documentPath,i.oneBasedLine);n.notifyRuleChange(8,n,i);t.Host.getDocumentLocation(i.documentPath).done(function(t){n.tooltip=Common.ToolWindowHelpers.loadString("StyleRuleFileTooltip",[Common.EncodingUtilities.escapeHtml(t),i.oneBasedLine,i.oneBasedColumn]);n.notifyRuleChange(7,n,n.tooltip)})})},i.VALID_STATUS="Valid",i.UNRECOGNIZED_STATUS="UnrecognizedProperty",i.INVALID_VALUE_STATUS="InvalidValue",i.NewUidTag="new-",i.NewUidTagLength=i.NewUidTag.length,i.NextUid=0,i}();n.ElementStyleModel=i})(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";(function(n){n[n.Unknown=0]="Unknown";n[n.Valid=1]="Valid";n[n.InvalidName=2]="InvalidName";n[n.InvalidValue=3]="InvalidValue"})(n.StylePropertyStatus||(n.StylePropertyStatus={}));var t=n.StylePropertyStatus})(Dom||(Dom={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,i=function(i){function r(u,f,e,o,s,h,c,l,a,v,y,p){i.call(this,f);this._model=u;this._listeners=f;this.wasCreatedInSession=e;this.original=s;this.originalLonghand=h;this._isApplied=c;this._isWinning=l;this.isDeleted=a;this._uid=y;this.rule=p;this._changeState=n.StyleChangeNotifier.CHANGE_BAR_NONE;this._extendedChangeState=n.StyleChangeNotifier.CHANGE_BAR_NONE;this.properties=[];this._status=r.convertStatusStringToStatus(v);this.owner=this;this._name=o.name;this._value=o.value;this._isImportant=o.isImportant;this._isEnabled=o.isEnabled;r.AriaOverriddenString||(r.AriaOverriddenString=typeof Plugin!="undefined"&&typeof t.Resources!="undefined"?Common.ToolWindowHelpers.loadString("AriaOverridden"):"");r.AriaInvalidString||(r.AriaInvalidString=typeof Plugin!="undefined"&&typeof t.Resources!="undefined"?Common.ToolWindowHelpers.loadString("SingleError",[""])+":":"");r.AriaChangeStateRemoveString||(r.AriaChangeStateRemoveString=typeof Plugin!="undefined"&&typeof t.Resources!="undefined"?Common.ToolWindowHelpers.loadString("AriaChangeStateRemove"):"");r.AriaChangeStateAddString||(r.AriaChangeStateAddString=typeof Plugin!="undefined"&&typeof t.Resources!="undefined"?Common.ToolWindowHelpers.loadString("AriaChangeStateAdd"):"");r.AriaChangeStateUpdateString||(r.AriaChangeStateUpdateString=typeof Plugin!="undefined"&&typeof t.Resources!="undefined"?Common.ToolWindowHelpers.loadString("AriaChangeStateUpdate"):"");this.updateChangeState()}return __extends(r,i),Object.defineProperty(r.prototype,"isApplied",{get:function(){return this._isApplied},set:function(n){n!==this._isApplied&&(this._isApplied=n,this.notifyPropertyChange(5,this,n))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(n){var r=this,t,i;n!==this._isEnabled&&(this._isEnabled=n,this.notifyPropertyChange(4,this,n),this.isSubProperty?(t=this.owner,t._isEnabled=t._isEnabled||this.isEnabledIndeterminate,i=this.isEnabledIndeterminate?undefined:this._isEnabled,this.notifyPropertyChange(4,t,i)):this.isShorthand&&this.properties.forEach(function(t){t._isEnabled=n;r.notifyPropertyChange(4,t,n)}))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isWinning",{get:function(){return this._isWinning},set:function(n){this._isWinning=n;this.notifyPropertyChange(3,this,n)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"name",{get:function(){return this._name},set:function(n){n!==this._name&&(this._name=n,this.notifyPropertyChange(1,this,n))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"originalName",{get:function(){return this.original?this.original.name:""},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"originalValue",{get:function(){return this.original?this.original.value:""},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isImportant",{get:function(){return this._isImportant},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"originalIsImportant",{get:function(){return this.original?this.original.isImportant:!1},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"uid",{get:function(){return this._uid},set:function(n){if(n!==this._uid){var i=this.owner.uid,t=this._uid;this._model.remapPropertyId(this,t,n);this.notifyPropertyChange(0,this,n);this._uid=n}},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"status",{get:function(){return this._status},set:function(n){n!==this._status&&(this._status=n,this.notifyPropertyChange(6,this,n))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isRule",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isProperty",{get:function(){return this.owner===this},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isSubProperty",{get:function(){return this.owner!==this},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isEditable",{get:function(){return this.isProperty},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"container",{get:function(){return this.owner===this?this.rule:this.owner},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isNew",{get:function(){return n.ElementStyleModel.isNew(this._uid)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isDisplayableColor",{get:function(){return this.isColor&&this._status===1&&!r.isNonDisplayableColorValue(this._value)||this.isSupPropertyDisplayableColor},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"colorForDisplay",{get:function(){var n,t;if(this.isDisplayableColor){if(this.isShorthand){for(n=0;n<this.properties.length;n++)if(t=this.properties[n],t.isDisplayableColor)return t.value}else return this._value;return""}},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"valueForDisplay",{get:function(){var n=this.valueWithPriority;return n.length?n:" "},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isEnabledIndeterminate",{get:function(){for(var r,n=this.isSubProperty?this.owner.properties:this.properties,t=0,i=0;i<n.length;i++)r=n[i],r.isEnabled&&t++;return!!t&&t!==n.length},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"enabledMixedState",{get:function(){return this.isEnabledIndeterminate?"mixed":""+this._isEnabled},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isShorthand",{get:function(){return this.properties.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isNameDisplayedAsInvalid",{get:function(){var n=this._model.getTargetEngineKind()===1?/^([^-]|-ms)/:/^([^-]|-webkit)/;return!this.isValidName&&n.test(this.name)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isValidName",{get:function(){return this._status===1||this._status===3},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isValidValue",{get:function(){return this._status===1||this._status===2},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isInvalid",{get:function(){return this._status!==1},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isStrikeThrough",{get:function(){return!this._isWinning&&this._status===1},enumerable:!0,configurable:!0}),Object.defineProperty(r.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!1;if(this.isShorthand)for(var n=0;n<this.properties.length;n++)if(!this.properties[n].isOriginal)return!1;return!0},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"formatForCopy",{get:function(){return this.name+": "+this.valueWithPriority+";"},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"ariaOverriddenString",{get:function(){return this.isStrikeThrough?r.AriaOverriddenString:""},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"ariaInvalidNameString",{get:function(){return this.isValidName?"":r.AriaInvalidString},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"ariaInvalidValueString",{get:function(){return this.isValidValue?"":r.AriaInvalidString},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"ariaChangeStateString",{get:function(){switch(this.changeState){case n.StyleChangeNotifier.CHANGE_BAR_REMOVE:return r.AriaChangeStateRemoveString;case n.StyleChangeNotifier.CHANGE_BAR_ADD:return r.AriaChangeStateAddString;case n.StyleChangeNotifier.CHANGE_BAR_UPDATE:return r.AriaChangeStateUpdateString}return""},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isColor",{get:function(){return this.name.indexOf("color")>-1},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"valueWithPriority",{get:function(){return this._value+(this._isImportant?" !important":"")},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"changeState",{get:function(){return this._changeState},set:function(n){this._changeState!==n&&(this._changeState=n,this.container.updateChangeState(),this.notifyPropertyChange(11,this))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"extendedChangeState",{get:function(){return this._extendedChangeState},set:function(n){this._extendedChangeState!==n&&(this._extendedChangeState=n,this.container.updateChangeState(),this.notifyPropertyChange(11,this))},enumerable:!0,configurable:!0}),r.isNonDisplayableColorValue=function(n){return n===""||n==="inherit"||n==="currentColor"||n==="flavor"||n==="invert"||n==="transparent"},r.prototype.addSubproperty=function(n,t){n.original=this.getLonghandOriginal(this.properties.length);n.updateChangeState();this.properties.push(n);n.owner=this;this._model.remapPropertyId(n,null,n.uid);t&&this.notifyPropertyChange(8,this,n)},r.prototype.clearSubproperties=function(){var n=this;this.properties.forEach(function(t){n._model.remapPropertyId(t,t.uid,null)});this.properties=[];this.notifyPropertyChange(7,this)},r.prototype.select=function(){this.notifyPropertyChange(9,this)},r.prototype.updateWinning=function(n,t){var i=!1,r=0;this.properties.forEach(function(u){u.uid===t?(u.isWinning=!0,i=!0):u.name===n&&(u.isWinning=!1,i=!0);u._isWinning&&r++});i?this.isWinning=r>0:this.uid===t?this.isWinning=!0:this.name!==n||this.isShorthand||(this.isWinning=!1)},r.prototype.recalculateWinning=function(){var n=this;this.isShorthand?this.properties.forEach(function(t){n._model.updateWinningRule(t.name)}):this._model.updateWinningRule(this.name)},r.prototype.toggleEnable=function(){var n=this;return new t.Promise(function(t){var i=!n._isEnabled;n._model.togglePropertyEnable(n,i,function(){n.isEnabled=i;n.recalculateWinning();n.updateChangeState();n.isShorthand&&n.properties.forEach(function(n){n.updateChangeState()});t()})})},r.prototype.commitName=function(n){var i=this;return new t.Promise(function(t,r){if(i._name!==n){var u=i._name;i._name=n;i.isNew?i.commitNewProperty().done(t,function(){i._name=u;r()}):i._model.editPropertyName(i._uid,i._name,function(n){i._name=u;n?(i.recalculateWinning(),i.updateFromRemote(n),t()):(i.refreshNameDisplay(),r())})}else t()})},r.prototype.commitValue=function(n,i){var r=this;return i===void 0&&(i=!1),new t.Promise(function(t,u){if(n.match(/!important$/)&&(n=n.substring(0,n.length-10).trim(),i=!0),r._value!==n||r._isImportant!==i){var f=r._value,e=r._isImportant;r._value=n;r._isImportant=i;r.isNew?r.commitNewProperty().done(t,u):r._model.editPropertyValue(r._uid,r._value,r._isImportant,function(n){n?(r.updateFromRemote(n),t()):(r._value=f,r._isImportant=e,r.refreshValueDisplay(),u())})}else t()})},r.prototype.revert=function(){var n=this;return this.wasCreatedInSession?this.commitDelete(!0):new t.Promise(function(t,i){n._model.editPropertyRevert(n._uid,function(r){r?(n.recalculateWinning(),n.updateFromRemote(r),t()):i()})})},r.prototype.lookupLonghandOriginals=function(){for(var t,n=0;n<this.properties.length;n++)t=this.properties[n],t.original=this.getLonghandOriginal(n),t.updateChangeState()},r.prototype.updateFromRemote=function(n){var i=this,t,u,f;if(this.remoteUpdateProperty(n),this.properties.length===n.longhand.length)for(t=0;t<this.properties.length;t++)u=this.properties[t],f=n.longhand[t],f.original=this.getLonghandOriginal(t),u.remoteUpdateProperty(f);else this.clearSubproperties(),n.longhand.forEach(function(n){u=new r(i._model,i._listeners,!1,n.current,null,null,n.isApplied,!0,!1,n.status,n.uid,i.rule);i.addSubproperty(u,!0)}),this.lookupLonghandOriginals();this.recalculateWinning()},r.prototype.remove=function(n){this.recalculateWinning();var t=this.rule.removeProperty(this),i;n&&(i=t<this.rule.properties.length?this.rule.properties[t]:t>0?this.rule.properties[t-1]:this.rule);this.notifyPropertyChange(10,this,i)},r.prototype.commitDelete=function(n){var i=this;return new t.Promise(function(t){i._model.editPropertyDelete(i.uid,function(r){r?(i.recalculateWinning(),i.updateFromRemote(r)):(i.remove(n),i._model.remapPropertyId(i,i.uid,null));t()})})},r.prototype.refreshNameDisplay=function(){this.notifyPropertyChange(1,this,this._name);this.notifyPropertyChange(6,this,this._status)},r.prototype.setValue=function(n,t){this._value=n;this._isImportant=t;this.notifyPropertyChange(2,this,this.valueForDisplay)},r.prototype.refreshValueDisplay=function(){this.notifyPropertyChange(2,this,this.valueForDisplay);this.notifyPropertyChange(6,this,this._status)},r.prototype.updateChangeState=function(){if(this._model.capabilities.showChangeBars)if(this.isDeleted||this.container.isDeleted)this.changeState=n.StyleChangeNotifier.CHANGE_BAR_REMOVE;else if(this.wasCreatedInSession||this.container.wasCreatedInSession)this.changeState=n.StyleChangeNotifier.CHANGE_BAR_ADD;else if(this.isOriginal){this.changeState=n.StyleChangeNotifier.CHANGE_BAR_NONE;for(var t=0;t<this.properties.length;t++)this.properties[t].changeState&&(this.changeState=n.StyleChangeNotifier.CHANGE_BAR_UPDATE)}else this.changeState=n.StyleChangeNotifier.CHANGE_BAR_UPDATE;this.extendedChangeState=this.changeState},Object.defineProperty(r.prototype,"isSupPropertyDisplayableColor",{get:function(){var n,t;if(this.isShorthand)for(n=0;n<this.properties.length;n++)if(t=this.properties[n],t.isDisplayableColor)return!0;return!1},enumerable:!0,configurable:!0}),r.convertStatusStringToStatus=function(n){switch(n){case"Valid":return 1;case"UnrecognizedProperty":return 2;case"InvalidValue":return 3}return 0},r.prototype.getLonghandOriginal=function(n){return this.originalLonghand&&this.originalLonghand.length===this.properties.length?this.originalLonghand[n]:{name:"",value:"",isImportant:!1,isEnabled:!1}},r.prototype.commitNewProperty=function(){var n=this,r,i,u;if(this.rule.isNew)return this.rule.commitNewRule(this);for(r=-1,i=0;i<this.rule.properties.length;i++)if(this.rule.properties[i]===this){r=i;break}return u=r<this.rule.properties.length-1?this.rule.properties[r+1].uid:null,new t.Promise(function(t,i){n._model.addProperty(n.rule.uid,n._name,n._value,n._isImportant,u,function(r){r?(n.updateFromRemote(r),t()):i()})})},r.prototype.remoteUpdateProperty=function(n){var t=n.current;this.uid=n.uid;this.wasCreatedInSession=n.wasCreatedInSession;this.original=n.original;this.originalLonghand=n.originalLonghand;this.name=t.name;this.status=r.convertStatusStringToStatus(n.status);this.isEnabled=t.isEnabled;this.isApplied=n.isApplied;this.isDeleted=n.isDeleted;this.setValue(t.value,t.isImportant);this.updateChangeState()},r}(n.StyleChangeNotifier);n.StyleProperty=i}(Dom||(Dom={}))
//# sourceMappingURL=DomExplorerMerged.min.js.map
.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-Function-Name:before {
        content:"";
    }

    .BPT-Events-Function-Name:after {
        content:"";
    }

.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({vs-image-icon-tree-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({vs-image-icon-tree-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}]*/
    }
}
<SCRIPT language="javascript">
var win = external.menuArguments.window;
var selectedElement = external.menuArguments.event.srcElement;

win.console.select(selectedElement);
</SCRIPT>
#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": "plugin-background-color"
			},
			"plugin-image-icon-dom-explorer-show-layout": {
				"bitmap_source": "images\\i_show_layout.png",
				"background_color": "plugin-background-color"
			},
			"plugin-image-icon-dom-explorer-refresh": {
				"bitmap_source": "images\\i_refresh.png",
				"background_color": "plugin-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"
			},
			"vs-image-icon-tree-collapsed": {
				"bitmap_source": "..\\Common\\images\\itemCollapsedIcon.png",
				"background_color": "plugin-background-color"
			},
			"vs-image-icon-tree-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.Common.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": {
			"vs-image-icon-tree-collapsed": {
				"bitmap_source": "common/images/itemCollapsedIcon.png",
				"background_color": "plugin-background-color"
			},
			"vs-image-icon-tree-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": "plugin-background-color"
			},
			"plugin-image-icon-dom-explorer-show-layout-32x": {
				"bitmap_source": "dom/images/ShowLayout_32x.png",
				"background_color": "plugin-background-color"
			},
			"plugin-image-icon-dom-explorer-refresh-32x": {
				"bitmap_source": "dom/images/Refresh_32x.png",
				"background_color": "plugin-background-color"
			},
			"plugin-common-image-icon-next": {
				"bitmap_source": "common/images/i_next.png",
				"background_color": "f12-toolbar-background-color"
			},
			"plugin-common-image-icon-previous": {
				"bitmap_source": "common/images/i_previous.png",
				"background_color": "f12-toolbar-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.
var domexplorer,__extends,remoteHelpers,F12;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.isWhitespace=function(t){return t.nodeType!==3?!1:!n.NON_WHITESPACE.test(t.nodeValue)},n.isSelfClosingTag=function(t,i){return!i&&n.VOID_TAG[t.toLowerCase()]},n.VOID_TAG={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,menuitem:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},n.NON_WHITESPACE=/\S/,n}();n.RemoteStatic=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(){}return n.getCssClassesUsedInCurrentDocument=function(t){var r=[],i;return n.collectSelectors(t.styleSheets,r),i={},n.extractClassNamesFromSelectorText(r,i),n.extractClassNamesFromClassAttributes(t,i),n.createArrayFromClassSet(i)},n.collectSelectors=function(t,i){for(var r,f,e,u=0;u<t.length;u++){r=t[u];r.imports&&r.imports.length&&n.collectSelectors(r.imports,i);try{for(f=0;f<r.rules.length;f++)e=r.rules[f],i.push(e.selectorText)}catch(o){Common.RemoteHelpers.encounteredException(o)}}},n.createArrayFromClassSet=function(n){var t=[];for(var i in n)i!=="BPT-DomExplorer-Ignore"&&t.push(i);return t.sort(),t},n.extractClassNamesFromSelectorText=function(t,i){for(var s,h,e,f,r,c,u,o=0;o<t.length;o++)if(s=t[o],s)for(h=String.prototype.split.call(s,/([~+>,]|\s)+/),e=0;e<h.length;e++)for(f=h[e],r=f.indexOf(".");r!==-1;)c=n.findEndOfClass(f,r),c===-1?(u=f.substring(r+1),u!==""&&(i[u]=!0),r=-1):(u=f.substring(r+1,c+1),u&&(i[u]=!0),r=f.indexOf(".",r+1))},n.extractClassNamesFromClassAttributes=function(n,t){for(var h,u,i,f,r,c,e,o,a,l=n.querySelectorAll("[class]"),s=0;s<l.length;s++)if(h=l.item(s),u=h.classList,u)for(o=0;o<u.length;o++)a=u.item(o),t[a]=!0;else if(i=h.className,i&&(f=Common.RemoteHelpers.getDefaultView(browser.document),f&&f.SVGAnimatedString&&i instanceof f.SVGAnimatedString&&(r=i,i=r.baseVal,r.baseVal!==r.animVal&&(i+=" "+r.animVal)),i&&i.split))for(c=String.prototype.split.call(i,/\s+/),e=0;e<c.length;e++)i=c[e],t[i]=!0},n.findEndOfClass=function(n,t){var r=n.substring(t+1),i=String.prototype.search.call(r,/[.#\[:>~)]/);return i===-1?-1:i+t},n}();n.CssInformationExtractor=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(){"use strict"})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(n){this._dom=n;this._mapUidToNode={};this._nextAvailableUid=1}return n.prototype.unmapNode=function(n){delete this._mapUidToNode[n]},n.prototype.getOrAssignUid=function(n,t){var i,r;if(n){if((i=this.getUid(n),"#root"===i)||i&&this.getNode(i))return i;for(r in this._mapUidToNode)if(this._mapUidToNode[r]===n)return r;return t?undefined:(i=i||"dm5_"+this._nextAvailableUid++,this._mapUidToNode[i]=n,i)}},n.prototype.getNode=function(n){if(n==="#root")return browser.document;var t=this._dom.getElementByUniqueId(n);return t?t:this._mapUidToNode[n]},n.prototype.getUid=function(n){return n?n===browser.document?"#root":n.uniqueID:null},n}();n.NodeMap5=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(n){this._dom=n;this._mapUidToNode=new Map;this._mapNodeToUid=new WeakMap;this._nextAvailableUid=1}return n.prototype.unmapNode=function(n){var t=this._mapUidToNode.get(n);t&&(this._mapNodeToUid.delete(t),this._mapUidToNode.delete(n))},n.prototype.getOrAssignUid=function(n,t){if(n){var i=this.getUid(n);return"#root"===i?i:i&&this.getNode(i)?i:this._mapNodeToUid.has(n)?this._mapNodeToUid.get(n):t?undefined:(i=i||"dm11_"+this._nextAvailableUid++,this._mapUidToNode.set(i,n),this._mapNodeToUid.set(n,i),i)}},n.prototype.getNode=function(n){if(n==="#root")return browser.document;var t=this._dom.getElementByUniqueId(n);return t?this.isNodeAccessible(t)?t:null:(t=this._mapUidToNode.get(n),!t)?null:this.isNodeAccessible(t)?t:(this._mapUidToNode.delete(n),null)},n.prototype.getUid=function(n){return n?n===browser.document?"#root":n.nodeType===n.ELEMENT_NODE&&browser.getUniqueID?browser.getUniqueID(n):n.uniqueID:null},n.prototype.isNodeAccessible=function(n){var t=null,i=null;try{i=n.nodeName;t=typeof n}catch(r){return!1}return t==="object"},n}();n.NodeMap11=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(t){var i=function(){function t(){this.clearManager()}return t.prototype.clearManager=function(){this._treeModifiedCallbackLookup={};this._isFreshlyModifiedUid={};this._queuedMutations={};this._subtreeModifiedQueue=[]},t.prototype.getTreeModifiedCallback=function(t){var i=n.RemoteDom.getDomTree().nodeMap.getOrAssignUid(t);return this._treeModifiedCallbackLookup[i]},t.prototype.setTreeModifiedCallback=function(t,i){var r=n.RemoteDom.getDomTree().nodeMap.getOrAssignUid(t);this._treeModifiedCallbackLookup[r]=i},t.prototype.processMutation=function(n,t,i){var e=this.getDocumentUid(n.targetUid),o=!1,r,f,s,u;if(t)switch(n.type){case"DOMNodeInserted":case"DOMNodeRemoved":r=n.parentUid;this._isFreshlyModifiedUid[r]||(f=this._queuedMutations[r],f||(f=[],this._queuedMutations[r]=f,u=this._subtreeModifiedQueue.indexOf(r),u===-1&&this._subtreeModifiedQueue.push(r)),s=n,s.parentsChildCount=i.parentNode.childNodes.length,f.push(s));this._isFreshlyModifiedUid[n.targetUid]=!0;o=!0;break;case"DOMSubtreeModified":u=this._subtreeModifiedQueue.indexOf(n.targetUid);this.flushQueuedSubtreeMutations(n.targetUid,e)&&this.assertDebugOnly(u!==-1,"Flushed a subtree that is not in the queue");u!==-1&&(this.fireTreeModified(e,[n]),this._subtreeModifiedQueue.splice(u,1));o=!0}o||this.fireTreeModified(e,[n])},t.prototype.flushQueuedMutations=function(){var n=this;this._subtreeModifiedQueue.forEach(function(t){var i=n.getDocumentUid(t);n.flushQueuedSubtreeMutations(t,i)})},t.prototype.flushQueuedSubtreeMutations=function(n,t){var i=this._queuedMutations[n],r;return i&&i.length>0?(r=this.sortMutationQueue(i),this.fireTreeModified(t,r),delete this._queuedMutations[n],this._isFreshlyModifiedUid={},!0):!1},t.prototype.fireTreeModified=function(n,t){n&&this._treeModifiedCallbackLookup[n]&&this._treeModifiedCallbackLookup[n](t)},t.prototype.getDocumentUid=function(t){var i=n.RemoteDom.getDomTree().nodeMap,r=i.getNode(t);return r?i.getOrAssignUid(r.ownerDocument):null},t.prototype.sortMutationQueue=function(n){var f=this;if(n.length!==0){var t=[],i=[],r=n[0].type,u=n[0].parentsChildCount;return n.forEach(function(n){(n.type!==r||n.parentsChildCount!==u)&&(f.sortMutationPartition(t),i=i.concat(t),r=n.type,u=n.parentsChildCount,t=[]);delete n.parentsChildCount;t.push(n)}),this.sortMutationPartition(t),i=i.concat(t)}},t.prototype.sortMutationPartition=function(n){if(n.length!==0){var t=n[0].type;t==="DOMNodeInserted"?n.sort(function(n,t){return n.targetChildIndex-t.targetChildIndex}):t==="DOMNodeRemoved"&&n.sort(function(n,t){return t.targetChildIndex-n.targetChildIndex})}},t.prototype.assertDebugOnly=function(t,i){!t&&n&&n.Tools.Utility.Assert.failDebugOnly(i)},t}();t.MutationManager=i})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(n){this._diagOmStyles=n}return n.constructDoctypeString=function(n){var t="<!DOCTYPE html>";return n&&(t="<!DOCTYPE "+n.name+(n.publicId?' PUBLIC "'+n.publicId+'"':"")+(!n.publicId&&n.systemId?" SYSTEM":"")+(n.systemId?' "'+n.systemId+'"':"")+">"),t},n.prototype.computeHtmlForAncestorsAndDescendants=function(t){var r=this.copyElementPlusAncestors(t),u=n.constructDoctypeString(t.ownerDocument.doctype),f=this.constructHtmlTagString(t),e=this.findElementsToSearchForStyles(t),o=this.makeElementToStyleRulesMap(e),s=this.putRulesInTheRightOrder(o),i=u+"\r\n"+f+"\r\n<head>\r\n<title><\/title>\r\n<style>\r\n",h=this.getTextForRules(s);return i+=h,i+="<\/style>\r\n<\/head>\r\n",i+=r.outerHTML,i+"\r\n<\/html>\r\n"},n.prototype.copyElementPlusAncestors=function(n){var e=[],t=n.parentElement,r,u,f;if(n.tagName!=="BODY")while(t)e.push(t),t=t.parentElement,t&&!t.parentElement&&(t=null);var i=null,o=null;for(r=e.length-1;r>=0;r--)u=this.copyElementWithAttributes(e[r]),i?i.appendChild(u):o=u,i=u;return(f=this.copyElementWithAttributes(n),f.innerHTML=n.innerHTML,i)?(i.appendChild(f),o):f},n.prototype.findElementsToSearchForStyles=function(n){for(var f=[],r=n,u,e,t,i;r;)f.push(r),r=r.parentElement;for(u=[n];u.length>0;)if(e=u.pop(),t=e.children,t)for(i=0;i<t.length;i++)u.push(t[i]),f.push(t[i]);return f},n.prototype.getTextForRules=function(n){var t="";return n.forEach(function(n){var i,r,o,f,u;for(n.parentRule&&n.parentRule&&(i=n.parentRule,i.media&&i.media.mediaText?t+="/* @media "+i.media.mediaText+" */\r\n":n.parentStyleSheet&&(r=n.parentStyleSheet.owningElement,r.tagName==="LINK"&&r.media&&(t+="/* media "+r.media+"*/\r\n"))),t+=n.selectorText,t+=" {\r\n",o=n.style,f=styles.getParsedPropertyList(o),u=0;u<f.length;u++)try{var e=f[u],s=e.propertyName,h=e.value,c=e.important;s&&(t+="\t"+s+": ",h&&(t+=h),c&&(t+=" !important"),t+=";\r\n")}catch(l){Common.RemoteHelpers.encounteredException(l)}t+="}\r\n"}),t},n.prototype.makeElementToStyleRulesMap=function(n){for(var i,r,u=[],t=0;t<n.length;t++)i=n[t],r=this.getStyleRules(i),r.length>0&&u.push({element:i,styleRules:r});return u},n.prototype.getStyleRules=function(n){var i=[],r,t,u;this._diagOmStyles.calculateTracedStyles(n);try{r=this._diagOmStyles.getTracedStyles(n).getAppliedStyles()}catch(f){return i}for(t=r.length-1;t>=0;t--)u=Common.RemoteHelpers.getRuleForStyleObject(r[t],n),u&&i.push(u);return i},n.prototype.copyElementWithAttributes=function(n){for(var i=n.ownerDocument.createElement(n.tagName),t=0;t<n.attributes.length;t++)i.setAttribute(n.attributes[t].name,n.attributes[t].value);return i},n.prototype.constructHtmlTagString=function(n){var t=n.ownerDocument.documentElement,r="<html>",i;if(t&&t.attributes){for(r="<html",i=0;i<t.attributes.length;i++)r+=" "+t.attributes[i].name+'="'+t.attributes[i].value+'"';r+=">"}return r},n.prototype.putRulesInTheRightOrder=function(n){for(var o,i,r,u,f,s,t=[],e=0;e<n.length;e++)for(o=n[e],i=null,r=0;r<o.styleRules.length;r++)u=o.styleRules[r],f=t.indexOf(u),f<0?t.push(u):i&&(s=t.indexOf(i),s>f&&(t.splice(s,1),t.splice(f,0,i))),i=u;return t},n}();n.RemoteElementCopier=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={})),function(n){var t;(function(n){var t=Common.RemoteHelpers,i=function(){function n(n){this._browser=n}return Object.defineProperty(n.prototype,"browser",{get:function(){return this._browser},enumerable:!0,configurable:!0}),n.prototype.initialize=function(){if(this._loaded=!1,this._callbacks={},this._browser.document.readyState!=="loading")this._loaded=!0;else{var n=t.getDefaultView(this._browser.document);try{this._onLoadListener=t.addSafeListener(n,this._browser.document,"DOMContentLoaded",this.onload.bind(this))}catch(i){}}},n.prototype.cleanUp=function(){this._onLoadListener&&t.removeListener(this._browser.document,"DOMContentLoaded",this._onLoadListener);this._callbacks={}},n.prototype.onload=function(){if(this._loaded)throw new Error("DOM loaded multiple times.");this._loaded=!0;this.fireEvent("loaded",null)},n.prototype.fireEvent=function(n,t){if(this._callbacks[n])for(var i=0,r=this._callbacks[n].length;i<r;i++)this._callbacks[n][i](t)},n.prototype.attachEvent=function(n,t){this._callbacks[n]||(this._callbacks[n]=[]);this._callbacks[n].push(t)},n.prototype.addEventListener=function(n,t){switch(n){case"loaded":this._loaded&&t();this.attachEvent(n,t);break;default:throw new Error("Invalid event listener type.")}},n.prototype.removeEventListener=function(n,t){if(this._callbacks&&this._callbacks[n]){var i=this._callbacks[n].lastIndexOf(t);i!==-1&&this._callbacks[n].splice(i,1)}},n}();n.RemoteDomService=i})(t=n.Remote||(n.Remote={}))}(domexplorer||(domexplorer={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function t(n,t,i){i===void 0&&(i=!1);this.wasCreatedInSession=i;this.properties=[];this.uid=t.uid;this.isInlined=n.style===t.style;var r=t.rule;this.selector=r?r.selectorText:undefined;this.parent=this.computeParentMediaRule(r);this.declarationLocation=t.source;r&&r.parentStyleSheet&&(this.styleHref=r.parentStyleSheet.href);i||(this.originalSelector=this.selector)}return Object.defineProperty(t.prototype,"hasChanged",{get:function(){if(!this.properties.length||this.wasCreatedInSession&&this.isDeleted)return!1;if(!this.wasCreatedInSession&&!this.isInlined&&this.selector!==this.originalSelector)return!0;for(var n=0;n<this.properties.length;n++)if(this.properties[n].hasChanged)return!0;return!1},enumerable:!0,configurable:!0}),t.prototype.setIsInheritedAndTarget=function(t,i,r){this.isInherited=t;this.target=new n.AppliedStyleTarget(this.isInherited?i.getOrAssignUid(r):this.uid,r)},t.prototype.addProperty=function(n,t){this.properties.splice(t,0,n)},t.prototype.removeProperty=function(n){for(var t=0;t<this.properties.length;t++)if(this.properties[t]===n){this.properties.splice(t,1);return}},t.prototype.clearProperties=function(){this.properties=[]},t.prototype.forEachProperty=function(n){for(var t=0;t<this.properties.length;t++)n(this.properties[t])},t.prototype.computeParentMediaRule=function(n){var r=null,t,i;return n&&(t=n.parentRule,t&&t.media?r="@media "+t.media.mediaText:n.parentStyleSheet&&(i=n.parentStyleSheet.owningElement,i.tagName==="LINK"&&i.media&&(r="media "+i.media))),r},t}();n.AppliedStyleRule=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(n,t){var r,i;this.uid=n;this.description=t.tagName.toLowerCase();r=t.getAttribute("id");r?this.description+="#"+r:(i=t.className,i&&typeof i=="string"&&i.trim().length>0&&(this.description+="."+i.trim().split(" ")[0]))}return n}();n.AppliedStyleTarget=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function t(t,i,r){r===void 0&&(r=!1);this.current=t;this.status=i;this.wasCreatedInSession=r;this.longhand=[];this.isApplied=!0;this.uid=remoteHelpers.getUid();r||(this.original=new n.AppliedPropertyValue(t.name,t.value,t.isImportant,t.isEnabled),this._isSettingOriginalLonghands=!0)}return Object.defineProperty(t.prototype,"hasChanged",{get:function(){var t=this.original,i=this.current,r,u;if(this.wasCreatedInSession&&(this.status!==n.DiagnosticProperty.VALID_STATUS||this.current.isEnabled)||!this.wasCreatedInSession&&this.isDeleted||t&&(t.name!==i.name||t.value!==i.value||t.isImportant!==i.isImportant||t.isEnabled!==i.isEnabled))return!0;if(this.longhand.length&&(!this.originalLonghand||this.originalLonghand.length===this.longhand.length))for(r=0;r<this.longhand.length;r++)if((u=this.longhand[r],t=this.originalLonghand?this.originalLonghand[r]:null,i=u.current,t&&(t.name!==i.name||t.value!==i.value||t.isImportant!==i.isImportant||t.isEnabled!==i.isEnabled))||!t&&!i.isEnabled)return!0;return!1},enumerable:!0,configurable:!0}),t.prototype.addLonghandProperty=function(t,i){if(this.longhand.splice(i,0,t),this._isSettingOriginalLonghands){this.originalLonghand||(this.originalLonghand=[]);var r=t.current;this.originalLonghand.push(new n.AppliedPropertyValue(r.name,r.value,r.isImportant,r.isEnabled))}},t.prototype.clearLonghandProperties=function(){this.longhand=[];this._isSettingOriginalLonghands=!1},t}();n.AppliedStyleProperty=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var r=n.Remote.RemoteDomService,i=function(){function n(n,t){this._remoteDomService=n;this._diagnostics=t;this._onLoadCallback=this.onLoad.bind(this);this._onTimeoutCallback=this.onTimeout.bind(this);this._stepNodesCallback=this.stepNodes.bind(this);this._stepStylesCallback=this.stepStyles.bind(this)}return n.prototype.startPalette=function(n){this._running&&this.stopPalette();this._remoteDomService.initialize();this._callback=n;this._colors=[];this._running=!0;this._diagnostics.setTimeout(this._onTimeoutCallback,1e4);this._remoteDomService.addEventListener("loaded",this._onLoadCallback)},n.prototype.stopPalette=function(){this._remoteDomService.removeEventListener("loaded",this._onLoadCallback);this._diagnostics.clearTimeout(this._onTimeoutCallback);this.clearImmediate(this._stepNodesCallback);this.clearImmediate(this._stepStylesCallback);this._running=!1;this._remoteDomService.cleanUp()},n.prototype.submitPalette=function(){F12.Tools.Utility.Assert.isTrue(this._running);this._nodesCounted&&this._stylesCounted&&(this.stopPalette(),this._callback(this._colors))},n.prototype.onTimeout=function(){F12.Tools.Utility.Assert.isTrue(this._running);this._nodesCounted=!0;this._stylesCounted=!0;this.submitPalette()},n.prototype.onLoad=function(){var n,t,i;F12.Tools.Utility.Assert.isTrue(this._running);this._nodes=[];this._rules=[];this._sheets=[];this._nodesCounted=!1;this._stylesCounted=!1;try{for(n=this._remoteDomService.browser.document,this._nodes.push(n.body),t=0,i=n.styleSheets.length;t<i;t++)this._sheets.push(n.styleSheets[t]);this.setImmediate(this._stepNodesCallback);this.setImmediate(this._stepStylesCallback)}catch(r){this.stopPalette()}},n.prototype.stepNodes=function(){var e,r,t,u,i,f;F12.Tools.Utility.Assert.isTrue(this._running);try{for(e=[],r=0;r<n.MAX_STEP_COUNT&&this._nodes.length>0&&this._running;r++)if(t=this._nodes.pop(),u=this.getColors(t),this._colors=this._colors.concat(u),t.childNodes)for(i=0,f=t.childNodes.length;i<f;i++)this._nodes.push(t.childNodes[i]);this._nodes.length>0?this.setImmediate(this._stepNodesCallback):(this._nodesCounted=!0,this.submitPalette())}catch(o){this.stopPalette()}},n.prototype.stepStyles=function(){var e,i,r,t,u,f;F12.Tools.Utility.Assert.isTrue(this._running);try{if(e=[],this._rules.length===0){if(this._sheets.length===0)return;if(i=this._sheets.pop(),typeof i!="undefined"&&typeof i.rules!="undefined")for(t=0,r=i.rules.length;t<r;t++)this._rules.push(i.rules[t]);if(i.imports)for(t=0,r=i.imports.length;t<r;t++)this._sheets.push(i.imports[t])}for(t=0;t<n.MAX_STEP_COUNT&&this._rules.length>0;t++)u=this._rules.pop(),f=this.getColors(u),this._colors=this._colors.concat(f);this._sheets.length>0||this._rules.length>0?this.setImmediate(this._stepStylesCallback):(this._stylesCounted=!0,this.submitPalette())}catch(o){this.stopPalette()}},n.prototype.getColors=function(t){var u=[],f,i,e,r;if(t&&t.style)for(i=0,e=n.COLOR_PROPERTIES.length;i<e;i++)f=n.COLOR_PROPERTIES[i],r=t.style[f],r&&u.push(r);return u},n.prototype.setImmediate=function(n){this._diagnostics.setTimeout(n,0)},n.prototype.clearImmediate=function(n){this._diagnostics.clearTimeout(n)},n.MAX_STEP_COUNT=25,n.COLOR_PROPERTIES=["backgroundColor","borderBottomColor","borderColor","borderLeftColor","borderRightColor","borderTopColor","color","columnRuleColor","floodColor","lightingColor","outlineColor","scrollbar3dLightColor","scrollbarArrowColor","scrollbarBaseColor","scrollbarShadowColor","scrollbarDarkShadowColor","scrollbarFaceColor","scrollbarHighlightColor","scrollbarTrackColor","stopColor"],n}();t.RemoteColorPicker=i})(t=n.Remote||(n.Remote={}))})(domexplorer||(domexplorer={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(){this._mappedProperties=[]}return Object.defineProperty(n.prototype,"propertyNames",{get:function(){var n="";return this._mappedProperties.forEach(function(t){n+="."+t.appliedProperty.current.name}),n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isEmpty",{get:function(){return!this._mappedProperties.length},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hasAppliedProperties",{get:function(){for(var n=0;n<this._mappedProperties.length;n++)if(this._mappedProperties[n].appliedProperty.isApplied)return!0;return!1},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"length",{get:function(){return this._mappedProperties.length},enumerable:!0,configurable:!0}),n.prototype.addProperty=function(n,t){t===void 0&&(t=-1);t<0||t>=this._mappedProperties.length?(this._mappedProperties.push(n),this._mappedProperties.length-1,t=this._mappedProperties.length):this._mappedProperties.splice(t,0,n);this.addAppliedProperty(n.appliedProperty,t)},n.prototype.addAppliedProperty=function(){},n.prototype.removeProperty=function(n){for(var i,t=0;t<this._mappedProperties.length;t++)i=this._mappedProperties[t],i===n&&(this._mappedProperties.splice(t,1),this.removeAppliedProperty(i.appliedProperty))},n.prototype.removeAppliedProperty=function(){},n.prototype.forEachProperty=function(n){for(var t=0;t<this._mappedProperties.length;t++)if(n(this._mappedProperties[t],t))return t;return-1},n.prototype.clearProperties=function(){this._mappedProperties=[];this.clearAppliedProperties()},n.prototype.clearAppliedProperties=function(){},n.prototype.lookupMappedProperty=function(n){for(var r,i,t=0;t<this._mappedProperties.length;t++)if(r=this._mappedProperties[t],i=n(r),i)return i},n.prototype.lookupMappedPropertyPosition=function(n){for(var t=0;t<this._mappedProperties.length;t++)if(n===this._mappedProperties[t])return t;return-1},n}();n.MappedStylePropertyCollection=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t;(function(n){var t=function(n){function t(t,i,r,u){n.call(this);this.appliedProperty=t;this.mappedRule=i;this.diagProperty=r;this._owner=u}return __extends(t,n),t.prototype.setEnabled=function(n){this.forEachProperty(function(t){return t.setEnabled(n),!1});this.diagProperty.enabled=n;this.appliedProperty.current.isEnabled=n;this._owner&&n&&(this._owner.appliedProperty.current.isEnabled=!0)},t.prototype.setValue=function(n,t,i){var r=this.appliedProperty.current,f=r.value,e=r.isImportant,o=function(){r.value=n;r.isImportant=t},s=function(){r.value=f;r.isImportant=e},u=this.mappedRule.commitChanges(o,s,this.mappedRule.lookupMappedPropertyPosition(this));return u&&(this.diagProperty.enabled=!this.diagProperty.isEmptyInvalid&&i&&this.diagProperty.isValid,r.isEnabled=this.diagProperty.enabled),u},t.prototype.setName=function(n,t){var i=this.appliedProperty.current,u=i.name,f=function(){i.name=n},e=function(){i.name=u},r=this.mappedRule.commitChanges(f,e,this.mappedRule.lookupMappedPropertyPosition(this));return r&&(this.mappedRule.setAppliedState(this),t&&this.resetLonghandEnabledStates(t)),r},t.prototype.setAll=function(n,t,i,r,u){var f=this.appliedProperty.current,l=f.name,o=f.value,s=f.isImportant,h=function(){f.name=n;f.value=t;f.isImportant=i},c=function(){f.value=o;f.isImportant=s},e=this.mappedRule.commitChanges(h,c,this.mappedRule.lookupMappedPropertyPosition(this));return e&&(this.diagProperty.enabled=r,f.isEnabled=this.diagProperty.enabled,this.mappedRule.setAppliedState(this),u&&this.resetLonghandEnabledStates(u)),e},t.prototype.addAppliedProperty=function(n,t){this.appliedProperty.addLonghandProperty(n,t)},t.prototype.clearAppliedProperties=function(){this.appliedProperty.clearLonghandProperties()},t.prototype.getLonghandEnabledStates=function(){var n,t=this.appliedProperty.longhand;return t&&(n=[],t.forEach(function(t){n.push(t.current.isEnabled)})),n},t.prototype.resetLonghandEnabledStates=function(n){var i=this.diagProperty.longhands,r,t;if(i&&n&&i.length===n.length)for(r=this.appliedProperty.longhand,t=0;t<i.length;t++)i[t].enabled=n[t],r[t].current.isEnabled=i[t].enabled},t}(n.MappedStylePropertyCollection);n.MappedStyleProperty=t})(t=n.RemoteDom||(n.RemoteDom={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(){this._properties={}}return n.prototype.add=function(n,t){this._properties[n]=t},n.prototype.remove=function(n){delete this._properties[n]},n.prototype.lookupByUid=function(n){return this._properties[n]},n.prototype.clear=function(){this._properties={}},n.prototype.forEach=function(n){for(var t in this._properties)n(this._properties[t])},n}();n.StylePropertyMap=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(){this._rules={}}return n.prototype.add=function(n,t){this._rules[n]=t},n.prototype.remove=function(n){delete this._rules[n]},n.prototype.lookupByUid=function(n){return this._rules[n]},n.prototype.clear=function(){this._rules={}},n}();n.StyleRuleMap=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t;(function(n){var t=function(t){function i(n,i,r,u){t.call(this);this._styleUtilities=n;this.appliedRule=i;this.cachedStyle=r;this.element=u}return __extends(i,t),Object.defineProperty(i.prototype,"cssText",{get:function(){var n="";return this.forEachProperty(function(t){var r=t.appliedProperty.current;n+=i.preparePropertyName(r.name)+": ";n+=i.preparePropertyValue(r.value+(r.isImportant?" !important":""))+"; "}),n},enumerable:!0,configurable:!0}),i.prepareSelector=function(n){return n},i.preparePropertyName=function(n){return n.replace(/([^\w-])/g,"\\$1")},i.preparePropertyValue=function(n){return n},i.prototype.addAppliedProperty=function(n,t){this.appliedRule.addProperty(n,t)},i.prototype.removeAppliedProperty=function(n){this.appliedRule.removeProperty(n)},i.prototype.clearAppliedProperties=function(){this.appliedRule.clearProperties()},i.prototype.lookupActiveMappedProperty=function(n){return this.lookupMappedProperty(function(t){return t.diagProperty.enabled&&t.diagProperty.activeInBlock&&t.appliedProperty.current.name===n?t:t.lookupMappedProperty(function(t){if(t.diagProperty.enabled&&t.diagProperty.activeInBlock&&t.appliedProperty.current.name===n)return t})})},i.prototype.setAppliedState=function(n){n.appliedProperty.isApplied=this._styleUtilities.getAppliedState(n)},i.prototype.propertyAdd=function(t,i,r,u,f,e,o){var h=this,s;f?(s=f.appliedProperty,s.current.name=t,s.current.value=i,s.current.isImportant=r,s.current.isEnabled=u,f.diagProperty=null,f.mappedRule=this):(s=new n.AppliedStyleProperty(new n.AppliedPropertyValue(t,i,r,u),n.DiagnosticProperty.VALID_STATUS,!0),f=new n.MappedStyleProperty(s,this,null));var c=e?this.lookupMappedProperty(function(n){if(n.appliedProperty.uid===e)return n}):null,l=c?this.lookupMappedPropertyPosition(c):this.length,a=function(){h.addProperty(f,l)},v=function(){h.removeProperty(f)};if(this.commitChanges(a,v,l))return this._styleUtilities.mapProperty(f),this.setAppliedState(f),o&&f.resetLonghandEnabledStates(o),f},i.prototype.propertyHardRemove=function(n){var t=this,i=this.lookupMappedPropertyPosition(n),r=function(){t.removeProperty(n)},u=function(){t.addProperty(n,i)};return this.commitChanges(r,u)?(this._styleUtilities.unmapProperty(n),!0):!1},i.prototype.remove=function(){var t=this,n=[],r=function(){t.forEachProperty(function(t){n.push(t.isDeleted);t.isDeleted=!0})},u=function(){var i=0;t.forEachProperty(function(t){t.isDeleted=n[i++]})},i=this.commitChanges(r,u);return i&&(this.appliedRule.isDeleted=!0,this.forEachProperty(function(n){n.appliedProperty.isDeleted=!0})),i?n:null},i.prototype.unremove=function(n,t,i){var u=this;if(n.length!==this.length||t.length!==this.length||i.length!==this.length)return!1;var r,e=function(){r=0;u.forEachProperty(function(t){t.isDeleted=n?n[r++]:!1})},o=function(){u.forEachProperty(function(n){n.isDeleted=!0})},f=this.commitChanges(e,o);return f&&(this.appliedRule.isDeleted=!1,t&&(r=0,this.forEachProperty(function(n){n.appliedProperty.isDeleted=n.isDeleted;n.diagProperty.enabled=t[r];n.appliedProperty.current.isEnabled=n.diagProperty.enabled;n.resetLonghandEnabledStates(i[r]);r++}))),f},i.prototype.propertyRemove=function(n){return n.diagProperty.enabled=!1,n.isDeleted=!0,n.appliedProperty.isDeleted=!0,this.refresh(!1),!0},i.prototype.propertyUnremove=function(n,t,i){return n.isDeleted=!1,n.appliedProperty.isDeleted=!1,n.diagProperty.enabled=t,n.appliedProperty.current.isEnabled=n.diagProperty.enabled,i&&n.resetLonghandEnabledStates(i),this.refresh(!1),!0},i.prototype.removeAllProperties=function(){var n=this,t=[],i,r;return this.forEachProperty(function(n){return t.push(n),!1}),i=function(){n.clearProperties()},r=function(){t.forEach(function(t){return n.addProperty(t),!1})},this.commitChanges(i,r)},i.prototype.movePropertiesFromRule=function(n){var t=this,i=[],r=[],u=function(){n.forEachProperty(function(n){i.push(n);r.push(n.getLonghandEnabledStates());t.addProperty(n);n.mappedRule=t;n.forEachProperty(function(n){n.mappedRule=t})})},f=function(){n.forEachProperty(function(i){t.removeProperty(i);i.mappedRule=n;i.forEachProperty(function(t){t.mappedRule=n})})};return this.commitChanges(u,f)&&n.removeAllProperties()?(i.forEach(function(n,t){n.resetLonghandEnabledStates(r[t])}),!0):!1},i.prototype.reconcileProperty=function(t,i,r,u){var w=this,o=i.appliedProperty,s,f,v,h,l,c,e,y,a;i.diagProperty=r;s=!1;try{if(f=o.current,v=f.isEnabled,u&&i.isDeleted&&(f.isEnabled=!0,i.isDeleted=!1,t&&(o.isDeleted=!1)),r.isValid?(o.status!==n.DiagnosticProperty.VALID_STATUS?r.enabled=!0:f.isEnabled||(r.enabled=!1),f.isEnabled=r.enabled):f.isEnabled=!1,(v!==f.isEnabled||i.isDeleted!==o.isDeleted)&&(s=!0),t)if((f.name!==r.propertyName||f.value!==r.value||o.status!==r.status||f.isImportant!==r.important)&&(s=!0,f.name=r.propertyName,f.value=r.value,o.status=r.status,f.isImportant=r.important,u&&(o.wasCreatedInSession=!1,o.original=new n.AppliedPropertyValue(f.name,f.value,f.isImportant,f.isEnabled))),h=[],l=i.propertyNames,l.length&&l===r.longhandNames)i.forEachProperty(function(t,i){var u=r.longhands[i],f=t.appliedProperty;t.diagProperty=r.longhands[i];f.current.value=u.value;f.current.isImportant=u.important;f.current.isEnabled=u.enabled;h.push(new n.AppliedPropertyValue(u.propertyName,u.value,u.important,u.enabled))});else{if(i.forEachProperty(function(n){return w._styleUtilities.unmapProperty(n),!1}),i.clearProperties(),o.longhand=[],r.isShorthand)for(c=0;c<r.longhands.length;c++){e=r.longhands[c];try{y=new n.AppliedStyleProperty(new n.AppliedPropertyValue(e.propertyName,e.value,e.important,e.enabled),e.status);a=new n.MappedStyleProperty(y,this,e,i);i.addProperty(a);h.push(new n.AppliedPropertyValue(e.propertyName,e.value,e.important,e.enabled));this._styleUtilities.mapProperty(a)}catch(p){Common.RemoteHelpers.encounteredException(p)}}u&&(o.originalLonghand=h)}else i.forEachProperty(function(n,t){return n.diagProperty=r.longhands[t],!1})}catch(p){Common.RemoteHelpers.encounteredException(p)}return s},i.prototype.commitChanges=function(n,t,i){var s=this,e,f,o,r,u;return(i===void 0&&(i=-1),e=this.length,n(),f=this.length,o=e>f,!this.cachedStyle.update(this.cssText))?(t(),!1):(r=this.cachedStyle.propertyList,u=r.length===f,u||(t(),this.cachedStyle.update(this.cssText),r=this.cachedStyle.propertyList),this.forEachProperty(function(n,t){var f=r[t],e;n.isDeleted&&(f.enabled=!1);e=u&&!o&&(i<0||t===i);s.reconcileProperty(e,n,f,!1)}),this._lastCssText=this.cachedStyle.style.cssText,u)},i.prototype.refresh=function(n){var t=this,r=[],i,u;return this.cachedStyle.style&&this._lastCssText!==this.cachedStyle.style.cssText&&(i=[],this.forEachProperty(function(n){return i.push(n),!1}),u=this.cachedStyle.propertyList,u.forEach(function(u){for(var f,e=0;e<i.length;e++)if(f=i[e],f.diagProperty.propertyName===u.propertyName){i.splice(e,1);t.reconcileProperty(!0,f,u,n)&&r.push({event:"updateProperty",uid:f.appliedProperty.uid,obj:f.appliedProperty,isDynamic:n});return}f=t._styleUtilities.processPropertyFromAppliedStyle(t,t,t.cachedStyle,u,null,!n);f&&(t.addProperty(f),t._styleUtilities.mapProperty(f),f.appliedProperty.isApplied=t._styleUtilities.getAppliedState(f),r.push({event:"addProperty",uid:f.mappedRule.appliedRule.uid,obj:f.appliedProperty,isDynamic:n}))}),i.forEach(function(i){t.removeProperty(i);t._styleUtilities.unmapProperty(i);r.push({event:"removeProperty",uid:i.appliedProperty.uid,isDynamic:n})}),this._lastCssText=this.cachedStyle.style.cssText),r},i}(n.MappedStylePropertyCollection);n.MappedStyleRule=t})(t=n.RemoteDom||(n.RemoteDom={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(n,t,i){this.isParsed=t;this._cachedStyle=i;this.update(n);this.isEmptyInvalid&&(this.enabled=!1)}return Object.defineProperty(n.prototype,"longhandNames",{get:function(){var n="";return this.isShorthand&&this.longhands.forEach(function(t){n+="."+t.propertyName}),n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"activeInBlock",{get:function(){return this._diagProperty.activeInBlock},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"enabled",{get:function(){return this._diagProperty.enabled},set:function(n){if(this._diagProperty.enabled!==n){var t=this._cachedStyle.allowMutations;this._cachedStyle.allowMutations=!1;this._diagProperty.enabled=n;this._cachedStyle.allowMutations=t}},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"important",{get:function(){return this._diagProperty.important},set:function(n){this._diagProperty.important=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isShorthand",{get:function(){return this.isValid&&this._diagProperty.longhands.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"propertyName",{get:function(){return this._diagProperty.propertyName},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._diagProperty.value},set:function(n){this._diagProperty.value=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"status",{get:function(){return this.isEmptyInvalid?"InvalidValue":this._diagProperty.status},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isValid",{get:function(){return this.status===n.VALID_STATUS},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isEmptyInvalid",{get:function(){return this._diagProperty.value.length===0&&n.InvalidEmptyProperties.indexOf(this._diagProperty.propertyName)>=0},enumerable:!0,configurable:!0}),n.prototype.update=function(t){var i,r;if(this._diagProperty&&this.isParsed&&(this._diagProperty.enabled=!1),this._diagProperty=t,this.longhands=[],t.longhands&&t.longhands.length)for(i=0;i<t.longhands.length;i++)try{r=t.longhands[i];r.status&&this.longhands.push(new n(r,!1,this._cachedStyle))}catch(u){Common.RemoteHelpers.encounteredException(u)}},n.VALID_STATUS="Valid",n.UNRECOGNIZED_STATUS="UnrecognizedProperty",n.INVALID_VALUE_STATUS="InvalidValue",n.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",],n}();n.DiagnosticProperty=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function t(n,t,i){if(this.style=n,this.rule=t,this._ownerDocument=i,this.allowMutations=!0,this.uid=remoteHelpers.getUid(),this.rule)try{var r=styles.getSourceLocation(this.style);r&&r.fileURI&&(this.source={uri:r.fileURI,line:r.line,column:r.column})}catch(u){Common.RemoteHelpers.encounteredException(u)}}return Object.defineProperty(t.prototype,"propertyList",{get:function(){return this.refresh(!1),this._propertyList},enumerable:!0,configurable:!0}),t.prototype.isValid=function(){try{var n=Common.RemoteHelpers.getRuleForStyleObjectByDocument(this.style,this._ownerDocument);return!!n}catch(t){Common.RemoteHelpers.encounteredException(t)}return!1},t.prototype.update=function(n){try{return this.allowMutations=!1,this.style.cssText=n,this.refresh(!0),this.allowMutations=!0,!0}catch(t){return this.allowMutations=!0,!1}},t.prototype.refresh=function(n){var o,i,t,s,r,u,f,e;if(this.style&&(n||!this._propertyList||this._lastCssText!==this.style.cssText)){for(o=styles.getParsedPropertyList(this.style),i=[],t=0;t<o.length;t++)this.addProperty(o[t],!0,i);for(s=styles.getDynamicPropertyList(this.style),t=0;t<s.length;t++){for(r=s[t],u=!1,f=i.length-1;!u&&f>=0;f--){e=i[f];try{e.propertyName===r.propertyName&&(e.update(r),e.isParsed=!1,u=!0)}catch(h){Common.RemoteHelpers.encounteredException(h)}}u||this.addProperty(r,!1,i)}this._propertyList=i;this._lastCssText=this.style.cssText}},t.prototype.addProperty=function(t,i,r){var u;try{u=new n.DiagnosticProperty(t,i,this)}catch(f){Common.RemoteHelpers.encounteredException(f)}u&&r.push(u)},t}();n.CachedStyle=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function t(n){this._styleUtilities=n;this._cache=[]}return t.prototype.lookup=function(t,i){for(var f,r,u=0;u<this._cache.length;u++)if(this._cache[u].style===t){r=this._cache[u];break}return r||(f=Common.RemoteHelpers.getRuleForStyleObject(t,i),r=new n.CachedStyle(t,f,i.ownerDocument),this._cache.push(r)),r},t.prototype.clear=function(){this._cache=[]},t.prototype.forEach=function(n){for(var t=0;t<this._cache.length;t++)n(this._cache[t])},t}();n.RemoteStyleCache=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(t){var i=function(){function i(n,i){this._domUtilities=n;this._nodeMap=i;this._propertyMap=new t.StylePropertyMap;this._ruleMap=new t.StyleRuleMap;this._currentRules=[];this._forcedPseudoStyling={};this._newRuleStyleSheets={};this._dummyTracedStyles={getAppliedProperties:function(){return[]},getAppliedStyles:function(){return[]},getInheritanceChain:function(){return[]},isInheritable:function(){return!1}};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 t.RemoteStyleCache(this)}return i.prototype.getComputedStyle=function(n){var t=n.ownerDocument,i=Common.RemoteHelpers.getDefaultView(t);return Common.RemoteHelpers.getComputedStyle(i,n)},i.prototype.standardizeLayoutUnits=function(n){var t,i;if(n!==undefined&&n!==null)return t=String.prototype.match.call(n.toString(),/^(-?[0-9]+(?:\.[0-9]*)?)\s*([a-z]*)$/),t&&t.length>1&&(t[1]===0?n="0":(i=t[1].indexOf("."),i>-1&&t[1].length-i>3&&(n=""+parseFloat(t[1]).toFixed(2)+t[2]),t[2]||(n+="px"))),n},i.prototype.stylechange=function(n){this._domUtilities.mediaStyleChangeCallback(n)},i.prototype.styleAttrModified=function(n){var t,i,r;try{for(t=0;t<this._currentRules.length;t++)if(i=this._currentRules[t],i.cachedStyle.style===n.style){i.cachedStyle.allowMutations&&(r=i.refresh(n!==this.editingElement),r.length&&this.stylechange(r));break}}catch(u){}},i.prototype.refreshCurrentRules=function(n){var r,t,i;for(this._currentElement=n,this._currentRules=this.getCurrentRules(),r=[],t=0;t<this._currentRules.length;t++)i=this._currentRules[t].appliedRule,i.wasCreatedInSession&&i.isDeleted||r.push(i);return r},i.prototype.getChangedRules=function(){var t=this,n=[];return this._styleCache.forEach(function(i){var u=i.isValid(),r=t.lookupMappedRule(i.uid);r&&r.appliedRule.hasChanged&&(r.appliedRule.isInlined||u)&&n.push(r.appliedRule)}),n},i.prototype.lookupMappedRule=function(n){return this._ruleMap.lookupByUid(n)},i.prototype.lookupMappedProperty=function(n){return this._propertyMap.lookupByUid(n)},i.prototype.mapRule=function(n){var t=this;this._ruleMap.add(n.appliedRule.uid,n);n.forEachProperty(function(n){return t.mapProperty(n),n.forEachProperty(function(n){return t.mapProperty(n),!1}),!1})},i.prototype.unmapRule=function(n){var t=this;this._ruleMap.remove(n.appliedRule.uid);n.forEachProperty(function(n){return t.unmapProperty(n),n.forEachProperty(function(n){return t.unmapProperty(n),!1}),!1})},i.prototype.mapProperty=function(n){this._propertyMap.add(n.appliedProperty.uid,n)},i.prototype.unmapProperty=function(n){this._propertyMap.remove(n.appliedProperty.uid)},i.prototype.addNewRule=function(n,t,i){var r=this.addRule(n,t,i);return r&&this.mapRule(r),r},i.prototype.getRulePosition=function(n){for(var i=this._currentRules.length,t=0;t<this._currentRules.length;t++)if(this._currentRules[t].appliedRule.uid===n.appliedRule.uid){i=t;break}return i},i.prototype.getRuleByPosition=function(n){if(n>=0&&n<this._currentRules.length)return this._currentRules[n]},i.prototype.getCurrentRules=function(){var n=this,t,u,i,f,e,o,r;return styles.calculateTracedStyles(this._currentElement),t=[],this._tracedStyles=this.getSafeTracedStyles(this._currentElement),i=[],this._tracedStyles.getInheritanceChain().forEach(function(r){var f=r!==n._currentElement,e=n.getSafeTracedStyles(r).getAppliedStyles();e.forEach(function(e){if(i.indexOf(e)<0){i.push(e);try{var o=e===r.style;o&&r===n._currentElement&&(u=!0);t.push(n.processRuleFromAppliedStyle(r,n._styleCache.lookup(e,r),f))}catch(s){}}})}),u||(e=this._styleCache.lookup(this._currentElement.style,this._currentElement),f=this.processRuleFromAppliedStyle(this._currentElement,e,!1),t.unshift(f)),o={},r=[],t.forEach(function(t){n.determineAppliedAndWinningState(t,o);(t.appliedRule.isInlined&&!t.appliedRule.isInherited||t.hasAppliedProperties)&&r.push(t)}),r},i.prototype.getAppliedState=function(n){return!n.mappedRule.appliedRule.isInherited||n.diagProperty.status===t.DiagnosticProperty.UNRECOGNIZED_STATUS||this._tracedStyles.isInheritable(n.diagProperty.propertyName)},i.prototype.processPropertyFromAppliedStyle=function(n,i,r,u,f,e){e===void 0&&(e=!1);var s=u.propertyName,h=u.enabled&&u.isValid,c=new t.AppliedStyleProperty(new t.AppliedPropertyValue(s,u.value,u.important,h),u.status,e),o=new t.MappedStyleProperty(c,i,u,f);return u.isShorthand&&this.processPropertyListFromAppliedStyle(o,i,r,u.longhands,o),o},i.prototype.getWinningProperty=function(n){for(var i,r,u=this.calculateWinningStyle(n),t=0;t<this._currentRules.length;t++)if(i=this._currentRules[t],i.cachedStyle.uid===u&&(r=i.lookupActiveMappedProperty(n),r))return r},i.prototype.copyElementWithStyle=function(t){var i=new n.RemoteDom.RemoteElementCopier(styles);return i.computeHtmlForAncestorsAndDescendants(t)},i.prototype.getElementForStyle=function(n){var t=this.lookupMappedRule(n);if(t&&t.appliedRule.isInlined)return t.element},i.prototype.clearCache=function(n){this._styleCache.clear();this._ruleMap.clear();this._propertyMap.clear();this.clearForcedPseudoStyling(n);this._newRuleStyleSheets={}},i.prototype.setPseudoStyling=function(n,t,i){var r=this._forcedPseudoStyling[t],u;r||(r=this._forcedPseudoStyling[t]=[]);i?r.push(n):(u=r.indexOf(n),u>=0&&r.splice(r.indexOf(n),1));switch(t.toLowerCase()){case"active":emulation.setActiveStyling(n,i);break;case"focus":emulation.setFocusStyling(n,i);break;case"hover":emulation.setHoverStyling(n,i);break;case"visited":emulation.setVisitedStyling(n,i);break;case"link":emulation.setLinkStyling(n,i)}},i.prototype.getPseudoStyling=function(n,t){var i=this._forcedPseudoStyling[t];return i?i.indexOf(n)>=0:!1},i.prototype.addCurrentRule=function(n,t){this._currentRules.splice(t,0,n)},i.prototype.replaceCurrentRule=function(n,t){for(var i=0;i<this._currentRules.length;i++)if(this._currentRules[i]===t){this._currentRules[i]=n;break}},i.prototype.clearForcedPseudoStyling=function(n){var r=this,t,i;if(n)for(t in this._forcedPseudoStyling)i=this._forcedPseudoStyling[t],i&&i.forEach(function(n){r.setPseudoStyling(n,t,!1)});this._forcedPseudoStyling={}},i.prototype.findStyleSheetByTitle=function(n,t){for(var r,i=0;i<t.styleSheets.length;i++)if(r=t.styleSheets[i],r.title===n)return r},i.prototype.addRule=function(n,i,r){var f,u,o,s,h,e,c,l,v,y,a;try{r&&(o=r.cachedStyle.rule,o&&(u=o.parentStyleSheet,h=o.parentRule,h&&h.media&&(s=h.media.mediaText)));u||(u=this.createStyleSheetForNewRule());u.insertRule?(l=t.MappedStyleRule.prepareSelector(n)+" { }",s&&(l="@media "+s+" { "+l+" }"),e=u.cssRules.length,u.insertRule(l,e),c=s?u.cssRules[e].cssRules[0]:u.cssRules[e]):(e=u.rules.length,u.addRule(n,"cursor: inherit;",e),c=u.rules[e],c.style.cssText="");styles.calculateTracedStyles(this._currentElement);v=this.getSafeTracedStyles(this._currentElement);y=r?r.appliedRule.wasCreatedInSession:!0;f=this.processRuleFromAppliedStyle(this._currentElement,this._styleCache.lookup(c.style,this._currentElement),!1,y);this.determineAppliedAndWinningState(f,v);r?(this.replaceCurrentRule(f,r),a=r.appliedRule,f.appliedRule.styleHref=a.styleHref,f.appliedRule.declarationLocation=a.declarationLocation,f.appliedRule.isInherited=a.isInherited):this.addCurrentRule(f,i)}catch(p){}return f},i.prototype.createStyleSheetForNewRule=function(){var t=this._currentElement.ownerDocument,i=this._nodeMap.getUid(t.body),n;return this._newRuleStyleSheets[i]||(n=t.createElement("style"),t.getElementsByTagName("head")[0].appendChild(n),n.title="__BROWSERTOOLS_DOMEXPLORER_DYNAMIC_STYLES",this._newRuleStyleSheets[i]=this.findStyleSheetByTitle(n.title,t),n.title=""),this._newRuleStyleSheets[i]},i.prototype.determineAppliedAndWinningState=function(n,t){var i=this;n.forEachProperty(function(n){var r=i.getAppliedState(n);return n.appliedProperty.isApplied=r,n.appliedProperty.isWinning=r&&i.getWinningState(n,t),!1})},i.prototype.getWinningState=function(n,t){var f=this,i=n.diagProperty,u,r;try{return(u=n.mappedRule.cachedStyle.uid,n.isEmpty)?i.activeInBlock&&i.enabled&&i.isValid&&this.calculateWinningStyle(i.propertyName,t)===u:(r=0,i.activeInBlock&&n.forEachProperty(function(n){return n.appliedProperty.isWinning=f.getWinningState(n,t),n.appliedProperty.isWinning&&r++,!1}),r>0)}catch(e){Common.RemoteHelpers.encounteredException(e)}return!1},i.prototype.processRuleFromAppliedStyle=function(n,i,r,u){var e,f;return u===void 0&&(u=!1),f=this.lookupMappedRule(i.uid),f||(e=new t.AppliedStyleRule(n,i,u),f=new t.MappedStyleRule(this,e,i,n),this.processPropertyListFromAppliedStyle(f,f,i,i.propertyList),this.mapRule(f)),f.refresh(!u),f.appliedRule.setIsInheritedAndTarget(r,this._nodeMap,n),f},i.prototype.processPropertyListFromAppliedStyle=function(n,t,i,r,u){var f,o,e;if(r)for(f=0;f<r.length;f++){o=r[f];try{e=this.processPropertyFromAppliedStyle(n,t,i,o,u);e&&n.addProperty(e)}catch(s){Common.RemoteHelpers.encounteredException(s)}}},i.prototype.checkPropertyListForWinningProperty=function(n,t){var r,i,u,f;if(t)for(r=0;r<t.length;r++){i=t[r];try{if(i.enabled&&i.activeInBlock)if(i.longhands&&i.longhands.length)for(u=0;u<i.longhands.length;u++)try{if(f=i.longhands[u],f.activeInBlock&&f.enabled&&f.propertyName===n)return!0}catch(e){Common.RemoteHelpers.encounteredException(e)}else if(i.propertyName===n)return!0}catch(e){Common.RemoteHelpers.encounteredException(e)}}},i.prototype.checkInheritanceChainForWinningStyle=function(n){var o,r,h,t,u,f,i,e,s;styles.calculateTracedStyles(this._currentElement);o=this.getSafeTracedStyles(this._currentElement);try{for(r=o.getInheritanceChain(n),h=[],t=0;t<r.length;t++)for(u=r[t],f=this.getSafeTracedStyles(u).getAppliedStyles(n),i=0;i<f.length;i++)if(e=this._styleCache.lookup(f[i],u),s=this.checkPropertyListForWinningProperty(n,e.propertyList),s)return e.uid}catch(c){Common.RemoteHelpers.encounteredException(c)}},i.prototype.calculateWinningStyle=function(n,t){var i;return t&&t.hasOwnProperty(n)?i=t[n]:(i=this.checkInheritanceChainForWinningStyle(n),t&&(t[n]=i)),i},i.prototype.getSafeTracedStyles=function(n){try{if(n)return styles.getTracedStyles(n)}catch(t){Common.RemoteHelpers.encounteredException(t)}return this._dummyTracedStyles},i}();t.StyleUtilities=i})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function t(n,t,i){this._element=n;this._beforeElement=t;this._htmlText=i;this.type="AddElement"}return t.createElements=function(t,i,r){var u,e,o,f,s;for(r===void 0&&(r="div"),u=t.createElement(r),e=Common.RemoteHelpers.getDefaultView(t),e.WinJS?e.WinJS.Utilities.setInnerHTMLUnsafe(u,i):u.innerHTML=i,o=[],f=0;f<u.childNodes.length;f++)s=u.childNodes.item(f),n.RemoteStatic.isWhitespace(s)||o.push(s);return o},t.prototype.description=function(){return this.type},t.prototype.performUndo=function(){for(var n=0;n<this._newElements.length;n++)this._element.removeChild(this._newElements[n]);return!0},t.prototype.performEdit=function(){this._newElements||(this._newElements=t.createElements(this._element.ownerDocument,this._htmlText,this._element.tagName));for(var n=0;n<this._newElements.length;n++)this._beforeElement?this._element.insertBefore(this._newElements[n],this._beforeElement):this._element.appendChild(this._newElements[n]);return!0},t}();n.AddElement=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(n,t){this._element=n;this._isStyle=t;this.type="DeleteElement"}return n.prototype.description=function(){return this.type},n.prototype.performUndo=function(){return this._isStyle?(this._element.innerHTML=this._oldStyle,!0):(this._nextSibling?this._oldParent.insertBefore(this._element,this._nextSibling):this._oldParent.appendChild(this._element),!0)},n.prototype.performEdit=function(){return this._isStyle?(this._oldStyle=this._element.innerHTML,this._element.innerHTML="",!0):(this._nextSibling=this._element.nextElementSibling?this._element.nextElementSibling:this._element.nextSibling,this._oldParent=this._element.parentNode,this._element.parentNode.removeChild(this._element),!0)},n}();n.DeleteElement=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(t){var i=function(){function i(n,t,i,r,u){this._styleUtilities=n;this._element=i;this._name=r;this._newValue=u;this._htmlTreeHelpers=t;this.type="EditAttribute";this._name==="value"&&t.hasSpecialValueAttribute(this._element)?(this._valueElement=this._element,this._oldValue=this._valueElement.value):this._oldValue=this._element.getAttribute(this._name)}return i.prototype.description=function(){return this.type},i.prototype.performUndo=function(){return this._name==="style"&&(this._styleUtilities.editingElement=this._element),this._valueElement?this._valueElement.value=this._oldValue:this._oldValue?this._element.setAttribute(this._name,this._oldValue):(this._name==="style"&&(this._element.setAttribute(this._name,"color:inherit"),Common.RemoteHelpers.getDocumentMode()<9&&this._styleUtilities.styleAttrModified(this._element)),this._element.removeAttribute(this._name)),this._styleUtilities.editingElement=null,!0},i.prototype.performEdit=function(){var i=!0;if(this._name==="style"&&(this._styleUtilities.editingElement=this._element),this._valueElement)this._valueElement.value=this._newValue,t.domUtilities.getMutationManager().processMutation({type:"DOMAttrModified",targetUid:n.RemoteDom.getDomTree().nodeMap.getOrAssignUid(this._element),newValue:this._newValue,attrChange:1,attrName:this._name},!1);else try{this._element.setAttribute(this._name,this._newValue);this._name==="style"&&Common.RemoteHelpers.getDocumentMode()<9&&this._styleUtilities.styleAttrModified(this._element)}catch(r){i=!1}return this._styleUtilities.editingElement=null,i},i}();t.EditAttribute=i})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(n,t,i,r,u,f){this._styleUtilities=n;this._mappedRule=t;this._newName=i;this._newValue=r;this._newIsImportant=u;this._beforeUid=f;this.type="EditStylePropertyAdd"}return n.prototype.description=function(){return this.type},n.prototype.performEdit=function(n){if(this._mappedProperty=this._mappedRule.propertyAdd(this._newName,this._newValue,this._newIsImportant,!0,this._mappedProperty,this._beforeUid),this._mappedProperty){var t=this._mappedProperty.appliedProperty;return n?this._styleUtilities.stylechange([{event:"addProperty",uid:this._mappedRule.appliedRule.uid,obj:t,beforeUid:this._beforeUid}]):t.isApplied=!0,this.result=t,!0}return!1},n.prototype.performUndo=function(){return this._mappedRule.propertyHardRemove(this._mappedProperty),this._styleUtilities.stylechange([{event:"removeProperty",uid:this._mappedProperty.appliedProperty.uid}]),!0},n}();n.EditStylePropertyAdd=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(n,t,i){this._styleUtilities=n;this._mappedProperty=t;this._newValue=i;this._oldValue=this._mappedProperty.appliedProperty.current.isEnabled;this.type="EditStylePropertyEnable"}return n.prototype.description=function(){return this.type},n.prototype.performUndo=function(){if(this._newValue!==this._oldValue){this._mappedProperty.setEnabled(this._oldValue);var n=this._mappedProperty.appliedProperty;return this._styleUtilities.stylechange([{event:"updateProperty",uid:n.uid,obj:n}]),!0}return!1},n.prototype.performEdit=function(n){if(this._newValue!==this._oldValue){if(this._mappedProperty.setEnabled(this._newValue),n){var t=this._mappedProperty.appliedProperty;this._styleUtilities.stylechange([{event:"updateProperty",uid:t.uid,obj:t}])}return!0}return!1},n}();n.EditStylePropertyEnable=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(n,t,i){this._styleUtilities=n;this._mappedProperty=t;this._newName=i;this.type="EditStylePropertyName";var r=this._mappedProperty.appliedProperty;this._oldName=r.current.name;this._oldEnabledLonghands=this._mappedProperty.getLonghandEnabledStates()}return n.prototype.description=function(){return this.type+" "+this._oldName+"="+this._newName+" chainingid="+this.chainingUid},n.prototype.performUndo=function(){this._mappedProperty.setName(this._oldName,this._oldEnabledLonghands);var n=this._mappedProperty.appliedProperty;return this._styleUtilities.stylechange([{event:"updateProperty",uid:n.uid,obj:n}]),!0},n.prototype.performEdit=function(n){var i=this._mappedProperty.setName(this._newName),t;return i&&(this.result=this._mappedProperty.appliedProperty,n&&(t=this._mappedProperty.appliedProperty,this._styleUtilities.stylechange([{event:"updateProperty",uid:t.uid,obj:t}]))),i},n}();n.EditStylePropertyName=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(n,t){this._styleUtilities=n;this._mappedProperty=t;this.type="EditStylePropertyRemove";this._mappedRule=this._mappedProperty.mappedRule;var r=this._mappedProperty.appliedProperty,i=r.current;this._oldName=i.name;this._oldValue=i.value;this._oldIsImportant=i.isImportant;this._oldEnabled=i.isEnabled;this._isHardDelete=r.wasCreatedInSession;this._oldEnabledLonghands=this._mappedProperty.getLonghandEnabledStates()}return n.prototype.description=function(){return this.type+" "+this._oldName+" chainingid="+this.chainingUid},n.prototype.performUndo=function(){var n=this._mappedProperty.appliedProperty;return 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:n,beforeUid:this._oldBeforeUid}])):(this._mappedRule.propertyUnremove(this._mappedProperty,this._oldEnabled,this._oldEnabledLonghands),this._styleUtilities.stylechange([{event:"updateProperty",uid:n.uid,obj:n}])),!0},n.prototype.performEdit=function(n){var u=this,i,r,t;return this._isHardDelete&&!n&&(i=!1,this._mappedRule.forEachProperty(function(n){if(i)return u._oldBeforeUid=n.appliedProperty.uid,!0;n===u._mappedProperty&&(i=!0)})),r=this._isHardDelete?this._mappedRule.propertyHardRemove(this._mappedProperty):this._mappedRule.propertyRemove(this._mappedProperty),r&&(this.result=this._isHardDelete?null:this._mappedProperty.appliedProperty,n&&(t=this._mappedProperty.appliedProperty,this._isHardDelete?this._styleUtilities.stylechange([{event:"removeProperty",uid:t.uid}]):this._styleUtilities.stylechange([{event:"updateProperty",uid:t.uid,obj:t}]))),r},n}();n.EditStylePropertyRemove=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(n,t,i,r){this._styleUtilities=n;this._mappedProperty=t;this._newValue=i;this._newIsImportant=r;this.type="EditStylePropertyValue";var u=this._mappedProperty.appliedProperty.current;this._oldValue=u.value;this._oldIsImportant=u.isImportant;this._oldIsEnabled=u.isEnabled;try{this._oldIsInvalid=!this._mappedProperty.diagProperty.isValid}catch(f){Common.RemoteHelpers.encounteredException(f);this._oldIsInvalid=!0}}return n.prototype.getOldValue=function(){return{value:this._oldValue,isImportant:this._oldIsImportant,isEnabled:this._oldIsEnabled,isInvalid:this._oldIsInvalid}},n.prototype.setOldValue=function(n){this._oldValue=n.value;this._oldIsImportant=n.isImportant;this._oldIsEnabled=n.isEnabled;this._oldIsInvalid=n.isInvalid},n.prototype.hasValueChanged=function(){return this._oldValue!==this._newValue||this._oldIsImportant!==this._newIsImportant},n.prototype.description=function(){return this.type+" "+this._mappedProperty.appliedProperty.current.name+"="+this._newValue+" oldValue ="+this._oldValue+" chainingid="+this.chainingUid},n.prototype.performUndo=function(){this._mappedProperty.setValue(this._oldValue,this._oldIsImportant,this._oldIsEnabled);var n=this._mappedProperty.appliedProperty;return this._styleUtilities.stylechange([{event:"updateProperty",uid:n.uid,obj:n}]),!0},n.prototype.performEdit=function(n){var i=this._mappedProperty.setValue(this._newValue,this._newIsImportant,n?this._newIsEnabled:this._oldIsEnabled||this._oldIsInvalid),t;return i&&(t=this._mappedProperty.appliedProperty,this._newIsEnabled=t.current.isEnabled,this.result=t,n&&this._styleUtilities.stylechange([{event:"updateProperty",uid:t.uid,obj:t}])),i},n}();n.EditStylePropertyValue=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(n,t,i,r,u,f){this._styleUtilities=n;this._selector=t;this._newName=i;this._newValue=r;this._newIsImportant=u;this._newPosition=f;this.type="EditStyleRuleAdd"}return n.prototype.description=function(){return this.type},n.prototype.performEdit=function(n){if(n||(this._mappedRule=this._styleUtilities.addNewRule(this._selector,this._newPosition)),this._mappedRule){if(this._mappedProperty=this._mappedRule.propertyAdd(this._newName,this._newValue,this._newIsImportant,!0,this._mappedProperty),n){var t=this._mappedRule.appliedRule,i=this._styleUtilities.getRuleByPosition(this._styleUtilities.getRulePosition(this._mappedRule)+1),r=i?i.appliedRule.uid:null;this._styleUtilities.stylechange([{event:"addRule",uid:t.uid,obj:t,beforeUid:r}])}return this.result=this._mappedRule.appliedRule,!0}return!1},n.prototype.performUndo=function(){return this._mappedRule.removeAllProperties(),this._styleUtilities.stylechange([{event:"removeRule",uid:this._mappedRule.appliedRule.uid}]),!0},n}();n.EditStyleRuleAdd=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(n,t){var i=this;this._styleUtilities=n;this._mappedRule=t;this._oldDeleteStates=[];this._oldEnabledStates=[];this._oldEnabledLonghands=[];this.type="EditStyleRuleRemove";this._mappedRule.forEachProperty(function(n){i._oldEnabledStates.push(n.appliedProperty.current.isEnabled);i._oldEnabledLonghands.push(n.getLonghandEnabledStates())})}return n.prototype.description=function(){return this.type},n.prototype.performEdit=function(n){if(this._oldDeleteStates=this._mappedRule.remove(),this._oldDeleteStates){var t=this._mappedRule.appliedRule;return this.result=t.wasCreatedInSession?null:t,n&&(t.wasCreatedInSession?this._styleUtilities.stylechange([{event:"removeRule",uid:t.uid}]):this._styleUtilities.stylechange([{event:"updateRule",uid:t.uid,obj:t}])),!0}return this.result=null,!1},n.prototype.performUndo=function(){var r=this._mappedRule.unremove(this._oldDeleteStates,this._oldEnabledStates,this._oldEnabledLonghands),n=this._mappedRule.appliedRule,t,i;return n.wasCreatedInSession?(t=this._styleUtilities.getRuleByPosition(this._styleUtilities.getRulePosition(this._mappedRule)+1),i=t?t.appliedRule.uid:null,this._styleUtilities.stylechange([{event:"addRule",uid:n.uid,obj:n,beforeUid:i}])):this._styleUtilities.stylechange([{event:"updateRule",uid:n.uid,obj:n}]),r},n}();n.EditStyleRuleRemove=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(n,t,i){var r=this;this._styleUtilities=n;this._oldMappedRule=t;this._newSelector=i;this.type="EditStyleRuleSelector";this._oldSelector=this._oldMappedRule.appliedRule.selector;this._oldOriginalSelector=this._oldMappedRule.appliedRule.originalSelector;this._oldProperties=[];this._oldMappedRule.forEachProperty(function(n){return r._oldProperties.push(n),!1})}return n.prototype.description=function(){return this.type},n.prototype.performEdit=function(n){if(!n){var t=this._styleUtilities.getRulePosition(this._oldMappedRule);this._newMappedRule=this._styleUtilities.addNewRule(this._newSelector,t,this._oldMappedRule);this._newMappedRule.appliedRule.originalSelector=this._oldOriginalSelector}return this._newMappedRule&&this._newMappedRule.movePropertiesFromRule(this._oldMappedRule)?(n&&this._styleUtilities.stylechange([{event:"updateRule",uid:this._oldMappedRule.appliedRule.uid,obj:this._newMappedRule.appliedRule}]),this.result=this._newMappedRule.appliedRule,!0):!1},n.prototype.performUndo=function(){return 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}]),!0):!1},n}();n.EditStyleRuleSelector=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(n,t){this._node=n;this._newValue=t;this.type="EditText";this._oldValue=Common.RemoteHelpers.getTextContent(this._node);this._textNodeCase=this._node.nodeName==="#text";this._parentNode=this._node.parentNode}return n.prototype.description=function(){return this.type},n.prototype.performUndo=function(){if(this._textNodeCase){var n=this._parentNode.ownerDocument;this._parentNode.replaceChild(this._node,this._newTextNode)}else Common.RemoteHelpers.setTextContent(this._node,this._oldValue);return!0},n.prototype.performEdit=function(){if(this._textNodeCase){var n=this._node.ownerDocument;this._newTextNode||(this._newTextNode=n.createTextNode(this._newValue));this._parentNode.replaceChild(this._newTextNode,this._node)}else Common.RemoteHelpers.setTextContent(this._node,this._newValue);return!0},n}();n.EditText=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(n,t,i,r){this.name=n;this.value=t;this.isImportant=i;this.isEnabled=r}return n}();n.AppliedPropertyValue=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(n,t,i,r){this._styleUtilities=n;this._name=r;this.type="RemoveAttribute";this._element=i;this._name==="value"&&t.hasSpecialValueAttribute(this._element)?(this._oldValue=this._element.value,this._valueSpecialCase=!0):(this._oldValue=this._element.getAttribute(this._name),this._valueSpecialCase=!1)}return n.prototype.description=function(){return this.type},n.prototype.performUndo=function(){return this._name==="style"&&(this._styleUtilities.editingElement=this._element),this._valueSpecialCase?this._element.value=this._oldValue:(this._element.setAttribute(this._name,this._oldValue),this._name==="style"&&Common.RemoteHelpers.getDocumentMode()<9&&this._styleUtilities.styleAttrModified(this._element)),this._styleUtilities.editingElement=null,!0},n.prototype.performEdit=function(){return this._name==="style"&&(this._styleUtilities.editingElement=this._element),this._valueSpecialCase?this._element.value="":(this._name==="style"&&(this._element.setAttribute(this._name,"color:inherit"),Common.RemoteHelpers.getDocumentMode()<9&&this._styleUtilities.styleAttrModified(this._element)),this._element.removeAttribute(this._name)),this._styleUtilities.editingElement=null,!0},n}();n.RemoveAttribute=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(n,t,i){this._moveThisNode=n;this._byThisNode=t;this._reparentAction=i;this.type="reparent";this._originalParent=this._moveThisNode.parentNode;this._originalNextSibling=this._moveThisNode.nextSibling}return n.prototype.description=function(){return this.type},n.prototype.performEdit=function(){if(!this._moveThisNode||!this._moveThisNode.parentNode||!this._byThisNode||!this._byThisNode.parentNode||!this._moveThisNode.ownerDocument||!this._byThisNode.ownerDocument||this._moveThisNode.ownerDocument!==this._byThisNode.ownerDocument)return!1;switch(this._reparentAction){default:return!1;case n.REPARENT_ACTION.BeforeSibling:this.removeIfTextNode(this._moveThisNode);this._byThisNode.parentNode.insertBefore(this._moveThisNode,this._byThisNode);break;case n.REPARENT_ACTION.AfterSibling:this.removeIfTextNode(this._moveThisNode);this._byThisNode.parentNode.insertBefore(this._moveThisNode,this._byThisNode.nextSibling);break;case n.REPARENT_ACTION.FirstChild:this.removeIfTextNode(this._moveThisNode);this._byThisNode.insertBefore(this._moveThisNode,this._byThisNode.firstChild);break;case n.REPARENT_ACTION.LastChild:this.removeIfTextNode(this._moveThisNode);this._byThisNode.appendChild(this._moveThisNode)}return!0},n.prototype.performUndo=function(){return!this._moveThisNode||!this._moveThisNode.parentNode||!this._originalParent?!1:!this._moveThisNode.ownerDocument||!this._originalParent.ownerDocument||this._moveThisNode.ownerDocument!==this._originalParent.ownerDocument?!1:this._originalNextSibling&&(!this._originalNextSibling.parentNode||!this._originalNextSibling.ownerDocument||this._moveThisNode.ownerDocument!==this._originalNextSibling.ownerDocument)?!1:(this.removeIfTextNode(this._moveThisNode),this._originalNextSibling?this._originalParent.insertBefore(this._moveThisNode,this._originalNextSibling):this._originalParent.appendChild(this._moveThisNode),!0)},n.prototype.removeIfTextNode=function(n){n.nodeType===n.TEXT_NODE&&n.parentNode&&n.parentNode.removeChild(n)},n.REPARENT_ACTION={Unknown:"",BeforeSibling:"before sibling",AfterSibling:"after sibling",FirstChild:"first child",LastChild:"last child",NoDropHere:"no drop here"},n}();n.ReparentEdit=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function t(n,t){this._element=n;this._htmlText=t;this.type="ReplaceElement";this._parentElement=n.parentElement||n.parentNode;this._nextSibling=this._element.nextElementSibling||this._element.nextSibling}return t.prototype.description=function(){return this.type},t.prototype.performUndo=function(){this._parentElement.insertBefore(this._element,this._newElements[0]);for(var n=0;n<this._newElements.length;n++)this._parentElement.removeChild(this._newElements[n]);return!0},t.prototype.performEdit=function(){var i,t;for(this._newElements||(this._newElements=n.AddElement.createElements(this._parentElement.ownerDocument,this._htmlText,this._parentElement.tagName)),i=this._parentElement.ownerDocument.createDocumentFragment(),t=0;t<this._newElements.length;t++)i.appendChild(this._newElements[t]);return this._parentElement.insertBefore(i,this._element),this._parentElement.removeChild(this._element),!0},t}();n.ReplaceElement=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function n(n,t){var u=this,r,i;this._styleUtilities=n;this._mappedProperty=t;this.type="RevertProperty";r=this._mappedProperty.appliedProperty;i=r.current;this._oldName=i.name;this._oldValue=i.value;this._oldIsImportant=i.isImportant;this._oldIsEnabled=i.isEnabled;this._oldEnabledLonghands=this._mappedProperty.getLonghandEnabledStates();r.originalLonghand&&(this._newEnabledLonghands=[],r.originalLonghand.forEach(function(n){u._newEnabledLonghands.push(n.isEnabled)}));try{this._oldIsInvalid=!this._mappedProperty.diagProperty.isValid}catch(f){Common.RemoteHelpers.encounteredException(f);this._oldIsInvalid=!0}}return n.prototype.description=function(){return this.type+" chainingid="+this.chainingUid},n.prototype.performUndo=function(){this._mappedProperty.setAll(this._oldName,this._oldValue,this._oldIsImportant,this._oldIsEnabled,this._oldEnabledLonghands);this._oldIsDeleted&&this._mappedProperty.mappedRule.propertyRemove(this._mappedProperty);var n=this._mappedProperty.appliedProperty;return this._styleUtilities.stylechange([{event:"updateProperty",uid:n.uid,obj:n}]),!0},n.prototype.performEdit=function(n){var i=!0,t,r;return this._oldIsDeleted=this._mappedProperty.isDeleted,this._oldIsDeleted&&(i=this._mappedProperty.mappedRule.propertyUnremove(this._mappedProperty,!0,this._newEnabledLonghands)),i&&(t=this._mappedProperty.appliedProperty.original,i=!!t&&this._mappedProperty.setAll(t.name,t.value,t.isImportant,t.isEnabled,this._newEnabledLonghands),i&&(r=this._mappedProperty.appliedProperty,this.result=r,n&&this._styleUtilities.stylechange([{event:"updateProperty",uid:r.uid,obj:r}]))),i},n}();n.RevertProperty=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var t=function(){function t(t,i){var r=this;this._styleUtilities=t;this._mappedRule=i;this._propertyEdits=[];this.type="RevertRule";this._mappedRule.forEachProperty(function(t){var i=t.appliedProperty.wasCreatedInSession?new n.EditStylePropertyRemove(r._styleUtilities,t):new n.RevertProperty(r._styleUtilities,t);r._propertyEdits.push(i)})}return t.prototype.description=function(){return this.type+" chainingid="+this.chainingUid},t.prototype.performUndo=function(){var n=!0,t;return this._propertyEdits.forEach(function(t){var i=t.performUndo();return n=n||i,!i}),n&&this._editSelector&&this._editSelector.performUndo(),t=this._mappedRule.appliedRule,n&&this._wasDeleted&&(t.isDeleted=!0),this.result=t,this._styleUtilities.stylechange([{event:"updateRule",uid:t.uid,obj:t}]),n},t.prototype.performEdit=function(t){var r=!0,i;return this._propertyEdits.forEach(function(n){var i=n.performEdit(t);return r=r||i,!i}),r&&(i=this._mappedRule.appliedRule,i.selector!==i.originalSelector&&(this._editSelector||(this._editSelector=new n.EditStyleRuleSelector(this._styleUtilities,this._mappedRule,i.originalSelector)),this._editSelector.performEdit(t)&&(this._newMappedRule=this._editSelector._newMappedRule,this._newMappedRule&&(i=this._newMappedRule.appliedRule,i.originalSelector=i.selector))),this._wasDeleted=i.isDeleted,i.isDeleted=!1,this.result=i,t&&this._styleUtilities.stylechange([{event:"updateRule",uid:i.uid,obj:i}])),r},t}();n.RevertRule=t})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(t){var i=function(){function i(n,t){this._document=n;this._nodeMap=t}return Object.defineProperty(i.prototype,"nodeMap",{get:function(){return this._nodeMap},set:function(){throw new Error("Cannot set the nodeMap")},enumerable:!0,configurable:!0}),i.prototype.copyElementWithStyle=function(n,t){var r=this.getNodeByUid(n),i;if(r&&htmlTreeHelpers.isElementAccessible(r)){for(i=r;i;){if(i.tagName==="BODY")return t.copyElementWithStyle(r);i=i.parentElement}return}},i.prototype.getHTMLString=function(n,t,i){var o=!1,u,r,e,f;return(n.substr(0,5)==="style"&&(n=n.substr(5),o=!0),u=this.getNodeByUid(n),!u||!u.parentNode)?"":o&&u.nodeName==="STYLE"?u.styleSheet?u.styleSheet.cssText:Common.RemoteHelpers.getLeafTextContent(u):(r=u,!r.tagName)?r.nodeType===r.DOCUMENT_TYPE_NODE?Common.RemoteHelpers.getDocumentTypeNodeText(r):r.text?r.text:(e=Common.RemoteHelpers.getLeafTextContent(r),e)?e:void 0:(i&&i.length!==0?(f=r.cloneNode(!0),this.removeAttributesFromElementAndDescendants(f,i)):f=r,t?dom.getElementInnerHTML(f):dom.getElementOuterHTML(f))},i.prototype.reparent=function(t,i,r,u){var e=this.getNodeByUid(t),f,o;return!e||!e.parentNode?!1:(f=this.getNodeByUid(i),!f||!f.parentNode)?!1:(o=new n.RemoteDom.ReparentEdit(e,f,r),u.performEdit(o))},i.prototype.deleteElement=function(t,i){var u=!1,r,f;return(t.substr(0,5)==="style"&&(t=t.substr(5),u=!0),r=this.getNodeByUid(t),!r||!r.parentNode)?!1:(f=new n.RemoteDom.DeleteElement(r,u),i.performEdit(f))},i.prototype.getDomNodeDetails=function(n,i){var r=this.getNodeByUid(n),u,f,o,e;if(!r)return{uid:n,tag:"",attributes:null,childCount:-1,childIndex:-1,parentUid:null};for(u=this.getFirstChild(r),f=0;u;)t.RemoteStatic.isWhitespace(u)||f++,u=u.nextSibling;return o=this.getAttributesDetails(r),e={uid:n,tag:this.getTagName(r),attributes:o,childCount:f,childIndex:i||this.getChildIndex(r),parentUid:this.getUidOfNode(this.getParentNode(r)),textPreview:Common.RemoteHelpers.getLeafTextContentPreviewText(r)},e},i.prototype.getChildren=function(n){if(this.isFrame(n)){var t=n,r=Common.RemoteHelpers.getDefaultView(t.ownerDocument),i=Common.RemoteHelpers.getValidWindow(r,t.contentWindow);if(!i.isValid)return null;n=i.window.document}return n.childNodes},i.prototype.getChildIndex=function(n){var r,u,i,f;if(n.parentNode)for(r=this.getParentNode(n),u=0,i=0;i<r.childNodes.length;i++){if(f=r.childNodes[i],f===n)return u;t.RemoteStatic.isWhitespace(f)||u++}return-1},i.prototype.getChildUidsByIndex=function(n,i){var f=this.getNodeByUid(n);if(!f)return[];for(var e=[],u=0,o=i[u],r=this.getFirstChild(f),s=0;r;){if(!t.RemoteStatic.isWhitespace(r)){if(s===o){if(e.push(this.getUidOfNode(r)),u++,u>=i.length)break;o=i[u]}s++}r=r.nextSibling}return e},i.prototype.getAttributesDetails=function(n){var t,r,i,u;if(n){if(t=undefined,n.attributes)for(t=[],r=n.attributes,i=0;i<r.length;i++)u=r[i],t.push({name:u.name,value:u.value});else n.nodeType===3?t=[{name:"textContent",value:n.nodeValue}]:n.nodeType===4?t=[{name:"textContent",value:n.nodeValue}]:n.nodeType===8?t=[{name:"textContent",value:n.nodeValue}]:n.nodeType===10&&(t=[{name:"textContent",value:n.nodeName}]);return t}},i.prototype.getTagName=function(n){switch(n.nodeType){case 3:return"#text";case 8:return"#comment";case 10:return"#doctype"}return n.nodeName},i.prototype.getFirstChild=function(n){var r;if(this.isFrame(n)){var t=n,u=Common.RemoteHelpers.getDefaultView(t.ownerDocument),i=Common.RemoteHelpers.getValidWindow(u,t.contentWindow);return i.isValid?(r=i.window.document,r.firstChild):null}return n.firstChild},i.prototype.isFrame=function(n){var t=this.getTagName(n);return t==="FRAME"||t==="IFRAME"},i.prototype.getNodeByUid=function(n){var t=this._document;return(n!=="#root"&&(t=this._nodeMap.getNode(n)),!htmlTreeHelpers.isElementAccessible(t))?null:t},i.prototype.getParentNode=function(n){return n.parentNode},i.prototype.getUidOfNode=function(n){return n===this._document?"#root":this._nodeMap.getOrAssignUid(n)},i.prototype.removeAttributesFromElement=function(n,t){n.attributes.length>0&&t.forEach(function(t){n.removeAttribute(t)})},i.prototype.removeAttributesFromElementAndDescendants=function(n,t){var i,r,e,u,f;if(t&&t.length!==0)for(i=[n];i.length>0;)for(r=i.pop(),this.removeAttributesFromElement(r,t),e=r.childNodes.length,u=0;u<e;++u)f=r.childNodes[u],f.nodeType===f.ELEMENT_NODE&&i.push(f)},i}();t.DomTree=i})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(t){var c=new domexplorer.Remote.RemoteDomService(browser),o=new domexplorer.Remote.RemoteColorPicker(c,diagnostics),i=Common.RemoteHelpers,s,h,u;(function(n){n[n.ELEMENT_NODE=1]="ELEMENT_NODE";n[n.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE";n[n.TEXT_NODE=3]="TEXT_NODE";n[n.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE";n[n.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE";n[n.ENTITY_NODE=6]="ENTITY_NODE";n[n.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE";n[n.COMMENT_NODE=8]="COMMENT_NODE";n[n.DOCUMENT_NODE=9]="DOCUMENT_NODE";n[n.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE";n[n.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE";n[n.NOTATION_NODE=12]="NOTATION_NODE"})(s||(s={}));h=function(){function n(){}return n.createNodeStringEntry=function(n){var r,t,s,f,h,v,l,y,c,e,a,o,u;if(Common.HtmlTreeHelpers.isEmptyTextElement(n))return null;if(t={},n.nodeType===9||n.nodeType===11)t.tag="#document",t.text=null;else if(s=n,s.tagName){if(f=null,r=(""+s.tagName).toLowerCase(),n.nodeName==="STYLE"?(h=n,v=h.styleSheet?h.styleSheet.cssText:i.getLeafTextContent(n)):n.nodeName==="SCRIPT"&&i.getDocumentMode()<9||(r==="!"&&n.nodeName==="#comment"&&i.getDocumentMode()<9?(r=n.nodeName,f=i.getLeafTextContent(n)):r==="comment"&&i.getDocumentMode()<9?f=i.getLeafTextContent(n):n.childNodes.length===1&&(l=n.childNodes[0],y=i.getLeafTextContent(l))),c=[],n.attributes)for(e=0,a=n.attributes.length;e<a;e++)o=n.attributes[e],o&&c.push({name:""+o.name,value:""+o.value});t.tag=r;t.text=f;t.attributes=c}else n.nodeType?(u="",n.nodeType===10?(r="#doctype",u=i.getDocumentTypeNodeText(n)):n.nodeType===8?(r="#comment",u=i.getLeafTextContent(n)):n.nodeType===3&&(r="#text",u=i.getLeafTextContent(n)||"",u=u.trim()),t.tag=r,t.text=u):(t.tag=null,t.text=null);return t},n}();u=function(){function n(){this._editStack=null;this._handlerSafeKeyDown=null;this._handlerSafeUnload=null;this._hostId=null;this._mediaQueryLists=null;this._safeMqlListener=null;this._scriptExecutionSupported=!1;this._storedElements={}}return Object.defineProperty(n.prototype,"storedElements",{get:function(){return this._storedElements},set:function(n){this._storedElements=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"editStack",{get:function(){return this._editStack||(this._editStack=new Common.EditStack),this._editStack},set:function(){throw new Error("Cannot set the editStack")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"expandToSelectedItemCallback",{get:function(){return this._callbackExpandToSelectedItem},set:function(n){this._callbackExpandToSelectedItem=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hostId",{get:function(){return this._hostId},set:function(n){this._hostId=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"mediaQueryLists",{get:function(){return this._mediaQueryLists},set:function(n){this._mediaQueryLists=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"safeMqlListener",{get:function(){return this._safeMqlListener},set:function(n){this._safeMqlListener=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scriptExecutionSupported",{get:function(){return this._scriptExecutionSupported},set:function(){throw new Error("Cannot set the scriptExecutionSupported")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"startSelectElementByClickCallback",{get:function(){return this._callbackStartSelectElementByClick},set:function(n){this._callbackStartSelectElementByClick=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"stopSelectElementByClickCallback",{get:function(){return this._callbackStopSelectElementByClick},set:function(n){this._callbackStopSelectElementByClick=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"unloadSafe",{get:function(){return this._handlerSafeUnload},set:function(n){this._handlerSafeUnload=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"vsFocusCallback",{get:function(){return this._callbackVsFocus},set:function(n){this._callbackVsFocus=n},enumerable:!0,configurable:!0}),n.prototype.getUidOrNull=function(n){return n?""+t.getNodeMap().getUid(n)||null:null},n.prototype.onSubtreeModified=function(i){var f,u,s,e,o;if(i&&i.target&&(f=i.target,u={},!n.isTextAreaNode(f.parentElement)&&(!n.isTextAreaNode(f)||i.type!=="DOMSubtreeModified"))){u.type=i.type;s=null;e=!0;switch(i.type){case"DOMCharacterDataModified":u.targetUid=this.getNodeUid(f,!1);o=this.getNodeUid(f.parentNode,!1);!u.targetUid&&o?(u.type="DOMNodeRefresh",u.targetUid=o,e=!1):u.targetUid&&t.domUtilities.isWhitespaceOnlyTextNode(f)&&o?(u.type="DOMNodeRemoved",u.parentHasNoChildren=!this.nodeHasChildren(f.parentNode,f),u.parentUid=o,u.targetChildIndex=t.getDomTree().getChildIndex(f),e=!1):(u.newValue=i.newValue,u.prevValue=i.prevValue,u.parentTextPreview=Common.RemoteHelpers.getLeafTextContentPreviewText(f.parentNode));break;case"DOMAttrModified":case"DOMAttributeNameChanged":u.attrName=i.attrName;u.newValue=i.newValue||f.getAttribute(u.attrName);u.prevValue=i.prevValue;(u.newValue||u.prevValue)&&(u.targetUid=this.getNodeUid(f,!1),u.attrChange=i.attrChange,i.attrName==="style"&&(s=f));break;case"DOMNodeInserted":if(t.domUtilities.isWhitespaceOnlyTextNode(f)||(u.targetUid=this.getNodeUid(f,!0),u.parentUid=this.getNodeUid(f.parentNode,!0),u.targetChildIndex=this.findChildIndex(f.parentNode,f)),this.isDuplicateTextNodeInsertion(u,f)){this._lastMutation=u;return}break;case"DOMNodeRemoved":t.domUtilities.isWhitespaceOnlyTextNode(f)||(u.targetUid=this.getNodeUid(f,!0),u.parentHasNoChildren=!this.nodeHasChildren(f.parentNode,f),u.parentUid=this.getNodeUid(f.parentNode,!0),u.targetChildIndex=t.getDomTree().getChildIndex(f));break;case"DOMSubtreeModified":u.targetUid=this.getNodeUid(f,!1);u.textPreview=Common.RemoteHelpers.getLeafTextContentPreviewText(f);break;default:return}u.targetUid&&(t.domUtilities.getMutationManager().processMutation(u,e,e?f:null),s&&r.styleAttrModified(s),u.type==="DOMNodeRemoved"&&t.getNodeMap().unmapNode(u.targetUid));u.type!=="DOMSubtreeModified"&&(this._lastMutation=u)}},n.prototype.initialize=function(){var n=this;typeof browser!="undefined"&&(this._handlerBeforeScriptExecute||(this._handlerBeforeScriptExecute=function(t){return n.onBeforeScriptExecute(t)}),this._handlerInspectElement||(this._handlerInspectElement=function(n){return t.dom$messageHandlers.inspectElement(n.target)}),i.addListener(browser,"beforeScriptExecute",this._handlerBeforeScriptExecute),i.addListener(browser,"inspectElement",this._handlerInspectElement));this._handlerInitializePage||(this._handlerInitializePage=function(){return n.onInitializePage()});this._handlerDetach||(this._handlerDetach=function(){return n.onDetach()});remoteHelpers.initialize("DomExplorer",this._handlerInitializePage,"__BROWSERTOOLS_DOMEXPLORER_ADDED",this._handlerDetach)},n.prototype.forceInitializePage=function(){this.onInitializePage()},n.prototype.forceNavigationReset=function(){this.onBeforeScriptExecute(i.getDefaultView(browser.document))},n.isTextAreaNode=function(n){return n&&n.tagName&&n.tagName.toLowerCase()==="textarea"},n.prototype.isDuplicateTextNodeInsertion=function(n,t){return!!n&&!!this._lastMutation&&n.type==="DOMNodeInserted"&&this._lastMutation.type==="DOMNodeInserted"&&n.targetUid===this._lastMutation.targetUid&&!!t&&t.nodeType===t.TEXT_NODE&&n.parentUid===this._lastMutation.parentUid&&n.targetChildIndex===this._lastMutation.targetChildIndex},n.prototype.nodeHasChildren=function(n,i){for(var r=n.firstChild;r;){if(r!==i&&!t.domUtilities.isWhitespaceOnlyTextNode(r))return!0;r=r.nextSibling}return!1},n.prototype.onInitializePage=function(){var n,t;try{n=i.getDefaultView(mainBrowser.document);browser.executeScript(i.getJMCScriptUrl("library"),n);this._scriptExecutionSupported=!0}catch(r){this._scriptExecutionSupported=!1}try{n=i.getDefaultView(browser.document);this.addRemotePageFunctions(n);t={docMode:i.getDocumentMode(),contextInfo:n.location.href};remoteHelpers.port.postMessage("RefreshTree:"+JSON.stringify(t))}catch(u){return}},n.prototype.onDetach=function(){t.dom$messageHandlers.cancelSelectElementByClick();this._editStack=null;r.clearCache(!0);t.domUtilities.reset();i.removeListener(browser,"beforeScriptExecute",this._handlerBeforeScriptExecute);i.removeListener(browser,"inspectElement",this._handlerInspectElement);try{this.detachMediaQueryEvents();var n=i.getDefaultView(browser.document);n.__BROWSERTOOLS_DOMEXPLORER_ADDED&&(n.__BROWSERTOOLS_DOMEXPLORER_ADDED=null);this._handlerSafeKeyDown&&(i.removeListener(browser.document,"keydown",this._handlerSafeKeyDown,!0),this._handlerSafeKeyDown=null);this.unloadSafe&&(i.removeListener(n,"unload",this.unloadSafe,!0),this.unloadSafe=null)}catch(u){}},n.prototype.detachMediaQueryEvents=function(){if(this.safeMqlListener&&this._mediaQueryLists)while(this._mediaQueryLists.length>0){var n=this._mediaQueryLists.pop();n.removeListener(this.safeMqlListener)}},n.prototype.onBeforeScriptExecute=function(n){n&&n.browserOrWindow&&(n=n.browserOrWindow);var r=null;try{r=i.getDefaultView(n.document)}catch(u){return}t.domUtilities.removeHighlight();r===i.getDefaultView(browser.document)?(remoteHelpers.port&&remoteHelpers.postAllMessages(),this.forceInitializePage()):t.domUtilities.reloadFrame(r)},n.prototype.addRemotePageFunctions=function(n){var r=this;this.scriptExecutionSupported&&(this._handlerSafeKeyDown||(this._handlerSafeKeyDown=i.addSafeListener(n,browser.document,"keydown",function(n){return r.onKeyDown(n)},!0)),n.console=n.console||new n.Object,n.console.select=i.createSafeFunction(n,t.dom$messageHandlers.selectElementFromConsole),n.__BROWSERTOOLS_DOMEXPLORER_ADDED=!0)},n.prototype.onKeyDown=function(n){if(n.keyCode===123&&this.hostId==="vs")return this.vsFocusCallback(),i.eventHandled(n);if(n.keyCode===66&&n.ctrlKey&&!n.shiftKey&&!n.altKey){if(!t.domUtilities.isSelectingElement&&this.startSelectElementByClickCallback)return this.startSelectElementByClickCallback(),i.eventHandled(n);if(t.domUtilities.isSelectingElement&&this.stopSelectElementByClickCallback)return this.stopSelectElementByClickCallback(),i.eventHandled(n)}},n.prototype.getNodeUid=function(n,i){return i?t.getNodeMap().getOrAssignUid(n):t.getNodeMap().getOrAssignUid(n,!0)},n.prototype.findChildIndex=function(n,i){for(var u=n.childNodes,e=u.length,f=0,r=0;r<e;r++){if(u[r]===i)return f;t.domUtilities.isWhitespaceOnlyTextNode(u[r])||f++}return undefined},n.LARGEST_CONSOLE_$X_VAR=4,n}();t.RemoteDomExplorer=u;t.domUtilities={isSelectingElement:!1,selectElementLastSelected:null,selectElementClickCallback:null,mutationManager:null,currentHoverItemUid:null,mediaStyleChangeCallback:null,currentEventProxy:null,attachedDomModifiedDocs:[],handlerSafeMutations:[],eventsToRegisterFor:["DOMAttrModified","DOMAttributeNameChanged","DOMCharacterDataModified","DOMNodeInserted","DOMNodeRemoved","DOMSubtreeModified"],getMutationManager:function(){return t.domUtilities.mutationManager||(t.domUtilities.mutationManager=new n.RemoteDom.MutationManager),t.domUtilities.mutationManager},currentEventProxyListeners:[],removeAllCurrentEventProxyListeners:function(){var n,i;if(t.domUtilities.currentEventProxy){if(t.domUtilities.currentEventProxyListeners)for(n=0;n<t.domUtilities.currentEventProxyListeners.length;n++)i=t.domUtilities.currentEventProxyListeners[n],t.domUtilities.currentEventProxy.removeEventListener(i.name,i.callback);t.domUtilities.currentEventProxyListeners=[]}},reset:function(){var f,e,r;for(t.resetNodeMap(),t.resetDomTree(),remoteHelpers.uid=0,t.domUtilities.removeHighlight(),t.domUtilities.isSelectingElement=!1,t.domUtilities.selectElementLastSelected=null,t.domUtilities.selectElementClickCallback=null,r=0;r<t.domUtilities.handlerSafeMutations.length;r++){f=t.domUtilities.handlerSafeMutations[r];try{i.removeListener(f.source,f.event,f.safeListener,!0)}catch(o){}}for(t.domUtilities.handlerSafeMutations=[],t.domUtilities.attachedDomModifiedDocs=[],t.domUtilities.getMutationManager().clearManager(),t.domUtilities.currentEventProxy&&(t.domUtilities.removeAllCurrentEventProxyListeners(),t.domUtilities.currentEventProxy=null),e=i.getDefaultView(browser.document),r=0;r<=u.LARGEST_CONSOLE_$X_VAR;r++)try{typeof e["$"+r]!="undefined"&&e["$"+r]===n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.storedElements["$"+r]&&(e["$"+r]=undefined)}catch(s){}n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.storedElements={}},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(n,t){if(!n||!n.tagName||!t)return!1;if(typeof browser!="undefined"&&typeof browser.highlightElement=="function")try{return browser.highlightElement(n,t.margin,t.border,t.padding,t.content),!0}catch(r){i.encounteredException(r)}return!1},removeHighlight:function(){if(typeof browser!="undefined"&&typeof browser.highlightElement=="function")try{browser.highlightElement(null,"","","","")}catch(n){i.encounteredException(n)}},selectElementInLiveDomEnable:function(){t.domUtilities.isSelectingElement&&typeof browser!="undefined"&&typeof browser.elementSelectionEventsEnabled!="undefined"&&(browser.elementSelectionEventsEnabled=!0,browser.addEventListener("selectElement",t.domUtilities.selectElementHandler),browser.addEventListener("hoverElement",t.domUtilities.hoverElementHandler))},selectElementInLiveDomDisable:function(){t.domUtilities.isSelectingElement&&typeof browser!="undefined"&&typeof browser.elementSelectionEventsEnabled!="undefined"&&(browser.elementSelectionEventsEnabled=!1,browser.removeEventListener("selectElement",t.domUtilities.selectElementHandler),browser.removeEventListener("hoverElement",t.domUtilities.hoverElementHandler))},selectElementHandler:function(n){n.target&&t.domUtilities.highlightElement(n.target,t.domUtilities.selectElementColor);t.domUtilities.selectElementLastSelected=n.target;t.domUtilities.selectElementClickCallback&&t.domUtilities.selectElementClickCallback()},hoverElementHandler:function(n){n.target&&t.domUtilities.highlightElement(n.target,t.domUtilities.hoverElementColor)},getElementAtCoords:function(n,r,u){var h=function(f){var e;if(typeof f.className!="string"||f.className.indexOf("win-appbarclickeater")===-1)if(f.tagName==="IFRAME"||f.tagName==="FRAME"){var h=f,o=t.domUtilities.getClientRect(f),c=i.getDefaultView(f.ownerDocument),s=i.getValidWindow(c,h.contentWindow);if(s.isValid)return e=i.getPageOffset(n),t.domUtilities.getElementAtCoords(s.window.document,r-o.left+e.x,u-o.top+e.y)}else return f;return!1},f,s,o,c,l,e,a,v;if(typeof n.msElementsFromPoint=="function"){for(s=n.msElementsFromPoint(r,u),o=0;o<s.length;o++)if(f=h(s[o]),typeof f!="boolean"&&(c=i.getDefaultView(n),l=i.getComputedStyle(c,f),l.visibility!=="hidden"))return f}else if(e=n.elementFromPoint(r,u),e)return f=h(e),typeof f!="boolean"?f:(a=e.style.visibility,e.style.visibility="hidden",v=t.domUtilities.getElementAtCoords(n,r,u),e.style.visibility=a,v);return null},getClientRect:function(n){var t,u;if(n&&n.getBoundingClientRect&&(t=n.getBoundingClientRect(),t.top!==undefined&&t.left!==undefined&&t.width!==undefined&&t.height!==undefined))return u=i.getPageOffset(n.ownerDocument),{left:t.left+u.x,top:t.top+u.y,width:t.width,height:t.height};for(var f=0,e=0,r=n;r&&r!==browser.document.body&&r!==browser.document;)f+=r.offsetTop,e+=r.offsetLeft,r=r.offsetParent;return{left:e,top:f,width:n.offsetWidth,height:n.offsetHeight}},reloadFrame:function(i){var u,o,c,r,l;if(!browser||!i||!browser.document||!i.document){n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.forceInitializePage();return}if(u=t.dom$messageHandlers.getIFrameChain(browser.document,i.document),u.length>0){var f=u[0],s="",e=null;try{s=n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.getUidOrNull(f)}catch(h){if((h.number&4294967295)==(2148139078&4294967295)){n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.forceInitializePage();return}throw h}if(!e&&(o=f.parentNode,e=null,s=n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.getUidOrNull(o),e))for(c=t.getNodeMap().getOrAssignUid(o.ownerDocument),r=0;r<t.domUtilities.attachedDomModifiedDocs.length;r++)if(t.domUtilities.attachedDomModifiedDocs[r].docUid===c){l={type:"DOMNodeInserted",target:f};t.domUtilities.attachedDomModifiedDocs[r].handler(l);break}}},getRootElementOfNode:function(n){if(n&&n.parentNode){for(var t=n.parentNode;t.parentNode;)t=t.parentNode;return t}return n},isWhitespaceOnlyTextNode:function(n){function t(n){var t=i.getLeafTextContent(n);if(typeof t=="string")return t.length>0?!/\S/.test(t):!0}return n!==null&&n.nodeType===3&&t(n)},getSubsequentNonTextNodeSibling:function(n,i){if(n){for(var r=i===1?n.nextSibling:n.previousSibling;t.domUtilities.isWhitespaceOnlyTextNode(r);)r=i===1?r.nextSibling:r.previousSibling;return r}return null},lastElementInsideIframe:function(n){var e=i.getDefaultView(n.ownerDocument),f=i.getValidWindow(e,n.contentWindow),r,u;if(!f.isValid)return null;u=f.window.document;do r=u,u=t.searchUtilities.getSubsequentNonWhiteSpacedChild(u,-1);while(u);return r.tagName==="IFRAME"||r.tagName==="FRAME"?t.domUtilities.lastElementInsideIframe(r):r},getSubsequentElementAfterIframe:function(n,i,r){var o,e,h,u,f,s;if(n)for(o=n.querySelectorAll("iframe, frame"),e=0,h=o.length;e<h;e++)if(i===o[e]){if(u=t.domUtilities.getSubsequentNonTextNodeSibling(i,r),r===-1)return u?u.tagName==="IFRAME"||u.tagName==="FRAME"?t.domUtilities.lastElementInsideIframe(u):u.childNodes&&u.childNodes.length>0&&t.searchUtilities.getSubsequentNonWhiteSpacedChild(u,r)?t.searchUtilities.getDeepestRightChild(u):u:i.parentNode;if(u)return u;for(f=i;f.parentNode;){if(s=t.domUtilities.getSubsequentNonTextNodeSibling(f.parentNode,1),s)return s;f=f.parentNode}}return null},isIframeElement:function(n){return n.tagName==="IFRAME"||n.tagName==="FRAME"},findParentChainForElement:function(r){var u=[],c=!1,e,h,o,s;try{for(var f=null,l=0,p=r;r;)if(u.splice(0,0,r),r.parentNode)r=r.parentNode;else if(i.getDefaultView(r)===i.getDefaultView(browser.document))break;else if(f||(f=t.dom$messageHandlers.getIFrameChain(browser.document,t.domUtilities.getRootElementOfNode(r))),f)r=f[l],l++;else break;u.splice(0,1);var a=t.getNodeMap(),v=[];for(e=0;e<u.length;e++)h=u[e],o=a.getOrAssignUid(h),o&&(s=a.getNode(o),s&&s===h&&s.nodeType!==9&&v.push(o))}catch(y){if((y.number&4294967295)==(2148139078&4294967295))c=!0;else throw y}return c&&n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.forceInitializePage(),v}};t.searchUtilities={previousDFSElement:null,iframeStack:null,skipTraversal:!1,querySelectorResults:[],getSubsequentNonWhiteSpacedChild:function(n,i){var u,r;if(n&&n.childNodes&&n.childNodes.length>0){if(n.childNodes.length===1&&(u=n.childNodes[0],n.tagName==="STYLE"&&n.styleSheet))return u;if(i===1){for(r=0;r<n.childNodes.length;r++)if(!t.domUtilities.isWhitespaceOnlyTextNode(n.childNodes[r]))return n.childNodes[r]}else for(r=n.childNodes.length-1;r>=0;r--)if(!t.domUtilities.isWhitespaceOnlyTextNode(n.childNodes[r]))return n.childNodes[r]}return null},getDeepestRightChild:function(n){for(var i=n,r;i;)n=i,i=t.searchUtilities.getSubsequentNonWhiteSpacedChild(n,-1);return n.tagName==="IFRAME"||n.tagName==="FRAME"?(r=t.domUtilities.lastElementInsideIframe(n),t.searchUtilities.initializeIframeStack(r,-1),r):n},obtainNextDFSElement:function(n,r){var u,f,e;if(n){if(n.tagName==="IFRAME"||n.tagName==="FRAME"){var s=n,h=i.getDefaultView(n.ownerDocument),o=i.getValidWindow(h,s.contentWindow);if(o.isValid)return t.searchUtilities.iframeStack.push(t.domUtilities.getSubsequentElementAfterIframe(t.domUtilities.getRootElementOfNode(n),n,1)),o.window.document}if(u=t.searchUtilities.getSubsequentNonWhiteSpacedChild(n,1),r&&u)return u;if(f=t.domUtilities.getSubsequentNonTextNodeSibling(n,1),f)return f;while(n.parentNode){if(e=t.domUtilities.getSubsequentNonTextNodeSibling(n.parentNode,1),e)return e;n=n.parentNode}}return null},obtainPreviousDFSElement:function(n,r){function f(n){var i,r;return(t.searchUtilities.previousDFSElement=n,i=t.domUtilities.getSubsequentNonTextNodeSibling(n,-1),i)?(r=t.searchUtilities.getDeepestRightChild(i),r?r:n.parentNode):n.parentNode}var e,u,s,o;if(n.tagName==="IFRAME"||n.tagName==="FRAME")return t.searchUtilities.previousDFSElement=n,e=t.domUtilities.getSubsequentElementAfterIframe(t.domUtilities.getRootElementOfNode(n),n,-1),t.searchUtilities.initializeIframeStack(e,-1),e;if(u=t.searchUtilities.getSubsequentNonWhiteSpacedChild(n,1),r&&u){if(t.searchUtilities.previousDFSElement===u)return f(n);if(u&&(u.tagName==="IFRAME"||u.tagName==="FRAME")){if(s=i.getDefaultView(u.ownerDocument),o=i.getValidWindow(s,u.contentWindow),o.isValid&&t.searchUtilities.previousDFSElement===o.window.document)return f(n)}else return t.searchUtilities.getDeepestRightChild(n)}else return f(n)},initializeIframeStack:function(n,r){var u=t.dom$messageHandlers.getIFrameChain(browser.document,t.domUtilities.getRootElementOfNode(n)),f,e,s,o;if(t.searchUtilities.iframeStack=[],t.searchUtilities.iframeStack.push(browser.document),u&&u.length>0)for(f=u.length;f>0;f--)e=browser.document,f!==u.length&&(s=i.getDefaultView(u[f].ownerDocument),o=i.getValidWindow(s,u[f].contentWindow),o.isValid&&(e=o.window.document)),r===1?t.searchUtilities.iframeStack.push(t.domUtilities.getSubsequentElementAfterIframe(e,u[f-1],1)):t.searchUtilities.iframeStack.push(u[f-1]);n.parentNode&&n!==browser.document.documentElement&&n.children&&n.children.length>0&&(t.searchUtilities.previousDFSElement=n.children[0])},listContainsElement:function(n,t){if(n&&n.length>0)for(var i=0;i<n.length;i++)if(t===n[i])return i;return-1},obtainSubsequentDFSElement:function(n,i,r){var u=!(n===r&&n!==browser.document&&i===-1);return i===1?t.searchUtilities.obtainNextDFSElement(n,u):t.searchUtilities.obtainPreviousDFSElement(n,u)},popOutOfIframe:function(){var n=t.searchUtilities.iframeStack.pop();return t.searchUtilities.iframeStack.length===0&&(t.searchUtilities.iframeStack.push(browser.document),t.searchUtilities.previousDFSElement=null),n},queryFrameUsingQuerySelector:function(n,r,u){for(var f,e,h,o=browser.document.__unitTest?browser.document:n.ownerDocument||n,s=0;s<t.searchUtilities.querySelectorResults.length;s++)if(t.searchUtilities.querySelectorResults[s].doc===o)return t.searchUtilities.querySelectorResults[s].result;if(f=[],t.searchUtilities.textContainsAnySearchTextCaseInsensitively(r,u))return f;try{if(o.querySelectorAll){if(e=o.querySelectorAll(r),e&&e.length>0)for(h=0;h<e.length;h++)f.push(e[h]);t.searchUtilities.querySelectorResults.push({doc:o,result:f})}}catch(c){i.encounteredException(c)}return f},createStringForElement:function(n){var r=n?n.parentNode:null,t,f,u,o,e;if(!n.tagName&&r&&r.tagName==="STYLE")return r.styleSheet?r.styleSheet.cssText:i.getTextContent(r);if(t=h.createNodeStringEntry(n),t){if(t.tag==="#comment")return t.text?"<!-- "+t.text+" -->":null;if(t.tag==="#document"||t.tag==="#doctype"||t.tag==="#script"||t.tag==="#text")return t.text||null;if(t.tag){if(f="<"+t.tag,t.attributes)for(u=0,o=t.attributes.length;u<o;u++)e=t.attributes[u],f+=" "+e.name+'="'+e.value+'"';return f+("><\/"+t.tag+">")}}return null},getSearchResult:function(n,r,u,f,e){var o,c,l,s,a,v,y,h;for(t.searchUtilities.querySelectorResults=[],t.searchUtilities.initializeIframeStack(n,u),o=n,c=!1,e&&e.length>0&&(s="(?:"+e.join("|")+")",s="(?:\\s"+s+"\\s*=\\s*([\"']).*?\\1)|(?:"+s+"\\s*=\\s*([\"']).*?\\2\\s)",l=new RegExp(s,"gi")),u===1&&(a=i.getLeafTextContentPreview(o),a&&a.isComplete&&(o=t.searchUtilities.obtainSubsequentDFSElement(o,u,n))),v=!1;!c;){if(f?f=!1:(v=!0,o=t.searchUtilities.obtainSubsequentDFSElement(o,u,n)),o&&((y=t.searchUtilities.queryFrameUsingQuerySelector(o,r,e),y&&t.searchUtilities.listContainsElement(y,o)!==-1)||(h=t.searchUtilities.createStringForElement(o,t.getNodeMap()),h&&(l&&(h=h.replace(l,"")),h.toLowerCase().indexOf(r.toLowerCase())!==-1))))return o;for(o===n&&v&&(c=!0);!o;)o=t.searchUtilities.popOutOfIframe(),f=!0}return null},textContainsAnySearchTextCaseInsensitively:function(n,t){var i,r,u;if(t&&t.length>0){i=n.toLowerCase();for(r in t)if(u=t[r],i.indexOf(u.toLowerCase())!==-1)return!0}return!1}};t.dom$messageHandlers={initializeHost:function(t){n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.hostId=t},startSingleEdit:function(){n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.startSingleEdit()},endSingleEdit:function(){n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.endSingleEdit()},enableEditChaining:function(){n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.enableChaining()},disableEditChaining:function(){n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.disableChaining()},undoLastEdit:function(){return n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.undo()},performNextEdit:function(){return n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.performNextEdit()},setTestEditCallbacks:function(t,i){n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.setTestEditCallbacks(t,i)},somethingToUndo:function(){return n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.somethingToUndo()},somethingToDo:function(){return n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.somethingToDo()},getRootElement:function(){if(t.domUtilities.reset(),typeof browser.document=="object"){if(i.getDocumentMode()<9&&browser.document.readyState!=="complete"){var r=i.getDefaultView(browser.document);i.addSafeListener(r,browser.document,"readystatechange",function(){browser.document.readyState==="complete"&&n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.forceInitializePage()},!1)}return"#root"}return null},editAttribute:function(i,u,f){var e=t.getNodeMap().getNode(i),o;if(e)return o=new n.RemoteDom.EditAttribute(r,htmlTreeHelpers,e,u,f),n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.performEdit(o)},removeAttribute:function(i,u){var f=t.getNodeMap().getNode(i),e;if(f)return e=new n.RemoteDom.RemoveAttribute(r,htmlTreeHelpers,f,u),n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.performEdit(e)},editText:function(r,u){var f=t.getDomTree().nodeMap.getNode(r),e;if(f)return i.getLeafTextContent(f)!==u?(e=new n.RemoteDom.EditText(f,u),n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.performEdit(e)):!1},hoverItem:function(n){var i=t.getDomTree().nodeMap.getNode(n);return i?(t.domUtilities.currentHoverItemUid=n,t.domUtilities.highlightElement(i,t.domUtilities.basicHighlightColor)):(t.domUtilities.currentHoverItemUid=null,t.domUtilities.removeHighlight(),!1)},hideHoverItem:function(){t.domUtilities.removeHighlight()},attachMediaQueryEvents:function(u){var f,l,s,o,e,a,v,h,c,y;if((t.domUtilities.mediaStyleChangeCallback=u,!(i.getDocumentMode()<=9))&&(f=i.getDefaultView(browser.document),f)&&n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.scriptExecutionSupported)for(n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.safeMqlListener=i.createSafeFunction(f,function(){r.stylechange()}),n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.mediaQueryLists=[],l=browser.document.styleSheets.length,s=0;s<l;s++){o=browser.document.styleSheets[s];o.media&&(e=f.matchMedia(o.media.mediaText),e.addListener(n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.safeMqlListener),n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.mediaQueryLists.push(e));a=o;try{for(v=a.cssRules.length,h=0;h<v;h++)c=o.cssRules[h],(c.type===f.CSSRule.MEDIA_RULE||c.type===f.CSSRule.IMPORT_RULE)&&(y=c,e=f.matchMedia(y.media.mediaText),e.addListener(n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.safeMqlListener),n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.mediaQueryLists.push(e))}catch(p){i.encounteredException(p)}}},selectElementByClick:function(n){!t.domUtilities.isSelectingElement&&browser.document.body&&(t.domUtilities.isSelectingElement=!0,t.domUtilities.selectElementInLiveDomEnable(),t.domUtilities.selectElementClickCallback=n)},cancelSelectElementByClick:function(){t.domUtilities.isSelectingElement&&(t.domUtilities.removeHighlight(),t.domUtilities.selectElementInLiveDomDisable(),t.domUtilities.isSelectingElement=!1,t.domUtilities.selectElementClickCallback=null)},getIFrameChain:function(n,r){for(var f,e=n.querySelectorAll("iframe, frame"),u=0,s=e.length;u<s;u++){var h=e[u],c=i.getDefaultView(n),o=i.getValidWindow(c,h.contentWindow);if(o.isValid){if(o.window.document===r)return[e[u]];if(f=t.dom$messageHandlers.getIFrameChain(o.window.document,r),f&&f.length>0)return f.push(e[u]),f}}return[]},getParentChainForSelectedElement:function(){return t.domUtilities.findParentChainForElement(t.domUtilities.selectElementLastSelected)},getParentChainForElement:function(n){var i=t.getDomTree().nodeMap.getNode(n);return t.domUtilities.findParentChainForElement(i)},getSelectedElement:function(){return t.getDomTree().nodeMap.getOrAssignUid(t.domUtilities.selectElementLastSelected)},inspectElement:function(i){return!i||!htmlTreeHelpers.isElementAccessible(i)?!1:(t.dom$messageHandlers.selectElementFromConsole(i),n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.vsFocusCallback(!0),!0)},inspectElementById:function(n){try{var i=dom.getElementByUniqueId(n);return t.dom$messageHandlers.inspectElement(i)}catch(r){return!1}},findTerm:function(n,i,r,u){var s=t.getDomTree().nodeMap,o;t.searchUtilities.previousDFSElement=null;t.searchUtilities.iframeStack=null;var h=!1,f=null,e,c=n.match(/^(style|script)/);return c?(e=s.getNode(n.replace(c[0],"")),e?r===1?(f=t.searchUtilities.obtainNextDFSElement(e,!1),h=!0,f||(t.searchUtilities.initializeIframeStack(e,1),t.searchUtilities.iframeStack&&t.searchUtilities.iframeStack.length?(f=t.searchUtilities.iframeStack[t.searchUtilities.iframeStack.length-1],t.searchUtilities.iframeStack=null):f=browser.document)):f=e:f=browser.document):(e=s.getNode(n),f=e?e:browser.document),o=t.searchUtilities.getSearchResult(f,i,r,h,u),o?t.domUtilities.findParentChainForElement(o):[]},getComputedBox:function(n){var o=t.getDomTree().nodeMap.getNode(n),s,e,l;if(o&&o.nodeType!==3){for(var u={offsetTop:0,offsetLeft:0,clientWidth:0,clientHeight:0},a=i.getDefaultView(browser.document),y=i.getComputedStyle(a,o),v=r.styleProperties,f=0;f<v.length;f++)u[v[f]]=y[v[f]];for(s=r.elementProperties,f=0;f<s.length;f++)u[s[f]]=o[s[f]];if(i.getDocumentMode()>=9&&typeof u.offsetTop=="undefined"&&typeof u.offsetLeft=="undefined"&&o&&o.getBoundingClientRect&&(e=o.getBoundingClientRect(),e.top!==undefined&&e.left!==undefined&&e.width!==undefined&&e.height!==undefined)){var h=browser.document.body,c=browser.document.documentElement,p=a.pageYOffset||c.scrollTop||h.scrollTop,w=a.pageXOffset||c.scrollLeft||h.scrollLeft,b=c.clientTop||h.clientTop||0,k=c.clientLeft||h.clientLeft||0;u.offsetTop=Math.round(e.top+p-b);u.offsetLeft=Math.round(e.left+w-k);u.clientWidth=e.width;u.clientHeight=e.height}for(l in u)u[l]&&(u[l]=r.standardizeLayoutUnits(u[l]));return u}},getComputedBoxValueByElement:function(n,t){for(var f,o=r.styleProperties,s,h,e,u=0;u<o.length;u++)if(o[u]===t){s=i.getDefaultView(browser.document);h=i.getComputedStyle(s,n);f=h[t];break}for(e=r.elementProperties,u=0;u<e.length;u++)if(e[u]===t){f=n[t];break}return r.standardizeLayoutUnits(f)},getWinningProperty:function(n){var t=r.getWinningProperty(n);return t?t.appliedProperty.uid:""},getCssClassesUsedInCurrentDocument:function(r){var f,u;if(i.getDocumentMode()<8)return[];if(f=browser.document,r){if(u=t.getDomTree().nodeMap.getNode(r),!u)return[];try{u.ownerDocument&&(f=u.ownerDocument)}catch(e){return[]}}return n.RemoteDom.CssInformationExtractor.getCssClassesUsedInCurrentDocument(f)},getLoadDocumentData:function(){var a=i.getDocumentMode()>=9,t=mainBrowser.document.documentElement,v=t&&t.outerHTML?t.outerHTML.length:0,o=0,s=0,h=0,c=0,l=0,n,e;if(a&&t){var r=mainBrowser.document.createTreeWalker(t,1,null,!1),u=[],f=[];do{if(u.length>0&&(n=u.pop(),r.currentNode=n,e=n.tagName,e==="IFRAME"?h++:e==="SCRIPT"&&n.hasAttribute("src")?c++:e==="LINK"&&n.hasAttribute("rel")&&n.rel.toUpperCase()==="STYLESHEET"&&l++),r.firstChild())for(f.push(r.currentNode);r.nextSibling();)f.push(r.currentNode);u.length===0&&(s++,o+=f.length,u=f,f=[])}while(u.length>0)}return{serializedLength:v,nodeCount:o,nestedLevel:s,iframeCount:h,scriptFileCount:c,stylesheetLinkCount:l}},getComputedStyles:function(n){var i=t.getDomTree().nodeMap.getNode(n),u;if(i)return i&&i.nodeType===3&&(i=i.parentNode),u=r.getComputedStyle(i),[u]},arrayContains:function(n,t){for(var i=0;i<n.length;i++)if(n[i]===t)return!0;return!1},clearStyleCache:function(){r.clearCache(!1);n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.reset()},getBulkChildNodesDetails:function(n,i){t.domUtilities.getMutationManager().flushQueuedMutations();var r=n.map(function(n){var i={parentUid:n.parentUid,childNodesDetails:[]},r=t.getDomTree().getChildUidsByIndex(n.parentUid,n.childIndexes);return r.forEach(function(r,u){var e=n.childIndexes[u],f=t.getDomTree().getDomNodeDetails(r,e);f.parentUid=n.parentUid;i.childNodesDetails.push(f)}),n.childUids.forEach(function(r){var u=t.getDomTree().getDomNodeDetails(r);u.parentUid=n.parentUid;i.childNodesDetails.push(u)}),i});i(r)},getParentChainForStyle:function(n){var i=r.getElementForStyle(n);if(i)return t.domUtilities.findParentChainForElement(i)},getStyles:function(n){var i=t.getDomTree().nodeMap.getNode(n);if(i)return i&&i.nodeType===3&&(i=i.parentNode),r.refreshCurrentRules(i)},getChangedStyles:function(){return r.getChangedRules()},editStylePropertyEnable:function(t,i){var u=r.lookupMappedProperty(t),f;u&&(f=new n.RemoteDom.EditStylePropertyEnable(r,u,i),n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.performEdit(f))},addElement:function(i,r,u){var e=t.getDomTree().nodeMap.getNode(i),f,o;return e?(f=null,r&&(f=t.getDomTree().nodeMap.getNode(r),!f))?!1:(o=new n.RemoteDom.AddElement(e,f,u),n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.performEdit(o)):!1},replaceElement:function(i,r){var u=t.getDomTree().nodeMap.getNode(i),f;return!u||!htmlTreeHelpers.isElementAccessible(u)?!1:(f=new n.RemoteDom.ReplaceElement(u,r),n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.performEdit(f))},editStylePropertyValue:function(t,i,u){var e=r.lookupMappedProperty(t),f;if(e)return f=new n.RemoteDom.EditStylePropertyValue(r,e,i,u),n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.performEdit(f),f.result},editStylePropertyName:function(t,i){var f=r.lookupMappedProperty(t),u;if(f)return u=new n.RemoteDom.EditStylePropertyName(r,f,i),n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.performEdit(u),u.result},revertProperty:function(t){var u=r.lookupMappedProperty(t),i;if(u)return i=new n.RemoteDom.RevertProperty(r,u),n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.performEdit(i),i.result},removeStyleProperty:function(t){var u=r.lookupMappedProperty(t),i;if(u)return i=new n.RemoteDom.EditStylePropertyRemove(r,u),n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.performEdit(i),i.result},clearCurrentEventProxy:function(){t.domUtilities.removeAllCurrentEventProxyListeners();t.domUtilities.currentEventProxy=null},collectEvents:function(n,r,u,f){var e=t.getDomTree().nodeMap.getNode(n),o,s,h;e&&(t.domUtilities.removeAllCurrentEventProxyListeners(),t.domUtilities.currentEventProxy=dom.getElementEventHelper(e),t.domUtilities.currentEventProxy)&&(t.domUtilities.currentEventProxy=dom.getElementEventHelper(e),o=function(n){t.dom$messageHandlers.onAdded(u,n)},s=function(n){t.dom$messageHandlers.onRemoved(f,n)},i.addListener(t.domUtilities.currentEventProxy,"listenerAdded",o),i.addListener(t.domUtilities.currentEventProxy,"listenerRemoved",s),t.domUtilities.currentEventProxyListeners||(t.domUtilities.currentEventProxyListeners=[]),t.domUtilities.currentEventProxyListeners.push({name:"listenerAdded",callback:o}),t.domUtilities.currentEventProxyListeners.push({name:"listenerRemoved",callback:s}),h=t.domUtilities.currentEventProxy.getEventHandlers(),r(h))},onAdded:function(n,t){n(t.listener)},onRemoved:function(n,t){n(t.listener)},setKeyBindCallbacks:function(t,i,r,u){n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.vsFocusCallback=t;n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.startSelectElementByClickCallback=i;n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.stopSelectElementByClickCallback=r;n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.expandToSelectedItemCallback=u},allowProcessToTakeForeground:function(){try{external.allowProcessToTakeForeground()}catch(n){}},getHWND:function(){return toolUI.getHWND()},takeForeground:function(){try{return external.takeForeground(),!0}catch(n){return!1}},runPaletteCollection:function(n){o.startPalette(n)},abortPaletteCollection:function(){o.stopPalette()},editStyleRuleAdd:function(t,i,u,f,e){var o=new n.RemoteDom.EditStyleRuleAdd(r,t,i,u,f,e);return n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.performEdit(o),o.result},editStyleRuleRemove:function(t){var u=r.lookupMappedRule(t),i;if(u&&(i=new n.RemoteDom.EditStyleRuleRemove(r,u),n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.performEdit(i)))return i.result},revertRule:function(t){var u=r.lookupMappedRule(t),i;if(u&&(i=new n.RemoteDom.RevertRule(r,u),n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.performEdit(i)))return i.result},editStylePropertyAdd:function(t,i,u,f,e){var s=r.lookupMappedRule(t),o;if(s&&(o=new n.RemoteDom.EditStylePropertyAdd(r,s,i,u,f,e),n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.performEdit(o)))return o.result},editStyleRuleSelector:function(t,i){var f=r.lookupMappedRule(t),u;if(f&&(u=new n.RemoteDom.EditStyleRuleSelector(r,f,i),n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack.performEdit(u)))return u.result},storeElementForConsole:function(r){var o=t.getNodeMap().getNode(r),e,f,s,h;if(o)try{if(o.ownerDocument===browser.document){for(f=u.LARGEST_CONSOLE_$X_VAR+1;f>0;f--)n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.storedElements["$"+f]=n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.storedElements["$"+(f-1)];for(n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.storedElements.$0=o,e=i.getDefaultView(browser.document),f=0;f<=u.LARGEST_CONSOLE_$X_VAR;f++)(typeof e["$"+f]=="undefined"||e["$"+f]===n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.storedElements["$"+(f+1)])&&(e["$"+f]=n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.storedElements["$"+f]);i.getDocumentMode()>=9&&(s=new e.Object,s.node=o,s.origin=n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.hostId,h=browser.document.createEvent("CustomEvent"),h.initCustomEvent("BPT-SelectedNode",!1,!1,s),e.dispatchEvent(h))}}catch(c){return}},selectElementFromConsole:function(r){var u,f;if(r&&r.ownerDocument&&(u=i.getDefaultView(r.ownerDocument),u&&i.isElement(u,r))){t.domUtilities.selectElementLastSelected=r;n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.expandToSelectedItemCallback();return}f=i.getDefaultView(browser.document);f.console.error("$$ConsoleSelectError$$")},reparentNode:function(i,r,u){return t.getDomTree().reparent(i,r,u,n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack)},copyElementWithStyle:function(n){return t.getDomTree().copyElementWithStyle(n,r)},getHTMLString:function(n,i,r){return t.getDomTree().getHTMLString(n,i,r)},log:[],getDomNodeDetails:function(n){return t.domUtilities.getMutationManager().flushQueuedMutations(),t.getDomTree().getDomNodeDetails(n)},getDomNodesDetails:function(n){var r,i;for(t.domUtilities.getMutationManager().flushQueuedMutations(),r=[],i=0;i<n.length;i++)r.push(t.getDomTree().getDomNodeDetails(n[i]));return r},setPseudoStyling:function(n,i,u){var f=t.getNodeMap().getNode(n);f&&r.setPseudoStyling(f,i,u)},deleteElement:function(i){return t.getDomTree().deleteElement(i,n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.editStack)},getPseudoStyling:function(n,i){var u=t.getNodeMap().getNode(n);if(u)return r.getPseudoStyling(u,i)},querySelector:function(n,i){var u=t.getNodeMap().getNode(n),r;if(u)return r=u.querySelector(i),r?t.getNodeMap().getOrAssignUid(r):void 0},addDocumentModifiedListener:function(r,u){var f,o,s,a,e,h,v;if(r==="#root")f=browser.document;else{if(o=t.getNodeMap().getNode(r),!o)return;if(o.tagName==="IFRAME"||o.tagName==="FRAME"){var c=o,y=i.getDefaultView(c.ownerDocument),l=i.getValidWindow(y,c.contentWindow);l.isValid&&(f=l.window.document)}else f=o.ownerDocument}if(f){for(s=t.getNodeMap().getOrAssignUid(f),e=0;e<t.domUtilities.attachedDomModifiedDocs.length;e++)if(t.domUtilities.attachedDomModifiedDocs[e].docUid===s)return;t.domUtilities.getMutationManager().getTreeModifiedCallback(f)||t.domUtilities.getMutationManager().setTreeModifiedCallback(f,u);a=i.getDefaultView(f);try{for(e=0;e<t.domUtilities.eventsToRegisterFor.length;e++)h=t.domUtilities.eventsToRegisterFor[e],v=i.addSafeListener(a,f,h,function(t){n.Tools.DomExplorer.DomExplorerRemoteApp.remoteCode.onSubtreeModified(t)},!0),t.domUtilities.handlerSafeMutations.push({source:f,safeListener:v,event:h})}catch(p){}t.domUtilities.attachedDomModifiedDocs.push({docUid:s,handler:u})}}};t.getNodeMap=function(){return f||(f=i.getDocumentMode()>=11?new t.NodeMap11(dom):new t.NodeMap5(dom)),f};t.getDomTree=function(){return e||(e=new t.DomTree(browser.document,t.getNodeMap())),e};t.resetNodeMap=function(){f=null};t.resetDomTree=function(){e=null};var f=null,e=null,r=new t.StyleUtilities(n.RemoteDom.domUtilities,t.getNodeMap())})(t=n.RemoteDom||(n.RemoteDom={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(t){var i;(function(t){var i=function(){function t(){}return t.main=function(){t.messageHandlers=n.RemoteDom.dom$messageHandlers;remoteHelpers=new Common.RemoteHelpers(t.messageHandlers);t.remoteCode=new n.RemoteDom.RemoteDomExplorer;t.remoteCode.initialize()},t}();t.DomExplorerRemoteApp=i})(i=t.DomExplorer||(t.DomExplorer={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));F12.Tools.DomExplorer.DomExplorerRemoteApp.main()
//# sourceMappingURL=DomExplorerRemote.min.js.map
.BPT-HTML-Mutation {
    background-color: TRANSPARENT; /*[{plugin-highlight-background-color rgba(0.35)}]*/
    color:TRANSPARENT; /*[{plugin-highlight-color}]*/
}

#treeContainer.drag-and-drop .BPT-listItemContainer * {
    pointer-events: none;
}

@media screen and (-ms-high-contrast: none) {
    #treeContainer .drag-item {
        opacity: 0.4;
    }
}

/* Override the selection and hover appearance and color theming provided by the list control for the htmltree */
#treeContainer .BPT-listItemContainer {
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
    background: transparent;
    border-color: transparent;
    overflow: visible;
}

#treeContainer .BPT-Hover-Highlight {
    border-width: 0;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
    border-color: TRANSPARENT;  /*[{plugin-treeview-content-mouseover-color rgba(0.25)}]*/
    margin-top: -1px;
    position: absolute;
    z-index: -1;
}

#treeContainer .BPT-Selected-Element-Highlight {
    background: rgba(51, 153, 255, 0.18); /*[{plugin-font-editor-selected-background-color rgba(0.18)}]*/
    border-bottom: 1px solid transparent;
    border-top: 1px solid transparent;
    border-color: TRANSPARENT; /*[{plugin-font-editor-selected-border-color}]*/
    margin-top: -2px;
    position: absolute;
    z-index: -1;
}

#treeContainer DIV.BPT-listItemContainer.drag-hover-before {
    border-top: 1px solid blue;
}

#treeContainer DIV.BPT-listItemContainer.drag-hover {
    border-bottom: 1px solid blue;
}

#treeContainer.drag-and-drop .BPT-listItemContainer * {
    pointer-events: none;
}

#treeContainer .BPT-stackPanel {
    overflow-y: scroll;
}

#treeContainer .BPT-stackPanel .domTreeItemDataTemplateName {
    overflow: visible;
}

.BPT-HTML-TextPreview {
    cursor: text;
    white-space: normal;
    word-break: break-all;
}

.BPT-HTML-Attribute-Section .BPT-HTML-Attribute {
    display: inline-block;
    word-break: normal;
}

.BPT-HTML-CData:before {
    content: "<![CDATA["
}

.BPT-HTML-CData:after {
    content: "]]>"
}

.BPT-HTML-Comment:before {
    content: "<!--"
}

.BPT-HTML-Comment:after {
    content: "-->"
}

.BPT-HTML-Value:before {
    color: TRANSPARENT;             /*[{plugin-font-editor-color}]*/
    content: "=\"";
}

.BPT-HTML-Value:after {
    color: TRANSPARENT;             /*[{plugin-font-editor-color}]*/
    content: "\"";
}

.BPT-HTML-DocType:before {
    color: TRANSPARENT;             /*[{plugin-font-editor-color}]*/
    content: "<!";
}

.BPT-HTML-DocType:after {
    color: TRANSPARENT;             /*[{plugin-font-editor-color}]*/
    content: ">";
}

.BPT-HTML-OpeningTag:before {
    color: TRANSPARENT;             /*[{plugin-font-editor-color}]*/
    content: "<";
}

.BPT-HTML-OpeningTag:after {
    color: TRANSPARENT;             /*[{plugin-font-editor-color}]*/
    content: ">";
}

.BPT-HTML-ClosingTag:before {
    color: TRANSPARENT;             /*[{plugin-font-editor-color}]*/
    content: "</";
}

.BPT-HTML-ClosingTag:after {
    color: TRANSPARENT;             /*[{plugin-font-editor-color}]*/
    content: ">";
}

.BPT-HTML-SelfClosingTag:before {
    color: TRANSPARENT;             /*[{plugin-font-editor-color}]*/
    content: "<";
}

.BPT-HTML-SelfClosingTag:after {
    color: TRANSPARENT;             /*[{plugin-font-editor-color}]*/
    content: " />";
}

.BPT-HTML {
    word-wrap: break-word;
    word-break: break-all;
    white-space: normal;
}

.BPT-HTML .BPT-HTML-ClosingTag {
    display: inline-block;
    word-wrap: normal;
    word-break: normal;
}

.domTreeItemDataTemplate .domTreeItemDataTemplateNameCell {
    /*-ms-grid-column: 1;
    -ms-grid-row: 1;*/
    display: flex;
    align-items: flex-start;
    position: relative;
    margin-left: 5px;
    line-height: 1.5em;
    margin-top: -0.2em; /* needed to shift the whole text up due to using a larger line-height */
}

.domTreeItemDataTemplateNameCell > .BPT-itemCollapsed,
.domTreeItemDataTemplateNameCell > .BPT-itemExpanded {
    margin-top: 0.4em;
}

.domTreeItemDataTemplate .domTreeItemDataTemplateNameCell .domTreeItemDataTemplateName {
    margin-left: 5px;
    margin-right: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

@media screen and (-ms-high-contrast: none) {
    #treeContainer .drag-item {
        opacity: 0.4;
    }
}.BPT-Style-Rule[aria-expanded='false']  > .BPT-Style-ExpandIcon,
.BPT-Style-Property[aria-expanded='false']  > .BPT-Style-PropertyValue-ExpandIcon {
    background-image: url(''); /*[url({vs-image-icon-tree-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({vs-image-icon-tree-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
b�OK	pHYs���+ cHRMz%������u0�`:�o�_�F`IDATx�c` ���
���R�R��)2� E8�+ª(����B\�P9�����)BV��(�Ę��~�<�S��S'�!+�����	IEND�B`��PNG


IHDR
b�OK	pHYs���+ cHRMz%������u0�`:�o�_�F`IDATx�c` (U� J�'�H����Sd��A�p*DW�U!P0YV���(r�q)�+2��S��p?Q
�1�3�D)$:x�)�,
�)�N2CV6��H<��gIEND�B`��PNG


IHDR
b�OK	pHYs���+ cHRMz%������u0�`:�o�_�FZIDATx�c
;��P��bb��{�������U��*��*D(&B!D15eu1�I <�c�"BQx��DA8M�p���>{6جIEND�B`��PNG


IHDR
b�OK	pHYs���+ cHRMz%������u0�`:�o�_�F[IDATx�cP������P��(�x#)�) F!'���U��U�PL�B�3���(���L��;X���$
�i�؄D��l�w��IEND�B`��PNG


IHDR$l5��	pHYs����k�gAMA���a�PLTEWWWUUUVVVUUUUUUUUUTTTUUUUUU```uuu����������������������������������������'�%�'�&�'�&�'�'�&�'�&�'�'�,5�HP����������������������������"�4tRNS 0P`�����������Ͽ�`P0  0@P`p���������������������sRGB��, cHRMz&�����u0�`:�p��Q<�IDATx�Քas�0�����i��h	�;B
���o+QlI��3���~��O,��^��n�Z���	�ѽ�G�Q�w��X�48��W,�@t���wAc�j���v��/h�ul�����u�3��)�����P�����Pp�3bH�F�3M��@qF�eZ��(ӂ�f���SB�Q��O̩���rjH��xԔ^Ks�1��#޻1��o:1%�8��}�!l�†3l������Stɲ�_��n�j�w�d���^��S��ѾuڶP-�a[��6�a�r���&.��֏%2&�y���֥ell����VZF��T���P����P�Nq�3jG�F�3M�ߥ}y�Qʁ,E���6E�5�_�t����a���Sr
,x����z-�C��Z�|%�ĦW6f=�8�M��Cۦ�EW�)6����:Rg��3sG8�]&O=�Aư<�xW���Z��i�+�i��Z��y�K���Y%�Q�r��L�4[:��W,�Rv����uA3�j~8Wv��	/��ue�����u�*�h}���J
���a�_HNqF.H�Hq�)��/2R:��(ӂE�5�_>�0��2�b*N%�L�Sz-�C�N�Z���?$��ޭ��/y������m�4a#6�ac�`>=��?���%܃��IEND�B`��PNG


IHDR$l�gAMA���asRGB��, cHRMz&�����u0�`:�p��Q<	pHYs����k��IDATx����m�P�a���:4�\�rxe�^��TëR	*E(`�������8R��8d��Z��[ǜ�J� 9����vGR �����l���v�o�O��)������~J�.�~S	�Yn��� 6�2�`08Q���h�	@He�CQ�@���$�AR$�AR���<��q�v���L�1'��AI��Cs��N��#)�J
�@�A���+�2_;I�q��o��A4��'s~3i�0ד��yMe %��vD]�Od@�Z�6G�G@|d�` �q�� )�� )R� �˲��J)�bsK��A:49(���%"�� C
+�2����S����DeYvA�e�E�	Z�e�Ta�Y�Ք@�QRBhgԉ��m����(>�P�@���$�AR$�AR�m�L�D5�ܽIEND�B`��PNG


IHDR�v�	pHYs���+ cHRMz%������u0�`:�o�_�FOIDATx�c`p�TA����T	�]@����0��$B�t�.I��H�cL�BlND��R
��@�J��F\z�\�^IEND�B`��PNG


IHDR$l5��	pHYs����k�gAMA���a�PLTEOOOWWWUUUSWWVVVUUUTVVUUUUUUTVVTUUUUUTVVTUUUVVUVVy�z�y�y�z�y�y�y�z�z�y�{�z�w��������������������������������������������������z����/tRNS 0@P`p����������Ͽ����p`P@0  0@P`p��������ظ]sRGB��, cHRMz&�����u0�`:�p��Q<IDATx�Քy��0���*(�"�����۴HJ:�y�vf7h~M������34~�o@�_��^o�PLY�Ŗ���3z���4�����+p��G��0ӳ�#_j�),�z&}ǒ��(�-���L�I�'��H-��}[SC�}t�b��Yo��[�h������[QT�X��@�W������p9������#'�|��
>�9C�M�����P�.%R�w�1Rٲ��bI�w_��xu.㨩��I���!�^��i������X���F���
(�ހ"��߬�8ބ
?����Ȓ�[u��ЇK���y�1��z�J�s�l�����d�{܁�0�$4K�.T�9S�*jI@ђ,�r��7&�N��,ȼ�\�V�-T���T��0a+�������~�ZjI����5mq��3C���	ƟH݂ͦ�Y�}J�i�3i�y�1P�h�R����@%�_X�m٭z��.Z��I
����!��7��y�̶�!�,����u�o���c-f�X6b�no@�@{�����h��|�s���c{��qQ�I��T!<��V}��٥΂9X*�Ʉ�d[|�,	�3���Ƀ\���E-�sV�:z"��NO.yx�R�l6Z������J��#����_A{�&�����8�+�?�֭�|‰�OӉ䟩˝js�w^A�eo{��e��e���dEݫ�7U^_��,��N�j��\�I��H�גȍ�Ա@�����%��#��
��)�eIEND�B`��PNG


IHDR$l5��	pHYs����k�gAMA���a�PLTEOOOWWWUUUSWWVVVUUUUUUUUUTVVTUUUUUTVVTUUUVVUVVy�z�z�y�y�z�y�y�y�z�z�y�{�z�w�����������������������������������������������ɌX.tRNS 0@P`����������Ͽ����p`P@0  0@P`���������H�sRGB��, cHRMz&�����u0�`:�p��Q<IDATx���r�0�/���h�"�KU���I6ƨ#ө�>v�	����"����
��_�l�k�mP��_�n�	�<� :hDP�Wѹj!�r���l�[����(B-st��z�2�`���5E;^��f�ig���7�Eh@q�=Bz��!ϐ���ֻ�3vT_j�p8Ԑa\��7��Dj��4]>�W�0�x�UE
3r"n�Ԗv�����|���J��@E�b��{���e|
��f|�VSIMS����R�hY�LhKXR�* *�
�U�V���m�����x=Q��A�(ֻ�g\��ߤ'
�[�aR�0���4����n8-?]q�#;���QU���*��CE
�審�A�Ϣ�ܺ�����@_�m
�{�B+����f|�K&��!�2G���n�-��h�QSl��k5�\;��5��6����w��p�!{�_�^�]�;� 5xx<j�0�ZPq�r"5{Z�.�~M�7�Pv+�RIEND�B`��PNG


IHDR$l�%
�	pHYs����k�gAMA���aPLTE������UUU"y��|,�tRNS@O��sRGB��, cHRMz&�����u0�`:�p��Q<aIDATx�ݒ�	0��BV�
������-Q��t �`� P���j"����J]H �2��%��/d=�R�B�`j��&�Yϙk}?���iT`�7zIEND�B`��PNG


IHDR `K����PLTE�����������������������������������������������������������������������������������������������������������������½�����������������������ttteeeUUU"y�=��R��e��v�І�ԕ�٢�ݰ����������������P�[5tRNS*,L]fn����������
z�UIDATx��U�V�@D
&gQI�QY�	F&��sYV��== �@|��O3g�tUus
�Fe����f=��0����U]"�3��'‚!_D1V4��]A�<���9�)<�k�3�`F�.6D�`��n �\���8ćG�)���.��',�8]�aV>	��l�";_F�J���\�����/����P�P�8'���"�Ā>:�ZmJ�+��B��B��\�âY��"ͅ�&;R=Ϛ���s�d�]ᨹ��'�5�?9��1���S�����O�K��߭�+ݼ�|��d��CR�F�Û<�6@��|�R;%�M�G�<D9�%���t
5VI��.R���C�[��ʬ%v������+�	�d�h��a'��'�2ZlJ@.��J��B��W\�ۺY5�C���v�dG�?�&�ȇ|#��v�p���O>|�|p�Iȱ���/�5xUc�����|��0�vJ>�cO��O9��|p��t
5��{��T�-��ӰT�䃯��0�_L�!���A�_z;$�Oe>�ؔG��4��oO���I!�>j̇Ps��ɎT�GM
��X4���p�����3ŮH��IEND�B`�.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})]*/
}

body.xamlWindow .BPT-Toolbar .BPT-button.colorPickerButton .buttonIcon {
    background-image: url("../common/images/colorPicker/sliderButton.png"); /*[url({plugin-common-image-colorpicker-slider-button})]*/
}//! Copyright (C) Microsoft. All rights reserved.
var ControlTemplates,debuggerShellForTestContractsOnly,__extends,F12;(function(n){var t;(function(n){var t;(function(n){var t=Common.Uri,i=Common.UriComponents,u=Common.UriFormat,r=function(){function n(){this._nextWorkspaceId=0;this._externalOriginToWorkspaceMap=new Map;this._workspaceToExternalOriginMap=new Map;this._freeWorkspaceIds=[]}return Object.defineProperty(n.prototype,"size",{get:function(){return this._workspaceToExternalOriginMap.size},enumerable:!0,configurable:!0}),n.prototype.isWorkspaceUri=function(t){if(!t)throw new TypeError("Argument not optional: uri.");return t.scheme===n.UriSchemeF12},n.prototype.hasWorkspace=function(t){if(!t)throw new TypeError("Argument not optional: workspaceUri.");if(t.scheme!==n.UriSchemeF12)throw new URIError("Invalid workspace Uri.");var i=t.origin;return this._workspaceToExternalOriginMap.has(i)},n.prototype.getWorkspaceUri=function(r,u){var s,h;if(u===void 0&&(u=!1),!r)throw new TypeError("Argument not optional: sourceUri.");if(this.isWorkspaceUri(r))return r;var e=r.origin,o=r.getComponents(i.Pathname|384,1),f=this._externalOriginToWorkspaceMap.get(e);return(!f||u)&&(s="workspace",e.length===0&&(o.length===0||o.charAt(0)!=="/")&&(s+="-relative"),f=t.create({scheme:n.UriSchemeF12,hostname:s,port:this.getNextWorkspace()}),h=f.origin,this._externalOriginToWorkspaceMap.set(e,f),this._workspaceToExternalOriginMap.set(h,new t(e))),new t(f,o)},n.prototype.getExternalUri=function(n){var f,u,r;if(!n)throw new TypeError("Argument not optional: sourceUri.");if(!this.isWorkspaceUri(n))return n;if(f=n.origin,u=this._workspaceToExternalOriginMap.get(f),!u)throw new Error("Unknown workspace.");return(r=n.getComponents(i.Pathname|384,1),n.hostname==="workspace-relative"&&r.length>0&&r.charAt(0)==="/")?new t(r.substr(1)):new t(u,r)},n.prototype.deleteWorkspace=function(t){var i,r,u;if(!t)throw new TypeError("Argument not optional: workspaceUri.");if(t.scheme!==n.UriSchemeF12)throw new URIError("Invalid workspace Uri.");return(i=t.origin,r=this._workspaceToExternalOriginMap.get(i),!r)?!1:(u=r.origin,this._workspaceToExternalOriginMap.delete(i),this._externalOriginToWorkspaceMap.delete(u),this._freeWorkspaceIds.push(t.port),!0)},n.prototype.getNextWorkspace=function(){if(this._freeWorkspaceIds.length>0)return this._freeWorkspaceIds.shift();if(this._nextWorkspaceId>0&&this._nextWorkspaceId-1===n.MAX_WORKSPACE_ID)throw new Error("Out of workspaces.");return this._nextWorkspaceId++},n.MAX_WORKSPACE_ID=Math.pow(2,32)-1,n.UriSchemeF12="f12",n}();n.WorkspaceUriMapper=r})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var i=Microsoft.Plugin,t=i.Promise,r=function(){function n(n){this._doc=n;this._id=Common.ResourcesView.ResourceViewController.NextModelId++}return Object.defineProperty(n.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"modelName",{get:function(){return n.ModelName},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"displayName",{get:function(){return this._doc.displayName},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"tooltip",{get:function(){return this._doc.tooltip},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"doc",{get:function(){return this._doc},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"texts",{get:function(){return this._doc=this._doc.latestRevision,this._doc.originalRevision.prettyPrintState=this._doc.isPrettyPrintedTextSaved||this._doc.prettyPrintEnabled?0:1,t.join({original:this.originalText,modified:this.modifiedText})},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"editorState",{get:function(){return this._editorState},set:function(n){this._editorState=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"modifiedText",{get:function(){return this._doc.editorState?t.as(this._doc.editorState.model.getValue()):this._doc.getText()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"originalText",{get:function(){return this._doc.originalRevision.getText()},enumerable:!0,configurable:!0}),n.ModelName="DocDiff",n}();n.DocDiff=r})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function t(n){this._resourceViewController=n.resourceViewController;this._diffMap=new Map;this._resourceViewController.registerListener(this)}return t.prototype.open=function(t){var r=this,i;return this._docDiffWindow||(this._docDiffWindow=new n.DocDiffWindow),i=t,this._docDiffWindow.openDiff(i).then(function(){return r._docDiffWindow})},t.prototype.close=function(n){this._docDiffWindow.closeDiff(n)},t.prototype.resourceRemoved=function(t){var i,r;t instanceof n.Doc&&(i=t,this._diffMap.has(i.frontendId)&&(r=this._diffMap.get(i.frontendId),this._diffMap.delete(i.frontendId),i.nextRevision?this._diffMap.set(i.latestRevision.frontendId,r):this._resourceViewController.resourceRemoved(r)))},t.prototype.onAttach=function(){this.doLayout()},t.prototype.doLayout=function(){this._docDiffWindow.doLayout()},t.prototype.openDiffForDoc=function(n){this._resourceViewController.open(this.getDiffForDoc(n))},t.prototype.getDiffForDoc=function(t){var i=this._diffMap.get(t.frontendId);return i||(i=new n.DocDiff(t),this._resourceViewController.resourceAdded(i),this._diffMap.set(t.frontendId,i)),i},t}();n.DocDiffHandler=t})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var r=Microsoft.Plugin,t=Common.UriComponents,f=Common.UriFormat,u,i;(function(n){n[n.None=0]="None";n[n.Authored=1]="Authored";n[n.All=2]="All"})(n.ResolveFileType||(n.ResolveFileType={}));u=n.ResolveFileType;i=function(){function i(n,t){this._resourceViewController=t.resourceViewController;this._documentController=t.documentController;this._languageServiceController=t.languageServiceController;this._resolvingFileTypes=0;this._resolvedMap=[];this._added=[];this._removed=[];this._languageServiceController.registerProjectResolver(this)}return Object.defineProperty(i.prototype,"isResolvingAllFiles",{get:function(){return this._resolvingFileTypes===2},enumerable:!0,configurable:!0}),i.prototype.resolveMoreFilesForUrl=function(n){var u,f,r,t;if(!this.isResolvingAllFiles&&i.isResolvableUrl(n)){for(this._resolvingFileTypes++,u=this._documentController.getDocs(),f=u.length,r=0;r<f;r++)t=u[r],t&&this.isResolvableDocument(t)&&!t.editorState&&!this._resolvedMap[t.frontendId]&&(this._added[t.frontendId]=!0);return this._isRegistered||(this._isRegistered=!0,this._resourceViewController.registerListener(this)),!0}return!1},i.prototype.resolve=function(){var t=this,i=[],u=[],f,n;if(this._resolvingFileTypes!==0){for(n in this._removed)u.push(this._resolvedMap[n]),delete this._resolvedMap[n];f=function(n){var r=t._documentController.getDocFromFrontendId(n),u;r&&(u=t.getFileContent(r).then(function(n){return t._resolvedMap[r.frontendId]=n.path,n}),i.push(u))};for(n in this._added)f(n);this._added=[];this._removed=[]}return r.Promise.join(i).then(function(n){return{added:n,removed:u}})},i.prototype.resourceAdded=function(t){if(t instanceof n.Doc){var i=t;this.isResolvableDocument(i)&&(this._removed[i.frontendId]&&delete this._removed[i.frontendId],this._resolvedMap[i.frontendId]||(this._added[i.frontendId]=!0))}},i.prototype.resourceRemoved=function(t){var i,r;t instanceof n.Doc&&(i=t,this.isResolvableDocument(i)&&(this._added[i.frontendId]&&delete this._added[i.frontendId],this._resolvedMap[i.frontendId]&&(r=i.getMonacoUri(this._documentController.workspaceUriMapper),this._removed[i.frontendId]=!0)))},i.prototype.resourceClosed=function(t){if(t instanceof n.Doc){var i=t;this.isResolvableDocument(i)&&(this._added[i.frontendId]=!0)}},i.prototype.resourceOpened=function(t,i){if(t instanceof n.Doc&&i!==0){var r=t;this.isResolvableDocument(r)&&(this._added[r.frontendId]?delete this._added[r.frontendId]:this._resolvedMap[r.frontendId]&&(this._removed[r.frontendId]=!0))}},i.isInternalUrl=function(n){return n.slice(0,i.BROWSERTOOLS_PROTOCOL.length).toLowerCase()===i.BROWSERTOOLS_PROTOCOL},i.isResolvableUrl=function(n){var r=!1,t;return i.isInternalUrl(n)||(t=n.slice(-3).toLowerCase(),r=t===".ts"||t===".js"),r},i.prototype.isResolvableDocument=function(n){var t,r;switch(this._resolvingFileTypes){case 0:t=!1;break;case 1:case 2:r=this._resolvingFileTypes===2?!0:n.isAuthored;t=!i.isInternalUrl(n.url.toString())&&r;break;default:throw new Error("Unknown ResolverFileType")}return t},i.prototype.getUrlForMonaco=function(n){var i=n.getMonacoUri(this._documentController.workspaceUriMapper);return"/"+i.getComponents(t.HostnameAndPort|t.PathnameAndSearch,3)},i.prototype.getFileContent=function(n){var t=this;return n.getText().then(function(i){return{path:t.getUrlForMonaco(n),value:i}})},i.BROWSERTOOLS_PROTOCOL="browsertools://",i}();n.ProjectResolver=i})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));window.define&&define("debugger/LanguageService/projectResolver",["require","exports","vs/base/network","vs/languages/typescript/typescript.contribution"],function(n,t){t.ProjectResolver=F12.Tools.Debugger.ProjectResolver});
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.setAlertMessage=function(t){n.AlertElement||(n.AlertElement=document.getElementById(n.ARIA_ALERT_ZONE_ID));n.AlertElement&&(n.AlertElement.innerText=t)},n.ARIA_ALERT_ZONE_ID="debuggerAriaAlertZone",n}();n.AriaController=t})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={})),function(n){var t=function(){function n(){}return n.resourceToolbarButton='<div class="resourceButtonContainer BPT-button" tabindex="1">          <span class="resourceButton buttonIcon"><\/span>        <\/div>',n.debuggerButtonsPanel='<div>            <div data-name="continueButton" data-control="Common.Controls.Button" data-binding="isEnabled:isExecutionPaused" data-control-templateid="Common.iconButton24x24" data-options="className:continueButton,                                tooltip:ContinueButtonTooltip; converter=Common.CommonConverters.HtmlTooltipFromResourceConverter"><\/div>            <div data-name="breakButton" data-control="Common.Controls.ToggleButton" data-binding="isEnabled:breakState; converter=Common.CommonConverters.NotDisabledToTrue,                                isChecked:breakState; converter=Common.CommonConverters.OnToTrue" data-control-templateid="Common.iconButton24x24" data-options="className:breakButton,                                tooltip:BreakButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="stepIntoButton" data-control="Common.Controls.Button" data-binding="isEnabled:isExecutionPaused" data-control-templateid="Common.iconButton24x24" data-options="className:stepIntoButton,                                tooltip:StepIntoButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="stepOverButton" data-control="Common.Controls.Button" data-binding="isEnabled:isExecutionPaused" data-control-templateid="Common.iconButton24x24" data-options="className:stepOverButton,                                tooltip:StepOverButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="stepOutButton" data-control="Common.Controls.Button" data-binding="isEnabled:isExecutionPaused" data-control-templateid="Common.iconButton24x24" data-options="className:stepOutButton,                                tooltip:StepOutButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="breakWorkerButton" data-control="Common.Controls.ToggleButton" data-binding="isEnabled:isDebuggingDisabled; converter=Common.CommonConverters.InvertBool,                                isChecked:breakOnAnyNewWorkerStartingEnabled; mode=twoway" data-control-templateid="Common.iconButton24x24" data-options="className:breakWorkerButton,                                tooltip:BreakWorkerButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="breakOnExceptionButton" data-control="Common.Controls.DropDownButton" data-binding="className:exceptionFilter; converter=F12.Tools.Debugger.CommonConverters.ToExceptionClass,                                isEnabled:isDebuggingDisabled; converter=Common.CommonConverters.InvertBool" data-control-templateid="Common.menuButton33x24x5" data-options="tooltip:BreakOnExceptionButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="toggleDebuggingButton" data-control="Common.Controls.ToggleButton" data-binding="isEnabled:allowDisconnectDebugging,                                isChecked:isDebuggingDisconnected; mode=twoway,                                tooltip:isDebuggingDisabled; converter=F12.Tools.Debugger.CommonConverters.ToDisconnectDebuggingTooltip" data-control-templateid="Common.iconButton24x24" data-options="className:disconnectButton"><\/div>            <div data-name="jmcButton" data-control="Common.Controls.ToggleButton" data-binding="isEnabled:debuggerManager.jmcController.isJustMyCodeAvailable,                                isChecked:debuggerManager.jmcController.isJustMyCodeEnabled; mode=twoway" data-control-templateid="Common.iconButton24x24" data-options="className:jmcButton,                                tooltip:JustMyCodeDebugMyCodeTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="findResultsButton" data-control="Common.Controls.ToggleButton" data-binding="isEnabled:debuggerManager.debuggerShell.findResultsWindow.canToggle,                                isChecked:debuggerManager.debuggerShell.isShowingFindResults; mode=twoway,                                isVisible:debuggerManager.languageServiceController.isEnabled,                                tooltip:debuggerManager.debuggerShell.isShowingFindResults; converter=F12.Tools.Debugger.CommonConverters.ToFindResultsTooltip" data-control-templateid="Common.iconButton24x24" data-options="className:findResultsButton"><\/div>        <\/div>',n.debuggerDocumentPanel='<div>            <div data-name="diffButton" data-control="Common.Controls.Button" data-binding="isVisible:isEditSourceSupported,                                isEnabled:isEditable,                                event-click:onDiffButtonClick" data-control-templateid="Debugger.resourceToolbarButton" data-options="className:diffButton,                                tooltip:DiffOffTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="saveButton" data-control="Common.Controls.Button" data-binding="isVisible:isEditSourceSupported,                                isEnabled:isEditable,                                event-click:editorWindow.save" data-control-templateid="Debugger.resourceToolbarButton" data-options="className:saveButton,                                tooltip:DebuggerSaveButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="prettyPrintButton" data-control="Common.Controls.ToggleButton" data-binding="isEnabled:prettyPrintState; converter=Common.CommonConverters.NotDisabledToTrue,                                isChecked:prettyPrintState; converter=Common.CommonConverters.OnToTrue; mode=twoway,                                event-click:onPrettyPrintClickTelemetry" data-control-templateid="Debugger.resourceToolbarButton" data-options="className:prettyPrintButton,                                tooltip:PrettyPrintButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="wordWrapButton" data-control="Common.Controls.ToggleButton" data-binding="isEnabled:editorWindow.wordWrapEnabled; converter=Common.CommonConverters.NotDisabledToTrue,                                isChecked:editorWindow.wordWrapEnabled; converter=Common.CommonConverters.OnToTrue; mode=twoway,                                event-click:onWordWrapClickTelemetry" data-control-templateid="Debugger.resourceToolbarButton" data-options="className:wordWrapButton,                                tooltip:WordWrapButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="jmcDocumentButton" data-control="Common.Controls.ToggleButton" data-binding="isEnabled:libraryState; converter=Common.CommonConverters.NotDisabledToTrue,                                isChecked:libraryState; converter=Common.CommonConverters.OnToTrue; mode=twoway,                                tooltip:libraryState; converter=F12.Tools.Debugger.CommonConverters.ToJMCDocumentToolTip,                                event-click:onJmcDocumentClickTelemetry" data-control-templateid="Debugger.resourceToolbarButton" data-options="className:jmcDocumentButton"><\/div>            <div data-name="sourceMapButton" data-control="Common.Controls.ToggleButton" data-binding="isEnabled:sourceMapState; converter=Common.CommonConverters.NotDisabledToTrue,                                isChecked:sourceMapState; converter=Common.CommonConverters.OnToTrue; mode=twoway,                                tooltip:sourceMapState; converter=F12.Tools.Debugger.CommonConverters.ToSourceMapTooltip,                                event-click:onSourceMapClickTelemetry" data-control-templateid="Debugger.resourceToolbarButton" data-options="className:sourceMapButton"><\/div>        <\/div>',n.webStoragePanel='<div>            <div data-name="simulateCapButton" data-control="Common.Controls.ToggleButton" data-binding="isChecked:simulateCap; mode=twoway" data-control-templateid="Debugger.resourceToolbarButton" data-options="className:simulateCapButton,                                tooltip:SimulateCapButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="refreshStorageButton" data-control="Common.Controls.Button" data-binding="event-click:viewModel.refresh" data-control-templateid="Debugger.resourceToolbarButton" data-options="className:refreshStorageButton,                                tooltip:ResourceGridRefresh; converter=Common.CommonConverters.ResourceConverter"><\/div>        <\/div>',n.cookiesPanel='<div>            <div data-name="refreshStorageButton" data-control="Common.Controls.Button" data-binding="event-click:viewModel.refresh" data-control-templateid="Debugger.resourceToolbarButton" data-options="className:refreshStorageButton,                                tooltip:ResourceGridRefresh; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="clearAllButton" data-control="Common.Controls.Button" data-binding="event-click:viewModel.deleteAll" data-control-templateid="Debugger.resourceToolbarButton" data-options="className:clearAllCookiesButton,                                tooltip:CookiesGridDeleteAll; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="clearAllSessionButton" data-control="Common.Controls.Button" data-binding="event-click:viewModel.deleteAllSession" data-control-templateid="Debugger.resourceToolbarButton" data-options="className:clearAllSessionCookiesButton,                                tooltip:CookiesGridDeleteAllSession; converter=Common.CommonConverters.ResourceConverter"><\/div>        <\/div>',n.findResultsButtonsPanel='<div>            <div data-name="previousResultButton" data-control="Common.Controls.Button" data-binding="isEnabled:hasResults" data-control-templateid="Common.iconButton24x24" data-options="className:previousResultButton,                                tooltip:PreviousResultButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="nextResultButton" data-control="Common.Controls.Button" data-binding="isEnabled:hasResults" data-control-templateid="Common.iconButton24x24" data-options="className:nextResultButton,                                tooltip:NextResultButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="clearResultsButton" data-control="Common.Controls.Button" data-binding="isEnabled:hasResults" data-control-templateid="Common.iconButton24x24" data-options="className:clearResultsButton,                                tooltip:ClearResultsButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div class="spacer"><\/div>            <div data-name="pinFindResultsWindowButton" data-control="Common.Controls.ToggleButton" data-binding="isChecked:isPinned; mode=twoway,                                   tooltip:isPinned; converter=F12.Tools.Debugger.CommonConverters.ToPinFindResultsTooltip" data-control-templateid="Common.iconButton24x24" data-options="className:pinFindResultsWindowButton,                                 tooltip:PinFindResultsWindowButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="closeFindResultsWindowButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton24x24" data-options="className:closeFindResultsWindowButton,                                 tooltip:CloseFindResultsWindowButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>        <\/div>',n.exceptionMenuDropDown='<ul>            <div data-name="breakOnNoneMenuItem" data-control="Common.Controls.MenuItem" data-binding="isChecked:exceptionFilter; converter=F12.Tools.Debugger.CommonConverters.ToExceptionFilterNone" data-control-templateid="Common.menuItemCheckMarkTemplate" data-options="content:BreakOnExceptionButtonNone; converter=Common.CommonConverters.ResourceConverter,                                groupName:ExceptionFilter"><\/div>            <div data-name="breakOnUnhandledExceptionsMenuItem" data-control="Common.Controls.MenuItem" data-binding="isChecked:exceptionFilter; converter=F12.Tools.Debugger.CommonConverters.ToExceptionFilterUnhandled" data-control-templateid="Common.menuItemCheckMarkTemplate" data-options="content:BreakOnExceptionButtonUnhandled; converter=Common.CommonConverters.ResourceConverter,                                groupName:ExceptionFilter"><\/div>            <div data-name="breakOnAllExceptionsMenuItem" data-control="Common.Controls.MenuItem" data-binding="isChecked:exceptionFilter; converter=F12.Tools.Debugger.CommonConverters.ToExceptionFilterHandled" data-control-templateid="Common.menuItemCheckMarkTemplate" data-options="content:BreakOnExceptionButtonAll; converter=Common.CommonConverters.ResourceConverter,                                groupName:ExceptionFilter"><\/div>        <\/ul>',n}();n.Debugger=t}(ControlTemplates||(ControlTemplates={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var i,t,r,u,f,e,o,s,h,c;(function(n){n[n.On=0]="On";n[n.Off=1]="Off";n[n.Disabled=2]="Disabled"})(n.Tristate||(n.Tristate={}));i=n.Tristate;t=function(){function n(n,t,i,r,u,f,e,o,s,h,c){this.id=n;this.parentId=t;this.isRootChild=i;this.url=r;this.mimeType=u;this.length=f;this.isDynamicCode=e;this.headers=o;this.longDocumentId=s;this.sourceMapUrl=h;this.sourceUrlOverride=c}return n}();n.Source=t,function(n){n[n.BreakOnAny=0]="BreakOnAny";n[n.BreakOnAnyNewWorkerStarting=1]="BreakOnAnyNewWorkerStarting";n[n.BreakIntoSpecificWorker=2]="BreakIntoSpecificWorker";n[n.UnsetBreakOnAnyNewWorkerStarting=3]="UnsetBreakOnAnyNewWorkerStarting"}(n.CauseBreakAction||(n.CauseBreakAction={}));r=n.CauseBreakAction,function(n){n[n.Abort=0]="Abort";n[n.Continue=1]="Continue";n[n.StepInto=2]="StepInto";n[n.StepOver=3]="StepOver";n[n.StepOut=4]="StepOut";n[n.Ignore=5]="Ignore";n[n.StepDocument=6]="StepDocument"}(n.BreakResumeAction||(n.BreakResumeAction={}));u=n.BreakResumeAction,function(n){n[n.Deleted=0]="Deleted";n[n.Disabled=1]="Disabled";n[n.Enabled=2]="Enabled";n[n.Pending=3]="Pending"}(n.BreakpointState||(n.BreakpointState={}));f=n.BreakpointState,function(n){n[n.None=0]="None";n[n.Unhandled=1]="Unhandled";n[n.Handled=2]="Handled"}(n.ExceptionFilter||(n.ExceptionFilter={}));e=n.ExceptionFilter,function(n){n[n.Step=0]="Step";n[n.Breakpoint=1]="Breakpoint";n[n.DebuggerBlock=2]="DebuggerBlock";n[n.HostInitiated=3]="HostInitiated";n[n.LanguageInitiated=4]="LanguageInitiated";n[n.DebuggerHalt=5]="DebuggerHalt";n[n.Error=6]="Error";n[n.Jit=7]="Jit";n[n.MutationBreakpoint=8]="MutationBreakpoint"}(n.BreakReason||(n.BreakReason={}));o=n.BreakReason,function(n){n[n.General=0]="General";n[n.AsmjsInDebugging=1]="AsmjsInDebugging";n[n.AsmjsSucceeded=2]="AsmjsSucceeded";n[n.AsmjsFailed=3]="AsmjsFailed"}(n.DebugEventInfoType||(n.DebugEventInfoType={}));s=n.DebugEventInfoType,function(n){n[n.None=0]="None";n[n.Update=1]="Update";n[n.Delete=2]="Delete";n[n.All=n.Update|n.Delete]="All"}(n.MutationType||(n.MutationType={}));h=n.MutationType,function(n){n[n.Succeeded=0]="Succeeded";n[n.Failed=1]="Failed";n[n.FailedAlreadyAttached=2]="FailedAlreadyAttached"}(n.ConnectionResult||(n.ConnectionResult={}));c=n.ConnectionResult;n.breakpointIdNotFound="BKP:notfound:"})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){var t;(function(n){"use strict";var i=Microsoft.Plugin,r=i.F12.Communications,u=function(){function u(u){var f=this;this._resourceViewController=u.resourceViewController;this._debuggerManager=u;i.F12.isTargetEdge&&(r.addEventListener("targetAdded",function(n){return f.onTargetAdded(n)}),r.addEventListener("targetRemoved",function(n){return f.onTargetRemoved(n)}));this._originCount=new t(function(t){var i=[new n.WebStorageModel(0,t,f._debuggerManager),new n.WebStorageModel(1,t,f._debuggerManager)];return i.forEach(function(n){return f._resourceViewController.resourceAdded(n)}),i},function(n){n.forEach(function(n){return f._resourceViewController.resourceRemoved(n)})});this._hrefCount=new t(function(t){var i=new n.CookiesModel(f._debuggerManager,t);return f._resourceViewController.resourceAdded(i),i},function(n){f._resourceViewController.resourceRemoved(n)})}return u.prototype.onTargetAdded=function(n){var t=n.customData,i,r;t&&t.origin&&(i=t.origin,r=t.href,this._originCount.increment(i),this._hrefCount.increment(r))},u.prototype.onTargetRemoved=function(n){var t=n.customData,i,r;t&&t.origin&&(i=t.origin,r=t.href,this._originCount.decrement(i),this._hrefCount.decrement(r))},u}(),t;n.TargetManager=u;t=function(){function n(n,t){this._counts=new Map;this._valueByKey=new Map;this._valueCreator=n;this._onValueRemoved=t}return Object.defineProperty(n.prototype,"size",{get:function(){return this._valueByKey.size},enumerable:!0,configurable:!0}),n.prototype.has=function(n){return this._counts.has(n)},n.prototype.increment=function(n){var t=this._counts.get(n)||0;return(this._counts.set(n,t+1),t<1)?(this._valueByKey.set(n,this._valueCreator(n)),!0):!1},n.prototype.decrement=function(n){var i=this._counts.get(n)||0,t,r;if(i>0)return(t=i-1,t===0)?(r=this._valueByKey.get(n),this._valueByKey.delete(n),this._counts.delete(n),this._onValueRemoved(r),!0):(this._counts.set(n,t),!1)},n}()})(t=n.ResourcesHandlers||(n.ResourcesHandlers={}))})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){var i;(function(i){"use strict";var r=Microsoft.Plugin,f=Common.ResourcesView,o=function(){function n(){}return n.prototype.open=function(n){var i=this;return this._initialized||this.init(),t.Telemetry.analytics.logExecuteCommand(t.Telemetry.CommandName.COOKIES_OPENED,5),n.viewModel=this._viewModel,this._viewModel.loadModel(n).then(function(){return window.setImmediate(i.doLayout.bind(i)),i._resourceGrid})},n.prototype.close=function(){},n.prototype.doLayout=function(){this._resourceGrid.doLayout()},n.prototype.onAttach=function(){this._resourceGrid.init()},n.prototype.init=function(){this._viewModel=new u;this._resourceGrid=new f.ResourceGrid(this._viewModel);this._resourceGrid.rootElement.classList.add("resourceHandler");this.searchProvider=new i.GridSearchProvider(this._viewModel)},n}(),u,e;i.CookiesHandler=o;u=function(){function t(){this.columns=[t.makeColumnInfo("name",r.Resources.getString("CookiesGridNameLabel")),t.makeColumnInfo("value",r.Resources.getString("CookiesGridValueLabel")),t.makeColumnInfo("domain",r.Resources.getString("CookiesGridDomainLabel"),!1),t.makeColumnInfo("path",r.Resources.getString("CookiesGridPathLabel"),!1),t.makeColumnInfo("expires",r.Resources.getString("CookiesGridExpiresLabel"),!1),t.makeBoolColumnInfo("httpOnly",r.Resources.getString("CookiesGridHTTPLabel")),t.makeBoolColumnInfo("secure",r.Resources.getString("CookiesGridSecureLabel"))];this.dataView=new Slick.Data.DataView({inlineFilters:!0});this._currentSortInfo={sortColName:"key",ascending:!0};this._titleProperty=new Common.EventSource}return Object.defineProperty(t.prototype,"title",{get:function(){return this._titleProperty},enumerable:!0,configurable:!0}),t.prototype.loadModel=function(n){return n!==this._model&&(this._model=n,this.dataView.beginUpdate(),this.dataView.setItems([]),this.dataView.endUpdate(),this._titleProperty.invoke(this._model.tooltip)),this.refresh()},t.prototype.addItem=function(n){var i=this;this._model&&(n.value=n.value||"",this.dataView.addItem(t.makeGridItem(n.name,n.value)),this._model.setItem(t.storageEntryFromGridItem(n)).then(function(){return i.refresh()}))},t.prototype.editItem=function(n,i,r){var e=this,f;if(this._model){var u=i.field,o=r.serializedValue,s=n[u];u==="name"&&/^\s*$/.test(o)||(r.execute(),f=function(){return e._model.setItem(t.storageEntryFromGridItem(n)).then(function(){return e.refresh()})},u==="name"?this._model.removeItems([{name:s,domain:n.domain}]).then(function(){return f()}):f())}},t.prototype.removeItems=function(t){var i=this,r=t.map(function(t){var r=i.dataView.getItem(t);return r||n.Utility.Assert.failDebugOnly("The view tried to delete a cookie that doesn't exist in the view model"),r});this._model.removeItems(r).done(function(){return i.refresh()})},t.prototype.refresh=function(){var n=this;return this._model.refresh().then(function(t){n.dataView.beginUpdate();n.syncStorageAndGrid(t);n.internalSort();n.dataView.endUpdate()})},t.prototype.sort=function(n){this._currentSortInfo=n;this.internalSort()},t.prototype.createContextMenuItems=function(n){var t=this,i=[];return i.push({id:"menuItemDeleteCookie",callback:function(){return t.removeItems([n])},label:r.Resources.getString("CookiesGridDelete"),type:1,disabled:function(){return n<0||n===null||n>=t.dataView.getLength()},accessKey:r.Resources.getString("AccessKeyDel")}),i.push({id:"menuItemDeleteAllCookies",callback:this.deleteAll.bind(this),label:r.Resources.getString("CookiesGridDeleteAll"),type:1,disabled:function(){return!1},accessKey:r.Resources.getString("/Common/AccessKeyCtrlShiftDel")}),i.push({id:"menuItemDeleteAllSessionCookies",callback:function(){return t._model.deleteSessionCookies().then(function(){return t.refresh()})},label:r.Resources.getString("CookiesGridDeleteAllSession"),type:1,disabled:function(){return!1},accessKey:r.Resources.getString("/Common/AccessKeyCtrlDel")}),i},t.prototype.setupGridDataEvents=function(n){var t=this;n.onKeyDown.subscribe(function(i){i.which===46&&i.ctrlKey&&i.shiftKey&&!i.altKey&&!n.getCellEditor()?t._model.deleteAll().then(function(){return t.refresh()}):i.which!==46||!i.ctrlKey||i.altKey||n.getCellEditor()||t._model.deleteSessionCookies().then(function(){return t.refresh()})})},t.makeGridItem=function(n,i){return{id:t.NextId+++"",domain:"",expires:"",httpOnly:!1,name:n,path:"",value:i,secure:!1}},t.expiresFieldFromStorageEntry=function(n){return n.session?r.Resources.getString("CookiesGridSessionCellLabel"):new Date(n.expires).toUTCString()},t.gridItemFromStorageEntry=function(n){return{id:t.NextId+++"",domain:n.domain,expires:t.expiresFieldFromStorageEntry(n),httpOnly:n.httpOnly,name:n.name,path:n.path,secure:n.secure,session:n.session,value:n.value}},t.storageEntryFromGridItem=function(n){return{domain:n.domain,expires:null,httpOnly:n.httpOnly,name:n.name,path:n.path,secure:n.secure,session:n.session,value:n.value}},t.keyFromCookie=function(n){return[n.name,n.domain,n.path].join("/")},t.cookieMapFromStorageData=function(n){for(var u,r=new Map,i=0;i<n.length;i++)u=t.keyFromCookie(n[i]),r.set(u,n[i]);return r},t.makeBoolColumnInfo=function(n,i){var r=t.makeColumnInfo(n,i,!1);return r.formatter=function(n,t,i){return i?"✓":""},r.cssClass="cookiesGrid-bool",r.headerCssClass="cookiesGrid-header-"+n,r.maxWidth=25,r.resizable=!1,r.showF12Tooltip=!0,r},t.makeColumnInfo=function(n,t,i){i===void 0&&(i=!0);var r={id:n,name:t,field:n,sortable:!0};return i&&(r.editor=Slick.Editors.Text),r},t.prototype.deleteAll=function(){var n=this;this._model.deleteAll().then(function(){return n.refresh()})},t.prototype.deleteAllSession=function(){var n=this;this._model.deleteSessionCookies().then(function(){return n.refresh()})},t.prototype.updateGridItemFromStorageEntry=function(n,i){for(var r,e,u=!1,f=0;f<this.columns.length;f++)r=this.columns[f].field,r==="expires"?(e=t.expiresFieldFromStorageEntry(n),e!==i.expires&&(i.expires=e,u=!0)):i[r]!==n[r]&&(i[r]=n[r],u=!0);return u},t.prototype.internalSort=function(){var n=this._currentSortInfo.sortColName,t=this._currentSortInfo.ascending;n==="expires"?this.dataView.sort(function(n,t){return n.expires===t.expires?0:n.session?-1:t.session?1:Date.parse(n.expires)-Date.parse(t.expires)},t):this.dataView.sort(function(t,i){return Common.ToolWindowHelpers.naturalSort(t[n],i[n])},t)},t.prototype.syncStorageAndGrid=function(n){for(var u=this,f=t.cookieMapFromStorageData(n),i,o=this.dataView.getItems().slice(),e=o.length-1;e>=0;e--){var r=o[e],s=t.keyFromCookie(r),h=f.get(s);h?(this.updateGridItemFromStorageEntry(h,r)&&this.dataView.updateItem(r.id,r),f.delete(s)):r.domain===""&&r.path===""?i=r:this.dataView.deleteItem(r.id)}f.forEach(function(n){i&&n.name===i.name?(u.updateGridItemFromStorageEntry(n,i)&&u.dataView.updateItem(i.id,i),i=null):u.dataView.addItem(t.gridItemFromStorageEntry(n))});i&&this.dataView.deleteItem(i.id)},t.NextId=0,t}();i.CookiesViewModel=u;e=function(){function n(n,t){this.toolbarPanelTemplate="Debugger.cookiesPanel";this._debuggerManager=n;this._href=t;this._id=f.ResourceViewController.NextModelId++}return Object.defineProperty(n.prototype,"persistenceKey",{get:function(){return"cookies/"+this._href},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"shouldBePersisted",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"modelName",{get:function(){return n.ModelName},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"displayName",{get:function(){return Common.ToolWindowHelpers.createShortenedUrlText(this._href)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"tooltip",{get:function(){return this._href},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),n.prototype.refresh=function(){return this._debuggerManager.retrieveCookies(this._href)},n.prototype.removeItems=function(n){return this._debuggerManager.deleteCookies(n,this._href)},n.prototype.deleteAll=function(){return this._debuggerManager.deleteAllCookies(this._href)},n.prototype.deleteSessionCookies=function(){return this._debuggerManager.deleteSessionCookies(this._href)},n.prototype.setItem=function(n){return this._debuggerManager.setCookie(n,this._href)},n.ModelName="cookies",n}();i.CookiesModel=e})(i=t.ResourcesHandlers||(t.ResourcesHandlers={}))})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(t){t&&(this._gridViewModel=t,this._columnNames=this._gridViewModel.columns.map(function(n){return n.field}),this.setSearchText(""),this._gridViewModel.dataView.setFilter(n.testItem))}return Object.defineProperty(n.prototype,"disableButtons",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"searchText",{get:function(){return this._searchText},enumerable:!0,configurable:!0}),n.prototype.findNextMatch=function(n){return this.setSearchText(n),this._gridViewModel.dataView.refresh(),t.Promise.wrap(!0)},n.prototype.findAndHighlightMatches=function(n){n===void 0&&(n=this.searchText);this.setSearchText(n);this._gridViewModel.dataView.refresh()},n.prototype.getSearchTextFromSelection=function(n){return n},n.testItem=function(n,t){for(var r,u=t.searchText||"",f=Common.EncodingUtilities.escapeRegExp(u),e=new RegExp(f,"gi"),i=0;i<t.columns.length;i++)if(r=t.columns[i],e.test(n[r]))return!0;return!1},n.prototype.setSearchText=function(n){this._searchText=n;this._gridViewModel.dataView.setFilterArgs({searchText:n,columns:this._columnNames})},n}();n.GridSearchProvider=i})(t=n.ResourcesHandlers||(n.ResourcesHandlers={}))})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){var t;(function(n){"use strict";var i=Common.ResourcesView,r,t;(function(n){n[n.Local=0]="Local";n[n.Session=1]="Session"})(n.WebStorageType||(n.WebStorageType={}));r=n.WebStorageType;t=function(){function n(n,t,r){this.toolbarPanelTemplate="Debugger.webStoragePanel";this._type=n;this._origin=t;this._debuggerManager=r;this._simulateCap=!1;this._id=i.ResourceViewController.NextModelId++}return Object.defineProperty(n.prototype,"persistenceKey",{get:function(){return this.modelName+"/"+this._origin},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"shouldBePersisted",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"modelName",{get:function(){return this._type===0?n.LocalStorageModelName:n.SessionStorageModelName},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"displayName",{get:function(){return Common.ToolWindowHelpers.createShortenedUrlText(this._origin)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"fullDisplayName",{get:function(){return this._origin},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"simulateCap",{get:function(){return this._simulateCap},set:function(n){this._simulateCap=n;this.setSimulateCap(n)},enumerable:!0,configurable:!0}),n.prototype.setSimulateCap=function(n){this._debuggerManager.setSimulateCap(this._type,n)},n.prototype.refresh=function(){return this._debuggerManager.retrieveWebStorage(this._type,this._origin)},n.prototype.removeItems=function(n){return this._debuggerManager.webStorageDeleteItems(this._type,n,this._origin)},n.prototype.setItem=function(n,t){return this._debuggerManager.webStorageSetItem(this._type,n,t,this._origin)},n.LocalStorageModelName="localStorage",n.SessionStorageModelName="sessionStorage",n}();n.WebStorageModel=t})(t=n.ResourcesHandlers||(n.ResourcesHandlers={}))})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){var i;(function(i){"use strict";var r=Microsoft.Plugin,f=Common.ResourcesView,e=function(){function n(){}return Object.defineProperty(n.prototype,"viewModel",{get:function(){return this._viewModel},enumerable:!0,configurable:!0}),n.prototype.open=function(n){var i=this;return this.init(),n.viewModel=this._viewModel,t.Telemetry.analytics.logExecuteCommand(t.Telemetry.CommandName.WEBSTORAGE_OPENED,5),this._viewModel.loadModel(n).then(function(){return window.setImmediate(i.doLayout.bind(i)),i._resourceGrid})},n.prototype.close=function(){},n.prototype.doLayout=function(){this._resourceGrid.doLayout()},n.prototype.onAttach=function(){this._resourceGrid.init()},n.prototype.init=function(){this._initialized||(this._viewModel=new u,this._resourceGrid=new f.ResourceGrid(this._viewModel),this._resourceGrid.rootElement.classList.add("resourceHandler"),this.searchProvider=new i.GridSearchProvider(this._viewModel),this._initialized=!0)},n}(),u;i.WebStorageHandler=e;u=function(){function i(){this.columns=[i.makeColumnInfo("key",r.Resources.getString("WebStorageGridKeyLabel")),i.makeColumnInfo("value",r.Resources.getString("WebStorageGridValueLabel"))];this.dataView=new Slick.Data.DataView({inlineFilters:!0});this._currentSortInfo={sortColName:"key",ascending:!0};this._titleProperty=new Common.EventSource}return Object.defineProperty(i.prototype,"title",{get:function(){return this._titleProperty},enumerable:!0,configurable:!0}),i.prototype.loadModel=function(n){return n!==this._model&&(this._model=n,this.dataView.beginUpdate(),this.dataView.setItems([]),this.dataView.endUpdate(),this._titleProperty.invoke(this._model.displayName)),this.refresh()},i.prototype.addItem=function(n){var u=this,r,t;if(this._model)return r=n.key,t=n.value||"",this.dataView.addItem(i.makeGridDataItem(r,t)),this.setItem(n.key,t).then(function(){return u.refresh()})},i.prototype.editItem=function(n,t,i){var f=this,r,e,u;if(this._model)return r=t.field,e=n[r],i.execute(),u=function(){return f.setItem(n.key,n.value).then(function(){return f.refresh()})},r==="key"?this._model.removeItems([e]).then(function(){return u()}):u()},i.prototype.removeItems=function(t){var i=this,r;if(this._model)return r=t.map(function(t){var r=i.dataView.getItem(t);return n.Utility.Assert.hasValue(r,"Can't delete an item for which the dataView has no value"),r.key}),this._model.removeItems(r).then(function(){return i.refresh()})},i.prototype.refresh=function(){var n=this;if(this._model)return this._model.refresh().then(function(t){n.dataView.beginUpdate();n.syncStorageAndGrid(t);n.internalSort();n.dataView.endUpdate()})},i.prototype.sort=function(n){this._currentSortInfo=n;this.internalSort()},i.prototype.createContextMenuItems=function(n){var t=this,i=[];return i.push({id:"menuItemDeleteResourceItem",callback:function(){return t.removeItems([n])},label:r.Resources.getString("/Common/DeleteItem"),type:1,disabled:function(){return n<0||n===null||n>=t.dataView.getLength()},accessKey:r.Resources.getString("AccessKeyDel")}),i},i.prototype.setupGridDataEvents=function(){},i.makeGridDataItem=function(n,t){return{key:n,value:t,id:""+i.NextId++}},i.makeColumnInfo=function(n,t){return{id:n,name:t,field:n,editor:Slick.Editors.Text,sortable:!0}},i.prototype.setItem=function(n,i){return this._model.setItem(n,i).then(function(n){typeof n=="string"&&n.length>0&&t.DebuggerShell.showErrorDisplay("WebStorageSetItemErrorMessage",[n])})},i.prototype.internalSort=function(){var n=this._currentSortInfo.sortColName,t=this._currentSortInfo.ascending;this.dataView.sort(function(t,i){return Common.ToolWindowHelpers.naturalSort(t[n],i[n])},t)},i.prototype.syncStorageAndGrid=function(n){for(var t,u,f,e,o=this.dataView.getItems().slice(),r=o.length-1;r>=0;r--)t=o[r],u=n[t.key],typeof u!="undefined"?(u!==t.value&&(t.value=u,this.dataView.updateItem(t.id,t)),delete n[t.key]):this.dataView.deleteItem(t.id);for(f=Object.keys(n),r=0;r<f.length;r++)e=f[r],this.dataView.addItem(i.makeGridDataItem(e,n[e]))},i.NextId=0,i}();i.WebStorageViewModel=u})(i=t.ResourcesHandlers||(t.ResourcesHandlers={}))})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function r(n,t,i){this.propertyChanged=new Common.EventSource;this._urlRootOfSourcemapFile=n;this._rawDoc=t;this._debuggerManager=i;this._sourceMapEnabled=1;r.ParseWorker||(r.SourceMaps=[],r.ParseWorker=new Worker("../common/formatter/SourceMapParserWorker.js"),r.ParseWorker.onmessage=function(n){if(n.data&&n.data.id){var t=r.SourceMaps[n.data.id];if(t)t.onWorkerMessage(n)}})}return Object.defineProperty(r.prototype,"sourceMapState",{get:function(){return this.isValid?this._sourceMapEnabled:2},set:function(n){n===this._sourceMapEnabled||this._sourceMapEnabled===2||n!==2&&this._debuggerManager.documentController.isInSourceMapSwitch||(this._sourceMapEnabled=n,this.propertyChanged.invoke("sourceMapState"),i.F12.Communications.fireEvent("onSourceMapStateChanged",i.F12.PluginId.None,this._rawDoc.url.toString()))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isValid",{get:function(){return this._sourcemapMappings&&this._sourcemapMappings.isValid&&this._sourcemapMappings.isValid()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"sources",{get:function(){return this._sources},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"sourceMapUrl",{get:function(){return this._sourceMapUrl},enumerable:!0,configurable:!0}),r.isErrorReportingEnabled=function(){return typeof r.ErrorReportingEnabled=="boolean"?r.ErrorReportingEnabled:(r.ErrorReportingEnabled=i.F12.getRegEntryForF12(r.SHOW_ERRORS_REG_KEY).toLowerCase()==="true",r.ErrorReportingEnabled)},r.findSourceAttribute=function(n,t){var f;if(t){var e=["//#","/*#","//@","/*@"],i,r=-1,u=-1;for(f=0;r<0&&f<e.length;f++)i="\n"+e[f]+" "+n+"=",r=t.lastIndexOf(i);if(r>=0&&r===t.indexOf(i))return u=i.charAt(2)==="*"?t.indexOf("*/",r+i.length):t.indexOf("\n",r+i.length),u<0&&(u=t.length),t.substring(r+i.length,u).trim()}return null},r.prototype.getMediaType=function(n){var t=this._sources.indexOf(n);return this._sourceMediaTypes&&this._sourceMediaTypes[t]},r.prototype.loadSourceMapContent=function(n){var r=this,u;return t.debuggerTraceWriter.traceWriter.raiseEvent(367),u=window.LiveUnit?this.loadSourceMapsLocally(n):this.loadSourceMapsOnWorkerThread(n),i.Promise.join([u,this._rawDoc.getText()]).then(function(){if(r.isValid){var n=r._sourceMapEnabled;r.sourceMapState=r._debuggerManager.persistenceManager.isSourceMapEnabled(r._rawDoc)?0:1;n===r.sourceMapState&&r.propertyChanged.invoke("sourceMapState")}})},r.prototype.hasOriginalSourceLocation=function(n){return this._sourcemapMappings.hasOriginalPosition(n)},r.prototype.getOriginalSourceLocation=function(n){return this._sourcemapMappings.getOriginalPosition(n)},r.prototype.getGeneratedFileLocation=function(n){return this._sourcemapMappings.getGeneratedPosition(new Common.FormatService.Position(n.line,n.column,n.file))},r.prototype.getGeneratedName=function(n,t){var i=this.findClosestScope(t);return i&&n in i.localsMap?i.localsMap[n]:n},r.prototype.containsLocalVariablesMapping=function(){return this._sourceScopes&&this._sourceScopes.length>0},r.prototype.getAuthoredName=function(n,t){var i=this.findClosestScope(t),r;if(i)for(r in i.localsMap)if(i.localsMap[r]===n)return r;return n},r.prototype.loadFromUrl=function(i){var u=this;return this._rawDoc.rawDoc?(n.Utility.Assert.failDebugOnly("Can't load a sourcemap for an authored doc"),Common.PromiseUtilities.EmptyPromise):i?(this._sourceMapUrl=i,this._debuggerManager.downloadUrl(i).then(function(n){if(n.success)return u.loadSourceMapContent(n.content);r.isErrorReportingEnabled()&&t.DebuggerShell.showErrorDisplay("SourceMapNoMapFile",[u._rawDoc.url.toString(),i])})):Common.PromiseUtilities.EmptyPromise},r.prototype.onWorkerMessage=function(n){var i,u,f;if(delete r.SourceMaps[this._rawDoc.frontendId],n.data){if(i=n.data,typeof i.version!="number"||i.version!==3){r.isErrorReportingEnabled()&&(typeof i.version!="number"?t.DebuggerShell.showErrorDisplay("SourceMapInvalidJSON",[this._sourceMapUrl]):t.DebuggerShell.showErrorDisplay("SourceMapInvalidVersion",[this._sourceMapUrl,i.version]));this._sourceMapProcessingCompleted&&(this._sourceMapProcessingCompleted(),this._sourceMapProcessingCompleted=null);return}if(this._sourceScopes=i.sourceScopes,this._sourceScopes&&this._sourceScopes.length>1&&(this._sourceScopes=Array.prototype.sort.call(this._sourceScopes,r.sourceScopeComparator)),u=i.sourcemapMappings,f=i.urls,u&&u.length>0&&f&&f.length>0){this._sourcesContent=i.sourcesContent;this.onSourceMapLoadComplete(new Common.FormatService.SourcemapMappings(u,f),i.sourceRoot,i.mediaTypes,i.sourceMediaTypes)}else r.isErrorReportingEnabled()&&t.DebuggerShell.showErrorDisplay("SourceMapInvalidJSON",[this._sourceMapUrl])}this._sourceMapProcessingCompleted&&(this._sourceMapProcessingCompleted(),this._sourceMapProcessingCompleted=null)},r.sourceScopeComparator=function(n,t){var u=n.endSegment.line-n.startSegment.line,f=t.endSegment.line-t.startSegment.line,i,r;return u<f?-1:u>f?1:(i=n.endSegment.column-n.startSegment.column,r=t.endSegment.column-t.startSegment.column,i===r)?0:i>r?1:-1},r.generateMediaTypeMappings=function(n,t,i){if(!n||n.length===0||i===0)return null;t||(t=[0]);for(var r=t.length,u=t[r-1];r<i;r++)t.push(u);return t.map(function(t){return n[t]?Common.MediaTypeManager.getCanonicalMediaType(n[t]):null})},r.prototype.onSourceMapLoadComplete=function(n,i,u,f){var s,o,e,h;for(this._sourcemapMappings=n,i=this.getAbsoluteSourceRootPath(i),s=[],o=0;o<n.urls.length;o++)e=n.urls[o],h=this._sourcesContent&&this._sourcesContent[o],h||Common.ToolWindowHelpers.isAbsoluteUrl(e)||!i||(e=Common.ToolWindowHelpers.pathCombine(i,e)),e=t.UrlRewriter.rewriteAuthoredSourceUrl(e),s.push(new t.Doc({id:undefined,parentId:null,isRootChild:this._rawDoc.isRootChild,url:e,mimeType:null,length:0,isDynamicCode:!1,headers:null},{rawDoc:this._rawDoc,sourceIndex:o,sourceContent:h,parent:this._rawDoc.parent},this._debuggerManager));this._sources=s;this._sourceMediaTypes=r.generateMediaTypeMappings(u,f,this._sources.length);t.debuggerTraceWriter.traceWriter.raiseEvent(368)},r.prototype.loadSourceMapsLocally=function(n){var t;if(t=Common.FormatService.SourcemapParser.parseMapContent(n),t){if(typeof t.version!="number"||t.version!==3)return Common.PromiseUtilities.EmptyPromise;this._sourcesContent=t.sourcesContent;this.onSourceMapLoadComplete(new Common.FormatService.SourcemapMappings(Common.FormatService.SourcemapParser.calculateMappings(t),t.sources),t.sourceRoot,t.x_ms_mediaTypes,t.x_ms_sourceMediaTypes)}return Common.PromiseUtilities.EmptyPromise},r.prototype.loadSourceMapsOnWorkerThread=function(n){var t=this;return new i.Promise(function(i){t._sourceMapProcessingCompleted=i;r.SourceMaps[t._rawDoc.frontendId]=t;r.ParseWorker.postMessage({content:n,id:t._rawDoc.frontendId})})},r.prototype.getAbsoluteSourceRootPath=function(n){return n=Common.ToolWindowHelpers.pathCombine(this._urlRootOfSourcemapFile,n),Common.ToolWindowHelpers.addFileProtocolIfNeeded(n)},r.prototype.findClosestScope=function(n){var i,u,r,f;if(this.containsLocalVariablesMapping())for(i=n.line,u=n.column,r=0,f=this._sourceScopes.length;r<f;r++){var t=this._sourceScopes[r],e=t.startSegment.line<i||t.startSegment.line===i&&t.startSegment.column<=u,o=t.endSegment.line>i||t.endSegment.line===i&&t.endSegment.column>=u;if(e&&o)return t}},r.SHOW_ERRORS_REG_KEY="DebuggerShowSourceMapErrors",r}();t.SourceMap=r})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function t(n,i,r){var u=this;this.propertyChanged=new Common.EventSource;this._controller=n;this._location=i;var f=r.split("\n"),e=f[i.startLineNumber-1]||"",o=Math.max(0,i.startColumn-1-t.CONTEXT_CHARS),s=i.endColumn-1+t.CONTEXT_CHARS;this._preview=e.slice(o,s).trim();this._location.propertyChanged.addHandler(function(){return u.propertyChanged.invoke("locationText")})}return Object.defineProperty(t.prototype,"location",{get:function(){return this._location},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"locationText",{get:function(){return this._location.startDisplayText},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"url",{get:function(){return this._location.startPosition.doc.url.toString()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"previewText",{get:function(){return this._preview},enumerable:!0,configurable:!0}),t.prototype.select=function(t,i){var o=this;t===void 0&&(t=!1);i===void 0&&(i=!0);var s=this._controller,r=this._location,f=r.startPosition,u=f.doc,e=r.endPosition,h=new n.DocumentLocation(u,f.line,f.column,e.doc,e.line,e.column,r.rawLocation);return s.open(u,h,t).then(function(){var a=s.editorWindow,f=a.getRawLineTokens(r.startLineNumber),h=a.getLineContents(r.startLineNumber),e,c,l,y;if(!i||!(f&&h)){o.highlightResult(u,r,t);return}for(var p=r.startColumn-1,v=f.length,n=0;n+1<v&&f[n+1].startIndex<=p;)n++;if(e=n+2,e<v&&/identifier.[jt]s/.test(f[e].type)){c=h.slice(f[n].startIndex,f[n+1].startIndex);switch(f[n].type){case"keyword.declare.js":case"keyword.declare.ts":n=e;break;case"keyword.js":case"keyword.ts":["get","set"].indexOf(c)>=0&&(n=e);break;case"keyword.visibility.ts":["private","public"].indexOf(c)>=0&&(n=e)}}l=n+1<f.length?f[n+1].startIndex:h.length;l+=1;y={startLineNumber:r.startLineNumber,startColumn:f[n].startIndex+1,endLineNumber:r.startLineNumber,endColumn:l};o.highlightResult(u,y,t)})},t.prototype.cleanup=function(){this._location.cleanup()},t.prototype.highlightResult=function(t,i,r){r?this._controller.editorWindow.selectRange(i):this._controller.editorWindow.setTextSpotlightDecorationLocation(new n.DocumentLocation(t,i.startLineNumber,i.startColumn,t,i.startLineNumber,i.endColumn))},t.CONTEXT_CHARS=50,t}();n.FindResult=t})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(n,i){var r=this;this._window=n;this._controller=i;this._toolbar=new Common.Controls.ToolbarControl("Common.defaultToolbarTemplate");this._toolbar.title=t.Resources.getString("FindResultsTitle");this._toolbar.model=this._window;this._toolbar.panelTemplateId="Debugger.findResultsButtonsPanel";document.getElementById("findResultsToolbar").appendChild(this._toolbar.rootElement);this._toolbar.addClickHandlerToButton("previousResultButton",function(){r._window.selectPreviousResult()});this._toolbar.addClickHandlerToButton("nextResultButton",function(){r._window.selectNextResult()});this._toolbar.addClickHandlerToButton("clearResultsButton",function(){r._window.clearResults()});this._toolbar.addClickHandlerToButton("closeFindResultsWindowButton",function(){return r._window.close()})}return n.prototype.getActiveElement=function(){return this._toolbar.getActiveElement()},n}();n.FindResultsToolbar=i})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var r=Microsoft.Plugin,i=Common.Grid,u=function(){function u(n,r){var h=this;this._pinned=!1;this.propertyChanged=new Common.EventSource;this._controller=n;this._toolbar=new t.FindResultsToolbar(this,this._controller);this._root=r;this._gridContainer=document.createElement("div");this._root.querySelector("#findResults").appendChild(this._gridContainer);var o="",f=new i.ColumnInfo("location",o,o,0,!1);f.getColumnValue=this.getColumnValue.bind(this);f.percentWidth=u.LOCATION_COLUMN_PERCENT_WIDTH;f.hrefIndex="location";f.getCellTooltip=function(n){return h._lastResults[n].url};var s="",e=new i.ColumnInfo("preview",s,s,0,!1);e.getColumnValue=this.getColumnValue.bind(this);e.percentWidth=1-u.LOCATION_COLUMN_PERCENT_WIDTH;this._columnInfo=[f,e];this.createGrid(this._gridContainer);this._progressBar=document.getElementById("findResultsProgress");this.isFindInProgress=!1}return Object.defineProperty(u.prototype,"isPinned",{get:function(){return this._pinned},set:function(n){n=!!n;n!==this._pinned&&(this._pinned=n,this.propertyChanged.invoke("isPinned"),this.propertyChanged.invoke("canToggle"))},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"isFindInProgress",{get:function(){return this._progressBar.style.display==="block"},set:function(n){this._progressBar.style.display=n?"block":"none"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"hasResults",{get:function(){return!!this._lastResults&&this._lastResults.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"canToggle",{get:function(){return this.isPinned||this.hasResults},enumerable:!0,configurable:!0}),u.prototype.displayResults=function(n){var u=this,t,i;Array.isArray(this._lastResults)&&this._lastResults.forEach(function(t){n.indexOf(t)===-1&&t.cleanup()});this._lastResults=n;n.forEach(function(n){n.location.propertyChanged.addHandler(function(){return u.redraw()})});t=this._grid;i=n.length;t.setDataSource(n,n.map(function(){return 0}),this._columnInfo,null,0,i>0,!1);t.layout();this.countTotalDocuments();document.getElementById("findResultsTotalsText").innerText=r.Resources.getString("FindResultsTotals",i,this._totalDocuments);this.propertyChanged.invoke("hasResults");this.propertyChanged.invoke("canToggle")},u.prototype.openLocation=function(){var n=this._grid,t=n.getRowData(n.getSelectedDataIndex());return t?t.select(!1):Common.PromiseUtilities.EmptyPromise},u.prototype.selectPreviousResult=function(n){var r,t,i;n===void 0&&(n=!1);r=this._lastResults?this._lastResults.length:0;r>0&&(t=this._grid,i=t.getSelectedRowIndex(),t.setSelectedRowIndex(i>0?i-1:0),n&&t.getRowInfo(t.getSelectedDataIndex())&&(t.focus(),t.layout()),t.getSelectedRowIntoView(!1))},u.prototype.selectNextResult=function(n){var i,t,r;n===void 0&&(n=!1);i=this._lastResults?this._lastResults.length:0;i>0&&(t=this._grid,r=t.getSelectedRowIndex(),t.setSelectedRowIndex(r<i-2?r+1:i-1),n&&t.getRowInfo(t.getSelectedDataIndex())&&(t.focus(),t.layout()),t.getSelectedRowIntoView(!1))},u.prototype.clearResults=function(){this.displayResults([]);this.isPinned||this._controller.closeFindResultsWindow()},u.prototype.close=function(){this._controller.closeFindResultsWindow()},u.prototype.layout=function(){this.redraw()},u.prototype.getActiveElement=function(){return this._toolbar.getActiveElement()},u.prototype.resourceAdded=function(){},u.prototype.resourceRemoved=function(n){if(this._lastResults&&this._lastResults.length>0&&n instanceof t.Doc){var r=n.frontendId,i=this._lastResults.filter(function(n){return!(n.location.rawLocation.doc&&n.location.rawLocation.doc.frontendId===r)});i.length<this._lastResults.length&&this.displayResults(i)}},u.prototype.resourceClosed=function(){},u.prototype.resourceOpened=function(){},u.prototype.redraw=function(){var n=this;this._redrawRequestId||(this._redrawRequestId=window.requestAnimationFrame(function(){n._grid.layout();n._redrawRequestId=0}))},u.prototype.countTotalDocuments=function(){for(var t,i=0,r=Object.create(null),u=this._lastResults,n=0;n<u.length;n++)t=u[n].location.rawLocation.doc.url.toString(),r[t]||(r[t]=!0,i++);this._totalDocuments=i;this.propertyChanged.invoke("totalDocumentsString")},u.prototype.createGrid=function(n){var t=this;this._options=new i.GridOptions(null,this._columnInfo,null);this._options.drawRowSplitters=!0;this._options.keyboardEventHandler={keys:[Common.Keys.ENTER,Common.Keys.DOWN,Common.Keys.UP],handler:this.keyboardEventHandler.bind(this)};this._grid=new i.GridControl(n,this._options);this._grid.getElement().addEventListener("selectedIndexChanged",function(n){return t.onGridSelectionChanged(n)})},u.prototype.getColumnValue=function(t,i){var r=this._lastResults[t];switch(i){case"location":return r.locationText;case"preview":return r.previewText;default:n.Utility.Assert.fail("Unrecognized column "+i)}},u.prototype.onGridSelectionChanged=function(){var n=this,t=this._grid.getRowInfo(this._grid.getSelectedDataIndex());t||window.setImmediate(function(){n._grid.focus();n._grid.layout()});this.openLocation()},u.prototype.keyboardEventHandler=function(n,t,i){var r=t[i];if(!r||n.ctrlKey||n.altKey||n.shiftKey)return!1;switch(n.key){case Common.Keys.ENTER:r.select(!0);this.close();break;case Common.Keys.DOWN:this.selectNextResult(!0);break;case Common.Keys.UP:this.selectPreviousResult(!0)}return!0},u.LOCATION_COLUMN_PERCENT_WIDTH=.25,u}();t.FindResultsWindow=u})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var i=Microsoft.Plugin,t=i.Promise,r=function(){function i(n){this.propertyChanged=new Common.EventSource;this._debuggerManager=n}return Object.defineProperty(i.prototype,"editorWindow",{get:function(){return this._editorWindow||(this._editorWindow=this._debuggerManager.debuggerShell.editorWindow),this._editorWindow},enumerable:!0,configurable:!0}),i.prototype.registerProjectResolver=function(n){this._projectResolver=n},i.prototype.open=function(n,t,i){return i===void 0&&(i=!1),this._debuggerManager.resourceViewController.open(n,{activation:i?2:1,params:{location:t}})},i.prototype.closeFindResultsWindow=function(){this._debuggerManager.debuggerShell.showHideFindResultsWindow(!1)},i.prototype.hideWindows=function(n){var t=n||!this._debuggerManager.debuggerShell.findResultsWindow.isFindInProgress;!this._debuggerManager.debuggerShell.findResultsWindow.isPinned&&t&&this.closeFindResultsWindow()},i.prototype.goToDefinition=function(i){var r=this;return n.Telemetry.logCommandWrapper(n.Telemetry.CommandName.GO_TO_DEFINITION,i,function(){var i,u;if(r.canGoToDefinition()){var f=r.editorWindow,n=r.getPosition(),e=r.getReferenceSupport(n);if(n&&e)return i=f.getAssociatedResource(),r._debuggerManager.debuggerShell.findResultsWindow.isFindInProgress=!0,u=function(t,f){r.findDeclaration(n,i).then(function(o){!o&&r._projectResolver&&!r._projectResolver.isResolvingAllFiles&&r._projectResolver.resolveMoreFilesForUrl(i.toExternal())?e.findReferences(i,n,!0).then(function(){u(t,f)}):t(o)},f)},r._currentGoToDefinitionPromise&&r._currentGoToDefinitionPromise.cancel(),r._currentGoToDefinitionPromise=new t(u).then(function(n){return n?r.makeResult(n):t.wrap(null)}).then(function(n){return n?n.select(!0):f.focus(),r._debuggerManager.debuggerShell.findResultsWindow.isFindInProgress=!1,r._currentGoToDefinitionPromise=null,!!n}),r._currentGoToDefinitionPromise}return t.wrap(!1)})},i.prototype.canGoToDefinition=function(){var n=this.getPosition(),t,i,u,r;return n&&(t=this.getDeclarationSupport(n),i=Common.MediaTypeManager.mediaTypeSupportsFindRefs(this.editorWindow.displayedDoc.mimeType),t&&i)?(u=this.editorWindow,r=this.editorWindow.getLineContext(n.lineNumber),t.canFindDeclaration(r,n.column-1)):!1},i.prototype.findReferences=function(i){var r=this;return n.Telemetry.logCommandWrapper(n.Telemetry.CommandName.FIND_REFERENCES,i,function(){var f,n,i,u;return(r._debuggerManager.debuggerShell.findResultsWindow.clearResults(),r.canFindReferences()&&(f=r.editorWindow,n=r.getPosition(),n))?(i=f.getAssociatedResource(),r._debuggerManager.debuggerShell.findResultsWindow.isFindInProgress=!0,r._debuggerManager.debuggerShell.showHideFindResultsWindow(!0),u=function(t,f){r.findReferencesAndAppend(n,i).then(function(n){r._projectResolver&&!r._projectResolver.isResolvingAllFiles&&r._projectResolver.resolveMoreFilesForUrl(i.toExternal())?u(t,f):t(n)},f)},r._currentFindReferencesPromise&&r._currentFindReferencesPromise.cancel(),r._currentFindReferencesPromise=new t(u).then(function(n){return r._debuggerManager.debuggerShell.findResultsWindow.isFindInProgress=!1,r._currentFindReferencesPromise=null,n}),r._currentFindReferencesPromise):t.wrap(0)})},i.prototype.canFindReferences=function(){var n=this.getPosition(),t,i,u,r;return n&&(t=this.getReferenceSupport(n),i=Common.MediaTypeManager.mediaTypeSupportsFindRefs(this.editorWindow.displayedDoc.mimeType),t&&i)?(u=this.editorWindow,r=this.editorWindow.getLineContext(n.lineNumber),t.canFindReferences(r,n.column-1)):!1},i.prototype.findDeclaration=function(n,i){var r=this.getDeclarationSupport(n);return r?r.findDeclaration(i,n).then(function(n){return n&&n.range?n:null}):t.wrap(null)},i.prototype.findReferencesAndAppend=function(n,i,r){var f=this,u;return r===void 0&&(r=0),u=this.getReferenceSupport(n),u?u.findReferences(i,n,!0).then(function(n){return n?(f.makeResults(n).then(function(n){var t=f._debuggerManager.debuggerShell;t.showHideFindResultsWindow(!0);t.findResultsWindow.displayResults(n)}),n.length+r):r}):t.wrap(0)},i.prototype.makeResults=function(n){for(var r,u=[],f=n.length,i=0;i<f;i++)r=this.makeResult(n[i]),r&&u.push(r);return t.join(u)},i.prototype.makeResult=function(t){var u=this,i=this._debuggerManager.documentController.getDocFromMonacoUrl(t.resourceUrl);if(i){i=i.latestRevision;var r=t.range,f=i.getRawLocation({doc:i,line:r.startLineNumber,column:r.startColumn},!1),e=new n.DocumentLocation(i,r.startLineNumber,r.startColumn,i,r.endLineNumber,r.endColumn),o=new n.DynamicLocation(f,e,!!i.rawDoc);return i.getText().then(function(t){return new n.FindResult(u,o,t)})}return null},i.prototype.getPosition=function(){var n=this.editorWindow.getEditorSelection();return n?n.getStartPosition():null},i.prototype.getDeclarationSupport=function(n){var t=this.editorWindow.getModeAtPosition(n);return t&&t.declarationSupport},i.prototype.getReferenceSupport=function(n){var t=this.editorWindow.getModeAtPosition(n);return t&&t.referenceSupport},i.MONACO_EDITOR_PROTOCOL="f12",i}();n.LanguageServiceController=r})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){var t;(function(n){"use strict";function r(t,i,r){for(var f=[],u=3;u<arguments.length;u++)f[u-3]=arguments[u];return i!==3&&i!==4&&n.analytics.logExecuteCommand(t,i),r.apply(this,f)}var i=function(){function n(){}return n.START_DEBUGGING="StartDebugging",n.STEP_OVER="StepOver",n.STEP_INTO="StepInto",n.STEP_OUT="StepOut",n.BREAK_ANY="BreakAny",n.SHOW_NEXT_STATEMENT="ShowNextStatement",n.SET_NEXT_STATEMENT="SetNextStatement",n.RUN_TO_CURSOR="RunToCursor",n.SHOW_BREAK_ON_ERROR_MENU="ShowBreakOnErrorMenu",n.BREAK_ON_NO_EXCEPTIONS="BreakOnNoExceptions",n.BREAK_ON_UNHANDLED_EXCEPTIONS="BreakOnUnhandledExceptions",n.BREAK_ON_ALL_EXCEPTIONS="BreakOnAllExceptions",n.TOGGLE_ALL_BREAKPOINTS="ToggleAllBreakpoints",n.BREAK_ON_NEW_WORKERS_ON="BreakOnNewWorkersOn",n.BREAK_ON_NEW_WORKERS_OFF="BreakOnNewWorkersOff",n.TOGGLE_JMC_MODE_ON="ToggleJmcModeOn",n.TOGGLE_JMC_MODE_OFF="ToggleJmcModeOff",n.TOGGLE_SOURCE_MAPS_DISABLED="ToggleSourceMapsDisabled",n.TOGGLE_SOURCE_MAPS_OFF="ToggleSourceMapsOff",n.TOGGLE_SOURCE_MAPS_ON="ToggleSourceMapsOn",n.TOGGLE_PRETTY_PRINT_DISABLED="TogglePrettyPrintDisabled",n.TOGGLE_PRETTY_PRINT_ON="TogglePrettyPrintOn",n.TOGGLE_PRETTY_PRINT_OFF="TogglePrettyPrintOff",n.TOGGLE_LIBRARY_FILE="ToggleLibraryFile",n.TOGGLE_LIBRARY_FILE_DISABLED="ToggleLibraryFileDisabled",n.TOGGLE_LIBRARY_FILE_ON="ToggleLibraryFileOn",n.TOGGLE_LIBRARY_FILE_OFF="ToggleLibraryFileOff",n.TOGGLE_JMC_FRAMES_DISPLAY_ON="ToggleJmcFramesDisplayOn",n.TOGGLE_JMC_FRAMES_DISPLAY_OFF="ToggleJmcFramesDisplayOff",n.TOGGLE_WORD_WRAP_DISABLED="ToggleWordWrapDisabled",n.TOGGLE_WORD_WRAP_ON="ToggleWordWrapOn",n.TOGGLE_WORD_WRAP_OFF="ToggleWordWrapOff",n.GO_TO_BREAKPOINT_WINDOW="GoToBreakpointWindow",n.GO_TO_CALLSTACK_WINDOW="GoToCallstackWindow",n.GO_TO_WATCH_WINDOW="GoToWatchWindow",n.GO_TO_TOGGLE_WINDOW="GoToToggleWindow",n.GO_TO_DEFINITION="GoToDefinition",n.FIND_REFERENCES="FindReferences",n.FOCUS_TO_EDITOR="FocusToEditor",n.GO_TO_DEBUGGER_FILE="GoToDebuggerFile",n.ADD_WATCH="AddWatch",n.BREAK_ON_OBJECT_WATCH="BreakOnObjectWatch",n.BREAK_ON_PROPERTY_WATCH="BreakOnPropertyWatch",n.COPY_WATCH="CopyWatch",n.DELETE_WATCH="DeleteWatch",n.DELETE_ALL_WATCHES="DeleteAllWatches",n.EDIT_WATCH="EditWatch",n.CLOSE_RESOURCE_VIEW="CloseResourceView",n.CLOSE_ALL_TABS="CloseAllTabs",n.CLOSE_OTHER_TABS="CloseAllTabsButThis",n.COPY_URL_FROM_TAB="CopyUrlFromTab",n.EDITOR_SAVE="EditorSave",n.OPEN_RESOURCE_VIEW="OpenResourceView",n.SELECT_PREVIOUS_TAB="SelectPreviousTab",n.SELECT_NEXT_TAB="SelectNextTab",n.CHOOSE_SOURCE_MAP_FILE_LOCATION="ChooseSourceMapFileLocation",n.ADD_EVENT_BREAKPOINT="AddEventBreakpoint",n.ADD_EVENT_TRACEPOINT="AddEventTracepoint",n.ADD_XHR_BREAKPOINT="AddXhrBreakpoint",n.COPY_BREAKPOINT_IN_WINDOW="CopyBreakpointInWindow",n.DELETE_ALL_BREAKPOINTS_IN_WINDOW="DeleteAllBreakpointsInWindow",n.DELETE_BREAKPOINT_IN_WINDOW="DeleteBreakpointInWindow",n.DISABLE_ALL_BREAKPOINTS="DisableAllBreakpoints",n.ENABLE_ALL_BREAKPOINTS="EnableAllBreakpoints",n.GO_TO_BREAKPOINT="GoToBreakPoint",n.TOGGLE_BREAKPOINT_IN_EDITOR="ToggleBreakpointInEditor",n.SELECT_ALL_BREAKPOINTS_IN_WINDOW="SelectAllBreakpointsInWindow",n.SET_BREAKPOINT_STATE_IN_WINDOW="SetBreakpointStateInWindow",n.SET_CONDITION_IN_EDITOR="SetConditionInEditor",n.SET_CONDITION_IN_WINDOW="SetConditionInWindow",n.SET_BREAKPOINT_STATE_IN_EDITOR="SetBreakpointStateInEditor",n.COPY_FRAME="CopyFrame",n.COPY_STACK="CopyStack",n.GO_TO_NEXT_FRAME_ON_STACK="GoToNextFrameOnStack",n.GO_TO_PREVIOUS_FRAME_ON_STACK="GoToPreviousFrameOnStack",n.GO_TO_SOURCE="GoToSource",n.TOGGLE_ASYNC_FRAMES_ON="ToggleAsyncFramesOn",n.TOGGLE_ASYNC_FRAMES_OFF="ToggleAsyncFramesOff",n.FILEPICKER_FILTERBOX_OPEN="FilePickerFilterboxOpen",n.FILEPICKER_MENU_CLOSE="FilePickerMenuClose",n.FILEPICKER_MENU_OPEN="FilePickerMenuOpen",n.EDITOR_COPY="EditorCopy",n.EDITOR_COPY_LOCATION="EditorCopyLocation",n.CSS_FILE_DIRTIED="CSSFileDirtied",n.JS_FILE_DIRTIED="JSFileDirtied",n.COOKIES_OPENED="CookiesOpened",n.WEBSTORAGE_OPENED="WebStorageOpened",n}(),t;n.CommandName=i;t=function(){function n(){}return n.EDITOR_LOAD_DEBUGGER="EditorLoadDebugger",n.DEBUGGER_OPEN_DOCUMENT_END="DebuggerOpenDocumentEnd",n.FILE_SAVED="FileSaved",n}();n.TelemetryEventName=t;n.analytics=new Common.F12AnalyticsProxy(Common.ToolName.DEBUGGER);n.logCommandWrapper=r})(t=n.Telemetry||(n.Telemetry={}))})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(){}return n.rewriteSourceMapUrl=function(t){return n.rewrite(t,n.SOURCEMAP_REWRITE_REGEX,n.SOURCEMAP_REWRITE_VALUE)},n.rewriteAuthoredSourceUrl=function(t){return n.rewrite(t,n.AUTHORED_SOURCE_REWRITE_REGEX,n.AUTHORED_SOURCE_REWRITE_VALUE)},n.reset=function(){n.Regexes={}},n.rewrite=function(i,r,u){var f,e;return i?(f=n.Regexes[r],typeof f=="undefined"&&(e=t.F12.getRegEntryForF12(r),f=e?{regex:new RegExp(e,"i"),value:t.F12.getRegEntryForF12(u)}:{regex:null,value:null},n.Regexes[r]=f),f&&f.regex&&(i=i.replace(f.regex,f.value)),i):i},n.SOURCEMAP_REWRITE_REGEX="SourceMapRewriteRegex",n.SOURCEMAP_REWRITE_VALUE="SourceMapRewriteValue",n.AUTHORED_SOURCE_REWRITE_REGEX="AuthoredSourceRewriteRegex",n.AUTHORED_SOURCE_REWRITE_VALUE="AuthoredSourceRewriteValue",n.Regexes={},n}();n.UrlRewriter=i})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function n(){}return n.SLIDE_TIME_MILLISEC=100,n.CLOSE_TIME_MILLISEC=30,n.SCROLL_AMOUNT_PIXELS=50,n}(),u;t.TabOptions=r;u=function(u){function f(n,t){var o=this,e,i,f;u.call(this);this._items=[];this._itemsById=[];this._selectedItem=null;this.rootElement=n;this._resourceViewController=t;this._removePreviewTab=!0;this._closePreviewTabTimeout=0;this.animation=!0;this._tabOptions=new r;this._tabOptions.onSelectCallback=function(n,i){t.open(n,{activation:i})};this._tabOptions.onCloseCallback=function(n){t.close(n,!1)};this._tabOptions.onCloseAllCallback=t.closeAllButThis.bind(t);e="<nav class='tabBarContainer'><ul class='tabBar' role='tablist'><\/ul><\/nav>";this.rootElement.innerHTML=e;this._tabContainer=document.querySelector(".tabBarContainer");this._tabNavigation=document.createElement("div");this._tabNavigation.id="tabNavigation";this._tabNavigation.innerHTML="<div id='prevTabButton' class='prevTabDisabled'><\/div><div id='nextTabButton' class='nextTabDisabled'><\/div>";this._tabNavigation.classList.add("tabNavigation");this._tabNavigation.classList.add("hiddenButton");this._tabContainer.appendChild(this._tabNavigation);this._tabStripContainer=document.getElementById("tabStripContainer");i=document.getElementById("prevTabButton");f=document.getElementById("nextTabButton");i.addEventListener("click",this.scrollToPreviousTab.bind(this));f.addEventListener("click",this.scrollToNextTab.bind(this));i.addEventListener("mousedown",this.startScrollToPrevious.bind(this));i.addEventListener("mouseup",this.stopScrollToPrevious.bind(this));f.addEventListener("mousedown",this.startScrollToNext.bind(this));f.addEventListener("mouseup",this.stopScrollToNext.bind(this));this._barPanel=new Common.Controls.Legacy.Control(document.querySelector(".tabBar"));window.addEventListener("resize",function(){o.realignControl(!1)});Common.ClipboardHelper.addCopyListener(this.rootElement,this.onCopy.bind(this))}return __extends(f,u),Object.defineProperty(f.prototype,"tabOptions",{get:function(){return this._tabOptions},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"length",{get:function(){return this._items.length},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"selectedItem",{get:function(){return this._selectedItem},enumerable:!0,configurable:!0}),f.prototype.resourceAdded=function(n){var i,r,u;n&&n.modelName===t.Doc.ModelName&&(i=n,r=i.previousRevision,r&&(u=this._itemsById[r.id],u&&(u.replaceModel(i),this._itemsById[i.id]=u,delete this._itemsById[r.id])))},f.prototype.resourceRemoved=function(){},f.prototype.resourceClosed=function(n){this.isPreviewTab(n)?this._removePreviewTab&&this.removeTab(this._previewTabItem,!0):this.removeTab(this._itemsById[n.id])},f.prototype.resourceOpened=function(n,i,r,u){if(this.isPreviewTab(n))this._closePreviewTabTimeout&&(window.clearTimeout(this._closePreviewTabTimeout),this._closePreviewTabTimeout=0),this._previewTabItem?this._previewTabItem.model!==n&&(this._removePreviewTab=!1,this._resourceViewController.close(this._previewTabItem.model,!1,!1),this._removePreviewTab=!0,this._previewTabItem.replaceModel(n)):(this._previewTabItem=new t.TabItem(n,!0,"previewTabIcon",!1,!0),this._items.push(this._previewTabItem),this.addTabElement(this._previewTabItem,i!==0)),this.setSelectedItem(this._previewTabItem,i===2),this._tabStripContainer.classList.add("previewTab");else{var f=this._itemsById[n.id];f||(f=this._itemsById[n.id]=new t.TabItem(n,!0),this.pushIntoItems(f),this.addTabElement(f,i!==0));i!==0&&(u&&this.selectedItem!==null||(this.setSelectedItem(f,i===2),this._tabStripContainer.classList.remove("previewTab")))}},f.prototype.documentUpdated=function(){},f.prototype.documentUrlChanged=function(n){var t=this._itemsById[n.id];t&&t.updateDisplay()},f.prototype.documentAsLibraryStateChanged=function(){},f.prototype.doLayout=function(){this.realignControl(!1)},f.prototype.realignControl=function(n){this.performOverflowCheck();this.realignTabs(n);this.selectedItem&&this.setTabViewable(this.selectedItem,n)},f.prototype.removeTab=function(t,u){var f=this,e,o;if(u){if(this._items[this._items.length-1]!==this._previewTabItem)return n.Utility.Assert.failDebugOnly("this._previewTabItem is not the last item in this._items"),Common.PromiseUtilities.EmptyPromise;this._items.pop()}else{if(e=this._items.indexOf(t),e<0)return Common.PromiseUtilities.EmptyPromise;this._items.splice(e,1);o=t.model;n.Utility.Assert.hasValue(this._itemsById[o.id]);this._itemsById[o.id]=null}return this.selectedItem===t&&this.setSelectedItem(null),t.contextMenu&&t.contextMenu.dispose(),new i.Promise(function(n){if(f.animation&&t.animateOnClose){var i=t.header.rootElement.clientWidth/r.CLOSE_TIME_MILLISEC;f.shrinkAndRemove(t).then(function(){n()})}else f.deleteTabItemElement(t),f.realignControl(!1),n()})},f.prototype.closeAllTabs=function(n){var i=this;return t.Telemetry.logCommandWrapper(t.Telemetry.CommandName.CLOSE_ALL_TABS,n,function(){if(i._items)for(var n=0,t=i._items.length;n<t;n++)i._items[n].animateOnClose=!1;return i._tabOptions&&i._tabOptions.onCloseAllCallback?i._tabOptions.onCloseAllCallback(null,!1):Common.PromiseUtilities.EmptyPromise})},f.prototype.closeAllTabsButThis=function(n,i){var r=this;return t.Telemetry.logCommandWrapper(t.Telemetry.CommandName.CLOSE_OTHER_TABS,i,function(){var t,u,i;if(r._items)for(t=0,u=r._items.length;t<u;t++)i=r._items[t],i!==n&&(i.animateOnClose=!1);return r._tabOptions&&r._tabOptions.onCloseAllCallback?r._tabOptions.onCloseAllCallback(n.model,!1):Common.PromiseUtilities.EmptyPromise})},f.prototype.containsTab=function(n){return this._items.indexOf(n)>=0},f.prototype.getTabByIndex=function(n){if(n<this._items.length)return this._items[n]},f.prototype.setSelectedItem=function(n,t){if(t===void 0&&(t=!0),this._selectedItem!==n){if(!this.setFocusStateOnTabItem(n,t))return;this.setTabViewable(n,!0)}else n&&this.containsTab(n)&&this.setTabViewable(n,!1)},f.prototype.callCloseCallback=function(n){if(this._tabOptions&&this._tabOptions.onCloseCallback)this._tabOptions.onCloseCallback(n.model)},f.prototype.callSelectCallback=function(n,i,r,u){var f=this;t.Telemetry.logCommandWrapper(i,r,function(){if(f._tabOptions&&f._tabOptions.onSelectCallback)f._tabOptions.onSelectCallback(n.model,u)})},f.prototype.insertBefore=function(n,t){n.equals(t)||(this._barPanel.rootElement.removeChild(n.header.rootElement),this._barPanel.rootElement.insertBefore(n.header.rootElement,t.header.rootElement),this._items.splice(this._items.indexOf(n),1),this._items.splice(this._items.indexOf(t),0,n))},f.prototype.insertAfter=function(n,t){n.equals(t)||(this._barPanel.rootElement.removeChild(n.header.rootElement),t.header.rootElement.insertAdjacentElement("afterEnd",n.header.rootElement),this._items.splice(this._items.indexOf(n),1),this._items.splice(this._items.indexOf(t)+1,0,n))},f.prototype.selectNextTab=function(n){var i=this._items.indexOf(this.selectedItem),r;i>=0&&(i+=1,r=i>=this._items.length?this._items[0]:this._items[i],this.setFocusStateOnTabItem(r),this.callSelectCallback(r,t.Telemetry.CommandName.SELECT_NEXT_TAB,n,1))},f.prototype.selectPreviousTab=function(n){var i=this._items.indexOf(this.selectedItem),r;i>=0&&(i-=1,r=i<0?this._items[this._items.length-1]:this._items[i],this.setFocusStateOnTabItem(r),this.callSelectCallback(r,t.Telemetry.CommandName.SELECT_PREVIOUS_TAB,n,1))},f.prototype.trySelectTabByNumber=function(n,i){var r=this.getTabByIndex(n-1);r&&(this.setFocusStateOnTabItem(r),this.callSelectCallback(r,t.Telemetry.CommandName.GO_TO_DEBUGGER_FILE,i,1))},f.prototype.showContextMenu=function(n,t){var r,u,e;n.contextMenu&&(n.contextMenu.dispose(),n.contextMenu=null);n.contextMenu=i.ContextMenu.create(this.createMenuItems(n),f.CONTEXT_MENU_ID+n.model.id);r=0;u=0;t instanceof MouseEvent&&(r=t.pageX,u=t.pageY);r<=0&&u<=0&&(e=n.rootElement.getBoundingClientRect(),r=e.left,u=e.top);n.contextMenu.show(r,u)},f.prototype.closePreviewTab=function(n){var t=this,i;this._previewTabItem&&(i=function(){t._closePreviewTabTimeout&&(window.clearTimeout(t._closePreviewTabTimeout),t._closePreviewTabTimeout=0);t._previewTabItem&&t.callCloseCallback(t._previewTabItem)},n?this._closePreviewTabTimeout||(this._closePreviewTabTimeout=window.setTimeout(i,f.CLOSE_PREVIEW_TAB_TIMEOUT)):i())},f.prototype.onCopy=function(){return this._copyText},f.prototype.createMenuItems=function(n){var f=this,u=[],r;return u.push({id:"menuItemCloseTabControl"+n.model.id,callback:function(){t.Telemetry.analytics.logExecuteCommand(t.Telemetry.CommandName.CLOSE_RESOURCE_VIEW,2);f.callCloseCallback(n)},label:i.Resources.getString("TabContextMenuCloseTab"),type:1,accessKey:i.Resources.getString("/Common/AccessKeyCtrlF4")}),u.push({id:"menuItemCloseAllTabControl"+n.model.id,callback:function(){f.closeAllTabs(2)},label:i.Resources.getString("TabContextMenuCloseAllTabs"),type:1}),u.push({id:"menuItemCloseOthersTabControl"+n.model.id,callback:function(){f.closeAllTabsButThis(n,2)},label:i.Resources.getString("TabContextMenuCloseOtherTabs"),type:1,disabled:function(){return f._items.length<=1}}),n.model instanceof t.Doc&&(r=n.model,u.push({id:"menuItemSep1TabControl",type:3}),u.push({id:"menuItemCopyUrlTabControl"+r.id,callback:function(){t.Telemetry.analytics.logExecuteCommand(t.Telemetry.CommandName.COPY_URL_FROM_TAB,2);f._copyText=n.model.url.toString();Common.ClipboardHelper.fireCopyEvent(f.rootElement)},label:i.Resources.getString("ContextMenuCopyURL"),type:1}),u.push({id:"menuItemSep2TabControl",type:3}),u.push({id:"menuItemMarkAsLibraryTabControl"+r.id,callback:function(){r.setIsLibraryFile(!r.isLibraryFile,2)},label:i.Resources.getString("TabContextMenuMarkAsLibraryCode"),type:0,checked:function(){return r.isLibraryFile},disabled:function(){return!r.isRuntimeDoc||r.isDynamicCode}}),u.push({id:"menuItemSep3TabControl",type:3}),u.push({id:"menuItemAddSourceMapTabControl"+r.id,callback:function(){r.loadSourceMapFromFileSystem(2)},label:i.Resources.getString("TabContextMenuAddSourceMap"),type:1,disabled:function(){return!f.canAddSourceMap(r)}})),u},f.prototype.canAddSourceMap=function(n){var t=n.getMimeTypeCandidates().join(","),i=t.toLowerCase().indexOf("text/css")!==-1;return!(n.isAuthored||n.isDynamicCode||n.hasEdits)&&(n.isRuntimeDoc||i)},f.prototype.addTabElement=function(n,t){n.ownerTabControl=this;this._previewTabItem&&n!==this._previewTabItem?(this._barPanel.removeChild(this._previewTabItem.header),this._barPanel.appendChild(n.header),this._barPanel.appendChild(this._previewTabItem.header)):this._barPanel.appendChild(n.header);this.makeDescendantsUnselectable(n.header.rootElement);this.realignControl(t)},f.prototype.startScrollToPrevious=function(n){var t=this;return this.clearAllScrollIntervals(),this._scrollPreviousIntervalId=setInterval(function(){t.moveTabsByOffset(r.SCROLL_AMOUNT_PIXELS)},r.SLIDE_TIME_MILLISEC*2),n.stopImmediatePropagation(),!1},f.prototype.stopScrollToPrevious=function(n){return this.clearAllScrollIntervals(),n.stopImmediatePropagation(),!1},f.prototype.startScrollToNext=function(n){var t=this;return this.clearAllScrollIntervals(),this._scrollNextIntervalId=setInterval(function(){t.moveTabsByOffset(-r.SCROLL_AMOUNT_PIXELS)},r.SLIDE_TIME_MILLISEC*2),n.stopImmediatePropagation(),!1},f.prototype.stopScrollToNext=function(n){return this.clearAllScrollIntervals(),n.stopImmediatePropagation(),!1},f.prototype.moveTabsByOffset=function(n){var u=this._barPanel.rootElement,t=u.children,v=t[0],e=t[t.length-1],o=v.offsetLeft,s=e.offsetLeft+e.offsetWidth,h=0,c=u.offsetLeft+u.offsetWidth,l=o<h,a=s>c,i,f;if(n>0&&l?n=Math.min(h-o,n):n<0&&a&&(n=Math.max(c-s,n)),n<0&&a||n>0&&l)for(i=0;i<t.length;i++)f=t[i],f.style.transitionDuration=r.SLIDE_TIME_MILLISEC/(t.length*1e3)+"s",f.style.left=this.getLeftPos(t[i])+n+"px"},f.prototype.scrollToNextTab=function(n){for(var t,u,i=this._barPanel.rootElement,e=i.offsetLeft+i.offsetWidth,r=i.children,f=0;f<r.length;f++)if(t=r[f],u=e-(t.offsetLeft+t.offsetWidth),u<0){this.moveTabsToNewPosition(r,this.getLeftPos(t)+u,!0);break}return n.stopPropagation(),n.preventDefault(),!1},f.prototype.scrollToPreviousTab=function(n){for(var t,u=this._barPanel.rootElement,f=u.offsetLeft,i=u.children,r=i.length-1;r>=0;r--)if(t=i[r],f>t.offsetLeft){this.moveTabsToNewPosition(i,this.getLeftPos(t)+(f-t.offsetLeft),!0);break}return n.stopPropagation(),n.preventDefault(),!1},f.prototype.performOverflowCheck=function(){for(var t=this._barPanel.rootElement,i=0,r=t.children,n=0;n<r.length;n++)i+=r[n].clientWidth;i>t.clientWidth?(this._tabNavigation.classList.remove("hiddenButton"),this._previewTabItem&&this._previewTabItem.header.rootElement.classList.remove("rfloat")):(this._tabNavigation.classList.add("hiddenButton"),this._previewTabItem&&this._previewTabItem.header.rootElement.classList.add("rfloat"))},f.prototype.getLeftPos=function(n){var t=parseInt(n.style.left,10);return String(t)==="NaN"?0:t},f.prototype.setTabViewable=function(n,t){var i=n.header.rootElement;if(!(i.offsetWidth>i.parentElement.offsetWidth)){var u=i.offsetLeft,e=u+i.offsetWidth,f=i.parentElement.offsetLeft,o=f+i.parentElement.offsetWidth,r;u<f?r=f-u:e>o&&(r=o-e);r!==null&&this.moveTabsToNewPosition(i.parentElement.children,this.getLeftPos(i)+r,t)}},f.prototype.moveTabsToNewPosition=function(n,t,i){for(var f,u=0;u<n.length;u++)f=n[u],f.style.transitionDuration=i?String(r.SLIDE_TIME_MILLISEC/(n.length*1e3))+"s":"0s",f.style.left=t+"px"},f.prototype.shrinkAndRemove=function(n){var t=this;return new i.Promise(function(i){var u=n.header.rootElement,f;u.style.transitionDuration=String(r.SLIDE_TIME_MILLISEC/1e3)+"s";f=function(){t.deleteTabItemElement(n);t.realignControl(!0);u.removeEventListener("transitionend",f);i()};u.addEventListener("transitionend",f);u.style.minWidth="0";u.style.width="0"})},f.prototype.deleteTabItemElement=function(n){this._barPanel.removeChild(n.header);n.model=null;n.ownerTabControl=null;n.destroy();this._previewTabItem===n&&(this._previewTabItem=null)},f.prototype.clearAllScrollIntervals=function(){clearInterval(this._scrollPreviousIntervalId);clearInterval(this._scrollNextIntervalId)},f.prototype.realignTabs=function(n){var i=this._barPanel.rootElement,t=i.children,r,u,f;t.length>0&&(t.length===1?r=i.offsetLeft:(u=i.offsetLeft+i.offsetWidth-(t[t.length-1].offsetLeft+t[t.length-1].offsetWidth),f=i.offsetLeft-t[0].offsetLeft,u>0&&f>0&&(r=this.getLeftPos(t[0])+Math.min(f,u))),this.moveTabsToNewPosition(t,r,n))},f.prototype.makeDescendantsUnselectable=function(n){for(var i=n.querySelectorAll("*"),t=0;t<i.length;t++)i[t].setAttribute("unselectable","on")},f.prototype.setFocusStateOnTabItem=function(n,t){return(t===void 0&&(t=!0),!this.containsTab(n))?(this._selectedItem=null,!1):(this._selectedItem&&(this._selectedItem.active=!1,this._selectedItem.header.rootElement.setAttribute("tabindex","-1")),this._selectedItem=n,this._selectedItem&&(this._selectedItem.active=!0,this._selectedItem.header.rootElement.setAttribute("tabindex","1"),t&&this._selectedItem.focus(),this._barPanel.rootElement.scrollLeft=0),!0)},f.prototype.isPreviewTab=function(n){return n instanceof t.Doc&&!n.isLastRevision},f.prototype.pushIntoItems=function(n){this._previewTabItem?this._items.splice(-1,1,n,this._previewTabItem):this._items.push(n)},f.CONTEXT_MENU_ID="TabControlContextMenu",f.CLOSE_PREVIEW_TAB_TIMEOUT=400,f}(Common.Controls.Legacy.TemplateControl);t.TabControl=u})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(i){function r(u,f,e,o,s){var h=this,l,a,v,c;o===void 0&&(o=!0);i.call(this);this._onModelPropertyChanged=function(n){var t=h.model;n==="isEditPending"&&t.isEditPending?h.title="*"+h.title:n!=="isEditPending"||t.isEditPending||h.title[0]!=="*"||(h.title=h.title.substring(1))};this.model=u;this.animateOnClose=!0;this.header=new Common.Controls.Legacy.Control(document.createElement("li"));this.header.rootElement.setAttribute("id",r.HTML_ID_PREFIX+u.id);this.header.rootElement.setAttribute("tabindex","-1");this.header.rootElement.setAttribute("role","tab");s&&this.header.rootElement.classList.add("previewTab");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(){return h.header.rootElement.style.transitionDuration="0s"});this.header.rootElement.addEventListener("DOMAttrModified",function(n){n.attrName!=="aria-selected"||n.attrChange!==n.MODIFICATION||n.newValue!=="true"||h.active||h.onHeaderClicked()});this.rootElement.className="tabItemContent";l=document.createElement("div");l.className="tabContent";this.header.rootElement.appendChild(l);e||(e=u instanceof n.DocDiff?"diffTabIcon":null);e&&(a=document.createElement("div"),a.className=e,l.appendChild(a));v=document.createElement("div");v.className="tabTitle";l.appendChild(v);this.header.rootElement.draggable=o;o&&(this.header.rootElement.addEventListener("dragstart",function(n){return h.ownerTabControl&&(h.ownerTabControl.dragTarget=h),n.stopImmediatePropagation(),!1}),this.header.rootElement.addEventListener("dragend",function(){h.ownerTabControl&&(h.ownerTabControl.dragTarget=null)}),this.header.rootElement.addEventListener("dragover",function(n){n.preventDefault()}),this.header.rootElement.addEventListener("dragenter",function(n){n.preventDefault()}),this.header.rootElement.addEventListener("drop",function(n){if(h.ownerTabControl&&h.ownerTabControl.dragTarget){var t=h.header.rootElement.offsetLeft+h.header.rootElement.offsetWidth/2;n.pageX>=t?h.ownerTabControl.insertAfter(h.ownerTabControl.dragTarget,h):h.ownerTabControl.insertBefore(h.ownerTabControl.dragTarget,h);h.ownerTabControl.dragTarget=null}}));this.header.rootElement.addEventListener("contextmenu",function(n){h.ownerTabControl&&h.ownerTabControl.showContextMenu(h,n)});f&&(c=document.createElement("div"),c.className="closeButton",c.setAttribute("role","button"),c.setAttribute("data-plugin-vs-tooltip",t.Resources.getString("CloseTabTooltip")),c.setAttribute("aria-label",t.Resources.getString("CloseTabTooltip")),c.addEventListener("click",this.onCloseButtonClicked.bind(this)),l.appendChild(c));this.updateDisplay()}return __extends(r,i),Object.defineProperty(r.prototype,"active",{get:function(){return this._active},set:function(n){this._active!==n&&(this._active=n,this.header.rootElement.classList.toggle("active"),this.rootElement.classList.toggle("active"),this.header.rootElement.setAttribute("aria-selected",n+""),this.onActiveChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"model",{get:function(){return this._model},set:function(t){this._model&&this._model instanceof n.Doc&&this._model.propertyChanged.removeHandler(this._onModelPropertyChanged);this._model=t;this._model instanceof n.Doc&&this._model.propertyChanged.addHandler(this._onModelPropertyChanged)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"title",{get:function(){return this.header.rootElement.getElementsByClassName("tabTitle")[0].innerText},set:function(n){n=n?n:"";n=Common.ToolWindowHelpers.getTruncatedString(n);this.header.rootElement.getElementsByClassName("tabTitle")[0].innerText=n},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"tooltipString",{get:function(){return this.header.rootElement.getAttribute("data-plugin-vs-tooltip")},set:function(n){this.header.rootElement.setAttribute("data-plugin-vs-tooltip",n);this.header.rootElement.setAttribute("aria-label",n)},enumerable:!0,configurable:!0}),r.prototype.focus=function(){this.header.rootElement.focus()},r.prototype.equals=function(n){return this.header.rootElement===n.header.rootElement},r.prototype.onHeaderClicked=function(t){return(t===undefined||t.button===0)&&this.ownerTabControl&&!this._active&&this.ownerTabControl.callSelectCallback(this,n.Telemetry.CommandName.SELECT_NEXT_TAB,0,2),!0},r.prototype.updateDisplay=function(){var i,r;if(this.model instanceof n.Doc)i=this.model,i instanceof n.PreviewDoc&&(i=i.nextRevision),this.title=i.displayName,this.tooltipString=i.url.toString();else{this.tooltipString=this.model.displayName;switch(this.model.modelName){case n.ResourcesHandlers.CookiesModel.ModelName:r="CookiesLabel";break;case n.ResourcesHandlers.WebStorageModel.LocalStorageModelName:r="LocalStorageLabel";break;case n.ResourcesHandlers.WebStorageModel.SessionStorageModelName:r="SessionStorageLabel"}this.title=r?t.Resources.getString(r):this.model.displayName}},r.prototype.replaceModel=function(n){this.model=n;this.header.rootElement.setAttribute("id",r.HTML_ID_PREFIX+n.id);this.updateDisplay()},r.prototype.onActiveChanged=function(){},r.prototype.onMouseUp=function(n){return n.button===1&&this.ownerTabControl&&this.ownerTabControl.callCloseCallback(this),!0},r.prototype.onCloseButtonClicked=function(n){var t=n.target;return n.button===0&&t.classList.contains("closeButton")&&this.ownerTabControl&&(this.ownerTabControl.callCloseCallback(this),n.preventDefault(),n.stopImmediatePropagation()),!0},r.prototype.onKeyDown=function(n){return n.keyCode===13||n.keyCode===32?this.onHeaderClicked():n.ctrlKey||n.shiftKey||n.altKey||n.keyCode!==37?n.ctrlKey||n.shiftKey||n.altKey||n.keyCode!==39?n.keyCode!==121||!n.shiftKey||n.ctrlKey||n.altKey||this.ownerTabControl.showContextMenu(this,n):this.ownerTabControl.selectNextTab(1):this.ownerTabControl.selectPreviousTab(1),!0},r.HTML_ID_PREFIX="TabItem:",r}(Common.Controls.Legacy.ContentControl);n.TabItem=i})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,f=function(){function n(n){this._debuggerManager=n;this._retrievals=[];this.asyncFramesAvailable=!1;this.ensureEtwCollectorCreated();var t=window.external;t&&t.addEventListener&&t.addEventListener("closing",this.stopCollection.bind(this))}return Object.defineProperty(n.prototype,"etwDataSession",{get:function(){return this._etwDataSession},enumerable:!0,configurable:!0}),n.prototype.startSession=function(){var n=this;this.ensureEtwCollectorCreated();this._etwDataCollector&&this._etwDataCollector.startSession("JavaScriptCollectionAgent.dll","{84393408-B6CD-40F9-BF81-5906D048B16A}",!1).done(function(t){n.stopSession();n._etwDataSession=t},function(){n.stopCollection()})},n.prototype.stopSession=function(){if(this.cancelPendingRetrievals(),this._etwDataSession){var n=this._etwDataSession;return this._etwDataSession=null,n.stop()}return t.Promise.as(null)},n.prototype.stopCollection=function(){var n=this;this.stopSession().done(function(){n._etwDataCollector&&(n._etwDataCollector.stopCollection(),n._etwDataCollector=null)})},n.prototype.cancelPendingRetrievals=function(){this.asyncFramesAvailable=!1;for(var n in this._retrievals)this._retrievals[n].cancelRetrieval()},n.prototype.getAsyncFrames=function(n){var f=this,i;return(this.cancelPendingRetrievals(),i=new u(this),this._retrievals.push(i),!this._etwDataSession)?(this.finalizeRetrieval(i),t.Promise.as([])):new t.Promise(function(t,u,e){return i.queryForAsyncFrames(n).done(function(n){var r=f.pointsToFrames(n);f.finalizeRetrieval(i);t(r)},function(n){n instanceof r&&f.stopCollection();f.finalizeRetrieval(i);u()},function(n){var t=f.pointsToFrames(n);e(t)})})},n.prototype.pointsToFrames=function(n){for(var t,r=[],i=0;i<n.length;i++)t=JSON.parse(n[i].customData),t.docId=this._debuggerManager.documentController.getRuntimeIdFromLongId(t.docId),r.push(t);return r},n.prototype.ensureEtwCollectorCreated=function(){var n=window.external;n&&n.etwDataCollector&&(this._etwDataCollector=new Common.Data.F12EtwDataCollector(n.etwDataCollector))},n.prototype.finalizeRetrieval=function(n){this._retrievals.splice(this._retrievals.indexOf(n),1)},n}();n.AsyncStackProvider=f;var i=function(){function n(){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 n}(),r=function(){function n(){this.name="QueryError";this.message="Query failed due to a native error. The ETWCollector should be shut down."}return n}(),u=function(){function u(t){this._provider=t;this._queryCount=0;this._cancelRequest=!1;this._etwKey=u.ETW_KEY_COUNTER++;n.debuggerTraceWriter.traceWriter.raiseEventWithKey(386,this._etwKey)}return u.makeEtwParams=function(n){var i={threadId:""+n,processId:""+t.F12.getRemoteProcessId()};return JSON.stringify(i)},u.prototype.cancelRetrieval=function(){this._cancelRequest=!0},u.prototype.queryForAsyncFrames=function(f){var e=this;return new t.Promise(function(t,o,s){if(!e._provider||!e._provider.etwDataSession){n.debuggerTraceWriter.traceWriter.raiseEventWithKey(387,e._etwKey);o(new i);return}var h=u.makeEtwParams(f);e._provider.etwDataSession.getGraphDataUpdate(h).done(function(r){if(e._queryCount===0&&(e._originalSet=r,s(r)),e._cancelRequest){n.debuggerTraceWriter.traceWriter.raiseEventWithKey(387,e._etwKey);o(new i);return}if(r.length>0&&!e.resultsMatch(e._originalSet,r)){n.debuggerTraceWriter.traceWriter.raiseEventWithKey(387,e._etwKey);t(r);return}e._queryCount++;e._queryCount<u.QUERY_COUNT?setTimeout(function(){e.queryForAsyncFrames(f).then(function(n){t(n)},function(n){o(n)})},u.QUERY_TIMEOUT):(n.debuggerTraceWriter.traceWriter.raiseEventWithKey(388,e._etwKey),o(new i))},function(){o(new r)})})},u.prototype.resultsMatch=function(n,t){if(!n||!t||n.length!==t.length)return!1;for(var i=0;i<n.length;i++)if(n[i].customData!==t[i].customData||n[i].toolTip!==t[i].toolTip||n[i].timestamp!==t[i].timestamp||n[i].value!==t[i].value)return!1;return!0},u.QUERY_TIMEOUT=100,u.QUERY_COUNT=30,u.ETW_KEY_COUNTER=0,u}();n.AsyncStackRetrieval=u})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(t,i,r,u,f){this._frameId=t;this._functionName=i;this._rawLocation=u;this.numChildren=0;this.isLibraryMarkerFrame=!1;this.isActiveFrame=!1;this.isInstructionPointerFrame=!1;this.isInternal=r;this._location=f&&f.rawLocation&&f.rawLocation.doc?new n.DynamicLocation(f.rawLocation,f):new n.DynamicLocation({doc:null,offset:0,length:0})}return Object.defineProperty(i.prototype,"frameId",{get:function(){return this._frameId},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"functionName",{get:function(){return this._functionName},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rawLocation",{get:function(){return this._rawLocation},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"location",{get:function(){return this._location},set:function(n){this._location&&this._location.cleanup();this._location=n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"locationString",{get:function(){return this.isInternal?t.Resources.getString("CallstackInternalFrame"):this._location.startPosition&&this._location.startPosition.doc?this.shortFileName+" ("+this._location.startLineNumber+", "+this._location.startColumn+")":this.isLibraryMarkerFrame||this instanceof n.CallstackGroup?"":t.Resources.getString("CallstackUnknownSourceLocation")},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"shortFileName",{get:function(){return this._location.startPosition&&this._location.startPosition.doc?Common.ToolWindowHelpers.createShortenedUrlText(this._location.startPosition.doc.url.toString()):""},enumerable:!0,configurable:!0}),i.prototype.getCopyText=function(){return this._location.startPosition&&this._location.startPosition.doc?this._functionName+" ["+t.Resources.getString("CallStackLineColumn",this._location.lineNumber,this._location.column)+"], "+this.shortFileName:this.isLibraryMarkerFrame?this._functionName:this instanceof n.CallstackGroup?this.functionName:this._functionName},i.prototype.cleanup=function(){this._location&&this._location.cleanup()},i}();n.StackFrame=i})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(n){function t(t,i,r,u,f){n.call(this,"",null,!1,null,r);this._id=t;this._name=i;this.numChildren=u;this._isWorker=f;this.waitToBreak=!1}return __extends(t,n),Object.defineProperty(t.prototype,"isWorker",{get:function(){return this._isWorker},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"workerId",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"functionName",{get:function(){return this._name||""},enumerable:!0,configurable:!0}),t}(n.StackFrame);n.CallstackGroup=t})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(t,i,r){this._id=t;this._name=i;this._isWorker=r;this._waitToBreak=!1;this._rawFrames=[];this._groupedCallstack=[];this._callstackGroup=new n.CallstackGroup(this._id,this._name,null,0,this._isWorker)}return Object.defineProperty(i.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isWorker",{get:function(){return this._isWorker},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"waitToBreak",{get:function(){return this._waitToBreak},set:function(n){this._waitToBreak=n;this._callstackGroup.waitToBreak=n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rawFrames",{get:function(){return this._rawFrames},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"instructionPointerFrame",{get:function(){return this._rawFrames.length>0?this._rawFrames[this._rawFrames.length-1]:null},enumerable:!0,configurable:!0}),i.prototype.clear=function(){for(var n=0;n<this._rawFrames.length;n++)this._rawFrames[n].cleanup();this._rawFrames.splice(0,this._rawFrames.length);this._groupedCallstack.splice(0,this._groupedCallstack.length)},i.prototype.push=function(n){this._rawFrames.splice(0,0,n)},i.prototype.getGroupedCallstack=function(){var i,r,f,u;for(this._groupedCallstack.splice(0,this._groupedCallstack.length),i=0,r=0;r<this._rawFrames.length;r++)f=this._rawFrames[r],f.isAsyncTransition?(u=new n.CallstackGroup(-1,t.Resources.getString("CallstackAsyncTransitionLabel"),null,i,!1),u.isAsync=!0,u.isAsyncTransition=!0,this._groupedCallstack.push(u),i=0):(this._groupedCallstack.push(f),i++);return this._callstackGroup.numChildren=i,this._groupedCallstack.push(this._callstackGroup),this._groupedCallstack.reverse()},i.prototype.clearAsyncFrames=function(){this._rawFrames=this._rawFrames.filter(function(n){return!n.isAsync})},i}();n.Callstack=i})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(n){this._debuggerManager=n;this._callstacks=[];this._listeners=[]}return Object.defineProperty(i.prototype,"callstacks",{get:function(){return this._callstacks},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"activeFrame",{get:function(){return this._activeFrame},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"instructionPointerFrame",{get:function(){return this._instructionPointerFrame},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"debuggerManager",{get:function(){return this._debuggerManager},enumerable:!0,configurable:!0}),i.prototype.getCallstack=function(n){for(var t=0;t<this._callstacks.length;t++)if(this._callstacks[t].id===n)return this._callstacks[t];return null},i.prototype.addAsyncFrames=function(t,i){var f=this.getCallstack(i),r;if(f){for(f.clearAsyncFrames(),r=0;r<t.length;r++){var e={docId:t[r].docId,start:t[r].offset,length:t[r].length},o=this._debuggerManager.documentController.getDocFromRuntimeId(e.docId),s=o&&o.createDocumentLocation(t[r].offset,t[r].length),u=new n.StackFrame("",t[r].name,!1,e,s);u.isAsync=!0;u.functionName==="[Async Call]"&&(u.isAsyncTransition=!0);f.push(u)}for(r=0;r<this._listeners.length;r++)this._listeners[r].callstacksChanged()}},i.prototype.clear=function(){this._activeFrame=null;this._listeners.forEach(function(n){n.activeFrameChanged()});t.F12.Debugger.notifyOnActiveStackFrameChanged();this._callstacks.forEach(function(n){n.clear()});for(var n=0;n<this._callstacks.length;n++)if(!this._callstacks[n].isWorker){this._callstacks.splice(n,1);break}this._listeners.forEach(function(n){n.callstacksChanged()})},i.prototype.workerAdded=function(t){var r=new n.Callstack(t.id,t.displayName,!0),i;for(this._callstacks.push(r),this.sortCallstack(),i=0;i<this._listeners.length;i++)this._listeners[i].callstacksChanged()},i.prototype.workerRemoved=function(n){this.removeCallstackForWorkerByWorkerId(n);for(var t=0;t<this._listeners.length;t++)this._listeners[t].callstacksChanged()},i.prototype.onBreak=function(i,r,u){var h=this,c=Common.PromiseUtilities.EmptyPromise,e,o,f,s;for(this.clear(),e=this.getCallstack(i.id),e||(e=new n.Callstack(i.id,i.displayName,i.isWorker),this._callstacks.push(e),this.sortCallstack()),e.waitToBreak=!1,o=0;o<r.length;o++)r[o].callStackId=e.id,e.push(r[o]);if(f=e.instructionPointerFrame,f){for(f.isInstructionPointerFrame=!0,this._instructionPointerFrame=f,u&&(f=u),this._activeFrame=f,this._activeFrame.isActiveFrame=!0,s=0;s<this._listeners.length;s++)this._listeners[s].callstacksChanged();f.location.startPosition&&(c=this._debuggerManager.resourceViewController.open(f.location.startPosition.doc,{activation:2,params:{location:f.location}}).then(function(){for(var n=0;n<h._listeners.length;n++)h._listeners[n].activeFrameChanged(f);t.F12.Debugger.notifyOnActiveStackFrameChanged()}))}return c},i.prototype.registerListener=function(n){this._listeners.indexOf(n)===-1&&this._listeners.push(n)},i.prototype.goToActiveFrame=function(t){var i=this;return n.Telemetry.logCommandWrapper(n.Telemetry.CommandName.SHOW_NEXT_STATEMENT,t,function(){return i.goTo(i._activeFrame)})},i.prototype.goTo=function(t){return n.debuggerTraceWriter.traceWriter.raiseEvent(316),t&&t.location.startPosition&&!t.isInternal?this._debuggerManager.resourceViewController.open(t.location.startPosition.doc,{activation:2,params:{location:t.location}}):Common.PromiseUtilities.EmptyPromise},i.prototype.activate=function(i){var f,r,u;if(!i||i instanceof n.CallstackGroup||this._activeFrame===i||i.isLibraryMarkerFrame||i.isAsync||i.isInternal)i&&i.isAsync&&i.location&&this.goTo(i);else{for(this._activeFrame&&(this._activeFrame.isActiveFrame=!1),this._activeFrame=i,this._activeFrame.isActiveFrame=!0,f=!1,r=0;r<this._callstacks.length;r++)if(i===this._callstacks[r].instructionPointerFrame){f=!0;break}for(u=0;u<this._listeners.length;u++)this._listeners[u].activeFrameChanged(i);t.F12.Debugger.notifyOnActiveStackFrameChanged()}},i.prototype.goToNextFrameUpStack=function(t){var i=this;return n.Telemetry.logCommandWrapper(n.Telemetry.CommandName.GO_TO_PREVIOUS_FRAME_ON_STACK,t,function(){var n=i._activeFrame&&i.getCallstack(i._activeFrame.callStackId),r,t;return n?(r=n.rawFrames.indexOf(i._activeFrame),t=r+1,t>n.rawFrames.length-1&&(t=0),i.goToFrame(t,n)):Common.PromiseUtilities.EmptyPromise})},i.prototype.goToNextFrameDownStack=function(t){var i=this;return n.Telemetry.logCommandWrapper(n.Telemetry.CommandName.GO_TO_NEXT_FRAME_ON_STACK,t,function(){var n=i._activeFrame&&i.getCallstack(i._activeFrame.callStackId),r,t;return n?(r=n.rawFrames.indexOf(i._activeFrame),t=r-1,t<0&&(t=n.rawFrames.length-1),i.goToFrame(t,n)):Common.PromiseUtilities.EmptyPromise})},i.prototype.findCallstackIndexByWorkerId=function(n){for(var t=0;t<this._callstacks.length;t++)if(this._callstacks[t].isWorker&&this._callstacks[t].id===n)return t;return-1},i.prototype.removeCallstackForWorkerByWorkerId=function(n){var t=this.findCallstackIndexByWorkerId(n);t>=0&&this._callstacks.splice(t,1)},i.prototype.sortCallstack=function(){this._callstacks.sort(function(n,t){return n.id-t.id})},i.prototype.goToFrame=function(n,t){return this.activate(t.rawFrames[n]),this.goTo(t.rawFrames[n])},i}();n.CallstackController=i})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=Common.Grid,r=function(){function r(u,f){var e=this,l,s,h,c,o;this._controller=u;this._persistenceManager=this._controller.debuggerManager.persistenceManager;this._breakOnWorkerDisabled=!1;this._isBroken=!1;this._isJMCEnabled=!1;this._locationListeners=[];l=f.clientWidth-r.DEFAULT_ICON_COLUMN_WIDTH;s=new i.ColumnInfo("functionName",t.Resources.getString("StackFramesColumn"),t.Resources.getString("StackFramesColumnTooltip"),l*r.DEFAULT_FUNCTION_NAME_COLUMN_PERCENT_WIDTH,!1);s.getCellCSSClass=function(n,t,i,r){return e.getCellCSSClass(n,t,i,r)};s.percentWidth=r.DEFAULT_FUNCTION_NAME_COLUMN_PERCENT_WIDTH;h=new i.ColumnInfo("locationString",t.Resources.getString("LocationColumn"),t.Resources.getString("LocationColumnTooltip"),l*r.DEFAULT_LOCATION_COLUMN_PERCENT_WIDTH,!1);h.getCellCSSClass=function(n,t,i,r){return e.getCellCSSClass(n,t,i,r)};h.percentWidth=r.DEFAULT_LOCATION_COLUMN_PERCENT_WIDTH;c=new i.ColumnInfo(null,t.Resources.getString("ActionsColumn"),t.Resources.getString("ActionsColumnTooltip"),r.DEFAULT_ICON_COLUMN_WIDTH,!1);c.getCellCSSClass=function(n,t,i,r){return e.getCellCSSClass(n,t,i,r)};c.cellDecorator=this.onCellDecorate.bind(this);c.fixed=!0;this._columnInfo=[s,h];o=f.querySelector(".gridcontainer");this.createGrid(o);o.addEventListener("contextmenu",this.showContextMenu.bind(this));o.addEventListener("dblclick",this.onMouseDoubleClick.bind(this));o.addEventListener("keydown",this.onGridElementKeyDown.bind(this));document.addEventListener("keydown",this.onDocumentKeyDown.bind(this));this._rootElement=f;Common.ClipboardHelper.addCopyListener(this._rootElement,this.onCopy.bind(this));t.F12.addEventListener("keydown",this.onDocumentKeyDown.bind(this));this._toggleJMCFramesButton=document.getElementById("toggleJMCFramesButton");Common.ButtonHelpers.setupButton(this._toggleJMCFramesButton,"CallstackWindowLibraryFramesHiddenTooltip",function(){e.showLibraryFrames?n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.TOGGLE_JMC_FRAMES_DISPLAY_OFF,0):n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.TOGGLE_JMC_FRAMES_DISPLAY_ON,0);e.showLibraryFrames=!e.showLibraryFrames},this._isJMCEnabled);this._toggleAsyncFramesButton=document.getElementById("toggleAsyncFramesButton");Common.ButtonHelpers.setupButton(this._toggleAsyncFramesButton,"CallstackWindowAsyncFramesHiddenTooltip",function(){e.showAsyncFrames?n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.TOGGLE_ASYNC_FRAMES_OFF,0):n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.TOGGLE_ASYNC_FRAMES_ON,0);e.showAsyncFrames=!e.showAsyncFrames},!0);this.showLibraryFrames=this._persistenceManager.getSettingAsBoolean(r.SHOW_LIBRARY_FRAMES_SETTINGS_KEY,!1);this.showAsyncFrames=this._persistenceManager.getSettingAsBoolean(r.SHOW_ASYNC_FRAMES_SETTINGS_KEY,!0);f.parentElement.addEventListener("tabActivated",function(n){e.layout();n.stopImmediatePropagation()})}return Object.defineProperty(r.prototype,"showLibraryFrames",{get:function(){return this._showLibraryFrames},set:function(i){this._showLibraryFrames!==i&&(n.debuggerTraceWriter.traceWriter.raiseEvent(351),this._showLibraryFrames=i,this._persistenceManager.setSettingAsBoolean(r.SHOW_LIBRARY_FRAMES_SETTINGS_KEY,this._showLibraryFrames),this._showLibraryFrames?(this._toggleJMCFramesButton.classList.remove("toggledOn"),Common.ButtonHelpers.changeButtonStatus(this._toggleJMCFramesButton,this._isJMCEnabled,!1),this._toggleJMCFramesButton.setAttribute("data-plugin-vs-tooltip",t.Resources.getString("CallstackWindowLibraryFramesVisibleTooltip")),this._toggleJMCFramesButton.setAttribute("aria-label",t.Resources.getString("CallstackWindowLibraryFramesVisibleTooltip"))):(this._toggleJMCFramesButton.classList.add("toggledOn"),Common.ButtonHelpers.changeButtonStatus(this._toggleJMCFramesButton,this._isJMCEnabled,!0),this._toggleJMCFramesButton.setAttribute("data-plugin-vs-tooltip",t.Resources.getString("CallstackWindowLibraryFramesHiddenTooltip")),this._toggleJMCFramesButton.setAttribute("aria-label",t.Resources.getString("CallstackWindowLibraryFramesHiddenTooltip"))),this._isJMCEnabled&&this.callstacksChanged(),n.debuggerTraceWriter.traceWriter.raiseEvent(352))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"showAsyncFrames",{get:function(){return this._showAsyncFrames},set:function(n){this._showAsyncFrames!==n&&(this._showAsyncFrames=n,this._persistenceManager.setSettingAsBoolean(r.SHOW_ASYNC_FRAMES_SETTINGS_KEY,this._showAsyncFrames),this._showAsyncFrames?(this._toggleAsyncFramesButton.classList.remove("toggledOn"),Common.ButtonHelpers.changeButtonStatus(this._toggleAsyncFramesButton,!0,!1),this._toggleAsyncFramesButton.setAttribute("data-plugin-vs-tooltip",t.Resources.getString("CallstackWindowAsyncFramesVisibleTooltip")),this._toggleAsyncFramesButton.setAttribute("aria-label",t.Resources.getString("CallstackWindowAsyncFramesVisibleTooltip"))):(this._toggleAsyncFramesButton.classList.add("toggledOn"),Common.ButtonHelpers.changeButtonStatus(this._toggleAsyncFramesButton,!0,!0),this._toggleAsyncFramesButton.setAttribute("data-plugin-vs-tooltip",t.Resources.getString("CallstackWindowAsyncFramesHiddenTooltip")),this._toggleAsyncFramesButton.setAttribute("aria-label",t.Resources.getString("CallstackWindowAsyncFramesHiddenTooltip"))),this.callstacksChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isJMCEnabled",{get:function(){return this._isJMCEnabled},set:function(n){this._isJMCEnabled=n;Common.ButtonHelpers.changeButtonStatus(this._toggleJMCFramesButton,this._isJMCEnabled)},enumerable:!0,configurable:!0}),r.prototype.callstacksChanged=function(){for(var e,u,c,a,l,i,s,h,v,o=this,f=0;f<this._locationListeners.length;f++)this._locationListeners[f].unregister();for(this._locationListeners=[],this._groupedCallstacksCache=[],this._expandStates=[],this._displayedInstructionPointerFrame=null,e=0,c=0;c<this._controller.callstacks.length;c++)for(a=this._controller.callstacks[c].getGroupedCallstack(),e=this._groupedCallstacksCache.length,l=0;l<a.length;l++)i=a[l],i.isAsyncTransition?(this._groupedCallstacksCache.push(i),this._expandStates.push(i.numChildren*(this.showAsyncFrames?1:-1)),e=this._expandStates.length-1,u=null):!this.isJMCEnabled||this.showLibraryFrames?(this._groupedCallstacksCache.push(i),this._expandStates.push(i.numChildren),i.isInstructionPointerFrame&&(this._displayedInstructionPointerFrame=i)):(s=i.location.rawLocation.doc&&i.location.rawLocation.doc.isLibraryFile,s=s||i.isInternal,s?u?this._expandStates[e]>0?this._expandStates[e]--:this._expandStates[e]++:(u=new n.StackFrame(r.JMC_FRAME_ID,t.Resources.getString("CallstackLibraryCode"),!1,undefined),u.isLibraryMarkerFrame=!0,this._groupedCallstacksCache.push(u),this._expandStates.push(0)):(this._groupedCallstacksCache.push(i),this._expandStates.push(i.numChildren),u=null),i.isInstructionPointerFrame&&s&&(u.isInstructionPointerFrame=!0,this._displayedInstructionPointerFrame=u));for(h=this._grid.getSelectedRowIndex(),this._groupedCallstacksCache.length===0||this._groupedCallstacksCache[0].numChildren===0?h=-1:h===-1&&this._groupedCallstacksCache.length>0&&(h=0),v=function(){o._redrawTimeout||(o._redrawTimeout=window.setTimeout(function(){o.clearOldFrameDecorations();o._grid.redraw();o._redrawTimeout=null},50))},f=0;f<this._groupedCallstacksCache.length;f++)this._locationListeners.push(this._groupedCallstacksCache[f].location.changesCompleted.addHandler(v));this._grid.setDataSource(this._groupedCallstacksCache,this._expandStates,this._columnInfo,null,h)},r.prototype.activeFrameChanged=function(n){var r,i,t;this.clearOldFrameDecorations();n&&(r=this._grid.getDataSource(),r&&(i=r.indexOf(n),i>=0?(t=this._grid.getRowInfo(i),t&&(n.isInstructionPointerFrame?t.row.classList.add("instructionPointerGlyph"):n.isActiveFrame&&(t.row.classList.add("activeFrameGlyph"),i=r.indexOf(this._displayedInstructionPointerFrame),i>=0&&(t=this._grid.getRowInfo(i),t&&t.row.classList.add("instructionPointerGlyph"))))):this._displayedInstructionPointerFrame&&(i=r.indexOf(this._displayedInstructionPointerFrame),i>=0&&(t=this._grid.getRowInfo(i),t&&t.row.classList.add("instructionPointerGlyph")))))},r.prototype.navigateTo=function(){return Common.PromiseUtilities.EmptyPromise},r.prototype.layout=function(){this._grid.layoutOnResize()},r.prototype.breakStateChanged=function(n){this._isBroken=n},r.prototype.exceptionFilterChanged=function(){},r.prototype.breakCallComplete=function(){},r.prototype.justMyCodeStateChanged=function(n){this.isJMCEnabled=n;this.callstacksChanged()},r.prototype.documentUrlChanged=function(){},r.prototype.documentUpdated=function(){},r.prototype.documentAsLibraryStateChanged=function(){this.isJMCEnabled&&this.callstacksChanged()},r.isBreakOnWorkerButton=function(n){return n&&n.classList.contains("breakOnWorker")},r.prototype.createButton=function(n,t,i){var r=document.createElement("div"),u=document.createElement("div");return r.className=n+" iconShell_18x18",u.className="buttonIcon icon_14x14",r.appendChild(u),Common.ButtonHelpers.setupButton(r,t,i),r},r.prototype.clearOldFrameDecorations=function(){var n=this._grid.getElement().querySelector(".instructionPointerGlyph");n&&n.classList.remove("instructionPointerGlyph");n=this._grid.getElement().querySelector(".activeFrameGlyph");n&&n.classList.remove("activeFrameGlyph")},r.prototype.onCellDecorate=function(n,t){var r=t,i;r.isWorker&&(i=this.createButton("breakOnWorker","ActionsColumnTooltip",null),i.setAttribute("workerId",r.workerId.toString()),i.setAttribute("role","button"),Common.ButtonHelpers.changeButtonStatus(i,!r.waitToBreak),n.appendChild(i))},r.prototype.onDocumentKeyDown=function(n){if(n.ctrlKey&&!n.altKey&&!n.shiftKey){if(n.keyCode===188)return this._controller.goToNextFrameUpStack(1),!1;if(n.keyCode===190)return this._controller.goToNextFrameDownStack(1),!1}return!0},r.prototype.onGridElementKeyDown=function(n){return n.keyCode===121&&n.shiftKey&&!n.ctrlKey&&!n.altKey?(this.showContextMenu(n),!1):!0},r.prototype.onMouseDoubleClick=function(n){var t,i;r.isBreakOnWorkerButton(n.target)||(t=this._grid.getRowInfoFromEvent(n,".grid-row")||this._grid.getRowInfo(this._grid.getSelectedDataIndex()),t&&(i=this._groupedCallstacksCache[t.dataIndex],i.isLibraryMarkerFrame?this.showLibraryFrames=!0:this._controller.goTo(i)))},r.prototype.createGrid=function(n){var r=this,t;this._childDataCallback=function(){return null};t=new i.GridOptions(this._childDataCallback,this._columnInfo,null,null);t.asyncInit=!1;t.keyboardEventHandler={keys:[Common.Keys.ENTER],handler:function(n,t,i){return r.keyboardEventHandler(n,t,i)}};t.disableRightClickSelection=!1;t.drawRowSplitters=!0;this._grid=new i.GridControl(n,t);this._grid.getElement().addEventListener("selectionchanged",function(n){if(r._isBroken){var t=n.customData[0].selectedIndex;t&&t>=0&&r._controller.activate(r._groupedCallstacksCache[t])}});this.callstacksChanged()},r.prototype.keyboardEventHandler=function(n,t,i){return n.keyCode===13&&!Common.HasAnyOfAltCtrlShiftKeyFlags(n)?(this._controller.goTo(t[i]),!0):!1},r.prototype.getCellCSSClass=function(n,t,i,u){var f="",e=u[n];return e&&(i===r.ICON_CELL_INDEX&&(e.isInstructionPointerFrame?f+=" instructionPointerGlyph":e.isActiveFrame&&(f+=" activeFrameGlyph")),e.isAsync&&(f+=" asyncFrame"),e.isInternal&&(f+=" internalFrame")),f},r.prototype.createMenuItems=function(){var r=this,n=[],u=this._groupedCallstacksCache[this._contextMenuSelection],i;return n.push({id:"menuItemSwitchToFrameCallstackWindow",callback:function(n,t){return r.goToSource(n,t)},label:t.Resources.getString("CallstackContextMenuGoToSource"),type:1,disabled:function(){return!u.location.startPosition||!u.location.startPosition.doc}}),n.push({id:"menuItemSep1CallstackWindow",type:3}),n.push({id:"menuItemCopyFrameCallstackWindow",callback:function(n,t){return r.copyFrame(n,t)},label:t.Resources.getString("CallStackContextMenuCopyFrame"),type:1,disabled:function(){return r._groupedCallstacksCache[r._contextMenuSelection].getCopyText().length===0}}),n.push({id:"menuItemCopyStackCallstackWindow",callback:function(n,t){return r.copyStack(n,t)},label:t.Resources.getString("CallStackContextMenuCopyStack"),type:1,disabled:function(){return r.getCopyStackText().length===0}}),i=u.location&&u.location.rawLocation&&u.location.rawLocation.doc,i&&i.isRuntimeDoc&&!i.isDynamicCode&&(n.push({id:"menuItemSep2CallstackWindow",type:3}),n.push({id:"menuItemMarkAsLibraryCallstackWindow",callback:function(){i.setIsLibraryFile(!i.isLibraryFile,2)},label:t.Resources.getString("TabContextMenuMarkAsLibraryCode"),type:0,checked:function(){return i.isLibraryFile}})),n},r.prototype.goToSource=function(){var t=this;n.Telemetry.logCommandWrapper(n.Telemetry.CommandName.GO_TO_SOURCE,2,function(){t._controller.goTo(t._groupedCallstacksCache[t._contextMenuSelection])})},r.prototype.copyFrame=function(){var t=this;n.Telemetry.logCommandWrapper(n.Telemetry.CommandName.COPY_FRAME,2,function(){t._copyText=t._groupedCallstacksCache[t._contextMenuSelection].getCopyText();Common.ClipboardHelper.fireCopyEvent(t._rootElement)})},r.prototype.copyStack=function(){var t=this;n.Telemetry.logCommandWrapper(n.Telemetry.CommandName.COPY_STACK,2,function(){t._copyText=t.getCopyStackText();Common.ClipboardHelper.fireCopyEvent(t._rootElement)})},r.prototype.getCopyStackText=function(){var n="";return this._groupedCallstacksCache.forEach(function(t){var i=t.getCopyText();i&&(n+=i+"\r\n")}),n},r.prototype.onCopy=function(){return this._copyText},r.prototype.showContextMenu=function(n){var u,i,r,f;this._grid&&(this._contextMenu&&(this._contextMenu.dispose(),this._contextMenu=null),u=this._grid.getRowInfoFromEvent(n,".grid-row")||this._grid.getRowInfo(this._grid.getSelectedDataIndex()),u&&(this._contextMenuSelection=u.dataIndex,this._contextMenu=t.ContextMenu.create(this.createMenuItems(),"callstackMenu"),i=0,r=0,n instanceof MouseEvent&&(i=n.pageX,r=n.pageY),i<=0&&r<=0&&(f=u.row.getBoundingClientRect(),i=f.left,r=f.top),this._contextMenu.show(i,r)));n.preventDefault();n.stopImmediatePropagation()},r.DEFAULT_FUNCTION_NAME_COLUMN_PERCENT_WIDTH=.7,r.DEFAULT_LOCATION_COLUMN_PERCENT_WIDTH=.3,r.DEFAULT_ICON_COLUMN_WIDTH=30,r.ICON_CELL_INDEX=0,r.SHOW_LIBRARY_FRAMES_SETTINGS_KEY="showLibraryFrames",r.SHOW_ASYNC_FRAMES_SETTINGS_KEY="showAsyncFrames",r.JMC_FRAME_ID="jmcFrame",r.ASYNC_FRAME_ID="asyncFrame",r}();n.CallstackWindow=r})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function r(r,u,f,e,o,s,h,c){var v,y,a,l;if(this._breakpointId=r,this.isEnabled=!0,this.isTracepoint=!1,this.isBound=s,this.condition="",this.isMutationBreakpoint=h,this.mutationType=c,this.mutationBreakpointObjectName="",v=!!(!e&&!o&&f&&!h),y=!!(e&&o&&!f&&!h),n.Utility.Assert.isTrue(h||!h&&c===0),n.Utility.Assert.isTrue(h||v||y),this._rawLocation=u,this._url=o,this._eventTypes=f,this._location=f||h?null:new t.DynamicLocation(e.rawLocation,e),f)if(this.isXHR())this._eventTypesText=i.Resources.getString("XHRBreakpointDescription");else{for(a="",l=0;l<this._eventTypes.length;l++)a+=t.BreakpointController.getStringForEventBreakpointType(this._eventTypes[l]),l<this._eventTypes.length-1&&(a+=" ");this._eventTypesText=i.Resources.getString(this._eventTypes.length===1?"EventBreakpointSingleGroup":"EventBreakpointMultiGroup",a)}}return Object.defineProperty(r.prototype,"breakpointId",{get:function(){return this._breakpointId},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"rawLocation",{get:function(){return this._rawLocation},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"eventTypes",{get:function(){return this._eventTypes},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"location",{get:function(){return this._location},set:function(n){this._location&&this._location.cleanup();this._location=n},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"url",{get:function(){return this._url},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"tooltipText",{get:function(){return this._eventTypes?this._eventTypesText:this.url},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isFrozen",{get:function(){return!!(this.location&&this.location.startPosition&&this.location.startPosition.doc&&this.location.startPosition.doc.isEditPending)},enumerable:!0,configurable:!0}),r.isUnresolvedId=function(n){return n.indexOf(":unresolved:")>=0},r.prototype.equals=function(n){return this._breakpointId===n.breakpointId},r.prototype.toString=function(n){var t,i,r;return n===void 0&&(n=!1),this._eventTypes?this._eventTypesText:this.isMutationBreakpoint?this.mutationBreakpointObjectName:(t=this._url,i="",this.location&&this.location.startPosition&&(t=this.location.startPosition.doc.url.toString(),i=" ("+this.location.startPosition.line+", "+this.location.startPosition.column+")"),r=Common.ToolWindowHelpers.createShortenedUrlText(t),n&&(r+=" : "+Common.EncodingUtilities.escapeHtml(t)),r+i)},r.prototype.getGlyphClassName=function(){return"breakpointGlyph "+(this._eventTypes?this.isTracepoint?"eventTracepointImg":this.isXHR()?"eventXHRBreakpointImg":this.condition?"eventBreakpointConditionalImg":"eventBreakpointImg":this.isTracepoint?"tracepointimg":this.condition?"conditionalimg":"breakpointimg")},r.prototype.resolveTo=function(n){this.location&&this._location.cleanup();this._breakpointId=n.breakpointId;this.isBound=n.isBound;this._location=n.location;this._rawLocation=n.rawLocation},r.prototype.isXHR=function(){return this.eventTypes&&this.eventTypes.indexOf(r.XHR_BREAKPOINT_FLAG)!==-1},r.prototype.cleanUp=function(){this.location&&this._location.cleanup();this._location=null;this._rawLocation=null},r.XHR_BREAKPOINT_CONDITION='arguments[0].target.toString() === "[object XMLHttpRequest]" && arguments[0].target.readyState === 4',r.XHR_BREAKPOINT_FLAG="XmlHttpRequest response",r}();t.Breakpoint=r})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function r(n){this._breakpoints=[];this._listeners=[];this._debuggerManager=n;this._persistenceManager=this._debuggerManager.persistenceManager;r.EventBreakpointLocMap={};r.loadEventBreakpointDescriptions()}return Object.defineProperty(r,"eventBreakpointDescriptions",{get:function(){return r.EventBreakpointDescriptions},enumerable:!0,configurable:!0}),r.loadEventBreakpointDescriptions=function(n){var e,t,o,u,f;if(e=typeof n=="string"?n:i.F12.Utilities.readResourceFile("Breakpoints/eventBreakpointDescriptions.json"),e)for(r.EventBreakpointDescriptions=JSON.parse(e),r.EventBreakpointLocMap={},t=0;t<r.EventBreakpointDescriptions.categories.length;t++)for(o=r.EventBreakpointDescriptions.categories[t],u=0;u<o.events.length;u++)f=o.events[u],f.nameLocId&&(r.EventBreakpointLocMap[f.eventKey]=f.nameLocId)},r.getStringForEventBreakpointType=function(n){var t=r.EventBreakpointLocMap[n];return t?i.Resources.getString(""+t):n},r.prototype.getBreakpoint=function(n){if(n===null||n===t.breakpointIdNotFound)return null;for(var i=0;i<this._breakpoints.length;i++)if(this._breakpoints[i].breakpointId===n)return this._breakpoints[i];return null},r.prototype.getBreakpointAtIndex=function(n){return n>=0&&n<this._breakpoints.length?this._breakpoints[n]:null},r.prototype.registerListener=function(n){this._listeners.indexOf(n)===-1&&this._listeners.push(n)},r.prototype.deleteAll=function(n,r){var u=this;return t.Telemetry.logCommandWrapper(t.Telemetry.CommandName.DELETE_ALL_BREAKPOINTS_IN_WINDOW,n,function(){for(var f=[],n=u._breakpoints.length-1;n>=0;n--)f.push(u.deleteBreakpoint(u._breakpoints[n],t.Telemetry.CommandName.DELETE_ALL_BREAKPOINTS_IN_WINDOW,3,r));return i.Promise.join(f)})},r.prototype.setEnabledState=function(i,r){var f=this,u;return n.Tools.Utility.Assert.isFalse(i.isFrozen),t.debuggerTraceWriter.traceWriter.raiseEvent(340),u=i.isMutationBreakpoint?this._debuggerManager.setMutationBreakpointEnabledState(i.breakpointId,r):this._debuggerManager.setBreakpointEnabledState(i.breakpointId,r),u.then(function(n){return n&&(i.isEnabled=r,f.breakpointChanged(i)),t.debuggerTraceWriter.traceWriter.raiseEvent(341),n})},r.prototype.setAllEnabledStates=function(n,r,u){var f=this;return t.Telemetry.logCommandWrapper(r,u,function(){var u,r;for(t.debuggerTraceWriter.traceWriter.raiseEvent(318),u=[],r=0;r<f._breakpoints.length;r++)f._breakpoints[r].isFrozen||u.push(f.setEnabledState(f._breakpoints[r],n));return i.Promise.join(u).then(function(){t.debuggerTraceWriter.traceWriter.raiseEvent(319)})})},r.prototype.setBreakpointCondition=function(n,t,r){var u=this;return(t||(t="",r=!1),n.isMutationBreakpoint)?i.Promise.as(!1):this._debuggerManager.setBreakpointCondition(n.breakpointId,t,r).then(function(i){return i&&(n.condition=t,n.isTracepoint=r,u.breakpointChanged(n)),i})},r.prototype.addCodeBreakpoint=function(n,i,r,u,f){var e=this;return u===void 0&&(u=!1),f===void 0&&(f=!0),t.Telemetry.logCommandWrapper(i,r,function(){return e._debuggerManager.addCodeBreakpoint(n).then(function(n){return e.afterBreakpointAdded(n,u,f)})})},r.prototype.addEventBreakpoint=function(n,r,u,f,e){var o=this;return t.Telemetry.logCommandWrapper(f,e,function(){var f,t=o.getExistingEventBreakpoint(n);return f=t?o.setBreakpointCondition(t,r,u).then(function(){return o.setEnabledState(t,!0)}).then(function(){return i.Promise.as(t)}):o._debuggerManager.addEventBreakpoint(n,!0,r,u),f.then(function(n){return o.afterBreakpointAdded(n,u,!1)})})},r.prototype.addPendingBreakpoints=function(n){for(var t,r=[],i=0;i<n.length;i++)if(t=n[i],t.eventTypes)this.addPendingEventBreakpoint(t,r);else if(t.isMutationBreakpoint)continue;else this.addPendingCodeBreakpoint(t)},r.prototype.setMutationBreakpoint=function(n,i,r){var u=this.getBreakpoint(n),f;if(u){if((u.mutationType&i)===u.mutationType&&u.mutationBreakpointObjectName===r)return;i===0?u.mutationType=0:u.mutationType|=i;u.mutationBreakpointObjectName!==r&&(u.mutationBreakpointObjectName=r);this.breakpointChanged(u)}else f=new t.Breakpoint(n,null,null,null,null,!0,!0,i),f.mutationBreakpointObjectName=r,this.afterBreakpointAdded(f,!1)},r.prototype.deleteBreakpoint=function(n,i,r,u){var f=this;return t.Telemetry.logCommandWrapper(i,r,function(){if(f.getIndex(n)>=0){var t;return t=u?Common.PromiseUtilities.EmptyPromise:n.isMutationBreakpoint?f._debuggerManager.deleteMutationBreakpoint(n.breakpointId):f._debuggerManager.removeBreakpoint(n.breakpointId),t.then(function(){var i=f.getIndex(n),t;if(i>=0)for(f._breakpoints.splice(f.getIndex(n),1),f._persistenceManager.saveState(),n.cleanUp(),t=0;t<f._listeners.length;t++)f._listeners[t].breakpointRemoved(n)})}})},r.prototype.resolveBreakpointById=function(n,i){var f,r,u;if(t.Breakpoint.isUnresolvedId(n)&&!t.Breakpoint.isUnresolvedId(i.breakpointId)&&this.hasBreakpointWithId(i.breakpointId))f=this.getBreakpoint(n),f&&this.deleteBreakpoint(f,t.Telemetry.CommandName.DELETE_BREAKPOINT_IN_WINDOW,3,!0);else for(r=0;r<this._breakpoints.length;r++)if(u=this._breakpoints[r],u.breakpointId===n){u.resolveTo(i);this.breakpointChanged(u,n);break}},r.prototype.unresolveCodeBreakpoints=function(n){for(var t,i=0;i<this._breakpoints.length;i++)t=this._breakpoints[i],t.location&&t.location.startPosition&&t.location.startPosition.doc===n&&!t.isMutationBreakpoint&&(t.isBound=!1,this.breakpointChanged(t))},r.prototype.unresolveAllBreakpoints=function(){for(var t,n=0;n<this._breakpoints.length;n++)t=this._breakpoints[n],t.isBound=!1,this.breakpointChanged(t)},r.prototype.navigateToBreakpoint=function(n,i,r){var u=this;return t.Telemetry.logCommandWrapper(i,r,function(){if(!n.location)return Common.PromiseUtilities.EmptyPromise;var t={activation:2};return n.isFrozen||(t.params={location:n.location}),u._debuggerManager.resourceViewController.open(n.location.startPosition.doc,t)})},r.prototype.getBreakpointsStartingAtLine=function(n,t){for(var i,u=[],r=0;r<this._breakpoints.length;r++)i=this._breakpoints[r],i.location&&i.location.startPosition.doc===n&&i.location.startLineNumber===t&&u.push(i);return u},r.prototype.getBreakpointAtLocation=function(n){var t=this;return this._debuggerManager.getBreakpointIdFromLocation(n).then(function(n){if(n!==null){var r=t.getBreakpoint(n);return i.Promise.as(r)}return i.Promise.as(null)})},r.prototype.getBreakpoints=function(n){var r,i,t;if(!n)return this._breakpoints;for(r=[],i=0;i<this._breakpoints.length;i++)t=this._breakpoints[i],t.location&&t.location.startPosition&&t.location.startPosition.doc===n&&!t.isMutationBreakpoint&&r.push(t);return r},r.prototype.hasBreakpointWithId=function(n){for(var t=0;t<this._breakpoints.length;t++)if(this._breakpoints[t].breakpointId===n)return!0;return!1},r.prototype.addOrRemoveBreakpointAtLocation=function(n){var i=this;return this.getBreakpointAtLocation(n).then(function(r){return r?i.deleteBreakpoint(r,t.Telemetry.CommandName.TOGGLE_BREAKPOINT_IN_EDITOR,3):i.addCodeBreakpoint(n,t.Telemetry.CommandName.TOGGLE_BREAKPOINT_IN_EDITOR,3)})},r.prototype.addOrRemoveAllBreakpointsAtLocation=function(n){var u=this.getBreakpointsStartingAtLine(n.startPosition.doc,n.lineNumber),f,r,s;if(u&&u.length>0){var e=[],o=!1,h=n.startColumn===n.endColumn;for(f=0;f<u.length;f++)r=u[f],s=n.endColumn>=r.location.startColumn&&(n.startColumn<=r.location.endColumn||r.location.endLineNumber>r.location.startLineNumber),(h||s)&&(e.push(this.deleteBreakpoint(r,t.Telemetry.CommandName.DELETE_BREAKPOINT_IN_WINDOW,3)),o=!0);if(o)return i.Promise.join(e)}return this.addCodeBreakpoint(n,t.Telemetry.CommandName.TOGGLE_BREAKPOINT_IN_EDITOR,3)},r.prototype.promptToModifyConditionOrTracepoint=function(n,i,r){var u=this;t.Telemetry.logCommandWrapper(i,r,function(){for(var t=0;t<u._listeners.length;t++)n.isTracepoint?u._listeners[t].tracepointPromptInvoked(n):u._listeners[t].conditionPromptInvoked(n)})},r.prototype.documentUrlChanged=function(n){for(var t,r=this.getBreakpoints(n),i=0;i<r.length;i++)for(t=0;t<this._listeners.length;t++)this._listeners[t].breakpointChanged(r[i])},r.prototype.breakpointChanged=function(n,i){t.debuggerTraceWriter.traceWriter.raiseEvent(342);for(var r=0;r<this._listeners.length;r++)this._listeners[r].breakpointChanged(n,i);this._debuggerManager.testEventObject.fireEvent("breakpointChanged");t.debuggerTraceWriter.traceWriter.raiseEvent(343)},r.prototype.updateBreakpointLocations=function(n){for(var i,f,u=this.getBreakpoints(n),r=0;r<u.length;r++)i=u[r],i.isMutationBreakpoint||(f=new t.Breakpoint(i.breakpointId,i.rawLocation,i.eventTypes,i.location,i.url,i.isBound,!1,0),this.resolveBreakpointById(i.breakpointId,f))},r.prototype.updateBreakpointAfterSave=function(n,r){var u=this;return this.deleteBreakpoint(n,t.Telemetry.CommandName.DELETE_BREAKPOINT_IN_WINDOW,3).then(function(){return u.addCodeBreakpoint(r,t.Telemetry.CommandName.TOGGLE_BREAKPOINT_IN_EDITOR,3,n.isTracepoint,!1)}).then(function(t){var r,f;return t&&(r=u.getBreakpoint(t),r)?(f=[],n.isEnabled||f.push(u.setEnabledState(r,!1)),n.condition&&f.push(u.setBreakpointCondition(r,n.condition,n.isTracepoint)),i.Promise.join(f)):Common.PromiseUtilities.EmptyPromise})},r.prototype.toggleAll=function(n){this.setAllEnabledStates(this.areAnyBreakpointsDisabled(),t.Telemetry.CommandName.TOGGLE_ALL_BREAKPOINTS,n)},r.prototype.areAnyBreakpointsDisabled=function(){var t=this.getBreakpoints(),i,n;for(i in t)if((n=t[i],!n.isFrozen)&&!n.isEnabled)return!0;return!1},r.prototype.afterBreakpointAdded=function(n,t,i){var r;if(i===void 0&&(i=!0),n){if(this.getIndex(n)===-1){if(this._breakpoints.push(n),t&&(n.isTracepoint=!0,i))for(r=0;r<this._listeners.length;r++)this._listeners[r].tracepointPromptInvoked(n);for(r=0;r<this._listeners.length;r++)this._listeners[r].breakpointAdded(n);this._persistenceManager.saveState()}return n.breakpointId}return null},r.prototype.getIndex=function(n){for(var t=0;t<this._breakpoints.length;t++)if(n.equals(this._breakpoints[t]))return t;return-1},r.prototype.addPendingCodeBreakpoint=function(n){var i=this;this._debuggerManager.addPendingBreakpoint(n.url,n.rawLocation.start,n.condition,n.isEnabled,n.isTracepoint).done(function(r){var f;if(r){var e=new t.Source(0,0,!1,n.url,"text/javascript",0,!1,null),o=new t.DocumentLocation(new t.Doc(e),n.oneBasedStartLine,n.oneBasedStartColumn),u=new t.Breakpoint(r,n.rawLocation,null,o,n.displayUrl,!1,!1,0);for(u.isEnabled=n.isEnabled,u.isTracepoint=n.isTracepoint,u.condition=n.condition,i._breakpoints.push(u),f=0;f<i._listeners.length;f++)i._listeners[f].pendingBreakpointAdded(u)}})},r.prototype.addPendingEventBreakpoint=function(n,t){var i=this,r=this.getExistingEventBreakpoint(n.eventTypes,t);r||(t.push({eventTypes:n.eventTypes}),this._debuggerManager.addEventBreakpoint(n.eventTypes,n.isEnabled,n.condition,n.isTracepoint).done(function(n){i._breakpoints.push(n);for(var t=0;t<i._listeners.length;t++)i._listeners[t].breakpointAdded(n)}))},r.prototype.getExistingEventBreakpoint=function(n,t){var r,f,i,u;for(t===void 0&&(t=this._breakpoints),r=null,f=0;f<t.length;f++)if(i=t[f],i.eventTypes&&i.eventTypes.length>0&&i.eventTypes.length===n.length){for(r=i,u=0;u<n.length;u++)if(n[u]!==i.eventTypes[u]){r=null;break}if(r)break}return r},r}();t.BreakpointController=r})(i=t.Debugger||(t.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(t,i,r){var e=this,f,u;this.breakpoint=t;this._window=i;this._controller=r;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(){return e.activateEditBox(n.Telemetry.CommandName.SET_CONDITION_IN_EDITOR,0)});this.deleteButton=this.createButton("bpDeleteButton","DeleteButtonTooltip",function(){return e._window.onDeleteBreakpointRow(e,n.Telemetry.CommandName.DELETE_BREAKPOINT_IN_WINDOW,0)});f=document.createElement("span");u=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=" ";f.className="bpText";u.className="bpItemControls";this.rootElement.appendChild(this.checkbox);this.rootElement.appendChild(this.icon);f.appendChild(this.text);this.rootElement.appendChild(f);u.appendChild(this.editButton);u.appendChild(this.deleteButton);this.rootElement.appendChild(u);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));this.addDocListener()}return Object.defineProperty(i.prototype,"ariaLabel",{get:function(){var n="",i;return this.breakpoint.isEnabled||(n=t.Resources.getString("/Common/Disabled")+", "),this.breakpoint.isBound||(n=t.Resources.getString("UnboundBreakpoint")+", "),this.breakpoint.eventTypes&&this.breakpoint.eventTypes.length>0?(n+=this.breakpoint.isTracepoint?t.Resources.getString("EventTracepoint"):this.breakpoint.isXHR()?t.Resources.getString("EventXHRBreakpointLabel"):this.breakpoint.condition?t.Resources.getString("ConditionalEventBreakpoint"):t.Resources.getString("EventBreakpoint"),!this.breakpoint.isBound&&this.breakpoint.isEnabled?(i=t.Resources.getString("EventBreakpointUnboundDocMode"),n=i+", ",this.icon.setAttribute("data-plugin-vs-tooltip",i)):this.icon.removeAttribute("data-plugin-vs-tooltip")):n+=this.breakpoint.isTracepoint?t.Resources.getString("Tracepoint"):this.breakpoint.condition?t.Resources.getString("ConditionalBreakpointTitle"):t.Resources.getString("BreakpointLabel"),n+(", "+this.breakpoint.toString(!0))},enumerable:!0,configurable:!0}),i.prototype.activateEditBox=function(t,i){var r=this;return n.Telemetry.logCommandWrapper(t,i,function(){return r._window.unselectAll(),r.select(),r._window.promptToSetConditionOrTracepoint(r.breakpoint),!1})},i.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",t.Resources.getString(this.breakpoint.isTracepoint?"BreakpointsContextMenuAddTraceMessage":"EditButtonTooltip"));this.rootElement.setAttribute("aria-label",this.ariaLabel);this.addDocListener();this===this._window.focusedBreakpointRow&&n.AriaController.setAlertMessage(this.ariaLabel)},i.prototype.select=function(){this.isSelected()||(this._window.addToSelection(this),this.rootElement.classList.add("selected"));this._window.selectedBreakpointRow=this},i.prototype.isSelected=function(){return this.rootElement.classList.contains("selected")},i.prototype.unselect=function(){this.rootElement.classList.remove("selected");this._window.removeFromSelection(this)},i.prototype.cleanup=function(){this._eventRegistration&&this._eventRegistration.unregister()},i.prototype.addDocListener=function(){var t=this,n;this.breakpoint.location&&this.breakpoint.location.startPosition&&this.breakpoint.location.startPosition.doc&&(n=this.breakpoint.location.startPosition.doc,this.cleanup(),this._eventRegistration=n.propertyChanged.addHandler(function(i){i==="isEditPending"&&(t.checkbox.disabled=n.isEditPending,t.text.textContent=(n.isEditPending?"*":"")+t.breakpoint.toString(),Common.ButtonHelpers.changeButtonStatus(t.editButton,!n.isEditPending))}))},i.prototype.createButton=function(n,t,i){var r=document.createElement("div"),u=document.createElement("div");return r.className=n+" iconShell_18x18",u.className="buttonIcon icon_14x14",r.appendChild(u),Common.ButtonHelpers.setupButton(r,t,i),r},i.prototype.navigateToBreakpointLocation=function(t){return t.button===0?(this.select(),this._controller.navigateToBreakpoint(this.breakpoint,n.Telemetry.CommandName.GO_TO_BREAKPOINT,0),t.stopImmediatePropagation(),!1):!0},i.prototype.onContextMenu=function(n){var t,i,r;(this.rootElement===n.target||this.rootElement===n.target.parentElement||this.rootElement===n.target.parentElement.parentElement)&&(this.isSelected()||(this._window.unselectAll(),this.select()),t=0,i=0,n instanceof MouseEvent&&(t=n.pageX,i=n.pageY),t<=0&&i<=0&&(r=n.target.getBoundingClientRect(),t=r.left,i=r.top),this._window.showContextMenu(t,i,this.breakpoint,this.rootElement));n.preventDefault();n.stopImmediatePropagation()},i.prototype.onClick=function(n){this.isSelected()&&(n.ctrlKey||n.shiftKey)?this.unselect():(n.ctrlKey||n.shiftKey||!this._window.isMultipleSelection()||this._window.unselectAll(),this.select())},i.prototype.onCheckboxClicked=function(t){this.isSelected()||this._window.unselectAll();this.select();this._window.setEnabledStateForSelection(!this.breakpoint.isEnabled,n.Telemetry.CommandName.SET_BREAKPOINT_STATE_IN_WINDOW,0);t.stopPropagation()},i.prototype.onKeyDown=function(n){if(n.keyCode===121&&n.shiftKey&&!n.ctrlKey&&!n.altKey)this.onContextMenu(n)},i}();n.BreakpointWindowRow=i})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(t,i,r){var u=this;this._changesCompletedRegistrations={};this._deleteAllBreakpointsButton=r.querySelector("#deleteAllBreakpointsButton");this._toggleAllBreakpointsButton=r.querySelector("#toggleAllBreakpointsButton");this._addEventBreakpointButton=r.querySelector("#addEventBreakpointButton");this._addEventTracepointButton=r.querySelector("#addEventTracepointButton");this._addXHRBreakpointButton=r.querySelector("#addXHRBreakpointButton");Common.ButtonHelpers.setupButton(this._deleteAllBreakpointsButton,"BreakpointsDeleteAllButton",function(){u._controller.deleteAll(0)},!1);Common.ButtonHelpers.setupButton(this._toggleAllBreakpointsButton,"BreakpointsDisableAllToggleButtonTooltip",function(){u.toggleAll(0)},!1);Common.ButtonHelpers.setupButton(this._addEventBreakpointButton,"BreakpointsAddEventBreakpointButtonTooltip",function(){u.createEventBreakpoint()},!0);Common.ButtonHelpers.setupButton(this._addEventTracepointButton,"BreakpointsAddEventTracepointButtonTooltip",function(){u.createEventTracepoint()},!0);Common.ButtonHelpers.setupButton(this._addXHRBreakpointButton,"BreakpointsAddXHRButtonTooltip",function(){u.createXHRBreakpoint(0)},!0);this._breakpointGrid=r.querySelector(".breakpointgrid");this._rootElement=r;this._rows=[];this._selectedRows=[];this._controller=i;document.body.addEventListener("click",function(){u._menuTargetRow&&(u._menuTargetRow.classList.remove("contextTarget"),u._menuTargetRow=null)});this._rootElement.addEventListener("keydown",function(n){return u.onKeyDown(n)});Common.ClipboardHelper.addCopyListener(this._rootElement,this.onCopy.bind(this));this._setConditionPrompt=new n.SetConditionPrompt(t,document.getElementById("root"),function(n,t){return u._controller.setBreakpointCondition(t,n,!1)},function(){},!1);this._setTracepointPrompt=new n.SetConditionPrompt(t,document.getElementById("root"),function(n,t){return u._controller.setBreakpointCondition(t,n,!0)},function(t){t.condition===""&&u._controller.deleteBreakpoint(t,n.Telemetry.CommandName.DELETE_BREAKPOINT_IN_WINDOW,0)},!0);this._addEventBreakpointPrompt=new n.AddEventBreakpointPrompt(t,document.getElementById("root"),function(t,i){u._controller.addEventBreakpoint(t,i,!1,n.Telemetry.CommandName.ADD_EVENT_BREAKPOINT,0);u.onEventBreakpointPromptClosed()},function(){u.onEventBreakpointPromptClosed()},!1);this._addEventTracepointPrompt=new n.AddEventBreakpointPrompt(t,document.getElementById("root"),function(t,i){u._controller.addEventBreakpoint(t,i,!0,n.Telemetry.CommandName.ADD_EVENT_TRACEPOINT,0);u.onEventTracepointPromptClosed()},function(){u.onEventTracepointPromptClosed()},!0);document.addEventListener("keydown",this.updateSpecialKeysState.bind(this));document.addEventListener("keyup",this.updateSpecialKeysState.bind(this))}return Object.defineProperty(i.prototype,"focusedBreakpointRow",{get:function(){return this._focusedBreakpointRow},set:function(n){for(var t=0;t<this._rows.length;t++)this._rows[t].rootElement.tabIndex=-1;n.rootElement.tabIndex=1;this._focusedBreakpointRow=n;n.rootElement.focus()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectedBreakpointRow",{get:function(){return this._selectedBreakpointRow},set:function(n){this._selectedBreakpointRow=n;this.focusedBreakpointRow=n},enumerable:!0,configurable:!0}),i.prototype.showContextMenu=function(n,i,r,u){this._menuTargetRow&&(this._menuTargetRow.classList.remove("contextTarget"),this._menuTargetRow=null);this._menuBreakpoint=r;this._menuTargetRow=u;this._menuTargetRow.classList.add("contextTarget");this._contextMenu&&(this._contextMenu.dispose(),this._contextMenu=null);this._contextMenu=t.ContextMenu.create(this.createMenuItems(r),"breakpointMenu");this._contextMenu.show(n,i)},i.prototype.promptToSetConditionOrTracepoint=function(n){var t=this;window.setImmediate(function(){n.isTracepoint?t._setTracepointPrompt.activate(n):t._setConditionPrompt.activate(n)})},i.prototype.breakpointAdded=function(n){var t=this;this.addBreakpointToView(n);n.location&&(this._changesCompletedRegistrations[n.breakpointId]=n.location.changesCompleted.addHandler(function(){var i=t.getRowFromBreakpoint(n);i&&i.refresh()}))},i.prototype.pendingBreakpointAdded=function(n){this.addBreakpointToView(n)},i.prototype.breakpointRemoved=function(n){var t=this.getRowFromBreakpoint(n),i;t&&(t.unselect(),this._breakpointGrid.removeChild(t.rootElement),this._rows.splice(this._rows.indexOf(t),1),t.cleanup());this._rows.length===0&&(Common.ButtonHelpers.changeButtonStatus(this._deleteAllBreakpointsButton,!1),Common.ButtonHelpers.changeButtonStatus(this._toggleAllBreakpointsButton,!1));i=this._changesCompletedRegistrations[n.breakpointId];i&&(i.unregister(),this._changesCompletedRegistrations[n.breakpointId]=null)},i.prototype.breakpointChanged=function(i){n.debuggerTraceWriter.traceWriter.raiseEvent(344);var r=this.getRowFromBreakpoint(i);r&&r.refresh();this._controller.areAnyBreakpointsDisabled()?(this._toggleAllBreakpointsButton.setAttribute("data-plugin-vs-tooltip",t.Resources.getString("BreakpointsEnableAllToggleButtonTooltip")),this._toggleAllBreakpointsButton.setAttribute("aria-label",t.Resources.getString("BreakpointsEnableAllToggleButtonTooltip"))):(this._toggleAllBreakpointsButton.setAttribute("data-plugin-vs-tooltip",t.Resources.getString("BreakpointsDisableAllToggleButtonTooltip")),this._toggleAllBreakpointsButton.setAttribute("aria-label",t.Resources.getString("BreakpointsDisableAllToggleButtonTooltip")));n.debuggerTraceWriter.traceWriter.raiseEvent(345)},i.prototype.conditionPromptInvoked=function(n){this._setConditionPrompt.activate(n)},i.prototype.tracepointPromptInvoked=function(n){this._setTracepointPrompt.activate(n)},i.prototype.setEnabledStateForSelection=function(t,i,r){var u=this;n.Telemetry.logCommandWrapper(i,r,function(){for(var n=0;n<u._selectedRows.length;n++)u._selectedRows[n].breakpoint.isFrozen||u._controller.setEnabledState(u._selectedRows[n].breakpoint,t)})},i.prototype.selectAll=function(t,i){var r=this;n.Telemetry.logCommandWrapper(t,i,function(){for(var t,n=0;n<r._rows.length;n++)t=r._rows[n],t.isSelected()||t.select()})},i.prototype.unselectAll=function(){for(var n=0;n<this._rows.length;n++)this._rows[n].unselect()},i.prototype.onDeleteBreakpointRow=function(n,t,i){n&&(this.isMultipleSelection()&&n.isSelected()?this.deleteBreakpointsSelection(t,i):(this.unselectAll(),this.deleteBreakpoint(n,t,i)))},i.prototype.toggleAll=function(n){this._controller.toggleAll(n)},i.prototype.createEventBreakpoint=function(){var t=this;n.Telemetry.logCommandWrapper(n.Telemetry.CommandName.ADD_EVENT_BREAKPOINT,0,function(){t._addEventBreakpointPrompt.activate()})},i.prototype.createXHRBreakpoint=function(t){this._controller.addEventBreakpoint(["readystatechange",n.Breakpoint.XHR_BREAKPOINT_FLAG],n.Breakpoint.XHR_BREAKPOINT_CONDITION,!1,n.Telemetry.CommandName.ADD_XHR_BREAKPOINT,t)},i.prototype.createEventTracepoint=function(){var t=this;n.Telemetry.logCommandWrapper(n.Telemetry.CommandName.ADD_EVENT_TRACEPOINT,0,function(){t._addEventTracepointPrompt.activate()})},i.prototype.addToSelection=function(n){var t,i,f,e,r,u;if(!this._isAltKeyPressed&&this._selectedRows.indexOf(n)===-1)if(this._isCtrlKeyPressed||this._isShiftKeyPressed||this.unselectAll(),this._isShiftKeyPressed&&!this._isCtrlKeyPressed){if(t=this._rows.indexOf(this.selectedBreakpointRow),i=this._rows.indexOf(n),t>=0&&i>=0)for(f=t<i?t:i,e=t<i?i:t,r=f;r<=e;r++)u=this._rows[r],u.isSelected()||(this._selectedRows.push(u),u.select())}else this._isShiftKeyPressed||this._selectedRows.push(n)},i.prototype.removeFromSelection=function(n){var t=this._selectedRows.indexOf(n);t>=0&&this._selectedRows.splice(t,1)},i.prototype.isMultipleSelection=function(){return this._selectedRows.length>1},i.prototype.onEventTracepointPromptClosed=function(){var n=this;window.setImmediate(function(){n._addEventTracepointButton.focus()})},i.prototype.onEventBreakpointPromptClosed=function(){var n=this;window.setImmediate(function(){n._addEventBreakpointButton.focus()})},i.prototype.deleteBreakpoint=function(n,t,i){this._rows.length>1&&(this._rows.indexOf(n)!==this._rows.length-1?this.selectNextBreakpoint(n):this.selectPreviousBreakpoint(n));this._controller.deleteBreakpoint(n.breakpoint,t,i)},i.prototype.deleteBreakpointsSelection=function(n,t){for(var u,f,r=-1,i=this._rows.length-1;i>=0;i--)if(this._rows[i].isSelected()){r=i;break}for(r!==this._rows.length-1&&(u=this._rows[r+1]),f=this._selectedRows,i=f.length-1;i>=0;i--)this._controller.deleteBreakpoint(f[i].breakpoint,n,t);this._rows.length>0&&(u?u.select():this._rows[this._rows.length-1].select())},i.prototype.addBreakpointToView=function(t){var i=new n.BreakpointWindowRow(t,this,this._controller);this._rows.push(i);this._breakpointGrid.appendChild(i.rootElement);this.breakpointChanged(t);this._rows.length===1&&(i.rootElement.tabIndex=1,this.selectedBreakpointRow=i);Common.ButtonHelpers.isEnabled(this._deleteAllBreakpointsButton)||(Common.ButtonHelpers.changeButtonStatus(this._deleteAllBreakpointsButton,!0),Common.ButtonHelpers.changeButtonStatus(this._toggleAllBreakpointsButton,!0))},i.prototype.createMenuItems=function(i){var u=this,r=[];return r.push({id:"menuItemGoToBreakpointWindow",callback:function(n,t){return u.onGoToBreakpoint(n,t)},label:t.Resources.getString("BreakpointsContextMenuGoTo"),type:1,disabled:function(){return u.isMultipleSelection()||!i.isBound||!i.location}}),r.push({id:"menuItemSep1BreakpointWindow",type:3}),r.push({id:"menuItemAddTraceOrConditionBreakpointWindow",callback:function(n,t){return u.onEditBreakpoint(n,t)},label:i.isTracepoint?t.Resources.getString("BreakpointsContextMenuAddTraceMessage"):t.Resources.getString("BreakpointsContextMenuAddCondition"),type:1,accessKey:t.Resources.getString("/Common/AccessKeyAltF9"),disabled:function(){return u.isMultipleSelection()||i.isFrozen}}),r.push({id:"menuItemCopyBreakpointWindow",callback:function(){n.Telemetry.logCommandWrapper(n.Telemetry.CommandName.COPY_BREAKPOINT_IN_WINDOW,2,function(){Common.ClipboardHelper.fireCopyEvent(u._rootElement)})},label:t.Resources.getString("BreakpointsContextMenuCopy"),type:1}),r.push({id:"menuItemDeleteBreakpointWindow",callback:function(n,t){return u.onDeleteBreakpoint(n,t)},label:t.Resources.getString("BreakpointsContextMenuDelete"),type:1,accessKey:t.Resources.getString("/Common/AccessKeyF9")}),r.push({id:"menuItemDeleteAllBreakpointWindow",callback:function(n,t){return u.onDeleteAllBreakpoints(n,t)},label:t.Resources.getString("BreakpointsConextMenuDeleteAll"),type:1}),r.push({id:"menuItemSep2BreakpointWindow",type:3}),r.push({id:"menuItemEnableBreakpointWindow",callback:function(){return u.setEnabledStateForSelection(!0,n.Telemetry.CommandName.SET_BREAKPOINT_STATE_IN_WINDOW,2)},label:t.Resources.getString("BreakpointsContextMenuEnable"),type:1,disabled:function(){return i.isEnabled||i.isFrozen},accessKey:t.Resources.getString("/Common/AccessKeyCtrlF9")}),r.push({id:"menuItemDisableBreakpointWindow",callback:function(){return u.setEnabledStateForSelection(!1,n.Telemetry.CommandName.SET_BREAKPOINT_STATE_IN_WINDOW,2)},label:t.Resources.getString("BreakpointsContextMenuDisable"),type:1,disabled:function(){return!i.isEnabled||i.isFrozen},accessKey:t.Resources.getString("/Common/AccessKeyCtrlF9")}),r.push({id:"menuItemEnableAllBreakpointWindow",callback:function(n,t){return u.onEnableAllBreakpoints(n,t)},label:t.Resources.getString("BreakpointsContextMenuEnableAll"),type:1}),r.push({id:"menuItemDisableAllBreakpointWindow",callback:function(n,t){return u.onDisableAllBreakpoints(n,t)},label:t.Resources.getString("BreakpointsContextMenuDisableAll"),type:1}),r},i.prototype.onGoToBreakpoint=function(){var t=this;window.setImmediate(function(){t._controller.navigateToBreakpoint(t._menuBreakpoint,n.Telemetry.CommandName.GO_TO_BREAKPOINT,2)})},i.prototype.onEditBreakpoint=function(){this.getRowFromBreakpoint(this._menuBreakpoint).activateEditBox(n.Telemetry.CommandName.SET_CONDITION_IN_EDITOR,2)},i.prototype.onDeleteBreakpoint=function(){this.onDeleteBreakpointRow(this.getRowFromBreakpoint(this._menuBreakpoint),n.Telemetry.CommandName.DELETE_BREAKPOINT_IN_WINDOW,2)},i.prototype.onDeleteAllBreakpoints=function(){this._controller.deleteAll(2)},i.prototype.onEnableAllBreakpoints=function(){this._controller.setAllEnabledStates(!0,n.Telemetry.CommandName.ENABLE_ALL_BREAKPOINTS,2)},i.prototype.onDisableAllBreakpoints=function(){this._controller.setAllEnabledStates(!1,n.Telemetry.CommandName.DISABLE_ALL_BREAKPOINTS,2)},i.prototype.onCopy=function(){for(var t="",n=0;n<this._selectedRows.length;n++)t+=this._selectedRows[n].breakpoint.toString()+"\r\n";return t},i.prototype.onKeyDown=function(t){var i=!1;switch(t.keyCode){case 65:!t.ctrlKey||t.shiftKey||t.altKey||(this.selectAll(n.Telemetry.CommandName.SELECT_ALL_BREAKPOINTS_IN_WINDOW,1),i=!0);break;case 32:this.selectedBreakpointRow&&this.selectedBreakpointRow===this.focusedBreakpointRow?(this.setEnabledStateForSelection(!this.selectedBreakpointRow.breakpoint.isEnabled,n.Telemetry.CommandName.SET_BREAKPOINT_STATE_IN_WINDOW,1),i=!0):this.focusedBreakpointRow&&(this.focusedBreakpointRow.select(),i=!0);break;case 13:!this.isMultipleSelection()&&this.selectedBreakpointRow&&(this._controller.navigateToBreakpoint(this.selectedBreakpointRow.breakpoint,n.Telemetry.CommandName.GO_TO_BREAKPOINT,1),i=!0);break;case 46:this.onDeleteBreakpointRow(this.selectedBreakpointRow,n.Telemetry.CommandName.DELETE_BREAKPOINT_IN_WINDOW,1);i=!0;break;case 40:this.focusedBreakpointRow&&(!t.ctrlKey||t.altKey||t.shiftKey?!t.ctrlKey&&!t.altKey&&t.shiftKey&&this.focusedBreakpointRow.isSelected()&&this.isNextBreakpointSelected(this.focusedBreakpointRow)?(this.focusedBreakpointRow.unselect(),this.selectNextBreakpoint(this.focusedBreakpointRow)):(t.shiftKey||t.ctrlKey||!this.isMultipleSelection()||this.unselectAll(),this.selectNextBreakpoint(this.focusedBreakpointRow)):this.focusNextBreakpoint(this.focusedBreakpointRow),i=!0);break;case 38:this.focusedBreakpointRow&&(!t.ctrlKey||t.altKey||t.shiftKey?!t.ctrlKey&&!t.altKey&&t.shiftKey&&this.focusedBreakpointRow.isSelected()&&this.isPreviousBreakpointSelected(this.focusedBreakpointRow)?(this.focusedBreakpointRow.unselect(),this.selectPreviousBreakpoint(this.focusedBreakpointRow)):(t.shiftKey||t.ctrlKey||!this.isMultipleSelection()||this.unselectAll(),this.selectPreviousBreakpoint(this.focusedBreakpointRow)):this.focusPreviousBreakpoint(this.focusedBreakpointRow),i=!0);break;case 120:if(this.selectedBreakpointRow)if(!t.ctrlKey||t.altKey||t.shiftKey)if(t.ctrlKey||!t.altKey||t.shiftKey){if(!t.ctrlKey&&!t.altKey&&!t.shiftKey){this.onDeleteBreakpointRow(this.selectedBreakpointRow,n.Telemetry.CommandName.DELETE_BREAKPOINT_IN_WINDOW,1);i=!0}}else this._controller.promptToModifyConditionOrTracepoint(this.selectedBreakpointRow.breakpoint,n.Telemetry.CommandName.SET_CONDITION_IN_WINDOW,1),i=!0;else this.setEnabledStateForSelection(!this.selectedBreakpointRow.breakpoint.isEnabled,n.Telemetry.CommandName.SET_BREAKPOINT_STATE_IN_WINDOW,1),i=!0}return i?(t.preventDefault(),t.stopPropagation(),!1):!0},i.prototype.selectNextBreakpoint=function(n){var t=this._rows.indexOf(n);t<this._rows.length-1&&this._rows[t+1].select()},i.prototype.selectPreviousBreakpoint=function(n){var t=this._rows.indexOf(n);t>0&&this._rows[t-1].select()},i.prototype.focusNextBreakpoint=function(n){var t=this._rows.indexOf(n);t<this._rows.length-1&&(this.focusedBreakpointRow=this._rows[t+1])},i.prototype.focusPreviousBreakpoint=function(n){var t=this._rows.indexOf(n);t>0&&(this.focusedBreakpointRow=this._rows[t-1])},i.prototype.isNextBreakpointSelected=function(n){var t=this._rows.indexOf(n);return t<this._rows.length-1?this._rows[t+1].isSelected():!1},i.prototype.isPreviousBreakpointSelected=function(n){var t=this._rows.indexOf(n);return t>0?this._rows[t-1].isSelected():!1},i.prototype.getRowFromBreakpoint=function(n){for(var t=0;t<this._rows.length;t++)if(this._rows[t].breakpoint.equals(n))return this._rows[t];return null},i.prototype.updateSpecialKeysState=function(n){this._isCtrlKeyPressed=n.ctrlKey;this._isShiftKeyPressed=n.shiftKey;this._isAltKeyPressed=n.altKey},i}();n.BreakpointWindow=i})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u){var f=this;this.container=n;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=t;this._lastElementInTabOrder=i;this._cancelCallback=r?r:function(){};this._focusOutListener=function(n){return n.target===document.activeElement&&f.hideControl(),!1};this._documentClickListener=function(n){return n.target===f.container||f.container.contains(n.target)||f.hideControl(),!1};this._documentKeydownListener=function(n){return n.keyCode===27?(f._cancelCallback(),f.hideControl(),n.stopImmediatePropagation(),n.preventDefault(),!1):n.keyCode===112?u?u():!0:void 0};this._popupKeydownListener=function(n){var t=!1;return n.keyCode===9&&(n.target===f._firstElementInTabOrder&&n.shiftKey?(f._lastElementInTabOrder.focus(),t=!0):n.target!==f._lastElementInTabOrder||n.shiftKey||(f._firstElementInTabOrder.focus(),t=!0)),t?(n.stopPropagation(),n.preventDefault(),!1):void 0}}return Object.defineProperty(n.prototype,"subContainer",{get:function(){return this._subContainer},enumerable:!0,configurable:!0}),n.prototype.showControl=function(){var n=this;this._isVisible||(this.container.style.display="block",this._isVisible=!0,window.setImmediate(function(){document.addEventListener("focusout",n._focusOutListener,!0);document.addEventListener("click",n._documentClickListener,!0);document.addEventListener("keydown",n._documentKeydownListener,!0);n.container.addEventListener("keydown",n._popupKeydownListener)}))},n.prototype.hideControl=function(){var n=this;this._isVisible&&window.setImmediate(function(){n.container.style.display="none";n._isVisible=!1;document.removeEventListener("focusout",n._focusOutListener,!0);document.removeEventListener("click",n._documentClickListener,!0);document.removeEventListener("keydown",n._documentKeydownListener,!0);n.container.removeEventListener("keydown",n._popupKeydownListener)})},n}();n.LightDismissPopup=t})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){var i;(function(t){"use strict";var i=Microsoft.Plugin,r=function(r){function u(n,t,u,f,e){var l=document.createElement("div"),s,o,v,y,h,c,a;this.container=l;this._debuggerShell=n;this._isTracepointPrompt=e;l.className="lightDismissPromptContainer "+(e?"setTracepointContainer":"setConditionContainer");t.insertBefore(l,t.firstElementChild);this._dataEnteredCallback=u;this._canceledCallback=f;this._inputBox=document.createElement("input");s=document.createElement("button");o=document.createElement("button");r.call(this,l,this._inputBox,o,this.cancel);v=document.createElement("div");v.textContent=i.Resources.getString(this.titleResourceId);y=document.createElement("div");y.textContent=i.Resources.getString(this.instructionsResourceId);h=document.createElement("div");h.className="popupInputContainer";c=document.createElement("div");c.className="popupButtonContainer";a=document.createElement("label");a.textContent=i.Resources.getString(e?"TracepointLabel":"ConditionalBreakpointLabel");a.id=e?"setTracepointLabel":"setConditionLabel";this._inputBox.className="promptInputBox";this._inputBox.addEventListener("keypress",this.onKeyPress.bind(this));this._inputBox.setAttribute("aria-labelledby",e?"setTracepointLabel":"setConditionLabel");s.addEventListener("click",this.submit.bind(this));s.innerText=i.Resources.getString("OkButtonLabel");s.className="okButton";o.addEventListener("click",this.cancel.bind(this));o.innerText=i.Resources.getString("CancelButtonLabel");o.className="cancelButton";o.type="button";this.subContainer.appendChild(v);this.subContainer.appendChild(y);h.appendChild(a);h.appendChild(this._inputBox);this.subContainer.appendChild(h);c.appendChild(s);c.appendChild(o);this.subContainer.appendChild(c)}return __extends(u,r),Object.defineProperty(u.prototype,"titleResourceId",{get:function(){return this._isTracepointPrompt?"TracepointMessageTitle":"ConditionalBreakpointTitle"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"instructionsResourceId",{get:function(){return this._isTracepointPrompt?"TracepointInstructions":"ConditionalBreakpointInstructions"},enumerable:!0,configurable:!0}),u.prototype.activate=function(r){var f=this;this._breakpoint=r;this._breakpoint.isXHR()?r.condition.length>t.Breakpoint.XHR_BREAKPOINT_CONDITION.length+u.XHR_CONDITION_AND.length?this._inputBox.value=r.condition.slice(t.Breakpoint.XHR_BREAKPOINT_CONDITION.length+u.XHR_CONDITION_AND.length):(n.Tools.Utility.Assert.isTrue(r.condition.length===t.Breakpoint.XHR_BREAKPOINT_CONDITION.length),this._inputBox.value=""):this._inputBox.value=r.condition;this.container.style.top="";this.showControl();var e=this._debuggerShell.getConsoleTop(),o=this.container.getBoundingClientRect(),s=o.height+6,h=o.top+s;e<h&&(this.container.style.top=e-s+"px");t.AriaController.setAlertMessage(i.Resources.getString("FullstopSeparatedStrings",i.Resources.getString(this.titleResourceId),i.Resources.getString(this.instructionsResourceId)));window.setImmediate(function(){f._inputBox.focus();f._inputBox.setSelectionRange(0,f._inputBox.value.length)})},u.prototype.submit=function(){this.hideControl();this._breakpoint.isXHR()?this._inputBox.value.length>0?this._dataEnteredCallback(t.Breakpoint.XHR_BREAKPOINT_CONDITION.concat(u.XHR_CONDITION_AND,this._inputBox.value),this._breakpoint):this._dataEnteredCallback(t.Breakpoint.XHR_BREAKPOINT_CONDITION,this._breakpoint):this._dataEnteredCallback(this._inputBox.value,this._breakpoint)},u.prototype.cancel=function(){this.hideControl();this._canceledCallback(this._breakpoint)},u.prototype.onKeyPress=function(n){return n.keyCode===13?(this.submit(),n.stopPropagation(),n.preventDefault(),!1):!0},u.XHR_CONDITION_AND=" && ",u}(t.LightDismissPopup);t.SetConditionPrompt=r})(i=t.Debugger||(t.Debugger={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(i){function r(n,r,u,f,e){var b=this,h=document.createElement("div"),v,y,o,p,c,s,w,l,a;this._container=h;this._debuggerShell=n;this._isTracepointPrompt=e;h.className="lightDismissPromptContainer "+(e?"addEventTracepointContainer":"addEventBreakpointContainer");r.insertBefore(h,r.firstElementChild);this._dataEnteredCallback=u;this._canceledCallback=f;h.addEventListener("keypress",this.onKeyPress.bind(this));this._selectBox=document.createElement("select");this._cancelButton=document.createElement("button");i.call(this,h,this._selectBox,this._cancelButton,this.cancel,this.openLinkHelp.bind(this));v=document.createElement("div");v.textContent=t.Resources.getString(this.titleResourceId);this.subContainer.appendChild(v);y=document.createElement("div");y.textContent=t.Resources.getString(this.instructionsResourceId);this.subContainer.appendChild(y);o=document.createElement("div");o.className="popupInputContainer withHelp";o.style.msGridRows="auto 9px auto";this.subContainer.appendChild(o);p=document.createElement("div");p.textContent=t.Resources.getString("AddEventBreakpointDialogEventLabel");o.appendChild(p);this._selectBox.className="promptInputBox";this._selectBox.style.msGridColumnSpan="3";o.appendChild(this._selectBox);c=document.createElement("div");c.textContent=t.Resources.getString(e?"TracepointLabel":"ConditionalBreakpointLabel");c.style.msGridRow="3";o.appendChild(c);this._inputBox=document.createElement("input");this._inputBox.className="promptInputBox";this._inputBox.setAttribute("aria-label",c.textContent);this._inputBox.style.msGridRow="3";o.appendChild(this._inputBox);s=document.createElement("button");s.className="promptHelpButton";s.textContent="?";s.style.msGridRow="3";w=t.Resources.getString(e?"EventTracepointsHelpButtonTooltip":"EventBreakpointsHelpButtonTooltip");s.setAttribute("data-plugin-vs-tooltip",w);s.setAttribute("aria-label",w);s.addEventListener("click",function(){b.openLinkHelp()});o.appendChild(s);l=document.createElement("div");l.className="popupButtonContainer";this.container.appendChild(l);a=document.createElement("button");a.addEventListener("click",this.submit.bind(this));a.innerText=t.Resources.getString("EventBreakpointsDialogAddButton");a.className="okButton";l.appendChild(a);this._cancelButton.addEventListener("click",this.cancel.bind(this));this._cancelButton.innerText=t.Resources.getString("CancelButtonLabel");this._cancelButton.className="cancelButton";this._cancelButton.type="button";l.appendChild(this._cancelButton)}return __extends(r,i),Object.defineProperty(r.prototype,"titleResourceId",{get:function(){return this._isTracepointPrompt?"AddEventTracepointDialogTitle":"AddEventBreakpointDialogTitle"},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"instructionsResourceId",{get:function(){return this._isTracepointPrompt?"EventTracepointInstructions":"EventBreakpointInstructions"},enumerable:!0,configurable:!0}),r.prototype.populateEventSelections=function(i){var e,f,o,u,s,h,r;if(!this._eventSelectionsPopulated){for(this._eventSelectionsPopulated=!0,u=document.createElement("optgroup"),u.label=t.Resources.getString(i.collectionsTitleLocId),f=0;f<i.collections.length;f++)e=i.collections[f],r=document.createElement("option"),r.innerText=t.Resources.getString(e.titleLocId),r.setAttribute("data-plugin-vs-tooltip",t.Resources.getString(e.tooltipLocId)),r.value=JSON.stringify(e.eventKeys),u.appendChild(r);for(this._selectBox.appendChild(u),f=0;f<i.categories.length;f++){for(o=i.categories[f],u=document.createElement("optgroup"),u.label=t.Resources.getString(o.titleLocId),s=0;s<o.events.length;s++)h=o.events[s],r=document.createElement("option"),r.innerText=n.BreakpointController.getStringForEventBreakpointType(h.eventKey),r.value=JSON.stringify([h.eventKey]),u.appendChild(r);this._selectBox.appendChild(u)}}},r.prototype.activate=function(){var f=this;this.populateEventSelections(n.BreakpointController.eventBreakpointDescriptions);this._inputBox.value="";this._container.style.top="";this.showControl();var i=this._debuggerShell.getConsoleTop(),r=this._container.getBoundingClientRect(),u=r.height+6,e=r.top+u;i<e&&(this._container.style.top=i-u+"px");n.AriaController.setAlertMessage(t.Resources.getString("FullstopSeparatedStrings",t.Resources.getString(this.titleResourceId),t.Resources.getString(this.instructionsResourceId)));window.setImmediate(function(){f._selectBox.focus()})},r.prototype.openLinkHelp=function(){return t.F12.openBrowser(this._isTracepointPrompt?"http://go.microsoft.com/fwlink/?LinkID=331335":"http://go.microsoft.com/fwlink/?LinkID=331334"),!1},r.prototype.submit=function(){this.hideControl();var n=this._selectBox.value&&JSON.parse(this._selectBox.value);n&&!this._isTracepointPrompt||this._inputBox.value?this._dataEnteredCallback(n,this._inputBox.value):this.cancel()},r.prototype.cancel=function(){this.hideControl();this._canceledCallback()},r.prototype.onKeyPress=function(n){if(n.keyCode===13){if(this._isTracepointPrompt&&document.activeElement===this._selectBox&&!this._inputBox.value)return this._inputBox.focus(),!0;if(n.target!==this._cancelButton)return this.submit(),n.stopPropagation(),n.preventDefault(),!1}return!0},r}(n.LightDismissPopup);n.AddEventBreakpointPrompt=i})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(){"use strict"})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(){function i(i,r,u,f,e,o,s){if((r<=0||u<=0)&&(n.Utility.Assert.failDebugOnly("Line and column numbers must be positive"),r<=0&&(r=1),u<=0&&(u=1)),this._startPosition={doc:i,line:r,column:u},this._endPosition=this._startPosition,f instanceof t.Doc&&typeof e=="number"&&typeof o=="number"&&(this._endPosition={doc:f,line:e,column:o}),s)this._rawLocation=s;else if(i){var h=this._startPosition.doc.getRawLocation(this._startPosition),c=this._endPosition.doc.getRawLocation(this._endPosition);h&&c&&(n.Utility.Assert.areEqual(h.doc,c.doc,"Can't create a DocumentLocation from different raw documents"),this._rawLocation={doc:h.doc,offset:h.offset,length:c.offset-h.offset})}}return Object.defineProperty(i.prototype,"rawLocation",{get:function(){return this._rawLocation},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startPosition",{get:function(){return this._startPosition},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endPosition",{get:function(){return this._endPosition},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startDisplayText",{get:function(){return i.getPositionDisplayText(this._startPosition)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endDisplayText",{get:function(){return i.getPositionDisplayText(this._endPosition)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"lineNumber",{get:function(){return this._startPosition.line},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"column",{get:function(){return this._startPosition.column},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startLineNumber",{get:function(){return this._startPosition.line},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startColumn",{get:function(){return this._startPosition.column},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endLineNumber",{get:function(){return this._endPosition.line},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endColumn",{get:function(){return this._endPosition.column},enumerable:!0,configurable:!0}),i.getPositionDisplayText=function(n){return Common.FormattingHelpers.fileLineColumnFormat(Common.ToolWindowHelpers.createShortenedUrlText(n.doc.url.toString()),n.line,n.column)},i.areEqual=function(n,t){return n.rawLocation.doc===t.rawLocation.doc&&n.rawLocation.offset===t.rawLocation.offset&&n.rawLocation.length===t.rawLocation.length&&n.startPosition.line===t.startPosition.line&&n.startPosition.column===t.startPosition.column&&n.endPosition.line===t.endPosition.line&&n.endPosition.column===t.endPosition.column},i}();t.DocumentLocation=i})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function t(){}return t.initialize=function(){t.ToExceptionClass=t.exceptionFilterToClassNameConverter();t.ToSourceMapTooltip=t.tristateTooltip("SourceMapButtonTooltip","SourceMapButtonTooltip","SourceMapButtonOffTooltip");t.ToJMCDocumentToolTip=t.tristateTooltip("FilePickerMyCodeTooltip","FilePickerLibraryCodeTooltip","JustMyCodeDisabledTooltip");t.ToFindResultsTooltip=t.boolTooltip("FindResultsButtonOnTooltip","FindResultsButtonOffTooltip");t.ToDisconnectDebuggingTooltip=t.boolTooltip("DebuggerDisconnectedTooltip","DebuggerConnectedTooltip");t.ToPinFindResultsTooltip=t.boolTooltip("UnpinFindResultsWindowButtonTooltip","PinFindResultsWindowButtonTooltip");t.ToExceptionFilterNone=t.exceptionFilterStateConverter(0);t.ToExceptionFilterUnhandled=t.exceptionFilterStateConverter(1);t.ToExceptionFilterHandled=t.exceptionFilterStateConverter(2)},t.exceptionFilterToClassNameConverter=function(){return{convertTo:function(n){switch(n){case 2:return"breakOnExceptionsButton breakAll";case 0:return"breakOnExceptionsButton breakNone";case 1:return"breakOnExceptionsButton breakUnhandled";default:return"breakOnExceptionsButton"}},convertFrom:null}},t.tristateTooltip=function(t,r,u){return{convertTo:function(f){switch(f){case 0:return i.Resources.getString(t);case 1:return i.Resources.getString(r);case 2:case undefined:case null:return i.Resources.getString(u);default:n.Tools.Utility.Assert.fail("Unexpected")}},convertFrom:null}},t.boolTooltip=function(n,t){return{convertTo:function(r){return i.Resources.getString(r?n:t)},convertFrom:null}},t.exceptionFilterStateConverter=function(n){return{convertTo:function(t){return t===n},convertFrom:null}},t}();t.CommonConverters=r;r.initialize()})(i=t.Debugger||(t.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function r(n){var t=this;this.propertyChanged=new Common.EventSource;this._debuggerManager=n;this._persistenceManager=this._debuggerManager.persistenceManager;this._listeners=[];this._executionPaused=!1;this._isDebuggingDisabled=i.F12.Profiler.getIsProfiling();this._breakOnAnyNewWorkerStartingEnabled=!1;this._breakState=this._isDebuggingDisabled?2:1;this._profilingStartedHandler=function(){t.onProfilingStateChange(!0)};this._profilingStoppedHandler=function(){t.onProfilingStateChange(!1)}}return Object.defineProperty(r.prototype,"debuggerManager",{get:function(){return this._debuggerManager},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isExecutionPaused",{get:function(){return this._executionPaused},set:function(n){var t=this,i;n!==this._executionPaused&&(i=Common.PromiseUtilities.EmptyPromise,n&&(i=this.removeAnyPseudoBreakpoint()),i.done(function(){t._executionPaused=n;t.breakStateChanged();t.propertyChanged.invoke("isExecutionPaused");t.propertyChanged.invoke("allowDisconnectDebugging")}))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isDebuggingDisabled",{get:function(){return this._isDebuggingDisabled},set:function(n){n!==this._isDebuggingDisabled&&(this._isDebuggingDisabled=n,this.breakStateChanged(),n&&this._debuggerManager.breakpointController.unresolveAllBreakpoints(),this.propertyChanged.invoke("isDebuggingDisabled"))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"breakState",{get:function(){return this._breakState},set:function(n){this._breakState!==n&&(this._breakState=n,this.propertyChanged.invoke("breakState"))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"exceptionFilter",{get:function(){return this._exceptionFilter},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"breakOnAnyNewWorkerStartingEnabled",{get:function(){return this._breakOnAnyNewWorkerStartingEnabled},set:function(n){var t=this;this._breakOnAnyNewWorkerStartingEnabled!==n&&(this._breakOnAnyNewWorkerStartingEnabled=n,this.propertyChanged.invoke("breakOnAnyNewWorkerStartingEnabled"),this._debuggerManager.causeBreak(this._breakOnAnyNewWorkerStartingEnabled?1:3).done(function(){t._debuggerManager.testEventObject.fireEvent("breakOnNewWorkerToggled")}))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"allowDisconnectDebugging",{get:function(){return!this.isExecutionPaused&&!i.F12.Profiler.getIsProfiling()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isDebuggingDisconnected",{get:function(){return this.isDebuggingDisabled},set:function(n){var t=this;n!==this.isDebuggingDisconnected&&this.allowDisconnectDebugging&&(n?this._debuggerManager.disableDynamicDebugging().done(function(n){t.isDebuggingDisabled=n===0;t.propertyChanged.invoke("isDebuggingDisconnected")}):this._debuggerManager.enableDynamicDebugging().done(function(n){t.isDebuggingDisabled=n!==0;t.propertyChanged.invoke("isDebuggingDisconnected")}))},enumerable:!0,configurable:!0}),r.isStepAction=function(t){switch(t){case 2:case 3:case 4:case 6:return!0;case 0:case 1:case 5:return!1;default:n.Utility.Assert.fail("Unknown BreakResumeAction")}return!1},r.areISourceLocationsEqual=function(n,t){return n&&t&&n.docId===t.docId&&n.start===t.start&&n.length===t.length},r.prototype.initialize=function(n){i.F12.addEventListener("profilingstarted",this._profilingStartedHandler);i.F12.addEventListener("profilingstopped",this._profilingStoppedHandler);this.onProfilingStateChange(this._isDebuggingDisabled);this.reinitialize(n)},r.prototype.uninitialize=function(){i.F12.removeEventListener("profilingstarted",this._profilingStartedHandler);i.F12.removeEventListener("profilingstopped",this._profilingStoppedHandler)},r.prototype.reinitialize=function(n){var i=this._persistenceManager.getSetting(r.EXCEPTION_FILTER_KEY),t=parseInt(i,10);this._exceptionFilter=null;isNaN(t)?n?this.setExceptionFilter(n,3):this.setExceptionFilter(0,3):this.setExceptionFilter(t,3)},r.prototype.setExceptionFilter=function(n,i){var u=this,f;switch(n){case 0:f=t.Telemetry.CommandName.BREAK_ON_NO_EXCEPTIONS;break;case 1:f=t.Telemetry.CommandName.BREAK_ON_UNHANDLED_EXCEPTIONS;break;case 2:f=t.Telemetry.CommandName.BREAK_ON_ALL_EXCEPTIONS}return t.Telemetry.logCommandWrapper(f,i,function(){var t=Common.PromiseUtilities.EmptyPromise;return n!==u._exceptionFilter&&(t=u._debuggerManager.setExceptionFilter(n).then(function(t){if(t){u._exceptionFilter=n;for(var i=0;i<u._listeners.length;i++)u._listeners[i].exceptionFilterChanged(u._exceptionFilter);u.propertyChanged.invoke("exceptionFilter");u._persistenceManager.setSetting(r.EXCEPTION_FILTER_KEY,""+n);u._persistenceManager.saveState()}return t})),t})},r.prototype.registerListener=function(n){this._listeners.push(n)},r.prototype.continueExecution=function(n,i){var r=this;t.Telemetry.logCommandWrapper(n,i,function(){r._debuggerManager.isBreakCompleted&&r._debuggerManager.resume(1).done(function(n){r._debuggerManager.testEventObject.fireEvent("debuggerRunning");n&&(r.isExecutionPaused=!1)})})},r.prototype.breakAny=function(n){var i=this;t.Telemetry.logCommandWrapper(t.Telemetry.CommandName.BREAK_ANY,n,function(){i._debuggerManager.isBreakCompleted||i.isDebuggingDisabled||i._debuggerManager.causeBreak(0).done(function(){for(var n=0;n<i._listeners.length;n++)i._listeners[n].breakCallComplete();i.breakState=0;i._debuggerManager.testEventObject.fireEvent("breakSet")})})},r.prototype.stepInto=function(n){var i=this;t.Telemetry.logCommandWrapper(t.Telemetry.CommandName.STEP_INTO,n,function(){t.debuggerTraceWriter.traceWriter.raiseEvent(302);i._debuggerManager.isBreakCompleted&&i._debuggerManager.resume(2).done(function(n){n&&(i.isExecutionPaused=!1,i._debuggerManager.testEventObject.fireEvent("stepComplete"))})})},r.prototype.stepOut=function(n){var i=this;t.Telemetry.logCommandWrapper(t.Telemetry.CommandName.STEP_OUT,n,function(){t.debuggerTraceWriter.traceWriter.raiseEvent(303);i._debuggerManager.isBreakCompleted&&i._debuggerManager.resume(4).done(function(n){n&&(i.isExecutionPaused=!1,i._debuggerManager.testEventObject.fireEvent("stepComplete"))})})},r.prototype.stepOver=function(n){var i=this;t.Telemetry.logCommandWrapper(t.Telemetry.CommandName.STEP_OVER,n,function(){t.debuggerTraceWriter.traceWriter.raiseEvent(301);i._debuggerManager.isBreakCompleted&&i._debuggerManager.resume(3).done(function(n){n&&(i.isExecutionPaused=!1,i._debuggerManager.testEventObject.fireEvent("stepComplete"))})})},r.prototype.abort=function(){var n=this;this._debuggerManager.isBreakCompleted&&this._debuggerManager.resume(0).done(function(t){t&&(n.isExecutionPaused=!1)})},r.prototype.canSetNextStatement=function(n){return this.isDebuggingDisabled||!n.startPosition.doc.isRuntimeDoc||!this._debuggerManager.isBreakCompleted?i.Promise.as(!1):this._debuggerManager.canSetNextStatement(n)},r.prototype.setNextStatement=function(n,r){var u=this;return t.Telemetry.logCommandWrapper(t.Telemetry.CommandName.SET_NEXT_STATEMENT,r,function(){return u.isDebuggingDisabled||!n.startPosition.doc.isRuntimeDoc?i.Promise.as(!1):new i.Promise(function(t){u._debuggerManager.setNextStatement(n).done(function(i){i?u._debuggerManager.debuggerShell.editorWindow.destroyExceptionDisplays():u._debuggerManager.debuggerShell.editorWindow.addSetNextStatementErrorViewZone(n);t(i)})})})},r.prototype.runToCursor=function(n,i,r){var u=this;t.Telemetry.logCommandWrapper(t.Telemetry.CommandName.RUN_TO_CURSOR,r,function(){!u.isDebuggingDisabled&&n.isRuntimeDoc&&u.removeAnyPseudoBreakpoint().done(function(){var r=new t.DocumentLocation(n,i.lineNumber,i.column);u._debuggerManager.addCodeBreakpoint(r,!0).done(function(n){n&&(u._pseudoBreakpoint=n);u.continueExecution(t.Telemetry.CommandName.START_DEBUGGING,3)})})})},r.prototype.removeAnyPseudoBreakpoint=function(n){var t=Common.PromiseUtilities.EmptyPromise;return this._pseudoBreakpoint&&(!n||n===this._pseudoBreakpoint.location.startPosition.doc)&&(this._debuggerManager.breakpointController.hasBreakpointWithId(this._pseudoBreakpoint.breakpointId)||this._debuggerManager.isAttached&&(t=this._debuggerManager.removeBreakpoint(this._pseudoBreakpoint.breakpointId)),this._pseudoBreakpoint=null),t},r.prototype.updateAlertMessage=function(){t.AriaController.setAlertMessage(this.isExecutionPaused?i.Resources.getString("PausedInDebuggerAlert"):"")},r.prototype.breakStateChanged=function(){for(var n=0;n<this._listeners.length;n++)this._listeners[n].breakStateChanged(this._executionPaused,this._isDebuggingDisabled);this.updateAlertMessage();this.breakState=!this._executionPaused&&!this._isDebuggingDisabled?1:2},r.prototype.onProfilingStateChange=function(n){var r=this,u=i.Promise.as(!n);n?(this._debuggerManager.asyncStackProvider.stopSession(),this.continueExecution(t.Telemetry.CommandName.START_DEBUGGING,3),t.DebuggerShell.showErrorDisplay("ProfilingRunningMessage",undefined,0,"http://go.microsoft.com/fwlink/?LinkId=290645")):(t.DebuggerShell.closeErrorDisplay("ProfilingRunningMessage"),this._debuggerManager.isAttached&&(this._debuggerManager.asyncStackProvider.startSession(),u=this._debuggerManager.enableDynamicDebugging()));u.done(function(n){r.isDebuggingDisabled=n!==0;r.propertyChanged.invoke("allowDisconnectDebugging")})},r.EXCEPTION_FILTER_KEY="DebuggerExceptionFilter",r}();t.ExecutionController=r})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(i){var r=this;this._controller=i;this._exceptionMenu=new Common.Controls.MenuControl;this._exceptionMenu.model=this._controller;this._exceptionMenu.menuItemsTemplateId="Debugger.exceptionMenuDropDown";this._exceptionMenu.dismissOnMenuItemClick=!0;document.getElementById("toolbar").appendChild(this._exceptionMenu.rootElement);this._exceptionMenu.addClickHandlerToMenuItem("breakOnNoneMenuItem",function(){return r.setExceptionFilter(0)});this._exceptionMenu.addClickHandlerToMenuItem("breakOnUnhandledExceptionsMenuItem",function(){return r.setExceptionFilter(1)});this._exceptionMenu.addClickHandlerToMenuItem("breakOnAllExceptionsMenuItem",function(){return r.setExceptionFilter(2)});this._toolbar=new Common.Controls.ToolbarControl("Common.toolbarTemplateWithSearchControl");this._toolbar.title=t.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(){r._controller.continueExecution(n.Telemetry.CommandName.START_DEBUGGING,0)});this._breakButton=this._toolbar.getNamedElement("breakButton").control;this._toolbar.addClickHandlerToButton("breakButton",function(){r._breakButton.isChecked=!0;r._controller.breakAny(0)});this._toolbar.addClickHandlerToButton("stepIntoButton",function(){return r._controller.stepInto(0)});this._toolbar.addClickHandlerToButton("stepOverButton",function(){return r._controller.stepOver(0)});this._toolbar.addClickHandlerToButton("stepOutButton",function(){return r._controller.stepOut(0)});this._breakWorkerButton=this._toolbar.getNamedElement("breakWorkerButton").control;this._toolbar.addClickHandlerToButton("breakWorkerButton",function(){r._breakWorkerButton.isChecked?n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.BREAK_ON_NEW_WORKERS_ON,0):n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.BREAK_ON_NEW_WORKERS_OFF,0)});this._breakOnExceptionButton=this._toolbar.getNamedElement("breakOnExceptionButton").control;this._exceptionMenu.targetButtonElement=this._breakOnExceptionButton.rootElement;this._breakOnExceptionButton.click.addHandler(function(){return n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.SHOW_BREAK_ON_ERROR_MENU,0)});this._jmcButton=this._toolbar.getNamedElement("jmcButton").control;this._toolbar.addClickHandlerToButton("jmcButton",function(){r._jmcButton.isChecked?n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.TOGGLE_JMC_MODE_ON,0):n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.TOGGLE_JMC_MODE_OFF,0)});this._breakOnExceptionButton.rootElement.addEventListener("keydown",function(n){return r._breakOnExceptionButton.isEnabled&&n.keyCode===40&&n.ctrlKey&&!n.altKey?(r._breakOnExceptionButton.click.invoke(n),!1):!0});document.addEventListener("keydown",function(n){return r.onKeyDown(n)});t.F12.addEventListener("browsershortcut",function(n){return r.onBrowserShortcut(n)});t.F12.addEventListener("keydown",function(n){if(r.onBrowserShortcut(n))r.onKeyDown(n)})}return Object.defineProperty(i.prototype,"searchControl",{get:function(){return this._toolbar.getNamedControl("_searchControl")},enumerable:!0,configurable:!0}),i.prototype.getActiveElement=function(){return this._toolbar.getActiveElement()},i.prototype.getButton=function(n){n=n.toLowerCase();switch(n){case"break":return this._breakButton.rootElement;case"breakonexception":return this._breakOnExceptionButton.rootElement;case"breakworker":return this._breakWorkerButton.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}},i.prototype.setExceptionFilter=function(n){this._controller.setExceptionFilter(n,0)},i.prototype.onKeyDown=function(t){var i=!1,r;return(Common.HasAnyOfAltCtrlShiftKeyFlags(t)?t.keyCode!==122||!t.shiftKey||t.ctrlKey||t.altKey?t.keyCode===69&&t.ctrlKey&&t.shiftKey&&!t.altKey?(n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.SHOW_BREAK_ON_ERROR_MENU,1),this._breakOnExceptionButton.isEnabled&&(this._exceptionMenu.show(),i=!0)):t.keyCode===66&&t.ctrlKey&&t.shiftKey&&!t.altKey?(this._controller.breakAny(1),i=!0):t.keyCode===87&&t.ctrlKey&&t.shiftKey&&!t.altKey?(this._breakWorkerButton.isChecked?n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.BREAK_ON_NEW_WORKERS_OFF,1):n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.BREAK_ON_NEW_WORKERS_ON,1),this._breakWorkerButton.isChecked=!this._breakWorkerButton.isChecked,i=!0):t.keyCode!==87||!t.altKey||t.ctrlKey||t.shiftKey?t.keyCode!==74||t.altKey||!t.ctrlKey||t.shiftKey?t.keyCode===77&&!t.altKey&&t.ctrlKey&&t.shiftKey&&(this._controller.debuggerManager.documentController.toggleSourceMapsForCurrentDoc(1),i=!0):(this._jmcButton.isChecked?n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.TOGGLE_JMC_MODE_OFF,1):n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.TOGGLE_JMC_MODE_ON,1),this._jmcButton.isChecked=!this._jmcButton.isChecked,i=!0):(r=this._controller.debuggerManager.documentController.currentDoc,r&&r.editorWindow.wordWrapEnabled!==2?(r.editorWindow.wordWrapEnabled===0?n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.TOGGLE_WORD_WRAP_OFF,1):n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.TOGGLE_WORD_WRAP_ON,1),r.editorWindow.wordWrapEnabled=r.editorWindow.wordWrapEnabled===0?1:0):r&&r.editorWindow.wordWrapEnabled===2&&n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.TOGGLE_WORD_WRAP_DISABLED,1),i=!0):(this._controller.stepOut(1),i=!0):t.keyCode===116||t.keyCode===119?(this._controller.continueExecution(n.Telemetry.CommandName.START_DEBUGGING,1),i=!0):t.keyCode===121?(this._controller.stepOver(1),i=!0):t.keyCode===122&&(this._controller.stepInto(1),i=!0),i)?(t.preventDefault(),t.stopImmediatePropagation(),!1):!0},i.prototype.onBrowserShortcut=function(t){var i;return t.ctrlKey&&t.shiftKey&&!t.altKey&&t.keyCode===80?(i=this._controller.debuggerManager.documentController.currentDoc,i&&i.prettyPrintState!==2?(i.prettyPrintState===0?n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.TOGGLE_PRETTY_PRINT_OFF,1):n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.TOGGLE_PRETTY_PRINT_ON,1),i.prettyPrintState=i.prettyPrintState===0?1:0):i&&i.prettyPrintState===2&&n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.TOGGLE_PRETTY_PRINT_DISABLED,1),!1):t.ctrlKey&&!t.shiftKey&&!t.altKey&&t.keyCode===76&&!this._controller.debuggerManager.debuggerShell.filePicker.isOpen?(i=this._controller.debuggerManager.documentController.currentDoc,i&&i.libraryState!==2?i.setIsLibraryFile(!i.isLibraryFile,1):i&&i.libraryState===2&&n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.TOGGLE_LIBRARY_FILE_DISABLED,1),!1):!0},i.F5_CONTINUE_TIMEOUT=t.F12.getDoubleClickTime()*1.5,i}();n.DebuggerToolbar=i})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=Common.Uri,u=function(){function u(n){this.propertyChanged=new Common.EventSource;this._debuggerManager=n;this._persistenceManager=n.persistenceManager;this._listeners=[];this._jmcUrlCache={};this._isJustMyCodeAvailable=!0;this._isJustMyCodeEnabled=this._persistenceManager.getSettingAsBoolean(u.JMC_SETTINGS_KEY,!0)}return Object.defineProperty(u.prototype,"debuggerManager",{get:function(){return this._debuggerManager},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"isJustMyCodeAvailable",{get:function(){return this._isJustMyCodeAvailable},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"isJustMyCodeEnabled",{get:function(){return this._isJustMyCodeAvailable&&this._isJustMyCodeEnabled},set:function(n){if(n!==this._isJustMyCodeEnabled){t.debuggerTraceWriter.traceWriter.raiseEvent(349);this._isJustMyCodeEnabled=n;this._persistenceManager.setSettingAsBoolean(u.JMC_SETTINGS_KEY,this._isJustMyCodeEnabled);this._persistenceManager.saveState();for(var i=0;i<this._listeners.length;i++)this._listeners[i].justMyCodeStateChanged(n);this._debuggerManager.jmcBreakController.justMyCodeStateChanged(n);this.propertyChanged.invoke("isJustMyCodeEnabled");t.debuggerTraceWriter.traceWriter.raiseEvent(350)}},enumerable:!0,configurable:!0}),u.prototype.registerListener=function(n){this._listeners.push(n)},u.prototype.initialize=function(){var n=this;return i.F12.Communications.addEventListener("jmcAvailabilityChanged",function(t){return n.onJMCAvailabilityChanged(t)}),i.F12.Communications.addEventListener("jmcRulesChanged",function(t){return n.onJMCRulesChanged(t)}),this.checkAvailability()},u.prototype.getJMCTypeForUrl=function(n){var r=this,t=this._jmcUrlCache[n];return typeof t!="undefined"?t:(this._jmcUrlCache[n]=i.F12.JMCType.UserCode,i.F12.JMC.getJMCTypeForUrl(n).done(function(t){r.updateJMCCache(n,t)}),this._jmcUrlCache[n])},u.prototype.setJMCTypeForUrl=function(r,u){var f=this,e=this._jmcUrlCache[r];return e!==u?(t.debuggerTraceWriter.traceWriter.raiseEvent(353),u===i.F12.JMCType.Unsure)?(n.Utility.Assert.fail("F12 does not support setting a url to the 'Unsure' type"),i.Promise.as(!1)):i.F12.JMC.setJMCTypeForUrl(r,u).then(function(n){return f.updateJMCCache(r,n),f._debuggerManager.executionController.breakState===0&&f._debuggerManager.executionController.breakAny(3),t.debuggerTraceWriter.traceWriter.raiseEvent(354),i.Promise.as(n!==e)}):i.Promise.as(!1)},u.prototype.documentAdded=function(){},u.prototype.onJMCAvailabilityChanged=function(){this.checkAvailability().done()},u.prototype.onJMCRulesChanged=function(n){var t=n.customData;this.updateJMCCache(t.url,t.currentType)},u.prototype.checkAvailability=function(){var n=this;return i.F12.JMC.isJMCAvailable().then(function(t){return(n._isJustMyCodeAvailable=t,n.propertyChanged.invoke("isJustMyCodeAvailable"),n.propertyChanged.invoke("isJustMyCodeEnabled"),!t)?i.F12.JMC.getError():i.Promise.as(undefined)}).then(function(n){if(typeof n!="undefined"){var i,r;switch(n.name){case"jmcLoadError":i="JMCLoadError";r=n.message;break;case"jmcSaveError":i="JMCSaveError";r=n.message;break;case"jmcParseError":i="JMCJsonParseError";r=undefined;break;default:i="JMCLoadError"}t.DebuggerShell.showErrorDisplay(i,[r])}})},u.prototype.updateJMCCache=function(n,t){var h=this._jmcUrlCache[n],f,u,e,o,i,s;if(this._jmcUrlCache[n]=t,f=h!==t,f){u=this._debuggerManager.documentController.getDocs();e=new r(n);for(o in u)i=u[o],s=i.rawDoc&&i.rawDoc.url||i.url,r.equals(s,e)&&this._debuggerManager.documentController.documentLibraryStateChanged(i)}},u.JMC_SETTINGS_KEY="isJMCEnabled",u}();t.JMCController=u})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(){function i(n){this._debuggerManager=n;this._beginResumeAction=1;this._beginResumeFrames=[];this._latestResumeAction=1;this._latestResumeFrames=[];this._libraryCodeDocToAllowStepping=null;this._steppedIntoLibrary=!1;this._currentlySteppingThroughDocument=!1;this._asyncBreakRequested=!1;this._previouslyHitEventType=null}return Object.defineProperty(i.prototype,"isJustMyCodeEnabled",{get:function(){return this._debuggerManager.jmcController.isJustMyCodeEnabled},enumerable:!0,configurable:!0}),i.prototype.justMyCodeStateChanged=function(n){!n&&this._asyncBreakRequested&&this._latestResumeAction===6&&this._debuggerManager.causeBreak(0)},i.prototype.ensureBreakInUserCode=function(){this._steppedIntoLibrary=!1},i.prototype.setJMCResumeInfo=function(n,t,i){this.isJustMyCodeEnabled&&((i||t===1)&&(this._libraryCodeDocToAllowStepping=null),i||(this._beginResumeAction=t,this._beginResumeFrames=t!==1?n:[],this._currentlySteppingThroughDocument=!1,this._asyncBreakRequested=!1,this._previouslyHitEventType=null),this._latestResumeAction=t,this._latestResumeFrames=n)},i.prototype.getJMCBreakAction=function(r,u,f,e,o){var s={ignoreBreak:!1,ignoreBreakAction:1,activeFrameIndex:-1,isLibraryFile:!1},v,h,l,a,y,c;if(this.isJustMyCodeEnabled&&r.length>0){if(v=u===1&&!!f,u===0&&this.queryStepAction(r,s,f),!s.ignoreBreak){if(h=this.getDocFromStackFrame(r[0]),l=h&&h.isLibraryFile,!l&&h&&h.isDynamicCode&&r.length>1)for(c=1;c<r.length;c++)if(a=this.getDocFromStackFrame(r[c]),a&&!a.isDynamicCode){l=a&&a.isLibraryFile;break}if(s.isLibraryFile=l,l){switch(u){case 0:case 5:this._libraryCodeDocToAllowStepping!==h?(s.ignoreBreak=!0,s.ignoreBreakAction=6,this._libraryCodeDocToAllowStepping=null):s.ignoreBreak=!1;u===5&&(this._asyncBreakRequested=!0);break;case 6:this.queryErrorAction(h,r,e,o,s);break;case 1:if(v){this.setJMCResumeInfo(r,2,!1);s.ignoreBreak=!0;s.ignoreBreakAction=6;this._currentlySteppingThroughDocument=!0;this._previouslyHitEventType=f;break}case 2:case 3:case 7:case 4:case 8:s.ignoreBreak=!1;this._libraryCodeDocToAllowStepping=h;break;default:n.Utility.Assert.fail("Unknown BreakReason")}this._steppedIntoLibrary=!0}else this._libraryCodeDocToAllowStepping=null,u===0&&this._steppedIntoLibrary&&t.ExecutionController.isStepAction(this._latestResumeAction)&&(i.isIStackFrameContained(this._beginResumeFrames,r,this._previouslyHitEventType,f)?this._beginResumeFrames.length===r.length&&(s.ignoreBreak=!0,s.ignoreBreakAction=this._beginResumeAction):this._previouslyHitEventType&&(s.ignoreBreak=!0,s.ignoreBreakAction=1)),this._steppedIntoLibrary=!1}if(s.ignoreBreak||!h||h.hasSourceMapping(r[0].location.start)||(s.ignoreBreak=!0,s.ignoreBreakAction=2),s.ignoreBreak){if(s.ignoreBreakAction===6&&!this._asyncBreakRequested&&!v){for(y=!1,c=0;c<r.length;c++)if(r[c].location.docId!==r[0].location.docId){y=!0;break}y||(this._currentlySteppingThroughDocument=!0,this._debuggerManager.testEventObject.fireEvent("onlyLibraryCodeOnStack"))}}else this._currentlySteppingThroughDocument=!1}return s},i.isIStackFrameContained=function(n,i,r,u){var e=!1,f,o,s;if(i.length>=n.length&&n.length>0)for(e=!0,f=1;f<=n.length;f++)if(o=n[n.length-f],s=i[i.length-f],!t.ExecutionController.areISourceLocationsEqual(o.location,s.location))if(f===1){if(!r||r!==u||o.location.docId!==s.location.docId||o.functionName!==s.functionName){e=!1;break}}else{e=!1;break}return e},i.prototype.getDocFromStackFrame=function(n){return this._debuggerManager.documentController.getDocFromRuntimeId(n.location.docId)},i.prototype.queryStepAction=function(n,r,u){if(this._currentlySteppingThroughDocument&&t.ExecutionController.isStepAction(this._latestResumeAction)&&t.ExecutionController.isStepAction(this._beginResumeAction)&&this._beginResumeAction!==2){var f=this._beginResumeFrames,e=f[f.length-1].location.start+f[f.length-1].location.length,o=n[n.length-1].location.start;i.isIStackFrameContained(f,n,this._previouslyHitEventType,u)||f.length===n.length&&e===o?(r.ignoreBreak=!0,r.ignoreBreakAction=4):(r.ignoreBreak=!1,this._currentlySteppingThroughDocument=!1)}},i.prototype.queryErrorAction=function(n,i,r,u,f){for(var s,h,e=-1,o=0;o<i.length;o++)if(s=this.getDocFromStackFrame(i[o]),!s.isLibraryFile||i[o].isInTryBlock){e=o;break}e===-1&&r?this._libraryCodeDocToAllowStepping=n:(e!==-1||r)&&(!this.getDocFromStackFrame(i[e]).isLibraryFile||u)?(f.ignoreBreak=!1,f.activeFrameIndex=e):(h=t.ExecutionController.isStepAction(this._latestResumeAction)?6:1,f.ignoreBreak=!0,f.ignoreBreakAction=h,this._currentlySteppingThroughDocument=!0)},i}();t.JMCBreakController=i})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(i){function r(n){i.call(this);this._debuggerManager=n;this._external=window.external;this._cachedLocalsInfo=null;this._callbackMap={}}return __extends(r,i),r.prototype.getIntellisenseChoices=function(n,i,u,f){var e=this;this.fireGetIntellisenseItemsStartEvent(f);t.F12.Debugger.getIsAtBreakpointInWorker()||t.F12.Debugger.getIsAtBreakpoint()?this.getLocalsInfo().done(function(t){var o,s,h,c;u.isCanceled?(e.fireGetIntellisenseItemsEndEvent(f),i([])):(o={searchExpression:n,searchContext:"window",locals:t.map(function(n){return n.name})},s=o.searchExpression.split("."),s.length>0&&o.locals.indexOf(s[0])>=0&&(o.searchContext=s[0],o.searchExpression=s.slice(1).join(".")),h=r.getNextId(),c={completeCallback:i,cancelToken:u,etwKey:f},e._callbackMap[h]=c,e._debuggerManager.executeBreakModeCommand(r.createInvoker(h,o)))}):(this.fireGetIntellisenseItemsEndEvent(f),i([]))},r.prototype.onIntellinsenseRequestComplete=function(n,t){var u,f,i;if(this._callbackMap.hasOwnProperty(n)){if(u=this._callbackMap[n],this.fireGetIntellisenseItemsEndEvent(u.etwKey),u.cancelToken.isCanceled)u.completeCallback([]);else{if(f=[],t&&t.choices)for(i=0;i<t.choices.length;++i)t.choices[i].name.match(Common.Intellisense.IntellisenseProviderBase.JAVASCRIPT_VALID_JS_VARIABLENAME_REGEX)&&t.choices[i].name.indexOf(r.BROWSERTOOLS_OBJECTS_PREFIX)!==0&&f.push(new Common.Intellisense.IntellisenseChoice(t.choices[i].name,t.choices[i].info));u.completeCallback(f)}delete this._callbackMap[n]}},r.prototype.activeFrameChanged=function(){this._cachedLocalsInfo=null},r.prototype.callstacksChanged=function(){},r.prototype.navigateTo=function(){return Common.PromiseUtilities.EmptyPromise},r.prototype.fireGetCurrentExpressionStartEvent=function(t){n.debuggerTraceWriter.traceWriter.raiseEventWithKey(380,t)},r.prototype.fireGetCurrentExpressionEndEvent=function(t){n.debuggerTraceWriter.traceWriter.raiseEventWithKey(381,t)},r.prototype.fireUpdateIntellisenseStartEvent=function(t){n.debuggerTraceWriter.traceWriter.raiseEventWithKey(382,t)},r.prototype.fireUpdateIntellisenseEndEvent=function(t){n.debuggerTraceWriter.traceWriter.raiseEventWithKey(383,t)},r.createInvoker=function(n,t){return'__BROWSERTOOLS_DEBUGGER.performBreakmodeIntellisense("'+n+'", "'+t.searchExpression+'", window, '+t.searchContext+", "+JSON.stringify(t.locals)+")"},r.getNextId=function(){return r.INTELLISENSE_ID_PREFIX+r.IdCounter++},r.prototype.fireGetIntellisenseItemsStartEvent=function(t){n.debuggerTraceWriter.traceWriter.raiseEventWithKey(384,t)},r.prototype.fireGetIntellisenseItemsEndEvent=function(t){n.debuggerTraceWriter.traceWriter.raiseEventWithKey(385,t)},r.prototype.getLocalsInfo=function(){var n=this;return this._cachedLocalsInfo?t.Promise.wrap(this._cachedLocalsInfo):this._debuggerManager.watchController.getLocalsForCurrentStackFrame().then(function(t){return n._cachedLocalsInfo=t,t})},r.INTELLISENSE_ID_PREFIX="DebuggerIntellisense:",r.IdCounter=0,r.BROWSERTOOLS_OBJECTS_PREFIX="__BROWSERTOOLS",r}(Common.Intellisense.IntellisenseProviderBase);n.DebuggerIntellisenseProvider=i})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n){var t=this;this._intellisenseContext=n;this._htmlInputElement=document.createElement("input");this._htmlInputElement.addEventListener("focusout",function(n){t._intellisenseContext.intellisenseMenu.isOpen&&n.stopImmediatePropagation()});this._intellisenseContext.uninitialize();this._intellisenseContext.initialize(this._htmlInputElement)}return Object.defineProperty(n.prototype,"inputElement",{get:function(){return this._htmlInputElement},enumerable:!0,configurable:!0}),n}();n.DebuggerIntellisenseControl=t})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function r(n,i){var u=this,r;this._debuggerManager=n;this._persistenceManager=this._debuggerManager.persistenceManager;this.isDataTip=i;this.view=null;this._watchStore=new t.WatchStore(this);this.isDataTip||this.disableWatchesWindow();this.isDataTip||(r=document.getElementById("intellisenseListBox")?"intellisenseListBox":null,this.intellisenseContext=new Common.Intellisense.IntellisenseContext(new Common.Intellisense.InputElementTextEditorBridge,new Common.Intellisense.IntellisenseMenu(r,null,null,null,null,this,this),this._debuggerManager.intellisenseProvider),this.intellisenseControl=new t.DebuggerIntellisenseControl(this.intellisenseContext),this.intellisenseContext.intellisenseProvider.onIntellisenseResultsAvailable=function(){return u._debuggerManager.testEventObject.fireEvent("onIntellisenseResultsAvailable")});Common.FeatureAvailability.setEnabledState(1,!1)}return r.prototype.getWatches=function(){return this._watchStore?this._watchStore.getWatches():[]},r.prototype.getExpandStates=function(){return this._watchStore?this._watchStore.getExpandStates():[]},r.prototype.refreshView=function(n,t){this.view&&this.view.refreshView(n,t)},r.prototype.layout=function(){this.view&&this.view.layout()},r.prototype.addWatch=function(n,r,u){var f=this;return t.Telemetry.logCommandWrapper(t.Telemetry.CommandName.ADD_WATCH,r,function(){var t=f._watchStore.addWatch(n,u);return f.isDataTip?f.evaluateWatch(t,!0):(f._persistenceManager.saveState(),f._watchStore.storeExceptionWatchState(),f.refreshAllWatchItems(!1,!1,!0),i.Promise.as(!0))})},r.prototype.addWatchByCurrentEditorPosition=function(n,i){var r=this;return t.Telemetry.logCommandWrapper(t.Telemetry.CommandName.ADD_WATCH,n,function(){var t=r._debuggerManager.debuggerShell.editorWindow,o=i||t.editorPosition,n,f,u=t.getEditorSelection(),e;return u&&!u.isEmpty()&&u.containsPosition(o)?(n=t.getEditorRangeContents(u).trim(),f=r._debuggerManager.documentController.currentDoc.getGeneratedIdentifierName(n)):(e=t.dataTips.parseExpression(o),n=e.text,n=n.trim(),f=e.evalText),n&&(t.rootElement.contains(document.activeElement)||i)?(r._debuggerManager.executionController.debuggerManager.watchController.addWatch(f||n,3),n):(r._debuggerManager.watchController.promptToAddWatch(3),null)})},r.prototype.editWatch=function(n,t){var i=this._watchStore.editWatch(n,t);this.isDataTip||this._persistenceManager.saveState();this._watchStore.storeExceptionWatchState();this._debuggerManager.watchController.refreshAllWatchItems(!0,!1,i)},r.prototype.deleteWatch=function(n,i){var r=this;t.Telemetry.logCommandWrapper(t.Telemetry.CommandName.DELETE_WATCH,i,function(){r._watchStore.deleteWatch(n);r.isDataTip||r._persistenceManager.saveState();r._debuggerManager&&r._debuggerManager.testEventObject.fireEvent("deleteWatchCompleted")})},r.prototype.onValueEdit=function(n,i){var e=this,r=this._watchStore.findWatchWithUid(n),f,u;r&&this._debuggerManager.executionController.isExecutionPaused&&r.displayValue!==i&&(f=this._debuggerManager.callstackController.activeFrame,f&&(u=!0,r.fullName.indexOf(t.WatchStore.EXCEPTION_WATCHITEM_PREFIX)===0&&(this._watchStore.storeExceptionWatchState(),this._watchStore.storeWatchStates(),u=!1),r.reset(),this._debuggerManager.setPropertyValueAsString(r.uid,i).then(function(){e.refreshAllWatchItems(!0,u)})))},r.prototype.refreshAllWatchItems=function(n,t,i){var r=this,u;t===void 0&&(t=!0);i===void 0&&(i=!1);this._debuggerManager.executionController.isExecutionPaused?(u=this._debuggerManager.callstackController.activeFrame,u&&(this._watchStore.reset(t),this.isDataTip?this.evaluateAllUserWatches().then(function(){r.refreshView(!0);r._debuggerManager.watchController.refreshAllWatchItems(!1)}):this.updateWatchesWindow(i,n))):this.refreshView(n,i)},r.prototype.deleteAll=function(n){var i=this;t.Telemetry.logCommandWrapper(t.Telemetry.CommandName.DELETE_ALL_WATCHES,n,function(){i.view&&i.view.isViewEnabled()&&i._watchStore.deleteAll()})},r.prototype.activeFrameChanged=function(n){var t=this;n!==this._displayedFrame&&(this._sourceMapStateChangedRegistration&&(this._sourceMapStateChangedRegistration.unregister(),this._sourceMapStateChangedRegistration=null),this._displayedFrame&&(this._watchStore.storeExceptionWatchState(),this._watchStore.storeWatchStates()),this._displayedFrame=n,n&&!n.isLibraryMarkerFrame&&(this._displayedFrame=n,this.updateWatchesWindow(!1,!1),n.location.startPosition&&(this._sourceMapStateChangedRegistration=n.location.startPosition.doc.propertyChanged.addHandler(function(){t.sourceMapLocalVariables().done(function(){t.refreshView()})}))))},r.prototype.callstacksChanged=function(){},r.prototype.navigateTo=function(){return Common.PromiseUtilities.EmptyPromise},r.prototype.getChildProperties=function(u,f){var e=this,s,h,o;n.Utility.Assert.isTrue(u.isExpandable,"Cannot request properties for non expandable watches");switch(f){case 0:s=0;h=r.MINIMAL_PROPERTIES_COUNT;break;case 1:s=r.MINIMAL_PROPERTIES_COUNT;h=0;break;case 2:s=0;h=0}return o=[],this._debuggerManager.getChildProperties(u.uid,s,h).then(function(n){var s=n.propInfos,h,f,r,l,c;for(u.hasAdditionalChildren=n.hasAdditionalChildren,f=0;f<s.length;f++)r=new t.WatchItem(s[f].propertyId,s[f].name,e._watchStore),l=e._watchStore.updateWatchWithPropInfo(r,s[f]),l&&(r.parentWatch=u,r.rootIndex=u.rootIndex,u===e._watchStore.localsExpando&&e._watchStore.isExceptionWatchItem(r)?(e._watchStore.insertWatchItemAtIndex(r,t.WatchStore.EXCEPTION_WATCHITEM_INDEX),h=e._watchStore.restoreWatch(r)):o=o.concat([r]));return c=o.map(function(n){return e._watchStore.restoreWatch(n)}),h&&c.push(h),i.Promise.join(c).then(function(){return e._debuggerManager.testEventObject.fireEvent("getChildPropertiesCompleted"),i.Promise.as(o)})})},r.prototype.enableWatchesWindow=function(){this._watchStore.isWatchesEvaluationEnabled=!0},r.prototype.disableWatchesWindow=function(){this._watchStore.isWatchesEvaluationEnabled=!1;this._watchStore.reset();this.refreshView()},r.prototype.hasUserWatches=function(){return this._watchStore.hasUserWatches()},r.prototype.promptToAddWatch=function(n){this.view&&this.view.promptToAddWatch(n)},r.prototype.evaluateAllUserWatches=function(){var t=this,n,r;return this._debuggerManager.executionController.isExecutionPaused&&this._debuggerManager.callstackController.activeFrame?(n=this._watchStore.getWatches(),this._watchStore.thisWatch&&n.push(this._watchStore.thisWatch),n=n.filter(function(n){return!n.local&&n.containsExpression&&n.evalStatus===0}),n.length>0?(r=n.map(function(n){return n.evalStatus=1,t._debuggerManager.eval(t._debuggerManager.callstackController.activeFrame.frameId,n.watchName).then(function(r){var u=t._watchStore.updateWatchWithPropInfo(n,r);return u?t._watchStore.restoreWatch(n):i.Promise.as(0)})}),i.Promise.join(r).then(function(){return Common.PromiseUtilities.EmptyPromise})):Common.PromiseUtilities.EmptyPromise):Common.PromiseUtilities.EmptyPromise},r.prototype.getLocalsForCurrentStackFrame=function(){return this._debuggerManager.executionController.isExecutionPaused&&this._debuggerManager.callstackController.activeFrame?this._watchStore.localsExpando.getNonFakeChildren().then(function(n){for(var i=[],t=0;t<n.length;t++)i.push({name:n[t].watchName,typeName:n[t].watchType});return i}):i.Promise.as([])},r.prototype.setViewState=function(n){this.view&&(this.view.setViewState(n),this._debuggerManager.testEventObject.fireEventForFirstListener("watchesViewStateChanged"))},r.prototype.isViewEnabled=function(){return this.view.isViewEnabled()},r.prototype.fireBuildListBoxStartEvent=function(n){t.debuggerTraceWriter.traceWriter.raiseEventWithKey(372,n)},r.prototype.fireBuildListBoxEndEvent=function(n){t.debuggerTraceWriter.traceWriter.raiseEventWithKey(373,n)},r.prototype.fireResetListBoxStartEvent=function(n){t.debuggerTraceWriter.traceWriter.raiseEventWithKey(374,n)},r.prototype.fireResetListBoxEndEvent=function(n){t.debuggerTraceWriter.traceWriter.raiseEventWithKey(375,n)},r.prototype.fireSetFilterStartEvent=function(n){t.debuggerTraceWriter.traceWriter.raiseEventWithKey(376,n)},r.prototype.fireSetFilterEndEvent=function(n){t.debuggerTraceWriter.traceWriter.raiseEventWithKey(377,n)},r.prototype.fireUpdateLayoutStartEvent=function(n){t.debuggerTraceWriter.traceWriter.raiseEventWithKey(378,n)},r.prototype.fireUpdateLayoutEndEvent=function(n){t.debuggerTraceWriter.traceWriter.raiseEventWithKey(379,n)},r.prototype.breakOnObject=function(n,i,r,u){var f=this;t.Telemetry.logCommandWrapper(r,u,function(){f._debuggerManager.setMutationBreakpoint(n.fullName,n.uid,i)})},r.prototype.canBreakOnObject=function(n,t){var i;return this._debuggerManager.canSetMutationBreakpoint(n.uid,t).done(function(n){i=n}),i},r.prototype.getLocals=function(){if(this._debuggerManager&&this._debuggerManager.executionController.isExecutionPaused){var n=this._debuggerManager.callstackController.activeFrame;if(n)return this._watchStore.deleteAnyExceptionWatch(),this._debuggerManager.getLocals(n.frameId)}return i.Promise.as("")},r.prototype.updateWatchesWindow=function(n,t){var i=this;this._watchStore.markAllWatchesStale();this.setViewState(!1);this.getLocals().done(function(r){r?i.evaluateAllUserWatches(t).then(function(){return i._watchStore.localsExpando.uid=r,i._watchStore.localsExpando.evalStatus=2,i._watchStore.restoreWatch(i._watchStore.localsExpando,!0)}).then(function(){return i.sourceMapLocalVariables()}).done(function(){i._debuggerManager.testEventObject.fireEvent("evaluateWatchCompleted");i.refreshView(t,n);i.setViewState(!0)}):i.setViewState(!0)})},r.prototype.sourceMapLocalVariables=function(){if(this._debuggerManager.callstackController.activeFrame&&this._debuggerManager.callstackController.activeFrame.location.startPosition){var n=this._debuggerManager.callstackController.activeFrame.location.startPosition.doc;if(n.sourceMapContainsLocalVariablesMapping())return this._watchStore.localsExpando.getNonFakeChildren().then(function(t){var u,i,f,r;if(t&&t.length>0)for(u=n.sourceMapState===0,i=0,f=t.length;i<f;i++)r=t[i],r.displayName=u?n.getAuthoredIdentifierName(r.watchName):null})}return i.Promise.wrap(null)},r.prototype.evaluateWatch=function(n,t){var r=this,u;return this._debuggerManager&&this._debuggerManager.executionController.isExecutionPaused&&(u=this._debuggerManager.callstackController.activeFrame,u)?this._debuggerManager.eval(u.frameId,n.watchName).then(function(u){var f=r._watchStore.updateWatchWithPropInfo(n,u);return f?r._watchStore.restoreWatch(n).then(function(){return(r.isDataTip&&r.view&&r.view.refreshView(!0,t),r._debuggerManager.testEventObject.fireEvent("evaluateWatchCompleted"),u.type==="Error"&&u.value.indexOf("is undefined")===-1)?i.Promise.as(!1):i.Promise.as(!0)}):i.Promise.as(!1)}):i.Promise.as(!0)},r.MINIMAL_PROPERTIES_COUNT=100,r}();t.WatchWindowController=r})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=Common.Grid,r=function(){function r(n,u,f){var o=this,y,s,h;this._controller=n;this._intellisenseControl=null;var c=t.Resources.getString("WatchWindowNameColumn"),l=t.Resources.getString("WatchWindowValueColumn"),a=t.Resources.getString("WatchWindowIconColumn"),v=u.clientWidth-r.DEFAULT_ICON_COLUMN_FIXED_WIDTH,p=this._controller.isDataTip?r.DEFAULT_COLUMN_SIZE:v*r.DEFAULT_COLUMN_PERCENT_WIDTH,e=new i.ColumnInfo(r.WATCH_NAME_COLUMN,c,c,p,!1);e.getColumnValue=function(n,t,i,r){return r[n].displayName};e.getCellCSSClass=function(n,t,i,r){return o.getCellCSSClass(n,t,i,r)};e.getGlyphClass=function(n,t,i,r){return o.getCellGlyphClass(n,t,i,r)};e.getCellTooltip=function(n,i,r,u){var f=u[n];return f.displayName!==f.watchName?t.Resources.getString("WatchesSourceMappedWatchTooltip",f.displayName,f.watchName):f.watchName};e.hasMixedContent=!0;e.hasGlyph=!0;e.indent=!0;y=this._controller.isDataTip?r.EXPANDED_COLUMN_SIZE:v*r.DEFAULT_COLUMN_PERCENT_WIDTH;s=new i.ColumnInfo(r.WATCH_VALUE_COLUMN,l,l,y,!1);s.getColumnValue=function(n,t,i,r){return r[n].displayValue};s.getCellCSSClass=function(n,t,i,r){return o.getCellCSSClass(n,t,i,r)};h=new i.ColumnInfo(r.WATCH_ICON_COLUMN,a,a,r.DEFAULT_ICON_COLUMN_FIXED_WIDTH,!1);h.getCellCSSClass=function(n,t,i,r){return o.getCellCSSClass(n,t,i,r)};h.hasHTMLContent=!0;this._controller.isDataTip?this._columnInfo=[e,s]:(this._intellisenseControl=this._controller.intellisenseControl,e.getEditBox=function(){return o._intellisenseControl.inputElement},e.percentWidth=r.DEFAULT_COLUMN_PERCENT_WIDTH,s.percentWidth=r.DEFAULT_COLUMN_PERCENT_WIDTH,h.fixed=!0,this._columnInfo=[e,s,h]);this._container=u;this.createGrid(this._container,f);this._container.addEventListener("click",function(n){return o.buttonsCallback(o._controller.isDataTip,n)});Common.ClipboardHelper.addCopyListener(this._container,this.onCopy.bind(this));this._controller.isDataTip||(this._deleteAllWatchesButton=document.getElementById("deleteAllWatchesButton"),this._addWatchButton=document.getElementById("addWatchButton"),Common.ButtonHelpers.setupButton(this._deleteAllWatchesButton,"WatchesDeleteAllTooltip",function(){o._controller.deleteAll(0)},!1),Common.ButtonHelpers.setupButton(this._addWatchButton,"WatchesAddWatchTooltip",function(){o.promptToAddWatch(0)}),this._container.addEventListener("contextmenu",function(n){o.showContextMenu(n)}));this.refreshView()}return r.prototype.dispose=function(){this._delayedRenderCookie&&(window.clearTimeout(this._delayedRenderCookie),this._delayedRenderCookie=null)},r.prototype.setViewState=function(n){this._grid.setViewState(n);this._addWatchButton&&Common.ButtonHelpers.changeButtonStatus(this._addWatchButton,n);this._deleteAllWatchesButton&&this._controller.hasUserWatches()&&Common.ButtonHelpers.changeButtonStatus(this._deleteAllWatchesButton,n)},r.prototype.getActualHeight=function(){return this.getObjectsCount()*r.GRID_LINE_HEIGHT},r.prototype.isViewEnabled=function(){return this._options.isGridEnabled},r.prototype.refreshView=function(t,i){var u=this;this._delayedRenderCookie&&window.clearTimeout(this._delayedRenderCookie);this._delayedRenderCookie=window.setTimeout(function(){n.debuggerTraceWriter&&n.debuggerTraceWriter.traceWriter.raiseEvent(346);u._controller.isDataTip||!Common.ButtonHelpers.isEnabled(u._deleteAllWatchesButton)||u._controller.hasUserWatches()?u._controller.isDataTip||Common.ButtonHelpers.isEnabled(u._deleteAllWatchesButton)||!u._controller.hasUserWatches()||Common.ButtonHelpers.changeButtonStatus(u._deleteAllWatchesButton,!0):Common.ButtonHelpers.changeButtonStatus(u._deleteAllWatchesButton,!1);var r=u._grid.getSelectedRowIndex(),f=u._controller.getWatches();(r===-1&&f.length>0||r>=f.length)&&(r=0);u._grid.setDataSource(f,u._controller.getExpandStates(),u._columnInfo,null,r,t,i);n.debuggerTraceWriter&&n.debuggerTraceWriter.traceWriter.raiseEvent(347);u._delayedRenderCookie=null},r.DELAYED_RENDER_INTERVAL)},r.prototype.layout=function(){this._grid.layoutOnResize()},r.prototype.getExpandStates=function(){return this._grid.getExpandStates()},r.prototype.getObjectsCount=function(){return this._grid.getExpandedCount()},r.prototype.promptToAddWatch=function(n){var t=this;this._grid.scrollToBottom(function(){return t.createAddWatchTextBox(n)});this.selectDataIndex(this._grid.getDataSource().length-1)},r.prototype.selectDataIndex=function(n){this._grid.setSelectedDataIndex(n)},r.prototype.scrollToBottom=function(n){this._grid.scrollToBottom(function(){return n()})},r.prototype.containsValidExpression=function(t){return!t.fake&&t.uid!==n.WatchStore.LOCALS_EXPANDO_ID&&t.fullName.indexOf(n.WatchStore.EXCEPTION_WATCHITEM_PREFIX)!==0},r.prototype.getExpressionInputBoxAtIndex=function(n){var i=this;return new t.Promise(function(t){var f=i._grid.getRowInfo(n),e=f.row,u=e.children[r.NAME_COLUMN],o=MutationObserver,s=new o(function(n,i){u.firstChild instanceof HTMLInputElement&&(i.disconnect(),window.setImmediate(function(){t(u.firstChild)}))});s.observe(u,{childList:!0,subtree:!0});i._grid.createEditBox(f.dataIndex,r.NAME_COLUMN,u)})},r.prototype.onCopy=function(){return this._copyText},r.prototype.createAddWatchTextBox=function(t){var i=this;n.Telemetry.logCommandWrapper(n.Telemetry.CommandName.ADD_WATCH,t,function(){var n=i._grid.getRowInfo(i._grid.getDataSource().length-1),t;n&&(t=n.row.children[r.NAME_COLUMN],i._grid.createEditBox(n.dataIndex,r.NAME_COLUMN,t))})},r.prototype.buttonsCallback=function(t,i){var e=i.target,f,r,u;if(i.button===0&&this._options.isGridEnabled)if(f=this._grid.getDataSource(),e.classList.contains("deleteWatch")&&!t)r=this._grid.getRowInfoFromEvent(i,".grid-row"),r&&(u=f[r.dataIndex],u&&(this._controller.deleteWatch(u.uid,0),this.refreshView()));else if(e.classList.contains("showAll"))r=this._grid.getRowInfoFromEvent(i,".grid-row"),r&&(u=f[r.dataIndex],u&&this.requestRemainingProperties(u,r.dataIndex));else if(e.classList.contains("grid-cell")&&!t&&(r=this._grid.getRowInfoFromEvent(i,".grid-row"),r&&(u=f[r.dataIndex],u&&u.uid===n.WatchStore.ADD_WATCH_PLACEHOLDER)))this._grid.onEditCell(i)},r.prototype.requestRemainingProperties=function(n,t){var i=this;n.parentWatch.getChildren(1).done(function(n){var r=i.getRowsAndExpandState(n);i._grid.insertAdditionalDynamicData(r,t)})},r.prototype.createGrid=function(t,u){var f=this;this._childDataCallback=function(n,t){n.getChildren(0).done(function(n){var i=f.getRowsAndExpandState(n);t(i)})};this._preEditValueCallback=function(t,i){var u,e,o;i===r.NAME_COLUMN&&(u=f._grid.getDataSource()[t],u&&u.uid===n.WatchStore.ADD_WATCH_PLACEHOLDER&&(f._options.commitOnTab=!0,e=f._grid.getRowInfo(t),e&&(o=e.row.children[r.NAME_COLUMN],o.innerText="")))};this._commitEditValueCallback=function(t,i,u){var e=f._grid.getDataSource()[i];if(e)if(u===r.NAME_COLUMN)t&&t!==""?f._controller.editWatch(e.uid,t):e.uid!==n.WatchStore.ADD_WATCH_PLACEHOLDER&&f._controller.deleteWatch(e.uid,3);else f._controller.onValueEdit(e.uid,t)};this._postEditValueCallback=function(t,i){var u,e,o;f._options.commitOnTab=!1;i===r.NAME_COLUMN&&(u=f._grid.getDataSource()[t],u&&u.uid===n.WatchStore.ADD_WATCH_PLACEHOLDER&&(e=f._grid.getRowInfo(t),e&&(o=e.row.children[r.NAME_COLUMN],o.innerText=u.watchName)),f._controller.intellisenseContext.intellisenseMenu.isOpen=!1)};this._options=new i.GridOptions(this._childDataCallback,this._columnInfo,null,this._preEditValueCallback,this._commitEditValueCallback,this._postEditValueCallback);this._controller.isDataTip?this._options.keyboardEventHandler={keys:[Common.Keys.C,Common.Keys.ENTER,Common.Keys.SPACEBAR],handler:function(n,t,i){return f.keyboardEventHandler(n,t,i)}}:(this._options.keyboardEventHandler={keys:[Common.Keys.C,Common.Keys.DEL,Common.Keys.ENTER,Common.Keys.SPACEBAR,Common.Keys.F10],handler:function(n,t,i){return f.keyboardEventHandler(n,t,i)}},this._options.disableRightClickSelection=!1,this._options.keepSelection=!0);this._options.drawRowSplitters=!0;this._options.expandedCountChangedCallback=u;this._options.extendViewportBy=50;this._grid=new i.GridControl(t,this._options);this._options.onRowToggleCallback=function(t,i,r){var u=t[i];if(r){u.watchState=n.WatchItem.EXPANDED;return}u.watchState=n.WatchItem.COLLAPSED}},r.prototype.getCellCSSClass=function(n,t,i,r){var u=r[n];return u.watchItemCSS[t]},r.prototype.getCellGlyphClass=function(t,i,u,f){var e=f[t];return e.isReturnValue?n.WatchItem.RETURN_VALUE_CLASS_NAME:e.watchName===e.displayName?e.typeClass:e.typeClass+r.WATCH_GLYPH_MAPPED_SUFFIX},r.prototype.getRowsAndExpandState=function(n){for(var r,i=[],t=0;t<n.length;t++)i=i.concat(n[t].getDescendants());for(r=[],t=0;t<i.length;t++)r.push(i[t].getExpandState());return{itemsWithPlaceholders:i,expandStates:r}},r.prototype.keyboardEventHandler=function(t,i,r){var u=i[r];if(!u)return!1;switch(t.key){case Common.Keys.C:return!t.shiftKey&&t.ctrlKey&&!t.altKey?(this.copyWatchToClipboard(u,1),!0):!1;case Common.Keys.DEL:u.isUserWatch&&this._controller.deleteWatch(u.uid,1);break;case Common.Keys.ENTER:u.uid===n.WatchStore.ADD_WATCH_PLACEHOLDER?this.createAddWatchTextBox(1):u.uid.indexOf(n.WatchItem.SHOWALL_WATCHITEM_SUFFIX)!==-1&&this.requestRemainingProperties(u,r);break;case Common.Keys.SPACEBAR:u.uid.indexOf(n.WatchItem.SHOWALL_WATCHITEM_SUFFIX)!==-1&&this.requestRemainingProperties(u,r);break;case Common.Keys.F10:!t.shiftKey||t.ctrlKey||t.altKey||this.showContextMenu(t)}return!0},r.prototype.createMenuItems=function(){var i=this,r=[];return r.push({id:"menuItemAddWatchWindowView",callback:function(){i._controller.addWatch(i._contextMenuWatchItem.fullName,2)},label:t.Resources.getString("WatchesContextMenuAddWatch"),type:1,disabled:function(){return!i.containsValidExpression(i._contextMenuWatchItem)}}),r.push({id:"menuItemCopyWatchWindowView",callback:function(){i.copyWatchToClipboard(i._contextMenuWatchItem,2)},label:t.Resources.getString("WatchesContextMenuCopy"),type:1,disabled:function(){return i._contextMenuWatchItem.uid===n.WatchStore.ADD_WATCH_PLACEHOLDER||i._contextMenuWatchItem.uid===n.WatchStore.LOCALS_EXPANDO_ID}}),r.push({id:"menuItemEditValueWatchWindowView",callback:function(n,t){i.onEditValue(n,t,2)},label:t.Resources.getString("WatchesContextMenuEditValue"),type:1,disabled:function(){return!i._options.isGridEnabled||i._contextMenuWatchItem.readOnly}}),r.push({id:"menuItemSep1WatchWindowView",type:3}),r.push({id:"menuItemDeleteWatchWindowView",callback:function(n,t){i.onDelete(n,t)},label:t.Resources.getString("WatchesContextMenuDelete"),type:1,disabled:function(){return!i._options.isGridEnabled||!i._contextMenuWatchItem.isUserWatch}}),r.push({id:"menuItemDeleteAllWatchWindowView",callback:function(n,t){i.onDeleteAll(n,t,2)},label:t.Resources.getString("WatchesContextMenuDeleteAll"),type:1,disabled:function(){return!i._options.isGridEnabled||!i._controller.hasUserWatches()}}),Common.FeatureAvailability.isEnabled(1)&&(r.push({id:"menuItemSep1WatchWindowView",type:3}),r.push({id:"menuItemBreakOnObjectWatchWindowView",callback:function(){i._controller.breakOnObject(i._contextMenuWatchItem,!0,n.Telemetry.CommandName.BREAK_ON_OBJECT_WATCH,2)},label:t.Resources.getString("WatchesContextMenuBreakOnObject"),type:1,disabled:function(){return!i.containsValidExpression(i._contextMenuWatchItem)||!i._controller.canBreakOnObject(i._contextMenuWatchItem,!0)}}),r.push({id:"menuItemBreakOnPropertyWatchWindowView",callback:function(){i._controller.breakOnObject(i._contextMenuWatchItem,!1,n.Telemetry.CommandName.BREAK_ON_PROPERTY_WATCH,2)},label:t.Resources.getString("WatchesContextMenuBreakOnProperty"),type:1,disabled:function(){return i._contextMenuWatchItem.parentWatch===undefined||!i.containsValidExpression(i._contextMenuWatchItem)||!i._controller.canBreakOnObject(i._contextMenuWatchItem,!1)}})),r},r.prototype.showContextMenu=function(n){var u,i,r,f;this._grid&&(this._contextMenu&&(this._contextMenu.dispose(),this._contextMenu=null),u=this._grid.getRowInfoFromEvent(n,".grid-row")||this._grid.getRowInfo(this._grid.getSelectedDataIndex()),u&&(this._contextMenuSelection=u.dataIndex,this._contextMenuWatchItem=this._grid.getDataSource()[this._contextMenuSelection],this._contextMenu=t.ContextMenu.create(this.createMenuItems(),"watchesContextMenu"),i=0,r=0,n instanceof MouseEvent&&(i=n.pageX,r=n.pageY),i<=0&&r<=0&&(f=u.row.getBoundingClientRect(),i=f.left,r=f.top),this._contextMenu.show(i,r)));n.preventDefault();n.stopImmediatePropagation()},r.prototype.onEditValue=function(t,i,u){var f=this;n.Telemetry.logCommandWrapper(n.Telemetry.CommandName.EDIT_WATCH,u,function(){window.setImmediate(function(){var n=f._grid.getRowInfo(f._contextMenuSelection),t;n&&(t=n.row.children[r.VALUE_COLUMN],f._grid.createEditBox(n.dataIndex,r.VALUE_COLUMN,t))})})},r.prototype.onDelete=function(){this._controller.deleteWatch(this._contextMenuWatchItem.uid,2)},r.prototype.onDeleteAll=function(n,t,i){this._controller.deleteAll(i)},r.prototype.copyWatchToClipboard=function(t,i){var r=this;n.Telemetry.logCommandWrapper(n.Telemetry.CommandName.COPY_WATCH,i,function(){try{r._copyText=t.getCopyString();Common.ClipboardHelper.fireCopyEvent(r._container)}catch(n){}})},r.DEFAULT_COLUMN_PERCENT_WIDTH=.5,r.DEFAULT_ICON_COLUMN_FIXED_WIDTH=20,r.DEFAULT_COLUMN_SIZE=140,r.EXPANDED_COLUMN_SIZE=240,r.DELAYED_RENDER_INTERVAL=10,r.WATCH_NAME_COLUMN="watchName",r.WATCH_VALUE_COLUMN="watchValue",r.WATCH_ICON_COLUMN="watchIcon",r.WATCH_GLYPH_MAPPED_SUFFIX="Mapped",r.NAME_COLUMN=0,r.VALUE_COLUMN=1,r.GRID_LINE_HEIGHT=20,r.TWO_COLUMN_WIDTH=r.DEFAULT_COLUMN_SIZE+r.EXPANDED_COLUMN_SIZE,r}();n.WatchWindowView=r})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,u,f,i,r;(function(n){n[n.Stale=0]="Stale";n[n.EvalSent=1]="EvalSent";n[n.EvalReceived=2]="EvalReceived";n[n.EvalRestoreComplete=3]="EvalRestoreComplete"})(n.WatchEvalStatus||(n.WatchEvalStatus={}));u=n.WatchEvalStatus,function(n){n[n.Minimal=0]="Minimal";n[n.Remaining=1]="Remaining";n[n.All=2]="All"}(n.WatchPropertiesRange||(n.WatchPropertiesRange={}));f=n.WatchPropertiesRange;i=function(){function n(){this.watchIcon="";this.watchName="watch-watchName";this.watchValue=""}return Object.defineProperty(n.prototype,"nameEditable",{get:function(){return this.watchName.indexOf(n.GRID_CELL_EDITABLE)>=0},set:function(t){this.setCSSClass(n.WATCH_NAME_PROPERTY,t,n.GRID_CELL_EDITABLE)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"nameAsMixedCellHTML",{get:function(){return this.watchName.indexOf(n.GRID_MIXED_CELL_HTML)>=0},set:function(t){this.setCSSClass(n.WATCH_NAME_PROPERTY,t,n.GRID_MIXED_CELL_HTML)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"valueEditable",{get:function(){return this.watchValue.indexOf(n.GRID_CELL_EDITABLE)>=0},set:function(t){this.setCSSClass(n.WATCH_VALUE_PROPERTY,t,n.GRID_CELL_EDITABLE)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"valueChanged",{get:function(){return this.watchValue.indexOf(n.WATCH_VALUE_CHANGED)>=0},set:function(t){t&&!this.invalid?this.setCSSClass(n.WATCH_VALUE_PROPERTY,!0,n.WATCH_VALUE_CHANGED):t||this.setCSSClass(n.WATCH_VALUE_PROPERTY,!1,n.WATCH_VALUE_CHANGED)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"invalid",{get:function(){return this.watchValue.indexOf(n.WATCH_ERROR)>=0},set:function(t){this.setCSSClass(n.WATCH_VALUE_PROPERTY,t,n.WATCH_ERROR);t&&(this.watchValue=this.watchValue.replace(n.WATCH_VALUE_CHANGED,""))},enumerable:!0,configurable:!0}),n.prototype.setCSSClass=function(n,t,i){t&&this[n].indexOf(i)===-1?this[n]+=" "+i:t||(this[n]=this[n].replace(i,""))},n.WATCH_NAME_PROPERTY="watchName",n.WATCH_VALUE_PROPERTY="watchValue",n.GRID_CELL_EDITABLE="grid-cell-editable",n.GRID_MIXED_CELL_HTML="grid-mixed-cell-html",n.WATCH_ERROR="watch-Error",n.WATCH_VALUE_CHANGED="watch-ValueChanged",n}();n.WatchItemCSS=i;r=function(){function r(n,t,u,f){this._name=t;this._value=null;this._type=null;this._typeClass="";this._children=null;this._store=u;this._isExpandable=!1;this.uid=n;this.fullName=t;this.watchItemCSS=new i;this.hasAdditionalChildren=null;this.containsExpression=!1;this.isPlaceholder=!1;this.parentWatch=f;this.local=!1;this.watchState=r.COLLAPSED;this.evalStatus=0;this.watchItemCSS.valueEditable=!0}return Object.defineProperty(r.prototype,"watchName",{get:function(){return this._name},set:function(n){this._name=n},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"watchValue",{get:function(){return this._value},set:function(n){this._value=this._type&&this._type.toLowerCase()==="string"&&n.length>=2?JSON.stringify(n.substring(1,n.length-1)):n.replace(/[\r\n\s]+/g," ").trim()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"watchType",{get:function(){return this._type},set:function(n){this._type=n;this._typeClass=n.toLowerCase().indexOf("function")!==-1?"functionItem":"notAFunctionItem"},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"displayName",{get:function(){return this._displayName||this._name},set:function(n){this._displayName=n},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"displayValue",{get:function(){return this.getDisplayValue()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isExpandable",{get:function(){return this._isExpandable},set:function(n){if(this._isExpandable=n,this._isExpandable){this._children=[];var t=new r(this.uid+r.PLACEHOLDER_WATCHITEM_SUFFIX,"",this._store,this);t.isPlaceholder=!0;t.rootIndex=this.rootIndex;this._children.push(t)}else this._children=null},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"fake",{get:function(){return this._fake},set:function(n){this._fake=n},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"readOnly",{get:function(){return this._readOnly},set:function(n){this._readOnly=n;this.watchItemCSS.valueEditable=!this._readOnly},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isInvalid",{get:function(){return this._invalid},set:function(n){this._invalid=n;this.watchItemCSS.invalid=n},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"watchIcon",{get:function(){return this.isUserWatch?'<div role="button" class = "deleteWatch" data-plugin-vs-tooltip=\''+t.Resources.getString("DeleteWatchTooltip")+"'><\/div>":""},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"typeClass",{get:function(){return this._type===""?"":this._typeClass},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isUserWatch",{get:function(){return this.containsExpression&&!(this.parentWatch&&this.parentWatch.watchName===r.WATCH_LABEL&&this.watchName==="this")},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"customProperty",{get:function(){return this._customProperty},set:function(n){this._customProperty=n;this._customProperty.rootIndex=this.rootIndex},enumerable:!0,configurable:!0}),r.prototype.getExpandState=function(){return this.watchState*(this.getDescendantsCount()-1)},r.prototype.getChildren=function(i){var u=this;return i===0&&this._children&&this._children[0].uid.indexOf(r.PLACEHOLDER_WATCHITEM_SUFFIX)===-1?t.Promise.as(this._children):i===1&&!this.hasAdditionalChildren&&this._children.length>n.WatchWindowController.MINIMAL_PROPERTIES_COUNT?t.Promise.as(this._children.splice(n.WatchWindowController.MINIMAL_PROPERTIES_COUNT)):i===2&&this._children&&this._children.length>1?t.Promise.as(this._children):this._store.getChildProperties(this,i).then(function(n){if(u.hasAdditionalChildren){u._children=n;var f=t.Resources.getString("WatchesShowAllItems"),e=new r(u.uid+r.SHOWALL_WATCHITEM_SUFFIX,"<div class='showAll' data-plugin-vs-tooltip='"+f+"'>"+f+"<\/div>",u._store,u);e.watchItemCSS.nameAsMixedCellHTML=!0;u._children.push(e)}else{if(i===1)return u._children.splice(u._children.length-1,1),u._children=u._children.concat(n),t.Promise.as(n);u._children=n}return u._customProperty&&u._children.unshift(u._customProperty),t.Promise.as(u._children)})},r.prototype.getDescendantsCount=function(){var t=0,n;if(this._children)for(n=0;n<this._children.length;n++)t+=this._children[n].getDescendantsCount();return 1+t},r.prototype.getDescendants=function(n){if(n===void 0&&(n=[]),n.push(this),this._children)for(var t=0;t<this._children.length;t++)this._children[t].getDescendants(n);return n},r.prototype.getNonFakeChildren=function(){var e=this,n=[],u=[],o,s,f,i,h;if(this.hasAdditionalChildren)o=this.getChildren(1).then(function(){return e.getNonFakeChildren()}).then(function(i){return n=n.concat(i),t.Promise.as(n)}),u.push(o);else if(this.isExpandable&&this._children.length>0&&this._children[0].uid.indexOf(r.PLACEHOLDER_WATCHITEM_SUFFIX)!==-1)s=this.getChildren(2).then(function(){return e.getNonFakeChildren()}).then(function(i){return n=n.concat(i),t.Promise.as(n)}),u.push(s);else for(f=0;f<this._children.length;f++)i=this._children[f],i.fake||i.isReturnValue?i.fake&&i.isExpandable&&!i.isReturnValue&&(h=i.getNonFakeChildren().then(function(i){return n=n.concat(i),t.Promise.as(n)}),u.push(h)):n.push(i);return t.Promise.join(u).then(function(){return t.Promise.as(n)})},r.prototype.getDisplayValue=function(){if(this._value==="{...}"||this._value==="[...]"){if(this._type){if(this._type.substr(0,7)==="Object,")return"[object"+this._type.substr(7)+"]";if(this._type.substr(0,8)==="[Object,")return"[object"+this._type.substring(8,this._type.length-1)+"]";if(this._type==="Object")return"[object]"}else return"";return"[object "+this._type+"]"}return this._value==="Anonymous function"?"[Anonymous function]":this._value},r.prototype.getCopyString=function(){return this.watchName+"\t"+(this.displayValue||"")},r.prototype.reset=function(){this._value=null;this._type=null;this._children=null;this.isExpandable=!1;this.watchState=r.COLLAPSED;this.evalStatus=0;this.hasAdditionalChildren=null},r.prototype.clearChildren=function(){this._children=null;this.isExpandable=!1;this.hasAdditionalChildren=null},r.EXPANDED=1,r.COLLAPSED=-1,r.SHOWALL_WATCHITEM_SUFFIX="-showAll",r.PLACEHOLDER_WATCHITEM_SUFFIX="-placeholder",r.RETURN_VALUE_CLASS_NAME="returnValue",r.WATCH_LABEL="[Locals]",r}();n.WatchItem=r})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(n,t,i,r){this.fullName=n;this.watchValue=t;this.propertiesRange=i||i===null?0:2;this.watchState=r}return n}(),r;n.WatchStateInfo=i;r=function(){function r(i){this._store=[];this._watchesStateInfo=[];this._watchController=i;this._watchId=0;this._watchController.isDataTip||(this.localsExpando=new n.WatchItem(r.LOCALS_EXPANDO_ID,n.WatchItem.WATCH_LABEL,this),this.localsExpando.local=!0,this.localsExpando.fake=!0,this.localsExpando.readOnly=!0,this.localsExpando.isExpandable=!0,this.localsExpando.fullName=this.localsExpando.watchName,this.localsExpando.rootIndex=0,this.localsExpando.evalStatus=3,this.thisWatch=new n.WatchItem(r.LOCALS_EXPANDO_ID+"-this","this",this,this.localsExpando),this.thisWatch.containsExpression=!0,this.localsExpando.customProperty=this.thisWatch,this._store.push(this.localsExpando),this.addWatchPlaceholder=new n.WatchItem(r.ADD_WATCH_PLACEHOLDER,t.Resources.getString("AddToWatchesWindowLink"),this),this.addWatchPlaceholder.watchItemCSS.nameEditable=!0,this.addWatchPlaceholder.fake=!0,this.addWatchPlaceholder.readOnly=!0,this._store.push(this.addWatchPlaceholder))}return r.prototype.addWatch=function(t,i){var r=new n.WatchItem(this.getUid(),t,this);return r.displayName=i,r.containsExpression=!0,this._watchController.isDataTip||(r.watchItemCSS.nameEditable=!0),this._watchController.isDataTip?(r.rootIndex=this._store.length,this._store.push(r)):(r.rootIndex=this._store.length-1,this._store.splice(this._store.length-1,0,r)),r},r.prototype.editWatch=function(n,t){var i=this.findWatchWithUid(n),u;if(!this._watchController.isDataTip&&i){if(i.uid===r.ADD_WATCH_PLACEHOLDER)return this.addWatch(t),!0;u=this.getIndexOfTopLevelWatch(i.uid);u>0&&(i=this._store[u],i.isUserWatch&&(i.reset(),i.watchName=t,i.watchItemCSS.nameEditable=!0));this.isWatchesEvaluationEnabled||this._watchController.refreshView()}return!1},r.prototype.deleteWatch=function(n){var i=this.findWatchWithUid(n),t;i&&i.uid!==r.ADD_WATCH_PLACEHOLDER&&(t=this.getIndexOfTopLevelWatch(i.uid),t>=0&&(this._store.splice(t,1),this._watchController.refreshView(),this.isWatchesEvaluationEnabled&&i.isUserWatch&&this._watchesStateInfo&&this._watchesStateInfo[t]&&this._watchesStateInfo[t].hasOwnProperty(i.fullName)&&this._watchesStateInfo.splice(t,1)))},r.prototype.deleteAnyExceptionWatch=function(){var n=this._store[r.EXCEPTION_WATCHITEM_INDEX];this.isExceptionWatchItem(n)&&this.deleteWatch(n.uid)},r.prototype.insertWatchItemAtIndex=function(n,t){this._store&&t>=0&&t<this._store.length&&(n.rootIndex=t,this._store.splice(t,0,n))},r.prototype.deleteAll=function(){this._store=this._store.filter(function(n){return!n.isUserWatch});this._watchController.refreshView()},r.prototype.getExpandStates=function(){var t=[],i=this.getWatches(),n;if(this.isWatchesEvaluationEnabled||this._watchController.isDataTip)for(n=0;n<i.length;n++)t.push(i[n].getExpandState());else for(n=0;n<i.length;n++)t.push(0);return t},r.prototype.getWatches=function(){var e=[],i,u,f;if(this.isWatchesEvaluationEnabled||this._watchController.isDataTip)for(i=0;i<this._store.length;i++)e=e.concat(this._store[i].getDescendants());else for(i=0;i<this._store.length;i++)u=this._store[i],u.isUserWatch?(f=new n.WatchItem(u.uid,u.watchName,this),f.containsExpression=!0,f.watchValue=t.Resources.getString("NotAvailableMessage"),f.readOnly=!0,f.watchItemCSS.nameEditable=!0,e.push(f)):u.uid===r.ADD_WATCH_PLACEHOLDER&&e.push(u);return e},r.prototype.findWatchWithUid=function(n){var i=this.getWatches(),t,r;if(i)for(t=0;t<i.length;t++)if(r=i[t],r.uid===n)return r;return null},r.prototype.getChildProperties=function(n,t){return this._watchController.getChildProperties(n,t)},r.prototype.updateWatchWithPropInfo=function(n,t){return(n.evalStatus=2,t.propertyId!==r.ERROR_PROPID)?(n.uid=t.propertyId,n.watchType=t.type,n.watchType=t.type,n.watchValue=t.value,n.fullName=t.fullName,n.isInvalid=t.invalid,n.isExpandable=t.expandable,n.fake=t.fake,n.readOnly=t.readOnly,n.isReturnValue=t.returnValue,!0):!1},r.prototype.storeExceptionWatchState=function(){var u,t,n;if(this._store[r.EXCEPTION_WATCHITEM_INDEX])for(u=this._store[r.EXCEPTION_WATCHITEM_INDEX].getDescendants(),this._exceptionWatchState={},t=0;t<u.length;t++)n=u[t],n.fullName&&(this._exceptionWatchState[n.fullName]=new i(n.fullName,n.watchValue,n.hasAdditionalChildren,n.watchState))},r.prototype.storeWatchStates=function(){var o=this._watchesStateInfo,n,f,e,r,t,u;for(this._watchesStateInfo=[],n=0;n<this._store.length;n++)if(this._store[n].evalStatus===3){for(f=this._store[n].getDescendants(),this._store[n].rootIndex=n,e={},r=0;r<f.length;r++)t=f[r],u=this.getExpandStateInformationKey(t),u&&(e[u]=new i(u,t.watchValue,t.hasAdditionalChildren,t.watchState));this._watchesStateInfo[n]=e}else this._watchesStateInfo[n]=o[n]},r.prototype.restoreWatch=function(i,u){var o=this.getExpandStateInformationKey(i),e,f;return i&&o&&i.uid!==r.ERROR_PROPID&&(e=this._watchesStateInfo[i.rootIndex],o.indexOf(r.EXCEPTION_WATCHITEM_PREFIX)===0&&i.rootIndex===r.EXCEPTION_WATCHITEM_INDEX&&(e=this._exceptionWatchState),e&&(f=e[o],f&&(i.watchItemCSS.valueChanged=i.watchValue!==f.watchValue?!0:!1,f.watchState===n.WatchItem.EXPANDED&&i.isExpandable||u)))?(u&&(i.clearChildren(),i.isExpandable=!0),i.getChildren(f.propertiesRange).then(function(n){return i.watchState=f.watchState,i.evalStatus=3,t.Promise.as(n.length)})):(i.evalStatus=3,t.Promise.as(0))},r.prototype.markAllWatchesStale=function(){for(var n=0;n<this._store.length;n++)this._store[n].evalStatus=0;this.thisWatch.evalStatus=0},r.prototype.reset=function(t){var i;if(t===void 0&&(t=!0),this._watchController.isDataTip)for(this.storeWatchStates(),i=0;i<this._store.length;i++)this._store[i].reset();else{for(this._watchesStateInfo.length===0&&(this.localsExpando.watchState=n.WatchItem.EXPANDED),this._store.length>=r.EXCEPTION_WATCHITEM_INDEX+1&&this.isExceptionWatchItem(this._store[r.EXCEPTION_WATCHITEM_INDEX])&&(this._store.splice(r.EXCEPTION_WATCHITEM_INDEX,1),t&&(this._exceptionWatchState=null)),this.storeWatchStates(),i=0;i<this._store.length;i++)this._store[i].reset();this.thisWatch.reset();this.localsExpando.isExpandable=!0}},r.prototype.hasUserWatches=function(){if(this._watchController.isDataTip)return this._store.length>0;for(var n=0;n<this._store.length;n++)if(this._store[n].isUserWatch)return!0;return!1},r.prototype.isExceptionWatchItem=function(n){return n&&n.parentWatch===this.localsExpando&&n.watchName.toLowerCase()===r.EXCEPTION_WATCHITEM_PREFIX},r.prototype.getUid=function(){return""+this._watchId++},r.prototype.getIndexOfTopLevelWatch=function(n){for(var t=0;t<this._store.length;t++)if(this._store[t].uid===n)return t;return-1},r.prototype.getExpandStateInformationKey=function(n){var t=n.fullName||"";if(!t){while(n.parentWatch)t="."+n.watchName+t,n=n.parentWatch;t=n.watchName+t}return t},r.EXCEPTION_WATCHITEM_INDEX=0,r.LOCALS_EXPANDO_ID="locals",r.ADD_WATCH_PLACEHOLDER="addWatch",r.EXCEPTION_WATCHITEM_PREFIX="{exception}",r.ERROR_PROPID="ERROR",r}();n.WatchStore=r})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function r(n,t,i,r,u){this._editorWindow=n;this._executionController=t;this._breakpointController=i;this._callstackController=r;this._languageServiceController=u;Common.ClipboardHelper.addCopyListener(this._editorWindow.rootElement,this.onCopy.bind(this))}return Object.defineProperty(r.prototype,"isShowing",{get:function(){return this._isShowing},enumerable:!0,configurable:!0}),r.prototype.show=function(n,t,r,u,f,e){var h=this,o,s;this._editorWindow.displayedDoc&&(n===0&&t===0&&(o=document.querySelector(".monaco-editor .cursors-layer > .cursor"),o&&(s=o.getBoundingClientRect(),n=s.right-1,t=s.bottom-14)),this._menuEditorPosition=f,this._contextMenu&&(this._contextMenu.dispose(),this._contextMenu=null),this._menuBreakpoints=null,e?this._menuBreakpoints=this._breakpointController.getBreakpointsStartingAtLine(this._editorWindow.displayedDoc,this._menuEditorPosition.lineNumber):u&&(this._menuBreakpoints=[u]),this._editorWindow.dataTips.hideImmediately(!1),this._contextMenu=i.ContextMenu.create(this.createMenuItems(r),"editorMenu"),this._isShowing=!0,this._contextMenu.show(n,t),this._contextMenu.addEventListener("dismiss",function(){h._isShowing=!1}))},r.prototype.hide=function(){this._contextMenu&&this._contextMenu.dismiss()},r.prototype.createMenuItems=function(n){var t=this,r=[],e=this._editorWindow.displayedDoc.isRuntimeDoc,o=this._editorWindow.displayedDoc.canEditBreakpoints,s,u,f;if(r.push({id:"menuItemCopyEditorContextMenu",callback:function(n,i){return t.onCopyMenuItem(n,i)},label:i.Resources.getString("BreakpointsContextMenuCopy"),type:1,disabled:function(){var n=t._editorWindow.getEditorSelection();return!n||n.isEmpty()},accessKey:i.Resources.getString("/Common/AccessKeyCtrlC")}),r.push({id:"menuItemCopyLocationEditorContextMenu",callback:function(){return t.onCopyLocation()},label:i.Resources.getString("BreakpointsContextMenuCopyLocation"),type:1}),r.push({id:"menuItemEditCommandsSeparatorEditorContextMenu",type:3}),r.push({id:"menuItemGoToDefinition",callback:function(n,i){return t.onGoToDefinition(n,i)},label:i.Resources.getString("GoToDefinition"),type:1,disabled:function(){return!t._languageServiceController.canGoToDefinition()},accessKey:i.Resources.getString("/Common/AccessKeyCtrlD")}),r.push({id:"menuItemFindAllReferences",callback:function(n,i){return t.onFindAllReferences(n,i)},label:i.Resources.getString("FindAllReferences"),type:1,disabled:function(){return!t._languageServiceController.canFindReferences()},accessKey:i.Resources.getString("/Common/AccessKeyCtrlShiftD")}),r.push({id:"menuItemNavigationCommandsSeparatorEditorContextMenu",type:3}),this._menuBreakpoints&&this._menuBreakpoints.length>0&&o){for(r.push({id:"menuItemRemoveBreakpointEditorContextMenu",callback:function(n,i){return t.onRemoveBreakpoint(n,i)},label:i.Resources.getString(this._menuBreakpoints.length<=1?"EditorContextMenuRemoveBreakpoint":"EditorContextMenuRemoveAllBreakpoints"),type:1,disabled:function(){return!1},accessKey:this._menuBreakpoints.length===1?i.Resources.getString("/Common/AccessKeyF9"):""}),s=!1,u=0;u<this._menuBreakpoints.length;u++)if(this._menuBreakpoints[u].isEnabled){s=!0;break}s?r.push({id:"menuItemDisableBreakpointEditorContextMenu",callback:function(n,i){return t.onDisableBreakpoint(n,i)},label:i.Resources.getString(this._menuBreakpoints.length<=1?"EditorContextMenuDisableBreakpoint":"EditorContextMenuDisableAllBreakpoints"),type:1,disabled:function(){return!1},accessKey:this._menuBreakpoints.length===1?i.Resources.getString("/Common/AccessKeyCtrlF9"):""}):r.push({id:"menuItemEnableBreakpointEditorContextMenu",callback:function(n,i){return t.onEnableBreakpoint(n,i)},label:i.Resources.getString(this._menuBreakpoints.length<=1?"EditorContextMenuEnableBreakpoint":"EditorContextMenuEnableAllBreakpoints"),type:1,disabled:function(){return!1},accessKey:this._menuBreakpoints.length===1?i.Resources.getString("/Common/AccessKeyCtrlF9"):""});this._menuBreakpoints.length===1&&(f=this._menuBreakpoints[0],f.isTracepoint?r.push({id:"menuItemAddTraceEditorContextMenu",callback:function(n,i){return t.onEditBreakpoint(n,i,f)},label:i.Resources.getString("BreakpointsContextMenuAddTraceMessage"),type:1,accessKey:i.Resources.getString("/Common/AccessKeyAltF9")}):r.push({id:"menuItemAddConditionEditorContextMenu",callback:function(n,i){return t.onEditBreakpoint(n,i,f)},label:i.Resources.getString("BreakpointsContextMenuAddCondition"),type:1,accessKey:i.Resources.getString("/Common/AccessKeyAltF9")}))}else r.push({id:"menuItemInsertBreakpointEditorContextMenu",callback:function(n,i){return t.onInsertBreakpoint(n,i,!1)},label:i.Resources.getString("EditorContextMenuInsertBreakpoint"),type:1,disabled:function(){return!o},accessKey:i.Resources.getString("/Common/AccessKeyF9")}),r.push({id:"menuItemInsertTracepointEditorContextMenu",callback:function(n,i){return t.onInsertBreakpoint(n,i,!0)},label:i.Resources.getString("EditorContextMenuInsertTracepoint"),type:1,disabled:function(){return!o}});return r.push({id:"menuItemBreakpointControlSeparatorEditorContextMenu",type:3}),r.push({id:"menuItemGoToLineEditorContextMenu",callback:function(){return t._editorWindow.showGoToLinePrompt()},label:i.Resources.getString("GoToLineCommand"),type:1,accessKey:i.Resources.getString("/Common/AccessKeyCtrlG")}),r.push({id:"menuItemShowNextStatementEditorContextMenu",callback:function(n,i){return t.onShowNextStatement(n,i)},label:i.Resources.getString("ShowNextStatement"),type:1,disabled:function(){return!t._executionController.isExecutionPaused},accessKey:i.Resources.getString("/Common/AccessKeyAltNumStar")}),r.push({id:"menuItemRunToCursorEditorContextMenu",callback:function(n,i){return t.onRunToCursor(n,i)},label:i.Resources.getString("EditorContextMenuRunToCursor"),type:1,disabled:function(){return t._executionController.isDebuggingDisabled||!e},accessKey:i.Resources.getString("/Common/AccessKeyCtrlF10")}),r.push({id:"menuItemSetNextStatementEditorContextMenu",callback:function(n,i){return t.onSetNextStatement(n,i)},label:i.Resources.getString("EditorContextMenuSetNextStatement"),type:1,disabled:function(){return!t._executionController.isExecutionPaused||!e||!n},accessKey:i.Resources.getString("/Common/AccessKeyCtrlShiftF10")}),this._executionController.debuggerManager.isBreakCompleted&&(r.push({id:"menuItemExecutionControlSeparatorEditorContextMenu",type:3}),r.push({id:"menuItemAddToWatchEditorContextMenu",callback:function(n,i){return t.onAddToWatch(n,i)},label:i.Resources.getString("EditorContextMenuAddToWatch"),type:1,disabled:function(){return!t._executionController.isExecutionPaused||!e},accessKey:i.Resources.getString("/Common/AccessKeyCtrlW")})),r.push({id:"menuItemOpenLink",callback:function(){return t._editorWindow.openLink()},label:i.Resources.getString("EditorContextMenuOpenLink"),type:1,disabled:function(){return!t._editorWindow.isLinkEnabled()}}),r},r.prototype.onCopyMenuItem=function(){var n=this;t.Telemetry.logCommandWrapper(t.Telemetry.CommandName.EDITOR_COPY,2,function(){var t=n._editorWindow.getEditorSelection();t&&(n._copyText=n._editorWindow.getEditorRangeContents(t),Common.ClipboardHelper.fireCopyEvent(n._editorWindow.rootElement))})},r.prototype.onCopyLocation=function(){var n=this;t.Telemetry.logCommandWrapper(t.Telemetry.CommandName.EDITOR_COPY_LOCATION,2,function(){n._copyText=new t.DocumentLocation(n._editorWindow.displayedDoc,n._menuEditorPosition.lineNumber,n._menuEditorPosition.column).startDisplayText;Common.ClipboardHelper.fireCopyEvent(n._editorWindow.rootElement)})},r.prototype.onCopy=function(){return this._copyText},r.prototype.onGoToDefinition=function(){this._languageServiceController.goToDefinition(2)},r.prototype.onFindAllReferences=function(){this._languageServiceController.findReferences(2)},r.prototype.onEditBreakpoint=function(n,i,r){this._breakpointController.promptToModifyConditionOrTracepoint(r,t.Telemetry.CommandName.SET_CONDITION_IN_EDITOR,2)},r.prototype.onSetNextStatement=function(){this._executionController.setNextStatement(new t.DocumentLocation(this._editorWindow.displayedDoc,this._menuEditorPosition.lineNumber,this._menuEditorPosition.column),2)},r.prototype.onShowNextStatement=function(){this._callstackController.goToActiveFrame(2)},r.prototype.onInsertBreakpoint=function(n,i,r){var u=this._editorWindow.adjustInsertionColumn(this._menuEditorPosition.lineNumber,this._menuEditorPosition.column);this._breakpointController.addCodeBreakpoint(new t.DocumentLocation(this._editorWindow.displayedDoc,this._menuEditorPosition.lineNumber,u),t.Telemetry.CommandName.TOGGLE_BREAKPOINT_IN_EDITOR,2,r)},r.prototype.onRemoveBreakpoint=function(){n.Utility.Assert.isTrue(this._menuBreakpoints!==null);for(var i=0;i<this._menuBreakpoints.length;i++)this._breakpointController.deleteBreakpoint(this._menuBreakpoints[i],t.Telemetry.CommandName.DELETE_BREAKPOINT_IN_WINDOW,2);this._menuBreakpoints=null},r.prototype.onEnableBreakpoint=function(){var i=this;t.Telemetry.logCommandWrapper(t.Telemetry.CommandName.SET_BREAKPOINT_STATE_IN_EDITOR,2,function(){n.Utility.Assert.isTrue(i._menuBreakpoints!==null);for(var t=0;t<i._menuBreakpoints.length;t++)i._breakpointController.setEnabledState(i._menuBreakpoints[t],!0);i._menuBreakpoints=null})},r.prototype.onDisableBreakpoint=function(){var i=this;t.Telemetry.logCommandWrapper(t.Telemetry.CommandName.SET_BREAKPOINT_STATE_IN_EDITOR,2,function(){n.Utility.Assert.isTrue(i._menuBreakpoints!==null);for(var t=0;t<i._menuBreakpoints.length;t++)i._breakpointController.setEnabledState(i._menuBreakpoints[t],!1);i._menuBreakpoints=null})},r.prototype.onRunToCursor=function(){this._executionController.runToCursor(this._editorWindow.displayedDoc,this._menuEditorPosition,2)},r.prototype.onAddToWatch=function(){this._executionController.debuggerManager.watchController.addWatchByCurrentEditorPosition(2,this._menuEditorPosition)},r}();t.EditorContextMenu=r})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function t(){}return Object.defineProperty(t.prototype,"model",{get:function(){return this._model},set:function(t){n.Utility.Assert.hasValue(t,"Model should not be set without a value");this._model=t},enumerable:!0,configurable:!0}),t.prototype.addBreakpointDecoration=function(n){var u=this,r={editorState:this,decorationId:"",glyphId:""};return this.model&&this.model.changeDecorations(function(f){n.isEnabled&&n.isBound&&(r.decorationId=f.addDecoration(u.getTrimmedRange(n.location),{className:"breakpointDecoration",stickiness:3}));r.glyphId=f.addDecoration(t.positionAsRange(n.location.startPosition),{className:"",showInOverviewRuler:i.Theme.getValue("plugin-editor-scrollbar-marker-breakpoint-color"),glyphMarginClassName:n.getGlyphClassName()+" breakpointGlyph "+(n.isBound?" ":" bpUnbound ")+(n.isEnabled?" ":" bpDisabled ")+t.GLYPH_CLASS,stickiness:1})}),r},t.prototype.displayInstructionPointerDecoration=function(n){var u=this,r={editorState:this,decorationId:"",glyphId:""};return this.model&&this.model.changeDecorations(function(f){r.decorationId=f.addDecoration(u.getTrimmedRange(n),{className:"instructionPointerDecoration"});r.glyphId=f.addDecoration(t.positionAsRange(n.startPosition),{overviewRuler:{color:i.Theme.getValue("plugin-editor-scrollbar-marker-instruction-pointer-color"),position:2},glyphMarginClassName:"instructionPointerGlyph "+t.GLYPH_CLASS})}),r},t.prototype.displayCursorDecoration=function(n){var u=this,r={editorState:this,decorationId:"",glyphId:""};return this.model&&this.model.changeDecorations(function(f){r.decorationId=f.addDecoration(u.getTrimmedRange(n),{className:"cursorDecoration"});r.glyphId=f.addDecoration(t.positionAsRange(n.startPosition),{overviewRuler:{color:i.Theme.getValue("plugin-color"),position:7},glyphMarginClassName:"cursorGlyph "+t.GLYPH_CLASS,showInOverviewRuler:i.Theme.getValue("plugin-color"),stickiness:1})}),r},t.prototype.addExceptionDecoration=function(n){var t={editorState:this,decorationId:"",glyphId:""};return this.model&&this.model.changeDecorations(function(r){t.decorationId=r.addDecoration(n,{className:"",showInOverviewRuler:i.Theme.getValue("plugin-font-editor-erroradornment-background-color")})}),t},t.prototype.displayActiveFrameDecoration=function(n){var u=this,r={editorState:this,decorationId:"",glyphId:""};return this.model&&this.model.changeDecorations(function(f){r.decorationId=f.addDecoration(u.getTrimmedRange(n),{className:"activeFrameDecoration"});r.glyphId=f.addDecoration(t.positionAsRange(n.startPosition),{showInOverviewRuler:i.Theme.getValue("plugin-editor-scrollbar-marker-active-frame-color"),glyphMarginClassName:"activeFrameGlyph "+t.GLYPH_CLASS})}),r},t.prototype.displayTextSpotlightDecoration=function(n){var i=this,t={editorState:this,decorationId:"",glyphId:""};return this.model&&this.model.changeDecorations(function(r){t.decorationId=r.addDecoration(i.getTrimmedRange(n),{className:"textSpotlightDecoration"})}),t},t.prototype.removeDecorationInfo=function(n){this.model&&this.model.decorations&&this.model.changeDecorations(function(t){n.decorationId&&(t.removeDecoration(n.decorationId),n.decorationId=null);n.glyphId&&(t.removeDecoration(n.glyphId),n.glyphId=null)})},t.prototype.getTrimmedRange=function(n){var i;if(!this._model)return{startLineNumber:1,startColumn:1,endLineNumber:1,endColumn:1};var r=this._model.getValueInRange(n),u=n.endColumn,t=n.endLineNumber;for(t>this._model.getLineCount()&&(t=this._model.getLineCount(),u=this._model.getLineContent(t).length),i=r.length-1;r.charAt(i).match(/[\s]/);)r.charAt(i)==="\n"?(t--,u=this._model.getLineContent(t).length+1,r.charAt(i-1)==="\r"&&i--):u--,i--;return{startLineNumber:n.startLineNumber,startColumn:n.startColumn,endLineNumber:t,endColumn:u}},t.prototype.addTrackedRange=function(n){return this.model&&!this.model.isDisposed()?this.model.addTrackedRange(this.getTrimmedRange(n),3):null},t.prototype.removeTrackedRange=function(n){this.model&&!this.model.isDisposed()&&this.model.removeTrackedRange(n)},t.prototype.getNewTrackedRangePosition=function(n){return this.model.getTrackedRange(n)},t.positionAsRange=function(n){return{startLineNumber:n.line,endLineNumber:n.line,startColumn:n.column,endColumn:n.column}},t.GLYPH_CLASS="f12Glyph",t}();t.EditorState=r})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(i){"use strict";var r=Microsoft.Plugin,u=function(){function u(n,t,r,f,e,o,s,h){var c=this;this._requestedIsWritable=!1;this._effectiveIsWritable=!1;this._trackedRangeMap={};this._decorationInfos={};this._locationUpdateRegistrations={};this.propertyChanged=new Common.EventSource;this.editorUpdated=new Common.EventSource;this._documentController=t;this._breakpointController=r;this._executionController=f;this._callstackController=e;this._languageServiceController=o;this._persistenceManager=n.persistenceManager;this._debuggerManager=n;this._pendingTooltip=null;this._wordWrapEnabled=!1;this._editorElement=s;this._editorContextMenu=new i.EditorContextMenu(this,this._executionController,this._breakpointController,this._callstackController,this._languageServiceController);this._editorElement.addEventListener("click",function(){n.languageServiceController.hideWindows(!0)});this._editorElement.addEventListener("focusin",function(){n.languageServiceController.hideWindows(!1)});window.setImmediate(function(){require(["vs/editor/editor.main","vs/editor/editor","vs/platform/services","vs/languages/typescript/typescript","vs/languages/javascript/javascript.extensions","vs/base/network","vs/platform/platform","vs/editor/modes/modesExtensions"],function(t,r,f,e,o,s,l,a){i.debuggerTraceWriter.traceWriter.raiseEvent(326);var v=l.Registry.as(a.Extensions.EditorModes);v.configureMode("text/javascript",{validationSettings:c.jsValidationSettings});v.configureMode("text/css",{validationSettings:c.cssValidationSettings});c._monacoNetwork=s;c._monacoBaseEditor=r;e.Extensions.setProjectResolver(new f.AsyncDescriptor("debugger/LanguageService/projectResolver","ProjectResolver",{modeId:"vs.languages.typescript",pattern:"**/*.ts",resourceViewController:n.resourceViewController,documentController:c._documentController,languageServiceController:c._languageServiceController}));o.Extensions.setProjectResolver(new f.AsyncDescriptor("debugger/LanguageService/projectResolver","ProjectResolver",{modeId:"vs.languages.javascript",pattern:"**/*.js",resourceViewController:n.resourceViewController,documentController:c._documentController,languageServiceController:c._languageServiceController}));c._editor=Monaco.Editor.create(c._editorElement,{value:"",mode:null,scrollbar:{vertical:"visible",horizontal:"visible",useShadows:!1,verticalHasArrows:!0,horizontalHasArrows:!0,handleMouseWheel:!0,verticalScrollbarSize:17,horizontalScrollbarSize:17,arrowSize:30},readOnly:!c._effectiveIsWritable,scrollBeyondLastLine:!0,roundedSelection:!0,insertSpaces:!1,quickSuggestions:!1,autoClosingBrackets:!0,automaticLayout:!1,glyphMargin:!0,hover:!0,nativeContextMenu:!1,wrappingColumn:c.wordWrapEnabled===0?0:u.WRAPPING_COLUMN,tabFocusMode:!1,selectOnLineNumbers:!1,stopLineTokenizationAfter:1e7});c.propertyChanged.invoke("wordWrapEnabled");i.debuggerTraceWriter.traceWriter.raiseEvent(327);c._dataTips=new i.DataTips(c._editor,c,n);window.addEventListener("resize",function(){i.debuggerTraceWriter.traceWriter.raiseEvent(328);c._editor.layout();i.debuggerTraceWriter.traceWriter.raiseEvent(329)});c._editor.getEditorService().setOpenEditorDelegate(c.onUrlClicked.bind(c));c._editor.addListener(MonacoDefinitions.EventType.ModelContentChanged,function(n){return c.onModelContentChanged(n)});c._editor.addListener(MonacoDefinitions.EventType.MouseMove,c.onMouseMove.bind(c));c._editorElement.addEventListener("mouseout",c.clearTooltip.bind(c));c.setupControls();h()})})}return Object.defineProperty(u.prototype,"previousSelectionLocation",{get:function(){return this._previousSelectionLocation},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"displayedDoc",{get:function(){return this._displayedDoc},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"exceptionViewZone",{get:function(){return this._exceptionViewZone},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"searchProvider",{get:function(){return this._documentController.searchProvider},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"dataTips",{get:function(){return this._dataTips},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"contextMenu",{get:function(){return this._editorContextMenu},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"wordWrapEnabled",{get:function(){return this._editor?this._editor.getConfiguration().isDominatedByLongLines?2:this._wordWrapEnabled?0:1:1},set:function(t){n.Tools.Utility.Assert.areNotEqual(t,2);var i=this.wordWrapEnabled;this._wordWrapEnabled=t===0;this._editor&&this._editor.updateOptions({wrappingColumn:this._wordWrapEnabled?0:u.WRAPPING_COLUMN});this.wordWrapEnabled!==i&&this.propertyChanged.invoke("wordWrapEnabled")},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"effectiveIsWritable",{get:function(){return this.synchronizeIsWritable(),this._effectiveIsWritable},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"requestedIsWritable",{get:function(){return this._requestedIsWritable},set:function(n){this._requestedIsWritable=n;this.synchronizeIsWritable()},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"editorPosition",{get:function(){return this._editor&&this._editor.getPosition()||{lineNumber:1,column:1}},set:function(n){this._editor&&this._editor.setPosition(n)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"rootElement",{get:function(){return this._editorElement},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"showDocumentLocation",{get:function(){return this._showDocumentLocation},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"showDocumentDoc",{get:function(){return this._showDocumentDoc},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"jsValidationSettings",{get:function(){return{codeGenTarget:"ES6",lint:{typeScriptSpecifics:"error",curlyBracketsMustNotBeOmitted:"ignore",emptyBlocksWithoutComment:"ignore",comparisonOperatorsNotStrict:"ignore",missingSemicolon:"ignore",reservedKeywords:"ignore",unknownTypeOfResults:"ignore",semicolonsInsteadOfBlocks:"ignore",functionsInsideLoops:"ignore",tripleSlashReferenceAlike:"ignore",unusedVariables:"ignore",unusedFunctions:"ignore",newOnLowercaseFunctions:"ignore",newOnReturningFunctions:"ignore",redeclaredVariables:"ignore",undeclaredVariables:"ignore",unknownProperty:"ignore",primitivesInInstanceOf:"ignore",mixedTypesArithmetics:"ignore",forcedTypeConversion:"ignore"}}},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"cssValidationSettings",{get:function(){return{lint:{emptyRules:"ignore",compatibleVendorPrefixes:"ignore",vendorPrefix:"ignore",duplicateProperties:"ignore",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"ignore",hexColorLength:"ignore",argumentsInColorFunction:"ignore",unknownProperties:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"ignore",important:"ignore",float:"ignore",idSelector:"ignore"}}},enumerable:!0,configurable:!0}),u.prototype.focus=function(){this._editor.focus()},u.prototype.getEditorSelection=function(){return this._editor&&this._editor.getSelection()},u.prototype.getEditorRangeContents=function(n){var t=this._editor&&this._editor.getModel();return t?t.getValueInRange(n):""},u.prototype.getAssociatedResource=function(){var n=this._editor&&this._editor.getModel();return n&&n.getAssociatedResource()},u.prototype.isActive=function(){return Common.ToolWindowHelpers.nodeInDocument(document.activeElement,this._editorElement)},u.prototype.getModeAtPosition=function(n){var t=this._editor&&this._editor.getModel();return t&&t.getModeAtPosition(n.lineNumber,n.column)},u.prototype.documentAsLibraryStateChanged=function(){},u.prototype.documentUrlChanged=function(){},u.prototype.documentUpdated=function(n){var t=this;n.isOpen&&(n===this._displayedDoc?n.getText().then(function(i){t.updateDisplayedText(n,i,!0)}):u.destroyDocEditorState(n))},u.prototype.closeDocument=function(n){var t,r;this._displayedDoc===n&&(this._displayedDoc=null,t=this._pendingSelectionLocation,t&&t.startPosition&&t.endPosition?(this._previousSelectionLocation=new i.DocumentLocation(n,t.startPosition.line,t.startPosition.column,n,t.endPosition.line,t.endPosition.column,t.rawLocation),this._pendingSelectionLocation=null):(r=this._editor.getSelection(),r&&(this._previousSelectionLocation=new i.DocumentLocation(n,r.startLineNumber,r.startColumn,n,r.endLineNumber,r.endColumn))),this.clearEditorState(),this._editor&&(this.dataTips.dataTipsEnabled=!1,this.setEditorModel(null,null)));this._showDocumentDoc===n&&(this._showDocumentDoc=null,this._showDocumentLocation&&this._showDocumentLocation.cleanup(),this._showDocumentLocation=null);u.destroyDocEditorState(n)},u.prototype.openDocument=function(n,r,u){var f=this,e;return(u&&u.rawLocation&&this._persistenceManager.updateEditorPosition(u.rawLocation.offset),n===this._displayedDoc)?(n.editorState&&n.editorState.model!==this._editor.getModel()&&this.setEditorModel(n.editorState.model,n),u&&u.startPosition&&!this._pendingSelectionLocation&&(this.revealRange(u,r===2),this.editorPosition=u),Common.PromiseUtilities.EmptyPromise):r===0?this._persistenceManager.isPrettyPrintEnabled(n)?n.getText():(this.editorUpdated.invoke(n),Common.PromiseUtilities.EmptyPromise):(t.Utility.Assert.isTrue(n.isOpen&&n===this._documentController.currentDoc,"Doc failed to open"),this.dataTips.dataTipsEnabled=!1,this.saveLoadedDoc(),this.clearEditorState(),this._previousSelectionLocation=null,this._displayedDoc=n,e=n.editorState,e?(this.setEditorModel(e.model,n),this.editorUpdated.invoke(n)):n.editorState=new i.EditorState,Common.PromiseUtilities.EmptyPromise.then(function(){return e?Common.PromiseUtilities.EmptyPromise:(f._pendingSelectionLocation=null,n.getText().then(function(t){n.hasText||(f._pendingSelectionLocation=u);f.updateDisplayedText(n,t,!0)},function(){},function(t){return f.updateDisplayedText(n,t,!1)}))}).then(function(){f.restoreEditorState(n);u&&u.startPosition&&!f._pendingSelectionLocation&&(f.revealRange(u,r===2),f.editorPosition=u);f._debuggerManager.testEventObject.fireEvent("editorDocumentOpened")}))},u.prototype.doLayout=function(){var n=this;this._editor&&window.setImmediate(function(){i.debuggerTraceWriter.traceWriter.raiseEvent(328);n._editor.layout();i.debuggerTraceWriter.traceWriter.raiseEvent(329)})},u.prototype.breakStateChanged=function(n){this._editorContextMenu.hide();n||this.destroyExceptionDisplays();var t=this._documentController.currentDoc;t?(t.breakStateChanged(),this.requestedIsWritable=t.isEditable):this.synchronizeIsWritable()},u.prototype.exceptionFilterChanged=function(){},u.prototype.breakCallComplete=function(){},u.prototype.justMyCodeStateChanged=function(){},u.prototype.createExceptionDisplays=function(n,t){var r=n.startPosition.doc.editorState;n.startPosition&&n.startPosition.doc.isOpen&&r&&(this._exceptionViewZone=new i.ExceptionViewZone(n,t,r,this._editor),this._exceptionViewZone.addToEditor(this.displayedDoc),this._decorationInfos[u.EXCEPTION_DECORATION_ID]=r.addExceptionDecoration({startLineNumber:n.endLineNumber+1,startColumn:0,endLineNumber:n.endLineNumber+1,endColumn:1}))},u.prototype.destroyExceptionDisplays=function(){var n=this._decorationInfos[u.EXCEPTION_DECORATION_ID];n&&n.editorState&&(n.editorState.removeDecorationInfo(n),delete this._decorationInfos[u.EXCEPTION_DECORATION_ID]);this._exceptionViewZone&&(this._exceptionViewZone.cleanUp(),this._exceptionViewZone=null)},u.prototype.addSetNextStatementErrorViewZone=function(n){var f=this,t,i,u;n.startPosition.doc.editorState&&(this.removeSetNextStatementErrorViewZone(n.startPosition.doc),t=document.createElement("div"),i=document.createElement("div"),i.className="exceptionGlyph",t.appendChild(i),t.appendChild(document.createTextNode(r.Resources.getString("SetNextStatementFailed"))),t.className="setNextStatementErrorViewZone",u={afterLineNumber:n.endLineNumber,heightInLines:1,domNode:t},n.startPosition.doc.editorState.viewZoneSetNextStatement=u,this._documentController.currentDoc===n.startPosition.doc&&this._editor.changeViewZones(function(n){f._setNextStatementViewZoneId=n.addZone(u)}))},u.prototype.removeSetNextStatementErrorViewZone=function(n){var t=this;n.editorState&&n.editorState.viewZoneSetNextStatement&&(this._documentController.currentDoc===n&&this._setNextStatementViewZoneId&&this._editor.changeViewZones(function(n){n.removeZone(t._setNextStatementViewZoneId);t._setNextStatementViewZoneId=null}),n.editorState.viewZoneSetNextStatement=null)},u.prototype.activeFrameChanged=function(n){var t,i;n&&n.isLibraryMarkerFrame||((!n||n.isInstructionPointerFrame)&&this._instructionPointerFrame&&this._instructionPointerFrame.location.startPosition&&this._instructionPointerFrame.location.startPosition.doc.isOpen&&(t=this._decorationInfos[u.IP_DECORATION_ID],t&&t.editorState&&(t.editorState.removeDecorationInfo(t),delete this._decorationInfos[u.IP_DECORATION_ID]),this.removeSetNextStatementErrorViewZone(this._instructionPointerFrame.location.startPosition.doc)),this._activeFrame&&this._activeFrame.location.startPosition&&this._activeFrame.location.startPosition.doc.isOpen&&(t=this._decorationInfos[u.ACTIVE_FRAME_DECORATION_ID],t&&t.editorState&&(t.editorState.removeDecorationInfo(t),delete this._decorationInfos[u.ACTIVE_FRAME_DECORATION_ID])),(!n||n.isInstructionPointerFrame)&&(this._instructionPointerFrame=null,this._activeFrame=null),n&&n.isInstructionPointerFrame||(this._activeFrame=null),n&&n.location&&(i=n.location,n.isInstructionPointerFrame?this._instructionPointerFrame=n:this._activeFrame=n),this.updateExecutionDecorations())},u.prototype.callstacksChanged=function(){},u.prototype.getLocalMatches=function(n){var t=this._editor&&this._editor.getModel();return t?t.findMatches(n,!1,!1,!1,!1):[]},u.prototype.addDecorations=function(n,t,i){var r=[],u=this._editor&&this._editor.getModel();return n&&u&&u.changeDecorations(function(u){for(var f=0;f<n.length;f++)r.push(u.addDecoration(n[f],{className:t,showInOverviewRuler:i,stickiness:1}))}),r},u.prototype.removeDecorations=function(n,t){var i=t&&t.editorState&&t.editorState.model;n&&i&&i.changeDecorations(function(t){for(var i=0;i<n.length;i++)t.removeDecoration(n[i])})},u.prototype.selectRange=function(n,t){this._editor&&(this.revealRange(n,t),this._editor.setSelection(n))},u.prototype.getLineCount=function(){var n=this._documentController.currentDoc&&this._documentController.currentDoc.editorState;return n?n.model.getLineCount():0},u.prototype.getLineContents=function(n){var t=this._editor&&this._editor.getModel();return t&&n>0&&n<=t.getLineCount()?t.getLineContent(n):""},u.prototype.getRawLineTokens=function(n){var t=this._editor&&this._editor.getModel(),i;return t&&n>0&&n<=t.getLineCount()?(i=t.getLineTokens(n),this._monacoBaseEditor.LineTokensBinaryEncoding.inflateArr(i.getBinaryEncodedTokensMap(),i.getBinaryEncodedTokens())):null},u.prototype.getLineContext=function(n){var t=this._editor&&this._editor.getModel();return t&&n>0&&n<=t.getLineCount()?t.getLineContext(n):null},u.prototype.revealPosition=function(n,t){this.revealRange({startLineNumber:n.lineNumber,startColumn:n.column,endLineNumber:n.lineNumber,endColumn:n.column},t)},u.prototype.revealRange=function(n,t){var u,f,e,r,o;(t===void 0&&(t=!0),u=this._editor&&this._displayedDoc&&this._displayedDoc.editorState&&this._displayedDoc.editorState.model,u)&&(i.debuggerTraceWriter.traceWriter.raiseEvent(314),f=!0,e=!0,i.debuggerTraceWriter.traceWriter.raiseEvent(332),this._editor.revealRange(n,f,e),r={lineNumber:n.startLineNumber,column:n.startColumn},o=this._displayedDoc.editorState.model.getLineCount(),this._editor.getScrollTop()>this._editor.getTopForLineNumber(Math.min(n.startLineNumber,o))&&this._editor.revealPosition(r,!1,!1),i.debuggerTraceWriter.traceWriter.raiseEvent(333),this._editor.setPosition(r),t&&this._editor.focus(),i.debuggerTraceWriter.traceWriter.raiseEvent(315))},u.prototype.goToLineFromString=function(n){var r=n.split(","),i,t;i=parseInt(r[0],10);r.length>0&&(t=parseInt(r[1],10),isNaN(i)&&!isNaN(t)&&(i=this._editor&&this._editor.getPosition().lineNumber||1));isNaN(i)&&isNaN(t)||(t||(t=0),this.revealRange({startLineNumber:i,startColumn:t,endLineNumber:i,endColumn:t}))},u.prototype.goToLineCol=function(n,t){t===void 0&&(t=0);this.revealRange({startLineNumber:n,startColumn:t,endLineNumber:n,endColumn:t})},u.prototype.adjustInsertionColumn=function(n,t){var r=this._editor&&this._editor.getModel(),i,u;return r&&(i=r.getLineContent(n),i)?(u=i.search(/\S/)+1,Math.max(t,u)):t},u.prototype.breakpointChanged=function(n,t){this._decorationInfos[n.breakpointId]&&(this.breakpointRemoved(n,t),this.breakpointAdded(n))},u.prototype.breakpointAdded=function(n){var t=this,i;n.location&&(this._locationUpdateRegistrations[n.breakpointId]=n.location.changesCompleted.addHandler(function(){var i=t._decorationInfos[n.breakpointId],r;i&&i.editorState&&(t.removeTrackedRange(n.breakpointId),i.editorState.removeDecorationInfo(i),delete t._decorationInfos[n.breakpointId]);r=n.location.startPosition.doc.editorState;r&&(t._decorationInfos[n.breakpointId]=r.addBreakpointDecoration(n),t._trackedRangeMap[n.breakpointId]=r.addTrackedRange(n.location))}),n.location.startPosition&&n.location.startPosition.doc.isOpen&&(i=n.location.startPosition.doc.editorState,i&&i.model&&(this._decorationInfos[n.breakpointId]=i.addBreakpointDecoration(n),this._trackedRangeMap[n.breakpointId]=i.addTrackedRange(n.location),this.updateExecutionDecorations())))},u.prototype.breakpointRemoved=function(n,t){var i,r;t===void 0&&(t=n.breakpointId);t in this._decorationInfos&&(i=this._decorationInfos[t],i&&i.editorState&&i.editorState.removeDecorationInfo(i),this.removeTrackedRange(t),delete this._decorationInfos[t]);r=this._locationUpdateRegistrations[t];r&&(r.unregister(),this._locationUpdateRegistrations[t]=null)},u.prototype.setCursorDecorationLocation=function(n){var i=this.getValidEditorStateFromLocation(n),t;i&&(t=this._decorationInfos[u.IP_CURSOR_ID],t&&t.editorState&&(t.editorState.removeDecorationInfo(t),delete this._decorationInfos[u.IP_CURSOR_ID]),this._decorationInfos[u.IP_CURSOR_ID]=i.displayCursorDecoration(n))},u.prototype.setTextSpotlightDecorationLocation=function(n){var t=this.getValidEditorStateFromLocation(n);t&&(this.hideTextSpotlightDecoration(),this._decorationInfos[u.TEXTSPOTLIGHT_DECORATION_ID]=t.displayTextSpotlightDecoration(n))},u.prototype.hideTextSpotlightDecoration=function(){var n=this._decorationInfos[u.TEXTSPOTLIGHT_DECORATION_ID];n&&n.editorState&&(n.editorState.removeDecorationInfo(n),delete this._decorationInfos[u.TEXTSPOTLIGHT_DECORATION_ID])},u.prototype.conditionPromptInvoked=function(){},u.prototype.tracepointPromptInvoked=function(){},u.prototype.pendingBreakpointAdded=function(n){this._decorationInfos[n.breakpointId]={}},u.prototype.showGoToLinePrompt=function(){this._editor.getAction("editor.actions.gotoLine").run()},u.prototype.onUrlClicked=function(n){var t=this.parseLinkUrl(n);this._debuggerManager.showDocument(t,1,1,null,!0)},u.prototype.parseLinkUrl=function(n){var t=new Common.Uri(n),i=this._documentController.workspaceUriMapper.getExternalUri(t);return i.toString()},u.prototype.isLinkEnabled=function(){this._editor.beginForcedWidgetFocus();var n=this._editor.getAction("editor.contrib.links"),t=n&&n.enabled;return this._editor.endForcedWidgetFocus(),t},u.prototype.openLink=function(){this._editor.focus();var n=this._editor.getAction("editor.contrib.links");n&&n.enabled&&n.run()},u.prototype.setSource=function(n){if(!this.effectiveIsWritable)throw new Error("Editor is not currently writable.");this.updateDisplayedText(this.displayedDoc,n,!0)},u.prototype.save=function(n){var f=this;return i.Telemetry.logCommandWrapper(i.Telemetry.CommandName.EDITOR_SAVE,n,function(){f.requestedIsWritable=!1;var o=f._editor.getValue(),n=f._documentController.currentDoc,e;return Common.Async.tryCatchFinally(f._documentController.editSource(n,o).then(function(i){return t.Utility.Assert.hasValue(i),e=i,n.isRevision(f._documentController.currentDoc)&&(f._displayedDoc=e),f._debuggerManager.documentController.deletePreviewDoc(n.frontendId),e.isPrettyPrintedTextSaved=n.isPrettyPrintedTextSaved||n.prettyPrintEnabled,e.setUnformattedText(o,!1,1)}).then(function(){return r.Promise.join(f._breakpointController.getBreakpoints(n).map(function(n){var t=f._decorationInfos[n.breakpointId].editorState.getNewTrackedRangePosition(f._trackedRangeMap[n.breakpointId]);return f._breakpointController.updateBreakpointAfterSave(n,new i.DocumentLocation(e,t.startLineNumber,t.startColumn))}))}).then(function(){var t=r.Resources.getString("SaveSucceeded"),i=u.EDIT_SUCCEEDED_SHOW_TIMEOUT;n.sourceMap&&(t+="\n"+r.Resources.getString("SourcemapLost"),i*=2);r.F12.ErrorDisplay.show(t,i,"",document.getElementById("hEditorConsoleSplitter"),!0)}),function(t){if(t&&t.name==="SourceEditError"&&t.line>0){var i=t;r.F12.ErrorDisplay.showWithDocUrl(r.Resources.getString("FailedToApplyEditsPrefix")+" "+i.message,0,"",document.getElementById("hEditorConsoleSplitter"),!1,n.url.toString(),i.line,i.column)}else r.F12.ErrorDisplay.show(r.Resources.getString("FailedToApplyEditsPrefix"),0,"",document.getElementById("hEditorConsoleSplitter"),!1)},function(){n.isRevision(f._documentController.currentDoc)&&(f.requestedIsWritable=!0)})})},u.prototype.updateShowDocumentLocation=function(n,t){this._showDocumentLocation&&this._showDocumentLocation.cleanup();this._showDocumentDoc=n;this._showDocumentLocation=new i.DynamicLocation(t.rawLocation,t);this.setCursorDecorationLocation(t)},u.prototype.onModelContentChanged=function(){this._documentController.beginEdit(this._documentController.currentDoc)},u.destroyDocEditorState=function(n){var t=n.editorState;t&&(t.model&&t.model.destroy(),n.editorState=null)},u.prototype.getValidEditorStateFromLocation=function(n){if(n.startPosition&&n.startPosition.doc.isOpen){var t=n.startPosition.doc.editorState;if(t&&t.model)return t}return null},u.prototype.synchronizeIsWritable=function(){var n=this._requestedIsWritable;(!this._displayedDoc||!this._displayedDoc.isEditable||this._displayedDoc.isCommitPending||this._executionController.isExecutionPaused)&&(n=!1);n!==this._effectiveIsWritable&&(this._effectiveIsWritable=n,this._editor&&this._editor.updateOptions({readOnly:!this._effectiveIsWritable}))},u.prototype.updateDisplayedText=function(n,t,r){var s=this._editor.getModel(),e=s?s.getValue():null,u,h,f,c,l,o;if(n.editorState&&n===this._displayedDoc&&(e===null||!n.editorState.model||t.length!==e.length||t!==e)){if(u=n.editorState,h=this.isActive(),u.model){if(f=u.model.getValue(MonacoDefinitions.EndOfLinePreference.LF),t=t.replace(/\r\n/gm,"\n"),f===t)return;if(t.length>f.length&&t.substr(0,f.length)===f){this.appendTextToModel(n,u.model,t.substr(f.length),r);this._debuggerManager.debuggerShell.logOnEditorLoadTelemetry(n,t.length);return}u.model.destroy()}c=n.getMimeTypeCandidates().join(",");i.debuggerTraceWriter.traceWriter.raiseEvent(324);l=new this._monacoNetwork.URL(n.getMonacoUri(this._documentController.workspaceUriMapper).toString());o=Monaco.Editor.createModel(t,c,l);i.debuggerTraceWriter.traceWriter.raiseEvent(325);u.model=o;this._documentController.currentDoc===n&&(this.setEditorModel(o,n),this.updateViewAfterDocumentTextUpdated(n,h));r&&(this._debuggerManager.testEventObject.fireEvent("editorDocumentUpdated",n),this.editorUpdated.invoke(n));this._debuggerManager.debuggerShell.logOnEditorLoadTelemetry(n,t.length)}},u.prototype.appendTextToModel=function(n,t,i,r){var u=this,f=this.wordWrapEnabled;t.change(function(e){var o=t.getLineCount(),s=t.getLineMaxColumn(o);e.insertText({lineNumber:o,column:s},i);u.wordWrapEnabled!==f&&u.propertyChanged.invoke("wordWrapEnabled");r&&u.editorUpdated.invoke(n)})},u.prototype.updateViewAfterDocumentTextUpdated=function(n,t){if(this.refreshDecorations(n),this.updateSelectionAndViewport(n,t),this._documentController.searchProvider.findAndHighlightMatches(),this._exceptionViewZone){var i=this._callstackController.callstacks[0],r=i&&i.instructionPointerFrame&&i.instructionPointerFrame.location;this._exceptionViewZone.moveLocation(n,r)}},u.prototype.updateSelectionAndViewport=function(n,t){var i,r;if(this._currentSelectionLocation&&this._documentController.currentDoc===n){if(i=n.createDocumentLocation(this._currentSelectionLocation.rawLocation.offset,this._currentSelectionLocation.rawLocation.length),i.startPosition)if(this._displayedDoc&&i.startPosition.doc===this._displayedDoc)this.selectRange(i,t);else return}else this._activeFrame&&this._documentController.currentDoc===this._activeFrame.location.startPosition.doc?this.revealRange(this._activeFrame.location):this._instructionPointerFrame&&this._documentController.currentDoc===this._instructionPointerFrame.location.startPosition.doc?this.revealRange(this._instructionPointerFrame.location):(r=this._persistenceManager.getOffsetForDoc(n),r>0&&this.revealPosition(n.createDocumentLocation(r,0),t))},u.prototype.saveLoadedDoc=function(){this._displayedDoc&&this._displayedDoc.editorState&&(i.debuggerTraceWriter.traceWriter.raiseEvent(334),this._displayedDoc.editorState.viewState=this._editor.saveViewState(),i.debuggerTraceWriter.traceWriter.raiseEvent(335))},u.prototype.setEditorModel=function(n,t){t&&(this.requestedIsWritable=t.isEditable&&!t.isCommitPending);var r=this.wordWrapEnabled;i.debuggerTraceWriter.traceWriter.raiseEvent(322);this._editor.setModel(n);this.wordWrapEnabled!==r&&this.propertyChanged.invoke("wordWrapEnabled");i.debuggerTraceWriter.traceWriter.raiseEvent(323)},u.prototype.clearEditorState=function(){var n=this;this._exceptionViewZone&&this._exceptionViewZone.removeFromEditor();this._editor.changeViewZones(function(t){n._setNextStatementViewZoneId&&t.removeZone(n._setNextStatementViewZoneId)});this._displayedDoc=null;this._currentSelectionLocation=null},u.prototype.restoreEditorState=function(n){var r=this,t;n.editorState&&(this._exceptionViewZone&&this._exceptionViewZone.addToEditor(n),this._editor.changeViewZones(function(t){n.editorState.viewZoneSetNextStatement&&(r._setNextStatementViewZoneId=t.addZone(n.editorState.viewZoneSetNextStatement))}),n.editorState.model&&this._documentController.searchProvider.findAndHighlightMatches(),t=this._editorElement.querySelector("textarea.inputarea"),t&&(t.tabIndex=1),n.editorState.viewState&&(i.debuggerTraceWriter.traceWriter.raiseEvent(336),this._editor.restoreViewState(n.editorState.viewState),i.debuggerTraceWriter.traceWriter.raiseEvent(337)),this._dataTips.dataTipsEnabled=n.isRuntimeDoc)},u.prototype.refreshDecorations=function(n){var r,i,t,f;if(n.isOpen&&(r=n.editorState,r&&r.model)){for(i=this._breakpointController.getBreakpoints(n),t=0;t<i.length;t++)f=this._decorationInfos[i[t].breakpointId],f&&f.editorState&&(this.removeTrackedRange(i[t].breakpointId),f.editorState.removeDecorationInfo(f),delete this._decorationInfos[i[t].breakpointId]),this._decorationInfos[i[t].breakpointId]=r.addBreakpointDecoration(i[t]),this._trackedRangeMap[i[t].breakpointId]=r.addTrackedRange(i[t].location);this.updateExecutionDecorations();this._showDocumentDoc&&this._showDocumentDoc===n&&this._showDocumentLocation&&(this.setCursorDecorationLocation(this._showDocumentLocation),this.addChangesCompletedHandler(this._showDocumentLocation,u.IP_CURSOR_ID))}},u.prototype.addChangesCompletedHandler=function(n,t){var i=this;n&&(this._locationUpdateRegistrations[t]=n.changesCompleted.addHandler(function(){var f=i._decorationInfos[t],r;f&&f.editorState&&(f.editorState.removeDecorationInfo(f),delete i._decorationInfos[t]);r=n.startPosition.doc.editorState;r&&(t===u.IP_DECORATION_ID?i._decorationInfos[t]=r.displayInstructionPointerDecoration(n):t===u.ACTIVE_FRAME_DECORATION_ID?i._decorationInfos[t]=r.displayActiveFrameDecoration(n):t===u.IP_CURSOR_ID?i._decorationInfos[t]=r.displayCursorDecoration(n):t===u.TEXTSPOTLIGHT_DECORATION_ID&&(i._decorationInfos[t]=r.displayTextSpotlightDecoration(n)))}))},u.prototype.updateExecutionDecorations=function(){var n=this,r,f,e,t;[u.IP_DECORATION_ID,u.ACTIVE_FRAME_DECORATION_ID].forEach(function(t){var i=n._decorationInfos[t];i&&i.editorState&&(i.editorState.removeDecorationInfo(i),delete n._decorationInfos[t]);n._locationUpdateRegistrations[t]&&(n._locationUpdateRegistrations[t].unregister(),delete n._locationUpdateRegistrations[t])});r=this._instructionPointerFrame&&this._instructionPointerFrame.location.startPosition&&this._instructionPointerFrame.location.startPosition.doc.editorState;r&&(t=this._instructionPointerFrame.location.startPosition.doc.editorState,this._decorationInfos[u.IP_DECORATION_ID]=t.displayInstructionPointerDecoration(this._instructionPointerFrame.location),this.addChangesCompletedHandler(this._instructionPointerFrame.location,u.IP_DECORATION_ID));f=this._instructionPointerFrame&&this._activeFrame?!i.DocumentLocation.areEqual(this._activeFrame.location,this._instructionPointerFrame.location):!0;e=this._activeFrame&&this._activeFrame.location.startPosition&&this._activeFrame.location.startPosition.doc.editorState;f&&e&&(t=this._activeFrame.location.startPosition.doc.editorState,this._decorationInfos[u.ACTIVE_FRAME_DECORATION_ID]=t.displayActiveFrameDecoration(this._activeFrame.location),this.addChangesCompletedHandler(this._activeFrame.location,u.ACTIVE_FRAME_DECORATION_ID))},u.prototype.showContextMenu=function(n){var e=this,s;if(this._editorContextMenu.hide(),r.Tooltip.dismiss(),this._documentController.currentDoc){var o=null,h=0,c=0,t=null;n&&(o=n.target.type===MonacoDefinitions.MouseTargetType.GUTTER_GLYPH_MARGIN||n.target.type===MonacoDefinitions.MouseTargetType.GUTTER_LINE_NUMBERS,h=n.event.posx,c=n.event.posy,t=n.target.position);t?(s=this.getEditorSelection(),s&&s.containsPosition(t)||(this.editorPosition=t)):t=this.editorPosition;var f=new i.DocumentLocation(this._documentController.currentDoc,t.lineNumber,t.column),l=!0,a=null,y=new r.Promise(function(n){e._executionController.canSetNextStatement(f).then(function(t){l=t;n()})}),v;v=o||!this._documentController.currentDoc.isRuntimeDoc?Common.PromiseUtilities.EmptyPromise:new r.Promise(function(n){var t=e.adjustInsertionColumn(f.lineNumber,f.column),r=new i.DocumentLocation(f.startPosition.doc,f.lineNumber,t);e._breakpointController.getBreakpointAtLocation(r).then(function(t){a=t;n()})});r.Promise.timeout(u.CONTEXTMENU_SHOW_TIMEOUT,r.Promise.join([y,v])).then(function(){},function(){}).done(function(){e._editorContextMenu.show(h,c,l,a,t,o)})}n&&(n.event.preventDefault(),n.event.stopPropagation())},u.prototype.setupControls=function(){var n=this;this._editor.addListener("mousedown",function(t){var r,u,f;if(t.event.leftButton&&(n._editorContextMenu.hide(),t.target.type===MonacoDefinitions.MouseTargetType.GUTTER_GLYPH_MARGIN||t.target.type===MonacoDefinitions.MouseTargetType.GUTTER_LINE_NUMBERS)){var e=t.target.position.lineNumber,i=t.target.range?t.target.range.startColumn:t.target.position.column,o=t.target.range?t.target.range.endColumn:undefined;i===0&&(r=n._editor.getModel(),r&&(u=r.getLineContent(e),u&&(f=u.match(/^\s*/),f.length>0&&(i=f[0].length+1))));n.toggleBreakpoint(0,e,i,o,!0)}});this._editor.addListener("contextMenu",function(t){n.showContextMenu(t)});this._editor.addListener("selectionChanged",function(t){var r=t.selection;n._currentSelectionLocation=new i.DocumentLocation(n.displayedDoc,r.startLineNumber,r.startColumn,n.displayedDoc,r.endLineNumber,r.endColumn);n._documentController.currentDoc&&n._persistenceManager.updateEditorPosition(n.getCurrentOffset())});document.addEventListener("keydown",function(t){return n.onKeyDown(t)});r.F12.addEventListener("keydown",function(t){return n.onKeyDown(t)});this._editor.getHandlerService().bind({key:"Shift-F10"},function(){return n.showContextMenu(),!0})},u.prototype.onKeyDown=function(n){var r=!1,t,u;return(this._documentController.currentDoc&&this._editor.getModel()&&(this._persistenceManager.updateEditorPosition(this.getCurrentOffset()),(n.keyCode!==120||n.ctrlKey||n.shiftKey||n.altKey)&&(n.keyCode!==66||!n.ctrlKey||n.shiftKey||n.altKey)?n.keyCode!==120||n.ctrlKey||n.shiftKey||!n.altKey?n.keyCode!==120||!n.ctrlKey||n.shiftKey||n.altKey?n.keyCode===121&&n.ctrlKey&&n.shiftKey&&!n.altKey?(this._executionController.isExecutionPaused&&(t=this._editor.getPosition(),this._executionController.setNextStatement(new i.DocumentLocation(this._documentController.currentDoc,t.lineNumber,t.column),1)),r=!0):n.keyCode!==121||!n.ctrlKey||n.shiftKey||n.altKey?n.keyCode!==69||!n.ctrlKey||n.altKey||n.shiftKey?n.keyCode!==68||!n.ctrlKey||n.shiftKey||n.altKey?n.keyCode===68&&n.ctrlKey&&n.shiftKey&&!n.altKey?(this._languageServiceController.findReferences(1),r=!0):n.keyCode!==83||!n.ctrlKey||n.shiftKey||n.altKey||(this.effectiveIsWritable?(this.save(1).done(),r=!0):this._displayedDoc.isNormallyEditable&&(this._displayedDoc.isLastRevision?this._debuggerManager.executionController.isExecutionPaused?i.DebuggerShell.showErrorDisplay("CannotSaveExecutionPaused"):this._displayedDoc.prettyPrintState===0&&i.DebuggerShell.showErrorDisplay("CannotSavePrettyPrintOn"):i.DebuggerShell.showErrorDisplay("CannotSavePreviewDoc"))):(this._languageServiceController.goToDefinition(1),r=!0):(i.Telemetry.analytics.logExecuteCommand(i.Telemetry.CommandName.FOCUS_TO_EDITOR,1),u=this.editorPosition,u&&this.revealPosition(u),r=!0):(this._executionController.isExecutionPaused&&(t=this._editor.getPosition(),this._executionController.runToCursor(this._documentController.currentDoc,t,1)),r=!0):(t=this._editor.getPosition(),this.setBreakpointState(t.lineNumber,t.column,1),r=!0):(t=this._editor.getPosition(),this.setBreakpointCondition(t.lineNumber,t.column),r=!0):(t=this._editor.getPosition(),this.toggleBreakpoint(1,t.lineNumber,t.column),r=!0)),r)?(n.preventDefault(),n.stopImmediatePropagation(),!1):!0},u.prototype.getCurrentOffset=function(){var n,t;return this._displayedDoc?(n=this._editor&&this._editor.getPosition(),n)?(t={doc:this._displayedDoc,line:n.lineNumber,column:n.column},this._displayedDoc.getRawLocation(t).offset):0:0},u.prototype.toggleBreakpoint=function(n,r,u,f,e){var o=this;i.Telemetry.logCommandWrapper(i.Telemetry.CommandName.TOGGLE_BREAKPOINT_IN_EDITOR,n,function(){var n=o._documentController.currentDoc,s,h;n&&(n.canEditBreakpoints?(t.Utility.Assert.hasValue(n.editorState,"toggleBreakpoint for an invalid document"),s=o.adjustInsertionColumn(r,u),h=new i.DocumentLocation(n,r,s,n,r,f||s),e?o._breakpointController.addOrRemoveAllBreakpointsAtLocation(h):o._breakpointController.addOrRemoveBreakpointAtLocation(h)):o.showBreakpointsErrorMessage(n))})},u.prototype.setBreakpointCondition=function(n,r){var f=this,u=this._documentController.currentDoc;u&&(u.canEditBreakpoints?(t.Utility.Assert.hasValue(u&&u.editorState,"setBreakpointCondition for an invalid document"),this._breakpointController.getBreakpointAtLocation(new i.DocumentLocation(u,n,r)).done(function(n){n&&f._breakpointController.promptToModifyConditionOrTracepoint(n,i.Telemetry.CommandName.SET_CONDITION_IN_EDITOR,1)})):this.showBreakpointsErrorMessage(u))},u.prototype.setBreakpointState=function(n,r,u){var f=this;i.Telemetry.logCommandWrapper(i.Telemetry.CommandName.SET_BREAKPOINT_STATE_IN_EDITOR,u,function(){var u=f._documentController.currentDoc;u&&(u.canEditBreakpoints?(t.Utility.Assert.hasValue(u&&u.editorState,"setBreakpointState for an invalid document"),f._breakpointController.getBreakpointAtLocation(new i.DocumentLocation(u,n,r)).done(function(n){n&&f._breakpointController.setEnabledState(n,!n.isEnabled)})):f.showBreakpointsErrorMessage(u))})},u.prototype.showBreakpointsErrorMessage=function(n){n.isEditPending?i.DebuggerShell.showErrorDisplay("CannotEditBkpsEditsPending"):n.isLastRevision||i.DebuggerShell.showErrorDisplay("CannotEditBkpsPreviewDoc")},u.prototype.onMouseMove=function(n){var o=this,f;if(this.clearTooltip(),n.target.range){var u=n.target.range.startLineNumber,s=n.target.range.startColumn,h=n.target.range.endColumn,e=this._editor.getLineDecorations(u),c=this._editor.getModel().getLineMaxColumn(u);for(f=0;f<e.length;f++){var t=e[f],l=t.range.startLineNumber===u?t.range.startColumn:1,a=t.range.endLineNumber===u?t.range.endColumn:c;if(l<=s&&h<=a&&t.options.inlineClassName&&t.options.inlineClassName.indexOf("detected-link")>=0){this._pendingTooltip=window.setTimeout(function(){if(!o.contextMenu.isShowing){var n=r.Resources.getString("EditorTooltipOpenLink");r.Tooltip.show({content:n})}},i.DataTips.DATATIP_SHOW_TIME);break}}}},u.prototype.clearTooltip=function(){r.Tooltip.dismiss();this._pendingTooltip&&(window.clearTimeout(this._pendingTooltip),this._pendingTooltip=null)},u.prototype.removeTrackedRange=function(n){t.Utility.Assert.isTrue(n in this._decorationInfos,"Delete breakpointId from this._decorationInfos[] only after removing from tracked ranges");this._decorationInfos[n].editorState&&this._trackedRangeMap[n]&&(this._decorationInfos[n].editorState.removeTrackedRange(this._trackedRangeMap[n]),delete this._trackedRangeMap[n])},u.WRAPPING_COLUMN=300,u.CONTEXTMENU_SHOW_TIMEOUT=100,u.EDIT_SUCCEEDED_SHOW_TIMEOUT=1500,u.TEXTSPOTLIGHT_DECORATION_ID="Decoration:TextSpotlight",u.IP_DECORATION_ID="Decoration:InstructionPointer",u.IP_CURSOR_ID="Decoration:Cursor",u.EXCEPTION_DECORATION_ID="Decoration:ExceptionOverlay",u.ACTIVE_FRAME_DECORATION_ID="Decoration:ActiveFrame",u.BP_DECORATION_PREFIX="Decoration:Breakpoint:",u}();i.EditorWindow=u})(i=t.Debugger||(t.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var i=Microsoft.Plugin,t=function(){function t(){var n=this;this._rootElement=document.createElement("div");this._rootElement.className="resourceHandler";require(["vs/editor/contrib/diffNavigator/diffNavigator"],function(t){n._monacoDiffNav=t});window.addEventListener("resize",function(){n._diffEditor&&n._diffEditor.layout()})}return Object.defineProperty(t.prototype,"rootElement",{get:function(){return this._rootElement},enumerable:!0,configurable:!0}),t.prototype.doLayout=function(){this._diffEditor.layout()},t.prototype.openDiff=function(t){var i=this,r;return this._diffEditor||this.initialize(),t.editorState||(t.editorState=new n.DiffEditorState(t)),r=this._displayedDiff===t,this._displayedDiff=t,t.editorState.refresh().then(function(n){t===i._displayedDiff&&(!r||n)&&i._diffEditor.setModel(t.editorState.diffModel)})},t.prototype.closeDiff=function(n){this._displayedDiff===n&&(this._diffEditor.setModel(null),this._displayedDiff=null);n.editorState.destroy();n.editorState=null},t.prototype.initialize=function(){this._diffEditor=Monaco.Editor.createDiffEditor(this._rootElement,{readOnly:!0,scrollbar:{vertical:"visible",horizontal:"visible",useShadows:!1,verticalHasArrows:!0,horizontalHasArrows:!0,handleMouseWheel:!0,verticalScrollbarSize:17,horizontalScrollbarSize:17,arrowSize:30},glyphMargin:!0});this._diffNavigator=new this._monacoDiffNav.DiffNavigator(this._diffEditor)},t}();n.DocDiffWindow=t})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var i=Microsoft.Plugin,t=function(){function n(n){this._docDiff=n}return Object.defineProperty(n.prototype,"diffModel",{get:function(){return this._diffModel},enumerable:!0,configurable:!0}),n.prototype.refresh=function(){var n=this;return this._docDiff.texts.then(function(t){var i=!1,r=n._docDiff.doc.getMimeTypeCandidates().join(",");return n._diffModel||(n._diffModel={}),n._diffModel.original&&t.original===n._diffModel.original.getValue()||(n._diffModel.original&&n._diffModel.original.destroy(),n._diffModel.original=Monaco.Editor.createModel(t.original,r),i=!0),n._diffModel.modified&&t.modified===n._diffModel.modified.getValue()||(n.diffModel.modified&&n.diffModel.modified.destroy(),n._diffModel.modified=Monaco.Editor.createModel(t.modified,r),i=!0),i})},n.prototype.destroy=function(){this._diffModel.original&&this._diffModel.original.destroy();this._diffModel.modified&&this._diffModel.modified.destroy();this._diffModel=null},n}();n.DiffEditorState=t})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(t,i,r,u){var f=this,e;this._editor=u;e=r.getTrimmedRange(t);this.exceptionViewZone={afterLineNumber:e.endLineNumber,afterColumn:e.endColumn,heightInLines:1,domNode:n.makeDomNode(i)};this.id=n.NO_ZONE_ID;this.location=t.copy();this.message=i;this._listenerRegistration=this.location.changesCompleted.addHandler(function(){f.moveLocation(f.location.startPosition.doc,f.location)})}return n.prototype.cleanUp=function(){this.id!==n.NO_ZONE_ID&&this.removeFromEditor();this._listenerRegistration&&this._listenerRegistration.unregister();this.location&&this.location.cleanup()},n.prototype.removeFromEditor=function(){var t=this;this.id!==n.NO_ZONE_ID&&this._editor.changeViewZones(function(i){i.removeZone(t.id);t.id=n.NO_ZONE_ID})},n.prototype.addToEditor=function(t){var i=this;this.id===n.NO_ZONE_ID&&this.location.startPosition&&this.location.startPosition.doc===t&&this._editor.changeViewZones(function(t){var r={afterLineNumber:i.exceptionViewZone.afterLineNumber,afterColumn:i.exceptionViewZone.afterColumn,heightInLines:1,domNode:n.makeDomNode(i.message)};i.exceptionViewZone=r;i.id=t.addZone(i.exceptionViewZone)})},n.prototype.moveLocation=function(n,t){var i,r;this.location.startPosition&&this.location.startPosition.doc===n&&n.isOpen&&(i=n.editorState,this.removeFromEditor(),i&&t&&(r=i.getTrimmedRange(t),this.exceptionViewZone.afterLineNumber=r.endLineNumber),this.addToEditor(n))},n.makeDomNode=function(n){var t=document.createElement("div"),i=document.createElement("div");return i.className="exceptionGlyph",t.appendChild(i),t.appendChild(document.createTextNode(n)),t.className="exceptionViewZone",t.id="exceptionViewZone",new Common.CutCopyPasteContextMenu(t),t},n.NO_ZONE_ID=-1,n}();n.ExceptionViewZone=t})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(n,t,i){this._editor=n;this._editorWindow=t;this._debuggerManager=i;this.setupDataTipEvents()}return Object.defineProperty(i.prototype,"dataTipsEnabled",{get:function(){return this._dataTipsEnabled},set:function(n){this._dataTipsEnabled=n;this._dataTipsEnabled||this.hideImmediately(!1)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"watchController",{get:function(){return this._watchWindowController},enumerable:!0,configurable:!0}),i.couldHaveSideEffects=function(n){var t=n.replace(/[\s]/,"");return t.indexOf("++")>0||t.indexOf("--")>0?!0:t.match("[^=!<>]=[^=]")?!0:t.match(/[\]\)\$}\w\d]\(/)?!0:!1},i.prototype.hideAfterDelay=function(){var n=this;this._dataTipVisible&&!this._hideDataTipTimeoutToken&&(this._hideDataTipTimeoutToken=setTimeout(function(){return n.hideImmediately(!0)},i.DATATIP_DISMISS_TIME))},i.prototype.hideImmediately=function(n){n||this.cancelPendingDataTip();this.dismissElement();this.cancelPendingHide()},i.prototype.showAfterDelay=function(n,r,u){var f=this,e;this.cancelPendingDataTip();e=this.getTokenInfo(u);e&&(this._dataTipVisible&&this.areTokensEqual(e,this._lastTokenInfo)?this.cancelPendingHide():(this._showDataTipDelay=t.Promise.timeout(this._dataTipVisible?i.DATATIP_DISMISS_TIME:i.DATATIP_SHOW_TIME),this._showDataTipDelay.then(function(){f._positionLeft=n;f._positionTop=r+10;f._showDataTipDelay=null;var t=f.isPositionInWhitespace(u);t&&u.column>1&&(u.column-=1,t=f.isPositionInWhitespace(u));t?f._lastTokenInfo=null:(f.showImmediately(u),f._lastTokenInfo=e)})))},i.prototype.showImmediately=function(t){var i,u,r;if(n.debuggerTraceWriter.traceWriter.raiseEvent(338),document.body.addEventListener("click",this._handleGlobalClick),document.body.addEventListener("keypress",this._handleGlobalKeypress),i=this._editor.getSelection(),i&&!i.isEmpty()&&i.containsPosition(t)){if(u=this._editor.getModel(),u){var f=u.getValueInRange(i).trim(),e=this._debuggerManager.documentController.currentDoc,o=e.sourceMapContainsLocalVariablesMapping()?e.getGeneratedIdentifierName(f):null;this.displayElement(o||f,f)}}else r=this.parseExpression(t),this.displayElement(r.evalText||r.text,r.text);n.debuggerTraceWriter.traceWriter.raiseEvent(339)},i.prototype.parseExpression=function(n){var r=this.getTokenInfo(n),t,f,u,e,o,s;return r?(t=r.token.type,f=this._editor.getModel(),!f)?i.NO_RESULT:(u=f.getLineContent(r.lineNumber).substring(r.startColumn-1,r.endColumn-1),t.lastIndexOf(".html")>=0||t.lastIndexOf(".css")>=0)?i.NO_RESULT:t.lastIndexOf(".js")>=0&&((t=t.substr(0,t.length-3),t==="key"||t.indexOf("comment")>=0)||t==="delimiter"&&u!=="."||t==="string"||t==="number"||t.indexOf("keyword")>=0&&(u==="null"||u==="true"||u==="false"||u==="debugger"))?i.NO_RESULT:(e=this.calculateEntireToken(f.getLineContent(n.lineNumber),r,n),o=this._debuggerManager.documentController.currentDoc,o.isAuthored&&(s=o.getGeneratedIdentifierName(e.text),e.evalText=s,s===null))?i.NO_RESULT:e:i.NO_RESULT},i.prototype.setupDataTipEvents=function(){var i=this;require(["require","vs/base/lib/winjs.base","vs/editor/core/constants","vs/editor/core/range","vs/editor/editor"],function(r){var u=r("vs/editor/core/constants"),f;i._range=r("vs/editor/core/range").Range;f=r("vs/editor/editor");i._dataTipElement=document.getElementById("dataTipElement");i._dataTipElement.style.display="none";i._dataTipElement.setAttribute("aria-hidden","true");i._innerContainer=document.createElement("div");i._innerContainer.className="popoverInnerContainer";i._dataTipElement.appendChild(i._innerContainer);i._watchWindowController=new n.WatchWindowController(i._debuggerManager,!0);i._watchWindowView=new n.WatchWindowView(i._watchWindowController,i._innerContainer,function(){return i.redrawCallback()});i._watchWindowController.view=i._watchWindowView;i._addToWatchesLink=document.createElement("a");i._addToWatchesLink.setAttribute("href","");i._addToWatchesLink.id="addToWatchesLink";i._addToWatchesLink.innerText=t.Resources.getString("AddToWatchesWindowLink");i._innerContainer.appendChild(i._addToWatchesLink);i._dataTipElement.addEventListener("mouseenter",function(){return i.abortPendingActions()});i._dataTipElement.addEventListener("mouseover",function(){return i.abortPendingActions()});i._dataTipElement.addEventListener("mouseleave",function(){return i.hideImmediately()});i._editor.addListener(u.EventType.MouseMove,function(n){return i.handleMouseMove(n,f)});i._editor.addListener(u.EventType.KeyDown,function(){return i.hideImmediately()});i._editor.addListener(u.EventType.ModelChanged,function(){return i.hideImmediately()});i._editor.addListener(u.EventType.CursorSelectionChanged,function(){return i.hideImmediately()});i._editor.addListener("scroll",function(){return i.hideImmediately()});i._handleGlobalClick=function(n){i._dataTipElement.contains(n.target)||i.hideImmediately()};i._handleGlobalKeypress=function(n){n.key==="Esc"&&i.hideImmediately()}})},i.prototype.isPositionInWhitespace=function(n){var t,r=this._editor.getModel();return r?(t=r.getLineContent(n.lineNumber),i.WHITESPACE_REGEX.test(t.charAt(n.column-1))):!0},i.prototype.areTokensEqual=function(n,t){return!n||!t?!1:n.lineNumber===t.lineNumber&&n.startColumn===t.startColumn&&n.endColumn===t.endColumn},i.prototype.cancelPendingDataTip=function(){this._showDataTipDelay&&(this._showDataTipDelay.cancel(),this._showDataTipDelay=null)},i.prototype.cancelPendingHide=function(){this._hideDataTipTimeoutToken!==null&&(clearTimeout(this._hideDataTipTimeoutToken),this._hideDataTipTimeoutToken=null)},i.prototype.abortPendingActions=function(){this.cancelPendingHide();this.cancelPendingDataTip();return},i.prototype.handleMouseMove=function(n,t){if(this.hideAfterDelay(),this.cancelPendingDataTip(),this._dataTipsEnabled&&this._debuggerManager.executionController.isExecutionPaused&&!this._editorWindow.contextMenu.isShowing){var i=n.target.type;i===t.MouseTargetType.CONTENT_TEXT&&this.showAfterDelay(n.event.posx,n.event.posy,n.target.position)}},i.prototype.displayElement=function(n,t){var i=this;if(t===void 0&&(t=n),this.abortPendingActions(),n){if(n=n.trim(),this._dataTipVisible&&this.hideImmediately(!0),n.length===0)return;this._addToWatchesLink.onclick=function(){return i._debuggerManager.watchController.addWatch(n,0),!1};this._watchWindowController.setViewState(!0);this._watchWindowController.addWatch(n,3,t).then(function(n){n||i.hideImmediately()});this._dataTipElement.style.display="block";this._dataTipElement.setAttribute("aria-hidden","false");this._dataTipVisible=!0;this.redrawCallback()}},i.prototype.redrawCallback=function(){var r,u;if(this._dataTipVisible){var e=i.MIN_TOP+i.EDGE_PADDING,f=Math.min(document.body.clientHeight,this._debuggerManager.debuggerShell.getConsoleTop())-i.EDGE_PADDING,h=i.EDGE_PADDING,o=document.body.offsetWidth-i.EDGE_PADDING,s=this._watchWindowView.getActualHeight()+i.WINDOW_VERTICAL_PADDING,c=f-e,n=Math.min(s,c,i.MAX_HEIGHT),t=i.WINDOW_BASIC_WIDTH;n<s&&(t+=i.WINDOW_SCROLLBAR_WIDTH);r=this._positionTop;u=this._positionLeft;r+n>f&&(r=Math.max(e,f-n));u+t>o&&(u=Math.max(h,o-t));this._dataTipElement.style.height=n+"px";this._dataTipElement.style.width=t+"px";this._dataTipElement.style.top=r+"px";this._dataTipElement.style.left=u+"px";this._watchWindowController.layout()}},i.prototype.dismissElement=function(){document.body.removeEventListener("click",this._handleGlobalClick);document.body.removeEventListener("keypress",this._handleGlobalKeypress);this._hideDataTipTimeoutToken=null;this._dataTipVisible=!1;this._dataTipElement&&(this._dataTipElement.style.display="none",this._dataTipElement.setAttribute("aria-hidden","true"));this._watchWindowController&&(this._watchWindowController.deleteAll(3),this._watchWindowController.setViewState(!1))},i.prototype.getTokenInfo=function(n){var t=null,i=this._editor.getModel();return i&&i.tokenIterator(n,function(n){t=n.next()}),t},i.prototype.calculateEntireToken=function(n,t,r){var f=t.startColumn,u,e;return f>0&&(f=this.findEarlierStart(f,n,r)),u=n.substr(f-1,t.endColumn-f).trim(),u.charAt(u.length-1)==="."&&(u=u.substring(0,u.length-1)),e=i.couldHaveSideEffects(u),e&&(u=""),{text:u,range:new this._range(t.lineNumber,t.startColumn,t.lineNumber,t.endColumn)}},i.prototype.findEarlierStart=function(n,t,i){var u=this._editor.getModel(),r;return u&&(r=-1,u.tokenIterator(i,function(n){var e=0,t,f,o;for(n.hasPrev()&&(t=n.prev(),(t.token.type.indexOf("delimiter.array.")===0||t.token.type.indexOf("delimiter.parenthesis.")===0||t.token.type.indexOf("delimiter.bracket.")===0)&&(e=t.token.bracket));n.hasPrev()&&r===-1;){if(t=n.prev(),t.lineNumber!==i.lineNumber){r=1;break}if(f=u.getValueInRange({startColumn:t.startColumn,startLineNumber:t.lineNumber,endColumn:t.endColumn,endLineNumber:t.lineNumber}),t.token.type.indexOf("delimiter.array.")===0||t.token.type.indexOf("delimiter.parenthesis.")===0||t.token.type.indexOf("delimiter.bracket.")===0){e+=t.token.bracket;e>0&&(r=t.endColumn);continue}if(e===0&&(t.token.type.indexOf("delimiter.")!==0||f!==".")&&t.token.type.indexOf("string.")!==0)if(t.token.type.indexOf("identifier.")===0&&f.trim().length>0){if(o=f.length,f=f.trim(),f.length!==o&&(r=t.startColumn+(o-f.length)),!f.match(/^[\w\d\$]+$/i))break}else if(t.token.type.indexOf("keyword.")===0&&f.trim()==="this"){r=t.startColumn;break}else r=t.endColumn}}),r>=0)?r:n},i.WHITESPACE_REGEX=new RegExp("\\s"),i.NO_RESULT={text:"",range:null},i.MIN_TOP=30,i.EDGE_PADDING=10,i.WINDOW_VERTICAL_PADDING=38,i.MAX_HEIGHT=300+i.WINDOW_VERTICAL_PADDING,i.WINDOW_SCROLLBAR_WIDTH=24,i.WINDOW_BASIC_WIDTH=8+n.WatchWindowView.TWO_COLUMN_WIDTH+i.WINDOW_SCROLLBAR_WIDTH,i.DATATIP_SHOW_TIME=t.F12.getDoubleClickTime()*.2,i.DATATIP_DISMISS_TIME=t.F12.getDoubleClickTime()*1.5,i}();n.DataTips=i})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function r(n,u,f){var e=this,o;this._pendingResize=null;this._buttonElement=u;this._container=n;this._container.setAttribute("disabled","true");this._debuggerShell=f;o=this._debuggerShell.debuggerManager&&this._debuggerShell.debuggerManager.resourceViewController;o&&(this._onSelectCallback=function(n){o.open(n,{activation:2})});u.setAttribute("data-plugin-vs-tooltip",i.Resources.getString("FilePickerTooltip"));u.setAttribute("aria-label",i.Resources.getString("FilePickerTooltip"));u.setAttribute("aria-expanded","false");u.setAttribute("aria-controls","filePickerMenu");this._fileItemsMap=[];this._rootNodesMap=[];this._resourceRootNodes=new Map;this._expandedItemMap=[];this._filterDynamicFolders=[];this._filterMap=[];this._scalingFactor=screen.deviceXDPI/screen.logicalXDPI;this._filterRegex="";this._currentFilter="";this._copyStart=0;this._copyEnd=0;this._isFilterEnabled=!1;this._rowHeight=0;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=i.Resources.getString("TypeToFilterWatermark");this._filterBox.setAttribute("aria-label",i.Resources.getString("TypeToFilterWatermark"));this._filterBox.setAttribute("data-plugin-vs-tooltip",i.Resources.getString("TypeToFilterWatermark"));this._filterNoResults=document.createElement("div");this._filterNoResults.innerText=i.Resources.getString("/Common/DOMExplorerComputedStylesNoResultsMessage");this._filterNoResults.classList.add("noResults");this._filterNoResults.style.display="none";this._filterBox.addEventListener("mouseup",function(){window.setImmediate(function(){e.filterList()})});this._filterBox.addEventListener("keyup",function(n){return e.onKeyUp(n)});this._contextMenu=new Common.CutCopyPasteContextMenu(this._filterBox,this.filterList.bind(this));this._fileListContainer=document.createElement("div");this._fileListContainer.classList.add("fileListContainer");this._fileListContainer.id="fileListContainer";n.appendChild(this._filterBox);n.appendChild(this._fileListContainer);n.appendChild(this._filterNoResults);this._treeView=new Common.ObjectView.ObjectTreeView(this._fileListContainer,function(n){return e.onListViewToggle(n)},null,null,function(n,i,u,f){if(f===0){if(!n.model)return;t.Telemetry.analytics.logExecuteCommand(t.Telemetry.CommandName.OPEN_RESOURCE_VIEW,0);n.additionalClass=Common.CssUtilities.addClasses(n.additionalClass,r.OPENED_DOCUMENT_CLASS);e._onSelectCallback(n.model);window.setImmediate(function(){e.hidePicker()})}});this._treeView.scrollPadding=100;this._treeView.notifyToggleCallback=function(){e.refreshViewWithCallback()};this._treeView.setFilter(this.returnAllItemsCallback);this._container.addEventListener("keydown",function(n){return e.onKeyDown(n)});this._buttonElement.addEventListener("click",function(n){return e._buttonElement.classList.contains("activated")?(t.Telemetry.analytics.logExecuteCommand(t.Telemetry.CommandName.FILEPICKER_MENU_CLOSE,0),e.hidePicker()):(t.Telemetry.analytics.logExecuteCommand(t.Telemetry.CommandName.FILEPICKER_MENU_OPEN,0),window.setImmediate(function(){return e.showPicker()})),n.stopImmediatePropagation(),!0});this._buttonElement.addEventListener("keydown",function(n){return n.keyCode===13||n.keyCode===32||n.keyCode===40&&n.ctrlKey&&!n.altKey||n.keyCode===40&&!n.ctrlKey&&n.altKey?(t.Telemetry.analytics.logExecuteCommand(t.Telemetry.CommandName.FILEPICKER_MENU_OPEN,1),window.setImmediate(function(){return e.showPicker()}),!1):!0});this._buttonElement.addEventListener("DOMAttrModified",function(n){e._ignoreReintrantExpand||n.attrName==="aria-expanded"&&(n.newValue==="true"?e.showPicker():e.hidePicker());e._ignoreReintrantExpand=!1});this._focusOutListener=function(n){return n.target!==document.activeElement||e._contextMenu.isActive||e.hidePicker(),!1};this._documentClickListener=function(n){return n.target===e._container||e._container.contains(n.target)||n.target===e._buttonElement||window.setImmediate(function(){e.hidePicker()}),!1};this._documentKeydownListener=function(n){if(n.keyCode===27)return t.Telemetry.analytics.logExecuteCommand(t.Telemetry.CommandName.FILEPICKER_MENU_CLOSE,1),e.hidePicker(),n.stopImmediatePropagation(),n.preventDefault(),!1};this._buttonElement.addEventListener("focusout",function(n){return n.stopPropagation(),!1});i.F12.addEventListener("browsershortcut",function(n){return e.onKeyDown(n)});i.F12.addEventListener("keydown",function(n){return e.onKeyDown(n)})}return Object.defineProperty(r.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"rootNodes",{get:function(){return this._rootNodesMap},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"scaledBottomPadding",{get:function(){return this._scalingFactor*r.BOTTOM_PADDING},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"scaledRightPadding",{get:function(){return this._scalingFactor*r.RIGHT_PADDING},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"scaledScrollbarPadding",{get:function(){return this._scalingFactor*r.SCROLLBAR_PADDING},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"scaledInnerPadding",{get:function(){return this._scalingFactor*r.INNER_PADDING},enumerable:!0,configurable:!0}),r.prototype.resourceAdded=function(n,i){var r,u,f,e;if(n instanceof t.Doc){if(r=n,r.isRuntimeDoc&&r.isDynamicCode&&(u="browsertools://browsertools.{0}.js",n.modelName.indexOf(u.replace("{0}","library"))!==-1||n.modelName.indexOf(u.replace("{0}","performance"))!==-1||n.modelName.indexOf(u.replace("{0}","console"))!==-1))return;this.documentAdded(r,i)}else f=this._resourceRootNodes.get(n.modelName),f&&(e=new t.FilePickerItem(n),f.addChild(e),this.insertAtSortedPosition(e,f))},r.prototype.resourceRemoved=function(n){var i,r;this._fileItemsMap[n.id]&&(i=this._fileItemsMap[n.id],delete this._fileItemsMap[n.id],this._rootNodesMap[n.id]&&delete this._rootNodesMap[n.id],i instanceof t.DocFilePickerItem?this.documentRemoved(i):(r=this._resourceRootNodes.get(n.modelName),r&&r.removeChild(i)),this._treeView.removeItem(i),this.scheduleResize())},r.prototype.resourceOpened=function(n){var t=this._fileItemsMap[n.id];t&&(t.additionalClass=Common.CssUtilities.addClasses(t.additionalClass,r.OPENED_DOCUMENT_CLASS))},r.prototype.resourceClosed=function(n){var t=this._fileItemsMap[n.id];t&&(t.additionalClass=Common.CssUtilities.removeClasses(t.additionalClass,r.OPENED_DOCUMENT_CLASS));this._treeView.refresh()},r.prototype.documentUpdated=function(n,t){t&&this.refreshItem(n)},r.prototype.documentUrlChanged=function(n){var t=n.parent&&this._fileItemsMap[n.parent.frontendId],i;t&&(i=this._fileItemsMap[n.frontendId],i&&(t.updateChildDisplayName(i),t.refresh()));this.refreshItem(n)},r.prototype.documentAsLibraryStateChanged=function(n){var i=this._fileItemsMap[n.frontendId],r;i&&(r=n.isLibraryFile,i.setButtonCheckState(t.DocFilePickerItem.JMC_BUTTON_INDEX,r),this._treeView.setButtonState(i,t.DocFilePickerItem.JMC_BUTTON_INDEX,!0,r),this.refreshItem(n))},r.prototype.doLayout=function(){this.resizePicker()},r.prototype.showPicker=function(){if(this._isOpen){this._filterBox.focus();this._filterBox.setSelectionRange(0,this._filterBox.value.length);return}this._editorDimensions=this._debuggerShell.getEditorDimensions();this._finalHeight=0;this._finalWidth=0;this._container.removeAttribute("disabled");this._container.style.display="block";this._container.style.zIndex="1000";this._buttonElement.classList.add("activated");this._ignoreReintrantExpand=!0;this._buttonElement.setAttribute("aria-expanded","true");this._isOpen=!0;for(var n in this._rootNodesMap)this._expandedItemMap[this._rootNodesMap[n].modelId]=!0;this.repopulateTree();this._isFilterEnabled?this.setFilter(this._filterBox.value):(this.refreshViewWithCallback(),this._filterBox.focus(),this._filterBox.setSelectionRange(0,this._filterBox.value.length));this._lastSelectedItem&&this._treeView.selectItem(this._lastSelectedItem,!1);document.addEventListener("focusout",this._focusOutListener,!0);document.addEventListener("mousedown",this._documentClickListener,!0);document.addEventListener("keydown",this._documentKeydownListener,!0)},r.prototype.hidePicker=function(){this._isOpen&&(this._lastSelectedItem=this._treeView.getSelectedItem()||this._treeView.getItemAt(0),this._lastSelectedItem&&this._lastSelectedItem instanceof t.DocFilePickerItem&&this._lastSelectedItem.doc.isDynamicCode&&(this._lastSelectedItem=this._treeView.getItemAt(0)),this.saveExpandState(),this._treeView.clear(),this.restoreList(),this._buttonElement.classList.remove("activated"),this._ignoreReintrantExpand=!0,this._buttonElement.setAttribute("aria-expanded","false"),this._container.style.display="none",this._container.style.zIndex="-1000",this._container.setAttribute("disabled","true"),this._isOpen=!1,document.removeEventListener("focusout",this._focusOutListener,!0),document.removeEventListener("mousedown",this._documentClickListener,!0),document.removeEventListener("keydown",this._documentKeydownListener,!0))},r.prototype.resizePicker=function(){if(this._pendingResize!==null&&(window.clearTimeout(this._pendingResize),this._pendingResize=null),this._isOpen){var i=this._editorDimensions.height-r.BOTTOM_MARGIN,u=this._editorDimensions.width-r.RIGHT_MARGIN,o=this.getRowHeight()*this._treeView.getItemCount(),f=Math.min(i,o+this.scaledBottomPadding+r.FILTERBOX_HEIGHT),e=this.getMaxFileItemWidth()+this.scaledRightPadding+this.scaledInnerPadding,s=f<this.getRowHeight()*this._treeView.getItemCount()?this.scaledScrollbarPadding:0,h=e>u?this.scaledScrollbarPadding:0,n=Math.max(r.MIN_WIDTH,Math.min(e+s,u)),t=Math.max(r.MIN_HEIGHT+r.FILTERBOX_HEIGHT,Math.min(f+h,i));(n>this._finalWidth||this._isFilterEnabled&&n!==this._finalWidth)&&(this._fileListContainer.style.width=n-this.scaledInnerPadding+"px",this._filterBox.style.width=n-r.FILTERBOX_WIDTH_PADDING+"px",this._container.style.width=n+"px",this._finalWidth=n);t!==this._finalHeight&&(this._fileListContainer.style.height=t-r.FILTERBOX_HEIGHT+"px",this._container.style.height=t+"px",this._finalHeight=t);this._filterNoResults.style.display=this._treeView.getItemCount()<1?"block":"none"}},r.prototype.getTotalDocuments=function(){var n=0;for(var t in this._fileItemsMap)n++;return n},r.prototype.getAllItems=function(){var n=[];for(var t in this._fileItemsMap)n.push(this._fileItemsMap[t]);return n},r.prototype.setFilter=function(n){this._filterBox.value=n;this.filterList();this._filterBox.focus();this._filterBox.setSelectionRange(0,this._filterBox.value.length)},r.prototype.clearFilter=function(){this._filterBox.value="";this.filterList();this._filterBox.focus()},r.prototype.getFilterText=function(){return this._filterBox.value},r.prototype.getFilteredItems=function(){for(var i=this._treeView.getItemCount(),t=[],n=0;n<i;n++)t.push(this._treeView.getItemAt(n));return t},r.prototype.remeasureTreeView=function(){this._treeView.remeasure()},r.prototype.refreshTreeView=function(){this._treeView.refresh()},r.prototype.getSelectedItem=function(){return this._treeView.getSelectedItem()},r.prototype.setSelectedItem=function(n){var t=this._fileItemsMap[n.id];return t?(this._treeView.selectItem(t,!0),!0):!1},r.prototype.isExpanded=function(n){var t=this._fileItemsMap[n.id];return t?this._treeView.getIndex(t)!==-1&&this._treeView.isItemExpanded(t):!1},r.prototype.setExpandState=function(n,t){var i,r;t===void 0&&(t=!0);i=this._fileItemsMap[n.id];i&&(r=this._treeView.getIndex(i),r!==-1&&this._treeView.setRowState(r,t?Common.ObjectView.ObjectTreeView.EXPAND_ROW:Common.ObjectView.ObjectTreeView.COLLAPSE_ROW))},r.prototype.addResourceRoot=function(n,i){var r=t.FilePickerItem.createWithoutModel(i);this._rootNodesMap[r.modelId]=r;this.insertAtSortedPosition(r);this._resourceRootNodes.set(n,r)},r.prototype.addRootResourceNode=function(n){var i=new t.FilePickerItem(n);this._rootNodesMap[i.modelId]=i;this.insertAtSortedPosition(i)},r.prototype.documentAdded=function(n,u){var a=this,f,s,h,e,o,c,l;if(n.isRuntimeDoc||n.parent){if(f=new t.DocFilePickerItem(n,this._debuggerShell),n.isOpen&&(f.additionalClass=Common.CssUtilities.addClasses(f.additionalClass,r.OPENED_DOCUMENT_CLASS)),this._isFilterEnabled&&this._treeView.setFilter(this.returnAllItemsCallback),n.isDynamicCode?(s=n.parent,s&&s.isDynamicCode&&s.frontendId?(o=this._fileItemsMap[s.frontendId],o&&(o.addChild(f),this.insertAtSortedPosition(f,o))):(h=this.getNonDynamicParentId(n),e=this._fileItemsMap[h],e?(e.dynamicDocumentsNode||(e.dynamicDocumentsNode=t.FilePickerItem.createWithoutModel(i.Resources.getString("FilePickerDynamicNode")),this._isOpen&&this._treeView.getIndex(e)>=0&&(this._treeView.isItemExpanded(e)||e.childCount===1)&&this._treeView.addItems([e.dynamicDocumentsNode],e,!1,!0)),e.dynamicDocumentsNode.addChild(f),this.insertAtSortedPosition(f,e.dynamicDocumentsNode)):(this._dynamicDocumentsNode||(this._dynamicDocumentsNode=t.FilePickerItem.createWithoutModel(i.Resources.getString("FilePickerDynamicNode")),this._rootNodesMap[h]=this._dynamicDocumentsNode,this.isOpen&&this._treeView.addItems([this._dynamicDocumentsNode],null,!1,!0)),this._dynamicDocumentsNode.addChild(f),this.insertAtSortedPosition(f,this._dynamicDocumentsNode)))):(o=n.parent&&this._fileItemsMap[n.parent.frontendId],o?o.addChild(f):this._rootNodesMap[n.frontendId]=f,this.insertAtSortedPosition(f,o)),u)for(c in this._fileItemsMap)this._fileItemsMap[c]instanceof t.DocFilePickerItem&&(l=this._fileItemsMap[c].doc,l.parent===n&&this.documentAdded(l,!0));this._isFilterEnabled&&(this._treeView.setFilter(function(n){return a.shouldIncludeItemCallback(n)}),this.refreshList(),this.scheduleResize())}},r.prototype.documentRemoved=function(n){var i,r,t;n.doc.isDynamicCode?n.doc.parent&&n.doc.parent.isDynamicCode?(t=this._fileItemsMap[n.doc.parent.frontendId],t&&t.removeChild(n)):(i=this.getNonDynamicParentId(n.doc),r=this._fileItemsMap[i]?this._fileItemsMap[i].dynamicDocumentsNode:this._dynamicDocumentsNode,r&&(r.removeChild(n),r.hasChildren||(this._treeView.removeItem(r),this._fileItemsMap[i]?this._fileItemsMap[i].dynamicDocumentsNode=null:this._dynamicDocumentsNode=null))):(t=n.doc.parent&&this._fileItemsMap[n.doc.parent.frontendId],t&&t.removeChild(n))},r.prototype.refreshItem=function(n){var t=this._fileItemsMap[n.id];t&&t.refresh();this._treeView.refresh()},r.prototype.restoreList=function(){this._isFilterEnabled&&(this._filterRegex="",this._currentFilter="",this._treeView.setFilter(this.returnAllItemsCallback))},r.prototype.onKeyUp=function(){return this.filterList(),!0},r.prototype.onKeyDown=function(n){var a=this,o=n.target,s=!1,f=0,h=!n.shiftKey&&!n.ctrlKey&&!n.altKey,e,c,l,i,u;if(!n.ctrlKey||n.altKey||n.shiftKey||n.keyCode!==79){if(!n.ctrlKey||n.altKey||n.shiftKey||n.keyCode!==76)o&&o.classList.contains("listview-grid-row-selected")?(n.keyCode===13||n.keyCode===32)&&h?(c=o.querySelector(".fileItem[data-frontendId]"),c&&(f=parseInt(c.getAttribute("data-frontendId"))),s=!0):n.keyCode===38&&h&&(i=this._treeView.getSelectedItem(),l=this._treeView.getItemAt(0),i===l&&(this._filterBox.focus(),this._filterBox.setSelectionRange(0,this._filterBox.value.length)),s=!0):o&&o.classList.contains("filterBox")&&(n.keyCode===13&&h?(t.Telemetry.analytics.logExecuteCommand(t.Telemetry.CommandName.FILEPICKER_FILTERBOX_OPEN,1),i=this._treeView.getSelectedItem()||this._treeView.getItemAt(0),i&&(f=i.modelId),s=!0):n.keyCode===40&&h&&(i=this._treeView.getSelectedItem()||this._treeView.getItemAt(0),i&&this._treeView.selectItem(i,!0),s=!0));else if(this.isOpen)return i=this._treeView.getSelectedItem()||this._treeView.getItemAt(0),i&&i instanceof t.DocFilePickerItem&&(f=i.doc.frontendId,e=this._fileItemsMap[f],e&&!e.doc.isUnnamedDynamicDoc&&(e.isLibraryFile?t.Telemetry.analytics.logExecuteCommand(t.Telemetry.CommandName.TOGGLE_LIBRARY_FILE_OFF,1):t.Telemetry.analytics.logExecuteCommand(t.Telemetry.CommandName.TOGGLE_LIBRARY_FILE_ON,1),e.isLibraryFile=!e.isLibraryFile)),!1}else return t.Telemetry.analytics.logExecuteCommand(t.Telemetry.CommandName.FILEPICKER_MENU_OPEN,1),window.setImmediate(function(){return a.showPicker()}),!1;return s?(f&&(u=this._fileItemsMap[f],u&&u.model&&(this._treeView.selectItem(u,!0),u.additionalClass=Common.CssUtilities.addClasses(u.additionalClass,r.OPENED_DOCUMENT_CLASS),this._onSelectCallback(u.model)),this.hidePicker()),n.stopImmediatePropagation(),n.preventDefault(),!1):!0},r.prototype.onListViewToggle=function(n){var t=this;n.hasChildren&&n.getChildren(null,function(i){t._treeView.addItems(i,n,!1,!1)})},r.prototype.getRootId=function(n){for(var t=n.parent;t&&this._fileItemsMap[t.frontendId];)n=t,t=n.parent;return n.frontendId},r.prototype.getNonDynamicParentId=function(n){for(var i=-1,t=n.parent;t&&this._fileItemsMap[t.frontendId];)if(n=t,t=n.parent,!n.isDynamicCode){i=n.frontendId;break}return i},r.prototype.getMaxFileItemWidth=function(){for(var r,u,n,f=this._container.querySelectorAll(".filePickerMenu .listview-grid-row"),t=0,i=0;i<f.length;i++){for(r=f[i],u=0,n=0;n<r.children.length;n++)u+=r.children[n].clientWidth;t=Math.max(u,t)}return t},r.prototype.getRowHeight=function(){if(this._rowHeight<=0){var n=this._container.querySelector(".filePickerMenu .listview-grid-row");n&&(this._rowHeight=n.getBoundingClientRect().height)}return this._rowHeight},r.prototype.refreshViewWithCallback=function(){var n=this;this._fileListContainer.classList.add("refresh");this._treeView.postRenderCallback=function(){n.resizePicker();n._fileListContainer.classList.remove("refresh")};this._treeView.refresh()},r.prototype.shouldIncludeItemCallback=function(n){return this._isFilterEnabled?n.searchName.match(new RegExp(this._filterRegex,"gi"))&&!!n.model:!0},r.prototype.returnAllItemsCallback=function(){return!0},r.prototype.filterList=function(){var f=this,i,u,n,t;if(this._filterBox.value!==this._currentFilter){if(this._filterBox.value.match(r.WHITE_SPACE_REGEX))this._treeView.setFilter(this.returnAllItemsCallback),this._isFilterEnabled&&this.restoreFilteredList(),this._isFilterEnabled=!1,this._fileListContainer.classList.remove("flatView"),this._treeView.hasIndent=!0,this._filterBox.value="",this._currentFilter="";else{this._isFilterEnabled||this.saveFilteredList();this._isFilterEnabled=!0;this._fileListContainer.classList.add("flatView");this._treeView.hasIndent=!1;for(i in this._rootNodesMap)u=this._rootNodesMap[i],this._treeView.expandAllItems(this._treeView.getIndex(u),function(n){return!n.model});if(this._filterRegex=Common.EncodingUtilities.escapeRegExpWithWildCard(this._filterBox.value),n=this._filterRegex.split(r.SEARCH_PARTS_SPLIT_REGEX),n.length>0){for(this._filterRegex="",t=0;t<n.length;t++)n[t]!==""&&(this._filterRegex+="(?=.*"+n[t]+")");this._filterRegex+=".*"}this._currentFilter=this._filterBox.value;this._treeView.setFilter(function(n){return f.shouldIncludeItemCallback(n)})}this.refreshList()}},r.prototype.getSortString=function(n){return n.model.displayName},r.prototype.refreshList=function(){this._isFilterEnabled&&this._treeView.sortFilteredList(this.getSortString);this.refreshViewWithCallback();var n=this._treeView.getItemAt(0);n&&this._treeView.selectItem(n,!1)},r.prototype.insertAtSortedPosition=function(t,i){var o=!1,f=t.modelId;if(this._fileItemsMap[f]&&this._treeView.removeItem(this._fileItemsMap[f]),this._fileItemsMap[f]=t,this.isOpen){if(i){if(this._treeView.getIndex(i)>=0)if(this._treeView.isItemExpanded(i)){var u=i.children,e=u.length,r=i.getIndexOfChild(t);if(r<e&&t===u[r]){for(r++;r<e;){if(this._treeView.getIndex(u[r])>=0)break;r++}r<e&&(this._treeView.addItems([t],u[r],!0,!0,!0),o=!0)}else n.Utility.Assert.fail("Expected to find the given fileItem in it's parent");o||this._treeView.addItems([t],i,!1,!0)}else i.childCount===1&&(this._treeView.addItems([t],i,!1,!0),i.model||this._treeView.setRowState(this._treeView.getIndex(i),Common.ObjectView.ObjectTreeView.COLLAPSE_ROW))}else this._treeView.addItems([t],null,!1,!0);this.scheduleResize()}},r.prototype.scheduleResize=function(){var t=this,n;this.isOpen&&(this._pendingResize!==null&&window.clearTimeout(this._pendingResize),n=function(){t.resizePicker()},this._pendingResize=window.setTimeout(n,r.PENDING_RESIZE_TIMEOUT))},r.prototype.saveExpandState=function(){var r=[],i,n,t;this._expandedItemMap=[];for(i in this._rootNodesMap)this._expandedItemMap[this._rootNodesMap[i].modelId]=!0,r.push(this._rootNodesMap[i]);for(n=r.concat();n.length>0;)t=n.pop(),this._treeView.isItemExpanded(t)&&t.model&&(this._expandedItemMap[t.modelId]=!0,n=n.concat(t.children))},r.prototype.repopulateTree=function(){var n=[],u=[],r,f,i;for(r in this._rootNodesMap)f=this._rootNodesMap[r],(f instanceof t.DocFilePickerItem?n:u).push(this._rootNodesMap[r]);for(n=n.concat(u),this._treeView.addItems(n,null,!1,!0),i=0;i<n.length;i++)this.repopulateChildren(n[i])},r.prototype.repopulateChildren=function(n){if(n.hasChildren)if(this._treeView.addItems(n.children,n,!1,!0),this._expandedItemMap[n.modelId])for(var t=0;t<n.children.length;t++)this.repopulateChildren(n.children[t]);else this._treeView.setRowState(this._treeView.getIndex(n),Common.ObjectView.ObjectTreeView.COLLAPSE_ROW)},r.prototype.saveFilteredList=function(){this._filterMap=[];this._filterDynamicFolders=[];for(var n in this._rootNodesMap)this.saveFilteredCollapsedState(this._rootNodesMap[n])},r.prototype.saveFilteredCollapsedState=function(n){var i,t;if(this._treeView.isItemExpanded(n))for(n.model?this._filterMap[n.modelId]=!0:this._filterDynamicFolders.push(n),i=n.children,t=0;t<i.length;t++)this.saveFilteredCollapsedState(i[t])},r.prototype.restoreFilteredList=function(){var n,t;for(n in this._rootNodesMap)t=this._treeView.getIndex(this._rootNodesMap[n]),this._treeView.collapseAllItems(t),this._treeView.setRowState(t,Common.ObjectView.ObjectTreeView.EXPAND_ROW),this.restoreFilteredCollapsedState(this._rootNodesMap[n]);this._filterMap=[];this._filterDynamicFolders=[]},r.prototype.restoreFilteredCollapsedState=function(n){var r,i,t;if(r=n.model?this._filterMap[n.modelId]:this._filterDynamicFolders.indexOf(n)!==-1,r)for(this._treeView.setRowState(this._treeView.getIndex(n),Common.ObjectView.ObjectTreeView.EXPAND_ROW),i=n.children,t=0;t<i.length;t++)this.restoreFilteredCollapsedState(i[t])},r.OPENED_DOCUMENT_CLASS="openedDocument",r.MIN_WIDTH=250,r.MIN_HEIGHT=30,r.BOTTOM_MARGIN=10,r.RIGHT_MARGIN=20,r.BOTTOM_PADDING=10,r.RIGHT_PADDING=10,r.INNER_PADDING=2,r.SCROLLBAR_PADDING=15,r.FILTERBOX_HEIGHT=33,r.FILTERBOX_WIDTH_PADDING=16,r.WHITE_SPACE_REGEX=/^[\s]*$/g,r.SEARCH_PARTS_SPLIT_REGEX=/[\s\"\']+/g,r.PENDING_RESIZE_TIMEOUT=50,r}();t.FilePicker=r})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(n,t){this._lastMatchIndex=-1;this._escapedSearchText=null;this._debuggerManager=n;this._documentController=t;this._matchRanges=[];this._matchRangeDoc=null;this._decorationIds=[];this._docForDecorations=null}return Object.defineProperty(i.prototype,"searchText",{get:function(){return this._searchText},set:function(n){this._searchText=n;this._escapedSearchText=null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_editorWindow",{get:function(){return this._debuggerManager.debuggerShell.editorWindow},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"escapedSearchText",{get:function(){return this._escapedSearchText===null&&(this._escapedSearchText=Common.EncodingUtilities.escapeRegExp(this._searchText)),this._escapedSearchText},enumerable:!0,configurable:!0}),i.prototype.findAndHighlightMatches=function(n){n===void 0&&(n=this.searchText);this.searchText=n;this._documentController.currentDoc&&(this.cleanupOldSearchResults(),this.searchText&&(this._matchRanges=this._editorWindow.getLocalMatches(this.searchText),this._matchRangeDoc=this._documentController.currentDoc,this._decorationIds=this._editorWindow.addDecorations(this._matchRanges,i.SEARCH_TERM_DECORATION_CLASS,t.Theme.getValue("plugin-editor-scrollbar-marker-search-result-color")),this._docForDecorations=this._documentController.currentDoc))},i.prototype.findNextMatch=function(i,r,u,f){var e=this;return f===void 0&&(f=Common.Telemetry.CommandName.FIND_NEXT_OR_PREVIOUS),n.Telemetry.logCommandWrapper(f,u,function(){if(e._isSearching)return t.Promise.as(null);e.searchText=i;var n=e.findMatchInOpenFile(r);return n?(e._editorWindow.selectRange(n,!1),e._debuggerManager.testEventObject.fireEvent("searchCompleted",n),t.Promise.as(n)):(e._lastMatchIndex=-1,e.findMatchInOtherFile(r).then(function(n){return e._debuggerManager.testEventObject.fireEvent("searchCompleted",n),n}))})},i.prototype.getSearchTextFromSelection=function(n){var r=this._editorWindow.getEditorSelection(),t,i;return r&&(t=this._editorWindow.getEditorRangeContents(r),t&&(i=t.search(/[\n\r]/g),i>-1&&(t=t.substring(0,i)),!n||t.toLocaleLowerCase()!==n.toLocaleLowerCase()))?(this.cleanupOldSearchResults(),this._lastMatchIndex=-1,t):n},i.prototype.shouldKeepSearching=function(n,t,i){return i?n.lineNumber>t.startLineNumber||n.lineNumber===t.startLineNumber&&n.column>t.startColumn:n.lineNumber<t.endLineNumber||n.lineNumber===t.endLineNumber&&n.column<t.endColumn},i.prototype.findMatchInOtherFile=function(n){var i=this;return new t.Promise(function(t){return i.getNextDocWithMatch(n).then(function(r){r?i._debuggerManager.resourceViewController.open(r,{activation:1,params:{location:null}}).then(function(){i._matchRanges=i._editorWindow.getLocalMatches(i.searchText);i._matchRangeDoc=i._documentController.currentDoc;i._lastMatchIndex=n?0:i._matchRanges.length-1;var r=i._matchRanges[i._lastMatchIndex];r&&i._editorWindow.selectRange(r,!1);i._isSearching=!1;t(r)}):(i._isSearching=!1,t(null))})})},i.prototype.getNextDocWithMatch=function(n){if(!this._isSearching&&this.searchText){this._isSearching=!0;var i=this.getOrderedDocsForSearch(n);if(i&&i.length>0)return this.iterateOnItem(i[0],i.slice(1))}return t.Promise.as(null)},i.prototype.iterateOnItem=function(n,i){var r=this;return this.doesDocHaveMatch(n).then(function(u){return u?t.Promise.as(n):(n.isAuthored&&n.sourceMapState!==0&&i.splice(0,0,n.rawDoc),i&&i.length>0?r.iterateOnItem(i[0],i.slice(1)):t.Promise.as(null))})},i.prototype.doesDocHaveMatch=function(n){var i=this;return n.isAuthored?n.getText().then(function(t){if(n.sourceMapState!==0)return!1;var r=new RegExp(i.escapedSearchText,"gi");return r.test(t)}):this._debuggerManager.getNextDocContainingMatch(this.escapedSearchText,[n]).then(function(n){return t.Promise.as(!!n)})},i.prototype.findMatchInOpenFile=function(n){var u;if(this._documentController.currentDoc&&this._matchRangeDoc===this._documentController.currentDoc){var t=n?0:this._matchRanges.length-1,i=this._matchRanges[t],r=this._editorWindow.getEditorSelection();if(r){for(u=n?r.getEndPosition():r.getStartPosition();i&&this.shouldKeepSearching(u,i,n);)t+=n?1:-1,i=this._matchRanges[t];return this._lastMatchIndex=t,i}}return null},i.prototype.cleanupOldSearchResults=function(){this._matchRanges=[];this._matchRangeDoc=null;this._editorWindow.removeDecorations(this._decorationIds,this._docForDecorations);this._decorationIds=[];this._docForDecorations=null},i.prototype.getOrderedDocsForSearch=function(n){for(var e,s,t,r=[],i=[],u=!1,o=this._documentController.getOpenDocs(),f=0;f<o.length;f++)t=o[f],t===this._documentController.currentDoc?u=!0:u?i.push(t):r.push(t);e=this._documentController.getDocs();for(s in e)t=e[s],i.indexOf(t)===-1&&r.indexOf(t)===-1&&t.isLastRevision&&(t===this._documentController.currentDoc?u=!0:u?i.push(t):r.push(t));return i=n?i.concat(r):i.concat(r).reverse(),this._documentController.currentDoc&&i.push(this._documentController.currentDoc),i},i.SEARCH_TERM_DECORATION_CLASS="searchTermDecoration",i}();n.DocSearchProvider=i})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var i=Microsoft.Plugin,t=Common.Uri,r=function(){function r(t){this._docs=[];this._runtimeIdToFrontendIdMap=[];this._urlToFrontendIdMap=new n.NumberMultiMap;this._longDocumentIdToFrontendIdMap=new Map;this._styleSheetKeyToFrontendIdMap=new Map;this._parentUrlToStyleSheetIds=new Map;this._longDocumentIdRequests=new Map;this._workspaceUriMapper=t}return r.isFileProtocol=function(n){return n.substring(0,r.FILE_PROTOCOL_PREFIX.length).toLowerCase()===r.FILE_PROTOCOL_PREFIX},r.prototype.onDocAdded=function(n){var i,r,u,f,t,e;if(this._docs[n.frontendId]&&n.runtimeId?(this._runtimeIdToFrontendIdMap[n.runtimeId]=n.frontendId,this._longDocumentIdToFrontendIdMap.set(n.longDocumentId,n.frontendId)):(this._docs[n.frontendId]=n,n.runtimeId&&(this._runtimeIdToFrontendIdMap[n.runtimeId]=n.frontendId,this._longDocumentIdToFrontendIdMap.set(n.longDocumentId,n.frontendId)),i=n.url,i&&(r=this.getKeyForUrl(i),r&&this._urlToFrontendIdMap.add(r,n.frontendId))),n.styleSheetInfo&&(this._styleSheetKeyToFrontendIdMap.set(n.styleSheetInfo.key,n.frontendId),u=this._parentUrlToStyleSheetIds.get(n.styleSheetInfo.parentKey)||new Set,u.add(n.frontendId),this._parentUrlToStyleSheetIds.set(n.styleSheetInfo.parentKey,u)),n.longDocumentId&&this._longDocumentIdRequests.has(n.longDocumentId))for(f=this._longDocumentIdRequests.get(n.longDocumentId),this._longDocumentIdRequests.delete(n.longDocumentId),t=0;t<f.length;t++)e=f[t],e(n)},r.prototype.contains=function(n){return Common.ToolWindowHelpers.isNumber(n.frontendId)&&typeof this._docs[n.frontendId]!="undefined"},r.prototype.onDocUrlChanged=function(n){var t=this.getKeyForUrl(n.url);this._urlToFrontendIdMap.remove(n.frontendId);this._urlToFrontendIdMap.add(t,n.frontendId)},r.prototype.getFrontendIdByStyleSheetKey=function(n){return n?this._styleSheetKeyToFrontendIdMap.get(n):null},r.prototype.getFrontendIdByUrl=function(n){if(n){var i=this.getKeyForUrl(new t(n));return this._urlToFrontendIdMap.getFirstValue(i)}return null},r.prototype.getDocByFrontendId=function(n){return this._docs[n]},r.prototype.getDocByRuntimeId=function(n){if(Common.ToolWindowHelpers.isNumber(n)){var t=this._runtimeIdToFrontendIdMap[n];return this._docs[t]}return null},r.prototype.waitForDocWithLongDocumentId=function(n){var r,t;return this._longDocumentIdToFrontendIdMap.has(n)?(r=this._longDocumentIdToFrontendIdMap.get(n),i.Promise.as(this._docs[r])):(t=this._longDocumentIdRequests.get(n),t||(t=[],this._longDocumentIdRequests.set(n,t)),new i.Promise(function(n){return t.push(n)}))},r.prototype.getDocByMonacoUrl=function(n){var i=new t(n.toExternal()),r=this._workspaceUriMapper.getExternalUri(i),u=this.getKeyForUrl(r),f=this._urlToFrontendIdMap.getFirstValue(u);return this.getDocByFrontendId(f)},r.prototype.getDocs=function(){var n=[];return this._docs.forEach(function(t){n.push(t)}),n},r.prototype.getIdsWithParentUrl=function(n){return this._parentUrlToStyleSheetIds.get(n)},r.prototype.onDocRemoved=function(n){if(n&&this._docs[n.frontendId]){if(n.url&&(this._urlToFrontendIdMap.remove(n.frontendId),delete this._runtimeIdToFrontendIdMap[n.runtimeId]),n.styleSheetInfo){this._styleSheetKeyToFrontendIdMap.delete(n.styleSheetInfo.key);var t=this._parentUrlToStyleSheetIds.get(n.styleSheetInfo.parentKey);t.delete(n.frontendId);t.size||this._parentUrlToStyleSheetIds.delete(n.styleSheetInfo.parentKey)}delete this._docs[n.frontendId]}},r.prototype.getKeyForUrl=function(n){var i=n.toString();return n.scheme===t.UriSchemeFile&&(i=i.toLowerCase()),i},r.FILE_PROTOCOL_PREFIX="file://",r}();n.DocTable=r})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,u=Common.Uri,e=Common.Async,o=function(){function o(n,i){var u,r;this.debuggerShell=i;this._rpcWrapper=n;this._previousRevisions=new Map;this._nextRevisions=new Map;this._firstPageLoaded=!1;this._ignoreNextSetRootDocument=!1;this._waitingForProfilingStopped=!1;this._testEventObject=new Common.EventHelperObject;this.persistenceManager=new t.PersistenceManager(this);this.asyncStackProvider=new t.AsyncStackProvider(this);this.intellisenseProvider=new t.DebuggerIntellisenseProvider(this);u=i&&i.documentToolbar;this.breakpointController=new t.BreakpointController(this);this.callstackController=new t.CallstackController(this);this.executionController=new t.ExecutionController(this);this.jmcController=new t.JMCController(this);this.jmcBreakController=new t.JMCBreakController(this);this.resourceViewController=new Common.ResourcesView.ResourceViewController(document.getElementById("resourcesView"),u,!0);this.languageServiceController=new t.LanguageServiceController(this);this.documentController=new t.DocumentController(this);this.watchController=new t.WatchWindowController(this,!1);this.targetManager=new t.ResourcesHandlers.TargetManager(this);this.docDiffHandler=new t.DocDiffHandler(this);this._resourceTable=new f(this.resourceViewController,this.removeDocOnDetach.bind(this));this.resourceViewController.registerHandler(t.Doc.ModelName,this.documentController);this.resourceViewController.registerHandler(t.DocDiff.ModelName,this.docDiffHandler);this.resourceViewController.registerHandler(t.ResourcesHandlers.CookiesModel.ModelName,new t.ResourcesHandlers.CookiesHandler);r=new t.ResourcesHandlers.WebStorageHandler;this.resourceViewController.registerHandler(t.ResourcesHandlers.WebStorageModel.LocalStorageModelName,r);this.resourceViewController.registerHandler(t.ResourcesHandlers.WebStorageModel.SessionStorageModelName,r);this.resourceViewController.registerListener(this.persistenceManager);this.resourceViewController.registerListener(this._resourceTable);this.callstackController.registerListener(this.watchController);this.callstackController.registerListener(this.intellisenseProvider)}return Object.defineProperty(o.prototype,"isAttached",{get:function(){return this._rpcWrapper.isConnected},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"testEventObject",{get:function(){return this._testEventObject},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isBreakCompleted",{get:function(){return this._breakCompleted&&this.executionController.isExecutionPaused},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isDebuggerReady",{get:function(){return this._debuggerLaunched||i.F12.Profiler.getIsProfiling()&&this._isDebuggerSourceRundownComplete},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isDiagOMConnected",{get:function(){return this._rpcWrapper.isDiagOMConnected()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"prettyPrintEnabledForActiveDocument",{get:function(){var n=this.documentController.currentDoc;return n?n.prettyPrintState:2},enumerable:!0,configurable:!0}),o.prototype.onDetached=function(){var n=this;return this.waitOnRuntimeEditSemaphoreIfNeeded(function(){n._debuggerLaunched=!1;n.executionController.isDebuggingDisabled=!0;n.executionController.isExecutionPaused=!1;n.executionController.uninitialize();n.persistenceManager.saveState(!1);n.breakpointController.deleteAll(3,!0);n.watchController.deleteAll(3);n.asyncStackProvider.stopSession();n.debuggerShell.tabControl.animation=!1;n._resourceTable.removeAll();n.debuggerShell.tabControl.closePreviewTab(!1);n._breakCompleted=!1;n.callstackController.clear();n.watchController.disableWatchesWindow()})},o.prototype.registerPluginMethodHandlers=function(){var n=this;!this._havePreviouslyAttached&&this._rpcWrapper.isConnected&&this._rpcWrapper.isDiagOMConnected()&&(i.F12.Communications.registerMethodHandler("breakModeCommand",function(t){return n.executeBreakModeCommand(t)}),i.F12.Communications.registerMethodHandler("addToWatch",function(t){return n.watchController.addWatch(t,3),!0}),i.F12.Communications.registerMethodHandler("showDocument",function(t,i,r,u){return i===void 0&&(i=1),r===void 0&&(r=1),u===void 0&&(u=""),n.showDocument(t,i||1,r||1,u),!0}),i.F12.Communications.registerMethodHandler("getLocalsForCurrentStackFrame",function(t){n.watchController.getLocalsForCurrentStackFrame().then(function(n){t(n)})},!0),i.F12.Communications.registerMethodHandler("abortScriptExecution",function(){return n.isBreakCompleted?n.executionController.abort():n.executionController.isExecutionPaused&&(n._abortBreak=!0),!0}),i.F12.Communications.registerMethodHandler("getTranslatedLocation",function(t,i,r,u){return i===void 0&&(i=1),r===void 0&&(r=1),u===void 0&&(u=!0),n.documentController.getTranslatedLocation(t,i,r,u)}),this._havePreviouslyAttached=!0,window.setImmediate(function(){i.F12.notifyOnToolActivated()}))},o.prototype.onConnect=function(){i.F12.Profiler.getIsProfiling()?(t.DebuggerShell.showErrorDisplay("ProfilingRunningMessage",undefined,0,"http://go.microsoft.com/fwlink/?LinkId=290645"),this.initializeOnProfilerStopped()):this.initializeDebugger();this.registerPluginMethodHandlers()},o.prototype.onStyleSheetAdded=function(n){var i=this.documentController.getDocFromUrl(n.url);i&&!i.styleSheetInfo?i.makeStyleSheetDoc(n):i=t.Doc.createNonRuntimeCssDoc(n,this);this.documentController.styleSheetAdded(i)},o.prototype.onStyleSheetRemoved=function(n){this.documentController.styleSheetRemoved(n)},o.prototype.initializeOnProfilerStopped=function(){var n=this,t;this._waitingForProfilingStopped||(this._waitingForProfilingStopped=!0,t=function(){i.F12.removeEventListener("profilingstopped",t);n._waitingForProfilingStopped=!1;n._rpcWrapper.isConnected&&n.initializeDebugger()},this._rpcWrapper.triggerSourceRundown().done(function(t){switch(t){case 0:n._isDebuggerSourceRundownComplete=!0;n.testEventObject.fireEvent("debuggerLaunched");return}}),i.F12.addEventListener("profilingstopped",t))},o.prototype.initializeDebugger=function(r){var u=this,f;n.Utility.Assert.isTrue(this._rpcWrapper.isConnected,"Not attached");this.jmcController.initialize().then(function(){return(f=i.F12.Profiler.getIsProfiling(),f)?i.Promise.as(1):u.enableDynamicDebugging()}).done(function(e){switch(e){case 0:u.executionController.isDebuggingDisabled=!1;u.debuggerShell.tabControl.animation=!0;u._debuggerLaunched?u.executionController.reinitialize():(u.persistenceManager.applyState(),u.persistenceManager.isAttached=!0,u.executionController.initialize(r),i.F12.Communications.addEventListener("consoleOutput",function(){u.watchController.refreshAllWatchItems(!1)}));u._debuggerLaunched=!0;u.testEventObject.fireEvent("debuggerLaunched");t.DebuggerShell.closeErrorDisplay("DebuggerFailedToConnect");break;case 2:case 1:u.executionController.isDebuggingDisabled=!0;var s="";e===2&&(s="\n"+i.Resources.getString("DebuggerFailedToConnectAnotherAttached"));f?u.initializeOnProfilerStopped():t.DebuggerShell.showErrorDisplay("DebuggerFailedToConnect",[s],0,o.DEBUGGER_FAILED_CONNECT_FWLINK);break;default:n.Utility.Assert.fail("Unknown ConnectionResult. Has something been added to the enum?")}})},o.prototype.executeOnTargetPage=function(n){return this._rpcWrapper.executeOnTargetPage(n)},o.prototype.enableDynamicDebugging=function(){return this.isAttached?this._rpcWrapper.enableDynamicDebugging():i.Promise.as(1)},o.prototype.disableDynamicDebugging=function(){return this.isAttached?this._rpcWrapper.disableDynamicDebugging():i.Promise.as(0)},o.prototype.getBreakpointIdFromLocation=function(n){var t=this;return n.rawLocation.doc.getText().then(function(){return t._rpcWrapper.getBreakpointIdFromSourceLocation(n.rawLocation.doc,t.getRawOffset(n))})},o.prototype.addCodeBreakpoint=function(n,t){var r=this;return n.rawLocation.doc.getText().then(function(){return r._rpcWrapper.addCodeBreakpoint(n.rawLocation.doc,r.getRawOffset(n),t)}).then(function(n){return n.failed?null:i.Promise.as(r.createOrResolveBreakpointFromInfo(n))})},o.prototype.addEventBreakpoint=function(n,t,i,r){var u=this;return this._rpcWrapper.addEventBreakpoint(n,t,i,r).then(function(n){return u.createOrResolveBreakpointFromInfo(n)})},o.prototype.addPendingBreakpoint=function(n,t,i,r,u){return this._rpcWrapper.addPendingBreakpoint(n,t,i,r,u)},o.prototype.causeBreak=function(n,t){return this._rpcWrapper.causeBreak(n,t)},o.prototype.getSourceText=function(n,t,i){return this._rpcWrapper.getSourceText(n,t,i)},o.prototype.editCSSSource=function(n,t){var i=this;return n.beginCommit(),this._rpcWrapper.editCSSSource(n,t).then(function(n){return i.logFileSaved("css"),n})},o.prototype.editSource=function(n,t){var u=this;return this._runtimeEditSemaphore||(this._runtimeEditSemaphore=new Common.Async.Semaphore(1)),this.waitOnRuntimeEditSemaphoreIfNeeded(function(){if(!n.isEditable)throw new Error("Doc does not support editing.");return n.beginCommit(),u._rpcWrapper.editSource(n,t).then(function(t){return t.error?(u.logFileSaved("js",!1,t.error.message),i.Promise.wrapError(new r(t.error.message,t.error.line,t.error.column))):t.newDocId?(u.logFileSaved("js"),u._previousRevisions.set(t.newDocId,n.longDocumentId),u._nextRevisions.set(n.longDocumentId,t.newDocId),t.newDocId):(u.logFileSaved("js",!1,"Invalid newDocID"),i.Promise.wrapError(new r("Invalid newDocID")))}).then(null,function(t){return n.isCommitPending&&n.endCommit(),i.Promise.wrapError(t)})})},o.prototype.removeBreakpoint=function(n){return this._rpcWrapper.removeBreakpoint(n)},o.prototype.setBreakpointEnabledState=function(n,t){return this._rpcWrapper.setBreakpointEnabledState(n,t)},o.prototype.setBreakpointCondition=function(n,t,i){return this._rpcWrapper.setBreakpointCondition(n,t,i)},o.prototype.resume=function(n,r){var u=this,f;return this._breakCompleted=!1,r||(f=function(){u.callstackController.clear();u.watchController.disableWatchesWindow();u.debuggerShell.switchToBreakpointWindow()},n===2||n===4||n===3?this._clearWatchesAndCallstacksTimeout=setTimeout(f,100):f()),this.jmcBreakController.setJMCResumeInfo(this._latestStackFrames,n,r),this.asyncStackProvider.cancelPendingRetrievals(),this._rpcWrapper.resume(n).then(function(r){return i.F12.Debugger.notifyOnRun(),u.testEventObject.fireEvent("resumeComplete",n),u.debuggerShell.tabControl.closePreviewTab(t.ExecutionController.isStepAction(n)),r})},o.prototype.setExceptionFilter=function(n){return this._rpcWrapper.setExceptionFilter(n)},o.prototype.getNextDocContainingMatch=function(n,t){return!t||t.length===0?i.Promise.as(null):this.queueMatchQuery(n,t,0)},o.prototype.getFrames=function(n){return this._rpcWrapper.getFrames(n)},o.prototype.getCurrentThreadDescription=function(){return this._rpcWrapper.getCurrentThreadDescription()},o.prototype.getThreads=function(){return this._rpcWrapper.getThreads()},o.prototype.eval=function(n,t){return this._rpcWrapper.eval(n,t)},o.prototype.getLocals=function(n){return this._rpcWrapper.getLocals(n)},o.prototype.getChildProperties=function(n,t,i){return this._rpcWrapper.getChildProperties(n,t,i)},o.prototype.setPropertyValueAsString=function(n,t){return this._rpcWrapper.setPropertyValueAsString(n,t)},o.prototype.canSetNextStatement=function(t){var i=this;return t.rawLocation.doc.getText().then(function(){return n.Utility.Assert.hasValue(document,"Can set next statement has been called for a document which does not have a formatter."),i._rpcWrapper.canSetNextStatement(t.rawLocation.doc,i.getRawOffset(t))})},o.prototype.setNextStatement=function(t){var i=this;return n.Utility.Assert.hasValue(document,"Set next statement has been called for a document which does not have a formatter."),t.rawLocation.doc.getText().then(function(){return i._rpcWrapper.setNextStatement(t.rawLocation.doc,i.getRawOffset(t))})},o.prototype.togglePrettyPrintEnabledForActiveDocument=function(){var n=this.documentController.currentDoc;n&&(n.prettyPrintState=n.prettyPrintState===0?1:0)},o.prototype.showDocument=function(n,r,u,f,e){var c=this,o,s,h;f===void 0&&(f=null);e===void 0&&(e=!1);i.F12.bringPluginToForeground();this._firstPageLoaded||(this._ignoreNextSetRootDocument=!0);o=this.documentController.getDocFromUrl(n);!o&&this._rpcWrapper.isDiagOMConnected()&&(o=t.Doc.createNonRuntimeDoc(n,f,this),this.documentController.documentAdded(o));o&&(o=o.latestRevision,s=o.sourceMap,s&&o.sourceMapState===0?(h=s.getOriginalSourceLocation(new Common.FormatService.Position(r-1,u-1,o.frontendId)),this.showDocument(s.sources[h.file].url.toString(),h.line+1,h.column+1,null,e)):o.getText().done(function(){if(e)c.resourceViewController.open(o).done();else{var s=o.rawPositionToRawOffset(r,u),n=o.getDisplayPosition(s)||{doc:o,line:r,column:u},f=new t.DocumentLocation(n.doc,n.line,n.column);c.resourceViewController.open(n.doc,{params:{location:f}}).done(function(){i.F12.Communications.fireEvent("onNavigateToSourceComplete",i.F12.PluginId.Header);c.testEventObject.fireEvent("onNavigateToSourceComplete");o.editorWindow.updateShowDocumentLocation(o,f)})}}))},o.prototype.downloadUrl=function(n,t,r){var f=Common.ToolWindowHelpers.parseBase64DataUriContent(n),e,u;return f?(e=Common.ToolWindowHelpers.parseDataUriMimeType(n),i.Promise.as({success:!0,url:"",content:f,mimeType:e,errorMessage:""})):(Common.ToolWindowHelpers.isAbsoluteUrl(n)||(u=this.documentController.getDocFromRuntimeId(this._rootDocId),u&&(n=Common.ToolWindowHelpers.pathCombine(u.getPathFromUrl(u.url.toString()),n))),!Common.ToolWindowHelpers.isAbsoluteUrl(n))?i.Promise.as({success:!1,url:n,content:f,mimeType:e,errorMessage:""}):(typeof r!="boolean"&&(r=!this.executionController.isExecutionPaused),this._rpcWrapper.downloadUrl(n,t,r))},o.prototype.retrieveCookies=function(n){return this._rpcWrapper.retrieveCookies(n)},o.prototype.deleteCookies=function(n,t){return this._rpcWrapper.deleteCookies(n,t)},o.prototype.deleteAllCookies=function(n){return this._rpcWrapper.deleteAllCookies(n)},o.prototype.deleteSessionCookies=function(n){return this._rpcWrapper.deleteSessionCookies(n)},o.prototype.setCookie=function(n,t){return this._rpcWrapper.setCookie(n,t)},o.prototype.setSimulateCap=function(n,t){return n===0?this._rpcWrapper.localStorageSetSimulateCap(t):this._rpcWrapper.sessionStorageSetSimulateCap(t)},o.prototype.retrieveWebStorage=function(n,t){return n===0?this._rpcWrapper.retrieveLocalStorage(t):this._rpcWrapper.retrieveSessionStorage(t)},o.prototype.webStorageSetItem=function(n,t,i,r){return n===0?this._rpcWrapper.localStorageSetItem(t,i,r):this._rpcWrapper.sessionStorageSetItem(t,i,r)},o.prototype.webStorageDeleteItems=function(n,t,i){return n===0?this._rpcWrapper.localStorageDeleteItems(t,i):this._rpcWrapper.sessionStorageDeleteItems(t,i)},o.prototype.setMutationBreakpoint=function(n,i,r,u){var f=this;return u===void 0&&(u=t.MutationType.All),this._rpcWrapper.setMutationBreakpoint(i,r,u).then(function(n){return n.success&&f.breakpointController.setMutationBreakpoint(n.breakpointId,u,n.objectName),n.success})},o.prototype.canSetMutationBreakpoint=function(n,i,r){return r===void 0&&(r=t.MutationType.All),this._rpcWrapper.canSetMutationBreakpoint(n,i,r)},o.prototype.deleteMutationBreakpoint=function(n){return this._rpcWrapper.deleteMutationBreakpoint(n)},o.prototype.setMutationBreakpointEnabledState=function(n,t){return this._rpcWrapper.setMutationBreakpointEnabledState(n,t)},o.prototype.executeBreakModeCommand=function(n){return this.isBreakCompleted&&this.callstackController.activeFrame?(this.eval(this.callstackController.activeFrame.frameId,n),!0):!1},o.prototype.onAddDocuments=function(n){var r=this;return t.debuggerTraceWriter.traceWriter.raiseEvent(371),this.waitOnRuntimeEditSemaphoreIfNeeded(function(){for(var f,u=[],t=0;t<n.length;++t)f=n[t],u.push(r.onAddDocumentCore(f));return i.Promise.join(u)})},o.prototype.onBreak=function(n,r,u,f,e,o,s,h){var c=this;return this.waitOnRuntimeEditSemaphoreIfNeeded(function(){if(t.debuggerTraceWriter.traceWriter.raiseEvent(304),n===6&&c.executionController.exceptionFilter===0){c.ignoreBreak(1);return}var u=!1;return c.jmcController.isJustMyCodeEnabled||(c.startBreak(o),u=!0),c.getFrames(0).then(function(l){var y,p;c._latestStackFrames=l;var a=[],w=h==="XmlHttpRequest response",v=c.jmcBreakController.getJMCBreakAction(l,n,h,f,e);if(v.ignoreBreak){v.isLibraryFile&&w?(c.jmcBreakController.ensureBreakInUserCode(),c.resume(6,!0)):c.ignoreBreak(v.ignoreBreakAction);return}return c._clearWatchesAndCallstacksTimeout&&(window.clearTimeout(c._clearWatchesAndCallstacksTimeout),c._clearWatchesAndCallstacksTimeout=0),i.F12.bringPluginToForeground(),(!u||c.jmcController.isJustMyCodeEnabled)&&(c.startBreak(o),u=!0),y=[],l.forEach(function(n,i){var r=c.documentController.getDocFromRuntimeId(n.location.docId),u,f;r&&r.isRuntimeDoc?(u=r.getText().then(function(u){r.isEditPending&&(r=c.documentController.getOrCreatePreviewDoc(r,u));var f=r.createDocumentLocation(n.location.start,n.location.length),e=new t.StackFrame(n.callFrameId,n.functionName,n.isInternal,n.location,f);a[i]=e}),y.push(u)):(f=new t.StackFrame(n.callFrameId,n.functionName,n.isInternal,n.location,r?new t.DocumentLocation(r,1,1):undefined),a[i]=f)}),n===6||!h||(w&&(h=i.Resources.getString("XHRCallstackEventDiscription")),p=new t.StackFrame("eventBreakpoint",i.Resources.getString("CallstackEventBreakpoint",h),null,undefined),p.isLibraryMarkerFrame=!0,a[l.length]=p),c.getCurrentThreadDescription().then(function(u){return u.isWorker||(u.displayName=i.Resources.getString("DebuggerMainFrame")),i.Promise.join(y).then(function(){c._firstPageLoaded||(c._ignoreNextSetRootDocument=!0);var i=null;return v.activeFrameIndex!==-1&&(i=a[v.activeFrameIndex]),c.callstackController.onBreak(u,a,i).then(function(){var i=function(i){c._breakCompleted=!0;c.callstackController.addAsyncFrames(i,u.id);n===6&&c.debuggerShell&&c.callstackController.activeFrame&&c.debuggerShell.editorWindow.createExceptionDisplays(c.callstackController.activeFrame.location,r);c.executionController.updateAlertMessage();c.testEventObject.fireEvent("debuggerBroken");c._abortBreak&&(c.executionController.abort(),c._abortBreak=!1);t.debuggerTraceWriter.traceWriter.raiseEvent(305)},f=!1;return c.asyncStackProvider.getAsyncFrames(s).then(function(n){f||i(n);c.callstackController.addAsyncFrames(n,u.id);c.asyncStackProvider.asyncFramesAvailable=!0;c.testEventObject.fireEvent("asyncFramesAvailable")},function(){f||i([]);c.asyncStackProvider.asyncFramesAvailable=!0;c.testEventObject.fireEvent("asyncFramesAvailable")},function(n){f=!0;i(n)})})})})})})},o.prototype.onDebuggerEvent=function(t,r,u){var f={fileName:u};switch(t){case 0:return;case 3:f.messageText=i.Resources.getString("AsmjsCompilationFailed",r);f.messageType=5;i.F12.Communications.fireEvent("onDebuggerEvent",i.F12.PluginId.Console,f);break;case 2:f.messageText=i.Resources.getString("AsmjsCompilationSucceeded",r);f.messageType=3;i.F12.Communications.fireEvent("onDebuggerEvent",i.F12.PluginId.Console,f);break;case 1:f.messageText=i.Resources.getString("AsmjsDetectedMessage");f.messageType=5;i.F12.Communications.fireEvent("onDebuggerEvent",i.F12.PluginId.Console,f);break;default:n.Utility.Assert.fail("Unknown debugger event")}i.F12.ErrorDisplay.show(f.messageText,i.F12.getDoubleClickTime()*10)},o.prototype.onUnhandledException=function(n,t,r,u){var f=this;return this.waitOnRuntimeEditSemaphoreIfNeeded(function(){var e=f.documentController.getDocFromRuntimeId(n),o={messageId:"SCRIPT"+r,messageText:t};if(e)return e.getText().then(function(){var n=e.getDisplayPosition(u,!1)||{line:1,column:1,doc:e};o.fileName=e.url.toString();o.lineNumber=n.line-1;o.columnNumber=n.column-1;i.F12.Communications.fireEvent("onUnhandledException",i.F12.PluginId.Console,o)});i.F12.Communications.fireEvent("onUnhandledException",i.F12.PluginId.Console,o)})},o.prototype.onSetRootDocument=function(n){var r=this;return this.waitOnRuntimeEditSemaphoreIfNeeded(function(){if(r._firstPageLoaded=!0,r._rootDocId=n,r._ignoreNextSetRootDocument){r._ignoreNextSetRootDocument=!1;return}return r.resourceViewController.open(r.documentController.getDocFromRuntimeId(n),{activation:0}).then(function(){i.F12.TraceWriter.markToolReady();t.SelfTest&&t.SelfTest.init()})})},o.prototype.onWebWorkerStarted=function(n){var t=this;return this.waitOnRuntimeEditSemaphoreIfNeeded(function(){t.callstackController.workerAdded(n)})},o.prototype.onWebWorkerFinished=function(n){var t=this;return this.waitOnRuntimeEditSemaphoreIfNeeded(function(){t.callstackController.workerRemoved(n)})},o.prototype.onRemoteScriptError=function(n,t,r,u){return window.reportError(n,t,r,"",u),i.Promise.as(null)},o.prototype.onDebugOutput=function(){return Common.PromiseUtilities.EmptyPromise},o.prototype.onAttachFailed=function(){return Common.PromiseUtilities.EmptyPromise},o.prototype.onRemoveDocuments=function(n){var t=this;return this.waitOnRuntimeEditSemaphoreIfNeeded(function(){t.onRemoveDocumentsCore(n)})},o.prototype.onResolveBreakpoint=function(n,t){var i=this;return this.waitOnRuntimeEditSemaphoreIfNeeded(function(){var r=i.createOrResolveBreakpointFromInfo(t,n)})},o.prototype.onUpdateDocuments=function(t){var i=this;return this.waitOnRuntimeEditSemaphoreIfNeeded(function(){for(var f,r,o,e=0;e<t.length;++e)if(f=t[e],r=i.documentController.getDocFromRuntimeId(f.id),n.Utility.Assert.hasValue(r,"onUpdateDocuments received for docId not yet added."),r.isRuntimeDoc){o=new u(f.url);u.equals(r.url,o)||(r.url=o);r.mimeType!==f.mimeType&&i.documentController.documentTextOrMimeTypeUpdated(r,"",!0,f.mimeType);r.onMoreTextAvailable(f.length)}})},o.prototype.onAddDocument=function(n){var t=this;return this.waitOnRuntimeEditSemaphoreIfNeeded(function(){return t.onAddDocumentCore(n)})},o.prototype.onIntellinsenseRequestComplete=function(n,t){this.intellisenseProvider.onIntellinsenseRequestComplete(n,t)},o.prototype.removeDocOnDetach=function(n){n.styleSheetInfo?this.documentController.styleSheetRemoved(n.styleSheetInfo):this.removeDocument(n)},o.prototype.getRawOffset=function(n){return typeof n.rawLocation.offset=="number"?n.rawLocation.offset:n.rawLocation.doc.getRawLocation(n.startPosition).offset},o.prototype.startBreak=function(n){this.executionController.isExecutionPaused=!0;this.watchController.enableWatchesWindow();this._rpcWrapper.onExecutionPaused();i.F12.Debugger.notifyOnBreak(n)},o.prototype.ignoreBreak=function(n){t.debuggerTraceWriter.traceWriter.raiseEvent(305);this.resume(n,!0)},o.prototype.createOrResolveBreakpointFromInfo=function(n,i){var e=this,o,s,u,f,r;if(n.location)if(n.location.docId!==0)u=this.documentController.getDocFromRuntimeId(n.location.docId),o=u.createDocumentLocation(n.location.start,n.location.length),s=u.url.toString();else if(f=this.breakpointController.getBreakpoint(n.breakpointId),f)return f.isBound=n.isBound,this.breakpointController.breakpointChanged(f),f;return r=new t.Breakpoint(n.breakpointId,n.location,n.eventTypes,o,s,n.isBound,!1,0),typeof n.isTracepoint=="boolean"&&(r.isTracepoint=n.isTracepoint),typeof n.condition=="string"&&(r.condition=n.condition),r.isEnabled=n.isEnabled,!n.isPseudoBreakpoint&&u&&u.getText().done(function(){r.location=new t.DynamicLocation({doc:u.rawDoc||u,offset:n.location.start,length:n.location.length});i?e.breakpointController.resolveBreakpointById(i,r):e.breakpointController.breakpointChanged(r)}),r},o.prototype.queueMatchQuery=function(n,t,r){var u=this;return this.isDocContainingMatch(n,t[r]).then(function(f){return f?i.Promise.as(t[r]):(++r,r<t.length)?u.queueMatchQuery(n,t,r):i.Promise.as(null)})},o.prototype.isDocContainingMatch=function(t,r){return(n.Utility.Assert.hasValue(r,"Searching for matches on an undefined doc"),r.hasText)?r.editorState&&r.editorState.model?i.Promise.as(r.editorState.model.findMatches(t,!1,!0,!1,!1).length>0):r.getText().then(function(n){var i=new RegExp(t,"gi");return n&&i.test(n)}):r.isRuntimeDoc?this._rpcWrapper.isDocContainingMatch(t,r):i.Promise.as(!1)},o.prototype.onAddDocumentCore=function(n){var r=this,f,e="javascript:",u;return n.url&&n.url.toLowerCase().substring(0,e.length)===e&&(n.url="javascript:<URI>"),u=this._previousRevisions.get(n.longDocumentId),f=u?this.documentController.waitForDocWithLongDocumentId(u):i.Promise.as(null),f.then(function(i){var u=r.documentController.getNonRuntimeDoc(n.url),f;return u?(f=r.documentController.getDocFromRuntimeId(n.parentId),u.makeRuntimeDocument(n,f,!!i)):u=new t.Doc(n,undefined,r,!!i),i&&(i.isCommitPending?i.endCommit(u):i.nextRevision=u),r.documentController.documentAdded(u,!1,!r._nextRevisions.has(u.longDocumentId)).then(function(){return u})})},o.prototype.onRemoveDocumentsCore=function(t){for(var r,i=0,u=t.length;i<u;i++)r=this.documentController.getDocFromRuntimeId(t[i]),n.Utility.Assert.hasValue(r,"onRemoveDocuments received for document not in table."),this.removeDocument(r)},o.prototype.removeDocument=function(n){this.executionController.removeAnyPseudoBreakpoint(n);this.breakpointController.unresolveCodeBreakpoints(n);this.documentController.documentRemoved(n)},o.prototype.waitOnRuntimeEditSemaphoreIfNeeded=function(n){var t=this;return this._runtimeEditSemaphore?e.tryFinally(this._runtimeEditSemaphore.wait().then(n),function(){t._runtimeEditSemaphore.release();t._runtimeEditSemaphore.isEmpty&&(t._runtimeEditSemaphore=null)}):i.Promise.wrap(n())},o.prototype.logFileSaved=function(n,i,r){i===void 0&&(i=!0);r===void 0&&(r="");t.Telemetry.analytics.log(t.Telemetry.TelemetryEventName.FILE_SAVED,{type:n,success:i,errorMessage:r})},o.DEBUGGER_FAILED_CONNECT_FWLINK="http://go.microsoft.com/fwlink/?LinkID=313120",o}(),r,f;t.DebuggerManager=o;r=function(){function n(n,t,r){n===void 0&&(n=i.Resources.getString("SourceEditError"));t===void 0&&(t=0);r===void 0&&(r=0);this.name="SourceEditError";this.message=n;this.line=t;this.column=r}return n}();t.SourceEditError=r;r.prototype=Object.create(Error.prototype);f=function(){function n(n,t){this._resources=new Set;this._resourceVC=n;this._removeDoc=t}return n.prototype.removeAll=function(){var n=this;this._removingAll=!0;this._resources.forEach(function(i){i instanceof t.Doc?n._removeDoc(i):n._resourceVC.resourceRemoved(i)});this._resources=new Set;this._removingAll=!1},n.prototype.resourceAdded=function(n){this._removingAll||this._resources.add(n)},n.prototype.resourceRemoved=function(n){this._removingAll||this._resources.delete(n)},n}()})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function r(n){var i=this;this._debuggerManager=n;this.isAttached=!1;this._debuggerSettings={};this._debuggerData={};this._propertyChangeRegistrations=[];this._activeResourceDataItemsMap={};this._resourceDisplayDataItems={};t.debuggerTraceWriter.traceWriter.raiseEvent(355);this.loadCollection(r.DEBUGGER_SETTINGS_KEY).done(function(n){i._debuggerSettings=n;i.loadCollection(r.DEBUGGER_DATA_KEY).done(function(n){i._debuggerData=n;t.debuggerTraceWriter.traceWriter.raiseEvent(356)})});this._deferredNonDocModels=[];this._manualPersistModelNames=[]}return r.prototype.registerManualPersistModelName=function(n){this._manualPersistModelNames.push(n)},r.prototype.getSetting=function(n,t){return this._debuggerSettings.hasOwnProperty(n)?this._debuggerSettings[n]:t},r.prototype.getSettingAsBoolean=function(n,t){return this._debuggerSettings.hasOwnProperty(n)?this._debuggerSettings[n]:t},r.prototype.setSetting=function(t,i){n.Utility.Assert.hasValue(i,"Value cannot be null or undefined");this._debuggerSettings[t]=i},r.prototype.setSettingAsBoolean=function(t,i){n.Utility.Assert.hasValue(i,"Value cannot be null or undefined");this._debuggerSettings[t]=i},r.prototype.applyState=function(){var n,i,r;if(t.debuggerTraceWriter.traceWriter.raiseEvent(359),n=this._debuggerData.watches,n)for(i=0;i<n.length;i++)this._debuggerManager.watchController.addWatch(n[i].expression,3);t.debuggerTraceWriter.traceWriter.raiseEvent(360);t.debuggerTraceWriter.traceWriter.raiseEvent(357);r=this._debuggerData.breakpoints;r&&this._debuggerManager.breakpointController.addPendingBreakpoints(r);t.debuggerTraceWriter.traceWriter.raiseEvent(358)},r.prototype.saveState=function(n){n===void 0&&(n=!0);this.isAttached&&(t.debuggerTraceWriter.traceWriter.raiseEvent(363),this.isAttached=n,i.Settings.set(r.DEBUGGER_DATA_KEY,this.fetchDebuggerData()),i.Settings.set(r.DEBUGGER_SETTINGS_KEY,this._debuggerSettings),t.debuggerTraceWriter.traceWriter.raiseEvent(364))},r.prototype.resourceAdded=function(n){this._manualPersistModelNames.indexOf(n.modelName)<0&&this.persistResourceAdded(n)},r.prototype.persistResourceAdded=function(n){var e=this,s,i,u,f,o;if(n.shouldBePersisted){this._debuggerData.resourceDisplayData=this._debuggerData.resourceDisplayData||[];for(s in this._debuggerData.resourceDisplayData)i=this._debuggerData.resourceDisplayData[s],r.persistenceKeyEquals(i.key,n.persistenceKey)&&(this._resourceDisplayDataItems[i.key]=i);if(n.persistedPropNames&&n.propertyChanged&&(this._propertyChangeRegistrations[n.id]=n.propertyChanged.addHandler(function(t){if(n.persistedPropNames.indexOf(t)>=0){var i=e.getResourceDisplayData(n.persistenceKey);i[t]=n[t]}})),this._debuggerData.openResources)for(u=0;u<this._debuggerData.openResources.length;u++)if(f=this._debuggerData.openResources[u],r.persistenceKeyEquals(n.persistenceKey,f.key)&&!this.isAlreadyOpen(n.persistenceKey))if(n instanceof t.Doc||!this._deferredNonDocModels){o=function(n){t.debuggerTraceWriter.traceWriter.raiseEvent(361);e._activeResourceDataItemsMap[f.key]=f;e._debuggerManager.resourceViewController.open(n,{activation:0}).done(function(){t.debuggerTraceWriter.traceWriter.raiseEvent(362)})};o(n);this._deferredNonDocModels&&(this._deferredNonDocModels.forEach(o),this._deferredNonDocModels=null);break}else this._deferredNonDocModels.push(n)}},r.prototype.resourceClosed=function(n,t){this._manualPersistModelNames.indexOf(n.modelName)<0&&this.persistResourceClosed(n,t)},r.prototype.persistResourceClosed=function(n,t){var i,u;if(n.shouldBePersisted&&this._debuggerData.openResources)for(i=0;i<this._debuggerData.openResources.length;i++)if(u=this._debuggerData.openResources[i],r.persistenceKeyEquals(n.persistenceKey,u.key)){this._activeResourceDataItemsMap.hasOwnProperty(u.key)&&delete this._activeResourceDataItemsMap[u.key];t||this._debuggerData.openResources.splice(i,1);break}},r.prototype.resourceOpened=function(n,t,i){this._manualPersistModelNames.indexOf(n.modelName)<0&&this.persistResourceOpened(n,t,i)},r.prototype.persistResourceOpened=function(n,t,i){var f,e,o,u;if(n.shouldBePersisted){for(f=this._debuggerData.openResources||[],e=0;e<f.length;e++)if(u=f[e],r.persistenceKeyEquals(n.persistenceKey,u.key)){i&&i.location&&(o=i,o.location.startPosition&&(u.offset=o.location.rawLocation.offset));t!==0&&(this._activeResourceDataItem=u);return}u={key:n.persistenceKey};f.push(u)>r.MAX_PERSISTED_RESOURCES&&f.shift();this._activeResourceDataItem=u;this._debuggerData.openResources=f}else this._activeResourceDataItem=null},r.prototype.resourceRemoved=function(n){this._manualPersistModelNames.indexOf(n.modelName)<0&&this.persistResourceRemoved(n)},r.prototype.persistResourceRemoved=function(n){var t=this._propertyChangeRegistrations[n.id];t&&(delete this._propertyChangeRegistrations[n.id],t.unregister())},r.prototype.updateEditorPosition=function(n){this._activeResourceDataItem&&(this._activeResourceDataItem.offset=n)},r.prototype.getOffsetForDoc=function(n){var t=0,i;return this._activeResourceDataItemsMap.hasOwnProperty(n.persistenceKey)&&(i=this._activeResourceDataItemsMap[n.persistenceKey],t=i.offset),t},r.prototype.isPrettyPrintEnabled=function(n){var i=this.getResourceDisplayData(n.persistenceKey,!1),t=i.prettyPrintEnabled;return typeof t!="boolean"?!1:t},r.prototype.isSourceMapEnabled=function(n){var i=this.getResourceDisplayData(n.url.toString(),!1),t=i.sourceMapEnabled;return typeof t!="boolean"?!0:t},r.persistenceKeyEquals=function(n,t){return n.toLowerCase()===t.toLowerCase()},r.prototype.loadCollection=function(n){return new i.Promise(function(t){i.Settings.get(n).done(function(n){t(n)},function(){t({})})},null)},r.prototype.isAlreadyOpen=function(n){for(var u,i=this._debuggerManager.resourceViewController.openModels,t=0;t<i.length;t++)if(i[t].persistenceKey&&(u=i[t],r.persistenceKeyEquals(u.persistenceKey,n)))return!0;return!1},r.prototype.fetchDebuggerData=function(){return this._debuggerData=this._debuggerData||{},this._debuggerData.watches=this.fetchWatchesData(),this._debuggerData.breakpoints=this.fetchBreakpointsData(),this._debuggerData},r.prototype.fetchWatchesData=function(){var t=this._debuggerManager.watchController.getWatches(),i,n;if(t.length>0)for(i=[],n=0;n<t.length;n++)t[n].isUserWatch&&i.push({expression:t[n].watchName});return i},r.prototype.fetchBreakpointsData=function(){var r=this._debuggerManager.breakpointController.getBreakpoints(),t,i,n;if(r.length>0)for(t=[],i=0;i<r.length;i++)n=r[i],n.eventTypes?t.push({url:null,displayUrl:null,condition:n.condition,oneBasedStartLine:null,oneBasedStartColumn:null,rawLocation:null,isEnabled:n.isEnabled,isTracepoint:n.isTracepoint,eventTypes:n.eventTypes,isMutationBreakpoint:!1,mutationType:0,mutationBreakpointObjectName:""}):n.isMutationBreakpoint?t.push({url:null,displayUrl:null,condition:n.condition,oneBasedStartLine:null,oneBasedStartColumn:null,rawLocation:null,isEnabled:n.isEnabled,isTracepoint:!1,eventTypes:null,isMutationBreakpoint:!0,mutationType:n.mutationType,mutationBreakpointObjectName:n.mutationBreakpointObjectName}):t.push({url:n.location.rawLocation.doc.url.raw,displayUrl:n.location.startPosition.doc.url.toString(),condition:n.condition,oneBasedStartLine:n.location.startLineNumber,oneBasedStartColumn:n.location.startColumn,rawLocation:n.rawLocation,isEnabled:n.isEnabled,isTracepoint:n.isTracepoint,eventTypes:null,isMutationBreakpoint:!1,mutationType:0,mutationBreakpointObjectName:""});return t},r.prototype.getResourceDisplayData=function(n,t){t===void 0&&(t=!0);n=n.toLowerCase();var i=this._resourceDisplayDataItems[n];return i||(i={key:n},t&&(this._resourceDisplayDataItems[n]=i,this._debuggerData.resourceDisplayData.push(i),this._debuggerData.resourceDisplayData.length>r.MAX_PERSISTED_RESOURCES&&this._debuggerData.resourceDisplayData.shift())),i},r.DEBUGGER_DATA_KEY="JavaScriptDebuggerData",r.DEBUGGER_SETTINGS_KEY="JavaScriptDebuggerSettings",r.MAX_PERSISTED_RESOURCES=100,r}();t.PersistenceManager=r})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,f,u,r;(function(n){n[n.ShowBothContainers=1]="ShowBothContainers";n[n.ShowTopContainer=2]="ShowTopContainer";n[n.ShowBottomContainer=3]="ShowBottomContainer"})(t.DataSplitterStates||(t.DataSplitterStates={}));f=t.DataSplitterStates;u=function(){function u(){var n=this;this._vEditorSplitterRightPx=u.MIN_CONTROLS_WIDTH;this._hDataWindowsSplitterBottomPx=u.MIN_CONTROLS_HEIGHT;this.propertyChanged=new Common.EventSource;this._telemetryLoadStartTime=Date.now();this._traceWriter=new Common.DefaultTraceWriter;i.addEventListener("pluginready",function(){i.Tooltip.defaultTooltipContentToHTML=!1;n._traceWriter=new Common.TraceWriter});Common.ErrorHandling.addPromiseErrorListener();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._console=document.getElementById("console");this._resizePane=document.getElementById("resizePane");this._currentResizeClientRect=null;this._findResultsVisibility=2;this._consoleVisibility=i.F12.getIsShowingConsole()?0:2;this.setupEditorDataWindowsSplitter();this.setupEditorConsoleSplitter();this.setupDataWindowsSplitter();i.F12.addEventListener("consolestateshown",function(){return n.onConsoleShowHideStateChanged(!0)});i.F12.addEventListener("consolestatehidden",function(){return n.onConsoleShowHideStateChanged(!1)});i.F12.addEventListener("zoomevent",function(){return n.setConsoleClientArea()});this._editorConsoleContainerMsGridRowsCSSUserSetting=i.F12.getRegEntryForF12(u.H_EDITOR_CONSOLE_SPLITTER_REG_KEY);this.onConsoleShowHideStateChanged(i.F12.getIsShowingConsole());i.F12.addEventListener("activated",function(){n.setConsoleClientArea();n.layoutErrorDisplay(!0)});this._topContainer=new r(this);this._topDataWindowsParent.appendChild(this._topContainer.containerElement);this._bottomContainer=new r(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",i.Resources.getString("DebuggerTitle"));Common.NavigationUtilities.registerNavigationFrames([Common.NavigationUtilities.makeNavigationFrameFromCallback(document.body,function(){return n._debuggerToolbar.getActiveElement()}),Common.NavigationUtilities.makeNavigationFrameFromCallback(this._console,function(){return n._findResultsVisibility===0?n._findResultsWindow.getActiveElement():null}),Common.NavigationUtilities.makeNavigationFrameFromCallback(this._topContainer.containerElement,function(){return n._topContainer.tabs[n._topContainer.activeIndex].titleElement}),Common.NavigationUtilities.makeNavigationFrameFromCallback(this._bottomContainer.containerElement,function(){return n._bottomContainer.tabs[n._bottomContainer.activeIndex].titleElement})]);Common.NavigationUtilities.registerFocusHandlers(i.F12.PluginId.Debugger);this._documentToolbar=new Common.Controls.ToolbarControl("Common.toolbarTemplateWithoutTitle");this._documentToolbar.rootElement.classList.add(Common.ResourcesView.ResourceViewController.HideResourceToolbarCssClass);document.getElementById("documentToolbar").appendChild(this._documentToolbar.rootElement)}return Object.defineProperty(u.prototype,"editorWindow",{get:function(){return this._editorWindow},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"filePicker",{get:function(){return this._filePicker},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"tabControl",{get:function(){return this._tabControl},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"debuggerToolbar",{get:function(){return this._debuggerToolbar},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"callstackWindow",{get:function(){return this._callstackWindow},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"findResultsWindow",{get:function(){return this._findResultsWindow},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"isShowingFindResults",{get:function(){return this._findResultsVisibility===0},set:function(n){this.showHideFindResultsWindow(!!n)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"bottomContainer",{get:function(){return this._bottomContainer},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"debuggerManager",{get:function(){return this._debuggerManager},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"topContainer",{get:function(){return this._topContainer},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"traceWriter",{get:function(){return this._traceWriter},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"documentToolbar",{get:function(){return this._documentToolbar},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"_isShowingEditorConsoleSplitter",{get:function(){return this._consoleVisibility===0||this._findResultsVisibility===0},enumerable:!0,configurable:!0}),u.showErrorDisplay=function(n,t,r,f){t===void 0&&(t=[]);r===void 0&&(r=0);f===void 0&&(f="");u.LastErrorDisplayId=n;var e=[n].concat(t),o=i.Resources.getString.apply(i.Resources,e),s=document.getElementById("hEditorConsoleSplitter");i.F12.ErrorDisplay.show(o,r,f,s)},u.closeErrorDisplay=function(n){n===u.LastErrorDisplayId&&i.F12.ErrorDisplay.close()},u.prototype.initializeUI=function(){var n=this,u=new t.RpcWrapper,r,f;this._debuggerManager=new t.DebuggerManager(u,this);r=document.createElement("div");r.classList.add("resourceHandler");r.classList.add("debuggerEditor");this._debuggerManager.resourceViewController.primeWithElement(r);this._editorWindow=new t.EditorWindow(this._debuggerManager,this._debuggerManager.documentController,this._debuggerManager.breakpointController,this._debuggerManager.executionController,this._debuggerManager.callstackController,this._debuggerManager.languageServiceController,r,function(){n._debuggerManager.callstackController.registerListener(n._editorWindow);n._debuggerManager.breakpointController.registerListener(n._editorWindow);n._debuggerManager.executionController.registerListener(n._editorWindow);n._debuggerManager.documentController.registerListener(n._editorWindow);u.onDebuggerLoadComplete(n._debuggerManager);var i={toolName:Common.ToolName.DEBUGGER,durationMs:Date.now()-n._telemetryLoadStartTime};t.Telemetry.analytics.log(Common.TelemetryEventName.TOOL_LOADED,i,2)});this._findResultsWindow=new t.FindResultsWindow(this._debuggerManager.languageServiceController,document.getElementById("console"));this._debuggerManager.documentController.editorWindow=this._editorWindow;this._debuggerToolbar=new t.DebuggerToolbar(this._debuggerManager.executionController);this._tabControl=new t.TabControl(document.getElementById("tabControl"),this._debuggerManager.resourceViewController);this._filePicker=new t.FilePicker(document.getElementById("filePickerMenu"),document.getElementById("filePickerButton"),this);this._debuggerManager.documentController.registerListener(this._tabControl);this._debuggerManager.documentController.registerListener(this._filePicker);this._debuggerManager.resourceViewController.registerListener(this._tabControl);this._debuggerManager.resourceViewController.registerListener(this._filePicker);this._debuggerManager.resourceViewController.registerListener(this._findResultsWindow);this._breakpointWindow=new t.BreakpointWindow(this,this._debuggerManager.breakpointController,document.getElementById("BreakpointWindow"));this._debuggerManager.breakpointController.registerListener(this);this._debuggerManager.breakpointController.registerListener(this._breakpointWindow);this._callstackWindow=new t.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 t.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));window.addEventListener("resize",function(t){n._currentResizeClientRect=null;n.setEditorSplitter(t)});document.addEventListener("keyup",this.onKeyUpOrDown.bind(this));document.addEventListener("keydown",this.onKeyDown.bind(this));i.F12.addEventListener("keydown",this.onKeyUpOrDown.bind(this));f=this.debuggerManager.jmcController.isJustMyCodeEnabled;this._callstackWindow.isJMCEnabled=f;i.F12.isTargetEdge&&(this._filePicker.addResourceRoot(t.ResourcesHandlers.WebStorageModel.LocalStorageModelName,i.Resources.getString("LocalStorageLabel")),this._filePicker.addResourceRoot(t.ResourcesHandlers.WebStorageModel.SessionStorageModelName,i.Resources.getString("SessionStorageLabel")),this._filePicker.addResourceRoot(t.ResourcesHandlers.CookiesModel.ModelName,i.Resources.getString("CookiesLabel")));this._debuggerManager.resourceViewController.registerListener(this)},u.prototype.logOnEditorLoadTelemetry=function(n,i){var r=this._editorWindow.getLineCount(),u={toolName:Common.ToolName.DEBUGGER,numberScriptsLoaded:this._filePicker.getTotalDocuments(),totalLineCount:r,averageLineColumnCount:Math.floor(i/r),selectedDocMimeType:n.mimeType,selectedDocID:n.frontendId,sourceMapState:n.sourceMapState};t.Telemetry.analytics.log(t.Telemetry.TelemetryEventName.EDITOR_LOAD_DEBUGGER,u)},u.prototype.getConsoleTop=function(){return this._isShowingEditorConsoleSplitter?this._console.getBoundingClientRect().top:document.body.offsetHeight},u.prototype.getEditorDimensions=function(){var n=this._editorConsoleContainer.offsetWidth,t=this._editorConsoleContainer.offsetHeight-this._console.offsetHeight;return{width:n,height:t}},u.prototype.showHideFindResultsWindow=function(n){if(n!==this.isShowingFindResults){if(n)this._findResultsVisibility!==0&&(this._findResultsVisibility=0,this._console.style.visibility="visible",this.showHideConsoleSpacer(!0),i.F12.getIsShowingConsole()&&(this._consoleVisibility=1,i.F12.showHideConsole()));else{this._findResultsVisibility=2;this._console.style.visibility="hidden";switch(this._consoleVisibility){case 2:this.showHideConsoleSpacer(!1);break;case 1:i.F12.getIsShowingConsole()||i.F12.showHideConsole()}this._findResultsWindow.isPinned=!1;this._editorWindow.hideTextSpotlightDecoration()}this.propertyChanged.invoke("isShowingFindResults")}},u.prototype.switchToBreakpointWindow=function(){this._bottomContainer.switchToTab(u.BREAKPOINTS_WINDOW_TAB_INDEX,!0)},u.prototype.breakpointChanged=function(){this._bottomContainer.contentVisible&&!this._debuggerManager.executionController.isExecutionPaused&&this._bottomContainer.switchToTab(u.BREAKPOINTS_WINDOW_TAB_INDEX,!0)},u.prototype.breakpointAdded=function(n){this.breakpointChanged(n)},u.prototype.breakpointRemoved=function(n){this.breakpointChanged(n)},u.prototype.conditionPromptInvoked=function(){},u.prototype.tracepointPromptInvoked=function(){},u.prototype.pendingBreakpointAdded=function(){},u.prototype.breakStateChanged=function(n){n&&(this._bottomContainer.contentVisible||this.toggleDataSplitterOrientation(1),this._bottomContainer.switchToTab(u.CALLSTACK_WINDOW_TAB_INDEX,!0))},u.prototype.exceptionFilterChanged=function(){},u.prototype.breakCallComplete=function(){},u.prototype.justMyCodeStateChanged=function(){},u.prototype.toggleDataSplitterOrientation=function(t){var e=this._controlsSplitPane.getBoundingClientRect(),r,f;t?r=t:this._topContainer.contentVisible&&this._bottomContainer.contentVisible?r=2:this._topContainer.contentVisible&&!this._bottomContainer.contentVisible?r=3:!this._topContainer.contentVisible&&this._bottomContainer.contentVisible?r=1:this._topContainer.contentVisible||this._bottomContainer.contentVisible||n.Utility.Assert.fail("Invalid splitter state.");r===2?(this._hDataWindowsSplitterBottomPx=u.MIN_CONTROLS_HEIGHT,this._controlsSplitPane.style.msGridRows=e.height-u.MIN_CONTROLS_HEIGHT+"fr 5px "+this._hDataWindowsSplitterBottomPx+"fr",this._topContainer.contentVisible=!0,this._bottomContainer.contentVisible=!1):r===3?(this._hDataWindowsSplitterBottomPx=e.height-u.MIN_CONTROLS_HEIGHT,this._controlsSplitPane.style.msGridRows=u.MIN_CONTROLS_HEIGHT+"fr 5px "+this._hDataWindowsSplitterBottomPx+"fr",this._topContainer.contentVisible=!1,this._bottomContainer.contentVisible=!0):r===1&&(f=this._msGridRowsStyleBoth.split(" "),this._hDataWindowsSplitterBottomPx=parseInt(f[f.length-1],10),this._controlsSplitPane.style.msGridRows=this._msGridRowsStyleBoth,this._topContainer.contentVisible=!0,this._bottomContainer.contentVisible=!0);i.F12.setRegEntryForF12(u.H_DATA_WINDOWS_SPLITTER,""+this._hDataWindowsSplitterBottomPx);this._debuggerManager.watchController.layout();this._callstackWindow.layout()},u.prototype.resourceOpened=function(n,t){t!==0&&(this._debuggerToolbar.searchControl.searchProvider=this._debuggerManager.resourceViewController.currentHandler.searchProvider||this._debuggerManager.documentController.searchProvider)},u.prototype.resourceClosed=function(){this._debuggerToolbar.searchControl.searchProvider=this._debuggerManager.documentController.searchProvider},u.prototype.layoutDocumentWindows=function(){this._debuggerManager.resourceViewController.doLayout();this.filePicker.doLayout();this.tabControl.doLayout();this.layoutErrorDisplay(!1)},u.prototype.layoutErrorDisplay=function(n){i.F12.ErrorDisplay.isShown&&i.F12.ErrorDisplay.resize(n)},u.prototype.onKeyDown=function(n){if(n.ctrlKey&&!n.altKey&&!n.shiftKey&&n.keyCode===9)return this._tabControl.selectNextTab(1),n.preventDefault(),!1;if(n.ctrlKey&&!n.altKey&&n.shiftKey){if(n.keyCode===9)return this._tabControl.selectPreviousTab(1),n.preventDefault(),!1;var t=parseInt(n.key);if(!isNaN(t)&&t>=1&&t<=9)return this._tabControl.trySelectTabByNumber(t,1),n.preventDefault(),!1}return!0},u.prototype.onKeyUpOrDown=function(n){if(n.ctrlKey&&n.shiftKey&&!n.altKey){if(n.keyCode===122)return this._breakpointWindow.toggleAll(1),!1;if(n.keyCode===74)return this._debuggerManager.jmcController.isJustMyCodeEnabled&&(this._callstackWindow.showLibraryFrames?t.Telemetry.analytics.logExecuteCommand(t.Telemetry.CommandName.TOGGLE_JMC_FRAMES_DISPLAY_OFF,1):t.Telemetry.analytics.logExecuteCommand(t.Telemetry.CommandName.TOGGLE_JMC_FRAMES_DISPLAY_ON,1),this._callstackWindow.showLibraryFrames=!this._callstackWindow.showLibraryFrames),!1}if(!n.ctrlKey&&n.altKey&&n.shiftKey){if(n.keyCode===66)return t.Telemetry.analytics.logExecuteCommand(t.Telemetry.CommandName.GO_TO_BREAKPOINT_WINDOW,1),this._bottomContainer.contentVisible||this.toggleDataSplitterOrientation(1),this._bottomContainer.switchToTab(u.BREAKPOINTS_WINDOW_TAB_INDEX),!1;if(n.keyCode===67)return t.Telemetry.analytics.logExecuteCommand(t.Telemetry.CommandName.GO_TO_CALLSTACK_WINDOW,1),this._bottomContainer.contentVisible||this.toggleDataSplitterOrientation(1),this._bottomContainer.switchToTab(u.CALLSTACK_WINDOW_TAB_INDEX),!1;if(n.keyCode===87)return this._topContainer.contentVisible||this.toggleDataSplitterOrientation(1),t.Telemetry.analytics.logExecuteCommand(t.Telemetry.CommandName.GO_TO_WATCH_WINDOW,1),this._topContainer.switchToTab(u.WATCHES_WINDOW_TAB_INDEX),!1;if(n.keyCode===84)return t.Telemetry.analytics.logExecuteCommand(t.Telemetry.CommandName.GO_TO_TOGGLE_WINDOW,1),this.toggleDataSplitterOrientation(),!1}if(n.ctrlKey&&!n.altKey&&!n.shiftKey){if(n.keyCode===87)return this._debuggerManager.watchController.addWatchByCurrentEditorPosition(1),!1;if(n.keyCode===115)return t.Telemetry.analytics.logExecuteCommand(t.Telemetry.CommandName.CLOSE_RESOURCE_VIEW,1),this._debuggerManager.resourceViewController.closeCurrent(!1),!1}return!n.ctrlKey&&n.altKey&&!n.shiftKey&&n.keyCode===106?(this._debuggerManager.executionController.isExecutionPaused&&this._debuggerManager.callstackController.goToActiveFrame(1),!1):!0},u.prototype.setupDataWindowsSplitter=function(){var n=this,t,r;this._msGridRowsStyleBoth=this._editorConsoleContainer.style.msGridRows;t=!1;this._hDataWindowsSplitter.addEventListener("mousedown",function(){if(!t){document.body.classList.add("splitterNS");var r=function(){var e=n._debuggerContent.getBoundingClientRect().height;n._currentResizeClientRect=null;i.F12.setRegEntryForF12(u.H_DATA_WINDOWS_SPLITTER,""+n._hDataWindowsSplitterBottomPx/e);document.body.classList.remove("splitterNS");document.removeEventListener("mousemove",f,!0);document.removeEventListener("mouseup",r,!0);n._resizePane.classList.remove("showResizePane");t=!1},f=function(t){if(t.buttons){n._currentResizeClientRect===null&&(n._currentResizeClientRect=n._controlsSplitPane.getBoundingClientRect());var i=n._currentResizeClientRect,f=i.height-t.clientY+i.top;t.clientY-i.top<u.MIN_CONTROLS_HEIGHT?(n._hDataWindowsSplitterBottomPx=i.height-u.MIN_CONTROLS_HEIGHT,n._controlsSplitPane.style.msGridRows=u.MIN_CONTROLS_HEIGHT+"fr 5px "+n._hDataWindowsSplitterBottomPx+"fr",n._topContainer.contentVisible=!1,n._bottomContainer.contentVisible=!0):f>u.MIN_CONTROLS_HEIGHT?(n._hDataWindowsSplitterBottomPx=f,n._controlsSplitPane.style.msGridRows=t.clientY-i.top+"fr 5px "+n._hDataWindowsSplitterBottomPx+"fr",n._msGridRowsStyleBoth=n._controlsSplitPane.style.msGridRows,n._topContainer.contentVisible=!0,n._bottomContainer.contentVisible=!0):(n._hDataWindowsSplitterBottomPx=u.MIN_CONTROLS_HEIGHT,n._controlsSplitPane.style.msGridRows=i.height-u.MIN_CONTROLS_HEIGHT+"fr 5px "+n._hDataWindowsSplitterBottomPx+"fr",n._topContainer.contentVisible=!0,n._bottomContainer.contentVisible=!1);n._debuggerManager.watchController.layout();n._callstackWindow.layout()}else r(t)};document.addEventListener("mousemove",f,!0);document.addEventListener("mouseup",r,!0);n._resizePane.classList.add("showResizePane");t=!0}});r=i.F12.getRegEntryForF12(u.H_DATA_WINDOWS_SPLITTER);r&&(this._hDataWindowsSplitterBottomPx=parseFloat(r),!isNaN(this._hDataWindowsSplitterBottomPx)&&this._hDataWindowsSplitterBottomPx<=1&&(this._controlsSplitPane.style.msGridRows="1fr 3px "+this._hDataWindowsSplitterBottomPx*100+"%"));this._hDataWindowsSplitter.addEventListener("dblclick",this.toggleDataSplitterOrientation.bind(this))},u.prototype.setupEditorConsoleSplitter=function(){var n=this,t=!1;this._hEditorConsoleSplitter.addEventListener("mousedown",function(){if(!t){document.body.classList.add("splitterNS");var r=function(){n._isShowingEditorConsoleSplitter&&(n._editorConsoleContainerMsGridRowsCSSUserSetting=n._editorConsoleContainer.style.msGridRows,i.F12.setRegEntryForF12(u.H_EDITOR_CONSOLE_SPLITTER_REG_KEY,n._editorConsoleContainerMsGridRowsCSSUserSetting));n._currentResizeClientRect=null;n.layoutDocumentWindows();n.setConsoleClientArea();document.body.classList.remove("splitterNS");document.removeEventListener("mousemove",f,!0);document.removeEventListener("mouseup",r,!0);n._resizePane.classList.remove("showResizePane");t=!1},f=function(t){if(t.buttons){if(n._isShowingEditorConsoleSplitter){n._currentResizeClientRect===null&&(n._currentResizeClientRect=n._editorConsoleContainer.getBoundingClientRect());var i=n._currentResizeClientRect,f=i.height-t.clientY+i.top;n._editorConsoleContainer.style.msGridRows=t.clientY-i.top<u.MIN_EDITOR_CONSOLE_HEIGHT?u.MIN_EDITOR_CONSOLE_HEIGHT+"fr 5px "+(i.height-u.MIN_EDITOR_CONSOLE_HEIGHT)+"fr":f>u.MIN_EDITOR_CONSOLE_HEIGHT?t.clientY-i.top+"fr 5px "+f+"fr":i.height-u.MIN_EDITOR_CONSOLE_HEIGHT+"fr 5px "+u.MIN_EDITOR_CONSOLE_HEIGHT+"fr";n.setConsoleClientArea();n.layoutDocumentWindows()}}else r(t)};n._hEditorConsoleSplitter.focus();document.addEventListener("mousemove",f,!0);document.addEventListener("mouseup",r,!0);n._resizePane.classList.add("showResizePane");t=!0}})},u.prototype.setupEditorDataWindowsSplitter=function(){var n=this,r=!1,f,e,t;this._vEditorDataWindowsSplitter.addEventListener("mousedown",function(){if(!r){document.body.classList.add("splitterEW");var t=function(){var e=n._debuggerContent.getBoundingClientRect().width;n._currentResizeClientRect=null;i.F12.setRegEntryForF12(u.V_EDITOR_SPLITTER_REG_KEY,""+n._vEditorSplitterRightPx/e);n.layoutDocumentWindows();n._debuggerManager.watchController.layout();n._callstackWindow.layout();n.setConsoleClientArea();document.body.classList.remove("splitterEW");document.removeEventListener("mousemove",f,!0);document.removeEventListener("mouseup",t,!0);n._resizePane.classList.remove("showResizePane");r=!1},f=function(i){i.buttons?n.setEditorSplitter(i):t(i)};n._vEditorDataWindowsSplitter.focus();document.addEventListener("mousemove",f,!0);document.addEventListener("mouseup",t,!0);n._resizePane.classList.add("showResizePane");r=!0}});f=i.F12.getRegEntryForF12(u.V_EDITOR_SPLITTER_REG_KEY);f&&(e=window.innerWidth===1?500:window.innerWidth,t=Math.max(parseFloat(f),u.MIN_CONTROLS_WIDTH/e),!isNaN(t)&&t<=1&&(this._debuggerContent.style.msGridColumns="1fr 3px "+t*100+"%"))},u.prototype.setEditorSplitter=function(n){this._currentResizeClientRect===null&&(this._currentResizeClientRect=this._debuggerContent.getBoundingClientRect());var i=this._currentResizeClientRect,t=i.width-(n.clientX?n.clientX:0);t>u.MIN_CONTROLS_WIDTH?(this._debuggerContent.style.msGridColumns=n.clientX+"fr 3px "+t+"fr",this._vEditorSplitterRightPx=t):(this._debuggerContent.style.msGridColumns=i.width-u.MIN_CONTROLS_WIDTH+"fr 3px "+u.MIN_CONTROLS_WIDTH+"fr",this._vEditorSplitterRightPx=u.MIN_CONTROLS_WIDTH);this.setConsoleClientArea();this.layoutDocumentWindows();this._debuggerManager.watchController.layout();this._callstackWindow.layout()},u.prototype.onError=function(n,t,i,r,u){var f,e;try{t&&(f=t.split("/"),f.length>0&&(t=f[f.length-1]));e=Common.ToolWindowHelpers.loadString("DebuggerScriptError")+"\r\n"+n+"\r\n"+Common.FormattingHelpers.fileLineColumnFormat(t,i,u)+"\r\n"+r;throw e}catch(o){}},u.prototype.onConsoleShowHideStateChanged=function(n){n?(this.showHideConsoleSpacer(!0),this._consoleVisibility=0,this._findResultsVisibility===0&&this.findResultsWindow.isPinned?this._findResultsVisibility=1:(this._findResultsVisibility=2,this._console.style.visibility="hidden")):this._findResultsVisibility===0?this._consoleVisibility=1:(this._consoleVisibility=2,this._findResultsVisibility===1?(this._findResultsVisibility=0,this.showHideConsoleSpacer(!0)):this.showHideConsoleSpacer(!1));this.propertyChanged.invoke("isShowingFindResults")},u.prototype.showHideConsoleSpacer=function(n){var t=this;n?(this._console.style.display="",this._hEditorConsoleSplitter.style.display="",this._editorConsoleContainer.style.msGridRows=this._editorConsoleContainerMsGridRowsCSSUserSetting?this._editorConsoleContainerMsGridRowsCSSUserSetting:u.EDITOR_CONSOLE_CONTAINER_MSGRIDROWS_CSS_DEFAULT,window.setImmediate(function(){t.setConsoleClientArea()})):(this._editorConsoleContainer.style.msGridRows=u.EDITOR_CONSOLE_CONTAINER_MSGRIDROWS_CSS_HIDDEN,this._console.style.display="none",this._hEditorConsoleSplitter.style.display="none",this._debuggerManager&&this._debuggerManager.watchController&&(this._debuggerManager.watchController.intellisenseContext.intellisenseMenu.forbiddenBottomLeftRect=null));this._debuggerManager&&this.layoutDocumentWindows()},u.prototype.setConsoleClientArea=function(){if(this._isShowingEditorConsoleSplitter&&i.F12){var n=this._console.getBoundingClientRect();this._debuggerManager&&this._debuggerManager.watchController&&(this._debuggerManager.watchController.intellisenseContext.intellisenseMenu.forbiddenBottomLeftRect=n);i.F12.setConsoleClientArea(n.left,n.top,n.right,n.bottom);this._findResultsVisibility!==2&&this.findResultsWindow.layout()}},u.MIN_EDITOR_CONSOLE_HEIGHT=120,u.EDITOR_CONSOLE_CONTAINER_MSGRIDROWS_CSS_DEFAULT="3fr 5px 200px",u.EDITOR_CONSOLE_CONTAINER_MSGRIDROWS_CSS_HIDDEN="1fr 0fr 0fr",u.MIN_CONTROLS_WIDTH=180,u.MIN_CONTROLS_HEIGHT=25,u.H_EDITOR_CONSOLE_SPLITTER_REG_KEY="DebuggerHEditorConsoleSplitterPosition",u.V_EDITOR_SPLITTER_REG_KEY="DebuggerVEditorSplitterPosition",u.H_DATA_WINDOWS_SPLITTER="DebuggerHDataWindowsSplitterPosition",u.WATCHES_WINDOW_TAB_INDEX=0,u.CALLSTACK_WINDOW_TAB_INDEX=0,u.BREAKPOINTS_WINDOW_TAB_INDEX=1,u}();t.DebuggerShell=u;r=function(){function n(n){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=!0;this._shell=n}return n.prototype.addTab=function(n,t,r,u){var f=this,l=i.Resources.getString(t),c=i.Resources.getString(r),e=document.createElement("span"),o,h,s;e.id="tab-"+n;e.className="tabTitle";e.innerText=l;e.tabIndex=u?u:1;e.setAttribute("data-plugin-vs-tooltip",c);e.setAttribute("aria-label",c);e.setAttribute("role","tab");o=this.tabs.length;h=function(){f.switchToTab(o);f.contentVisible||(f.contentVisible=!0,f._shell.toggleDataSplitterOrientation(1))};e.addEventListener("click",h);e.addEventListener("focus",h);e.addEventListener("keydown",function(n){n.keyCode===32||n.keyCode===13?(f.switchToTab(o),f.contentVisible||(f.contentVisible=!0,f._shell.toggleDataSplitterOrientation(1))):n.keyCode===37?o>0?f.switchToTab(o-1):o===0&&f.switchToTab(f.tabs.length-1):n.keyCode===39&&(o<f.tabs.length-1?f.switchToTab(o+1):o===f.tabs.length-1&&f.switchToTab(0))});this.tabStrip.appendChild(e);s=document.getElementById(n);s.classList.add("controlContents");this.contentPane.appendChild(s);this.tabs.push({titleElement:e,contentElement:s});this.activeIndex===-1&&(this.activeIndex=0,this.tabs[this.activeIndex].contentElement.classList.add("controlVisible"),this.tabs[this.activeIndex].titleElement.classList.add("selected"))},n.prototype.switchToTab=function(n,t){this.tabs[n]&&(this.activeIndex!==n&&(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=n,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")),t||this.tabs[this.activeIndex].titleElement.focus())},n}();t.Container=r;t.debuggerTraceWriter})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(i){function r(){i.apply(this,arguments)}return __extends(r,i),r.prototype.onStartup=function(){var i=new t.DebuggerShell;debuggerShellForTestContractsOnly=i;n.Tools.Debugger.debuggerTraceWriter=debuggerShellForTestContractsOnly;i.initializeUI()},r}(Common.App);t.App=new i})(i=t.Debugger||(t.Debugger={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(t){function i(n){t.call(this,null,!1,!1,!1,null,"listview-grid-cell-clicksection");n&&(this._model=n,this._modelId=n.id,this._previousDisplayName=this._model.displayName,this.toolTip=i.tooltipForModel(n),this.iconCssClass=n.modelName);this._sortedChildren=[]}return __extends(i,t),Object.defineProperty(i.prototype,"model",{get:function(){return this._model},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"searchName",{get:function(){return this.displayName},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"displayName",{get:function(){return this.model?this._previousDisplayName:this._staticDisplayName},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"modelId",{get:function(){return this._modelId},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hasChildren",{get:function(){return this.childCount>0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isRootItem",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"htmlLines",{get:function(){return this._htmlLines||(this._htmlLines=this.generateHtmlLines()),this._htmlLines},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"children",{get:function(){return this.dynamicDocumentsNode&&this.dynamicDocumentsNode.hasChildren?this._sortedChildren.concat([this.dynamicDocumentsNode]):this._sortedChildren},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"childCount",{get:function(){return this.dynamicDocumentsNode&&this.dynamicDocumentsNode.hasChildren?this._sortedChildren.length+1:this._sortedChildren.length},enumerable:!0,configurable:!0}),i.createWithoutModel=function(n){var t=new i(null);return t._modelId=Common.ResourcesView.ResourceViewController.NextModelId++,t._staticDisplayName=n,t._previousDisplayName=n,t.iconCssClass="filesNode",t.toolTip=n,t},i.prototype.addChild=function(t){if(Common.ToolWindowHelpers.isNumber(t.modelId)){var i=this.getIndexOfChild(t);i<this._sortedChildren.length&&t===this._sortedChildren[i]?n.Utility.Assert.fail("Adding a child FilePickerItem that is already in the parent"):this._sortedChildren.splice(i,0,t)}},i.prototype.removeChild=function(n){if(Common.ToolWindowHelpers.isNumber(n.modelId)){var t=this.getIndexOfChild(n);t<this._sortedChildren.length&&n===this._sortedChildren[t]&&this._sortedChildren.splice(t,1)}},i.prototype.getChildren=function(n,t){t(this.children)},i.prototype.refresh=function(){this._htmlLines=null},i.prototype.generateHtmlLines=function(){var n=Common.EncodingUtilities.escapeHtml(Common.EncodingUtilities.replaceSpacesWithNonBreakingSpaceEntities(this.toolTip));return["<div role='menuitem'><div class='listview-grid-cell-clicksection filePickerItem "+this.iconCssClass+"'><\/div><span class='listview-grid-cell-clicksection fileItem' data-frontendId='"+this.modelId+"' data-plugin-vs-tooltip='"+n+"'>"+this.getEditPendingIndicator()+Common.EncodingUtilities.replaceLineBreaksWithNonBreakingSpaceEntities(Common.EncodingUtilities.escapeHtml(this.displayName))+"<\/span><\/div><span style='display: none'>"+this.getAdditionalAriaText()+"<\/span>"]},i.prototype.getIndexOfChild=function(n){var r,u;if(this._sortedChildren.length===0)return 0;for(r=0,u=this._sortedChildren.length-1;r<=u;){var t=Math.floor((r+u)/2),f=this._sortedChildren[t],i=Common.ToolWindowHelpers.naturalSort(n.displayName,f.displayName);if(i===0&&(i=n.modelId-f.modelId),i===0)return t;i>0?r=t+1:u=t-1}return i>0?t+1:t},i.prototype.updateChildDisplayName=function(n){this.removeChild(n);n.toolTip=i.tooltipForModel(n.model);n._previousDisplayName=n.model.displayName;this.addChild(n)},i.prototype.getAdditionalAriaText=function(){return""},i.prototype.getEditPendingIndicator=function(){return""},i.tooltipForModel=function(n){return typeof n.tooltip=="undefined"?n.displayName:n.tooltip},i}(Common.ObjectView.TreeViewItem);t.FilePickerItem=i})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(i){function r(t,r){var u=this,f,e;i.call(this,t);this.iconCssClass=this.getIconCssClass();this.buttonItems=[];this.doc.isNormallyEditable&&this.doc.hasEdits&&(f={buttonClass:"diffIcon",checkedTooltip:"DiffOffTooltip",uncheckedTooltip:"DiffOffTooltip",clickHandler:function(){r.debuggerManager.docDiffHandler.openDiffForDoc(t);r.filePicker.hidePicker()},isEnabled:!0,isChecked:!1},this.buttonItems.push(f));!this.doc.isUnnamedDynamicDoc&&Common.MediaTypeManager.isJMCEnabledForMediaType(this.doc.mimeType)&&(e={buttonClass:"libraryIcon",checkedTooltip:"FilePickerMyCodeTooltip",uncheckedTooltip:"FilePickerLibraryCodeTooltip",clickHandler:function(){u.isLibraryFile?n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.TOGGLE_LIBRARY_FILE_OFF,0):n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.TOGGLE_LIBRARY_FILE_ON,0);u.isLibraryFile=!u.isLibraryFile},isEnabled:!0,isChecked:this.isLibraryFile},this.buttonItems.push(e));t.propertyChanged.addHandler(function(n){n==="isEditPending"&&u.refresh()})}return __extends(r,i),Object.defineProperty(r.prototype,"searchName",{get:function(){return this.doc.url.getComponents(Common.UriComponents.AbsoluteUri,2)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isLibraryFile",{get:function(){return this.doc.isLibraryFile},set:function(n){this.doc.setIsLibraryFile(n,3)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"doc",{get:function(){return this.model},enumerable:!0,configurable:!0}),r.prototype.getAdditionalAriaText=function(){return this.doc.isLibraryFile?t.Resources.getString("CallstackLibraryCode"):""},r.prototype.getEditPendingIndicator=function(){return this.doc.isEditPending?"*":""},r.prototype.getIconCssClass=function(){for(var n=null,i=this.doc.getMimeTypeCandidates(),t=0;t<i.length&&!n;t++)switch(i[t]){case"text/html":case"text/xml":n="htmlFile";break;case"text/css":case"text/less":case"text/scss":n="cssFile";break;case"text/typescript":n="tsFile";break;case"text/javascript":n="scriptFile"}return n||(n="scriptFile"),n},r.DYNAMIC_SCRIPTS="custom/dynamicScript",r.JMC_BUTTON_INDEX=0,r}(n.FilePickerItem);n.DocFilePickerItem=i})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){this._internalMap={};this._valueToKey=[]}return n.prototype.getFirstValue=function(n){var t=this._internalMap[n];return t&&t.length>0?t[0]:null},n.prototype.getValues=function(n){return this._internalMap[n]||[]},n.prototype.add=function(n,t){this._internalMap[n]=this._internalMap[n]||[];this._internalMap[n].indexOf(t)===-1&&this._internalMap[n].push(t);this._valueToKey[t]=n},n.prototype.remove=function(n){var r=this._valueToKey[n],t=this._internalMap[r],i;return t&&(i=t.indexOf(n),i>=0)?(t.splice(i,1),delete this._valueToKey[n],!0):!1},n}();n.NumberMultiMap=t})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(){function i(n,t,i){var r=this;i===void 0&&(i=!1);this.propertyChanged=new Common.EventSource;this.changesCompleted=new Common.EventSource;this._rawLocation=n;this._fallbackLocation=t;this._preferFallback=i;this._displayDocPropertyChangeRegistrations=[];n.doc?(this._displayPositions=[this._rawLocation.doc.getDisplayPosition(this._rawLocation.offset),this._rawLocation.doc.getDisplayPosition(this._rawLocation.offset+this._rawLocation.length)],this._displayPositions[0]&&this._displayPositions[1]&&this.arePositionsEqual(this._displayPositions[0],this._displayPositions[1])&&(this._displayPositions[1].column+=this._rawLocation.length),this._rawDocLocationsInvalidatedRegistration=this._rawLocation.doc.locationsInvalidated.addHandler(function(){return r.onRawDocumentLocationsInvalidated()})):this._displayPositions=[];t&&(i?(this._displayPositions[0]=t.startPosition||this._displayPositions[0],this._displayPositions[1]=t.endPosition||this._displayPositions[1]):(this._displayPositions[0]=this._displayPositions[0]||t.startPosition,this._displayPositions[1]=this._displayPositions[1]||t.endPosition))}return Object.defineProperty(i.prototype,"rawLocation",{get:function(){return this._rawLocation},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startPosition",{get:function(){return this._displayPositions[0]},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startDisplayText",{get:function(){return t.DocumentLocation.getPositionDisplayText(this._displayPositions[0])},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endPosition",{get:function(){return this._displayPositions[1]},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endDisplayText",{get:function(){return t.DocumentLocation.getPositionDisplayText(this._displayPositions[1])},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"lineNumber",{get:function(){return this._displayPositions[0].line},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"column",{get:function(){return this._displayPositions[0].column},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startLineNumber",{get:function(){return this.lineNumber},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"startColumn",{get:function(){return this.column},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endLineNumber",{get:function(){return this._displayPositions[1].line},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endColumn",{get:function(){return this._displayPositions[1].column},enumerable:!0,configurable:!0}),i.prototype.copy=function(){return new i(this._rawLocation,this._fallbackLocation,this._preferFallback)},i.prototype.cleanup=function(){this._rawDocLocationsInvalidatedRegistration&&(this._rawDocLocationsInvalidatedRegistration.unregister(),this._rawDocLocationsInvalidatedRegistration=null);for(var n=0;n<2;n++)this._displayDocPropertyChangeRegistrations[n]&&(this._displayDocPropertyChangeRegistrations[n].unregister(),this._displayDocPropertyChangeRegistrations[n]=null),this._displayPositions[n]=null;this._rawLocation=null},i.prototype.onRawDocumentLocationsInvalidated=function(){var n=this;this.updateDisplayPosition(0,this.rawLocation.offset,function(t){return n.onDisplayDocumentPropertyChanged(t,0)});this.updateDisplayPosition(1,this.rawLocation.offset+this.rawLocation.length,function(t){return n.onDisplayDocumentPropertyChanged(t,1)});this.changesCompleted.invoke()},i.prototype.updateDisplayPosition=function(t,i,r){var f=this._displayPositions[t],u=this.rawLocation.doc.getDisplayPosition(i);if(this._preferFallback&&u&&u.doc&&u.doc.frontendId===this._fallbackLocation.startPosition.doc.frontendId&&(u=t===0?this._fallbackLocation.startPosition:this._fallbackLocation.endPosition),t>0&&this._displayPositions&&this._displayPositions[0]&&this._displayPositions[1]&&this.arePositionsEqual(this._displayPositions[t-1],u)&&(u.column+=this.rawLocation.length),!this.arePositionsEqual(f,u)){if(this._displayDocPropertyChangeRegistrations[t]&&(this._displayDocPropertyChangeRegistrations[t].unregister(),this._displayDocPropertyChangeRegistrations[t]=null),this._displayPositions[t]=u,u&&u.doc&&(this._displayDocPropertyChangeRegistrations[t]=u.doc.propertyChanged.addHandler(r)),t===0){this.propertyChanged.invoke("startDisplayPosition");this.propertyChanged.invoke("startDisplayText");return}if(t===1){this.propertyChanged.invoke("endDisplayPosition");this.propertyChanged.invoke("endDisplayText");return}n.Utility.Assert.fail("updateDisplayPosition propertyPrefix must be 'start' or 'end'.")}},i.prototype.onDisplayDocumentPropertyChanged=function(t,i){t==="url"&&(i===0?this.propertyChanged.invoke("startDisplayText"):i===1?this.propertyChanged.invoke("endDisplayText"):n.Utility.Assert.fail("onDisplayDocumentPropertyChanged prefix must be 'start' or 'end'."))},i.prototype.arePositionsEqual=function(n,t){return n||t?n&&t?n.doc===t.doc&&n.line===t.line&&n.column===t.column:!1:!0},i}();t.DynamicLocation=i})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(){"use strict"})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){var i;(function(i){"use strict";var r=Microsoft.Plugin,u=Common.Uri,o=Common.UriComponents,s=Common.UriFormat,f=function(){function f(n,t,i,r){t===void 0&&(t={});r===void 0&&(r=!1);this.propertyChanged=new Common.EventSource;this.locationsInvalidated=new Common.EventSource;this._frontendId=Common.ResourcesView.ResourceViewController.NextModelId++;this._runtimeId=n.id;this._isRootChild=n.isRootChild;this._url=new u(n.url||"");this.mimeType=n.mimeType;this._isDynamicCode=t.rawDoc&&t.rawDoc.isDynamicCode||n.isDynamicCode;this._headers=n.headers;this._length=n.length||0;this._rawDoc=t.rawDoc;this._sourceIndex=t.sourceIndex;this._isRuntimeDocument=typeof this._runtimeId=="number"&&this._runtimeId>=0;this.longDocumentId=n.longDocumentId;this._debuggerManager=i;this._documentController=i&&i.documentController;this._persistenceManager=i&&i.persistenceManager;this._formatter=null;t.parent?this._runtimeParent=t.parent:n.parentId&&this._documentController&&(this._runtimeParent=this._documentController.getDocFromRuntimeId(n.parentId));this._formattingPromise=null;this._timerId=null;this._timerPromise=Common.PromiseUtilities.EmptyPromise;this._currentTextIsOutdated=!0;this._prettyPrintEnabled=!1;this._isEmpty=!1;t.sourceContent&&this.setUnformattedText(t.sourceContent,!1);r||this.processSourceMap(n.sourceMapUrl,n.sourceUrlOverride);this._isLibraryFile=this.isLibraryFile;this._isRuntimeDocument||r||this.findAndProcessSourceMap()}return Object.defineProperty(f.prototype,"modelName",{get:function(){return f.ModelName},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"toolbarPanelTemplate",{get:function(){return"Debugger.debuggerDocumentPanel"},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"rawDoc",{get:function(){return this._rawDoc},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"sourceMap",{get:function(){return this._sourceMap},set:function(n){var r=this,t;this._sourceMap!==n&&(t=this.sourceMapState,this._sourceMap&&this._sourceMapChangeRegistration.unregister(),this._sourceMap=n,this._sourceMap&&(this._sourceMapChangeRegistration=this._sourceMap.propertyChanged.addHandler(function(n){n==="sourceMapState"&&(i.debuggerTraceWriter.traceWriter.raiseEvent(365),r.fireSourceMapStateChanged().then(function(){i.debuggerTraceWriter.traceWriter.raiseEvent(366)}))})),this.sourceMapState!==t&&this.fireSourceMapStateChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"isAuthored",{get:function(){return!!this._rawDoc},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"sourceMapState",{get:function(){return this.rawDoc?this.rawDoc.sourceMap.sourceMapState:!this.sourceMap||this.hasEdits?2:this.sourceMap.sourceMapState},set:function(n){this.rawDoc?this.rawDoc.sourceMap.sourceMapState=n:this.sourceMap&&(this.sourceMap.sourceMapState=n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"sourceMapEnabled",{get:function(){return this.sourceMapState!==1},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"runtimeId",{get:function(){return this._runtimeId},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"isRootChild",{get:function(){return this._isRootChild},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"url",{get:function(){return this._url},set:function(n){u.equals(this._url,n)||(this._url=n,this._monacoUrl=null,this._lastWorkspaceMapper=null,this.propertyChanged.invoke("url"))},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"isDynamicCode",{get:function(){return this._isDynamicCode},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"originalDynamicName",{get:function(){return this._originalDynamicName},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"isUnnamedDynamicDoc",{get:function(){return this._isDynamicCode&&!this._originalDynamicName},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"editorState",{get:function(){return this._editorState},set:function(n){this._editorState=n},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"frontendId",{get:function(){return this._frontendId},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"parent",{get:function(){return this._runtimeParent&&this._runtimeParent.sourceMapState===0&&this._runtimeParent.sourceMap&&this._runtimeParent.sourceMap.sources&&this._runtimeParent.sourceMap.sources.length>0?this._runtimeParent.sourceMap.sources[0]:this._runtimeParent},set:function(n){this._runtimeParent=n;this._sourceMap&&this._sourceMap.sources&&this._sourceMap.sources.forEach(function(t){return t.parent=n})},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"libraryState",{get:function(){return!this._debuggerManager.jmcController.isJustMyCodeEnabled||!Common.MediaTypeManager.isJMCEnabledForMediaType(this.mimeType)?2:this.isLibraryFile?0:1},set:function(n){if(this._debuggerManager.jmcController.isJustMyCodeEnabled&&n!==2){var t=n===0?!0:!1;this.setIsLibraryFile(t,3).done()}},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"isLibraryFile",{get:function(){if(!this.isDynamicCode&&this._debuggerManager){var n=this.rawDoc||this,t=this._debuggerManager.jmcController.getJMCTypeForUrl(n.url&&n.url.toString());return t!==r.F12.JMCType.UserCode&&t!==r.F12.JMCType.Unsure}return!1},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"isRuntimeDoc",{get:function(){return this._isRuntimeDocument},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"canFormat",{get:function(){return this._formatter&&this._formatter.canFormat&&!this.isAuthored&&!this.isEditPending},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"prettyPrintState",{get:function(){return this.canFormat?this._prettyPrintEnabled?0:1:2},set:function(n){var t=this;this.canFormat&&n!==this.prettyPrintState&&(n===0?(this._prettyPrintEnabled=!0,this._formatter.options.prettyPrint=!0,this.doFormatting().done(function(){return t._debuggerManager.testEventObject.fireEvent("prettyPrintToggleCompleted")})):(this._prettyPrintEnabled=!1,this._formatter.options.prettyPrint=!1,this.updateCurrentTextMapping()),this.firePrettyPrintStateChanged(),this.editorWindow.requestedIsWritable=this.isEditable,this.propertyChanged.invoke("isEditable"))},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"prettyPrintEnabled",{get:function(){return this._prettyPrintEnabled},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"editorWindow",{get:function(){return this._debuggerManager.debuggerShell.editorWindow},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"hasText",{get:function(){return!!this._unformattedTextMapping},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"hasTextMapping",{get:function(){return!!this._currentTextMapping},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"isNormallyEditable",{get:function(){return this.isEditSourceSupported&&!this.isAuthored&&Common.MediaTypeManager.isEditableMediaType(this.mimeType)&&(this.mimeType!=="text/javascript"||this.isRuntimeDoc)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"isEditable",{get:function(){return this.isNormallyEditable&&!this._debuggerManager.executionController.isExecutionPaused&&this.isLastRevision},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"isEditSourceSupported",{get:function(){return r.F12.isTargetEdge},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"hasEdits",{get:function(){return this._isEditPending||!!this._previousRevision||!!this._nextRevision},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"isEditPending",{get:function(){return this._isEditPending},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"isCommitPending",{get:function(){return this._isCommitPending},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"id",{get:function(){return this.frontendId},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"displayName",{get:function(){return Common.ToolWindowHelpers.createShortenedUrlText(this.url)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"tooltip",{get:function(){return this._url.toString()},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"previousRevision",{get:function(){return this._previousRevision},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"nextRevision",{get:function(){return this._nextRevision},set:function(n){this._nextRevision=n;n._previousRevision=this},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"latestRevision",{get:function(){return this._nextRevision?this._nextRevision.latestRevision:this},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"originalRevision",{get:function(){return this._previousRevision?this._previousRevision.originalRevision:this},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"isLastRevision",{get:function(){return!this._nextRevision},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"canEditBreakpoints",{get:function(){return this.isRuntimeDoc&&this.isLastRevision&&!this.isEditPending},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"styleSheetInfo",{get:function(){return this._styleSheetInfo},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"persistenceKey",{get:function(){return this.url.toString().toLowerCase()},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"shouldBePersisted",{get:function(){return!this.isDynamicCode},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"persistedPropNames",{get:function(){return["prettyPrintEnabled","sourceMapEnabled"]},enumerable:!0,configurable:!0}),f.createNonRuntimeDoc=function(n,t,r,u){return new f(new i.Source(undefined,u,!1,n,t,0,!1,undefined),{},r)},f.createNonRuntimeCssDoc=function(n,t,r){r===void 0&&(r=!1);var e=new i.Source(undefined,undefined,!1,n.url,"text/css",0,!1,undefined),u=new f(e,{},t,r);return u._styleSheetInfo=n,u},f.initialize=function(){f.SourceMapFileDialogOptions={extensions:["map"],extensionsIndex:0,initialDirectory:"",name:"",title:""};f.SourceMapFileOptions={access:1,encoding:"UTF-8",mode:3,share:3,type:1}},f.prototype.getMonacoUri=function(n){if(!n)throw new TypeError("Argument not optional: mapper.");return this._monacoUrl&&this._lastWorkspaceMapper===n?this._monacoUrl:(this._url&&(this._monacoUrl=n.getWorkspaceUri(this._url,!0),this._lastWorkspaceMapper=n),this._monacoUrl)},f.prototype.setIsLibraryFile=function(n,t){var u=this,f=n?i.Telemetry.CommandName.TOGGLE_LIBRARY_FILE_ON:i.Telemetry.CommandName.TOGGLE_LIBRARY_FILE_OFF;return i.Telemetry.logCommandWrapper(f,t,function(){var t=u.rawDoc||u,i;return!t.isUnnamedDynamicDoc&&t.isRuntimeDoc&&u._debuggerManager?(i=n?r.F12.JMCType.Library:r.F12.JMCType.UserCode,u._debuggerManager.jmcController.setJMCTypeForUrl(t.url&&t.url.toString(),i).then(function(n){return u.propertyChanged.invoke("libraryState"),n})):r.Promise.as(!1)})},f.prototype.open=function(){this._isOpen||(this._isOpen=!0,this.propertyChanged.invoke("isOpen"))},f.prototype.close=function(){this.isOpen&&(this._isOpen=!1,this.propertyChanged.invoke("isOpen"));this.cancelPendingActions();this.isRuntimeDoc&&!this.isAuthored&&(this._formatter=null,this._currentTextIsOutdated=!0,this._fetchTextPromise=null,this._ignoreExistingText=!0,this.sourceMap||(this._currentTextMapping=null,this._unformattedTextMapping=null),this.firePrettyPrintStateChanged())},f.prototype.onMoreTextAvailable=function(n){if(n>this._length){this._currentTextIsOutdated=!0;this._fetchTextPromise=null;this._ignoreExistingText=!1;this._length=n;var t=this._currentTextMapping&&this._currentTextMapping.text&&this._currentTextMapping.text.length||0;this.onDocumentContentUpdated(t)}},f.prototype.rawPositionToRawOffset=function(n,t){return this._unformattedTextMapping?this._unformattedTextMapping.positionToOffset({line:n-1,column:t-1}):0},f.prototype.setUnformattedText=function(n,t,i){var r=this,f=this.prettyPrintState,u;return this.createFormatterIfNecessary(),u=this._formatter,this._isEmpty=n==="",u.setDocument(n,this.url&&this.url.toString(),this.mimeType,this._headers,t&&this.canFormat).then(function(){if(r._length=n.length,r._currentTextIsOutdated=!1,r._ignoreExistingText=!1,r._fetchTextPromise=null,r._unformattedTextMapping=r._formatter.sourceText,r.updateCurrentTextMapping(),r._formattingPromise&&(r._formattingPromise.cancel(),r._formattingPromise=null),typeof i!="undefined")r.prettyPrintState=i;else if(r._persistenceManager){var t=r._persistenceManager.isPrettyPrintEnabled(r);typeof t=="boolean"&&t&&(r.prettyPrintState=0)}return r._prettyPrintEnabled&&(u.options.prettyPrint=!0,r.doFormatting()),r.prettyPrintState!==f&&r.firePrettyPrintStateChanged(),r._unformattedTextMapping.text})},f.prototype.appendUnformattedText=function(n){this.setUnformattedText(this._unformattedTextMapping.text+n)},f.prototype.makeRuntimeDocument=function(n,t,i){i===void 0&&(i=!1);this._isRuntimeDocument=!0;this._runtimeId=n.id;this.mimeType=n.mimeType;this._runtimeParent=t;this._isRootChild=n.isRootChild;this._currentTextIsOutdated=!0;this._fetchTextPromise=null;this._ignoreExistingText=!0;i||this.loadSourceMapFromUrl(n.sourceMapUrl);this._prettyPrintEnabled&&this.getText()},f.prototype.makeStyleSheetDoc=function(n){this._styleSheetInfo=n},f.prototype.onDocumentContentUpdated=function(){var n=this;return t.Utility.Assert.isTrue(this._isRuntimeDocument,"The requested document is not loaded in the current page"),this._currentTextIsOutdated=!0,this._fetchTextPromise=null,this.isOpen?this.queueCallback(function(t,i){n.getText().done(t,null,i)}):Common.PromiseUtilities.EmptyPromise},f.prototype.getText=function(){var n=this;return new r.Promise(function(t,i,u){var e=function(){n._currentTextMapping&&n._currentTextMapping.text?t(n._currentTextMapping.text):n._isEmpty?t(""):t(r.Resources.getString("OpenFileProgress",n.url.toString()))},o=function(){t(r.Resources.getString("OpenFileFailed",n.url.toString()))};n._currentTextIsOutdated||!n._currentTextMapping?(u(n._currentTextMapping&&n._currentTextMapping.text||r.Resources.getString("OpenFileProgress",n.url.toString())),n.fetchText(n._isRuntimeDocument&&n.isOpen).then(function(t){return t===null?r.Promise.wrapError(null):(n._currentTextMapping&&n._currentTextMapping!==n._unformattedTextMapping||u(t||r.Resources.getString("OpenFileProgress",n.url.toString())),t!==""||n._emptyTimeoutId||(n._emptyTimeoutId=window.setTimeout(function(){n._currentTextMapping&&n._currentTextMapping.text!==""||(n._isEmpty=!0,n._debuggerManager.documentController.documentTextOrMimeTypeUpdated(n,"",!1))},f.EMPTY_TIMEOUT)),n.doFormatting())}).then(e,o)):n._formatter&&n._prettyPrintEnabled&&n._currentTextMapping!==n._formattedTextMapping?n.doFormatting().done(e,e):e()}).then(function(n){return n})},f.prototype.hasSourceMapping=function(n){if(!this.sourceMap||this.sourceMapState!==0||!this._unformattedTextMapping)return!0;var t=this._unformattedTextMapping.offsetToPosition(n);return t?this.sourceMap.hasOriginalSourceLocation(t):!0},f.prototype.getDisplayPosition=function(n,t){t===void 0&&(t=!0);var r,i;return this._unformattedTextMapping&&(r=this._unformattedTextMapping.offsetToPosition(n)),t&&this.sourceMapState===0&&this.sourceMap&&r?(i=this.sourceMap.getOriginalSourceLocation(r),{doc:this.sourceMap.sources[i.file],line:i.line+1,column:i.column+1}):this._currentTextMapping&&r?(i=this._currentTextMapping.getMappedPosition(r),{doc:this,line:i.line+1,column:i.column+1}):null},f.prototype.getRawLocation=function(n,t){var i={file:this._sourceIndex||0,line:n.line-1,column:n.column-1},r,u;return this.isAuthored?(r=this.rawDoc.sourceMap.getGeneratedFileLocation(i),this.rawDoc.getRawLocation({doc:this.rawDoc,line:r.line+1,column:r.column+1},!0)):this._unformattedTextMapping?(u=this._currentTextMapping&&!t?this._currentTextMapping.getOriginalPosition(i):i,{doc:this,offset:this._unformattedTextMapping.positionToOffset(u),length:0}):{doc:this,offset:null,length:0}},f.prototype.createDocumentLocation=function(n,t){var r=this.rawDoc||this,u=r.getDisplayPosition(n),f=r.getDisplayPosition(n+t),e={doc:r,offset:n,length:t};return u&&f?new i.DocumentLocation(u.doc,u.line,u.column,f.doc,f.line,f.column,e):new i.DocumentLocation(r,1,1,r,1,1,e)},f.prototype.getPathFromUrl=function(n){var t=Math.max(n.lastIndexOf("/"),n.lastIndexOf("\\"));return t>=0?n.substr(0,t+1):this.parent?this.parent.getPathFromUrl(this.parent.url&&this.parent.url.toString()):""},f.prototype.getMimeTypeCandidates=function(){var n=[],r=this.rawDoc&&this.rawDoc.sourceMap,t,i;return r&&(t=r.getMediaType(this),t&&n.unshift(t)),this.mimeType&&n.push(Common.MediaTypeManager.getCanonicalMediaType(this.mimeType)),i=this.url.getComponents(64,2),i&&n.push(Common.MediaTypeManager.getMediaTypeForFileExtension(i)),n.push(this.isAuthored?"text/javascript":"text/plain"),Common.MediaTypeManager.getSortedMediaTypes(n)},f.prototype.loadSourceMapFromFileSystem=function(t){var u=this;i.Telemetry.logCommandWrapper(i.Telemetry.CommandName.CHOOSE_SOURCE_MAP_FILE_LOCATION,t,function(){n.Tools.Utility.Assert.isFalse(u.hasEdits);r.Storage.openFileDialog(f.SourceMapFileDialogOptions,f.SourceMapFileOptions).done(function(n){if(n){var t=r.F12.getFilePathFromStreamId(n.streamId);u.loadSourceMapFromUrl(t);n.close()}},function(){})})},f.prototype.sourceMapContainsLocalVariablesMapping=function(){var n=this.isAuthored?this._rawDoc.sourceMap:this._sourceMap;return n&&n.containsLocalVariablesMapping()},f.prototype.getGeneratedIdentifierName=function(n){var i=this.getZeroBasedActiveFrameRawPosition(),t,r;return i&&this.isAuthored?(n=n.trim(),t=n.indexOf("."),t>0?(r=this.rawDoc.sourceMap.getGeneratedName(n.substring(0,t),i),r+n.substring(t)):this.rawDoc.sourceMap.getGeneratedName(n,i)):n},f.prototype.getAuthoredIdentifierName=function(n){var i=this.getZeroBasedActiveFrameRawPosition(),t,r;return i&&this.isAuthored?(n=n.trim(),t=n.indexOf("."),t>0?(r=this.rawDoc.sourceMap.getAuthoredName(n.substring(0,t),i),r+n.substring(t)):this.rawDoc.sourceMap.getAuthoredName(n,i)):n},f.prototype.isRevision=function(n){for(var t=this.latestRevision;t;t=t.previousRevision)if(t===n)return!0;return!1},f.prototype.beginEdit=function(){if(n.Tools.Utility.Assert.isTrue(this.isEditable,"Source is not valid for editing."),!this._isEditPending){var t=this.hasEdits,i=this.sourceMapState;this._isEditPending=!0;this.sourceMapState=2;this.firePrettyPrintStateChanged();this.propertyChanged.invoke("isEditPending");t!==this.hasEdits&&this.propertyChanged.invoke("hasEdits")}},f.prototype.endEdit=function(){this.isEditPending&&(this._isEditPending=!1,this.propertyChanged.invoke("isEditPending"),this.firePrettyPrintStateChanged())},f.prototype.beginCommit=function(){if(n.Tools.Utility.Assert.isTrue(this.isEditable,"Source is not valid for editing."),!this._isCommitPending){var t=this.hasEdits;this._isCommitPending=!0;this.sourceMapState=2;this.propertyChanged.invoke("isCommitPending");t!==this.hasEdits&&this.propertyChanged.invoke("hasEdits")}},f.prototype.endCommit=function(t){if(n.Tools.Utility.Assert.isTrue(this.isEditable),n.Tools.Utility.Assert.areNotEqual(this,t),this._isCommitPending){var i=this.hasEdits;this._isCommitPending=!1;t&&(this.nextRevision=t,t.editorState=this.editorState,this.editorState=null,this.isOpen&&t.open());this.propertyChanged.invoke("isCommitPending");t&&(this.propertyChanged.invoke("nextRevision"),t.propertyChanged.invoke("previousRevision"));!i&&this.hasEdits&&this.propertyChanged.invoke("hasEdits")}},f.prototype.breakStateChanged=function(){this.propertyChanged.invoke("isEditable")},f.prototype.getZeroBasedActiveFrameRawPosition=function(){var n=this._debuggerManager.callstackController.activeFrame?this._debuggerManager.callstackController.activeFrame.location:null,t;return n&&this.id===n.startPosition.doc.id?(t={file:this._sourceIndex||0,line:n.startLineNumber-1,column:n.startColumn-1},this.isAuthored?this.rawDoc.sourceMap.getGeneratedFileLocation(t):t):null},f.prototype.createFormatterIfNecessary=function(){this._formatter||(this._formatter=Common.FormatService.HtmlFormatter.supportsMimeType(this.mimeType)?new Common.FormatService.HtmlFormatter:Common.FormatService.CssFormatter.supportsMimeType(this.mimeType)?new Common.FormatService.CssFormatter:new Common.FormatService.ScriptFormatter)},f.prototype.fireSourceMapStateChanged=function(){return this.locationsInvalidated.invoke(!1),this.propertyChanged.invoke("sourceMapEnabled"),this.propertyChanged.invokeAsync("sourceMapState")},f.prototype.loadSourceMapFromUrl=function(n){var t,r;n&&this._debuggerManager&&!this.hasEdits&&!this.isAuthored&&(Common.ToolWindowHelpers.isDataURI(n)&&(t=n,n=this._url&&this._url.toString()),n=Common.ToolWindowHelpers.isAbsoluteUrl(n)?Common.ToolWindowHelpers.addFileProtocolIfNeeded(n):Common.ToolWindowHelpers.pathCombine(this.getPathFromUrl(this.url&&this.url.toString()),Common.ToolWindowHelpers.truncateProtocolFromUrl(n)),r=this.getPathFromUrl(n),this.sourceMap=new i.SourceMap(r,this,this._debuggerManager),this.sourceMap.loadFromUrl(t||n).done())},f.prototype.findAndProcessSourceMap=function(){var n=this;this.getText().done(function(t){var r=i.SourceMap.findSourceAttribute("sourceMappingURL",t),u=i.SourceMap.findSourceAttribute("sourceURL",t);n.processSourceMap(r,u)})},f.prototype.processSourceMap=function(n,t){var r=this;this._isDynamicCode&&t&&(this._originalDynamicName=this._url&&this._url.toString(),this._url=t&&new u(t));n=i.UrlRewriter.rewriteSourceMapUrl(n);this.loadSourceMapFromUrl(n);this.rawDoc&&(this._isRuntimeDocument=this.rawDoc.isRuntimeDoc,this._sourceMapChangeRegistration||(this._sourceMapChangeRegistration=this.rawDoc.sourceMap&&this.rawDoc.sourceMap.propertyChanged.addHandler(function(n){n==="sourceMapState"&&r.fireSourceMapStateChanged()})))},f.prototype.fetchText=function(n){var t=this,o,e,f,s;return this._fetchTextPromise||(this.isRuntimeDoc&&!this.isAuthored&&this._debuggerManager?(o=this.prettyPrintState,this.createFormatterIfNecessary(),this._persistenceManager&&(e=this._persistenceManager.isPrettyPrintEnabled(this),typeof e=="boolean"&&e&&(this.prettyPrintState=0)),this.prettyPrintState!==o&&this.firePrettyPrintStateChanged(),f=!this._ignoreExistingText&&this._formatter.sourceText&&this._formatter.sourceText.text,this._fetchTextPromise=this._debuggerManager.getSourceText(this,f&&f.length).then(function(i){var u=i.text;return f&&(u=f+(u||"")),u!==null&&!i.loadFailed?t.setUnformattedText(u,n):r.Promise.as("")})):this.url&&this._debuggerManager?(s=this.url.scheme==="res"?this.url.raw:this.url.toString(),this._fetchTextPromise=this._debuggerManager.downloadUrl(s,this.mimeType).then(function(n){if(n.success)return t.url=u.tryParse(n.url),t.mimeType=n.mimeType?n.mimeType:t.getMimeTypeCandidates()[0],t.setUnformattedText(n.content),n.content;t.isAuthored&&t.sourceMapState!==2&&(i.DebuggerShell.showErrorDisplay("SourceMapNoAuthoredFile",[t.url.toString(),t.rawDoc.sourceMap&&t.rawDoc.sourceMap.sourceMapUrl]),t.sourceMapState=2)})):this._fetchTextPromise=r.Promise.as(this._unformattedTextMapping?this._unformattedTextMapping.text:null)),this._fetchTextPromise},f.prototype.updateCurrentTextMapping=function(){var t=this._currentTextMapping,n;n=this._formattedTextMapping&&this._formatter&&this._formatter.options.prettyPrint?this._formattedTextMapping:this._unformattedTextMapping;n!==t&&(this._monacoUrl&&(this._lastWorkspaceMapper=null),this._currentTextMapping=n,this.locationsInvalidated.invoke(!t||!n||t.text!==n.text),this._debuggerManager.testEventObject.fireEvent("textMappingUpdated",this.frontendId))},f.prototype.doFormatting=function(){var n=this;if(!this._formattingPromise)if(this.canFormat&&this._prettyPrintEnabled&&this._formatter.sourceText)i.debuggerTraceWriter.traceWriter.raiseEvent(306),this._formattingPromise=new r.Promise(function(t){n._formatter.getFormattedText().then(function(r){i.debuggerTraceWriter.traceWriter.raiseEvent(307);n._formattedTextMapping=r;t(r)})});else return r.Promise.as(this._formattedTextMapping);return this._formattingPromise.then(function(){n.updateCurrentTextMapping()})},f.prototype.queueCallback=function(n){var t=this;return this._timerId!==null&&window.clearTimeout(this._timerId),this._timerPromise=new r.Promise(function(i,r,u){t._timerId=window.setTimeout(function(){t._timerId=null;n(i,u)},50)}),this._timerPromise},f.prototype.cancelPendingActions=function(){this._timerId!==null&&window.clearTimeout(this._timerId);this._timerPromise&&(this._timerPromise.cancel(),this._timerPromise=null);this._formattingPromise&&(this._formattingPromise.cancel(),this._formattingPromise=null);this._fetchTextPromise&&(this._fetchTextPromise.cancel(),this._fetchTextPromise=null);this.endEdit()},f.prototype.onDiffButtonClick=function(){this._debuggerManager.docDiffHandler.openDiffForDoc(this)},f.prototype.onPrettyPrintClickTelemetry=function(){this.prettyPrintState===0?i.Telemetry.analytics.logExecuteCommand(i.Telemetry.CommandName.TOGGLE_PRETTY_PRINT_ON,0):this.prettyPrintState===1&&i.Telemetry.analytics.logExecuteCommand(i.Telemetry.CommandName.TOGGLE_PRETTY_PRINT_OFF,0)},f.prototype.onWordWrapClickTelemetry=function(){this._documentController.editorWindow.wordWrapEnabled===0?i.Telemetry.analytics.logExecuteCommand(i.Telemetry.CommandName.TOGGLE_WORD_WRAP_ON,0):this._documentController.editorWindow.wordWrapEnabled===1&&i.Telemetry.analytics.logExecuteCommand(i.Telemetry.CommandName.TOGGLE_WORD_WRAP_OFF,0)},f.prototype.onJmcDocumentClickTelemetry=function(){i.Telemetry.analytics.logExecuteCommand(i.Telemetry.CommandName.TOGGLE_LIBRARY_FILE,0)},f.prototype.onSourceMapClickTelemetry=function(){this.sourceMapState===0?i.Telemetry.analytics.logExecuteCommand(i.Telemetry.CommandName.TOGGLE_SOURCE_MAPS_ON,0):this.prettyPrintState===1&&i.Telemetry.analytics.logExecuteCommand(i.Telemetry.CommandName.TOGGLE_SOURCE_MAPS_OFF,0)},f.prototype.firePrettyPrintStateChanged=function(){this.propertyChanged.invoke("prettyPrintEnabled");this.propertyChanged.invoke("prettyPrintState")},f.EMPTY_TIMEOUT=3e3,f.ModelName="doc",f}(),e;i.Doc=f;f.initialize();e=function(n){function t(t,r,u){n.call(this,new i.Source(undefined,undefined,!1,undefined,t.mimeType,0,!1,undefined),{},u,!0);this._nextRevision=t;this._displayName=t.displayName;this.editorState=new i.EditorState;this.editorState.model=Monaco.Editor.createModel(r,t.mimeType);this.setUnformattedText(r,!0)}return __extends(t,n),Object.defineProperty(t.prototype,"displayName",{get:function(){return this._displayName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"shouldBePersisted",{get:function(){return!1},enumerable:!0,configurable:!0}),t}(f);i.PreviewDoc=e})(i=t.Debugger||(t.Debugger={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function t(){var t=this,n;this._debuggerEngine=null;this._debuggerConnect=null;this._diagOMConnect=null;this._urlToCallbacksMap={};this._diagOMCallbacks=[];this._setDebuggerManagerReady=null;n=window.external;n.addEventListener("attach",this.onAttach.bind(this));n.addEventListener("detach",this.onDetach.bind(this));this._debuggerManagerReady=new i.Promise(function(n){t._setDebuggerManagerReady=n})}return Object.defineProperty(t.prototype,"isConnected",{get:function(){return!!this._rpc},enumerable:!0,configurable:!0}),t.prototype.isDiagOMConnected=function(){return!!this._rpcForDiagOM},t.prototype.onDebuggerLoadComplete=function(n){this._setDebuggerManagerReady(n);window.external.isAttached&&this.onAttach()},t.prototype.onExecutionPaused=function(){for(var n in this._urlToCallbacksMap)this._urlToCallbacksMap.hasOwnProperty(n)&&this.jsonDiagOMRpcMethodCall("downloadUrl",[n,null,!1])},t.prototype.jsonDiagOMRpcMethodCall=function(n,t){var r=this;return new i.Promise(function(i,u){var f=function(){r._rpcForDiagOM.jsonRpcMethodCall(n,t,i,u)};r._rpcForDiagOM?f():r._diagOMCallbacks&&r._diagOMCallbacks.push(f)})},t.prototype.jsonRpcMethodCall=function(n,t){var r=this;return new i.Promise(function(i,u){var f=function(){r._rpc.jsonRpcMethodCall(n,t,i,u)};r._rpc?f():r._rpcCallbacks&&r._rpcCallbacks.push(f)})},t.prototype.executeOnTargetPage=function(n){return this.jsonDiagOMRpcMethodCall("executeOnTargetPage",[n])},t.prototype.enableDynamicDebugging=function(){return this.jsonRpcMethodCall("enableDynamicDebugging",[])},t.prototype.disableDynamicDebugging=function(){return this.jsonRpcMethodCall("disableDynamicDebugging",[])},t.prototype.getBreakpointIdFromSourceLocation=function(n,t){return this.jsonRpcMethodCall("getBreakpointIdFromSourceLocation",[n.runtimeId,t])},t.prototype.addCodeBreakpoint=function(n,t,i){return this.jsonRpcMethodCall("addCodeBreakpoint",[n.runtimeId,t,null,!1,i])},t.prototype.addEventBreakpoint=function(n,t,i,r){return this.jsonRpcMethodCall("addEventBreakpoint",[n,t,i,r,!1])},t.prototype.addPendingBreakpoint=function(n,t,i,r,u){return this.jsonRpcMethodCall("addPendingBreakpoint",[n,t,i,r,u])},t.prototype.causeBreak=function(n,t){return this.jsonRpcMethodCall("causeBreak",[n,t])},t.prototype.getSourceText=function(n,t,i){return this.jsonRpcMethodCall("getSourceText",[n.runtimeId,t,i])},t.prototype.setEditCSSEnabled=function(n){return this.jsonDiagOMRpcMethodCall("setEditCSSEnabled",[n])},t.prototype.editCSSSource=function(n,t){return this.jsonDiagOMRpcMethodCall("editCSSSource",[n.styleSheetInfo.key,t])},t.prototype.editSource=function(n,t){return this.jsonDiagOMRpcMethodCall("editSource",[n.longDocumentId,t])},t.prototype.removeBreakpoint=function(n){return this.jsonRpcMethodCall("removeBreakpoint",[n])},t.prototype.setBreakpointEnabledState=function(n,t){return this.jsonRpcMethodCall("setBreakpointEnabledState",[n,t])},t.prototype.setBreakpointCondition=function(n,t,i){return this.jsonRpcMethodCall("setBreakpointCondition",[n,t,i])},t.prototype.resume=function(n){return this.jsonRpcMethodCall("resume",[n])},t.prototype.setExceptionFilter=function(n){return this.jsonRpcMethodCall("setExceptionFilter",[n])},t.prototype.isDocContainingMatch=function(n,t){return this.jsonRpcMethodCall("isDocContainingMatch",[n,t.runtimeId])},t.prototype.getFrames=function(n){return this.jsonRpcMethodCall("getFrames",[n])},t.prototype.getCurrentThreadDescription=function(){return this.jsonRpcMethodCall("getCurrentThreadDescription",[])},t.prototype.getThreads=function(){return this.jsonRpcMethodCall("getThreads",[])},t.prototype.eval=function(n,t){return this.jsonRpcMethodCall("eval",[n,t])},t.prototype.getLocals=function(n){return this.jsonRpcMethodCall("getLocals",[n])},t.prototype.getChildProperties=function(n,t,i){return this.jsonRpcMethodCall("getChildProperties",[n,t,i])},t.prototype.setPropertyValueAsString=function(n,t){return this.jsonRpcMethodCall("setPropertyValueAsString",[n,t])},t.prototype.triggerSourceRundown=function(){return this.jsonRpcMethodCall("triggerSourceRundown",[])},t.prototype.canSetNextStatement=function(n,t){return this.jsonRpcMethodCall("canSetNextStatement",[n.runtimeId,t])},t.prototype.setNextStatement=function(n,t){return this.jsonRpcMethodCall("setNextStatement",[n.runtimeId,t])},t.prototype.downloadUrl=function(t,r,u){var f=this;return n.Utility.Assert.isTrue(Common.ToolWindowHelpers.isAbsoluteUrl(t),"downloadUrl must be invoked with an absolute URL as the first param. Was invoked with "+t),new i.Promise(function(n){if(f._urlToCallbacksMap[t])f._urlToCallbacksMap[t].push(n);else return f._urlToCallbacksMap[t]=[n],f.jsonDiagOMRpcMethodCall("downloadUrl",[t,r,u])})},t.prototype.retrieveCookies=function(n){return this.jsonDiagOMRpcMethodCall("retrieveCookies",[n])},t.prototype.deleteCookies=function(n,t){return this.jsonDiagOMRpcMethodCall("deleteCookies",[n,t])},t.prototype.deleteAllCookies=function(n){return this.jsonDiagOMRpcMethodCall("deleteAllCookies",[n])},t.prototype.deleteSessionCookies=function(n){return this.jsonDiagOMRpcMethodCall("deleteSessionCookies",[n])},t.prototype.setCookie=function(n,t){return this.jsonDiagOMRpcMethodCall("setCookie",[n,t])},t.prototype.retrieveLocalStorage=function(n){return this.jsonDiagOMRpcMethodCall("retrieveLocalStorage",[n])},t.prototype.retrieveSessionStorage=function(n){return this.jsonDiagOMRpcMethodCall("retrieveSessionStorage",[n])},t.prototype.localStorageSetItem=function(n,t,i){return this.jsonDiagOMRpcMethodCall("localStorageSetItem",[n,t,i])},t.prototype.sessionStorageSetItem=function(n,t,i){return this.jsonDiagOMRpcMethodCall("sessionStorageSetItem",[n,t,i])},t.prototype.localStorageDeleteItems=function(n,t){return this.jsonDiagOMRpcMethodCall("localStorageDeleteItems",[n,t])},t.prototype.sessionStorageDeleteItems=function(n,t){return this.jsonDiagOMRpcMethodCall("sessionStorageDeleteItems",[n,t])},t.prototype.localStorageSetSimulateCap=function(n){return this.jsonDiagOMRpcMethodCall("localStorageSetSimulateCap",[n])},t.prototype.sessionStorageSetSimulateCap=function(n){return this.jsonDiagOMRpcMethodCall("sessionStorageSetSimulateCap",[n])},t.prototype.setMutationBreakpoint=function(n,t,i){return this.jsonRpcMethodCall("setMutationBreakpoint",[n,t,i])},t.prototype.canSetMutationBreakpoint=function(n,t,i){return this.jsonRpcMethodCall("setMutationBreakpoint",[n,t,i])},t.prototype.deleteMutationBreakpoint=function(n){return this.jsonRpcMethodCall("deleteMutationBreakpoint",[n])},t.prototype.setMutationBreakpointEnabledState=function(n,t){return this.jsonRpcMethodCall("setMutationBreakpointEnabledState",[n,t])},t.prototype.jsonRpcMethodReceive=function(t){n.Utility.Assert.fail("Frontend received an unexpected RPC method call: '"+t+"'")},t.prototype.jsonRpcNotificationReceive=function(t,i){switch(t){case"onAddDocuments":n.Utility.Assert.isTrue(i&&i.length!==0);this._debuggerManagerReady.then(function(n){return n.onAddDocuments(i)}).done();break;case"onRemoveDocuments":n.Utility.Assert.isTrue(i&&i.length!==0);this._debuggerManagerReady.then(function(n){return n.onRemoveDocuments(i)}).done();break;case"onUpdateDocuments":n.Utility.Assert.isTrue(i&&i.length!==0);this._debuggerManagerReady.then(function(n){return n.onUpdateDocuments(i)}).done();break;case"onBreak":n.Utility.Assert.areEqual(10,i.length);this._debuggerManagerReady.then(function(n){return n.onBreak(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9])}).done();break;case"onDebuggerEvent":n.Utility.Assert.areEqual(3,i.length);this._debuggerManagerReady.then(function(n){return n.onDebuggerEvent(i[0],i[1],i[2])}).done();break;case"onUnhandledException":n.Utility.Assert.areEqual(4,i.length);this._debuggerManagerReady.then(function(n){return n.onUnhandledException(i[0],i[1],i[2],i[3])}).done();break;case"onResolveBreakpoint":n.Utility.Assert.areEqual(2,i.length);this._debuggerManagerReady.then(function(n){return n.onResolveBreakpoint(i[0],i[1])}).done();break;case"onDebugOutput":n.Utility.Assert.areEqual(1,i.length);this._debuggerManagerReady.then(function(n){return n.onDebugOutput(i[0])}).done();break;case"onAttachFailed":n.Utility.Assert.areEqual(0,i.length);this._debuggerManagerReady.then(function(n){return n.onAttachFailed()}).done();break;case"onSetRootDocument":n.Utility.Assert.areEqual(1,i.length);this._debuggerManagerReady.then(function(n){return n.onSetRootDocument(i[0])}).done();break;case"onWebWorkerStarted":n.Utility.Assert.areEqual(1,i.length);this._debuggerManagerReady.then(function(n){return n.onWebWorkerStarted(i[0])}).done();break;case"onWebWorkerFinished":n.Utility.Assert.areEqual(1,i.length);this._debuggerManagerReady.then(function(n){return n.onWebWorkerFinished(i[0])}).done();break;case"onRemoteScriptError":n.Utility.Assert.areEqual(4,i.length);this._debuggerManagerReady.then(function(n){return n.onRemoteScriptError(i[0],i[1],i[2],i[3])}).done();break;default:n.Utility.Assert.fail("Unknown event '"+t+"'")}},t.prototype.jsonDiagOMRpcMethodReceive=function(){},t.prototype.jsonDiagOMRpcNotificationReceive=function(t,i){switch(t){case"onDownloadUrlComplete":n.Utility.Assert.areEqual(5,i.length);this.onDownloadUrlComplete(i[0],i[1],i[2],i[3],i[4]);break;case"onIntellisenseRequestComplete":n.Utility.Assert.areEqual(2,i.length);this._debuggerManagerReady.then(function(n){return n.onIntellinsenseRequestComplete(i[0],i[1])});break;case"styleSheetAdded":n.Utility.Assert.areEqual(1,i.length);this._debuggerManagerReady.then(function(n){return n.onStyleSheetAdded(i[0])});break;case"styleSheetRemoved":n.Utility.Assert.areEqual(1,i.length);this._debuggerManagerReady.then(function(n){return n.onStyleSheetRemoved(i[0])});break;case"onRemoteScriptError":n.Utility.Assert.areEqual(4,i.length);this._debuggerManagerReady.then(function(n){return n.onRemoteScriptError(i[0],i[1],i[2],i[3])}).done();break;default:n.Utility.Assert.fail("Unknown event '"+t+"'")}},t.prototype.onDownloadUrlComplete=function(n,t,i,r,u){var f,e;if(this._urlToCallbacksMap[t]){for(f=0;f<this._urlToCallbacksMap[t].length;f++)e=this._urlToCallbacksMap[t][f],e({success:n,url:t,content:i,mimeType:r,errorMessage:u});delete this._urlToCallbacksMap[t]}},t.prototype.onAttach=function(){var t=this,i=window.external;try{this._debuggerEngine=i.createDebuggerEngine()}catch(r){return}this._debuggerEngine&&(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"),i.isJitDebugging&&this._debuggerEngine.loadScriptInProc("remote/jitRemote.js"),this._debuggerEngine.loadScriptInProc("remote/remote.js"),this._debuggerConnect=function(i){if(t._rpc=new n.RPC.JsonRPCEndpoint("CLIENT",function(n,i,r){return t.jsonRpcMethodReceive(n,i,r)},function(n,i){return t.jsonRpcNotificationReceive(n,i)},function(n){i.postMessage(n)},function(n){i.addEventListener("message",n)}),t._debuggerManagerReady.then(function(n){return n.onConnect()}),t._rpcCallbacks){for(var r=0;r<t._rpcCallbacks.length;r++)t._rpcCallbacks[r]();t._rpcCallbacks=null}},this._debuggerEngine.addEventListener("connect",this._debuggerConnect),i.loadScriptInProc("../common/isDebugBuild.js"),i.loadScriptInProc("../common/assert.js"),i.loadScriptInProc("../common/Remote/rpc.js"),i.loadScriptInProc("../Common/remoteHelpers.js"),i.loadScriptInProc("../Common/encodingUtilities.js"),i.loadScriptInProc("../Common/Intellisense/intellisenseRemoteHelpers.js"),i.loadScriptInProc("../Common/MediaTypeManager.js"),i.loadScriptInProc("remote/DiagnosticsOMProvider.js"),this._diagOMConnect=function(i){if(t._rpcForDiagOM=new n.RPC.JsonRPCEndpoint("DIAGOMCLIENT",function(n,i,r){return t.jsonDiagOMRpcMethodReceive(n,i,r)},function(n,i){return t.jsonDiagOMRpcNotificationReceive(n,i)},function(n){i.postMessage(n)},function(n){i.addEventListener("message",n)}),t._diagOMCallbacks){for(var r=0;r<t._diagOMCallbacks.length;r++)t._diagOMCallbacks[r]();t._diagOMCallbacks=null}t._debuggerManagerReady.then(function(n){return n.registerPluginMethodHandlers()});t._debuggerManagerReady.then(function(n){return n.testEventObject.fireEvent("startDiagnosticsOMCompleted")})},i.addEventListener("connect",this._diagOMConnect))},t.prototype.onDetach=function(){this._debuggerEngine&&this._debuggerConnect&&this._debuggerEngine.removeEventListener("connect",this._debuggerConnect);this._rpc=null;this._debuggerConnect=null;this._debuggerEngine=null;var n=window.external;this._diagOMConnect&&n.removeEventListener("connect",this._diagOMConnect);this._rpcForDiagOM=null;this._diagOMConnect=null;this._debuggerManagerReady.then(function(n){return n.onDetached()}).done();this._rpcCallbacks=[];this._diagOMCallbacks=[];i.F12.Debugger.notifyOnRun()},t}();t.RpcWrapper=r})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function r(n){this._previewDocsMap=new Map;this._telemetryStartTime={};this._debuggerManager=n;this._persistenceManager=this._debuggerManager.persistenceManager;this._persistenceManager.registerManualPersistModelName(t.Doc.ModelName);this._workspaceUriMapper=new t.WorkspaceUriMapper;this._docTable=new t.DocTable(this._workspaceUriMapper);this._listeners=[];this._docEventRegistrations=[];this._docListUpdated=new Common.EventSource;this._nextETWKey=0;this._docOpenedTraceKeys=[];this._docSwitchTraceKeys=[];n.jmcController.propertyChanged.addHandler(this.onJmcControllerPropertyChanged.bind(this));this._searchProvider=new t.DocSearchProvider(n,this);this._unparentedStyleSheetsByParent=new Map;this._unparentedStyleSheetsByKey=new Map}return Object.defineProperty(r.prototype,"isInSourceMapSwitch",{get:function(){return this._isInSourceMapSwitch},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"currentDoc",{get:function(){var n=this._debuggerManager.resourceViewController.currentModel;return n instanceof t.Doc?n:null},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"editorWindow",{get:function(){return this._editorWindow},set:function(n){var t=this;this._editorWindow=n;n&&n.editorUpdated.addHandler(function(n){t.traceStopEvent(n,309,t._docOpenedTraceKeys);t.traceStopEvent(n,313,t._docSwitchTraceKeys)})},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"workspaceUriMapper",{get:function(){return this._workspaceUriMapper},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"searchProvider",{get:function(){return this._searchProvider},enumerable:!0,configurable:!0}),r.prototype.registerListener=function(n){this._listeners.indexOf(n)===-1&&this._listeners.push(n)},r.prototype.documentTextOrMimeTypeUpdated=function(n,t,i,r){var f,u;if(n)for(f=n.mimeType!==r,n.mimeType=r,n.isOpen&&t&&(i?n.appendUnformattedText(t):n.setUnformattedText(t)),u=0;u<this._listeners.length;u++)this._listeners[u].documentUpdated(n,f)},r.prototype.documentContentAppended=function(n,t){return n.onDocumentContentUpdated(t)},r.prototype.styleSheetAdded=function(n){var e=this,i=n.styleSheetInfo.key,t=n.styleSheetInfo.parentKey,f=n.styleSheetInfo.isImported?this.getDocFromStyleSheetKey(t):this.getDocFromUrl(t),r,u;f?(n.parent=f,this.documentAdded(n),r=this._unparentedStyleSheetsByParent.get(i),r&&(r.forEach(function(n){return e.styleSheetAdded(n)}),this._unparentedStyleSheetsByParent.delete(i))):(u=this._unparentedStyleSheetsByParent.get(t)||new Set,u.add(n),this._unparentedStyleSheetsByParent.set(t,u),this._unparentedStyleSheetsByKey.set(i,n))},r.prototype.styleSheetRemoved=function(n){var f=n instanceof t.Doc,r=f?n.styleSheetInfo:n,i=f?n:this.getDocFromStyleSheetKey(r.key),u;i?(this.documentRemoved(i),i.previousRevision&&this.styleSheetRemoved(i.previousRevision)):(i=this._unparentedStyleSheetsByKey.get(r.key),u=this._unparentedStyleSheetsByParent.get(r.parentKey),i&&u&&(u.delete(i),this._unparentedStyleSheetsByKey.delete(r.key),u.size||this._unparentedStyleSheetsByParent.delete(r.parentKey)))},r.prototype.documentAdded=function(n,t,i){var u=this,f,r,e,o;if(i===void 0&&(i=!0),f=!1,this._docTable.contains(n)){if(!this._docTable.getDocByRuntimeId(n.runtimeId))this._docTable.onDocAdded(n)}else{this._docTable.onDocAdded(n);i&&this._debuggerManager.persistenceManager.persistResourceAdded(n);f=!0}return(this._docEventRegistrations[n.frontendId]=[n.propertyChanged.addHandler(function(t){return u.onDocPropertyChanged(n,t)}),n.locationsInvalidated.addHandler(function(t){return u.onDocLocationsInvalidated(n,t)})],f&&this._debuggerManager.jmcController.documentAdded(n),this._debuggerManager.resourceViewController.resourceAdded(n,t),r=n.previousRevision,r&&(this._debuggerManager.resourceViewController.replace(r,n),r.close(),this.documentRemoved(r,!0)),e=n.styleSheetInfo?n.styleSheetInfo.key:n.url.raw,o=this._unparentedStyleSheetsByParent.get(e),o&&(n.isRuntimeDoc||n.styleSheetInfo)&&(o.forEach(function(n){u.styleSheetAdded(n);u._unparentedStyleSheetsByKey.delete(n.styleSheetInfo.key)}),this._unparentedStyleSheetsByParent.delete(e)),!this._isInSourceMapSwitch)?this.updateDocListAfterSourceMapStateChange(n):Common.PromiseUtilities.EmptyPromise},r.prototype.documentRemoved=function(n,i){var f=this,u,r,s,e,o;if(n.isOpen&&this._debuggerManager.resourceViewController.close(n,!0,!this.isInSourceMapSwitch),this._debuggerManager.resourceViewController.resourceRemoved(n),!i){this._debuggerManager.persistenceManager.persistResourceRemoved(n);this._docTable.onDocRemoved(n);if(n.sourceMap&&n.sourceMap.sources)for(r=0;r<n.sourceMap.sources.length;r++)this.documentRemoved(n.sourceMap.sources[r]);n instanceof t.PreviewDoc&&this._previewDocsMap.delete(n.nextRevision.frontendId)}if(u=this._docEventRegistrations[n.frontendId],u){for(r=0;r<u.length;r++)u[r].unregister();delete this._docEventRegistrations[n.frontendId]}s=n.styleSheetInfo?n.styleSheetInfo.key:n.url.raw;e=this._docTable.getIdsWithParentUrl(s);e&&(o=[],e.forEach(function(n){return o.push(n)}),o.forEach(function(t){var i=f._docTable.getDocByFrontendId(t);i.parent===n&&(f.styleSheetRemoved(i),i.parent=null,f.styleSheetAdded(i))}))},r.prototype.documentLibraryStateChanged=function(n){for(var t=0;t<this._listeners.length;t++)this._listeners[t].documentAsLibraryStateChanged(n);n.propertyChanged.invoke("libraryState")},r.prototype.getOpenDocs=function(){for(var i=[],t=this.getDocs(),n=0;n<t.length;n++)t[n].isOpen&&i.push(t[n]);return i},r.prototype.getDocFromRuntimeId=function(n){return this._docTable.getDocByRuntimeId(n)},r.prototype.getDocFromFrontendId=function(n){return this._docTable.getDocByFrontendId(n)},r.prototype.getRuntimeIdFromLongId=function(n){for(var i=this._docTable.getDocs(),t=0;t<i.length;t++)if(i[t].longDocumentId===n)return i[t].runtimeId},r.prototype.getDocFromMonacoUrl=function(n){return this._docTable.getDocByMonacoUrl(n)},r.prototype.getDocs=function(){for(var n=this._docTable.getDocs(),t=n.length-1;t>=0;t--)n[t].isAuthored||n[t].sourceMapState!==0||n.splice(t,1);return n},r.prototype.getDocFromUrl=function(n){return this._docTable.getDocByFrontendId(this._docTable.getFrontendIdByUrl(n))},r.prototype.getNonRuntimeDoc=function(n){var t=this.getDocFromUrl(n);return t&&!t.isRuntimeDoc?t:null},r.prototype.toggleSourceMapsForCurrentDoc=function(n){var f=this,u,r,e;return this.currentDoc?(u=this.currentDoc,r=this.currentDoc.rawDoc||this.currentDoc,!r.sourceMap||r.sourceMap.sourceMapState===2)?Common.PromiseUtilities.EmptyPromise:(e=u.sourceMapState===0?t.Telemetry.CommandName.TOGGLE_SOURCE_MAPS_OFF:u.sourceMapState===1?t.Telemetry.CommandName.TOGGLE_SOURCE_MAPS_ON:t.Telemetry.CommandName.TOGGLE_SOURCE_MAPS_DISABLED,t.Telemetry.logCommandWrapper(e,n,function(){return new i.Promise(function(n){f._docListUpdated.addOne(function(t){!f._isAnotherUpdateDocListQueued&&t&&t!==u&&n()});r.sourceMap.sourceMapState===1?r.sourceMap.sourceMapState=0:r.sourceMap.sourceMapState===0&&(r.sourceMap.sourceMapState=1)})})):Common.PromiseUtilities.EmptyPromise},r.prototype.getTranslatedLocation=function(n,i,r,u){var f=this.getDocFromUrl(n),e,o;return(!f&&this._debuggerManager.isDiagOMConnected&&u&&(f=t.Doc.createNonRuntimeDoc(n,null,this._debuggerManager),this.documentAdded(f)),f&&(e=f.sourceMap,e&&f.sourceMapState===0))?(o=e.getOriginalSourceLocation(new Common.FormatService.Position(i-1,r-1,f.frontendId)),{documentPath:e.sources[o.file].url.toString(),oneBasedLine:o.line+1,oneBasedColumn:o.column+1}):{documentPath:n,oneBasedLine:i,oneBasedColumn:r}},r.prototype.open=function(n,t,i){var r=this;return this.openDocument(n,t,i&&i.location).then(function(n){return n?(r.doLayout(),r._editorWindow):null})},r.prototype.close=function(n,t){this.closeDocument(n,t)},r.prototype.doLayout=function(){this._editorWindow.doLayout()},r.prototype.beginEdit=function(n){if(!n.isEditPending&&n.isEditable){n.beginEdit();var i;n.mimeType==="text/javascript"?i=t.Telemetry.CommandName.JS_FILE_DIRTIED:n.mimeType==="text/css"&&(i=t.Telemetry.CommandName.CSS_FILE_DIRTIED);i&&t.Telemetry.analytics.logExecuteCommand(i,5)}},r.prototype.editSource=function(t,r){var u=this;return t.styleSheetInfo?this.editCSSSource(t,r):this._debuggerManager.editSource(t,r).then(function(r){return u._docTable.waitForDocWithLongDocumentId(r).then(function(r){return r?(t.endEdit(),r):(n.Utility.Assert.reportWatson("EOI document not created successfully"),i.Promise.wrapError(Error("Failed to create new document")))})})},r.prototype.getOrCreatePreviewDoc=function(n,i){return this._previewDocsMap.get(n.frontendId)||(this._previewDocsMap.set(n.frontendId,new t.PreviewDoc(n,i,this._debuggerManager)),this.documentAdded(this._previewDocsMap.get(n.frontendId))),this._previewDocsMap.get(n.frontendId)},r.prototype.deletePreviewDoc=function(n){var t=this._previewDocsMap.get(n);t&&this.documentRemoved(t)},r.prototype.waitForDocWithLongDocumentId=function(n){return this._docTable.waitForDocWithLongDocumentId(n)},r.prototype.editCSSSource=function(n,i){var r=this;return this._debuggerManager.editCSSSource(n,i).then(function(u){u.map(function(n){return r.getDocFromStyleSheetKey(n)}).filter(function(n){return!!n}).forEach(function(n){return n.setUnformattedText(i)});var f;return n.previousRevision?(f=n,n.endCommit()):(f=t.Doc.createNonRuntimeCssDoc(n.styleSheetInfo,r._debuggerManager,!0),n.endCommit(f),r.styleSheetAdded(f)),n.endEdit(),f})},r.prototype.getDocFromStyleSheetKey=function(n){return this._docTable.getDocByFrontendId(this._docTable.getFrontendIdByStyleSheetKey(n))},r.prototype.closeDocument=function(n,i){n.close();t.debuggerTraceWriter.traceWriter.raiseEvent(310);var r=n.isRuntimeDoc||n.mimeType==="text/css";if(!r&&!this.hasLoadedAuthoredDocs(n)&&!(n instanceof t.PreviewDoc)){this._docTable.onDocRemoved(n);n.isAuthored&&!this._isInSourceMapSwitch&&this._debuggerManager.resourceViewController.close(n.rawDoc,!0)}this._editorWindow.closeDocument(n);this._debuggerManager.persistenceManager.persistResourceClosed(n,i);t.debuggerTraceWriter.traceWriter.raiseEvent(311)},r.prototype.openDocument=function(n,r,u){if(!n||!this._docTable.contains(n))return i.Promise.wrap(!1);if(n.open(),r!==0&&n!==this.currentDoc&&typeof this._docSwitchTraceKeys[n.frontendId]=="undefined"&&typeof this._docOpenedTraceKeys[n.frontendId]=="undefined"){var f=this._nextETWKey++;this._docSwitchTraceKeys[n.frontendId]=f;t.debuggerTraceWriter.traceWriter.raiseEventWithKey(312,f)}return this._editorWindow.openDocument(n,r,u),this._debuggerManager.persistenceManager.persistResourceOpened(n,r,{location:u}),n.getText().then(function(){return!0})},r.prototype.traceStopEvent=function(n,i,r){n&&typeof r[n.frontendId]=="number"&&(t.debuggerTraceWriter.traceWriter.raiseEventWithKey(i,r[n.frontendId]),i===309&&(t.Telemetry.analytics.log(t.Telemetry.TelemetryEventName.DEBUGGER_OPEN_DOCUMENT_END,{durationMs:Date.now()-this._telemetryStartTime[r[n.frontendId]],selectedDocID:n.frontendId}),delete this._telemetryStartTime[r[n.frontendId]]),delete r[n.frontendId])},r.prototype.hasLoadedAuthoredDocs=function(n){var i=n.sourceMap&&n.sourceMap.sources,t;if(i)for(t=0;t<i.length;t++)if(this._docTable.getDocByFrontendId(i[t].frontendId))return!0;return!1},r.prototype.updateDocListAfterSourceMapStateChange=function(n){var t=this,f=!!this._editorWindow&&this._editorWindow.isActive(),r,u;return this._isInSourceMapSwitch?(this._isAnotherUpdateDocListQueued||n.sourceMapState!==2||(this._isAnotherUpdateDocListQueued=!0,this._docListUpdated.addOne(function(){t.updateDocListAfterSourceMapStateChange(n);t._isAnotherUpdateDocListQueued=!1})),Common.PromiseUtilities.EmptyPromise):(n.rawDoc&&(n=n.rawDoc),r=n.sourceMap&&n.sourceMap.sources,!r)?Common.PromiseUtilities.EmptyPromise:(this._isInSourceMapSwitch=!0,u=Common.PromiseUtilities.EmptyPromise,n.sourceMapState===0?this._docEventRegistrations[n.frontendId]&&(this._debuggerManager.debuggerShell.tabControl.animation=!1,u=i.Promise.join(r.map(function(n){return t.documentAdded(n,!0)})).then(function(){return t.documentRemoved(n,!0)})):this._docEventRegistrations[n.frontendId]||(this._debuggerManager.debuggerShell.tabControl.animation=!1,u=this.documentAdded(n,!0).then(function(){return r.forEach(function(n){return t.documentRemoved(n)})})),u.then(function(){var e=t._editorWindow&&t._editorWindow.previousSelectionLocation,u,o,i,s;return e&&(u=e.rawLocation,o=u.doc===n||r.indexOf(u.doc)>=0,o&&(i=n.createDocumentLocation(u.offset,u.length),i.startPosition&&i.startPosition.doc!==e.startPosition.doc))?(s=f?2:1,t._debuggerManager.resourceViewController.open(i.startPosition.doc,{activation:s,params:{location:i},softOpen:!0}).then(function(){t._isInSourceMapSwitch=!1;t._editorWindow.selectRange(i,f);t._docListUpdated.invoke(i.startPosition.doc);t._debuggerManager.debuggerShell.tabControl.animation=!0})):(t._isInSourceMapSwitch=!1,t._docListUpdated.invoke(null),Common.PromiseUtilities.EmptyPromise)}))},r.prototype.onDocPropertyChanged=function(n,i){var r,u;switch(i){case"url":this._docTable.onDocUrlChanged(n);for(r=0;r<this._listeners.length;r++)this._listeners[r].documentUrlChanged(n);break;case"sourceMapState":return this.updateDocListAfterSourceMapStateChange(n);case"isOpen":n.isOpen&&typeof this._docOpenedTraceKeys[n.frontendId]=="undefined"&&(u=this._nextETWKey++,this._docOpenedTraceKeys[n.frontendId]=u,t.debuggerTraceWriter.traceWriter.raiseEventWithKey(308,u),this._telemetryStartTime[u]=Date.now())}return Common.PromiseUtilities.EmptyPromise},r.prototype.onDocLocationsInvalidated=function(n,t){this._debuggerManager.breakpointController.updateBreakpointLocations(n);t&&this.fireUpdated(n)},r.prototype.fireUpdated=function(n){for(var t=0;t<this._listeners.length;t++)this._listeners[t].documentUpdated(n)},r.prototype.onJmcControllerPropertyChanged=function(n){if(n==="isJustMyCodeEnabled"){var t=this.currentDoc;t&&t.propertyChanged.invoke("libraryState")}},r}();t.DocumentController=r})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}))
//# sourceMappingURL=DebuggerMerged.min.js.map
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=11" />
    <meta http-equiv="Content-Type" content="text/html" />
    <meta http-equiv="format-detection" content="telephone=no">
    <meta charset="utf-8" />
    <title>Debugger</title>

    <link id="objectTreeView.css" rel="stylesheet" href="../Common/ObjectView/objectTreeView.css" type="text/css" data-plugin-theme="true" />
    <link rel="stylesheet" type="text/css" media="screen" href="../common/editor/vs/editor/css/vs-theme.css" data-plugin-theme="true" />
    <link rel="stylesheet" href="../common/controls/controls.css" type="text/css" data-plugin-theme="true" />
    <link rel="stylesheet" href="../common/Intellisense/intellisenseListBox.css" type="text/css" data-plugin-theme="true" />
    <link rel="stylesheet" href="../common/Grid/gridControl.css" type="text/css" data-plugin-theme="true" />
    <link rel="stylesheet" href="../common/ResourcesView/resourcesView.css" type="text/css" data-plugin-theme="true" />
    <link rel="stylesheet" href="TabControl/tabControl.css" type="text/css" data-plugin-theme="true" />
    <link rel="stylesheet" href="Callstack/callstack.css" type="text/css" data-plugin-theme="true" />
    <link rel="stylesheet" href="Breakpoints/breakpoints.css" type="text/css" data-plugin-theme="true" />
    <link rel="stylesheet" href="LanguageService/findResults.css" type="text/css" data-plugin-theme="true" />
    <link rel="stylesheet" href="Watches/watches.css" type="text/css" data-plugin-theme="true" />
    <link rel="stylesheet" type="text/css" href="Debugger.css" data-plugin-theme="true" />
    <link rel="stylesheet" type="text/css" media="screen" href="../common/editor/vs/editor/css/vs-theme.css" />

    <link rel="stylesheet" type="text/css" href="../common/SlickGrid/slick.grid.css" />
    <link rel="stylesheet" type="text/css" href="../common/SlickGrid/slick-theme.css" data-plugin-theme="true" />

    <!-- Below CSS file defines important overrides and should be the last one in the list of includes -->
    <link rel="stylesheet" href="../common/editor/editor.css" type="text/css" data-plugin-theme="true" />

    <!-- Daytona Includes -->
    <script type="text/javascript" src="../Common/isDebugBuild.js"></script>
    <script type="text/javascript" src="../common/plugin.js"></script>

    <!-- Monaco Includes -->
    <script src="editor/editorDefinitions.js"></script>

    <script type="text/javascript">
        // Add AMD paths for the monaco editor and debugger project resolver
        window.require = {
            baseUrl: "res://" + window.location.host + "/23/common/editor",
            catchError: false
        };
        //console.profile('code loading');
    </script>

    <script type="text/javascript" src="../Common/jQuery/jquery-2.1.1.min.js"></script>
    <script type="text/javascript" src="../Common/jQuery/jquery.event.drag-2.2.js"></script>

    <script type="text/javascript" src="../Common/SlickGrid/slick.core.js"></script>
    <script type="text/javascript" src="../Common/SlickGrid/slick.formatters.js"></script>
    <script type="text/javascript" src="../Common/SlickGrid/slick.editors.js"></script>
    <script type="text/javascript" src="../Common/SlickGrid/slick.dataview.js"></script>
    <script type="text/javascript" src="../Common/SlickGrid/slick.grid.js"></script>
    <script type="text/javascript" src="../Common/SlickGrid/plugins/slick.rowselectionmodel.js"></script>

    <script type="text/javascript" src="../common/editor/vs/loader.js"></script>
    <script type="text/javascript" src="../common/editor/vs/editor/editor.main.js"></script>
    <script type="text/javascript" src="../common/CommonMerged.js"></script>
    <script type="text/javascript" src="res://f12test.dll/23/selftest/SelfTestDebugger.js"></script>

    <script src="DebuggerMerged.js"></script>


    <script type="text/javascript">
        document.addEventListener("DOMContentLoaded", function () {
            F12.Tools.Debugger.App.main();
        });
    </script>

    <script id="intellisenseListBox" type="text/html">
        <ul class="intellisenseListBox"></ul>
    </script>
</head>
<body>
    <div id="resizePane"></div>
    <div id="root" role="main" tabindex="-1">
        <div id="toolbar"></div>
        <div id="dataTipElement"></div>
        <div id="debuggerContent">
            <div id="leftBlock">
                <div id="tabStripContainer">
                    <div id="filePickerButton" role="button" tabindex="1"></div>
                    <div id="tabControl" class="tabControl" role="tabpanel"></div>
                    <div id="documentToolbarSplitter"></div>
                    <div id="documentToolbar"></div>
                </div>
                <div class="filePickerMenu" id="filePickerMenu" role="menu"></div>
                <div id="editorConsoleContainer" class="editorConsoleContainer">
                    <div id="resourcesView"></div>
                    <div id="hEditorConsoleSplitter"></div>
                    <div id="console" class="console" role="region">
                        <div id="findResultsToolbar"></div>
                        <div id="findResultsTotals">
                            <span id="findResultsTotalsText"></span>
                            <progress id="findResultsProgress"></progress>
                        </div>
                        <div id="findResults"></div>
                    </div>
                </div>
            </div>
            <div id="vEditorDataWindowsSplitter"></div>
            <div id="controlsSplitPane" class="controlsSplitPane">
                <div id="topDataWindowsParent" role="tabpanel"></div>
                <div id="hDataWindowsSplitter"></div>
                <div id="bottomDataWindowsParent" role="tabpanel"></div>
            </div>

            <div id="Callstack" role="tab">
                <div class="callstackwindow">
                    <div class="windowtoolbar" role="toolbar">
                        <div id="toggleJMCFramesButton" class="iconShell_18x18" role="button" tabindex="1">
                            <div class="buttonIcon icon_14x14"></div>
                        </div>
                        <div id="toggleAsyncFramesButton" class="iconShell_18x18" role="button" tabindex="1">
                            <div class="buttonIcon icon_14x14"></div>
                        </div>
                    </div>
                    <div class="gridcontainer" role="treegrid">
                    </div>
                </div>
            </div>

            <div id="BreakpointWindow" role="tab">
                <div class="windowtoolbar" role="toolbar">
                    <div id="addXHRBreakpointButton" class="iconShell_18x18" role="button" tabindex="1">
                        <div class="buttonIcon icon_14x14"></div>
                    </div>
                    <div id="addEventTracepointButton" class="iconShell_18x18" role="button" tabindex="1">
                        <div class="buttonIcon icon_14x14"></div>
                    </div>
                    <div id="addEventBreakpointButton" class="iconShell_18x18" role="button" tabindex="1">
                        <div class="buttonIcon icon_14x14"></div>
                    </div>
                    <div id="toggleAllBreakpointsButton" class="iconShell_18x18" role="button" tabindex="1">
                        <div class="buttonIcon icon_14x14"></div>
                    </div>
                    <div id="deleteAllBreakpointsButton" class="iconShell_18x18" role="button" tabindex="1">
                        <div class="buttonIcon icon_14x14"></div>
                    </div>
                </div>
                <div class="breakpointgrid" role="grid">
                </div>
            </div>

            <div id="Watches" role="tab">
                <div class="watchWindow">
                    <div class="windowtoolbar" role="toolbar">
                        <div id="addWatchButton" class="iconShell_18x18" role="button" tabindex="1">
                            <div class="buttonIcon icon_14x14"></div>
                        </div>
                        <div id="deleteAllWatchesButton" class="iconShell_18x18" role="button" tabindex="1">
                            <div class="buttonIcon icon_14x14"></div>
                        </div>
                    </div>
                    <div class="gridWatchContainer" role="treegrid">
                    </div>
                </div>
            </div>
            <div id="debuggerAriaAlertZone" role="alert" aria-live="assertive" aria-atomic="true"></div>
        </div>
    </div>
</body>
</html>
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.disconnectButton .buttonIcon {
    background-image: url(''); /*[url({f12-debugger-image-disconnect-debugging})]*/
}

.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.breakOnExceptionsButton .buttonIcon {
    background-image: url(''); /*[url({f12-debugger-toolbar-button-image-break-on-exceptions})]*/
}

.BPT-Toolbar .BPT-button.disconnectButton .buttonIcon {
    background-size: 18px 108px;
}

.BPT-Toolbar .BPT-button.disconnectButton:not(.disabled) .buttonIcon {
    background-position-y: 0px;
}

.BPT-Toolbar .BPT-button:not(.disabled):hover.disconnectButton .buttonIcon {
    background-position-y: -72px;
}

.BPT-Toolbar .BPT-button.disconnectButton.disabled .buttonIcon {
    background-position-y: -36px;
}

.BPT-Toolbar .BPT-button.disconnectButton:not(.disabled).checked .buttonIcon {
    background-position-y: -54px;
}

.BPT-Toolbar .BPT-button:not(.disabled):hover.disconnectButton.checked .buttonIcon {
    background-position-y: -18px;
}

.BPT-Toolbar .BPT-button.disconnectButton.disabled.checked .buttonIcon {
    background-position-y: -90px;
}

.BPT-Toolbar .BPT-button.jmcButton .buttonIcon {
    background-image: url(''); /*[url({f12-debugger-toolbar-button-image-my-code-icon})]*/
}

.BPT-Toolbar .BPT-button.findResultsButton .buttonIcon {
    background-image: url(''); /*[url({f12-debugger-image-find-results})]*/
}

.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: 48px 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: 48px 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 330px;
    -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: 24px;
    display: -ms-grid;
    -ms-grid-columns: auto 1fr auto;
}

.editorConsoleContainer {
    -ms-grid-row: 2;
    -ms-grid-columns: 1fr;
    -ms-grid-rows: 1fr 3px 200px;
    display: -ms-grid;
    height: 100%;
    width: 100%;
}

    .editorConsoleContainer > #resourcesView {
        -ms-grid-column: 1;
        -ms-grid-row: 1;
        height: 100%;
        overflow: hidden;
        width: 100%;
        position: relative;
    }

        .editorConsoleContainer > #resourcesView > .resourceHandler {
            height: 100%;
            width: 100%;
        }

    .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 .filePickerItem {
        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 .localStorage {
        background-image: url(""); /*[url({f12-debugger-image-local-storage-node})]*/
    }

    .filePickerMenu .sessionStorage {
        background-image: url(""); /*[url({f12-debugger-image-session-storage-node})]*/
    }

    .filePickerMenu .cookies {
        background-image: url(""); /*[url({f12-debugger-image-cookies-node})]*/
    }

    .filePickerMenu .fileName {
        float: right;
    }

    .filePickerMenu .fileItem {
        cursor: default;
        white-space: pre;
    }

    .filePickerMenu .iconShell_16x16 {
        float: right;
        margin-top: -1px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

        .filePickerMenu .iconShell_16x16 .buttonIcon.icon_16x16 {
            margin-top: 0px !important;
            width: 19px;
            height: 19px;
        }

        .filePickerMenu .listview-grid-row:hover .iconShell_16x16:hover > .buttonIcon {
            background-position: 0px -18px;
        }

    .filePickerMenu .listview-grid-row:hover .libraryIcon > .buttonIcon,
    .filePickerMenu .libraryIcon .checked {
        background-image: url(''); /*[url({f12-debugger-images-library-code-icon})]*/
    }

    .filePickerMenu .listview-grid-row .diffIcon > .buttonIcon,
    .filePickerMenu .diffIcon .checked {
        background-image: url(''); /*[url({f12-debugger-image-diff-icon})]*/
    }

    .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;
    margin-left: 5px;
    margin-right: 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;
    -ms-grid-column: 1;
}

    #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;
    }

#tabControl {
    -ms-grid-column: 2;
    padding-right: 4px;
}

#documentToolbarSplitter {
    -ms-grid-column: 3;
    margin-top: 2px;
    height: 18px;
    width: 1px;
    background-color: TRANSPARENT; /*[{plugin-debugger-document-toolbar-seperator-color}]*/
}

#documentToolbar {
    -ms-grid-column: 4;
}

    #documentToolbar .BPT-Toolbar {
        border-bottom: 0;
        padding: 0;
    }

        #documentToolbar .BPT-Toolbar .BPT-ToolbarContents {
            margin-top: 0;
            padding-left: 8px;
            padding-right: 5px;
            margin-right: 6px;
        }

            #documentToolbar .BPT-Toolbar .BPT-ToolbarContents .buttons {
                margin-right: 0;
            }

                /* Doc toolbar buttons */
                #documentToolbar .BPT-Toolbar .BPT-ToolbarContents .buttons .BPT-button.diffButton .resourceButton {
                    background-image: url(''); /*[url({f12-debugger-image-diff-icon})]*/
                }

                #documentToolbar .BPT-Toolbar .BPT-ToolbarContents .buttons .BPT-button.saveButton .resourceButton {
                    background-image: url(''); /*[url({f12-debugger-toolbar-button-image-save})]*/
                }

                #documentToolbar .BPT-Toolbar .BPT-ToolbarContents .buttons .BPT-button.prettyPrintButton .resourceButton {
                    background-image: url(''); /*[url({f12-debugger-toolbar-button-image-toggle-pretty-print})]*/
                }

                #documentToolbar .BPT-Toolbar .BPT-ToolbarContents .buttons .BPT-button.wordWrapButton .resourceButton {
                    background-image: url(''); /*[url({f12-debugger-toolbar-button-image-toggle-word-wrap})]*/
                }

                #documentToolbar .BPT-Toolbar .BPT-ToolbarContents .buttons .BPT-button.jmcDocumentButton .resourceButton {
                    background-image: url(''); /*[url({f12-debugger-images-my-code-icon})]*/
                }

                #documentToolbar .BPT-Toolbar .BPT-ToolbarContents .buttons .BPT-button.sourceMapButton .resourceButton {
                    background-image: url(''); /*[url({f12-debugger-toolbar-button-image-toggle-source-map})]*/
                }

                /* ResourceGrid toolbar buttons */
                #documentToolbar .BPT-Toolbar .BPT-ToolbarContents .buttons .BPT-button.refreshStorageButton .resourceButton {
                    background-image: url(''); /*[url({f12-debugger-toolbar-button-image-resource-grid-refresh})]*/
                }

                /* Web storage grid toolbar buttons */
                #documentToolbar .BPT-Toolbar .BPT-ToolbarContents .buttons .BPT-button.simulateCapButton .resourceButton {
                    background-image: url(''); /*[url({f12-debugger-toolbar-button-image-resource-grid-simulateCap})]*/
                }

                /* Cookies grid toolbar buttons */
                #documentToolbar .BPT-Toolbar .BPT-ToolbarContents .buttons .BPT-button.clearAllCookiesButton .resourceButton {
                    background-image: url(''); /*[url({f12-debugger-toolbar-clear-cookies})]*/
                }

                #documentToolbar .BPT-Toolbar .BPT-ToolbarContents .buttons .BPT-button.clearAllSessionCookiesButton .resourceButton {
                    background-image: url(''); /*[url({f12-debugger-toolbar-clear-session-cookies})]*/
                }

                #documentToolbar .BPT-Toolbar .BPT-ToolbarContents .buttons .BPT-button.copyCookiesButton .resourceButton {
                    background-image: url(''); /*[url({f12-debugger-toolbar-copy-to-clipboard})]*/
                }

.BPT-button.resourceButtonContainer {
    margin-top: 1px;
    margin-right: 2px;
    padding: 1px;
    height: 20px;
    width: 20px;
}

.resourceButton {
    background-size: 16px 48px;
    height: 16px;
    width: 16px;
}

.BPT-button:hover .resourceButton {
    background-position-y: -16px;
}

.BPT-button.checked .resourceButton {
    background-position-y: -16px;
}

.BPT-button.disabled .resourceButton {
    background-position-y: -32px;
}

.resourceGrid .slick-cell.cookiesGrid-bool {
    text-align: center;
}

.resourceGrid .slick-header-column.cookiesGrid-header-httpOnly,
.resourceGrid .slick-header-column.cookiesGrid-header-secure {
    background-position: 5px 5px;
    background-repeat: no-repeat;
    background-size: 14px 14px;
    padding-bottom: 4px;
}

    .resourceGrid .slick-header-column.cookiesGrid-header-httpOnly .slick-column-name,
    .resourceGrid .slick-header-column.cookiesGrid-header-secure .slick-column-name {
        display: none;
    }

.resourceGrid .slick-header-column.cookiesGrid-header-httpOnly {
    background-image: url(''); /*[url({f12-debugger-image-grid-header-httpOnly})]*/
}

.resourceGrid .slick-header-column.cookiesGrid-header-secure {
    background-image: url(''); /*[url({f12-debugger-image-grid-header-secure})]*/
}

/* Override the * rule in gridcontrol.css */
#plugin-vs-tooltip,
#plugin-vs-tooltip * {
    box-sizing: content-box;
}
{
    "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-cursor": {
                "bitmap_source": "Cursor\\images\\currentLocationArrow.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "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-info-alert": {
                "bitmap_source": "..\\pluginhost\\theme\\i_alertinfo.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-image-disconnect-debugging": {
                "bitmap_source": "images\\disconnectIcon.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-save": {
                "bitmap_source": "images\\saveicon.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-toolbar-button-image-toggle-pretty-print": {
                "bitmap_source": "..\\Common\\images\\togglePrettyPrint.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-toolbar-button-image-resource-grid-refresh": {
                "bitmap_source": "..\\Common\\images\\refreshState.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-toolbar-button-image-resource-grid-simulateCap": {
                "bitmap_source": "..\\Common\\images\\forceStorageCapState.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-toolbar-button-image-toggle-word-wrap": {
                "bitmap_source": "..\\Common\\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-toolbar-clear-cookies": {
                "bitmap_source": "images\\clearCookies.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-toolbar-clear-session-cookies": {
                "bitmap_source": "images\\clearSessionCookies.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-toolbar-copy-to-clipboard": {
                "bitmap_source": "images\\copyToClipboard.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-breakpoint-add-XHR-breakpoint": {
                "bitmap_source": "Breakpoints\\images\\addXHRBreakpoint.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-xhr-breakpoint": {
                "bitmap_source": "Breakpoints\\images\\xhrBreakpoint.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-image-xhr-breakpoint-disabled": {
                "bitmap_source": "Breakpoints\\images\\xhrBreakpointDisabled.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-image-xhr-breakpoint-unbound": {
                "bitmap_source": "Breakpoints\\images\\xhrBreakpointUnbound.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-debugger-image-previewtab-icon": {
                "bitmap_source": "images\\previewTabIcon.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-image-previewtab-close": {
                "bitmap_source": "images\\previewTabClose.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-image-diff-icon": {
                "bitmap_source": "images\\diffIcon.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-image-diff-tab-icon": {
                "bitmap_source": "images\\diffTabIcon.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-image-redirect-icon": {
                "bitmap_source": "images\\redirectIcon.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-debugger-toolbar-button-image-my-code-icon": {
                "bitmap_source": "images\\toolbarMyCodeIcon.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-find-results": {
                "bitmap_source": "LanguageService\\images\\findResults.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-image-find-results-clear-results": {
                "bitmap_source": "LanguageService\\images\\clearResults.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-image-find-results-close": {
                "bitmap_source": "LanguageService\\images\\close.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-image-find-results-next-result": {
                "bitmap_source": "LanguageService\\images\\nextResult.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-image-find-results-pin": {
                "bitmap_source": "LanguageService\\images\\pin.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-image-find-results-previous-result": {
                "bitmap_source": "LanguageService\\images\\previousResult.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-image-find-results-unpin": {
                "bitmap_source": "LanguageService\\images\\unpin.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-function-mapped": {
                "bitmap_source": "images\\functionIconMapped.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-image-watches-not-a-function-mapped": {
                "bitmap_source": "images\\notAFunctionIconMapped.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": "..\\Common\\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": "..\\Common\\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": "..\\Common\\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": "..\\Common\\editor\\vs\\base\\ui\\scrollbar\\impl\\arrow-right.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-image-local-storage-node": {
                "bitmap_source": "images\\localStorage.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-image-session-storage-node": {
                "bitmap_source": "images\\sessionStorage.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-image-cookies-node": {
                "bitmap_source": "images\\cookies.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-image-grid-header-httpOnly": {
                "bitmap_source": "images\\gridHeaderHttpOnly.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-debugger-image-grid-header-secure": {
                "bitmap_source": "images\\gridHeaderSecure.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": "MSPointerUp"
                },
                {
                    "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": "Gamepad",
            "titleLocId": "EventListGamePad",
            "events": [
                {
                    "eventKey": "gamepadconnected"
                },
                {
                    "eventKey": "gamepaddisconnected"
                }
            ]
        },
        {
            "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"
                },
                {
                    "eventKey": "transitionstart"
                },
                {
                    "eventKey": "transitionend"
                },
                {
                    "eventKey": "animationstart"
                },
                {
                    "eventKey": "animationiteration"
                },
                {
                    "eventKey": "animationend"
                }
            ]
        },
        {
            "title": "Window",
            "titleLocId": "EventListWindow",
            "events": [
                { 
                    "eventKey":  "DOMContentLoaded"
                },
                {
                    "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": "msorientationChange"
                },
                {
                    "eventKey": "MSGestureChange"
                },
                {
                    "eventKey": "MSGestureTap"
                },
                {
                    "eventKey": "MSGestureEnd"
                },
                {
                    "eventKey": "MSGestureHold"
                },
                {
                    "eventKey": "MSGestureStart"
                },
                {
                    "eventKey": "MSGestureDoubleTap"
                },
                {
                    "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 > #addXHRBreakpointButton {
            -ms-grid-column: 2 ;
        }

            #BreakpointWindow > .windowtoolbar > #addXHRBreakpointButton > .buttonIcon {
                background-image: url('Breakpoints/images/addXHRBreakpoint.png'); /*[url({f12-debugger-image-breakpoint-add-XHR-breakpoint})]*/
            }

        #BreakpointWindow > .windowtoolbar > #addEventTracepointButton {
            -ms-grid-column: 3;
        }

            #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: 4;
        }

            #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: 5;
        }

            #BreakpointWindow > .windowtoolbar > #toggleAllBreakpointsButton > .buttonIcon {
                background-image: url('Breakpoints/images/selectAllBreakpoints.png'); /*[url({f12-debugger-image-breakpoint-select-all})]*/
            }

        #BreakpointWindow > .windowtoolbar > #deleteAllBreakpointsButton {
            -ms-grid-column: 6;
        }

            #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})]*/
        }

    #BreakpointWindow .eventXHRBreakpointImg {
        background-image: url('Breakpoints/images/eventBreakpointXHR.png'); /*[url({f12-debugger-image-xhr-breakpoint})]*/
    }   

        #BreakpointWindow .eventXHRBreakpointImg.bpUnbound {
            background-image: url('Breakpoints/images/eventBreakpointXHRUnbound.png'); /*[url({f12-debugger-image-xhr-breakpoint-unbound})]*/
        }

        #BreakpointWindow .eventXHRBreakpointImg.bpDisabled {
            background-image: url('Breakpoints/images/eventBreakpointXHRDisabled.png'); /*[url({f12-debugger-image-xhr-breakpoint-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
ߔsRGB��, cHRMz&�����u0�`:�p��Q<	pHYs���+�IDATx��G�0��*0C1�@0��� (������~�6N�dm�����1C3l�V�|�S��J2l'��nv�n�,ɰ�H@ي���vn*@�F����ƛ	���3zP�sa�Q�`�P�d���Aç��piË7ߞ�̏�ŏ�� ���)�|���X�bIEND�B`��PNG


IHDRr
ߔsRGB��, cHRMz&�����u0�`:�p��Q<	pHYs���+�IDATx���G��0�qC�W��0CC0AC03H}wAP>�j�T�vOٙ�q�g˥���F �Z�CvP�4�Ex�P��2���U!(����z&��0z{1,Q��F��!�:vy0)h�ߝe��)�Aҁ#�h�~̜E�
��/�΁=#�:P1���׆��{��hpwZ��o��&���!D�?�A2
��̻��;`�#u���Ω��9zPIEND�B`��PNG


IHDRr
ߔsRGB��, cHRMz&�����u0�`:�p��Q<	pHYs���+hIDATx�����0�A��:�e��<"�g۝�w���Dٱq���
��
��
��
��
���A�������O@�4�@�G�Z��<�O.c&
n.�IEND�B`��PNG


IHDRr
ߔsRGB��, cHRMz&�����u0�`:�p��Q<	pHYs���+�IDATx�c ��0q��@�
������7��E�A����zH�,�r0To����0d?4��pH��~�-�ƏU��%l)"1�%���O���{4�(Hp��$$�Ԉ�3r|��z�C�3*,q*,@T���
hf@]��;*Z��|��-���ȉ���4��َ��`���=[�u��{Ƨ{�F�›���+`�71�߈�3��
a�7��F+t��IEND�B`��PNG


IHDRr
ߔ cHRMz%������u0�`:�o�_�F	pHYs���+�IDATxڵ����PEoݽ��z���#u/u��V���C�#�d��]�}�6�lj6�F�$g;I^b����f68>�2�|G(w;f��t��4� �fw̜�2�����΃Q1`d�E�,wlpY�����|�4^��!�ѕn�	:~JJ�2r��=ƹ�ZDS��R�u	.�uBZ���/��,RS^އ|��"���/�-3ۆ'�ո2E�Jq����'
2&��Τ��lPF�� �H�ˍ�l�wp�3�,-"����~�,�)[Z�4�"���a�'˚�‡�w|S��6h�`K�v$�rI;mPJ����dKy���+
��m�_-���-���#`M�v$��N�����LPM�ۨ�[b�)7�޺���}����rK̚~�|��9�v�
��t!��l��������کBj�c|��v�еԤ縩c|���[���	�cn�5�[�/�wA%�˵vR����3�z��/��_�_e%��IEND�B`��PNG


IHDR `|"p��IDATx��)��0�G��-�(���
G��ˉ92��‘9
�9r'Ҁѯ8�Nz�J_���v��a��R�o�?@���^���^���Da��1P6�pV+Qc%�qp��21���S�EJ��ĆSd%pV���3�|�d�čÐxE�$&����GO$���7�*@gPHD <:�!cg`*qMJ'��H<;[�D{&�+�W��@dm:T��EH$K�p�-Q�&�!<��Ȳ��F&~߬U�&��=l��t0�$Z:#iXV�R,�8W4u�]m�߾(1�����K�(Ag�
�@ņ~�d(�z��@��^0���;�d�C�H�^�;���DY������x
�u�$�21(���܀�g�K�Re����D����.��+���W�֝�(�J̄3ߠ��$�G� `���B�`d%��&��0��'�&qo��0>�G���(
7U�rXDH8xߍ�O
^��$�z�A7)&�Z����x\h��ܤh��T0�#�-M�ѲGyuSJ����:��
5�>7�	�b%�
l=�P �xC�.`_������4s	��xGx�����H���.���G3쒑�χS����/_�2�$��
4���#�,V��J���,�M"db8	7���)!K�L���I%V����6�C8���!HL��4y"�%"�_@���T#<"�y;�R���
(��: ���$����\9����t(<�Gq,�Y�[�(xM c�Ċ�PN�F&���U�S�cҁ����HZ\�|�����!T�"1V>�]/P�o�vFϙ�X�#�R�@0=�P���W�OF�@�D��s:�oH��,nɞ���}�)V�[IEND�B`��PNG


IHDR `|"p�	pHYs���+sRGB��, cHRMz&�����u0�`:�p��Q<1IDATx��M��0FB!d�@�
�׽�A!�B�d����H>���߱GU�#}��<��V��F}z��g�gsY���ᜋ6��
_r�6I�9���mO;i��3��s��@��h�
���Y�
`﹂�TX�(t��.?Q�J�4�sN�F#�ފ>i�X@���>�u�!aa�Y�5��9
�B���@�On��/�������`ԨQW�?�f��j?z�9m����6m��sH
��%ڞv�@=gR������G���S�H��s�?��f7P�� މ;\~(�~�\!h 4�眪�F2@�}�X��B=(1|�TC�¤�pkr�s�����r��.]_� �%K�+�?��Q�>��ٳ���Ï�p�E`�/�M�$�R�m����4Pϙ����t�j��Q�����,R��\��*��
�?:�w����_%W
�9�j��PoE�4�,�POJ�Ň:Ր�0i�,ܚ\�`!�����'�@חuH�R���0���qh�'��MIEND�B`��PNG


IHDR `K���	pHYs���+BPLTEUUUUUUUUUUUUUUUUUUUUU"y�"y�"y�"y�"y�"y�"y������������������������tRNS0`����ϟ`00`����m�sRGB��, cHRMz&�����u0�`:�p��Q<IDATx���ђ� ���²
*����--�&����'��1���/Ύƞia����Ί���\X����u���9��~��n�����p]!9�Z���õBq��'š���'�?�yq����J�8�gEuVL���"�>!�������KaS��/��
���Bt������]�)��>)?y�K�ţ�"�-Ұ��Y1�^4����X�D���WOG�?u�M�w���+$GY�Q�Bv�V(�v��8���i^?\/�, �IEND�B`��PNG


IHDR `|"p�	pHYs�� cHRMz%������u0�`:�o�_�F1IDATx��AKA�=�{����X�ԃAE�� �Þs����!{�,h/�XО
x(
���h	�b�T�3�D�ݙ�7o7]�:�f�{�y�vl�=��ɋ"���CE��TE��$�� >��JS��U��uI5%S�*%ӳ?D�9 [��(�9`aa�t:"�r�,..� �(�D���B�j�J���U%��''���#��x��YYY����@����V�EVWW���C$�IR�T����ƆN2�Y��d�̻�.���ҭ�&�������X��)G����&:#�Ji4U�bd�rB�2�WP�]���MO92s@N�0�����)E�*C~������ޠ���:�I�8o��Ir��P�K8p+��(�$�����g��0gZ��v1�e�N����x�cvh�i�z���ܐ���H~C$�1�3Q>����d�������U@x�R��D���r5D�Wǭ�1���b��*��vs4W���}Py3F\:���̨�PYT�}P�U�JD	З5��F89 S"j��:1��	���9�{�AX(��I���)
͟8����-QT{pO�4�LH����b�dZ��潶�<y�%V+cy4�{r$��h��21�E�7���g�2f��Z�P:3A&dIp��.G�j8du�Y?P����F�i�H7$~�ӊф,�ng�D�0w��1�A=�rp
�m����LY���F�z��C_�����Ĭ{����A���y�W���%����g��+�w\�!�I��
��(&"2 �3d*J��̨�!F�2%�p��	8=�&���;:�"��P�j���
*����/#OO��-!e���A̙l4@�Pj�TrO�>�a�MpV���Xr1à�h���K����F�\�c0�xvv�MȒ�D @B�"�����5���5�存-�n��v[�-�ngpBP��������U��G�47u7y�	g�xNc��a V�[�nH�4��Ȯf���X�v!j&IEND�B`��PNG


IHDR `K���	pHYs���PLTEUUUwww�����������������������������������������������������������������l`�]P�O@�@0�1 �#���C3uuu������������������jjj```UUU�H�&��$tRNS�������������������������������������� cHRMz%������u0�`:�o�_�F�IDATxڵ�mW� �q�Z��L͖�BV�������N����Ff��Qq�0VLk�ǰ�/�3��D  {J4��E�>gn��7�#s8�q}�A'���:"���=,\�z�ä߃�=��]�ń��Za=�;�':���^�
�DoE�'�[�/v#��&e�	b=8��]'�>HYRY�>��$�S�.2 >(�֞��Z"����ÁtL��M��7=2\y�:���K!R���Wl�'��%1��h��5:Ѡ�+��h��Ŋ�h
݊�lQ�F4�u�ä�>Ar��'��J���ˀ+����Ň@"�=%�A�"���x�r�;Ǿ#s8p���Ԃ�����	�Խ�v��A��>�%[L���5�cQ��;�������譨��w+v�n�}�ä�>A|��'�䟆쓦z��tXIEND�B`��PNG


IHDR `|"p�	pHYs���+�IDATx��7��V��ح���.�W9�g=,����z(��|}#+���.�H�&ƿ�ď���>���>̷|i�::D�ӹ����r���W M�P���A�G���� =S@'��hE@Q���'Nȳg���ٳ��
�q�I���.����(�@�U@�#�I�U�%7$2��=��c�'?��r����Tt\�t)ȱ~	�a
�Ǭc||<��ə@�#��-��v���v�6�& ml�=w��0g>s�=�9H��s��	t�B���co�h�"�vq�(�xO;�8V�t��6vA�$���S�p쒌��(��/BQ��G�H�.�IЉ��%����O$ w��q�W��! "-�,'����
���mp� �h5���ad ��(�@+���,�~*�<�'+c_��*�~�%�m��*�(A���<D��"
��Df�&�~���'Y���C@S+ߌ9��q?`�Ǭc���~y,���	�9���zoO�mWl3��AaҶ�v�Cp�9>	sz��}n�r�@��h��&a]�i��X[1�{=�F\�
 ���>���(�罉Y�h�TΊ�c�d,�Di�|�R|8
G2wYN�Ň,�H/&v�}"9��Ύ�f-��&l����kx'�O�+�����t�	0�#,���Pw�@�E-
0І��i#��S���)33���
���!X��#ʲd%0���'G�(@/�OnKd��c���^O~�%�0�7�177�X?��!���[�n��a��h!9s������.��ۮ�fU���m���Ns|�����3�,��L ���-&��v:���!���3�aDz��<���XK��ޛ���HA�x8FI�BK�F��*Jm>�#��,'A'fF�h�+�DrpG��{5�6i_�wө�?V��>IEND�B`��PNG


IHDRr
ߔAIDATxڽ�'P�@��xE�s�π7��*��U,5�y��5��{��:;��Zv�W�}lK.��I����&Y��HQ���ҙdag��T)VR ښR,�r�2��y0l�
],G�l��T˞6�
����j�f��>�=;Kf�r~�/�������O���H�*Y�('�/?o�qL�pv- P>`,/x���҃s�W�Q�an�ґ�3���A�	�d���뱤����t������
�\�9?W��j�Τ&���).v^Olv
�g���Ny�J�[�h��K\�
������c�U9[#嘢É�4)��
�
���5��IEND�B`��PNG


IHDRr
ߔNIDATxڵ�%p�P��U�ֵޖ���O�xYWf�o��ʕe��)n����;H��;���֊�	)!s�rG�ѵ��
#���C.��߶���@�1I�e��4��q�&���I؞f��m��I���>VHm}�-�g6q��B��	�*(��{�@Lh�p»

�Q��\���Uu!�#ir���8`�?�|P�J�#�y^����v*L��)��S��T�,�Z�������C�}����e����(b��W�߀���
�#F�y��4Q���2�tLd&>#C,>�T�,SR�뺊2A���
}�9����dIEND�B`��PNG


IHDRE�/�3PLTE�����������������pЄtRNS 0@P`p��������#���IDATx�}��v� D'�g����.P	�5��B����4Ϧ9l'�>��SJ);��>@������-��+��Va�$k��d�f�v8{n}�j��%�r��IL,��0�r�<X#�W#�$�L�&H=����0=�}��k�z2%u!G�LO�*�:D��A~�7�-`A�-�.�X�ص�k���X�M�?l�n�wk�������7����{IEND�B`��PNG


IHDRr
ߔoIDATxڝ�iq�0F
����!�!�� �`�`���*�t�s�Ƴ�֞��&���t�y��,�2[���U˕�N�����6΢�8{ZOY�	�-W�yD��`�e�1�et���-������?ub6�A%G�J�
���ޟ��	"Z��`|0��._T����ö�����,��<e=�M�(���RX�b\%.��e���#v篔p��_�k�d
	;$`
v�$POn����4zY�v����3��vpA#��ڒvzK��+�y�K�cG ,�>�h�a�#���v�{�@�K@���`��@X*.Q�Kg�sM,�ӆڒ��u���R����՝kP�J���%-�qIEND�B`��PNG


IHDRE�/�3PLTE��,�1 �#��@0�O@�l`�����Ŀ����������AtRNS��l���IDATxڕ��� PY�ܚ���A;�z�!��D�0W�e3U�P����^+Ţs��J���\/5����K9Lt���̐���=7�3b���U�NC�|X�����'���L3�h��5�ִ8�Ӵ���
e��Dp5�����s��.�9IEND�B`��PNG


IHDRr
ߔ�IDATx���W
Q@��*d%�������V_|����\�K��0-Ly���%6�"�-��x6�_`�"�+���P�TM�d�|v	-��H�/�R�H�$X���7�4�xM��ۿ��X�B�f@!؂Q��1<�4:�	u�
�t*�Y�1�^G'`���u�=�.���1�V>�/Q�?����|tMh��sIEND�B`��PNG


IHDRr
ߔIDATxڽ�WQ�@��8�
"a% �:�@�JY	���A�M��9���C�o�ܔ����q�c����a�<�2��P�-�(��1���8�̠�lW���_ʰS�􇗟 ��)�N�a��we�����s��~ɕ~��v^p�W�$����fVj�Y\�d�ߕ�u���I�|f�3U/��4L++~-�:&~���p^@��3�V"tW�"u
�JA��#u
�J�VZg@]��v~�R�{W�)���0����5J2	�r<��IEND�B`��PNG


IHDRr
ߔ	pHYs���+IIDATxڽ�7n1EW�v���9�R���u�0��s��s�+�q<F�@�
߁<e�qÐ�T�E])��l+ϊ�Y��������B�!���4X٢r��9Q����6%����0�Ov��iy;ܕ��\�w�N
Oc�'���3I�y��me� '?��BR��ᗲa����+�[fϨe�5���#�u��ڙ�_���'B�|]N�vN7�_L�-Ep0��d��R4�V>�B�7�sJF�df?��n�7%��m���0��盚��K�l���o~a�x{"�"r4�Ll�D�X*b�@`#k��s�
:���[ �o1Q�S�`B�W�IEND�B`��PNG


IHDRr
ߔ	pHYs���+�IDATx�ŖAj�@Eg�\ �ƫ���W�>�9�׾����'h�EW�.
!$��ï���@�'����Q$̈́`\�/!#mI-�@:�����l��g/r^���#,�g�V�� ��o��H��?��T�
�-x�c�c�]��LjHkLJ����(�È+�"UPNz'm��b_\i�%H/`���>�����H�Y�j!�@+�=��~�$L�6�d�����I��
��H���]b�"��K�yX����̷�[�8P;�697�|k�9�'p���9<z��`�s�M
�R����j!U�ƛ�$iԲ�8)�������ڼ���H��6׼�m���mmO�-����ۓ��Mֱ��
8�#�!*�11�A�?��7\V'O
�7IEND�B`��PNG


IHDRr
ߔ	pHYs���+GIDATxڝ�E�A��nk���e�;k��ˊ�����[�SIMrr����M>��k�w���f�>Oe�x��@p>�3�6T�?-.�V��$(�S�QT�\M	��5U6
|�|%0#�`{����|��|�Rd���$��
|�/�R=FN��K���w�{?��]+��"k�({�=�I�R�W������,�'ǻ��������t�\��V�Өb��`�
�^��C.�A��o�}T(�#Q 2�u��A^�[��}V8M�IB���^��l�zgP�Lލ���d������a������ڬx���:ܟɛ�q9!>��� 8�"¿��ThO�Z��C��)�H_[���F��z~��ڒNS�М��6*�}����p�C��)�Z��X*|�#���_�F������P�H+Tw�����Kҩ�Sb�D�yh�����a#�W�N���_��|��<�5K�މ�ń��+�����Fҗ`I��S��T�)�|���Ɇ�MRʘt*'u���.NzJ>��"]���	�S�%�6x�i��0=����V~�[@�O��3*��"���IEND�B`�.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;
    }

    .callstackwindow .internalFrame {
        color: TRANSPARENT; /*[{plugin-searchcontrol-unfocused-watermark-text-color}]*/
    }�PNG


IHDRr
ߔ	pHYs���+sRGB��, cHRMz&�����u0�`:�p��Q<�IDATx���K
�0�B�� �S!B!�� B B B!x��Cթ�ƾ���}��p��/�G|�o��(Y��D`�w1N0��C��]hn}J@�GX!������
]�僕A��BmKȀ@?��*�d7��	��m��KE�E7e�[��2��gmJ̖(�����вtJ�l��j]c�U�#8�w�
&8����{� 0�c��Y���V:q��QIEND�B`��PNG


IHDRr
ߔsRGB��, cHRMz&�����u0�`:�p��Q<	pHYs���+�IDATx���1E�)A*Ђ�v�`���H�P�
<x���7�$�D���#!*(��L���F�@�Q}@��èn�ϧ�qd�}b���A@uЏ��lb6i7-�g��	��4aј�|�|�-��2��������?`c��d��66&7��U�;IEND�B`��PNG


IHDR `|"p�sRGB��, cHRMz&�����u0�`:�p��Q<	pHYs���+^IDATx���+p�@��r�yʁ92Gyrs���8Y��#���#st-G��/�Σ��tyx��6Mr��q��7"
�6��9�-�!b���%�k�ypE��*Jz�<�N�[u
�i|�	�A��>�!�a'��D��!�������"��=]�o��%	�Y,��E4G@���������#�ɋpu,�7��[q���~w�l��K�b0��ׄ���e�|��|~�&2��֝�����C��	��w�|������Ќ
ZY�/
�'� R��I��c�`��6|D
����
�����!2j��7�.��ئ���E�w���;	PU\	@�����N���$@q	0:�k�+"�ֽ��0]�k���Y�$�EɆ�.�#,�s�Œ\^�kl��޸��z2J�)7D���	et������p>�4�0(����Z�^F�0@\���� ���V]CwZ^T��p;�臝�����k�����"2�����t-��/�$@vd	�8	�M�#��h�܀��0�m#�����/H�d��ey��I��Yh���@�IBW�IEND�B`��PNG


IHDR `�m�	pHYs���o�dgAMA���a*PLTECCCDDD"x�z�!x�#u����������������r�QtRNSQ����AP���Z��sRGB����IDATx�œQ� ��9�Z	�&!��,`�j��ZXIn]�J/��y��HB���Κ��y4t��@Q�a��*�da�< S���������gy�7��{�Ȩ*x�VmpD�����|���pm��L)�˯�D�q�=�+���QU�1*�>b���N�����:gL���W�X
+��h̲�![��%����H{���Xs�H�q_IEND�B`��PNG


IHDR$l5���PLTE�����������������������������������������������������������������������������������������������������ijj`aaUVVz�%��3��B��P�ϊ�ߧ�������������tvv�d�!tRNS!$,A���������IDATx���ۖ�0`E[
~�cQ��?�\l���r�Egr�����^�_(|m�OC�� ,����VxT�T�j��Uίі�ϣr�R�1����}-�"Li��<����-xL�#3!x1-(�kP%�O	��mA�V��RI�]��x>�.m!�D�	:YRs`�^!5�%G�\8$|�ʎ�Z�/��2;��������OÙO9E��L��cf�Q���Z�2S�ZE�ў"y8����rf~@�b3�d�)+3S2)ۂ�Tk��3B7���v��]�B��St����V�B�x4K�̤��
��o]�ɧ������i8�)�蓙ɔ{�L7*����G�)�}-�"�iO�<4f�f
xL�3� x���4����1��mA�F,��q�]�to8��.m!�D�1:Y�C`(_!�n�%gf��ɄC·���SN��2�2<B��yIEND�B`��PNG


IHDR�	pHYs���+`IDATx�c`�	8�w��qC��^�diA��Ldit���[�,�(N&M#��I�u29����%��'޲�q9���+��x9��������p�(V��i�{�%IEND�B`��PNG


IHDR$le�
	pHYs���+PLTEz�����'w��?tRNS@��fsRGB��, cHRMz&�����u0�`:�p��Q<%IDATx�c`�:����k(��Z��V-��Ţ9�)�9�o%IEND�B`��PNG


IHDR6���/<	pHYs���PLTEUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU�O��O��O��O��O��O��O��O��O��O��O��O��O��O��O��O�������������������������������������������������Y��"y�"y�"y�"y�"y�"y�"y�"y�"y�"y�"y�"y�"y�"y��������������������������������=s�NtRNS 0@P`p����������Ͽ����p`P@0  0@P`p����������߿���p`P@0  0@P`p�������WUP cHRMz%������u0�`:�o�_�F�IDATx���R�@�TP	&���*����AdC��f�����?�Se���Cr��s+���-����.��L����M����n�öuH[K�1U��4K�Ԧ��r%��|ױR�+[:��	����G�(%�n�Ē�����Nb�hn�d��,�OD<l#�y+2>ܝ�#q�]l7p��%D A,��¶��E�\�r\ip4�1]W*��K"`E��\IH��JJ��7�V��jZa=�`���$�ߖ�K��Vmsأ��P�����v�aaz��cR���X6�J�B1•�E`���kf=̖[h)<Y$f5���#����nUl���3X��6����&zp��������z0���v�ld�ek��#�JP\���
� �"�@�+v[��jKa�?�����e���e%��!*�R�iK8l߀t��S��X��H*o`�\)x~Lj�w+C�r`���C����Slw����}d��,���]�0X�݅4���}�`ydwge,!	b'l�!l_)\���Q>T��ژ+���K
`������(Jѕ�Z��6��U�
�E������g���F{s!
�Ņե�!�Ѯ�]L����5�Z�]�rl��J�%�Qw��B_>)�}>w�W�"� ���n��pwwG6����y�`��z4��vH�P��N`oxJf�9r4���9�,[[�AW���H�WE)��t�ʼ��z���tn�%��XY�*���<v`�,uiB*1�Y�*g4V6a]/��T�v;}ͤV}Wƕ��b�O��G]�2	̼
�PQ#��\)�e���x�r�%�|3������`�>�/�`��/`�c��|G`�|$!��0L1 ���%�]2�}R�*�%S]�+7|�A��K���շ\j�c�
s��KIEND�B`��PNG


IHDR$l�	pHYs���+sRGB��, cHRMz&�����u0�`:�p��Q<�IDATx����0ES�O{N	.�|I�yO�`Kp	�h�\%PBv,�4�J��X3�	��'�?��H����{��@�a
�v�jt[@���O�4�Q'&���j^�W�3�
�A9���&LG	&�(�!�\䥠��<�t�C���KyH8/B4�"1
�y�˜��ȏ��K!_8�L@+���GрH������^[��3���5����m!~�a{41A��y��1CP/�(_��;5
�0�1�~t�5��O���*�t^	�켙-r�%����M�� M2|r�����+��!��CC�p^��V*@ُ��6��շ5��k�{t^ ��y�@5�- �O!lO�&&��ub"��1f�e��U}����7�ԏ������"�z�@���+��7�E����z�	wD@�I�O��C�p�a��:���wh��+�
@( �Q4 �:m�ˠ��U�IEND�B`��PNG


IHDR `|"p�	pHYs���+!IDATx��OH\G�c]��<(i ��������Iz	BpE�H�%���,zQc�\�l��v!AI�$K��<�s�o>S�-��{�3o�b%��î������ߙ3���]��UH���Q:��$�W	x	Ej_KKK
�A#��:�Dq@0�3���=\P��(�Ñ��7q�<�Ҝ���ɓ�ץ��e�*릧P���\�e8�z�x�����B!�)N|�5�=��y��q��0A��v�1,�h�� [���	;�ߗ|2�G�=%p��t���}���Ö_fX��cz���t�w�cߔu
>�!�+�:;j�=R��+�~>x�!��mG^����oZ��}����̸"�hwt�X8��!>�sx�3��1>b�=�xZ��V�}��E��{g�^)K�S�`�A��O���]��� |)��2��2���Fa�gLCtf�~Z}Ghs+�a��fڠ*�aq��H���Q��'�1�S��_E�l�"����	��m�8�<^�>h�vK6"��W0�A����;:0�����c<@�ʹ=����$�9k��#Bۛ�Ƭ�=�䟯�>p���k�F`!�����(�Ñ��>�╰�cX%7���R���X��� 7�^4t@p����>`�{����._��	��&���n�hwt��> e7��Y��Y�h�0��h/����tV����]��� ^��f� ��C��̿!Й��s+�a��fڠ*�aq��H��T��قE�|}�X�-N�6�W����ҁ�ȴ=_p��n��?��1 �f�QF�B�������M�cVڞ�͓L>�
I��r��]p3J^��db�
 /�H뫁�!h�RS�(�}��4��J{	�¾��`�8p^i��(�e�d6�u)핰�cXe���N�)Ŏn�Ei���1X�b\�f�0�L�$�������a��O[�ϘEC����OfX�D����HF�2�b�+�
"�������*6�@]��>���	�5�)z�_�^fȶ:�vt�X�,��u�}�F�[�Wd[����")��A��8��ΐ����v���Ҙ�x>�m�&�^��w������tV�eP:���x>`�g�4(^J��̐R=�d������Ұ3����V@��ԄpPn�
����Wmt�~���l�"�N�>`��'`�ǫ����lD����5t;���G��6��2�V����펎mo�~�k�\�O��ɼis�IEND�B`��PNG


IHDR `|"p�	pHYs���+�IDATx����:Əϳm۶m۶m�6�m۶m����ߝt��i3�l�&߷I7����e�e)��l@���<:@�&��/�m&g�#8.�f^�!\?���i���x��E|e���\:�_���Z�M>��oM�Y�/F|e�����S��J���h������f
�	u�6</M�a%l�#���'b@7����}��c�������j}Xհa�����~�c�2�j-,��9�	�…P�BORՆb�˲~��`��Np��)��)�M�>
�J�B86�v"�<K�����&���,��2�x	U-�Z���x��$&��io�=f���1�[�%`�Me�Zk�G�3��g�v"���9�e�?�ބM�4��C�sCx+>?����i[Nu����6k���.	k�$�<���	4�L�����ɖ�4�?c�[п(���a1t��oag���΃�Q�Ïv;3��j:�����a��}kH�/�lD�K�
–����D5����ê�=�9�Z�]v��%��em#�R�b��Q 4Ivտ�D����7�df�=J�zD��s�I���]
ܖ`��'@䂑��M�T�Ff�Vx��r��ְ<M���j�Y����r��/�.ı�˜wP�)_�8�A��~C�+L��X���[J���-h"ws#:���^>VcɘM�/��өP���0>��8_Px#yNxv�6���_?� �˃�����>0���`3��;�|�gn><�p]߇R�or?<�B�2��o_��T�H�<��G���h��`,�v0�31&�Ku>P�T��������x�k&�����K�����3�W��>�Dz�b��˒~>��}���t��t��e4@��|�o�~>�x�|������:�i���?|���ҷ�򁟥���}��,�#P�&��1[��k>���|���fA�\�h��i��M������@���\h<`L�|ǎ|�Ww�h��.�Cx=��3���ž�c��h>�p�|F������ �`> Ơ:��6::@�&��/Cr���zB��;򁫯�*�|��4qG>���|�@�������O'�H��?�������*qG>��L�.�������Sԛ0P>�����q��&\>�@���}�sޑ���e�2�p>x>@G�|@�sn؍ώ|��d�P?7DT>p?���FjG>�����|��	G>�u�����D|�ur��̼?������"�!}��L������Ԯ	;z��~����0J�zD�6P�%��������`�p��|�1��;�:\aPܑ�,�㻰^� \>@�|@���{��,`�����L���`$R>��g>��ϙH�asIEND�B`��PNG


IHDR$l�	pHYs���+sRGB��, cHRMz&�����u0�`:�p��Q<�IDATx�횱m�0E5�Ҥ�!u*��R��&����#p����"yw������0)�]g��Zޖ�M(���3�#	��$����Pl��B�����W����
��U)Ŀ/&!�}1
�6�"��.i�V�������
!/���h%Sȫ>s!Z9!�=�!Z�!�!>� Z9
��b�X,O���m#F$���B�HB;����WbBJ��끐��N
��+CHg_B������リ�Iȱ�qM(r�?��T
9�k��!�r��wD+�B���?B��C������b�X�%�NhB�؈I(�=��N f$�ĵɾ��&�:!���!�}e
��PHn_�B��b�������xZa�k�R���
!�V
�d[)����^��B���j��
�v��ڷr��1Z,5�{t�'��DIEND�B`��PNG


IHDR�	pHYs���+�IDATx���?(�q�����$abSJa10(W�.fnQI,HXdB)�h��7P�K"B�tg8Ο{�~��~�ݍ����>��}ޟ���`��(�DX�5T�>�qG�����0EIdcܢ(o�2H�-������qY�0I�L��%�&��'ݩS~���ee��d�K關�,���Պ�P�:J�:<�\�M��L�B�P�
�I�.SɈ�(c����+���&y�#��d�cR�)�8�4RC;ke?�I�ui#��s�鮩��=Vr�/�h��!n\���OKz�C�y�x�'�"�lFW-Nq>��p�g��PZ���W����R�N�R�Q�`���C�{
��9�	����rf�y�3�{�b�t�H��q�,�Eq�'�?~|�����i�IEND�B`��PNG


IHDR `|"p�	pHYs���+�IDATx��1��0E�U�ti"���9RE܅=e�ۥ�	
��F�ne�f�SdFz�'�Y��l�,�h�#PIć{fp�X�^&p���)ใ�����xlp'б��\]��t�[�l�"p��[ �k	����\N��l�[�7�^S`���a����D�J�&�ψ�z�	E�(ܵ���|}�^@�JB` >�3�+���8�:0�����GM��5<5��c���8������:$���@��9�����ZB �k)�M`�}& .@��zM��j��}!0N�gād���"�T���Fzn��h�#PIć{fp�X�^&p���)ใ�����xlp\��c{s��	d�:$��kN���������ZJ�e�z�	�7�^S`��'`_�L�S�q Y�:A��<���!�G��6��IEND�B`��PNG


IHDRr
ߔ	pHYs�� cHRMz%������u0�`:�o�_�F�IDATx�c`q����?�x>�-$�R�&*8r>�-$�RlrE�Ke6Y!���݇��!E�'LJT�p����DC5�ɪ��t�!Т�e��ć@K���އ@l��=�2��h��2���y��h�Ԃ�P�9��V���N��tK�ë��&\;���`���xIEND�B`��PNG


IHDR `|"p�tEXtSoftwareAdobe ImageReadyq�e<viTXtXML:com.adobe.xmp<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.5-c021 79.155772, 2014/01/13-19:44:00        "> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmpMM:OriginalDocumentID="xmp.did:501c3fff-974d-f14b-ae5a-c1368bd48031" xmpMM:DocumentID="xmp.did:123944C7FE6111E4B052B1DD7A7D4F39" xmpMM:InstanceID="xmp.iid:123944C6FE6111E4B052B1DD7A7D4F39" xmp:CreatorTool="Adobe Photoshop CC 2014 (Windows)"> <xmpMM:DerivedFrom stRef:instanceID="xmp.iid:501c3fff-974d-f14b-ae5a-c1368bd48031" stRef:documentID="xmp.did:501c3fff-974d-f14b-ae5a-c1368bd48031"/> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end="r"?>=�N%�IDATx��Y�n1�EAB�O�TQ�'h��z"�nmNiy��@�z*��9	���*����U�¹��M�9r�]��/��ki�3��gƳ_��p�ٮy��z�}?��F��B�4��j���1S+˧����pik�=(�C_i����3߅ϴD��-1m'�P�V�㯱_O�I��^���V���l~���h4��s�h����eB�����NZ��y�Y���T���o9}��r�j�V��,�.��e�O���p��zz=��]�S��8�8tnFd69�ܹ)����v�LKȚ'Y��*�� �<}M&
(o?u�U<�_d=P�2�3��ۏ"x��Qǥ݊�.�X�}�fV��V�������r�ӻ���3Rx�<�ƳE�����D$q��qX"R���̜���!��~�9�W[ҁ�/2�*q���[*,>��X~9)1��ͦS��t����ӊi]�ldY�2���\,�X�k#��$J�	]��	bζ��v�����V����0,�Ű�>��}�mE|����.`�����qS��j��Q�b��i����������O|�Z���l�M�z9�Kf��
H�h�bI���V�����O�j�
�+#��|���
��
�[�?��4�b�(�->�򟐺��gZ�0|��D!���D������+�`V|��>�y�Y���T���N�xe]v��>��<c���Q�1�X2�>��eB���.��L�a�Py�u\ڭ����������H��]�rV@������0����d�����ؔ���{�/��<�87��'{|@���q�����6b�K�D���E�	|���$�o�b����@i���	0H򽲥Fc@IEND�B`��PNG


IHDR @{�u�sRGB���gAMA���a	pHYs���o�dtEXtSoftwarepaint.net 4.0.5e�2eIDAThC�XQn�@cO��~q.�7'YUB|r��`�-�*UjE���&i&��	��V’�=�`Hf�d���z�_����
kLz�}H��Cxr���mCxb����BxR����&�'�a߀G��CHΏ&0�
܃'�]�1k+�F��}0x�y����=�}�Pw6Y�ᮿ�p)�5�GC�/��hg��>v�g0YJ��G���Po4�xC@��~�p�'�{��P}R^d�lT
A��'��P}R^��,U
A�����R}��`�w�i�r7%�7�"<�����S��
�	Ы]��O��Р0�~�FD���<<H2<���2�e!<@�&��3������.�͒����Rc�.���wsՅ�I2�?��!l�̢�OYK�r�Lw��7�ޔ�������-�A�;��r��W�+�#��ä�އ��>�'�a�6�'�a��.�'�a_�mBxB��
���8��h��=x�E�v�����-��F�^�~�>�(�;�,�p�_�
�y̚��!ܗ�b���}?����͟�d)��=�&�C���
=�_z�-�u̞<�&�T��=هSz�M��>)�tz������1�~-�g�	6p�)�6ӻi7%�7�"���&��ӻi$�W�?�� Яو�S��A�!��m�D_���ɛ�o�ψW;��ț��6KcxއK���6J�
�U�&�,J�藇�A2�R?<e!P,y���|��M)��!�y�����d��Ό��a�Ac}�W�IEND�B`��PNG


IHDR$��PA�	pHYs���+�IDATx���7��Fp,ĕ�F1=�M��{I�Wz�oM唪��{JOVʚ�U���Mp�4���Ly8N���8��A��ӎu�W_}5FrdP��Fn�P�h7�Z0UrfRN�Y03$9q�Z0UF��0��Œ�(0M��nAari���]"��B��R_�Qd��Pd�/�%�T�62�����cx2/aB�n,�*�du�%�[��Gu�c<P�����s�'�@E��uN����N{�z�A���&�9D�r`]����%�{ȷ&��Sa�P�&� �u�
��
�
����
�/=ƎzjG3�ь
/l�Ъ&FrdP��Fn�P�h7�Z0UrfRN�Y03$Z�Hׂ�rI�9U]�1	�&H�u
��0��x|M
��J}1G�)@M�ݾ�G\��Ra�Ȕ.�
��ɼP�	���$�@�Џy��	�a�Q�p�)�%�8�>����|PQ���QvtB��@�B�v!�;L�;r�
�'�0/QK0��oM:����B'����&��F 7	��_z���F�f4�/�l�	#92�f�l#7e(L�I-�*�
3)'�,�-L�k�T��œ�.��C$R���[P��\R<��&�hD�������&�n_�#.JF�0mdJuA���d^(„B�XU I��<sY�$}�1��np���`�P�b���(lG��;:�N{�z�A���&�9D�r`]����%�{ȷ&��Sa�P�3&� �u�
��
�
����
�/=Ǝj����hF�q3}>FrdP��Fn�P�h7�Z0UrfRN�Y03$=yd�T�0Yua�p$� Y'&2܂�0d�x|MVGTZ'��-X}u^g��qJ��u�%�t���P����4��S��[ԛ�燌��Qݥ{ۉl!א> s��:���1�/cn:�B�h�{��`��
��kń*����N��U֔bѣ�}X.	ƽ��B)1z�N�dz�Zȩ:�.;"
Ko���M��қ��t�3C.1ԛT��
=l;��r�
����0��B�z�e)�f�t�W��Ȃ�2Ra2�^i;�6{�#��ң
�+�G��d��;J��uf����O,(	�cXg�H����'hc�ٷ�{<�ؐ1�X:��e�ǃ��D��kH߰An�PS�"��'|����P�GorC�x��'c�W�5|εU?�	R��ʚ�,z[��%����ה�(!F�b��:~�:��:"
Ko���M��қ��t�3C.1ԛT�����·;(w�6�T��wƨ��ub6y�t�W��+=����^�ц�֣R!�}{�%��:3F��J�W�'��1�3s$Z�^�4��S�[ԛ��І�Oʆ���M||'��\C��
rs����t>Y��e�M�B_-s�q�_a�����>�ڪ�)\QeMI=��Ї��Q`�kJ�a��G1(u�QYQ#GDa�M�	�Xz���Α`f�e#�z�
#-����M^$~�a�z0*��o1$��ZVIEND�B`��PNG


IHDR6l��~	pHYs���+�PLTEUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUjjj������������������������������������"y�"y�"y�"y�"y�"y�"y�"y�>�Ń�ڻ��������������<�W�#tRNS 0@P`�����������Ͽ��`@00@`����[�JsRGB��, cHRMz&�����u0�`:�p��Q<CIDATx���n�0�����ldе�[;�?�~�Rƒ�Xv�]����ӱ�-<�E����T�����-���$9��]GǤٽ�Y5B�(S.��%�wq(n�ֱ+R��}M��<�j$���#I�Q�� �d�)����xr�.����q��־ ;�(9��kGǤٛv�j��Q
�\X���_)���?�7���\�؜��JQKj$���#�\�(�An�D���q�>���i[�*kVYX�4��Ϣ�pf��fXe�a�L��"lW*�[-��ؑ����-���z>R#Q�UI�E@�L %\��D���	*1�[WDKIEND�B`��PNG


IHDRr
ߔ^IDATx�c`#
��V����ɱL�ߓi�r,�jY�@��,j0@rm	�p[�Onp����l��QG-�p��ada
-\?�@>�s��8�IEND�B`��PNG


IHDR��
�IDATxڕ�A�0E�	�@��H��3�:�$T"�R�;��of��oI�����SfrE�j_f�����_Y��(I��ʒEFt�aEi&�<A�^����i�5��*ҫMX����谸_��r[��<a�K��*�Ȣ'�6�i��j��=�Ʀ�8��y9%Ĝb�B�q��+���W�OOPX��˚�`��Zd#�+�U 5�
?�>��dE��Ĩv�|�1IEND�B`��PNG


IHDR��
gAMA���a	pHYs��(J��IDATxڝ��0�ǣ8թs���{\��t.s�S���9eI�~˵?��J��9���\{��0#���	G��!��I�g%1#�3��Q�xÎ�C��
ƴ����U��j���*���l`=h��
ˎ��Bx��!FT`L�����I�Ƭ�RV�
���(B�����,!!$�/�Xn!��(=b	�eC9�	�
b���Ì*\�#���]��L��IEND�B`��PNG


IHDRr
ߔ	pHYs���+�IDATx^���K1ƛx��P�&.��\�VtѮN�kq(n.�.B�g��ۂ���.J��\�е�`�A9)��AJEr&�3
�xPޗ��\���qf���	|�_@8�ل#pN:���1[C�F��>�&��,�:z�%�cKfĎ#�<���-]�Z���)td��O�ʌ��TtN��0���
S�G�G�MC�xv�8<K�Z*����̬�f�=�J�� -����0�z�T�YFĊ��Gy�
�Y�
��S���W �)�S>�VؐV������u�H�Hn�!,Qh6�Ϲ\�C�E�"r��s�����c���y^Ѱ��#�4���м�8A�Cj�+X�4�����d���@��IV�/{h�
b��f�p���SM�<8wc�k�(�J:N��#�{���mh^�)��Fee��a��Z���pG��F�IEND�B`��PNG


IHDRr
ߔ	pHYs���+IDATx^�TA��@t�y��?��/��2H`��ov?0�,��6�E��gKhplG��SPtөN�M:���5!z��(�%�gT�w�g]�?��{�Y��a�+�9X�	�F|���Ed1� �df�[�q3>����߉�Q� ���t/�Q�_��߁n��N��S�V��22�j�`��e�+#o`v��1{]#�s"F���F�~�&�Dt�� A˟�
� �	�;|t����i(�m�Z�
J��Rφ�0ܡ���Yx�	��Ih�}IEND�B`��PNG


IHDRr
ߔsRGB��, cHRMz&�����u0�`:�p��Q<	pHYs���+�IDATx����@��uZ�8ũq�S��T�Ry����b��i����來2�{���m�������(
�YDީ�dt�FN�Pn2j2Zڀ�wp�l��&K0��l�.7���@~QPP�j$���{���F$�e@Z���� a(x&@w�����!O`͈�>�3:�zA�П�A��z�Ѕ}���CB�Z�-X�<�ː􂌲GGk�N����5���|����IEND�B`��PNG


IHDR `|"p�gAMA���asRGB���	pHYs���o�dQIDATx����F��'<QDaf�X�(�̜Œ��B��D�2�13333Cǥl;�Z��F�p$����35�UŁ����:/�QI�S�����g�KNݛ��;oRb�'��}�9Y�a�@hg�A��3���{
�MV��x��e�9��-���ijS�<-�H�#�W�Κ+ϸ(�|�
��N�.wD��kd�e}T�S�:�0�nNj��5�z�J���-���1�x��w�o�>,��>���\�/�Yű��*>&�R0��۬��/��Zk����?
�{��:}b����PX�h�n�U��'�D`���[k[��>��pƻ�{�����Y�'��F������A���9?������X�i��j7�ȃ�;�֙���P�v{��Wʖ=����+\�Ub�7�W���t�
��M�f��WoB����3,��
�T�ݮ���n3����چ�>����f͞���"k�7��~��np�s�?���/��2ۍ"�V4��ۅ�n��>&������p8�w����b�	�+��|M�-��ȩ�=�Q��d��hq�(�?8��a}�[>Q�w���d��t>`���p����ы�R���/�(��|�0�nNj��齎�x�?�q[���p�7�Y�>�#��
#�ڍ�x�nO��}�Nt�fm��?�[-�O�&��A�P����Y�'��~�����z��=��}+��G����d�u��v��fb�ҡz9}�q��4`�7�W���t&�������݄T>0d������!6�S��F�.�
M=1�vþ�q����~2�����U�`��n<���p����<�=!vcM�a������|����oRb�'��:;;e����ŋ����6}zn>�&%#��ښ�k�"�V��������O���@L>�y�6innNŇ
&{���`s�����ѡ�Ƙ�xs�椖���4�S6<�_a�H����5i�d��b�u�}��8�۬8�V�5}���{�/!��
#�ڍ�x�n�<E���^�V|v[�d��>��pƗ-[.��|v�?1��b�5���z����ݬ�@_��g����#���Zg2�:�X��8}/D/g>4�`p����t�^�>�ҙ����,�y���Mȼݖ-_���`�?Ȇx���6��m��0��0o�
6�8������.IgW���|>೛.	���݊�?&�����<�w>���<�=!v#m���n����+�/(Z�IEND�B`��PNG


IHDR�	pHYs���+TIDATxڥտJ�P��]"Ԃ�I7]t�R����:�
}�E��Pg:*..Ǣ��U\l_�+��4��r��N��N�/�F$R�(P�E�>�ҧG�R2���d��c��Q����M�%��K�=����6HGYe�9�s�g��Q:���ƶ�;���É!ʾXY�!��RQ�V0���&쒋et����q��L�����)�(#���B�"E�T��Qd�Lh3�/qg�4qp�$"",s�QϘ~�YȌ��̀^"6�F?;@/d",Y��{e-Q��<��j�,�`Gg�,��ED��N�n�Sk9��������O���d��s��|��Ynh�AeIEND�B`��PNG


IHDR `|"p�	pHYs���+ cHRMz%������u0�`:�o�_�FIDATx�헿n�0��0��#�:zHv����^�0�;�+4��UoPBP(�����퐭u
$[� ���Hɔ���s�Q:~���RI�(y�� �V�y
Q�xF
P�D����
y�Dh��*d��m�z̺/��`�<��0�K`9L�c��X���"�^qi�u0�2Ă�,�qB���A�\�f��^#1֘��&֮O��2��!	�s�ي-Y��N
�)0��й�S����%!q잌��1dξ� zQ_��N� ���n�hq`����LRI%]ޮ�� �V�y
Q�xF
P�D����
y�Dh��*d��m�z̺/��`�<��0�K`9L�c��X���"���FYc*Co���	av3Ikp
�{��Xc֫c�X�>i��\��$\�%f+�dZ;)���.@�N�޷���[��H1~IHC�쫎�����	�2��6��`F�,��$�TRѥ�����0O!*|ψ@�*��?}}1�S(�����
٥n;��z̺/�w�G�_����}�9�/��n���^�~Z���D�
b�1��qc*CoZOe�dމ=�jo�����4#,�3��^���I�V��� $�>Z}+�Ml��vR�O��Y���N�5����<p�r���1d�Gu���/@o'LP�ho�Q�8	`����L��:��t����ȑ/�Z_IEND�B`��PNG


IHDR@ ��~�gAMA���asRGB��, cHRMz&�����u0�`:�p��Q<	pHYs����IDATx���G�P��H���H@�l�V�"	��>UB���Y��P�?�
�_z,��RJ]]��J��X�
� ��c�	�f"��z�0�&���1 �~�	�YP0�����f�%�l�20q�R�)��B�	�3!»���$�N'G8��8�	�/���0�i��p�P�?`�/B�*L]�/B�w�}���a��0�`���y�x��RjQ������IEND�B`��PNG


IHDR��
sRGB��, cHRMz&�����u0�`:�p��Q<	pHYs���+rIDATx����@�-�)����t�R��N�38fg��BBGCs=��	���e���ƐK�-7�$ݬ`�`K���[���=�A�n�ا��Q�/��!3H�m�S�8lIEND�B`��PNG


IHDR��
gAMA���asRGB��, cHRMz&�����u0�`:�p��Q<	pHYs��(J��IDATxڵԷ� @aj++�3ma�f��n`�ć��u�}
*b�O����M��0��T�%�0�-? 5Ul)? }�c�K�H�f�uX�8����@�i��OA�}q0��E�/�#pԁ:�����|IEND�B`��PNG


IHDR@ ��~�gAMA���asRGB��, cHRMz&�����u0�`:�p��Q<	pHYs���IDATx��G��PDAv�8*\�'g{!� ��AP�@��y�a^U�U��f�"� ���_�*,,�*���G�V�����I�dD��22�<��j߫-�g��KqF��o/ŗ��#Ly�Y�sȲ
(��t]w���B�|�FC-��d�|yD��G��dy��!H)C�W��0_����%�ѫ�����K-`9�� ���{k�7�!�&�|�:/���<
��@DA�Y����ΘIEND�B`��PNG


IHDR@ �C��	pHYs��j։	gAMA���acPLTE���������������������������������������ɯ��Ȧ���������_�}X�zW�kC�^E�c2�b)�f$|h!zmW�������������(tRNS 0@`p�����c4���IDATx����0D�"�V����R��	*8<8C��C���0�������X����s	$�axy��<�7�	8����`��@�m10��N�g�.ѷQ��J�C�	@`�C�	R��� 	�[o�� 		�l�����?6�X�c�0���Q�
��N�E8L�^7��L���k��l��q��FWc#����\$�>ʥ�E��G��ӯs4���k.��V��q=yS��F>�IEND�B`��PNG


IHDR�A�Z	pHYs���+=IDATx�c`�|��_����X$�����?�$X������$@����MPI�?` ��^�j
�IEND�B`��PNG


IHDR `|"p�	pHYs���+�IDATx��m�0E�J@��h�;%p�-P��H�@	�B	�9��x>	y�w�?əa��W�Z5�qX&��C���D��8�0j��a��$����s6m��$�(A��b?
�m��s���
��L���dS�
O� =\* ��eF.��g�
GO�"��O�m��Rk�?��Z�j���{5�dwt��6#<��ǁ�Fmb� ��@�X�>_ rΦ-А\�#H�h�ixoƞC$�W �H`b���?Hi�\�����8\"�Y�P`v��%+9���K�o�}�P�Z˯��ԪU�_�qX&��C���D��8�0j��a��$����s6m��$�(A��b?
�m��s���
��L���dS�
O� =\* ��eF.��g�
GO�"��O�m��Rk����Z����+�O�IEND�B`��PNG


IHDR��-�IDATxڭ�5R�P��*��
hp���J*v�
׊
���.��`�w�/r2p�!����Q���yEUUU200 ���hޖax�0l1���"?�ž��rG��ʾP\)֝\�ߥ�
��
666����na�s�wOnĂ��zֱ�^�|pv�j!�.l����1,_^^�?o�@DW�E/�}�HB n-���l��/$�e!b#P�e<
l����vRQ�Q��$����U���9R�ھ
�-.Ȩ�)`�vB���,���A�uH��C:�"�d^r��yIEND�B`��PNG


IHDR `�m�	pHYs���+PLTEUUU"y����������"y�"y�UUUUUU�L
	tRNS������5�mIDATx���	�0�aG�!;t����w�n�-�y�@��xȇD�����B?�%@G��c
F�a�D�Fh'��h2�p��(?�3�_��K���3�����^�d<J�Z�bIEND�B`��PNG


IHDRr
ߔ	pHYs���+sRGB��, cHRMz&�����u0�`:�p��Q<�IDATx�c`,�C����@��B|��Yf@%��q6�hdا�,�O#����������I��p���B2-t ׅ��Z8jᨅC�B*���T�
��G[���5:9��b�z��{|a�@�/A8@�z$�BM͆�~bSW�������J��U�IEND�B`��PNG


IHDR�	pHYs���+sRGB��, cHRMz&�����u0�`:�p��Q<�IDATxڽ�A��0�!����!��!�!,CC�|��ŧ�|����Q�j���ߋ��JAc�~
����3n=,׭+3#K���ء~=��veB��P����-"DͪB��
C�-!!ʉ��PKX��O}D�qA"�����{g�c�V7�Dbc�9e���*����@3���α'����5d^:ް�+����!0�1D�H~��������_�Γp��;��n�B1��IEND�B`��PNG


IHDR�	pHYs���+�IDATxڕ�=K�P�o:�P�B�
ա��qp��O��HWA�'8v�"fqѡ�PpqR�?&'�:H�
Vm9�57���{��܇sΛ�R�%�	�T�!5�\sB�Q�I�R��tXM����9 A�(s��Qr�^ѱ2B�<���Lq�BكR@x!�z��
��@,!�	����d&�VH�Ė��G�K��f�+�� 8�.�w�q�>Y��s�9�4��&-���)O|i��F�CV�U��R�A&�%A�i�����Xm�{����X��Hyf��U����o5e��A��v=��Y/�cP�W=~��*��6��E�CnO���E�;i��b��R8؄S�i�w�1�-S���㻯@f��$clas�;�?�8ZZmIEND�B`��PNG


IHDR$l�sRGB��, cHRMz&�����u0�`:�p��Q<	pHYs���+IDATx���)p�0��pdTl�đ8�]\����I9G9��9G���ȡ��y����G��r�Y�����}~}%����_��d �@2��d/bf�pIPâd�K��I�q(�wҘ97HM�G3a&W�Ġp+��z
��JJ���aИ��/=sjP�A�w�� ��TZR `��}�� �?�7�t�Q^��Ҁ��b[QbU�"����3$���l �@2��t� ً��.\԰(��R/u��@J��4f�
RS"P�L���*1(�
i��m�����s4�A�+�KϜiP��]�>H17���8��l_�:������Hc�W�4� ��1r~U�"����l����w��d �@2��E�l��R��Eɜ�:�(�d�眫(�ORʅ��D�0����@[�q�u�eA\yT�m���UZ�h�_�F�w{<X�/�Db2�տ� 1�9��
�׿��0��A,�]UW�Q��3��RIEND�B`��PNG


IHDR$l5��	pHYs���+rPLTEUVVUVVUVVUVVUVVUVVUVVUVVUVVUVVUVVUVVUVVz�z�z�z�z�z�z�z�z�z�z�z�z�z��������������������������������zn%tRNS 0@����������Ͽ����`@0 0�������]��hsRGB��, cHRMz&�����u0�`:�p��Q<QIDATx����r�0�P
VQ�
�x�Wl���{࢝����|�d6G���,b�������Cq��M�2-���ǹ�F~��� `4BF���L(0�yV�c��D�����U��x���@��2S��ν�DDgp��q:jK��:�ׁx���$���6�ڸI>'����|猱Q�0�B�1����}/s�<+ʲ1T��4-*v�j�
�RU�@��L}uE�j"��(����x���{m�>f�yie�r��eT��U�;��16:Ռ�Щ�A�h��F�/���hd��Fe%_�� *�{��T+����]%z�����8:���F���0)ߞ0G�T�,�IEND�B`��PNG


IHDR$l�	pHYs���+sRGB��, cHRMz&�����u0�`:�p��Q<�IDATx���m�0Ќ�S�!#x�\��Gȹ�l�4B�,�4�G�.��C�&ET�O6��"��N���z](����@݁�d~��	�!N�x��CQ�@pmBH/	�Ȫ�@�62vR��t}�궽��X���7��G�22����P\ݾ�9~T��硌—�1���
�[L�gm�d�֜'$��|�[_?a����Wf I���1�5��8�I�m CPܩE�P�'\�!
d�Ed��@�62vz"AN
tA`����`�E[��z�q3䮾�m�	��H(�nOBq��(�y�
�=�eԂFQ�A�xm���t����0�)m�m0��\��k����Wf I���1�5�=wHZm�'d���S�ҡ�O �6!
d�Ed��@�62v
H��]/��&Z$
�e���\,��^��4�O����P\ݾ�9~T���b�ĀVT.�� b�6��bD>k�$�����(�"��w��x��j��
IEND�B`��PNG


IHDR `|"p�	pHYs���+ cHRMz%������u0�`:�o�_�FIDATx����@��� Ӂ�,B�m��kH��kA�Z�^=��{�]g��1�.|�dv��av���,�V��#�^��CS@�HZ���|_<��HZ��)���9�!P�@�oA�pD��I���@lv`Ʀ�?�־������B�
��/��=P1�m?�O��@�6�ش�׮L�`���S�N��@&�|�<T�gȼ����>�<��h�*P����K/R�!�)��$�T�I�/��f$�P達|�@��(s ۷ J8�H[����m 6;�cSܟ�ck�	TVUpy!{K����Ƕ��Ly }��
lZ�k�&g0���)p�AU�_>��*�3d��w�dL�l4g(����<b�@j<$0@]���*= ��Sz�L��*=��/��ed�D	G�i��Z���F`�`l*��3pl�;���j./d�`�������)�o��M�z�z�D���|>�4�
4`���y�sAE{�̻�������?����F{;IEND�B`��PNG


IHDR$l5��	pHYs��j։	gAMA���a�PLTEOOOWWWUUUSWWVVVUUUUUUUUUTVVTUUUUUTVVTUUUVVUVVy�z�z�y�y�z�y�y�y�z�z�y�{�z�w�����������������������������������������������ɌX.tRNS 0@P`����������Ͽ����p`P@0  0@P`���������H�IDATx���r�0�/���h�"�KU���I6ƨ#ө�>v�	����"����
��_�l�k�mP��_�n�	�<� :hDP�Wѹj!�r���l�[����(B-st��z�2�`���5E;^��f�ig���7�Eh@q�=Bz��!ϐ���ֻ�3vT_j�p8Ԑa\��7��Dj��4]>�W�0�x�UE
3r"n�Ԗv�����|���J��@E�b��{���e|
��f|�VSIMS����R�hY�LhKXR�* *�
�U�V���m�����x=Q��A�(ֻ�g\��ߤ'
�[�aR�0���4����n8-?]q�#;���QU���*��CE
�審�A�Ϣ�ܺ�����@_�m
�{�B+����f|�K&��!�2G���n�-��h�QSl��k5�\;��5��6����w��p�!{�_�^�]�;� 5xx<j�0�ZPq�r"5{Z�.�~M�7�Pv+�RIEND�B`��PNG


IHDRr
ߔIDATx�c`�`Ѓ��l��X�Q�. >
���� >�S�X�*��@��}[dg�P����3�(y���[1T^��8�,D�E
�,��p53Q�r	�=��RP���B3 ��#�� f���P�@|O�>	��T������!K�㴔�S"G���f�[�d������\�Y���q�@�8������u�����O��o��<R-e�@|�?B���@����Xj��1
��
�:�"�IEND�B`�#console {
    display: -ms-grid;
    -ms-grid-rows: auto auto 1fr;
    -ms-grid-columns: 100%;
    overflow: hidden;
}

    #console > #findResultsToolbar {
        -ms-grid-row: 1;
    }
            #console > #findResultsToolbar > .BPT-Toolbar > .BPT-ToolbarContents {
                margin-right: 0;
                display: -ms-grid;
                -ms-grid-columns: auto 1fr;
            }

                #console > #findResultsToolbar > .BPT-Toolbar > .BPT-ToolbarContents > .BPT-ToolTitle {
                    -ms-grid-column: 1;
                }

                #console > #findResultsToolbar > .BPT-Toolbar > .BPT-ToolbarContents > .buttons {
                    -ms-grid-column: 2;
                    margin-right: 0;
                    display: -ms-grid;
                    -ms-grid-columns: auto auto auto auto 1fr auto auto;
                }

                    #console > #findResultsToolbar > .BPT-Toolbar > .BPT-ToolbarContents > .buttons > .BPT-button.previousResultButton {
                        -ms-grid-column: 2;
                    }

                        #console > #findResultsToolbar > .BPT-Toolbar > .BPT-ToolbarContents > .buttons > .BPT-button.previousResultButton > .buttonIcon {
                            background-image: url(''); /*[url({f12-debugger-image-find-results-previous-result})]*/
                        }

                    #console > #findResultsToolbar > .BPT-Toolbar > .BPT-ToolbarContents > .buttons > .BPT-button.nextResultButton {
                        -ms-grid-column: 3;
                    }

                        #console > #findResultsToolbar > .BPT-Toolbar > .BPT-ToolbarContents > .buttons > .BPT-button.nextResultButton > .buttonIcon {
                            background-image: url(''); /*[url({f12-debugger-image-find-results-next-result})]*/
                        }

                    #console > #findResultsToolbar > .BPT-Toolbar > .BPT-ToolbarContents > .buttons > .BPT-button.clearResultsButton {
                        -ms-grid-column: 4;
                    }

                        #console > #findResultsToolbar > .BPT-Toolbar > .BPT-ToolbarContents > .buttons > .BPT-button.clearResultsButton > .buttonIcon {
                            background-image: url(''); /*[url({f12-debugger-image-find-results-clear-results})]*/
                        }

                    #console > #findResultsToolbar > .BPT-Toolbar > .BPT-ToolbarContents > .buttons > .spacer {
                        -ms-grid-column: 5;
                    }

                    #console > #findResultsToolbar > .BPT-Toolbar > .BPT-ToolbarContents > .buttons > .BPT-button.pinFindResultsWindowButton {
                        -ms-grid-column: 6;
                    }

                        #console > #findResultsToolbar > .BPT-Toolbar > .BPT-ToolbarContents > .buttons > .BPT-button.pinFindResultsWindowButton > .buttonIcon {
                            background-image: url(''); /*[url({f12-debugger-image-find-results-unpin})]*/
                        }

                        #console > #findResultsToolbar > .BPT-Toolbar > .BPT-ToolbarContents > .buttons > .BPT-button.pinFindResultsWindowButton.checked > .buttonIcon {
                            background-image: url(''); /*[url({f12-debugger-image-find-results-pin})]*/
                        }

                    #console > #findResultsToolbar > .BPT-Toolbar > .BPT-ToolbarContents > .buttons > .BPT-button.closeFindResultsWindowButton {
                        -ms-grid-column: 7;
                    }

                        #console > #findResultsToolbar > .BPT-Toolbar > .BPT-ToolbarContents > .buttons > .BPT-button.closeFindResultsWindowButton > .buttonIcon {
                            background-image: url(''); /*[url({f12-debugger-image-find-results-close})]*/
                        }

    #console > #findResultsTotals {
        display: -ms-grid;
        -ms-grid-columns: auto 1fr;
        -ms-grid-row: 2;
        padding: 5px 5px 5px 14px;
    }

        #console > #findResultsTotals #findResultsProgress
        {
            -ms-grid-column: 2;
            -ms-grid-row-align: center;
            width: auto;
            padding: 0 10px;
            height: 5px;
        }

    #console > #findResults {
        -ms-grid-row: 3;
    }

        #console > #findResults > div {
            height: 100%;
        }

            #console > #findResults .grid-canvas {
                /*
                 * Prevent the x-scrollbar from obscuring the bottom result row.
                 * The grid control will truncate cell contents, so it doesn't need to scroll horizontally.
                 */
                overflow-x: hidden;
            }


�PNG


IHDR$l�IDATx���+p�<��H��G�(/>�(�e�����Jő�|_+��#u�hvn6�N�I.�̿m����{*����mPk{zz�rE�7(5c�. `��Ο_3��+LFw_6$N��qP��	��	"Ά��#w�Ѡ�q'�O���,ն�G�V N�� ��c�5�0g�!���8g��$�3'p�@-�|d�'nb�x
��D��,@&��j!Є�w ��
�) �m
�z�7ƃ��!������n�"HY2gE�|�
@
����c�:@*F= {L(�� ��Gc�{�d�iX�&h�>,��_<�\�
J���;��W�-@��dt�aC���	��	�� �lX�=r�>
�����G�V��8�$N��kj��������8N`��獓���(��rR�\�b�f
�0c2����7c�H��ђ^�+mK�qՋ��A��jP�%k�1��~��>���'r<��z�7)=��CQ�\�˜;�/W�{�#g�
��y+5F3�
ێ��S�c,��Y���
����+B�A��ts'v���(W��� lH�b��2A4AD�
+�G��G�A����q�(�Z�N��8A���:��Ý�`�h"@$�0�����E���I�v��������e�|gr��G^���Ҟ6���&@wf/��
~��*����D�GV�{���bUcT0��2Ǯƨ`Bu�xĶƨc�J�1:��X�~e�ix��F��-�́�o/ �U��IIEND�B`��PNG


IHDR$l5���PLTEUUUUUUUUU���������������������������������������������UUUUUUUUU"y�"y�"y�"y�"y�"y�"y��#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�U~,tRNS0``P0 p������������`0  0@P`p���������Bю�IDATx��[s�0����Hmk/1
������%xa3v*�&L�Y�,p�/>�ɵ��.��Z��
�T�6�Q5��(�Δ��%3�����m�>�ꛔ��"��й�����F	��|�B ��5�dp�ꄶ�1�K]���aJ70dG�s�bVɃ7��K?�%�kBc�mN����tmf�L���җs��d&o2s��Ze֗b����KnN5,3���D�;sn���d3S�ze��
}��)�w��	�ŀ�l����3s���u���
`b��Oc��QbW�&X�9*�L�>92l��N=]j2F��ϘQ��ʰ�oR�,�L
�S�h�ry�2S��ň"1�֛�oΡ���h-�Cf��!c82#g���ɥCtMh���ɫj]��-gIEND�B`��PNG


IHDR `K���	pHYs��PLTEUUUUUU"y�"y���������btRNS�������L cHRMz%������u0�`:�o�_�F�IDATx��91��'o�F���%���~��Z�YM�m�o�rE_����Ƚ�FВt&EQ�R��ꭵnF��G���\Q��#���ro��$�IAQ��T�Ɯs���4��v�.W�券:��h-IgRP5?+���Q�GAIEND�B`��PNG


IHDR `K���	pHYs��!PLTEUUUUUU"y�"y�"y�"y��������������-�;
tRNS�����``���-l� cHRMz%������u0�`:�o�_�F�IDATx���� D[���ד��H�4}�y��"X2.��d�%(F������S�gȑÒy�Ag1�C����ś�d#Wt<�G�d��A3
� KP�J�ڿћ��I�YK�<r%Xg1�C�|��t�)&YIEND�B`��PNG


IHDR `K���PLTEUUU"y�����H2tRNS@��fZIDATx���!0C�n���� `����	����x`l�
�-V����iZ�	��
P���N1 Z>M0�ぱ*ж8)�C˧i^t)/a���IEND�B`��PNG


IHDR `K���	pHYs��9PLTEUUU"y�"y�"y�"y�"y�"y�"y�"y�"y�UUUUUU�������������������{p�tRNS0@`������ϟ�`|n�� cHRMz%������u0�`:�o�_�F�IDATx�ݔ�
� D�b�����(K�0���:�U�� ������9�@y���%#z�Eߙ<.�n�\��Nb�9dA���DB)�p�>a.���ͳ�2
�\�O��$&|�B��f�����<��h�\���Z�Vf���@a�l~2z�ԍ�IEND�B`��PNG


IHDR `�m�PLTEUUU"y�����H2tRNS@��fTIDATx��ϱ
 AWpWp��l(�:��@k��f�2p��p�+����0H�Mj8���e�v�ܦ5@�
��_�R�-֪�IEND�B`�//! Copyright (C) Microsoft. All rights reserved.
var F12;(function(n){var t;(function(n){var t;(function(n){"use strict";var i,t,r,u,f,e,o,s,h,c;(function(n){n[n.On=0]="On";n[n.Off=1]="Off";n[n.Disabled=2]="Disabled"})(n.Tristate||(n.Tristate={}));i=n.Tristate;t=function(){function n(n,t,i,r,u,f,e,o,s,h,c){this.id=n;this.parentId=t;this.isRootChild=i;this.url=r;this.mimeType=u;this.length=f;this.isDynamicCode=e;this.headers=o;this.longDocumentId=s;this.sourceMapUrl=h;this.sourceUrlOverride=c}return n}();n.Source=t,function(n){n[n.BreakOnAny=0]="BreakOnAny";n[n.BreakOnAnyNewWorkerStarting=1]="BreakOnAnyNewWorkerStarting";n[n.BreakIntoSpecificWorker=2]="BreakIntoSpecificWorker";n[n.UnsetBreakOnAnyNewWorkerStarting=3]="UnsetBreakOnAnyNewWorkerStarting"}(n.CauseBreakAction||(n.CauseBreakAction={}));r=n.CauseBreakAction,function(n){n[n.Abort=0]="Abort";n[n.Continue=1]="Continue";n[n.StepInto=2]="StepInto";n[n.StepOver=3]="StepOver";n[n.StepOut=4]="StepOut";n[n.Ignore=5]="Ignore";n[n.StepDocument=6]="StepDocument"}(n.BreakResumeAction||(n.BreakResumeAction={}));u=n.BreakResumeAction,function(n){n[n.Deleted=0]="Deleted";n[n.Disabled=1]="Disabled";n[n.Enabled=2]="Enabled";n[n.Pending=3]="Pending"}(n.BreakpointState||(n.BreakpointState={}));f=n.BreakpointState,function(n){n[n.None=0]="None";n[n.Unhandled=1]="Unhandled";n[n.Handled=2]="Handled"}(n.ExceptionFilter||(n.ExceptionFilter={}));e=n.ExceptionFilter,function(n){n[n.Step=0]="Step";n[n.Breakpoint=1]="Breakpoint";n[n.DebuggerBlock=2]="DebuggerBlock";n[n.HostInitiated=3]="HostInitiated";n[n.LanguageInitiated=4]="LanguageInitiated";n[n.DebuggerHalt=5]="DebuggerHalt";n[n.Error=6]="Error";n[n.Jit=7]="Jit";n[n.MutationBreakpoint=8]="MutationBreakpoint"}(n.BreakReason||(n.BreakReason={}));o=n.BreakReason,function(n){n[n.General=0]="General";n[n.AsmjsInDebugging=1]="AsmjsInDebugging";n[n.AsmjsSucceeded=2]="AsmjsSucceeded";n[n.AsmjsFailed=3]="AsmjsFailed"}(n.DebugEventInfoType||(n.DebugEventInfoType={}));s=n.DebugEventInfoType,function(n){n[n.None=0]="None";n[n.Update=1]="Update";n[n.Delete=2]="Delete";n[n.All=n.Update|n.Delete]="All"}(n.MutationType||(n.MutationType={}));h=n.MutationType,function(n){n[n.Succeeded=0]="Succeeded";n[n.Failed=1]="Failed";n[n.FailedAlreadyAttached=2]="FailedAlreadyAttached"}(n.ConnectionResult||(n.ConnectionResult={}));c=n.ConnectionResult;n.breakpointIdNotFound="BKP:notfound:"})(t=n.Debugger||(n.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}))
//# sourceMappingURL=commonStructs.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var F12,DebuggerEval,remoteDebugger;(function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(){function i(){var i=this;this._port=toolUI.createPort("debuggerPort");toolUI.connect(this._port);this._rpc=new n.Tools.RPC.JsonRPCEndpoint("SERVER",function(n,t,r){return i.jsonRpcMethodReceive(n,t,r)},function(n,t){return i.jsonRpcNotificationReceive(n,t)},function(n){i.postMessage(n)},function(n){i._port.addEventListener("message",function(t){i.logging&&DebuggerEval.log("message",t);n(t)})});this._dbg=new t.DebugProvider(this)}return i.prototype.methodCall=function(n,t,i,r){this._rpc.jsonRpcMethodCall(n,t,i,r)},i.prototype.notify=function(n,t){this._rpc.jsonRpcNotification(n,t)},i.prototype.detach=function(){this._rpc.jsonRpcMethodCall=function(){return!1};this._rpc.jsonRpcNotification=function(){};this.postMessage=function(){return!1}},i.prototype.postMessage=function(n){return this.logging&&DebuggerEval.log("postMessage",n),this._port.postMessage(n)},i.prototype.jsonRpcMethodReceive=function(t,i,r){var u,f;n.Tools.Utility.Assert.hasValue(this._dbg,"Method received when debugger not attached.");u=!1;this._dbg.isAsyncMethod(t)&&(i=i||[],i.push(r),u=!0);f=i?this._dbg[t].apply(this._dbg,i):this._dbg[t].apply(this._dbg);u||r(f,undefined)},i.prototype.jsonRpcNotificationReceive=function(){},i}();t.RemoteDebugger=i})(i=t.Debugger||(t.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));DebuggerEval=function(){function n(){}return n.log=function(){for(var i,u,r=[],t=0;t<arguments.length;t++)r[+t]=arguments[t];i=r.join("\t");try{if(Common.RemoteHelpers.getDefaultView(mainBrowser.document).console.log(i),n.Queue.length>0)while(u=n.Queue.shift())Common.RemoteHelpers.getDefaultView(mainBrowser.document).console.log(u)}catch(f){n.Queue.push(i)}},n.Queue=[],n}();remoteDebugger=new F12.Tools.Debugger.RemoteDebugger
//# sourceMappingURL=remote.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var F12;(function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(){function i(n){var t=this;this._callHandler=n;this._isEnabled=i.IsLaunchedViaJitDebugging;this._isBreakOnNextError=i.IsLaunchedViaJitDebugging;this._documentMap={};this._breakIntoSpecificWorkerIds=[];this._rootDocIdQueue=[];this._sessionNumber=0;this._initialDocumentDocId=0;this._exceptionFilter=0;this._workersToIgnore=[];this._lastSourceUpdateMap=[];this._debugger=debug;this._debugger.addEventListener("onAddDocuments",function(n){return t.onAddDocuments(n)});this._debugger.addEventListener("onRemoveDocuments",function(n){return t.onRemoveDocuments(n)});this._debugger.addEventListener("onUpdateDocuments",function(n){return t.onUpdateDocuments(n)});this._debugger.addEventListener("onResolveBreakpoints",function(n){return t.onResolveBreakpoints(n)});this._debugger.addEventListener("onBreak",function(n){return t.onBreak(n)});this._debugger.addEventListener("onDebuggerEvent",function(n){return t.onDebuggerEvent(n)});this._debugger.addEventListener("onPdmClose",function(){t._sessionNumber++;t._isEnabled=!1;t.enableDynamicDebugging(function(){})});toolUI.addEventListener("detach",function(){t._callHandler.detach();t._isEnabled=!1;t._sessionNumber++;t._debugger.resume(1)});toolUI.addEventListener("closed",function(){t._debugger.shutdown()});this._debugger.addEventListener("webworkerstarted",function(n,i){var u,r,f;if(!n){t._workersToIgnore.indexOf(i)===-1&&t._workersToIgnore.push(i);return}for(u=t.parseThreadDescription(i,n,null),t._breakOnAnyNewWorkerStarting&&(t._lastStartedWorkerId=i),r=t._rootDocIdQueue.length-1;r>=0;r--)f=t._documentMap[t._rootDocIdQueue[r]],f&&f.url===u.fullScriptFileName&&t._rootDocIdQueue.splice(r,1);t._callHandler.notify("onWebWorkerStarted",[u])});this._debugger.addEventListener("webworkerfinished",function(n){var i=t._workersToIgnore.indexOf(n);if(i>=0){t._workersToIgnore.splice(i,1);return}t.removeWorkerFromWaitToBreakList(n);t._callHandler.notify("onWebWorkerFinished",[n])});this._debugger.addEventListener("debuggingdisabled",function(){t._isEnabled=!1});this._debugger.addEventListener("debugapplicationcreate",function(n){n||t.enableDynamicDebugging(function(){})});toolUI.addEventListener("remotescripterror",function(n,i,r,u){t._callHandler.notify("onRemoteScriptError",[n,i,r,u])});i.IsLaunchedViaJitDebugging&&this._debugger.connect(!0)}return i.findSourceAttributes=function(n,t){var u=null,r=null;return n&&(u=i.findSourceAttribute("sourceMappingURL",n),r=i.findSourceAttribute("sourceURL",n),!r&&t&&n.substr(0,i.DIAGNOSTICSOM_EVAL_SIGNATURE.length)===i.DIAGNOSTICSOM_EVAL_SIGNATURE&&(r=i.JMC_SCRIPT_URL)),{sourceMap:u,sourceUrl:r}},i.prototype.isAsyncMethod=function(n){return n==="enableDynamicDebugging"||n==="disableDynamicDebugging"?!0:!1},i.prototype.enableDynamicDebugging=function(n){var t=this,i;this._isEnabled||this._isAwaitingDebuggerEnableCall?n(0):(i=function(r){var u=r?0:1;t._debugger.removeEventListener("debuggingenabled",i);t._isAwaitingDebuggerEnableCall=!1;r&&(u=t._debugger.connect(!0),u===0&&(t._isEnabled=!0));n(u)},this._debugger.addEventListener("debuggingenabled",i),this._isAwaitingDebuggerEnableCall=!0,this._debugger.enable())},i.prototype.disableDynamicDebugging=function(n){var i=this,t;this._isAwaitingDebuggerEnableCall&&n(0);this._isEnabled?(t=function(r){i._isEnabled=!r;n(r?0:1);i._debugger.removeEventListener("debuggingdisabled",t)},this._debugger.addEventListener("debuggingdisabled",t),this._debugger.disable()):n(0)},i.prototype.getSourceText=function(n,t,i){try{var u=this._debugger.getSourceText(n),r=u.text;return typeof t=="number"&&t>=0&&(r=typeof i=="number"&&i>=0?r.substr(t,i):r.substr(t)),u.text=r,u}catch(f){return{text:"",loadFailed:!0}}},i.prototype.causeBreak=function(n,t){(typeof t!="number"||isNaN(t))&&(t=0);switch(n){case 0:this._breakOnAny=!0;this._isNextBreakCausedByUser=!0;break;case 1:this._breakOnAnyNewWorkerStarting=!0;break;case 2:this._breakIntoSpecificWorkerIds.push(t);break;case 3:this._breakOnAnyNewWorkerStarting=!1;this._lastStartedWorkerId=null;break;default:throw new Error("CauseBreakAction not known")}return this._debugger.causeBreak(n,t)},i.prototype.resume=function(n){return n!==1&&(this._isNextBreakCausedByUser=!0),this._debugger.resume(n)},i.prototype.getBreakpointIdFromSourceLocation=function(n,i){var r=this._debugger.getBreakpointIdFromSourceLocation(n,i);return r!==0?this.bpString(r):t.breakpointIdNotFound},i.prototype.addEventBreakpoint=function(n,t,i,r){i||(i="");var u=this._debugger.addEventBreakpoint(n,t,i,r);return u?{location:u.location,eventTypes:u.eventTypes,breakpointId:this.bpString(u.breakpointId),isBound:u.isBound,isEnabled:u.isEnabled,condition:i,isTracepoint:r,failed:!1}:{location:null,eventTypes:n,breakpointId:":failed:"+n.join(","),isBound:!1,isEnabled:!1,failed:!0}},i.prototype.addCodeBreakpoint=function(n,t,i,r,u){i||(i="");var f=this._debugger.addCodeBreakpoint(n,t,i,r);return f?{location:f.location,eventTypes:null,breakpointId:this.bpString(f.breakpointId),isBound:f.isBound,isEnabled:f.isEnabled,condition:i,isTracepoint:r,isPseudoBreakpoint:u,failed:!1}:{location:{docId:n,start:t,length:1},eventTypes:null,breakpointId:":failed:"+n,isBound:!1,isEnabled:!1,failed:!0}},i.prototype.addPendingBreakpoint=function(n,t,i,r,u){var f=this._debugger.addPendingBreakpoint(n,t,i,r,u);return f?this.bpString(f):""},i.prototype.removeBreakpoint=function(n){var t=this.getBpIdNumber(n);return this._debugger.removeBreakpoint(t)},i.prototype.setBreakpointEnabledState=function(n,t){var i=this.getBpIdNumber(n);return this._debugger.setBreakpointEnabledState(i,t)},i.prototype.setBreakpointCondition=function(n,t,i){var r=this.getBpIdNumber(n);return this._debugger.updateBreakpoint(r,t,i)},i.prototype.setExceptionFilter=function(n){return this._exceptionFilter=n,this._debugger.setBreakOnFirstChanceExceptions(n===2)},i.prototype.isDocContainingMatch=function(n,t){var i=new RegExp(n,"gi"),r=this.getSourceText(t).text;return i.test(r)},i.prototype.triggerSourceRundown=function(){return this._debugger.connect(!1)},i.prototype.getFrames=function(n){for(var t=this._debugger.getFrames(n),i=0;i<t.length;i++)t[i].callFrameId=this.frameString(t[i].callFrameId),t[i].location.docId=t[i].location.docId;return t},i.prototype.getCurrentThreadDescription=function(){var n=this._debugger.getThreadDescription();return this.parseThreadDescription(null,null,n)},i.prototype.getThreads=function(){var t=this,i=this._debugger.getThreads(),n=[];return i.forEach(function(i){n.push(t.parseThreadDescription(null,null,i))}),n},i.prototype.eval=function(n,t){var i=this._debugger.eval(this.getFrameIdNumber(n),t);return i?i.propertyId=this.propString(i.propertyId):i={propertyId:"ERROR",name:null,type:null,fullName:null,value:null,expandable:!1,readOnly:!0,fake:!1,invalid:!1,returnValue:!1},i},i.prototype.getLocals=function(n){return this.propString(this._debugger.getLocals(this.getFrameIdNumber(n)))},i.prototype.getChildProperties=function(n,t,i){for(var f=this._debugger.getChildProperties(this.getPropIdNumber(n),t,i),u=f.propInfos,r=0;r<u.length;r++)u[r].propertyId=this.propString(u[r].propertyId);return f},i.prototype.setPropertyValueAsString=function(n,t){return this._debugger.setPropertyValueAsString(this.getPropIdNumber(n),t)},i.prototype.setNextStatement=function(n,t){return this._debugger.setNextStatement(n,t)},i.prototype.canSetNextStatement=function(n,t){return this._debugger.canSetNextStatement(n,t)},i.prototype.getFrameIdNumber=function(n){return i.assertIsValidId(n,i.FRAME_ID_PREFIX),this.parseIdNumber(n)},i.prototype.getBpIdNumber=function(n){return i.assertIsValidId(n,i.BREAKPOINT_ID_PREFIX),this.parseIdNumber(n)},i.prototype.getPropIdNumber=function(n){return i.assertIsValidId(n,i.PROPERTY_ID_PREFIX),this.parseIdNumber(n)},i.prototype.canSetMutationBreakpoint=function(n,t,i){return this._debugger.canSetMutationBreakpoint(this.getPropIdNumber(n),t,i)},i.prototype.setMutationBreakpoint=function(n,t,i){var r=this._debugger.setMutationBreakpoint(this.getPropIdNumber(n),t,i);return r.breakpointId=this.bpString(r.breakpointId),r},i.prototype.deleteMutationBreakpoint=function(n){return this._debugger.deleteMutationBreakpoint(this.getBpIdNumber(n))},i.prototype.setMutationBreakpointEnabledState=function(n,t){var i=this.getBpIdNumber(n);return this._debugger.setMutationBreakpointEnabledState(this.getBpIdNumber(n),t)},i.assertIsValidId=function(t,i){n.Tools.Utility.Assert.isTrue(t&&t.length>i.length&&t.substr(0,i.length)===i)},i.findSourceAttribute=function(n,t){var i="\n//# "+n+"=",r=t.lastIndexOf(i),u;return(r===-1&&(i="\n//@ "+n+"=",r=t.lastIndexOf(i)),r>=0&&r===t.indexOf(i))?(u=t.indexOf("\n",r+i.length),u<0&&(u=t.length),t.substring(r+i.length,u).trim()):null},i.prototype.removeWorkerFromWaitToBreakList=function(n){for(var t=0;t<this._breakIntoSpecificWorkerIds.length;t++)if(n===this._breakIntoSpecificWorkerIds[t])return this._breakIntoSpecificWorkerIds.splice(t,1),!0;return!1},i.prototype.flushMessageQueue=function(t,i){if(t.length>0)switch(i){case"onAddDocuments":case"onRemoveDocuments":case"onUpdateDocuments":this._callHandler.notify(i,t);t.length=0;break;default:n.Tools.Utility.Assert.fail("Batching of '"+i+"' messages isn't supported.")}},i.prototype.onAddDocuments=function(n){for(var r,o,u,l,f=[],e=0;e<n.length;++e){if(r=n[e],r.url&&(o=r.url.toLowerCase(),o==="windows internet explorer"||o==="internetexplorer")){this._initialDocumentDocId=r.docId;continue}this._documentMap[r.docId]={url:r.url,start:0,length:r.length};var s=r.parentDocId===this._initialDocumentDocId,c=this.getSourceText(r.docId).text,h=i.findSourceAttributes(c,r.isDynamicCode);if(f.push(new t.Source(r.docId,r.parentDocId,s,r.url,r.mimeType,r.length,r.isDynamicCode,r.headers,r.longDocumentId,r.sourceMapUrlFromHeader||h.sourceMap,h.sourceUrl)),s){u=0;for(l in this._documentMap)if(u++,u>1)break;u===1?(this.flushMessageQueue(f,"onAddDocuments"),this._rootDocId=r.docId,this._callHandler.notify("onSetRootDocument",[this._rootDocId])):this._rootDocIdQueue.push(r.docId)}}this.flushMessageQueue(f,"onAddDocuments")},i.prototype.onRemoveDocuments=function(n){for(var t,u,i=[],r=0;r<n.length;++r)t=n[r],delete this._documentMap[t],delete this._lastSourceUpdateMap[t],u=this._rootDocIdQueue.indexOf(t),u>-1&&this._rootDocIdQueue.splice(u,1),t!==this._initialDocumentDocId&&i.push(t),t===this._rootDocId&&this._rootDocIdQueue.length>0&&this._documentMap[this._rootDocIdQueue[0]]&&(this._rootDocId=this._rootDocIdQueue[0],this.flushMessageQueue(i,"onRemoveDocuments"),this._callHandler.notify("onSetRootDocument",[this._rootDocId]));this.flushMessageQueue(i,"onRemoveDocuments")},i.prototype.onUpdateDocuments=function(n){for(var e=[],f=0;f<n.length;++f){var r=n[f],o=r.parentDocId===this._initialDocumentDocId,i=new t.Source(r.docId,undefined,o,r.url,r.mimeType,r.length,undefined,undefined,undefined),u=this._lastSourceUpdateMap[i.id];u&&i.length===u.length&&i.mimeType===u.mimeType&&i.url===u.url||(e.push(i),this._lastSourceUpdateMap[i.id]=i)}this.flushMessageQueue(e,"onUpdateDocuments")},i.prototype.onResolveBreakpoints=function(n){for(var t,r,i=0;i<n.length;i++)t=n[i],r={location:{docId:t.newDocId,start:t.start,length:t.length},eventTypes:null,breakpointId:this.bpString(t.breakpointId),isBound:t.isBound},this._callHandler.notify("onResolveBreakpoint",[r.breakpointId,r])},i.prototype.onBreak=function(n){var t,i,e,r,f,u;if(!this._isEnabled||this._isAwaitingDebuggerEnableCall)return this._debugger.resume(1),!1;if(t=!0,i=this.getCurrentThreadDescription(),n.breakReason===5)t=!1,this._breakOnAnyNewWorkerStarting&&i.id===this._lastStartedWorkerId&&(this._lastStartedWorkerId=null,t=!0),t||(e=this.removeWorkerFromWaitToBreakList(i.id),e&&(t=!0)),!t&&this._isNextBreakCausedByUser&&(t=!0);else if(n.breakReason===6)t=!1,(this._isBreakOnNextError||this._exceptionFilter===2||this._exceptionFilter===1&&!n.isFirstChanceException)&&(this._isBreakOnNextError=!1,t=!0),n.isFirstChanceException||i.isWorker||(r=this.getFrames(1),r&&r.length>0&&(f=r[0],this._callHandler.notify("onUnhandledException",[f.location.docId,n.description,n.errorId,f.location.start])));else if(n.breakReason===1||n.breakReason===8)if(n.breakReason===8)t=n.mutationBreakpointId!==0;else if(t=this._breakOnAny,!t&&n.breakpoints!==null)for(u=0;u<n.breakpoints.length;u++)this.evaluateBreakpointCondition(n.firstFrameId,n.breakpoints[u])&&(t=!0);return t?(this._breakOnAny=!1,this._callHandler.notify("onBreak",[n.breakReason,n.description,n.errorId,n.isFirstChanceException,n.isUserUnhandled,i.isWorker,n.systemThreadId,n.breakEventType,n.mutationBreakpointId,n.mutationType])):this._debugger.resume(1),this._isNextBreakCausedByUser=!1,t},i.prototype.onDebuggerEvent=function(n){this._callHandler.notify("onDebuggerEvent",[n.messageType,n.message,n.url])},i.prototype.evaluateBreakpointCondition=function(n,t){if(t){if(t.isTracepoint){var i=this._debugger.eval(n,"console.log("+t.condition+");");return i.type==="Error"&&this._debugger.eval(n,'console.log("'+i.value+'");'),!1}if(!t.condition||this._debugger.eval(n,t.condition).value==="true")return!0}return!1},i.prototype.parseThreadDescription=function(t,i,r){var u={id:0,label:null,description:null,poundLabel:null,scriptFileName:null,fullScriptFileName:null,htmlFileName:null,isWorker:!1,displayName:null},f,e,o,h,c,s;return t!==null&&t>=1&&(u.id=t),i!==null&&(u.label=i,f=i.split("\r\n"),n.Tools.Utility.Assert.areEqual(f.length,3),f.length===3&&(u.poundLabel=f[0],e=f[1].split("/"),u.fullScriptFileName=f[1],u.scriptFileName=e[e.length-1],o=f[2].split("/"),u.htmlFileName=o[o.length-1],u.isWorker=!0,u.displayName="[Worker"+u.poundLabel+" "+u.scriptFileName+" ("+u.htmlFileName+")]")),r!==null&&(u.description=r,h=/^([0-9]+)##/gi,c=h.test(r),c&&(u.id=parseInt(r.split("##")[0],10),s=r.split("/"),u.scriptFileName=s[s.length-1],u.isWorker=!0,u.displayName="Worker-"+u.id+" "+u.scriptFileName)),u},i.prototype.parseIdNumber=function(t){var i=t.indexOf("_");return n.Tools.Utility.Assert.isTrue(i>=3&&i<t.length-1,"Malformed id string detected"),parseInt(t.substr(i+1,10))},i.prototype.frameString=function(n){return i.FRAME_ID_PREFIX+this._sessionNumber+"_"+n},i.prototype.bpString=function(n){return i.BREAKPOINT_ID_PREFIX+this._sessionNumber+"_"+n},i.prototype.propString=function(n){return i.PROPERTY_ID_PREFIX+this._sessionNumber+"_"+n},i.BREAKPOINT_ID_PREFIX="BKP",i.FRAME_ID_PREFIX="FRM",i.PROPERTY_ID_PREFIX="PRP",i.JMC_SCRIPT_URL="browsertools://browsertools.library.js",i.DIAGNOSTICSOM_EVAL_SIGNATURE="document.__IE_DEVTOOLBAR_CONSOLE_EVAL_RESULT",i.IsLaunchedViaJitDebugging=!1,i}();t.DebugProvider=i})(i=t.Debugger||(t.Debugger={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}))
//# sourceMappingURL=DebugProvider.min.js.map
"use strict";
//! Copyright (C) Microsoft. All rights reserved.
var DiagnosticsOMProvider=function(){function n(){var n=this;this._port=toolUI.createPort("DiagnosticsOMPort");this._parentWindow=Common.RemoteHelpers.getDefaultView(browser.document);this._originCache={};this._styleSheetKeysByUrl={};this._styleSheetKeysById={};this._styleSheetInfoByKey={};this._linkElementById={};this._delayedStyleSheetInfos=[];toolUI.connect(this._port);Common.RemoteHelpers.addListener(toolUI,"scripterror",this.onScriptError.bind(this));Common.RemoteHelpers.addListener(toolUI,"detach",this.onDetach.bind(this));this._rpc=new F12.Tools.RPC.JsonRPCEndpoint("DIAGOMSERVER",function(t,i,r){return n.jsonRpcMethodReceive(t,i,r)},function(t,i){return n.jsonRpcNotificationReceive(t,i)},function(t){n._port.postMessage(t)},function(t){n._port.addEventListener("message",function(n){t(n)})});Common.RemoteHelpers.addListener(browser,"beforeScriptExecute",function(t){return n.onBeforeScriptExecute(t)});try{this._onStyleSheetAddedListener=this.onStyleSheetAdded.bind(this);this._onStyleSheetRemovedListener=this.onStyleSheetRemoved.bind(this);Common.RemoteHelpers.addListener(browser,"styleSheetAdded",this._onStyleSheetAddedListener);Common.RemoteHelpers.addListener(browser,"styleSheetRemoved",this._onStyleSheetRemovedListener);browser.enumerateStyleSheets()}catch(t){}this.onBeforeScriptExecute(null)}return n.prototype.notify=function(n,t){this._rpc.jsonRpcNotification(n,t)},n.prototype.executeOnTargetPage=function(n){try{var t=this._parentWindow.eval(n);return typeof t=="undefined"||t===null?!0:t}catch(i){return!1}},n.prototype.editSource=function(n,t){try{return diagnosticsScript.editSource(this._parentWindow,n,t)}catch(i){return{error:{message:i.message}}}},n.prototype.setEditCSSEnabled=function(n){if(!n)try{Common.RemoteHelpers.removeListener(browser,"styleSheetAdded",this._onStyleSheetAddedListener);Common.RemoteHelpers.removeListener(browser,"styleSheetRemoved",this._onStyleSheetRemovedListener)}catch(t){}return!0},n.prototype.editCSSSource=function(n,t){var r=this,u=this._styleSheetInfoByKey[n],i;return u?(i=this._styleSheetKeysByUrl[u.url],!i)?[]:(i.map(function(n){return r._styleSheetInfoByKey[n]}).forEach(function(n){var u=r._linkElementById[n.uniqueId],i=r.findStyleSheet(u,n);i&&(i.cssText=t)}),i.filter(function(t){return t!==n})):[]},n.prototype.downloadUrl=function(n,t,i,r,u){var e=this,f;r===void 0&&(r=null);u===void 0&&(u=null);try{if(f=new XMLHttpRequest,r&&f.overrideMimeType(r),i&&!this.isLocalUrl(n))f.onreadystatechange=function(){if(f.readyState===4)e.onXHRComplete(!0,f,n,t,null,r,u)},f.open("GET",n,!0),f.send(null);else{f.open("GET",n,!1);f.send(null);this.onXHRComplete(!0,f,n,t,null,r,u)}}catch(o){this.onXHRComplete(!1,f,n,t,o.message,r,u)}return!0},n.prototype.retrieveLocalStorage=function(n){return this.retrieveWebStorage(n,function(n){return n.localStorage})},n.prototype.retrieveSessionStorage=function(n){return this.retrieveWebStorage(n,function(n){return n.sessionStorage})},n.prototype.localStorageSetItem=function(t,i,r){var u=this.webStorageSetItem(t,i,r,function(n){return n.localStorage});return!u&&resources.localStorage.quotaLimiting?n.QuotaExceededErrorMessage:""},n.prototype.sessionStorageSetItem=function(t,i,r){var u=this.webStorageSetItem(t,i,r,function(n){return n.sessionStorage});return!u&&resources.sessionStorage.quotaLimiting?n.QuotaExceededErrorMessage:""},n.prototype.localStorageDeleteItems=function(n,t){return this.webStorageDeleteItems(n,t,function(n){return n.localStorage})},n.prototype.sessionStorageDeleteItems=function(n,t){return this.webStorageDeleteItems(n,t,function(n){return n.sessionStorage})},n.prototype.localStorageSetSimulateCap=function(n){try{resources.localStorage.quotaLimiting=n}catch(t){}return!0},n.prototype.sessionStorageSetSimulateCap=function(n){try{resources.sessionStorage.quotaLimiting=n}catch(t){}return!0},n.prototype.retrieveCookies=function(t){var i=n.getAllCookiesByUrl(t);return i.map(function(n){return{name:n.name,value:n.value,domain:n.domain,expires:n.session?null:n.expires,httpOnly:n.httpOnly,path:n.path,secure:n.secure,session:n.session}})},n.prototype.deleteCookies=function(n,t){return n.forEach(function(n){try{resources.cookies.deleteCookieWithUrl(n.name,n.domain,t)}catch(i){}}),!0},n.prototype.deleteAllCookies=function(t){return this.deleteCookies(n.getAllCookiesByUrl(t),t),!0},n.prototype.deleteSessionCookies=function(t){var i=n.getAllCookiesByUrl(t).filter(function(n){return n.session});return this.deleteCookies(i,t),!0},n.prototype.setCookie=function(n,t){var i=this.getCookie(n.name,n.domain,t);i.value=n.value;try{resources.cookies.setCookieWithUrl(i,t)}catch(r){return!1}return!0},n.getAllCookiesByUrl=function(n){try{return resources.cookies.getAllCookiesByDomain(n)}catch(t){return[]}},n.keyForStyleSheet=function(n){return n.uniqueId+"/"+n.url},n.parentKeyForStyleSheet=function(n){return n.isImported?n.uniqueId+"/"+n.parentId:n.parentId},n.addToKeyedList=function(n,t,i){var r=n[t]||[];r.push(i);n[t]=r},n.removeFromKeyedList=function(n,t,i){var r=n[t]||[],u=r.indexOf(i);u>=0&&(delete r[u],n[t]=r)},n.prototype.retrieveWebStorage=function(n,t){var i,r=this.getSafeWebStorage(n,t);return r&&(i=this.copyWebStorage(r)),i||{}},n.prototype.webStorageSetItem=function(n,t,i,r){var u=this.getSafeWebStorage(i,r);if(u&&u.setItem)try{u.setItem(n,t)}catch(f){return!1}return!0},n.prototype.webStorageDeleteItems=function(n,t,i){var r=this.getSafeWebStorage(t,i);return r&&r.removeItem&&n.forEach(function(n){return r.removeItem(n)}),!0},n.prototype.getSafeWebStorage=function(n,t){var r=null,i;try{i=this.getWindowForOrigin(n);i&&(r=t(i))}catch(u){}finally{return r}},n.prototype.onScriptError=function(t){t.message!==n.QuotaExceededErrorMessage&&this.notify("onRemoteScriptError",[t.message,t.file,t.line,t.column])},n.prototype.onDetach=function(){Common.RemoteHelpers.removeListener(toolUI,"scripterror",this.onScriptError)},n.prototype.getCookie=function(t,i,r){var u=n.getAllCookiesByUrl(r).filter(function(n){return n.name===t&&n.domain===i});return F12.Tools.Utility.Assert.isTrue(u.length<=1,"More than one cookie with the same name and domain was retrieved from IE"),u.length>0?u[0]:resources.cookies.createCookie(t)},n.prototype.copyWebStorage=function(n){var i={},t;return Object.keys(n).forEach(function(t){i[t]=n[t]}),t=n.getItem(""),t!==null&&typeof t!="undefined"&&(i[""]=t),i},n.prototype.onStyleSheetAdded=function(t,i){var r,u,f,o,e;if((i===void 0&&(i=!1),r=t,r.key=n.keyForStyleSheet(t),u=this._linkElementById[t.uniqueId],!u||u.parentElement||r.parentId!=="about:blank")&&r.url!==r.parentId&&!this._styleSheetInfoByKey[r.key]){if(u=this._linkElementById[r.uniqueId]||this.getLinkElementForUniqueID(r.uniqueId),!u){if(i||r.parentId==="about:blank")return;this._delayedStyleSheetInfos.push(r);return}for(f=this._styleSheetKeysByUrl[r.url],o=!1,e=0;f&&e<f.length;e++)if(f[e]&&this._styleSheetInfoByKey[f[e]].parentId===r.parentId){o=!0;break}r.isImported=!(u&&u.href===r.url);r.parentKey=n.parentKeyForStyleSheet(r);this._linkElementById[r.uniqueId]=u;n.addToKeyedList(this._styleSheetKeysById,r.uniqueId,r.key);n.addToKeyedList(this._styleSheetKeysByUrl,r.url,r.key);this._styleSheetInfoByKey[r.key]=r;o||this.notify("styleSheetAdded",[r])}},n.prototype.onStyleSheetRemoved=function(t){var f=this._linkElementById[t.uniqueId],r,u,i;if(f&&(delete this._linkElementById[t.uniqueId],r=this._styleSheetKeysById[t.uniqueId],r))for(u in r)i=this._styleSheetInfoByKey[r[u]],n.removeFromKeyedList(this._styleSheetKeysById,i.uniqueId,i.key),n.removeFromKeyedList(this._styleSheetKeysByUrl,i.url,i.key),delete this._styleSheetInfoByKey[i.key],this.notify("styleSheetRemoved",[i])},n.prototype.getLinkElementForUniqueID=function(n){var f=dom.getElementByUniqueId(n),i,r,t,e,u;if(f)return f;for(i=Common.RemoteHelpers.getWindowIterator(Common.RemoteHelpers.getDefaultView(browser.document));i.hasNext();)for(r=i.next(),t=0;t<r.document.styleSheets.length;t++)if(e=r.document.styleSheets[t],u=e.ownerNode,this.getUid(u)===n)return u;return null},n.prototype.getUid=function(n){return n?browser.getUniqueID?browser.getUniqueID(n):n.uniqueID:null},n.prototype.findStyleSheet=function(n,t){var r,u,i;if(!n||!n.sheet)return null;if(n.href===t.url)return n.sheet;for(r=Common.RemoteHelpers.getStyleSheetIterator(n.sheet,!0);r.hasNext();)if(i=r.next(),i.href===t.parentId){u=i;break}if(u)for(r=Common.RemoteHelpers.getStyleSheetIterator(u,!1);r.hasNext();)if(i=r.next(),i.href===t.url)return typeof i.cssText!="undefined"&&i;return null},n.prototype.onBeforeScriptExecute=function(n){var i=this,t;if(this._parentWindow=Common.RemoteHelpers.getDefaultView(browser.document),this.addIntellisenseHelperOnWindow(this._parentWindow),n){n.browserOrWindow&&(n=n.browserOrWindow);try{t=Common.RemoteHelpers.getDefaultView(n.document)}catch(r){return}t===Common.RemoteHelpers.getDefaultView(mainBrowser.document)&&(this._originCache={},this._delayedStyleSheetInfos.forEach(function(n){return i.onStyleSheetAdded(n,!0)}),this._delayedStyleSheetInfos=[])}},n.prototype.onXHRComplete=function(n,t,i,r,u,f,e){var a,h,o,c,s,l;if(f===void 0&&(f=null),e===void 0&&(e=null),a=n&&(this.isLocalUrl(i)||t.status===200),h=r,r||(a?(h=t.getResponseHeader("content-type"),h=h?Common.MediaTypeManager.getCanonicalMediaType(h):null):(h=null,u=u||String(t.status))),o=typeof t.responseText!="unknown"?t.responseText:"",c=o.toLowerCase(),this.isLocalUrl(i)&&c.indexOf("charset=")!==-1&&c.indexOf("charset=utf-8")===-1&&f===null){for(s=c.indexOf("charset=")+8,s<o.length&&o.charAt(s)==='"'&&o.charAt(s)==="'"&&s++,l="charset=";s<o.length&&o.charAt(s)!=='"'&&o.charAt(s)!=="'";)l=l+o.charAt(s),s++;this.downloadUrl(i,r,!1,l,o);return}o===""&&e&&(o=e);this.notify("onDownloadUrlComplete",[a,i,o,h,u])},n.prototype.jsonRpcMethodReceive=function(n,t,i){var r;r=t?this[n].apply(this,t):this[n].apply(this);i(r,undefined)},n.prototype.jsonRpcNotificationReceive=function(){},n.prototype.isLocalUrl=function(n){return n&&(n.indexOf("file://")===0||n.indexOf("res://")===0)},n.prototype.getIntellisenseItemsForExpression=function(n,t,i,r){var f=Common.RemoteHelpers.getDocumentMode()>=9,u;return f?(u=new Common.Intellisense.IntellisenseRemoteHelpers({currentWindowContext:this._parentWindow}),t?u.getIntellisenseItemsForExpressionUsingWindowContext(n,t,i,r):u.getIntellisenseItemsForExpression(n)):{choices:[]}},n.prototype.performBreakmodeIntellisense=function(n,t,i,r,u){var f=Array.prototype.map.call(u,function(n){return""+n}),e=this.getIntellisenseItemsForExpression(t,i,r,f);this.notify("onIntellisenseRequestComplete",[n,e])},n.prototype.addIntellisenseHelperOnFrames=function(n){var t,r,u,i;if(n.frames)for(t=0,r=n.frames.length;t<r;t++)u=n.frames[t],i=Common.RemoteHelpers.getValidWindow(n,u),i.isValid&&this.addIntellisenseHelperOnWindow(i.window)},n.prototype.addIntellisenseHelperOnWindow=function(t){var r=this,i=!0;if(t&&!t.Object)try{browser.executeScript(n.JMCScriptUrl,t)}catch(u){i=!1}i&&(t.__BROWSERTOOLS_DEBUGGER=new t.Object,t.__BROWSERTOOLS_DEBUGGER.performBreakmodeIntellisense=browser.createSafeFunction(t,function(n,t,i,u,f){return r.performBreakmodeIntellisense(n,t,i,u,f)}));this.addIntellisenseHelperOnFrames(t)},n.prototype.getWindowForOrigin=function(n){var t,r,i;if(F12.Tools.Utility.Assert.hasValue(this._parentWindow),t=this._originCache[n],t&&t.parent&&t.parent.frames){for(r=!1,i=0;i<t.parent.frames.length;i++)if(t.parent.frames[i]===t){r=!0;break}r||(t=null,this._originCache[n]=null)}return t||(t=this.searchFramesForOrigin(n),t&&(this._originCache[n]=t)),t},n.prototype.searchFramesForOrigin=function(n){var i,t,r,u;if(!n)return null;for(i=[this._parentWindow];i.length>0;){if(t=i.pop(),Common.RemoteHelpers.originForWindow(t)===n)return t;for(r=0;r<t.frames.length;r++)(u=Common.RemoteHelpers.getValidWindow(t,t.frames[r]),u.isValid)&&i.push(u.window)}return null},n.JMCScriptUrl="\\r\\n//# sourceURL=browsertools://browsertools.debugger.js",n.QuotaExceededErrorMessage="QuotaExceededError",n}(),diagOMProvider=new DiagnosticsOMProvider
//# sourceMappingURL=DiagnosticsOMProvider.min.js.map
"use strict";
//! Copyright (C) Microsoft. All rights reserved.
F12.Tools.Debugger.DebugProvider.IsLaunchedViaJitDebugging=!0
//# sourceMappingURL=jitRemote.min.js.map
/*
 *   TabControl styles
 */

.rfloat {
    float: right;
}

.tabControl {
    height: 100%;
    width: 100%;
    display: -ms-grid;
    -ms-grid-columns: 1fr;
    -ms-grid-rows: auto minmax(min-content, 1fr);
    box-sizing: border-box;
    line-height: normal;
}

    .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 ul.tabBar li.previewTab {
            color: TRANSPARENT; /*[{vs-file-preview-tab-text-color}]*/
            background-color: TRANSPARENT; /*[{vs-file-preview-tab-background-color}]*/
        }

            .tabControl ul.tabBar li.previewTab:hover {
                color: TRANSPARENT; /*[{vs-file-preview-tab-hover-text-color}]*/
                background-color: TRANSPARENT; /*[{vs-file-preview-tab-hover-background-color}]*/
            }

            .tabControl ul.tabBar li.previewTab.active {
                color: TRANSPARENT; /*[{vs-file-preview-tab-selected-text-color}]*/
                background-color: TRANSPARENT; /*[{vs-file-preview-tab-selected-background-color}]*/
            }

                .tabControl ul.tabBar li.previewTab .closeButton {
                    background: url("images/previewTabClose.png") no-repeat 0 2px; /*[url({f12-debugger-image-previewtab-close}) no-repeat 0 2px]*/
                    background-size: 32px 16px;
                }

                    .tabControl ul.tabBar li.previewTab .closeButton:hover {
                        background: url("images/previewTabClose.png") no-repeat -16px 2px; /*[url({f12-debugger-image-previewtab-close}) no-repeat -16px 2px]*/
                        background-size: 32px 16px;
                    }

#tabStripContainer {
    display: inline-block;
    border-bottom: 0.2em solid TRANSPARENT; /*[0.2em solid {vs-file-tab-selected-gradient-bottom-color}]*/
}

    #tabStripContainer.previewTab {
        border-bottom: 0.2em solid TRANSPARENT; /*[0.2em solid {vs-file-preview-tab-selected-background-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;
    white-space: pre;
}

.tabContent {
    display: inline;
    height: 2em;
}

    .tabContent .previewTabIcon {
        background-image: url(""); /*[url({f12-debugger-image-previewtab-icon})]*/
        float: left;
        width: 14px;
        height: 14px;
        margin-top: 2px;
        margin-left: 4px;
        background-repeat: no-repeat;
        background-size: 14px 14px;
        background-color: transparent;
    }

    .tabContent .diffTabIcon {
        background-image: url(""); /*[url({f12-debugger-image-diff-tab-icon})]*/
        float: left;
        width: 14px;
        height: 14px;
        margin-top: 2px;
        margin-left: 4px;
        background-repeat: no-repeat;
        background-size: 14px 28px;
        background-color: transparent;
        background-position-y: 0px;
    }

        li.active .tabContent .diffTabIcon {
            background-position-y: -14px;
        }

#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 `K����PLTETTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT���������������������������������������������!x�!x�!x�!x�!x�!x�!x�!x�!x�!x�!x�!x�!x�!x��Hw_W+tRNS 0@P`���������Ͽ����pP@0  0@P`������HQIDATx��Qs�0����$((T�������ݍ�B��p��i��d�=�!���$�n�
�z}W�S3�Y0����	X���T"`ڡ�ᇺ
�	�.��#�~4#�E��vk��ڍ�!���^Qs��ZM�����&;�
W�A@�0'�'�Oέ����BeXv���z��0�zF|G���`Q�[�������0bQ�9����_�#���4��C6S�4R���J4R;�:�VW�3����euq$�G��%з[ԍ�n���/D���:��j:& -��6فk{�
��9AK>}pnuN�*��;���Wy�Q-�3�;�z��M�ym!��HU+�h+�q�4�{}W�S���
�`S�1?�T�\��D�TW�3����e�v$��]�ࣄ���aB���HY�>�e(uQj�a#β�s�햏_�^���7L@�-��`��\]A���G@���7�u�F�;x��8p�J�~�����~ÓX��n�K$�J
���1�_D�0��IEND�B`��PNG


IHDR `|"p�IDATx��߉�0�;�G���#�x�>����2BF��G�ɠ�1������I�=\�ؒ:�$��V���tc�B�(�	���QC�<HqL����g5��2�!��ܓ�^y�2e�8��{'�"S��vdU��uY��T�~���2.�ˀ�(��֣?'I8�u��a��K{�5S��쀸�e(�_f���Y�p����Wh���͗V�%���fl�{J���Q��U�3�S�D
=@g֮�5s��	�@BB�@$d> ���|@������4�<
z�2��+@�|7�,���@�2(F!�B���@
��t·���*����â�n�U��8�1�<jh�)N�)��A8���@�1Ę�{��+T¡��v�dTd
ݎ�
W��#����z�V%�/\SS[���$�D�+}Y���2�g�\S@��2�t��N� 5�W�
͕t���j�1�ތ�sO����<Jt�����a�\O�)��5s��	�@BB�@�t�JPd��-�IEND�B`�.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;
}

.grid-row .functionItemMapped {
    background: url("./images/functionIconMapped.png") no-repeat; /*[url({f12-debugger-image-watches-function-mapped}) no-repeat]*/
    background-size: 10px 10px;
}

.grid-row .notAFunctionItemMapped {
    background: url("./images/notAFunctionIconMapped.png") no-repeat; /*[url({f12-debugger-image-watches-not-a-function-mapped}) 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})]*/
}
<!DOCTYPE html>
<!-- saved from url=(0016)http://localhost -->
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=11" />
    <meta http-equiv="Content-Type" content="text/html" />
    <meta http-equiv="format-detection" content="telephone=no">
    <title>Emulation</title>


    <link id="toolwindow.css" rel="stylesheet" href="../common/toolwindow.css" type="text/css" data-plugin-theme="true" />
    <link id="toolwindow.f12.css" rel="stylesheet" href="../common/toolwindow.f12.css" type="text/css" data-plugin-theme="true" />
    <link id="button.css" rel="stylesheet" href="../common/button.css" type="text/css" data-plugin-theme="true" />
    <link id="controls.css" rel="stylesheet" href="../common/controls/controls.css" type="text/css" data-plugin-theme="true" />
    <link id="emulation.css" rel="stylesheet" href="emulation.css" type="text/css" data-plugin-theme="true" />

    <!-- Daytona Includes -->
    <script type="text/javascript" src="../Common/isDebugBuild.js"></script>
    <script type="text/javascript" src="../Common/plugin.js"></script>

    <script type="text/html" id="validatedTextboxTemplate">
        <span>
            <input type="text" id="validatedTextbox" />
            <img src="../Common/images/critical.png" id="validationErrorIcon" class="validationErrorIcon" />
            <label id="validationErrorHelper" class="hiddenLabel" aria-live="assertive"></label>
        </span>
    </script>

    <script type="text/javascript" src="../Common/CommonMerged.js"></script>

    <script type="text/javascript" src="EmulationMerged.js"></script>
    <script type="text/javascript" src="res://f12test.dll/23/selftest/SelfTestEmulation.js"></script>
    <script type="text/javascript">
        // The main entry point
        F12.Tools.Emulation.App.main();
    </script>
</head>
<body tabindex="-1">
    <div id="mainContainer">
        <div id="toolbar">
        </div>
        <div id="clientArea">
            <div id="modeSection"
                 class="emulationSection">
            </div>
            <div class="emulationSection">
                <h1 id="displayLabel"></h1>
                <div id="displayBasicSubSection"></div>
                <div id="customDisplaySizeSection" class="customSection">
                    <label id="enterCustomResolutionLabel" class="minorHeadingLabel"></label>
                    <div id="customDisplayInchesInfo" class="labeledTextBoxWithUnits">
                        <label id="customDisplaySizeLabel"></label>
                        <span id="displaySizeControlRoot"></span>
                        <label id="displaySizeInchesLabel" class="unitsLabel"></label>
                    </div>
                    <div class="labeledTextBoxWithUnits">
                        <label id="customDisplayWidthLabel"></label>
                        <span id="displayWidthControlRoot"></span>
                        <label id="widthPixelsLabel" class="unitsLabel"></label>
                    </div>
                    <div class="labeledTextBoxWithUnits">
                        <label id="customDisplayHeightLabel"></label>
                        <span id="displayHeightControlRoot"></span>
                        <label id="heightPixelsLabel" class="unitsLabel"></label>
                    </div>
                </div>
            </div>
            <div class="emulationSection">
                <h1 id="geoLabel"></h1>
                <div class="labeledRadioButton">
                    <label id="gpsLabel"></label>
                    <span role="radiogroup" aria-labelledby="gpsLabel">
                        <input type="radio" name="gps" id="gpsOff" /><label id="gpsOffLabel" class="radioButtonLabel" for="gpsOff"></label>
                        <input type="radio" name="gps" id="gpsOn" /><label id="gpsOnLabel" class="radioButtonLabel" for="gpsOn"></label>
                        <input type="radio" name="gps" id="gpsOnNoSignal" /><label id="gpsOnNoSignalLabel" class="radioButtonLabel" for="gpsOnNoSignal"></label>
                    </span>
                </div>
                <div id="geoLocationControlsRoot">
                    <div class="labeledTextBoxWithUnits">
                        <label id="latitudeLabel"></label>
                        <span id="latitudeControlRoot"></span>
                    </div>
                    <div class="labeledTextBoxWithUnits">
                        <label id="longitudeLabel"></label>
                        <span id="longitudeControlRoot"></span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
var ControlTemplates,__extends,F12;(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function t(){}return t.initialize=function(){t.ToDocModeOriginDisplaySetting=t.docModeOriginToDisplaySetting();t.ToStringFromBrowserMode=t.browserModeToString();t.ToUserAgentStringDisplaySetting=t.userAgentStringToDisplaySetting();t.ToStringFromOrientation=t.orientationToString()},t.docModeOriginToDisplaySetting=function(){return{convertTo:function(n){return n!==""?"block":"none"},convertFrom:null}},t.browserModeToString=function(){return{convertTo:function(n){return""+n},convertFrom:function(n){return parseInt(n,10)}}},t.userAgentStringToDisplaySetting=function(){return{convertTo:function(t){return t===n.EmulationModel.CUSTOM_VALUE?"block":"none"},convertFrom:null}},t.orientationToString=function(){return{convertTo:function(n){return""+n},convertFrom:function(n){return parseInt(n,10)}}},t}();n.Converters=t;t.initialize()})(t=n.Emulation||(n.Emulation={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.RESET_SETTING="ResetSetting",n.CHANGE_DOC_MODE="DocumentModeChange",n.CHANGE_BROWSER_PROFILE="BrowserProfileChange",n.CHANGE_USER_AGENT="UserAgentChange",n.CUSTOM_USER_AGENT="UserAgentCustom",n.CHANGE_ORIENTATION="OrientationChange",n.CHANGE_RESOLUTION="ResolutionChange",n.GPS_OFF="GPSOff",n.GPS_ON="GPSOn",n.GPS_NO_SIGNAL="GPSNoSignal",n}();n.CommandName=t;n.analytics=new Common.F12AnalyticsProxy(Common.ToolName.EMULATION)})(t=n.Telemetry||(n.Telemetry={}))})(t=n.Emulation||(n.Emulation={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={})),function(n){"use strict";var t;(function(n){var t;(function(n){var t,i,r,u,f,e;(function(n){n[n.Mode=1]="Mode";n[n.Display=2]="Display";n[n.Geolocation=4]="Geolocation";n[n.All=n.Mode|n.Display|n.Geolocation]="All"})(n.ViewUpdateFlags||(n.ViewUpdateFlags={}));t=n.ViewUpdateFlags,function(n){n[n.Desktop=0]="Desktop";n[n.Phone=1]="Phone";n[n.Enterprise=2]="Enterprise";n[n.Unknown=3]="Unknown"}(n.BrowserMode||(n.BrowserMode={}));i=n.BrowserMode,function(n){n[n.BrowserMode=0]="BrowserMode";n[n.UserAgentString=1]="UserAgentString"}(n.ModeUpdate||(n.ModeUpdate={}));r=n.ModeUpdate,function(n){n[n.Landscape=0]="Landscape";n[n.Portrait=1]="Portrait";n[n.Unknown=2]="Unknown"}(n.Orientation||(n.Orientation={}));u=n.Orientation,function(n){n[n.Orientation=0]="Orientation";n[n.Resolution=1]="Resolution"}(n.ViewportUpdate||(n.ViewportUpdate={}));f=n.ViewportUpdate,function(n){n[n.Off=0]="Off";n[n.On=1]="On";n[n.OnNoSignal=2]="OnNoSignal";n[n.Unknown=3]="Unknown"}(n.GeolocationState||(n.GeolocationState={}));e=n.GeolocationState})(t=n.Emulation||(n.Emulation={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={})),function(n){var t=function(){function n(){}return n.emulationBasicDisplayControls='<div>            <!-- Orientation -->            <div class="labeledComboBox">                <label id="orientationLabel" data-options="innerText:EmulationOrientation; converter=Common.CommonConverters.ResourceConverter"><\/label>                <div id="orientationControlRoot" aria-labelledby="orientationLabel" data-name="orientationSelector" data-control="Common.Controls.ComboBox" data-binding="items:orientations,                                    selectedValue:orientation; converter=F12.Tools.Emulation.Converters.ToStringFromOrientation; mode=twoway"><\/div>            <\/div>            <!-- Resolution -->            <div class="labeledComboBox">                <label id="resolutionLabel" data-options="innerText:EmulationResolution; converter=Common.CommonConverters.ResourceConverter"><\/label>                <div id="resolutionControlRoot" aria-labelledby="resolutionLabel" data-name="resolutionSelector" data-control="Common.Controls.ComboBox" data-binding="items:resolutions,                                    selectedValue:resolution; mode=twoway"><\/div>            <\/div>        <\/div>',n.emulationButtonPanel='<div>            <div data-name="persistSettingsButton" data-control="Common.Controls.ToggleButton" data-control-templateid="Common.iconButton" data-binding="isChecked:shouldPeristSettings; mode=twoway" data-options="className:persistSettingsButton,                                tooltip:EmulationPersistSettingsButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="resetButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton" data-binding="isEnabled:resetShouldBeEnabled" data-options="className:resetButton,                                 tooltip:EmulationResetButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>        <\/div>',n.emulationModeControls='<div>            <h1 id="modeLabel" data-options="innerText:EmulationModeSection; converter=Common.CommonConverters.ResourceConverter"><\/h1>            <!-- Document Mode -->            <div class="labeledComboBox" id="docModeLabel">                <label id="documentModeLabel" data-options="innerText:EmulationDocMode; converter=Common.CommonConverters.ResourceConverter"><\/label>                <div id="documentModeListRoot" aria-labelledby="documentModeLabel" data-name="documentModeSelector" data-control="Common.Controls.ComboBox" data-binding="isEnabled:isAtBreakpoint; converter=Common.CommonConverters.InvertBool,                                    items:documentModes,                                    selectedValue:documentMode; mode=twoway"><\/div>                <div id="documentModeInfoControlRoot" data-name="documentModeInfoButton" data-control="Common.Controls.Button" data-control-templateid="Emulation.emulationLinkIconButton" data-binding="tooltip:documentModeInfoLink" data-options="className:infoButton"><\/div>            <\/div>            <!-- Document Mode Awareness -->            <div id="documentModeAwarenessContainer" data-binding="style.display:documentModeOrigin; converter=F12.Tools.Emulation.Converters.ToDocModeOriginDisplaySetting">                <label id="emptyLabel"><\/label>                <div id="documentModeAwarenessLink" data-name="documentModeOriginButton" data-control="Common.Controls.Button" data-control-templateid="Emulation.emulationLinkButton" data-binding="content:documentModeOrigin,                                  tooltip:documentModeOriginTooltip"><\/div>            <\/div>            <!-- Browser Profile -->            <div class="labeledComboBox">                <label id="browserModeLabel" data-options="innerText:EmulationBrowserMode; converter=Common.CommonConverters.ResourceConverter"><\/label>                <div id="browserModeListRoot" aria-labelledby="browserModeLabel" data-name="browserModeSelector" data-control="Common.Controls.ComboBox" data-binding="isEnabled:isAtBreakpoint; converter=Common.CommonConverters.InvertBool,                                    items:browserModes,                                    selectedValue:browserMode; converter=F12.Tools.Emulation.Converters.ToStringFromBrowserMode; mode=twoway"><\/div>            <\/div>            <!-- User Agent String -->            <div class="labeledComboBox">                <label id="uaStringLabel" data-options="innerText:EmulationUAString; converter=Common.CommonConverters.ResourceConverter"><\/label>                <div id="uaStringListRoot" aria-labelledby="uaStringLabel" data-name="uaStringSelector" data-control="Common.Controls.ComboBox" data-binding="isEnabled:isAtBreakpoint; converter=Common.CommonConverters.InvertBool,                                    items:userAgentStrings,                                    selectedValue:userAgentString; mode=twoway"><\/div>            <\/div>            <!-- Custom User Agent String -->            <div id="customUaStringSection" class="customSection" data-binding="style.display:userAgentString; converter=F12.Tools.Emulation.Converters.ToUserAgentStringDisplaySetting">                <label id="enterCustomStringLabel" class="minorHeadingLabel" data-options="innerText:EmulationCustomUAStringInfo; converter=Common.CommonConverters.ResourceConverter"><\/label>                <div class="labeledComboBox">                    <label id="customUaStringLabel" data-options="innerText:EmulationCustomUAStringLabel; converter=Common.CommonConverters.ResourceConverter"><\/label>                    <div id="customUaStringControlRoot" aria-labelledby="uaStringLabel" data-name="customUaStringLabel" data-control="Common.Controls.TextBox" data-control-templateid="Emulation.emulationCustomUaStringTextBox" data-controlbinding="model:model" data-binding="isEnabled:isAtBreakpoint; converter=Common.CommonConverters.InvertBool,                                       text:customUserAgentString; mode=twoway" data-options="className:customUaStringTextBox"><\/div>                    <div id="removeCustomUaStringControlRoot" data-name="deleteUaStringButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton24x24" data-binding="isEnabled:isAtBreakpoint; converter=Common.CommonConverters.InvertBool" data-options="className:deleteUaStringButton,                                        tooltip:EmulationDeleteButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>                <\/div>            <\/div>        <\/div>',n.emulationLinkIconButton='<span tabindex="0" role="link">          <span class="inputIcon" data-controlbinding="attr-data-plugin-vs-tooltip:tooltip"><\/span>      <\/span>',n.emulationLinkButton='<a tabindex="0" data-controlbinding="innerHTML:content"><\/a>',n.emulationCustomUaStringTextBox='<div>        <input type="text" list="customUaStringDataList" data-name="_textBoxRoot" data-controlbinding="value:text; mode=twoway" />        <div id="customUaStringDataList" data-control="Common.Controls.ItemsControl" data-control-templateid="Emulation.emulationCustomUaStringDataList" data-binding="items:customUserAgentStrings" data-options="itemContainerControl:Common.TemplateControl(Emulation.emulationCustomUaStringDataListItem)"><\/div>      <\/div>',n.emulationCustomUaStringDataList="<datalist><\/datalist>",n.emulationCustomUaStringDataListItem='<option data-binding="text:text"><\/option>',n}();n.Emulation=t}(ControlTemplates||(ControlTemplates={}));__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t;(function(t){var i;(function(t){var i=function(i){function r(n,t){var r=this;i.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=n;this._config=t;this.propertiesResolved.addHandler(function(n){return r.onPropertiesResolved(n)})}return __extends(r,i),r.initialize=function(){Common.ObservableHelpers.defineProperty(r,r.ShouldPeristSettingsProperty,!1,function(n){return n.onGenericPropertyChanged(null,null)});Common.ObservableHelpers.defineProperty(r,r.IsAtBreakpointProperty,!1,function(n,t,i){return n.onIsAtBreakpointChanged(i)});Common.ObservableHelpers.defineProperty(r,r.SettingsHaveBeenModifiedProperty,!1,function(n){return n.updateResetEnabledState()});Common.ObservableHelpers.defineProperty(r,r.ResetShouldBeEnabledProperty,!1);Common.ObservableHelpers.defineProperty(r,r.DocumentModeProperty,r.DocumentModeDefault,function(n,t,i){return n.onDocumentModeChanged(i)});Common.ObservableHelpers.defineProperty(r,r.DocumentModeInfoProperty,"");Common.ObservableHelpers.defineProperty(r,r.DocumentModeInfoLinkProperty,"");Common.ObservableHelpers.defineProperty(r,r.DocumentModeOriginProperty,"");Common.ObservableHelpers.defineProperty(r,r.DocumentModeOriginTooltipProperty,"");Common.ObservableHelpers.defineProperty(r,r.AllBrowserModesProperty,[]);Common.ObservableHelpers.defineProperty(r,r.BrowserModesProperty,[]);Common.ObservableHelpers.defineProperty(r,r.BrowserModeProperty,r.BrowserModeDefault,function(n,t,i){return n.onBrowserModeChanged(i)});Common.ObservableHelpers.defineProperty(r,r.UserAgentStringProperty,r.UserAgentStringDefault,function(n,t,i){return n.onUserAgentStringChanged(i)});Common.ObservableHelpers.defineProperty(r,r.CustomUserAgentStringProperty,r.CustomUserAgentStringDefault,function(n,t,i){return n.onCustomUserAgentStringChanged(i)});Common.ObservableHelpers.defineProperty(r,r.OrientationProperty,r.OrientationDefault,function(n,t,i){return n.onDisplayPropertiesChanged(0,i===r.OrientationDefault)});Common.ObservableHelpers.defineProperty(r,r.ResolutionProperty,r.ResolutionDefault,function(n,t,i){return n.onDisplayPropertiesChanged(1,i===r.ResolutionDefault)});Common.ObservableHelpers.defineProperty(r,r.ResolutionDisplaySizeProperty,r.ResolutionDisplaySizeDefault,function(n,t,i){return n.onGenericPropertyChanged(r.ResolutionDisplaySizeDefault,i)});Common.ObservableHelpers.defineProperty(r,r.ResolutionWidthProperty,r.ResolutionWidthDefault,function(n,t,i){return n.onGenericPropertyChanged(r.ResolutionWidthDefault,i)});Common.ObservableHelpers.defineProperty(r,r.ResolutionHeightProperty,r.ResolutionHeightDefault,function(n,t,i){return n.onGenericPropertyChanged(r.ResolutionHeightDefault,i)});Common.ObservableHelpers.defineProperty(r,r.GeolocationStateProperty,r.GeolocationStateDefault,function(n,t,i){return n.onGenericPropertyChanged(r.GeolocationStateDefault,i)});Common.ObservableHelpers.defineProperty(r,r.GpsLatitudeProperty,r.GpsLatitudeDefault,function(n,t,i){return n.onGenericPropertyChanged(r.GpsLatitudeDefault,i)});Common.ObservableHelpers.defineProperty(r,r.GpsLongitudeProperty,r.GpsLongitudeDefault,function(n,t,i){return n.onGenericPropertyChanged(r.GpsLongitudeDefault,i)})},r.prototype.load=function(n){var i=new t.EmulationSettingsValidator(this.userAgentStrings.map(function(n){return n}),this.resolutions.map(function(n){return n}),n),r,u,f;this.shouldPeristSettings=i.shouldPersistSettings;this.shouldPeristSettings&&(this._events.areMultiplePropertiesChanging=!0,this.documentMode=i.documentMode,this.browserMode=i.browserMode,this.userAgentString=i.userAgentString,this.customUserAgentString=i.customUserAgentString,this.orientation=i.orientation,this.resolution=i.resolution,r=i.resolutionInfo,this.resolutionDisplaySize=r.displaySize,this.resolutionWidth=r.width,this.resolutionHeight=r.height,this.geolocationState=i.geolocationState,this.geolocationState===0?(u=this._config?this._config.categories.simulateGPS.off:{},this.gpsLatitude=u.latitude,this.gpsLongitude=u.longitude):(f=i.geolocationInfo,this.gpsLatitude=f.latitude,this.gpsLongitude=f.longitude),this.updateDirtyFlag(),this._events.areMultiplePropertiesChanging=!1,this._events.onFlushPendingRefreshes())},r.prototype.save=function(){var n={},u,i;return n.shouldPersistSettings=this.shouldPeristSettings,n.documentMode=this.documentMode,n.browserMode=t.BrowserMode[this.browserMode],n.orientation=t.Orientation[this.orientation],n.userAgentString=this.userAgentString!==r.CUSTOM_VALUE?this.userAgentString:this.customUserAgentString,this.resolution===r.DEFAULT_VALUE?n.resolution=null:(n.resolution={},u=this.resolutions.map(function(n){return n.value}).indexOf(this.resolution),u>=0&&this.resolution!==r.CUSTOM_VALUE?(i=this.resolutions.getItem(u).info,n.resolution.displaySize=i.displaySize,n.resolution.width=i.width,n.resolution.height=i.height):(n.resolution.displaySize=this.resolutionDisplaySize,n.resolution.width=this.resolutionWidth,n.resolution.height=this.resolutionHeight)),n.geolocationState=t.GeolocationState[this.geolocationState],n.geolocation={},n.geolocation.latitude=this.gpsLatitude,n.geolocation.longitude=this.gpsLongitude,n},r.prototype.reset=function(){this.documentMode=r.DocumentModeDefault;this.browserMode=r.BrowserModeDefault;this.userAgentString=r.UserAgentStringDefault;this.customUserAgentString=r.CustomUserAgentStringDefault;this.orientation=r.OrientationDefault;this.resolution=r.ResolutionDefault;this.resolutionDisplaySize=r.ResolutionDisplaySizeDefault;this.resolutionWidth=r.ResolutionWidthDefault;this.resolutionHeight=r.ResolutionHeightDefault;this.geolocationState=r.GeolocationStateDefault;this.gpsLatitude=r.GpsLatitudeDefault;this.gpsLongitude=r.GpsLongitudeDefault;this.settingsHaveBeenModified=!1},r.prototype.onIsAtBreakpointChanged=function(n){this._events.onIsAtBreakpointChanged(n);this.updateResetEnabledState()},r.prototype.updateResetEnabledState=function(){this.resetShouldBeEnabled=this.settingsHaveBeenModified&&!this.isAtBreakpoint;this.settingsHaveBeenModifiedChanged.invoke(this.settingsHaveBeenModified)},r.prototype.onDocumentModeChanged=function(t){n.Tools.Emulation.Telemetry.analytics.logExecuteCommand(n.Tools.Emulation.Telemetry.CommandName.CHANGE_DOC_MODE,0);this._events.onDocumentModeChanged(t);this.propertiesResolved.invoke(this.documentMode!==r.DocumentModeDefault)},r.prototype.onBrowserModeChanged=function(t){n.Tools.Emulation.Telemetry.analytics.logExecuteCommand(n.Tools.Emulation.Telemetry.CommandName.CHANGE_BROWSER_PROFILE,0);this._events.onBrowserModeChanged(t);if(!this._events.areMultiplePropertiesChanging){this._events.areMultiplePropertiesChanging=!0;var u=!0,i=this.userAgentString;if(this.userAgentString===r.CUSTOM_VALUE&&(u=!1),t===0)i=r.DEFAULT_VALUE,this.resolution=r.DEFAULT_VALUE,this.orientation=0;else if(t===1)this.mobileUserAgentStrings.length>0&&(i=this.mobileUserAgentStrings[0]),this.mobileResolutions.length>0&&(this.resolution=this.mobileResolutions[this.mobileResolutions.length-1]),this.orientation=1;else if(t===2)i=r.DEFAULT_VALUE,this.resolution=r.DEFAULT_VALUE,this.orientation=0;else throw new Error("BrowserMode was set to an unknown value: "+t);u&&(this.userAgentString=i);this._events.onRefreshNeeded();this._events.areMultiplePropertiesChanging=!1;this.propertiesResolved.invoke(!0)}},r.prototype.onUserAgentStringChanged=function(t){n.Tools.Emulation.Telemetry.analytics.logExecuteCommand(n.Tools.Emulation.Telemetry.CommandName.CHANGE_USER_AGENT,0);this._events.onUserAgentStringChanged(t);if(!this._events.areMultiplePropertiesChanging){var i=!0;this._events.areMultiplePropertiesChanging=!0;t===r.CUSTOM_VALUE?i=!1:this.mobileUserAgentStrings.indexOf(t)<0?(this.browserMode=0,this.resolution=r.DEFAULT_VALUE):(this.browserMode=1,this.mobileResolutions.length>0&&(this.resolution=this.mobileResolutions[this.mobileResolutions.length-1]));i&&this._events.onRefreshNeeded();this._events.areMultiplePropertiesChanging=!1;this.propertiesResolved.invoke(this.userAgentString!==r.UserAgentStringDefault)}},r.prototype.onCustomUserAgentStringChanged=function(t){var i=this;n.Tools.Emulation.Telemetry.analytics.logExecuteCommand(n.Tools.Emulation.Telemetry.CommandName.CUSTOM_USER_AGENT,0);t!==""&&this._events.onCustomUserAgentStringChanged(t).done(function(n){i.customUserAgentStrings.resetItems(n.map(function(n){return{text:n.value,date:n.name}}).sort(function(n,t){return t.date.localeCompare(n.date)}))});this.propertiesResolved.invoke(this.customUserAgentString!==r.CustomUserAgentStringDefault)},r.prototype.getResolutionInfo=function(n){for(var t=0;t<this.resolutions.length;++t)if(this.resolutions.getItem(t).text===n)return this.resolutions.getItem(t).info;throw new Error("Resolution is set to an unknown value")},r.prototype.onDisplayPropertiesChanged=function(t,i){if(t===0?n.Tools.Emulation.Telemetry.analytics.logExecuteCommand(n.Tools.Emulation.Telemetry.CommandName.CHANGE_ORIENTATION,0):t===1&&n.Tools.Emulation.Telemetry.analytics.logExecuteCommand(n.Tools.Emulation.Telemetry.CommandName.CHANGE_RESOLUTION,0),this.resolution===r.DEFAULT_VALUE)t===1&&this._events.onResolutionSetToDefault();else if(this.resolution!==r.CUSTOM_VALUE){var u=this.getResolutionInfo(this.resolution),f,e;if(this.orientation===0)f=u.width,e=u.height;else if(this.orientation===1)f=u.height,e=u.width;else if(this.orientation===2)throw new Error("Orientation is set to an unknown value");this._events.onResolutionViewportSizeSet(u.displaySize,f,e)}else this.customResolutionFieldsNeedCommit.invoke();this.propertiesResolved.invoke(!i)},r.prototype.onGenericPropertyChanged=function(n,t){if(!this._events.areMultiplePropertiesChanging){var i=n===undefined||n===null,r=t===undefined||t===null,u=n!==t&&(!i||!r);this.propertiesResolved.invoke(u)}},r.prototype.onPropertiesResolved=function(n){n?this.settingsHaveBeenModified=!0:this.updateDirtyFlag()},r.prototype.updateDirtyFlag=function(){this.settingsHaveBeenModified=this.documentMode!==r.DocumentModeDefault||this.browserMode!==r.BrowserModeDefault||this.userAgentString!==r.UserAgentStringDefault||this.customUserAgentString!==r.CustomUserAgentStringDefault||this.orientation!==r.OrientationDefault||this.resolution!==r.ResolutionDefault||this.resolutionDisplaySize!==r.ResolutionDisplaySizeDefault||this.resolutionWidth!==r.ResolutionWidthDefault||this.resolutionHeight!==r.ResolutionHeightDefault||this.geolocationState!==r.GeolocationStateDefault||this.gpsLatitude!==r.GpsLatitudeDefault||this.gpsLongitude!==r.GpsLongitudeDefault},r.DEFAULT_VALUE="",r.CUSTOM_VALUE="?",r.MAX_VIEWPORT_DISPLAY_SIZE=60,r.MAX_VIEWPORT_WIDTH_IN_PX=3820,r.MAX_VIEWPORT_HEIGHT_IN_PX=2160,r.MIN_LATITUDE=-90,r.MAX_LATITUDE=90,r.MIN_LONGITUDE=-180,r.MAX_LONGITUDE=180,r.ShouldPeristSettingsProperty="shouldPeristSettings",r.IsAtBreakpointProperty="isAtBreakpoint",r.SettingsHaveBeenModifiedProperty="settingsHaveBeenModified",r.ResetShouldBeEnabledProperty="resetShouldBeEnabled",r.DocumentModeProperty="documentMode",r.DocumentModeInfoProperty="documentModeInfo",r.DocumentModeInfoLinkProperty="documentModeInfoLink",r.DocumentModeOriginProperty="documentModeOrigin",r.DocumentModeOriginTooltipProperty="documentModeOriginTooltip",r.AllBrowserModesProperty="allBrowserModes",r.BrowserModesProperty="browserModes",r.BrowserModeProperty="browserMode",r.UserAgentStringProperty="userAgentString",r.CustomUserAgentStringProperty="customUserAgentString",r.OrientationProperty="orientation",r.ResolutionProperty="resolution",r.ResolutionDisplaySizeProperty="resolutionDisplaySize",r.ResolutionWidthProperty="resolutionWidth",r.ResolutionHeightProperty="resolutionHeight",r.GeolocationStateProperty="geolocationState",r.GpsLatitudeProperty="gpsLatitude",r.GpsLongitudeProperty="gpsLongitude",r.DocumentModeDefault=r.DEFAULT_VALUE,r.BrowserModeDefault=0,r.UserAgentStringDefault=r.DEFAULT_VALUE,r.CustomUserAgentStringDefault="",r.OrientationDefault=0,r.ResolutionDefault=r.DEFAULT_VALUE,r.ResolutionDisplaySizeDefault=null,r.ResolutionWidthDefault=null,r.ResolutionHeightDefault=null,r.GeolocationStateDefault=0,r.GpsLatitudeDefault=null,r.GpsLongitudeDefault=null,r}(Common.Observable);t.EmulationModel=i;i.initialize()})(i=t.Emulation||(t.Emulation={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={})),function(n){"use strict";var t;(function(n){var t;(function(n){var t=function(){function t(n,t,i){i===void 0&&(i={});this._validUAStrings=n;this._validResolutions=t;this._settings=i}return Object.defineProperty(t.prototype,"shouldPersistSettings",{get:function(){return!!this._settings.shouldPersistSettings},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"documentMode",{get:function(){var i,t;if(this._settings.documentMode){for(i=-1,t=0;t<n.EmulationWindow.EMULATION_MODES.length;t++)if(n.EmulationWindow.EMULATION_MODES[t].value===this._settings.documentMode){i=t;break}return i<0?n.EmulationModel.DEFAULT_VALUE:n.EmulationWindow.EMULATION_MODES[i].value}return n.EmulationModel.DEFAULT_VALUE},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"browserMode",{get:function(){var t=n.BrowserMode[this._settings.browserMode];return typeof t!="undefined"&&t!==3?t:0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"userAgentString",{get:function(){if(this._settings.userAgentString){var t=this._validUAStrings.map(function(n){return n.value}).indexOf(this._settings.userAgentString);return t<0?n.EmulationModel.CUSTOM_VALUE:this._validUAStrings[t].value}return n.EmulationModel.DEFAULT_VALUE},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"customUserAgentString",{get:function(){return this._settings.userAgentString&&this.userAgentString===n.EmulationModel.CUSTOM_VALUE?""+this._settings.userAgentString:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orientation",{get:function(){var t=n.Orientation[this._settings.orientation];return typeof t!="undefined"&&t!==2?t:0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"resolution",{get:function(){if(this._settings.resolution){var i=n.EmulationWindow.formatResolutionInfo(this._settings.resolution),t=this._validResolutions.map(function(n){return n.value}).indexOf(i);return t<0?n.EmulationModel.CUSTOM_VALUE:this._validResolutions[t].value}return n.EmulationModel.DEFAULT_VALUE},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"resolutionInfo",{get:function(){return this._settings.resolution?{displaySize:this.validateFloatValue(this._settings.resolution.displaySize),width:this.validateIntValue(this._settings.resolution.width),height:this.validateIntValue(this._settings.resolution.height)}:{}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"geolocationState",{get:function(){var t=n.GeolocationState[this._settings.geolocationState];return typeof t!="undefined"&&t!==3?t:0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"geolocationInfo",{get:function(){return this._settings.geolocation?{latitude:this.validateFloatValue(this._settings.geolocation.latitude),longitude:this.validateFloatValue(this._settings.geolocation.longitude)}:{}},enumerable:!0,configurable:!0}),t.prototype.validateIntValue=function(n){if(typeof n=="number")return n;var t=parseInt(n,10);return isNaN(t)||!isFinite(t)?undefined:t},t.prototype.validateFloatValue=function(n){if(typeof n=="number")return n;var t=parseFloat(n);return isNaN(t)||!isFinite(t)?undefined:t},t}();n.EmulationSettingsValidator=t})(t=n.Emulation||(n.Emulation={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function r(n){this._proxy=n;this._runningPromises=[];this._isAtBreakpoint=!1;this.eventsShouldFire=!0;this.areMultiplePropertiesChanging=!1;this.needsRefresh=!1}return Object.defineProperty(r.prototype,"shouldPerformRefreshes",{get:function(){return!this._isAtBreakpoint},enumerable:!0,configurable:!0}),r.prototype.awaitRunningPromises=function(){if(this._runningPromises.length>0){var n=this._runningPromises;return this._runningPromises=[],i.Promise.join(n)}return i.Promise.as({})},r.prototype.setPromise=function(n,t){this.areMultiplePropertiesChanging||(this._runningPromises=[]);n.__debugname=t;this._runningPromises.push(n)},r.prototype.clearPromises=function(){this._runningPromises=[]},r.prototype.onIsAtBreakpointChanged=function(n){this._isAtBreakpoint=n},r.prototype.onDocumentModeChanged=function(n){var r=this;this.eventsShouldFire&&(n===t.EmulationModel.DEFAULT_VALUE&&(n=null),this.needsRefresh=!this.shouldPerformRefreshes,this.setPromise(new i.Promise(function(t){r._proxy.callRemote("setDocumentModeOverride",[n,r.shouldPerformRefreshes],t)}),"onDocumentModeChanged"))},r.prototype.onBrowserModeChanged=function(n){var t=this;this.eventsShouldFire&&(this.needsRefresh=!1,this.setPromise(new i.Promise(function(i){t._proxy.callRemote("setBrowserMode",[t.getStringFromBrowserMode(n)],i)}),"onBrowserModeChanged"))},r.prototype.onUserAgentStringChanged=function(n){var r=this;this.eventsShouldFire&&(this.needsRefresh=!0,this.setPromise(new i.Promise(function(i){n===t.EmulationModel.DEFAULT_VALUE?r._proxy.callRemote("setUserAgentStringToDefault",[!1],i):n!==t.EmulationModel.CUSTOM_VALUE?r._proxy.callRemote("setCurrentUserAgentString",[n,!1],i):i()}),"onUserAgentStringChanged"))},r.prototype.onCustomUserAgentStringChanged=function(t){var u=this,r;return this.needsRefresh=!this.shouldPerformRefreshes,r=new i.Promise(function(i){n.Tools.Utility.Assert.isFalse(t==="","Expected a non-empty custom UA string");u._proxy.callRemote("storeAndSetCustomUserAgentString",[t,u.shouldPerformRefreshes],i)}),this.setPromise(r,"onCustomUserAgentStringChanged"),r},r.prototype.onRefreshNeeded=function(){var n=this;(this.needsRefresh=!1,this.eventsShouldFire)&&this.shouldPerformRefreshes&&this.setPromise(new i.Promise(function(t){n._proxy.callRemote("refresh",[],t)}),"onRefreshNeeded")},r.prototype.onFlushPendingRefreshes=function(){this.needsRefresh&&this.onRefreshNeeded()},r.prototype.onResolutionSetToDefault=function(){var n=this;this.setPromise(new i.Promise(function(t){n._proxy.callRemote("resetViewportSizeToDefault",[],t)}),"onResolutionSetToDefault")},r.prototype.onResolutionViewportSizeSet=function(n,t,r){var u=this;this.setPromise(new i.Promise(function(i){u._proxy.callRemote("setViewportSize",[n,t,r],i)}),"onResolutionViewportSizeSet")},r.prototype.getStringFromBrowserMode=function(n){if(n===0)return"Desktop";if(n===1)return"Mobile";if(n===2)return"Enterprise";throw new Error("Got unknown browser mode value")},r}();t.EmulationRemoteController=r})(i=t.Emulation||(t.Emulation={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,i;(function(n){var i;(function(n){(function(n){n[n.Unknown=0]="Unknown";n[n.Okay=1]="Okay";n[n.Error=2]="Error"})(n.ValidationStatus||(n.ValidationStatus={}));var r=n.ValidationStatus,i=function(n){function i(t,i,r,u){var f=this;n.call(this,u);t.appendChild(this.rootElement);this._validationCallback=i;this._useLocaleString=r;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(n){return f.onChange(n)});this._textbox.addEventListener("keydown",function(n){return f.onKeydown(n)});this._textbox.addEventListener("blur",function(n){return f.onBlur(n)});this.clearValidationStatus(1)}return __extends(i,n),Object.defineProperty(i.prototype,"disabled",{get:function(){return this._textbox.disabled},set:function(n){this._textbox.disabled=n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"text",{get:function(){return this._textbox.value},set:function(n){this._textbox.value=n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"validationStatus",{get:function(){return this._validationStatus.status},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"validatedValue",{get:function(){return this._validationStatus.validatedValue},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"textCommitted",{get:function(){return this._textCommitted},set:function(n){this._textCommitted=n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"valueCommitted",{get:function(){return this._valueCommitted},set:function(n){this._valueCommitted=n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"validationFailed",{get:function(){return this._validationFailed},set:function(n){this._validationFailed=n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"focusableElement",{get:function(){return this._textbox},enumerable:!0,configurable:!0}),i.prototype.getValidationInfo=function(){return this._validationStatus},i.prototype.commitEdits=function(){this.validateAndCommit()},i.prototype.tryValidate=function(){return this.validateAndCommit(!1),this.validationStatus===1},i.prototype.onChange=function(){this.validateAndCommit()},i.prototype.onKeydown=function(n){n.keyCode===13?(this.validateAndCommit(),n.preventDefault()):this.clearValidationStatus()},i.prototype.onBlur=function(){this.validationStatus===0&&this.validateAndCommit()},i.prototype.clearValidationStatus=function(n){n===void 0&&(n=0);this._validationStatus={status:n,tooltip:""};this._errorIcon.style.display="none";this._errorHelper.innerText=""},i.prototype.validateAndCommit=function(n){var r=this,i;n===void 0&&(n=!0);try{this._validationStatus=this._validationCallback(this._textbox.value)}catch(u){this._validationStatus={status:2,tooltip:""}}this._validationStatus.status===1?(this._errorIcon.style.display="none",this._errorHelper.innerText="",this._useLocaleString?(i=this.validatedValue?this.validatedValue.toLocaleString(t.Culture.lang,{maximumFractionDigits:20}):"",this.validatedValue&&i!==this.text&&(this.text=i)):this.validatedValue&&this.validatedValue.toString()!==this.text&&(this.text=this.validatedValue.toString()),n&&(this.textCommitted&&this.textCommitted(this.text),this.valueCommitted&&this.valueCommitted(this.validatedValue))):(this._errorIcon.onmouseover=function(){return t.Tooltip.show({content:r._validationStatus.tooltip}),!0},this._errorIcon.style.display="inline",this._errorHelper.innerText=this._validationStatus.tooltip,this.validationFailed&&this.validationFailed())},i}(Common.Controls.Legacy.TemplateControl);n.ValidatedTextbox=i})(i=n.Emulation||(n.Emulation={}))})(i=n.Tools||(n.Tools={}))}(F12||(F12={})),function(n){var t;(function(t){var i;(function(i){"use strict";var r=Microsoft.Plugin,u=function(){function u(t){var f=this,e;this._telemetryLoadStartTime=Date.now();this._traceWriter=new Common.TraceWriter;this.traceWriter.raiseEvent(601);this._handshakeCallbacks=[];Common.ToolWindowHelpers.registerErrorComponent("Emulation",this.onError.bind(this));this._proxy=new Proxy(t);this._remote=new i.EmulationRemoteController(this._proxy);this._diagnosticsBridge=t;e=n.Host.Impl.Storage.readPluginFile("emulation.json");this._config=JSON.parse(e);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 i.ValidatedTextbox(document.getElementById("displaySizeControlRoot"),function(n){return f.validateDisplaySize(n)},!0,"validatedTextboxTemplate");this._displayWidthInput=new i.ValidatedTextbox(document.getElementById("displayWidthControlRoot"),function(n){return f.validateDisplayDimension(n,i.EmulationModel.MAX_VIEWPORT_WIDTH_IN_PX,"EmulationLargeResolutionWidthError")},!1,"validatedTextboxTemplate");this._displayHeightInput=new i.ValidatedTextbox(document.getElementById("displayHeightControlRoot"),function(n){return f.validateDisplayDimension(n,i.EmulationModel.MAX_VIEWPORT_HEIGHT_IN_PX,"EmulationLargeResolutionHeightError")},!1,"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 i.ValidatedTextbox(document.getElementById("latitudeControlRoot"),function(n){return f.validateCoordinate(n,i.EmulationModel.MIN_LATITUDE,i.EmulationModel.MAX_LATITUDE,"EmulationLatitudeError")},!0,"validatedTextboxTemplate");this._gpsLongitudeInput=new i.ValidatedTextbox(document.getElementById("longitudeControlRoot"),function(n){return f.validateCoordinate(n,i.EmulationModel.MIN_LONGITUDE,i.EmulationModel.MAX_LONGITUDE,"EmulationLongitudeError")},!0,"validatedTextboxTemplate");this.initializeView();this._modeSection.getNamedElement("documentModeSelector").focus();r.F12||window.addEventListener("keydown",function(n){if(n.keyCode===9&&!n.altKey&&!n.ctrlKey){var i=document.activeElement,r=f._modeSection.getNamedElement("documentModeSelector"),t;if(t=f._model.geolocationState===0?f._geolocationOffButton.focusableElement:f._gpsLongitudeInput.focusableElement,n.shiftKey){if(i===r)return t.focus(),n.preventDefault(),!1}else if(i===t)return r.focus(),n.preventDefault(),!1}});this._hasHandshakeFired=!1;this._isInitialHandshake=!0;this._model.isAtBreakpoint=!1;this._currentUrl="";this._proxy.initializeProxy(function(n){return f.onMessage(n)},function(){return f.onAttach()},function(){return f.onDetach()},function(){return f.onBreak()},function(){return f.onRun()});Common.ToolWindowHelpers.initializeToolWindow();this._toolbar.addClickHandlerToButton("resetButton",function(){n.Tools.Emulation.Telemetry.analytics.logExecuteCommand(n.Tools.Emulation.Telemetry.CommandName.RESET_SETTING,0);f.resetAllEmulationSettings()});this._modeSection.addClickHandlerToButton("documentModeInfoButton",function(){return f.onDocumentModeInfoClicked()});this._modeSection.addClickHandlerToButton("documentModeOriginButton",function(){return f.onDocumentModeOriginClicked()});this._modeSection.addClickHandlerToButton("deleteUaStringButton",function(){return f.onRemoveCustomUserAgentString()});this._displaySizeInput.valueCommitted=function(){return f.onCustomDisplayFieldsCommitted()};this._displayWidthInput.valueCommitted=function(){return f.onCustomDisplayFieldsCommitted()};this._displayWidthInput.validationFailed=function(){return f.onDisplayDimensionValidationFailure()};this._displayHeightInput.valueCommitted=function(){return f.onCustomDisplayFieldsCommitted()};this._displayHeightInput.validationFailed=function(){return f.onDisplayDimensionValidationFailure()};this._geolocationOffButton.check=function(){return f.onGeolocationStateChanged(0)};this._geolocationOnButton.check=function(){return f.onGeolocationStateChanged(1)};this._geolocationOnNoSignalButton.check=function(){return f.onGeolocationStateChanged(2)};this._gpsLatitudeInput.valueCommitted=function(n){return f.onLatitudeCommitted(n)};this._gpsLongitudeInput.valueCommitted=function(n){return f.onLongitudeCommitted(n)};this._model.customResolutionFieldsNeedCommit.addHandler(function(){return f.onCustomDisplayFieldsCommitted()});r.F12&&(r.F12.addEventListener("browsershortcut",function(t){t.ctrlKey&&t.shiftKey&&!t.altKey&&t.keyCode===76&&(n.Tools.Emulation.Telemetry.analytics.logExecuteCommand(n.Tools.Emulation.Telemetry.CommandName.RESET_SETTING,1),f.resetAllEmulationSettings())}),r.F12.Communications.registerMethodHandler("getemulationquickaccessmenuitems",function(n,t){return f.onGetEmulationQuickAccessMenuItems(n,t)}),r.F12.Communications.registerMethodHandler("setemulationdocmode",function(n){return f.onSetEmulationDocMode(n)}),r.F12.isTargetEdge&&(document.getElementById("docModeLabel").parentNode.removeChild(document.getElementById("docModeLabel")),document.getElementById("documentModeAwarenessContainer").parentNode.removeChild(document.getElementById("documentModeAwarenessContainer")),document.getElementById("customDisplayInchesInfo").parentNode.removeChild(document.getElementById("customDisplayInchesInfo"))));this._model.propertyChanged.addHandler(function(n){(n===i.EmulationModel.OrientationProperty||n===i.EmulationModel.ResolutionProperty)&&f.updateView()});r.F12&&(Common.NavigationUtilities.registerNavigationFrames([Common.NavigationUtilities.makeNavigationFrameFromCallback(document.body,function(){return f._toolbar.getActiveElement()})]),Common.NavigationUtilities.registerFocusHandlers(r.F12.PluginId.Emulation));this._model.propertiesResolved.addHandler(function(){f._allowSavingSettings&&f.saveEmulationSettings()});this._model.documentModeOriginTooltip=u.DOCMODE_ORIGIN_LINK;r.F12&&this._model.settingsHaveBeenModifiedChanged.addHandler(function(n){return f.onSettingsHaveBeenModifiedChanged(n)});r.F12&&n.Tools.Emulation.SelfTest&&i.SelfTest.init(this);this.traceWriter.raiseEvent(602)}return Object.defineProperty(u.prototype,"traceWriter",{get:function(){return this._traceWriter},enumerable:!0,configurable:!0}),u.getBrowserModeFromString=function(n){if(n==="Desktop")return 0;if(n==="Mobile")return 1;if(n==="Enterprise")return 2;throw new Error("Got unexpected browser mode string: "+n)},u.buildDocumentModeInfoLink=function(n,t){return u.DOCMODE_INFO_LINK+"&url="+encodeURIComponent(n)+"&mode="+t},u.handshakeBrowserModeInfo=function(n,t){n._model.browserMode=u.getBrowserModeFromString(t);n._model.browserMode===2||r.F12&&r.F12.isEnterpriseModeMenuOptionEnabled()?n._model.browserModes=n._model.allBrowserModes:(n._model.browserModes=n._model.allBrowserModes.slice(0,2),n._model.browserMode===2&&(n._model.browserMode=0))},u.handshakeDocumentModeInfo=function(n,t){var e,f,o;for(u._defaultDocumentMode=t.defaultMode>u.EMULATION_MODE_MAX?u.EMULATION_MODE_EDGE:t.defaultMode.toString(),n._model.documentModes.clear(),e=0;e<u.EMULATION_MODES.length;++e)(f=u.EMULATION_MODES[e],n._model.browserMode===2&&parseInt(f.value,10)>u.EMULATION_ENTERPRISE_MODE_MAX)||((t.overrideMode===u._defaultDocumentMode||f.value!==u._defaultDocumentMode)&&n._model.documentModes.push({value:f.value,text:f.name}),f.value===u._defaultDocumentMode&&n._model.documentModes.push({value:i.EmulationModel.DEFAULT_VALUE,text:n.makeDefaultDocumentModeText(f.name)}));t.overrideMode!==null?(n._model.documentMode=t.overrideMode,n._model.documentModeInfo=n._model.documentMode,o=n._model.documentModeInfo):(n._model.documentMode=i.EmulationModel.DEFAULT_VALUE,n._model.documentModeInfo=u._defaultDocumentMode,o=u._defaultDocumentMode);r.F12&&r.F12.Header.notifyEmulationStateUpdated(n._model.settingsHaveBeenModified,u.getDocumentModeName(o));n._model.documentModeInfoLink=n.getCurrentDocumentModeInfoLink();n._model.documentModeOrigin=t.currentModeOrigin},u.getDocumentModeName=function(n){for(var t=0;t<u.EMULATION_MODES.length;t++)if(u.EMULATION_MODES[t].value===n)return u.EMULATION_MODES[t].name;return n},u.handshakeUserAgentStringInfo=function(n,t,i){var o=!1,c=i.filter(function(n){return n.category!=="custom"}),e,f,s,h;if(c.length===0){for(e=r.F12.isTargetEdge?u.EDGE_DEFAULT_UA_STRING:u.CLASSIC_DEFAULT_UA_STRING,f=0;f<u.EMULATION_UA_FALLBACK_STRINGS.length;f++)if(u.EMULATION_UA_FALLBACK_STRINGS[f].name===e){u.EMULATION_UA_FALLBACK_STRINGS.splice(f,1);break}i=i.concat(u.EMULATION_UA_FALLBACK_STRINGS);o=!0}for(e=r.F12.isTargetEdge?u.EDGE_DEFAULT_UA_STRING:u.CLASSIC_DEFAULT_UA_STRING,f=0;f<i.length;f++)if(i[f].name===e){i.splice(f,1);t.name===e&&(t.category="default");break}s=u.buildUserAgentStringItemsList(n,t,i);h=o&&!s&&t.category==="unknown";u.setupUserAgentStringModel(n,t,h)},u.buildUserAgentStringItemsList=function(n,t,f){var c,s,h,o,e;for(n._model.userAgentStrings.clear(),c=r.F12.isTargetEdge?u.EDGE_DEFAULT_UA_STRING:u.CLASSIC_DEFAULT_UA_STRING,n._model.userAgentStrings.push({value:i.EmulationModel.DEFAULT_VALUE,text:c+" ("+n.loadLocalizedString("EmulationDefault")+")"}),n._model.customUserAgentStrings.clear(),n._model.mobileUserAgentStrings=[],s=[],h=!1,o=0;o<f.length;++o)e=f[o],e.category==="custom"?s.push({text:e.value,date:e.name}):(t.value===f[o].value&&(h=!0),n._model.userAgentStrings.push({value:e.value,text:e.name}),(e.value.indexOf(u.IEMOBILE_UA_VALUE_SUBSTRING)>=0||e.name.toLowerCase().indexOf(u.PHONE_UA_NAME_SUBSTRING)>=0||e.name.toLowerCase().indexOf(u.MOBILE_UA_NAME_SUBSTRING)>=0)&&n._model.mobileUserAgentStrings.push(e.value));return n._model.userAgentStrings.push({value:i.EmulationModel.CUSTOM_VALUE,text:n.loadLocalizedString("EmulationCustom")}),n._model.customUserAgentStrings.resetItems(s.sort(function(n,t){return t.date.localeCompare(n.date)})),h},u.setupUserAgentStringModel=function(n,t,r){var u=n._model.userAgentString===i.EmulationModel.CUSTOM_VALUE;t.category==="custom"?(n._model.userAgentString=i.EmulationModel.CUSTOM_VALUE,n._model.customUserAgentString=t.value):u||(t.category==="default"||r?(n._model.userAgentString=i.EmulationModel.DEFAULT_VALUE,n._model.customUserAgentString=""):(n._model.userAgentString=t.value,n._model.customUserAgentString=""))},u.formatResolutionInfo=function(n){var i,t;return r.F12.isTargetEdge?t=n.width+" x "+n.height:(i=typeof n.displaySize=="number"?n.displaySize.toLocaleString():""+n.displaySize,t=i+'" '+n.width+" x "+n.height),t},u.prototype.onError=function(){},u.prototype.awaitRefreshHandshake=function(){var n=this;return new r.Promise(function(t){n._handshakeCallbacks.push(t)})},u.prototype.getInvariantNumberString=function(n){var t=r.Culture.NumberFormat;return t&&t.numberDecimalSeparator||(t={numberDecimalSeparator:"."}),n.replace(t.numberDecimalSeparator,".")},u.prototype.getCustomResolutionDisplaySize=function(){return this._displaySizeInput.text},u.prototype.setCustomResolutionDisplaySize=function(n,t){this._displaySizeInput.text=n;this._displaySizeInput.tryValidate();this.onCustomDisplayFieldsCommitted(t)},u.prototype.setGpsState=function(n,t,i){var r=n?t?1:2:t?3:0;this.onGeolocationStateChanged(r,i)},u.prototype.getGpsState=function(){if(this._model.geolocationState===0)return{enabled:!1,hasSignal:!1};if(this._model.geolocationState===1)return{enabled:!0,hasSignal:!0};if(this._model.geolocationState===2)return{enabled:!0,hasSignal:!1};throw new Error("Gps is set to an unknown state")},u.prototype.setGpsPosition=function(n,t,i){t!==null&&typeof t!="undefined"&&(this._model.gpsLatitude=t);i!==null&&typeof i!="undefined"&&(this._model.gpsLongitude=i);this.updateView();this.commitGpsCoordinates(n)},u.prototype.getGpsPosition=function(){return{latitude:this._model.gpsLatitude,longitude:this._model.gpsLongitude}},u.prototype.getIEGpsPosition=function(n){this._proxy.callRemote("getGpsPosition",[],n)},u.prototype.getDisplaySizeValidationInfo=function(){return this._displaySizeInput.getValidationInfo()},u.prototype.getDisplayWidthValidationInfo=function(){return this._displayWidthInput.getValidationInfo()},u.prototype.getDisplayHeightValidationInfo=function(){return this._displayHeightInput.getValidationInfo()},u.prototype.getGpsLatitudeValidationInfo=function(){return this._gpsLatitudeInput.getValidationInfo()},u.prototype.getGpsLongitudeValidationInfo=function(){return this._gpsLongitudeInput.getValidationInfo()},u.prototype.loadLocalizedString=function(n){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];return t&&t.length>0?Common.ToolWindowHelpers.loadString(n,t):Common.ToolWindowHelpers.loadString(n)},u.prototype.makeDefaultDocumentModeText=function(n){return n+" ("+this.loadLocalizedString("EmulationDefault")+")"},u.prototype.resetAllEmulationSettings=function(n){this._model.reset();this.updateView(6);this._proxy.callRemote("resetAllSettings",[],n)},u.prototype.getCurrentDocumentModeInfoLink=function(){return u.buildDocumentModeInfoLink(this._currentUrl,this._model.documentModeInfo)},u.prototype.setDocumentMode=function(n,t){for(var r,u=this._model.documentMode,i=0;i<this._model.documentModes.length;++i)r=this._model.documentModes.getItem(i),r.text===n&&(u=r.value);this._model.documentMode=u;this._remote.awaitRunningPromises().done(t)},u.prototype.getDocumentMode=function(){return this.getDocumentModeTextFromValue(this._model.documentMode)},u.prototype.getIEDocumentMode=function(n){var t=this;this._proxy.callRemote("getFullDocumentModeState",[],function(r){var u;u=r.overrideMode!==null?r.overrideMode:i.EmulationModel.DEFAULT_VALUE;n(t.getDocumentModeTextFromValue(u))})},u.prototype.getIEDefaultDocumentMode=function(n){this._proxy.callRemote("getDefaultDocumentMode",[],function(t){n(""+t)})},u.prototype.getDocumentModeOriginString=function(){return this._model.documentModeOrigin},u.prototype.getDocumentModeOriginLink=function(){return this._model.documentModeOriginTooltip},u.prototype.setBrowserMode=function(n,t){for(var r=!1,u,i=0;i<this._model.browserModes.length;++i)this._model.browserModes[i].text===n&&(u=this._model.browserModes[i].value,r=!0);if(!r)throw new Error("Unknown browser mode value");this._model.browserMode=u;this._remote.awaitRunningPromises().done(t)},u.prototype.getBrowserMode=function(){return this._model.browserModes[this._model.browserMode].text},u.prototype.getIEBrowserMode=function(n){var t=this;this._proxy.callRemote("getBrowserMode",[],function(i){var r=u.getBrowserModeFromString(i),f=t._model.browserModes[r].text;n(f)})},u.prototype.setUserAgentString=function(n,t){var o=this,r,u,i,f,e;for(n=this.sanitizeString(n),r=!1,i=0;i<this._model.userAgentStrings.length;++i)f=this._model.userAgentStrings.getItem(i),f.text===n&&(u=f.value,r=!0);if(!r)throw new Error("Unknown user agent string value");e=this._model.userAgentString!==u;this._model.userAgentString=u;e?this._remote.awaitRunningPromises().then(function(){o.fireHandshakeCallbacks()}).done(t):(this.fireHandshakeCallbacks(),t())},u.prototype.getUserAgentString=function(){return this.getUADisplayStringFromUAString(this._model.userAgentString)},u.prototype.getIEUserAgentString=function(n){var t=this;this._proxy.callRemote("getCurrentUserAgentString",[],function(i){n(t.getUADisplayStringFromUAString(i))})},u.prototype.getAllIEUserAgentStrings=function(n){this._proxy.callRemote("getAllUserAgentStrings",[],function(t){n(t)})},u.prototype.setCustomUserAgentString=function(n,t){var i=this;this._model.customUserAgentString=n;this._remote.awaitRunningPromises().then(function(){i.fireHandshakeCallbacks()}).done(t)},u.prototype.deleteCustomUserAgentString=function(n,t){var i=this;this._model.customUserAgentString=n;this._remote.awaitRunningPromises().done(function(){i.onRemoveCustomUserAgentString(t)})},u.prototype.getCustomUserAgentString=function(){return this._model.customUserAgentString},u.prototype.setOrientation=function(n,t){for(var u,r=2,i=0;i<this._model.orientations.length;++i)if(this._model.orientations.getItem(i).text.localeCompare(n)===0){r=this._model.orientations.getItem(i).value;break}u=this._model.orientation!==r;this._model.orientation=r;u?this._remote.awaitRunningPromises().done(t):t()},u.prototype.getOrientation=function(){for(var n=0;n<this._model.orientations.length;++n)if(this._model.orientation===this._model.orientations.getItem(n).value)return this._model.orientations.getItem(n).text;return"unknown"},u.prototype.getIEOrientation=function(n){this._proxy.callRemote("getOrientation",[],function(t){n(t)})},u.prototype.getResolutionList=function(){return this._config.categories.resolution.map(function(n){return{displayString:u.formatResolutionInfo(n),width:n.width,height:n.height}})},u.prototype.setResolution=function(n,t){for(var u,r,i=0;i<this._model.resolutions.length;++i)this._model.resolutions.getItem(i).text.localeCompare(n)===0&&(r=this._model.resolutions.getItem(i).value);u=this._model.resolution!==r;this._model.resolution=r;u?this._remote.awaitRunningPromises().done(t):t()},u.prototype.getResolution=function(){for(var t,n=0;n<this._model.resolutions.length;++n)this._model.resolutions.getItem(n).value.localeCompare(this._model.resolution)===0&&(t=this._model.resolutions.getItem(n).text);return t},u.prototype.getIEResolution=function(n){this._proxy.callRemote("getResolution",[],function(t){n(t)})},u.prototype.getCustomResolutionWidth=function(){return this._displayWidthInput.text},u.prototype.getCustomResolutionHeight=function(){return this._displayHeightInput.text},u.prototype.setCustomResolutionWidth=function(n,t){this._displayWidthInput.text=n;this._displayWidthInput.tryValidate();this.onCustomDisplayFieldsCommitted(t)},u.prototype.setCustomResolutionHeight=function(n,t){this._displayHeightInput.text=n;this._displayHeightInput.tryValidate();this.onCustomDisplayFieldsCommitted(t)},u.prototype.initializeModel=function(){this._remote.eventsShouldFire=!1;this._model=new i.EmulationModel(this._remote,this._config);this._model.allBrowserModes=[];this._model.allBrowserModes[0]={value:0,text:this.loadLocalizedString("EmulationModesDesktopMode")};r.F12.isTargetEdge?this._model.allBrowserModes[1]={value:1,text:this.loadLocalizedString("EmulationModesPhoneModeEdge")}:(this._model.allBrowserModes[1]={value:1,text:this.loadLocalizedString("EmulationModesPhoneMode")},this._model.allBrowserModes[2]={value:2,text:this.loadLocalizedString("EmulationModesEnterpriseMode")});this._model.orientation=0;var n=[];n[0]={value:0,text:this.loadLocalizedString("EmulationOrientationLandscape")};n[1]={value:1,text:this.loadLocalizedString("EmulationOrientationPortrait")};this._model.orientations.resetItems(n);this._model.resolution=i.EmulationModel.DEFAULT_VALUE;this._model.resolutions.clear();this._model.geolocationState=0;this._model.gpsLatitude=this._config.categories.simulateGPS.off.latitude;this._model.gpsLongitude=this._config.categories.simulateGPS.off.longitude;this._remote.eventsShouldFire=!0},u.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()},u.prototype.localizeAllLabels=function(){for(var f,t,e,o,s,h,c,n=0;n<this._localizedControlInfo.length;++n)f=this._localizedControlInfo[n],this.localizeControl(f.controlId,f.stringId,f.labeledElement,f.describerElementId);for(t=[],this._model.mobileResolutions=[],n=0;n<this._config.categories.resolution.length;++n)e=this._config.categories.resolution[n],o=u.formatResolutionInfo(e),t.push({text:o,value:o,info:e}),e.displaySize<u.MAX_MOBILE_SCREEN_SIZE&&this._model.mobileResolutions.push(o);if(r.F12.isTargetEdge){for(s={},h=[],n=0;n<t.length;++n)s[t[n].text]=t[n];for(c in s)h.push(s[c]);t=h.sort(function(n,t){return n.info.width-t.info.width})}t.splice(0,0,{value:i.EmulationModel.DEFAULT_VALUE,text:this.loadLocalizedString("EmulationDefault")});t.push({value:i.EmulationModel.CUSTOM_VALUE,text:this.loadLocalizedString("EmulationCustom")});this._model.resolutions.resetItems(t)},u.prototype.localizeControl=function(n,t,i,r){var u=this.loadLocalizedString(t);n!==""&&(document.getElementById(n).innerText=u);typeof i!="undefined"&&(n!==""?i.setAttribute("aria-labelledby",n):i.setAttribute("aria-label",u));typeof r!="undefined"&&i.setAttribute("aria-describedby",r)},u.prototype.ensureValueIsNumber=function(n){if(typeof n=="string")return parseInt(n,10);if(typeof n=="number")return n;throw new Error("Only strings and numbers are supported as arguments")},u.prototype.getStringFromBrowserMode=function(n){if(n===0)return"Desktop";if(n===1)return"Mobile";if(n===2)return"Enterprise";throw new Error("Got unknown browser mode value")},u.prototype.onDocumentModeInfoClicked=function(){r.F12.openBrowser(this.getCurrentDocumentModeInfoLink())},u.prototype.onDocumentModeOriginClicked=function(){r.F12.openBrowser(this._model.documentModeOriginTooltip)},u.prototype.onRemoveCustomUserAgentString=function(n){var t=this,i=this._model.customUserAgentString;this._model.customUserAgentString="";this._remote.awaitRunningPromises().done(function(){t._proxy.callRemote("removeCustomUserAgentString",[i,t._remote.shouldPerformRefreshes],function(i){t._model.customUserAgentStrings.resetItems(i.map(function(n){return{text:n.value,date:n.name}}));t.updateView();n&&n()})})},u.prototype.displayWidthHasValidValue=function(){return this._displayWidthInput.validationStatus===1&&this._displayWidthInput.text!==""},u.prototype.displayHeightHasValidValue=function(){return this._displayHeightInput.validationStatus===1&&this._displayHeightInput.text!==""},u.prototype.displayWidthAndHeightHaveValidValues=function(){return this.displayWidthHasValidValue()&&this.displayHeightHasValidValue()?!0:!1},u.prototype.validateDisplaySize=function(n){if(n==="")return{status:1,tooltip:""};var r=this.getInvariantNumberString(n),t=parseFloat(r);return isNaN(t)?{status:2,tooltip:this.loadLocalizedString("EmulationNonNumericValueError")}:t>i.EmulationModel.MAX_VIEWPORT_DISPLAY_SIZE?{status:2,tooltip:this.loadLocalizedString("EmulationLargeDisplaySizeError",i.EmulationModel.MAX_VIEWPORT_DISPLAY_SIZE)}:t>0?this.displayWidthAndHeightHaveValidValues()?{status:1,tooltip:"",validatedValue:t}:{status:2,tooltip:this.loadLocalizedString("EmulationNoResolutionError")}:{status:2,tooltip:this.loadLocalizedString("EmulationResolutionLessThanZeroError")}},u.prototype.validateDisplayDimension=function(n,t,i){if(n==="")return{status:1,tooltip:""};var r=parseInt(n,10);return isNaN(r)?{status:2,tooltip:this.loadLocalizedString("EmulationInvalidValueResolutionError")}:r>t?{status:2,tooltip:this.loadLocalizedString(i,t)}:r>0?{status:1,tooltip:"",validatedValue:r}:{status:2,tooltip:this.loadLocalizedString("EmulationResolutionLessThanZeroError")}},u.prototype.onDisplayDimensionValidationFailure=function(){this._displaySizeInput.tryValidate()},u.prototype.getStringFromOrientation=function(n){if(n===0)return"landscape";if(n===1)return"portrait";throw new Error("Got unknown orientation value")},u.prototype.onCustomDisplayFieldsCommitted=function(n){var t=this.getStringFromOrientation(this._model.orientation),i;this.displayWidthAndHeightHaveValidValues()?(i=this._displaySizeInput.tryValidate(),i?this._displaySizeInput.validatedValue?this._proxy.callRemote("setViewportSize",[this._displaySizeInput.validatedValue,this._displayWidthInput.validatedValue,this._displayHeightInput.validatedValue,t],n):this._proxy.callRemote("setViewportWidthAndHeight",[this._displayWidthInput.validatedValue,this._displayHeightInput.validatedValue,t],n):n&&n()):(i=this._displaySizeInput.tryValidate(),i?this.displayWidthHasValidValue()?this._proxy.callRemote("setViewportWidth",[this._displayWidthInput.validatedValue,t],n):this.displayHeightHasValidValue()?this._proxy.callRemote("setViewportHeight",[this._displayHeightInput.validatedValue,t],n):n&&n():n&&n());this._model.resolutionDisplaySize=this._displaySizeInput.validatedValue;this._model.resolutionWidth=this._displayWidthInput.validatedValue;this._model.resolutionHeight=this._displayHeightInput.validatedValue},u.prototype.onGeolocationStateChanged=function(i,r){this._model.geolocationState=i;var u=this._config.categories.simulateGPS.off;i===0?(n.Tools.Emulation.Telemetry.analytics.logExecuteCommand(n.Tools.Emulation.Telemetry.CommandName.GPS_OFF,0),u=this._config.categories.simulateGPS.off):i===1?(n.Tools.Emulation.Telemetry.analytics.logExecuteCommand(n.Tools.Emulation.Telemetry.CommandName.GPS_ON,0),u=this._config.categories.simulateGPS.on):i===2?(n.Tools.Emulation.Telemetry.analytics.logExecuteCommand(n.Tools.Emulation.Telemetry.CommandName.GPS_NO_SIGNAL,0),u=this._config.categories.simulateGPS.onWithNoSignal):t.Utility.Assert.fail("Geolocation is set to an invalid state");this.setGpsCoordinates(u.latitude,u.longitude,r)},u.prototype.validateCoordinate=function(n,t,i,r){if(n==="")return{status:1,tooltip:""};var f=this.getInvariantNumberString(n),u=parseFloat(f);return isNaN(u)?{status:2,tooltip:this.loadLocalizedString("EmulationNonNumericValueError")}:u>=t&&u<=i?{status:1,tooltip:"",validatedValue:u}:{status:2,tooltip:this.loadLocalizedString(r)}},u.prototype.onLatitudeCommitted=function(n){this._model.gpsLatitude=n;this.commitGpsCoordinates()},u.prototype.onLongitudeCommitted=function(n){this._model.gpsLongitude=n;this.commitGpsCoordinates()},u.prototype.commitGpsCoordinates=function(n){if(this._model.geolocationState===0)this._proxy.callRemote("clearGpsSettings",[],n),n=null;else{var t=this._model.geolocationState===1;this._gpsLatitudeInput.validationStatus===1&&this._gpsLongitudeInput.validationStatus===1?typeof this._model.gpsLatitude!="undefined"&&this._model.gpsLatitude!==null?typeof this._model.gpsLongitude!="undefined"&&this._model.gpsLongitude!==null?(this._proxy.callRemote("setGpsPosition",[this._model.gpsLatitude,this._model.gpsLongitude,t],n),n=null):(this._proxy.callRemote("setGpsLatitude",[this._model.gpsLatitude,t],n),n=null):typeof this._model.gpsLongitude!="undefined"&&this._model.gpsLongitude!==null&&(this._proxy.callRemote("setGpsLongitude",[this._model.gpsLongitude,t],n),n=null):this._proxy.callRemote("setGpsHasSignal",[t],n)}n&&n()},u.prototype.setGpsCoordinates=function(n,t,i){this._model.gpsLatitude=n;this._model.gpsLongitude=t;this.updateView();this.commitGpsCoordinates(i)},u.prototype.updateView=function(n){n===void 0&&(n=i.ViewUpdateFlags.All);(n&2)==2&&(this._model.resolution===i.EmulationModel.CUSTOM_VALUE?this._customDisplaySizeContainer.rootElement.style.display="block":(this._customDisplaySizeContainer.rootElement.style.display="none",this._displaySizeInput.text="",this._displayWidthInput.text="",this._displayHeightInput.text=""));(n&4)==4&&(this._model.geolocationState===0?(this._gpsLatitudeInput.disabled=!0,this._gpsLongitudeInput.disabled=!0,this._geolocationOffButton.checked=!0):(this._gpsLatitudeInput.disabled=!1,this._gpsLongitudeInput.disabled=!1,this._model.geolocationState===1?this._geolocationOnButton.checked=!0:this._geolocationOnNoSignalButton.checked=!0),this._gpsLatitudeInput.text=this._model.gpsLatitude!==null&&typeof this._model.gpsLatitude!="undefined"?this._model.gpsLatitude.toString():"",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():"",this._gpsLongitudeInput.tryValidate()&&(this._model.gpsLongitude=this._gpsLongitudeInput.validatedValue))},u.prototype.onAttach=function(){this._isInitialHandshake=!0;this._model.isAtBreakpoint=r.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(n){return}},u.prototype.onDetach=function(){this._allowSavingSettings=!1;this._remote.eventsShouldFire=!1;this._model.isAtBreakpoint=!1;this._remote.clearPromises();this.fireHandshakeCallbacks();this._currentUrl="";this._model.reset();this._remote.eventsShouldFire=!0},u.prototype.onBreak=function(){this._model.isAtBreakpoint=!0},u.prototype.onRun=function(){this._model.isAtBreakpoint=!1},u.prototype.onMessage=function(t){var i,u;if(window.msWriteProfilerMark("ConsoleWindow:BeginOnMessage"),t.data.substr(0,10)==="Handshake:"){i=JSON.parse(t.data.substring(10));this.onHandshake(i);this.fireHandshakeCallbacks();this._hasHandshakeFired=!0;r.F12&&(r.F12.TraceWriter.markToolReady(),u={toolName:Common.ToolName.EMULATION,durationMs:Date.now()-this._telemetryLoadStartTime},n.Tools.Emulation.Telemetry.analytics.log(Common.TelemetryEventName.TOOL_LOADED,u,2),window.setImmediate(function(){r.F12.notifyOnToolActivated()}));Common.ToolWindowHelpers.codeMarker(Common.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsConsoleReady)}else this._proxy.fireCallbacks(t.data);window.msWriteProfilerMark("ConsoleWindow:EndOnMessage")},u.prototype.fireHandshakeCallbacks=function(){var t=this._handshakeCallbacks,n;for(this._handshakeCallbacks=[],n=0;n<t.length;++n)t[n]()},u.prototype.onHandshake=function(n){var f=this,t,e,i;this._allowSavingSettings=!1;t=!1;this._isInitialHandshake?(this._isInitialHandshake=!1,t=!0):(this._displaySizeInput.commitEdits(),this._displayWidthInput.commitEdits(),this._displayHeightInput.commitEdits(),this._gpsLatitudeInput.commitEdits(),this._gpsLongitudeInput.commitEdits());e=this._currentUrl!==n.currentUrl;this._currentUrl=n.currentUrl;u.handshakeBrowserModeInfo(this,n.currentBrowserMode);u.handshakeDocumentModeInfo(this,n.documentModeState);u.handshakeUserAgentStringInfo(this,n.currentUserAgentString,n.allUserAgentStrings);i=t?this.readEmulationSettings():r.Promise.as({});i.done(function(){f.updateView()});this._allowSavingSettings=!0},u.prototype.saveEmulationSettings=function(){r.Settings.set(u.EMULATION_SETTINGS_FILE,this._model.save())},u.prototype.loadEmulationSettings=function(){return new r.Promise(function(n){r.Settings.get(u.EMULATION_SETTINGS_FILE).done(function(t){n(t)},function(){n({})})},null)},u.prototype.readEmulationSettings=function(){var n=this;return this._allowSavingSettings=!1,this.loadEmulationSettings().then(function(t){if(n._model.load(t),n._model.resolution===i.EmulationModel.CUSTOM_VALUE){var r=[];n._model.resolutionDisplaySize&&(n._displaySizeInput.text=""+n._model.resolutionDisplaySize,r.push(function(){return n._displaySizeInput.tryValidate()}));n._model.resolutionWidth&&(n._displayWidthInput.text=""+n._model.resolutionWidth,r.push(function(){return n._displayWidthInput.tryValidate()}));n._model.resolutionHeight&&(n._displayHeightInput.text=""+n._model.resolutionHeight,r.push(function(){return n._displayHeightInput.tryValidate()}));r.forEach(function(n){return n()})}n.commitGpsCoordinates();n.updateView();n._allowSavingSettings=!0})},u.prototype.onGetEmulationQuickAccessMenuItems=function(){var n=this;return this._model.documentModes.map(function(t){return{id:t.value,label:t.text,type:0,checked:t.value===n._model.documentMode}})},u.prototype.onSetEmulationDocMode=function(n){var i=JSON.parse(n),t,r;if(this._model.documentMode!==i&&this.awaitRefreshHandshake(),this._model.documentMode=i,t=this._model.documentModes.map(function(n){return n.value}).indexOf(this._model.documentMode),t>=0){r=this._model.documentModes.getItem(t);this.onSettingsHaveBeenModifiedChanged(!0);return!0}return!1},u.prototype.getDocumentModeTextFromValue=function(n){for(var i,r="Invalid",t=0;t<this._model.documentModes.length;++t)i=this._model.documentModes.getItem(t),i.value===n&&(r=i.text);return r},u.prototype.getUADisplayStringFromUAString=function(n){var i,t,r;for(n=this.sanitizeString(n),t=0;t<this._model.userAgentStrings.length;++t)if(i=this._model.userAgentStrings.getItem(t),i.value===n)return i.text;for(t=0;t<this._model.customUserAgentStrings.length;++t)if(r=this._model.customUserAgentStrings.getItem(t),r.text===n)return r.text;return this._model.userAgentStrings.getItem(0).text},u.prototype.sanitizeString=function(n){var t=n.indexOf("\0");return t>=0?n.substr(0,t):n},u.prototype.onSettingsHaveBeenModifiedChanged=function(){var n;n=this._model.documentMode==i.EmulationModel.DEFAULT_VALUE?u._defaultDocumentMode:this._model.documentMode;r.F12.Header.notifyEmulationStateUpdated(this._model.settingsHaveBeenModified,u.getDocumentModeName(n))},u.FWLINK_PREFIX="http://go.microsoft.com/fwlink/?LinkID=",u.DOCMODE_INFO_LINK=u.FWLINK_PREFIX+"286288",u.DOCMODE_ORIGIN_LINK=u.FWLINK_PREFIX+"389082",u.IEMOBILE_UA_VALUE_SUBSTRING="IEMobile",u.PHONE_UA_NAME_SUBSTRING="phone",u.MOBILE_UA_NAME_SUBSTRING="mobile",u.CLASSIC_DEFAULT_UA_STRING="Internet Explorer 11",u.EDGE_DEFAULT_UA_STRING="Microsoft Edge",u.MAX_MOBILE_SCREEN_SIZE=5,u.EMULATION_MODE_MAX=11,u.EMULATION_ENTERPRISE_MODE_MAX=8,u.EMULATION_SETTINGS_FILE="EmulationSettings.json",u.EMULATION_MODE_EDGE="Edge",u.EMULATION_MODES=[{name:"11",value:"11"},{name:"10",value:"10"},{name:"9",value:"9"},{name:"8",value:"8"},{name:"7",value:"7"},{name:"5",value:"5"}],u.EMULATION_UA_FALLBACK_STRINGS=[{category:"desktop",name:"Microsoft Edge",value:"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0"},{category:"non-desktop",name:"Microsoft Edge - Windows 10 Mobile",value:"Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Nokia; Lumia 520) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Mobile Safari/537.36 Edge/12.0"},{category:"desktop",name:"Internet Explorer 11",value:"Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko"},{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:"Internet Explorer 11 - Windows Phone 8.1 Update",value:"Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 520) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537"},{category:"non-desktop",name:"Internet Explorer 10 - 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:"Internet Explorer 9 - 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:"Internet Explorer - Xbox One",value:"Mozilla/5.0(compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0; Xbox; Xbox One)"},{category:"non-desktop",name:"Internet Explorer - 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)"}],u}();i.EmulationWindow=u})(i=t.Emulation||(t.Emulation={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(i){function r(){i.apply(this,arguments)}return __extends(r,i),r.prototype.onStartup=function(){var i=this;t.addEventListener("pluginready",function(){Plugin&&t.Tooltip&&(t.Tooltip.defaultTooltipContentToHTML=!1);i.emulation=new n.EmulationWindow(i.diagnosticsBridge);i.onEmulationAppLoaded&&i.onEmulationAppLoaded()});Common.ErrorHandling.addPromiseErrorListener()},r}(Common.App);n.EmulationApp=i;n.App=new i})(t=n.Emulation||(n.Emulation={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}))
//# sourceMappingURL=EmulationMerged.min.js.map
{
    "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
ߔsRGB��, cHRMz&�����u0�`:�p��Q<	pHYs���IDATxڽ��A��ڶm�Q�����m+8��mPۈնq���M�y�z�v�_f���;�\�s�0j�5�c���h��N�r�Mx�pK��k�-�!.�b��	��s����Ip�!F���8��o}�^V�!��ѓǼϐ�Yy�53O��O�z��'hol��3U�ǪQ������x��2z%��N��*�|t�A�,��(��m��.X�¯�Ujn(x�s��%՞��·xU
��bp�M�gZ�\����윊V�zH�ةF@����!?xZ_v|��� �ۧ4���`�
�Lu�P�)A;�T�FcU�����%Pp�
*���`��`\
s0EUL��0_���"�
C0����q����.��nMS�������62f�]P)����h
Q�_S��?Cʜ�i{�)^���c
��YyCSLB��=2�7�A�k7_��H��IEND�B`��PNG


IHDR$l�	pHYs���+�IDATx��+��0���rx�#s�O^�B���r~w{���#s�������ӝV��)괒���~읈��5�B�{^^^�"J�3x�� s�7�/"��eU�P�HhB=(	���V<��R}�J��A�
�g%�-�PS;�s�|n�I���8�����M����7*�w~��:�6ۗ[	���zT��9C�3d��2�J�l❾����k1;��}�/����1bv2�~PNt��oY�#+�BћPr d�ܞP�v��BB݅�P�B?~�����U2��y�"B|PV%)���&ԃ��Jh��3}.�W+���$+�PpV"޲A05�c�| g�����<��ߤ8��}3�Bx�7�Cj�}���lAO�GE�3�?C6�,���
�!��k1۩Y���L��B֧���������r��mo��Y1�ބ���Y}ˤ%�.ԅ���u�.ԅ~���Q�
A�2o�_D�ʪ$%�6�ЄzP~?X	�4x�ϥ�j%�9�d%
�J�[6f��v,��l��>�Pc5q�|7���]�o&T�&CuHm�/��
b!�	���s��g�~�e���U��>�;}=f;5	Wcv��_������1bv2�~PNt��nY��#+�BћP�!�/�o���]���P-��a��Kr]IEND�B`��PNG


IHDR$l�	pHYs���+�IDATx���)��0��rd��r��Io�B�‰9
��Q82G����J������H�"�rl��/j�T4@W��_9>|�0��v�w� v�e�a1������6�T ��j3�" x�[ � �DT�����o�,��R�s��
�\g�M'�Y@�u�
��ү�s1A�vW$�o��	Z�W�b(��eH(q��T�=����.)Az1:��A�m�3��(ق�q�>��7uf_��a�qB�$�sқ�hf%�Θ���Wd�(^������
ħzA���ߡ�4@4@4@���>��v�w� �sh?�xZ�^hCN�+Ϩ603*�WP��2LDU��;�z���B��+�:wʫ@�u��t��[�@���ع���
�+ʷ~y���?�_V��҅��y�%�.�������1��=�h|��9H7�h��F�ԙ}�{�� Nș��A���#ͬ$�}����ū�O[>��a���^��c���;�}��eB��hA^:.��~�p�І�
DW�Qm`fT��p�d�����w@����m��aW*u�W���,����=(��Q�:q��s1A�~W�o��	��1����� ���p�?O�a� =��H���6�G�{��A¸��Dc�6�����cqB�$��if%�Θ���Wd�(^����c��(L���{����s��4�g_IEND�B`�{
    "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(n){"use strict";var t;(function(n){var t;(function(n){var i=function(){function n(){}return n.prototype.initialize=function(){var n=this;try{typeof browser!="undefined"&&browser.addEventListener("beforeScriptExecute",function(t){return n.onBeforeScriptExecute(t)})}catch(t){}this._browserModeIsDirty=!1;this._documentModeIsDirty=!1;this._userAgentStringIsDirty=!1;remoteHelpers.initialize("EmulationPort",function(){return n.initializePage()},"__BROWSERTOOLS_EMULATIONTOOLS_ADDED",function(){return n.onDetach()})},n.prototype.initializePage=function(){var i,n,r,u,t;try{if(i=Common.RemoteHelpers.getDefaultView(browser.document),this.addRemotePageFunctions(i),n={},n.currentBrowserMode=this.getBrowserMode(),n.documentModeState=this.getFullDocumentModeState(),n.allUserAgentStrings=this.getAllUserAgentStrings(),n.currentUrl=i.location.href,r=this.getCurrentUserAgentString(),u=n.allUserAgentStrings.filter(function(n){return n.category!=="custom"}),u.length>0){for(t=0;t<n.allUserAgentStrings.length;++t)if(r.localeCompare(n.allUserAgentStrings[t].value)===0){n.currentUserAgentString=n.allUserAgentStrings[t];break}n.currentUserAgentString||(n.currentUserAgentString={category:"default",name:"",value:""})}else n.currentUserAgentString={category:"unknown",name:"unknown",value:r};try{remoteHelpers.port.postMessage("Handshake:"+JSON.stringify(n))}catch(f){return}}catch(f){}},n.prototype.onBeforeScriptExecute=function(n){n&&n.browserOrWindow&&(n=n.browserOrWindow);var t;try{t=Common.RemoteHelpers.getDefaultView(n.document)}catch(i){return}t===Common.RemoteHelpers.getDefaultView(browser.document)&&remoteHelpers.port&&(remoteHelpers.postAllMessages(),this.initializePage())},n.prototype.addRemotePageFunctions=function(n){n.__BROWSERTOOLS_EMULATIONTOOLS_ADDED=browser.createSafeFunction(n,function(){})},n.prototype.onDetach=function(){try{var n=Common.RemoteHelpers.getDefaultView(browser.document);n.__BROWSERTOOLS_EMULATIONTOOLS_ADDED&&delete n.__BROWSERTOOLS_EMULATIONTOOLS_ADDED}catch(t){}this.resetAllSettings()},n.prototype.resetAllSettings=function(){emulation.viewport.restoreOriginalSettings();emulation.geoLocation.clearAll();this._documentModeIsDirty&&(browser.forceEdgeModeDocumentFamily=!1,browser.documentModeOverride=null);this._userAgentStringIsDirty&&emulation.userAgentStringManager.setCurrentToDefault();var n=(this._documentModeIsDirty||this._userAgentStringIsDirty)&&!this._browserModeIsDirty;this._documentModeIsDirty=!1;this._userAgentStringIsDirty=!1;this._browserModeIsDirty?(this._browserModeIsDirty=!1,emulation.setBrowserMode("default")):n&&this.safeRefresh()},n.prototype.getBrowserMode=function(){return browser.browserMode},n.prototype.setBrowserMode=function(n){this._browserModeIsDirty=!0;emulation.setBrowserMode(n)},n.prototype.getDocumentMode=function(){var n=browser.documentMode;return browser.documentMode===0&&(n=browser.defaultDocumentMode),n/1e4},n.prototype.getDefaultDocumentMode=function(){return browser.defaultDocumentMode/1e4},n.prototype.getForceEdgeModeDocumentFamily=function(){return!!browser.forceEdgeModeDocumentFamily},n.prototype.getDocumentModeOverride=function(){return browser.documentModeOverride},n.prototype.getFullDocumentModeState=function(){return{currentMode:browser.documentMode/1e4,defaultMode:browser.defaultDocumentMode/1e4,forceEdge:!!browser.forceEdgeModeDocumentFamily,overrideMode:browser.documentModeOverride,currentModeOrigin:browser.documentModeOrigin||""}},n.prototype.setForceEdgeModeDocumentFamily=function(n,t){this._documentModeIsDirty=!0;browser.forceEdgeModeDocumentFamily=n;t&&this.safeRefresh()},n.prototype.setDocumentModeOverride=function(n,t){this._documentModeIsDirty=!0;browser.documentModeOverride=n;t&&this.safeRefresh()},n.prototype.getAllUserAgentStrings=function(){try{return emulation.userAgentStringManager.all}catch(n){return[]}},n.prototype.setCurrentUserAgentString=function(n,t){this._userAgentStringIsDirty=!0;emulation.userAgentStringManager.current=n;t&&this.safeRefresh()},n.prototype.getCurrentUserAgentString=function(){return emulation.userAgentStringManager.current},n.prototype.setUserAgentStringToDefault=function(n){this._userAgentStringIsDirty=!1;emulation.userAgentStringManager.setCurrentToDefault();n&&this.safeRefresh()},n.prototype.storeAndSetCustomUserAgentString=function(n,t){var i=this.getCustomUserAgentStrings(),u,e,f,r;for(i=i.sort(function(n,t){return n.name.localeCompare(t.name)}),u=-1,r=0;r<i.length;++r)if(i[r].value===n){u=r;break}for(u>=0&&(e=i.splice(u,1),emulation.userAgentStringManager.removeCustom(e[0].name)),f={name:""+Date.now(),category:"custom",value:n},i.push(f),emulation.userAgentStringManager.addCustom(f.name,f.value),i=i.reverse(),r=10;r<i.length;++r)emulation.userAgentStringManager.removeCustom(i[r].name);this.setCurrentUserAgentString(n,t)},n.prototype.removeCustomUserAgentString=function(n){for(var i=this.getCustomUserAgentStrings(),t=0;t<i.length;++t)if(i[t].value===n){emulation.userAgentStringManager.removeCustom(i[t].name);break}},n.prototype.getCustomUserAgentStrings=function(){return this.getAllUserAgentStrings().filter(function(n){return n.category==="custom"})},n.prototype.setViewportSize=function(n,t,i){emulation.viewport.setDimensions(null,t,i)},n.prototype.setViewportWidth=function(n){emulation.viewport.widthInPx=n},n.prototype.setViewportHeight=function(n){emulation.viewport.heightInPx=n},n.prototype.resetViewportSizeToDefault=function(){emulation.viewport.restoreOriginalSettings()},n.prototype.getOrientation=function(){return emulation.viewport.orientation},n.prototype.setOrientation=function(n){emulation.viewport.orientation=n},n.prototype.getResolution=function(){return{width:emulation.viewport.widthInPx,height:emulation.viewport.heightInPx}},n.prototype.setGpsLatitude=function(n){emulation.geoLocation.latitude=n},n.prototype.setGpsLongitude=function(n){emulation.geoLocation.longitude=n},n.prototype.setGpsPosition=function(n,t){emulation.geoLocation.setPosition(n,t,6.275,2,2,0,0)},n.prototype.setGpsHasSignal=function(n){emulation.geoLocation.hasSignal=n},n.prototype.getGpsPosition=function(){return{latitude:emulation.geoLocation.latitude,longitude:emulation.geoLocation.longitude}},n.prototype.clearGpsSettings=function(){emulation.geoLocation.clearAll()},n.prototype.safeRefresh=function(){try{browser.refresh()}catch(n){}},n}(),t;n.RemoteEmulation=i;t=function(){function t(){}return t.prototype.resetAllSettings=function(){n.EmulationRemoteApp.remoteCode.resetAllSettings()},t.prototype.getBrowserMode=function(){return n.EmulationRemoteApp.remoteCode.getBrowserMode()},t.prototype.setBrowserMode=function(t){n.EmulationRemoteApp.remoteCode.setBrowserMode(t)},t.prototype.getDocumentMode=function(){return n.EmulationRemoteApp.remoteCode.getDocumentMode()},t.prototype.getDefaultDocumentMode=function(){return n.EmulationRemoteApp.remoteCode.getDefaultDocumentMode()},t.prototype.getForceEdgeModeDocumentFamily=function(){return n.EmulationRemoteApp.remoteCode.getForceEdgeModeDocumentFamily()},t.prototype.getDocumentModeOverride=function(){return n.EmulationRemoteApp.remoteCode.getDocumentModeOverride()},t.prototype.getFullDocumentModeState=function(){return n.EmulationRemoteApp.remoteCode.getFullDocumentModeState()},t.prototype.setForceEdgeModeDocumentFamily=function(t,i){n.EmulationRemoteApp.remoteCode.setForceEdgeModeDocumentFamily(t,i)},t.prototype.setDocumentModeOverride=function(t,i){n.EmulationRemoteApp.remoteCode.setDocumentModeOverride(t,i)},t.prototype.getAllUserAgentStrings=function(){return n.EmulationRemoteApp.remoteCode.getAllUserAgentStrings()},t.prototype.setCurrentUserAgentString=function(t,i){n.EmulationRemoteApp.remoteCode.setCurrentUserAgentString(t,i)},t.prototype.getCurrentUserAgentString=function(){return n.EmulationRemoteApp.remoteCode.getCurrentUserAgentString()},t.prototype.setUserAgentStringToDefault=function(t){n.EmulationRemoteApp.remoteCode.setUserAgentStringToDefault(t)},t.prototype.storeAndSetCustomUserAgentString=function(t,i){return n.EmulationRemoteApp.remoteCode.storeAndSetCustomUserAgentString(t,i),n.EmulationRemoteApp.remoteCode.getCustomUserAgentStrings()},t.prototype.removeCustomUserAgentString=function(t,i){return n.EmulationRemoteApp.remoteCode.removeCustomUserAgentString(t),n.EmulationRemoteApp.remoteCode.setUserAgentStringToDefault(i),n.EmulationRemoteApp.remoteCode.getCustomUserAgentStrings()},t.prototype.setViewportSize=function(t,i,r,u){n.EmulationRemoteApp.remoteCode.setViewportSize(t,i,r);u&&n.EmulationRemoteApp.remoteCode.setOrientation(u)},t.prototype.setViewportWidthAndHeight=function(t,i,r){n.EmulationRemoteApp.remoteCode.resetViewportSizeToDefault();n.EmulationRemoteApp.remoteCode.setViewportWidth(t);n.EmulationRemoteApp.remoteCode.setViewportHeight(i);n.EmulationRemoteApp.remoteCode.setOrientation(r)},t.prototype.setViewportWidth=function(t,i){n.EmulationRemoteApp.remoteCode.resetViewportSizeToDefault();n.EmulationRemoteApp.remoteCode.setViewportWidth(t);n.EmulationRemoteApp.remoteCode.setOrientation(i)},t.prototype.setViewportHeight=function(t,i){n.EmulationRemoteApp.remoteCode.resetViewportSizeToDefault();n.EmulationRemoteApp.remoteCode.setViewportHeight(t);n.EmulationRemoteApp.remoteCode.setOrientation(i)},t.prototype.resetViewportSizeToDefault=function(){n.EmulationRemoteApp.remoteCode.resetViewportSizeToDefault()},t.prototype.getOrientation=function(){return n.EmulationRemoteApp.remoteCode.getOrientation()},t.prototype.getResolution=function(){return n.EmulationRemoteApp.remoteCode.getResolution()},t.prototype.setGpsLatitude=function(t,i){n.EmulationRemoteApp.remoteCode.setGpsHasSignal(i);n.EmulationRemoteApp.remoteCode.setGpsLatitude(t)},t.prototype.setGpsLongitude=function(t,i){n.EmulationRemoteApp.remoteCode.setGpsHasSignal(i);n.EmulationRemoteApp.remoteCode.setGpsLongitude(t)},t.prototype.setGpsPosition=function(t,i,r){n.EmulationRemoteApp.remoteCode.setGpsHasSignal(r);n.EmulationRemoteApp.remoteCode.setGpsPosition(t,i)},t.prototype.getGpsPosition=function(){return n.EmulationRemoteApp.remoteCode.getGpsPosition()},t.prototype.setGpsHasSignal=function(t){n.EmulationRemoteApp.remoteCode.setGpsHasSignal(t)},t.prototype.clearGpsSettings=function(){n.EmulationRemoteApp.remoteCode.clearGpsSettings()},t.prototype.refresh=function(){n.EmulationRemoteApp.remoteCode.safeRefresh()},t}();n.MessageHandlers=t})(t=n.Emulation||(n.Emulation={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}))
//# sourceMappingURL=remote.min.js.map
var remoteHelpers,F12;(function(n){"use strict";var t;(function(n){var t;(function(n){var t=function(){function t(){}return t.main=function(){t.messageHandlers=new n.MessageHandlers;remoteHelpers=new Common.RemoteHelpers(t.messageHandlers);t.remoteCode=new n.RemoteEmulation;t.remoteCode.initialize()},t}();n.EmulationRemoteApp=t})(t=n.Emulation||(n.Emulation={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));F12.Tools.Emulation.EmulationRemoteApp.main()
//# sourceMappingURL=remoteMain.min.js.map
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: 21px;
    display: inline-flex;
    flex-direction: row; 
    flex-shrink: 0;
    cursor: default;
    border-top: thin solid transparent;   /* no token for this border, we are reserving space so the menu does not move when it is opened and we add a border*/
    border-left: thin solid transparent; 
    border-right: thin solid transparent; 
}
    body.xamlWindow #emulationMenu {
        display: none;
    }

    #emulationMenu.menuOpen {
        background-color: TRANSPARENT; /*[{f12-header-tab-selected-background-color}]*/
        border-top: thin solid TRANSPARENT; /*[thin solid {f12-header-popup-border-color}]*/
        border-left: thin solid TRANSPARENT; /*[thin solid {f12-header-popup-border-color}]*/
        border-right: thin solid TRANSPARENT; /*[thin solid {f12-header-popup-border-color}]*/
    }

        #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, body.xamlWindow #dockButton {
        display: none;
    }

 #undockButton {
    background-image: url("Images/undock.png");
    display: none;
}
    body.dockedWindow:not(.xamlWindow) #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:not(.xamlWindow) #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}]*/
}

#tabContainer {
    flex: 1 1 auto;
    height: 22px;
    overflow:hidden;
}

#content {
    width: 100%;
    height: 100%;
    display: -ms-grid;
    -ms-grid-columns: 1fr;
    -ms-grid-rows: 1fr 1fr;
}
    body.dockedWindow #content, body.xamlWindow #content {
        -ms-grid-rows: 0 1fr;
    }

#titleBar {
    width: 100%;
    position: relative;
    -ms-grid-row: 1;
    display: -ms-grid;
    -ms-grid-columns: auto 1fr auto auto auto auto auto;
}
    body.dockedWindow #titleBar, body.xamlWindow #titleBar {
        display: none;
    }

#titlePadding {
    -ms-grid-column: 1;
    width: 84px;
}

#titleArea {
    color: TRANSPARENT; /*[{f12-header-tab-text-color}]*/
    text-align: center;
    -ms-grid-column: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
}

#titleMinButton {
    background-image: url("Images/minimize.png");
    -ms-grid-column: 4;
}

#titleRestoreButton {
    background-image: url("Images/restore.png");
    display: none;
    -ms-grid-column: 5;
}

#titleMaxButton {
    background-image: url("Images/maximize.png");
    -ms-grid-column: 6;
}

#titleCloseButton {
    background-image: url("Images/close.png");
    display: block;
    -ms-grid-column: 7;
}
    body.dockedWindow #titlebar .buttonIcon, body.xamlWindow #titlebar .buttonIcon{
        display: none;
    }

#mainContainer {
    display: flex; /* or inline-flex */
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    position: relative;
    -ms-grid-row: 2;
}

#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%;
    vertical-align: top;
    color: TRANSPARENT; /*[{f12-header-tab-text-color}]*/
}

    .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: -1px;
    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;
    }
}<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=11" />
        <meta http-equiv="format-detection" content="telephone=no">
        <title>Header</title>
        <link id="button.css" rel="stylesheet" href="../common/button.css" type="text/css" data-plugin-theme="true" />
        <link rel="stylesheet" type="text/css" href="header.css" data-plugin-theme="true" />

        <!-- Daytona Includes -->
        <script type="text/javascript" src="../Common/isDebugBuild.js"></script>
        <script type="text/javascript" src="../common/plugin.js"></script>

        <script type="text/javascript" src="../Common/CommonMinimal.js"></script>
        <script type="text/javascript" src="HeaderMerged.js"></script>
        <script type="text/javascript" src="res://f12test.dll/23/selftest/SelfTestHeader.js"></script>

        <script type="text/javascript">
            // The main entry point
            F12.Host.Header.App.main();
        </script>
    </head>

    <body>
        <div id="content" tabindex="-1">
            <div id="titleBar" tabindex="-1">
                <div id="titlePadding"></div>
                <div id="titleArea" tabindex="-1"><span id="titleText"></span></div>
                <div id="titleMinButton" class="buttonIcon" role="button" tabindex="-1"></div>
                <div id="titleRestoreButton" class="buttonIcon" role="button" tabindex="-1"></div>
                <div id="titleMaxButton" class="buttonIcon" role="button" tabindex="-1"></div>
                <div id="titleCloseButton" class="buttonIcon" role="button" tabindex="-1"></div>
            </div>
            <div id="mainContainer" tabindex="-1">
                <div id="f12Logo" tabindex="-1">F12</div>
                <div id="tabContainer" tabindex="-1">
                    <div id="overflowButton" class="buttonIcon"></div>
                </div>
                <div id="emulationMenu" tabindex="1">
                    <div id="emulationIcon" class="buttonIcon"> </div>
                    <div id="emulationText"></div>
                </div>
                <div id="consoleButton" class="buttonIcon" role="button" tabindex="1"></div>
                <div id="divider"></div>
                <div id="helpButton" class="buttonIcon" role="button" tabindex="1"></div>
                <div id="bringIEToForegroundButton" class="buttonIcon" role="button" tabindex="1"></div>
                <div id="dockButton" class="buttonIcon" role="button" tabindex="1"></div>
                <div id="undockButton" class="buttonIcon" role="button" tabindex="1"></div>
                <div id="closeButton" class="buttonIcon" role="button" tabindex="1"></div>
            </div>
        </div>
    </body>
</html>
//! Copyright (C) Microsoft. All rights reserved.
var F12;(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(n){var i=this;this._allEvents=[];this._logBuffer=[];this._rpcWrapper=n;this._hasRefreshed=!1;this._attached=!1;this._currentEventPromise=t.Promise.wrap(null);t.F12.Communications.registerMethodHandler("logselftestmessage",function(n){return i.queueLog(n),!0},!1)}return Object.defineProperty(n.prototype,"allEvents",{get:function(){return this._allEvents},enumerable:!0,configurable:!0}),n.prototype.onRefresh=function(){this._hasRefreshed=!0},n.prototype.onAttach=function(){this._attached||(this._attached=!0,this.fireAllEvents())},n.prototype.log=function(n,t){this.queueLog({message:n,pluginName:t,timestamp:Date.now()})},n.prototype.fireTestStarted=function(n){return this._logBuffer=[],this.fireEvent({eventType:"testStarted",test:n})},n.prototype.fireTestListUpdated=function(n){this.fireEvent({eventType:"testListUpdated",testList:n})},n.prototype.fireTestResult=function(n,t,i){this._hasRefreshed&&(this.fireAllEvents(),this._hasRefreshed=!1);this._logBuffer.sort(function(n){return n.timestamp});var r=this._logBuffer;return this._logBuffer=[],this.fireEvent({eventType:"testResult",test:n,status:t,duration:i,logs:r})},n.prototype.fireStatusChange=function(n){return this.fireEvent({eventType:"selfTestStatus",status:n})},n.prototype.fireInitPage=function(){return this.fireEvent({eventType:"initPage"})},n.prototype.fireEvent=function(n){return(this._allEvents.push(n),this._attached)?this.queueEvent(n):t.Promise.wrap(null)},n.prototype.queueEvent=function(n){var t=this;return this._currentEventPromise=this._currentEventPromise.then(function(){return t._rpcWrapper.handleSelfTestEvent(n)}),this._currentEventPromise},n.prototype.fireAllEvents=function(){var n=this;this._allEvents.forEach(function(t){return n.queueEvent(t)})},n.prototype.queueLog=function(n){if(n.pluginName){var t=n.pluginName.toLowerCase(),i=t.lastIndexOf("/");i>=0&&(t=t.substring(i+1));n.pluginName=t}this._logBuffer.push(n)},n}();n.SelfTestLogger=i})(t=n.Header||(n.Header={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(t){"use strict";function u(n){return(69069*n+1)%2147483648}function f(n,t){for(var r,f,i=0;i<n.length;i++)t=u(t),r=t%n.length,f=n[i],n[i]=n[r],n[r]=f}var i=Microsoft.Plugin,r=function(){function r(r,u){this._testsByPlugin=new Map;this._testsByName=new Map;this._registeredPluginCount=0;this._rpcWrapper=u;this._logger=new t.SelfTestLogger(this._rpcWrapper);this._pluginOrder=[i.F12.PluginId.Header,i.F12.PluginId.Dom,i.F12.PluginId.Console,i.F12.PluginId.Debugger,i.F12.PluginId.Network,i.F12.PluginId.VisualProfiler,i.F12.PluginId.Memory,i.F12.PluginId.Emulation];i.F12.Communications.registerMethodHandler("registerSelfTests",this.registerSelfTests.bind(this),!1);this._options={};this._logger.fireInitPage();this._launcherRPC=new n.Tools.RPC.JsonRPCEndpoint("SELFTEST_LAUNCHER_CLIENT",function(){},function(){},function(n){r.sendSelfTestLauncherMessage(n)},function(){})}return r.prototype.onRefresh=function(){this.log("Page refreshed");this._logger.onRefresh()},r.prototype.onSelfTestPageEvent=function(n){var u=this,i,r,t;switch(n.eventType){case"startRun":i=n.testNames;r=i.map(function(n){return u._testsByName.get(n)});this.runTestList(r);break;case"optionChanged":t=n;this._options[t.optionName]=t.value}},r.prototype.onAttach=function(){this._logger.onAttach()},r.prototype.registerSelfTests=function(n){var r=this,t=n[0].pluginId,n;return this._pluginOrder.indexOf(t)<0?!0:(n.forEach(function(n){return r._testsByName.set(n.name,n)}),this._testsByPlugin.set(t,n),this._registeredPluginCount++,n=this.getTestDetailsInPriorityOrder(),this._logger.fireTestListUpdated(n),i.F12.SelfTest.selfTestEnabled&&this._registeredPluginCount===this._pluginOrder.length&&!this._options.disableAutorun&&(this._options.shuffle&&(n=this.getTestDetailsShuffled(this._options.shuffle),this._logger.fireTestListUpdated(n)),this.runTestList(n)),!0)},r.prototype.getTestDetailsInPriorityOrder=function(){var n=this;return this.getFlatTestList().sort(function(t,i){return t.metadata.priority===i.metadata.priority?n._pluginOrder.indexOf(t.pluginId)-n._pluginOrder.indexOf(i.pluginId):t.metadata.priority-i.metadata.priority})},r.prototype.getFlatTestList=function(){var n=[];return this._testsByName.forEach(function(t){return n.push(t)}),n},r.prototype.getTestDetailsShuffled=function(n){var t=this.getTestDetailsInPriorityOrder();return f(t,n),t},r.prototype.sendResultToLauncher=function(n,t,i){t===void 0&&(t=null);i===void 0&&(i="");var r=this._logger.allEvents.filter(function(n){return n.eventType!=="testListUpdated"}).map(JSON.stringify).join("\r\n");this._options.shuffle&&(r="shuffle="+this._options.shuffle+"\r\n"+r);this._launcherRPC.jsonRpcNotification("onResult",[n,i,t,r])},r.prototype.runTestList=function(n){var t=this,i=function(n){if(n.length===0){t._logger.fireStatusChange("allcomplete");t.sendResultToLauncher(0);return}t.runTest(n[0]).then(function(){return i(n.slice(1))},function(i){t._logger.fireStatusChange(i.status);t.sendResultToLauncher(i.result,n[0],i.message)})};Common.SelfTestUtilities.globalTestCleanup().then(function(){return t._logger.fireStatusChange("running")}).done(function(){i(n)})},r.prototype.runTest=function(n){var t=this;return n.metadata.disabledWithBug?i.Promise.wrap(null):n.metadata.requiresTarget===0&&!i.F12.isTargetEdge||n.metadata.requiresTarget===1&&i.F12.isTargetEdge?i.Promise.wrap(null):typeof n.metadata.requireFeatureKey!="undefined"&&(!Common.FeatureAvailability.isEnabled(n.metadata.requireFeatureKey)||!i.F12.isTargetEdge)?i.Promise.wrap(null):this._logger.fireTestStarted(n).then(function(){var r,f,u,o,e;return t.log("Starting test"),o=Date.now(),e=i.F12.Communications.callMethod(n.pluginId,"runSelfTest",[n],!0).then(function(){r="passed"},function(n){r||(r="failed",f=1,u="Test error: \r\n",u+=["name","message","description","stack"].map(function(t){return n[t]}).filter(function(n){return n}).filter(function(n,t,i){return i.indexOf(n)===t}).join("\r\n"),t.log(u));throw new Common.SelfTestError(r,f,u)}),t._options.disableTimeout||i.Promise.timeout(n.metadata.timeout).then(function(){r||(r="timedout",f=2,u="Test timed out after "+n.metadata.timeout+"ms",t.log(u),e.cancel())}),Common.Async.tryFinally(e,function(){return i.Promise.join([t._logger.fireTestResult(n,r,Date.now()-o),Common.SelfTestUtilities.globalTestCleanup()])})})},r.prototype.log=function(n,t){this._logger.log(n,t||"selftestservice")},r}();t.SelfTestService=r})(i=t.Header||(t.Header={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t,r,i;(function(n){n[n.Running=0]="Running";n[n.Alert=1]="Alert";n[n.Error=2]="Error";n[n.Info=3]="Info";n[n.Break=4]="Break";n[n.Paused=5]="Paused"})(n.BadgeTypes||(n.BadgeTypes={}));t=n.BadgeTypes,function(n){n[n.None=0]="None";n[n.Icon=1]="Icon";n[n.IconAndCount=2]="IconAndCount"}(n.BadgeDisplayType||(n.BadgeDisplayType={}));r=n.BadgeDisplayType;i=function(){function n(n){this._backgroundElement=document.createElement("span");this._backgroundElement.className="badgeBackground";n.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)}return Object.defineProperty(n.prototype,"currentBadgeInfo",{get:function(){return this._currentBageInfo},enumerable:!0,configurable:!0}),n.prototype.show=function(n,i){var u,f,r;i===void 0&&(i=0);u=!1;f=!1;this._backgroundElement.classList.add("badge"+t[n]);r="";switch(n){case 1:r="url('Images/badgeAlert.png')";break;case 2:r="url('Images/badgeError.png')";break;case 0:r="url('Images/badgeRunning.png')";break;case 3:r="url('Images/badgeInfo.png')";break;case 4:r="url('Images/badgeBreak.png')";break;case 5:r="url('Images/badgePaused.png')"}i>0&&n===2&&(u=!0,i>=99&&(f=!0,i=99),this._numberElement.innerText=i.toString());u?this._backgroundElement.classList.add("displayNumber"):this._backgroundElement.classList.remove("displayNumber");f?this._backgroundElement.classList.add("displayPlus"):this._backgroundElement.classList.remove("displayPlus");this._currentBageInfo={badgeType:n,count:i,displayPlus:f,displayNumber:u}},n.prototype.hide=function(){this._currentBageInfo=null},n}();n.Badge=i})(t=n.Header||(n.Header={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function t(){this._isDirty=!1;this._isLoadedJsonValid=!0;this._jmcRules=[];this._jmcRules[i.F12.JMCType.UserCode]=[];this._jmcRules[i.F12.JMCType.Library]=[];this._jmcRules[i.F12.JMCType.Unrelated]=[]}return Object.defineProperty(t,"defaultRules",{get:function(){return{MyCode:t.JMC_DEFAULT_RULES.MyCode.slice(0),Libraries:t.JMC_DEFAULT_RULES.Libraries.slice(0),Unrelated:t.JMC_DEFAULT_RULES.Unrelated.slice(0)}},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){var n=this;return this.load().then(function(){n.registerPluginMethodHandlers()},function(){n.registerPluginMethodHandlers()})},t.prototype.isJMCAvailable=function(){return i.Promise.wrap(this._isLoadedJsonValid)},t.prototype.getJMCTypeForUrls=function(n){for(var r=[],t=0;t<n.length;t++)r.push(this.getJMCTypeForUrlFromRules(n[t]));return i.Promise.wrap(r)},t.prototype.getJMCTypeForEval=function(){return i.Promise.wrap(i.F12.JMCType.UserCode)},t.prototype.getJMCTypeForScriptBlock=function(){return i.Promise.wrap(i.F12.JMCType.UserCode)},t.prototype.getJMCTypeForFunction=function(){return i.Promise.wrap(i.F12.JMCType.UserCode)},t.prototype.getJMCTypeForUrl=function(n){return this.getJMCTypeForUrls([n]).then(function(n){return i.Promise.wrap(n[0])})},t.prototype.setJMCTypeForUrl=function(n,t){return i.Promise.wrap(this.setJMCTypeForUrlFromRules(n,t))},t.prototype.getCurrentRules=function(){for(var t=[],n=0;n<this._jmcRules.length;n++)t[n]=this._jmcRules[n].slice(0);return i.Promise.wrap(t)},t.prototype.load=function(){return this.loadRules()},t.prototype.save=function(){return this.saveRules()},t.prototype.loadFromJSON=function(n){return this.loadRules(n)},t.prototype.saveToJSON=function(){return this.saveRules(!0)},t.prototype.getError=function(){var n=null;return this._isLoadedJsonValid||(n=this._jmcError),i.Promise.wrap(n)},t.prototype.loadRules=function(n){var r=this,u,f=null,e;return typeof n=="string"?f=i.Promise.wrap(n):(e="",f=i.Storage.openFile(t.JMC_SETTINGS_FILE,{access:1,encoding:"UTF-8",mode:4,persistence:0,type:1}).then(function(n){return u=n,u.read()}).then(function(n){return e=n,u.close()}).then(function(){return i.Promise.wrap(e)},function(n){return n||(n={message:""}),r._jmcError=n,r._jmcError.name="jmcLoadError",i.Promise.wrapError(n)})),f.then(function(n){var t=r.isJMCAvailable;return(r.parseJMCSettings(n),t!==r.isJMCAvailable&&i.F12.Communications.fireEvent("jmcAvailabilityChanged",i.F12.PluginId.None),!r._isLoadedJsonValid)?i.Promise.wrapError(r._jmcError):(r._isDirty=!1,r.getCurrentRules())})},t.prototype.saveRules=function(n){var r=this,u,f=this.getJMCSettingsJson(),e=null;return e=!n&&this._isDirty&&this._isLoadedJsonValid?i.Storage.openFile(t.JMC_SETTINGS_FILE,{access:2,encoding:"UTF-8",mode:1,persistence:0,type:1}).then(function(n){return u=n,u.write(f)}).then(function(){return u.close()}).then(function(){return i.Promise.wrap(f)},function(n){return n||(n={message:""}),r._jmcError=n,r._jmcError.name="jmcSaveError",i.Promise.wrapError(n)}):i.Promise.wrap(f),e.then(function(n){return r._isDirty=!1,i.Promise.wrap(n)})},t.prototype.getJMCTypeForUrlFromRules=function(n){return this.findMatchingRule(n)},t.prototype.setJMCTypeForUrlFromRules=function(t,r){var f=this.getJMCTypeForUrlFromRules(t),u,e;return r===i.F12.JMCType.Unsure?(n.Tools.Utility.Assert.fail("F12 does not support setting a url to the 'Unsure' type"),f):(u=this.updateJMC(t,r),e={url:t,previousType:f,currentType:u},i.F12.Communications.fireEvent("jmcRulesChanged",i.F12.PluginId.None,e),u)},t.prototype.parseJMCSettings=function(n){var f=this,r,u;if(this._jmcRules=[],this._jmcRules[i.F12.JMCType.UserCode]=[],this._jmcRules[i.F12.JMCType.Library]=[],this._jmcRules[i.F12.JMCType.Unrelated]=[],r=null,this._isLoadedJsonValid=!0,n)try{r=JSON.parse(n)}catch(e){r=t.defaultRules;this._isLoadedJsonValid=!1;this._jmcError=e;this._jmcError.name="jmcParseError"}else r=t.defaultRules;u=function(n,t){var i,r;if(n&&n instanceof Array)for(i=0;i<n.length;i++)r=n[i],typeof r=="string"&&f._jmcRules[t].push(r.toLowerCase())};u(r.MyCode,i.F12.JMCType.UserCode);u(r.Libraries,i.F12.JMCType.Library);u(r.Unrelated,i.F12.JMCType.Unrelated)},t.prototype.getJMCSettingsJson=function(){var n={MyCode:this._jmcRules[i.F12.JMCType.UserCode],Libraries:this._jmcRules[i.F12.JMCType.Library],Unrelated:this._jmcRules[i.F12.JMCType.Unrelated]};return JSON.stringify(n)},t.prototype.findMatchingRule=function(n){var r=this,t;return(n=n.toLowerCase(),t=function(n,t){for(var i,e,o,u,h,s=r._jmcRules[t],f=0;f<s.length;f++)if(i=s[f].toLowerCase(),i.indexOf("*")>=0){for(e=[],o=i.split("*"),u=0;u<o.length;u++)e.push(Common.EncodingUtilities.escapeRegExp(o[u]));if(h=new RegExp("^"+e.join(".*?")+"$","i"),h.test(n))return!0}else if(i===n)return!0;return!1},t(n,i.F12.JMCType.UserCode))?i.F12.JMCType.UserCode:t(n,i.F12.JMCType.Library)?i.F12.JMCType.Library:t(n,i.F12.JMCType.Unrelated)?i.F12.JMCType.Unrelated:i.F12.JMCType.UserCode},t.prototype.updateJMC=function(n,t){var u,i,r;for(n=n.toLowerCase(),this._isDirty=!0,u=this.findMatchingRule(n),i=0;i<this._jmcRules.length;i++)r=this._jmcRules[i].indexOf(n),r>=0&&this._jmcRules[i].splice(r,1);return this._jmcRules[t].push(n),this.findMatchingRule(n)},t.prototype.registerPluginMethodHandlers=function(){i.F12.Communications.registerMethodHandler("jmcIsJMCAvailable",this.bindAsyncMethodHandler(this.isJMCAvailable),!0);i.F12.Communications.registerMethodHandler("jmcGetJMCTypeForUrls",this.bindAsyncMethodHandler(this.getJMCTypeForUrls),!0);i.F12.Communications.registerMethodHandler("jmcGetJMCTypeForEval",this.bindAsyncMethodHandler(this.getJMCTypeForEval),!0);i.F12.Communications.registerMethodHandler("jmcGetJMCTypeForScriptBlock",this.bindAsyncMethodHandler(this.getJMCTypeForScriptBlock),!0);i.F12.Communications.registerMethodHandler("jmcGetJMCTypeForFunction",this.bindAsyncMethodHandler(this.getJMCTypeForFunction),!0);i.F12.Communications.registerMethodHandler("jmcGetJMCTypeForUrl",this.bindAsyncMethodHandler(this.getJMCTypeForUrl),!0);i.F12.Communications.registerMethodHandler("jmcSetJMCTypeForUrl",this.bindAsyncMethodHandler(this.setJMCTypeForUrl),!0);i.F12.Communications.registerMethodHandler("jmcLoad",this.bindAsyncMethodHandler(this.load),!0);i.F12.Communications.registerMethodHandler("jmcSave",this.bindAsyncMethodHandler(this.save),!0);i.F12.Communications.registerMethodHandler("jmcLoadFromJSON",this.bindAsyncMethodHandler(this.loadFromJSON),!0);i.F12.Communications.registerMethodHandler("jmcSaveToJSON",this.bindAsyncMethodHandler(this.saveToJSON),!0);i.F12.Communications.registerMethodHandler("jmcGetCurrentRules",this.bindAsyncMethodHandler(this.getCurrentRules),!0);i.F12.Communications.registerMethodHandler("jmcGetError",this.bindAsyncMethodHandler(this.getError),!0)},t.prototype.bindAsyncMethodHandler=function(n){var t=this;return function(){for(var i=[],r=0;r<arguments.length;r++)i[+r]=arguments[r];n.apply(t,i).then(function(n){i[i.length-1](n)},function(n){i[i.length-1](undefined,n)})}},t.JMC_SETTINGS_FILE="MyCode.json",t.JMC_DEFAULT_RULES={MyCode:[],Libraries:["*.min.js","browsertools://*"],Unrelated:[]},t}();t.JMCService=r})(i=t.Header||(t.Header={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function t(){var t=this,n;this._diagOMConnect=null;n=window.external;n.addEventListener("attach",function(){return t.onAttach()});n.addEventListener("detach",function(){return t.onDetach()})}return Object.defineProperty(t.prototype,"isConnected",{get:function(){return!!this._rpc},enumerable:!0,configurable:!0}),t.prototype.onLoadComplete=function(n){this._headerControl=n;window.external.isAttached&&this.onAttach()},t.prototype.jsonRpcMethodCall=function(n,t){var r=this;return new i.Promise(function(i,u){r._rpc.jsonRpcMethodCall(n,t,i,u)})},t.prototype.toggleAlwaysRefreshFromServer=function(n){this.jsonRpcMethodCall("toggleAlwaysRefreshFromServer",[n]).done()},t.prototype.refreshPage=function(){i.F12.Debugger.abortScriptExecution();this.jsonRpcMethodCall("refreshPage").done()},t.prototype.jsonRpcMethodReceive=function(t){n.Tools.Utility.Assert.fail("Frontend received an unexpected RPC method call: '"+t+"'")},t.prototype.jsonRpcNotificationReceive=function(t,i){switch(t){case"onDocumentComplete":n.Tools.Utility.Assert.areEqual(1,i.length);this._headerControl.onDocumentComplete(i[0]);break;case"onInspectElement":n.Tools.Utility.Assert.areEqual(1,i.length);this._headerControl.onInspectElement(i[0]);break;case"onScriptError":var r=JSON.parse(i[0]);Common.ErrorHandling.reportErrorDetails(r);break;case"onSelfTestPageEvent":n.Tools.Utility.Assert.areEqual(1,i.length);this._headerControl.onSelfTestPageEvent(i[0]);break;case"onViewSource":n.Tools.Utility.Assert.areEqual(1,i.length);this._headerControl.onViewSource(i[0]);break;default:n.Tools.Utility.Assert.fail("Unknown event '"+t+"'")}},t.prototype.handleSelfTestEvent=function(n){return this.jsonRpcMethodCall("handleSelfTestEvent",[n])},t.prototype.onAttach=function(){var i=this,t=window.external;t.loadScriptInProc("../common/isDebugBuild.js");t.loadScriptInProc("../common/assert.js");t.loadScriptInProc("../common/Remote/rpc.js");t.loadScriptInProc("../common/remoteHelpers.js");t.loadScriptInProc("remote/remote.js");this._diagOMConnect=function(t){i._rpc=new n.Tools.RPC.JsonRPCEndpoint("HEADER_CLIENT",function(n,t,r){return i.jsonRpcMethodReceive(n,t,r)},function(n,t){return i.jsonRpcNotificationReceive(n,t)},function(n){t.postMessage(n)},function(n){t.addEventListener("message",n)});i._headerControl.onAttached()};t.addEventListener("connect",this._diagOMConnect)},t.prototype.onDetach=function(){var n=window.external;this._diagOMConnect&&n.removeEventListener("connect",this._diagOMConnect);this._rpc=null;this._diagOMConnect=null;this._headerControl.onDetached()},t}();t.RpcWrapper=r})(i=t.Header||(t.Header={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(){this._tabContainer=document.getElementById("tabContainer");this._tabItemsById=[];this._tabItemsByOrder=[];this._selectedTab=null;this._highlightedElement=null;this._listeners=[];this.initialize()}return Object.defineProperty(i.prototype,"selectedTab",{get:function(){return this._selectedTab},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectedTabName",{get:function(){return this._selectedTab?this._selectedTab.getAttribute("data-tabId"):""},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectedTabPluginId",{get:function(){return this._selectedTab?parseInt(this._selectedTab.getAttribute("data-pluginId"),10):-1},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectedElement",{get:function(){var n;return this._selectedTab&&(n=this._selectedTab.querySelector(".tabItem tabItemSelected")),n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"highlightedElement",{get:function(){var n;return this._highlightedElement&&(n=this._highlightedElement),n},enumerable:!0,configurable:!0}),i.prototype.addEventListener=function(n,t){n==="tabClicked"&&this._listeners.push(t)},i.prototype.onResize=function(){for(var n,r,f=this._tabContainer.getBoundingClientRect().width-this._overflowButton.getBoundingClientRect().width,t=!1,u=0,i=0;i<this._tabItemsByOrder.length;i++)n=this._tabItemsByOrder[i].rootElement,t||(this.tabIsVisible(n)||this.showTab(n),r=n.getBoundingClientRect().width,u+r>f?t=!0:(u+=r,n===this._highlightedElement&&(this.highlightTabByElement(this._highlightedElement),this._overflowButton.classList.remove("selectedTabOverflowed"),this._overflowButton.tabIndex=-1))),t&&this.tabIsVisible(n)&&(n===this._highlightedElement&&(this._overflowButton.classList.add("selectedTabOverflowed"),n.tabIndex=-1,this._overflowButton.tabIndex=1),this.hideTab(n));t?this._overflowButton.style.visibility="visible":(this._highlightedElement===this._overflowButton&&this.highlightTabByElement(this._selectedTab),this._overflowButton.style.visibility="hidden")},i.prototype.getHiddenTabs=function(){for(var t,i=[],n=0;n<this._tabItemsByOrder.length;n++)t=this._tabItemsByOrder[n],this.tabIsVisible(t.rootElement)||i.push(t);return i},i.prototype.addTab=function(i,r,u,f,e){var c=this,o=document.createElement("div"),s,l,h;o.setAttribute("data-tabId",r);o.setAttribute("data-pluginId",""+i);o.setAttribute("data-pluginName",u);o.className="tabItem";switch(e){case 0:o.classList.add("neverBadge");break;case 2:o.classList.add("countBadge")}o.onmouseenter=function(){return t.Tooltip.show({content:c._tabItemsById[i].toolTip}),!0};o.setAttribute("aria-label",f);o.tabIndex=-1;s=document.createElement("span");s.className="tabText";s.textContent=u;s.tabIndex=-1;o.appendChild(s);l=new n.Badge(o);o.addEventListener("click",function(n){return c.onTabClicked(n,i)});h={rootElement:o,badge:l,originalTooltip:f,toolTip:f};this._tabItemsById[i]=h;this._tabItemsByOrder.push(h);this._tabContainer.insertBefore(o,this._overflowButton)},i.prototype.selectTabById=function(n,t){t===void 0&&(t=!0);this.highlightTabById(n,!1);this.onTabSelected(n,t)},i.prototype.showBadge=function(n,i,r,u){u===void 0&&(u=0);var f=this._tabItemsById[n],e=t.Resources.getString("BadgeTooltipFormat",f.originalTooltip,r),o=f.originalTooltip+" "+r;f.rootElement.setAttribute("aria-label",o);f.toolTip=e;f.badge.show(i,u);f.rootElement.classList.add("hasBadge")},i.prototype.hideBadge=function(n){var t=this._tabItemsById[n];t&&(t.rootElement.setAttribute("aria-label",t.originalTooltip),t.toolTip=t.originalTooltip,t.badge.hide(),t.rootElement.classList.remove("hasBadge"))},i.prototype.onTabSelected=function(n,t){if(t===void 0&&(t=!0),this._selectedTab&&(this.tabIsVisible(this._selectedTab)?this._selectedTab.tabIndex=-1:(this._overflowButton.classList.remove("selectedTabOverflowed"),this._overflowButton.tabIndex=-1),this._selectedTab.classList.remove("tabItemSelected")),this._selectedTab=this._highlightedElement,this.tabIsVisible(this._selectedTab)?this._selectedTab.tabIndex=1:(this._overflowButton.classList.add("selectedTabOverflowed"),this._overflowButton.tabIndex=1),this._selectedTab&&this._selectedTab.classList.add("tabItemSelected"),t)for(var i=0;i<this._listeners.length;i++)this._listeners[i]&&this._listeners[i](n)},i.prototype.onOverflowButtonClicked=function(){var o=this,i=this.getHiddenTabs(),n;if(i.length>0){var u=[],s=function(n){return function(){return o.onTabSelected(n)}},h=function(n,t){return function(){return n===t}};for(n=0;n<i.length;n++){var c=i[n].rootElement.querySelector(".tabText").textContent,f=parseInt(i[n].rootElement.getAttribute("data-pluginId"),10),r=i[n].badge.currentBadgeInfo,e="";r&&(e=r.displayNumber?"badgeCount_"+r.count:"badgeType"+r.badgeType);u.push({id:"",callback:s(f),label:c,type:0,disabled:function(){return!1},accessKey:"",checked:h(f,this.selectedTabPluginId),cssClass:e})}this._overflowMenu&&(this._overflowMenu.dispose(),this._overflowMenu=null);this._overflowButton.classList.add("active");this._overflowMenu=t.ContextMenu.create(u,"headerOverflowMenu");this._overflowMenu.show(this._overflowButton.getBoundingClientRect().left,window.innerHeight)}},i.prototype.showTab=function(n){n.style.display="inline-block"},i.prototype.hideTab=function(n){n.style.display="none"},i.prototype.tabIsVisible=function(n){return n&&n.style.display.toLowerCase()!=="none"},i.prototype.initialize=function(){var n=this;this._overflowButton=document.getElementById("overflowButton");this._overflowButton.addEventListener("keydown",function(t){var r=null,i,u;if(t.keyCode===38||t.keyCode===37)for(i=n._tabItemsByOrder.length-1;i>=0;i--)if(u=n._tabItemsByOrder[i].rootElement,n.tabIsVisible(u)){r=u;break}r&&(n._overflowButton.tabIndex=-1,n.highlightTabByElement(r))});this._tabContainer.addEventListener("mouseleave",function(){t.Tooltip.dismiss()});this._tabContainer.addEventListener("keydown",function(t){var i=null,r;if(t.keyCode===40||t.keyCode===39)i=n._highlightedElement.nextElementSibling;else if(t.keyCode===38||t.keyCode===37)i=n._highlightedElement.previousElementSibling;else if((t.keyCode===32||t.keyCode===13)&&(r=parseInt(n._highlightedElement.getAttribute("data-pluginId"),10),r>0))n.onTabSelected(r);i&&(n.tabIsVisible(i)?n.highlightTabByElement(i):(n._highlightedElement.tabIndex=-1,n._highlightedElement=n._overflowButton,n._overflowButton.tabIndex=1,n._overflowButton.focus()))});window.addEventListener("resize",function(){return n.onResize()})},i.prototype.highlightTabById=function(n,t){var i,r;t===void 0&&(t=!0);this._highlightedElement&&(this._highlightedElement.classList.remove("tabItemHighlighted"),this.highlightedElement.setAttribute("tabindex","-1"));i=this._tabItemsById[n];i&&(i.rootElement.classList.add("tabItemHighlighted"),this._highlightedElement=i.rootElement,r=this.highlightedElement,r.setAttribute("tabindex","1"),t&&r.focus())},i.prototype.highlightTabByElement=function(n){var t=parseInt(n.getAttribute("data-pluginId"),10);t>0&&this.highlightTabById(t)},i.prototype.onTabClicked=function(n,t){this.highlightTabById(t);this.onTabSelected(t)},i}();n.TabControl=i})(t=n.Header||(n.Header={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(t){"use strict";var i=Microsoft.Plugin,u,r;(function(n){n[n.Script=0]="Script";n[n.Native=1]="Native"})(t.PluginType||(t.PluginType={}));u=t.PluginType;r=function(){function r(n){this._testEventObject=new Common.EventHelperObject;this._traceWriter=new Common.TraceWriter;this._isReady=!1;this._titleBar=document.getElementById("titleBar");this._titlePadding=document.getElementById("titlePadding");this._titleArea=document.getElementById("titleArea");this._titleText=document.getElementById("titleText");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");this._titleMinButton=document.getElementById("titleMinButton");this._titleRestoreButton=document.getElementById("titleRestoreButton");this._titleMaxButton=document.getElementById("titleMaxButton");this._titleCloseButton=document.getElementById("titleCloseButton");var r=!1;n||(n=window.external.header,r=!0,i.F12.launchMode===i.F12.LaunchMode.Spartan&&document.body.classList.add("xamlWindow"),(i.F12.launchMode===i.F12.LaunchMode.Chooser||i.F12.launchMode===i.F12.LaunchMode.WWA)&&(this._dockButton.style.display="none",this._undockButton.style.display="none"),this._titleTextHidden=document.createElement("span"),this._titleTextHidden.style.display="inline-block",this._titleTextHidden.style.position="absolute",this._titleTextHidden.style.visibility="hidden",document.body.appendChild(this._titleTextHidden),this._titlePaddingWidth=this._titlePadding.scrollWidth);this._headerDispatch=n;Common.blockBrowserAccelerators();this._jmcService=new t.JMCService;this.initialize(r);i.F12&&i.F12.SelfTest.selfTestEnabled&&(this._selfTestService=new t.SelfTestService(this._headerDispatch,this._rpcWrapper))}return Object.defineProperty(r.prototype,"isReady",{get:function(){return this._isReady},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"testEventObject",{get:function(){return this._testEventObject},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"jmcService",{get:function(){return this._jmcService},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"currentTitle",{get:function(){return this._currentTitle},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"selectedTabElement",{get:function(){return this._tabControl.selectedTab},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"selectedTabName",{get:function(){return this._tabControl.selectedTabName},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"selectedTabPluginId",{get:function(){return this._tabControl.selectedTabPluginId},enumerable:!0,configurable:!0}),r.prototype.onAttached=function(){i.F12&&i.F12.SelfTest.selfTestEnabled&&n.Host.Header.SelfTest&&(t.SelfTest.init(),this._selfTestService.onAttach())},r.prototype.onDetached=function(){this._jmcService.save().done()},r.prototype.onInspectElement=function(n){n&&i.F12.setInspectElementId(n);i.F12.activateTab(i.F12.PluginId.Dom)},r.prototype.onViewSource=function(n){n&&i.F12.Debugger.showDocument(n,1,1,"text/html");i.F12.activateTab(i.F12.PluginId.Debugger)},r.prototype.onDocumentComplete=function(n){if(this._currentTitle&&i.F12.SelfTest.selfTestEnabled&&this._selfTestService.onRefresh(),this._currentTitle=Common.ToolWindowHelpers.createShortenedUrlText(n),this._titleTextHidden){var t=i.Resources.getString("WindowTitle",this._currentTitle);this._titleText.innerText=t;this._titleTextHidden.innerText=t;this.onResize()}},r.prototype.onSelfTestPageEvent=function(n){if(i.F12&&i.F12.SelfTest.selfTestEnabled)this._selfTestService.onSelfTestPageEvent(n)},r.prototype.onConsoleErrorsUpdated=function(n){return n===1?this._tabControl.showBadge(i.F12.PluginId.Console,2,i.Resources.getString("BadgeConsoleSingleError"),n):n>0?this._tabControl.showBadge(i.F12.PluginId.Console,2,i.Resources.getString("BadgeConsoleErrorCount",n),n):this._tabControl.hideBadge(i.F12.PluginId.Console),!0},r.prototype.onProfilerStateUpdated=function(n,t){return t?this._tabControl.showBadge(n,0,i.Resources.getString("BadgeProfilerActive")):this._tabControl.hideBadge(n),!0},r.prototype.onEmulationStateUpdated=function(n,t){n?this._tabControl.showBadge(i.F12.PluginId.Emulation,3,i.Resources.getString("BadgeEmulationActive")):this._tabControl.hideBadge(i.F12.PluginId.Emulation);this._emulationText.textContent=t;var r=i.Resources.getString(n?"EmulationEnabledButtonTooltip":"EmulationDisabledButtonTooltip",t);return Common.ButtonHelpers.setButtonTooltip(this._emulationMenu,r,!1),!0},r.prototype.onDebuggerExecutionStateUpdated=function(n){return n?this._tabControl.showBadge(i.F12.PluginId.Debugger,5,i.Resources.getString("BadgeDebuggerPaused")):this._tabControl.hideBadge(i.F12.PluginId.Debugger),!0},r.prototype.onMinButtonClicked=function(){this._headerDispatch.minimizeF12()},r.prototype.onRestoreButtonClicked=function(){this._headerDispatch.restoreF12()},r.prototype.onMaxButtonClicked=function(){this._headerDispatch.maximizeF12()},r.prototype.onCloseButtonClicked=function(){this._headerDispatch.closeF12()},r.prototype.onDockButtonClicked=function(){i.F12.Debugger.getIsAtBreakpoint()||this._headerDispatch.toggleDockedState()},r.prototype.onBringToForgroundButtonClicked=function(){i.F12.Debugger.getIsAtBreakpoint()||this._headerDispatch.toggleForegroundWindow()},r.prototype.onHelpButtonClicked=function(){i.F12.openBrowser(r.HELP_LINK)},r.prototype.onConsoleButtonClicked=function(){this._headerDispatch.toggleConsole()},r.prototype.onEmulationButtonClicked=function(){var n=this;i.F12.Debugger.getIsAtBreakpoint()||i.F12.Communications.callMethod(i.F12.PluginId.Emulation,"getemulationquickaccessmenuitems").done(function(t){var e,f,r,u;for(n._emulationContextMenu&&(n._emulationContextMenu.dispose(),n._emulationContextMenu=null),e=function(n){return function(){return n}},f=[],r=0;r<t.length;r++)u=t[r],f.push({id:JSON.stringify(u.id),label:u.label,type:0,checked:e(u.checked),cssClass:"headerMenuRow"});n._emulationContextMenu=i.ContextMenu.create(f,"emulationContextMenu",null,null,function(t,r){i.F12.Debugger.getIsAtBreakpoint()||i.F12.Communications.callMethod(i.F12.PluginId.Emulation,"setemulationdocmode",[r.id]);n._emulationMenu.focus()});n._emulationContextMenu.show(n._emulationMenu.getBoundingClientRect().left,window.innerHeight)})},r.prototype.onDockStateChanged=function(n){n.isDocked?document.body.classList.add("dockedWindow"):document.body.classList.remove("dockedWindow")},r.prototype.onBreakStateChange=function(n){Common.ButtonHelpers.changeButtonStatus(this._bringIEToForegroundButton,!n);Common.ButtonHelpers.changeButtonStatus(this._dockButton,!n);Common.ButtonHelpers.changeButtonStatus(this._emulationMenu,!n);n?this._tabControl.showBadge(i.F12.PluginId.Debugger,4,i.Resources.getString("BadgeDebuggerPaused")):this._tabControl.hideBadge(i.F12.PluginId.Debugger)},r.prototype.onConsoleStateChanged=function(n){var t=n?"HideConsoleButtonTooltip":"ShowConsoleButtonTooltip";Common.ButtonHelpers.setButtonTooltip(this._consoleButton,t);Common.ButtonHelpers.changeButtonStatus(this._consoleButton,!0,n)},r.prototype.onResize=function(){var n=this._titleTextHidden.scrollWidth>this._titleArea.clientWidth+this._titlePadding.clientWidth-this._titlePaddingWidth;this._titlePadding.style.display=n?"none":"block"},r.prototype.createButtonHandlers=function(n,t){var i=this;n.addEventListener("click",function(){t.call(i)});n.addEventListener("keydown",function(r){n.disabled||r.keyCode!==32&&r.keyCode!==13||t.call(i)})},r.prototype.initialize=function(n){var r=this,u;if(this._tabControl=new t.TabControl,this._tabControl.addEventListener("tabClicked",function(n){return r.onTabSelectedByControl(n)}),Common.ButtonHelpers.setupButton(this._titleCloseButton,"CloseButtonTooltip",function(){return r.onCloseButtonClicked()},!0),Common.ButtonHelpers.setupButton(this._titleMaxButton,"MaximizeButtonTooltip",function(){return r.onMaxButtonClicked()},!0),Common.ButtonHelpers.setupButton(this._titleRestoreButton,"RestoreButtonTooltip",function(){return r.onRestoreButtonClicked()},!0),Common.ButtonHelpers.setupButton(this._titleMinButton,"MinimizeButtonTooltip",function(){return r.onMinButtonClicked()},!0),Common.ButtonHelpers.setupButton(this._closeButton,"CloseButtonTooltip",function(){return r.onCloseButtonClicked()},!0),Common.ButtonHelpers.setupButton(this._dockButton,"DockButtonTooltip",function(){return r.onDockButtonClicked()},!0),Common.ButtonHelpers.setupButton(this._undockButton,"UndockButtonTooltip",function(){return r.onDockButtonClicked()},!0),Common.ButtonHelpers.setupButton(this._bringIEToForegroundButton,"BringIEToForegroundButtonTooltip",function(){return r.onBringToForgroundButtonClicked()},!0),Common.ButtonHelpers.setupButton(this._helpButton,"HelpButtonTooltip",function(){return r.onHelpButtonClicked()},!0),Common.ButtonHelpers.setupButton(this._consoleButton,"ShowConsoleButtonTooltip",function(){return r.onConsoleButtonClicked()},!0),Common.ButtonHelpers.setupButton(this._emulationMenu,"EmulationDisabledButtonTooltip",function(){return r.onEmulationButtonClicked()},!0),u=document.getElementById("overflowButton"),Common.ButtonHelpers.setupButton(u,"OverflownToolsButtonTooltip",function(){return r._tabControl.onOverflowButtonClicked()},!0),i.F12.Communications.registerMethodHandler("tabSelected",function(n){return r.onTabSelectedByFrame(n)}),i.F12.Communications.registerMethodHandler("windowstatechanged",function(){return r.onWindowStateChanged()}),i.F12.Communications.registerMethodHandler("windowActivation",function(n){return r.onWindowActivation(n)}),i.F12.Communications.registerMethodHandler("toggleAlwaysRefreshFromServer",function(n){return r.onToggleAlwaysRefreshFromServer(n)}),i.F12.Communications.registerMethodHandler("refreshPage",function(){return r.onRefreshPage()}),i.F12.Communications.registerMethodHandler("consoleErrorsUpdated",function(n){return r.onConsoleErrorsUpdated(n)}),i.F12.Communications.registerMethodHandler("profilerstarted",function(n){return r.onProfilerStateUpdated(n,!0)}),i.F12.Communications.registerMethodHandler("profilerstopped",function(n){return r.onProfilerStateUpdated(n,!1)}),i.F12.Communications.registerMethodHandler("emulationStateUpdated",function(n,t){return r.onEmulationStateUpdated(n,t)}),i.F12.addEventListener("run",function(){return r.onDebuggerExecutionStateUpdated(!1)}),i.F12.addEventListener("break",function(){return r.onDebuggerExecutionStateUpdated(!0)}),this.onWindowStateChanged(),n){this._rpcWrapper=new t.RpcWrapper;this._rpcWrapper.onLoadComplete(this);window.addEventListener("resize",function(){return r.onResize()})}i.F12.Communications.registerMethodHandler("PopupHidden",function(){var n=document.getElementById("overflowButton");return n.classList.remove("menuOpen"),r._emulationMenu.classList.remove("menuOpen"),0});i.F12.Communications.registerMethodHandler("OverflowPopupShown",function(){var n=document.getElementById("overflowButton");return n.classList.add("menuOpen"),0});i.F12.Communications.registerMethodHandler("EmulationPopupShown",function(){return r._emulationMenu.classList.add("menuOpen"),0});Common.NavigationUtilities.registerNavigationFrames([Common.NavigationUtilities.makeNavigationFrameFromCallback(document.body,function(){return r._tabControl.selectedElement?r._tabControl.selectedElement:document.getElementById("overflowButton")})]);Common.NavigationUtilities.registerFocusHandlers(i.F12.PluginId.Header);this._jmcService.initialize().done(function(){r._traceWriter.raiseEvent(801);r.initializeTabs();window.external.addEventListener("break",function(){return r.onBreakStateChange(!0)});window.external.addEventListener("run",function(){return r.onBreakStateChange(!1)});r.onBreakStateChange(i.F12.Debugger.getIsAtBreakpoint());i.F12.addEventListener("consolestatehidden",function(){return r.onConsoleStateChanged(!1)});i.F12.addEventListener("consolestateshown",function(){return r.onConsoleStateChanged(!0)});r.onConsoleStateChanged(i.F12.getIsShowingConsole());i.F12.addEventListener("dockstatechanged",function(n){return r.onDockStateChanged(n)});r.onDockStateChanged(i.F12.getHostInfo());r._traceWriter.raiseEvent(802);window.setImmediate(function(){i.F12.notifyOnToolActivated()});r._isReady=!0;r._testEventObject.fireEvent("headerReady");i.F12.TraceWriter.markToolReady()})},r.prototype.initializeTabs=function(){for(var c,r,e,l,o,t,u=this._headerDispatch.getPluginInfos(),n=0;n<u.length;n++){var t=u[n].id,h=u[n].scriptId,s=u[n].scriptId,f=u[n].scriptId;try{c=this._headerDispatch.readManifestFile(h+"/manifest.json");r=JSON.parse(c);r.name&&(s=r.name);r.f12&&typeof r.f12.localized_tooltip_id=="number"&&(e=this._headerDispatch.getLocalizedString(r.f12.localized_tooltip_id),e&&(f=e.replace("{0}",""),f=f.trim(),l=n+1,s=e.replace("{0}","(Ctrl+"+l+")")))}catch(a){}o=1;t===i.F12.PluginId.Dom?o=0:t===i.F12.PluginId.Console&&(o=2);this._tabControl.addTab(t,h,f,s,o)}t=this._headerDispatch.currentTabId;t!==-1&&this._tabControl.selectTabById(t);this._tabControl.onResize()},r.prototype.onTabSelectedByControl=function(n){this._headerDispatch.activateTab(n)},r.prototype.onTabSelectedByFrame=function(n){return this._tabControl.selectTabById(n,!1),!0},r.prototype.onWindowStateChanged=function(){var n=this._headerDispatch.isMaximized;return this._titleMaxButton.style.display=n?"none":"block",this._titleRestoreButton.style.display=n?"block":"none",!0},r.prototype.onWindowActivation=function(n){return n?(document.body.classList.remove("inactiveWindow"),document.getElementById("overflowButton").classList.remove("inactiveWindow")):(document.body.classList.add("inactiveWindow"),document.getElementById("overflowButton").classList.add("inactiveWindow")),!0},r.prototype.onToggleAlwaysRefreshFromServer=function(n){return this._rpcWrapper.toggleAlwaysRefreshFromServer(n),!0},r.prototype.onRefreshPage=function(){return this._rpcWrapper.refreshPage(),!0},r.HELP_LINK="http://go.microsoft.com/fwlink/?LinkID=285879",r}();t.HeaderControl=r})(i=t.Header||(t.Header={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(){}return i.main=function(){t.addEventListener("pluginready",function(){i.Header=new n.HeaderControl});Common.ErrorHandling.addPromiseErrorListener()},i}();n.App=i})(t=n.Header||(n.Header={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}))
//# sourceMappingURL=HeaderMerged.min.js.map
�PNG


IHDR8�0��gAMA���asRGB���	pHYs���o�dIDATx���'pa���T�:?'�x��;,~R�y��;,/p�t��^ަ���RW�̕�?s���/�n��Ax�d`����C�l�i�Jl��JpL�!��':�A���A�:�U�`BH	��$ȃ":�<��"�#��^����m��-ի�A1�TcMB��h����*G4S$�&T�v� \�]��.-�	n�b;5�jtb<�ZZ�K0�Ղ��&@�b-�'�J�T�ׂ��Y]�_}k�-|[���m��·�o��-|[����!\�.�UIEND�B`��PNG


IHDR8��h�	pHYs���+TPLTE�����������������������������������������������������������������������������4_�x�tRNS!(?GNP`lw������������Ĝ� cHRMz%������u0�`:�o�_�F�IDATx��Y�0D
��/!l���������EO��G�P��f\���Y$��r����]�;`�+������s��~i3�'�`r�Pn0T[���B��~+�̅mԠۻ*1�rS>�����&�m0D�aIC0]�I�^BPz�bP�a##tj��B����!-K��P�}�x�2�l~&���i��qxNV^�����zY�B/+7�f�ݬܠ�� �eiCtj��!Y���5	����IEND�B`��PNG


IHDR8�0��sRGB��, cHRMz&�����u0�`:�p��Q<	pHYs��WIDATx�ŖG��0EuG�[_��^	>BOXj?W�!�N�
���a�q�i�3]�����&�PoB��?�b���)�	��^�G�GϾ�<v�Za��ߩ�:���&�B��-�XP!�����++�R7��3{��?no�@S_�a�����!����Cd�>q@�OX
ay}p�0a�t{P�0]�����]e��^9��5)����Ԅ>	{MH�(��I��b�h��G�E�M,2�Ri��1�J�=�|�Ix�ԫ�0�r����a�!2m�,m��0E���N��Feƾ���x2�[�6Qsl���~����$��F�B/�#�̣g�T;X�0�Ȁ���
���pN��p!�Ζd,�
�eYM�J��\�k�=?}&�?w���:8�[-���ۘ�����ǟy6��2���Wa��1��a����m�*�$���I��ɑ���'a�	�e��>	BZ,��"K��hb���@��E�R*
4vY��'ӂ�3	ϑzm��Y��Q�6�4���^�MY��Ȳ����¨���a{s�C���1�&j�m���o��(P�Xu�IEND�B`��PNG


IHDR8��h�	pHYs���+TPLTE���������������������������������������������������������������������������J���.&�tRNS!(?GNP`lw������������Ĝ� cHRMz%������u0�`:�o�_�F�IDATx�Փ��0D͖�Cا���,T,I}ꅹEO9cѮ@�fX���: [a��T������BE�*�h�ŲS�����g'aRn��;U=��!����fg�U;5h��rL��)�����P��B�Ɯ�`2CS���jQ�A�
��ඤ0Ђ�#,2m�@��_��11>1xye��3�L>M���:<�+�U?�rAOWt�����m��X����| ޻b�{W�����=�+�,��;;IEND�B`��PNG


IHDR8�0��	pHYs���+ cHRMz%������u0�`:�o�_�F	IDATx��/o�@�O,˖%�~v��s�"LΡ	��"s��G ��FU�X&*�b�t�m�%֕�h�J�Kh{�=�{�����#��x\U�S�-�ӽ�)1��-�s*2�+��&�D�mzV&���1��:�bu�J�p��g�؀b�u�7
�kS�X�ņ4W=.��͞@%�Wh�N��Ho�-v :��Ԓ6�5������4�+ִ)י�nT �B����T2%F+��#(�����T2UF]�_xrv�,EQ�4zLZ�vAA��`[lHF�0��1���9ҹ��Ϩ	�r
��4��IckR0T4��%�UMi�M�-p�d���u�"��Wmm+p���)6��4Ҽs�<e��刑�!*�cb.�\��Q������h�����[��z����y��`
��$(���z�A��i�E�� 
`�[�
���P�I�)o�(h�[(�-�9o#�-`�[D�P�,2/|�ֶ�xu@�-
oQx��x�/�/��=�IEND�B`��PNG


IHDR `K���	pHYs���+?PLTENNPNNPNNPNNPNNPNNPNNPNNPNNPNNP��������������������������������:�tRNS 0P`�����ϟ�`P0 �ۤ5 cHRMz%������u0�`:�o�_�F�IDATx��A� EQDtF��u"�	TH���_Q���4A)Q��{�A�b���)�WK�J��XZ$$"�����Q8��j�0�������a����y��{�@����q�D�?� ��艦�%���T]F�|W^��q�(e�b�i����wd�jF�,V�i��j�c�/�%g��mV�4}jB��b����P�,9IEND�B`��PNG


IHDR `K���	pHYs���+-PLTE������������NNPNNPNNPNNP���������NNPNNPNNP!5BtRNS��ϟ��ϟ0 0 F��� cHRMz%������u0�`:�o�_�F�IDATx����� @�*(�k��s'1n���h⸀�	-m�|��3@�s��`���N$x`�E�<DEIjQ>S	U�]�
A @�p=Iz&
K���v�#ww���7�~h��퇶��y΃��X,Cr�:Ę<��Q�<DEIjQ>S	U�]��
A A�t=Iz&
K���v�#ww���7����?6IEND�B`��PNG


IHDR `�m�	pHYs���+	PLTENNP�����`�tRNS@��f cHRMz%������u0�`:�o�_�F>IDATx�c`�	PB4@�r ��E�A[�����c4}��(�f(V���� h���;ŀZ��IEND�B`��PNG


IHDR$le�
	pHYs���+PLTENNPNNP���0�¢tRNS@O�� cHRMz%������u0�`:�o�_�FnIDATx�c` ��(,�uY� ��Y i,������?1,���`o"�`�BcQ��3}™k,@aA������I`�E�Z�p�X��zAX@=]`o"�`�BcU��K�IEND�B`��PNG


IHDR6l��~	pHYs���+HPLTE���������������������������������������NNPNNPNNPNNPNNPNNPNNPNNPNNPNNPy>��tRNSP`������@0 0@`������۳ cHRMz%������u0�`:�o�_�F�IDATx����� Pk+h�����?m�h�aqlH�&�e�[��(a�g�`���b�V�]�ٚEɇ��Z^������>fY�ޞ��("C�S,xq�`�.<���<B���,xq��\򍳛�;��kW*�l�%�eK
ዩbv�tY��[�#��0�������c1M6yF��,놵+=e��h��9���/S+�>�|��,���Ae�`�a�)�8y�}���Rj�U����y���Y��DcY���
��TxLIEND�B`��PNG


IHDR `�m�	pHYs���+	PLTENNP�����`�tRNS@��f cHRMz%������u0�`:�o�_�FQIDATx�c`�P�P�W@	E90�S�(E0%Dz�`�
0�>F�> ���� �6r`�Q�`<J��4���%�A'��7��IEND�B`��PNG


IHDR `|"p�	pHYs���+ cHRMz%������u0�`:�o�_�F�IDATx���	�0Do	)�R��K������
r7A�	��
�90_f`�~�}ߍhQ,��e>���R雩G��� >�F�To���`[�#&����FS˼�4���S��i:��p�>�}�D���z�ЍyvF���(
���2�Dۅq����#��a~��H#@���ZF����b�j��e^�ZKɩ��ݐ�+��c�^��?���i�ǡIEND�B`��PNG


IHDR `|"p�	pHYs���o�d cHRMz%������u0�`:�o�_�F�IDATx��	�0E-!��+�-!���)�R���A�%(fu�=r�'p����,��x�<�
Ű�r���~�X��.��;��Dp2�$�������Q�h�I�m�Y��]�wb����=g>��0`>�|��i���kD�]�6�˝R�%bEx�*G���J���<<��z�[wGI�}x&�5g�w�߉]�8�_�v�q{9IEND�B`��PNG


IHDR `�m�	pHYs���o�dPLTENNPNNPNNPNNP����fWtRNS

5�L� cHRMz%������u0�`:�o�_�FGIDATx�c`�`
����
}��Y`4}��$ ��`8p"[�f�	T�	f��`�p:A�b�@�Y\�T#�IEND�B`��PNG


IHDR `|"p�	pHYs���o�d cHRMz%������u0�`:�o�_�FQIDATx��ױ	!EA������
��c9f��6�����po���G}֒V��gҚ�+�!Yd�[�'�IEND�B`��PNG


IHDR `�m�	pHYs���o�dPLTENNPNNPNNPNNPNNPNNP���W�jtRNS

&M� cHRMz%������u0�`:�o�_�FvIDATx�c`�(��P(L�J`A�r�D;���^`4}��`T��S(P"`2R*�d���p
J�@�@(@(ct�4�FJ��`�x���`	%��P��"=�,|�IEND�B`��PNG


IHDR `L�	pHYs���+	PLTENNP�����`�tRNS@��f cHRMz%������u0�`:�o�_�FNIDATx�c` h�Z�j��`0�`h�@gh0�g`:��`4|�����(�3�2`��
Ag�0�g`:���S˻�)�IEND�B`��PNG


IHDRE�/�QPLTE����������������������������������������������������������������������������=V��tRNS!(?GNP`lw������������Ĝ��IDATx�}�Y�0D͒�f	�����RhS�Od=ɲ��CE�yNif�tWiG�mye����nX�^X;!��T��ړ-`smd�A�����Pw�^����6��,�����7"��c�
j��T+�(i�'��C�:5fJ��B���VH\E4A�O4^>�xl9&r��hʡ�����U�hX	IEND�B`��PNG


IHDRE�/�QPLTE������������������������������������������������������������������������������z��tRNS!(?GNP`lw������������Ĝ��IDATx�}��� CM�@������s醦�Г��8�!�x��m��*��K�/�̎��-K��J��f]�2����b3�}���6�S�#T&�H9ؾ�A�c��rz���0�~!F��k��
<^�!t��Q0�N�i�	�wXrӡj�(���}%��^A�O
^_��l�&z��j�s_aEJ&�IEND�B`��PNG


IHDRr
ߔIDATx�Ŗ�N�@��0&Ƅ����'���Z�Q:
[z֘��#l�j;�
,��XXQ�m��3�L2�À�Ws�d��\!Z�,�0	X�lI�o	�8���"��!ڸ]���6z9���#��\��K�T,�4,A
|;�kK��=B�W���,B1�mŽ�&7��-��G�'�C�4ؕ K�d�b�D�ZL]�g���W�pl�^�H�3���N�ռ/��B4�J�,X��~����t�
v	���Z��|�[����H�ظ�����E0V	)����P/�x�-�Kj�MX�x=��\/�Qc;�`e*8�K����K�$���]�Ʀ,>��mY��M[�38�����58�y�r=�e�e�eLe��Q��]�N�0�IEND�B`��PNG


IHDRr
ߔ�IDATx���'pa���T���I,ޝ�;,~R�y��;,/pg�Uz���z���y�3�S>�0�}��j;	L��;p̦]��H��E&�![t�R�Y����	Cd/�	[��P��&�,^��8`(�APX�ݗ�Y�8b(�QP��PT~P���'l��e��nP�2�7��rp��T�Y��;3�X#�3�O�y��xǼ$pȠ,.�4L���7���L=؍���IEND�B`��PNG


IHDRJ~�s	pHYs���+ cHRMz%������u0�`:�o�_�F�IDATx�c`�&����?��_�~
	��?�(�g�2����H3���=��7�h�7:���>FX;�5�[flp?HA;ܼG`M�wa�d�9��������>@!��;�̟�*
�v�������T;��i�qف�|lv�5�̇ف�kہ�S�$k���/��IEND�B`��PNG


IHDR� p+��	pHYs��	�iCCPxxڤ��Aƿg��|�m��۝w������m_��a׎�6f�ڈ٠vP�����D�W����h�l,+$��$�!�P$��5j�J�����x� �)��R��g1�`aZ%&�9')�+s>��m1C����,���Q�}���
q�`ţ)��9�G|��i��r��|үR��s�{�>����롒��������"��@x�}��1�G�Ơ��������tRN-7e,�^�]���"�cH� 0tg!��%�ȩ	��1��	0w�%|;D� `�}�6�8���:;�f;�9l|;ֶ���8p�Ѹ����`�Ȍ��,+V�r�0(0�sk��b�r��!�t@�v�u��3�אdJbƂxq�8ǑF:@M���<�T��ݭ)*Su���T'.a�
�5�5��bm_,V>Z����&
A�W���:���v�q?�ӓxF����@�wc3�}�_0!��
��&l�n@��,���C3:�x`����X�X_5f۶m۶m۶m۶m�Ɯ�Q4���L�G�i��M��v�:J��<]��t���KzG_(����(��8H�H�,ȍ�(�r���h����臡�)���X�M؅C8�K��Gx�O�O��q9��\�Kq��͸��<���B^�[y?��+|�_��_RI6)(e��4���[��d�/�e��rG^�W�T�8�R�i��������:U�Fݯg�����k�,�e��V�Z`�m���}v���;s����xEo�}�O�e��O�-�	���`��l۶m۶m۶m۶m;��A*��
@g0���>p<�!�.��š�-�•p/���_�C1��C�Q4-F;�9���<q\���t����'BH@r�
��O����8y@~P��*Dզ�Pc�e�~�����8���Iw���+�C�]�;#2i�Lc�3���\d޲���غlOv*��=Ǿ��
q
���,nw��‹|�߆ͯ�O�� ą"Bca��H8$<����H$.��O�dR(��ZJ��5�Y�,ș�rwy��G��$V�J	��2N٨\U~��Z@m��Pת�o���ךh#�u����E�V�}�~�Hb�4*݌���)���F�Hs�y�Jd��*Z��E�i���������Q��NKg���y�n^��;����d���ڛ����_���/����0��w"8�=�429r0�>�F�D{GWEo�P,{�ylZ�X�[<�W���/A���m۵9��l۶m۶m۶m�J���>�f�t��)���� uP$�|����ݐ[<D	�ޅ�A��q�a�������s�����-���ь�B���8��e�*C�hyt8z�Ì�Ɣ`v��"6
;�{�#�qu�K<���¯�d�a�"у�Bv���̚���On@�G�M�P�H�X�P*R&P�S���������A-CC=C�F�&�f��7�m�2�N�.�n�I�G_H�@�`�P�x���э���� S��/fe�t��9K
�]VV_�a��l�l�l;�vK��'�as�`N=�2�-;ɟ4���K����?n6n�I�.O9�=^�p�%>�_3�k~i�4�#zo�qA���`��s!	�T�caFa?����H��'QU���bBbIb��L��8	'�!I���d��')
�J��Ҳ�2we�e�d.d�e�d���"�v����hV��������V�����WUhT�T6TT�Tw�XբՎչՓկ5�5�5h�h�j��R�j��m�ݫ�qҙ�%�
�����K�__R����A�!���pֈ�(���X�8�䥉�I�)���tٌ�,����y��O[�YK:�X�����[;X/ڰؤ�>�U��C���ۗ9|u�q�wdqLwz��4�L��r�Eե���z����tr��h�Dy�x^{)yuy㽣|�h�������3�'��p8�l
�E?
6�	�)	��z�6N��%�5�8R!�/�6*+�k�{�Y�j�H,KlQܿ���{�F�K	B	͉��ԤOI�I��Z�3)|)
���Դ/i���
�W3$2z23K�`Y����s��1�Y˕���ȫ�'�g�-�(|]�V��i�N�J�L�hIo){i]EYa9�<��gEx��J�GUU��fՇ5:5�ʵ�u�u�"�
�
]��-M�M��t��-T-�䭥mĶ�v|{Q����Y؅�*�&t���R�V����3�7
�
�r
�	�Kό(���j������Lܝp�|14�e*n4�=����e������__�_�XtXz���}9u�R�ʼڳ&�����~��r3b�U�M�ݱ#�����{��q?�{Pw�s8u�yt~�v��$�x�|&|�|n|q�"�tYv�q5q�y}}���q cHRMz%������u0�`:�o�_�F�IDATx���
�P�4�v�ZY(t��X������!K��[���I��<����T�6��S��)��
<���bʟ��&�Q���^aM�>����Z������
kU>��;��+�������?WX��Q�������G}~��^a]����?�2'���L6�iIEND�B`��PNG


IHDR� p+��	pHYs��sRGB��, cHRMz&�����u0�`:�p��Q<�IDATx��
�0S=�
Q��@ ܅ĉ�`f�ck@�8��z�c�7Ƈ��9����'0�OzS���o���ѫ#l��~�fB�������&0�ot9������]������	��^������	�~A�F�~���n��0u�gi��W��"����>��n�LVX�IEND�B`�{
    "start_url": "header.html",
    "domain": "http://microsoft.com",
    "name": "Header",
    "version": "1.0",
    "f12": {
        "resource_aliases": {
            "Header": {
                "is_default": true
            },
            "Common": {
            }
        }
    }
}
//! Copyright (C) Microsoft. All rights reserved.
var F12,remoteHeader;(function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(){function t(){var t=this,i;this._port=toolUI.createPort("debuggerPort");toolUI.connect(this._port);this._rpc=new n.Tools.RPC.JsonRPCEndpoint("HEADER_SERVER",function(n,i,r){return t.jsonRpcMethodReceive(n,i,r)},function(n,i){return t.jsonRpcNotificationReceive(n,i)},function(n){t._port.postMessage(n)},function(n){t._port.addEventListener("message",function(t){n(t)})});this.attach();i=undefined;try{i=browser.document.location}catch(r){}this.onDocumentComplete(i);this.toggleAlwaysRefreshFromServer(!0)}return t.prototype.methodCall=function(n,t,i,r){this._rpc.jsonRpcMethodCall(n,t,i,r)},t.prototype.notify=function(n,t){this._rpc.jsonRpcNotification(n,t)},t.prototype.handleSelfTestEvent=function(n,t){var i=this.getSelfTestIFrameWindow();return i?i.handleSelfTestEvent?n.eventType==="initPage"?this.onInitSelfTestPage(i,t):(i.handleSelfTestEvent(n),t(!0),!0):!1:!1},t.prototype.onInitSelfTestPage=function(n,t){if(n.document.getElementById("selfTestPageUI"))t(!0);else{var i=n.document.createElement("script");i.onload=Common.RemoteHelpers.createSafeFunction(n,function(){return t(!0)});i.id="selfTestPageUI";i.src="selfTestPageUI.js";n.document.head.appendChild(i)}return!0},t.prototype.detach=function(){Common.RemoteHelpers.removeListener(toolUI,"detach",this._onDetach);Common.RemoteHelpers.removeListener(toolUI,"scripterror",this._onScriptError);Common.RemoteHelpers.removeListener(browser,"beforeScriptExecute",this._onBeforeScriptExecute);Common.RemoteHelpers.removeListener(browser,"inspectElement",this._onInspectElement);Common.RemoteHelpers.removeListener(browser,"viewSource",this._onViewSource)},t.prototype.attach=function(){Common.RemoteHelpers.addListener(toolUI,"detach",this._onDetach=this.detach.bind(this));Common.RemoteHelpers.addListener(toolUI,"scripterror",this._onScriptError=this.onScriptError.bind(this));Common.RemoteHelpers.addListener(browser,"beforeScriptExecute",this._onBeforeScriptExecute=this.onBeforeScriptExecute.bind(this));Common.RemoteHelpers.addListener(browser,"inspectElement",this._onInspectElement=this.onInspectElement.bind(this));Common.RemoteHelpers.addListener(browser,"viewSource",this._onViewSource=this.onViewSource.bind(this))},t.prototype.onScriptError=function(n){Common.ErrorHandlers.addErrorAdditionalInfo(n);this.notify("onScriptError",[JSON.stringify(n)])},t.prototype.getUid=function(n){return n?n===browser.document?"#root":n.nodeType===n.ELEMENT_NODE&&browser.getUniqueID?browser.getUniqueID(n):n.uniqueID:null},t.prototype.isAsyncMethod=function(n){return n==="handleSelfTestEvent"?!0:!1},t.prototype.jsonRpcMethodReceive=function(n,t,i){var r=!1,u;this.isAsyncMethod(n)&&(t=t||[],t.push(i),r=!0);u=t?this[n].apply(this,t):this[n].apply(this);r||i(u,undefined)},t.prototype.jsonRpcNotificationReceive=function(){},t.prototype.onBeforeScriptExecute=function(n){n&&n.browserOrWindow&&(n=n.browserOrWindow);var t;try{t=Common.RemoteHelpers.getDefaultView(n.document)}catch(i){return}if(t===Common.RemoteHelpers.getDefaultView(mainBrowser.document))this.onDocumentComplete(t.location)},t.prototype.onInspectElement=function(n){if(n.target){var t=this.getUid(n.target);!t&&n.target.parent&&(t=this.getUid(n.target.parent));this.notify("onInspectElement",[t])}},t.prototype.onViewSource=function(n){this.notify("onViewSource",[n.url])},t.prototype.onDocumentComplete=function(n){var i=this,t;this.notify("onDocumentComplete",[n?n.href:""]);t=this.getSelfTestIFrameWindow();t&&t.registerEventListener&&t.registerEventListener(Common.RemoteHelpers.createSafeFunction(t,function(n){return i.notify("onSelfTestPageEvent",[n])}))},t.prototype.toggleAlwaysRefreshFromServer=function(n){try{resources.alwaysRefreshFromServer=n}catch(t){}return!0},t.prototype.refreshPage=function(){return browser.refresh(),!0},t.prototype.getSelfTestIFrameWindow=function(){var t=Common.RemoteHelpers.getDefaultView(browser.document),i=t.document.getElementById("selftest-runner"),n;return i?(n=Common.RemoteHelpers.getValidWindow(t,i.contentWindow),n.isValid?n.window:null):null},t}();t.RemoteHeader=i})(i=t.Header||(t.Header={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));remoteHeader=new F12.Host.Header.RemoteHeader
//# sourceMappingURL=remote.min.js.map
/*  The following tokens will need to be updated to new colors in the manifest:
        plugin-network-grid-path-color
        plugin-network-grid-path-color-highlighted
        plugin-network-grid-response-cache-color
        plugin-network-grid-response-error-color
        plugin-network-tabpane-key-color
        plugin-network-tabpane-value-color
*/

* {
    box-sizing: border-box;
}

html, body {
    -ms-high-contrast-adjust: none;
    color: TRANSPARENT; /*[{plugin-color}]*/
    cursor: default;
    height: 100%;
    width: 100%;
}

.clippedText {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#rootContainer {
    -ms-grid-rows: auto 1fr;
    -ms-grid-columns: 100%;
    background-color: TRANSPARENT; /*[{plugin-background-color}]*/
    display: -ms-grid;
    height: 100%;
    position: absolute;
    width: 100%;
}

.mainPanel {
    -ms-grid-row: 2;
}

.summary {
    -ms-grid-row: 1;
    -ms-grid-column: 1;
}

.splitter {
    background-color: TRANSPARENT; /*[{plugin-network-splitter}]*/
    border-left-style: solid;
    border-left-color: TRANSPARENT; /*[{plugin-network-grid-border-color rgba(0.07)}]*/
    border-left-width: 3px;
    height: 100%;
}

.splitterBody {
    background-color: TRANSPARENT; /*[{plugin-network-grid-column-header-background-color}]*/
    height: 100%;
    width: 11px;
}

.splitterButton {
    background-color: TRANSPARENT; /*[{plugin-border-color}]*/
    color: white;
    cursor: pointer;
    font-family: 'Segoe UI';
    font-weight: 600;
    height: 27px;
    padding-top: 5px;
    text-align: center;
    width: 11px;
}

.network-grid {
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.network-grid-header {
    background-color: transparent;
    border-right: TRANSPARENT; /*[1px solid {plugin-network-grid-border-color rgba(0.07)}]*/
    box-sizing: border-box;
    height: 3.3em;
    left: 0px;
    overflow: hidden;
    position: absolute;
    right: 0px;
    top: 0px;
    z-index: 6;
}

.network-grid-canvas {
    background-color: transparent;
    bottom: 0px;
    box-sizing: border-box;
    color: TRANSPARENT; /*[{plugin-color}]*/
    left: 0px;
    overflow: auto;
    position: absolute;
    right: 0px;
    top: 0px;
}

.has-header .network-grid-canvas {
    top: 39px;
}

.header {
    display: flex;
    flex-direction: column-reverse;
}

.headersPane .grid-cell {
    text-indent: 12px !important;
}

.multi-line-grid-cell {
    -ms-text-overflow: ellipsis;
    text-overflow: ellipsis;
    border: currentColor;
    border-bottom: TRANSPARENT; /*[1px solid {plugin-network-grid-border-color rgba(0.07)}]*/
    border-right: TRANSPARENT; /*[1px solid {plugin-network-grid-border-color rgba(0.07)}]*/
    cursor: default;
    display: table-cell;
    float: left;
    height: 3.0em;
    overflow: hidden;
    padding: 2px;
    position: relative;
    text-align: left;
    text-indent: 2px;
    vertical-align: middle;
    white-space: nowrap;
    width: 100px;
}

.grid-gutter-header {
    background-color: transparent;
}

.grid-gutter-row {
    padding-left: 7px;
    padding-top: 3px;
}

.grid-row-normal {
    border: none;
}

.grid-cell:not(:last-child) {
    border-right: TRANSPARENT; /*[1px solid {plugin-network-grid-border-color rgba(0.07)}]*/
}

.keyvalue-grid {
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.keyvalue-grid-row-normal {
    width: 100% !important;
    border-bottom: TRANSPARENT; /*[1px solid {plugin-network-grid-border-color rgba(0.07)}]*/
}

.expanderRow {
    border-top: TRANSPARENT; /*[2px solid {plugin-network-grid-border-color rgba(0.07)}]*/
    font-weight: bold;
}

    .expanderRow > span {
        padding-left: 15px;
    }

.grid-row[id="row_GridControl_0"] .expanderRow {
    border-top: none;
}

#selectionPanel .BPT-tabControl .tabContentPane {
    color: TRANSPARENT; /*[{plugin-network-tabpane-key-color}]*/
}

.key-string {
    color: TRANSPARENT; /*[{plugin-network-tabpane-key-color}]*/
}

    .key-string:after {
        content: ": ";
    }

.value-string { /*right hand side of pairs*/
    color: TRANSPARENT; /*[{plugin-network-tabpane-value-color}]*/
}

.status-widget {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin: 0 3px -2px 3px;
}

.status-ok {
    background-image: url("Images/NetworkStatus-OK.png"); /*[url({f12-network-image-status-ok})]*/
    background-size: 14px;
}

.status-error {
    background-image: url("Images/NetworkStatus-Error.png"); /*[url({f12-network-image-status-error})]*/
    background-size: 14px;
}

.status-warning {
    background-image: url("Images/NetworkStatus-Warning.png"); /*[url({f12-network-image-status-warning})]*/
    background-size: 14px;
}

.cellStyle-cachedResponse { /*cached response*/
    color: TRANSPARENT; /*[{plugin-network-grid-response-cache-color}]*/
}

.grid-row-selected .cellStyle-cachedResponse {
    color: TRANSPARENT; /*[{plugin-network-grid-response-selected-cache-color}]*/
}

.grid-row:hover .cellStyle-cachedResponse {
    color: TRANSPARENT; /*[{plugin-network-grid-response-selected-cache-color}]*/
}

.grid-row-selected-blur .cellStyle-cachedResponse {
    color: TRANSPARENT; /*[{plugin-network-grid-response-blur-cache-color}]*/
}

.cellStyle-errorResponse { /*Error response is red*/
    color: TRANSPARENT; /*[{plugin-network-grid-response-error-color}]*/
}

.grid-row-selected .cellStyle-errorResponse {
    color: TRANSPARENT; /*[{plugin-network-grid-response-selected-error-color}]*/
}

.grid-row:hover .cellStyle-errorResponse {
    color: TRANSPARENT; /*[{plugin-network-grid-response-selected-cache-color}]*/
}

.grid-row-selected-blur .cellStyle-errorResponse {
    color: TRANSPARENT; /*[{plugin-network-grid-response-blur-error-color}]*/
}

.cookiesPane .key-string {
    padding-left: 15px;
}

.BPT-Toolbar .BPT-button.clearCacheButton .buttonIcon {
    background-image: url(''); /*[url({image-clear-cache})]*/
}

.BPT-Toolbar .BPT-button.clearCookiesButton .buttonIcon {
    background-image: url(''); /*[url({image-clear-cookies})]*/
}

.BPT-Toolbar .BPT-button.clearOnNavigateButton .buttonIcon {
    background-image: url(''); /*[url({image-clear-on-navigate})]*/
}

.BPT-Toolbar .BPT-button.clearSessionButton .buttonIcon {
    background-image: url(''); /*[url({image-clear-session})]*/
}

.BPT-Toolbar .BPT-button.openButton .buttonIcon {
    background-image: url(''); /*[url({image-open})]*/
}

.BPT-Toolbar .BPT-button.refreshServerButton .buttonIcon {
    background-image: url(''); /*[url({image-refresh-server})]*/
}

.BPT-Toolbar .BPT-button.saveButton .buttonIcon {
    background-image: url(''); /*[url({image-save})]*/
}

.BPT-Toolbar .BPT-button.startButton .buttonIcon {
    background-image: url(''); /*[url({image-start})]*/
}

.BPT-Toolbar .BPT-button.stopButton .buttonIcon {
    background-image: url(''); /*[url({image-stop})]*/
}

.BPT-Toolbar .BPT-button .buttonText {
    color: TRANSPARENT; /*[{plugin-network-toolbar-button-text-color}]*/
}

.BPT-Toolbar .BPT-button:hover .buttonText {
    color: TRANSPARENT; /*[{plugin-network-toolbar-button-hover-text-color}]*/
}

.BPT-Toolbar .BPT-button.BPT-popupActive .buttonText {
    color: TRANSPARENT; /*[{plugin-network-toolbar-button-popup-text-color}]*/
}

.BPT-Toolbar .BPT-button.pressed .buttonText {
    color: TRANSPARENT; /*[{plugin-network-toolbar-button-pressed-text-color}]*/
}

.BPT-tabControl ul.tabBar li {
    padding: 3px 8px 2px 8px;
}

.BPT-tabControl ul.tabBar {
    padding-top: 3px;
}

.tabHeader > .beforeBarContainer {
    width: 6px;
}

.requestResponseSelector {
    height: 24px;
    border-bottom: 1px solid #CBCDDA;
    padding-bottom: 1px;
    padding-left: 5px;
}

    .requestResponseSelector ul.tabBar li {
        background: transparent;
        border: none;
        color: TRANSPARENT; /*[{plugin-color}]*/
        padding-top: 0px;
        margin-left: 2px;
    }

        .requestResponseSelector ul.tabBar li.disabled {
            color: TRANSPARENT; /*[{plugin-color rgba(0.5)}]*/
        }

        .requestResponseSelector ul.tabBar li.active:not(.disabled) {
            border: none;
        }

.BPT-Toolbar .BPT-button.filterContentTypeMenuButton {
    background: TRANSPARENT; /*[{plugin-background-color}]*/
    height: 23px;
    padding-top: 3px;
}

    .BPT-Toolbar .BPT-button.filterContentTypeMenuButton.longMenu {
        position: relative;
        z-index: 3000; /* Should be greater than .BPT-popup's z-index */
    }

        .BPT-Toolbar .BPT-button.filterContentTypeMenuButton.longMenu.BPT-popupActive {
            border-bottom: none;
            margin-bottom: 1px;
        }

    .BPT-Toolbar .BPT-button.filterContentTypeMenuButton .buttonIcon {
        background-image: url(''); /*[url({image-filtering-options})]*/
        width: 27px;
    }

.BPT-menuControl {
    border-top-color: transparent;
}

    .BPT-menuControl.longMenu {
        border-top-color: TRANSPARENT; /*[{f12-toolbar-button-selected-border-color}]*/
    }

.editorControlContainer {
    height: calc(100% + 22px);
    overflow: visible;
    width: 100%;
}

    .editorControlContainer .BPT-button.editorButtonContainer {
        height: 20px;
        margin-top: 1px;
        margin-right: 2px;
        padding: 1px;
        width: 20px;
    }

    .editorControlContainer .editorToolbar {
        height: 0px;
        padding-right: 20px;
        position: relative;
        text-align: right;
        top: -23px;
    }

        .editorControlContainer .editorToolbar .editorButton {
            background-size: 16px 48px;
            height: 16px;
            width: 16px;
        }

        .editorControlContainer .editorToolbar .BPT-button.prettyPrintButton .editorButton {
            background-image: url(''); /*[url({image-toggle-pretty-print})]*/
        }

        .editorControlContainer .editorToolbar .BPT-button.wordWrapButton .editorButton {
            background-image: url(''); /*[url({image-toggle-word-wrap})]*/
        }

    .editorControlContainer .editorElement {
        height: calc(100% - 21px);
        width: 100%;
    }

.BPT-button:hover .editorButton {
    background-position-y: -16px;
}

.BPT-button.checked .editorButton {
    background-position-y: -16px;
}

.BPT-button.disabled .editorButton {
    background-position-y: -32px;
}

.imageControlContainer {
    height: 100%;
    overflow: auto;
    padding-bottom: 15px;
}

    .imageControlContainer .imageLabel {
        font-weight: 500;
        font-size: 16px;
        padding: 10px;
    }

    .imageControlContainer .bodyImage {
        background-image: url(''); /*[url({image-checkered-background})]*/
        box-shadow: 0px 0px 10px #000000;
        margin-bottom: 5px;
        margin-left: 15px;
        margin-top: 15px;
        max-width: calc(100% - 30px);
    }

.keyValuePair {
    margin-top: 5px;
    margin-bottom: 2px;
}

.imageControlContainer .keyValuePair {
    margin-left: 15px;
    margin-right: 15px;
}

.redirectionInfo .keyValuePair {
    -ms-grid-columns: auto 1fr;
    display: -ms-grid;
}

    .redirectionInfo .keyValuePair .key-string {
        -ms-grid-column: 1;
        display: inline-block;
        margin-right: 4px;
    }

    .redirectionInfo .keyValuePair .value-string {
        -ms-grid-column: 2;
        display: inline-block;
    }

    .redirectionInfo .keyValuePair .BPT-FileLink {
        border: 0;
        display: inline-block;
        width: 100%;
    }

.timingsView {
    padding: 5px 15px;
    width: 330px; /* non-expanding width identical to the minimum width of the selection view */
}

.timingsGanttChart .keyValuePair {
    display: -ms-grid;
    -ms-grid-columns: 100px 1fr; /* Leave extra space for timings labels */
}

    .timingsGanttChart .keyValuePair .key-string {
        -ms-grid-column: 1;
        white-space: normal;
    }

    .timingsGanttChart .keyValuePair .value-string {
        -ms-grid-column: 2;
        color: TRANSPARENT; /*[{plugin-color}]*/
        /* Leave space for timing labels to overflow on the right */
        overflow: visible;
        padding-right: 70px;
        white-space: nowrap;
    }

        .timingsGanttChart .keyValuePair .value-string > span {
            display: inline-block;
            height: 15px;
        }

.redirectionInfo > hr {
    background-color: TRANSPARENT; /*[{plugin-border-color}]*/
    border: 0;
    height: 1px;
    margin: 15px 0px;
}

.redirectionInfo > .redirectionError {
    margin-top: 10px;
    color: TRANSPARENT; /*[{plugin-font-console-error-color}]*/
}

.monaco-editor.vs .searchTermDecoration {
    background-color: TRANSPARENT; /* [{plugin-font-editor-search-result-background-color rgba(0.5)}]*/
    border: TRANSPARENT; /* [solid 1px {plugin-font-editor-search-result-background-color}]*/
}

.monaco-editor.vs-dark {
    background-color: TRANSPARENT; /* [{plugin-background-color}]*/
}

.selectedRow {
    background-color: rgb(120, 200, 255) !important;
}

.icon-tree-collapsed {
    background: "../Common/images/itemCollapsedIcon.png"; /*[url({vs-image-icon-tree-collapsed}) no-repeat !important]*/
    background-size: 10px 10px !important;
    margin: 2px 6px 0px 16px;
}

.icon-tree-expanded {
    background: "../Common/images/itemExpandedIcon.png"; /*[url({vs-image-icon-tree-expanded}) no-repeat !important]*/
    background-size: 10px 10px !important;
    margin: 2px 6px 0px 16px;
}

.gridKeyValueViewer,
.bodyView {
    height: 100%;
    width: 100%;
}

    .gridKeyValueViewer > .noDataLabel,
    .bodyView > .resourceViewerContainer > .noDataLabel {
        margin: 5px 15px 5px 15px;
    }

    .gridKeyValueViewer > .gridContainer,
    .bodyView > .resourceViewerContainer {
        overflow-y: visible;
        width: 100%;
    }

    .gridKeyValueViewer > .gridContainer {
        height: 100%;
    }

    .gridKeyValueViewer .grid-cell {
        width: 100% !important;
    }

    .gridKeyValueViewer .grid-content-spacer {
        width: 100% !important;
    }

    .bodyView > .resourceViewerContainer {
        height: calc(100% - 25px);
    }

#keyValuePairList {
    overflow-x: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timingsWaterfallColumnHeader {
    padding-left: 2px;
    width: 100%;
}

.timingsWaterfallColumnHeader .ruler-scale-mark-image-position {
    top: auto;
    bottom: 0px;
}

.waterfallItem {
    position: relative;
}

    .waterfallItem > .waterfallItemBar {
        height: 18px;
        margin-top: 6px;
    }

.grid-header-column {
    background-color: TRANSPARENT; /*[{plugin-network-grid-column-header-background-color}]*/
    border-bottom: TRANSPARENT; /*[1px solid {plugin-treeview-content-inactive-selected-background-color}]*/
    border-left: TRANSPARENT; /*[1px solid {plugin-treeview-content-inactive-selected-background-color}]*/
    border-right: TRANSPARENT; /*[1px solid {plugin-network-grid-border-color rgba(0.07)}]*/
    color: TRANSPARENT; /*[{plugin-color}]*/
}

    .grid-header-column > .title {
        color: TRANSPARENT; /*[{plugin-color}]*/
        padding: 2px 4px 4px 4px;
    }

    .grid-header-column:hover {
        background-color: TRANSPARENT; /*[{f12-toolbar-button-hover-color}]*/
        color: TRANSPARENT; /*[{f12-toolbar-button-hover-text-color}]*/
    }

        .grid-header-column:hover > .title {
            background-color: TRANSPARENT; /*[{f12-toolbar-button-hover-color}]*/
            color: TRANSPARENT; /*[{f12-toolbar-button-hover-text-color}]*/
        }

.grid-header-canvas :nth-child(1).grid-header-column {
    padding-left: 10px;
}

.grid-row {
    border-bottom: TRANSPARENT; /*[1px solid {plugin-network-grid-border-color rgba(0.07)}]*/
    color: TRANSPARENT; /*[{plugin-color}]*/
}

    .grid-row:not(.grid-row-selected) .expanderRow:hover,
    .grid-row:hover {
        background-color: TRANSPARENT; /*[{plugin-treeview-content-mouseover-background-color}]*/
        color: TRANSPARENT; /*[{plugin-treeview-content-mouseover-color}]*/
    }

    .grid-row:not(.grid-row-selected):not(:hover):not(.grid-row-selected-blur) .odd-row-cell {
        background-color: TRANSPARENT; /*[{plugin-network-grid-cell-odd-background-color}]*/
    }

    .grid-row:not(.grid-row-selected):not(:hover):not(.grid-row-selected-blur) .even-row-cell {
        background-color: TRANSPARENT; /*[{plugin-network-grid-cell-even-background-color}]*/
    }

    .grid-row:not(.grid-row-selected) .expanderRow {
        background-color: TRANSPARENT; /*[{plugin-network-grid-column-header-background-color}]*/
    }

.grid-row-selected-blur {
    background-color: TRANSPARENT; /*[{plugin-treeview-content-mouseover-background-color}]*/
    color: TRANSPARENT; /*[{plugin-treeview-content-mouseover-color}]*/
}

    .grid-row-selected-blur > .odd-row-cell,
    .grid-row-selected-blur > .even-row-cell {
        background-color: TRANSPARENT; /*[{plugin-treeview-content-mouseover-background-color}]*/
    }

.grid-row-selected, .grid-row-selected:hover {
    background-color: TRANSPARENT; /*[{plugin-treeview-content-selected-background-color}]*/
    color: TRANSPARENT; /*[{plugin-treeview-content-selected-color}]*/
}

.multi-line-grid-cell > div :nth-child(2):not(.urlWithNoName) { /*Second row URL color*/
    color: TRANSPARENT; /*[{plugin-network-grid-path-color}]*/
    font-size: 11px;
}

.grid-row:hover > .multi-line-grid-cell > div :nth-child(2):not(.urlWithNoName),
.grid-row-selected-blur > .multi-line-grid-cell > div :nth-child(2):not(.urlWithNoName) { /*Second row URL color when the row is highlighted*/
    color: TRANSPARENT; /*[{plugin-network-grid-path-color-highlighted}]*/
}

.grid-row-selected > .multi-line-grid-cell > div :nth-child(2):not(.urlWithNoName),
.grid-row-selected:hover > .multi-line-grid-cell > div :nth-child(2):not(.urlWithNoName) {
    color: TRANSPARENT; /*[{plugin-network-grid-path-color-selected}]*/
}

.grid-row:hover .key-string, .grid-row-selected-blur .key-string, .grid-row-current .key-string {
    color: TRANSPARENT; /*[{plugin-treeview-content-mouseover-color}]*/
}

.grid-row:hover .value-string, .grid-row-selected-blur .value-string, .grid-row-current .value-string {
    color: TRANSPARENT; /*[{plugin-treeview-content-mouseover-color}]*/
}

.summaryBar {
    -ms-grid-row: 3;
    background-color: TRANSPARENT; /*[{plugin-background-color}]*/
    border: TRANSPARENT; /*[1px solid {plugin-treeview-content-inactive-selected-background-color}]*/
    padding: 2px 2px 2px 2px;
    position: relative;
}

.summaryBarErrorSpan {
    border-right: TRANSPARENT; /*[1px solid {plugin-treeview-content-inactive-selected-background-color}]*/
    padding: 0px 25px 0px 25px;
}

    .summaryBarErrorSpan.badgeBackground {
        width: 16px;
        height: 16px;
        margin: 3px 0 0 4px;
        background-size: 16px;
        background-repeat: no-repeat;
        vertical-align: top;
        z-index: 2;
        display: inline;
        text-align: justify;
    }

        .summaryBarErrorSpan.badgeBackground.badgeError {
            background-image: url("Images/badgeError.png");
            background-position-y: -34px;
        }

            .summaryBarErrorSpan.badgeBackground.badgeError.hasErrors {
                background-position-y: 0px;
            }

    .summaryBarErrorSpan.hasErrors {
        color: TRANSPARENT; /*[{plugin-link-color}]*/
    }

        .summaryBarErrorSpan.hasErrors:hover {
            text-decoration: underline;
            cursor: pointer;
        }

.summaryBarRequestSpan {
    border-right: TRANSPARENT; /*[1px solid {plugin-treeview-content-inactive-selected-background-color}]*/
    padding: 0px 25px 0px 25px;
}

.summaryBarSizeSpan {
    border-right: TRANSPARENT; /*[1px solid {plugin-treeview-content-inactive-selected-background-color}]*/
    padding: 0px 25px 0px 25px;
}

.summaryBarTimeSpan {
    padding: 0px 25px 0px 25px;
}

.initiatorUrl {
    display: inline-block;
}

.bodyPane .monaco-scrollable-element > .visible {
    background: TRANSPARENT; /*[{plugin-scrollbar-background-color}]*/
}

.bodyPane .monaco-scrollable-element > .scrollbar {
    background: TRANSPARENT; /*[{plugin-scrollbar-face-color rgba(0.1)}]*/
    border: TRANSPARENT; /*[1px solid {plugin-scrollbar-face-color}]*/
}

    .bodyPane .monaco-scrollable-element > .scrollbar > .slider {
        background: TRANSPARENT; /*[{plugin-scrollbar-face-color rgba(0.7)}]*/
        border: TRANSPARENT; /*[1px solid {plugin-scrollbar-face-color}]*/
    }

        .bodyPane .monaco-scrollable-element > .scrollbar > .slider:hover {
            background: TRANSPARENT; /*[{plugin-scrollbar-face-color rgba(0.6)}]*/
        }

        .bodyPane .monaco-scrollable-element > .scrollbar > .slider.active {
            background: TRANSPARENT; /*[{plugin-scrollbar-face-color rgba(0.9)}]*/
        }<!DOCTYPE html>
<html class="hostedF12">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=11" />
    <meta http-equiv="Content-Type" content="text/html" />
    <meta http-equiv="format-detection" content="telephone=no">
    <meta charset="utf-8" />
    <title></title>

    <link id="toolwindow.css" rel="stylesheet" href="../common/toolwindow.css" type="text/css" data-plugin-theme="true">
    <link id="toolwindow.f12.css" rel="stylesheet" href="../common/toolwindow.f12.css" type="text/css" data-plugin-theme="true">
    <link id="toolwindow.vs.css" rel="stylesheet" href="../common/toolwindow.vs.css" type="text/css" data-plugin-theme="true">
    <link id="common_controls.css" rel="stylesheet" href="../common/Controls/controls.css" type="text/css" data-plugin-theme="true" data-necessary-for-tooltip="true" />

    <!-- Prototype-only CSS -->
    <link id="common.css" rel="stylesheet" href="common/common.css" type="text/css" />
    <link id="controls.css" rel="stylesheet" href="Controls/controls.css" type="text/css" />
    <link id="grid.css" rel="stylesheet" href="common/External/grid.css" type="text/css" />
    <link id="Ruler.css" rel="stylesheet" href="common/External/Ruler.css" type="text/css" data-plugin-theme="true" />

    <!-- Network project CSS -->
    <link id="network.css" rel="stylesheet" href="network.css" type="text/css" data-plugin-theme="true" data-necessary-for-tooltip="true" />
    <link id="network.vs.css" rel="stylesheet" href="network.vs.css" type="text/css" data-plugin-theme="true" />

    <!-- F12-build-only Monaco files -->
    <link rel="stylesheet" type="text/css" media="screen" href="../common/editor/vs/editor/css/vs-theme.css" data-plugin-theme="true" />
    <link rel="stylesheet" type="text/css" media="screen" href="../common/editor/vs/editor/css/vs-theme.css" />
    <link rel="stylesheet" type="text/css" media="screen" data-name="../common/editor/vs/editor/editor.main" href="../common/editor/vs/editor/editor.main.css" />
    <link rel="stylesheet" href="../common/editor/editor.css" type="text/css" data-plugin-theme="true" />

    <script type="text/javascript">
        window.require = {
            baseUrl: "res://" + window.location.host + "/23/common/editor",
            catchError: false
        };
    </script>

    <script type="text/javascript" src="../common/editor/vs/loader.js"></script>
    <script type="text/javascript" src="../common/editor/vs/editor/editor.main.js"></script>    

    <!-- F12-build-only Daytona files -->
    <script type="text/javascript" src="../Common/isDebugBuild.js"></script>
    <script type="text/javascript" src="../Common/plugin.js"></script>

    <!-- F12-build-only Script -->
    <script type="text/javascript" src="../Common/CommonMerged.js"></script>
    <script type="text/javascript" src="../Common/DiagShared/JSTreeGridControl.js"></script>

    <!-- Prototype-only Script -->
    <script type="text/javascript" src="common/External/JSTreeGridControl.js"></script>

    <!-- Diagnostics Hub -->
    <script type="text/javascript" src="common/External/DiagnosticsHub.js"></script>
    <script type="text/javascript" src="common/External/Controls.js"></script>

    <!-- Network project script -->
    <script type="text/javascript" src="NetworkMerged.js"></script>

    <script type="text/javascript" src="res://f12test.dll/23/selftest/SelfTestNetwork.js"></script>

    <script type="text/javascript">
        // The main entry point
        F12.Tools.Network.App.main();
    </script>
</head>
<body>
    <div id="rootContainer"></div>
</body>
</html>//! Copyright (C) Microsoft. All rights reserved.
var Common,ControlTemplates,__extends,F12;(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,r=function(){function n(){this._hostShellProxy=t.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Package.Extensions.Core.HostShell",{},!0)}return n.prototype.setStatusBarText=function(n,t){return this._hostShellProxy._call("setStatusBarText",n,t||!1)},n}(),i;n.HostShellProxy=r;i=function(){function n(){}return n.prototype.setStatusBarText=function(){return t.Promise.as(null)},n}();n.LocalHostShell=i})(t=n.Network||(n.Network={}))})(t=n.Extensions||(n.Extensions={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.DECIMAL_TO_PERCENTAGE=100,n.HAR_CREATOR_NAME="F12 Developer Tools",n.HAR_EXPORTED_VERSION="1.2",n.NETJSON_EXPORTED_IDENTITY="Perftools.Network.Netjson",n.NETJSON_EXPORTED_FILE_NAME="network.netjson",n.NETJSON_MAJOR_VERSION=0,n.NETJSON_MINOR_VERSION=1,n.WINDOWS_E_ABORT=-2147467260,n.CACHE_HIT_COLOR="#72c2b1",n.CONNECTING_COLOR="#117ad1",n.DOWNLOADING_COLOR="#71b252",n.PROXY_COLOR="#7564ff",n.RESOLVING_COLOR="#79d7f2",n.SENDING_COLOR="#bf3f00",n.SSL_COLOR="#903f8b",n.STALLED_COLOR="#ababab",n.WAITING_COLOR="#fcb714",n.DATA_RECEIVED_NOTIFICATION="Network.dataReceived",n.LOADING_FAILED_NOTIFICATION="Network.loadingFailed",n.LOADING_FINISHED_NOTIFICATION="Network.loadingFinished",n.REQUEST_SERVED_FROM_CACHE_NOTIFICATION="Network.requestServedFromCache",n.REQUEST_WILL_BE_SENT_NOTIFICATION="Network.requestWillBeSent",n.RESPONSE_RECEIVED_NOTIFICATION="Network.responseReceived",n}();n.Constants=t})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(t){function i(n){t.call(this,n||"Network.defaultSummaryItemLinkTemplate")}return __extends(i,t),Object.defineProperty(i.prototype,"summaryView",{get:function(){if(!this._summaryView){var t=document.getElementById("summaryView");t&&(this._summaryView=t.control);this._summaryView||n.Tools.Utility.Assert.failDebugOnly("Could not get the summary view - was its template or control modified?")}return this._summaryView},enumerable:!0,configurable:!0}),i.initialize=function(){Common.ObservableHelpers.defineProperty(i,i.ItemIdPropertyName,undefined,function(n){return n.onItemIdChanged()})},i.prototype.onApplyTemplate=function(){var r=this,n;t.prototype.onApplyTemplate.call(this);this.rootElement&&(n=this.getNamedElement(i.LinkClassName)||this.rootElement,n.addEventListener("click",function(){return r.navigateToRequest()}),n.addEventListener("keydown",function(n){return r.onKeydown(n)}))},i.prototype.onItemIdChanged=function(){for(var t=this.summaryView.items.getOriginalArray(),n=0;n<t.length;n++)if(t[n].id===this.itemId){this.content=t[n].fullURL;break}},i.prototype.onKeydown=function(n){(n.keyCode===32||n.keyCode===13)&&this.navigateToRequest()},i.prototype.navigateToRequest=function(){this.summaryView&&this.summaryView.setSelectedItem(this.itemId)},i.LinkClassName="_summaryLink",i.ItemIdPropertyName="itemId",i}(Common.Controls.ContentControl);t.SummaryItemLinkControl=i;i.initialize()})(i=t.Network||(t.Network={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.prototype.delay=function(n){this._id&&(window.clearImmediate(this._id),this._id=0);this._id=window.setImmediate(n)},n}();n.Delayer=t})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function t(){}return t.initialize=function(){t.ByteSizeToStringConverter=t.getByteSizeToStringConverter();t.DecimalToPercentageStringConverter=t.getDecimalToPercentageStringConverter();t.StatusCodeToClassNameConverter=t.getStatusCodeToClassNameConverter();t.TimeStampToStringConverter=t.getTimeStampToStringConverter();t.UrlHasNoNameConverter=t.getUrlHasNoNameConverter();t.UrlToFilenameConverter=t.getUrlToFilenameConverter();t.UrlToHostnameConverter=t.getUrlToHostnameConverter();t.UrlToPathConverter=t.getUrlToPathConverter();t.ZeroToEmptyStringConverter=t.getZeroToEmptyStringConverter();t.TimingsStateIsServedFromCacheConverter=t.timingsStateIsServedFromCacheConverter();t.TimeStampToTimeStringConverter=t.getTimeStampToTimeStringConverter()},t.getByteSizeToStringConverter=function(){return{convertTo:function(n){return n===undefined||n===null?"":Common.FormattingHelpers.getPrettyPrintSize(n)},convertFrom:null}},t.getDecimalToPercentageStringConverter=function(){return{convertTo:function(t){return t?t*n.Constants.DECIMAL_TO_PERCENTAGE+"%":"0%"},convertFrom:null}},t.getTimeStampToTimeStringConverter=function(){return{convertTo:function(n){return!n||n.nsec===undefined?"":Common.FormattingHelpers.getPrettyPrintTime(n,{showTimeOnly:!0})},convertFrom:null}},t.getTimeStampToStringConverter=function(){return{convertTo:function(n){return!n||n.nsec===undefined?"":Common.FormattingHelpers.getPrettyPrintTime(n)},convertFrom:null}},t.getStatusCodeToClassNameConverter=function(){return{convertTo:function(n){return n>=400?"cellStyle-errorResponse":""},convertFrom:null}},t.getUrlHasNoNameConverter=function(){return{convertTo:function(n){return t.getNameFromUrl(n)?!1:!0},convertFrom:null}},t.getUrlToFilenameConverter=function(){return{convertTo:function(n){return t.getNameFromUrl(n)},convertFrom:null}},t.getUrlToHostnameConverter=function(){return{convertTo:function(n){return t.getHostFromUrl(n)},convertFrom:null}},t.getUrlToPathConverter=function(){return{convertTo:function(n){var t,i,r;return n&&(t=n.split("?",1),t.length>0&&(i=t[0],r=i.lastIndexOf("/"),r>=0))?i.substr(0,r+1):""},convertFrom:null}},t.getZeroToEmptyStringConverter=function(){return{convertTo:function(n){return n?n.toString():""},convertFrom:null}},t.getHostFromUrl=function(n){var t,i;return n?(t=n.indexOf("://"),t!=-1&&(n=n.substr(t+3)),i=n.indexOf("/"),i!=-1&&(n=n.substr(0,i)),n):""},t.getNameFromUrl=function(n){if(n){var t=n.indexOf("?"),i=n.lastIndexOf("/",t>=0?t:n.length);if(i>=0)return n.substr(i+1)}return""},t.timingsStateIsServedFromCacheConverter=function(){return{convertTo:function(n){return n===1},convertFrom:null}},t}();n.Converters=t;t.initialize()})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i;(function(i){var r;(function(i){var r=function(){function r(){}return r.prototype.main=function(){var r=this;t.addEventListener("pluginready",function(){var u=new i.HUBBridge;r._hostShell=t.F12?new Common.Extensions.Network.LocalHostShell:new Common.Extensions.Network.HostShellProxy;i.Telemetry.initializeAnalytics();r.networkShell=new i.NetworkShell(u);t.F12&&n.Tools.Network.SelfTest&&i.SelfTest.init();r.onNetworkAppLoaded&&r.onNetworkAppLoaded()});Common.ErrorHandling.addPromiseErrorListener()},r.prototype.displayError=function(n){t.F12?t.F12.ErrorDisplay.show(n):this._hostShell&&this._hostShell.setStatusBarText(n,!0)},r}();i.NetworkApp=r;i.App=new r})(r=i.Network||(i.Network={}))})(i=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){var i;(function(t){"use strict";var i=Microsoft.Plugin,r=function(r){function u(n){r.call(this,n||"Network.bodyView");this._delayer=new t.Delayer}return __extends(u,r),Object.defineProperty(u.prototype,"documentModel",{get:function(){return this._documentModel},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"isRequest",{get:function(){var n=this._tabControl.selectedItem;return n&&n===this._requestTab},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"isResponse",{get:function(){var n=this._tabControl.selectedItem;return n&&n===this._responseTab},enumerable:!0,configurable:!0}),u.prototype.selectTab=function(n){n!==this.isRequest&&(this._tabControl.selectedItem=n?this._requestTab:this._responseTab)},u.prototype.onApplyTemplate=function(){var f=this,r;this._tabControl=this.getNamedControl("bodyViewTabControl");n.Tools.Utility.Assert.isTrue(!!this._tabControl,"Expecting a control named bodyViewTabControl.");this._responseTab=new Common.Controls.TabItem;this._responseTab.title=i.Resources.getString("ResponseBody");this._tabControl.addTab(this._responseTab);this._requestTab=new Common.Controls.TabItem;this._requestTab.title=i.Resources.getString("RequestBody");this._tabControl.addTab(this._requestTab);this._tabControl.selectedItemChanged=function(){return f.openDocument(f.isRequest)};r=this.getNamedElement("resourceViewerContainer");n.Tools.Utility.Assert.isTrue(!!r,"Expecting an element named resourceViewerContainer.");this._resourceViewController=new Common.ResourcesView.ResourceViewController(r);this._resourceViewController.registerHandler(t.PlaceholderModel.ModelName,new t.PlaceholderHandler);this._resourceViewController.registerHandler(t.SimpleImageModel.ModelName,new t.SimpleImageHandler);this._resourceViewController.registerHandler(t.FormDataModel.ModelName,new t.FormDataHandler);this._resourceViewController.registerHandler(t.TextHandler.ModelName,this.textHandler=new t.TextHandler(new t.TextView));this.rootElement.classList.add(u.CssClass)},u.prototype.onTabResize=function(){this.textHandler.doLayout()},u.prototype.onTabActivated=function(){this.textHandler.doLayout()},u.prototype.onModelChanged=function(){this._summaryModelPropertyChangedEvtReg&&(this._summaryModelPropertyChangedEvtReg.unregister(),this._summaryModelPropertyChangedEvtReg=null);this.model&&(this._summaryModelPropertyChangedEvtReg=this.model.propertyChanged.addHandler(this.onSummaryModelPropertiesChanged.bind(this)));var n=this._tabControl.selectedItem===this._requestTab;this.openDocument(n)},u.prototype.openDocument=function(n){if(this._documentModel&&this._documentModel.summaryModel&&(this._documentModel.summaryModel=null),this.model&&this.model.contentType&&!n?this.model.contentType.match(/^image/)?(this._documentModel=new t.SimpleImageModel,this._documentModel.summaryModel=this.model):this.model.responseBody&&this.model.responseBody.length>0?(this._documentModel=new t.TextModel(n),this._documentModel.summaryModel=this.model):this._documentModel=null:this.model&&this.model.requestContentType&&n?this.model.requestContentType.toLowerCase()=="application/x-www-form-urlencoded"?(this._documentModel=new t.FormDataModel,this._documentModel.summaryModel=this.model):this.model.requestBody&&this.model.requestBody.length>0?(this._documentModel=new t.TextModel(n),this._documentModel.summaryModel=this.model):this._documentModel=null:this._resourceViewController&&this._documentModel&&(this._resourceViewController.close(this._documentModel,!0,!1),this._documentModel=null),!this._documentModel){var r=new t.PlaceholderModel;r.text=n?this.model?i.Resources.getString("ResourceNoRequestBody"):i.Resources.getString("ResourceNothingSelected"):this.model?i.Resources.getString("ResourceNoResponseBody"):i.Resources.getString("ResourceNothingSelected");this._documentModel=r}this._resourceViewController.open(this._documentModel)},u.prototype.onSummaryModelPropertiesChanged=function(n){var i=this;switch(n){case t.SummaryViewModelItem.RequestContentTypePropertyName:case t.SummaryViewModelItem.RequestBodyPropertyName:case t.SummaryViewModelItem.ContentTypePropertyName:case t.SummaryViewModelItem.ResponseBodyPropertyName:this._delayer.delay(function(){return i.openDocument(i.isRequest)})}},u.CssClass="bodyPane",u}(Common.TemplateControl);t.BodyView=r})(i=t.Network||(t.Network={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){var i;(function(t){"use strict";var i=Microsoft.Plugin,e=Common.Tristate,u=function(){function n(t){this.id=n.nextId++;this.modelName="editor";this.displayName="displayName";this.toolbarPanelTemplate="Network.editorToolbarPanel";this._showRequestInstead=t}return Object.defineProperty(n.prototype,"summaryModel",{get:function(){return this._summaryModel},set:function(n){this._summaryModel=n;n&&(this._showRequestInstead?(this.content=n.requestBody,this.mimeType=n.requestContentType):(this.content=n.responseBody,this.mimeType=n.contentType))},enumerable:!0,configurable:!0}),n.nextId=0,n}(),f,r;t.TextModel=u;f=function(){function n(n){this.view=n}return n.prototype.open=function(n){var t=this;return n&&(this.view.open(n),window.setImmediate(function(){t.doLayout()})),i.Promise.as(this.view)},n.prototype.close=function(){},n.prototype.doLayout=function(){this.view.doLayout()},n.ModelName="editor",n}();t.TextHandler=f;r=function(r){function f(n){var t=this;r.call(this,n||"Network.resourceTextTemplate");i.VS&&i.Theme.addEventListener("themechanged",function(){var n=Common.ThemeUtilities.getTheme();Common.Async.waitForCondition(function(){var t=Common.ThemeUtilities.getTheme();return t!==n},1e3,1e4).then(function(n){n&&t.reconfigureEditorTheme()})})}return __extends(f,r),Object.defineProperty(f.prototype,"editorModel",{get:function(){return this._editor&&this._editor.getModel()},enumerable:!0,configurable:!0}),f.initialize=function(){Common.ObservableHelpers.defineProperty(f,f.PrettyPrintStatePropertyName,1,function(n){return n.onPrettyPrintStateChanged()});Common.ObservableHelpers.defineProperty(f,f.WordWrapStatePropertyName,0,function(n){return n.onWordWrapStateChanged()})},f.prototype.onApplyTemplate=function(){var i=this.getNamedControl("editorToolbar"),t;n.Tools.Utility.Assert.isTrue(!!i,"Expecting an element named editorToolbar.");i.model=this;t=this.getNamedElement("editorRoot");n.Tools.Utility.Assert.isTrue(!!t,"Expecting an element named editorRoot.");this.setUpEditor(t)},f.prototype.getLocalMatches=function(n){var t=this._editor&&this._editor.getModel();return t?t.findMatches(n,!1,!1,!1,!1):[]},f.prototype.addDecorations=function(n,t,i){var r=[],u=this._editor&&this._editor.getModel();return n&&u&&u.changeDecorations(function(u){for(var f=0;f<n.length;f++)r.push(u.addDecoration(n[f],{className:t,showInOverviewRuler:i}))}),r},f.prototype.removeDecorations=function(n){var t=this._editor&&this._editor.getModel();n&&t&&t.changeDecorations(function(t){for(var i=0;i<n.length;i++)t.removeDecoration(n[i])})},f.prototype.selectRange=function(n,t){this._editor&&(this.revealRange(n,t),this._editor.setSelection(n))},f.prototype.revealRange=function(n,t){var r,u,f,i,e;(t===void 0&&(t=!0),r=this._editor&&this._editor.getModel(),r)&&(u=!0,f=!0,this._editor.revealRange(n,u,f),i={lineNumber:n.startLineNumber,column:n.startColumn},e=this._editor.getModel().getLineCount(),this._editor.getScrollTop()>this._editor.getTopForLineNumber(Math.min(n.startLineNumber,e))&&this._editor.revealPosition(i,!1,!1),this._editor.setPosition(i),t&&this._editor.focus())},f.prototype.open=function(n){if(n instanceof u){this._textModel=n;var t=Common.MediaTypeManager.getCanonicalMediaType(this._textModel.mimeType),i=Monaco.Editor.createModel(this._textModel.content,t);this.setModel(i);this.prettyPrintState===0&&this.format(this._textModel)}},f.prototype.doLayout=function(){var n=this;window.setImmediate(function(){n._editor&&(n._editor.layout(),n._searchIterator&&n._searchIterator.findAndHighlightMatches())})},f.prototype.getSearchIterator=function(n,i){return this._searchIterator=new t.BodySearchIterator(this,n,i),this._searchIterator},f.prototype.onUrlClicked=function(n){i.F12.Debugger.showDocument(n,1,1,null)},f.prototype.onPrettyPrintStateChanged=function(){this.format(this._textModel)},f.prototype.onWordWrapStateChanged=function(){this._editor.updateOptions({wrappingColumn:this.wordWrapState===0?0:f.WRAPPING_COLUMN});switch(this.wordWrapState){case 0:this._wordWrapEnabled=!0;break;case 1:this._wordWrapEnabled=!1}},f.prototype.setUpEditor=function(n){var t=this;window.setImmediate(function(){require(["vs/editor/editor.main","vs/editor/editor","vs/platform/services","vs/languages/typescript/typescript.contribution"],function(){var i=t.getMonacoEditorTheme();t._editor=Monaco.Editor.create(n,{value:"",mode:null,scrollbar:{vertical:"visible",horizontal:"visible",useShadows:!1,verticalHasArrows:!0,horizontalHasArrows:!0,handleMouseWheel:!0,verticalScrollbarSize:17,horizontalScrollbarSize:17,arrowSize:30},readOnly:!0,scrollBeyondLastLine:!1,roundedSelection:!0,insertSpaces:!1,quickSuggestions:!1,autoClosingBrackets:!1,automaticLayout:!1,glyphMargin:!1,hover:!1,nativeContextMenu:!1,wrappingColumn:t.wordWrapState===0?0:f.WRAPPING_COLUMN,tabFocusMode:!0,selectOnLineNumbers:!1,stopLineTokenizationAfter:1e6,theme:i});window.addEventListener("resize",function(){t._editor.layout()});t._editor.getEditorService().setOpenEditorDelegate(t.onUrlClicked.bind(t))})})},f.prototype.format=function(n){var u=this,r,t,f,i,e;if(n)if(r=n.content,t=Common.MediaTypeManager.getCanonicalMediaType(n.mimeType),this.prettyPrintState===0){if(Common.FormatService.JsonFormatter.supportsMimeType(t)){f=Monaco.Editor.createModel((new Common.FormatService.JsonFormatter).format(r),t);this.setModel(f);return}Common.FormatService.HtmlFormatter.supportsMimeType(t)?i=new Common.FormatService.HtmlFormatter:Common.FormatService.HTMLScriptFinder.isSupportedScript(t)?i=new Common.FormatService.ScriptFormatter:Common.FormatService.CssFormatter.supportsMimeType(t)&&(i=new Common.FormatService.CssFormatter);i&&(i.options.prettyPrint=!0,i.setDocument(r,"",t).then(function(){i.getFormattedText().then(function(i){n==u._textModel&&(e=Monaco.Editor.createModel(i.text,t),u.setModel(e))})}))}else this.setModel(Monaco.Editor.createModel(r,t))},f.prototype.setModel=function(n){var t=this._editor.getModel();this._editor.setModel(n);t&&!t.isDisposed()&&t!==n&&t.destroy();this._searchIterator&&this._searchIterator.findAndHighlightMatches();this.wordWrapState=this._editor.getConfiguration().isDominatedByLongLines?2:this._wordWrapEnabled?0:1},f.prototype.reconfigureEditorTheme=function(){var n=this.getMonacoEditorTheme();this._editor&&this._editor.updateOptions({theme:n})},f.prototype.getMonacoEditorTheme=function(){var n=Common.ThemeUtilities.getTheme();switch(n){case 2:return"vs-dark";case 0:case 1:case 3:default:return"vs"}},f.WRAPPING_COLUMN=3e3,f.PrettyPrintStatePropertyName="prettyPrintState",f.WordWrapStatePropertyName="wordWrapState",f}(Common.TemplateControl);t.TextView=r;r.initialize()})(i=t.Network||(t.Network={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var i=Microsoft.Plugin,r=function(){function n(){}return n.prototype.open=function(n){if(n instanceof t)return this._control=new Common.TemplateControl("Network.resourcePlaceholderTemplate"),this._control.model=n,i.Promise.wrap(this._control)},n.prototype.close=function(){this._control&&(this._control.model=null)},n.prototype.doLayout=function(){},n}(),t;n.PlaceholderHandler=r;t=function(){function n(){this._id=Common.ResourcesView.ResourceViewController.NextModelId++}return Object.defineProperty(n.prototype,"displayName",{get:function(){return this.text},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"modelName",{get:function(){return n.ModelName},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"toolbarPanelTemplate",{get:function(){return null},enumerable:!0,configurable:!0}),n.ModelName="Placeholder",n}();n.PlaceholderModel=t})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(n){"use strict";var i=Microsoft.Plugin,u=function(){function n(){}return n.prototype.open=function(n){if(n instanceof r)return this._control=new Common.TemplateControl("Network.resourceImageControlTemplate"),this._control.model=n,i.Promise.wrap(this._control)},n.prototype.close=function(){this._control&&(this._control.model=null)},n.prototype.doLayout=function(){},n}(),t,r;n.SimpleImageHandler=u;t=function(n){function t(t,i){n.call(this);this.key=t;i!==undefined&&(this.value=i)}return __extends(t,n),t.initialize=function(){Common.ObservableHelpers.defineProperty(t,t.KeyPropertyName,null);Common.ObservableHelpers.defineProperty(t,t.ValuePropertyName,null)},t.KeyPropertyName="key",t.ValuePropertyName="value",t}(Common.Observable);n.KeyValuePair=t;t.initialize();r=function(){function r(){this._id=Common.ResourcesView.ResourceViewController.NextModelId++}return Object.defineProperty(r.prototype,"summaryModel",{get:function(){return this._summaryModel},set:function(r){var u=this,f;this._summaryModelPropertyChangedEvtReg&&(this._summaryModelPropertyChangedEvtReg.unregister(),this._summaryModelPropertyChangedEvtReg=null);this._summaryModel=r;r&&(this._summaryModelPropertyChangedEvtReg=r.propertyChanged.addHandler(this.onSummaryModelPropertiesChanged.bind(this)),f=n.Converters.UrlToFilenameConverter.convertTo(r.fullURL),this.displayName=f,this.displayProperties=new Common.ObservableCollection,this.displayProperties.push(new t(i.Resources.getString("Name"),f)),r.responseBody&&this.displayProperties.push(this._contentSizeKeyValue=new t(i.Resources.getString("ContentSize"),n.Converters.ByteSizeToStringConverter.convertTo(r.contentSize))),this.displayProperties.push(new t(i.Resources.getString("ContentType"),r.contentType)),this.displayProperties.push(new t(i.Resources.getString("Url"),r.fullURL)),this._imageTag=new Image,this._imageTag.onload=function(){if(u._summaryModel.responseBody){var n=new t(i.Resources.getString("Dimensions"),i.Resources.getString("DimensionsFormat",u._imageTag.width,u._imageTag.height));u.displayProperties.splice(1,0,n)}},this.updateImageData())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"modelName",{get:function(){return r.ModelName},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"toolbarPanelTemplate",{get:function(){return null},enumerable:!0,configurable:!0}),r.isContentTypeSupported=function(n){return r.UnsupportedContentTypes.indexOf(n.toLowerCase())===-1},r.prototype.onSummaryModelPropertiesChanged=function(t){switch(t){case n.SummaryViewModelItem.ContentSizePropertyName:this._contentSizeKeyValue.value=n.Converters.ByteSizeToStringConverter.convertTo(this._summaryModel.contentSize);break;case n.SummaryViewModelItem.ResponseBodyPropertyName:case n.SummaryViewModelItem.ResponseBodyBase64EncodedPropertyName:this.updateImageData()}},r.prototype.updateImageData=function(){var n=this.summaryModel.contentType&&r.isContentTypeSupported(this.summaryModel.contentType);n&&this.summaryModel.responseBody&&(this.imageData="data:"+this.summaryModel.contentType+";base64,"+this.summaryModel.responseBody,this._imageTag.src=this.imageData)},r.UnsupportedContentTypes=["image/webp"],r.ModelName="SimpleImage",r}();n.SimpleImageModel=r})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,i;(function(n){var i;(function(n){var i;(function(n){var r=function(){function n(){}return n.prototype.addEventListener=function(){},n.prototype.removeEventListener=function(){},n.prototype.dispatchEvent=function(){return!1},n.prototype._forceConnect=function(){return!1},n.prototype._postMessage=function(){},n.prototype._sendMessage=function(){return t.Promise.as({})},n.prototype._call=function(){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];return t.Promise.as({})},n.prototype._post=function(){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n]},n}(),i,u;n.DummyProxy=r;i=function(){function n(){}return n.prototype.raiseEvent=function(){},n.prototype.raiseEventWithMessage=function(){},n.prototype.raiseEventWithKey=function(){},n}();n.DummyTraceWriter=i;u=function(n){function t(){n.call(this,new r,new i);this._outgoingMessages=[];this._prototypeChannelUid=1;this.connectWebsocket()}return __extends(t,n),t.prototype.runSendMessage=function(n){this._outgoingMessages.push(n);this.pumpOutgoingMessages()},t.prototype.getUid=function(){return this._prototypeChannelUid++},t.prototype.connectWebsocket=function(){var n=this,t=new XMLHttpRequest;t.open("GET","http://localhost:9222/json",!0);t.onreadystatechange=function(){var u,i,r;if(t.readyState===4){u="localhost:4400";try{for(i=JSON.parse(t.responseText),r=0;i&&r<i.length;r++)i[r].type&&i[r].type==="page"&&(n._connectionUrl=i[r].webSocketDebuggerUrl);n._connectionUrl&&(n._socket=new WebSocket(n._connectionUrl),n._socket.onerror=function(t){return n.onerror(t)},n._socket.onopen=function(t){return n.onopen(t)},n._socket.onmessage=function(t){return n.onmessage(t)},n._socket.onclose=function(t){return n.onclose(t)})}catch(f){}}};t.send()},t.prototype.onerror=function(){},t.prototype.onopen=function(){this.pumpOutgoingMessages()},t.prototype.pumpOutgoingMessages=function(){while(this._socket&&this._outgoingMessages.length>0&&this._socket.readyState==WebSocket.OPEN){var n=this._outgoingMessages.pop();this._socket.send(n)}},t.prototype.onclose=function(){},t}(Common.ChromiumChannel);n.PrototypeChannel=u})(i=n.Chromium||(n.Chromium={}))})(i=n.Network||(n.Network={}))})(i=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t;(function(n){var t;(function(n){(function(n){n[n.all=0]="all";n[n.documents=1]="documents";n[n.stylesheets=2]="stylesheets";n[n.images=3]="images";n[n.scripts=4]="scripts";n[n.media=5]="media";n[n.fonts=6]="fonts";n[n.xhr=7]="xhr";n[n.other=8]="other"})(n.ContentType||(n.ContentType={}));var i=n.ContentType,t=function(n){function t(){n.call(this);this.filterChanged=new Common.EventSource}return __extends(t,n),Object.defineProperty(t.prototype,"isFilterApplied",{get:function(){return!this.displayAll},enumerable:!0,configurable:!0}),t.initialize=function(){Common.ObservableHelpers.defineProperty(t,t.DisplayAllProperty,!0,function(n,t,i){return n.onContentTypeFilterChanged(t,i,!0)},function(n,t,i){return n.toggleAllContentTypeFilter(t,i)});Common.ObservableHelpers.defineProperty(t,t.DisplayDocumentsProperty,!1,function(n,t,i){return n.onContentTypeFilterChanged(t,i)});Common.ObservableHelpers.defineProperty(t,t.DisplayFontsProperty,!1,function(n,t,i){return n.onContentTypeFilterChanged(t,i)});Common.ObservableHelpers.defineProperty(t,t.DisplayImagesProperty,!1,function(n,t,i){return n.onContentTypeFilterChanged(t,i)});Common.ObservableHelpers.defineProperty(t,t.DisplayMediaProperty,!1,function(n,t,i){return n.onContentTypeFilterChanged(t,i)});Common.ObservableHelpers.defineProperty(t,t.DisplayOtherProperty,!1,function(n,t,i){return n.onContentTypeFilterChanged(t,i)});Common.ObservableHelpers.defineProperty(t,t.DisplayScriptsProperty,!1,function(n,t,i){return n.onContentTypeFilterChanged(t,i)});Common.ObservableHelpers.defineProperty(t,t.DisplayStylesheetsProperty,!1,function(n,t,i){return n.onContentTypeFilterChanged(t,i)});Common.ObservableHelpers.defineProperty(t,t.DisplayXHRProperty,!1,function(n,t,i){return n.onContentTypeFilterChanged(t,i)})},t.prototype.isValidFilterProperty=function(n){return t.FILTER_PROPERTIES.indexOf(n)>=0},t.prototype.getFilterState=function(n){var i=this.getContentTypeFilter(),r,t;return i.displayAll?0:(r=this.getContentTypeValue(n.contentType),t=this.getContentTypeFilterState(r,i),t===1&&i.displayXHR&&(t=this.getXHRFilterState(n.initiatorType)),t)},t.prototype.isFilteredValueMutable=function(n){return!n.contentType||!n.initiatorType},t.prototype.getContentTypeFilterState=function(n,t){switch(n){case 1:return this.itemFilterState(t.displayDocuments);case 6:return this.itemFilterState(t.displayFonts);case 3:return this.itemFilterState(t.displayImages);case 5:return this.itemFilterState(t.displayMedia);case 8:return this.itemFilterState(t.displayOther);case 4:return this.itemFilterState(t.displayScripts);case 2:return this.itemFilterState(t.displayStylesheets);case 8:return this.itemFilterState(t.displayOther);default:return 1}},t.prototype.getXHRFilterState=function(n){return n===t.XHR_INITIATOR_TYPE?0:1},t.prototype.itemFilterState=function(n){return n?0:1},t.prototype.onContentTypeFilterChanged=function(n,t,i){i===void 0&&(i=!1);i||(this.displayAll=this.displayFonts||this.displayDocuments||this.displayImages||this.displayMedia||this.displayOther||this.displayScripts||this.displayStylesheets||this.displayXHR?!1:!0);this.filterChanged.invoke()},t.prototype.toggleAllContentTypeFilter=function(n,t){t&&(this.displayFonts=!1,this.displayDocuments=!1,this.displayImages=!1,this.displayMedia=!1,this.displayOther=!1,this.displayScripts=!1,this.displayStylesheets=!1,this.displayXHR=!1)},t.prototype.getContentTypeFilter=function(){return{displayAll:this.displayAll,displayDocuments:this.displayDocuments,displayStylesheets:this.displayStylesheets,displayImages:this.displayImages,displayMedia:this.displayMedia,displayScripts:this.displayScripts,displayFonts:this.displayFonts,displayOther:this.displayOther,displayXHR:this.displayXHR}},t.prototype.getContentTypeValue=function(n){return t.CONTENT_TYPE_DOCUMENTS_REGEX.test(n)?1:t.CONTENT_TYPE_FONTS_REGEX.test(n)?6:t.CONTENT_TYPE_IMAGES_REGEX.test(n)?3:t.CONTENT_TYPE_MEDIA_REGEX.test(n)?5:t.CONTENT_TYPE_SCRIPTS_REGEX.test(n)?4:t.CONTENT_TYPE_STYLESHEETS_REGEX.test(n)?2:8},t.CONTENT_TYPE_DOCUMENTS_REGEX=/^text\/html$/,t.CONTENT_TYPE_FONTS_REGEX=/^(font\/.*|application\/font.*)/,t.CONTENT_TYPE_IMAGES_REGEX=/^(image)\/.*/,t.CONTENT_TYPE_MEDIA_REGEX=/^(audio|video)\/.*/,t.CONTENT_TYPE_SCRIPTS_REGEX=/^(text|application)\/.*script$/,t.CONTENT_TYPE_STYLESHEETS_REGEX=/^text\/css$/,t.XHR_INITIATOR_TYPE="XMLHttpRequest",t.FILTER_PROPERTIES=["contentType","initiatorType"],t.DisplayAllProperty="displayAll",t.DisplayDocumentsProperty="displayDocuments",t.DisplayFontsProperty="displayFonts",t.DisplayImagesProperty="displayImages",t.DisplayMediaProperty="displayMedia",t.DisplayOtherProperty="displayOther",t.DisplayScriptsProperty="displayScripts",t.DisplayStylesheetsProperty="displayStylesheets",t.DisplayXHRProperty="displayXHR",t}(Common.Observable);n.ContentTypeFilterViewModel=t;t.initialize()})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(n){function i(){n.apply(this,arguments)}return __extends(i,n),i.prototype.onApplyTemplate=function(){n.prototype.onApplyTemplate.call(this);t.Tooltip.initializeElementTooltip(this.rootElement)},i}(Common.TemplateControl);n.TooltipTemplateControl=i})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(t){function i(n){var r=this,u;t.call(this,n||"Network.defaultGridSplitterTemplate");this.minPosition=Number.MIN_VALUE;this.maxPosition=Number.MAX_VALUE;this.dragged=new Common.EventSource;this.resized=new Common.EventSource;this._mode=i.HORIZONTAL;this._alignment=i.LEFT;this._defaultPosition=i.DEFAULT_POSITION;this._position=this._defaultPosition;this._mouseMoveHandler=function(n){return r.onMouseMove(n)};this._mouseUpHandler=function(n){return r.onMouseUp(n)};this.rootElement.addEventListener("mousedown",function(n){return r.onMouseDown(n)});u=new MutationObserver(this.onDOMNodeInserted.bind(this));u.observe(document.body,{childList:!0,subtree:!0})}return __extends(i,t),Object.defineProperty(i.prototype,"mode",{get:function(){return this._mode},set:function(n){this._mode=n.toLowerCase()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"alignment",{get:function(){return this._alignment},set:function(n){this._alignment=n.toLowerCase()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"size",{get:function(){return this._size||(this._size=this._mode===i.HORIZONTAL?this.rootElement.offsetWidth:this.rootElement.offsetHeight),this._size},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"defaultPosition",{get:function(){return this._defaultPosition},set:function(n){this._defaultPosition=n},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"position",{get:function(){return this._position},set:function(n){if(this._position=n,this._mode===i.HORIZONTAL?this.rootElement.parentElement.style.msGridColumns=this.makeGridDefinition(n):this.rootElement.parentElement.style.msGridRows=this.makeGridDefinition(n),this.onPositionChangedOverride(),this._previousPanel)this._previousPanel.onSplitterPositionChanged(this);if(this._nextPanel)this._nextPanel.onSplitterPositionChanged(this)},enumerable:!0,configurable:!0}),i.prototype.endDragging=function(){document.removeEventListener("mousemove",this._mouseMoveHandler,!0);document.removeEventListener("mouseup",this._mouseUpHandler,!0);this.resized.invoke(this.position)},i.prototype.onPanelsInitializedOverride=function(){},i.prototype.onPositionChangedOverride=function(){},i.prototype.onDOMNodeInserted=function(n,t){for(var r,i=0;i<n.length;i++)if(r=n[i],r.target instanceof HTMLElement&&r.target.contains(this.rootElement)){t.disconnect();this.initialize();return}},i.prototype.getPanelFromElement=function(n){var t=n.control;return t&&t.onSplitterPositionChanged?t:null},i.prototype.initialize=function(){var t,r;n.Tools.Utility.Assert.hasValue(this.rootElement.parentElement,"GridSplitter must be attached to DOM to initialize");n.Tools.Utility.Assert.hasValue(this.rootElement.previousElementSibling,"GridSplitter must have earlier DOM sibling to initialize");n.Tools.Utility.Assert.hasValue(this.rootElement.nextElementSibling,"GridSplitter must have latter DOM sibling to initialize");t=this.rootElement.previousElementSibling;this._previousPanel=this.getPanelFromElement(t);r=this.rootElement.nextElementSibling;this._nextPanel=this.getPanelFromElement(r);this.rootElement.parentElement.style.display="-ms-grid";this.rootElement.style.position="absolute";this._mode===i.HORIZONTAL?(this.rootElement.parentElement.style.msGridColumns=this.makeGridDefinition(this.position),this.rootElement.parentElement.style.msGridRows="100%",t.style.msGridColumn="1",this.rootElement.style.msGridColumn="2",r.style.msGridColumn="3",this.rootElement.style.cursor="ew-resize",this.rootElement.style.height="100%"):(this.rootElement.parentElement.style.msGridColumns="100%",this.rootElement.parentElement.style.msGridRows=this.makeGridDefinition(this.position),t.style.msGridRow="1",this.rootElement.style.msGridRow="2",r.style.msGridRow="3",this.rootElement.style.cursor="ns-resize",this.rootElement.style.width="100%");this.onPanelsInitializedOverride()},i.prototype.onMouseDown=function(){document.addEventListener("mousemove",this._mouseMoveHandler,!0);document.addEventListener("mouseup",this._mouseUpHandler,!0)},i.prototype.onMouseMove=function(n){var t,r,u;if(!n.buttons){this.onMouseUp(n);return}this._mode===i.HORIZONTAL?(r=n.pageX-this.rootElement.parentElement.offsetLeft,t=this._alignment===i.RIGHT?this.rootElement.parentElement.offsetWidth-r:r):(u=n.pageY-this.rootElement.offsetTop,t=this._alignment===i.BOTTOM?this.rootElement.parentElement.offsetHeight-u:u);this.position=t;this.dragged.invoke(t)},i.prototype.onMouseUp=function(){this.endDragging()},i.prototype.makeGridDefinition=function(n){return n!==0&&(n=Math.max(this.minPosition,n),n=Math.min(n,this.maxPosition)),this._alignment===i.TOP||this._alignment===i.LEFT?n+"px "+this.size+"px 1fr":"1fr "+this.size+"px "+n+"px"},i.DEFAULT_POSITION=100,i.HORIZONTAL="horizontal",i.VERTICAL="vertical",i.LEFT="left",i.TOP="top",i.RIGHT="right",i.BOTTOM="bottom",i}(Common.TemplateControl);t.GridSplitter=i})(i=t.Network||(t.Network={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(i){function r(n){i.call(this,n||"Network.collapsibleGridSplitterTemplate");this.collapsibleMarginSize=r.COLLAPSIBLE_MARGIN_SIZE}return __extends(r,i),r.initialize=function(){Common.ObservableHelpers.defineProperty(r,r.IsCollapsedPropertyName,!1,function(n){return n.onIsCollapsedChanged()})},r.prototype.onApplyTemplate=function(){var t=this;i.prototype.onApplyTemplate.call(this);this.rootElement&&(this._splitterButton=this.getNamedElement("splitterButton"),n.Tools.Utility.Assert.isTrue(!!this._splitterButton,"Expecting a button element with the name splitterButton."),this._splitterButton.addEventListener("click",function(){t.isCollapsed=!t.isCollapsed}),this.updateSplitterButtonContent())},r.prototype.onPanelsInitializedOverride=function(){i.prototype.onPanelsInitializedOverride.call(this);this.updatePanelDisplayAttribute()},r.prototype.onPositionChangedOverride=function(){i.prototype.onPositionChangedOverride.call(this);!this.isCollapsed&&this.position<=this.collapsibleMarginSize?(this.endDragging(),this.isCollapsed=!0):this.position>this.collapsibleMarginSize&&(this.isCollapsed=!1)},r.prototype.onIsCollapsedChanged=function(){this.updatePanelDisplayAttribute();this.isCollapsed?(this._originalPosition=this.position,this.position=0):this.position=this._originalPosition>this.collapsibleMarginSize?this._originalPosition:this.defaultPosition;this.updateSplitterButtonContent()},r.prototype.updatePanelDisplayAttribute=function(){var n;n=this.alignment===t.GridSplitter.TOP||this.alignment===t.GridSplitter.LEFT?this._previousPanel:this._nextPanel;n&&(this.isCollapsed?n.rootElement.classList.add(Common.TemplateControl.CLASS_HIDDEN):n.rootElement.classList.remove(Common.TemplateControl.CLASS_HIDDEN))},r.prototype.updateSplitterButtonContent=function(){this._splitterButton.textContent=this.isCollapsed?"<":">"},r.COLLAPSIBLE_MARGIN_SIZE=30,r.IsCollapsedPropertyName="isCollapsed",r}(t.GridSplitter);t.CollapsibleGridSplitter=i;i.initialize()})(i=t.Network||(t.Network={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=Common.Controls.Grid,r=function(n){function r(t,r){var u=new i.GridOptions(r.getChildData.bind(r),r.getColumns(this),r.getDefaultSortOrders(),r.onEditCell?r.onEditCell.bind(r):null,r.allowMultipleSelection);n.call(this,t,r.customizeGridOptions?r.customizeGridOptions(u):u);this._optionsProvider=r;this._columnHeaderText=null;this.initializeContextMenuCommands();Common.ClipboardHelper.addCopyListener(this.rootElement,this.onCopy.bind(this))}return __extends(r,n),r.defaultCreateValueElement=function(n){var t=document.createElement("div"),i=n===undefined||n===null?"":n.toString();return i===""?t.innerHTML="&nbsp;":t.innerText=i,t},r.localeFormatValue=function(n){return n!=null?typeof n=="string"?n:typeof n=="number"?n.toLocaleString(t.Culture.lang,{maximumFractionDigits:r.MaximumDecimalPrecision}):typeof n=="boolean"?n?"True":"False":n.toString():""},r.prototype.getAllRowData=function(){for(var i=[],n=0,t=this.getRowData(n);t;)i.push(t),n++,t=this.getRowData(n);return i},r.prototype.buildMultilineHtmlHeaderCellContents=function(n){var t=document.createElement("div"),i,r,u;return t.classList.add("title"),i=document.createElement("div"),i.innerText=n.subLabel||"",t.appendChild(i),r=document.createElement("div"),u=n.text||"",r.innerText=u+" /",t.appendChild(r),t},r.prototype.buildCellContents=function(n,t,i,r,u,f,e,o){return this.buildCellElement(i,r,u,f,e,o,n)},r.prototype._onDismissContextMenu=function(){this._contextMenuActive=!1;this._onBlur(null)},r.prototype._onContextMenu=function(n){var t,i,r,u,f,e;if(this.contextMenu){if(i=0,r=0,n.type==="contextmenu")t=this.getRowInfoFromEvent(n,".grid-row"),i=n.clientX,r=n.clientY;else if(n.type==="keydown"&&this.isActive()){if(u=this.getSelectedRowIndex(),f=this.getVisibleRowIndices(),u<f.first||u>f.last){this.getSelectedRowIntoView();return}if(e=this.getSelectedDataIndex(),t=this.getRowInfo(e),!t)return;i=t.row.clientLeft;r=this.getElement().offsetTop+this.getHeaderHeight()+this.getRowTop(t.rowIndex)-this.getCanvas().scrollTop+this.getMeasurements().rowHeight}if(!t)return;this._optionsProvider.onContextMenuOpening();this.getSelectionCount()>0&&(this._contextMenuActive=!0,this.contextMenu.show(i,r))}},r.prototype._onKeyDown=function(t){switch(t.keyCode){case 121:if(t.shiftKey)return this._onContextMenu(t),!1;break;case 93:return this._onContextMenu(t),!1;case 9:return t.shiftKey&&this.rootElement.focus(),!0;case 123:return!0}return n.prototype._onKeyDown.call(this,t)},r.prototype._onBlur=function(t){this._contextMenuActive||n.prototype._onBlur.call(this,t)},r.prototype.copyTextToClipboard=function(n){this._copyText=n===undefined?this.getTextForClipboard():n;Common.ClipboardHelper.fireCopyEvent(this.rootElement);this._copyText=undefined},r.prototype.onCtrlG=function(){this._optionsProvider.onCtrlG()},r.prototype.getClipboardFormattedRowString=function(n,t){var i="",r=this.getRowData(n),o,f,e,u,s;if(r&&(o=this.getColumns(),f=!0,o.forEach(function(n){n.excludeFromClipboard||(f||(i+="\t"),f=!1,i+=n.getClipboardText?n.getClipboardText(n,r):n.format?r[n.index].localeFormat(n.format):r[n.index])}),this._optionsProvider.allowMultipleSelection))for(e=this._getExpandState(n),i=e<0?" + "+i:e>0?" - "+i:"   "+i,u=r.parent,s=0;u;)s++>=t&&(i="  "+i),u=u.parent;return i},r.prototype.getShallowestDepthOfSelection=function(){var n=0,t=this.getSelectedRows(),i;if(t){n=Number.MAX_VALUE;for(i in t)if(t[i]!==null&&typeof t[i]!="undefined"){for(var f=this.getRowData(t[i]),u=f.parent,r=0;u;){if(r++,r>n)break;u=u.parent}r<n&&(n=r)}}return n},r.prototype.expandNodesWhile=function(n){var t=this.getSelectedDataIndex(),i;for(t===-1&&(t=0),i=this.getRowData(t);i&&!i.isPlaceholder&&this._getExpandState(t)!==0;){if(this.expandNode(t),!n(i))break;t++;i=this.getRowData(t)}},r.prototype.expandNodesIf=function(n){for(var t=0,i=this.getRowData(t);i;)!i.isPlaceholder&&this._getExpandState(t)!==0&&n(i)&&this.expandNode(t),t++,i=this.getRowData(t)},r.prototype.getColumnPixelIndent=function(n){return n*12},r.prototype.getColumnText=function(n,t,i){var u,f=this.getColumnValue(n,t.index,i),e;return t.getAriaLabelDescription?(e=this.getRowData(n),u=t.getAriaLabelDescription(t,e)):u=typeof f!="string"?r.localeFormatValue(f):f,t.maxLength=Math.max(t.maxLength||0,u.length),u},r.prototype._drawCell=function(n,t,i,r,u,f,e){return this.buildCellElement(t,i,r,u,f,e,this.populateCell.bind(this))},r.prototype.buildCellElement=function(n,t,r,u,f,e,o){var l=u.width||20,s=this.createElementWithClass("div",this.options().cellClass),a,c,y,h,p,v;if(s.style.width=isNaN(l)?String(l):l+"px",a=this.getRowData(n),c=this.getColumnText(n,u,e),u.hasHTMLContent||i.GridControl._setTooltip(s,c,65),u.getDynamicTooltip?o(s,n,u,c,a):e===f&&r>0?(y=this.getColumnPixelIndent(r),y<l?(o(s,n,u,c,a),this.addTreeIconWithIndent(s,t,r,u)):(h=document.createElement("div"),h.innerHTML="[...]",h.style.left=l-18+"px",h.style.position="absolute",h.addEventListener("click",this.expandColumn.bind(this,h,u,y,c)),s.appendChild(h))):o(s,n,u,c,a),u.cssClass)for(p=u.cssClass.trim().split(" "),v=0;v<p.length;v++)s.classList.add(p[v]);return u.rowCss&&s.classList.add(u.rowCss),n%2==0&&u.evenRowCss?s.classList.add(u.evenRowCss):n%2==1&&u.oddRowCss&&s.classList.add(u.oddRowCss),s},r.prototype.mapExpandedRowData=function(n){for(var i=this.getExpandStates(),r=[],t=0;t<i.length;++t)i[t]>0&&r.push(n(t,this.getRowData(t)));return r},r.prototype.updateUnselectedRowStyle=function(n){n.row.setAttribute("tabindex","-1")},r.prototype.getTextForClipboard=function(){var f=this.getSelectedRows(),e,n,t,i;if(f!==null){var o=this.getShallowestDepthOfSelection(),r=this.getColumnHeaderText(),u=-1;for(e in f)n=parseInt(e.toString()),t=this._getDataIndex(n),t!==null&&typeof t!="undefined"&&(i=this.getClipboardFormattedRowString(t,o),u!==-1&&u!==n-1&&(i="[...]\r\n"+i),r=r+"\r\n"+i),u=n;return r}},r.prototype.onCopy=function(){return this._copyText===undefined?this.getTextForClipboard():this._copyText},r.prototype.expandColumn=function(n,t,i,r){var u=document.createElement("div"),f;u.innerHTML=r;u.style.position="absolute";u.style.left="10000px";n.appendChild(u);f=i+u.scrollWidth;n.removeChild(u);t.width=f+10;this._applyColumnSizing(0,-1,!0)},r.prototype.populateCell=function(n,t,i,r){var f,u;typeof i.hrefIndex!="undefined"&&(f=this.getColumnValue(t,i.hrefIndex,-1));f?(u=document.createElement("a"),u.setAttribute("href",f),u.innerText=r,n.appendChild(u)):r?i.hasHTMLContent?n.innerHTML=r:n.innerText=r:n.innerHTML="&nbsp;"},r.prototype.initializeContextMenuCommands=function(){var n=this;this._contextMenuCommands=this._optionsProvider.getContextMenuCommands();this._contextMenuCommands.forEach(function(t){if(t.callback){var i=t.callback;t.callback=function(t,r){i(t,r);n.focus(10)}}});t.ContextMenu&&this._contextMenuCommands&&this._contextMenuCommands.length>0&&(this.contextMenu=t.ContextMenu.create(this._contextMenuCommands,null,null,null,function(){}),this._contextMenuActive=!1,this._onDismissContextMenu=this._onDismissContextMenu.bind(this),this.addEventListenerToCanvas("contextmenu",this,this._onContextMenu),this.contextMenu.addEventListener("dismiss",this._onDismissContextMenu))},r.prototype.getColumnHeaderText=function(){var t=this,i,n;return this._columnHeaderText||(this._columnHeaderText="",i=this.getColumns(),n=!0,i.forEach(function(i){i.excludeFromClipboard||(n||(t._columnHeaderText+="\t"),n=!1,t._columnHeaderText+=i.text)})),this._columnHeaderText},r.MultiLineGridCellClass="multi-line-grid-cell",r.MaximumDecimalPrecision=3,r}(i.GridControl);n.NetworkGridControl=r})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(i){function r(n){i.call(this,n||r.TemplateId)}return __extends(r,i),r.initialize=function(){Common.ObservableHelpers.defineProperty(r,r.BackgroundImagePropertyName,null,function(n){return n.onBackgroundImageChanged()});Common.ObservableHelpers.defineProperty(r,r.MinWidthPropertyName,"3px");Common.ObservableHelpers.defineProperty(r,r.NetworkModelPropertyName,null,function(n){return n.onNetworkModelChanged()});Common.ObservableHelpers.defineProperty(r,r.StartRatioPropertyName,0);Common.ObservableHelpers.defineProperty(r,r.WidthInPixelsPropertyName,0,function(n){return n.onWidthInPixelsChanged()});Common.ObservableHelpers.defineProperty(r,r.WidthPropertyName,"0");Common.ObservableHelpers.defineProperty(r,r.WidthRatioPropertyName,0,function(n){return n.onWidthRatioChanged()})},r.prototype.onApplyTemplate=function(){i.prototype.onApplyTemplate.call(this);this.bar=this.getNamedElement("waterfallItemBar");n.Tools.Utility.Assert.isTrue(!!this.bar||this.bar.tagName!=="div","Expecting a div element named waterfallItemBar.")},r.prototype.onModelChanged=function(){i.prototype.onModelChanged.call(this);this.model===null?this.networkModel=null:(this.trySetBackgroundImage(),this.trySetPositionAndWidth())},r.prototype.onBackgroundImageChanged=function(){this.trySetBackgroundImage()},r.prototype.onNetworkModelChanged=function(){this._networkModelPropertyChangedEventRegistration&&(this._networkModelPropertyChangedEventRegistration.unregister(),this._networkModelPropertyChangedEventRegistration=null);this.networkModel&&(this._networkModelPropertyChangedEventRegistration=this.networkModel.propertyChanged.addHandler(this.onNetworkModelPropertyChanged.bind(this)),this.trySetBackgroundImage(),this.trySetPositionAndWidth())},r.prototype.onNetworkModelPropertyChanged=function(n){switch(n){case t.NetworkModel.RulerDurationPropertyName:case t.NetworkModel.StartTimestampPropertyName:this.trySetPositionAndWidth()}},r.prototype.onWidthInPixelsChanged=function(){this.minWidth="";this.width=this.widthInPixels+"px"},r.prototype.onWidthRatioChanged=function(){this.minWidth="3px";this.width=n.Tools.Network.Converters.DecimalToPercentageStringConverter.convertTo(this.widthRatio)},r.prototype.trySetBackgroundImage=function(){var n,u,i,e,h,c;if(this.model&&this.networkModel)if(n=this.model.timingsViewModel,this.model.timingsState!==0)this.backgroundImage="linear-gradient(to right,"+t.Constants.CACHE_HIT_COLOR+" 0%,"+t.Constants.CACHE_HIT_COLOR+" 100%)";else if(n&&n.stages&&n.stages.length>0){for(u="",i=0,e=n.stages.length;i<e;++i){var r=n.stages[i],o=n.stages[i+1],s=r.startRatio,f=r.startRatio+r.durationRatio;o&&(f=Math.min(f,o.startRatio));s!==f&&(h=t.Converters.DecimalToPercentageStringConverter.convertTo(s),c=t.Converters.DecimalToPercentageStringConverter.convertTo(f),u+=r.color+" "+h+","+r.color+" "+c,i<e-1&&(u+=","))}this.backgroundImage="linear-gradient(to right,"+u+")"}},r.prototype.setWidthInPixels=function(n){this.widthRatio=0;this.widthInPixels=n},r.prototype.setWidthRatio=function(n){this.widthInPixels=0;this.widthRatio=n},r.prototype.trySetPositionAndWidth=function(){var n,i,r,t;if(this.model&&this.networkModel&&(n=this.networkModel.rulerDuration,n.greaterThan(Common.TimeStamp.Zero)))if(i=this.model.timingsViewModel,this.model.timingsState!==0)r=this.model.startTimestamp.subtract(this.networkModel.startTimestamp),t=r.nsec/n.nsec,this.startRatio=t,this.setWidthInPixels(1),this.trySetBackgroundImage();else if(i&&i.totalDuration&&this.model.startTimestamp!==undefined){var r=this.model.startTimestamp.subtract(this.networkModel.startTimestamp),t=r.nsec/n.nsec,u=i.totalDuration.nsec/n.nsec;if(t+u>1){this.networkModel.rulerDuration=Common.TimeStamp.fromNanoseconds(n.nsec*(t+u));return}this.startRatio=t;this.setWidthRatio(u)}},r.BackgroundImagePropertyName="backgroundImage",r.MinWidthPropertyName="minWidth",r.NetworkModelPropertyName="networkModel",r.StartRatioPropertyName="startRatio",r.TemplateId="Network.waterfallItemTemplate",r.WidthInPixelsPropertyName="widthInPixels",r.WidthPropertyName="width",r.WidthRatioPropertyName="widthRatio",r}(Common.TemplateControl);t.WaterfallItemControl=i;i.initialize()})(i=t.Network||(t.Network={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(){function t(){}return t.prototype.parse=function(i,r){this._cookiesText=i;this._index=0;this._isRequest=r;var u=[];if(i===null||i===undefined)return u;do u.push(this.parseHeader());while(this.eatHeaderSeparator());return this._index!=this._cookiesText.length&&n.Tools.Utility.Assert.failDebugOnly("Failed to parse the whole cookie string"),this._isRequest&&(u.length!=1||u[0].rawText!=i)&&n.Tools.Utility.Assert.failDebugOnly("Request was not parsed correctly"),t.sortCookieHeaders(u),u},t.isControl=function(n){return n>=0&&n<=31||n==127},t.isDigit=function(n){return n>=48&&n<=57},t.isLetter=function(n){return n>=65&&n<=90||n>=97&&n<=122},t.isTokenSeparator=function(n){switch(n){case";":case"=":case" ":case"\t":return!0;default:return!1}},t.sortCookieHeaders=function(n){if(n&&n.length){var i=!n[0].isRequest;i&&(n.forEach(function(n){n.name=n.tuples.shift()}),n.sort(function(n,i){return t.tupleComparer(n.name,i.name)}));n.forEach(function(n){n.tuples.sort(t.tupleComparer)});i&&n.forEach(function(n){n.name&&(n.tuples.unshift(n.name),delete n.name)})}},t.tupleComparer=function(n,t){var i=n?n.key||"":"",r=t?t.key||"":"";return i.localeCompare(r)},t.prototype.eatHeaderSeparator=function(){return this.isHeaderSeparator(this._index)?(this._index+=t.HEADER_SEPARATOR_LENGTH,!0):!1},t.prototype.eatKeyValueSeparator=function(){return(this.eatWhitespace(),this._cookiesText[this._index]==="=")?(++this._index,!0):!1},t.prototype.eatWhitespace=function(){while(this._cookiesText[this._index]===" "||this._cookiesText[this._index]==="\t")++this._index},t.prototype.isCommaPartOfDateTimeValue=function(n){var t=n-this._index;return 3<=t&&t<=9},t.prototype.isHeaderSeparator=function(n){return!this._isRequest&&this._cookiesText.indexOf(t.HEADER_SEPARATOR,n)===n},t.prototype.parseHeader=function(){for(var t={isRequest:this._isRequest,rawText:null,tuples:[]},u=this._index,r=!0,i;this._index<this._cookiesText.length;)if(i=this.parseCookieTuple(r),i)t.tuples.push(i),r=!!this._isRequest;else{if(this.eatWhitespace(),this.isHeaderSeparator(this._index)||this._index===this._cookiesText.length)break;else this._cookiesText[this._index]!=";"&&n.Tools.Utility.Assert.failDebugOnly("Invalid assumption - skipping character that is not a token separator");++this._index}return t.rawText=this._cookiesText.slice(u,this._index),t},t.prototype.parseCookieTuple=function(n){var i=this.parseToken(),r=this.eatKeyValueSeparator(),u,t;if(!i&&!r)return null;if(u=i.toLocaleLowerCase(),n)t=this.parseOctetString();else switch(u){case"domain":t=this.parseDomainValue();break;case"expires":t=this.parseExpiresValue();break;case"httponly":t=r?this.parseValue()||"true":"true";break;case"max-age":t=this.parseMaxAgeValue();break;case"path":t=this.parseValue();break;case"secure":t=r?this.parseValue()||"true":"true";break;default:t=this.parseOctetString()}return t=(t||"").trim(),{key:i,value:t}},t.prototype.parseDomainValue=function(){var n=this;return this.tryParseValue(function(i){var r=n._cookiesText.charCodeAt(i),u;if(t.isLetter(r)||t.isDigit(r))return!0;u=n._cookiesText[i];switch(u){case".":case"-":return!0}return!1})},t.prototype.parseExpiresValue=function(){var i,u,n,f,r;for(this.eatWhitespace(),i=this._index;i<this._cookiesText.length;++i)if(u=this._cookiesText.charCodeAt(i),!t.isLetter(u))break;for(this.isCommaPartOfDateTimeValue(i)&&++i,n=i;n<this._cookiesText.length;++n){if(f=this._cookiesText[n],n===this._cookiesText.length-1)return++n,r=this._index,this._index=n,this._cookiesText.substring(r);if(f===";"||this.isHeaderSeparator(n))return r=this._index,this._index=n,this._cookiesText.substring(r,n)}return null},t.prototype.parseMaxAgeValue=function(){var n=this;return this.tryParseValue(function(i){var r=n._cookiesText.charCodeAt(i);return t.isDigit(r)})},t.prototype.parseToken=function(){var n=this;return this.tryParseValue(function(i){return!n.isHeaderSeparator(i)&&!t.isTokenSeparator(n._cookiesText[i])})},t.prototype.parseOctetString=function(){var n=this._cookiesText[this._index];switch(n){case'"':return this.parseQuotedValue();case"{":return this.parseJsonValue();default:return this.parseValue()}},t.prototype.parseQuotedValue=function(){var r=this,n=!0,i=!1;return this.tryParseValue(function(u){var f=r._cookiesText.charCodeAt(u);return t.isControl(f)||i?!1:(i=!n&&f===34,n=!1,!0)})},t.prototype.parseJsonValue=function(){var i=this,n=0,r=!0,u=!1;return this.tryParseValue(function(f){var o=i._cookiesText.charCodeAt(f),e;if(t.isControl(o)||u)return!1;e=i._cookiesText[f];switch(e){case"{":n++;break;case"}":n--}return u=!r&&!n,r=!1,!0})},t.prototype.parseValue=function(){var n=this;return this.tryParseValue(function(i){var u=n._cookiesText.charCodeAt(i),r;if(t.isControl(u)||n.isHeaderSeparator(i))return!1;r=n._cookiesText[i];switch(r){case" ":case"\t":case";":case"\\":return!1;default:return!0}})},t.prototype.tryParseValue=function(n){var t,i;for(this.eatWhitespace(),t=this._index;t<this._cookiesText.length;++t)if(n(t)){if(t===this._cookiesText.length-1&&(++t,t>this._index))return i=this._index,this._index=t,this._cookiesText.substring(i)}else{if(t>this._index)return i=this._index,this._index=t,this._cookiesText.substring(i,t);break}return null},t.HEADER_SEPARATOR=", ",t.HEADER_SEPARATOR_LENGTH=2,t}();t.CookieParser=i})(i=t.Network||(t.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i;(function(n){var i=function(){function n(){this._proxy=t.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Package.Extensions.DiagnosticsHelper",{},!0)}return n.prototype.getFileContents=function(n){return this._proxy._call("getFileContents",n)},n}(),r,u;n.HelperProxy=i;r=function(){function n(){this._agentGuid=new Microsoft.VisualStudio.DiagnosticsHub.Guid("8C0C6320-37F1-11E3-8259-6C3BE516EAD0");this._eventManager=new t.Utilities.EventManager;this._isAttached=!1;this._privatePorts={};this._helper=new i;this._standardCollector=Microsoft.VisualStudio.DiagnosticsHub.Collectors.getStandardTransportService();this._standardCollector&&this._standardCollector.addMessageListener(this._agentGuid,this.onMessageReceived.bind(this))}return n.prototype.addEventListener=function(n,t){this._eventManager.addEventListener(n,t)},n.prototype.createPort=function(){throw new Error(t.Resources.getErrorString("JSPerf.1028"))},n.prototype.isAttached=function(){return t.Promise.as(this._isAttached)},n.prototype.loadScriptInProc=function(t){var i=this,r=document.location.href.substring(0,document.location.href.lastIndexOf("/")),u=r+"/"+t,f=n.getFileName(t);this._helper.getFileContents(u).done(function(n){var t={commandName:"loadScriptInProc",fileName:f,script:n},r=JSON.stringify(t);i.sendMessage(r)})},n.prototype.removeEventListener=function(n,t){this._eventManager.removeEventListener(n,t)},n.getFileName=function(n){var t=n.lastIndexOf("/");return t==-1&&(t=n.lastIndexOf("\\")),t>-1&&(n=n.substring(t+1)),n},n.prototype.createPortInternal=function(n){var u=this;if(this._privatePorts.hasOwnProperty(n))throw new Error(t.Resources.getErrorString("JSPerf.1029"));var i={isConnected:!1,eventManager:new t.Utilities.EventManager},f={name:n,postMessage:function(r){if(i.isConnected){var f={commandName:"message",portName:n,jsonData:r},e=JSON.stringify(f);u.sendMessage(e)}else throw new Error(t.Resources.getErrorString("JSPerf.1030"))},addEventListener:i.eventManager.addEventListener.bind(i.eventManager),removeEventListener:i.eventManager.removeEventListener.bind(i.eventManager)},r={internalData:i,port:f};return this._privatePorts[n]=r,r},n.prototype.onMessageReceived=function(n){var i,r,f,u;if(n&&(i=JSON.parse(n),r=null,i.eventName))switch(i.eventName){case"attach":this._isAttached=!0;this._eventManager.dispatchEvent(i.eventName);break;case"connect":if(f=i,!f.portName)throw new Error(t.Resources.getErrorString("JSPerf.1031"));u=this.createPortInternal(f.portName);u.internalData.isConnected=!0;this._eventManager.dispatchEvent(i.eventName,u.port);break;case"detach":this._isAttached=!1;this._eventManager.dispatchEvent(i.eventName);break;case"message":if(r=i,!r.portName)throw new Error(t.Resources.getErrorString("JSPerf.1032"));u=this._privatePorts[r.portName];u&&(r={data:r.jsonData},u.internalData.eventManager.dispatchEvent("message",r));break;default:this._eventManager.dispatchEvent(i.eventName)}},n.prototype.sendMessage=function(n){this._standardCollector.sendStringToCollectionAgent(this._agentGuid.toString(),n).done(function(n){if(n){var t=JSON.parse(n);if(!t.succeeded)throw new Error(t.errorMessage)}})},n}();n.HubDiagnosticSession=r;u=function(){function n(n){this._externalObj=n}return n.prototype.addEventListener=function(n,t){this._externalObj.addEventListener(n,t)},n.prototype.createPort=function(){throw new Error(t.Resources.getErrorString("JSPerf.1028"))},n.prototype.isAttached=function(){return t.Promise.as(this._externalObj.isAttached)},n.prototype.loadScriptInProc=function(n){try{this._externalObj.loadScriptInProc(n)}catch(t){return}},n.prototype.removeEventListener=function(n,t){this._externalObj.removeEventListener(n,t)},n}();n.F12DiagnosticsSession=u})(i=n.Diagnostics||(n.Diagnostics={}))})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(n){var t=this;this.activateEventSource=new Common.EventSource;this.deactivateEventSource=new Common.EventSource;this.attachEventSource=new Common.EventSource;this.detachEventSource=new Common.EventSource;this.breakEventSource=new Common.EventSource;this.runEventSource=new Common.EventSource;this.connectEventSource=new Common.EventSource;this.messageEventSource=new Common.EventSource;this.handshakeEventSource=new Common.EventSource;this.showWarningEventSource=new Common.EventSource;this._callbacks={};this._pendingMessages=[];this._pendingTimeout=null;this._listeningToMessages=!0;n&&(this._diagnosticSession=n,this._diagnosticSession.addEventListener("activated",this.activateEventSource.invoke.bind(this)),this._diagnosticSession.addEventListener("deactivated",this.deactivateEventSource.invoke.bind(this)),this._diagnosticSession.addEventListener("break",this.breakEventSource.invoke.bind(this)),this._diagnosticSession.addEventListener("run",this.runEventSource.invoke.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)),this._diagnosticSession.addEventListener("message",this.onMessageCallback.bind(this)),window.setImmediate(function(){t._isAttached||t.DiagnosticSession.isAttached().done(function(n){n?t.onAttachCallback():t.showWarning("Not currently attached to a script debug target that supports browser diagnostics")},function(){t.showWarning("Not currently attached to a script debug target that supports browser diagnostics")})}))}return Object.defineProperty(n.prototype,"DiagnosticSession",{get:function(){return this._diagnosticSession},enumerable:!0,configurable:!0}),n.prototype.showWarning=function(n){this.showWarningEventSource.invoke(n)},n.prototype.callProxy=function(t){var i=this,e=n.getUid(),r,u,o,f,s,h;if(t.executedHandler&&(this._callbacks[e]={command:t,callback:t.executedHandler,deleteAfterCallback:!0}),r=[],t.args)for(u=0;u<t.args.length;u++)o=t.args[u],r.push(o);t.dataReceivedHandler&&(f=n.getUid(),this._callbacks[f]={command:t,callback:t.dataReceivedHandler,deleteAfterCallback:!1},r.push({uid:f,type:"callback"}));s={uid:e,command:t.name,args:r};h=function(n){i._remotePort&&i._remotePort.postMessage(n)};this._pendingMessages.push(s);this._pendingTimeout||(this._pendingTimeout=window.setImmediate(function(){var n=JSON.stringify(i._pendingMessages);i._pendingMessages=[];i._pendingTimeout=null;h(n)}))},n.prototype.startListeningToMessages=function(){this._listeningToMessages=!0},n.prototype.stopListeningToMessages=function(){this._listeningToMessages=!1},n.getUid=function(){return"uid"+(n._uid++).toString(36)},n.prototype.fireCallbacks=function(n){for(var i,r,f=JSON.parse(n),u=0;u<f.length;u++)i=f[u],r=this._callbacks[i.uid],r?(i.args!==undefined&&r.callback.apply(this,i.args),(r.deleteAfterCallback||r.command.hasCompleted)&&delete this._callbacks[i.uid]):i.uid==="scriptError"&&t.Diagnostics.reportError(i.args[0].message,i.args[0].file,i.args[0].line,i.args[0].additionalInfo)},n.prototype.onAttachCallback=function(){this._isAttached||(this._isAttached=!0,this.attachEventSource.invoke())},n.prototype.onDetachCallback=function(){this._remotePort=null;this._callbacks={};this._pendingMessages=[];this._pendingTimeout=null;this._isAttached=!1;this.detachEventSource.invoke()},n.prototype.onMessageCallback=function(n){var i=this,t=n.data,r=this.processHandshakeMessage(t);this._listeningToMessages&&(t==="DocumentNotYetReady"?window.setTimeout(function(){i._remotePort&&i._remotePort.postMessage("InitializeDocument")},100):r||this.fireCallbacks(t),this.messageEventSource.invoke(t))},n.prototype.onConnectCallback=function(n){this._remotePort=n;this._remotePort.addEventListener("message",this.onMessageCallback.bind(this));this.connectEventSource.invoke(n)},n.prototype.processHandshakeMessage=function(n){if(n.substr(0,10)==="Handshake:"){var t=JSON.parse(n.substring(10));return this.handshakeEventSource.invoke(t),!0}return!1},n._uid=0,n}();n.DiagnosticsToolWindowController=i})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,r=function(){function i(){this._sessionProxy=t.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Package.Extensions.Core.Session",{},!0)}return i.prototype.isActiveSession=function(){return this._sessionProxy._call("isActiveSession")},i.prototype.exportToDiagsession=function(t){return this._sessionProxy._call("exportToDiagsession",t,n.Constants.NETJSON_EXPORTED_IDENTITY,n.Constants.NETJSON_EXPORTED_FILE_NAME)},i.prototype.importFromDiagsession=function(){return this._sessionProxy._call("importFromDiagsession",n.Constants.NETJSON_EXPORTED_IDENTITY)},i}(),i;n.VSDiagnosticsHubSession=r;i=function(){function n(){}return n.prototype.isActiveSession=function(){return t.Promise.wrap(!0)},n.prototype.exportToDiagsession=function(){return t.Promise.wrap(null)},n.prototype.importFromDiagsession=function(){return t.Promise.wrap(null)},n}();n.F12DiagnosticsHubSession=i})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(t){var i;(function(i){"use strict";var o=Microsoft.Plugin.Promise,p=function(){function n(){}return n.fromNetworkModel=function(n){return s.fromNetworkModel(n).then(function(n){return JSON.stringify(n,undefined,4)})},n}(),s,h,c,l,f,e,u,a,v,y,r;i.HarCreator=p;s=function(){function n(){}return n.fromNetworkModel=function(n){var i=n.summaryModel.getOriginalArray();return h.fromSummaryViewModelItemArray(i).then(function(n){return{log:{version:t.Constants.HAR_EXPORTED_VERSION,creator:{name:t.Constants.HAR_CREATOR_NAME,version:""},entries:n}}})},n}();i.GlobalObjectCreator=s;h=function(){function n(){}return n.fromSummaryViewModelItemArray=function(t){var i=[];return t.forEach(function(r){r.statusCode&&i.push(n.fromSummaryViewModelItem(r,t))}),o.join(i).then(function(n){return n.sort(function(n,t){return n.startedDateTime.localeCompare(t.startedDateTime)}),n})},n.fromSummaryViewModelItem=function(t,i){return n.completeSummaryViewModelItem(t).then(function(){return{startedDateTime:r.getISOString(t.startTimestamp.msec),time:r.getRoundedMilliseconds(t.totalTime),request:c.fromSummaryViewModelItem(t),response:l.fromSummaryViewModelItem(t,i),cache:{},timings:y.fromTimingsViewModel(t.timingsState,t.timingsViewModel)}})},n.completeSummaryViewModelItem=function(n){var t=[n.retrieveRequestBodyData(),n.retrieveResponseBodyData()];return o.timeout(1e3,o.join(t)).then(function(){},function(){})},n}();i.EntryCreator=h;c=function(){function n(){}return n.fromSummaryViewModelItem=function(n){return{method:n.method,url:n.fullURL,httpVersion:"HTTP/1.1",cookies:f.fromCookieHeaders(n.requestCookieHeaders),headers:e.fromKeyValueModels(n.requestHeaders,!0,n.fullURL),queryString:u.fromString(n.fullURL,!0),postData:a.fromSummaryViewModelItem(n),headersSize:r.getNormalizedNumber(n.requestHeadersSizeInBytes),bodySize:r.getNormalizedNumber(n.requestBodySizeInBytes)}},n}();i.RequestCreator=c;l=function(){function n(){}return n.fromSummaryViewModelItem=function(n,t){var u="",o,i;if(n.redirectedTo)for(o=null,i=0;i<t.length;i++)if(t[i].id===n.redirectedTo.id){u=t[i].fullURL;break}return{status:r.getNormalizedNumber(n.statusCode),statusText:n.statusText,httpVersion:"HTTP/1.1",cookies:f.fromCookieHeaders(n.responseCookieHeaders,n.responseTime),headers:e.fromKeyValueModels(n.responseHeaders),content:{size:r.getNormalizedNumber(n.contentSize||n.readBytes),compression:!!n.contentSize&&!!n.readBytes?n.contentSize-n.readBytes:undefined,mimeType:n.contentType||"",text:n.responseBody||""},redirectURL:u,headersSize:r.getNormalizedNumber(n.responseHeadersSizeInBytes),bodySize:r.getNormalizedNumber(n.readBytes)}},n}();i.ResponseCreator=l;f=function(){function t(){}return t.fromCookieHeaders=function(n,i){var r=[];return n.forEach(function(n){n.isRequest?r=r.concat(u.fromKeyValueModels(n.tuples)):r.push(t.fromResponseCookieTuples(n.tuples,i))}),r},t.fromResponseCookieTuples=function(t,i){var u={},e,f,o;for(u.name=t[0].key,u.value=t[0].value,e=1;e<t.length;e++){f=t[e];try{switch(f.key.toLocaleLowerCase()){case"domain":u.domain=f.value;break;case"expires":u.expires||(u.expires=r.convertToISOString(f.value));break;case"httponly":u.httpOnly=!0;break;case"max-age":i&&(o=i.msec+parseInt(f.value,10)*1e3,u.expires=r.getISOString(o));break;case"path":u.path=f.value;break;case"secure":u.secure=!0}}catch(s){n.Tools.Utility.Assert.failDebugOnly("Poorly formatted cookie")}}return u},t}();i.CookiesCreator=f;e=function(){function n(){}return n.fromKeyValueModels=function(i,r,f){var e=u.fromKeyValueModels(i);return r&&!n.hasHostHeader(e)&&e.push({name:"Host",value:t.Converters.UrlToHostnameConverter.convertTo(f)}),e},n.hasHostHeader=function(n){for(var t=0;t<n.length;t++)if(n[t].name&&n[t].name.toLowerCase()==="host")return!0;return!1},n}();i.HeadersCreator=e;u=function(){function n(){}return n.fromString=function(i,r){r===void 0&&(r=!1);var u;return u=r?t.ParametersView.ParseParamsFromUrl(i):t.ParametersView.ParseParams(i),n.fromKeyValueModels(u)},n.fromKeyValueModels=function(n){return n.map(function(n){return{name:n.key,value:n.value}})},n}();i.NameValuePairCreator=u;a=function(){function n(){}return n.fromSummaryViewModelItem=function(n){var i=n.postData||n.requestBody,t;if(n.method!="POST"||!i)return undefined;t={mimeType:n.requestContentType,params:[],text:""};switch(n.requestContentType.toLowerCase()){case"application/x-www-form-urlencoded":t.params=v.fromParamString(i);break;case"multipart/form-data":default:t.text=i}return t},n}();i.PostDataCreator=a;v=function(){function n(){}return n.fromParamString=function(n){return u.fromString(n)},n}();i.PostParamsCreator=v;y=function(){function n(){}return n.fromTimingsViewModel=function(n,t){var i={blocked:-1,dns:-1,connect:-1,send:0,wait:0,receive:0,ssl:-1},u;return t.stages&&t.stages.length?(u=i,t.stages.forEach(function(n){n.harFields.forEach(function(t){u[t]=Math.max(u[t],0);u[t]+=r.getRoundedMilliseconds(n.duration)})})):t.totalDuration&&(n===1?i.receive=r.getRoundedMilliseconds(t.totalDuration):i.send=r.getRoundedMilliseconds(t.totalDuration)),i},n}();i.TimingsCreator=y;r=function(){function n(){}return n.getRoundedMilliseconds=function(n){return Math.round(n.msec)},n.getISOString=function(n){return new Date(n).toISOString()},n.convertToISOString=function(n){try{return new Date(n).toISOString()}catch(i){}var t=n.lastIndexOf("-")+1;try{return n=n.replace("-"," "),new Date(n).toISOString()}catch(i){}return n=n.slice(0,t)+"20"+n.slice(t),new Date(n).toISOString()},n.getNormalizedNumber=function(n){return typeof n=="number"?n:-1},n}();i.Utilities=r})(i=t.Har||(t.Har={}))})(i=t.Network||(t.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin.Promise,r=function(){function n(n){this.message=n}return Object.defineProperty(n.prototype,"name",{get:function(){return"VersionError"},enumerable:!0,configurable:!0}),n}(),u,f;t.VersionError=r;u=function(){function t(t){var i=this;this._output={majorVersion:n.Constants.NETJSON_MAJOR_VERSION,minorVersion:n.Constants.NETJSON_MINOR_VERSION,notifications:[],requestBodies:{},responseBodies:{}};this._networkProfiler=t;this._networkProfiler.onDataReceived(function(t){return i.pushNotification(n.Constants.DATA_RECEIVED_NOTIFICATION,t)});this._networkProfiler.onLoadingFailed(function(t){return i.pushNotification(n.Constants.LOADING_FAILED_NOTIFICATION,t)});this._networkProfiler.onLoadingFinished(function(t){return i.pushNotification(n.Constants.LOADING_FINISHED_NOTIFICATION,t)});this._networkProfiler.onRequestServedFromCache(function(t){return i.pushNotification(n.Constants.REQUEST_SERVED_FROM_CACHE_NOTIFICATION,t)});this._networkProfiler.onRequestWillBeSent(function(t){return i.pushNotification(n.Constants.REQUEST_WILL_BE_SENT_NOTIFICATION,t)});this._networkProfiler.onResponseReceived(function(t){return i.pushNotification(n.Constants.RESPONSE_RECEIVED_NOTIFICATION,t)})}return t.prototype.getLog=function(){var n=this;return this.getRequestResponseBodies().then(function(){return JSON.stringify(n._output)})},t.prototype.pushNotification=function(n,t){this._output.notifications.push({method:n,params:t})},t.prototype.getRequestResponseBodies=function(){for(var n=[],t=0;t<this._output.notifications.length;t++){var r=this._output.notifications[t],u=r.params.requestId,f=r.params._ms_activityId;n.push(this.fetchRequestBody(u,f));n.push(this.fetchResponseBody(u,f))}return i.join(n)},t.prototype.fetchRequestBody=function(n,t){var r=this;return this._networkProfiler.getRequestBody?i.timeout(1e3,this._networkProfiler.getRequestBody(n,t)).then(function(t){r._output.requestBodies[n]=t},function(){}):i.wrap(null)},t.prototype.fetchResponseBody=function(n,t){var r=this;return i.timeout(1e3,this._networkProfiler.getResponseBody(n,t)).then(function(t){r._output.responseBodies[n]=t},function(){})},t}();t.NetjsonLogger=u;f=function(){function t(t,i){if(i===void 0&&(i=!1),this._dataReceivedEventSource=new Common.EventSource,this._loadingFailedEventSource=new Common.EventSource,this._loadingFinishedEventSource=new Common.EventSource,this._requestServedFromCacheEventSource=new Common.EventSource,this._requestWillBeSentEventSource=new Common.EventSource,this._responseReceivedEventSource=new Common.EventSource,this._data=JSON.parse(t),typeof this._data.majorVersion!="number"||this._data.majorVersion<0||this._data.majorVersion>n.Constants.NETJSON_MAJOR_VERSION||typeof this._data.minorVersion!="number"||this._data.minorVersion<0)throw new r("Variable 'netjsonData' does not have a supported version number");if(!this._data.notifications||!this._data.responseBodies)throw new SyntaxError("Variable 'netjsonData' does not conform to the netjson interface");this._simulateDelay=i}return t.prototype.canClearBrowserCache=function(){return i.wrap({result:!1})},t.prototype.canClearBrowserCookies=function(){return i.wrap({result:!1})},t.prototype.clearBrowserCache=function(){return i.wrap(null)},t.prototype.clearBrowserCookies=function(){return i.wrap(null)},t.prototype.disable=function(){return this.stopNotificationTimer(),i.wrap(null)},t.prototype.enable=function(){if(this._simulateDelay)this.stopNotificationTimer(),this.startNotificationTimer();else while(this.simulateNotification());return i.wrap(null)},t.prototype.getRequestBody=function(n){var t=this;return new i(function(i,r){var u=t._data.requestBodies?t._data.requestBodies[n]:null;u?i(u):r(new Error("No resource with given identifier found"))})},t.prototype.getResponseBody=function(n){var t=this;return new i(function(i,r){var u=t._data.responseBodies[n];u?i(u):r(new Error("No resource with given identifier found"))})},t.prototype.setCacheDisabled=function(){return i.wrap(null)},t.prototype.setExtraHTTPHeaders=function(){return i.wrap(null)},t.prototype.setUserAgentOverride=function(){return i.wrap(null)},t.prototype.onDataReceived=function(n){this._dataReceivedEventSource.addHandler(n)},t.prototype.onLoadingFailed=function(n){this._loadingFailedEventSource.addHandler(n)},t.prototype.onLoadingFinished=function(n){this._loadingFinishedEventSource.addHandler(n)},t.prototype.onRequestServedFromCache=function(n){this._requestServedFromCacheEventSource.addHandler(n)},t.prototype.onRequestWillBeSent=function(n){this._requestWillBeSentEventSource.addHandler(n)},t.prototype.onResponseReceived=function(n){this._responseReceivedEventSource.addHandler(n)},t.prototype.simulateNotification=function(){var n,t,i;if(this._data.notifications.length<=0)return!1;if(n=this._data.notifications.shift(),!n.params||!n.params.requestId)return!0;try{t=n.method.split(".",2);i=t[1];switch(i){case"dataReceived":this._dataReceivedEventSource.invoke(n.params);break;case"loadingFailed":this._loadingFailedEventSource.invoke(n.params);break;case"loadingFinished":this._loadingFinishedEventSource.invoke(n.params);break;case"requestServedFromCache":this._requestServedFromCacheEventSource.invoke(n.params);break;case"requestWillBeSent":this._requestWillBeSentEventSource.invoke(n.params);break;case"responseReceived":this._responseReceivedEventSource.invoke(n.params)}}catch(r){}finally{return!0}},t.prototype.startNotificationTimer=function(){var n=this;this._timerId=setInterval(function(){return n.simulateNotification()||n.stopNotificationTimer()},50)},t.prototype.stopNotificationTimer=function(){typeof this._timerId=="number"&&(clearInterval(this._timerId),this._timerId=undefined)},t}();t.NetjsonNetworkProfiler=f})(t=n.Netjson||(n.Netjson={}))})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(t){"use strict";var i=Microsoft.Plugin,r=Microsoft.VisualStudio.DiagnosticsHub,f=Microsoft.VisualStudio.DiagnosticsHub.SessionState,u=function(){function u(){}return u.create=function(n){return n.targetEngineKind===2?u.createChromiumProfiler(n):i.F12?u.createF12Profiler():u.createVSProfiler()},u.createChromiumProfiler=function(n){var t=new Common.Chromium.RemoteDebug(n.channel);return i.Promise.wrap({page:t.page,profiler:t.network})},u.createF12Profiler=function(){var r,f,u;return window.parent&&window.parent.getExternalObj?r=window.parent.getExternalObj():window.external?r=window.external:n.Tools.Utility.Assert.fail("Cannot find ETW collector object."),f=new t.Diagnostics.F12DiagnosticsSession(r),u=new t.RemoteProxy(f),i.Promise.wrap({page:new t.RemotePage(u),profiler:new t.NetworkProfiler(u)})},u.createVSProfiler=function(){var r=new t.VSDiagnosticsHubSession;return r.isActiveSession().then(function(n){return n?u.createLiveVSProfiler(r):u.createPostMortemVSProfiler(r)},function(){return t.App.displayError(i.Resources.getString("OpenSessionFailedMessage")),n.Tools.Utility.Assert.fail("Cannot find session."),null})},u.createLiveVSProfiler=function(n){var e=new t.Diagnostics.HubDiagnosticSession,r=new t.RemoteProxy(e),f=new t.NetworkProfiler(r),o=new t.Netjson.NetjsonLogger(f);return u.bindVSDiagHubEvents(n,o),i.Promise.wrap({page:new t.RemotePage(r),profiler:f})},u.createPostMortemVSProfiler=function(r){return r.importFromDiagsession().then(function(r){try{return{page:null,profiler:new t.Netjson.NetjsonNetworkProfiler(r,u.SIMULATE_DELAY_ON_POST_MORTEM)}}catch(f){return t.App.displayError(i.Resources.getString("OpenSessionFailedMessage")),n.Tools.Utility.Assert.fail("The netjson file is not of a supported format."),null}},function(){return t.App.displayError(i.Resources.getString("OpenSessionFailedMessage")),n.Tools.Utility.Assert.fail("Cannot open diagsession file."),null})},u.bindVSDiagHubEvents=function(n,u){var f=r.getCurrentSession();f.addStateChangedEventListener(function(r){if(r.currentState===400){var f=r.getDeferral();u.getLog().then(function(t){return n.exportToDiagsession(t)}).then(function(){f.complete()},function(){t.App.displayError(i.Resources.getString("SaveSessionFailedMessage"));f.complete()})}})},u.SIMULATE_DELAY_ON_POST_MORTEM=!1,u}();t.NetworkProfilerFactory=u})(i=t.Network||(t.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function t(t){this._model=t;this._persistenceManager=new n.PersistenceManager;this.getInitialValues();this.setupListeners()}return Object.defineProperty(t.prototype,"detailsPanelCollapsed",{get:function(){return this._detailsPanelCollapsed},set:function(n){n!=this._detailsPanelCollapsed&&(this._detailsPanelCollapsed=n,this._persistenceManager.setSetting(t.DETAILS_PANEL_COLLAPSED_KEY,n),this._persistenceManager.saveState())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"refreshFromServer",{get:function(){return this._refreshFromServer},set:function(n){n!=this._refreshFromServer&&(this._refreshFromServer=n,this._persistenceManager.setSetting(t.REFRESH_FROM_SERVER_KEY,n),this._persistenceManager.saveState())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clearOnNavigate",{get:function(){return this._clearOnNavigate},set:function(n){n!=this._clearOnNavigate&&(this._clearOnNavigate=n,this._persistenceManager.setSetting(t.CLEAR_ON_NAVIGATE_KEY,n),this._persistenceManager.saveState())},enumerable:!0,configurable:!0}),t.prototype.getInitialValues=function(){var r=this._persistenceManager.getSetting(t.DETAILS_PANEL_COLLAPSED_KEY),n,i;r!==undefined&&(this._model.detailsPanelCollapsed=r);n=this._persistenceManager.getSetting(t.REFRESH_FROM_SERVER_KEY);n!==undefined&&(this._model.shouldRefreshFromServer=n);i=this._persistenceManager.getSetting(t.CLEAR_ON_NAVIGATE_KEY);i!==undefined&&(this._model.shouldClearOnNavigate=i)},t.prototype.setupListeners=function(){var t=this;this._model.detailsPanelCollapsedChanged.addHandler(function(n){t.detailsPanelCollapsed=n});this._model.shouldClearOnNavigateChanged.addHandler(function(i){var r={ToolName:Common.ToolName.NETWORK,CommandName:n.Telemetry.CommandName.CLEAR_ON_NAVIGATE,TriggerType:0,ActiveState:i};n.Telemetry.analytics.log(Common.TelemetryEventName.EXECUTE_COMMAND,r);t.clearOnNavigate=i});this._model.shouldRefreshFromServerChanged.addHandler(function(i){var r={ToolName:Common.ToolName.NETWORK,CommandName:n.Telemetry.CommandName.SHOULD_REFRESH_FROM_SERVER,TriggerType:0,ActiveState:i};n.Telemetry.analytics.log(Common.TelemetryEventName.EXECUTE_COMMAND,r);t.refreshFromServer=i})},t.DETAILS_PANEL_COLLAPSED_KEY="detailsPanelCollapsed",t.REFRESH_FROM_SERVER_KEY="refreshFromServer",t.CLEAR_ON_NAVIGATE_KEY="clearOnNavigate",t}();n.NetworkSettings=t})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(n){this._eventManager=new t.Utilities.EventManager;this._remoteProxy=n;this._remoteProxy.addNotificationListener("FrameNavigated",this.fireFrameNavigated.bind(this));this._remoteProxy.addNotificationListener("RemoteCodeInitialized",this.fireRemoteCodeInitialized.bind(this));this._remoteProxy.addNotificationListener("DOMContentLoaded",this.fireDOMContentLoaded.bind(this));this._remoteProxy.addNotificationListener("LoadEvent",this.fireDownloadCompleted.bind(this))}return n.prototype.enable=function(){return t.Promise.wrap(null)},n.prototype.getResourceTree=function(){return t.Promise.wrap(null)},n.prototype.onFrameNavigated=function(n){this._eventManager.addEventListener("frameNavigated",n)},n.prototype.onFrameAttached=function(n){this._eventManager.addEventListener("frameAttached",n)},n.prototype.onFrameDetached=function(n){this._eventManager.addEventListener("frameDetached",n)},n.prototype.onFrameStartedLoading=function(n){this._eventManager.addEventListener("frameStartedLoading",n)},n.prototype.onRemoteCodeInitialized=function(n){this._eventManager.addEventListener("remoteCodeInitialized",n)},n.prototype.onDOMContentLoaded=function(n){this._eventManager.addEventListener("DOMContentLoaded",n)},n.prototype.onDownloadCompleted=function(n){this._eventManager.addEventListener("LoadEvent",n)},n.prototype.fireDOMContentLoaded=function(n){this._eventManager.dispatchEvent("DOMContentLoaded",n)},n.prototype.fireDownloadCompleted=function(n){this._eventManager.dispatchEvent("LoadEvent",n)},n.prototype.fireFrameNavigated=function(n){this._eventManager.dispatchEvent("frameNavigated",n)},n.prototype.fireFrameAttached=function(n){this._eventManager.dispatchEvent("frameAttached",n)},n.prototype.fireFrameDetached=function(n){this._eventManager.dispatchEvent("frameDetached",n)},n.prototype.fireFrameStartedLoading=function(n){this._eventManager.dispatchEvent("frameStartedLoading",n)},n.prototype.fireRemoteCodeInitialized=function(n){this._eventManager.dispatchEvent("remoteCodeInitialized",n)},n}();n.RemotePage=i})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(t){this._notificationListeners=[];this._diagnosticsController=new n.DiagnosticsToolWindowController(t);this._diagnosticsController.attachEventSource.addHandler(this.onAttach.bind(this));this._diagnosticsController.messageEventSource.addHandler(this.onMessage.bind(this))}return i.prototype.addNotificationListener=function(n,t){this._notificationListeners.push({notificationName:n,listener:t})},i.prototype.canClearBrowserCache=function(){var n=this;return new t.Promise(function(t){n._diagnosticsController.callProxy({name:"canClearBrowserCache",args:[],hasCompleted:null,dataReceivedHandler:null,executedHandler:function(n){t&&t({result:n})}})})},i.prototype.canClearBrowserCookies=function(){var n=this;return new t.Promise(function(t){n._diagnosticsController.callProxy({name:"canClearBrowserCookies",args:[],hasCompleted:null,dataReceivedHandler:null,executedHandler:function(n){t&&t({result:n})}})})},i.prototype.clearBrowserCache=function(){return t.Promise.wrap(this._diagnosticsController.callProxy({name:"clearBrowserCache",args:[],hasCompleted:null,dataReceivedHandler:null,executedHandler:null}))},i.prototype.clearBrowserCacheForDomain=function(){return t.Promise.wrap(this._diagnosticsController.callProxy({name:"clearBrowserCacheForDomain",args:[],hasCompleted:null,dataReceivedHandler:null,executedHandler:null}))},i.prototype.clearAllCookies=function(){return t.Promise.wrap(this._diagnosticsController.callProxy({name:"clearAllCookies",args:[],hasCompleted:null,dataReceivedHandler:null,executedHandler:null}))},i.prototype.clearAllCookiesForDomain=function(){return t.Promise.wrap(this._diagnosticsController.callProxy({name:"clearAllCookiesForDomain",args:[],hasCompleted:null,dataReceivedHandler:null,executedHandler:null}))},i.prototype.setCacheDisabled=function(n){return t.Promise.wrap(this._diagnosticsController.callProxy({name:"setCacheDisabled",args:[n],hasCompleted:null,dataReceivedHandler:null,executedHandler:null}))},i.prototype.onAttach=function(){this._diagnosticsController.DiagnosticSession.loadScriptInProc("remoteHelpers.js");this._diagnosticsController.DiagnosticSession.loadScriptInProc("Remote.js")},i.prototype.onMessage=function(n){var t,i;try{t=JSON.parse(n)}catch(r){}if(t&&t.notification)for(i=0;i<this._notificationListeners.length;++i)this._notificationListeners[i].notificationName===t.notification&&this._notificationListeners[i].listener(t.params)},i}();n.RemoteProxy=i})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,i;(function(n){var i;(function(n){var i=function(i){function r(n){i.call(this);this.sortByStatusCode=new Common.EventSource;this._networkModel=n;this._networkModel.summaryModel.collectionChanged.addHandler(this.triggerUpdateSummaryBar.bind(this));this._networkModel.summaryItemPropertyChanged.addHandler(this.triggerUpdateSummaryBar.bind(this));this._networkModel.propertyChanged.addHandler(this.onNetworkModelPropertyChanged.bind(this));this.updateSummaryBar()}return __extends(r,i),r.initialize=function(){Common.ObservableHelpers.defineProperty(r,r.ErrorCountProperty,0);Common.ObservableHelpers.defineProperty(r,r.ErrorCountStringProperty,"");Common.ObservableHelpers.defineProperty(r,r.RequestCountProperty,"");Common.ObservableHelpers.defineProperty(r,r.TotalSizeProperty,"");Common.ObservableHelpers.defineProperty(r,r.TotalTimeProperty,"")},r.prototype.updateSummaryBar=function(){var f,r={},u=!1,h=this._networkModel.summaryModel.getOriginalArray(),i=this.getSummaryBarInfo(h),e,o,s;this._networkModel.contentTypeFilterModel.isFilterApplied&&(e=this._networkModel.summaryModel.getFilteredArray(),r=this.getSummaryBarInfo(e),u=!0);f=i.errorCount!==1?"SummaryBarNumberOfErrorsLabel":"SummaryBarNumberOfErrorLabel";this.errorCount=i.errorCount;this.errorCountString=this.getSummaryLabel(f,i.errorCount,u,r.errorCount);f=i.requestCount!==1?"SummaryBarNumberOfRequestsLabel":"SummaryBarNumberOfRequestLabel";this.requestCount=this.getSummaryLabel(f,i.requestCount,u,r.requestCount);this.totalSize=this.getSummaryLabel("SummaryBarDataTransferredLabel",n.Converters.ByteSizeToStringConverter.convertTo(i.totalSize),u,n.Converters.ByteSizeToStringConverter.convertTo(r.totalSize));this.totalTime=this.getSummaryLabel("SummaryBarTimeTakenLabel",n.Converters.TimeStampToStringConverter.convertTo(i.totalTime),u,n.Converters.TimeStampToStringConverter.convertTo(r.totalTime));o=this._networkModel.domContentLoadedTime&&this._networkModel.domContentLoadedTime!==Common.TimeStamp.Zero;s=this._networkModel.loadEventCompletedTime&&this._networkModel.loadEventCompletedTime!==Common.TimeStamp.Zero;(o||s)&&(this.totalTime+=t.Resources.getString("SummaryBarPageTimings",n.Converters.TimeStampToStringConverter.convertTo(this._networkModel.domContentLoadedTime),n.Converters.TimeStampToStringConverter.convertTo(this._networkModel.loadEventCompletedTime)))},r.prototype.onNetworkModelPropertyChanged=function(t){switch(t){case n.NetworkModel.DomContentLoadedTimeProperty:case n.NetworkModel.LoadEventCompletedTimeProperty:this.triggerUpdateSummaryBar()}},r.prototype.onSummaryBarErrorSpanClicked=function(){this.errorCount>0&&this.sortByStatusCode.invoke()},r.prototype.triggerUpdateSummaryBar=function(){var n=this;this._updateSummaryBarTimerCookie&&window.clearTimeout(this._updateSummaryBarTimerCookie);this._updateSummaryBarTimerCookie=window.setTimeout(function(){return n.updateSummaryBar()},r.UPDATE_DELAY_MILLISECONDS)},r.prototype.getSummaryBarInfo=function(n){for(var t,u=0,f=0,e=n.length,i=new Common.TimeStamp(0),r=0;r<n.length;r++)t=n[r],t.statusCode>=400&&u++,t.timingsState!==1&&(f+=t.contentSize),i=i.add(t.totalTime);return{errorCount:u,requestCount:e,totalSize:f,totalTime:i}},r.prototype.getSummaryLabel=function(n,i,r,u){var f="";return r&&typeof u!="undefined"&&(f=t.Resources.getString("SummaryBarWithFilterLabel",u)),f+t.Resources.getString(n,i)},r.UPDATE_DELAY_MILLISECONDS=250,r.ErrorCountProperty="errorCount",r.ErrorCountStringProperty="errorCountString",r.RequestCountProperty="requestCount",r.TotalSizeProperty="totalSize",r.TotalTimeProperty="totalTime",r}(Common.Observable);n.SummaryBarViewModel=i;i.initialize()})(i=n.Network||(n.Network={}))})(i=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){var t;(function(n){"use strict";function u(){t.F12?n.analytics=new Common.F12AnalyticsProxy(Common.ToolName.NETWORK):t.VS&&(n.analytics=new Common.VsAnalyticsProxy("Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Package.Extensions.NetworkTelemetry",Common.ToolName.NETWORK))}var t=Microsoft.Plugin,i,r;n.analytics=new Common.DoNothingAnalyticsProxy;n.isNavigatingFromSummaryItem=!1;n.summaryDetailPageLoadTime=Date.now();i=function(){function n(){}return n.CLEAR_CACHE="ClearCache",n.CLEAR_COOKIES="ClearCookies",n.CLEAR_ON_NAVIGATE="ClearOnNavigate",n.CLEAR_SESSION="ClearSession",n.DETAIL_PANEL_TAB_CHANGE="DetailPanelTabChange",n.DETAIL_PANEL_TOGGLE="DetailPanelToggle",n.SHOULD_REFRESH_FROM_SERVER="ShouldRefreshFromServer",n.SUMMARY_ITEM_CHANGE="SummaryItemChange",n}();n.CommandName=i;r=function(){function n(){}return n.NETWORK_DETAIL_PAGE_LOAD="NetworkDetailPageLoad",n.NETWORK_DETAIL_TAB_CHANGE="NetworkDetailTabChange",n.NETWORK_SELECTED_INDEX_CHANGED="NetworkSelectedIndexChanged",n}();n.EventName=r;n.initializeAnalytics=u})(t=n.Telemetry||(n.Telemetry={}))})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(n){function t(t){n.call(this,t||"Network.timingsView");this.tabIndex=0}return __extends(t,n),t.initialize=function(){Common.ObservableHelpers.defineProperty(t,t.AriaLabelPropertyName,"");Common.ObservableHelpers.defineProperty(t,t.HideRedirectInfoPropertyName,!1)},t.prototype.onModelChanged=function(){var u,i,t,r;if(n.prototype.onModelChanged.call(this),u=[],this.rootElement){for(i=[this.rootElement];i.length>0;)if(t=i.pop(),t.nodeType===t.TEXT_NODE&&t.textContent.trim())u.push(t.textContent);else if(t.childNodes&&(!t.getAttribute||!t.getAttribute("aria-hidden")||t.getAttribute("aria-hidden").toLowerCase()!=="true"))for(r=t.childNodes.length-1;r>=0;r--)i.push(t.childNodes[r]);this.rootElement.setAttribute("aria-label",u.join(", "))}},t.prototype.onTabActivated=function(){},t.prototype.onTabResize=function(){},t.AriaLabelPropertyName="ariaLabel",t.HideRedirectInfoPropertyName="hideRedirectInfo",t}(Common.TemplateControl);n.TimingsView=t;t.initialize()})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){var i;(function(t){"use strict";var u=Microsoft.Plugin,f=Common.Controls.Grid,i=function(n){function t(t,i){n.call(this,i.valueIndex,"","",i.width,!1,null);this.keyIndex=i.keyIndex;this.valueDecoratorIndex=i.valueDecoratorIndex;this.getCellContents=t.buildCellContents.bind(t,this.populateCell.bind(this))}return __extends(t,n),t.prototype.getClipboardText=function(n,i){return i[this.keyIndex]===t.ExpanderRowKeyString?i[this.index]:i[this.keyIndex]+": "+i[this.index]},t.prototype.getAriaLabelDescription=function(n,t){return this.getClipboardText(n,t)},t.prototype.populateCell=function(n,i,r,u,f){var s=f.key,o,h,c,e;s===t.ExpanderRowKeyString?(n.classList.add("expanderRow"),e=document.createElement("span"),e.innerText=u,n.appendChild(e)):s&&(o=document.createElement("span"),o.classList.add("key-string"),o.innerText=s,n.appendChild(o),r.valueDecoratorIndex&&(h=f.valueDecorator,h&&(c=document.createElement("span"),c.innerHTML=h,n.appendChild(c))),e=document.createElement("span"),e.classList.add("value-string"),e.innerText=f.value||"",n.appendChild(e))},t.ExpanderRowKeyString="<EXPANDER>",t}(f.ColumnInfo),r;t.KeyValueViewerColumn=i;r=function(r){function f(n){r.call(this,n||"Network.gridKeyValueViewer");this._delayer=new t.Delayer}return __extends(f,r),Object.defineProperty(f.prototype,"allowMultipleSelection",{get:function(){return!0},enumerable:!0,configurable:!0}),f.initialize=function(){Common.ObservableHelpers.defineProperty(f,f.HasDataPropertyName,!0);Common.ObservableHelpers.defineProperty(f,f.PlaceholderPropertyName,"")},f.prototype.getChildData=function(n,t){t({itemsWithPlaceholders:[],expandStates:[]})},f.prototype.getColumns=function(n){if(!this._columnInfo)this._columnInfo=[{keyIndex:"key",valueIndex:"value",valueDecoratorIndex:"valueDecorator",width:600}].map(function(t){return new i(n,t)});return this._columnInfo},f.prototype.getDefaultSortOrders=function(){return null},f.prototype.customizeGridOptions=function(n){return n.coreCssClass="keyvalue-grid",n.header=!1,n.rowNormalClass="keyvalue-grid-row-normal",n},f.prototype.getContextMenuCommands=function(){var n=this,t=[];return t.push({callback:function(){return n.dataGrid.copyTextToClipboard()},type:1,label:u.Resources.getString("CopyWithKeyboardShortcutContextMenu")}),t.push({callback:function(){return n.copyValue()},type:1,label:u.Resources.getString("CopyValueContextMenu"),hidden:function(){return n.dataGrid.getSelectionCount()!==1}}),t},f.prototype.onContextMenuOpening=function(){},f.prototype.onCtrlG=function(){},f.prototype.getDefaultData=function(){return[]},f.prototype.getDefaultExpandStates=function(){return[]},f.prototype.hasChildData=function(){return!1},f.prototype.appendCustomData=function(){},f.prototype.onApplyTemplate=function(){r.prototype.onApplyTemplate.call(this);var i=this.getNamedElement("gridContainer");n.Tools.Utility.Assert.isTrue(!!i,"Expecting an element named gridContainer.");this.dataGrid=new t.NetworkGridControl(i,this);this._defaultDataSource=this.getDefaultData();this._defaultExpandStates=this.getDefaultExpandStates();i.addEventListener(Common.Controls.Grid.GridControl.EVENT_ROW_EXPANDED_COLLAPSED,this.persistRowExpandState.bind(this))},f.prototype.onModelChanged=function(){r.prototype.onModelChanged.call(this);this._modelPropertyChangedEvtReg&&(this._modelPropertyChangedEvtReg.unregister(),this._modelPropertyChangedEvtReg=null);this.dataGrid.setSelectedRowIndex(-1);var n=this.model;n&&n.propertyChanged&&(this._modelPropertyChangedEvtReg=n.propertyChanged.addHandler(this.onModelPropertiesChanged.bind(this)));this.refreshUi()},f.prototype.refreshUi=function(){for(var i,r=this,t=[],n=0,u=this._defaultExpandStates.length;n<u;++n)this._defaultExpandStates[n]>0&&(i=this._defaultDataSource[n],t.push(i.expanderType));this.setDefaultDataSource();this.dataGrid.expandNodesIf(function(n){return t.indexOf(n.expanderType)>=0||!r.hasChildData(n)})},f.prototype.onResize=function(){this.rootElement.clientWidth!==0&&(this._columnInfo[0].width=Math.max(0,this.rootElement.clientWidth-4),this.dataGrid.layout())},f.prototype.copyValue=function(){var t=this.dataGrid.getAllRowData(),n=this.dataGrid.getSelectedDataIndex(),i;typeof n=="number"&&n<t.length&&(i=t[n].value);this.dataGrid.copyTextToClipboard(i||"")},f.prototype.getDefaultDataSourceIndexForRowExpanderIndex=function(n){for(var u,r=0,t=0;t<this._defaultDataSource.length;++t)if(u=this._defaultDataSource[t],u.key===i.ExpanderRowKeyString){if(r===n)return t;++r}return-1},f.prototype.getRowExpanderIndexForDataIndex=function(n){for(var r,f,u=-1,e=this.dataGrid.getExpandStates(),t=0;t<e.length;++t){if(r=this.dataGrid.getRowData(t),r&&r.key===i.ExpanderRowKeyString&&(++u,t===n))return u;f=this.dataGrid._getExpandState(t);t+=Math.abs(f)}return-1},f.prototype.persistRowExpandState=function(n){var i=n?n.customData:null,f,u,r,e,t;i&&i.length>0&&(f=i[0].dataIndex,u=this.getRowExpanderIndexForDataIndex(f),u>=0&&(r=this.getDefaultDataSourceIndexForRowExpanderIndex(u),r>=0&&(e=i[0].isExpanded,t=this._defaultExpandStates[r],t=Math.abs(t),t=e?t:-t,this._defaultExpandStates[r]=t)),n.cancelBubble=!0)},f.prototype.onModelPropertiesChanged=function(n){var t=this;this.modelPropertiesDependencyList&&this.modelPropertiesDependencyList.indexOf(n)>=0&&this._delayer.delay(function(){t.refreshUi()})},f.prototype.setDefaultDataSource=function(){var n=[],t;this.appendCustomData(n);this.hasData=n.length>0;t=n.map(function(){return 0});n=n.concat(this._defaultDataSource);t=t.concat(this._defaultExpandStates);this.dataGrid.setDataSource(n,t,this._columnInfo,null)},f.HasDataPropertyName="hasData",f.PlaceholderPropertyName="placeholder",f}(Common.TemplateControl);t.KeyValueViewer=r;r.initialize()})(i=t.Network||(t.Network={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,r,i;(function(n){n[n.Request=0]="Request";n[n.Response=1]="Response"})(n.CookieDataType||(n.CookieDataType={}));r=n.CookieDataType;i=function(i){function r(n){i.call(this,n)}return __extends(r,i),r.prototype.onApplyTemplate=function(){i.prototype.onApplyTemplate.call(this);this.onModelChanged();this.rootElement.classList.add(r.CssClass)},r.prototype.onModelChanged=function(){i.prototype.onModelChanged.call(this);this.placeholder=this.model?t.Resources.getString("ResourceNoCookies"):t.Resources.getString("ResourceNothingSelected");this.hasData=!!this.model&&(this.model.requestCookieHeaders.length>0||this.model.responseCookieHeaders.length>0)},r.prototype.getChildData=function(n,t){var i={itemsWithPlaceholders:[],expandStates:[]},r;this.model&&(n.expanderType===0?r=this.model.requestCookieHeaders:n.expanderType===1&&(r=this.model.responseCookieHeaders),r.forEach(function(n){n.tuples.forEach(function(t,r){i.itemsWithPlaceholders.push({key:t.key,value:t.value});n.isRequest||r!=0?i.expandStates.push(0):i.expandStates.push(n.tuples.length-1)})}));t(i)},r.prototype.hasChildData=function(n){if(!this.model)return!1;switch(n.expanderType){case 0:return!!this.model.requestCookieHeaders&&this.model.requestCookieHeaders.length>0;case 1:return!!this.model.responseCookieHeaders&&this.model.responseCookieHeaders.length>0;default:return!1}},r.prototype.onTabResize=function(){i.prototype.onResize.call(this)},r.prototype.onTabActivated=function(){i.prototype.onResize.call(this)},r.prototype.getDefaultData=function(){return[{key:n.KeyValueViewerColumn.ExpanderRowKeyString,value:t.Resources.getString("RequestCookies"),expanderType:0},{isPlaceholder:!0},{key:n.KeyValueViewerColumn.ExpanderRowKeyString,value:t.Resources.getString("ResponseCookies"),expanderType:1},{isPlaceholder:!0}]},r.prototype.getDefaultExpandStates=function(){return[1,0,1,0]},r.CssClass="cookiesPane",r}(n.KeyValueViewer);n.CookiesView=i})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(n){"use strict";var i=Microsoft.Plugin,r,u,t;(function(n){n[n.PreNetwork=0]="PreNetwork";n[n.PostNetwork=1]="PostNetwork"})(n.CacheHitKind||(n.CacheHitKind={}));r=n.CacheHitKind,function(n){n[n.Starting=0]="Starting";n[n.Running=1]="Running";n[n.Stopping=2]="Stopping";n[n.Stopped=3]="Stopped"}(n.ProfilingState||(n.ProfilingState={}));u=n.ProfilingState;t=function(t){function r(){var r=this,u;t.call(this);this._endTimestamp=Common.TimeStamp.Zero;this._redirectRequestIdToIdMap=new Map;this.onOpen=new Common.EventSource;this.onSave=new Common.EventSource;this.onStart=new Common.EventSource;this.onStop=new Common.EventSource;this.shouldRefreshFromServerChanged=new Common.EventSource;this.shouldClearOnNavigateChanged=new Common.EventSource;this.detailsPanelCollapsedChanged=new Common.EventSource;this.summaryItemPropertyChanged=new Common.EventSource;this._onSummaryModelItemPropertyChangedHandler=this.onSummaryModelItemPropertyChanged.bind(this);i.F12&&(u=new n.NetworkSettings(this));this._cacheHitMap=new Map;this.contentTypeFilterModel=new n.ContentTypeFilterViewModel;this.summaryModel=new Common.FilteredObservableCollection;this.summaryModel.filter=this.contentTypeFilterModel;this.summaryModel.collectionChanged.addHandler(function(n){return r.onSummaryModelCollectionChanged(n)});this.summaryBarModel=new n.SummaryBarViewModel(this)}return __extends(r,t),Object.defineProperty(r.prototype,"canOpen",{get:function(){return this.profilingState===3},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"canSave",{get:function(){return this.profilingState===1||this.profilingState===3},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"canStart",{get:function(){return this.profilingState===3},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"canStop",{get:function(){return this.profilingState===1},enumerable:!0,configurable:!0}),Object.defineProperty(r,"IsF12Host",{get:function(){return!!i.F12},enumerable:!0,configurable:!0}),r.initialize=function(){Common.ObservableHelpers.defineProperty(r,r.CanClearCachePropertyName,!1);Common.ObservableHelpers.defineProperty(r,r.CanClearCookiesPropertyName,!1);Common.ObservableHelpers.defineProperty(r,r.CurrentSummaryItemPropertyName,null,function(n,t,i){return n.onCurrentSummaryItemChanged(t,i)});Common.ObservableHelpers.defineProperty(r,r.DetailsPanelCollapsedPropertyName,!0,function(n){return n.onDetailsPanelCollapsedChanged()});Common.ObservableHelpers.defineProperty(r,r.DomContentLoadedTimeProperty,null);Common.ObservableHelpers.defineProperty(r,r.IsF12HostPropertyName,r.IsF12Host);Common.ObservableHelpers.defineProperty(r,r.LoadEventCompletedTimeProperty,null);Common.ObservableHelpers.defineProperty(r,r.ProfilingStatePropertyName,null,function(n){return n.onProfilingStateChanged()});Common.ObservableHelpers.defineProperty(r,r.RulerDurationPropertyName,Common.TimeStamp.Zero);Common.ObservableHelpers.defineProperty(r,r.ShouldClearOnNavigatePropertyName,r.IsF12Host,function(n,t,i){return n.shouldClearOnNavigateChanged.invoke(i)});Common.ObservableHelpers.defineProperty(r,r.ShouldRefreshFromServerPropertyName,!1,function(n,t,i){return n.onRefreshFromServerChanged(i)});Common.ObservableHelpers.defineProperty(r,r.StartTimestampPropertyName,Common.TimeStamp.MaxTime)},r.prototype.applyCacheInfo=function(n,t){var r=this.findSummaryItemByActivityId(n.activityId),i,u;r&&(r.applyCacheInfo(n,t),i=this._cacheHitMap.get(r.requestId),i&&i.redirectItem&&(u=this.tryGetLocationUrl(i.preNetworkCacheHitItem),u&&(i.redirectItem.fullURL=u),this._cacheHitMap.delete(r.requestId)))},r.prototype.applyRequestToSummaryModelItem=function(t,i){var r,e,u,f;return i===void 0&&(i=!1),t.timestamp&&(this.startTimestamp=Common.TimeStamp.min(this.startTimestamp,t.timestamp),this._endTimestamp=Common.TimeStamp.max(this._endTimestamp,t.timestamp),this.rulerDuration=Common.TimeStamp.max(this.rulerDuration,this._endTimestamp.subtract(this.startTimestamp))),r=this.findSummaryItemByRequestId(t.id),e=!r||r.isComplete||t.activityId!==r.activityId||!!t.requestInfo,e&&(r=new n.SummaryViewModelItem,this.summaryModel.push(r),this.tryCorrelateWithPreviousRedirect(r,t),this._redirectRequestIdToIdMap.set(t.id,r.id)),i&&t.cacheHitKind===0?this._cacheHitMap.set(t.id,{preNetworkCacheHitItem:r}):!r.hasRequest&&t.responseInfo&&(u=this._cacheHitMap.get(t.id),u&&!u.redirectItem&&u.preNetworkCacheHitItem.activityId!==t.activityId&&(u.redirectItem=r,f=this.tryGetLocationUrl(u.preNetworkCacheHitItem),f&&(t.responseInfo.url=f,t.preNetworkCacheHitUrl=f,this._cacheHitMap.delete(r.requestId)))),r.applyRequest(t),r.id},r.prototype.applyRedirectToSummaryModelItem=function(n,t){return n.applyRedirect(t),n.id},r.prototype.clearSession=function(){var t=this;n.NetworkShell.NetworkProfiler.clearActivities(Common.TimeStamp.fromMilliseconds(Date.now())).done(function(){t._cacheHitMap.clear();t.resetDocumentTimings();t.summaryModel.clear();t.rulerDuration=Common.TimeStamp.Zero;t.startTimestamp=Common.TimeStamp.MaxTime;t._endTimestamp=Common.TimeStamp.Zero;t._redirectRequestIdToIdMap.clear()},function(){})},r.prototype.findSummaryItemByRequestId=function(n){return this.findSummaryItem(function(t){return t.requestId===n})},r.prototype.findSummaryItemById=function(n){return this.findSummaryItem(function(t){return t.id===n})},r.prototype.onFrameNavigated=function(){this.shouldClearOnNavigate&&this.profilingState!==3&&this.profilingState!==2&&this.clearSession()},r.prototype.onOpenButtonActivated=function(){this.canOpen&&this.onOpen.invoke()},r.prototype.onSaveButtonActivated=function(){this.canSave&&this.onSave.invoke()},r.prototype.onStartButtonActivated=function(){this.canStart&&this.onStart.invoke()},r.prototype.onStopButtonActivated=function(){this.canStop&&this.onStop.invoke()},r.prototype.onToggleStartStop=function(){this.canStart?this.onStart.invoke():this.canStop&&this.onStop.invoke()},r.prototype.resetDocumentTimings=function(){this.domContentLoadedTime=null;this.loadEventCompletedTime=null},r.prototype.tryCorrelateWithPreviousRedirect=function(n,t){var i=this._redirectRequestIdToIdMap.get(t.id),r;typeof i=="number"&&(r=this.findSummaryItemById(i),r&&(n.redirectedFrom={id:i},r.redirectedTo={id:n.id}),this._redirectRequestIdToIdMap.delete(t.id))},r.prototype.findSummaryItem=function(n){for(var i,t=this.summaryModel.lengthOfOriginalList-1;t>=0;t--)if(i=this.summaryModel.getItemFromOriginalList(t),n(i))return i;return null},r.prototype.findSummaryItemByActivityId=function(n){return this.findSummaryItem(function(t){return t.activityId===n})},r.prototype.updateSelectionOnAvailableItem=function(){!this.detailsPanelCollapsed&&!this.currentSummaryItem&&this.summaryModel&&this.summaryModel.length>0&&(this.currentSummaryItem=this.summaryModel.getItem(0))},r.prototype.onClearCache=function(){var t=this;n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.CLEAR_CACHE,0);n.NetworkShell.NetworkProfiler.clearBrowserCache().then(function(){return n.NetworkShell.NetworkProfiler.canClearBrowserCache()}).done(function(i){t.canClearCache=i.result;n.NetworkShell.TestEventObject.fireEvent(n.Notifications.ClearCache)})},r.prototype.onClearCookies=function(){var t=this;n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.CLEAR_COOKIES,0);n.NetworkShell.NetworkProfiler.clearBrowserCookies().then(function(){return n.NetworkShell.NetworkProfiler.canClearBrowserCookies()}).done(function(i){t.canClearCookies=i.result;n.NetworkShell.TestEventObject.fireEvent(n.Notifications.ClearCookies)})},r.prototype.onClearSession=function(){n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.CLEAR_SESSION,0);this.clearSession()},r.prototype.onProfilingStateChanged=function(){this.propertyChanged.invoke(r.CanOpenPropertyName);this.propertyChanged.invoke(r.CanSavePropertyName);this.propertyChanged.invoke(r.CanStartPropertyName);this.propertyChanged.invoke(r.CanStopPropertyName)},r.prototype.onCurrentSummaryItemChanged=function(t,i){n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.SUMMARY_ITEM_CHANGE,5);t||!i||(this.detailsPanelCollapsed=!1)},r.prototype.onRefreshFromServerChanged=function(t){this.shouldRefreshFromServerChanged.invoke(t);n.NetworkShell.NetworkProfiler.setCacheDisabled(t).done(function(){n.NetworkShell.TestEventObject.fireEvent(n.Notifications.RefreshFromServer)})},r.prototype.onDetailsPanelCollapsedChanged=function(){n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.DETAIL_PANEL_TOGGLE,5);this.detailsPanelCollapsedChanged.invoke(this.detailsPanelCollapsed);this.updateSelectionOnAvailableItem()},r.prototype.onSummaryModelCollectionChanged=function(t){var f,e,r,u,i;n.NetworkShell.TestEventObject.fireEvent(n.Notifications.ModelChanged);switch(t.action){case 0:if(t.newItems){for(i=0;i<t.newItems.length;i++)f=t.newItems[i],f.propertyChanged.addHandler(this._onSummaryModelItemPropertyChangedHandler);this.summaryModel.length===t.newItems.length&&this.updateSelectionOnAvailableItem()}break;case 3:case 1:if(t.oldItems)for(i=0;i<t.oldItems.length;i++)e=t.oldItems[i],e.propertyChanged.removeHandler(this._onSummaryModelItemPropertyChangedHandler);break;case 2:for(r=this.summaryModel.getOriginalArray(),i=0;i<r.length;i++)r[i].propertyChanged.removeHandler(this._onSummaryModelItemPropertyChangedHandler);for(u=this.summaryModel.getFilteredArray(),i=0;i<u.length;i++)u[i].propertyChanged.addHandler(this._onSummaryModelItemPropertyChangedHandler)}},r.prototype.onSummaryModelItemPropertyChanged=function(n,t){this.summaryItemPropertyChanged.invoke({item:t,propertyName:n})},r.prototype.tryGetLocationUrl=function(n){var t,i,r;if(n&&n.responseHeaders)for(t=0;t<n.responseHeaders.length;++t)if(i=n.responseHeaders[t],r=i.key,r&&r.toLowerCase()==="location")return i.value;return null},r.CanClearCachePropertyName="canClearCache",r.CanClearCookiesPropertyName="canClearCookies",r.CanOpenPropertyName="canOpen",r.CanSavePropertyName="canSave",r.CanStartPropertyName="canStart",r.CanStopPropertyName="canStop",r.CurrentSummaryItemPropertyName="currentSummaryItem",r.DetailsPanelCollapsedPropertyName="detailsPanelCollapsed",r.DomContentLoadedTimeProperty="domContentLoadedTime",r.IsF12HostPropertyName="isF12Host",r.LoadEventCompletedTimeProperty="loadEventCompletedTime",r.ProfilingStatePropertyName="profilingState",r.RulerDurationPropertyName="rulerDuration",r.ShouldClearOnNavigatePropertyName="shouldClearOnNavigate",r.ShouldRefreshFromServerPropertyName="shouldRefreshFromServer",r.StartTimestampPropertyName="startTimestamp",r.SummaryModelPropertyName="summaryModel",r}(Common.Observable);n.NetworkModel=t;t.initialize()})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,i;(function(n){var i;(function(n){(function(n){n[n.Request=0]="Request";n[n.Response=1]="Response"})(n.HeaderDataType||(n.HeaderDataType={}));var r=n.HeaderDataType,i=function(i){function r(t){i.call(this,t);this.modelPropertiesDependencyList=[n.SummaryViewModelItem.FullURLPropertyName,n.SummaryViewModelItem.MethodPropertyName,n.SummaryViewModelItem.ResponseHeadersPropertyName,n.SummaryViewModelItem.RequestHeadersPropertyName,n.SummaryViewModelItem.StatusCodePropertyName,n.SummaryViewModelItem.StatusTextPropertyName]}return __extends(r,i),r.prototype.onApplyTemplate=function(){i.prototype.onApplyTemplate.call(this);this.onModelChanged();this.rootElement.classList.add(r.CssClass)},r.prototype.onModelChanged=function(){i.prototype.onModelChanged.call(this);this.placeholder=this.model?t.Resources.getString("ResourceNoHeader"):t.Resources.getString("ResourceNothingSelected")},r.prototype.getChildData=function(n,t){var r={itemsWithPlaceholders:[],expandStates:[]},i;this.model&&(i=[],n.expanderType===0?i=this.model.requestHeaders:n.expanderType===1&&(i=this.model.responseHeaders),i.forEach(function(n){r.itemsWithPlaceholders.push({key:n.key,value:n.value});r.expandStates.push(0)}));t(r)},r.prototype.hasChildData=function(n){if(!this.model)return!1;switch(n.expanderType){case 0:return this.hasHeaderData(this.model.requestHeaders);case 1:return this.hasHeaderData(this.model.responseHeaders);default:return!1}},r.prototype.onTabResize=function(){i.prototype.onResize.call(this)},r.prototype.onTabActivated=function(){i.prototype.onResize.call(this)},r.prototype.getDefaultData=function(){return[{key:n.KeyValueViewerColumn.ExpanderRowKeyString,value:t.Resources.getString("RequestHeadersTitle"),expanderType:0},{isPlaceholder:!0},{key:n.KeyValueViewerColumn.ExpanderRowKeyString,value:t.Resources.getString("ResponseHeadersTitle"),expanderType:1},{isPlaceholder:!0}]},r.prototype.getDefaultExpandStates=function(){return[1,0,1,0]},r.prototype.appendCustomData=function(n){if(this.model&&(this.model.fullURL&&n.push({key:t.Resources.getString("RequestURLTitle"),value:this.model.fullURL}),this.model.method&&n.push({key:t.Resources.getString("RequestMethodTitle"),value:this.model.method}),this.model.statusCode)){var i=this.model.statusCode+" / "+this.model.statusText;n.push({key:t.Resources.getString("StatusCodeTitle"),value:i,valueDecorator:this.buildDecoratorFromStatus(this.model.statusCode)})}},r.prototype.buildDecoratorFromStatus=function(n){var t=document.createElement("span");return t.classList.add("status-widget"),n>=400?t.classList.add("status-error"):n>=300?t.classList.add("status-warning"):t.classList.add("status-ok"),t.outerHTML},r.prototype.hasHeaderData=function(n){return!!n&&n.length>0},r.CssClass="headersPane",r}(n.KeyValueViewer);n.HeadersView=i})(i=n.Network||(n.Network={}))})(i=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(n){"use strict";var r=Microsoft.Plugin,u=function(){function n(){}return n.prototype.open=function(n){if(n instanceof i)return this._control||(this._control=new t),this._control.model=n,r.Promise.wrap(this._control)},n.prototype.close=function(n){this._control&&this._control.model==n&&(this._control.model=null)},n.prototype.doLayout=function(){this._control.refreshUi()},n}(),t,i;n.FormDataHandler=u;t=function(n){function t(){n.call(this);this.hasData=!0;this.rootElement.classList.add(t.CssClass)}return __extends(t,n),t.prototype.appendCustomData=function(n){this.model&&this.model.items.forEach(function(t){n.push(t)})},t.CssClass="formDataViewer",t}(n.KeyValueViewer);n.FormDataViewer=t;i=function(){function t(){this._items=[];this._id=Common.ResourcesView.ResourceViewController.NextModelId++}return Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"items",{get:function(){return this._items},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"modelName",{get:function(){return t.ModelName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"toolbarPanelTemplate",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"summaryModel",{get:function(){return this._summaryModel},set:function(t){this._items=t&&t.requestBody?n.ParametersView.ParseParams(t.requestBody).sort(function(n,t){return n.key.localeCompare(t.key)}):[]},enumerable:!0,configurable:!0}),t.ModelName="FormData",t}();n.FormDataModel=i})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,r=function(){function n(){}return n.RefreshFromServer="RefreshFromServer",n.ClearCache="ClearCache",n.ClearCookies="ClearCookies",n.SearchComplete="SearchComplete",n.ModelChanged="ModelChanged",n.SummaryDataSourceUpdated="SummaryDataSourceUpdated",n.ResponseProcessed="ResponseProcessed",n}(),i;n.Notifications=r;i=function(){function i(r){var u=this;this._telemetryLoadStartTime=Date.now();n.NetworkProfilerFactory.create(r).then(function(r){return u._page=r.page,i.NetworkProfiler=r.profiler,u._model=new n.NetworkModel,u._model.propertyChanged.addHandler(function(n){return u.onModelPropertyChanged(n)}),u._rootPanel=new Common.TemplateControl("Network.rootPanel"),u._rootPanel.model=u._model,document.getElementById("rootContainer").appendChild(u._rootPanel.rootElement),u._toolbar=u._rootPanel.getNamedControl("toolbar"),u.createContentTypeFilteringMenu(),u.setupSearch(),u._client=new n.NetworkProfilerClient(i.NetworkProfiler,u._page,u._model),u._page?u._page.enable():t.Promise.wrap(null)}).then(function(){u._client.enable()}).done(function(){var i={toolName:Common.ToolName.NETWORK,durationMs:Date.now()-u._telemetryLoadStartTime};n.Telemetry.analytics.log(Common.TelemetryEventName.TOOL_LOADED,i,2);t.F12&&(t.F12.addEventListener("keydown",u.f12ShortcutHandler.bind(u)),document.addEventListener("keydown",u.f12ShortcutHandler.bind(u)),t.F12.addEventListener("browsershortcut",u.f12ShortcutHandler.bind(u)),t.F12.TraceWriter.markToolReady())})}return Object.defineProperty(i.prototype,"profiler",{get:function(){return i.NetworkProfiler},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rootPanel",{get:function(){return this._rootPanel},enumerable:!0,configurable:!0}),i.prototype.createContentTypeFilteringMenu=function(){var n=this._toolbar.getNamedControl("contentTypeFilterMenuButton");this._contentTypeFilterMenu=new Common.Controls.MenuControl;this._contentTypeFilterMenu.menuItemsTemplateId="Network.contentTypeFilterMenuDropDown";this._contentTypeFilterMenu.targetButtonElement=n.rootElement;this._contentTypeFilterMenu.dismissOnMenuItemClick=!1;this._contentTypeFilterMenu.dismissOnTargetButtonClick=!0;this._contentTypeFilterMenu.focusFirstItemOnShow=!0;this._contentTypeFilterMenu.model=this._model;this._rootPanel.rootElement.appendChild(this._contentTypeFilterMenu.rootElement)},i.prototype.setupSearch=function(){var r=this._rootPanel.getNamedControl("mainPanel"),i=r.getNamedControl("selectionPanel"),u=r.getNamedControl("summaryView"),f;if(i){var e=i.bodyView.textHandler.view,o=e.getSearchIterator(u,i),s=u.getSearchIterator();this._searchProvider=new n.SearchProvider([s,o])}n.App&&(f=this._toolbar.getNamedControl("_searchControl"),f.searchProvider=this._searchProvider);!t.F12&&t.VS&&t.VS.Commands&&t.VS.Commands.bindCommand({name:"find",onexecute:function(){document.getElementById("searchbox").focus()}})},i.prototype.f12ShortcutHandler=function(n){!n.ctrlKey||n.shiftKey||n.altKey||(n.keyCode===69?this._model.onToggleStartStop():n.keyCode===83&&this._model.onSaveButtonActivated())},i.prototype.onModelPropertyChanged=function(i){i===n.NetworkModel.ProfilingStatePropertyName&&t.F12&&(this._model.profilingState===1?t.F12.Header.notifyProfilingStarted(t.F12.PluginId.Network):this._model.profilingState===3&&t.F12.Header.notifyProfilingStopped(t.F12.PluginId.Network))},i.TestEventObject=new Common.EventHelperObject,i}();n.NetworkShell=i})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={})),function(n){var t=function(){function n(){}return n.defaultGridSplitterTemplate='<div class="splitter"><\/div>',n.collapsibleGridSplitterTemplate='<div class="splitter">            <div data-name="splitterButton" class="splitterButton">&lt;<\/div>            <div class="splitterBody"><\/div>        <\/div>',n.waterfallItemTemplate='<div class="waterfallItem" data-controlbinding="style.left:startRatio; converter=F12.Tools.Network.Converters.DecimalToPercentageStringConverter">            <div class="waterfallItemBar" data-name="waterfallItemBar" data-controlbinding="style.backgroundImage:backgroundImage,                                       style.minWidth:minWidth,                                       style.width:width"><\/div>        <\/div>',n.rootPanel='<div id="rootContainer">            <div id="toolbar" data-name="toolbar" data-control="Common.Controls.ToolbarControl" data-control-templateid="Common.toolbarTemplateWithSearchControl" data-controlbinding="model:model" data-options="title:Network,                                panelTemplateId:Network.buttonPanel"><\/div>            <div data-name="mainPanel" data-control="Common.TemplateControl" data-control-templateid="Network.mainPanel" data-controlbinding="model:model"><\/div>            <div data-name="summaryBar" data-control="Common.TemplateControl" data-control-templateid="Network.summaryBarTemplate" data-controlbinding="model:model.summaryBarModel"><\/div>        <\/div>',n.summaryBarTemplate='<div class="summaryBar" tabindex="0">            <span class="summaryBarErrorSpan badgeBackground badgeError" data-binding="event-click:onSummaryBarErrorSpanClicked,                                 innerText:errorCountString,                                 class-hasErrors:errorCount"><\/span>            <span class="summaryBarRequestSpan" data-binding="innerText:requestCount"><\/span>            <span class="summaryBarSizeSpan" data-binding="innerText:totalSize"><\/span>            <span class="summaryBarTimeSpan" data-binding="innerText:totalTime"><\/span>        <\/div>',n.buttonPanel='<div>            <div data-name="startButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton" data-binding="event-click:onStartButtonActivated,                                isVisible:isF12Host,                                isEnabled:canStart" data-options="className:startButton,                                tooltip:F12StartButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="stopButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton" data-binding="event-click:onStopButtonActivated,                                isVisible:isF12Host,                                isEnabled:canStop" data-options="className:stopButton,                                tooltip:F12StopButtonTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <!-- Currently hidden -->            <div data-name="openButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton" data-binding="event-click:onOpenButtonActivated,                                isEnabled:canOpen" data-options="className:openButton,                                isVisible:false; converter=Common.CommonConverters.StringToBooleanConverter,                                tooltip:ImportSessionTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="f12SaveButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton" data-binding="event-click:onSaveButtonActivated,                                isVisible:isF12Host,                                isEnabled:canSave" data-options="className:saveButton,                                tooltip:F12ExportHarSessionTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="vsSaveButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton" data-binding="event-click:onSaveButtonActivated,                                isVisible:isF12Host; converter=Common.CommonConverters.InvertBool,                                isEnabled:canSave" data-options="className:saveButton,                                tooltip:ExportHarSessionTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="refreshServerButton" data-control="Common.Controls.ToggleButton" data-control-templateid="Common.iconButton" data-binding="isChecked:shouldRefreshFromServer; mode=twoway,                                isVisible:isF12Host" data-options="className:refreshServerButton,                                tooltip:RefreshServerTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="clearCacheButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton" data-binding="event-click:onClearCache,                                isEnabled:canClearCache,                                isVisible:isF12Host" data-options="className:clearCacheButton,                                tooltip:ClearCacheTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="clearCookiesButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton" data-binding="event-click:onClearCookies,                                isEnabled:canClearCookies,                                isVisible:isF12Host" data-options="className:clearCookiesButton,                                tooltip:ClearCookiesTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="clearOnNavigateButton" data-control="Common.Controls.ToggleButton" data-control-templateid="Common.iconButton" data-binding="isChecked:shouldClearOnNavigate; mode=twoway,                                isVisible:isF12Host" data-options="className:clearOnNavigateButton,                                tooltip:ClearOnNavigateTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="clearSessionButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton" data-binding="event-click:onClearSession,                                isEnabled:summaryModel.length; converter=Common.CommonConverters.IntToBooleanConverter" data-options="className:clearSessionButton,                                tooltip:ClearSessionTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="contentTypeFilterMenuButton" data-control="Common.Controls.ToggleButton" data-control-templateid="Common.labeledIconButton" data-binding="isChecked:contentTypeFilterModel.displayAll; converter=Common.CommonConverters.InvertBool" data-options="className:labeledIconButton33x24 filterContentTypeMenuButton,                                content:FilterContentType; converter=Common.CommonConverters.ResourceConverter,                                toggleIsCheckedOnClick:false; converter=Common.CommonConverters.StringToBooleanConverter,                                tooltip:FilterContentTypeMenuButtonTooltipText; converter=Common.CommonConverters.ResourceConverter"><\/div>        <\/div>',n.contentTypeFilterMenuDropDown='<ul>            <div data-name="displayAll" data-control="Common.Controls.CheckBoxMenuItem" data-binding="isChecked:contentTypeFilterModel.displayAll; mode=twoway" data-options="content:ContentTypeAll; converter=Common.CommonConverters.ResourceConverter,                                tooltip:ContentTypeFilterAllTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <hr />            <div data-name="displayDocuments" data-control="Common.Controls.CheckBoxMenuItem" data-binding="isChecked:contentTypeFilterModel.displayDocuments; mode=twoway" data-options="content:ContentTypeDocuments; converter=Common.CommonConverters.ResourceConverter,                                tooltip:ContentTypeFilterDocumentsTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="displayStylesheets" data-control="Common.Controls.CheckBoxMenuItem" data-binding="isChecked:contentTypeFilterModel.displayStylesheets; mode=twoway" data-options="content:ContentTypeStylesheets; converter=Common.CommonConverters.ResourceConverter,                                tooltip:ContentTypeFilterStylesheetsTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="displayImages" data-control="Common.Controls.CheckBoxMenuItem" data-binding="isChecked:contentTypeFilterModel.displayImages; mode=twoway" data-options="content:ContentTypeImages; converter=Common.CommonConverters.ResourceConverter,                                tooltip:ContentTypeFilterImagesTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="displayScripts" data-control="Common.Controls.CheckBoxMenuItem" data-binding="isChecked:contentTypeFilterModel.displayScripts; mode=twoway" data-options="content:ContentTypeScripts; converter=Common.CommonConverters.ResourceConverter,                                tooltip:ContentTypeFilterScriptsTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="displayMedia" data-control="Common.Controls.CheckBoxMenuItem" data-binding="isChecked:contentTypeFilterModel.displayMedia; mode=twoway" data-options="content:ContentTypeMedia; converter=Common.CommonConverters.ResourceConverter,                                tooltip:ContentTypeFilterMediaTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="displayFonts" data-control="Common.Controls.CheckBoxMenuItem" data-binding="isChecked:contentTypeFilterModel.displayFonts; mode=twoway" data-options="content:ContentTypeFonts; converter=Common.CommonConverters.ResourceConverter,                                tooltip:ContentTypeFilterFontsTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="displayXHR" data-control="Common.Controls.CheckBoxMenuItem" data-binding="isChecked:contentTypeFilterModel.displayXHR; mode=twoway" data-options="content:ContentTypeXHR; converter=Common.CommonConverters.ResourceConverter,                                tooltip:ContentTypeFilterXHRTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="displayOther" data-control="Common.Controls.CheckBoxMenuItem" data-binding="isChecked:contentTypeFilterModel.displayOther; mode=twoway" data-options="content:ContentTypeOther; converter=Common.CommonConverters.ResourceConverter,                                tooltip:ContentTypeFilterOtherTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>        <\/ul>',n.mainPanel='<div data-name="mainPanel" id="mainPanel" class="mainPanel">            <div data-name="summaryView" id="summaryView" class="summary" data-control="F12.Tools.Network.SummaryView" data-controlbinding="model:model" data-binding="items:summaryModel,                                selectedItem:currentSummaryItem; mode=twoway"><\/div>            <div data-name="mainSplitter" id="mainSplitter" data-control="F12.Tools.Network.CollapsibleGridSplitter" data-binding="isCollapsed: detailsPanelCollapsed; mode=twoway" data-options="alignment:right,                                defaultPosition: 330; converter=Common.CommonConverters.StringToIntConverter,                                minPosition: 330; converter=Common.CommonConverters.StringToIntConverter"><\/div>            <div data-name="selectionPanel" id="selectionPanel" data-control="F12.Tools.Network.SelectionView" data-binding="model:currentSummaryItem"><\/div>        <\/div>',n.editorToolbarButton='<div class="editorButtonContainer BPT-button" tabindex="1">            <span class="editorButton buttonIcon"><\/span>        <\/div>',n.editorToolbarPanel='<div data-options="className:editorToolbar">            <div data-name="prettyPrintButton" data-control="Common.Controls.ToggleButton" data-binding="isEnabled:prettyPrintState; converter=Common.CommonConverters.NotDisabledToTrue,                                isChecked:prettyPrintState; converter=Common.CommonConverters.OnToTrue; mode=twoway" data-control-templateid="Network.editorToolbarButton" data-options="className:prettyPrintButton,                                tooltip:PrettyPrintButtonTooltip;converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="wordWrapButton" data-control="Common.Controls.ToggleButton" data-binding="isEnabled:wordWrapState; converter=Common.CommonConverters.NotDisabledToTrue,                                isChecked:wordWrapState; converter=Common.CommonConverters.OnToTrue; mode=twoway" data-control-templateid="Network.editorToolbarButton" data-options="className:wordWrapButton,                                tooltip:WordWrapButtonTooltip;converter=Common.CommonConverters.ResourceConverter"><\/div>        <\/div>',n.resourceImageControlTemplate='<div data-options="className:imageControlContainer">            <img data-name="imageDisplay" data-options="className:bodyImage" data-binding="src:imageData,                                class-BPT-hidden:imageData; converter=Common.CommonConverters.InvertBool" />            <div data-name="keyValuePairList" data-control="Common.Controls.ItemsControl" data-binding="items:displayProperties" data-options="itemContainerControl:Common.TemplateControl(Network.keyValuePairListItem)"><\/div>        <\/div>',n.keyValuePairListItem='<div class="keyValuePair">            <span class="key-string" data-binding="textContent:key"><\/span>            <span class="value-string" data-binding="textContent:value"><\/span>        <\/div>',n.label='<div data-controlbinding="textContent:content"><\/div>',n.defaultSummaryItemLinkTemplate='<span>            <a class="_summaryLink BPT-FileLink clippedText" tabindex="0" data-controlbinding="textContent:content"><\/a>        <\/span>',n.gridKeyValueViewer='<div class="gridKeyValueViewer">            <div data-control="Common.Controls.ContentControl" data-control-templateid="Network.label" data-options="className:noDataLabel,                                tabIndex: 0" data-controlbinding="isVisible:hasData; converter=Common.CommonConverters.InvertBool,                                       content:placeholder"><\/div>            <div data-name="gridContainer" data-control="Common.TemplateControl" data-options="className:gridContainer" data-controlbinding="isVisible:hasData"><\/div>        <\/div>',n.resourcePlaceholderTemplate='<div class="noDataLabel">            <div data-control="Common.Controls.ContentControl" data-control-templateid="Network.label" data-binding="content:text" data-options="tabIndex:0"><\/div>        <\/div>',n.resourceTextTemplate='<div class="editorControlContainer">            <div data-name="editorToolbar" data-control="Common.TemplateControl" data-control-templateid="Network.editorToolbarPanel"><\/div>            <div data-name="editorRoot" class="editorElement"><\/div>        <\/div>',n.bodyView='<div class="bodyView">            <div class="requestResponseSelector" data-name="bodyViewTabControl" data-control="Common.Controls.TabControl" data-controlbinding="isVisible:model,                                       tabsLeftAligned:true"><\/div>            <div data-name="resourceViewerContainer" class="resourceViewerContainer"><\/div>            <div data-control="Common.Controls.ContentControl" data-control-templateid="Network.label" data-options="content:ResourceNothingSelected; converter=Common.CommonConverters.ResourceConverter,                                tabIndex: 0" data-controlbinding="isVisible:model; converter=Common.CommonConverters.InvertBool"><\/div>        <\/div>',n.timingsTooltip='<div class="timingsView">            <div data-control="F12.Tools.Network.TimingsView" data-control-templateid="Network.timingsViewBody" data-controlbinding="model:model" data-options="hideRedirectInfo:true"><\/div>        <\/div>',n.timingsView='<div class="timingsView">            <div data-control="F12.Tools.Network.TimingsView" data-control-templateid="Network.timingsViewBody" data-controlbinding="isVisible:model,                                       model:model,                                       hideRedirectInfo:hideRedirectInfo"><\/div>            <div data-control="Common.Controls.ContentControl" data-control-templateid="Network.label" data-options="className:timingsMessage,                                tabIndex: 0,                                content:ResourceNothingSelected; converter=Common.CommonConverters.ResourceConverter" data-controlbinding="isVisible:model; converter=Common.CommonConverters.InvertBool"><\/div>        <\/div>',n.timingsViewBody='<div>            <div class="timingsGanttChart" data-name="timingsGanttChart" data-control="Common.Controls.ItemsControl" data-binding="items:timingsViewModel.stages" data-options="itemContainerControl:F12.Tools.Network.TooltipTemplateControl(Network.timingsRow)"><\/div>            <div data-control="Common.Controls.ContentControl" data-control-templateid="Network.label" data-options="className:timingsMessage" data-binding="content:timingsViewModel.message"><\/div>            <div data-controlbinding="class-BPT-hidden:hideRedirectInfo">                <div class="redirectionInfo" data-control="Common.TemplateControl" data-control-templateid="Network.redirectionInfo" data-controlbinding="isVisible:model.hasRedirectionInfo,                                           model:model"><\/div>            <\/div>        <\/div>',n.timingsRow='<div class="keyValuePair" data-binding="attr-data-plugin-vs-tooltip:tooltip">            <div data-binding="textContent:timingsStage" class="key-string"><\/div>            <div class="value-string">                <span data-name="timingsBar" data-binding="style.backgroundColor:color,                                     style.marginLeft:startRatio; converter=F12.Tools.Network.Converters.DecimalToPercentageStringConverter,                                     style.width:durationRatio; converter=F12.Tools.Network.Converters.DecimalToPercentageStringConverter"><\/span>                <span data-name="timingsBarLabel" class="timingsBarLabel" data-binding="textContent:duration; converter=F12.Tools.Network.Converters.TimeStampToStringConverter"><\/span>            <\/div>        <\/div>',n.redirectionInfo='<div>            <hr />            <div data-control="Common.Controls.ContentControl" data-control-templateid="Network.redirectionKeyValuePair" data-options="content:RedirectedFromLabel; converter=Common.CommonConverters.ResourceConverter" data-binding="isVisible:redirectedFrom,                                model:redirectedFrom"><\/div>            <div data-control="Common.Controls.ContentControl" data-control-templateid="Network.redirectionKeyValuePair" data-options="content:RedirectedToLabel; converter=Common.CommonConverters.ResourceConverter" data-binding="isVisible:redirectedTo,                                model:redirectedTo"><\/div>        <\/div>',n.redirectionKeyValuePair='<div class="keyValuePair">            <span class="key-string" data-controlbinding="textContent:content"><\/span>            <div class="value-string" data-control="F12.Tools.Network.SummaryItemLinkControl" data-binding="itemId:id"><\/div>        <\/div>',n.cellURL='<div data-binding="control.tooltip:fullURL">            <div class="clippedText" data-binding="textContent:fullURL; converter=F12.Tools.Network.Converters.UrlToFilenameConverter"><\/div>            <div class="clippedText" data-binding="class-urlWithNoName:fullURL; converter=F12.Tools.Network.Converters.UrlHasNoNameConverter,                                                    textContent:fullURL; converter=F12.Tools.Network.Converters.UrlToPathConverter"><\/div>        <\/div>',n.cellMethod='<div class="clippedText" data-binding="control.tooltip:method,                                                textContent:method"><\/div>',n.cellStatusCode='<div data-binding="className:statusCode; converter=F12.Tools.Network.Converters.StatusCodeToClassNameConverter,                            control.tooltip:statusText">            <div class="clippedText" data-binding="textContent:statusCode;  converter=F12.Tools.Network.Converters.ZeroToEmptyStringConverter"><\/div>            <div class="clippedText" data-binding="textContent:statusText"><\/div>        <\/div>',n.cellProtocol='<div data-binding="control.tooltip:protocolName">        <div class="clippedText" data-binding="textContent:protocolName"><\/div>        <div class="clippedText" data-binding="textContent:protocolStatus"><\/div>      <\/div>',n.cellContentType='<div class="clippedText" data-binding="control.tooltip:contentType,                            textContent:contentType"><\/div>',n.cellTransferSize='<div class="clippedText" data-binding="class-cellStyle-cachedResponse:timingsState; converter=F12.Tools.Network.Converters.TimingsStateIsServedFromCacheConverter,                            control.tooltip:transferSize,                            textContent:transferSize"><\/div>',n.cellCookies='<div class="clippedText" data-binding="control.tooltip:numCookies; converter=F12.Tools.Network.Converters.ZeroToEmptyStringConverter,                                                textContent:numCookies; converter=F12.Tools.Network.Converters.ZeroToEmptyStringConverter"><\/div>',n.cellTotalTime='<div class="clippedText" data-binding="control.tooltip:totalTime; converter=F12.Tools.Network.Converters.TimeStampToStringConverter,                                                textContent:totalTime; converter=F12.Tools.Network.Converters.TimeStampToStringConverter"><\/div>',n.cellInitiator='<div>            <div data-name="sourceInfo" data-control="Common.Controls.SourceInfoControl" data-control-templateid="Common.sourceInfoSourceOnlyTemplate" data-binding="model:initiatorSourceInfo" data-controlbinding="event-click:onSourceInfoClicked" data-options="className:clippedText" tabindex="-1"><\/div>            <div class="clippedText" data-binding="textContent:initiatorType"><\/div>        <\/div>',n}();n.Network=t}(ControlTemplates||(ControlTemplates={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,i;(function(n){var i;(function(n){var i=function(i){function r(t){i.call(this,t);this.modelPropertiesDependencyList=[n.SummaryViewModelItem.FullURLPropertyName]}return __extends(r,i),r.ParseParams=function(n){for(var t,i,u,f,e=n.split(/[&;]/),o=[],r=0;r<e.length;++r)(t=e[r],t)&&(i=t.indexOf("="),i<0?(u=t,f=""):(u=t.substring(0,i),f=t.substring(i+1)),o.push({key:u,value:f}));return o},r.ParseParamsFromUrl=function(n){var t=n?n.indexOf("?"):-1,i;return t<0?[]:(i=n.substr(t+1),r.ParseParams(i))},r.prototype.onApplyTemplate=function(){i.prototype.onApplyTemplate.call(this);this.onModelChanged();this.rootElement.classList.add(r.CssClass)},r.prototype.onModelChanged=function(){i.prototype.onModelChanged.call(this);this.placeholder=this.model?t.Resources.getString("ResourceNoParameters"):t.Resources.getString("ResourceNothingSelected")},r.prototype.onTabResize=function(){i.prototype.onResize.call(this)},r.prototype.onTabActivated=function(){i.prototype.onResize.call(this)},r.prototype.appendCustomData=function(n){if(this.model){var t=r.ParseParamsFromUrl(this.model.fullURL);t.sort(function(n,t){return n.key.localeCompare(t.key)||n.value.localeCompare(t.value)});t.forEach(function(t){n.push(t)})}},r.CssClass="parametersPane",r.RequestHeadersString="Request Headers",r.ResponseHeadersString="Response Headers",r}(n.KeyValueViewer);n.ParametersView=i})(i=n.Network||(n.Network={}))})(i=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(){var t=this;this.loadCollection(n.NETWORK_SETTINGS_KEY).done(function(n){t._networkSettings=n})}return n.prototype.getSetting=function(n,t){return this._networkSettings.hasOwnProperty(n)?this._networkSettings[n]:t},n.prototype.setSetting=function(n,t){this._networkSettings[n]=t},n.prototype.saveState=function(){t.Settings.set(n.NETWORK_SETTINGS_KEY,this._networkSettings)},n.prototype.loadCollection=function(n){return new t.Promise(function(i){t.Settings.get(n).done(function(n){i(n)},function(){i({})})},null)},n.NETWORK_SETTINGS_KEY="NetworkProfilerSettings",n}();n.PersistenceManager=i})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function r(n){this._dataReceivedEventSource=new Common.EventSource;this._loadingFailedEventSource=new Common.EventSource;this._loadingFinishedEventSource=new Common.EventSource;this._requestServedFromCacheEventSource=new Common.EventSource;this._requestWillBeSentEventSource=new Common.EventSource;this._responseReceivedEventSource=new Common.EventSource;this._proxy=t.ProfilerProxyFactory.create();this._remoteProxy=n;this._proxy.addNotificationListener(t.Constants.DATA_RECEIVED_NOTIFICATION,this.fireDataReceivedEvent.bind(this));this._proxy.addNotificationListener(t.Constants.LOADING_FAILED_NOTIFICATION,this.fireLoadingFailedEvent.bind(this));this._proxy.addNotificationListener(t.Constants.LOADING_FINISHED_NOTIFICATION,this.fireLoadingFinishedEvent.bind(this));this._proxy.addNotificationListener(t.Constants.REQUEST_SERVED_FROM_CACHE_NOTIFICATION,this.fireRequestServedFromCacheEvent.bind(this));this._proxy.addNotificationListener(t.Constants.REQUEST_WILL_BE_SENT_NOTIFICATION,this.fireRequestWillBeSentEvent.bind(this));this._proxy.addNotificationListener(t.Constants.RESPONSE_RECEIVED_NOTIFICATION,this.fireResponseReceivedEvent.bind(this))}return r.prototype.canClearBrowserCache=function(){return this._remoteProxy.canClearBrowserCache()},r.prototype.canClearBrowserCookies=function(){return this._remoteProxy.canClearBrowserCookies()},r.prototype.clearBrowserCache=function(){return this._remoteProxy.clearBrowserCache()},r.prototype.clearBrowserCookies=function(){return this._remoteProxy.clearAllCookies()},r.prototype.disable=function(){return this.call("disable")},r.prototype.enable=function(){var n=this;return this._proxy.start().then(function(){return n.call("enable")})},r.prototype.clearActivities=function(n){return this.call("_ms_clearActivities",{timestamp:n.nsec})},r.prototype.getCacheInfo=function(n){return this.call("_ms_getCacheInfo",n)},r.prototype.getRequestBody=function(n,t){return this.call("_ms_getRequestBody",{requestId:n,activityId:t})},r.prototype.getResponseBody=function(t,i){return n.Tools.Utility.Assert.isTrue(t&&t.length>0,"Sending a getResponseBody with no requestId"),this.call("getResponseBody",{requestId:t,_ms_activityId:i})},r.prototype.setCacheDisabled=function(n){return this._remoteProxy.setCacheDisabled(n)},r.prototype.setExtraHTTPHeaders=function(){return i.Promise.wrap(null)},r.prototype.setUserAgentOverride=function(){return i.Promise.wrap(null)},r.prototype.onDataReceived=function(n){this._dataReceivedEventSource.addHandler(n)},r.prototype.onLoadingFailed=function(n){this._loadingFailedEventSource.addHandler(n)},r.prototype.onLoadingFinished=function(n){this._loadingFinishedEventSource.addHandler(n)},r.prototype.onRequestServedFromCache=function(n){this._requestServedFromCacheEventSource.addHandler(n)},r.prototype.onRequestWillBeSent=function(n){this._requestWillBeSentEventSource.addHandler(n)},r.prototype.onResponseReceived=function(n){this._responseReceivedEventSource.addHandler(n)},r.prototype.call=function(n,t){var r=this;return new i.Promise(function(i,u){r._proxy.call("Network."+n,t,function(n){n.error?u(new Error(n.error.message)):n.result&&n.result.error?u(new Error(n.result.error)):i(n.result)})})},r.prototype.fireDataReceivedEvent=function(n){this._dataReceivedEventSource.invoke(n)},r.prototype.fireLoadingFailedEvent=function(n){this._loadingFailedEventSource.invoke(n)},r.prototype.fireLoadingFinishedEvent=function(n){this._loadingFinishedEventSource.invoke(n)},r.prototype.fireRequestServedFromCacheEvent=function(n){this._requestServedFromCacheEventSource.invoke(n)},r.prototype.fireRequestWillBeSentEvent=function(n){this._requestWillBeSentEventSource.invoke(n)},r.prototype.fireResponseReceivedEvent=function(n){this._responseReceivedEventSource.invoke(n)},r}();t.NetworkProfiler=r})(i=t.Network||(t.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(n,t,i){var r=this;this._networkProfiler=n;this._model=i;this._model.profilingState=3;this._networkProfiler.onDataReceived(this.onDataReceived.bind(this));this._networkProfiler.onLoadingFailed(this.onLoadingFailed.bind(this));this._networkProfiler.onLoadingFinished(this.onLoadingFinished.bind(this));this._networkProfiler.onRequestServedFromCache(this.onRequestServedFromCache.bind(this));this._networkProfiler.onRequestWillBeSent(this.onRequestWillBeSent.bind(this));this._networkProfiler.onResponseReceived(this.onResponseReceived.bind(this));if(this._model.onStart.addHandler(function(){return r.enable()}),this._model.onStop.addHandler(function(){return r.disable()}),this._model.onOpen.addHandler(function(){return r.open()}),this._model.onSave.addHandler(function(){return r.save()}),this._model.shouldRefreshFromServerChanged.addHandler(function(n){return r._networkProfiler.setCacheDisabled(n)}),t){t.onFrameNavigated(this.onFrameNavigated.bind(this));if(t.onDOMContentLoaded)t.onDOMContentLoaded(this.onDOMContentLoaded.bind(this));if(t.onDownloadCompleted)t.onDownloadCompleted(this.onDownloadCompleted.bind(this));if(t.onRemoteCodeInitialized)t.onRemoteCodeInitialized(this.onRemoteCodeInitialized.bind(this))}}return i.prototype.enable=function(){var n=this;return this._model.profilingState=0,this._networkProfiler.enable().then(function(){return n._model.profilingState=1,n.onRemoteCodeInitialized()})},i.prototype.disable=function(){var n=this;return this._model.profilingState=2,this._networkProfiler.disable().then(function(){n._model.profilingState=3})},i.prototype.open=function(){},i.prototype.save=function(){var r=this,i,u=!t.F12?"har (*.har)|*.har":"har";t.Storage.saveFileDialog({name:"",extensions:[u]},{access:2,encoding:"UTF-8",persistence:1,type:1}).then(function(t){return i=t,n.Har.HarCreator.fromNetworkModel(r._model)}).then(function(n){return i.write(n)}).then(function(){},function(i){(i.number===undefined||i.number!==n.Constants.WINDOWS_E_ABORT)&&n.App.displayError(t.Resources.getString("SaveSessionFailedMessage"))}).done(function(){i&&i.close()})},i.processResponseObject=function(n,t){var f,r,u;n.servedFromCache=t.fromDiskCache;n.url=t.url;n.contentType=t.mimeType;n.headers=t.headers;f=t;f._ms_httpVersion&&(n.httpVersion=f._ms_httpVersion);t.headers&&t.headers.status&&(r=t.headers.status,u=r.indexOf(" "),u===i.STATUS_CODE_LENGTH&&(n.statusCode=Number(r.substring(0,u)),n.statusText=r.substring(u+1)));n.statusCode&&n.statusText||(n.statusCode=t.status,n.statusText=t.statusText);n.timing=t.timing;n.requestHeadersText=t.requestHeadersText;n.responseHeadersText=t.headersText},i.prototype.onDataReceived=function(n){var t={id:n.requestId,dataLength:n.dataLength,dataReceivedTimestamp:Common.TimeStamp.fromSeconds(n.timestamp),encodedDataLength:n.encodedDataLength,timestamp:Common.TimeStamp.fromSeconds(n.timestamp)},i=n;i._ms_activityId&&(t.activityId=i._ms_activityId,t.responseContentLength=i._ms_responseContentLength);this._model.applyRequestToSummaryModelItem(t)},i.prototype.onDOMContentLoaded=function(n){this._model.domContentLoadedTime=Common.TimeStamp.fromMilliseconds(n[0])},i.prototype.onDownloadCompleted=function(n){this._model.loadEventCompletedTime=Common.TimeStamp.fromMilliseconds(n[0])},i.prototype.onFrameNavigated=function(n){this._model.onFrameNavigated();this._networkProfiler.clearActivities(new Common.TimeStamp(n.timeStamp))},i.prototype.onLoadingFailed=function(n){var t={},i,r;t.canceled=n.canceled;t.errorText=n.errorText;t.timestamp=Common.TimeStamp.fromSeconds(n.timestamp);i={id:n.requestId,failureInfo:t,timestamp:Common.TimeStamp.fromSeconds(n.timestamp)};r=n;r._ms_activityId&&(i.activityId=r._ms_activityId);this._model.applyRequestToSummaryModelItem(i)},i.prototype.onLoadingFinished=function(n){var t={id:n.requestId,loadFinishedTimestamp:Common.TimeStamp.fromSeconds(n.timestamp),timestamp:Common.TimeStamp.fromSeconds(n.timestamp)},r=n,i;r._ms_activityId&&(t.activityId=r._ms_activityId);this._model.applyRequestToSummaryModelItem(t);i=this._model.findSummaryItemByRequestId(t.id);i&&i.timingsState!==1&&this._networkProfiler.getResponseBody(t.id,t.activityId).done(function(n){i.responseBody=n.body;i.responseBodyBase64Encoded=n.base64Encoded},function(){})},i.prototype.onRemoteCodeInitialized=function(){var n=this;return this.refreshFlags().then(function(){return n._networkProfiler.setCacheDisabled(n._model.shouldRefreshFromServer)})},i.prototype.onRequestServedFromCache=function(n){var i={id:n.requestId,cacheHitKind:0},r=!1,t=n;t._ms_activityId&&(i.activityId=t._ms_activityId,i.preNetworkCacheHitUrl=t._ms_requestedUrl,this.tryGetCacheInfo(t.requestId,t._ms_activityId,t._ms_requestedUrl,0)&&(r=!0));this._model.applyRequestToSummaryModelItem(i,r)},i.prototype.onRequestWillBeSent=function(n){var r={id:n.requestId,timestamp:Common.TimeStamp.fromSeconds(n.timestamp)},t={},s,h,u,f,e,c,o;r.requestInfo=t;t.originURL=n.documentURL;t.timestamp=Common.TimeStamp.fromSeconds(n.timestamp);t.requestURL=n.request.url;t.method=n.request.method;t.postData=n.request.postData;t.headers=n.request.headers;s=n.request;s._ms_mimeType&&(t.mimeType=s._ms_mimeType);h=n;h._ms_activityId&&(r.activityId=h._ms_activityId);n.initiator&&(u=t.initiator={},u.url=n.initiator.url,u.type=n.initiator.type,u.lineNumber=n.initiator.lineNumber,u.columnNumber=n.initiator._ms_columnNumber||0,n.initiator.stackTrace&&(u.stackTrace=n.initiator.stackTrace.map(function(n){return{functionName:n.functionName,lineNumber:n.lineNumber,columnNumber:n.columnNumber}})));n.redirectResponse?(f={timestamp:Common.TimeStamp.fromSeconds(n.timestamp)},i.processResponseObject(f,n.redirectResponse),f.redirectedTo=t.requestURL,t.redirectedFrom=f.url,e=this._model.findSummaryItemByRequestId(r.id),t.redirectedFromId=e?e.id:undefined,c=this._model.applyRequestToSummaryModelItem(r),f.redirectedToId=c,this._model.applyRedirectToSummaryModelItem(e,f)):this._model.applyRequestToSummaryModelItem(r);o=this._model.findSummaryItemByRequestId(r.id);o&&this._networkProfiler.getRequestBody&&this._networkProfiler.getRequestBody(r.id,r.activityId).done(function(n){o.requestBody=n.body;o.requestBodyBase64Encoded=n.base64Encoded},function(){})},i.prototype.onResponseReceived=function(n){this.refreshFlags();var r={id:n.requestId,responseInfo:{timestamp:Common.TimeStamp.fromSeconds(n.timestamp)},timestamp:Common.TimeStamp.fromSeconds(n.timestamp)},t=n;t._ms_activityId&&(r.activityId=t._ms_activityId,t.response&&t.response.status===304&&this.tryGetCacheInfo(t.requestId,t._ms_activityId,t._ms_requestedUrl,1));n.response&&n.response.status===304&&(r.cacheHitKind=1);i.processResponseObject(r.responseInfo,n.response);this._model.applyRequestToSummaryModelItem(r)},i.prototype.refreshFlags=function(){var n=this;return this._networkProfiler.canClearBrowserCache().then(function(t){return n._model.canClearCache=t.result,n._networkProfiler.canClearBrowserCookies()}).then(function(t){n._model.canClearCookies=t.result})},i.prototype.tryGetCacheInfo=function(n,i,r,u){var h=this,f,e,o,s;if(r&&t.F12&&(window.parent&&window.parent.getExternalObj?f=window.parent.getExternalObj():window.external&&(f=window.external),f&&f.networkUtilities)){try{e=f.networkUtilities.getCacheEntry(r)}catch(c){}if(e)return o=JSON.parse(e),s={activityId:i,messageBodyFilePath:o.messageBodyFilePath,requestId:n,startLineAndHeaderFields:o.startLineAndHeaderFields},this._networkProfiler.getCacheInfo(s).done(function(n){h._model.applyCacheInfo(n,u)}),!0}return!1},i.STATUS_CODE_LENGTH=3,i}();n.NetworkProfilerClient=i})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(){this._commandCallbacks={};this._notificationListeners=[];this._uid=0;this._chunks=new Map}return n.prototype.addNotificationListener=function(n,t){this._notificationListeners.push({notificationName:n,listener:t})},n.prototype.call=function(n,t,i){var r=this.getUid(),u,f;i&&(this._commandCallbacks[r]={synced:!0,callback:i||null});u={id:r,method:n,params:t};f=JSON.stringify(u);this.sendMessage(f)},n.prototype.sendMessage=function(){throw new Error("Not implemented.")},n.prototype.onMessageReceived=function(n){var r,t,u,f,i;if(n&&(r=this.processMessageChunk(n),r)){try{t=JSON.parse(r)}catch(e){}if(t)if(typeof t.id=="number"&&this._commandCallbacks[t.id])this._commandCallbacks[t.id]&&(u={error:t.error,result:t.result},f=this._commandCallbacks[t.id].callback,delete this._commandCallbacks[t.id],f.call(this,u));else if(t.method)for(i=0;i<this._notificationListeners.length;++i)this._notificationListeners[i].notificationName===t.method&&this._notificationListeners[i].listener(t.params)}},n.prototype.start=function(){return this._chunks.clear(),t.Promise.wrap(null)},n.prototype.getUid=function(){return this._uid++},n.prototype.processMessageChunk=function(n){var t,i;try{t=JSON.parse(n)}catch(r){return null}if(i=this._chunks.get(t.messageId),t.chunksRemaining>0)i=i||[],i.push(t.chunk),this._chunks.set(t.messageId,i);else if(t.chunksRemaining===0)return i?(this._chunks.delete(t.messageId),i.push(t.chunk),i.join("")):t.chunk;return null},n.AGENT_GUID_STRING="514A5E80-CC1B-4844-9139-0DA4AFDCF814",n}();n.ProfilerProxy=i})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){var i;(function(t){"use strict";var i=Microsoft.Plugin,r=function(r){function u(){r.call(this);var t;window.parent&&window.parent.getExternalObj?t=window.parent.getExternalObj():window.external?t=window.external:n.Tools.Utility.Assert.fail("Cannot find ETW collector object.");this._etwDataCollector=new Common.Data.F12EtwDataCollector(t.etwDataCollector);this._messageReceivedHandler=this.onMessageReceived.bind(this)}return __extends(u,r),u.prototype.sendMessage=function(n){var t=this;this._etwDataCollectorSession&&this._etwDataCollectorSession.sendStringToCollectionAgent(n).done(function(n){t.onMessageReceived(n)},function(){})},u.prototype.start=function(){var n=this;return r.prototype.start.call(this).then(function(){return n._etwDataCollector.startSession("NetworkCollectionAgent.dll","{"+t.ProfilerProxy.AGENT_GUID_STRING+"}",!1)}).then(function(t){n._etwDataCollectorSession=t;n._etwDataCollectorSession.addEventListener("message",n._messageReceivedHandler)},function(){t.App.displayError(i.Resources.getString("NetworkCollectionStartError"))})},u.prototype.stop=function(){var n=this;return this._etwDataCollectorSession?new i.Promise(function(t,i){var r=n._etwDataCollectorSession;n._etwDataCollectorSession=null;r.removeEventListener("message",n._messageReceivedHandler);r.stop().then(t,i)}):i.Promise.wrap(null)},u}(t.ProfilerProxy);t.F12ProfilerProxy=r})(i=t.Network||(t.Network={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(i){function r(){i.call(this);this.AGENT_GUID=new Microsoft.VisualStudio.DiagnosticsHub.Guid(n.ProfilerProxy.AGENT_GUID_STRING);this._transportService=Microsoft.VisualStudio.DiagnosticsHub.Collectors.getStandardTransportService();this._transportService.addMessageListener(this.AGENT_GUID,this.onMessageReceived.bind(this))}return __extends(r,i),r.prototype.sendMessage=function(t){var i=this;return this._transportService.sendStringToCollectionAgent(n.ProfilerProxy.AGENT_GUID_STRING,t).done(function(n){if(n)i.onMessageReceived(n)},function(){})},r.prototype.start=function(){return t.Promise.wrap(null)},r.prototype.stop=function(){return t.Promise.wrap(null)},r}(n.ProfilerProxy);n.VsProfilerProxy=i})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function t(){}return t.create=function(){return Microsoft.Plugin.F12?new n.F12ProfilerProxy:new n.VsProfilerProxy},t}();n.ProfilerProxyFactory=t})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){var i;(function(t){"use strict";var i=Microsoft.Plugin,u,r;(function(n){n[n.Headers=0]="Headers";n[n.Parameters=1]="Parameters";n[n.Cookies=2]="Cookies";n[n.Body=3]="Body"})(t.SelectionViewTab||(t.SelectionViewTab={}));u=t.SelectionViewTab;r=function(r){function u(n){r.call(this,n)}return __extends(u,r),u.prototype.onApplyTemplate=function(){var n=this;this._selectionTabControl=new Common.Controls.TabControl;this._selectionTabControl.tabsLeftAligned=!0;this.rootElement.appendChild(this._selectionTabControl.rootElement);this.headersView=new t.HeadersView;this._headersTab=new Common.Controls.TabItem;this._headersTab.tabPane=this.headersView;this._headersTab.title=i.Resources.getString("HeadersTabTitle");this._headersTab.tooltip=i.Resources.getString("HeadersTabTooltip");this._selectionTabControl.addTab(this._headersTab);this.bodyView=new t.BodyView;this._bodyTab=new Common.Controls.TabItem;this._bodyTab.tabPane=this.bodyView;this._bodyTab.title=i.Resources.getString("BodyTabTitle");this._bodyTab.tooltip=i.Resources.getString("BodyTabTooltip");this._selectionTabControl.addTab(this._bodyTab);this.parametersView=new t.ParametersView;this._parametersTab=new Common.Controls.TabItem;this._parametersTab.tabPane=this.parametersView;this._parametersTab.title=i.Resources.getString("ParametersTabTitle");this._parametersTab.tooltip=i.Resources.getString("ParametersTabTooltip");this._selectionTabControl.addTab(this._parametersTab);this.cookiesView=new t.CookiesView;this._cookiesTab=new Common.Controls.TabItem;this._cookiesTab.tabPane=this.cookiesView;this._cookiesTab.title=i.Resources.getString("CookiesTabTitle");this._cookiesTab.tooltip=i.Resources.getString("CookiesTabTooltip");this._selectionTabControl.addTab(this._cookiesTab);this.timingsView=new t.TimingsView;this._timingsTab=new Common.Controls.TabItem;this._timingsTab.tabPane=this.timingsView;this._timingsTab.title=i.Resources.getString("TimingsTabTitle");this._timingsTab.tooltip=i.Resources.getString("TimingsTabTooltip");this._selectionTabControl.addTab(this._timingsTab);this._selectionTabControl.selectedItemChanged=function(){var i=n._selectionTabControl.selectedItem?n._selectionTabControl.selectedItem.title:"invalid",r={TabTitle:i};t.Telemetry.analytics.log(t.Telemetry.EventName.NETWORK_DETAIL_TAB_CHANGE,r);n.updateCurrentTabView()}},u.prototype.onModelChanged=function(){if(r.prototype.onModelChanged.call(this),this.updateCurrentTabView(),t.Telemetry.isNavigatingFromSummaryItem){var n={durationMs:Date.now()-t.Telemetry.summaryDetailPageLoadTime};t.Telemetry.analytics.log(t.Telemetry.EventName.NETWORK_DETAIL_PAGE_LOAD,n);t.Telemetry.isNavigatingFromSummaryItem=!1}},u.prototype.getSelectedTab=function(){switch(this._selectionTabControl.selectedItem){case this._headersTab:return 0;case this._parametersTab:return 1;case this._cookiesTab:return 2;case this._bodyTab:return 3;default:return 0}},u.prototype.selectTab=function(n){switch(n){case 0:this._selectionTabControl.selectedItem=this._headersTab;break;case 1:this._selectionTabControl.selectedItem=this._parametersTab;break;case 2:this._selectionTabControl.selectedItem=this._cookiesTab;break;case 3:this._selectionTabControl.selectedItem=this._bodyTab;break;default:throw Error("Invalid tab was requested: "+n)}},u.prototype.onSplitterPositionChanged=function(){this.headersView.onTabResize();this.bodyView.onTabResize();this.parametersView.onTabResize();this.cookiesView.onTabResize();this.timingsView.onTabResize()},u.prototype.updateCurrentTabView=function(){var t=this,i=this._selectionTabControl.selectedItem;i&&(n.Tools.Utility.Assert.hasValue(i.tabPane),i===this._bodyTab&&this.model?this.bodyView.isResponse?this.model.retrieveResponseBodyData().done(function(){t.bodyView.model=t.model}):this.model.retrieveRequestBodyData().done(function(){t.bodyView.model=t.model}):i.tabPane.model=this.model)},u}(Common.TemplateControl);t.SelectionView=r})(i=t.Network||(t.Network={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(n){this._currentIteratorIndex=0;this._lastSearchText="";this._iterators=n}return i.prototype.onSelectedItemChanged=function(){this.findAndHighlightMatches(this._lastSearchText)},i.prototype.cleanupOldSearchResults=function(){for(var n=0;n<this._iterators.length;n++)this._iterators[n].cleanupOldSearchResults()},i.prototype.findAndHighlightMatches=function(n){typeof n!="string"&&(n=this._lastSearchText);this._lastSearchText=n;for(var t=0;t<this._iterators.length;t++)this._iterators[t].findAndHighlightMatches(n)},i.prototype.getSearchTextFromSelection=function(){return null},i.prototype.findNextMatch=function(i,r){if(this._lastSearchText=i,this._isSearching)return t.Promise.as(null);for(var u=0;u<this._iterators.length;u++)this._iterators[u].item||this._iterators[u].moveToNextItem(r);return this._startItem=this._iterators[0].item,this._searchFinished=!1,this.findNext(i,r).then(function(t){return n.NetworkShell.TestEventObject.fireEvent(n.Notifications.SearchComplete,t),t})},i.prototype.findNext=function(n,i){var r=this,e=this._iterators[this._currentIteratorIndex].findNext(n,i),f,u;if(e)return t.Promise.wrap(this._iterators[0].item);if(this._currentIteratorIndex+=i?1:-1,this._currentIteratorIndex<0||this._currentIteratorIndex>=this._iterators.length){if(this._currentIteratorIndex=i?0:this._iterators.length-1,this._searchFinished)return t.Promise.wrap(null);for(f=[],u=0;u<this._iterators.length;u++)f.push(this._iterators[u].moveToNextItem(i));return t.Promise.join(f).then(function(){return r._startItem===r._iterators[0].item&&(r._searchFinished=!0),r.findNext(n,i)})}return this.findNext(n,i)},i}();n.SearchProvider=i})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(n,t,i){this._textView=n;this._summaryView=t;this._selectionView=i}return Object.defineProperty(i.prototype,"item",{get:function(){return this._item},enumerable:!0,configurable:!0}),i.prototype.findNext=function(n,t){var u,f,i,r;return this._item&&this._item.responseBody&&this._item.responseBody.length>0&&!this._item.responseBodyBase64Encoded&&(u=new RegExp(Common.EncodingUtilities.escapeRegExp(n),"gi"),f=u.test(this._item.responseBody),f&&(this._summaryView.selectedItem=this._item,this._selectionView.selectTab(3),this._selectionView.bodyView.selectTab(!1),i=this._textView&&this._textView.getLocalMatches(n)||[],this._lastMatchIndex>i.length&&(this._lastMatchIndex=i.length),this._lastMatchIndex+=t?1:-1,r=i[this._lastMatchIndex],r))?(this._textView.selectRange(r),!0):!1},i.prototype.moveToNextItem=function(i){var r=this,u=this._item?this._summaryView.items.indexOf(this._item):-1;return(u+=i?1:-1,u<0&&(u=this._summaryView.items.length-1),u>=this._summaryView.items.length&&(u=0),this._item=this._summaryView.items.getItem(u),!this.item||!this._item.contentSize)?t.Promise.wrap(null):this._item.responseBody?(this._lastMatchIndex=i?-1:this._item.responseBody.length,t.Promise.wrap(null)):new t.Promise(function(t){n.NetworkShell.NetworkProfiler.getResponseBody(r._item.requestId,r._item.activityId).then(function(n){r._item.responseBody===null&&(r._item.responseBody=n.body);r._item.responseBodyBase64Encoded===null&&(r._item.responseBodyBase64Encoded=n.base64Encoded);r._lastMatchIndex=i?-1:r._item.responseBody.length;t()},function(){r._lastMatchIndex=-1;t()})})},i.prototype.cleanupOldSearchResults=function(){this._textView&&this._decorationIds&&this._decorationIds.length>0&&(this._textView.removeDecorations(this._decorationIds),this._decorationIds=[])},i.prototype.findAndHighlightMatches=function(n){if(typeof n!="string"&&(n=this._lastSearchText),this._lastSearchText=n,this.cleanupOldSearchResults(),this._textView&&n){var i=this._textView.getLocalMatches(n);this._decorationIds=this._textView.addDecorations(i,Common.Controls.SearchControl.SEARCH_TERM_DECORATION_CLASS,t.Theme.getValue("plugin-editor-scrollbar-marker-search-result-color"))}},i}();n.BodySearchIterator=i})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(n){this._summaryView=n}return Object.defineProperty(n.prototype,"item",{get:function(){return this._item},enumerable:!0,configurable:!0}),n.prototype.findNext=function(n){if(!this._item||this._wasFound)return!1;var t=Common.EncodingUtilities.escapeRegExp(n),i=new RegExp(t,"gi");return(this._wasFound=i.test(this._item.fullURL),this._wasFound)?(this._summaryView.selectedItem=this._item,!0):!1},n.prototype.moveToNextItem=function(n){var i=this._item?this._summaryView.items.indexOf(this._item):-1;return i+=n?1:-1,i<0&&(i=this._summaryView.items.length-1),i>=this._summaryView.items.length&&(i=0),this._item=this._summaryView.items.getItem(i),this._wasFound=!1,t.Promise.wrap(null)},n.prototype.cleanupOldSearchResults=function(){},n.prototype.findAndHighlightMatches=function(){},n}();n.SummarySearchIterator=i})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i;(function(n){var i;(function(n){var u=function(){function n(){this._channel=null;this._targetEngineKind=0}return Object.defineProperty(n.prototype,"channel",{get:function(){return this._channel},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"targetEngineKind",{get:function(){return this._targetEngineKind},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inspectElementId",{get:function(){return""},enumerable:!0,configurable:!0}),n.prototype.addEventListener=function(n,t){switch(n){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: "+n)}this._channel.addMessageHandler(n,t)},n.prototype.removeEventListener=function(){},n.prototype.onConnect=function(){},n}(),i,r;n.HUBBridge=u;i=function(){function n(n){this._channel=n;this._targetEngineKind=2}return Object.defineProperty(n.prototype,"channel",{get:function(){return this._channel},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"targetEngineKind",{get:function(){return this._targetEngineKind},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inspectElementId",{get:function(){return""},enumerable:!0,configurable:!0}),n.prototype.addEventListener=function(n,t){switch(n){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: "+n)}this._channel.addMessageHandler(n,t)},n.prototype.removeEventListener=function(){},n.prototype.onConnect=function(){},n}();n.ChromiumBridge=i;r=function(){function n(n,i){this._vs=n;this._proxy=t.Utilities.JSONMarshaler.attachToPublishedObject("F12.Network.Bridge.INetworkBridge",{},!0);this._targetEngineKind=2;this._traceWriter=i;this._proxy.addEventListener("connect",this.onConnect.bind(this));this._channel=new Common.ChromiumChannel(this._proxy,this._traceWriter)}return Object.defineProperty(n.prototype,"channel",{get:function(){return this._channel},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"targetEngineKind",{get:function(){return this._targetEngineKind},enumerable:!0,configurable:!0}),n.prototype.addEventListener=function(n,t){switch(n){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: "+n)}this._proxy.addEventListener(n,t)},n.prototype.removeEventListener=function(n,t){this._proxy.removeEventListener(n,t)},n.prototype.onConnect=function(){},n}();n.VSBridge=r})(i=n.Network||(n.Network={}))})(i=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,i;(function(n){var i;(function(n){var u=Common.Controls.Grid,i=Microsoft.VisualStudio.DiagnosticsHub,h,f,r,e,o,s;(function(n){n[n.CopyRow=0]="CopyRow";n[n.CopyUrl=1]="CopyUrl";n[n.CopyRequestHeaders=2]="CopyRequestHeaders";n[n.CopyResponseHeaders=3]="CopyResponseHeaders";n[n.CopyResponsePayload=4]="CopyResponsePayload"})(h||(h={}));f=function(n){function t(t,i){n.call(this,i.index,i.label,i.tooltip,i.width,!0,null);this.headerCss="header";this.evenRowCss="even-row-cell";this.oddRowCss="odd-row-cell";this.hidden=i.hidden;this.tooltip=i.tooltip;this.comparer=i.comparer;this.getCellControl=i.getCellControl;this.getClipboardText=i.getClipboardText;this.excludeFromClipboard=i.excludeFromClipboard;this.getAriaLabelDescription=i.getAriaLabelDescription;i.subLabel&&(this.getHeaderCellContents=t.buildMultilineHtmlHeaderCellContents.bind(t),this.subLabel=i.subLabel);i.getCellControl&&(this.hasHTMLContent=!0,this.getCellContents=t.buildCellContents.bind(t,this.populateCellControl.bind(this)))}return __extends(t,n),t.prototype.populateCellControl=function(n,t,i,r,u){var f=this.getCellControl();f instanceof Common.TemplateControl&&(f.model=u);n.appendChild(f.rootElement)},t}(u.ColumnInfo);n.SummaryViewColumn=f;r=function(n){function i(){n.apply(this,arguments)}return __extends(i,n),i.prototype.onTooltipChangedOverride=function(){n.prototype.onTooltipChangedOverride.call(this);this.tooltip?(this.rootElement.setAttribute("data-plugin-vs-tooltip",this.tooltip),t.Tooltip.initializeElementTooltip(this.rootElement)):this.rootElement.removeAttribute("data-plugin-vs-tooltip")},i}(Common.TemplateControl);n.SummaryCellControl=r;e=function(n){function i(){n.call(this,i.TemplateId)}return __extends(i,n),i.prototype.onSourceInfoClicked=function(){if(this.model&&this.model.initiatorSourceInfo){var n=this.model.initiatorSourceInfo;t.Host.showDocument(n.source,n.line,n.column)}},i.TemplateId="Network.cellInitiator",i}(Common.TemplateControl);n.InitiatorCellControl=e;o=function(r){function u(n,t){r.call(this,n,t);this._domNodeInsertedHandler=this.onDomNodeInserted.bind(this);this.getCellContents=n.buildCellContents.bind(n,this.populateCell.bind(this));this.getHeaderCellContents=this.getHeaderElement.bind(this)}return __extends(u,r),u.showTimingsTooltip=function(n){var i=new Common.TemplateControl("Network.timingsTooltip"),r;i.model=n;r={content:i.rootElement.outerHTML,contentContainsHTML:!0,delay:250};t.Tooltip.show(r)},u.prototype.addAppEventMark=function(n,t){var r=new i.MarkData(i.BigNumber.convertFromNumber(n.nsec),t);this._rulerScale.addMark(1,r)},u.prototype.removeAppEventMarks=function(n){for(var r,i,t=0;t<this._markSeries.length;t++)if(this._markSeries[t].id===1){for(r=this._markSeries[t].data,i=0;i<r.length;i++)if(n===r[i].tooltip){r.splice(i,1);break}break}},u.prototype.getHeaderElement=function(){var n=!this._header||!this._headerPopulated;return n&&(this._header=document.createElement("div"),this._header.id="timingsWaterfallColumnHeader",this._header.className="timingsWaterfallColumnHeader",this._header.addEventListener("DOMNodeInserted",this._domNodeInsertedHandler),this._cachedWidth=0),this._cachedWidth!==this._header.clientWidth&&(this._cachedWidth=this._header.clientWidth,this.onResize()),this._header},u.prototype.initializeRuler=function(){this._markSeries=[{index:0,id:1,label:t.Resources.getString("RulerLifecycleMarkLabel"),data:null},{index:1,id:2,label:t.Resources.getString("RulerUserMarkLabel"),data:null}];this._rulerScale=new i.RulerScale(new i.JsonTimespan(i.BigNumber.zero,i.BigNumber.zero),this._markSeries,["vs-image-graph-app-event","vs-image-graph-user-mark"],"vs-image-graph-aggregated-event",!0);this._header.appendChild(this._rulerScale.container);this._rulerScale.resize(null);this._rulerScale.container.querySelector("#scaleMarks").setAttribute("tabIndex","-1")},u.prototype.onDomNodeInserted=function(n){n.target===this._header&&document.getElementById(this._header.id)&&(this._header.removeEventListener("DOMNodeInserted",this._domNodeInsertedHandler),this.populateHeader())},u.prototype.onNetworkModelPropertyChanged=function(t){switch(t){case n.NetworkModel.RulerDurationPropertyName:case n.NetworkModel.StartTimestampPropertyName:this.renderRuler();break;case n.NetworkModel.DomContentLoadedTimeProperty:this.updateDOMContentLoadedMark();break;case n.NetworkModel.LoadEventCompletedTimeProperty:this.updateLoadEventMark()}},u.prototype.onResize=function(){this._rulerScale&&this._rulerScale.resize(null)},u.prototype.populateCell=function(n,i,r,f,e){var o=this.getCellControl(),s=e;o.model=s;o.networkModel=this.networkModel;o.bar.onmouseover=u.showTimingsTooltip.bind(this,s);o.bar.onmouseout=function(){return t.Tooltip.dismiss()};n.appendChild(o.rootElement)},u.prototype.populateHeader=function(){this.initializeRuler();this._networkModelPropertyChangedEventRegistration&&(this._networkModelPropertyChangedEventRegistration.unregister(),this._networkModelPropertyChangedEventRegistration=null);this.networkModel&&(this._networkModelPropertyChangedEventRegistration=this.networkModel.propertyChanged.addHandler(this.onNetworkModelPropertyChanged.bind(this)));this._headerPopulated=!0},u.prototype.renderRuler=function(){var n=i.BigNumber.convertFromNumber(this.networkModel.rulerDuration.nsec),t=new i.JsonTimespan(i.BigNumber.zero,n);this._rulerScale.onViewportChanged({currentTimespan:t,selectionTimespan:null,isIntermittent:!1})},u.prototype.updateDOMContentLoadedMark=function(){var n=this.networkModel.domContentLoadedTime;this.updateMark(n,"DOMContentLoaded")},u.prototype.updateLoadEventMark=function(){var n=this.networkModel.loadEventCompletedTime;this.updateMark(n,"Load")},u.prototype.updateMark=function(n,t){n&&n!==Common.TimeStamp.Zero?this.addAppEventMark(n,t):this.removeAppEventMarks(t)},u.NetworkModelPropertyName="networkModel",u}(f);n.TimingsWaterfallColumn=o;s=function(i){function s(t){var r=this;i.call(this);t||(t=document.createElement("div"));this._expandStates=[];this._rootElement=t;this._cellControlPool=new Common.ControlPool;this.dataGrid=new n.NetworkGridControl(this._rootElement,this);this.dataGrid.selectedIndexChanged=function(n,t){return r.onGridSelectedIndexChanged(n,t)};this._sortColumns=this.dataGrid.getSortColumns();this._rootElement.addEventListener("keydown",this.onKeyDown.bind(this));this._timeoutId=null}return __extends(s,i),Object.defineProperty(s.prototype,"rootElement",{get:function(){return this._rootElement},enumerable:!0,configurable:!0}),s.initialize=function(){Common.ObservableHelpers.defineProperty(s,s.ItemsPropertyName,[],function(n,t,i){return n.onItemsChanged(t,i)});Common.ObservableHelpers.defineProperty(s,s.ModelPropertyName,null,function(n){return n.onModelChanged()});Common.ObservableHelpers.defineProperty(s,s.SelectedItemPropertyName,null,function(n,t,i){return n.onSelectedItemChanged(t,i)})},s.prototype.setSelectedItem=function(i){var u,r;if(typeof i=="number")for(u=this.items.getFilteredArray(),r=0;r<u.length;r++)if(u[r].id===i)return this.selectedItem=u[r],!0;return n.App.displayError(t.Resources.getString("MissingRequestError")),!1},s.prototype.getChildData=function(){},s.prototype.getColumns=function(i){var u=this,h;return this._columnInfo||(h=[{getCellControl:function(){return u._cellControlPool.getControl("Network.cellURL",function(){return new r("Network.cellURL")})},index:n.SummaryViewModelItem.FullURLPropertyName,label:t.Resources.getString("Name"),subLabel:t.Resources.getString("Path"),tooltip:t.Resources.getString("PathHeaderTooltip"),width:300,comparer:function(t,i,r,u){return n.SummaryViewModelItem.compareOnFilename(r,u)}},{getCellControl:function(){return u._cellControlPool.getControl("Network.cellProtocol",function(){return new r("Network.cellProtocol")})},index:n.SummaryViewModelItem.ProtocolNamePropertyName,label:t.Resources.getString("ProtocolHeaderLabel"),tooltip:t.Resources.getString("ProtocolHeaderLabelTooltip"),width:60},{getCellControl:function(){return u._cellControlPool.getControl("Network.cellMethod",function(){return new r("Network.cellMethod")})},index:n.SummaryViewModelItem.MethodPropertyName,label:t.Resources.getString("MethodHeaderLabel"),tooltip:t.Resources.getString("MethodHeaderTooltip"),width:60},{getCellControl:function(){return u._cellControlPool.getControl("Network.cellStatusCode",function(){return new r("Network.cellStatusCode")})},index:n.SummaryViewModelItem.StatusCodePropertyName,label:t.Resources.getString("StatusCodeHeaderLabel"),subLabel:t.Resources.getString("StatusCodeHeaderSubLabel"),tooltip:t.Resources.getString("StatusCodeHeaderTooltip"),width:100},{getCellControl:function(){return u._cellControlPool.getControl("Network.cellContentType",function(){return new r("Network.cellContentType")})},index:n.SummaryViewModelItem.ContentTypePropertyName,label:t.Resources.getString("ContentType"),tooltip:t.Resources.getString("ContentTypeHeaderTooltip"),width:100},{getCellControl:function(){return u._cellControlPool.getControl("Network.cellTransferSize",function(){return new r("Network.cellTransferSize")})},index:n.SummaryViewModelItem.TransferSizePropertyName,label:t.Resources.getString("ReceivedHeaderLabel"),tooltip:t.Resources.getString("ReceivedHeaderTooltip"),width:100,comparer:function(t,i,r,u){return n.SummaryViewModelItem.compareOnContentSize(r,u)}},{getCellControl:function(){return u._cellControlPool.getControl("Network.cellTotalTime",function(){return new r("Network.cellTotalTime")})},index:n.SummaryViewModelItem.TotalTimePropertyName,label:t.Resources.getString("TotalTimeHeaderLabel"),tooltip:t.Resources.getString("TotalTimeHeaderTooltip"),width:70,comparer:s.columnComparerForTimestamps,getClipboardText:s.getClipboardTextForTimestamp,getAriaLabelDescription:s.getAriaLabelDescriptionForTimestamp},{getCellControl:function(){return u._cellControlPool.getControl(e.TemplateId,function(){return new e})},index:n.SummaryViewModelItem.InitiatorLocationPropertyName,label:t.Resources.getString("InitiatorHeaderLabel"),subLabel:t.Resources.getString("InitiatorHeaderSubLabel"),tooltip:t.Resources.getString("InitiatorHeaderTooltip"),width:200,comparer:function(t,i,r,u){return n.SummaryViewModelItem.compareOnInitiator(r,u)},getClipboardText:s.getClipboardTextForInitiator,hidden:!t.F12},{getCellControl:function(){return u._cellControlPool.getControl(n.WaterfallItemControl.TemplateId,function(){return new n.WaterfallItemControl})},index:n.SummaryViewModelItem.StartTimestampPropertyName,label:t.Resources.getString("StartTimeLabel"),tooltip:t.Resources.getString("WaterfallHeaderTooltip"),width:300,comparer:s.columnComparerForStartTimestamp,excludeFromClipboard:!0,getAriaLabelDescription:s.getAriaLabelDescriptionForTimeobject},],this._columnInfo=h.map(function(t){if(t.index===n.SummaryViewModelItem.StartTimestampPropertyName){var r=new o(i,t);return new Common.Binding(u,s.ModelPropertyName,r,o.NetworkModelPropertyName),r}return new f(i,t)})),this._columnInfo},s.prototype.getDefaultSortOrders=function(){return[new u.SortOrderInfo(n.SummaryViewModelItem.StartTimestampPropertyName,"asc")]},s.prototype.customizeGridOptions=function(t){var i=this;return t.asyncInit=!1,t.coreCssClass="network-grid",t.canvasClass="network-grid-canvas",t.headerElementClass="network-grid-header",t.cellClass=n.NetworkGridControl.MultiLineGridCellClass,t.cellCleanUpCallback=function(n){return i.onCellCleanUp(n)},t.onBeforeSortCallback=function(n){return i.onBeforeSort(n)},t},s.prototype.getContextMenuCommands=function(){var i=this,n=[];return n.push({callback:function(){i.invokeCopy(0)},type:1,label:t.Resources.getString("CopyWithKeyboardShortcutContextMenu")}),n.push({callback:function(){i.invokeCopy(1)},type:1,label:t.Resources.getString("CopyURLContextMenu")}),n.push({callback:function(){i.invokeCopy(2)},type:1,label:t.Resources.getString("CopyRequestHeaderContextMenu")}),n.push({callback:function(){i.invokeCopy(3)},type:1,label:t.Resources.getString("CopyResponseHeaderContextMenu")}),n.push({callback:function(){i.invokeCopy(4)},type:1,label:t.Resources.getString("CopyResponsePayloadContextMenu")}),n},s.prototype.onContextMenuOpening=function(){this._responseBodyRetrievalPromise=this.selectedItem.retrieveResponseBodyData()},s.prototype.onCtrlG=function(){},s.prototype.onSplitterPositionChanged=function(){},s.prototype.getSearchIterator=function(){return new n.SummarySearchIterator(this)},s.columnComparerForNumbers=function(n,t,i,r){var u=i[n.index]||0,f=r[n.index]||0;return u-f},s.columnComparerForStartTimestamp=function(n,t,i,r){var u=i[n.index],f=r[n.index];return u&&u.nsec===0&&(u=null),f&&f.nsec===0&&(f=null),s.compareTimestamp(u,f)},s.columnComparerForTimestamps=function(n,t,i,r){var u=i[n.index],f=r[n.index];return s.compareTimestamp(u,f)},s.compareTimestamp=function(n,t){return n&&t?n.compare(t):n&&!t?-1:t&&!n?1:0},s.getAriaLabelDescriptionForTimestamp=function(t,i){var r=i[t.index];return n.Converters.TimeStampToStringConverter.convertTo(r)},s.getAriaLabelDescriptionForTimeobject=function(t,i){var r=i[t.index];return n.Converters.TimeStampToTimeStringConverter.convertTo(r)},s.getClipboardTextForTimestamp=function(t,i){var r=i[t.index];return n.Converters.TimeStampToStringConverter.convertTo(r)},s.getClipboardTextForInitiator=function(n,t){var i=t.initiatorType||"";return t.initiatorLocation&&(i+=" ("+t.initiatorLocation+")"),i},s.prototype.ensureFallbackSortOrder=function(t){for(var r,u,i=0;i<t.length;++i)if(r=t[i],r.index===n.SummaryViewModelItem.StartTimestampPropertyName)return;u=this.getDefaultSortOrders();t.push.apply(t,u)},s.prototype.invokeCopy=function(n){var i=this,t=[],r="";switch(n){case 0:this.dataGrid.copyTextToClipboard();return;case 1:t.push(this.selectedItem.fullURL);break;case 2:t=this.selectedItem.requestHeaders.map(function(n){return n.key+": "+n.value});r="\r\n";break;case 3:t=this.selectedItem.responseHeaders.map(function(n){return n.key+": "+n.value});r="\r\n";break;case 4:this._responseBodyRetrievalPromise.done(function(){i.selectedItem.responseBodyBase64Encoded&&t.push("data:"+i.selectedItem.contentType+";base64,");t.push(i.selectedItem.responseBody)})}this.dataGrid.copyTextToClipboard(t.join(r))},s.prototype.isSortableProperty=function(n){for(var r,i=this.dataGrid.getSortOrder(),t=0;t<i.length;++t)if(r=i[t],r.index===n)return!0;return!1},s.prototype.onBeforeSort=function(n){this.ensureFallbackSortOrder(n);this._sortColumns=this.dataGrid.getSortColumns(n)},s.prototype.onCellCleanUp=function(n){if(n.childElementCount===1){var t=n.firstElementChild.control;t instanceof Common.TemplateControl&&(t.model=null,this._cellControlPool.recycleControl(t.templateId,t))}},s.prototype.onItemsChanged=function(n,t){var i=this;this._onItemsCollectionChangedRegistration&&(this._onItemsCollectionChangedRegistration.unregister(),this._onItemsCollectionChangedRegistration=null);t&&(this._onItemsCollectionChangedRegistration=t.collectionChanged.addHandler(function(n){return i.onItemsCollectionChanged(n)}));this.setDataSource(t?t.getFilteredArray():[])},s.prototype.onItemsCollectionChanged=function(){this.setDataSource(this.items.getFilteredArray())},s.prototype.onItemPropertyChanged=function(n){this.isSortableProperty(n.propertyName)&&this.setDataSource(this.items.getFilteredArray())},s.prototype.onGridSelectedIndexChanged=function(t,i){var r=i>=0&&!this.dataGrid.isEmpty();r?(n.Telemetry.isNavigatingFromSummaryItem=!0,n.Telemetry.summaryDetailPageLoadTime=Date.now(),this.selectedItem=this.dataGrid.getRowData(i),n.Telemetry.analytics.log(n.Telemetry.EventName.NETWORK_SELECTED_INDEX_CHANGED,{ContentType:this.selectedItem.contentType,RequestContentType:this.selectedItem.requestContentType,ContentEncoding:this.selectedItem.contentEncoding})):this.selectedItem=null},s.prototype.onModelChanged=function(){this._summaryBarEventRegistration&&(this._summaryBarEventRegistration.unregister(),this._summaryBarEventRegistration=null);this._onItemPropertyChangedRegistration&&(this._onItemPropertyChangedRegistration.unregister(),this._onItemPropertyChangedRegistration=null);this.model&&(this._summaryBarEventRegistration=this.model.summaryBarModel.sortByStatusCode.addHandler(this.onSortByStatusCodeViaSummaryBar.bind(this)),this._onItemPropertyChangedRegistration=this.model.summaryItemPropertyChanged.addHandler(this.onItemPropertyChanged.bind(this)))},s.prototype.onKeyDown=function(n){!this.selectedItem||!this.model.detailsPanelCollapsed||n.keyCode!==13||n.shiftKey||n.ctrlKey||n.altKey||(this.model.detailsPanelCollapsed=!1)},s.prototype.onSelectedItemChanged=function(n,t){var i,r,u,f;this.updateSourceInfoTabIndex(n,-1);this.selectedItem?(i=!0,r=this.dataGrid.getSelectedDataIndex(),r>=0&&(u=this.dataGrid.getRowData(r),u===this.selectedItem&&(i=!1)),i&&(f=this.dataGrid.getRowDataIndex(this.selectedItem),this.dataGrid.setSelectedDataIndex(f),this.dataGrid.getSelectedRowIntoView()),this.updateSourceInfoTabIndex(t,0)):(n!==t&&this.updateSourceInfoTabIndex(t,-1),this.dataGrid._clearSelection())},s.prototype.updateSourceInfoTabIndex=function(n,t){var e,r,u,i,f;if(n&&n.initiatorSourceInfo&&(e=this.dataGrid.getRowDataIndex(n),r=this.dataGrid.getRowInfo(e),r))for(u=r.row.getElementsByClassName("BPT-FileLink clippedText"),i=0;i<u.length;i++)if(f=u[i],f.getAttribute("data-name")==="sourceInfo"){f.tabIndex=t;break}},s.prototype.setDataSource=function(t){var i=this,o;if(!!this._timeoutId){this._nextDataSource=t;return}if(this._expandStates.length>t.length)this._expandStates.length=t.length;else while(this._expandStates.length<t.length)this._expandStates.push(0);var f=this.dataGrid.getSelectedDataIndex(),e=this.dataGrid.getRowData(f),r=this.dataGrid.getSortOrder();this.onBeforeSort(r);t.sort(function(n,t){return u.Utility.TreeNodeSort.sortComparer(r,i._sortColumns,n,t)});this.dataGrid.setDataSource(t,this._expandStates,this.getColumns(this.dataGrid),r);f>=0&&e&&(o=t.indexOf(e),this.dataGrid.setSelectedDataIndex(o));n.NetworkShell.TestEventObject.fireEvent(n.Notifications.SummaryDataSourceUpdated);this._timeoutId=window.setTimeout(function(){i._timeoutId=null;!i._nextDataSource||(i.setDataSource(i._nextDataSource),i._nextDataSource=null)},s.UpdateTimeoutLength)},s.prototype.getColumnWithIndex=function(n){for(var i,t=0;t<this._columnInfo.length;t++)if(this._columnInfo[t].index===n){i=this._columnInfo[t];break}return i},s.prototype.onSortByStatusCodeViaSummaryBar=function(){var t=new u.SortOrderInfo(n.SummaryViewModelItem.StatusCodePropertyName,"desc"),i=this.getColumnWithIndex(n.SummaryViewModelItem.StatusCodePropertyName);this.dataGrid.onSort([t],[i]);this.dataGrid.setSelectedRowIndex(0);this.dataGrid.getSelectedRowIntoView()},s.UpdateTimeoutLength=50,s.ItemsPropertyName="items",s.ModelPropertyName="model",s.SelectedItemPropertyName="selectedItem",s}(Common.Observable);n.SummaryView=s;s.initialize()})(i=n.Network||(n.Network={}))})(i=n.Tools||(n.Tools={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,r,i;(function(n){n[n.TimingsAvailable=0]="TimingsAvailable";n[n.ServedFromCache=1]="ServedFromCache";n[n.TimingsMissing=2]="TimingsMissing"})(n.TimingsState||(n.TimingsState={}));r=n.TimingsState;i=function(i){function r(){i.call(this);this.id=r._NextId;r._NextId++;this._intermediateData={};this._cookieParser=new n.CookieParser;this.protocolStatus=t.Resources.getString("PendingRequestStatus");this.statusText=t.Resources.getString("PendingRequestStatus");this.timingsState=2;this.updateCookiesCount();this.updateTransferSize();this.timingsViewModel={stages:[],message:t.Resources.getString("ResourceNoTiming")}}return __extends(r,i),Object.defineProperty(r.prototype,"hasRedirectionInfo",{get:function(){return!!this.redirectedFrom||!!this.redirectedTo},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"hasRequest",{get:function(){return this._hasRequest},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isComplete",{get:function(){return this._isComplete},enumerable:!0,configurable:!0}),r.initialize=function(){Common.ObservableHelpers.defineProperty(r,r.ContentSizePropertyName,0,function(n){return n.onContentSizeChanged()});Common.ObservableHelpers.defineProperty(r,r.ContentTypePropertyName,"");Common.ObservableHelpers.defineProperty(r,r.FullURLPropertyName,"");Common.ObservableHelpers.defineProperty(r,r.InitiatorLocationPropertyName,"");Common.ObservableHelpers.defineProperty(r,r.InitiatorSourceInfoPropertyName,null);Common.ObservableHelpers.defineProperty(r,r.InitiatorTypePropertyName,"");Common.ObservableHelpers.defineProperty(r,r.TimingsStatePropertyName,"",function(n){return n.onResourceTimingsStateChanged()});Common.ObservableHelpers.defineProperty(r,r.MethodPropertyName,"");Common.ObservableHelpers.defineProperty(r,r.NumCookiesPropertyName,"");Common.ObservableHelpers.defineProperty(r,r.PostDataPropertyName,"");Common.ObservableHelpers.defineProperty(r,r.ProtocolNamePropertyName,"");Common.ObservableHelpers.defineProperty(r,r.ProtocolStatusPropertyName,"");Common.ObservableHelpers.defineProperty(r,r.ReadBytesPropertyName,0);Common.ObservableHelpers.defineProperty(r,r.RedirectedFromPropertyName,null);Common.ObservableHelpers.defineProperty(r,r.RedirectedToPropertyName,null);Common.ObservableHelpers.defineProperty(r,r.RequestBodyPropertyName,null);Common.ObservableHelpers.defineProperty(r,r.RequestBodyBase64EncodedPropertyName,null);Common.ObservableHelpers.defineProperty(r,r.RequestContentTypePropertyName,null);Common.ObservableHelpers.defineProperty(r,r.RequestCookieHeadersPropertyName,[],function(n){return n.onCookieHeadersChanged()});Common.ObservableHelpers.defineProperty(r,r.RequestHeadersPropertyName,[]);Common.ObservableHelpers.defineProperty(r,r.ResponseBodyPropertyName,null);Common.ObservableHelpers.defineProperty(r,r.ResponseBodyBase64EncodedPropertyName,null);Common.ObservableHelpers.defineProperty(r,r.ResponseCookieHeadersPropertyName,[],function(n){return n.onCookieHeadersChanged()});Common.ObservableHelpers.defineProperty(r,r.ResponseHeadersPropertyName,[]);Common.ObservableHelpers.defineProperty(r,r.StartTimestampPropertyName,Common.TimeStamp.Zero);Common.ObservableHelpers.defineProperty(r,r.StatusTextPropertyName,"");Common.ObservableHelpers.defineProperty(r,r.StatusCodePropertyName,null);Common.ObservableHelpers.defineProperty(r,r.TimingsViewModelPropertyName,null);Common.ObservableHelpers.defineProperty(r,r.TotalTimePropertyName,Common.TimeStamp.Zero);Common.ObservableHelpers.defineProperty(r,r.TransferSizePropertyName,"")},r.compareOnFilename=function(t,i){var r=n.Converters.UrlToFilenameConverter.convertTo(t.fullURL),u=n.Converters.UrlToFilenameConverter.convertTo(i.fullURL);return r.toLocaleUpperCase().localeCompare(u.toLocaleUpperCase())},r.compareOnContentSize=function(n,t){var i=n.timingsState===1?-1:n.contentSize,r=t.timingsState===1?-1:t.contentSize;return i-r},r.compareOnInitiator=function(n,t){return r.compareString(n.initiatorLocation,t.initiatorLocation)||r.compareString(n.initiatorType,t.initiatorType)},r.compareString=function(n,t){return n&&t?n.localeCompare(t):n?-1:t?1:0},r.prototype.applyCacheInfo=function(n,t){var i,r,f,u;if(this.contentType=n.contentType,this.updateProtocolName(n.httpVersion),t===0&&(this.statusCode=n.statusCode,this.statusText=n.statusText),this.responseBody=n.body,this.responseBodyBase64Encoded=n.isContentBase64Encoded,this.responseHeadersSizeInBytes=n.headersSizeInBytes,i=n.headers,i){for(r in i)if(f=r.toLocaleLowerCase(),f==="content-length"){u=parseInt(i[r]);typeof u=="number"&&(this.contentSize=u);break}t===0&&this.processResponseHeaders(i,t)}},r.prototype.applyRequest=function(n){var i,t,r,u;this.activityId=n.activityId;this.requestId=n.id;n.encodedDataLength!==undefined&&(this.readBytes+=n.encodedDataLength);n.responseContentLength!==undefined&&(this.contentSize+=n.responseContentLength);n.dataReceivedTimestamp&&(!this._intermediateData.endTimestamp||this._intermediateData.endTimestamp.nsec<n.dataReceivedTimestamp.nsec)?this._intermediateData.endTimestamp=n.dataReceivedTimestamp:n.loadFinishedTimestamp&&(this._intermediateData.endTimestamp=n.loadFinishedTimestamp,this.onTimingUpdate());i=n.requestInfo;i&&(this._hasRequest=!0,this.processRequest(i));t=n.responseInfo;t&&this.processResponse(t);n.preNetworkCacheHitUrl&&(this.fullURL=n.preNetworkCacheHitUrl);this.timingsState===1?t&&t.timing&&t.timing.requestTime?(this.startTimestamp=Common.TimeStamp.fromSeconds(t.timing.requestTime),this.updateTransferSize()):n.timestamp&&(this.startTimestamp=n.timestamp,this.updateTransferSize()):n.cacheHitKind===0||n.cacheHitKind===1?(this.timingsState=1,this.updateTransferSize(),this.method=this.method||"GET",this.statusCode||(this.statusCode=200,this.statusText="OK")):this.method=this.method||"GET";r=!!n.loadFinishedTimestamp||!!n.failureInfo;r&&(u=n.loadFinishedTimestamp||n.failureInfo.timestamp,(!this._intermediateData.endTimestamp||u.greaterThan(this._intermediateData.endTimestamp))&&(this._intermediateData.endTimestamp=u));this.onTimingUpdate();r&&(this._isComplete=!0)},r.prototype.applyRedirect=function(n){this.processResponse(n);this.onTimingUpdate();this._intermediateData=null},r.prototype.retrieveRequestBodyData=function(){var i=this,r=this.requestBody!==null&&this.requestBodyBase64Encoded!==undefined;return!r&&this.requestId&&n.NetworkShell.NetworkProfiler.getRequestBody?n.NetworkShell.NetworkProfiler.getRequestBody(this.requestId,this.activityId).then(function(n){i.requestBody=n.body;i.requestBodyBase64Encoded=n.base64Encoded},function(){}):t.Promise.as(0)},r.prototype.retrieveResponseBodyData=function(){var i=this,r=this.responseBody!==null&&this.responseBodyBase64Encoded!==undefined;return r||!this.requestId?t.Promise.as(0):n.NetworkShell.NetworkProfiler.getResponseBody(this.requestId,this.activityId).then(function(n){i.responseBody===null&&(i.responseBody=n.body);i.responseBodyBase64Encoded===null&&(i.responseBodyBase64Encoded=n.base64Encoded)},function(){})},r.isTimingValueValid=function(n){return n!==null&&n>=0},r.isValidStatusCode=function(n){return typeof n=="number"&&n>0},r.sortHeaders=function(n){n.sort(function(n,t){return n.key.localeCompare(t.key)||n.value.localeCompare(t.value)})},r.prototype.processRequest=function(n){var u,i,t,e,f;if(this.fullURL=n.requestURL,this.method=n.method||this.method,this.postData=n.postData,this.requestContentType=n.mimeType,n.initiator&&(n.initiator.url&&(u=n.initiator.url,n.initiator.lineNumber!==undefined&&(u+=":"+n.initiator.lineNumber),this.initiatorLocation=u,this.initiatorSourceInfo={column:(n.initiator.columnNumber||0)+1,line:(n.initiator.lineNumber||0)+1,source:n.initiator.url}),this.initiatorType=n.initiator.type),n.headers){i=[];for(t in n.headers){e=t.toLocaleLowerCase();switch(e){case"cookie":this.requestCookieHeaders=this._cookieParser.parse(n.headers[t],!0);break;case"content-length":f=parseInt(n.headers[t],10);isNaN(f)||(this.requestBodySizeInBytes=f)}i.push({key:t,value:n.headers[t]})}r.sortHeaders(i);this.requestHeaders=i}n.timestamp&&(this._intermediateData.startTimestamp=n.timestamp,this.startTimestamp=n.timestamp);n.redirectedFrom&&(this.redirectedFrom={id:n.redirectedFromId,url:n.redirectedFrom},this.propertyChanged.invoke(r.HasRedirectionInfoPropertyName))},r.prototype.updateProtocolName=function(n){n||(n="1.1");this.protocolStatus="";switch(n){case"1.0":case"1.1":var t=this.fullURL.indexOf("://");t>0&&(this.protocolName=this.fullURL.substr(0,t).toLocaleUpperCase());break;case"2.0":this.protocolName="HTTP/2";break;default:this.protocolName=""}},r.prototype.processResponse=function(t){if(this.fullURL=this.fullURL||t.url,this.statusCode=t.statusCode||this.statusCode,this.statusText=r.isValidStatusCode(t.statusCode)?t.statusText:this.statusText,this.updateProtocolName(t.httpVersion),t.contentType&&t.contentType.length>0&&(this.contentType=t.contentType),t.requestHeadersText&&(this.requestHeadersSizeInBytes=t.requestHeadersText.length),t.responseHeadersText&&(this.responseHeadersSizeInBytes=t.responseHeadersText.length),t.timestamp&&(this.responseTime=t.timestamp,(!this._intermediateData.endTimestamp||t.timestamp.greaterThan(this._intermediateData.endTimestamp))&&(this._intermediateData.endTimestamp=t.timestamp)),this.processResponseHeaders(t.headers),t.redirectedTo&&(this.redirectedTo={id:t.redirectedToId,url:t.redirectedTo},this.propertyChanged.invoke(r.HasRedirectionInfoPropertyName)),t.timing&&(this._intermediateData.timing=t.timing,t.timing.requestTime)){var i=Common.TimeStamp.fromSeconds(t.timing.requestTime);(!this._intermediateData.startTimestamp||i.nsec<this._intermediateData.startTimestamp.nsec)&&(this._intermediateData.startTimestamp=i,this.startTimestamp=i)}this.updateTransferSize();n.NetworkShell.TestEventObject.fireEvent(n.Notifications.ResponseProcessed)},r.prototype.processResponseHeaders=function(n,t){var u,i,f;if(n){u=[];for(i in n){f=i.toLocaleLowerCase();switch(f){case"cache-control":this.cacheControl=n[i];break;case"content-encoding":this.contentEncoding=n[i];break;case"content-length":switch(t){case 0:case 1:break;default:this._isTransferSizeValid=!0}break;case"set-cookie":this.responseCookieHeaders=this._cookieParser.parse(n[i],!1);this.responseCookieHeaders.forEach(function(n){u.push({key:i,value:n.rawText})})}f!=="set-cookie"&&u.push({key:i,value:n[i]})}u&&u.length>0&&(r.sortHeaders(u),this.responseHeaders=u)}},r.prototype.onTimingUpdate=function(){this._intermediateData.startTimestamp&&this._intermediateData.endTimestamp&&(this.totalTime=this._intermediateData.endTimestamp.subtract(this._intermediateData.startTimestamp),this.timingsState===2&&this.totalTime.nsec>0&&this._intermediateData.timing&&(this.timingsState=0));this.updateTimingsModel()},r.prototype.onResourceTimingsStateChanged=function(){this.updateSpecialCaseTimings();this.timingsState===1&&this.updateTransferSize()},r.prototype.onContentSizeChanged=function(){this.updateTransferSize()},r.prototype.onCookieHeadersChanged=function(){this.updateCookiesCount()},r.prototype.updateCookiesCount=function(){var n=this.requestCookieHeaders.length>0?this.requestCookieHeaders[0].tuples.length:0,t=this.responseCookieHeaders.length;this.numCookies=n+t},r.prototype.updateSpecialCaseTimings=function(){var n={stages:[],message:"",totalDuration:this.totalTime};return this.timingsState===1?(n.message=t.Resources.getString("TimingCacheHitMessage"),this.timingsViewModel=n,!0):this.timingsState===2?(n.message=t.Resources.getString("ResourceNoTiming"),this.timingsViewModel=n,!0):!1},r.prototype.updateTransferSize=function(){if(this.timingsState===1)this.transferSize=t.Resources.getString("CacheHitAnnotation");else{var i=this.contentSize>=0&&r.isValidStatusCode(this.statusCode)&&this._isTransferSizeValid;i&&(this.transferSize=n.Converters.ByteSizeToStringConverter.convertTo(this.contentSize))}},r.prototype.updateTimingsModel=function(){var u,h,v,y;if(!this.updateSpecialCaseTimings()){var p=this._intermediateData,f=p.timing,i=this.totalTime,s={stages:[],message:"",totalDuration:i},c={timingsStage:t.Resources.getString("StalledLabel"),tooltip:t.Resources.getString("StalledTooltip"),color:n.Constants.STALLED_COLOR,startRatio:0,durationRatio:0,duration:Common.TimeStamp.fromMilliseconds(0),harFields:["blocked"]},e=Common.TimeStamp.Zero;for(r.isTimingValueValid(f.requestTime)&&(e=Common.TimeStamp.fromSeconds(f.requestTime).subtract(p.startTimestamp)),h=0;h<r.TIMING_OBJECT_STAGES.length;h++){var o=r.TIMING_OBJECT_STAGES[h],w=f[o.start],b=f[o.end];if(r.isTimingValueValid(w)&&r.isTimingValueValid(b)){var l=Common.TimeStamp.fromMilliseconds(w),k=Common.TimeStamp.fromMilliseconds(b),a=k.subtract(l);a.lessThan(Common.TimeStamp.Zero)||(s.stages.push({timingsStage:t.Resources.getString(o.nameId),tooltip:t.Resources.getString(o.tooltipId),color:o.color,startRatio:l.add(e).nsec/i.nsec,durationRatio:Math.max(a.nsec/i.nsec,r.SMALLEST_TIMING_DURATION_RATIO),duration:a,harFields:o.harFields}),u===undefined&&(u=l.add(e)))}}if(u=u||e,u.greaterThan(Common.TimeStamp.Zero)&&(c.durationRatio=Math.max(u.nsec/i.nsec,r.SMALLEST_TIMING_DURATION_RATIO),c.duration=u,s.stages.unshift(c)),!r.isTimingValueValid(f.receiveHeadersEnd)){this.timingsViewModel=s;return}v=Common.TimeStamp.fromMilliseconds(f.receiveHeadersEnd);y=i.subtract(e.add(v));s.stages.push({timingsStage:t.Resources.getString("DownloadingLabel"),tooltip:t.Resources.getString("DownloadingTooltip"),color:n.Constants.DOWNLOADING_COLOR,startRatio:v.add(e).nsec/i.nsec,durationRatio:Math.max(y.nsec/i.nsec,r.SMALLEST_TIMING_DURATION_RATIO),duration:y,harFields:["receive"]});this.timingsViewModel=s}},r.SMALLEST_TIMING_DURATION_RATIO=.01,r._NextId=0,r.TIMING_OBJECT_STAGES=[{nameId:"ProxyLabel",tooltipId:"ProxyTooltip",color:n.Constants.PROXY_COLOR,start:"proxyStart",end:"proxyEnd",harFields:["blocked"]},{nameId:"ResolvingLabel",tooltipId:"ResolvingTooltip",color:n.Constants.RESOLVING_COLOR,start:"dnsStart",end:"dnsEnd",harFields:["dns"]},{nameId:"ConnectingLabel",tooltipId:"ConnectingTooltip",color:n.Constants.CONNECTING_COLOR,start:"connectStart",end:"connectEnd",harFields:["connect"]},{nameId:"SslLabel",tooltipId:"SSLTooltip",color:n.Constants.SSL_COLOR,start:"sslStart",end:"sslEnd",harFields:["ssl"]},{nameId:"SendingLabel",tooltipId:"SendingTooltip",color:n.Constants.SENDING_COLOR,start:"sendStart",end:"sendEnd",harFields:["send"]},{nameId:"WaitingLabel",tooltipId:"WaitingTooltip",color:n.Constants.WAITING_COLOR,start:"sendEnd",end:"receiveHeadersEnd",harFields:["wait"]}],r.ContentSizePropertyName="contentSize",r.ContentTypePropertyName="contentType",r.FullURLPropertyName="fullURL",r.HasRedirectionInfoPropertyName="hasRedirectionInfo",r.InitiatorLocationPropertyName="initiatorLocation",r.InitiatorSourceInfoPropertyName="initiatorSourceInfo",r.InitiatorTypePropertyName="initiatorType",r.MethodPropertyName="method",r.NumCookiesPropertyName="numCookies",r.PostDataPropertyName="postData",r.ProtocolNamePropertyName="protocolName",r.ProtocolStatusPropertyName="protocolStatus",r.ReadBytesPropertyName="readBytes",r.RedirectedFromPropertyName="redirectedFrom",r.RedirectedToPropertyName="redirectedTo",r.RequestBodyPropertyName="requestBody",r.RequestBodyBase64EncodedPropertyName="requestBodyBase64Encoded",r.RequestContentTypePropertyName="requestContentType",r.RequestCookieHeadersPropertyName="requestCookieHeaders",r.RequestHeadersPropertyName="requestHeaders",r.ResponseBodyPropertyName="responseBody",r.ResponseBodyBase64EncodedPropertyName="responseBodyBase64Encoded",r.ResponseCookieHeadersPropertyName="responseCookieHeaders",r.ResponseHeadersPropertyName="responseHeaders",r.StartTimestampPropertyName="startTimestamp",r.StatusCodePropertyName="statusCode",r.StatusTextPropertyName="statusText",r.TimingsStatePropertyName="timingsState",r.TimingsViewModelPropertyName="timingsViewModel",r.TotalTimePropertyName="totalTime",r.TransferSizePropertyName="transferSize",r}(Common.Observable);n.SummaryViewModelItem=i;i.initialize()})(t=n.Network||(n.Network={}))})(t=n.Tools||(n.Tools={}))}(F12||(F12={}))
//# sourceMappingURL=NetworkMerged.min.js.map
{
    "start_url": "Network/network.html",
    "domain": "http://microsoft.com",
    "name": "Network Tool",
    "version": "1.1",
    "f12": {
        "localized_tab_resource": "F12ToolTitle",
        "localized_tooltip_id": 6001,
        "resource_aliases": {
            "Network": {
                "is_default": true
            },
            "Common": {
            },
            "DiagnosticsHubControlsResources": {
            }
        },
        "themed_images": {
            "plugin-common-image-find-next": {
                "bitmap_source": "../Common/images/i_next.png",
                "background_color": "plugin-searchcontrol-mouseover-background-background-color"
            },
            "plugin-common-image-find-previous": {
                "bitmap_source": "../Common/images/i_previous.png",
                "background_color": "plugin-searchcontrol-mouseover-background-background-color"
            },
            "vs-image-icon-tree-collapsed": {
                "bitmap_source": "../Common/images/itemCollapsedIcon.png",
                "background_color": "plugin-background-color"
            },
            "vs-image-icon-tree-expanded": {
                "bitmap_source": "../Common/images/itemExpandedIcon.png",
                "background_color": "plugin-background-color"
            },
            "image-toggle-pretty-print": {
                "bitmap_source": "..\\Common\\images\\togglePrettyPrint.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "image-toggle-word-wrap": {
                "bitmap_source": "..\\Common\\images\\toggleWordWrap.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "image-checkered-background": {
                "bitmap_source": "images\\i_checkered_background.png",
                "background_color": "plugin-background-color"
            },
            "image-clear-cache": {
                "bitmap_source": "images\\i_clearCache.png",
                "background_color": "plugin-background-color"
            },
            "image-clear-cookies": {
                "bitmap_source": "images\\i_clearCookies.png",
                "background_color": "plugin-background-color"
            },
            "image-clear-on-navigate": {
                "bitmap_source": "images\\i_clearOnNavigate.png",
                "background_color": "plugin-background-color"
            },
            "image-clear-session": {
                "bitmap_source": "images\\i_clearSession.png",
                "background_color": "plugin-background-color"
            },
            "image-filtering-options": {
                "bitmap_source": "images\\i_filtering_options.png",
                "background_color": "plugin-background-color"
            },
            "image-open": {
                "bitmap_source": "images\\i_open.png",
                "background_color": "plugin-background-color"
            },
            "image-refresh-server": {
                "bitmap_source": "images\\i_refreshServer.png",
                "background_color": "plugin-background-color"
            },
            "image-save": {
                "bitmap_source": "images\\i_save.png",
                "background_color": "plugin-background-color"
            },
            "image-start": {
                "bitmap_source": "images\\i_start.png",
                "background_color": "plugin-background-color"
            },
            "image-stop": {
                "bitmap_source": "images\\i_stop.png",
                "background_color": "plugin-background-color"
            },
            "f12-network-image-status-ok": {
                "bitmap_source": "Images/NetworkStatus-OK.png",
                "background_color": "plugin-background-color"
            },
            "f12-network-image-status-error": {
                "bitmap_source": "Images/NetworkStatus-Error.png",
                "background_color": "plugin-background-color"
            },
            "f12-network-image-status-warning": {
                "bitmap_source": "Images/NetworkStatus-Warning.png",
                "background_color": "plugin-background-color"
            },
            "vs-image-graph-user-mark": {
                "bitmap_source": "Images/i_usermark.png",
                "background_color": "plugin-background-color"
            },
            "vs-image-graph-app-event": {
                "bitmap_source": "Images/i_appevent.png",
                "background_color": "plugin-background-color"
            },
            "vs-image-graph-aggregated-event": {
                "bitmap_source": "Images/CustomMark5_18x.png",
                "background_color": "plugin-background-color"
            }
        },
        "file_aliases": {
            "DiagnosticsHub.DataWarehouseHost": {
                "path": "DiagnosticsHub.ScriptedSandboxPlugin.dll"
            }
        }
    },
    "vs": {
        "resource_aliases": {
            "Network": {
                "type": "Embedded",
                "name": "Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost",
                "path": "Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Resources.Network.Resources",
                "is_default": true
            },
            "Common": {
                "type": "Embedded",
                "name": "Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost",
                "path": "Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Resources.Common.Resources"
            },
            "DiagnosticsHubControlsResources": {
                "path": "..\\..\\..\\..\\Platform\\DiagnosticsHub\\WebViews\\DiagnosticsHub.Javascript.Controls.ScriptResources"
            }
        },
        "guid_symbols": {
            "guidShellStandardSet": "5efc7975-14bc-11cf-9b2b-00aa00573819"
        },
        "command_aliases": {
            "find": {
                "guid": "guidShellStandardSet",
                "id": 97,
                "focus": true
            }
        },
        "theme_token_aliases": {
            "diagnostics-host-ruler-tickmark": {
                "category": "f8a8b2a5-dd35-43f6-a382-fd6a61325c22",
                "key_type": "BackgroundColor",
                "name": "RulerTickmark"
            },
            "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"
            },
            "vs-command-bar-options-background-color": {
                "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d",
                "key_type": "BackgroundColor",
                "name": "CommandBarOptionsBackground"
            },
            "vs-tool-window-text-color": {
                "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d",
                "key_type": "BackgroundColor",
                "name": "ToolWindowText"
            },
            "plugin-border-color": {
                "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d",
                "key_type": "BackgroundColor",
                "name": "ActiveBorder"
            },
            "plugin-editor-scrollbar-marker-search-result-color": {
                "category": "f8a8b2a5-dd35-43f6-a382-fd6a61325c22",
                "key_type": "BackgroundColor",
                "name": "Border"
            },
            "plugin-menucontrol-background-color": {
                "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d",
                "key_type": "BackgroundColor",
                "name": "Menu"
            },
            "plugin-network-grid-border-color": {
                "category": "634eef98-6af2-4f63-8d9f-36351e18b606",
                "key_type": "BackgroundColor",
                "name": "GridCellBorder"
            },
            "plugin-network-grid-cell-odd-background-color": {
                "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d",
                "key_type": "BackgroundColor",
                "name": "ToolWindowBackground"
            },
            "plugin-network-grid-cell-even-background-color": {
                "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d",
                "key_type": "BackgroundColor",
                "name": "ToolWindowBackground"
            },
            "plugin-network-grid-column-header-background-color": {
                "category": "634eef98-6af2-4f63-8d9f-36351e18b606",
                "key_type": "BackgroundColor",
                "name": "NetworkHeaderBackground"
            },
            "plugin-network-grid-path-color": {
                "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891",
                "key_type": "ForegroundColor",
                "name": "Console Warning Text"
            },
            "plugin-network-grid-path-color-highlighted": {
                "category": "634eef98-6af2-4f63-8d9f-36351e18b606",
                "key_type": "ForegroundColor",
                "name": "NetworkGridSecondaryHighlighted"
            },
            "plugin-network-grid-path-color-selected": {
                "category": "634eef98-6af2-4f63-8d9f-36351e18b606",
                "key_type": "ForegroundColor",
                "name": "NetworkGridSecondarySelected"
            },
            "plugin-network-grid-response-cache-color": {
                "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891",
                "key_type": "ForegroundColor",
                "name": "Console Warning Text"
            },
            "plugin-network-grid-response-selected-cache-color": {
                "category": "634eef98-6af2-4f63-8d9f-36351e18b606",
                "key_type": "ForegroundColor",
                "name": "NetworkCacheSelectedText"
            },
            "plugin-network-grid-response-blur-cache-color": {
                "category": "634eef98-6af2-4f63-8d9f-36351e18b606",
                "key_type": "ForegroundColor",
                "name": "NetworkCacheBlurText"
            },
            "plugin-network-grid-response-error-color": {
                "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891",
                "key_type": "ForegroundColor",
                "name": "Console Error Text"
            },
            "plugin-network-grid-response-selected-error-color": {
                "category": "634eef98-6af2-4f63-8d9f-36351e18b606",
                "key_type": "ForegroundColor",
                "name": "NetworkErrorSelectedText"
            },
            "plugin-network-grid-response-blur-error-color": {
                "category": "634eef98-6af2-4f63-8d9f-36351e18b606",
                "key_type": "ForegroundColor",
                "name": "NetworkErrorBlurText"
            },
            "plugin-network-toolbar-button-text-color": {
                "category": "634eef98-6af2-4f63-8d9f-36351e18b606",
                "key_type": "ForegroundColor",
                "name": "NetworkToolbarButtonTextColor"
            },
            "plugin-network-toolbar-button-hover-text-color": {
                "category": "634eef98-6af2-4f63-8d9f-36351e18b606",
                "key_type": "ForegroundColor",
                "name": "NetworkToolbarButtonHoverTextColor"
            },
            "plugin-network-toolbar-button-popup-text-color": {
                "category": "634eef98-6af2-4f63-8d9f-36351e18b606",
                "key_type": "ForegroundColor",
                "name": "NetworkToolbarButtonPopupTextColor"
            },
            "plugin-network-toolbar-button-pressed-text-color": {
                "category": "634eef98-6af2-4f63-8d9f-36351e18b606",
                "key_type": "ForegroundColor",
                "name": "NetworkToolbarButtonPressedTextColor"
            },
            "plugin-network-splitter": {
                "category": "634eef98-6af2-4f63-8d9f-36351e18b606",
                "key_type": "BackgroundColor",
                "name": "Splitter"
            },
            "plugin-network-tabpane-key-color": {
                "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891",
                "key_type": "ForegroundColor",
                "name": "Console Warning Text"
            },
            "plugin-network-tabpane-value-color": {
                "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d",
                "key_type": "BackgroundColor",
                "name": "ToolWindowText"
            },
            "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-theme-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "ThemeColor"
            },
            "plugin-font-editor-color": {
              "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
              "key_type": "ForegroundColor",
              "name": "PluginFontEditorColor"
            },
            "monaco-gotoline-background-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "BackgroundColor",
                "name": "MonacoGotolineBackgroundColor"
            },
            "monaco-gotoline-focused-background-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "BackgroundColor",
                "name": "MonacoGotolineFocusedBackgroundColor"
            },
            "monaco-gotoline-hover-background-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "BackgroundColor",
                "name": "MonacoGotolineHoverBackgroundColor"
            },
            "monaco-gotoline-selected-background-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "BackgroundColor",
                "name": "MonacoGotolineSelectedBackgroundColor"
            },
            "plugin-editor-selected-text-background-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "BackgroundColor",
                "name": "PluginEditorSelectedTextBackgroundColor"
            },
            "plugin-font-console-error-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "PluginFontConsoleErrorColor"
            },
            "plugin-font-console-info-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "PluginFontConsoleInfoColor"
            },
            "plugin-font-console-input-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "PluginFontConsoleInputColor"
            },
            "plugin-font-console-warning-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "PluginFontConsoleWarningColor"
            },
            "plugin-font-editor-breakpoint-background-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "BackgroundColor",
                "name": "PluginFontEditorBreakpointBackgroundColor"
            },
            "plugin-font-editor-comment-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "PluginFontEditorCommentColor"
            },
            "plugin-font-editor-css-name-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "PluginFontEditorCssNameColor"
            },
            "plugin-font-editor-css-selector-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "PluginFontEditorCssSelectorColor"
            },
            "plugin-font-editor-css-value-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "PluginFontEditorCssValueColor"
            },
            "plugin-font-editor-erroradornment-background-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "BackgroundColor",
                "name": "PluginFontEditorErroradornmentBackgroundColor"
            },
            "plugin-font-editor-erroradornment-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "PluginFontEditorErroradornmentColor"
            },
            "plugin-font-editor-html-attribute-name-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "PluginFontEditorHtmlAttributeNameColor"
            },
            "plugin-font-editor-html-attribute-value-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "PluginFontEditorHtmlAttributeValueColor"
            },
            "plugin-font-editor-html-element-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "PluginFontEditorHtmlElementColor"
            },
            "plugin-font-editor-html-tag-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "PluginFontEditorHtmlTagColor"
            },
            "plugin-font-editor-identifier-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "PluginFontEditorIdentifierColor"
            },
            "plugin-font-editor-instruction-pointer-background-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "BackgroundColor",
                "name": "PluginFontEditorInstructionPointerBackgroundColor"
            },
            "plugin-font-editor-keyword-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "PluginFontEditorKeywordColor"
            },
            "plugin-font-editor-literal-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "PluginFontEditorLiteralColor"
            },
            "plugin-font-editor-margin-background-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "BackgroundColor",
                "name": "PluginFontEditorMarginBackgroundColor"
            },
            "plugin-font-editor-margin-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "PluginFontEditorMarginColor"
            },
            "plugin-font-editor-number-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "PluginFontEditorNumberColor"
            },
            "plugin-font-editor-search-result-background-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "BackgroundColor",
                "name": "PluginFontEditorSearchResultBackgroundColor"
            },
            "plugin-font-editor-string-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "PluginFontEditorStringColor"
            },
            "plugin-highlight-border-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "PluginHighlightBorderColor"
            },
            "plugin-tab-header-hover-background-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "BackgroundColor",
                "name": "PluginTabHeaderHoverBackgroundColor"
            },
            "plugin-word-highlight-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "PluginWordHighlightColor"
            },
            "plugin-word-highlight-strong-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "ForegroundColor",
                "name": "PluginWordHighlightStrongColor"
            },
            "vs-drop-shadow-background-color": {
                "category": "ca939bd0-e6fd-47f6-8a98-effc40dfab02",
                "key_type": "BackgroundColor",
                "name": "VsDropShadowBackgroundColor"
            }
        },
        "themed_images": {
            "plugin-common-image-find-next": {
                "bitmap_source": "Common\\images\\i_next.png",
                "background_color": "plugin-textbox-background-color"
            },
            "plugin-common-image-find-previous": {
                "bitmap_source": "Common\\images\\i_previous.png",
                "background_color": "plugin-textbox-background-color"
            },
            "vs-image-icon-tree-collapsed": {
                "bitmap_source": "Common\\images\\itemCollapsedIcon.png",
                "background_color": "plugin-background-color"
            },
            "vs-image-icon-tree-expanded": {
                "bitmap_source": "Common\\images\\itemExpandedIcon.png",
                "background_color": "plugin-background-color"
            },
            "image-toggle-pretty-print": {
                "bitmap_source": "Common\\images\\togglePrettyPrint.png",
                "background_color": "plugin-background-color"
            },
            "image-toggle-word-wrap": {
                "bitmap_source": "Common\\images\\toggleWordWrap.png",
                "background_color": "plugin-background-color"
            },
            "image-clear-cache": {
                "bitmap_source": "Network\\images\\i_clearCache.png",
                "background_color": "plugin-background-color"
            },
            "image-clear-cookies": {
                "bitmap_source": "Network\\images\\i_clearCookies.png",
                "background_color": "plugin-background-color"
            },
            "image-clear-on-navigate": {
                "bitmap_source": "Network\\images\\i_clearOnNavigate.png",
                "background_color": "plugin-background-color"
            },
            "image-clear-session": {
                "bitmap_source": "Network\\images\\i_clearSession.png",
                "background_color": "plugin-background-color"
            },
            "image-filtering-options": {
                "bitmap_source": "Network\\images\\i_filtering_options.png",
                "background_color": "plugin-background-color"
            },
            "image-open": {
                "bitmap_source": "Network\\images\\i_open.png",
                "background_color": "plugin-background-color"
            },
            "image-refresh-server": {
                "bitmap_source": "Network\\images\\i_refreshServer.png",
                "background_color": "plugin-background-color"
            },
            "image-save": {
                "bitmap_source": "Network\\images\\i_save.png",
                "background_color": "plugin-background-color"
            },
            "image-start": {
                "bitmap_source": "Network\\images\\i_start.png",
                "background_color": "plugin-background-color"
            },
            "image-stop": {
                "bitmap_source": "Network\\images\\i_stop.png",
                "background_color": "plugin-background-color"
            },
            "f12-network-image-status-ok": {
                "bitmap_source": "Network\\Images\\NetworkStatus-OK.png",
                "background_color": "plugin-background-color"
            },
            "f12-network-image-status-error": {
                "bitmap_source": "Network\\Images\\NetworkStatus-Error.png",
                "background_color": "plugin-background-color"
            },
            "f12-network-image-status-warning": {
                "bitmap_source": "Network\\Images\\NetworkStatus-Warning.png",
                "background_color": "plugin-background-color"
            },
            "vs-image-graph-user-mark": {
                "bitmap_source": "Network\\Images\\i_usermark.png",
                "background_color": "plugin-background-color"
            },
            "vs-image-graph-app-event": {
                "bitmap_source": "Network\\Images\\i_appevent.png",
                "background_color": "plugin-background-color"
            },
            "vs-image-graph-aggregated-event": {
                "bitmap_source": "Network\\Images\\CustomMark5_18x.png",
                "background_color": "plugin-background-color"
            }
        }
    }
}
//! Copyright (C) Microsoft. All rights reserved.
var Network,networkRemoteCode;(function(n){var t;(function(t){"use strict";var i,r;(function(n){n[n.NavigationOccurred=1300]="NavigationOccurred"})(i||(i={}));r=function(){function t(){expectedWindowProperty="__BROWSERTOOLS_NETWORK_TOOL_ADDED"}return t.prototype.initialize=function(){browser.addEventListener("beforeScriptExecute",this.onBeforeScriptExecute.bind(this));browser.addEventListener("consoleMessage",this.onConsoleMessage.bind(this));var t=[];t.canClearBrowserCache=this.canClearBrowserCache.bind(this);t.canClearBrowserCookies=this.canClearBrowserCookies.bind(this);t.clearBrowserCache=this.clearBrowserCache.bind(this);t.clearBrowserCacheForDomain=this.clearBrowserCacheForDomain.bind(this);t.clearAllCookies=this.clearAllCookies.bind(this);t.clearAllCookiesForDomain=this.clearAllCookiesForDomain.bind(this);t.setCacheDisabled=this.setCacheDisabled.bind(this);this._remoteHelper=new n.Remote.__BROWSERTOOLS_RemoteHelper(t);this._remoteHelper.initialize("NetworkPort",this.initializePage.bind(this),this.onDetach.bind(this))},t.prototype.refreshPage=function(){return browser.refresh(),!0},t.prototype.addRemotePageFunctions=function(n){n[expectedWindowProperty]=browser.createSafeFunction(n,function(){})},t.prototype.initializePage=function(){var t,i,r,u;try{t=n.Remote.__BROWSERTOOLS_RemoteHelper.getDefaultView(browser.document);browser.documentMode>=1e5&&this.addRemotePageFunctions(t);i={docMode:browser.document.documentMode,contextInfo:t.location.href};this._remoteHelper.port.postMessage("Handshake:"+JSON.stringify(i));this._remoteHelper.initializeDocumentTries=0;this._remoteHelper.port.postMessage(JSON.stringify({notification:"RemoteCodeInitialized",params:[]}));r=function(){setTimeout(this.fireLoadTimings.bind(this),0)};u=browser.createSafeFunction(t,r.bind(this));t.addEventListener("load",u)}catch(e){this.onDocumentNotReady()}},t.prototype.fireLoadTimings=function(){var r=n.Remote.__BROWSERTOOLS_RemoteHelper.getDefaultView(browser.document),t=r.performance.timing,i=t.navigationStart,u=t.loadEventEnd-i,f=t.domContentLoadedEventEnd-i;this._remoteHelper.port.postMessage(JSON.stringify({notification:"DOMContentLoaded",params:[f]}));this._remoteHelper.port.postMessage(JSON.stringify({notification:"LoadEvent",params:[u]}))},t.prototype.onBeforeScriptExecute=function(t){t&&t.browserOrWindow&&(t=t.browserOrWindow);var i=null;try{i=n.Remote.__BROWSERTOOLS_RemoteHelper.getDefaultView(t.document)}catch(r){return}i===n.Remote.__BROWSERTOOLS_RemoteHelper.getDefaultView(browser.document)&&this._remoteHelper.port&&(this._remoteHelper.postAllMessages(),this.initializePage())},t.prototype.onConsoleMessage=function(n){n.source==="HTML"&&n.messageId===1300&&this._remoteHelper&&this._remoteHelper.port&&this._remoteHelper.port.postMessage(JSON.stringify({notification:"FrameNavigated",params:[]}))},t.prototype.onDetach=function(){this._remoteHelper.initializeDocumentTries=0;try{var t=n.Remote.__BROWSERTOOLS_RemoteHelper.getDefaultView(browser.document);t[expectedWindowProperty]&&delete t[expectedWindowProperty]}catch(i){}},t.prototype.onDocumentNotReady=function(){this._remoteHelper.initializeDocumentTries<this._remoteHelper.initializeDocumentMaxTries?(++this._remoteHelper.initializeDocumentTries,this._remoteHelper.port.postMessage("DocumentNotYetReady")):this._remoteHelper.errorHandler.handleError("Document timed out","Remote.js",0)},t.prototype.setCacheDisabled=function(n){try{return resources.alwaysRefreshFromServer=n,!0}catch(t){}return!1},t.prototype.canClearBrowserCache=function(){return resources&&resources.clearBrowserCache?!0:!1},t.prototype.clearBrowserCache=function(){try{return resources.clearBrowserCache(),!0}catch(n){}return!1},t.prototype.clearBrowserCacheForDomain=function(){try{resources.clearBrowserCacheForDomain()}catch(n){}return!0},t.prototype.canClearBrowserCookies=function(){return resources&&resources.cookies&&resources.cookies.clearAllCookies?!0:!1},t.prototype.clearAllCookies=function(){try{return resources.cookies.clearAllCookies(),!0}catch(n){}return!1},t.prototype.clearAllCookiesForDomain=function(){try{resources.cookies.clearAllCookiesForDomain()}catch(n){}return!0},t}();t.__BROWSERTOOLS_RemoteCode=r})(t=n.Remote||(n.Remote={}))})(Network||(Network={}));networkRemoteCode=new Network.Remote.__BROWSERTOOLS_RemoteCode;networkRemoteCode.initialize()
//# sourceMappingURL=remote.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var expectedWindowProperty,Network;(function(n){var t;(function(t){"use strict";var r=function(){function t(n){this._messageHandlers=[];this._pendingMessages=[];this._pendingMessagesMap={};this._portId=0;this._uid=0;this.childrenElementLimit=200;this.initializeDocumentMaxTries=15;this.initializeDocumentTries=0;this.isEvalModified=!1;this.isExecScriptModified=!1;this.onDetachCallback=null;this.port=null;this.portReady=!1;this._messageHandlers=n}return Object.defineProperty(t.prototype,"errorHandler",{get:function(){return this._errorHandler},enumerable:!0,configurable:!0}),t.getDefaultView=function(n){return n?typeof n.defaultView!="undefined"?n.defaultView:n.parentWindow:null},t.prototype.getUid=function(){return"uid"+(this._uid++).toString(36)},t.prototype.initialize=function(n,t,r){this._errorHandler=new i(this);this.onDetachCallback=r;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(n+this._portId);this.port&&(this.port.addEventListener("message",this.processMessages.bind(this)),toolUI.connect(this.port),t());this._handshakeCallback=t},t.prototype.initializeScriptEngines=function(n){var t,i,r;if(n&&n.frames)for(t=0;t<n.frames.length;t++)i=n.frames[t],i&&(r=dom.getCrossSiteWindow(n,i),this.initializeScriptEngines(r))},t.prototype.postAllMessages=function(){var n,t;for(n in this._pendingMessagesMap)this._pendingMessages.push(this._pendingMessagesMap[n]);if(this._pendingMessages.length>0){t=JSON.stringify(this._pendingMessages);this._pendingMessages=[];this._pendingMessagesMap={};try{this.port.postMessage(t)}catch(i){return}}},t.prototype.processMessages=function(n){var s=this,o,f,u,r,t,i,e;if(n.data==="InitializeDocument"){this._handshakeCallback();return}for(o=function(n){return function(t,i){s.postObject({uid:n,args:[t]},i)}},f=JSON.parse(n.data),u=0;u<f.length;++u)if(r=f[u],this._messageHandlers[r.command]){for(t=r.args,i=0;i<t.length;++i)t[i]&&t[i].type==="callback"&&(t[i]=o(t[i].uid));e=this._messageHandlers[r.command].apply(this,t);this.postObject({uid:r.uid,args:e!==undefined?[e]:undefined})}},t.prototype.onBreak=function(){this.postAllMessages()},t.prototype.onDetach=function(){this._uid=0;this._pendingMessages=[];this._pendingMessagesMap={};this.isEvalModified=!1;this.isExecScriptModified=!1;this.onDetachCallback&&this.onDetachCallback()},t.prototype.onDocumentComplete=function(i){var r,u;if(expectedWindowProperty&&(r=null,i))try{if(i.browserOrWindow&&(i=i.browserOrWindow),i.document?r=i.document:i.Document&&(r=i.Document),u=n.Remote.__BROWSERTOOLS_RemoteHelper.getDefaultView(r),!r||u[expectedWindowProperty])return;browser.executeScript("void(0);"+t.JMCScriptUrl,u)}catch(f){}},t.prototype.postObject=function(n,t,i){i===void 0&&(i=!0);t?this._pendingMessagesMap[t]=n:this._pendingMessages.push(n);this.postAllMessages()},t.JMCScriptUrl="\\r\\n//# sourceURL=browsertools://browsertools.performance.js",t}(),i;t.__BROWSERTOOLS_RemoteHelper=r;i=function(){function t(n){this._remoteHelper=n;this.initializeListeners()}return t.prototype.handleError=function(n,t,i,r){this.onScriptError({message:n,file:t,line:i,column:r})},t.getArgumentString=function(n){var t=typeof n;if(n===undefined)t="undefined";else if(t==="object"){if(n){typeof n.length!="number"||typeof n.propertyIsEnumerable!="function"||n.propertyIsEnumerable("length")||typeof n.splice!="function"||(t="array");try{n.constructor===Array?t="array":n.constructor===Date?t="date":n.constructor===RegExp&&(t="regex")}catch(i){}}else t="null";t="object"}switch(t){case"boolean":return n;case"date":return"[date] "+n;case"function":return""+n;case"null":return"null";case"number":return n;case"regex":return"[regex] "+n;case"string":return'"'+n+'"';case"undefined":return"undefined";case"htmlElement":case"array":case"object":return JSON.stringify(n)}},t.prototype.onScriptError=function(t){var i,r;if(this._remoteHelper&&this._remoteHelper.port){i=[];try{i.push("BreakFlags: "+toolUI.getBreakFlags());i.push("IsEvalModified: "+this._remoteHelper.isEvalModified);i.push("IsExecScriptModified: "+this._remoteHelper.isExecScriptModified);i.push("Url: "+n.Remote.__BROWSERTOOLS_RemoteHelper.getDefaultView(browser.document).location.href)}catch(u){}t.additionalInfo=i.join("\r\n\r\n");r=JSON.stringify([{uid:"scriptError",args:[t]}]);try{this._remoteHelper.port.postMessage(r)}catch(u){}}},t.prototype.initializeListeners=function(){var i=this,t;this._onErrorHandler=this.onScriptError.bind(this);toolUI.addEventListener("scripterror",this._onErrorHandler);toolUI.addEventListener("detach",function(){toolUI.removeEventListener("scripterror",i._onErrorHandler)});browser&&browser.document&&(t=n.Remote.__BROWSERTOOLS_RemoteHelper.getDefaultView(browser.document),t&&this._remoteHelper.initializeScriptEngines(t))},t}();t.__BROWSERTOOLS_ErrorHandler=i})(t=n.Remote||(n.Remote={}))})(Network||(Network={}))
//# sourceMappingURL=remoteHelpers.min.js.map
var __extends,Microsoft;(function(n){(function(n){(function(n){"use strict";var t=function(){function n(){}return n.ZoomIn="ZoomIn",n.ZoomToSelection="ZoomToSelection",n.ZoomOut="ZoomOut",n.ResetZoom="ResetZoom",n.ResetView="ResetView",n.ClearSelection="ClearSelection",n}();n.CommandIds=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio})(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function n(){}return Object.defineProperty(n,"GridLineZIndex",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(n,"SelectionOverlayZIndex",{get:function(){return 130},enumerable:!0,configurable:!0}),Object.defineProperty(n,"DropDownMenuZIndex",{get:function(){return 1e3},enumerable:!0,configurable:!0}),Object.defineProperty(n,"DefaultSwimlaneGraphHeight",{get:function(){return 70},enumerable:!0,configurable:!0}),Object.defineProperty(n,"MinimumSwimlaneGraphHeight",{get:function(){return 50},enumerable:!0,configurable:!0}),Object.defineProperty(n,"MaximumSwimlaneGraphHeight",{get:function(){return 200},enumerable:!0,configurable:!0}),Object.defineProperty(n,"TimeoutImmediate",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(n,"WindowResizeThrottle",{get:function(){return 200},enumerable:!0,configurable:!0}),Object.defineProperty(n,"TooltipTimeoutMs",{get:function(){return 750},enumerable:!0,configurable:!0}),n}();n.Constants=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(i){var r=this;this._viewportStateChangedEvent=new t.AggregatedEvent;this._isSelecting=!1;this._commands=[];this._currentSelection=null;this._viewportTimeRange=i;this._viewableTimeRange=i;this._scrollbar=new t.Scrollbar;this._scrollbar.onScroll=this.onScroll.bind(this);this._onSelectionChangedBoundFunction=this.onSelectionChanged.bind(this);this._telemetry=new t.Telemetry.ViewportController;this._viewEventManager=n.VisualStudio.DiagnosticsHub.getViewEventManager();this._viewEventManager.selectionChanged.addEventListener(this._onSelectionChangedBoundFunction);this._commands.push({id:t.CommandIds.ZoomIn,callback:this.zoomToSelection.bind(this),label:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomInButton"),ariaLabel:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomInAriaLabel"),tooltip:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomInButton"),type:1,iconEnabled:"vs-image-toolbar-chartzoom-in",iconDisabled:"vs-image-toolbar-chartzoom-in-disabled",accessKey:null,hidden:function(){return!1},disabled:function(){return!r.canZoomTo()},checked:function(){return!1},cssClass:null,submenu:null,displayOnToolbar:!0,displayOnContextMenu:!0});this._commands.push({id:t.CommandIds.ResetZoom,callback:this.resetZoom.bind(this),label:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarResetZoomButton"),ariaLabel:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarResetZoomAriaLabel"),tooltip:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarResetZoomButton"),type:1,iconEnabled:"vs-image-toolbar-chartzoom-reset",iconDisabled:"vs-image-toolbar-chartzoom-reset-disabled",accessKey:null,hidden:function(){return!1},disabled:function(){return!r.canResetZoom()},checked:function(){return!1},cssClass:null,submenu:null,displayOnToolbar:!0,displayOnContextMenu:!0});this._commands.push({id:t.CommandIds.ClearSelection,callback:this.clearSelection.bind(this),label:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarClearSelectionButton"),ariaLabel:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarClearSelectionAriaLabel"),tooltip:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarClearSelectionButton"),type:1,iconEnabled:"vs-image-toolbar-chartselection-clear",iconDisabled:"vs-image-toolbar-chartselection-clear-disabled",accessKey:null,hidden:function(){return!1},disabled:function(){return!r.canClearSelection()},checked:function(){return!1},cssClass:null,submenu:null,displayOnToolbar:!0,displayOnContextMenu:!0});this._viewportStateChangedEvent.addEventListener(function(){r._commands.forEach(function(n){n.onDisabledChanged&&n.onDisabledChanged()})})}return Object.defineProperty(i.prototype,"container",{get:function(){return this._scrollbar.container},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"viewportStateChanged",{get:function(){return this._viewportStateChangedEvent},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"visible",{get:function(){return this._viewportTimeRange},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"viewable",{get:function(){return this._viewableTimeRange},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selection",{get:function(){return this._currentSelection},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"scrollbar",{get:function(){return this._scrollbar},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"commands",{get:function(){return this._commands},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this._scrollbar.onScroll=null;this._scrollbar.dispose();this._viewEventManager.selectionChanged.removeEventListener(this._onSelectionChangedBoundFunction);this._viewportStateChangedEvent.dispose()},i.prototype.resize=function(n){this._scrollbar.resize(n)},i.prototype.requestViewportChange=function(n){var i,r,u;return this._isSelecting?!1:(i=this._viewableTimeRange.contains(n.currentTimespan.begin)&&this._viewableTimeRange.contains(n.currentTimespan.end),r=!n.selectionTimespan||this._viewableTimeRange.contains(n.selectionTimespan.begin)&&this._viewableTimeRange.contains(n.selectionTimespan.end),!i||!r)?(t.Debug.Assert.isTrue(i,"Invalid viewport specified"),t.Debug.Assert.isTrue(r,"Invalid selection specified"),!1):(u=!this.isSameSelection(n.selectionTimespan),!u&&this._viewportTimeRange.equals(n.currentTimespan))?!1:(this._viewportTimeRange=n.currentTimespan,u&&(this._currentSelection=n.selectionTimespan,this._viewEventManager.selectionChanged.raiseEvent({position:this._currentSelection,isIntermittent:!1})),this.fireViewportStateChanged(!1),!0)},i.prototype.canZoomTo=function(){return typeof this._currentSelection!="undefined"&&this._currentSelection!==null&&!this._viewportTimeRange.equals(this._currentSelection)&&!this._viewableTimeRange.equals(this._currentSelection)&&!i.MinimumZoomTimeInMs.greater(this._currentSelection.elapsed)},i.prototype.zoomToSelection=function(){this.canZoomTo()&&(this._telemetry.zoomIn(),n.Plugin.VS.Internal.CodeMarkers.fire(25225),this._viewportTimeRange=this._currentSelection,this._scrollbar.update(this._viewableTimeRange,this._viewportTimeRange),this.fireViewportStateChanged(),n.Plugin.VS.Internal.CodeMarkers.fire(25226))},i.prototype.canResetZoom=function(){return!this._viewableTimeRange.equals(this._viewportTimeRange)},i.prototype.resetZoom=function(){this.canResetZoom()&&(this._telemetry.resetZoom(),n.Plugin.VS.Internal.CodeMarkers.fire(25237),this._viewportTimeRange=this._viewableTimeRange,this._scrollbar.update(this._viewableTimeRange,this._viewportTimeRange),this.fireViewportStateChanged(),n.Plugin.VS.Internal.CodeMarkers.fire(25238))},i.prototype.canClearSelection=function(){return typeof this._currentSelection!="undefined"&&this._currentSelection!==null&&!this._currentSelection.equals(this._viewableTimeRange)},i.prototype.clearSelection=function(){this.canClearSelection()&&(this._telemetry.clearSelection(),this._viewEventManager.selectionChanged.raiseEvent({position:this._viewableTimeRange,isIntermittent:!1}))},i.prototype.onScroll=function(n){if(n.totalLength){var i=t.BigNumber.addNumber(this._viewableTimeRange.begin,parseInt(this._viewableTimeRange.elapsed.value)*n.position/n.totalLength),r=t.BigNumber.add(i,this._viewportTimeRange.elapsed);this._viewportTimeRange=new t.JsonTimespan(i,r);this.fireViewportStateChanged()}},i.prototype.onSelectionChanged=function(i){n.Plugin.VS.Internal.CodeMarkers.fire(25233);this._isSelecting=i.isIntermittent;i.position!==null&&typeof i.position!="undefined"&&i.position.end.greater(this._viewableTimeRange.end)?this._viewEventManager.selectionChanged.raiseEvent({position:new t.JsonTimespan(i.position.begin,this._viewableTimeRange.end),isIntermittent:i.isIntermittent}):this.isSameSelection(i.position)||(this._currentSelection=i.position,this.fireViewportStateChanged(this._isSelecting));n.Plugin.VS.Internal.CodeMarkers.fire(25234)},i.prototype.fireViewportStateChanged=function(n){typeof n=="undefined"&&(n=!1);this._viewportStateChangedEvent.invokeEvent({currentTimespan:this._viewportTimeRange,selectionTimespan:this._currentSelection,isIntermittent:n})},i.prototype.isSameSelection=function(n){return!this._currentSelection&&!n||this._currentSelection&&n&&this._currentSelection.equals(n)},i.MinimumZoomTimeInMs=t.BigNumber.convertFromNumber(1e4),i}();t.ViewportController=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function t(t){t&&t.forEach(function(n){n.iconEnabled=null;n.iconDisabled=null});this._contextMenu=n.Plugin.ContextMenu.create(t,null,null,null,function(){})}return t.prototype.onMouseDown=function(n){if(this._contextMenu&&n.which===3){var t=n.clientX,i=n.clientY;return this._contextMenu.show(t,i),!1}return!0},t}();t.ContextMenu=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function n(n){this._decoratedControl=n}return Object.defineProperty(n.prototype,"container",{get:function(){return this._decoratedControl.container},enumerable:!0,configurable:!0}),n.prototype.onDataUpdate=function(n){if(this._decoratedControl.onDataUpdate)this._decoratedControl.onDataUpdate(n)},n.prototype.resize=function(n){this._decoratedControl.resize&&this._decoratedControl.resize(n)},n.prototype.onViewportChanged=function(n){if(this._decoratedControl.onViewportChanged)this._decoratedControl.onViewportChanged(n)},n.prototype.dispose=function(){this._decoratedControl.dispose&&this._decoratedControl.dispose()},n}();n.ControlDecorator=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(i,r){var c=this,e,o,s,f,h,u;this._container=document.createElement("div");this._container.id="informationContainer";this._container.classList.add("main-information-container");e=document.createElement("div");e.classList.add("information-icon");e.appendChild(t.Utilities.getSVGPlaceHolder("vs-image-information-icon"));n.Plugin.Theme.processInjectedSvg(e);this._container.appendChild(e);o=document.createElement("div");o.classList.add("information-message");o.innerHTML=i;this._container.appendChild(o);r&&(s=document.createElement("div"),s.classList.add("information-link"),this._container.appendChild(s),f=document.createElement("a"),f.href=r||"",f.target="blank",f.text=n.Plugin.Resources.getString("/DiagnosticsHubResources/InformationLink"),f.setAttribute("role","link"),f.setAttribute("aria-label",n.Plugin.Resources.getString("/DiagnosticsHubResources/InformationLink")),s.appendChild(f));h=document.createElement("div");h.classList.add("information-close-div");this._container.appendChild(h);u=document.createElement("div");u.classList.add("information-close");u.innerHTML="r";u.tabIndex=0;u.setAttribute("role","button");u.setAttribute("aria-label",n.Plugin.Resources.getString("/DiagnosticsHubResources/InformationClose"));u.setAttribute("data-plugin-vs-tooltip",JSON.stringify({content:n.Plugin.Resources.getString("/DiagnosticsHubResources/InformationClose"),delay:0}));u.onkeypress=function(n){13===n.keyCode&&c.collapse()};u.onclick=this.collapse.bind(this);h.appendChild(u)}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),i.prototype.collapse=function(){this._container.classList.add("main-information-container-hidden");this.onClose&&this.onClose()},i}();t.InformationBarControl=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(t,i){var r=this,u;(this._localizedUnits=[],u=n.VisualStudio.DiagnosticsHub.getLogger(),t)&&(t.forEach(function(n){i&&i[n.Unit]?r._localizedUnits.push({Decimals:n.Decimals,Divider:n.Divider,LowerBound:n.LowerBound,Unit:i[n.Unit]}):(r._localizedUnits.push({Decimals:n.Decimals,Divider:n.Divider,LowerBound:n.LowerBound,Unit:n.Unit}),u.error("Missing resource string for: "+n.Unit))}),t.sort(function(n,t){return n.LowerBound<t.LowerBound?-1:n.LowerBound>t.LowerBound?1:0}))}return i.prototype.formatNumber=function(i,r){var u=this.scaleValue(i),e=typeof r=="number"?r:u.decimals,f=t.Utilities.formatNumber(u.value,e);return u.unit?n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/FormattedNumberWithUnits",f,u.unit):f},i.prototype.scaleValue=function(n){for(var t,u,i=n,f,e=0,r=0;r<this._localizedUnits.length;++r)if(t=this._localizedUnits[r],t.LowerBound<=n)i=n,e=t.Decimals,t.Divider&&(i=i/t.Divider),u=Math.pow(10,t.Decimals),i=Math.round(i*u)/u,f=t.Unit;else break;return{value:i,unit:f,decimals:e}},i}();t.LocalizedUnitConverter=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function n(){}return n.registerClass=function(n){var i;if(n){var r=window||this,u=n.split("."),t=null;for(i=0;i<u.length;i++)if(t=r[u[i]],t)r=t;else throw new Error("Invalid class name.");this.RegisteredClasses[n]=t}else throw new Error("Invalid class name.")},n.registerFunction=function(n){for(var r=window||this,u=n.split("."),t=null,i=0;i<u.length;i++)if(t=r[u[i]],t)r=t;else throw new Error("Invalid function name.");this.RegisteredFunctions[n]=t},n.getRegisteredClass=function(n){return this.RegisteredClasses[n]},n.getRegisteredFunction=function(n){return this.RegisteredFunctions[n]},n.RegisteredClasses={},n.RegisteredFunctions={},n}();n.RegisterNamespace=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function t(){this._logger=n.VisualStudio.DiagnosticsHub.getLogger();this._container=document.createElement("div");this._container.classList.add("scrollbar");this._onScrollBoundFunction=this.onScrollEvent.bind(this);this._container.onscroll=this._onScrollBoundFunction;this._scrollbarCalculator=document.createElement("div");this._scrollbarCalculator.classList.add("scrollbar-width-calculator");this._scrollbarCalculator.id="scrollbarWidthCalculator";this._container.appendChild(this._scrollbarCalculator);this._scrollbarCalculator.style.left=this._container.clientWidth-2+"px";this._container.scrollLeft=this._container.scrollWidth-this._container.offsetWidth}return Object.defineProperty(t.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this._container.onscroll=null;this._animationFrameHandle&&window.cancelAnimationFrame(this._animationFrameHandle)},t.prototype.resize=function(){var n=this;this._animationFrameHandle||(this._animationFrameHandle=window.requestAnimationFrame(function(){return n.onScrollAnimation()}))},t.prototype.update=function(n,t){var e=this,i=parseInt(t.elapsed.value),r=parseInt(t.begin.value),u=parseInt(n.elapsed.value),f=parseInt(n.begin.value);isNaN(i)||isNaN(r)||isNaN(u)||isNaN(f)||i===0||(this._startPages=(r-f)/i,this._totalPages=u/i,this._animationFrameHandle||(this._animationFrameHandle=window.requestAnimationFrame(function(){return e.onScrollAnimation()})))},t.prototype.scrollTo=function(n){var t=this;this._startPages=n*this._totalPages/100;this._animationFrameHandle||window.cancelAnimationFrame(this._animationFrameHandle);this._animationFrameHandle=window.requestAnimationFrame(function(){return t.onScrollAnimation(!1)})},t.prototype.onScrollAnimation=function(n){typeof n=="undefined"&&(n=!0);var i=this._container.clientWidth,r=this._totalPages*i,t=this._totalPages<=1?0:this._startPages*i;this._scrollbarCalculator.style.left=r-2+"px";this._container.scrollLeft!==t&&(n?(this._container.onscroll=null,this._container.scrollLeft=t,this._container.onscroll=this._onScrollBoundFunction):this._container.scrollLeft=t);this._animationFrameHandle=null},t.prototype.onScrollEvent=function(){if(this._startPages=this._container.scrollLeft/this._container.clientWidth,this.onScroll)this.onScroll({position:this._container.scrollLeft,visibleLength:this._container.clientWidth,totalLength:this._container.scrollWidth})},t}();t.Scrollbar=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(i){var r,u;typeof i=="undefined"&&(i=6e7);r=this;this._viewportStateChangedEvent=new t.AggregatedEvent;this._isZoomed=!1;this._isScrolling=!1;this._isSelecting=!1;this._isUserInteracting=!1;this._commands=[];u=new t.JsonTimespan(t.BigNumber.zero,t.BigNumber.zero);this._currentSelection=null;this._viewportTimeRange=u;this._viewableTimeRange=u;this._rolledViewableTimeRange=u;this._timeInNsPerPixel=i;this._maxViewableWidthInNs=t.BigNumber.convertFromNumber(100*this._timeInNsPerPixel);this._scrollbar=new t.Scrollbar;this._scrollbar.onScroll=this.onScroll.bind(this);this._scrollbar.update(this._viewableTimeRange,this._viewportTimeRange);this._onSelectionChangedBoundFunction=this.onSelectionChanged.bind(this);this._onChangeViewportBoundFunction=this.onChangeViewport.bind(this);this._telemetry=new t.Telemetry.ViewportController;this._viewEventManager=n.VisualStudio.DiagnosticsHub.getViewEventManager();this._viewEventManager.selectionChanged.addEventListener(this._onSelectionChangedBoundFunction);this._viewEventManager.changeViewport.addEventListener(this._onChangeViewportBoundFunction);this._commands.push({id:t.CommandIds.ZoomIn,callback:this.zoomIn.bind(this),label:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomInButton"),ariaLabel:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomInAriaLabel"),tooltip:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomInButton"),type:1,iconEnabled:"vs-image-toolbar-chartzoom-in",iconDisabled:"vs-image-toolbar-chartzoom-in-disabled",accessKey:null,hidden:function(){return!1},disabled:function(){return!r.canZoomIn()},checked:function(){return!1},cssClass:null,submenu:null,displayOnToolbar:!0,displayOnContextMenu:!0});this._commands.push({id:t.CommandIds.ZoomToSelection,callback:this.zoomToSelection.bind(this),label:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomToSelectionButton"),ariaLabel:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomToSelectionAriaLabel"),tooltip:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomToSelectionButton"),type:1,iconEnabled:"vs-image-toolbar-chartzoom-in",iconDisabled:"vs-image-toolbar-chartzoom-in-disabled",accessKey:null,hidden:function(){return!1},disabled:function(){return!r.canZoomToSelection()},checked:function(){return!1},cssClass:null,submenu:null,displayOnToolbar:!1,displayOnContextMenu:!0});this._commands.push({id:t.CommandIds.ZoomOut,callback:this.zoomOut.bind(this),label:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomOutButton"),ariaLabel:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomOutAriaLabel"),tooltip:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomOutButton"),type:1,iconEnabled:"vs-image-toolbar-chartzoom-reset",iconDisabled:"vs-image-toolbar-chartzoom-reset-disabled",accessKey:null,hidden:function(){return!1},disabled:function(){return!r.canZoomOut()},checked:function(){return!1},cssClass:null,submenu:null,displayOnToolbar:!0,displayOnContextMenu:!0});this._commands.push({id:t.CommandIds.ResetView,callback:this.resetView.bind(this),label:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarResetViewButton"),ariaLabel:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarResetViewAriaLabel"),tooltip:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarResetViewButton"),type:1,iconEnabled:"vs-image-toolbar-reset-view",iconDisabled:"vs-image-toolbar-reset-view-disabled",accessKey:null,hidden:function(){return!1},disabled:function(){return!r.canResetView()},checked:function(){return!1},cssClass:null,submenu:null,displayOnToolbar:!0,displayOnContextMenu:!0});this._viewportStateChangedEvent.addEventListener(function(){r._commands.forEach(function(n){n.onDisabledChanged&&n.onDisabledChanged()})})}return Object.defineProperty(i.prototype,"container",{get:function(){return this._scrollbar.container},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"viewportStateChanged",{get:function(){return this._viewportStateChangedEvent},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"visible",{get:function(){return this._viewportTimeRange},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"viewable",{get:function(){return this._viewableTimeRange},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selection",{get:function(){return this._currentSelection},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"scrollbar",{get:function(){return this._scrollbar},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"commands",{get:function(){return this._commands},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this._scrollbar.onScroll=null;this._scrollbar.dispose();this._viewEventManager.selectionChanged.removeEventListener(this._onSelectionChangedBoundFunction);this._viewEventManager.changeViewport.removeEventListener(this._onChangeViewportBoundFunction);this._viewportStateChangedEvent.dispose()},i.prototype.resize=function(n){this._scrollbar.resize(n);var i=Math.max(this.container.clientWidth,100);this._maxViewableWidthInNs=t.BigNumber.convertFromNumber(i*this._timeInNsPerPixel);this.rollTimeRange(!0)},i.prototype.onDataUpdate=function(n){t.BigNumber.subtract(n,i.DropPointLimitInNs).greater(this._viewableTimeRange.begin)?(this._viewableTimeRange=new t.JsonTimespan(t.BigNumber.subtract(n,i.OneHourInNs),n),this.rollTimeRange(!0)):(this._viewableTimeRange=new t.JsonTimespan(this._viewableTimeRange.begin,n),this.rollTimeRange())},i.prototype.canZoomIn=function(){var n=t.BigNumber.divideNumber(this._viewportTimeRange.elapsed,2);return!i.MinimumZoomTimeInNs.greater(n)},i.prototype.zoomIn=function(){var n,r,i,u;this.canZoomIn()&&(this._telemetry.zoomIn(),i=t.BigNumber.divideNumber(this._viewportTimeRange.elapsed,4),this._currentSelection?(u=t.BigNumber.add(this._currentSelection.begin,t.BigNumber.divideNumber(this._currentSelection.elapsed,2)),n=t.BigNumber.subtract(u,i),r=t.BigNumber.add(u,i)):this._viewableTimeRange.elapsed.greater(this._viewportTimeRange.elapsed)?(n=t.BigNumber.add(this._viewportTimeRange.begin,i),r=t.BigNumber.subtract(this._viewportTimeRange.end,i)):(n=this._viewableTimeRange.begin,r=t.BigNumber.add(n,t.BigNumber.divideNumber(this._viewportTimeRange.elapsed,2))),this._viewportTimeRange=new t.JsonTimespan(n,r),this._isZoomed=!0,this._isUserInteracting=!0,this._scrollbar.update(this._rolledViewableTimeRange,this._viewportTimeRange),this.fireViewportStateChanged())},i.prototype.canZoomToSelection=function(){return this._currentSelection&&!this._currentSelection.equals(this._viewportTimeRange)&&!i.MinimumZoomTimeInNs.greater(this._currentSelection.elapsed)},i.prototype.zoomToSelection=function(){this.canZoomToSelection()&&(this._telemetry.zoomIn(),n.Plugin.VS.Internal.CodeMarkers.fire(25225),this._viewportTimeRange=this._currentSelection,this._isZoomed=!0,this._scrollbar.update(this._rolledViewableTimeRange,this._viewportTimeRange),this.fireViewportStateChanged(),n.Plugin.VS.Internal.CodeMarkers.fire(25226))},i.prototype.canZoomOut=function(){return i.OneHourInNs.greater(this._viewportTimeRange.elapsed)},i.prototype.zoomOut=function(){var u,r,f;this.canZoomOut()&&(this._telemetry.zoomOut(),n.Plugin.VS.Internal.CodeMarkers.fire(25255),u=t.BigNumber.divideNumber(this._viewportTimeRange.elapsed,2),r=t.BigNumber.subtract(this._viewportTimeRange.begin,u),r=r.greater(this._viewableTimeRange.begin)?r:this._viewableTimeRange.begin,f=t.BigNumber.min(i.OneHourInNs,t.BigNumber.multiplyNumber(u,4)),this._viewportTimeRange=new t.JsonTimespan(r,t.BigNumber.add(r,f)),this._viewportTimeRange.end.greater(this._rolledViewableTimeRange.end)&&(this._rolledViewableTimeRange=new t.JsonTimespan(this._rolledViewableTimeRange.begin,this._viewportTimeRange.end)),this._isZoomed=!0,this._scrollbar.update(this._rolledViewableTimeRange,this._viewportTimeRange),this.fireViewportStateChanged(),n.Plugin.VS.Internal.CodeMarkers.fire(25256))},i.prototype.canResetView=function(){return typeof this._currentSelection!="undefined"&&this._currentSelection!==null||this._isZoomed||this._isScrolling},i.prototype.resetView=function(){this.canResetView()&&(this._telemetry.clearSelection(),this._isZoomed=!1,this._isScrolling=!1,this._isUserInteracting=!1,this.rollTimeRange(!0),this._viewEventManager.selectionChanged.raiseEvent({position:null,isIntermittent:!1}))},i.prototype.requestViewportChange=function(n){var u,f,e,o,s;if(this._isSelecting)return!1;if(u=n.currentTimespan.begin.equals(t.BigNumber.zero)&&n.currentTimespan.end.equals(t.BigNumber.zero)||this._rolledViewableTimeRange.contains(n.currentTimespan.begin)&&this._rolledViewableTimeRange.contains(n.currentTimespan.end),f=!n.selectionTimespan||this._viewableTimeRange.contains(n.selectionTimespan.begin)&&this._viewableTimeRange.contains(n.selectionTimespan.end),!u||!f)return t.Debug.Assert.isTrue(u,"Invalid viewport specified"),t.Debug.Assert.isTrue(f,"Invalid selection specified"),!1;var r=n.currentTimespan,c=new t.JsonTimespan(t.BigNumber.zero,t.BigNumber.zero),h=n.currentTimespan.equals(c);if(h&&(r=new t.JsonTimespan(t.BigNumber.subtract(this._rolledViewableTimeRange.end,t.BigNumber.min(this._viewportTimeRange.elapsed,this._rolledViewableTimeRange.end)),this._rolledViewableTimeRange.end)),r.begin.greaterOrEqual(this._rolledViewableTimeRange.end)||this._rolledViewableTimeRange.begin.greaterOrEqual(r.end))return!1;if(h||r.end.greater(this._viewableTimeRange.end)&&this._rolledViewableTimeRange.end.greater(r.end)?(this._rolledViewableTimeRange=new t.JsonTimespan(this._rolledViewableTimeRange.begin,r.end),this._isScrolling=!1,this._isUserInteracting=!1):this._isUserInteracting=!0,r=new t.JsonTimespan(t.BigNumber.max(r.begin,this._rolledViewableTimeRange.begin),t.BigNumber.min(r.end,this._rolledViewableTimeRange.end)),i.MinimumZoomTimeInNs.greater(r.elapsed))if(e=t.BigNumber.subtract(r.end,i.MinimumZoomTimeInNs),e.greaterOrEqual(this._rolledViewableTimeRange.begin))r=new t.JsonTimespan(e,r.end);else if(o=t.BigNumber.add(r.begin,i.MinimumZoomTimeInNs),this._rolledViewableTimeRange.end.greaterOrEqual(o))r=new t.JsonTimespan(r.begin,o);else return!1;return(s=!this.isSameSelection(n.selectionTimespan),!s&&this._viewportTimeRange.equals(r))?!1:(this._isZoomed=!0,this._viewportTimeRange=r,this._scrollbar.update(this._rolledViewableTimeRange,this._viewportTimeRange),s&&(this._currentSelection=n.selectionTimespan,this._viewEventManager.selectionChanged.raiseEvent({position:this._currentSelection,isIntermittent:!1})),this.fireViewportStateChanged(!1),!0)},i.prototype.rollTimeRange=function(n){var r,i,f,e,u;if(typeof n=="undefined"&&(n=!1),r=!1,this._viewableTimeRange.end.greater(this._rolledViewableTimeRange.end)||n){for(i=n?new t.JsonTimespan(this._viewableTimeRange.begin,t.BigNumber.add(this._viewableTimeRange.begin,this._maxViewableWidthInNs)):this._rolledViewableTimeRange;this._viewableTimeRange.end.greater(i.end);)f=t.BigNumber.divideNumber(this._maxViewableWidthInNs,3),i=new t.JsonTimespan(i.begin,t.BigNumber.add(i.end,f));r=!this._rolledViewableTimeRange.equals(i);this._rolledViewableTimeRange=i}this._isSelecting||this._currentSelection||this._isUserInteracting||this._isScrolling||(e=n?this._maxViewableWidthInNs:t.BigNumber.max(this._maxViewableWidthInNs,this._viewportTimeRange.elapsed),u=new t.JsonTimespan(t.BigNumber.subtract(this._rolledViewableTimeRange.end,e),this._rolledViewableTimeRange.end),this._viewportTimeRange.equals(u)||(r=!0,this._viewportTimeRange=u,this.fireViewportStateChanged()));r&&this._scrollbar.update(this._rolledViewableTimeRange,this._viewportTimeRange)},i.prototype.onChangeViewport=function(n){var o=new t.JsonTimespan(t.BigNumber.zero,t.BigNumber.zero),e=n.equals(o),r,u,f;if(e&&(n=new t.JsonTimespan(t.BigNumber.subtract(this._rolledViewableTimeRange.end,t.BigNumber.min(this._viewportTimeRange.elapsed,this._rolledViewableTimeRange.end)),this._rolledViewableTimeRange.end)),n.begin.greaterOrEqual(this._rolledViewableTimeRange.end)||this._rolledViewableTimeRange.begin.greaterOrEqual(n.end))return!1;if(e||n.end.greater(this._viewableTimeRange.end)&&this._rolledViewableTimeRange.end.greater(n.end)?(this._rolledViewableTimeRange=new t.JsonTimespan(this._rolledViewableTimeRange.begin,n.end),this._isScrolling=!1,this._isUserInteracting=!1):this._isUserInteracting=!0,r=new t.JsonTimespan(t.BigNumber.max(n.begin,this._rolledViewableTimeRange.begin),t.BigNumber.min(n.end,this._rolledViewableTimeRange.end)),i.MinimumZoomTimeInNs.greater(r.elapsed))if(u=t.BigNumber.subtract(r.end,i.MinimumZoomTimeInNs),u.greaterOrEqual(this._rolledViewableTimeRange.begin))r=new t.JsonTimespan(u,r.end);else if(f=t.BigNumber.add(r.begin,i.MinimumZoomTimeInNs),this._rolledViewableTimeRange.end.greaterOrEqual(f))r=new t.JsonTimespan(r.begin,f);else return!1;return this._viewportTimeRange.equals(r)?!1:(this._isZoomed=!0,this._viewportTimeRange=r,this._scrollbar.update(this._rolledViewableTimeRange,this._viewportTimeRange),this.fireViewportStateChanged(),!0)},i.prototype.onSelectionChanged=function(i){if(n.Plugin.VS.Internal.CodeMarkers.fire(25233),this._isSelecting=i.isIntermittent,i.position!==null&&typeof i.position!="undefined"&&i.position.end.greater(this._viewableTimeRange.end)){var r=t.BigNumber.min(i.position.begin,this._viewableTimeRange.end);this._viewEventManager.selectionChanged.raiseEvent({position:new t.JsonTimespan(r,this._viewableTimeRange.end),isIntermittent:this._isSelecting})}else this.isSameSelection(i.position)||(this._currentSelection=i.position,this.fireViewportStateChanged(this._isSelecting));n.Plugin.VS.Internal.CodeMarkers.fire(25234)},i.prototype.onScroll=function(n){if(n.totalLength){Math.abs(n.position+n.visibleLength-n.totalLength)>1?this._isScrolling=!0:(this._isScrolling=!1,this._isUserInteracting=!1);var i=t.BigNumber.addNumber(this._rolledViewableTimeRange.begin,parseInt(this._rolledViewableTimeRange.elapsed.value)*n.position/n.totalLength),r=t.BigNumber.add(i,this._viewportTimeRange.elapsed);this._viewportTimeRange=new t.JsonTimespan(i,r);this.fireViewportStateChanged()}},i.prototype.fireViewportStateChanged=function(n){typeof n=="undefined"&&(n=!1);this._viewportStateChangedEvent.invokeEvent({currentTimespan:this._viewportTimeRange,selectionTimespan:this._currentSelection,isIntermittent:n})},i.prototype.isSameSelection=function(n){return!this._currentSelection&&!n||this._currentSelection&&n&&this._currentSelection.equals(n)},i.MinimumZoomTimeInNs=t.BigNumber.convertFromNumber(1e4),i.OneHourInNs=t.BigNumber.convertFromNumber(36e11),i.DropPointLimitInNs=t.BigNumber.convertFromNumber(366e10),i}();t.RollingViewportController=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={}));__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){(function(t){(function(t){"use strict";var o=function(){function n(){}return Object.defineProperty(n,"Line",{get:function(){return"Line"},enumerable:!0,configurable:!0}),Object.defineProperty(n,"Mark",{get:function(){return"Mark"},enumerable:!0,configurable:!0}),n}(),r,s,u,h,c,l,a,v,y,p,i,f,e;t.SeriesType=o;r=function(){function n(){}return Object.defineProperty(n,"Graph",{get:function(){return"Graph"},enumerable:!0,configurable:!0}),Object.defineProperty(n,"Ruler",{get:function(){return"Ruler"},enumerable:!0,configurable:!0}),n}();t.ViewType=r,function(n){n[n.None=0]="None";n[n.Live=1]="Live";n[n.PostMortem=2]="PostMortem"}(t.GraphBehaviourType||(t.GraphBehaviourType={}));s=t.GraphBehaviourType;u=function(){function n(){}return Object.defineProperty(n,"ScaleInfoChanged",{get:function(){return"scaleInfoChanged"},enumerable:!0,configurable:!0}),n}();t.GraphEvents=u,function(n){n[n.Left=0]="Left";n[n.Right=1]="Right"}(t.ScaleType||(t.ScaleType={}));h=t.ScaleType,function(n){n[n.LessThanOrEqual=0]="LessThanOrEqual";n[n.Nearest=1]="Nearest";n[n.GreaterThanOrEqual=2]="GreaterThanOrEqual"}(t.PointToFind||(t.PointToFind={}));c=t.PointToFind,function(n){n[n.Unknown=0]="Unknown";n[n.Standard=1]="Standard";n[n.Custom=2]="Custom";n[n.FullCustom=3]="FullCustom"}(t.SwimlaneType||(t.SwimlaneType={}));l=t.SwimlaneType,function(n){n[n.LifeCycleEvent=1]="LifeCycleEvent";n[n.UserMark=2]="UserMark";n[n.Custom=3]="Custom"}(t.MarkType||(t.MarkType={}));a=t.MarkType,function(n){n[n.Big=0]="Big";n[n.Medium=1]="Medium";n[n.Small=2]="Small"}(t.TickMarkType||(t.TickMarkType={}));v=t.TickMarkType,function(n){n[n.italicizedAbbreviations=0]="italicizedAbbreviations";n[n.fullName=1]="fullName"}(t.UnitFormat||(t.UnitFormat={}));y=t.UnitFormat,function(n){n[n.perfDiagnosticsHub_ZoomSelectionBegin=25225]="perfDiagnosticsHub_ZoomSelectionBegin";n[n.perfDiagnosticsHub_ZoomSelectionEnd=25226]="perfDiagnosticsHub_ZoomSelectionEnd";n[n.perfDiagnosticsHub_SwimlaneFullRenderBegin=25227]="perfDiagnosticsHub_SwimlaneFullRenderBegin";n[n.perfDiagnosticsHub_SwimlaneFullRenderEnd=25228]="perfDiagnosticsHub_SwimlaneFullRenderEnd";n[n.perfDiagnosticsHub_GraphContentFullRenderBegin=25229]="perfDiagnosticsHub_GraphContentFullRenderBegin";n[n.perfDiagnosticsHub_GraphContentFullRenderEnd=25230]="perfDiagnosticsHub_GraphContentFullRenderEnd";n[n.perfDiagnosticsHub_GraphContentPartialRenderBegin=25231]="perfDiagnosticsHub_GraphContentPartialRenderBegin";n[n.perfDiagnosticsHub_GraphContentPartialRenderEnd=25232]="perfDiagnosticsHub_GraphContentPartialRenderEnd";n[n.perfDiagnosticsHub_OnSelectionChangedBegin=25233]="perfDiagnosticsHub_OnSelectionChangedBegin";n[n.perfDiagnosticsHub_OnSelectionChangedEnd=25234]="perfDiagnosticsHub_OnSelectionChangedEnd";n[n.perfDiagnosticsHub_OnDataUpdateBegin=25235]="perfDiagnosticsHub_OnDataUpdateBegin";n[n.perfDiagnosticsHub_OnDataUpdateEnd=25236]="perfDiagnosticsHub_OnDataUpdateEnd";n[n.perfDiagnosticsHub_ResetZoomBegin=25237]="perfDiagnosticsHub_ResetZoomBegin";n[n.perfDiagnosticsHub_ResetZoomEnd=25238]="perfDiagnosticsHub_ResetZoomEnd";n[n.perfDiagnosticsHub_ZoomOutBegin=25255]="perfDiagnosticsHub_ZoomOutBegin";n[n.perfDiagnosticsHub_ZoomOutEnd=25256]="perfDiagnosticsHub_ZoomOutEnd"}(t.ControlsCodeMarkers||(t.ControlsCodeMarkers={}));p=t.ControlsCodeMarkers;i=function(){function n(n,t,i,r){this.left=n;this.top=t;this.right=i;this.bottom=r}return n}();t.Padding=i;f=function(t){function i(i,r,u,f){if(t.call(this,i,r,u,f),this.left>this.right||this.top>this.bottom)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1000"))}return __extends(i,t),Object.defineProperty(i.prototype,"width",{get:function(){return this.right-this.left},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"height",{get:function(){return this.bottom-this.top},enumerable:!0,configurable:!0}),i}(i);t.RectangleDimension=f;e=function(){function n(n,t){this.min=n;this.max=t}return Object.defineProperty(n.prototype,"range",{get:function(){return(this.min||this.min===0)&&(this.max||this.max===0)?this.max-this.min:null},enumerable:!0,configurable:!0}),n}();t.MinMaxNumber=e})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function t(){if(this._graphConfigurationMarshaler=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.SwimLanesViewMarshaler",{},!0),!this._graphConfigurationMarshaler)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1007"))}return t.prototype.getConfigurations=function(n){this._graphConfigurationMarshaler._call("getConfigurations").done(n)},t.prototype.dataUpdate=function(n){this._graphConfigurationMarshaler.addEventListener("dataUpdate",n)},t}();t.DiagnosticsHubDataManager=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){(function(t){var i=function(){function t(){}return t.loadCss=function(t){if(typeof t!="string"&&t.lastIndexOf(".css")!==t.length-4)throw new Error("file name is null or undefined.");var i=t.substring(t.lastIndexOf("\\")+1,t.lastIndexOf(".css")),r=document.getElementById(i);if(!r)return n.Plugin.Theme.processCSSFileForThemeing(t).then(function(n){var i=document.createElement("style");i.setAttribute("data-plugin-theme","true");i.setAttribute("data-plugin-theme-href",t);i.type="text/css";i.innerHTML=n;document.getElementsByTagName("head")[0].appendChild(i)})},t.loadDependency=function(i){var r=t.toFileUri(i.url).toUpperCase(),f,u;return t.isScriptAppended(r)?(f=n.Plugin.Promise.wrap(null),t.LoadingDependenciesMap[r]&&(f=t.LoadingDependenciesMap[r]),f.then(function(){return t.registerDependency(i)})):(u=document.createElement("script"),u.type="text/javascript",u.src=i.url,t.LoadingDependenciesMap[r]=new n.Plugin.Promise(function(n,f){u.onload=function(){delete t.LoadingDependenciesMap[r];t.registerDependency(i);n(null)};u.onerror=function(){if(f)f(null);else throw new Error("Unable to load resource: "+i.url)}}),document.getElementsByTagName("head")[0].appendChild(u),t.LoadingDependenciesMap[r])},t.registerDependency=function(t){t.objType&&n.VisualStudio.DiagnosticsHub.RegisterNamespace.registerClass(t.objType);t.functionName&&n.VisualStudio.DiagnosticsHub.RegisterNamespace.registerFunction(t.functionName)},t.isScriptAppended=function(n){for(var i,t=0;t<document.scripts.length;++t)if(i=document.scripts[t],i.src&&decodeURIComponent(i.src).toUpperCase()===n.toUpperCase())return!0;return!1},t.toFileUri=function(n){var i=n.split("\\").join("/");return i.substr(0,t.FileUriPrefix.length).toUpperCase()!==t.FileUriPrefix.toUpperCase()&&(i=t.FileUriPrefix+i),i},t.LoadingDependenciesMap={},t.FileUriPrefix="file:///",t}();t.DependencyManager=i})(t.Common||(t.Common={}));var i=t.Common})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){(function(n){"use strict";var t,i;(function(n){n[n.Tab=9]="Tab";n[n.Enter=13]="Enter";n[n.Shift=16]="Shift";n[n.Escape=27]="Escape";n[n.Space=32]="Space";n[n.PageUp=33]="PageUp";n[n.PageDown=34]="PageDown";n[n.End=35]="End";n[n.Home=36]="Home";n[n.ArrowLeft=37]="ArrowLeft";n[n.ArrowFirst=37]="ArrowFirst";n[n.ArrowUp=38]="ArrowUp";n[n.ArrowRight=39]="ArrowRight";n[n.ArrowDown=40]="ArrowDown";n[n.ArrowLast=40]="ArrowLast";n[n.Delete=46]="Delete";n[n.B=66]="B";n[n.C=67]="C";n[n.Plus=107]="Plus";n[n.Minus=109]="Minus";n[n.F1=112]="F1";n[n.F2=113]="F2";n[n.F3=114]="F3";n[n.F4=115]="F4";n[n.F5=116]="F5";n[n.F6=117]="F6";n[n.F7=118]="F7";n[n.F8=119]="F8";n[n.F9=120]="F9";n[n.F10=121]="F10";n[n.F11=122]="F11";n[n.F12=123]="F12"})(n.KeyCodes||(n.KeyCodes={}));t=n.KeyCodes,function(n){n[n.Left=1]="Left";n[n.Right=3]="Right";n[n.Middle=2]="Middle"}(n.MouseCodes||(n.MouseCodes={}));i=n.MouseCodes})(n.Common||(n.Common={}));var t=n.Common})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(r){var o=this,u,f,e;this._command=r;this._command.disabled=this._command.disabled||function(){return!1};this._container=document.createElement("button");this._container.classList.add(i.ButtonDisabledCss);this._container.classList.add(this._command.cssClass);this._container.disabled=this._command.disabled();this._command.tooltip&&this._container.setAttribute("data-plugin-vs-tooltip",JSON.stringify({content:this._command.tooltip}));this._container.setAttribute("role","button");this._container.setAttribute("aria-label",this._command.ariaLabel||this._command.label);this._command.iconEnabled&&(u=document.createElement("div"),u.classList.add(i.ButtonImageCss),u.classList.add(i.SvgEnabled),u.appendChild(t.Utilities.getSVGPlaceHolder(this._command.iconEnabled)),this._container.appendChild(u),n.Plugin.Theme.processInjectedSvg(u));this._command.iconDisabled&&(f=document.createElement("div"),f.classList.add(i.ButtonImageCss),f.classList.add(i.SvgDisabled),f.appendChild(t.Utilities.getSVGPlaceHolder(this._command.iconDisabled)),this._container.appendChild(f),n.Plugin.Theme.processInjectedSvg(f));e=document.createElement("div");e.innerHTML=this._command.label;e.classList.add(i.ButtonTextCss);e.classList.add(i.ButtonTextDisabledCss);this._container.appendChild(e);this._container.onclick=this.onClick.bind(this);this._container.onkeydown=this.onKeyDown.bind(this);this._command.onDisabledChanged=function(){o.setEnabled(!o._command.disabled())};n.Plugin.Theme.addEventListener("themechanged",function(){o.setEnabled(!o._command.disabled())});this._currentState=this._container.disabled;this.setEnabled(!this._container.disabled)}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),i.prototype.onKeyDown=function(n){this._container.disabled||13!==n.keyCode||this._command.callback()},i.prototype.onClick=function(){this._container.disabled||this._command.callback()},i.prototype.setEnabled=function(n){if(this._currentState!==n){this._currentState=n;this._container.disabled=!n;var t=this._container.getElementsByClassName(i.ButtonTextCss)[0];n?(t.classList.remove(i.ButtonTextDisabledCss),this._container.tabIndex=0,this._container.classList.remove(i.ButtonDisabledCss),this._container.classList.add(i.ButtonCss)):(t.classList.add(i.ButtonTextDisabledCss),this._container.tabIndex=-1,this._container.classList.add(i.ButtonDisabledCss),this._container.classList.remove(i.ButtonCss))}},i.ButtonCss="toolbar-button",i.ButtonDisabledCss="toolbar-button-disabled",i.ButtonImageCss="button-image",i.ButtonTextCss="button-text",i.ButtonTextDisabledCss="button-text-disabled",i.SvgDisabled="svg-disabled",i.SvgEnabled="svg-enabled",i}();t.ToolbarButton=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function n(){this._container=document.createElement("div");this._container.classList.add("toolbar-separator");this._container.innerHTML="&nbsp;"}return Object.defineProperty(n.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),n}();n.ToolbarSeparator=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function t(){var n=this;this._items=[];this._container=document.createElement("div");this._container.classList.add("toolbar-container");this._collapseCallback=function(t){t.matches?n._container.classList.add("limitedSpace"):n._container.classList.remove("limitedSpace")};this.updateCollapsingWidth()}return Object.defineProperty(t.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),t.prototype.addCommand=function(t){t.displayOnToolbar&&this.addToolbarItem(new n.ToolbarButton(t))},t.prototype.addCommandGroup=function(n){var t=this;this._items.length>0&&n.length>0&&this.addSeparator();n.forEach(function(n){t.addCommand(n)})},t.prototype.addToolbarItem=function(n){this._items.push(n);this._container.appendChild(n.container);this.updateCollapsingWidth()},t.prototype.addSeparator=function(){this.addToolbarItem(new n.ToolbarSeparator)},t.prototype.updateCollapsingWidth=function(){this._collapseMediaQuery&&this._collapseMediaQuery.removeListener(this._collapseCallback);var t=60;this._items.forEach(function(n){t+=n.container.offsetWidth});this._collapseMediaQuery=window.matchMedia(n.Utilities.formatString("(max-width: {0}px)",t.toString()));this._collapseMediaQuery.addListener(this._collapseCallback);this._collapseCallback(this._collapseMediaQuery)},t}();n.Toolbar=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(){}return i.findChildById=function(n,t){for(var u=[],i=n,r;i;){if(i.id===t)return i;for(r=0;r<i.children.length;++r)u.push(i.children[r]);i=u.shift()}return null},i.findLessThan=function(n,t,r,u,f){if(typeof u=="undefined"&&(u=0),typeof f=="undefined"&&(f=n.length-1),f===u)return u;if(f-u<=1)return r(n[f],t)?f:u;var e=Math.floor((f+u)/2);return r(t,n[e])?i.findLessThan(n,t,r,u,e):i.findLessThan(n,t,r,e,f)},i.findGreaterThan=function(n,t,r,u,f){if(typeof u=="undefined"&&(u=0),typeof f=="undefined"&&(f=n.length-1),f===u)return f;if(f-u<=1)return r(t,n[u])?u:f;var e=Math.floor((f+u)/2);return r(t,n[e])?i.findGreaterThan(n,t,r,u,e):i.findGreaterThan(n,t,r,e,f)},i.scaleToRange=function(n,t,i,r,u){return i===t?0:(u-r)*(n-t)/(i-t)+r},i.linearInterpolate=function(n,i,r,u,f){if(i.equals(u))return r;var e=parseInt(t.BigNumber.subtract(n,i).value),o=parseInt(t.BigNumber.subtract(u,i).value);return r+(f-r)*e/o},i.convertToPixel=function(n,i,r,u){if(typeof u=="undefined"&&(u=!0),u&&(i.elapsed.equals(t.BigNumber.zero)||r<=0))return 0;var e=1,f;return i.begin.greater(n)?(e=-1,f=parseInt(t.BigNumber.subtract(i.begin,n).value)):f=parseInt(t.BigNumber.subtract(n,i.begin).value),e*(f/parseInt(i.elapsed.value))*r},i.getTimestampAtPixel=function(n,i,r){return i>0?t.BigNumber.addNumber(r.begin,parseInt(r.elapsed.value)/i*n):t.BigNumber.zero},i.translateNumPixelToDuration=function(n,t,i){return t>0?parseInt(i.elapsed.value)/t*n:0},i.formatNumber=function(n,t){var r,u;return r=t===null||typeof t=="undefined"?n.toString():n.toFixed(t),u=i.getNumberFormat(),r.replace(".",u.numberDecimalSeparator)},i.formatString=function(n){for(var i,r=[],t=0;t<arguments.length-1;t++)r[t]=arguments[t+1];return i=n,r.forEach(function(n,t){i=i.replace("{"+t+"}",n)}),i},i.getNumberFormat=function(){var t=n.Plugin.Culture.NumberFormat;return t&&t.length!==0||(t={numberDecimalSeparator:"."}),t},i.containsPoint=function(n,t,i){return n.left<=t&&n.right>=t&&n.top<=i&&n.bottom>=i},i.getSVGPlaceHolder=function(n){var t=document.createElement("div");return t.setAttribute("data-plugin-svg",n),t},i.setCapture=function(n){if(n)try{if(n.setCapture){n.setCapture(!0);return}if(n.msSetPointerCapture){n.msSetPointerCapture(i.MousePointerId);return}if(n.setPointerCapture){n.setPointerCapture(i.MousePointerId);return}}catch(r){t.getLogger().error(r.message)}},i.releaseCapture=function(n){if(n)try{if(n.releaseCapture){n.releaseCapture();return}if(n.msReleasePointerCapture){n.msReleasePointerCapture(i.MousePointerId);return}if(n.releasePointerCapture){n.releasePointerCapture(i.MousePointerId);return}}catch(r){t.getLogger().error(r.message)}},i.MousePointerId=1,i}();t.Utilities=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){(function(t){var i=function(){function t(n,t){this._container=n;this._elementCreator=t;this._index=null;this._elements=[];this._recycledElements=[]}return t.forDivWithClass=function(n,i){return new t(n,function(){var n=document.createElement("div");return n.className=i,n})},t.prototype.start=function(){this._index=0},t.prototype.getNext=function(){if(this._index===null)throw new Error(n.Plugin.Resources.getErrorString("JSPerf.1035"));var t=this._elements[this._index];return t||(t=this._recycledElements.length>0?this._recycledElements.pop():this._elementCreator(),this._elements.push(t),this._container.appendChild(t)),this._index++,t},t.prototype.stop=function(){var t,n;if(this._index!==null){for(t=this._elements.length-1;t>=this._index;--t)n=this._elements.pop(),this._recycledElements.push(n),this._container.children.length>0&&n.parentElement&&this._container.removeChild(n);this._index=null}},t.prototype.recycleAll=function(){for(var n,t=this._elements.length-1;t>=0;--t)n=this._elements.pop(),this._recycledElements.push(n),this._container.children.length>0&&n.parentElement&&this._container.removeChild(n)},t.prototype.removeAll=function(){for(var t,n=this._elements.length-1;n>=0;--n)t=this._elements.pop(),this._container.children.length>0&&t.parentElement&&this._container.removeChild(t);this._elements=[];this._recycledElements=[]},t}();t.ElementRecyclerFactory=i})(t.Common||(t.Common={}));var i=t.Common})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function n(n,t){this.time=n;this.tooltip=t}return n}();n.MarkData=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(i,r,u,f,e){typeof e=="undefined"&&(e=!1);var o=this;this._clientWidth=0;this._clientHeight=0;this._rulerMarksImageWidth=9;this._minimumMarkDistance=7;this._timeRange=i;this._container=document.createElement("div");this._container.classList.add("ruler-scale-main");this._container.classList.add("fullsizeOverlay");this._seriesList=r;this._imageTokenList=u;this._aggregatedMarkImageToken=f;this._showZero=e;this._rulerMarks=[];this._canvas=document.createElement("canvas");this._canvas.classList.add("fullsizeOverlay");this._context=this._canvas.getContext("2d");this._context.lineWidth=1;this._strokeStyle=n.Plugin.Theme.getValue("diagnostics-host-ruler-tickmark");this._fontSize=n.Plugin.Theme.getValue("plugin-font-size");this._fontColor=n.Plugin.Theme.getValue("plugin-color");this._fontFamily=n.Plugin.Theme.getValue("plugin-font-family");this._container.appendChild(this._canvas);this._scaleMarksDiv=document.createElement("div");this._scaleMarksDiv.id="scaleMarks";this._scaleMarksDiv.classList.add("fullsizeOverlay");this._scaleMarksDiv.tabIndex=0;this._scaleMarksDiv.onkeydown=function(n){return o.onKeyDown(n)};this._scaleMarksDiv.setAttribute("aria-label",n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerMarkNavigation"));this._container.appendChild(this._scaleMarksDiv);this._scaleMarkElementsFactory=new t.Common.ElementRecyclerFactory(this._scaleMarksDiv,function(){return o.createMarkVisual("ruler-scale-mark-image-event")});this._onThemeChangedBoundFunction=this.onThemeChanged.bind(this);n.Plugin.Theme.addEventListener("themechanged",this._onThemeChangedBoundFunction);this.renderTickMarks();this.renderMarks(!0)}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){n.Plugin.Theme.removeEventListener("themechanged",this._onThemeChangedBoundFunction);this._scaleMarkElementsFactory.recycleAll();this._scaleMarkElementsFactory.removeAll()},i.prototype.resize=function(){var n=this._container.clientWidth;this._clientWidth!==n&&(this._clientWidth=n,this._clientHeight=this._container.clientHeight,this._canvas.width=this._clientWidth,this._canvas.height=this._clientHeight,this.renderTickMarks(),this.renderMarks(!0))},i.prototype.onViewportChanged=function(n){this._timeRange.equals(n.currentTimespan)||(this._timeRange=n.currentTimespan,this.renderTickMarks(),this.renderMarks(!0))},i.prototype.addMark=function(n,t,i){var r,u;if(typeof i=="undefined"&&(i=!0),this._seriesList&&t&&t.time){for(r=0;r<this._seriesList.length;r++)if(this._seriesList[r].id===n){u=this._seriesList[r];u.data||(u.data=[]);u.data.push(t);this.createAggregatedMark(t,u.id-1);break}this._rulerMarks.sort(function(n,t){return n.time.compareTo(t.time)});(i||this._timeRange.contains(t.time))&&this.renderMarks(!1)}},i.prototype.onThemeChanged=function(){this._strokeStyle=n.Plugin.Theme.getValue("diagnostics-host-ruler-tickmark");this._fontSize=n.Plugin.Theme.getValue("plugin-font-size");this._fontColor=n.Plugin.Theme.getValue("plugin-color");this._fontFamily=n.Plugin.Theme.getValue("plugin-font-family");this.renderTickMarks();this.renderMarks(!0)},i.prototype.renderTickMarks=function(){var n=this;if(!this._timeRange.elapsed.equals(t.BigNumber.zero)){this._context.clearRect(0,0,this._clientWidth,this._clientHeight);this._context.strokeStyle=this._strokeStyle;this._context.fillStyle=this._fontColor;this._context.font=this._fontSize+" "+this._fontFamily;this._context.textBaseline="hanging";var i=this._clientHeight,r=this._clientHeight*.4,u=this._clientHeight*.2;t.RulerUtilities.getTickMarksPosition(this._timeRange,this._clientWidth,this._showZero).forEach(function(f){var o=t.Utilities.convertToPixel(f.value,n._timeRange,n._clientWidth,!1),e=0;switch(f.type){case 0:n._context.fillText(t.RulerUtilities.formatTime(f.value),o+2.5,0);e=i;break;case 1:e=r;break;case 2:e=u}n._context.beginPath();n._context.moveTo(o+.5,n._clientHeight);n._context.lineTo(o+.5,n._clientHeight-e);n._context.stroke()})}},i.prototype.renderMarks=function(t){var i=this;(t&&this.createAggregateMarkList(),this._rulerMarks)&&(this._scaleMarkElementsFactory.start(),this._rulerMarks.forEach(function(t){if(t.time&&i._timeRange.contains(t.time)){var r=i._scaleMarkElementsFactory.getNext();r.style.backgroundImage=t.glyphIndex!==null&&typeof t.glyphIndex!="undefined"&&t.glyphIndex!==-1&&i._imageTokenList[t.glyphIndex]?"url("+n.Plugin.Theme.getValue(i._imageTokenList[t.glyphIndex])+")":"url("+n.Plugin.Theme.getValue(i._aggregatedMarkImageToken)+")";r.style.left=t.pixelPosition+"px";r.onmouseover=function(){return i.showMarkTooltip(t)};r.onmouseout=n.Plugin.Tooltip.dismiss;r.onfocus=function(){r.setAttribute("aria-label",n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerMarkLabel",t.getAriaContent()))}}}),this._scaleMarkElementsFactory.stop())},i.prototype.createAggregateMarkList=function(){var n=this;(this._rulerMarks=[],this._seriesList)&&(this._seriesList.forEach(function(t){t.data&&t.data.forEach(function(i){n._timeRange.contains(i.time)&&n.createAggregatedMark(i,t.id-1)})}),this._rulerMarks.sort(function(n,t){return n.time.compareTo(t.time)}))},i.prototype.createAggregatedMark=function(n,i){for(var r,u,e=t.Utilities.convertToPixel(n.time,this._timeRange,this._clientWidth)-this._rulerMarksImageWidth/2,o=!0,f=0;f<this._rulerMarks.length;++f)if(r=this._rulerMarks[f],Math.abs(r.pixelPosition-e)<=this._minimumMarkDistance){r.push(n);r.glyphIndex!==i&&(r.glyphIndex=(r.glyphIndex===0||r.glyphIndex===1)&&(i===0||i===1)?0:-1);o=!1;break}o&&(u=new t.AggregatedMarkData,u.push(n),u.glyphIndex=i,u.pixelPosition=e,this._rulerMarks.push(u))},i.prototype.showMarkTooltip=function(t){var i=t.getTooltipContent();i&&n.Plugin.Tooltip.show({content:i})},i.prototype.createMarkVisual=function(n){var t=document.createElement("div");return t.classList.add(n),t.classList.add("ruler-scale-mark-image-position"),t},i.prototype.onKeyDown=function(n){if(this._scaleMarksDiv.children.length!==0&&(n.keyCode===9||n.keyCode===39||n.keyCode===37)){if(n.keyCode===9){this._focusedMark&&(this._focusedMark.blur(),this._focusedMark.tabIndex=-1,this._focusedMark=null,this._container.focus());return}var i=n.currentTarget,t;(this._focusedMark?(this._focusedMark.tabIndex=-1,n.keyCode===39?t=this._focusedMark.nextElementSibling||i.firstElementChild:n.keyCode===37&&(t=this._focusedMark.previousElementSibling||i.lastElementChild)):n.keyCode===39?t=i.firstElementChild:n.keyCode===37&&(t=i.lastElementChild),t)&&(this._focusedMark=t,t.tabIndex=0,t.focus())}},i}();t.RulerScale=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(i){function r(u,f){i.call(this,f);this._container=document.createElement("div");this._container.classList.add("ruler-doubleSlider");this._container.classList.add("fullsizeOverlay");this._currentTimeRange=u;this._selectionTimeRange=this._currentTimeRange;this._viewEventManager=n.VisualStudio.DiagnosticsHub.getViewEventManager();this._telemetry=new t.Telemetry.ViewportController;this._container.onmousedown=this.onStartSelection.bind(this);this._container.onmousemove=this.onDragSelection.bind(this);this._container.onmouseup=this.onStopSelection.bind(this);this._lSlider=document.createElement("div");this._lSlider.className="ruler-slider";this._lSlider.style.width=r.SliderWidth+"px";this._lSlider.tabIndex=0;this._lSlider.setAttribute("role","slider");this._lSlider.setAttribute("aria-label",n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerLeftSliderAriaLabel"));this._container.appendChild(this._lSlider);this._lSlider.onmousedown=this.onStartSelection.bind(this);this._lSlider.onkeydown=this.onKeyDown.bind(this);this._lSlider.onkeyup=this.onKeyUp.bind(this);this._lSlider.onfocus=this.sliderFocus.bind(this);this._lUnselectedRegion=document.createElement("div");this._lUnselectedRegion.className="ruler-unselected";this._container.appendChild(this._lUnselectedRegion);this._container.appendChild(f.container);this._rSlider=document.createElement("div");this._rSlider.className="ruler-slider";this._rSlider.style.width=r.SliderWidth+"px";this._rSlider.tabIndex=0;this._rSlider.setAttribute("role","slider");this._rSlider.setAttribute("aria-label",n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerRightSliderAriaLabel"));this._container.appendChild(this._rSlider);this._rSlider.onmousedown=this.onStartSelection.bind(this);this._rSlider.onkeydown=this.onKeyDown.bind(this);this._rSlider.onkeyup=this.onKeyUp.bind(this);this._rSlider.onfocus=this.sliderFocus.bind(this);this._rUnselectedRegion=document.createElement("div");this._rUnselectedRegion.className="ruler-unselected";this._container.appendChild(this._rUnselectedRegion);this.updateAriaLabels()}return __extends(r,i),Object.defineProperty(r.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),r.prototype.onViewportChanged=function(n){this._currentTimeRange=n.currentTimespan;this._selectionTimeRange=n.selectionTimespan;this.setSliderHandlePosition(n.selectionTimespan||n.currentTimespan);this.updateAriaLabels();i.prototype.onViewportChanged.call(this,n)},r.prototype.resize=function(n){(this._clientRect=this._container.getBoundingClientRect(),this._clientWidth!==this._clientRect.width)&&(this._clientWidth=this._clientRect.width,this.setSliderHandlePosition(this._selectionTimeRange||this._currentTimeRange),i.prototype.resize.call(this,n))},r.prototype.setSliderHandlePosition=function(n){var u=t.Utilities.convertToPixel(n.begin,this._currentTimeRange,this._clientWidth),i=t.Utilities.convertToPixel(n.end,this._currentTimeRange,this._clientWidth),f;this._lSlider.style.visibility=u<0||u>this._clientWidth-r.SliderWidth?"hidden":"visible";this._lSlider.style.left=u-r.SliderWidth+"px";this._lUnselectedRegion.style.width=u>this._clientWidth?this._clientWidth+"px":Math.max(u,0)+"px";this._rSlider.style.visibility=i<0||i>this._clientWidth?"hidden":"visible";this._rSlider.style.left=i+"px";f=this._clientWidth-i;this._rUnselectedRegion.style.width=f>this._clientWidth?this._clientWidth+"px":Math.max(this._clientWidth-i,0)+"px";this._rUnselectedRegion.style.left=f>this._clientWidth?"0px":i+"px"},r.prototype.sliderFocus=function(n){var u=this._selectionTimeRange||this._currentTimeRange,f,i;n.currentTarget!==this._lSlider||this._currentTimeRange.contains(u.begin)?n.currentTarget!==this._rSlider||this._currentTimeRange.contains(u.end)||(f=parseInt(this._currentTimeRange.elapsed.value)/this._clientWidth*(r.SliderWidth+1),i=t.BigNumber.subtract(u.end,this._currentTimeRange.elapsed),i=t.BigNumber.addNumber(i,f),this._viewEventManager.changeViewport.raiseEvent(new t.JsonTimespan(i,t.BigNumber.add(i,this._currentTimeRange.elapsed)))):(f=parseInt(this._currentTimeRange.elapsed.value)/this._clientWidth*(r.SliderWidth+1),i=t.BigNumber.subtractNumber(u.begin,f),this._viewEventManager.changeViewport.raiseEvent(new t.JsonTimespan(i,t.BigNumber.add(i,this._currentTimeRange.elapsed))))},r.prototype.onKeyDown=function(n){this.handleKeyEvent(n)&&!this._animationFrameHandle&&(this._animationFrameHandle=window.requestAnimationFrame(this.onSelectionAnimation.bind(this)))},r.prototype.onKeyUp=function(n){if(this.handleKeyEvent(n)){window.cancelAnimationFrame(this._animationFrameHandle);this._animationFrameHandle=null;this.raiseSelectionTimeRangeChangedEvent(this._selectionTimeRange,!1);var i=t.Utilities.getTimestampAtPixel(t.SwimlaneViewConstants.MinSelectionInPixels,this._clientWidth,this._currentTimeRange).greaterOrEqual(this._selectionTimeRange.elapsed);this._telemetry.selectionChanged(1,i)}},r.prototype.handleKeyEvent=function(n){if(n.keyCode!==37&&n.keyCode!==39)return!1;this._selectionTimeRange=this._selectionTimeRange||this._currentTimeRange;var u=t.BigNumber.subtract(t.Utilities.getTimestampAtPixel(1,this._clientWidth,this._currentTimeRange),this._currentTimeRange.begin),i=this._selectionTimeRange.begin,r=this._selectionTimeRange.end;return n.keyCode===37&&(n.srcElement===this._lSlider?(i=t.BigNumber.subtract(i,u),i=t.BigNumber.max(i,this._currentTimeRange.begin)):n.srcElement===this._rSlider&&(r=t.BigNumber.subtract(r,u),r=t.BigNumber.max(i,r))),n.keyCode===39&&(n.srcElement===this._lSlider?(i=t.BigNumber.add(i,u),i=t.BigNumber.min(i,r)):n.srcElement===this._rSlider&&(r=t.BigNumber.add(r,u),r=t.BigNumber.min(r,this._currentTimeRange.end))),this._selectionTimeRange=new t.JsonTimespan(i,r),!0},r.prototype.onStartSelection=function(n){n.which===1&&(this._selectionTimeRange=this._selectionTimeRange||this._currentTimeRange,n.target===this._lSlider?this._selectionTimeAnchor=this._selectionTimeRange.end:n.target===this._rSlider?this._selectionTimeAnchor=this._selectionTimeRange.begin:(this._selectionTimeAnchor=t.Utilities.getTimestampAtPixel(n.clientX-this._clientRect.left,this._clientWidth,this._currentTimeRange),this._selectionTimeRange=new t.JsonTimespan(this._selectionTimeAnchor,t.BigNumber.addNumber(this._selectionTimeAnchor,t.Utilities.translateNumPixelToDuration(t.SwimlaneViewConstants.MinSelectionInPixels,this._clientWidth,this._currentTimeRange)))),t.Utilities.setCapture(this._container),this._animationFrameHandle&&window.cancelAnimationFrame(this._animationFrameHandle),this._animationFrameHandle=window.requestAnimationFrame(this.onSelectionAnimation.bind(this)),n.stopPropagation())},r.prototype.onDragSelection=function(n){var i,r;(n.target===this._lSlider||n.target===this._rSlider||n.target===this._container)&&n.which===1&&this._animationFrameHandle&&(i=Math.max(n.clientX-this._clientRect.left,0),i=Math.min(this._clientWidth,i),r=t.Utilities.getTimestampAtPixel(i,this._clientWidth,this._currentTimeRange),this._selectionTimeRange=this._selectionTimeAnchor.greater(r)?new t.JsonTimespan(r,this._selectionTimeAnchor):new t.JsonTimespan(this._selectionTimeAnchor,r),n.stopPropagation())},r.prototype.onStopSelection=function(n){if(n.which===1&&this._lSlider&&this._rSlider&&this._animationFrameHandle){t.Utilities.releaseCapture(this._container);window.cancelAnimationFrame(this._animationFrameHandle);this._animationFrameHandle=null;this._lSlider.blur();this._rSlider.blur();t.Utilities.containsPoint(this._lSlider.getBoundingClientRect(),n.clientX,n.clientY)?this._lSlider.focus():t.Utilities.containsPoint(this._rSlider.getBoundingClientRect(),n.clientX,n.clientY)&&this._rSlider.focus();this.raiseSelectionTimeRangeChangedEvent(this._selectionTimeRange,!1);var i=t.Utilities.getTimestampAtPixel(t.SwimlaneViewConstants.MinSelectionInPixels,this._clientWidth,this._currentTimeRange).greaterOrEqual(this._selectionTimeRange.elapsed);this._telemetry.selectionChanged(1,i);n.stopPropagation()}},r.prototype.onSelectionAnimation=function(){this._animationFrameHandle=window.requestAnimationFrame(this.onSelectionAnimation.bind(this));this.raiseSelectionTimeRangeChangedEvent(this._selectionTimeRange,!0)},r.prototype.raiseSelectionTimeRangeChangedEvent=function(n,t){typeof t=="undefined"&&(t=!1);this._viewEventManager.selectionChanged.raiseEvent({position:n,isIntermittent:t})},r.prototype.updateAriaLabels=function(){var o=t.RulerUtilities.formatTime(this._currentTimeRange.begin,1),s=t.RulerUtilities.formatTime(this._currentTimeRange.end,1),e;if(this._selectionTimeRange){var i=t.RulerUtilities.formatTime(this._selectionTimeRange.begin),r=t.RulerUtilities.formatTime(this._selectionTimeRange.end),h=t.RulerUtilities.formatTime(this._currentTimeRange.begin),c=t.RulerUtilities.formatTime(this._currentTimeRange.end),u=t.RulerUtilities.formatTime(this._selectionTimeRange.begin,1),f=t.RulerUtilities.formatTime(this._selectionTimeRange.end,1),l=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerSliderAriaValueText",u,o,f);this._lSlider.setAttribute("aria-valuetext",l);this._lSlider.setAttribute("aria-valuenow",i);this._lSlider.setAttribute("aria-valuemin",h);this._lSlider.setAttribute("aria-valuemax",r);e=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerSliderAriaValueText",f,u,s);this._rSlider.setAttribute("aria-valuetext",e);this._rSlider.setAttribute("aria-valuenow",r);this._rSlider.setAttribute("aria-valuemin",i);this._rSlider.setAttribute("aria-valuemax",c)}},r.SliderWidth=5,r}(t.ControlDecorator);t.DoubleSlider=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function t(t){var i=this;this._colorDivs=[];this._container=document.createElement("div");this._container.id="rulerLegendContainer";this._container.className="ruler-legend-container";this._onThemeChangedBoundFunction=this.onThemeChange.bind(this);n.Plugin.Theme.addEventListener("themechanged",this._onThemeChangedBoundFunction);t.forEach(function(t){var u=document.createElement("div"),f,r;u.className="ruler-label-mark-image";u.setAttribute("data-imageToken",t.imageToken);u.style.backgroundImage="url("+n.Plugin.Theme.getValue(t.imageToken)+")";i._colorDivs.push(u);f=document.createElement("div");f.className="ruler-legend-text-div";f.innerHTML=t.text;r=document.createElement("div");r.className="ruler-legend-div";r.appendChild(u);r.appendChild(f);t.tooltip&&r.setAttribute("data-plugin-vs-tooltip",t.tooltip);i._container.appendChild(r)})}return Object.defineProperty(t.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){n.Plugin.Theme.removeEventListener("themechanged",this._onThemeChangedBoundFunction)},t.prototype.onThemeChange=function(){this._colorDivs.forEach(function(t){var i=t.getAttribute("data-imageToken");t.style.backgroundImage="url("+n.Plugin.Theme.getValue(i)+")"})},t}();t.RulerLegend=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(){}return i.getUniqueId=function(){return i.Counter++},i.getTickMarksPosition=function(n,r,u){var s,l;typeof u=="undefined"&&(u=!1);var a=n.elapsed,o=parseInt(a.value),h=n.begin,c=[],f=Math.pow(10,Math.floor(Math.log(o)/Math.LN10)),e=r/o*f;return e<100?e<25?f*=8:e<50?f*=4:e<100&&(f*=2):e>250&&(f/=e<400?2:e<800?4:e<1600?8:10),f>0&&(s=f/10,l=f/2,e=r/o*f,e<130&&(s=f/5),c=i.generateTickMarks(n,t.BigNumber.subtract(h,t.BigNumber.moduloNumber(h,f)),t.BigNumber.convertFromNumber(f),t.BigNumber.convertFromNumber(l),t.BigNumber.convertFromNumber(s),u)),c},i.getVerticalLinePositions=function(n,r){for(var f,s,e=[],o=i.getTickMarksPosition(n,r),u=0;u<o.length;++u)f=o[u],f.type===0&&(s=parseInt(t.BigNumber.subtract(f.value,n.begin).value)/parseInt(n.elapsed.value)*100,e.push(s));return e},i.formatTime=function(n,r){var f,e,h;if(typeof r=="undefined"&&(r=0),f="0",e=t.Utilities.getNumberFormat(),n.greaterOrEqual(t.BigNumber.convertFromNumber(i.OneSecond-i.NanosecondsSignificanceThreshold))){var u=i.getSplittedTime(n,i.OneMillisecond/2),o=parseInt(u.minString)?!0:!1,c=parseInt(u.secString)?!0:!1,s=parseInt(u.msString)?!0:!1;f=o?u.minString+":":"";f+=c?u.secString:o?"00":"0";s&&(f+=e.numberDecimalSeparator+this.removeTrailingZeros(u.msString))}else{var u=i.getSplittedTime(n),s=parseInt(u.msString)?!0:!1,l=parseInt(u.nsString)?!0:!1;f=s?u.msString:"0";l&&(f+=e.numberDecimalSeparator+this.removeTrailingZeros(u.nsString))}return h=i.getUnit(parseInt(n.value),r),f+h},i.formatTitleTime=function(n,r,u,f){var a;typeof r=="undefined"&&(r=1);typeof u=="undefined"&&(u=!1);typeof f=="undefined"&&(f=!1);var v=f?i.OneMillisecond:i.NanosecondsSignificanceThreshold,e=i.getSplittedTime(n,v),o="0",c=t.Utilities.getNumberFormat(),y=parseInt(e.minString)?!0:!1,l=parseInt(e.secString)?!0:!1,s=u?!1:parseInt(e.msString)?!0:!1,h=u?!1:parseInt(e.nsString)?!0:!1;return y?(a=l?e.secString:"00",o=e.minString+":"+a):l?(o=e.secString,s&&(o+=c.numberDecimalSeparator+this.removeTrailingZeros(e.msString))):(s||h)&&(o=s?e.msString:h?"0":"",h&&(o+=c.numberDecimalSeparator+this.removeTrailingZeros(e.nsString))),o},i.formatSelectionTime=function(t,r,u){typeof r=="undefined"&&(r=1);typeof u=="undefined"&&(u=!1);var f=i.formatTitleTime(t,r,!1,u),e=i.getUnit(parseInt(t.value),r);return n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerTimeSelected",f,e)},i.formatTotalTime=function(n,t,r){typeof t=="undefined"&&(t=1);typeof r=="undefined"&&(r=!1);var u=i.formatTitleTime(n,t,r),f=i.getUnit(parseInt(n.value),t,r);return u+f},i.generateTickMarks=function(n,i,r,u,f,e){var s=[],c=n.begin,l=n.end,o,h;for(e&&s.push({type:0,value:new t.BigNumber(0,0),label:"0"}),f.equals(t.BigNumber.zero)&&(f=new t.BigNumber(0,1)),o=i;l.greater(o);o=t.BigNumber.add(o,f))o.greater(c)&&(h=o,t.BigNumber.modulo(o,r).equals(t.BigNumber.zero)?s.push({type:0,value:h}):t.BigNumber.modulo(o,u).equals(t.BigNumber.zero)?s.push({type:1,value:h}):s.push({type:2,value:h}));return s},i.getUnit=function(n,t,r){typeof r=="undefined"&&(r=!1);var u=i.getUnits(t);return n<i.OneSecond-i.NanosecondsSignificanceThreshold&&!r?u.milliseconds:n<i.OneMinute-i.NanosecondsSignificanceThreshold?u.seconds:u.minutes},i.getUnits=function(t){return t===1?{milliseconds:" "+n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/MillisecondsLabel"),seconds:" "+n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/SecondsLabel"),minutes:" "+n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/MinutesLabel")}:{milliseconds:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/MillisecondsAbbreviation"),seconds:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/SecondsAbbreviation"),minutes:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/MinutesAbbreviation")}},i.getSplittedTime=function(n,r){var h,c,l,o,v;typeof r=="undefined"&&(r=i.NanosecondsSignificanceThreshold);var y=t.BigNumber.moduloNumber(n,i.OneMillisecond),u=t.BigNumber.subtract(n,y),p=parseInt(y.value),f="";p<i.OneMillisecond-r?(f=Math.round(p/1e3).toString(),f=this.padLeadingZeros(f,3)):u=t.BigNumber.addNumber(u,i.OneMillisecond);h=t.BigNumber.moduloNumber(u,i.OneSecond);u=t.BigNumber.subtract(u,h);c=parseInt(h.value)/i.OneMillisecond;l=t.BigNumber.moduloNumber(u,i.OneMinute);u=t.BigNumber.subtract(u,l);var a=parseInt(l.value)/i.OneSecond,w=u,s=parseInt(w.value)/i.OneMinute,e="";return(f||c)&&(e=c.toString(),(a||s)&&(e=this.padLeadingZeros(e,3))),o="",(f||e||a)&&(o=a.toString(),s&&(o=this.padLeadingZeros(o,2))),v="",s&&(v=s.toString()),{nsString:f,msString:e,secString:o,minString:v}},i.removeTrailingZeros=function(n){return n.replace(/0*$/,"")},i.padLeadingZeros=function(n,t){var i=n,r="00000000";if(i&&t&&t>0){while(t-i.length>=8)i=r+i;i=r.substr(0,t-i.length)+i}return i},i.OneMillisecond=1e6,i.OneSecond=1e9,i.OneMinute=6e10,i.Counter=0,i.NanosecondsSignificanceThreshold=500,i}();t.RulerUtilities=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var r=function(){function n(){this.isLive=!1;this.isPerformanceDebugger=!1;this.isSelectionEnabled=!0;this.showLegend=!0;this.markSeries=[]}return n}(),i;t.RulerConfig=r;i=function(){function i(i){var u,e,o,f,r,s,h;if(this._controls=[],this._logger=n.VisualStudio.DiagnosticsHub.getLogger(),this._totalTimespan=null,this._selectionTimespan=null,this._aggregatedMarkImageToken="vs-image-graph-aggregated-event",this._imageTokenList=["vs-image-graph-app-event","vs-image-graph-user-mark","vs-image-graph-third-event","vs-image-graph-fourth-event","vs-image-graph-fifth-event","vs-image-graph-sixth-event"],!i)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1002"));for(this._config=i,this._totalTimespan=this._config.timeRange,this._container=document.createElement("div"),this._container.classList.add("ruler-container"),u=document.createElement("div"),u.className="ruler-header",this._container.appendChild(u),e=document.createElement("div"),e.className="ruler-body",this._container.appendChild(e);this._config.markSeries.length>this._imageTokenList.length;)this._logger.error("Series removed due to excess count: "+JSON.stringify(this._config.markSeries.pop()));if(this._config.showLegend){for(o=[],r=0;r<this._imageTokenList.length&&r<this._config.markSeries.length;r++)f=this._config.markSeries[r],f.index=r,o.push({text:f.label,imageToken:this._imageTokenList[f.id-1],tooltip:f.tooltip});for(r=0;r<this._config.markSeries.length;r++)if(this._config.markSeries[r].id===3){o.push({text:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerAggregatedMarks"),imageToken:this._aggregatedMarkImageToken,tooltip:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/MergedMarkTooltip")});break}s=new t.RulerLegend(o);u.appendChild(s.container);this._controls.push(s)}this._title=document.createElement("div");this._title.className="ruler-title-text";this._title.setAttribute("aria-live","off");this._title.innerHTML=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerTitle",t.RulerUtilities.formatTotalTime(this._totalTimespan.elapsed,1));u.appendChild(this._title);this._scale=new t.RulerScale(this._totalTimespan,this._config.markSeries,this._imageTokenList,this._aggregatedMarkImageToken);h=this._config.isSelectionEnabled?new t.DoubleSlider(this._totalTimespan,this._scale):this._scale;e.appendChild(h.container);this._controls.push(h)}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this._controls.forEach(function(n){n.dispose&&n.dispose()})},i.prototype.onViewportChanged=function(i){this._selectionTimespan=i.selectionTimespan;this._title.innerHTML=this._selectionTimespan?n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerTitleWithSelection",t.RulerUtilities.formatTotalTime(this._totalTimespan.elapsed,1,this._config.isLive||i.isIntermittent),t.RulerUtilities.formatSelectionTime(i.selectionTimespan.elapsed,0,this._config.isPerformanceDebugger)):n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerTitle",t.RulerUtilities.formatTotalTime(this._totalTimespan.elapsed,1,this._config.isLive||i.isIntermittent));this._controls.forEach(function(n){if(n.onViewportChanged)n.onViewportChanged(i)})},i.prototype.onDataUpdate=function(i){this._totalTimespan=new t.JsonTimespan(this._totalTimespan.begin,i);this._markLoaders&&this._markLoaders.forEach(function(n){return n.onDataUpdate(i)});this._title.innerHTML=this._selectionTimespan?n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerTitleWithSelection",t.RulerUtilities.formatTotalTime(i,1,!0),t.RulerUtilities.formatSelectionTime(this._selectionTimespan.elapsed,0,this._config.isPerformanceDebugger)):n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerTitle",t.RulerUtilities.formatTotalTime(i,1,!0))},i.prototype.resize=function(n){this._controls.forEach(function(t){t.resize&&t.resize(n)})},i.prototype.addMark=function(n,i,r,u){typeof u=="undefined"&&(u=!0);var f=new t.MarkData(i,r);this._scale.addMark(n,f,u)},i.prototype.loadMarks=function(n){var i=this;this._markLoaders=n.map(function(n){var r=n.DataSource;return!r||!r.CounterId||!r.AnalyzerId?null:new t.MarkDataFetcher(n,i._scale)}).filter(function(n){return n!==null})},i}();t.Ruler=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function u(){return i===null&&(i=new r),i}var i=null,r=function(){function t(){this._swimlaneViewStateMarshaler=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject(t.SwimlaneViewStateServiceMarshalerName,{},!0)}return t.prototype.getSwimlaneVisibility=function(t){return n.Plugin.F12?n.Plugin.Promise.wrap(!0):this._swimlaneViewStateMarshaler._call("getSwimlaneVisibility",t)},t.prototype.setSwimlaneVisibility=function(t,i){n.Plugin.F12||this._swimlaneViewStateMarshaler._call("setSwimlaneVisibility",t,i)},t.SwimlaneViewStateServiceMarshalerName="Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.SwimLaneViewStateServiceMarshaler",t}();t.getSwimlaneViewStateService=u})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(n,i,r,u){typeof u=="undefined"&&(u=null);var f=this;this._clientWidth=0;this._clientHeight=0;this._isVisible=!0;this._controls=[];this._swimlaneVisibilityChangedEvent=new t.AggregatedEvent;this._container=document.createElement("div");this._container.classList.add("swimlaneBase");this._currentTimespan=r;this._selectionTimespan=u;this._isVisible=n.isBodyExpanded;this._titleRegion=document.createElement("div");this._contentRegion=document.createElement("div");this._leftRegion=document.createElement("div");this._mainRegion=document.createElement("div");this._rightRegion=document.createElement("div");this._titleRegion.classList.add("titleRegion");this._contentRegion.classList.add("contentRegion");this._leftRegion.classList.add("leftRegion");this._mainRegion.classList.add("mainRegion");this._rightRegion.classList.add("rightRegion");this._contentRegion.style.height=i+"px";this._contentRegion.appendChild(this._leftRegion);this._contentRegion.appendChild(this._mainRegion);this._contentRegion.appendChild(this._rightRegion);this._titleText=n.titleText;this._unit=n.unit;this._titleContainer=document.createElement("div");this._titleContainer.className="title-container";this._titleCollapseExpandButton=document.createElement("div");this._titleCollapseExpandButton.setAttribute("role","button");this._titleCollapseExpandButton.tabIndex=0;this._titleCollapseExpandButton.onclick=this.toggleVisibility.bind(this);this._titleCollapseExpandButton.onkeydown=this.onKeyDown.bind(this);this._titleContainer.appendChild(this._titleCollapseExpandButton);this._titleTextElement=document.createElement("div");this._titleTextElement.className="title-text";this._titleContainer.appendChild(this._titleTextElement);this._container.appendChild(this._titleContainer);this._container.appendChild(this._titleRegion);this._container.appendChild(this._contentRegion);this.updateTitle();this.updateContentVisibility();this._collapseCallback=function(n){n.matches?f._titleRegion.classList.add("limitedSpace"):f._titleRegion.classList.remove("limitedSpace")};this.updateCollapsingWidth()}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"swimlaneVisibilityChangedEvent",{get:function(){return this._swimlaneVisibilityChangedEvent},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this._swimlaneVisibilityChangedEvent.dispose();this._titleCollapseExpandButton.onclick=null;this._titleCollapseExpandButton.onkeydown=null;this._controls.forEach(function(n){n.dispose&&n.dispose()})},i.prototype.resize=function(n){(this._clientWidth||this._clientHeight||this.updateCollapsingWidth(),this._clientWidth!==this._container.clientWidth||this._clientHeight!==this._container.clientHeight)&&(this._clientHeight=this._container.clientHeight,this._clientWidth=this._container.clientWidth,this._isVisible)&&this._controls.forEach(function(t){t.resize&&t.resize(n)})},i.prototype.onViewportChanged=function(n){this._currentTimespan=n.currentTimespan;this._selectionTimespan=n.selectionTimespan;this._isVisible&&this._controls.forEach(function(t){if(t.onViewportChanged)t.onViewportChanged(n)})},i.prototype.onDataUpdate=function(n){this._controls.forEach(function(t){if(t.onDataUpdate)t.onDataUpdate(n)})},i.prototype.onScaleChanged=function(n){this._unit=n.unit||this._unit;this.updateTitle()},i.prototype.addTitleControl=function(n){this._titleRegion.appendChild(n.container);this._controls.push(n);this.updateCollapsingWidth()},i.prototype.addLeftRegionControl=function(n){this._leftRegion.appendChild(n.container);this._controls.push(n)},i.prototype.addRightRegionControl=function(n){this._rightRegion.appendChild(n.container);this._controls.push(n)},i.prototype.addMainRegionControl=function(n){this._mainRegion.appendChild(n.container);this._controls.push(n)},i.prototype.onKeyDown=function(n){13===n.keyCode&&this.toggleVisibility()},i.prototype.toggleVisibility=function(){if(this._isVisible=!this._isVisible,this.updateContentVisibility(),this._isVisible){this.resize(null);this.onViewportChanged({currentTimespan:this._currentTimespan,selectionTimespan:this._selectionTimespan,isIntermittent:!1})}this._swimlaneVisibilityChangedEvent.invokeEvent(this._isVisible)},i.prototype.updateTitle=function(){var n=this._titleText;this._unit&&(n+=" ("+this._unit+")");this._titleTextElement.innerHTML=n},i.prototype.updateContentVisibility=function(){this._isVisible?(this._titleCollapseExpandButton.className="title-expanded-button",this._titleCollapseExpandButton.setAttribute("aria-label",n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/SwimlaneCollapseAriaLabel",this._titleText)),this._titleCollapseExpandButton.setAttribute("aria-expanded","true"),this._contentRegion.style.display="-ms-grid"):(this._titleCollapseExpandButton.className="title-collapsed-button",this._titleCollapseExpandButton.setAttribute("aria-label",n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/SwimlaneExpandAriaLabel",this._titleText)),this._titleCollapseExpandButton.setAttribute("aria-expanded","false"),this._contentRegion.style.display="none")},i.prototype.updateCollapsingWidth=function(){this._collapseMediaQuery&&this._collapseMediaQuery.removeListener(this._collapseCallback);var n=this._titleContainer.offsetWidth+this._titleRegion.offsetWidth;this._collapseMediaQuery=window.matchMedia(t.Utilities.formatString("(max-width: {0}px)",n.toString()));this._collapseMediaQuery.addListener(this._collapseCallback)},i}();t.SwimlaneBase=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(i){function r(r,u,f,e){i.call(this,r);this._selectionTimeAnchor=null;this._animationFrameHandle=null;this._currentTimespan=u;this._currentSelection=f;this._sourceId=e;this._container=document.createElement("div");this._container.className="selectionOverlay";this._container.style.zIndex=t.Constants.SelectionOverlayZIndex.toString();this._leftUnselectedRegion=document.createElement("div");this._rightUnselectedRegion=document.createElement("div");this._leftUnselectedRegion.className="unselected";this._leftUnselectedRegion.style.top="0px";this._rightUnselectedRegion.className="unselected";this._rightUnselectedRegion.style.top="0px";this._container.appendChild(this._leftUnselectedRegion);this._container.appendChild(r.container);this._container.appendChild(this._rightUnselectedRegion);this._container.onmousedown=this.onStartSelection.bind(this);this._container.onmousemove=this.onDragSelection.bind(this);this._container.onmouseup=this.onStopSelection.bind(this);this._telemetry=new t.Telemetry.ViewportController;this._viewEventManager=n.VisualStudio.DiagnosticsHub.getViewEventManager()}return __extends(r,i),Object.defineProperty(r.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),r.prototype.dispose=function(){this._container.onmousedown=null;this._container.onmousemove=null;this._container.onmouseup=null;i.prototype.dispose.call(this)},r.prototype.resize=function(n){this._clientWidth=this._container.clientWidth;this._clientRect=this._container.getBoundingClientRect();this.updateDom();i.prototype.resize.call(this,n)},r.prototype.onViewportChanged=function(n){this._currentTimespan=n.currentTimespan;this._currentSelection=n.selectionTimespan;this.updateDom();i.prototype.onViewportChanged.call(this,n)},r.prototype.onStartSelection=function(n){n.which===1&&(this._selectionTimeAnchor=t.Utilities.getTimestampAtPixel(n.clientX-this._clientRect.left,this._clientWidth,this._currentTimespan),this._currentSelection=new t.JsonTimespan(this._selectionTimeAnchor,t.BigNumber.addNumber(this._selectionTimeAnchor,t.Utilities.translateNumPixelToDuration(t.SwimlaneViewConstants.MinSelectionInPixels,this._clientWidth,this._currentTimespan))),t.Utilities.setCapture(this._container),this._animationFrameHandle&&window.cancelAnimationFrame(this._animationFrameHandle),this._animationFrameHandle=window.requestAnimationFrame(this.onSelectionAnimation.bind(this)),n.stopPropagation())},r.prototype.onDragSelection=function(n){var i,r;n.target===this._container&&n.which===1&&this._animationFrameHandle&&(i=Math.max(n.clientX-this._clientRect.left,0),i=Math.min(i,this._clientWidth),r=t.Utilities.getTimestampAtPixel(i,this._clientWidth,this._currentTimespan),this._currentSelection=this._selectionTimeAnchor.greater(r)?new t.JsonTimespan(r,this._selectionTimeAnchor):new t.JsonTimespan(this._selectionTimeAnchor,r),n.stopPropagation())},r.prototype.onStopSelection=function(n){if(n.which===1){t.Utilities.releaseCapture(this._container);window.cancelAnimationFrame(this._animationFrameHandle);this._animationFrameHandle=null;this.raiseSelectionChanged(!1);var i=!1;this._currentSelection&&(i=t.Utilities.getTimestampAtPixel(t.SwimlaneViewConstants.MinSelectionInPixels,this._clientWidth,this._currentTimespan).greaterOrEqual(this._currentSelection.elapsed));this._telemetry.selectionChanged(0,i,this._sourceId)}},r.prototype.onSelectionAnimation=function(){this.raiseSelectionChanged(!0);this._animationFrameHandle=window.requestAnimationFrame(this.onSelectionAnimation.bind(this))},r.prototype.raiseSelectionChanged=function(n){typeof n=="undefined"&&(n=!1);this._viewEventManager.selectionChanged.raiseEvent({position:this._currentSelection,isIntermittent:n})},r.prototype.updateDom=function(){var n,r,i;this._currentSelection?(n=t.Utilities.convertToPixel(this._currentSelection.begin,this._currentTimespan,this._clientWidth),n=Math.max(n,0),r=t.Utilities.convertToPixel(this._currentSelection.end,this._currentTimespan,this._clientWidth),i=this._clientWidth-r,i=Math.max(i,0),this._leftUnselectedRegion.style.width=n+"px",this._rightUnselectedRegion.style.left=r+"px",this._rightUnselectedRegion.style.width=i+"px"):(this._leftUnselectedRegion.style.width="0px",this._rightUnselectedRegion.style.left=this._clientWidth+"px",this._rightUnselectedRegion.style.width="0px")},r}(t.ControlDecorator);t.SelectionOverlay=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function t(t,i,r){typeof r=="undefined"&&(r=1);this._swimlaneId="00000000-0000-0000-0000-000000000000";this.header={isBodyExpanded:!0,titleText:"Graph",description:"Graph"};this.graph={height:n.Constants.DefaultSwimlaneGraphHeight,registeredClass:null,loadCss:n.Common.DependencyManager.loadCss,jsonConfig:{},description:null,scale:{minimum:0,maximum:100,axes:[]},legend:[],unit:"",swimlaneId:this._swimlaneId};this.graph.registeredClass=t.JavaScriptClassName?n.RegisterNamespace.getRegisteredClass(t.JavaScriptClassName):n.RegisterNamespace.getRegisteredClass("Microsoft.VisualStudio.DiagnosticsHub.MultiSeriesGraph");this._swimlaneId=t.Id;this.graph.swimlaneId=t.Id;this.graph.jsonConfig=t.JsonObject;this.graph.jsonConfig.GraphBehaviour=r;this.graph.scale.minimum=t.JsonObject.MinValue||this.graph.scale.minimum;this.graph.scale.maximum=t.JsonObject.MaxValue||this.graph.scale.minimum;this.graph.scale.isFixed=t.JsonObject.IsScaleFixed;this.graph.scale.axes=t.JsonObject.Axes||[];this.graph.resources=t.Resources;this.graph.description=t.Description;this.graph.pathToScriptFolder=t.PathToScriptFolder;t.JsonObject.RefreshDataOnResizeAndZoom=t.JsonObject.RefreshDataOnResizeAndZoom||!1;var u=t.JsonObject.Height||this.graph.height;u=Math.max(u,n.Constants.MinimumSwimlaneGraphHeight);this.graph.height=Math.min(u,n.Constants.MaximumSwimlaneGraphHeight);this.timeRange=i;this.graph.timeRange=i;this.header.titleText=t.Title}return Object.defineProperty(t.prototype,"id",{get:function(){return this._swimlaneId},enumerable:!0,configurable:!0}),t}();n.SwimlaneConfiguration=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";function t(t,i,r,u,f,e){var o=new n.SwimlaneConfiguration(t,f,u),h,a,v,s,c,l;return o.graph.registeredClass===n.RegisterNamespace.getRegisteredClass("Microsoft.VisualStudio.DiagnosticsHub.MultiLineGraph")&&(o.graph.registeredClass=n.RegisterNamespace.getRegisteredClass("Microsoft.VisualStudio.DiagnosticsHub.MultiSeriesGraph")),h=new o.graph.registeredClass(o.graph),a=new n.LocalizedUnitConverter(o.graph.jsonConfig.Units,o.graph.resources),o.header.isBodyExpanded=i,o.header.unit=o.graph.unit,v=h,r&&(v=new n.SelectionOverlay(h,f,e,o.id)),s=new n.SwimlaneBase(o.header,o.graph.height,f,e),h.scaleChangedEvent.addEventListener(s.onScaleChanged.bind(s)),c=new n.Scale(o.graph.scale,0,a),l=new n.Scale(o.graph.scale,1,a),h.scaleChangedEvent.addEventListener(c.onScaleChanged.bind(c)),h.scaleChangedEvent.addEventListener(l.onScaleChanged.bind(l)),o.graph.scale.axes&&o.graph.scale.axes.forEach(function(t){var i=new n.Axes(t,o.graph.scale.minimum,o.graph.scale.maximum);h.scaleChangedEvent.addEventListener(i.onScaleChangedEvent.bind(i));s.addMainRegionControl(i)}),s.addTitleControl(new n.Legend(o.graph.legend)),s.addMainRegionControl(v),s.addMainRegionControl(new n.GridLineRenderer(f)),s.addLeftRegionControl(c),s.addRightRegionControl(l),s}n.defaultSwimlaneFactory=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function f(){return r}function e(t){if(!i&&!t)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1002"));return i||(i=new u(t)),i}var u=function(){function i(i){if(this._logger=n.VisualStudio.DiagnosticsHub.getLogger(),this._controls=[],this._ruler=null,this._maxHeight=600,this._previousHeight=0,this._dataWarehouse=null,this._defaultAnalyzerId="89fb2d7a-1239-4952-811b-d77e2ee6f2aa",this._countersAnalyzerId="66EDDDF1-2277-40F3-983A-6FF57A433ECB",this._isResizeRegistered=!1,!i)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1002"));i.dataManager||(i.dataManager=new t.DiagnosticsHubDataManager);this._onResizeBoundFunction=t.eventThrottler(this.onResize.bind(this),t.Constants.WindowResizeThrottle);this._onThemeChangedBoundFunction=this.resizeHost.bind(this);this._config=i;this._config.isSelectionEnabled=typeof this._config.isSelectionEnabled=="undefined"||this._config.isSelectionEnabled;this._eventAggregator=n.VisualStudio.DiagnosticsHub.getEventAggregator();var u=this._config.containerId||"mainContainer",r=document.getElementById(u);r.classList.add("base-container");this._headerContainer=document.createElement("div");this._headerContainer.id="header-float";this._headerContainer.classList.add("header-float");this._config.isToolbarFloating&&(this._headerContainer.style.position="fixed");r.appendChild(this._headerContainer);this._swimlaneContainer=document.createElement("div");this._swimlaneContainer.id="mainSwimlaneContainer";this._swimlaneContainer.classList.add("main-swimlane-container");r.appendChild(this._swimlaneContainer);this._footerContainer=document.createElement("div");this._footerContainer.id="footer";this._footerContainer.classList.add("footer-container");r.appendChild(this._footerContainer);n.Plugin.F12||(this._toolbar=new t.Toolbar,this.addControl(this._toolbar,t.SwimlaneViewConstants.ToolbarRendererPriority));this._config.dataManager.getConfigurations(this.initialize.bind(this))}return Object.defineProperty(i,"headerSwimlanePriority",{get:function(){return 128},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"viewportController",{get:function(){return r},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"ruler",{get:function(){return this._ruler},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this._controls.forEach(function(n){n.dispose&&n.dispose()});this._ruler=null;window.removeEventListener("resize",this._onResizeBoundFunction);n.Plugin.Theme.removeEventListener("themechanged",this._onThemeChangedBoundFunction)},i.prototype.addToolbarItem=function(n){this._toolbar&&this._toolbar.addToolbarItem(n)},i.prototype.addControl=function(n,t){var u,r;if(!isNaN(t)&&!(t<0)){for(n.container.setAttribute("data-stackPriority",t.toFixed()),u=t>=i.headerSwimlanePriority?this._swimlaneContainer:this._headerContainer,r=u.firstChild;r&&parseInt(r.getAttribute("data-stackPriority"))<t;)r=r.nextSibling;u.insertBefore(n.container,r);this._controls.push(n);this._isResizeRegistered&&(n.resize&&n.resize(null),this.resizeHost())}},i.prototype.removeControl=function(n){if(n.container.parentElement===this._headerContainer||n.container.parentElement===this._swimlaneContainer){n.dispose&&n.dispose();n.container.parentElement.removeChild(n.container);var t=this._controls.indexOf(n);t!==-1&&this._controls.splice(t,1);this.resizeHost()}},i.prototype.onResize=function(n){this._swimlaneContainer.style.marginTop=this._config.isToolbarFloating?this._headerContainer.clientHeight+"px":"0px";window&&(this._footerContainer.style.visibility=window.innerHeight<=this._footerContainer.clientHeight*2?"collapse":"visible");this._controls.forEach(function(t){t.resize&&t.resize(n)});this._swimlaneContainer.style.marginBottom=this._footerContainer.clientHeight+"px"},i.prototype.initialize=function(i,r){var u=this,f,e;typeof r=="undefined"&&(r=null);f=this._config.isPerformanceDebugger;this._config.isLive&&this._toolbar&&!f&&this._toolbar.addCommand(new t.StopCollectionCommand);e=n.Plugin.Promise.wrap(null);i.length>0&&(i.forEach(function(n){n.JsonObject=JSON.parse(n.JsonConfiguration)}),e=n.VisualStudio.DiagnosticsHub.DataWarehouse.loadDataWarehouse(r).then(function(i){return(u._dataWarehouse=i,!f)?i.getContextService().getGlobalContext().then(function(n){return n.getTimeDomain()},function(){return new t.JsonTimespan(t.BigNumber.zero,t.BigNumber.zero)}):n.Plugin.Promise.wrap(new t.JsonTimespan(t.BigNumber.zero,t.BigNumber.zero))}).then(function(n){return u.initializeViewportController(n)}).then(function(){return u._config.isLive?null:u.getLostEvents()}).then(function(){return u.loadScripts(i)}).then(function(){return u.adjustConfigForNewArchitecture(i)}).then(function(i){if(!n.Plugin.F12){var r=u.viewportController.commands.filter(function(n){return n.displayOnContextMenu});u._contextMenu=new t.ContextMenu(r);u._headerContainer.onmousedown=u._contextMenu.onMouseDown.bind(u._contextMenu);u._swimlaneContainer.onmousedown=u._contextMenu.onMouseDown.bind(u._contextMenu)}return u.addRuler(i),u.addSwimlanes(i)}));e.then(function(){window.addEventListener("resize",u._onResizeBoundFunction);u._isResizeRegistered=!0;u._controls.forEach(function(n){n.resize&&n.resize(null)});u.resizeHost();n.Plugin.Theme.addEventListener("themechanged",u._onThemeChangedBoundFunction)}).then(function(){u._config.dataManager.dataUpdate(u.onDataUpdate.bind(u))}).done(function(){return u._eventAggregator.raiseEvent("Microsoft.DiagnosticsHub.RendererReadyEvent",null)},this.logExecuteError.bind(this))},i.prototype.logExecuteError=function(t){return this._logger.error("executeCallback failed: "+JSON.stringify(t)),n.Plugin.Promise.wrapError(t)},i.prototype.onDataUpdate=function(i){n.Plugin.VS.Internal.CodeMarkers.fire(25235);var r=new t.BigNumber(i.h,i.l);this._controls.forEach(function(n){if(n.onDataUpdate)n.onDataUpdate(r)});n.Plugin.VS.Internal.CodeMarkers.fire(25236)},i.prototype.initializeViewportController=function(n){this._logger.info("Got timespan, elapsed="+n.elapsed.value);r=this._config.isLive?new t.RollingViewportController(this._config.timeInNsPerPixel):new t.ViewportController(n);this._footerContainer.appendChild(this.viewportController.container);this._controls.push(this.viewportController);this._toolbar&&this._toolbar.addCommandGroup(this.viewportController.commands)},i.prototype.getLostEvents=function(){var i=this;return this._dataWarehouse.getFilteredData({customDomain:{task:"get-total-lost-events"}},this._defaultAnalyzerId).then(function(r){var u,f;r&&typeof r.lostEvents=="number"&&r.lostEvents>0&&(u=new t.InformationBarControl(n.Plugin.Resources.getString("/DiagnosticsHubResources/InformationDroppedEvents",r.lostEvents),"http://go.microsoft.com/fwlink/p/?LinkId=391662"),u.onClose=function(){return i.removeControl(u)},i.addControl(u,t.SwimlaneViewConstants.InfobarRendererPriority),f=new t.Telemetry.CollectedData,f.lostEvents(r.lostEvents))},function(n){i._logger.error("Could not get lost events, error: "+JSON.stringify(n))})},i.prototype.loadScripts=function(i){var r=[];return i.forEach(function(n){if(n.PathToScript){var i=n.PathToScript.lastIndexOf("\\");i!==-1&&(n.PathToScriptFolder=n.PathToScript.substring(0,i));r.push(t.Common.DependencyManager.loadDependency({objType:n.JavaScriptClassName,functionName:n.JavaScriptFactoryFunction,url:n.PathToScript}))}}),n.Plugin.Promise.join(r)},i.prototype.resizeHost=function(){var t=0,n,i;this._controls.forEach(function(n){t+=n.container.offsetHeight});n=Math.ceil(t);i=n-this._previousHeight;this._previousHeight=n;this._eventAggregator.raiseEvent("Microsoft.DiagnosticsHub.SwimlaneResizeHeight",{Delta:i,MinValue:this._toolbar?this._toolbar.container.offsetHeight:0,MaxValue:Math.min(this._maxHeight,n),Value:Math.min(this._maxHeight,n)})},i.prototype.adjustConfigForNewArchitecture=function(t){var i=this,r=function(t){if(i._config.isLive)return t.DataSource.AnalyzerId=i._countersAnalyzerId,n.Plugin.Promise.as(t);var r={customDomain:{Task:"HasCounter",CounterId:t.DataSource.CounterId}};return i._dataWarehouse.getFilteredData(r,i._countersAnalyzerId).then(function(n){return n.isPresent&&(t.DataSource.AnalyzerId=i._countersAnalyzerId),t})};return n.Plugin.Promise.thenEach(t,function(t){return t.Type===3||t.JavaScriptClassName&&t.JavaScriptClassName!=="Microsoft.VisualStudio.DiagnosticsHub.MultiLineGraph"?n.Plugin.Promise.wrap(t):n.Plugin.Promise.thenEach(t.JsonObject.Series,r).then(function(n){return t.JsonObject.Series=n,t})})},i.prototype.addSwimlanes=function(r){var u=this,o=0,f=t.getSwimlaneViewStateService(),s=this._config.isLive?1:2,e=[];return r.forEach(function(r){if(!r.JsonObject.View||r.JsonObject.View===t.ViewType.Graph){var h=++o,c=f.getSwimlaneVisibility(r.Id).then(function(e){var c=r.Type===3?t.RegisterNamespace.getRegisteredFunction(r.JavaScriptFactoryFunction):n.VisualStudio.DiagnosticsHub.defaultSwimlaneFactory,o=c(r,e,u._config.isSelectionEnabled,s,u.viewportController.visible,u.viewportController.selection);o.swimlaneVisibilityChangedEvent.addEventListener(function(n){f.setSwimlaneVisibility(r.Id,n);u.resizeHost()});u.viewportController.viewportStateChanged.addEventListener(o.onViewportChanged.bind(o));u.addControl(o,i.headerSwimlanePriority+h);o.onViewportChanged({currentTimespan:u.viewportController.visible,selectionTimespan:u.viewportController.selection,isIntermittent:!1})});e.push(c)}}),n.Plugin.Promise.join(e)},i.prototype.addRuler=function(i){var r=new t.RulerConfig;r.showLegend=!this._config.isPerformanceDebugger;r.isLive=this._config.isLive;r.isSelectionEnabled=this._config.isSelectionEnabled;r.timeRange=this.viewportController.visible;r.isPerformanceDebugger=this._config.isPerformanceDebugger;var f=[],e=3,o={},u={};i.forEach(function(i){i.JsonObject.View&&i.JsonObject.View===t.ViewType.Ruler&&i.JsonObject.Series.forEach(function(t){var a=t.DataSource.CounterId||typeof t.DataSource.CounterId,v=t.DataSource.AnalyzerId||typeof t.DataSource.AnalyzerId,s,c,l,h;o[a.toLowerCase()+","+v.toLowerCase()]||(o[a.toLowerCase()+","+v.toLowerCase()]=!0,s=0,s=typeof t.MarkType=="number"&&(t.MarkType===1||t.MarkType===2)?t.MarkType:e,s===1?(c=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerLifecycleMarkLabel"),u[c]?s=u[h]:(u[c]=s,r.markSeries.push({id:s,label:c,tooltip:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/LifecycleMarkTooltip")}))):s===2?(c=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerUserMarkLabel"),u[c]?s=u[h]:(u[c]=s,r.markSeries.push({id:s,label:c,tooltip:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/UserMarkTooltip")}))):(l=t.LegendTooltip,i.Resources&&i.Resources[l]&&(l=i.Resources[l]),h=t.Legend,i.Resources&&i.Resources[h]&&(h=i.Resources[h]),u[h]?s=u[h]:(u[h]=s,r.markSeries.push({id:s,label:h,tooltip:l||""}),e++)),t.MarkTypeId=s,f.push(t))})});this._ruler=new t.Ruler(r);this.addControl(this._ruler,t.SwimlaneViewConstants.RulerRendererPriority);this.viewportController.viewportStateChanged.addEventListener(this._ruler.onViewportChanged.bind(this._ruler));this._ruler.loadMarks(f)},i}(),r,i;t.Renderer=u;r=null;t.getViewportController=f;i=null;t.getRenderer=e})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(){var i=this;this._isDisabled=!1;this.id="stopCollection";this.label=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarStopCollectionButton");this.ariaLabel=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarStopCollectionAriaLabel");this.tooltip=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarStopCollectionTooltip");this.type=1;this.iconEnabled="vs-image-toolbar-stopcollection";this.iconDisabled="vs-image-toolbar-stopcollection-disabled";this.displayOnToolbar=!0;this.displayOnContextMenu=!1;this.checkStopCollection();t.getCurrentSession().addStateChangedEventListener(function(){return i.checkStopCollection()})}return i.prototype.callback=function(){t.getCurrentSession().stopCollection()},i.prototype.hidden=function(){return!1},i.prototype.disabled=function(){return this._isDisabled},i.prototype.checkStopCollection=function(){var n=this;t.getCurrentSession().canStopCollection().then(function(t){n._isDisabled=!t;n.onDisabledChanged&&n.onDisabledChanged()})},i}();t.StopCollectionCommand=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function t(){}return t.OneHourInNs=n.BigNumber.convertFromNumber(36e11),t.MinSelectionInPixels=10,t.InfobarRendererPriority=0,t.ToolbarRendererPriority=5,t.RulerRendererPriority=10,t}();n.SwimlaneViewConstants=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(r,u,f,e,o,s){var h=this;this._cachedPoints=[];this._drawFill=!1;this._dataWarehouseRequestHandle=1;this._droppedRequest=!1;this._currentTimespan=new t.JsonTimespan(t.BigNumber.zero,t.BigNumber.zero);this._seriesMin=0;this._seriesMax=0;this._newDataEvent=new t.AggregatedEvent;this._samples=250;this._currentTimespan=u;this._title=o;this._tooltip=s;this._unitConverter=f;this._colorScheme=e;this._drawFill=typeof e.lineFillColor=="string"&&e.lineFillColor!=="";this._marker=document.createElement("div");this._marker.classList.add("countersDataSeries-marker");this._marker.style.backgroundColor=this._colorScheme.lineColor;this._marker.style.width=2*i.PointRadiusInPixels+"px";this._marker.style.height=2*i.PointRadiusInPixels+"px";n.VisualStudio.DiagnosticsHub.DataWarehouse.loadDataWarehouse().then(function(n){var t={customDomain:{Task:"GetCounter",CounterId:r}};return n.getFilteredData(t,i.analyzerId)}).then(function(n){h._countersResult=n}).done(function(){h._dataWarehouseRequestHandle=null;h._droppedRequest=!1;h.requestUpdate()})}return Object.defineProperty(i,"analyzerId",{get:function(){return"66EDDDF1-2277-40F3-983A-6FF57A433ECB"},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"minValue",{get:function(){return this._seriesMin},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxValue",{get:function(){return this._seriesMax},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"marker",{get:function(){return this._marker},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"title",{get:function(){return this._title},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltip",{get:function(){return this._tooltip},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"newDataEvent",{get:function(){return this._newDataEvent},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this._countersResult.dispose();this._newDataEvent.dispose()},i.prototype.onViewportChanged=function(n){this._currentTimespan=n;this.requestUpdate()},i.prototype.onDataUpdate=function(n){var t=this._cachedPoints.length;this._currentTimespan.contains(n)||t===0?this.requestUpdate():t>0&&this._currentTimespan.end.greater(this._cachedPoints[t-1].Timestamp)&&this.requestUpdate()},i.prototype.getPointAtTimestamp=function(i,r){var u,e,f;if(typeof r=="undefined"&&(r=1),this._cachedPoints.length===0)return null;u={Timestamp:i,Value:0};e=function(n,t){return t.Timestamp.greater(n.Timestamp)};switch(r){case 0:f=t.Utilities.findLessThan(this._cachedPoints,u,e);u=this._cachedPoints[f];break;case 2:f=t.Utilities.findGreaterThan(this._cachedPoints,u,e);u=this._cachedPoints[f];break;case 1:default:var o=t.Utilities.findLessThan(this._cachedPoints,u,e),s=Math.min(o+1,this._cachedPoints.length-1),h=t.BigNumber.subtract(i,this._cachedPoints[o].Timestamp),c=t.BigNumber.subtract(this._cachedPoints[s].Timestamp,i),f=h.greater(c)?s:o;u=this._cachedPoints[f]}return{timestamp:u.Timestamp,tooltip:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ChartSeriesFormattableTooltipLabel",this._unitConverter.formatNumber(u.Value)),value:u.Value,color:this._colorScheme}},i.prototype.draw=function(r,u){var f,e,o,s;this._cachedPoints.length===0||u.gridX.elapsed.equals(t.BigNumber.zero)||u.chartRect.width<=0||(u.chartRect.width!==this._samples&&(this._samples=u.chartRect.width,this.requestUpdate()),f=function(n){return u.chartRect.height-t.Utilities.scaleToRange(n,u.gridY.min,u.gridY.max,0,u.chartRect.height)},e=function(n){return t.Utilities.convertToPixel(n,u.gridX,u.chartRect.width,!1)},r.save(),r.lineWidth=u.chartRect.height<100?1:2,r.fillStyle=this._colorScheme.lineFillColor,r.strokeStyle=this._colorScheme.lineColor,o=n.Plugin.F12?0:e(this._cachedPoints[0].Timestamp),r.beginPath(),r.moveTo(o,f(this._cachedPoints[0].Value)),this._cachedPoints.forEach(function(n){return r.lineTo(e(n.Timestamp),f(n.Value))}),r.stroke(),this._drawFill&&(r.lineTo(e(this._cachedPoints[this._cachedPoints.length-1].Timestamp),f(u.gridY.min)),r.lineTo(o,u.chartRect.height),r.closePath(),r.fill()),s=t.BigNumber.divideNumber(u.gridX.elapsed,u.chartRect.width),t.BigNumber.convertFromNumber(i.CounterFrequencyPerPixel).greater(s)&&this._cachedPoints.forEach(function(n){r.beginPath();r.arc(e(n.Timestamp),f(n.Value),i.PointRadiusInPixels,0,2*Math.PI);r.fill()}),r.restore())},i.prototype.requestUpdate=function(){var n=this;if(this._dataWarehouseRequestHandle){this._droppedRequest=!0;return}this._dataWarehouseRequestHandle=window.setTimeout(function(){if(n._currentTimespan.elapsed.equals(t.BigNumber.zero)){n._dataWarehouseRequestHandle=null;return}var r=t.BigNumber.divideNumber(n._currentTimespan.elapsed,2),u=t.BigNumber.subtract(n._currentTimespan.begin,t.BigNumber.min(r,n._currentTimespan.begin)),i=t.BigNumber.multiply(t.BigNumber.divide(u,n._currentTimespan.elapsed),n._currentTimespan.elapsed),f=t.BigNumber.add(i,t.BigNumber.multiplyNumber(n._currentTimespan.elapsed,3)),e={type:"SamplePoints",begin:i.jsonValue,end:f.jsonValue,samples:Math.max(n._samples,2)};n._countersResult.getResult(e).then(function(t){return n.cachePoints(t)}).done(function(){n._dataWarehouseRequestHandle=null;n._droppedRequest&&(window.setTimeout(n.requestUpdate.bind(n),t.Constants.TimeoutImmediate),n._droppedRequest=!1)})},t.Constants.TimeoutImmediate)},i.prototype.cachePoints=function(n){var i=this;this._cachedPoints=n.p.map(function(n){var r=new t.BigNumber(n.t.h,n.t.l);return i._seriesMin=Math.min(i._seriesMin,n.v),i._seriesMax=Math.max(i._seriesMax,n.v),{Timestamp:r,Value:n.v,ToolTip:n.tt}});this._newDataEvent.invokeEvent(this)},i.PointRadiusInPixels=2.5,i.CounterFrequencyPerPixel=1e8/(i.PointRadiusInPixels*2+4),i}();t.CountersDataSeries=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(i,r,u,f,e,o,s){var h=this;this._context={};this._dataWarehouseRequestHandle=1;this._droppedRequest=!1;this._minValue=Number.MAX_VALUE;this._maxValue=Number.MIN_VALUE;this._sampledPoints=[];this._data=[];this._width=250;this._newDataEvent=new t.AggregatedEvent;this._analyzerId=i.AnalyzerId;this._viewport=r;this._title=f;this._formattableTooltipText=e||n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ChartSeriesFormattableTooltipLabel");this._unitConverter=s;this._color=o;this._drawFill=typeof o.lineFillColor=="string"&&o.lineFillColor!=="";this._marker=document.createElement("div");this._marker.classList.add("countersDataSeries-marker");this._marker.style.backgroundColor=o.lineColor;this._marker.style.width="5px";this._marker.style.height="5px";this._bufferAllData=u;this._context.timeDomain=this._viewport;this._context.customDomain=i.CustomDomain||{};this._context.customDomain.Task="GetCounter";this._context.customDomain.CounterId=i.CounterId;this._context.customDomain.Width=this._width.toString();n.VisualStudio.DiagnosticsHub.DataWarehouse.loadDataWarehouse().done(function(n){h._dataWarehouseHandle=n;h._dataWarehouseRequestHandle=null;h._droppedRequest=!1;h.requestUpdate()})}return Object.defineProperty(i.prototype,"minValue",{get:function(){return this._minValue},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxValue",{get:function(){return this._maxValue},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"marker",{get:function(){return this._marker},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"title",{get:function(){return this._title},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"newDataEvent",{get:function(){return this._newDataEvent},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this._newDataEvent.dispose()},i.prototype.onDataUpdate=function(){t.Debug.Assert.isFalse(this._bufferAllData,"Perf: Should not buffer all data in live scenarios");this.requestUpdate()},i.prototype.onViewportChanged=function(n){this._viewport=n;this._bufferAllData?this.updatePointSampling(this._viewport):this.requestUpdate()},i.prototype.draw=function(i,r){var u,f,e,o;this._sampledPoints.length!==0&&(r.chartRect.width!==this._width&&(this._width=r.chartRect.width||1,this._bufferAllData?this.updatePointSampling(this._viewport):this.requestUpdate()),u=function(n){return t.Utilities.convertToPixel(n.Timestamp,r.gridX,r.chartRect.width,!1)},f=function(n){return r.chartRect.height-t.Utilities.scaleToRange(n.Value,r.gridY.min,r.gridY.max,0,r.chartRect.height)},i.save(),i.lineWidth=r.chartRect.height<100?1:2,i.fillStyle=this._color.lineFillColor,i.strokeStyle=this._color.lineColor,e=n.Plugin.F12?0:u(this._sampledPoints[0]),i.beginPath(),i.moveTo(e,f(this._sampledPoints[0])),this._sampledPoints.forEach(function(n){return i.lineTo(u(n),f(n))}),i.stroke(),this._drawFill&&(o=r.chartRect.height-t.Utilities.scaleToRange(0,r.gridY.min,r.gridY.max,0,r.chartRect.height),i.lineTo(u(this._sampledPoints[this._sampledPoints.length-1]),o),i.lineTo(e,o),i.closePath(),i.fill()),i.restore())},i.prototype.getPointAtTimestamp=function(n,i){var r,f,e,o,u,s;if(typeof i=="undefined"&&(i=1),this._sampledPoints.length===0)return null;r={Timestamp:n,Value:0};f=function(n,t){return t.Timestamp.greater(n.Timestamp)};switch(i){case 0:e=t.Utilities.findLessThan(this._sampledPoints,r,f);r=this._sampledPoints[e];break;case 2:e=t.Utilities.findGreaterThan(this._sampledPoints,r,f);r=this._sampledPoints[e];break;case 1:o=t.Utilities.findLessThan(this._sampledPoints,r,f);u=this._sampledPoints[o];o===this._sampledPoints.length-1||this._sampledPoints[0].Timestamp.greater(n)?(r.Value=u.Value,r.Timestamp=u.Timestamp):(s=this._sampledPoints[Math.min(o+1,this._sampledPoints.length-1)],r.Value=t.Utilities.linearInterpolate(n,u.Timestamp,u.Value,s.Timestamp,s.Value))}return{timestamp:r.Timestamp,tooltip:t.Utilities.formatString(this._formattableTooltipText,this._unitConverter.formatNumber(r.Value)),color:this._color,value:r.Value}},i.prototype.updatePointSampling=function(n){var r=this,l,h;if(this._data.length!==0){l=2;this._sampledPoints=[];var s=new t.JsonTimespan(this._data[0].Timestamp,this._data[this._data.length-1].Timestamp),u=t.BigNumber.divideNumber(n.elapsed,this._width),f=function(n,t){return t.Timestamp.greater(n.Timestamp)},i={Timestamp:t.BigNumber.zero,Value:0},a=Math.floor(parseInt(t.BigNumber.subtract(n.begin,s.begin).value)/parseInt(u.value)),e=t.BigNumber.add(t.BigNumber.multiplyNumber(u,a),s.begin),v=t.BigNumber.add(t.BigNumber.add(e,n.elapsed),u);i.Timestamp=e;h=t.Utilities.findLessThan(this._data,i,f);i.Timestamp=v;var y=t.Utilities.findGreaterThan(this._data,i,f),c=function(n,t){for(var f=r._data[n],i=0,u=n;u<=t;++u)i=Math.max(i,r._data[u].Value);return{Timestamp:f.Timestamp,ToolTip:f.ToolTip,Value:i}},o=function(n,e,s,h){var l,v;if(h>=s-e)for(l=e;l<=s;++l)r._sampledPoints.push(c(l,l));else if(h===1)r._sampledPoints.push(c(e,s));else{var a=Math.floor(h/2),p=h-a,y=t.BigNumber.add(n,t.BigNumber.multiplyNumber(u,a));i.Timestamp=y;v=t.Utilities.findLessThan(r._data,i,f,e,s);o(n,e,v,a);o(y,v,s,p)}};o(e,h,y,this._width)}},i.prototype.requestUpdate=function(){var n=this;if(this._dataWarehouseRequestHandle){this._droppedRequest=!0;return}this._dataWarehouseRequestHandle=window.setTimeout(function(){n._context.timeDomain=n._viewport;n._context.customDomain.Width=n._width.toString();n._dataWarehouseHandle.getFilteredData(n._context,n._analyzerId).then(function(n){return typeof n.getResult=="function"?n.getResult(null).then(function(t){return n.dispose(),t}):n}).then(function(n){return n.p}).then(function(t){return n.convertDtoToIPointArray(t)}).then(function(t){return n.cachePoints(t)}).done(function(){n._newDataEvent.invokeEvent(n);n._dataWarehouseRequestHandle=null;n._droppedRequest&&(window.setTimeout(n.requestUpdate.bind(n),t.Constants.TimeoutImmediate),n._droppedRequest=!1)})},t.Constants.TimeoutImmediate)},i.prototype.convertDtoToIPointArray=function(n){return n.map(function(n){return{Timestamp:new t.BigNumber(n.t.h,n.t.l),Value:n.v,ToolTip:n.tt,CustomData:n.d}})},i.prototype.cachePoints=function(n){var t=this,i;(this._data=[],this._maxValue=Number.MIN_VALUE,this._minValue=Number.MAX_VALUE,n&&n.length!==0)&&(i=n[0],this._data=n.filter(function(n){return!n.Timestamp||!n.Timestamp.greaterOrEqual(i.Timestamp)?!1:(t._maxValue=Math.max(t._maxValue,n.Value),t._minValue=Math.min(t._minValue,n.Value),i=n,!0)}),this._bufferAllData?this.updatePointSampling(this._viewport):this._sampledPoints=this._data)},i}();t.CustomCounterDataSeries=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(i,r){var u=this;this._logger=n.VisualStudio.DiagnosticsHub.getLogger();this._defaultColorScheme=new t.ChartColorScheme("rgb(118, 174, 200)","rgba(118, 174, 200, 0.65)");this._currentTimespan=new t.JsonTimespan(t.BigNumber.zero,t.BigNumber.zero);this._dataSeries=[];this._clientWidth=0;this._clientHeight=0;this._scaleIncreaseRatio=1.1;this._scaleChangedEvent=new t.AggregatedEvent;this._container=document.createElement("div");this._container.classList.add("graphContainer");this._container.tabIndex=0;this._canvas=document.createElement("canvas");this._canvas.classList.add("graph-canvas");this._context=this._canvas.getContext("2d");this._unitConverter=new t.LocalizedUnitConverter(i.jsonConfig.Units,i.resources);this._currentTimespan=i.timeRange;this._scaleMin=i.scale.minimum;this._scaleMax=i.scale.maximum;this._isScaleFixed=i.scale.isFixed;this._onNewSeriesDataBoundFunction=this.onNewSeriesData.bind(this);i.jsonConfig.Unit&&(i.unit=i.resources[i.jsonConfig.Unit]);this._container.appendChild(this._canvas);i.jsonConfig.Series.forEach(function(n){var r,f=n.Color?new t.ChartColorScheme(n.Color.Line,n.Color.Fill):u._defaultColorScheme,e;n.DataSource.AnalyzerId.toLowerCase()===t.CountersDataSeries.analyzerId.toLowerCase()?r=new t.CountersDataSeries(n.DataSource.CounterId,u._currentTimespan,u._unitConverter,f,i.resources[n.Legend],i.resources[n.LegendTooltip]):(e=!i.jsonConfig.RefreshDataOnResizeAndZoom,r=new t.CustomCounterDataSeries(n.DataSource,u._currentTimespan,e,i.resources[n.Legend],i.resources[n.LegendTooltip],f,u._unitConverter));i.legend.push({legendText:r.title,legendTooltip:r.tooltip,marker:r.marker});r.newDataEvent.addEventListener(u._onNewSeriesDataBoundFunction);u._dataSeries.push(r)});r&&r.forEach(function(n){n.newDataEvent.addEventListener(u._onNewSeriesDataBoundFunction);u._dataSeries.push(n)});this._dataCursor=new t.DataCursor(this._container,this._dataSeries,this._currentTimespan,i.swimlaneId,this._scaleMin,this._scaleMax);this._scaleChangedEvent.addEventListener(this._dataCursor.onScaleChanged.bind(this._dataCursor));this._container.appendChild(this._dataCursor.container)}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"scaleChangedEvent",{get:function(){return this._scaleChangedEvent},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){var n=this;this._dataCursor.dispose();this._dataSeries.forEach(function(t){t.newDataEvent.removeEventListener(n._onNewSeriesDataBoundFunction);t.dispose&&t.dispose()});this._scaleChangedEvent.dispose()},i.prototype.resize=function(n){var t=this._container.clientWidth||1,i=this._container.clientHeight;(this._clientWidth!==t||this._clientHeight!==i)&&(this._clientWidth=t,this._clientHeight=i,this._canvas.width=this._clientWidth,this._canvas.height=this._clientHeight,this._dataCursor.resize(n),this.draw())},i.prototype.onDataUpdate=function(n){this._dataSeries.forEach(function(t){if(t.onDataUpdate)t.onDataUpdate(n)})},i.prototype.addSeriesData=function(){},i.prototype.removeInvalidPoints=function(){},i.prototype.render=function(){},i.prototype.onViewportChanged=function(n){var t=this;if(!n.isIntermittent&&!this._currentTimespan.equals(n.currentTimespan)){this._currentTimespan=n.currentTimespan;this._dataCursor.onViewportChanged(n);this._dataSeries.forEach(function(n){n.onViewportChanged(t._currentTimespan)});this.draw()}},i.prototype.onNewSeriesData=function(n){var t=!1,i;!this._isScaleFixed&&!isNaN(n.minValue)&&n.minValue<this._scaleMin&&(this._scaleMin=n.minValue,t=!0);!this._isScaleFixed&&!isNaN(n.maxValue)&&n.maxValue*this._scaleIncreaseRatio>this._scaleMax&&(this._scaleMax=n.maxValue*this._scaleIncreaseRatio,t=!0);this.draw();t&&(i=this._unitConverter.scaleValue(this._scaleMax),this._scaleChangedEvent.invokeEvent({minimum:this._scaleMin,maximum:this._scaleMax,unit:i.unit}))},i.prototype.draw=function(){var i=this,n;this._context.clearRect(0,0,this._clientWidth,this._clientHeight);this._context.save();n={gridX:this._currentTimespan,gridY:new t.MinMaxNumber(this._scaleMin,this._scaleMax),chartRect:new t.RectangleDimension(0,0,this._clientWidth,this._clientHeight)};this._dataSeries.forEach(function(t){t.draw(i._context,n)});this._context.restore()},i}();t.MultiSeriesGraph=i;n.VisualStudio.DiagnosticsHub.RegisterNamespace.registerClass("Microsoft.VisualStudio.DiagnosticsHub.MultiSeriesGraph")})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(n,i,r,u,f,e){var o=this;this._parentClientWidth=0;this._parentClientHeight=0;this._timePerPixel=t.BigNumber.one;this._cursors=[];this._showingTooltip=!1;this._tooltipTimer=null;this._telemetry=new t.Telemetry.ViewportController;this._parent=n;this._series=i;this._viewport=r;this._previousTime=this._viewport.begin;this._scaleMin=f;this._scaleMax=e;this._container=document.createElement("div");this._container.classList.add("dataCursor");this._container.classList.add("hidden");this._cursors=i.map(function(n){var t=n.marker.cloneNode(!0),i,r;return t.classList.add("dataCursorPoint"),document.body.appendChild(t),i=t.clientWidth+2,r=t.clientHeight+2,document.body.removeChild(t),t.style.left=-i/2+"px",t.style.width=i+"px",t.style.height=r+"px",o._container.appendChild(t),{domElement:t,width:i,height:r}});this._swimlaneId=u;this._onMouseEnterBoundFunction=this.onMouseEnter.bind(this);this._onMouseMoveBoundFunction=this.onMouseMove.bind(this);this._onMouseLeaveBoundFunction=this.onMouseLeave.bind(this);this._onKeyDownBoundFunction=this.onKeyDown.bind(this);this._parent.setAttribute("role","slider");this._parent.setAttribute("aria-live","polite");this._parent.addEventListener("mouseenter",this._onMouseEnterBoundFunction);this._parent.addEventListener("mousemove",this._onMouseMoveBoundFunction);this._parent.addEventListener("mouseleave",this._onMouseLeaveBoundFunction);this._parent.addEventListener("keydown",this._onKeyDownBoundFunction)}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this._parent.removeEventListener("mouseenter",this._onMouseEnterBoundFunction);this._parent.removeEventListener("mousemove",this._onMouseMoveBoundFunction);this._parent.removeEventListener("mouseleave",this._onMouseLeaveBoundFunction);this._parent.removeEventListener("keydown",this._onKeyDownBoundFunction)},i.prototype.resize=function(){this._parentClientWidth=this._parent.clientWidth;this._parentClientHeight=this._parent.clientHeight;this._timePerPixel=this._parentClientWidth!==0?t.BigNumber.divideNumber(this._viewport.elapsed,this._parentClientWidth):t.BigNumber.one},i.prototype.onViewportChanged=function(n){this._viewport.equals(n.currentTimespan)||(this._viewport=n.currentTimespan,this._previousTime=this._viewport.begin,this._timePerPixel=this._parentClientWidth!==0?t.BigNumber.divideNumber(this._viewport.elapsed,this._parentClientWidth):t.BigNumber.one,this.dismissTooltip(),this._container.classList.add("hidden"))},i.prototype.onScaleChanged=function(n){this._scaleMax=n.maximum;this._scaleMax=n.maximum},i.prototype.onKeyDown=function(n){var f,e,u,r,i;(n.keyCode===37||n.keyCode===39)&&(n.preventDefault(),f=n.currentTarget.getBoundingClientRect(),e=this._previousTime,n.keyCode===39?(this._previousTime=t.BigNumber.add(this._previousTime,this._timePerPixel),u=2):(this._previousTime=this._previousTime.greater(this._timePerPixel)?t.BigNumber.subtract(this._previousTime,this._timePerPixel):t.BigNumber.zero,u=0),r=this.getPointsAt(this._previousTime,u),r.length!==0)&&(i=r[0].seriesElement.timestamp,(i.equals(e)||i.greater(this._viewport.end)||this._viewport.begin.greater(i))&&(this._previousTime=n.keyCode===39?this._viewport.begin:this._viewport.end,r=this.getPointsAt(this._previousTime,u),i=r[0].seriesElement.timestamp),this._previousTime=i,this.updateCursorLocation(i,r),this.dismissTooltip(),this.displayTooltip(f,i,r))},i.prototype.onMouseEnter=function(){this._container.classList.remove("hidden")},i.prototype.onMouseMove=function(n){var f=n.currentTarget.getBoundingClientRect(),r=t.Utilities.getTimestampAtPixel(n.clientX-f.left,this._parentClientWidth,this._viewport),u;if(!r.equals(this._previousTime)){if(this._previousTime=r,f=n.currentTarget.getBoundingClientRect(),u=this.getPointsAt(r),u.length===0){this._container.classList.add("hidden");return}var e=u[0].seriesElement.timestamp,s=t.BigNumber.subtract(t.BigNumber.max(e,r),t.BigNumber.min(e,r)),h=t.BigNumber.multiplyNumber(this._timePerPixel,i.SnapThresholdInPixels),o=s.greater(h);o?(this._container.classList.add("interpolating"),this.updateCursorLocation(r,u)):(this._container.classList.remove("interpolating"),this.updateCursorLocation(e,u));this.dismissTooltip();this.displayTooltip(f,r,u,o)}},i.prototype.onMouseLeave=function(n){var i=t.Utilities.getTimestampAtPixel(n.x,this._parentClientWidth,this._viewport);this._showingTooltip&&i.equals(this._previousTime)||(this.dismissTooltip(),this._container.classList.add("hidden"),this._previousTime=this._viewport.begin)},i.prototype.getPointsAt=function(n,i){var r=this;return typeof i=="undefined"&&(i=1),this._series.map(function(t,u){return{seriesElement:t.getPointAtTimestamp(n,i),cursor:r._cursors[u]}}).filter(function(n){return n.seriesElement!==null}).sort(function(i,r){var u=t.BigNumber.subtract(t.BigNumber.max(n,i.seriesElement.timestamp),t.BigNumber.min(n,i.seriesElement.timestamp)),f=t.BigNumber.subtract(t.BigNumber.max(n,r.seriesElement.timestamp),t.BigNumber.min(n,r.seriesElement.timestamp));return u.compareTo(f)}).filter(function(n,i,u){var f=t.BigNumber.subtract(t.BigNumber.max(u[0].seriesElement.timestamp,n.seriesElement.timestamp),t.BigNumber.min(u[0].seriesElement.timestamp,n.seriesElement.timestamp));return r._timePerPixel.greater(f)})},i.prototype.updateCursorLocation=function(n,i){var r=this,u=t.Utilities.convertToPixel(n,this._viewport,this._parentClientWidth);this._container.style.left=Math.floor(u)+"px";this._cursors.forEach(function(n){return n.domElement.style.visibility="hidden"});i.forEach(function(n){if(typeof n.seriesElement.value=="number"){var i=t.Utilities.scaleToRange(n.seriesElement.value,r._scaleMin,r._scaleMax,0,r._parentClientHeight);n.cursor.domElement.style.bottom=i-n.cursor.height/2+"px";n.cursor.domElement.style.visibility="visible"}else n.cursor.domElement.style.visibility="visible"});this._container.classList.remove("hidden")},i.prototype.displayTooltip=function(i,r,u,f){var h=this,c,e,o,s;typeof f=="undefined"&&(f=!1);this._tooltipTimer=null;this._showingTooltip=!0;c=t.Utilities.convertToPixel(r,this._viewport,this._parentClientWidth);e=u.map(function(n){return n.seriesElement.tooltip});f&&e.unshift(n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/DataCursorInterpolatingTooltip"));e.length>0&&(o=e.join("\n"),s=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ChartSeriesFormattableTimeLabel",t.RulerUtilities.formatTime(r,1))+"\n"+o,this._parent.setAttribute("aria-valuenow",s),this._parent.setAttribute("aria-valuetext",s),this._tooltipTimer=setTimeout(function(){var u=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ChartSeriesFormattableTimeLabel",t.RulerUtilities.formatTime(r))+"\n"+o,f={content:u,delay:0,x:c+i.left+10,y:i.top};n.Plugin.Tooltip.show(f);h._telemetry.showGraphTooltip(h._swimlaneId)},t.Constants.TooltipTimeoutMs))},i.prototype.dismissTooltip=function(){clearTimeout(this._tooltipTimer);this._tooltipTimer=null;this._showingTooltip=!1;n.Plugin.Tooltip.dismiss()},i.SnapThresholdInPixels=10,i}();t.DataCursor=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(i){this._clientWidth=0;this._clientHeight=0;this._container=document.createElement("canvas");this._container.className="gridLines";this._container.style.zIndex=t.Constants.GridLineZIndex.toString();this._context=this._container.getContext("2d");this._context.lineWidth=1;this._strokeStyle=n.Plugin.Theme.getValue("diagnostics-host-graph-line");this._currentTimespan=i;this._onThemeChangeBoundFunction=this.onThemeChange.bind(this);n.Plugin.Theme.addEventListener("themechanged",this._onThemeChangeBoundFunction)}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){n.Plugin.Theme.removeEventListener("themechanged",this._onThemeChangeBoundFunction)},i.prototype.resize=function(){this._clientWidth=this._container.clientWidth;this._clientHeight=this._container.clientHeight;this._container.width=this._clientWidth;this._container.height=this._clientHeight;this.render()},i.prototype.onViewportChanged=function(n){this._currentTimespan.equals(n.currentTimespan)||(this._currentTimespan=n.currentTimespan,this.render())},i.prototype.onThemeChange=function(){this._strokeStyle=n.Plugin.Theme.getValue("diagnostics-host-graph-line");this.render()},i.prototype.render=function(){var n=this,i=t.RulerUtilities.getTickMarksPosition(this._currentTimespan,this._clientWidth),r=parseInt(this._currentTimespan.elapsed.value);this._context.clearRect(0,0,this._clientWidth,this._clientHeight);this._context.strokeStyle=this._strokeStyle;i.forEach(function(i){if(i.type===0){var u=Math.round(n._clientWidth*parseInt(t.BigNumber.subtract(i.value,n._currentTimespan.begin).value)/r);n._context.beginPath();n._context.moveTo(u+.5,0);n._context.lineTo(u+.5,n._clientHeight);n._context.stroke()}})},i}();t.GridLineRenderer=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function n(n,t){var i=this;this._subscriptions=[];this._toolName=n.toolName;this._toolId=n.toolId;this._isActive=ko.observable((n.toolState&1)==1);this._isSupported=ko.observable((n.toolState&2)==2);this._hasFocus=ko.observable(!1);this._subscriptions.push(this._isActive.subscribe(function(n){t.setToolEnabled(i._toolId,n)}))}return Object.defineProperty(n.prototype,"toolName",{get:function(){return this._toolName},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"toolId",{get:function(){return this._toolId},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isActive",{get:function(){return this._isActive},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isSupported",{get:function(){return this._isSupported},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hasFocus",{get:function(){return this._hasFocus},enumerable:!0,configurable:!0}),n.prototype.dispose=function(){this._subscriptions.forEach(function(n){n.dispose()})},n}(),r=function(){function r(){var n=this;this._toolsChangedInfoBarVisible=!1;this._previousActiveStates={};this._flyoutVisible=ko.observable(!1);this._tools=ko.observableArray();this._onToolStateChangedBoundFunction=this.onToolStateChanged.bind(this);this._settingsViewModel=new u(function(){return n.onSettingsClicked()});this._toolsService=new t.PerformanceDebuggerToolsService;this._infoBarService=t.getInfoBarService();this._subscription=this._flyoutVisible.subscribe(function(t){return n.onFlyoutVisibilityChanged(t)});this._telemetry=new t.Telemetry.PerformanceDebugger;this._toolsService.getAvailableToolsInformationAndState().done(function(t){t.forEach(function(t){var r=new i(t,n._toolsService);n._tools.push(r)});n._toolsService.toolStateChangedEvent.addEventListener(n._onToolStateChangedBoundFunction)})}return Object.defineProperty(r.prototype,"flyoutVisible",{get:function(){return this._flyoutVisible},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"tools",{get:function(){return this._tools},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"toolSettingsItem",{get:function(){return this._settingsViewModel},enumerable:!0,configurable:!0}),r.prototype.dispose=function(){this._toolsService.toolStateChangedEvent.removeEventListener(this._onToolStateChangedBoundFunction);this._subscription.dispose();this._tools().forEach(function(n){return n.dispose()})},r.prototype.onFlyoutVisibilityChanged=function(t){var i=this;if(t){this.saveToolState();this._telemetry.selectToolsDropdown();return}!this._toolsChangedInfoBarVisible&&this.isToolStateDirty()&&(this._toolsChangedInfoBarVisible=!0,this._infoBarService.addInfoMessage(n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolSelectionChangesNextDebugSession"),null,function(){i._toolsChangedInfoBarVisible=!1}))},r.prototype.onToolStateChanged=function(n){var t=this;n.toolsState.forEach(function(n){for(var i=0;i<t._tools().length;++i)if(n.toolId===t._tools()[i].toolId){t._tools()[i].isActive((n.toolState&1)==1);t._tools()[i].isSupported((n.toolState&2)==2);break}t.saveToolState()})},r.prototype.saveToolState=function(){var n=this;this._tools().forEach(function(t){n._previousActiveStates[t.toolId]=t.isActive()})},r.prototype.isToolStateDirty=function(){var n=this;return this._tools().some(function(t){return n._previousActiveStates[t.toolId]!==t.isActive()})},r.prototype.onSettingsClicked=function(){this.flyoutVisible(!1);this._toolsService.invokeSettingsDialog()},r}(),u=function(){function t(n){this._clickHandler=n;this._hasFocus=ko.observable(!1)}return Object.defineProperty(t.prototype,"label",{get:function(){return n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolSelectionSettingsText")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ariaLabel",{get:function(){return n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolSelectionSettingsAriaLabel")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasFocus",{get:function(){return this._hasFocus},enumerable:!0,configurable:!0}),t.prototype.clickCommand=function(){this._clickHandler()},t}(),f=function(){function i(){var f=this,e,i,u;this.registerKnockoutBindings();this._container=document.createElement("div");this._container.id="toolSelectionControl";this._container.innerHTML=document.getElementById("toolSelectionView").innerHTML;this._viewModel=new r;this._flyout=t.Utilities.findChildById(this._container,"toolSelectionFlyout");this._flyout.style.zIndex=t.Constants.DropDownMenuZIndex.toString();e=function(){var n=window.innerHeight-f._dropDownButton.offsetHeight;f._flyout.style.maxHeight=Math.min(n,120)+"px"};this._onWindowResizeBoundFunction=t.eventThrottler(e,t.Constants.WindowResizeThrottle);window.addEventListener("resize",this._onWindowResizeBoundFunction);this._dropDownButton=t.Utilities.findChildById(this._container,"toolSelectionDropdown");this._dropDownButton.style.zIndex=(t.Constants.DropDownMenuZIndex+1).toString();this._dropDownButton.onclick=this.toggleFlyout.bind(this);this._dropDownButton.onkeydown=this.onKeyDown.bind(this);i=t.Utilities.findChildById(this._dropDownButton,"toolSelectionDropdownImage");i.appendChild(t.Utilities.getSVGPlaceHolder("vs-image-tools-settings"));n.Plugin.Theme.processInjectedSvg(i);u=t.Utilities.findChildById(this._flyout,"settingsItemImage");u.appendChild(t.Utilities.getSVGPlaceHolder("vs-image-tools-settings"));n.Plugin.Theme.processInjectedSvg(u);this._onMouseDownBoundFunction=this.onMouseDown.bind(this);window.addEventListener("mousedown",this._onMouseDownBoundFunction);ko.applyBindings(this._viewModel,this.container)}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this._dropDownButton.onclick=null;this._dropDownButton.onkeydown=null;window.removeEventListener("mousedown",this._onMouseDownBoundFunction);window.removeEventListener("resize",this._onWindowResizeBoundFunction);this._viewModel.dispose()},i.prototype.onKeyDown=function(n){n.keyCode===40?this._viewModel.flyoutVisible(!0):n.keyCode===13&&this.toggleFlyout()},i.prototype.toggleFlyout=function(){var n=this._viewModel.flyoutVisible();this._viewModel.flyoutVisible(!n)},i.prototype.onMouseDown=function(n){if(this._viewModel.flyoutVisible()){var i=this._flyout.getBoundingClientRect(),r=this._dropDownButton.getBoundingClientRect();t.Utilities.containsPoint(i,n.clientX,n.clientY)||t.Utilities.containsPoint(r,n.clientX,n.clientY)||this._viewModel.flyoutVisible(!1)}},i.prototype.registerKnockoutBindings=function(){ko.bindingHandlers.focus||(ko.bindingHandlers.focus={previousElement:null,init:function(n,t){var i=function(){var r=t(),i;ko.bindingHandlers.focus.previousElement&&ko.bindingHandlers.focus.previousElement!==n&&(i=document.createEvent("Event"),i.initEvent("blur",!1,!1),ko.bindingHandlers.focus.previousElement.dispatchEvent(i));r()||r(!0);ko.bindingHandlers.focus.previousElement=n},r=function(){var n=t();!n()||n(!1)};n.addEventListener("focus",i);n.addEventListener("blur",r)},update:function(n,t){ko.unwrap(t())?n.focus():n.blur()}})},i}();t.ToolSelectionDropDownControl=f})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function n(n){this._container=document.createElement("div");this._container.classList.add("main-usermessage-container");var t=document.createElement("span");t.classList.add("usermessage-message");t.innerHTML=n;this._container.appendChild(t)}return Object.defineProperty(n.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),n}();n.UserMessageControl=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function n(n,t,i){this._container=document.createElement("div");this._container.classList.add("graph-axis-line");n.isThresholdAxis&&this._container.classList.add("threshold-axis");this._value=n.value;this.updatePosition(t,i)}return Object.defineProperty(n.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),n.prototype.onScaleChangedEvent=function(n){this.updatePosition(n.minimum,n.maximum)},n.prototype.updatePosition=function(n,t){if(this._value<n||this._value>t)this._container.style.display="none";else{this._container.style.display="block";var i=(this._value-n)/(t-n)*100;this._container.style.top=100-i+"%"}},n}();n.Axes=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(i){var r=this;if(!i)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1002"));this._container=document.createElement("div");this._container.className="legend-container";i.forEach(function(n){var i,f,u;n.marker?i=n.marker.cloneNode(!0):(i=document.createElement("div"),i.style.backgroundColor=n.color);i.classList.add("legend-marker");i.style.width="1em";i.style.height="1em";f=document.createElement("div");f.classList.add("legend-text-div");f.innerText=n.legendText;u=document.createElement("div");u.classList.add("legend-div");u.appendChild(i);u.appendChild(f);n.legendTooltip&&u.setAttribute("data-plugin-vs-tooltip",JSON.stringify({content:n.legendTooltip,delay:t.Constants.TimeoutImmediate}));r._container.appendChild(u)})}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),i}();t.Legend=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(t,i,r){if(!t)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1002"));this._minimum=t.minimum;this._maximum=t.maximum;this._axes=t.axes;this._unitConverter=r;this._scaleType=i;this._container=document.createElement("div");this._container.className=this._scaleType===0?"graph-scale-left":"graph-scale-right"}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),i.prototype.resize=function(){var n=this._container.clientHeight;this._clientHeight!==n&&(this._clientHeight=n,this.render())},i.prototype.onScaleChanged=function(n){this._minimum=n.minimum;this._maximum=n.maximum;this.render()},i.prototype.render=function(){for(var t,n,i;this._container.childNodes.length>0;)this._container.removeChild(this._container.firstChild);if(t=!1,this._axes&&this._axes.length>0)for(n=0;n<this._axes.length;n++)i=this._axes[n],this.drawAxisValue(i.value),i.isThresholdAxis&&(t=!0);else this.drawAxisValue(this._maximum),this.drawAxisValue(this._minimum);t&&this.drawAxisValue(this._maximum)},i.prototype.drawAxisValue=function(n){var i,u,f,r;n>this._maximum||n<this._minimum||(i=document.createElement("div"),i.className=this._scaleType===0?"graph-axis-left":"graph-axis-right",u=this._unitConverter.scaleValue(n),i.innerHTML=t.Utilities.formatNumber(u.value,0),this._container.appendChild(i),f=0,r=Math.floor((this._maximum-n)/(this._maximum-this._minimum)*this._clientHeight)-i.offsetHeight/2,r=Math.max(0,r),r=Math.min(r,this._clientHeight-i.offsetHeight),i.style.top=r+"px")},i}();t.Scale=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function n(n,t){this._lineColorString="#FF0000";this._lineFillColorString="#FF0000";this._lineColorString=n;this._lineFillColorString=t}return Object.defineProperty(n.prototype,"lineColor",{get:function(){return this._lineColorString},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"lineFillColor",{get:function(){return this._lineFillColorString},enumerable:!0,configurable:!0}),n}();n.ChartColorScheme=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function u(){if(!i)throw new Error("Not initialized correctly");return i}function f(){return i||(i=new r),i}var r=function(){function i(){var u=this,i,r;n.Plugin.Tooltip.defaultTooltipContentToHTML=!1;n.Plugin.VS.Keyboard.setZoomState(!1);i={dataManager:null,containerId:null,isToolbarFloating:!0,isPerformanceDebugger:!0,isSelectionEnabled:!0,isLive:!0,timeInNsPerPixel:6e7};this._onSessionTargetAddFailedBoundFunction=this.onSessionTargetAddFailed.bind(this);this._onStatusMessageUpdateBoundFunction=this.onStatusMessageChanged.bind(this);this._eventAggregator=t.getEventAggregator();this._renderer=n.VisualStudio.DiagnosticsHub.getRenderer(i);r=t.getPerformanceDebuggerStateService();r.isDocumentActiveSession().then(function(n){return u.setupInitialWindow(n)})}return i.prototype.addInfoMessage=function(n,i,r){var f=this,u=new t.InformationBarControl(n,i);u.onClose=function(){f._renderer.removeControl(u);r&&r()};this._renderer.addControl(u,t.SwimlaneViewConstants.InfobarRendererPriority)},i.prototype.setupInitialWindow=function(i){var u=this,r;this._renderer.addToolbarItem(new n.VisualStudio.DiagnosticsHub.ToolSelectionDropDownControl);i?(this._currentSession=n.VisualStudio.DiagnosticsHub.getCurrentSession(),this._eventAggregator.addEventListener("DiagnosticsHub.EventAggregator.SessionTargetAddFailedEvent",this._onSessionTargetAddFailedBoundFunction),this._currentSession.getPerformanceDebuggerSessionTargetProcessInformation().then(function(n){n.addTargetFailureCount>0&&u.onSessionTargetAddFailed()})):(r=t.getPerformanceDebuggerStateService(),r.statusMessageChangedEvent.addEventListener(this._onStatusMessageUpdateBoundFunction),r.getLastNonActiveStatusMessage().then(function(n){return u.showMessage(n)}))},i.prototype.onSessionTargetAddFailed=function(){var t=this;this._eventAggregator.removeEventListener("DiagnosticsHub.EventAggregator.SessionTargetAddFailedEvent",this._onSessionTargetAddFailedBoundFunction);this._currentSession.getPerformanceDebuggerSessionTargetProcessInformation().then(function(i){t.addInfoMessage(n.Plugin.Resources.getString("/DiagnosticsHubResources/InformationPerfDebuggerSingleTarget",i.processName,i.processId))})},i.prototype.onStatusMessageChanged=function(n){this.showMessage(n.statusMessage)},i.prototype.showMessage=function(n){this._userMessage!==null&&typeof this._userMessage!="undefined"&&this._renderer.removeControl(this._userMessage);this._userMessage=new t.UserMessageControl(n);this._renderer.addControl(this._userMessage,t.Renderer.headerSwimlanePriority)},i}(),i=null;t.getInfoBarService=u;t.getPerformanceDebuggerSwimlanesView=f})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(){this._content=[];this._ariaContent=[];this.marks=[]}return i.prototype.getTooltipContent=function(){return this.updateData(),this._content.join("\r\n")},i.prototype.getAriaContent=function(){return this.updateData(),this._ariaContent.join(", ")},i.prototype.push=function(n){(!this.time||this.time>n.time)&&(this.time=n.time);this.marks.push(n)},i.prototype.updateData=function(){var i;if(this._content.length!==this.marks.length)for(this._content=[],this._ariaContent=[],i=0;i<this.marks.length;i++)if(this.marks[i].tooltip!==null&&typeof this.marks[i].tooltip!="undefined"){var r=this.marks[i],u=r.tooltip,f=r.tooltip;u+=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerMarkTooltipLabel",t.RulerUtilities.formatTime(r.time));f+=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerMarkTooltipLabel",t.RulerUtilities.formatTime(r.time,1));this._content.push(u);this._ariaContent.push(f)}},i}();t.AggregatedMarkData=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(t,i){var r=this;this._droppedRequest=!1;this._dataWarehouseRequestHandle=1;this._logger=n.VisualStudio.DiagnosticsHub.getLogger();this._scale=i;this._markId=t.MarkTypeId;this._analyzerId=t.DataSource.AnalyzerId;n.VisualStudio.DiagnosticsHub.DataWarehouse.loadDataWarehouse().done(function(n){var i,f,u;if(r._dataWarehouse=n,i=t.DataSource,r._dataWarehouseContext={customDomain:{CounterId:i.CounterId}},i.CustomDomain)for(f in i.CustomDomain)i.CustomDomain.hasOwnProperty(f)&&(u=i.CustomDomain[f],u!==null&&typeof u!="string"&&(r._logger.warning("Custom domain property '"+f+"' is not a string, it will be converted to string"),u=u.toString()),r._dataWarehouseContext.customDomain[f]=u);r._dataWarehouseRequestHandle=null;r._droppedRequest=!1;r.requestUpdate()})}return i.prototype.onDataUpdate=function(){this.requestUpdate()},i.prototype.dispose=function(){this._countersResult&&this._countersResult.dispose()},i.prototype.requestUpdate=function(){var n=this;if(this._dataWarehouseRequestHandle){this._droppedRequest=!0;return}this._dataWarehouseRequestHandle=window.setTimeout(function(){var i;i=n._countersResult?n._countersResult.getResult(null):n._dataWarehouse.getFilteredData(n._dataWarehouseContext,n._analyzerId).then(function(t){return typeof t.getResult=="function"?(n._countersResult=t,n._countersResult.getResult(null)):t});i.then(function(i){i&&i.p&&i.p.forEach(function(i){var r=new t.BigNumber(i.t.h,i.t.l),u=i.tt||n.formatMarkTooltip(r),f=new t.MarkData(r,u);n._scale.addMark(n._markId,f,!1)})}).done(function(){n._dataWarehouseRequestHandle=null;n._droppedRequest&&(window.setTimeout(n.requestUpdate.bind(n),t.Constants.TimeoutImmediate),n._droppedRequest=!1)})},t.Constants.TimeoutImmediate)},i.prototype.formatMarkTooltip=function(i){return n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/TooltipTimeLabel")+": "+t.RulerUtilities.formatTime(i,0)},i}();t.MarkDataFetcher=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={}))
//# sourceMappingURL=Controls.min.js.map
var __extends,Microsoft;(function(n){(function(n){(function(n){"use strict";var t=function(){function n(){this._eventListeners=[]}return n.prototype.invokeEvent=function(n){this._eventListeners.forEach(function(t){return t(n)})},n.prototype.addEventListener=function(n){this._eventListeners.push(n)},n.prototype.removeEventListener=function(n){var t=this._eventListeners.indexOf(n);t>-1&&this._eventListeners.splice(t,1)},n.prototype.dispose=function(){this._eventListeners=null},n}();n.AggregatedEvent=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio})(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";(function(n){var t=function(){function n(){}return n.isUndefined=function(){},n.isNotUndefined=function(){},n.isNull=function(){},n.isNotNull=function(){},n.isTrue=function(){},n.isFalse=function(){},n.fail=function(){},n.isDebugBuild=function(){return!1},n}();n.Assert=t})(n.Debug||(n.Debug={}));var t=n.Debug})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function f(n){return i===null&&(i=new r(n)),i}var r=function(){function t(n){this._postFilters={};this._preFilters={};this._alertFilters={};this._confirmationFilters={};this._logger=n}return t.prototype.getAutomationPromise=function(t,i,r,u){var o=this,e=this._postFilters[t],s=this._preFilters[t],f=null;return s?(f=this.getPreFilterPromise(s,u),f=e?f.then(function(){return o.getPostFilterPromise(e,i,r,u)},function(n){o._logger.error("Error '"+JSON.stringify(n)+"' while executing pre-filter'")}):f.then(function(){return new n.Plugin.Promise(function(n,t,r){i(n,t,r,u)},r)},function(n){o._logger.error("Error '"+JSON.stringify(n)+"' while executing pre-filter'")})):f=e?this.getPostFilterPromise(e,i,r,u):new n.Plugin.Promise(function(n,t,r){i(n,t,r,u)},r),f},t.prototype.getAlertPromise=function(t,i){var r=this._alertFilters[t];return r?r.bypass(i):new n.Plugin.Promise(function(n){window.alert(i);n(!0)})},t.prototype.getConfirmationPromise=function(t,i){var r=this._confirmationFilters[t];return r?r.bypass(i):new n.Plugin.Promise(function(n){n(window.confirm(i))})},t.prototype.addAutomationPostFilter=function(n,t){this.addAutomationFilter(this._postFilters,n,"IAutomationPostFilter",t)},t.prototype.removeAutomationPostFilter=function(n){this.removeAutomationFilter(this._postFilters,n,"IAutomationPostFilter")},t.prototype.addAutomationPreFilter=function(n,t){this.addAutomationFilter(this._preFilters,n,"IAutomationPreFilter",t)},t.prototype.removeAutomationPreFilter=function(n){this.removeAutomationFilter(this._preFilters,n,"IAutomationPreFilter")},t.prototype.addAutomationAlertBypassFilter=function(n,t){this.addAutomationFilter(this._alertFilters,n,"IAutomationAlertBypassFilter",t)},t.prototype.removeIAutomationAlertBypassFilter=function(n){this.removeAutomationFilter(this._alertFilters,n,"IAutomationAlertBypassFilter")},t.prototype.addAutomationConfirmationBypassFilter=function(n,t){this.addAutomationFilter(this._confirmationFilters,n,"IAutomationConfirmationBypassFilter",t)},t.prototype.removeAutomationConfirmationBypassFilter=function(n){this.removeAutomationFilter(this._confirmationFilters,n,"IAutomationConfirmationBypassFilter")},t.prototype.getPreFilterPromise=function(n,t){if(n)return n.onFilter(t);throw"Pre-filter is null or undefined"},t.prototype.removeAutomationFilter=function(n,t,i){if(!t)throw new Error("key is null, undefined or evaluates to false");if(!n)throw new Error("key is null, undefined or evaluates to false");if(!i)throw new Error("automationFilterType is null, undefined or evaluates to false");delete n[t];this._logger.debug(i+" with key '"+t+"' has been removed")},t.prototype.addAutomationFilter=function(n,t,i,r){if(!n)throw new Error("Invalid filterStore");if(!r)throw new Error("Invalid filter");if(!t)throw new Error("Invalid automation key");if(!i)throw new Error("Invalid automation filter type");n[t]&&this._logger.debug("Replacing existing "+i+" with key '"+t+"'");n[t]=r;this._logger.debug(i+" with key '"+t+"' has been added")},t.prototype.getPostFilterPromise=function(t,i,r,u){var f=this;return new n.Plugin.Promise(function(n,r,e){var o=function(i){return t.onComplete(i,u).then(function(){n(i)},function(){f._logger.error("Error occured during execution of post-filter onComplete handler")})},s=function(n){return t.onError(n,u).then(function(){r(n)},function(){f._logger.error("Error occured during execution of post-filter onError handler")})},h=function(n){return t.onProgress(n,u).then(function(){e(n)},function(){f._logger.error("Error occured during execution of post-filter onProgess handler")})};i(o,s,h,u)},r)},t}(),u=function(){function n(){}return n.SearchNoResultsAlertKey="Microsoft.VisualStudio.DiagnosticsHub.CpuUsageTreeGrid.Search",n.SearchNoResultsConfirmationKey="Microsoft.VisualStudio.DiagnosticsHub.CpuUsageTreeGrid.Search",n.DataWarehouseRequestKey="Microsoft.VisualStudio.DiagnosticsHub.DatawarehouseRequest",n}(),i;t.AutomationConstants=u;i=null;t.getAutomationManager=f})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function t(t,i){if(this._isHighNegative=!1,this._isLowNegative=!1,!(typeof t=="number"&&t<4294967296&&t>=-2147483648)||!(typeof i=="number"&&i<4294967296&&i>=-2147483648))throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1000"));t<0&&(t=t>>>0,this._isHighNegative=!0);i<0&&(i=i>>>0,this._isLowNegative=!0);this._value={h:t,l:i}}return Object.defineProperty(t,"oldest",{get:function(){return t.OldestTimestampFormat},enumerable:!0,configurable:!0}),Object.defineProperty(t,"latest",{get:function(){return t.LatestTimestampFormat},enumerable:!0,configurable:!0}),Object.defineProperty(t,"zero",{get:function(){return t.Zero||(t.Zero=new t(0,0)),t.Zero},enumerable:!0,configurable:!0}),Object.defineProperty(t,"one",{get:function(){return t.One||(t.One=new t(0,1)),t.One},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"jsonValue",{get:function(){var n,t;return this._jsonValue||(n=this._value.h,(this._isHighNegative||n>2147483647)&&(n=n<<0),t=this._value.l,(this._isLowNegative||t>2147483647)&&(t=t<<0),this._jsonValue={h:n,l:t}),this._jsonValue},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._stringValue||(this._stringValue=this._value.h>0?"0x"+this._value.h.toString(16)+t.padLeadingZeros(this._value.l.toString(16),8):"0x"+this._value.l.toString(16)),this._stringValue},enumerable:!0,configurable:!0}),t.max=function(n,t){return n.greaterOrEqual(t)?n:t},t.min=function(n,t){return n.greaterOrEqual(t)?t:n},t.add=function(n,i){return t.addition(n,i)},t.subtract=function(n,i){if(i.greater(n))return t.zero;var r=t.convertToManagedTimeFormat(i.jsonValue),u=~r.h,f=~r.l,e=t.addition(new t(u,f),t.one,!0);return t.addition(n,e,!0)},t.multiply=function(n,i){return t.multiplication(n,i)},t.divide=function(n,i){return t.division(n,i,!1)},t.modulo=function(n,i){return t.division(n,i,!0)},t.addNumber=function(n,i){return i<0?t.subtract(n,t.convertFromNumber(-i)):t.addition(n,t.convertFromNumber(i))},t.subtractNumber=function(n,i){return i<0?t.addition(n,t.convertFromNumber(-i)):t.subtract(n,t.convertFromNumber(i))},t.multiplyNumber=function(i,r){if(r<0)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1000"));return t.multiply(i,t.convertFromNumber(r))},t.divideNumber=function(i,r){if(r<0)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1000"));return t.divide(i,t.convertFromNumber(r))},t.moduloNumber=function(i,r){if(r<0)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1000"));return t.modulo(i,t.convertFromNumber(r))},t.convertFromNumber=function(i){var u,r,f;if(i<0||!(i<9007199254740992))throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1000"));return(i=Math.floor(i),u=i&4294967295,i<=4294967295)?new t(0,u):(r=i.toString(16),r=r.substring(0,r.length-8),f=parseInt(r,16),new t(f,u))},t.convertFromBinaryString=function(i){if(!i||i.match("[^10]")||i.length>64)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1000 "+i));var u=0,r=0;return i.length<=32?r=parseInt(i,2):(r=parseInt(i.slice(i.length-32),2),u=parseInt(i.slice(0,i.length-32),2)),new t(u,r)},t.getBinaryString=function(t){var i=t._value.l.toString(2);return t._value.h>0?t._value.h.toString(2)+n.VisualStudio.DiagnosticsHub.BigNumber.padLeadingZeros(i,32):i},t.padLeadingZeros=function(n,t){var i=n,r="00000000";if(i&&t&&t>0){while(t-i.length>=8)i=r+i;i=r.substr(0,t-i.length)+i}return i},t.prototype.equals=function(n){var i=t.convertToManagedTimeFormat(n.jsonValue);return this._value.h===i.h&&this._value.l===i.l},t.prototype.greater=function(n){var i=!1,r=t.convertToManagedTimeFormat(n.jsonValue);return this._value.h>r.h?i=!0:this._value.h===r.h&&this._value.l>r.l&&(i=!0),i},t.prototype.greaterOrEqual=function(n){var i=!1,r=t.convertToManagedTimeFormat(n.jsonValue);return this._value.h>r.h?i=!0:this._value.h===r.h&&this._value.l>=r.l&&(i=!0),i},t.prototype.compareTo=function(n){return this.greater(n)?1:this.equals(n)?0:-1},t.convertToManagedTimeFormat=function(n){var t=n.h<0?n.h>>>0:n.h,i=n.l<0?n.l>>>0:n.l;return{h:t,l:i}},t.addition=function(i,r,u){var s,h,c,l,a,o;typeof u=="undefined"&&(u=!1);var f=t.convertToManagedTimeFormat(i.jsonValue),e=t.convertToManagedTimeFormat(r.jsonValue),p=0,w=0,v=(f.l&255)+(e.l&255),y=(v>>>8)+(f.l>>>8&255)+(e.l>>>8&255);if(v=v&255,s=(y>>>8)+(f.l>>>16&255)+(e.l>>>16&255),y=y&255,h=(s>>>8)+(f.l>>>24&255)+(e.l>>>24&255),s=s&255,c=(h>>>8)+(f.h&255)+(e.h&255),h=h&255,l=(c>>>8)+(f.h>>>8&255)+(e.h>>>8&255),c=c&255,a=(l>>>8)+(f.h>>>16&255)+(e.h>>>16&255),l=l&255,o=(a>>>8)+(f.h>>>24&255)+(e.h>>>24&255),a=a&255,!u&&o>>>8>0)return n.VisualStudio.DiagnosticsHub.getLogger().error("Addition overflow. Lost upper bits from: 0x"+o.toString(16)),new t(4294967295,4294967295);o=o&255;var b=h<<8|s,k=y<<8|v,d=o<<8|a,g=l<<8|c;return p=b<<16|k,w=d<<16|g,new t(w,p)},t.multiplication=function(i,r){var f=t.convertToManagedTimeFormat(i.jsonValue),e=t.convertToManagedTimeFormat(r.jsonValue),y,u,o,b,k;if(f.h===0&&e.h===0&&0<f.l&&f.l<=67108864&&0<e.l&&e.l<=67108864)return y=f.l*e.l,t.convertFromNumber(y);var h=f.l&65535,l=f.l>>>16,p=f.h&65535,d=f.h>>>16,c=e.l&65535,a=e.l>>>16,w=e.h&65535,g=e.h>>>16,v=h*c,s=v>>>16;return v&=65535,s+=l*c,u=s>>>16,s&=65535,s+=h*a,u+=s>>>16,s&=65535,u+=p*c,o=u>>>16,u&=65535,u+=l*a,o+=u>>>16,u&=65535,u+=h*w,o+=u>>>16,u&=65535,o+=d*c+p*a+l*w+h*g,o>65535&&n.VisualStudio.DiagnosticsHub.getLogger().error("Multiplication overflow. Lost upper 16-bits from: 0x"+o.toString(16)),o&=65535,b=o<<16|u,k=s<<16|v,new t(b,k)},t.division=function(i,r,u){var s,h;if(r.greater(i))return u?i:t.zero;if(r.equals(t.zero)){if(u)return i;throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1000"))}var o=t.getBinaryString(i),v=t.getBinaryString(r),l=v.length,a=o.length,y=new t(2097152,0);if(y.greater(i))return s=parseInt(i.value),h=parseInt(r.value),u?t.convertFromNumber(s%h):t.convertFromNumber(s/h);for(var c="",e=l,f=t.convertFromBinaryString(o.substr(0,l));e<=a;)f.greater(r)||f.equals(r)?(c+="1",f=t.subtract(f,r)):c+="0",e!==a&&(f=t.convertFromBinaryString(t.getBinaryString(f)+o[e])),e++;return u?f:t.convertFromBinaryString(c)},t.OldestTimestampFormat={h:0,l:0},t.LatestTimestampFormat={h:4294967295,l:4294967295},t}(),r;t.BigNumber=i;r=function(){function t(t,i){if(t.greater(i))throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1000"));this._begin=t;this._end=i}return Object.defineProperty(t.prototype,"begin",{get:function(){return this._begin},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this._end},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"elapsed",{get:function(){return this._elapsed||(this._elapsed=i.subtract(this.end,this.begin)),this._elapsed},enumerable:!0,configurable:!0}),t.prototype.equals=function(n){return this.begin.equals(n.begin)&&this.end.equals(n.end)},t.prototype.contains=function(n){return n.greaterOrEqual(this.begin)&&this.end.greaterOrEqual(n)},t}();t.JsonTimespan=r})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){(function(n){"use strict";var t=function(){function n(){}return n}();n.DhContextData=t})(n.DataWarehouse||(n.DataWarehouse={}));var t=n.DataWarehouse})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function r(){return i===null&&(i=new u),i}var u=function(){function t(){var t=this,i;this._isInfoOn=!0;this._isDebugOn=!0;this._isWarningOn=!0;this._isErrorOn=!0;this._loggerProxy=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.LoggerPortMarshaler",{},!0);this._loggerProxy._call("isInfoOn").done(function(n){t._isInfoOn=n});this._loggerProxy._call("isDebugOn").done(function(n){t._isDebugOn=n});this._loggerProxy._call("isWarningOn").done(function(n){t._isWarningOn=n});this._loggerProxy._call("isErrorOn").done(function(n){t._isErrorOn=n});try{i=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.Test.Apex.DiagnosticsHub.ApexJSExtension",{},!0);i!==null?i._call("getApexJavaScript").done(function(n){var i,r;n?(t.debug("got apex javascript files"),i=document.createElement("script"),i.setAttribute("type","text/javascript"),i.setAttribute("src",n),r=document.getElementsByTagName("head"),r?(r[0].appendChild(i),t.debug("Added ApexJSExtension '"+n+"' to document")):t.debug("Unable to add apex script to document")):t.debug("no file was returned by getApexJavaScript, cannot inject TestExtension.ts for ApexJS framework")},function(n){t.debug("Error when calling getApexJavaScript function:"+String(n))}):this.debug("Unable to connect to port marshaler 'Microsoft.Test.Apex.DiagnosticsHub.ApexJSExtension'")}catch(r){this.error(r.toString())}}return t.prototype.info=function(n){this._isInfoOn&&this._loggerProxy._call("logInfo",n)},t.prototype.debug=function(n){this._isDebugOn&&this._loggerProxy._call("logDebug",n)},t.prototype.warning=function(n){this._isWarningOn&&this._loggerProxy._call("logWarning",n)},t.prototype.error=function(n){this._isErrorOn&&this._loggerProxy._call("logError",n)},t}(),i=null;t.getLogger=r;n.Plugin.addEventListener("pluginready",function(){r()})})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function i(){window.onerror=function(i,r,u,f){var o=t.getLogger(),e="Script error caught in: "+(r||"unknown script file")+" at "+u+"\n"+i;o.error(e);n.VisualStudio.DiagnosticsHub.Debug.Assert.fail(e);n.Plugin.Diagnostics.reportError(i,r,u,i,f);n.Plugin.Diagnostics.terminate()}}t.InitializeErrorReporting=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";function t(n,t){var i=!1,r=!1,u=null,f=function(){for(var o=[],e=0;e<arguments.length-0;e++)o[e]=arguments[e+0];u=o;i?r=!0:(n.apply(null,o),i=!0,window.setTimeout(function(){i=!1;r&&window.setTimeout(f,0,u);r=!1},t))};return f}n.eventThrottler=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function r(){return i===null&&(i=new e(t.getLogger())),i}var u=function(){function n(n){this._onHandlerCompleted=n}return n.prototype.complete=function(){this._onHandlerCompleted()},n}(),f=function(){function n(n,t){this._eventArgs=n;this._waitHandler=!1;this._onHandlerCompleted=t;this._eventDeferral=null}return Object.defineProperty(n.prototype,"currentState",{get:function(){return this._eventArgs.CurrentState},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"previousState",{get:function(){return this._eventArgs.PreviousState},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"waitHandler",{get:function(){return this._eventDeferral!==null},enumerable:!0,configurable:!0}),n.prototype.getDeferral=function(){return this._eventDeferral===null&&(this._eventDeferral=new u(this._onHandlerCompleted)),this._eventDeferral},n}(),e=function(){function t(t){var i=this;this._eventsListeners=[];this._logger=t;this._isInitialized=!1;this._sessionProxy=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.SessionPortMarshaler",{},!0);this._initializationPromise=this._sessionProxy._call("initialize");this._initializationPromise.done(function(){i._logger.debug("JavaScript session object connected to host. Ready to get session state notification events.");i._isInitialized=!0},function(n){i._logger.error("Cannot initialize session, error name: '"+n.name+"', error message: '"+n.message+"'")});this._sessionProxy.addEventListener("sessionStateChanged",this.stateChangedHandler.bind(this))}return t.prototype.stopCollection=function(){return this._sessionProxy._call("stopCollection")},t.prototype.canStopCollection=function(){return this._sessionProxy._call("canStopCollection")},t.prototype.getPerformanceDebuggerSessionTargetProcessInformation=function(){return this._sessionProxy._call("getPerformanceDebuggerSessionTargetProcessInformation")},t.prototype.getState=function(){return this._sessionProxy._call("getState")},t.prototype.addStateChangedEventListener=function(n){this._eventsListeners.push(n);this._logger.debug("State changed event handler added.")},t.prototype.isInitialized=function(){return this._isInitialized},t.prototype.removeStateChangedEventListener=function(n){for(var t=0;t<this._eventsListeners.length;t++)if(this._eventsListeners[t]===n){this._logger.debug("State changed event handler removed.");this._eventsListeners.splice(t,1);break}},t.prototype.stateChangedHandler=function(n){var o=this,t,r,u,i,e;this._logger.debug("Invoking JavaScript handlers for State Change Event.");t=0;r=function(){t--;t<=0?o._sessionProxy._call("sessionStateChangedCompleted",n.Token):o._logger.debug("Still waiting when all event state change handlers will complete their work. Handlers count: "+t)};for(u in this._eventsListeners)if(i=this._eventsListeners[u],this._eventsListeners.hasOwnProperty(u))if(typeof i=="function")try{e=new f(n,r);i(e);e.waitHandler&&(t++,this._logger.debug("JavaScipt handlers for event state changed asked to wait while they will finish. Handlers count: "+t))}catch(s){this._logger.error(s.toString())}else this._logger.warning("One of the listeners not a 'function', it has type "+typeof i);t===0&&r()},t}(),i=null;t.getCurrentSession=r;n.Plugin.addEventListener("pluginready",function(){r()})})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){(function(i){"use strict";function u(){return r===null&&(r=new f),r}var f=function(){function i(){this._serviceProxy=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.DataWarehouseServiceMarshaler",{},!0);this._logger=t.getLogger()}return i.prototype.getAllDataSourceInfos=function(n){var t=this;this._serviceProxy._call("getAllDataSourceInfos").done(function(i){for(var r,f=[],u=0;u<i.length;u++)r=i[u],r.type===1||r.type===2||r.type===4?f.push(r):t._logger.error("Unknown data source info type: "+r.type);n(f)})},i}(),r=null;i.getDataWarehouseService=u;n.Plugin.addEventListener("pluginready",function(){u()})})(t.DataWarehouse||(t.DataWarehouse={}));var i=t.DataWarehouse})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function n(n){var t,i;if(typeof n=="undefined"&&(n=null),this._events={},this._listeners={},n&&n.length>0)for(t=0;t<n.length;t++)i=n[t],i&&(this._events[i]=i);else this._events=null}return n.prototype.dispose=function(){delete this._events;delete this._listeners},n.prototype.addEventListener=function(n,t){if(n&&t&&(this._events===null||this._events[n])){var i=this._listeners[n]?this._listeners[n]:this._listeners[n]=[];i.push(t)}},n.prototype.removeEventListener=function(n,t){var i,r;if(n&&t&&(this._events===null||this._events[n])&&(i=this._listeners[n],i)){for(r=0;r<i.length;r++)if(t===i[r]){i.splice(r,1);break}i.length===0&&delete this._listeners[n]}},n.prototype.invokeListener=function(n,t){var i,r,u;if(n&&(this._events===null||this._events[n])&&(i=this._listeners[n],i))for(r=0;r<i.length;r++)u=i[r],u&&u(t)},n}();n.Publisher=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function u(){return i===null&&(i=n.Plugin.F12?new r:new f(t.getLogger())),i}var f=function(){function i(i){var r=this;this._eventsListeners={};this._publisher=new t.Publisher;this._logger=i;this._eventAggregatorProxy=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.EventAggregatorMarshaler",{},!0);this._eventAggregatorProxy.addEventListener("globalEventHandler",function(n){r.globalEventHandler(n)})}return i.prototype.addEventListener=function(n,t){this._publisher.addEventListener(n,t);this._logger.debug("EventAggregator:: Event listener added for event type '"+n+"'")},i.prototype.removeEventListener=function(n,t){this._publisher.removeEventListener(n,t);this._logger.debug("EventAggregator:: Event listener removed for event type '"+n+"'")},i.prototype.globalEventHandler=function(n){var i=n.EventType,t,r;this._logger.debug("EventAggregator:: Handling event type "+i+".");t=n.Data.Json;this._logger.debug("EventAggregator:: Raise handler for event type "+i+" with data "+t+".");try{r=null;t!==null&&typeof t=="string"&&t!==""&&(r=JSON.parse(t));this._publisher.invokeListener(i,r)}catch(u){this._logger.error(u.toString())}},i.prototype.raiseEvent=function(n,t){var i=null;t!==null&&typeof t!="undefined"&&(i=JSON.stringify(t));this._logger.debug("EventAggregator:: Raising event type "+n+" with data "+i+".");this._eventAggregatorProxy._call("raiseEvent",n,i)},i}(),r=function(){function n(){this._publisher=new t.Publisher}return n.prototype.addEventListener=function(n,t){this._publisher.addEventListener(n,t)},n.prototype.removeEventListener=function(n,t){this._publisher.removeEventListener(n,t)},n.prototype.raiseEvent=function(n,t){this._publisher.invokeListener(n,t)},n}(),i;t.LocalEventAggregator=r;i=null;t.getEventAggregator=u;n.Plugin.addEventListener("pluginready",function(){u()})})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";if(window.require){var i=require("serviceHub"),r=function(){function r(){this._logger=t.getLogger();this._controllers={};this._requestId=1;this._requestProgressCallbacks={};this._automationManager=t.getAutomationManager(this._logger);this._serviceHubClient=i.createHubClient()}return r.prototype.request=function(n,i,u,f){f=f||{};f.sessionId=u;var o=this.getController(n),e,s=function(n,u,s){var h=function(i,f){o.request(i,f).then(function(f){if(f.type===r.DATAWAREHOUSE_HOST_RESPONSE_TYPE_SUCCESS)n(JSON.parse(f.content));else if(f.type===r.DATAWAREHOUSE_HOST_RESPONSE_TYPE_PENDING)i!==t.DataWarehouse.Constants.ACTION_DATAWAREHOUSE_GETSTATUS?e=f.content:s&&s(JSON.parse(f.content)),h(t.DataWarehouse.Constants.ACTION_DATAWAREHOUSE_GETSTATUS,e);else if(f.type===r.DATAWAREHOUSE_HOST_RESPONSE_TYPE_CANCELED)u&&u(new Error("Canceled"));else if(f.type===r.DATAWAREHOUSE_HOST_RESPONSE_TYPE_FAILURE){var o=new Error(f.content);if(u)u(o);else throw o}else throw new Error("Invalid response from DataWarehouse")})};h(i,JSON.stringify(f))},h=function(){e&&o.request(t.DataWarehouse.Constants.ACTION_DATAWAREHOUSE_CANCELTASK,e)},c={controllerId:n,actionId:i,sessionId:u,request:f};return this._automationManager.getAutomationPromise(t.AutomationConstants.DataWarehouseRequestKey,s,h,c)},r.prototype.requestSync=function(){throw new Error("Not Implemented.")},r.prototype.initialize=function(){var r=this,i=[];return i.push(this._serviceHubClient.getSessionId().then(function(n){r._hostSessionId=n})),i.push(t.DataWarehouseController.create(this._serviceHubClient).then(function(n){r._controllers[t.DataWarehouse.Constants.CONTROLLER_ID_DATAWAREHOUSE]=n})),i.push(t.ContextServiceController.create(this._serviceHubClient).then(function(n){r._controllers[t.DataWarehouse.Constants.CONTROLLER_ID_DATAWAREHOUSECONTEXTSERVICE]=n})),i.push(t.ContextController.create(this._serviceHubClient).then(function(n){r._controllers[t.DataWarehouse.Constants.CONTROLLER_ID_DATAWAREHOUSECONTEXT]=n})),i.push(t.JmcServiceController.create(this._serviceHubClient).then(function(n){r._controllers[t.DataWarehouse.Constants.CONTROLLER_ID_DATAWAREHOUSEJMCSERVICE]=n})),i.push(t.ActiveCollectionController.create(this._serviceHubClient).then(function(n){r._controllers[t.DataWarehouse.Constants.CONTROLLER_ID_DATAWAREHOUSEACTIVECOLLECTION]=n})),n.Plugin.Promise.join(i)},r.prototype.getController=function(n){if(!this._controllers[n])throw new Error("Invalid controller ID");return this._controllers[n]},r.DATAWAREHOUSE_HOST_RESPONSE_TYPE_SUCCESS=1,r.DATAWAREHOUSE_HOST_RESPONSE_TYPE_FAILURE=2,r.DATAWAREHOUSE_HOST_RESPONSE_TYPE_PENDING=3,r.DATAWAREHOUSE_HOST_RESPONSE_TYPE_CANCELED=4,r}();t.DataWarehouseServiceHubHost=r}})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function t(i){if(i.length===38&&i[0]==="{"&&i[37]==="}"&&(i=i.substr(1,36)),i.length!==36)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1010"));if(this._value=i.toLowerCase(),!t.GuidRegEx.test(this._value))throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1010"))}return Object.defineProperty(t,"empty",{get:function(){return new t("00000000-0000-0000-0000-000000000000")},enumerable:!0,configurable:!0}),t.newGuid=function(){return new t(t.createRandomToken())},t.prototype.equals=function(n){return this._value.toLowerCase()===n._value.toLowerCase()},t.prototype.toString=function(){return this._value},t.createRandomToken=function(){return"rrrrrrrr-rrrr-4rrr-srrr-rrrrrrrrrrrr".replace(/[rs]/g,function(n){var t=Math.random()*16|0;return n!=="r"&&(t=t&3|8),t.toString(16)})},t.GuidRegEx=new RegExp("^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"),t}();t.Guid=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function n(){}return Object.defineProperty(n,"standardCollectorClassId",{get:function(){return"44d04ed9-f786-458c-93a9-7207a3cc52e1"},enumerable:!0,configurable:!0}),n}();n.Guids=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function r(){return i===null&&(i=new u),i}var u=function(){function t(){this._loggerProxy=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.OutputWindowServiceMarshaler",{},!0)}return t.prototype.outputLine=function(n){this._loggerProxy._call("outputLine",n)},t.prototype.outputLineAndShow=function(n){this._loggerProxy._call("outputLineAndShow",n)},t.prototype.outputString=function(n){this._loggerProxy._call("outputString",n)},t.prototype.outputStringAndShow=function(n){this._loggerProxy._call("outputStringAndShow",n)},t}(),i=null;t.getOutputWindowsService=r;n.Plugin.addEventListener("pluginready",function(){r()})})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function u(){return i||(i=new r),i}var r=function(){function i(){this._proxy=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.PerformanceDebuggerToolsServiceMarshaler",{},!0);this._toolStateChangedEvent=new t.ObservableEvent(this._proxy,"DiagnosticsHub.ToolStateChangedEvent")}return Object.defineProperty(i.prototype,"toolStateChangedEvent",{get:function(){return this._toolStateChangedEvent},enumerable:!0,configurable:!0}),i.prototype.getAvailableToolsInformationAndState=function(){return this._proxy._call("getAvailableToolsInformation")},i.prototype.setToolEnabled=function(n,t){this._proxy._call("setToolEnabled",n,t)},i.prototype.invokeSettingsDialog=function(){this._proxy._call("invokeSettingsDialog")},i}(),i;t.PerformanceDebuggerToolsService=r;t.getPerformanceDebuggerToolsService=u})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function h(){return f===null&&(f=new o),f}function c(){return r===null&&(r=new s),r}function e(){return u===null&&(u=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.PerformanceDebuggerStateMarshaler",{},!0)),u}var i=function(){function n(n,t){this._eventName=t;this._eventSource=n}return n.prototype.addEventListener=function(n){this._eventSource.addEventListener(this._eventName,n)},n.prototype.removeEventListener=function(n){this._eventSource.removeEventListener(this._eventName,n)},n}(),r,u;t.ObservableEvent=i;var o=function(){function n(){this._proxy=e();this._debugModeBreak=new i(this._proxy,"DebugModeBreakEvent");this._debugModeRun=new i(this._proxy,"DebugModeRunEvent")}return Object.defineProperty(n.prototype,"debugModeRunEvent",{get:function(){return this._debugModeRun},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"debugModeBreakEvent",{get:function(){return this._debugModeBreak},enumerable:!0,configurable:!0}),n.prototype.isDebuggerInBreakMode=function(){return this._proxy._call("isDebuggerInBreakMode")},n}(),s=function(){function n(){this._proxy=e();this._statusMessageChanged=new i(this._proxy,"StatusMessageChangedEvent")}return Object.defineProperty(n.prototype,"statusMessageChangedEvent",{get:function(){return this._statusMessageChanged},enumerable:!0,configurable:!0}),n.prototype.getLastNonActiveStatusMessage=function(){return this._proxy._call("getLastNonActiveStatusMessage")},n.prototype.isDocumentActiveSession=function(){return this._proxy._call("isDocumentActiveSession")},n}(),f=null;t.getPerformanceDebuggerEventManager=h;r=null;t.getPerformanceDebuggerStateService=c;u=null})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={}));__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){(function(n){(function(n){"use strict";var i,t,r,u,f,e,o;window.require&&(i=require("streamJsonRpc"),t=function(){function t(n,t){this._peer=i.attach(n);this._actionIdToOperationMap=t}return t.prototype.request=function(t,i){return n.Debug.Assert.isNotUndefined(this._actionIdToOperationMap[t],"Unknown action ID"),this._peer.request(this._actionIdToOperationMap[t],[i])},t}(),n.ServiceHubControllerBase=t,r=function(n){function t(){n.apply(this,arguments)}return __extends(t,n),t.create=function(n){return n.requestService("DataWarehouseController").then(function(n){return new t(n,t.ActionIdToOperationMap)})},t.ActionIdToOperationMap={1:"BeginInitialization",2:"EndInitialization",3:"GetData",4:"GetResult",5:"DisposeResult",6:"PushDataSources",7:"PushActiveCollectionDataSource",8:"CompleteActiveCollectionDataSource",9:"RetrieveDataBlob",10:"StoreDataBlob",11:"DeleteDataBlob",12:"SymbolResolverConfigurationUpdate",400:"Close",401:"GetPrivateData",402:"SetPrivateData",403:"GetStatus",404:"CancelTask",405:"AbortAnalysis"},t}(t),n.DataWarehouseController=r,u=function(n){function t(){n.apply(this,arguments)}return __extends(t,n),t.create=function(n){return n.requestService("DataWarehouseContextServiceController").then(function(n){return new t(n,t.ActionIdToOperationMap)})},t.ActionIdToOperationMap={1:"CreateContext",2:"DeleteContext",3:"CopyContext",4:"GetContext",5:"GetGlobalContext"},t}(t),n.ContextServiceController=u,f=function(n){function t(){n.apply(this,arguments)}return __extends(t,n),t.create=function(n){return n.requestService("DataWarehouseContextController").then(function(n){return new t(n,t.ActionIdToOperationMap)})},t.ActionIdToOperationMap={1:"GetTimeDomain",2:"SetTimeDomain",3:"GetMachineDomain",4:"AddMachineDomain",5:"ClearMachineDomain",6:"GetProcessDomain",7:"AddProcessDomain",8:"ClearProcessDomain",9:"GetThreadDomain",10:"AddThreadDomain",11:"ClearThreadDomain",12:"GetCustomDomain",13:"SetCustomDomain",14:"GetData",15:"SetData"},t}(t),n.ContextController=f,e=function(n){function t(){n.apply(this,arguments)}return __extends(t,n),t.create=function(n){return n.requestService("DataWarehouseJmcServiceController").then(function(n){return new t(n,t.ActionIdToOperationMap)})},t.ActionIdToOperationMap={1:"GetJmc",2:"SetJmc"},t}(t),n.JmcServiceController=e,o=function(n){function t(){n.apply(this,arguments)}return __extends(t,n),t.create=function(n){return n.requestService("DataWarehouseActiveCollectionController").then(function(n){return new t(n,t.ActionIdToOperationMap)})},t.ActionIdToOperationMap={1:"NewTargetProcess",2:"GraphUpdates"},t}(t),n.ActiveCollectionController=o)})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){(function(i){"use strict";function u(){return r===null&&(r=new f(t.getLogger())),r}function e(){return u()}var f=function(){function i(t){var i=this;this._messageListeners={};this._logger=t;this._proxy=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.CollectorTransportServiceControllerMarshaler",{},!0);this._proxy.addEventListener("stringMessageReceived",function(n){i.onStringMessageReceived(n)})}return i.prototype.sendStringToCollectionAgent=function(n,i,r){return this._proxy._call("sendStringToCollectionAgent",n,i,r||t.Guids.standardCollectorClassId)},i.prototype.downloadFile=function(n,i,r){return this._proxy._call("downloadFile",n,i,r||t.Guids.standardCollectorClassId)},i.prototype.addMessageListener=function(n,i,r){var f=this,u=n.toString();if(this._logger.debug("Adding message listener ("+u+") for collector "+r||t.Guids.standardCollectorClassId),this._messageListeners[u]){this._logger.error("Listener already exists with guid = "+u);throw new Error("Listener already exists with guid = "+u)}return this._messageListeners[u]=i,this._proxy._call("enableEventsForListenerId",u,r||t.Guids.standardCollectorClassId).then(null,function(n){f._messageListeners[u]=null;f._logger.error(JSON.stringify(n))})},i.prototype.onStringMessageReceived=function(n){var t=n.ListenerId,r=n.Message,i;this._messageListeners[t]?(i=this._messageListeners[t],i(r)):this._logger.warning("Unexpected message received without a message listener - ID: "+t)},i}(),r=null;i.getCollectorTransportServiceController=u;i.getStandardTransportService=e})(t.Collectors||(t.Collectors={}));var i=t.Collectors})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(i){this._externalObject=null;this._logger=i;var r=n.Plugin.F12||n.Plugin.VS;if(!r){this._logger.error("External object creator does not exist");throw"Unable to determine the ScriptedSandbox host"}this._externalObject=r.Utilities.createExternalObject("DiagnosticsHub.DataWarehouseHost","{339B3787-FC17-4BF5-A0DC-CBEF24DB2EDE}");this._automationManager=t.getAutomationManager(this._logger)}return i.prototype.requestSync=function(n,t,i,r){this._externalObject?this._externalObject.requestSync(n,t,i,typeof r=="string"?r:r!==null&&typeof r!="undefined"?JSON.stringify(r):""):this._logger.warning("External object is null. Verify that DiagnosticsHub.ScriptedSandboxPlugin.dll was loaded into ScriptedSandbox.")},i.prototype.request=function(n,i,r,u){var f=this,h=function(n,t){try{n(t)}catch(i){f._logger.error(JSON.stringify(i))}},o=null,e=null,c=function(){f._externalObject&&f._externalObject.cancel&&e&&e.requestId&&f._externalObject.cancel(e.requestId)},s=function(n,t,i){if(n!==null){var r=null;if(t!==null)try{r=t===null||t===""||typeof t!="string"?t:JSON.parse(t)}catch(u){f._logger.error("Could not parse "+i+" response: "+t);f._logger.error(u.Message)}h(n,r)}else f._logger.warning("DataWarehouseNativeHost: "+i+" callback is null.")},l=function(t,h,c){if(f._externalObject?o=f._externalObject.request(n,i,r,typeof u=="string"?u:u!==null&&typeof u!="undefined"?JSON.stringify(u):"",function(n){s(t,n,"completePromise")},function(n){s(h,n,"errorPromise")},function(n){s(c,n,"progressPromise")}):f._logger.warning("External object is null. Verify that DiagnosticsHub.ScriptedSandboxPlugin.dll was loaded into ScriptedSandbox."),e=o===null||typeof o!="string"?{hresult:1}:JSON.parse(o),e.hresult!==0){f._logger.error("Could not invoke request method of native host: "+o);var l=new Error;l.message=l.name=e.hresult.toString(16);h(l)}},a={controllerId:n,actionId:i,sessionId:r,request:u};return this._automationManager.getAutomationPromise(t.AutomationConstants.DataWarehouseRequestKey,l,c,a)},i}();t.DataWarehouseNativeHost=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){(function(n){"use strict";var t=function(){function n(){}return n.DiagnosticsPackage="DiagnosticsHub.Resource.DiagnosticsPackage",n.EtlFile="DiagnosticsHub.Resource.EtlFile",n.JavaScriptSource="DiagnosticsHub.Resource.JavaScript.SourceDirectory",n.SymbolCache="DiagnosticsHub.Resource.SymbolCache",n.UserNativeImageDirectory="DiagnosticsHub.Resource.UserNativeImageDirectory",n.PlatformNativeImage="DiagnosticsHub.Resource.PlatformNativeImage",n.PlatformWinmd="DiagnosticsHub.Resource.PlatformWinmd",n.CountersFile="DiagnosticsHub.Resource.CountersFile",n.DWJsonFile="DiagnosticsHub.Resource.DWJsonFile",n.UnknownFile="DiagnosticsHub.Resource.File",n.UnknownDirectory="DiagnosticsHub.Resource.Directory",n}();n.ResourceIdentity=t})(n.DataWarehouse||(n.DataWarehouse={}));var t=n.DataWarehouse})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){(function(i){"use strict";function o(n,t){var i={};return n&&(i.contextId=n),t.timeDomain&&(i.timeDomain={begin:t.timeDomain.begin.jsonValue,end:t.timeDomain.end.jsonValue}),t.machineDomain&&(i.machineDomain=t.machineDomain),t.processDomain&&(i.processDomain=t.processDomain),t.threadDomain&&(i.threadDomain=t.threadDomain),t.customDomain&&(i.customDomain=t.customDomain),i}function a(n){return typeof n=="undefined"&&(n=null),s===null&&(s=new e),s.getDataWarehouse(n)}var r=function(){function n(){}return n.CONTROLLER_ID_DATAWAREHOUSE=1,n.CONTROLLER_ID_DATAWAREHOUSECONTEXTSERVICE=2,n.CONTROLLER_ID_DATAWAREHOUSECONTEXT=3,n.CONTROLLER_ID_DATAWAREHOUSEJMCSERVICE=4,n.CONTROLLER_ID_DATAWAREHOUSEACTIVECOLLECTION=5,n.ACTION_DATAWAREHOUSE_BEGININITIALIZATION=1,n.ACTION_DATAWAREHOUSE_ENDINITIALIZATION=2,n.ACTION_DATAWAREHOUSE_GETDATA=3,n.ACTION_DATAWAREHOUSE_GETRESULT=4,n.ACTION_DATAWAREHOUSE_DISPOSERESULT=5,n.ACTION_DATAWAREHOUSE_PUSHDATASOURCES=6,n.ACTION_DATAWAREHOUSE_PUSHACTIVECOLLECTIONDATASOURCE=7,n.ACTION_DATAWAREHOUSE_COMPLETEACTIVECOLLECTIONDATASOURCE=8,n.ACTION_DATAWAREHOUSE_RETRIEVEDATABLOB=9,n.ACTION_DATAWAREHOUSE_STOREDATABLOB=10,n.ACTION_DATAWAREHOUSE_DELETEDATABLOB=11,n.ACTION_DATAWAREHOUSE_SYMBOLRESOLVERCONFIGURATIONUPDATE=12,n.ACTION_DATAWAREHOUSE_INITIALIZATION_DEPRECATED=100,n.ACTION_DATAWAREHOUSE_CLOSE=400,n.ACTION_DATAWAREHOUSE_GETPRIVATEDATA=401,n.ACTION_DATAWAREHOUSE_SETPRIVATEDATA=402,n.ACTION_DATAWAREHOUSE_GETSTATUS=403,n.ACTION_DATAWAREHOUSE_CANCELTASK=404,n.ACTION_DATAWAREHOUSE_ABORTANALYSIS=405,n.ACTION_DATAWAREHOUSECONTEXTSERVICE_CREATECONTEXT=1,n.ACTION_DATAWAREHOUSECONTEXTSERVICE_DELETECONTEXT=2,n.ACTION_DATAWAREHOUSECONTEXTSERVICE_COPYCONTEXT=3,n.ACTION_DATAWAREHOUSECONTEXTSERVICE_GETCONTEXT=4,n.ACTION_DATAWAREHOUSECONTEXTSERVICE_GETGLOBALCONTEXT=5,n.ACTION_DATAWAREHOUSECONTEXT_GETTIMEDOMAIN=1,n.ACTION_DATAWAREHOUSECONTEXT_SETTIMEDOMAIN=2,n.ACTION_DATAWAREHOUSECONTEXT_GETMACHINEDOMAIN=3,n.ACTION_DATAWAREHOUSECONTEXT_ADDTOMACHINEDOMAIN=4,n.ACTION_DATAWAREHOUSECONTEXT_CLEARMACHINEDOMAIN=5,n.ACTION_DATAWAREHOUSECONTEXT_GETPROCESSDOMAIN=6,n.ACTION_DATAWAREHOUSECONTEXT_ADDTOPROCESSDOMAIN=7,n.ACTION_DATAWAREHOUSECONTEXT_CLEARPROCESSDOMAIN=8,n.ACTION_DATAWAREHOUSECONTEXT_GETTHREADDOMAIN=9,n.ACTION_DATAWAREHOUSECONTEXT_ADDTOTHREADDOMAIN=10,n.ACTION_DATAWAREHOUSECONTEXT_CLEARTHREADDOMAIN=11,n.ACTION_DATAWAREHOUSECONTEXT_GETCUSTOMDOMAIN=12,n.ACTION_DATAWAREHOUSECONTEXT_SETCUSTOMDOMAIN=13,n.ACTION_DATAWAREHOUSECONTEXT_GETDATA=14,n.ACTION_DATAWAREHOUSECONTEXT_SETDATA=15,n.ACTION_DATAWAREHOUSEJMCSERVICE_GETJMCENABLED=1,n.ACTION_DATAWAREHOUSEJMCSERVICE_SETJMCENABLED=2,n.ACTION_DATAWAREHOUSEACTIVECOLLECTION_NEWTARGETPROCESS=1,n.ACTION_DATAWAREHOUSEACTIVECOLLECTION_GRAPHUPDATES=2,n}(),f,e,h;i.Constants=r;f=function(){function n(n,t,i){this._resultId=n;this._sessionId=t;this._controller=i}return Object.defineProperty(n.prototype,"resultId",{get:function(){return this._resultId},enumerable:!0,configurable:!0}),n.prototype.getResult=function(n){var t=null;return t=n!==null?{resultId:this._resultId,customData:JSON.stringify(n)}:{resultId:this._resultId},this._controller.request(r.ACTION_DATAWAREHOUSE_GETRESULT,t)},n.prototype.dispose=function(){return this._controller.request(r.ACTION_DATAWAREHOUSE_DISPOSERESULT,{resultId:this._resultId})},n}();e=function(){function i(){this._getConfigurationPromise=null;this._serviceProxy=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.DataWarehouseServiceMarshaler",{},!0);this._logger=t.getLogger()}return i.prototype.getDataWarehouse=function(t){var i=this;return typeof t=="undefined"&&(t=null),(this._getConfigurationPromise===null||t)&&(this._getConfigurationPromise=t===null?this._serviceProxy._call("getDataWarehouseConfiguration"):n.Plugin.Promise.wrap(t)),this._getConfigurationPromise.then(function(n){return i._logger.debug("Got the sessionId '"+n.sessionId+"'. Creating datawarehouse..."),new h(n)})},i}();i.DataWarehouseFactory=e;h=function(){function i(n){this._logger=null;this._dwConfiguration=null;this._controller=null;this._contextService=null;this._jmcService=null;this._logger=t.getLogger();this._dwConfiguration=n;this._controller=new t.HostController(this._dwConfiguration.sessionId,r.CONTROLLER_ID_DATAWAREHOUSE)}return i.prototype.getConfiguration=function(){return this._dwConfiguration},i.prototype.getData=function(n,t){var i=null;return i=n?{contextId:n,analyzerId:t}:{analyzerId:t},this.getDataFromAnalyzer(i)},i.prototype.getFilteredData=function(n,t){return this.getDataFromAnalyzer({filter:o(null,n),analyzerId:t})},i.prototype.getResultId=function(t){var i=t;if(!i.resultId)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1011"));return i.resultId},i.prototype.getResultById=function(n){return new f(n,this._dwConfiguration.sessionId,this._controller)},i.prototype.getContextService=function(){return this._contextService||(this._contextService=new c(this._dwConfiguration.sessionId)),this._contextService},i.prototype.getJmcService=function(){return this._jmcService||(this._jmcService=new l(this._dwConfiguration.sessionId)),this._jmcService},i.prototype.close=function(){return this._controller.request(r.ACTION_DATAWAREHOUSE_CLOSE)},i.prototype.closeSynchronous=function(){if(n.Plugin.F12)this._controller.requestSync(r.ACTION_DATAWAREHOUSE_CLOSE);else throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1009"))},i.prototype.initialize=function(){this._logger.debug("Initializing DataWarehouse...");var n={analyzers:this._dwConfiguration.analyzers,dataSources:this._dwConfiguration.dataSources,symbolStorePath:this._dwConfiguration.symbolStorePath||"",symbolCachePath:this._dwConfiguration.symbolCachePath||"",isJmcEnabled:typeof this._dwConfiguration.isJmcEnabled=="undefined"?!0:this._dwConfiguration.isJmcEnabled};return this._logger.debug("DataWarehouse configuration: "+JSON.stringify(n)),this._controller.request(r.ACTION_DATAWAREHOUSE_INITIALIZATION_DEPRECATED,n)},i.prototype.beginInitialization=function(){this._logger.debug("Begin initializing DataWarehouse");var n={analyzers:this._dwConfiguration.analyzers,dataSources:this._dwConfiguration.dataSources,symbolStorePath:this._dwConfiguration.symbolStorePath||"",symbolCachePath:this._dwConfiguration.symbolCachePath||"",isJmcEnabled:typeof this._dwConfiguration.isJmcEnabled=="undefined"?!0:this._dwConfiguration.isJmcEnabled,symbolLocatorServiceFullPath:this._dwConfiguration.symbolLocatorServiceFullPath||"",portablePdbLibraryFullPath:this._dwConfiguration.portablePdbLibraryFullPath||""};return this._logger.debug("DataWarehouse configuration: "+JSON.stringify(n)),this._controller.request(r.ACTION_DATAWAREHOUSE_BEGININITIALIZATION,n)},i.prototype.pushDataSources=function(n){this._logger.debug("Begin pushing data source(s) to DataWarehouse");var t={dataSources:n};return this._logger.debug("PushDataSources payload: "+JSON.stringify(t)),this._controller.request(r.ACTION_DATAWAREHOUSE_PUSHDATASOURCES,t)},i.prototype.endInitialization=function(){return this._logger.debug("End initializing DataWarehouse"),this._controller.request(r.ACTION_DATAWAREHOUSE_ENDINITIALIZATION)},i.prototype.getPrivateData=function(n,t){this._logger.debug("Getting private data from DataWarehouse...");var i={id:n,dataArg:t};return this._controller.request(r.ACTION_DATAWAREHOUSE_GETPRIVATEDATA,i)},i.prototype.setPrivateData=function(n,t){this._logger.debug("Setting private data in DataWarehouse...");var i={id:n,data:t};return this._controller.request(r.ACTION_DATAWAREHOUSE_SETPRIVATEDATA,i)},i.prototype.getDataFromAnalyzer=function(t){var i=this,e,u,o,s=function(n,t,i){e=n;u=t;o=i},h=this._controller.request(r.ACTION_DATAWAREHOUSE_GETDATA,t).then(function(n){var t=null;n!==null&&typeof n!="undefined"&&typeof n.dh_r_id=="number"?(i._logger.debug("Result ID ("+n.dh_r_id+") received for Session ID: "+i._dwConfiguration.sessionId),t=new f(n.dh_r_id,i._dwConfiguration.sessionId,i._controller)):t=n;e(t)},function(n){u&&u(n)},function(n){n&&o(n)}),c=function(){h.cancel()};return new n.Plugin.Promise(s,c)},i}();var c=function(){function n(n){this._controller=new t.HostController(n,r.CONTROLLER_ID_DATAWAREHOUSECONTEXTSERVICE);this._sessionId=n}return n.prototype.createContext=function(n){var i=this,t={};return n!==null&&typeof n!="undefined"&&(t.data=o(null,n)),this._controller.request(r.ACTION_DATAWAREHOUSECONTEXTSERVICE_CREATECONTEXT,t).then(function(n){return new u(n,i._sessionId)})},n.prototype.deleteContext=function(n){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXTSERVICE_DELETECONTEXT,{contextId:n})},n.prototype.copyContext=function(n){var t=this;return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXTSERVICE_COPYCONTEXT,{contextId:n}).then(function(n){return new u(n,t._sessionId)})},n.prototype.getContext=function(n){var t=this;return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXTSERVICE_GETCONTEXT,{contextId:n}).then(function(n){return new u(n,t._sessionId)})},n.prototype.getGlobalContext=function(){var n=this;return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXTSERVICE_GETGLOBALCONTEXT).then(function(t){return new u(t,n._sessionId)})},n}(),u=function(){function n(n,i){this._info=n;this._sessionId=i;this._controller=new t.HostController(this._sessionId,r.CONTROLLER_ID_DATAWAREHOUSECONTEXT)}return n.prototype.getContextId=function(){return this._info.contextId},n.prototype.getParentContextId=function(){return this._info.parentContextId},n.prototype.setData=function(n){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_SETDATA,o(this._info.contextId,n))},n.prototype.getData=function(){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_GETDATA,{contextId:this._info.contextId}).then(function(n){return{timeDomain:new t.JsonTimespan(new t.BigNumber(n.timeDomain.begin.h,n.timeDomain.begin.l),new t.BigNumber(n.timeDomain.end.h,n.timeDomain.end.l)),machineDomain:n.machineDomain,processDomain:n.processDomain,threadDomain:n.threadDomain,customDomain:n.customDomain}})},n.prototype.getTimeDomain=function(){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_GETTIMEDOMAIN,{contextId:this._info.contextId}).then(function(n){return new t.JsonTimespan(new t.BigNumber(n.begin.h,n.begin.l),new t.BigNumber(n.end.h,n.end.l))})},n.prototype.setTimeDomain=function(n){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_SETTIMEDOMAIN,{contextId:this._info.contextId,timeDomain:{begin:n.begin.jsonValue,end:n.end.jsonValue}})},n.prototype.getMachineDomain=function(){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_GETMACHINEDOMAIN,{contextId:this._info.contextId})},n.prototype.addToMachineDomain=function(n){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_ADDTOMACHINEDOMAIN,{contextId:this._info.contextId,machineName:n})},n.prototype.clearMachineDomain=function(){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_CLEARMACHINEDOMAIN,{contextId:this._info.contextId})},n.prototype.getProcessDomain=function(){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_GETPROCESSDOMAIN,{contextId:this._info.contextId})},n.prototype.addToProcessDomain=function(n){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_ADDTOPROCESSDOMAIN,{contextId:this._info.contextId,processId:n})},n.prototype.clearProcessDomain=function(){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_CLEARPROCESSDOMAIN,{contextId:this._info.contextId})},n.prototype.getThreadDomain=function(){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_GETTHREADDOMAIN,{contextId:this._info.contextId})},n.prototype.addToThreadDomain=function(n){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_ADDTOTHREADDOMAIN,{contextId:this._info.contextId,threadId:n})},n.prototype.clearThreadDomain=function(){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_CLEARTHREADDOMAIN,{contextId:this._info.contextId})},n.prototype.getCustomDomain=function(n){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_GETCUSTOMDOMAIN,{contextId:this._info.contextId,name:n}).then(function(n){return n.value})},n.prototype.setCustomDomain=function(n,t){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_SETCUSTOMDOMAIN,{contextId:this._info.contextId,name:n,value:t})},n}(),l=function(){function i(i){this._controller=new t.HostController(i,r.CONTROLLER_ID_DATAWAREHOUSEJMCSERVICE);this._logger=t.getLogger();this._viewEventManager=n.VisualStudio.DiagnosticsHub.getViewEventManager()}return i.prototype.getJmcEnabledState=function(){var t=this;return this._controller.request(r.ACTION_DATAWAREHOUSEJMCSERVICE_GETJMCENABLED).then(function(i){if(typeof i.jmcOn=="undefined"){t._logger.error("getJmcEnabledState() result is ill-formed");throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.9999"))}return i.jmcOn})},i.prototype.setJmcEnabledState=function(t){var i=this;return this._controller.request(r.ACTION_DATAWAREHOUSEJMCSERVICE_SETJMCENABLED,{jmcOn:t}).then(function(t){if(typeof t.prevEnabledState=="undefined"||typeof t.currEnabledState=="undefined"){i._logger.error("setJmcEnabledState() result is ill-formed");throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.9999"))}t.prevEnabledState!==t.currEnabledState&&i._viewEventManager.jmcEnabledStateChanged.raiseEvent(t)})},i}(),s=null;i.loadDataWarehouse=a})(t.DataWarehouse||(t.DataWarehouse={}));var i=t.DataWarehouse})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){(function(t){"use strict";function i(){return r===null&&(r=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.VisualStudioServiceMarshaler",{},!0)),r}var u,f,e,o,s,r;(function(n){n[n.UserCode=0]="UserCode";n[n.Library=1]="Library";n[n.Unrelated=2]="Unrelated";n[n.Unsure=3]="Unsure"})(u||(u={}));f=function(){function t(){this._serviceProxy=i()}return t.prototype.getJmcTypeForUrls=function(t){return n.Plugin.F12?n.Plugin.F12.JMC.getJMCTypeForUrls(t).then(function(n){if(!n)return[];for(var t=0;t<n.length;++t)switch(n[t]){case 0:n[t]=0;break;case 1:n[t]=1;break;case 2:n[t]=2;break;case 3:default:n[t]=-1}return n}):this._serviceProxy._call("getJMCTypeForUrls",t)},t}();t.JavaScriptJmc=f;e=function(){function n(){this._serviceProxy=i()}return n.prototype.getAllExecutableCodeOutputs=function(n){return this._serviceProxy._call("getSolutionExecutableCodeOutputs",n)},n}();t.SolutionService=e;o=function(){function n(){this._serviceProxy=i()}return n.prototype.showDocument=function(n,t){return this._serviceProxy._call("showDocument",n,t)},n.prototype.getAccessiblePathToFile=function(n){return this._serviceProxy._call("getAccessiblePathToFile",n)},n}();t.SourceService=o;s=function(){function n(){this._serviceProxy=i()}return n.prototype.isDataWarehouseInVsHub=function(){return this._serviceProxy._call("isDataWarehouseInVsHub")},n}();t.DataWarehouseRegistryService=s;r=null;t.getVisualStudioService=i})(t.Controllers||(t.Controllers={}));var i=t.Controllers})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function e(){return i===null&&(i=new f),i}var r=function(){function n(n){this._onHandlerCompleted=n}return n.prototype.complete=function(n){this._onHandlerCompleted(n)},n}(),u,f,i;t.DocumentClosingEventDeferral=r;u=function(){function n(n){this._onHandlerCompleted=n;this._eventDeferral=null}return Object.defineProperty(n.prototype,"waitHandler",{get:function(){return this._eventDeferral!==null},enumerable:!0,configurable:!0}),n.prototype.getDeferral=function(){return this._eventDeferral===null&&(this._eventDeferral=new r(this._onHandlerCompleted)),this._eventDeferral},n}();t.DocumentClosingEventArgs=u;f=function(){function i(){this._documentProxy=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.DocumentPortMarshaler",{},!0);this._logger=t.getLogger()}return i.prototype.getTools=function(){return this._documentProxy._call("getTools")},i.prototype.openInAlternateFormat=function(t){if(t===1)return this._logger.debug("Opening current document as a Vspx"),this._documentProxy._call("openAsVspx");throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1000"))},i.prototype.isPerformanceDebuggerDocument=function(){return this._documentProxy._call("isPerformanceDebuggerDocument")},i}();i=null;t.getCurrentDocument=e})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){(function(i){"use strict";function f(){return r===null&&(r=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.TelemetryAnalysisServiceMarshaler",{},!0)),r}function l(){return u===null&&(u=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.TelemetryGlobalServiceMarshaler",{},!0)),u}var c,e,o,s,h,r,u;(function(n){n[n.SwimLane=0]="SwimLane";n[n.DoubleSlider=1]="DoubleSlider";n[n.DoubleSliderHandles=2]="DoubleSliderHandles"})(i.SelectionChangeSource||(i.SelectionChangeSource={}));c=i.SelectionChangeSource;e=function(){function n(){this._serviceProxy=f()}return n.prototype.jmcToggle=function(n){this._serviceProxy._post("reportJmcToggle",n)},n.prototype.enabledAtStart=function(n){this._serviceProxy._post("cpuUsageEnabledInitially",n)},n}();i.CpuUsage=e;o=function(){function n(){this._serviceProxy=l()}return n.prototype.selectToolsDropdown=function(){this._serviceProxy._post("reportSelectToolsDropdown")},n}();i.PerformanceDebugger=o;s=function(){function n(){this._serviceProxy=f()}return n.prototype.zoomIn=function(){this._serviceProxy._post("reportZoomIn")},n.prototype.zoomOut=function(){this._serviceProxy._post("reportZoomOut")},n.prototype.resetZoom=function(){this._serviceProxy._post("reportResetZoom")},n.prototype.clearSelection=function(){this._serviceProxy._post("reportClearSelection")},n.prototype.selectionChanged=function(n,i,r){var u=r||t.Guid.empty.toString();this._serviceProxy._post("reportSelectionChanged",n,i,u)},n.prototype.showGraphTooltip=function(n){this._serviceProxy._post("reportGraphTooltip",n)},n}();i.ViewportController=s;h=function(){function n(){this._serviceProxy=f()}return n.prototype.lostEvents=function(n){this._serviceProxy._post("countLostEvents",n)},n}();i.CollectedData=h;r=null;u=null})(t.Telemetry||(t.Telemetry={}));var i=t.Telemetry})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function h(){return i===null&&(i=new s),i}var r=function(){function i(){if(this._publisher=new t.Publisher([i.EventName]),this._eventAggregator=n.VisualStudio.DiagnosticsHub.getEventAggregator(),this._eventAggregator.addEventListener(i.EventGlobalName,this.forwardSelectionTimeRangeEvent.bind(this)),this._timeRangeMarshaler=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.SwimlaneDataServiceMarshaler",{},!0),!this._timeRangeMarshaler)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1007"))}return i.prototype.addEventListener=function(n){this._publisher.addEventListener(i.EventName,n)},i.prototype.removeEventListener=function(n){this._publisher.removeEventListener(i.EventName,n)},i.prototype.raiseEvent=function(n){this.setTimeRange(n.position);var t={i:n.isIntermittent};n.position&&(t.ts={begin:n.position.begin.jsonValue,end:n.position.end.jsonValue});this._eventAggregator.raiseEvent(i.EventGlobalName,t)},i.prototype.getTimeRange=function(){return this._timeRangeMarshaler._call("getCurrentTimeRange").then(function(n){return n&&n.begin&&n.end?new t.JsonTimespan(new t.BigNumber(n.begin.h,n.begin.l),new t.BigNumber(n.end.h,n.end.l)):null})},i.prototype.setTimeRange=function(n){var t=null;n&&(t={begin:n.begin.jsonValue,end:n.end.jsonValue});this._timeRangeMarshaler._call("setCurrentTimeRange",t)},i.prototype.forwardSelectionTimeRangeEvent=function(n){var r,u;typeof n.ts!="undefined"&&(r=new t.JsonTimespan(new t.BigNumber(n.ts.begin.h,n.ts.begin.l),new t.BigNumber(n.ts.end.h,n.ts.end.l)));u={position:r,isIntermittent:n.i};this._publisher.invokeListener(i.EventName,u)},i.EventGlobalName="DiagnosticsHub.EventAggregator.SelectionTimeRangeChanged",i.EventName="DiagnosticsHub.SelectionTimeRangeChanged",i}(),u=function(){function i(){this._publisher=new t.Publisher([i.EventName]);this._eventAggregator=n.VisualStudio.DiagnosticsHub.getEventAggregator();this._eventAggregator.addEventListener(i.EventGlobalName,this.forwardChangeViewportEvent.bind(this))}return i.prototype.addEventListener=function(n){this._publisher.addEventListener(i.EventName,n)},i.prototype.removeEventListener=function(n){this._publisher.removeEventListener(i.EventName,n)},i.prototype.raiseEvent=function(n){var t=null;n&&(t={beginH:n.begin.jsonValue.h,beginL:n.begin.jsonValue.l,endH:n.end.jsonValue.h,endL:n.end.jsonValue.l});this._eventAggregator.raiseEvent(i.EventGlobalName,t)},i.prototype.forwardChangeViewportEvent=function(n){var r=null;typeof n.beginH!="undefined"&&typeof n.beginL!="undefined"&&typeof n.endH!="undefined"&&typeof n.endL!="undefined"&&(r=new t.JsonTimespan(new t.BigNumber(n.beginH,n.beginL),new t.BigNumber(n.endH,n.endL)));this._publisher.invokeListener(i.EventName,r)},i.EventGlobalName="DiagnosticsHub.EventAggregator.ChangeViewport",i.EventName="DiagnosticsHub.ChangeViewport",i}(),f=function(){function i(){this._publisher=new t.Publisher([i.EventName]);this._eventAggregator=n.VisualStudio.DiagnosticsHub.getEventAggregator();this._eventAggregator.addEventListener(i.EventGlobalName,this.forwardJmcEnabledStateChangedEvent.bind(this))}return i.prototype.addEventListener=function(n){this._publisher.addEventListener(i.EventName,n)},i.prototype.removeEventListener=function(n){this._publisher.removeEventListener(i.EventName,n)},i.prototype.raiseEvent=function(n){this._eventAggregator.raiseEvent(i.EventGlobalName,n)},i.prototype.forwardJmcEnabledStateChangedEvent=function(n){this._publisher.invokeListener(i.EventName,n)},i.EventGlobalName="DiagnosticsHub.EventAggregator.JmcEnabledStateChanged",i.EventName="DiagnosticsHub.JmcEnabledStateChanged",i}(),e=function(){function i(){this._publisher=new t.Publisher([i.EventName]);this._eventAggregator=n.VisualStudio.DiagnosticsHub.getEventAggregator();this._eventAggregator.addEventListener(i.EventGlobalName,this.forwardDetailsViewSelectionChangedEvent.bind(this))}return i.prototype.addEventListener=function(n){this._publisher.addEventListener(i.EventName,n)},i.prototype.removeEventListener=function(n){this._publisher.removeEventListener(i.EventName,n)},i.prototype.raiseEvent=function(n){this._eventAggregator.raiseEvent(i.EventGlobalName,n)},i.prototype.forwardDetailsViewSelectionChangedEvent=function(n){this._publisher.invokeListener(i.EventName,n)},i.EventGlobalName="DiagnosticsHub.EventAggregator.DetailsViewSelectionChangedEvent",i.EventName="DiagnosticsHub.DetailsViewSelectionChangedEvent",i}(),o=function(){function i(){this._publisher=new t.Publisher([i.EventName]);this._eventAggregator=n.VisualStudio.DiagnosticsHub.getEventAggregator();this._eventAggregator.addEventListener(i.EventGlobalName,this.forwardDetailsViewSelectionChangedEvent.bind(this))}return i.prototype.addEventListener=function(n){this._publisher.addEventListener(i.EventName,n)},i.prototype.removeEventListener=function(n){this._publisher.removeEventListener(i.EventName,n)},i.prototype.raiseEvent=function(n){this._eventAggregator.raiseEvent(i.EventGlobalName,n)},i.prototype.forwardDetailsViewSelectionChangedEvent=function(n){this._publisher.invokeListener(i.EventName,n)},i.EventGlobalName="DiagnosticsHub.EventAggregator.DetailsViewReadyEvent",i.EventName="DiagnosticsHub.DetailsViewReadyEvent",i}(),s=function(){function n(){this._selectionChanged=new r;this._changeViewport=new u;this._jmcEnabledStateChanged=new f;this._detailsViewSelectionChangedEvent=new e;this._detailsViewReady=new o}return Object.defineProperty(n.prototype,"selectionChanged",{get:function(){return this._selectionChanged},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"changeViewport",{get:function(){return this._changeViewport},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"jmcEnabledStateChanged",{get:function(){return this._jmcEnabledStateChanged},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"detailsViewSelectionChanged",{get:function(){return this._detailsViewSelectionChangedEvent},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"detailsViewReady",{get:function(){return this._detailsViewReady},enumerable:!0,configurable:!0}),n}(),i=null;t.getViewEventManager=h})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function n(){}return n.VSHUB_E_INVALID_REGEX=3776045057,n}();n.ErrorCodes=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function u(r){if(!i){if(r){var u=new t.DataWarehouseServiceHubHost;return u.initialize().then(function(){return i=u})}i=new t.DataWarehouseNativeHost(t.getLogger())}return n.Plugin.Promise.wrap(i)}function f(n){return i||(i=n?new t.DataWarehouseServiceHubHost:new t.DataWarehouseNativeHost(t.getLogger())),i}var r=function(){function i(t,i){this._sessionId=t;this._controllerId=i;this._dataWarehouseRegistryService=new n.VisualStudio.DiagnosticsHub.Controllers.DataWarehouseRegistryService}return i.prototype.request=function(t,i){var r=this,f,e;return this._host?this._host.request(this._controllerId,t,this._sessionId,i):(f=this.ensureIsPerformanceDebuggerDocument(),e=this.ensureDataWarehouseInVsHub(),n.Plugin.Promise.join([f,e]).then(function(n){if(n){var f=!1;return n.forEach(function(n){f=f||n}),u(f).then(function(n){return r._host=n,r._host.request(r._controllerId,t,r._sessionId,i)})}}))},i.prototype.requestSync=function(n,t){return this._host||(this._host=f(!1)),this._host.requestSync(this._controllerId,n,this._sessionId,t)},i.prototype.ensureIsPerformanceDebuggerDocument=function(){return n.Plugin.F12?n.Plugin.Promise.wrap(!1):t.getCurrentDocument().isPerformanceDebuggerDocument()},i.prototype.ensureDataWarehouseInVsHub=function(){return n.Plugin.F12?n.Plugin.Promise.wrap(!1):this._dataWarehouseRegistryService.isDataWarehouseInVsHub()},i}(),i;t.HostController=r;i=null})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={}))
//# sourceMappingURL=DiagnosticsHub.min.js.map
body {
    margin: 0px;
    padding: 0px;
    color: rgb(0, 0, 0); /*[{plugin-color}]*/
    overflow: hidden;
    font-family: Segoe UI, Tahoma, Arial, Verdana; /*[{plugin-font-family}]*/
    font-size: 12px; /*[{plugin-font-size}]*/
    background-image: url("icons/texture.png");
    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("./BptDiagnosticCommon/icons/add_row.png") no-repeat 0px 0px !important;
}

.icon-empty {
    background: url("./BptDiagnosticCommon/icons/common-icons.png") no-repeat -640px -16px !important;
}

.icon-tip {
    background: url("./BptDiagnosticCommon/icons/misc-icons.png") no-repeat -3952px -16px !important;
}

.icon-tools {
    background: url("./BptDiagnosticCommon/icons/common-icons.png") no-repeat -2258px -16px !important;
}

.icon-tree {
    background: url("./BptDiagnosticCommon/icons/misc-icons.png") no-repeat -3998px -16px !important;
}

.icon-tree-add {
    background: url("./BptDiagnosticCommon/icons/misc-icons.png") no-repeat -4046px -16px !important;
}

/*
Define the next section in your manifest to get tree icons themed
"themed_images": {
    "vs-image-tree-icons": {
        "bitmap_source": "BptDiagnosticCommon\\icons\\tree-icons.png",
        "background_color": "plugin-contextmenu-background-color"
    }
*/

.icon-tree-collapse-all {
    background: url("./BptDiagnosticCommon/icons/tree-icons.png") no-repeat -16px -16px !important; /*[ url({vs-image-tree-icons}) no-repeat -16px -16px !important]*/
}

.icon-tree-collapsed {
    background: url("./BptDiagnosticCommon/icons/itemCollapsedIcon.png") no-repeat 0px 0px !important; /*[ url({vs-image-icon-tree-collapsed}) no-repeat 0px 0px !important]*/
    background-position-x: center !important;
    background-position-y: center !important;
    background-size: 70% !important;
}

.icon-tree-collapsed-2 {
    background: url("./BptDiagnosticCommon/icons/tree-icons.png") no-repeat -108px -16px !important; /*[ url({vs-image-tree-icons}) no-repeat -108px -16px !important]*/
}

.icon-tree-corner {
    background: url("./BptDiagnosticCommon/icons/misc-icons.png") no-repeat -4622px -16px !important;
}

.icon-tree-empty {
    background: url("./BptDiagnosticCommon/icons/tree-icons.png") no-repeat -156px -16px !important; /*[ url({vs-image-tree-icons}) no-repeat -156px -16px !important]*/
}

.icon-tree-expand-all {
    background: url("./BptDiagnosticCommon/icons/tree-icons.png") no-repeat -204px -16px !important; /*[ url({vs-image-tree-icons}) no-repeat -204px -16px !important]*/
}

.icon-tree-expanded {
    background: url("./BptDiagnosticCommon/icons/itemExpandedIcon.png") no-repeat 0px 0px !important; /*[ url({vs-image-icon-tree-expanded}) no-repeat 0px 0px !important]*/
    background-position-x: center !important;
    background-position-y: center !important;
    background-size: 60% !important;
}

.icon-tree-expanded-2 {
    background: url("./BptDiagnosticCommon/icons/tree-icons.png") no-repeat -296px -16px !important; /*[ url({vs-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: 0px;
    position: absolute;
}

.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-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: url("./BptDiagnosticCommon/icons/grid-header-separator.png") no-repeat right top;
    background-color: #FAFAFA; /*[{plugin-table-header-background-color}]*/
    width: 20px;
    height: 100%;
    overflow: hidden;
    display: flex;
    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:hover > .title {
        color: rgb(0, 0, 0); /*[{plugin-treeview-content-inactive-selected-color}]*/
    }

    .grid-header-column > .separator {
        background: url("./BptDiagnosticCommon/icons/updownsep.png") repeat-y -1000px 0px;
        top: 0px;
        width: 12px;
        right: -6px;
        bottom: 0px;
        z-index: 6;
        cursor: e-resize;
        position: absolute;
    }

    .grid-header-column > .sort-handle {
        z-index: 3;
        font-family: Marlett !important;
        padding-top: 7px;
        padding-left: 4px;
        padding-right: 4px;
        padding-bottom: 4px;
        text-align: left;
        vertical-align: middle;
        float:left;
    }

    .grid-header-column > .title {
        padding: 4px;
        text-align: left;
        vertical-align: middle;
        float:left;
        color: rgb(128, 128, 128); /*[{plugin-color}]*/
        overflow: hidden;
        white-space: nowrap;
        cursor: default;
        text-overflow: ellipsis;
    }

    .grid-header-column > .indented-title {
        text-indent: 16px;
    }

.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;
    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("./BptDiagnosticCommon/icons/columnmove.png") -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("./BptDiagnosticCommon/icons/common-icons.png") no-repeat -401px 50% !important;
    }

.grid-gutter-drop:hover {
    background: url("./BptDiagnosticCommon/icons/common-icons.png") 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("./BptDiagnosticCommon/icons/common-icons.png") 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;
    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-inactive-selected-color}]*/
        background-color: rgb(242, 247, 253); /*[{plugin-treeview-content-inactive-selected-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: 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;
    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;
    text-overflow: ellipsis;
}

.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;
        }

.gridSplitter {
    position: relative;
    background-color: #FAFAFA; /*[{vs-command-bar-options-background-color}]*/
}

.gridSplitter-Vertical {
    width: 100%;
    height: 5px;
    cursor: ns-resize;
}

.gridSplitter-Horizontal {
    width: 5px;
    height: 100%;
    cursor: ew-resize;
}

.has-header.grid .grid-canvas {
    top: 2.2em;
}
var __extends,Common;(function(n){function r(){document.addEventListener("keydown",function(n){if(n.keyCode===116||n.keyCode===117||n.keyCode===121&&n.shiftKey||n.keyCode===70&&n.ctrlKey)return n.preventDefault(),n.stopPropagation(),!1});document.addEventListener("contextmenu",function(n){return n.preventDefault(),n.stopPropagation(),!1});window.addEventListener("mousewheel",function(n){if(n.ctrlKey)return n.preventDefault(),n.stopPropagation(),!1})}var t,i;(function(n){n[n.BACKSPACE=8]="BACKSPACE";n[n.TAB=9]="TAB";n[n.ENTER=13]="ENTER";n[n.SHIFT=16]="SHIFT";n[n.CONTROL=17]="CONTROL";n[n.ALT=18]="ALT";n[n.CAPS_LOCK=20]="CAPS_LOCK";n[n.ESCAPE=27]="ESCAPE";n[n.SPACE=32]="SPACE";n[n.PAGE_UP=33]="PAGE_UP";n[n.PAGE_DOWN=34]="PAGE_DOWN";n[n.END=35]="END";n[n.HOME=36]="HOME";n[n.ARROW_LEFT=37]="ARROW_LEFT";n[n.ARROW_FIRST=37]="ARROW_FIRST";n[n.ARROW_UP=38]="ARROW_UP";n[n.ARROW_RIGHT=39]="ARROW_RIGHT";n[n.ARROW_DOWN=40]="ARROW_DOWN";n[n.ARROW_LAST=40]="ARROW_LAST";n[n.INSERT=45]="INSERT";n[n.DELETE=46]="DELETE";n[n.A=65]="A";n[n.B=66]="B";n[n.C=67]="C";n[n.F=70]="F";n[n.G=71]="G";n[n.K=75]="K";n[n.M=77]="M";n[n.O=79]="O";n[n.V=86]="V";n[n.X=88]="X";n[n.Y=89]="Y";n[n.Z=90]="Z";n[n.MENU=93]="MENU";n[n.PLUS=107]="PLUS";n[n.MINUS=109]="MINUS";n[n.F1=112]="F1";n[n.F2=113]="F2";n[n.F3=114]="F3";n[n.F4=115]="F4";n[n.F5=116]="F5";n[n.F6=117]="F6";n[n.F7=118]="F7";n[n.F8=119]="F8";n[n.F9=120]="F9";n[n.F10=121]="F10";n[n.F11=122]="F11";n[n.F12=123]="F12";n[n.COMMA=188]="COMMA";n[n.PERIOD=190]="PERIOD"})(n.KeyCodes||(n.KeyCodes={}));t=n.KeyCodes,function(n){n[n.LEFT_BUTTON=0]="LEFT_BUTTON";n[n.MIDDLE_BUTTON=1]="MIDDLE_BUTTON";n[n.RIGHT_BUTTON=2]="RIGHT_BUTTON"}(n.MouseButtons||(n.MouseButtons={}));i=n.MouseButtons;n.blockBrowserAccelerators=r})(Common||(Common={})),function(n){(function(n){var t=function(){function n(n){if(this._rootElement=n,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.")}return n.prototype.appendChild=function(n){this._rootElement.appendChild(n.rootElement);n.parent=this},n.prototype.removeChild=function(n){n.rootElement.parentElement&&(this._rootElement.removeChild(n.rootElement),n.parent=null)},Object.defineProperty(n.prototype,"rootElement",{get:function(){return this._rootElement},set:function(n){if(!n)throw new Error("Invalid root");var t=this._rootElement;this._rootElement=n;t&&t.parentNode&&t.parentNode.replaceChild(n,t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parent",{get:function(){return this._parent},set:function(n){this._parent!==n&&(this._parent=n,this._parent&&!this._parent.rootElement.contains(this._rootElement)&&this._parent.appendChild(this),this.onParentChanged())},enumerable:!0,configurable:!0}),n.prototype.onParentChanged=function(){},n}();n.Control=t})(n.Controls||(n.Controls={}));var t=n.Controls}(Common||(Common={}));__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){(function(t){(function(i){var u,l,o,f,e,s,a,r,h;(function(n){var t=function(){function t(){}return t.stableReverse=function(n,t){for(var r,u,f=[],i=n.length-1;i>=0;i--){for(r=i-1;r>=0;r--)if(0!==t(n[r],n[i]))break;for(u=r+1;u<=i;u++)f.push(n[u]);i=r+1}for(i=0;i<f.length;i++)n[i]=f[i]},t.defaultComparer=function(n,t,i,r){var f=i[n.index],u=r[n.index];return typeof f=="undefined"||f===null?typeof u=="undefined"||u===null?0:-1:typeof u=="undefined"||u===null?1:f.toString().toLocaleUpperCase().localeCompare(u.toString().toLocaleUpperCase())},t.sortComparer=function(t,i,r,u){for(var f=0;f<t.length;f++){var o=t[f],s=i[f],h=s.comparer||n.TreeNodeSort.defaultComparer,e=h(s,o.order,r,u);if(e===0)continue;else return o.order==="desc"?-e:e}return 0},t}();n.TreeNodeSort=t})(i.Utility||(i.Utility={}));u=i.Utility;l=function(){function n(n,t,i){this.gridData=n;this.expandStates=t;this.toggleFunction=i}return n}();i.TreeInfo=l;o=function(){function n(t,i,r,u,f,e,o,s,h){this.index=t;this.text=i;this.tooltip=r;this.width=u;this.canSortBy=f;this.getColumnValue=e;this.getCellCSSClass=o;this.comparer=s;this.hasHTMLContent=!1;this.defaultSortOrder=h||"asc";this.maxTooltipLineLength=n.DEFAULT_MAX_TOOLTIP_LINE_LENGTH}return n.DEFAULT_MAX_TOOLTIP_LINE_LENGTH=64,n}();i.ColumnInfo=o;f=function(){function n(n,t){this.index=n;this.order=t}return n}();i.SortOrderInfo=f;e=function(){function n(n,t){this.data=n;this.expandState=t;this.children=[]}return n}();i.TreeNode=e;s=function(){function n(n,t){this.icon=n;this.checkbox=t}return n}();i.GutterOptions=s;a=function(){function n(n,t,i,r,u){this.childDataCallback=n;this.columns=t;this.sortOrders=i;this.allowMultiSelect=u||!1;this.allowSortOnMultiColumns=!1;this.asyncInit=!0;this.autoSort=!0;this.coreCssClass="grid";this.cssClass="";this.canvasClass="grid-canvas";this.headerElementClass="grid-header";this.headerColumnElementClass="grid-header-column";this.rowClass="grid-row";this.rowNormalClass="grid-row-normal";this.rowSelectedClass="grid-row-selected";this.rowSelectedBlurClass="grid-row-selected-blur";this.rowCurrentClass="grid-row-current";this.cellClass="grid-cell";this.expandStates=[];this.extendViewportBy=3;this.gutter=new s;this.header=!0;this.height="100%";this.initialSelection=!1;this.keepSelection=!1;this.payloadSize=200;this.source=null;this.editCellCallback=r;this.overflowColumn=!1;this.focusable=!0}return n}();i.GridOptions=a;r=function(){function n(n,t){this.rowIndex=n;this.dataIndex=t}return n}();i.RowIndexInfo=r;h=function(){function n(n,t){this.width=n;this.height=t}return n}();i.Size=h;var c=function(){function n(n,t){this.start=n;this.end=t}return n}(),v=function(){function n(n,t,i,r){this.active=n;this.index=t;this.originalWidth=i;this.origin=r}return n}(),y=function(t){function i(n,i){t.call(this,n);this._options=i;this._canvas=null;this._contentSpacer=null;this._element=null;this._focus=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=!1;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=!1;this._resetScroll=!1;this._ignoreScroll=!1;this._scrollTop=0;this._scrollLeft=0;this._cancelable=null;this._updateThemeAttributes();this.initialize()}return __extends(i,t),i._setTooltip=function(n,t,i,r){r=r||o.DEFAULT_MAX_TOOLTIP_LINE_LENGTH;r!==-1&&(t=this._textSplit(t,r));Microsoft.Plugin.Tooltip.defaultTooltipContentToHTML&&(t=t.replace(/[<>]/g,function(n){return n==="<"?"&lt;":"&gt;"}),t=t.replace("\r\n","<br/>"));var u={content:t,height:i,contentContainsHTML:Microsoft.Plugin.Tooltip.defaultTooltipContentToHTML};n.setAttribute("data-plugin-vs-tooltip",JSON.stringify(u))},i.prototype.getSelectionCount=function(){return this._selectionCount},i.prototype.getElement=function(){return this._element},i.prototype.setAriaDescription=function(n){this._ariaDescription=n;this._updateGridAriaLabel()},i.prototype.initializeDataSource=function(){var n;if(this._resetScroll){this._ignoreScroll=!0;try{n=this._canvas;n.scrollTop=0;n.scrollLeft=0;this._scrollLeft=0;this._scrollTop=0;this._resetScroll=!1}finally{this._ignoreScroll=!1}}return this.setDataSource(this._options.source,this._options.expandStates,this._options.columns,this._options.sortOrders).then(this._initializeDataSourceComplete.bind(this))},i.prototype.activateWithDynamicData=function(n){this.setDataSource([],[],this._options.columns,null);this._count=n;this._expandedCount=n;this._expandStates=[0]},i.prototype.setDataSource=function(n,t,r,u,f){var s=this,o,h,l,e,c;if(this._dataSource=n||[],this._count=l=this._dataSource.length,t?(this._expandStates=t,this._indentLevels=i.expand(t)):(this._indentLevels=null,this._expandStates=null),this._expandedCount=l,this._updateRanges(),this._columns=[],r){var a=function(n,t,i,r,u,f,e){return s._drawCell(n,t,i,r,u,f,e)},v=function(n,t){return s._drawHeaderCellValue(n,t)},y=function(n,t,i){return s.getColumnValue(n,t,i)};for(o=0,h=r.length;o<h;o++)e=r[o],e.index=typeof e.index!="undefined"?e.index:String(o),e.canSortBy=e.canSortBy!==!1,e.canMove=e.canMove!==!1,e.width=typeof e.width!="undefined"?e.width:100,e.getCellContents=e.getCellContents||a,e.getHeaderCellContents=e.getHeaderCellContents||v,e.getColumnValue=e.getColumnValue||y,this._columns.push(e)}if(this._sortOrder=[],u)for(o=0,h=u.length;o<h;o++)c=u[o],c.order!=="desc"&&(c.order="asc"),this._sortOrder.push(c);return this._clearSelection(),this._determineIndentIndex(),this._options.asyncInit?window.setTimeout(function(){return s._layoutAfterSetDataSource(f)},0):this._layoutAfterSetDataSource(f),this._updateAriaLabelForColumns(r),Microsoft.Plugin.Promise.wrap(null)},i.prototype.getRowInfo=function(n){return this._rows[n]},i.prototype.getRowData=function(n){return this._dataSource[n]},i.prototype.getRowDataIndex=function(n){return this._dataSource.indexOf(n)},i.prototype.getColumns=function(){return this._columns||[]},i.prototype.getSortOrder=function(){return this._sortOrder||[]},i.prototype.getSortColumns=function(n){return n=n||this.getSortOrder(),this._getSortColumns(n)},i.prototype._updateRanges=function(){var n=0,i=0,r=this._count,t=[],u=0,f;if(this._expandStates){while(n<r)f=this._expandStates[n],f<0?(t[t.length]=new c(i,n),u+=n-i+1,n+=1-f,i=n):n++;i<r&&(t[t.length]=new c(i,r-1),u+=r-i)}else u=r,t[t.length]=new c(0,u);this._expandedCount=u;this._visibleRange=t},i.prototype.expandNode=function(n){var r=this,t,i;this._dataSource[n+1].isPlaceholder&&this._getChildDataCallback(this._dataSource[n],function(t){t!==null&&r._adjustForDynamicData(t.itemsWithPlaceholders,t.expandStates,n)});this._expandStates&&(t=this._getExpandState(n),t<0&&(this._expandStates[n]=-t,this._updateRanges(),i=this._rows[n],i&&(i.isDirty=!0),this._onExpandedCollapsed(!0,n)))},i.prototype.collapseNode=function(n){var t,i;this._expandStates&&(t=this._expandStates[n],t>0&&(this._expandStates[n]=-t,this._updateRanges(),i=this._rows[n],i&&(i.isDirty=!0),this._onExpandedCollapsed(!1,n)))},i.prototype.expandAllNodes=function(){var n=0,f=this._count,t=this._expandStates,i=!1,e=this._rows,r,u;if(t){while(n<f)r=t[n],r<0&&(t[n]=-r,i=!0,u=e[n],u&&(u.isDirty=!0)),n++;i&&(this._updateRanges(),this._onExpandedCollapsed(!0))}return i},i.prototype.collapseAllNodes=function(){var n=0,f=this._count,t=this._expandStates,i=!1,e=this._rows,r,u;if(t){while(n<f)r=t[n],r>0&&(t[n]=-r,i=!0,u=e[n],u&&(u.isDirty=!0)),n++;i&&(this._updateRanges(),this._onExpandedCollapsed(!1))}return i},i.prototype.expandAll=function(){var n=this;this._updateExpansionStateAndRedraw(function(){return n.expandAllNodes()})},i.prototype.collapseAll=function(){var n=this;this._updateExpansionStateAndRedraw(function(){return n.collapseAllNodes()})},i.prototype.tryToggle=function(n){var i,t,r;if(!this._expandStates||this._selectedIndex<0||this.getExpandedCount()<=0||(t=this._getDataIndex(this._selectedIndex),r=this._rows[t],!r))return!1;if(i=this._getExpandState(t),i!==0){if(n)if(i<0)this.expandNode(t);else return!1;else if(i>0)this.collapseNode(t);else return!1;return this._clearSelection(),this._addSelection(this._selectedIndex),this._layoutContentSpacer(),this._redraw(),!0}return!1},i.prototype.calculateVisibleRowIndices=function(n,t){var i=this.getExpandedCount()-1,r=this._measurements.rowHeight;return{first:Math.min(i,Math.max(0,Math.ceil(n/r))),last:Math.min(i,Math.floor(t/r)-1)}},i.prototype.getSelectedRowIntoView=function(n){return this._getRowIntoView(this._selectedIndex,n)},i.prototype.getSelectedRowIntoViewCenter=function(){return this._getRowIntoViewCenter(this._selectedIndex)},i.prototype.getSelectedRows=function(){return this._selectedRows},i.prototype.cacheRows=function(){},i.prototype.updateRow=function(n,t){var r=0,u=0,i;typeof t=="undefined"||t<0?t=this._getDataIndex(n):(typeof n=="undefined"||n<0)&&(n=this._getRowIndex(t));i=this._rows[t];i&&(this._expandStates&&(r=this._getExpandState(t),u=this.indentLevel(t)),this._updateRow(i,n,t,r,u))},i.prototype.layout=function(){this._measureCanvasSize();this._cleanUpRows();this._fixScrollPos();this._layoutContentSpacer();this._updateViewport();this._layoutHeader();this._drawHeader()},i.prototype.redraw=function(){this._fixScrollPos();this._redraw(!0)},i.prototype.getColumnValue=function(n,t){return this._dataSource[n][t]},i.prototype.getColumnText=function(n,t,r){var u,f=t.getColumnValue(n,t.index,r,this._dataSource);return u=typeof f!="string"?i.convertValueToDisplayString(f,t.format):f,t.maxLength=Math.max(t.maxLength||0,u.length),u},i.prototype.getSelectedRowIndex=function(){return this._selectionCount>0?this._selectedIndex:-1},i.prototype.setSelectedRowIndex=function(n){this._clearSelection();this._addSelection(n)},i.prototype.getSelectedDataIndex=function(){return this._getDataIndex(this.getSelectedRowIndex())},i.prototype.getSelectedDataIndices=function(){var i,n=this._selectedRows,t=[];if(n)for(i in n)t[t.length]=n[i];return t},i.prototype.ensureDataIndexExpanded=function(n){for(var t=this._getRowIndex(n);t<0||n>0&&t===0;)this.expandNode(this._getDataIndex(-t)),t=this._getRowIndex(n);return t},i.prototype.setSelectedDataIndex=function(n,t){var i=t?this.ensureDataIndexExpanded(n):this._getRowIndex(n);this.setSelectedRowIndex(i)},i.prototype.selectionChanged=function(){},i.prototype.selectedIndexChanged=function(){},i.prototype.onSort=function(n,t){return this._options.autoSort&&(this._trySorting(n,t),this._sortOrder=n,this.layout()),!0},i.prototype.getRowInfoFromEvent=function(n,t){var i=this.findClosestElement(n.target,t);return i?this._rowInfoMap[i.id]:null},i.prototype.getExpandStates=function(){return this._expandStates},i.prototype.options=function(){return this._options},i.prototype.getExpandedCount=function(){return this._expandedCount},i.prototype.setCounts=function(n){this._expandedCount=n;this._count=n},i.prototype.updateCounts=function(n){this._expandedCount+=n;this._count+=n},i.prototype.getVisibleRowIndices=function(){return this._getVisibleRowIndices()},i.prototype.addEventListenerToCanvas=function(n,t,i){this._canvas.addEventListener(n,function(){return i.apply(t,arguments)})},i.prototype.onSelectRow=function(){},i.prototype.widenRows=function(n){var u=4,i,r,t,f;for(t in this._canvas.children)if(t!=="0"&&this._canvas.children.hasOwnProperty(t)&&this._canvas.children[t].children){i=0;for(r in this._canvas.children[t].children)this._canvas.children[t].children.hasOwnProperty(r)&&(i+=this._canvas.children[t].children[r].scrollWidth);n<i+u&&(n=i+u)}for(t in this._canvas.children)t!=="0"&&this._canvas.children.hasOwnProperty(t)&&this._canvas.children[t].children&&(f=this._canvas.children[t],f.style.width=n+"px")},i.prototype.canvasClientWidth=function(){return this._canvas.clientWidth},i.prototype.markRowDirty=function(n){this._rows[n]&&(this._rows[n].isDirty=!0)},i.prototype.getMeasurements=function(){return this._measurements},i.prototype.getRowTop=function(n){return n*this._measurements.rowHeight},i.prototype.getTotalDataHeight=function(){return this.getExpandedCount()*this._measurements.rowHeight},i.prototype.isActive=function(){return this._active},i.prototype.getHeaderHeight=function(){return this._options.header?this._header.clientHeight:0},i.prototype.onCtrlC=function(){},i.prototype.onF12=function(){},i.prototype.onCtrlG=function(){},i.prototype.isEmpty=function(){var n,t;for(n in this._rows)if(t=parseInt(n),this._rows.hasOwnProperty(t))return!1;return!0},i.prototype.getCanvas=function(){return this._canvas},i.prototype.updateMouseOverRowStyle=function(){},i.prototype.updateMouseOutRowStyle=function(){},i.prototype.updateSelectedRowStyle=function(){},i.prototype.updateUnselectedRowStyle=function(){},i.prototype.onTreeIconMouseOver=function(){},i.prototype.onTreeIconMouseOut=function(){},i.expand=function(n){var u=[],i,t,r,e,f,o;if(n.length>0){for(i=[],t={level:1,origCount:n.length,remainingCount:n.length},i.push(t),r=0;r<n.length;){for(u.push(t.level),t.remainingCount--;t.remainingCount===0;){if(i.pop(),i.length==0)if(r===n.length-1)break;else throw new Error("invalid descendant counts, nesting not possible");if(e=i[i.length-1],e.remainingCount-=t.origCount,t=e,t.remainingCount<0)throw new Error("invalid descendant counts, cannot convert to indentation levels")}f=Math.abs(n[r]);f>0&&(o={level:u[u.length-1]+1,origCount:f,remainingCount:f},i.push(o),t=o);r++}if(i.length>0)throw new Error("invalid descendant counts, more input expected")}return u},i.prototype._getExpandState=function(n){var t=0;return this._expandStates&&typeof this._expandStates[n]=="number"&&(t=this._expandStates[n]),t},i.prototype._clearSelection=function(){this._selectionCount=0;this._selectedRows=null;this._activeAriaId=null},i.prototype._addSelection=function(n,t,i){var u=i&&i.keepSelectionStart,f=i&&i.doNotFireEvent,e=i&&i.toggle,r;if(this._options.allowMultiSelect===!1&&(u=!1,this._clearSelection()),this._selectedRows||(this._selectedRows={}),n>=0?(r=!0,this._selectedRows.hasOwnProperty(n)?e&&(r=!1,this._selectionCount=Math.max(0,this._selectionCount-1),delete this._selectedRows[n]):this._selectionCount++,typeof t!="number"&&(t=this._getDataIndex(n)),r&&(this._selectedRows[n]=t),this._selectedIndex=n,this._updateAriaAttribute(),(this._selectionStart<0||!u)&&(this._selectionStart=n)):(t=-1,this._selectedIndex=-1),f||(this._updateSelectionStyles(),this._selectionChanged(),this._selectedIndexChanged(this._selectedIndex,t)),n>=0)this.onSelectRow(n)},i.prototype.checkUpdateActive=function(n){this._selectionCount>0&&n.rowIndex===this._selectedIndex&&n.row&&this.updateActive(n.row)},i.prototype.updateActive=function(n){try{n.setActive()}catch(t){}},i.prototype._updateAriaAttribute=function(){var i=this._getDataIndex(this._selectedIndex),n,t,r;i!=null&&(n=this.getRowInfo(i),n&&n.row?(t=n.row.getAttribute("id"),t!==this._activeAriaId&&(r=this._getAriaLabelForRow(n),n.row.setAttribute("aria-label",r),this._activeAriaId=t),this._active&&this.checkUpdateActive(n)):this._updateAriaOnViewportUpdate=!0)},i.prototype._getAriaLabelForRow=function(n){var i="",c=n.rowIndex,u=n.dataIndex,s=0,h=0,f,t,e,r,o;for(this._expandStates&&(s=this._expandStates[u],h=this._indentLevels[u]),f=this._columns,t=0,e=f.length;t<e;t++)(r=f[t],r.hidden)||(o=r.text+", "+this.getColumnText(u,r,t),i&&(i+=", "),i+=o);return i},i.prototype._updateSelectionStyles=function(){var n=this,t=function(){var t,u=n._selectedRows,f=n._selectedIndex,i=n._rows,r;for(t in i)r=i[t],n._updateRowSelectionStyle(r,u,f)};this._options.allowMultiSelect?(this._delayedUpdateSelectionCookie&&window.clearTimeout(this._delayedUpdateSelectionCookie),this._delayedUpdateSelectionCookie=window.setImmediate(function(){t()})):t()},i.prototype._updateRowSelectionStyle=function(n,t,i){var f=n.rowIndex,u=n.row,r=n.gutterRow;u.classList.remove(this._options.rowSelectedClass);u.classList.remove(this._options.rowSelectedBlurClass);u.classList.remove(this._options.rowCurrentClass);this.updateUnselectedRowStyle(n);r&&(r.classList.remove("grid-gutter-row-selected"),r.classList.remove("grid-gutter-row-selected-blur"),r.classList.remove("grid-gutter-row-current"),r.querySelector("input.checkbox").setAttribute("checked",String(!1)));t&&t.hasOwnProperty(f)&&(r&&r.querySelector("input.checkbox").setAttribute("checked",String(!0)),this._active?(u.classList.add(this._options.rowSelectedClass),this.updateSelectedRowStyle(n),r&&r.classList.add("grid-gutter-row-selected")):(u.classList.add(this._options.rowSelectedBlurClass),r&&r.classList.add("grid-gutter-row-selected-blur")));f===i&&(u.classList.add(this._options.rowCurrentClass),r&&r.classList.add("grid-gutter-row-current"))},i.prototype.focus=function(n){if(this._options.focusable){var i=this._focus,t=function(){try{i.focus()}catch(n){}};typeof n=="undefined"?t():window.setTimeout(function(){t()},n)}},i.prototype._onContainerMouseDown=function(n){var t=n.target;t.classList.contains("grid-edit-box")||this._options.focusable&&this.focus(10)},i.prototype._onContainerResize=function(){this.layout()},i.prototype._applyColumnSizing=function(n,t,i){var e=this._getVisibleColumnIndex(n)+1,r=this._columns[n],u=!1,f;t=t||-1;r&&(u=r.width!==t,f=this.rootElement.querySelector(".grid-header-canvas ."+this._options.headerColumnElementClass+":nth-child("+e+")"),f.style.width=r.width+"px");i===!0&&(u&&this.layout(),this._onColumnResize(r))},i.prototype._trySorting=function(n,t){var y=this,s,h,c,l,o,a,r,f,v;t||(t=this._getSortColumns(n));s=[];h=0;for(c in this._selectedRows)f=this._selectedRows[c],l=this._dataSource[f],l&&(s.push(l),h+=parseInt(c));for(o=new e(null,null),i.addItemsToTree(this._dataSource,this._expandStates,0,this._dataSource.length,o),this._sortOrder&&this._sortOrder.length===1&&n.length===1&&this._sortOrder[0]!==n[0]&&this._sortOrder[0].index===n[0].index?this._sortOrder[0].order!==n[0].order&&i.walkTree(o,function(i){u.TreeNodeSort.stableReverse(i.children,function(i,r){return u.TreeNodeSort.sortComparer(n,t,i.data,r.data)})}):i.walkTree(o,function(i){i.children.sort(function(i,r){return u.TreeNodeSort.sortComparer(n,t,i.data,r.data)})}),this._dataSource=[],this._expandStates=[],r=0;r<o.children.length;r++)i.walkTree(o.children[r],function(n){y._dataSource.push(n.data);y._expandStates.push(n.expandState)});if(this._indentLevels=i.expand(this._expandStates),this._updateRanges(),this._selectionCount>0){for(this._clearSelection(),a=0,r=0;r<s.length;r++)f=this._dataSource.indexOf(s[r]),f>=0&&(v=this._getRowIndex(f),this._addSelection(v,f),a+=v);this._scrollTop+=(a-h)/this._selectionCount*this._measurements.rowHeight}},i.prototype.findClosestElement=function(n,t){for(var r=this._element.parentNode,i=n;i&&i!==r;){if(i.msMatchesSelector(t))return i;i=i.parentNode}return i},i.prototype.fireCustomEvent=function(n,t,i){var r=document.createEvent("Event");r.initEvent(t,!0,!0);r.customData=i;n.dispatchEvent(r)},i.prototype.createElementWithClass=function(n,t){var i=document.createElement(n);return t&&(i.className=t),i},i.prototype._attachEvents=function(){var n=this;window.addEventListener("resize",function(t){return n._onContainerResize(t)});this._element.addEventListener("mousedown",function(t){return n._onContainerMouseDown(t)});this._element.addEventListener("keydown",function(t){return n._onKeyDown(t)});Microsoft.Plugin.Theme.addEventListener("themechanged",function(t){return n._onThemeChanged(t)});this._options.focusable&&(this._focus.addEventListener("focus",function(t){return n._onFocus(t)}),this._focus.addEventListener("blur",function(t){return n._onBlur(t)}));this._canvas.addEventListener("mousedown",function(t){return n._onRowMouseDown(t)});this._canvas.addEventListener("dblclick",function(t){return n._onEditCell(t)});this._canvas.addEventListener("scroll",function(t){return n._onCanvasScroll(t)});this._canvas.addEventListener("selectstart",function(){return!1});this._header&&(this._header.addEventListener("mousedown",function(t){return n._onHeaderMouseDown(t)}),this._header.addEventListener("mouseup",function(t){return n._onHeaderMouseUp(t)}),this._header.addEventListener("click",function(t){return n._onHeaderClick(t)}),this._header.addEventListener("dblclick",function(t){return n._onHeaderDblClick(t)}));this._gutter&&(this._gutter.addEventListener("click",function(t){return n._onGutterClick(t)}),this._gutter.addEventListener("mouseover",function(n){var t=this.findClosestElement(n.target,".grid-gutter-row");t&&t.classList.add("grid-gutter-row-hover")}.bind(this)),this._gutter.addEventListener("mouseout",function(n){var t=this.findClosestElement(n.target,".grid-gutter-row");t&&t.classList.remove("grid-gutter-row-hover")}.bind(this)))},i.prototype._getDataIndex=function(n){var t,u,r=-1,f=this._visibleRange,i;if(n<0)return-1;for(t=0,u=f.length;t<u;t++)if(i=f[t],r+=i.end-i.start+1,n<=r)return i.end-r+n;return n},i.prototype._getRowIndex=function(n){for(var r=0,f=this._visibleRange,t,i=0,u=f.length;i<u;i++){if(t=f[i],n>=t.start){if(n<=t.end)return r+n-t.start}else break;r+=t.end-t.start+1}return-Math.max(0,r-1)},i.prototype._updateViewport=function(n){var v=this._count,o=[],s=[],f=[],y=this._expandStates||[],c=this.getExpandedCount()-1,l=this._getVisibleRowIndices(),u=l.first,e=l.last,t,h;u=Math.max(0,u-this._options.extendViewportBy);e=Math.min(c,e+this._options.extendViewportBy);var a=Math.max(0,u-this._options.payloadSize),p=Math.min(c,e+this._options.payloadSize),i=this._getDataIndex(a),w=u;for(t=a;t<=p&&i<v;t++)t<u?o[o.length]=new r(t,i):t>e?s[s.length]=new r(t,i):(f[f.length]=new r(t,i),w=t),h=y[i],h<0?i+=1-h:i++;this.cacheRows(o,f,s);this._drawRows(f,n);this._updateAriaOnViewportUpdate&&(this._updateAriaOnViewportUpdate=!1,this._updateAriaAttribute())},i.prototype._drawRows=function(n,t){var u=this,tt=this._expandStates,p=0,w=0,l=this._gutter,it=this._canvas,b,e,k=document.createDocumentFragment(),v=null,o,y,d,a,r,h,c,nt;for(l&&(b=this._gutter,v=document.createDocumentFragment()),o=this._rows,y={},this._rows=y,d=n.length,a=0;a<d;a++){var g=n[a],s=g.rowIndex,f=g.dataIndex,i=o[f];i?(e=i.rowIndex!==s,e?i.rowIndex=s:(e=i.isDirty,delete i.isDirty),t&&(e=!0),delete o[f]):(e=!0,r=this.createElementWithClass("div",this._options.rowClass),r.classList.add(this._options.rowNormalClass),r.id="row_"+this._getId()+"_"+s,r.addEventListener("mouseover",function(n){var t=n.target,i=n.relatedTarget,r;t&&i&&(i.parentElement===t||t.parentElement===i)||(r=u.getRowInfoFromEvent(n,"."+u._options.rowClass),r&&u.updateMouseOverRowStyle(r))},!1),r.addEventListener("mouseout",function(n){var t=n.target,i=n.relatedTarget,r;t&&i&&(i.parentElement===t||t.parentElement===i)||(r=u.getRowInfoFromEvent(n,"."+u._options.rowClass),r&&u.updateMouseOutRowStyle(r))},!1),k.appendChild(r),h={rowIndex:s,dataIndex:f,row:r},l&&(c=this.createElementWithClass("div","grid-gutter-row grid-gutter-row-normal"),v.appendChild(c),c.id="gtr_"+r.id,this._rowInfoMap[c.id]=h,h.gutterRow=c),this._rowInfoMap[r.id]=h,i=h);y[f]=i;e&&(tt&&(p=this._getExpandState(f),w=this.indentLevel(f)),this._updateRow(i,s,f,p,w));r&&(r.onfocus=function(n){return u._onRowElementFocus(n)},r.onblur=function(n){return u._onRowElementBlur(n)})}for(nt in o)i=o[nt],l&&(delete this._rowInfoMap[i.gutterRow.id],i.gutterRow.parentElement.removeChild(i.gutterRow)),delete this._rowInfoMap[i.row.id],this._cleanUpCells(i),i.row.parentElement.removeChild(i.row);it.appendChild(k);this._updateDynamicRowsStyle(n);l&&b.appendChild(v)},i.prototype.getColumnPixelIndent=function(n){return n*i.INDENT_PER_LEVEL},i.prototype.addTreeIconWithIndent=function(n,t,i,r){var f=this,e=this.getColumnPixelIndent(i)-13,u;r.indentOffset=e;t!==0&&(u=this.createElementWithClass("div","icon grid-tree-icon"),u.style.left=e+"px",n.appendChild(u),t>0?u.classList.add("icon-tree-expanded"):u.classList.add("icon-tree-collapsed"),u.addEventListener("mouseover",function(n){f.onTreeIconMouseOver(n)}),u.addEventListener("mouseout",function(n){f.onTreeIconMouseOut(n)}));n.style.textIndent=this.getColumnPixelIndent(i)+"px"},i.prototype._drawCell=function(n,t,r,u,f,e,o){var a=f.width||20,v,s=this.createElementWithClass("div",this._options.cellClass),h,c,y,p,l;if(s.style.width=isNaN(a)?String(a):a+"px",typeof f.hrefIndex!="undefined"&&(v=this.getColumnValue(t,f.hrefIndex,-1)),h=this.getColumnText(t,f,o),f.hasHTMLContent||i._setTooltip(s,h,65,f.maxTooltipLineLength),v?(c=document.createElement("a"),c.setAttribute("href",v),c.innerText=h,s.appendChild(c)):h?f.hasHTMLContent?s.innerHTML=h:s.innerText=h:s.innerHTML="&nbsp;",o===e&&u>0&&this.addTreeIconWithIndent(s,r,u,f),f.getCellCSSClass&&(y=f.getCellCSSClass(t,f.index,o,this._dataSource),y))for(p=y.trim().split(" "),l=0;l<p.length;l++)s.classList.add(p[l]);return f.rowCss&&s.classList.add(f.rowCss),s},i.prototype._onRowMouseDown=function(n){var t=this.getRowInfoFromEvent(n,"."+this._options.rowClass),i;t&&(i=n.target,n.which===1&&i.classList.contains("grid-tree-icon")?this._onToggle(t):this._selectRow(t.rowIndex,t.dataIndex,{ctrl:n.ctrlKey,shift:n.shiftKey,rightClick:n.which===3}))},i.prototype._onBlur=function(n){if(n){var t=n.target;if(t.classList.contains("grid-edit-box")){n.stopPropagation();return}}this._active=!1;this._updateSelectionStyles()},i.prototype._onFocus=function(n){var t=n.target;if(t.classList.contains("grid-edit-box")){n.stopEventPropagation();return}this._active=!0;this._updateSelectionStyles();this._updateAriaAttribute()},i.prototype._onCanvasFocus=function(){},i.prototype._onRowElementFocus=function(n){return this._onFocus(n)},i.prototype._onRowElementBlur=function(n){return this._onBlur(n)},i.prototype._onKeyDown=function(t){var i={lo:-1,hi:-1},e=n.KeyCodes,f=this._canvas,u,r;if(this._copyInProgress)return t.keyCode===27&&this._cancelable&&this._cancelable.cancel(),!1;this._count>0&&(i={lo:0,hi:this.getExpandedCount()-1});this._selectedIndex<0&&this._addSelection(i.lo);switch(t.keyCode){case 65:if(t.ctrlKey)this._selectAll();else return!0;break;case 67:t.ctrlKey&&this.onCtrlC();break;case 123:t.altKey||t.ctrlKey||t.shiftKey||this.onF12();break;case 71:t.ctrlKey&&this.onCtrlG();break;case 40:this._clearSelection();t.ctrlKey?t.shiftKey?this._addSelectionRange(i.hi):this._addSelection(i.hi):t.shiftKey?this._addSelectionRange(Math.min(this._selectedIndex+1,i.hi)):this._addSelection(Math.min(this._selectedIndex+1,i.hi));break;case 38:this._clearSelection();t.ctrlKey?t.shiftKey?this._addSelectionRange(i.lo):this._addSelection(i.lo):t.shiftKey?this._addSelectionRange(Math.max(this._selectedIndex-1,i.lo)):this._addSelection(Math.max(this._selectedIndex-1,i.lo));break;case 34:case 33:u=f.clientHeight;r=Math.floor(u/this._measurements.rowHeight);this._clearSelection();t.keyCode===34?t.shiftKey?this._addSelectionRange(Math.min(this._selectedIndex+r,i.hi)):this._addSelection(Math.min(this._selectedIndex+r,i.hi)):t.shiftKey?this._addSelectionRange(Math.max(this._selectedIndex-r,i.lo)):this._addSelection(Math.max(this._selectedIndex-r,i.lo));break;case 39:this._clearSelection();this.tryToggle(!0,t.shiftKey)?(this._addSelection(this._selectedIndex),this.layout()):t.shiftKey?this._addSelectionRange(Math.min(this._selectedIndex+1,i.hi)):this._addSelection(Math.min(this._selectedIndex+1,i.hi));break;case 37:this._clearSelection();this.tryToggle(!1,t.shiftKey)?(this._addSelection(this._selectedIndex),this.layout()):t.shiftKey?this._addSelectionRange(Math.max(this._selectedIndex-1,i.lo)):this._addSelection(Math.max(this._selectedIndex-1,i.lo));break;case 36:this._clearSelection();t.shiftKey?this._addSelectionRange(i.lo):this._addSelection(i.lo);break;case 35:this._clearSelection();t.shiftKey?this._addSelectionRange(i.hi):this._addSelection(i.hi);break;case 9:return t.shiftKey&&this.rootElement.focus(),this.getSelectedRowIntoView(),!0}return this.getSelectedRowIntoView(),t.preventDefault(),!1},i.prototype._onThemeChanged=function(){var n=this._textFontPx;this._updateThemeAttributes();this._textFontPx!==n&&this._textFontPx!==0&&n!==0&&(this._measurements.rowHeight=this._measurements.rowHeight*this._textFontPx/n,this._measurements.textLineHeight=this._measurements.textLineHeight*this._textFontPx/n,this.redraw())},i.prototype._onToggle=function(n){if(this._expandStates){var t=this._getExpandState(n.dataIndex);t!==0&&(t>0?this.collapseNode(n.dataIndex):t<0&&this.expandNode(n.dataIndex),this._clearSelection(),this._addSelection(Math.min(n.rowIndex,this.getExpandedCount()-1),n.dataIndex),this._layoutContentSpacer(),this._redraw())}},i.prototype._onExpandedCollapsed=function(n,t){this.fireCustomEvent(this._element,i.EVENT_ROW_EXPANDED_COLLAPSED,[{isExpanded:n,dataIndex:t}])},i.prototype.indentLevel=function(n){return this._indentLevels[n]},i.prototype.setVisibleRange=function(n){this._visibleRange=n},i.addItemsToTree=function(n,t,r,u,f){for(var s,h,c=Math.min(r+u,n.length),o=r;o<c;o++)s=new e(n[o],t[o]),h=Math.abs(s.expandState),h>0&&(i.addItemsToTree(n,t,o+1,h,s),o+=h),f.children.push(s)},i.walkTree=function(n,t){var f,r,u,e;if(t&&(t(n),f=0,r=n.children,r&&(f=r.length)))for(u=0;u<f;u++)e=r[u],i.walkTree(e,t)},i.makeElementUnselectable=function(n){var i,t,r;for(n.setAttribute("unselectable","on"),i=n.querySelectorAll("*"),t=0;t<i.length;t++){r=i[t];switch(r.tagName){case"IFRAME":case"TEXTAREA":case"INPUT":case"SELECT":break;default:r.setAttribute("unselectable","on")}}},i.toDecimalLocaleString=function(n,t,i){var y=function(n,t,i){for(var r=n.length;r<t;r++)n=i?"0"+n:n+"0";return n},f,c,o,r=n.toString(),u="";if(c=i?i.numberFormat:Microsoft.Plugin.Culture.NumberFormat,o=r.split(/e/i),r=o[0],f=o.length>1?parseInt(o[1],10):0,o=r.split("."),r=o[0],u=o.length>1?o[1]:"",f>0?(u=y(u,f,!1),r+=u.slice(0,f),u=u.substr(f)):f<0&&(f=-f,r=y(r,f+1,!0),u=r.slice(-f,r.length)+u,r=r.slice(0,-f)),u.length>0&&(u=c.NumberDecimalSeparator+u),t===!0){for(var l=c.NumberGroupSizes,a=c.NumberGroupSeparator,s=l[0],v=1,e=r.length-1,h="";e>=0;){if(s===0||s>e)return h.length>0?r.slice(0,e+1)+a+h+u:r.slice(0,e+1)+u;h=h.length>0?r.slice(e-s+1,e+1)+a+h:r.slice(e-s+1,e+1);e-=s;v<l.length&&(s=l[v],v++)}return r.slice(0,e+1)+a+h+u}return r+u},i.convertValueToDisplayString=function(n,t){return n!=null?typeof n=="string"?n:n instanceof Date?n.toLocaleString(Microsoft.Plugin.Culture.lang,t):typeof n=="number"?t?n.toLocaleString(Microsoft.Plugin.Culture.lang,t):i.toDecimalLocaleString(n):typeof n=="boolean"?n?"True":"False":n.toString():""},i._textSplit=function(n,t){var r="\r\n",i,u;return n.indexOf(r)>=0?n:n.length<=t?n:(i=n.lastIndexOf(" ",t),i!==-1?n=n.substring(0,i)+r+n.substring(i+1):(i=t,n=n.substring(0,i)+r+n.substring(i)),u=i+r.length,n.substring(0,u)+this._textSplit(n.substring(u),t))},i._approximateTextWidth=function(n,t){var i=1.1+.7*Math.exp(-n/20);return Math.round(n*i*t)},i.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 h(300,400);this._takeMeasurements();this._getChildDataCallback=this._options.childDataCallback||null;this._editCellCallback=this._options.editCellCallback||null;this._options.asyncInit?window.setTimeout(function(){this._attachEvents()}.bind(this),10):this._attachEvents();this.initializeDataSource().done()},i.prototype._cleanUpCells=function(n){var t,r,i;if(this._options.cellCleanUpCallback&&(t=n.row,t&&t.hasChildNodes()))for(r=t.children,i=0;i<r.length;i++)this._options.cellCleanUpCallback(r.item(i))},i.prototype._getId=function(){return i.TYPE_NAME},i.prototype._enhance=function(){this._buildDom()},i.prototype._buildDom=function(){var n=document.createDocumentFragment(),t=this._options.gutter,i=t&&(t.icon||t.checkbox);this._options.focusable&&(this._focus=document.createElement("div"),this._focus.className="grid-focus",this._focus.setAttribute("tabIndex","0"),n.appendChild(this._focus));this._canvas=document.createElement("div");this._canvas.className=this._options.canvasClass;this._contentSpacer=document.createElement("div");this._contentSpacer.className="grid-content-spacer";this._canvas.appendChild(this._contentSpacer);this._options.header&&(this._element.classList.add("has-header"),this._header=document.createElement("div"),this._header.className=this._options.headerElementClass,this._headerCanvas=document.createElement("div"),this._headerCanvas.className="grid-header-canvas",this._header.appendChild(this._headerCanvas),n.appendChild(this._header));i&&(this._element.classList.add("has-gutter"),this._gutter=document.createElement("div"),this._gutter.className="grid-gutter",this._canvas.appendChild(this._gutter),this._header&&(this._gutterHeader=document.createElement("div"),this._gutterHeader.className="grid-gutter-header",this._header.appendChild(this._gutterHeader)));n.appendChild(this._canvas);this._element.appendChild(n);this._updateAriaLabelForColumns(this._options.columns)},i.prototype._updateAriaLabelForColumns=function(n){var t,i;if(n){for(this._ariaColumns="",t=0;t<n.length;t++)i=n[t],this._ariaColumns&&(this._ariaColumns+=", "),this._ariaColumns+=i.text;this._updateGridAriaLabel()}},i.prototype._updateGridAriaLabel=function(){var n="";n+=this._ariaColumns||"";n&&(n+=", ");n+=this._ariaDescription||"";this._element.setAttribute("aria-label",n)},i.prototype._mergeExpandStates=function(n,t,i){var e=i.length-1,f,r,u;for(t.splice(n+1,1),r=0;r<=e;r++)t.splice(n+r+1,0,i[r]);for(f=0,r=n;r>=0;r--)u=t[r],Math.abs(u)>f?(t[r]=u<0?u-e:u+e,f=0):f++},i.prototype._takeMeasurements=function(){var f=this._options.coreCssClass,n,i,t,r,u;this._options.cssClass&&(f+=" "+this._options.cssClass);n=this.createElementWithClass("div",f);n.style.position="absolute";n.style.left="-5000px";n.style.top="-5000px";n.style.width="1000px";n.style.height="500px";document.body.appendChild(n);i=this.createElementWithClass("div",this._options.rowClass);i.classList.add(this._options.rowNormalClass);n.appendChild(i);t=this.createElementWithClass("div",this._options.cellClass);t.style.width="100px";t.innerText="1";i.appendChild(t);this._measurements.rowHeight=i.offsetHeight;this._measurements.cellOffset=t.offsetWidth-100;t.innerText="1\n1";this._measurements.textLineHeight=i.offsetHeight-this._measurements.rowHeight;r=this.createElementWithClass("div");r.style.overflow="hidden";r.style.width="1em";r.style.height="1ex";t.appendChild(r);this._measurements.unitEx=r.offsetHeight;u=this.createElementWithClass("div","grid-gutter");u.appendChild(this.createElementWithClass("div","grid-gutter-row grid-gutter-row-selected"));n.appendChild(u);this._measurements.gutterWidth=this._gutter?u.clientWidth:0;n.style.overflow="scroll";this._measurements.scrollbarWidth=n.offsetWidth-n.clientWidth;document.body.removeChild(n)},i.prototype._initializeDataSourceComplete=function(){this.getExpandedCount()>0?this._options.keepSelection&&this._selectedIndex>=0?this._selectRow(Math.min(this._selectedIndex,this.getExpandedCount()-1)):this._selectRow(this._options.initialSelection!==!1?0:-1):this.setSelectedRowIndex(-1)},i.prototype._layoutAfterSetDataSource=function(n){this.layout();this._ensureSelectedIndex(n)},i.prototype._adjustForDynamicData=function(n,t,r){var u,f;for(this._dataSource.splice(r+1,1),u=0;u<n.length;u++)this._dataSource.splice(r+u+1,0,n[u]);this._mergeExpandStates(r,this._expandStates,t);f=this._dataSource.length;this._count=f;this._indentLevels=this._expandStates?i.expand(this._expandStates):null;this._expandedCount=f;this._updateRanges();this._determineIndentIndex();this.layout()},i.prototype._ensureSelectedIndex=function(n){var t=this._selectedIndex;typeof n=="number"&&(this._selectedIndex=n);this._selectedIndex>=0&&(this._count<=this._selectedIndex&&(this._selectedIndex=this._count-1),this._selectedIndex!==t&&this._addSelection(this._selectedIndex))},i.prototype._determineIndentIndex=function(){for(var t=this._columns,n=0,i=t.length;n<i;n++)if(t[n].indent){this._indentIndex=n;return}this._indentIndex=0},i.prototype._updateExpansionStateAndRedraw=function(n){var i,t=this._selectedIndex;t>=0&&(i=this._getDataIndex(t));n();t>=0&&(this._clearSelection(),this._addSelection(Math.abs(this._getRowIndex(i))));this._layoutContentSpacer();this._redraw()},i.prototype._getVisibleRowIndices=function(){var n=this._scrollTop,t=n+this._canvasHeight;return this.calculateVisibleRowIndices(n,t)},i.prototype._getRowIntoView=function(n,t){var u;if(t)return u=Math.max(0,Math.min(n||0,this.getExpandedCount()-1)),this._canvas.scrollTop=this.getRowTop(u),!0;var f=this._getVisibleRowIndices(),i=f.first,e=f.last,r=e-i;return n<i||n>e?(i=this._selectedIndex>i?Math.max(n-r,0):Math.max(0,Math.min(n+r,this.getExpandedCount()-1)-r),this._canvas.scrollTop=this.getRowTop(i),!0):!1},i.prototype._getRowIntoViewCenter=function(n){var t=this.getRowTop(n),i,r;return(t=t-this._canvasHeight/2,i=this._canvas.scrollHeight-this._canvasHeight,t>i&&(t=i),r=0,t<r&&(t=r),this._canvas.scrollTop!=t)?(this._canvas.scrollTop=t,!0):!1},i.prototype._cleanUpRows=function(){var t=this._rows,r=this._gutter,i,n;for(i in t)n=t[i],n.row.parentElement&&(this._cleanUpCells(n),n.row.parentElement.removeChild(n.row),delete this._rowInfoMap[n.row.id]),r&&n.gutterRow.parentElement&&(n.gutterRow.parentElement.removeChild(n.gutterRow),delete this._rowInfoMap[n.gutterRow.id]);this._rows={}},i.prototype._updateDynamicRowsStyle=function(n){for(var r,f,t,e,u,o,i=0;i<n.length;i++)if(r=this._rows[n[i].dataIndex],r){for(f=r.row.children,t=0;t<f.length;t++)(e=this._columns[t],e&&e.alwaysEnableTooltip)||(u=f[t],o=u.scrollWidth>u.offsetWidth,o||u.removeAttribute("data-plugin-vs-tooltip"));this.checkUpdateActive(r)}},i.prototype._updateRow=function(n,t,r,u,f){var k=this._indentIndex,a,v,h,w,e,y,c,b,l,p;if(this._gutter){var o=this._options.gutter,d=n.gutterRow,s=d.firstElementChild;s.style.top=this.getRowTop(t)+"px";s.style.left="0px";s.style.width=this._measurements.gutterWidth+"px";s.style.height=this._measurements.rowHeight+"px";o.checkbox&&(a=this.createElementWithClass("input","checkbox "+(o.checkbox.cssClass||"")),a.setAttribute("type","checkbox"),v=this.createElementWithClass("div","grid-gutter-cell grid-gutter-checkbox"),v.appendChild(a[0]),s.appendChild(v));o.icon&&(h="grid-gutter-cell grid-gutter-icon ",typeof o.icon.cssClass!="undefined"&&(h+=o.icon.cssClass+" "),typeof o.icon.index!="undefined"&&(h+=(this.getColumnValue(r,o.icon.index,-1)||"")+" "),o.icon.ownerDraw!==!1&&(h+=this._getGutterIconClass(t,r,u,f)||""),w=this.createElementWithClass("div",h),s.appendChild(w));this._drawGutterCell(n,t,r,u,f)}for(this._cleanUpCells(n),e=n.row,e.innerHTML="",e.style.top=this.getRowTop(t)+"px",e.style.left=this._measurements.gutterWidth+"px",e.style.height=this._measurements.rowHeight+"px",this._options.overflowColumn===!1?e.style.width=isNaN(this._contentSize.width)?"":this._contentSize.width+2+"px":e.style.minWidth=isNaN(this._contentSize.width)?"":this._contentSize.width+2+"px",y=this._columns,c=0,b=y.length;c<b;c++)(l=y[c],l.hidden)||(p=l.getCellContents(n,r,u,f,l,k,c),p&&e.appendChild(p));i.makeElementUnselectable(e);this._gutter&&i.makeElementUnselectable(s);this._updateRowSelectionStyle(n,this._selectedRows,this._selectedIndex);u!==0&&e.setAttribute("aria-expanded",u>0?"true":"false")},i.prototype._getGutterIconClass=function(){return""},i.prototype._drawGutterCell=function(){},i.prototype._drawHeader=function(){var s=this._columns,c=this._sortOrder,o,r,h,n,t,f,e,u;if(this._header){for(o=document.createDocumentFragment(),r=0,h=s.length;r<h;r++)(n=s[r],n.hidden)||(t=this.createElementWithClass("div",this._options.headerColumnElementClass),i._setTooltip(t,n.tooltip,65,n.maxTooltipLineLength),t.style.width=(n.width||20)+"px",t._data={columnIndex:r,header:!0},f=this.createElementWithClass("div","separator"),n.fixed&&(f.style.cursor="auto"),f._data={columnIndex:r,separator:!0},t.appendChild(f),e=n.getHeaderCellContents(n,r),n.headerCss&&e.classList.add(n.headerCss),n.tooltip&&i._setTooltip(e,n.tooltip,65,n.maxTooltipLineLength),t.appendChild(e),u=this.createElementWithClass("div","sort-handle"),c.forEach(function(t){if(t.index===n.index)return t.order==="asc"?u.innerHTML=i.ASCENDING_ARROW:t.order==="desc"&&(u.innerHTML=i.DESCENDING_ARROW),u.setAttribute("aria-label",""),u.setAttribute("role","img"),!1}),t.appendChild(u),o.appendChild(t));this._headerCanvas.innerHTML="";this._headerCanvas.appendChild(o);i.makeElementUnselectable(this._header)}},i.prototype._drawHeaderCellValue=function(n,t){var i=document.createElement("div");return i.classList.add("title"),n.hasHTMLContent?i.innerHTML=n.text||"&nbsp;":i.innerText=n.text||"",t!==this._indentIndex||typeof this._indentLevels=="undefined"||this._indentLevels===null||i.classList.add("indented-title"),i},i.prototype._layoutContentSpacer=function(){for(var t,r,u,n=0,f=this._columns,i=0,e=f.length;i<e;i++)f[i].hidden||(n+=(f[i].width||20)+this._measurements.cellOffset);n=n+2;t=Math.max(1,this.getTotalDataHeight());this._contentSpacer.style.width=n+"px";this._contentSpacer.style.height=t+"px";this._gutter&&(this._gutter.style.height=t+"px");this._ignoreScroll=!0;try{r=Math.max(0,Math.min(this._scrollTop,t-this._canvasHeight));r!==this._scrollTop&&(this._scrollTop=r,this._canvas.scrollTop=r);u=Math.max(0,Math.min(this._scrollLeft,n-this._canvasWidth));u!==this._scrollLeft&&(this._scrollLeft=u,this._canvas.scrollLeft=u)}finally{this._ignoreScroll=!1}this._contentSize.width=n;this._contentSize.height=t},i.prototype._layoutHeader=function(){this._header&&(this._headerCanvas.style.left=this._measurements.gutterWidth-this._scrollLeft+"px");this._gutter&&(this._gutter.style.left=this._scrollLeft+"px")},i.prototype._fixScrollPos=function(){var n=this._ignoreScroll;this._ignoreScroll=!0;try{this._canvas.scrollLeft=this._scrollLeft;this._canvas.scrollTop=this._scrollTop}finally{this._ignoreScroll=n}},i.prototype._redraw=function(n){this._layoutHeader();this._updateViewport(n)},i.prototype._selectRow=function(n,t,i){var r=i&&i.ctrl,u=i&&i.shift,f=i&&i.rightClick;r?this._addSelection(n,t,{toggle:!0}):u?(this._clearSelection(),this._addSelectionRange(n,t)):f?this._selectedRows&&this._selectedRows.hasOwnProperty(n)?(this._selectedIndex=n,this._updateAriaAttribute()):(this._clearSelection(),this._addSelection(n,t)):(this._clearSelection(),this._addSelection(n,t))},i.prototype._selectAll=function(){for(var i,r,n=0,t=0,u=this._dataSource.length;t<u;++t)i=this._dataSource[t],i&&!i.isPlaceholder&&++n;n--;n>=0&&this._options.allowMultiSelect!==!1&&(this._clearSelection(),this._selectionStart=0,r=Math.max(0,this._selectedIndex),this._addSelectionRange(n,undefined,{doNotFireEvent:!0}),this._selectedIndex=r,this._updateSelectionStyles(),this._selectionChanged())},i.prototype._addSelectionRange=function(n,t,i){var h=i&&i.doNotFireEvent,o=-1,f,u,s,r,e;if(this._options.allowMultiSelect===!1)this._addSelection(n,t);else{for(this._selectedRows&&(o=this._selectedRows[this._selectedIndex]),this._selectionStart<0&&(this._selectionStart=n),u=Math.min(this._selectionStart,n),s=Math.max(this._selectionStart,n),(typeof t!="number"||u!==n)&&(t=this._getDataIndex(u)),r=u;r<=s;r++)this._addSelection(r,t,{keepSelectionStart:!0,doNotFireEvent:!0}),r===n&&(f=t),typeof t=="number"&&(e=this._getExpandState(t),t+=e<0?1-e:1);this._selectedIndex=n;this._updateAriaAttribute();h||(this._updateSelectionStyles(),this._selectionChanged(),o!==f&&this._selectedIndexChanged(this._selectedIndex,f))}},i.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}])},i.prototype._selectedIndexChanged=function(n,t){this.selectedIndexChanged(n,t);this.fireCustomEvent(this._element,i.EVENT_SELECTED_INDEX_CHANGED,[n,t])},i.prototype._measureCanvasSize=function(){this._canvasHeight=this._canvas.clientHeight;this._canvasWidth=this._canvas.clientWidth},i.prototype._setupMoveEvents=function(){var n=this;document.addEventListener("mousemove",function(t){return n._onDocumentMouseMove(t)});document.addEventListener("mouseup",function(t){return n._onDocumentMouseUp(t)})},i.prototype._clearMoveEvents=function(){document.removeEventListener("mousemove",null,!0);document.removeEventListener("mouseup",null,!0)},i.prototype._onDocumentMouseMove=function(n){var t=this._columnSizing;if(t&&t.active===!0){var i=n.pageX-t.origin,r=Math.max(15,t.originalWidth+i),u=this._columns[t.index];u.width=r;this._applyColumnSizing(t.index);this._moveSizingElement(t.index)}},i.prototype._onDocumentMouseUp=function(){var n=this;return window.setTimeout(function(){n._tryFinishColumnSizing(!1)},0),!1},i.prototype._onHeaderMouseDown=function(n){var t,i,r;return n.which!==1?!0:(t=this.findClosestElement(n.target,".separator"),t&&t._data&&(i=t._data.columnIndex,r=this._columns[i],!r.fixed)?(this._columnSizing=new v(!0,i,r.width,n.pageX),this._moveSizingElement(i),this._setupMoveEvents(),n.stopImmediatePropagation(),n.preventDefault(),!1):void 0)},i.prototype._onHeaderMouseUp=function(){return!1},i.prototype._onHeaderClick=function(n){var i=this.findClosestElement(n.target,"."+this._options.headerColumnElementClass),r,u,t;if(i&&!this._columnSizing){if(r=this.findClosestElement(n.target,".separator"),r&&r._data)return!1;i._data&&(u=i._data.columnIndex,t=this._columns[u],t.canSortBy&&!t.fixed&&this._sortBy(t,n.shiftKey))}},i.prototype._onHeaderDblClick=function(n){var f=this.findClosestElement(n.target,".separator"),r,u,o,s,l;if(f&&f._data){this._tryFinishColumnSizing(!0);var h=f._data.columnIndex,t=this._columns[h],c=3,e=i._approximateTextWidth(c,this._measurements.unitEx),a=this.getExpandedCount();for(r=0;r<a;r++)(u=0,o=this._getDataIndex(r),t.indent&&(u+=this.getColumnPixelIndent(this._indentLevels[o])),s=this.getColumnText(o,t,-1).length,!t.indent&&s<=c)||(u+=i._approximateTextWidth(s,this._measurements.unitEx),e=Math.max(e,u));return l=t.width,t.width=e,this._applyColumnSizing(h,l,!0),!1}},i.prototype._moveSizingElement=function(n){var r=this._measurements.gutterWidth,t,i;if(!this._sizingElement){if(n<0)return;this._sizingElement=this.createElementWithClass("div","grid-column-sizing");this._canvas.appendChild(this._sizingElement)}if(this._sizingElement.style.height=this._canvas.clientHeight-1+"px",this._sizingElement.style.top=this._scrollTop+"px",n<0)this._sizingElement.style.left="-5000px",this._sizingElement.style.top="-5000px",this._sizingElement.style.height="0px";else{for(t=0;t<=n;)i=this._columns[t++],i.hidden||(r+=i.width);this._sizingElement.style.left=r-1+"px"}},i.prototype._getVisibleColumnIndex=function(n){var t=0,i=0,r=this._columns.length;if(this._columns[n].hidden)return-1;while(t<n)this._columns[t].hidden||i++,t++;return i},i.prototype._onColumnResize=function(n){this.fireCustomEvent(this._element,"columnresize",[n])},i.prototype._tryFinishColumnSizing=function(n){var t=this._columnSizing;t&&(t.active===!0&&(n||this._applyColumnSizing(t.index,t.originalWidth,!0),this._moveSizingElement(-1)),this._columnSizing=null,this._clearMoveEvents())},i.prototype._getSortColumns=function(n){for(var e,t,r,u=this._columns,f=[],i=0,o=n.length;i<o;i++)for(e=n[i],t=0;t<u.length;++t)if(r=u[t],r.index===e.index){f.push(r);break}return f},i.prototype._sortBy=function(n,t){var i=this._sortOrder.slice(0),e=!1,u,o,r,s;if(n){for(u=0,o=i.length;u<o;u++)if(r=i[u],r.index===n.index){i.splice(u,1);e=!0;break}r=e?new f(r.index,r.order==="asc"?"desc":"asc"):new f(n.index,n.defaultSortOrder);t&&this._options.allowSortOnMultiColumns?i.push(r):i=[r]}if(this._options.onBeforeSortCallback)this._options.onBeforeSortCallback(i);s=this._getSortColumns(i);this._onSort(i,s)},i.prototype._onSort=function(n,t){this.onSort(n,t)!==!1&&this.fireCustomEvent(this._element,"sort",[{sortOrder:n,sortColumns:t}])},i.prototype._onCanvasScroll=function(){var n=this._canvas;return this._resetScroll=!0,this._scrollLeft=n.scrollLeft,this._scrollTop=n.scrollTop,this._ignoreScroll||this._redraw(),!1},i.prototype._getClickedCell=function(n){return this.findClosestElement(n.target,".grid-cell")},i.prototype._createEditCellBox=function(n,t,i,r){function e(f){var e=u.value;return i.innerText=e,r?(r(e,n,t),f.stopPropagation(),f.preventDefault(),!1):void 0}var f=i.innerText,u=this.createElementWithClass("input","grid-edit-box");u.setAttribute("type","text");u.setAttribute("value",f);u.addEventListener("focusout",function(n){e(n)});u.addEventListener("keydown",function(n){if(n.keyCode===13)e(n);else if(n.keyCode===27)return i.innerText=f,n.stopPropagation(),n.preventDefault(),!1});i.innerHTML="";i.appendChild(u);u.select();u.focus()},i.prototype._onEditCell=function(n){var e=n.target,t,r,i;if(!e.classList.contains("grid-tree-icon")&&(t=this._getClickedCell(n),t&&t.classList.contains("grid-cell-editable")&&(r=this.getRowInfoFromEvent(n,"."+this._options.rowClass),r))){var u=r.row.children,o=u.length,f=-1;for(i=0;i<o;i++)t===u[i]&&(f=i);this._createEditCellBox(r.dataIndex,f,t,this._editCellCallback)}},i.prototype._onGutterClick=function(n){var t=this.getRowInfoFromEvent(n,".grid-gutter-row");t&&(this._selectedRows&&typeof this._selectedRows[t.rowIndex]=="number"||this._selectRow(t.rowIndex,t.dataIndex))},i.prototype._updateThemeAttributes=function(){var n=Microsoft.Plugin.Theme.getValue("plugin-font-size");this._textFontPx=n.indexOf("px")!==-1?parseInt(n.substring(0,n.indexOf("px"))):n.indexOf("pt")!==-1?Math.round(parseInt(n.substring(0,n.indexOf("pt")))/.75):0},i.EVENT_ROW_EXPANDED_COLLAPSED="rowExpandedCollapsed",i.TYPE_NAME="GridControl",i.MAX_COPY_SIZE=1e3,i.PAYLOAD_SIZE=200,i.EVENT_SELECTED_INDEX_CHANGED="selectedIndexChanged",i.INDENT_PER_LEVEL=16,i.ASCENDING_ARROW="5",i.DESCENDING_ARROW="6",i}(t.Control);i.GridControl=y})(t.Grid||(t.Grid={}));var i=t.Grid})(n.Controls||(n.Controls={}));var t=n.Controls}(Common||(Common={})),function(n){(function(t){(function(n){n[n.Horizontal=0]="Horizontal";n[n.Vertical=1]="Vertical"})(t.GridSplitterDirection||(t.GridSplitterDirection={}));var r=t.GridSplitterDirection,i=function(n){function t(i,r,u){n.call(this,i);this._direction=null;this._minSize=typeof r=="number"&&r>0?r:t._gridSplitterDefaultMinSize;this._callback=u;this.rootElement.contains(t._gridSplitterClass)||this.rootElement.classList.add(t._gridSplitterClass);this._resizerDisplay=document.createElement("div");this._resizerDisplay.className=t._gridSplitterClass+" "+t._gridSplitterResizerClass;this._resizerDisplay.style.position="relative";this._resizerDisplay.style.display="none";this.rootElement.appendChild(this._resizerDisplay);this.rootElement.addEventListener("mousedown",this.onMouseDown.bind(this));this.rootElement.addEventListener("keyup",this.onKeyPress.bind(this))}return __extends(t,n),Object.defineProperty(t.prototype,"direction",{get:function(){return this._direction===null&&(this._direction=this.getSplitterDirection()),this._direction},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gridCSS",{get:function(){return this._gridCSS||(this._gridCSS=this.getParentGridCSS()),this._gridCSS},enumerable:!0,configurable:!0}),t.prototype.getSplitterDirection=function(){var n;return n=this.rootElement.classList.contains(t._gridSplitterVerticalClass)?1:this.rootElement.classList.contains(t._gridSplitterHorizontalClass)?0:this.rootElement.clientWidth>this.rootElement.clientHeight?1:0,n==1?(this._gridIndex=parseInt(this.rootElement.currentStyle.msGridRow,10)-1,this._resizerDisplay.className+=" "+t._gridSplitterClass+"-Vertical"):(this._gridIndex=parseInt(this.rootElement.currentStyle.msGridColumn,10)-1,this._resizerDisplay.className+=" "+t._gridSplitterClass+"-Horizontal"),n},t.prototype.getParentGridCSS=function(){return this.direction===1?this.rootElement.parentElement.currentStyle.msGridRows:this.rootElement.parentElement.currentStyle.msGridColumns},t.prototype.calculateGridInfo=function(){if(this._gridCSS=this.getParentGridCSS(),!this._gridCSS)throw new Error(Microsoft.Plugin.Resources.getErrorString("JSPerf.1019"));if(this._gridCSSParts=this._gridCSS.split(" "),this._gridCSSParts.length>=this._gridIndex&&this._gridIndex>0){var n=this._gridCSSParts[this._gridIndex-1],t=this._gridCSSParts[this._gridIndex];if(n.indexOf("fr")===-1||t.indexOf("fr")===-1)throw new Error(Microsoft.Plugin.Resources.getErrorString("JSPerf.1020"));this._gridCSSTotal=parseFloat(n)+parseFloat(t)}else throw new Error(Microsoft.Plugin.Resources.getErrorString("JSPerf.1021"))},t.prototype.onMouseMove=function(n){var f=this.direction===1?n.pageY:n.pageX,o=this.rootElement.previousElementSibling,i=this.rootElement.nextElementSibling,r=0,u=0,t,e;this.direction===1?(r=o.offsetTop+this._minSize,u=i.offsetTop+i.offsetHeight-this._minSize):(r=o.offsetLeft+this._minSize,u=i.offsetLeft+i.offsetWidth-this._minSize);t=f;f<r?t=r:f>u&&(t=u);this._endPosition=t;e=t-this._startPosition;this.direction===1?this._resizerDisplay.style.top=e+"px":this._resizerDisplay.style.left=e+"px";n.stopImmediatePropagation();n.preventDefault()},t.prototype.onMouseUp=function(n){this._resizerDisplay.style.display="none";this.rootElement.style.removeProperty("background-color");document.body.style.cursor=this._previousCursor;var t=this._endPosition-this._startPosition;this.moveSplitter(t);document.removeEventListener("mousemove",this._mouseMoveListener,!0);document.removeEventListener("mouseup",this._mouseUpListener,!0);n.stopImmediatePropagation();n.preventDefault()},t.prototype.onMouseDown=function(n){this.calculateGridInfo();this._previousCursor=document.body.style.cursor;document.body.style.cursor=this.rootElement.currentStyle.cursor;this._startPosition=this.direction===1?n.pageY:n.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,!0);document.addEventListener("mouseup",this._mouseUpListener,!0);n.stopImmediatePropagation();n.preventDefault()},t.prototype.onKeyPress=function(n){var i,u,f,r;(this.getSplitterDirection()==1?(i=40,u=38):(i=39,u=37),n.keyCode==i||n.keyCode==u)&&(f=n.keyCode==i,r=this.sizePrevious+this.sizeCurrent,r*=f?1:-1,r*=t._gridSplitterArrowMoveRatio,this.calculateGridInfo(),this.moveSplitter(r),n.stopImmediatePropagation(),n.preventDefault())},t.prototype.moveSplitter=function(n){var r=(this.sizeCurrent-n)/(this.sizePrevious+this.sizeCurrent),t;if(r>0&&r<1){var u=(1-r)*this._gridCSSTotal,f=r*this._gridCSSTotal,i="";for(t=0;t<this._gridCSSParts.length;t++)i+=t===this._gridIndex-1?u+"fr":t===this._gridIndex?f+"fr":this._gridCSSParts[t],t<this._gridCSSParts.length-1&&(i+=" ");this.direction===1?this.rootElement.parentElement.style.msGridRows=i:this.rootElement.parentElement.style.msGridColumns=i;this._gridCSS=i;this._callback&&typeof this._callback=="function"&&this._callback()}},Object.defineProperty(t.prototype,"sizePrevious",{get:function(){var n=this.rootElement.previousElementSibling;return this.computeSize(n)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sizeCurrent",{get:function(){var n=this.rootElement.nextElementSibling;return this.computeSize(n)},enumerable:!0,configurable:!0}),t.prototype.computeSize=function(n){return this.direction==1?n.clientHeight:n.clientWidth},t._gridSplitterClass="gridSplitter",t._gridSplitterResizerClass="gridSplitter-Resizer",t._gridSplitterVerticalClass="gridSplitter-Vertical",t._gridSplitterHorizontalClass="gridSplitter-Horizontal",t._gridSplitterDefaultMinSize=100,t._gridSplitterArrowMoveRatio=.02,t}(n.Controls.Control);t.GridSplitterControl=i})(n.Controls||(n.Controls={}));var t=n.Controls}(Common||(Common={}))
//# sourceMappingURL=JSTreeGridControl.min.js.map
.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;
}
�PNG


IHDRX�g�	pHYs���PLTE����������������,5�CC�CC�HP�CC�CC�CC�CC�CC�CC�CC�CC�CC�CC�CC�CC�CC�����������������������������������������������������������������������������������ww�dd/x��/tRNSGN`l�����������������l`NGGN`l�������#T( cHRMz%������u0�`:�o�_�FeIDATxڥ�Yw�0��R��1-{�)a+��Y<B���K�Ä��'���8���j:�ڭV�7MYZ�aW��É��}�Rl�KGx�{WzF:���'𽏓���_���KE"]
�|]tx��N�H�:)�f�6Gl�E@�}jo�z¥�a���§��6k	�-~(�A�zqi�"fi�D��K8�����D}F4�d|8��2P5�OQ>��Ǧ�Pu��${��W3{����(W,W�f�Z.�<�/�8�Vʻ�P�)U
�=Թ���G~�G��:����9�{:�ʥ�8?U��U)�WCG�g�Z����ޫ����"+�e1PdߴWfU�R�0^e
�S�x�5�G����� ]���A
��j�`�إe�si�w�>c�P2>|L�*�'�)V���cSv��k��`٫���ٿ�W4[����˙�櫭$mWs�-�2��²ם�{%�&��t��7��7��{�Gcc��t��
e�Z%���(�l����>u�{"S?��d\E�]{�H�*��
�K�&�� =JL��LW�Z�ť{j���3�.
p�ϥKߑ�iB�p�!e�je�,�|X�'3�M١�-�I��e�f�R��w���5��-IEND�B`��PNG


IHDRVΎW	pHYs���+yIDATxڭԅ�@C���w�z�����y�u]��ҽ+��������	�.39C��$!@f�0��!� �� 16C�0�\���h��-���1!�D�he��p���\���PE�IEND�B`��PNG


IHDRVΎWsRGB��, cHRMz&�����u0�`:�p��Q<	pHYs���+_IDATxڭ�@P������Џ���&9�K(C���p�����cF��֟cF�1�!���4^_�_�u��b��C�1#ƌ{�3b��1Pѫ�kIEND�B`��PNG


IHDRVΎW	pHYs���+
OiCCPPhotoshop ICC profilexڝSgTS�=���BK���KoR RB���&*!	J�!��Q�EEȠ�����Q,�
��!��������{�kּ�����>�����H3Q5��B������.@�
$p�d!s�#�~<<+"��x��M��0���B�\���t�8K�@z�B�@F���&S�`�cb�P-`'������{[�!�� e�Dh;��V�EX0fK�9�-0IWfH�����0Q��){`�##x��F�W<�+��*x��<�$9E�[-qWW.(�I+6aa�@.�y�2�4�������x����6��_-��"bb��ϫp@�t~�,/��;�m��%�h^�u��f�@����W�p�~<<E���������J�B[a�W}�g�_�W�l�~<�����$�2]�G�����L�ϒ	�b��G�����"�Ib�X*�Qq�D���2�"�B�)�%�d��,�>�5�j>{�-�]c�K'Xt���o��(�h���w��?�G�%�fI�q^D$.Tʳ?�D��*�A�,����`6�B$��BB
d�r`)��B(�Ͱ*`/�@4�Qh��p.�U�=p�a��(��	A�a!ڈb�X#����!�H�$ ɈQ"K�5H1R�T UH�=r9�\F��;�2����G1���Q=��C��7�F��dt1�����r�=�6��Ыhڏ>C�0��3�l0.��B�8,	�c˱"����V����cϱw�E�	6wB aAHXLXN�H� $4�	7	�Q�'"��K�&���b21�XH,#��/{�C�7$�C2'��I��T��F�nR#�,��4H#���dk�9�, +ȅ����3��!�[
�b@q��S�(R�jJ��4�e�2AU��Rݨ�T5�ZB���R�Q��4u�9̓IK�����hh�i��t�ݕN��W���G���w
��Ljg(�gw��L�Ӌ�T071���oUX*�*|��
�J�&�*/T����ުU�U�T��^S}�FU3S�	Ԗ�U��P�SSg�;���g�oT?�~Y��Y�L�OC�Q��_�� c�x,!k
��u�5�&���|v*�����=���9C3J3W�R�f?�q��tN	�(���~���)�)�4L�1e\k����X�H�Q�G�6����E�Y��A�J'\'Gg����S�Sݧ
�M=:��.�k���Dw�n��^��Lo��y��}/�T�m���GX�$��<�5qo</���QC]�@C�a�a�ᄑ��<��F�F�i�\�$�m�mƣ&&!&KM�M�RM��)�;L;L���͢�֙5�=1�2��כ߷`ZxZ,����eI��Z�Yn�Z9Y�XUZ]�F���%ֻ�����N�N���gð�ɶ�����ۮ�m�}agbg�Ů��}�}��=
���Z~s�r:V:ޚΜ�?}���/gX���3��)�i�S��Ggg�s�󈋉K��.�>.���Ƚ�Jt�q]�z�������ۯ�6�i�ܟ�4�)�Y3s���C�Q��?��0k߬~OCO�g��#/c/�W�װ��w��a�>�>r��>�<7�2�Y_�7��ȷ�O�o�_��C#�d�z����%g��A�[��z|!��?:�e����A���AA�����!h�쐭!��Α�i�P~���a�a��~'���W�?�p�X�1�5w��Cs�D�D�Dޛg1O9�-J5*>�.j<�7�4�?�.fY��X�XIlK9.*�6nl�������{�/�]py�����.,:�@L�N8��A*��%�w%�
y��g"/�6ш�C\*N�H*Mz�쑼5y$�3�,幄'���L
Lݛ:��v m2=:�1����qB�!M��g�g�fvˬe����n��/��k���Y-
�B��TZ(�*�geWf�͉�9���+��̳�ې7����ᒶ��KW-X潬j9�<qy�
�+�V�<���*m�O��W��~�&zMk�^�ʂ��k�U
�}����]OX/Yߵa���>������(�x��oʿ�ܔ���Ĺd�f�f���-�[����n
�ڴ
�V��E�/��(ۻ��C���<��e����;?T�T�T�T6��ݵa�n��{��4���[���>ɾ�UUM�f�e�I���?�����m]�Nmq����#�׹���=TR��+�G�����w-
6
U����#pDy��	�
:�v�{���vg/jB��F�S��[b[�O�>����z�G��4<YyJ�T�i��ӓg�ό���}~.��`ۢ�{�c��jo�t��E���;�;�\�t���W�W��:_m�t�<���Oǻ�����\k��z��{f���7���y���՞9=ݽ�zo�����~r'��˻�w'O�_�@�A�C݇�?[�����j�w����G�������C���ˆ
��8>99�?r��C�d�&����ˮ/~�����јѡ�򗓿m|�����������x31^�V��w�w��O�| (�h���SЧ�������c3-� cHRMz%������u0�`:�o�_�F�IDATxڬ���0���@W�N����
�
p����NP�N�/����汗|�/�Ѷ-)"#Q���m���'���8EB���cߣ-���fKc+���<�����X5#�4�^	+���
�Yi���@��f(7�.�oH_�����'��/]��*o�\���\&ϕ4��vi�K�A;���b���A��T��;$T9�D��IEND�B`��PNG


IHDR:���	pHYs����k�gAMA���aIDATx�c8��F3�!����w�߁�5�IEND�B`��PNG


IHDR$l��IDATx���+��0��(����{q���Bs�����r�������~�rs�I֪���W<�O9OV�Ӻ�]�_��;|M�*I'c�I�O�\� ��Q�"
(3Kɰ(èa2�$#_��F��'�����
/
5�j����}A|>4�0g7�
�Q�\>d��M@���;����N�z�#g��Z5�2��lt�� ����w��S�J� |m,/u�UI�@��
�
�礠�1��M	�OPQ�4�&�k���e�!��$QA3@\w�z��(@
P��^@���
���d�e��z�1^��ч�����f��1c\�15+ԙG1=�/��1��i�81Fwޗo�;�ꑏ���q�5��ڞ14H�� ��i�֟�J�0��L������g�RPP��_طx����&	��G��g�*IT�,�ݹ��T��(@
P���?�k�H/@?~�̒*�F=�$��%+%�A�G�H��@Y��d��������"a��g�~���k	�Uř�`�F�ޤ��m��|�{�~R�f ����;��w�! ��q�h�����ʝ��Wo����{����tG�,IEO�z���9)t��>g]<A�1a2<�Q�y�]��JF*h����z�au
P��(@;�P��]9j�˒Z�IEND�B`��PNG


IHDR$l�<IDATx��ٍ�6�������*@%�1��%�=�KP	.A*A��!-��H������7�/9�O�f�����W"0ˋrИ��_�GU(����"2'��%t��H�^BF�� ���j�P�d2�X&�~��@*��*b^ɩ�B�@���I�(}~~�D"r��"�m�J8�<Z��j�&+JVK���j��`$\Aj��P�ŋ-�'��f�Z� ��P��h�/.���[�B'��>5rK�J4#1=��1/�R� ��D�y�\_rQ�J��1�Dx��	e�$V�UVr��
��|e!��-&!����x�P,5���94�y���r�&J�-�I���!��-B�˂o�RȧC�Rץ^Xy�t���DlD4�lx�5		���>�
<n1��GO���Sh���nZ�G�ɺ�B'��*2�H�kO�T{��2|~�e��
�#�S�&��E�i��=�W�}�#1
¶K-Zc���w��1D�^y�s�AV�?��HD.p��y�%ZtE	��YH����@�.-�*B���UG�����!����y�R��!�X�0�7^d".��/T�+�uV��ر��.b���H<��y�I�!*ϛ����\���&��gM('�B���EW���+�m!����x�P,5���94�y���r�&J�-�I����}W�U����O�5=Y��	{ӓ��A,�?���w��D�&���g6=�BO���/��:�m����Id�Pd��מB�Ȁ����m(�,Bf��1§1�9��c�����i�VP*Dk|��^QHϛ����C����%+��
�!G�*���ʓ[*x5IYQ��I^���"��+����x��c�*!��}��
s�Y�B����B�����F�F��B�bk��� �;FS柹�e^H0������s�N,动�@�ʳլ	e�$V@�6sN��n�ض��B[��`D�E(���A���<RH�2|�WH�-�I��c�}W�U��c�O��Y��	{�ƢAd#�c�'�@�o�+��c�����o�B��KIEND�B`��PNG


IHDR$l5���PLTEUUUUUUUUU���������������������������������������������UUUUUUUUU"y�"y�"y�"y�"y�"y�"y��#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�U~,tRNS0``P0 p������������`0  0@P`p���������Bю�IDATx��[s�0����Hmk/1
������%xa3v*�&L�Y�,p�/>�ɵ��.��Z��
�T�6�Q5��(�Δ��%3�����m�>�ꛔ��"��й�����F	��|�B ��5�dp�ꄶ�1�K]���aJ70dG�s�bVɃ7��K?�%�kBc�mN����tmf�L���җs��d&o2s��Ze֗b����KnN5,3���D�;sn���d3S�ze��
}��)�w��	�ŀ�l����3s���u���
`b��Oc��QbW�&X�9*�L�>92l��N=]j2F��ϘQ��ʰ�oR�,�L
�S�h�ry�2S��ň"1�֛�oΡ���h-�Cf��!c82#g���ɥCtMh���ɫj]��-gIEND�B`��PNG


IHDR$l5���PLTETTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT!x�!x�!x�!x�!x�!x�!x�!x�!x�!x�!x�!x�!x��������������������������������������������������"�"�"�"�"�"�"�"�"�"�"�"�"�"�"a�[:tRNS 0@`p�������Ͽ���p`@0  0@P`p����������Ͽ����p`P0 ��i\SIDATx�Ք�v�0��Ǫ$(U�E����t��b� �@Ћ�kf�J���'�q{O������$I�t�^�.�y���`�#M?[T1�#I�K���N{���Lf��w5
�$ �ω�̡*��'z�^o0l"]{y�){�@�wF�[2g`���D��m�3g�&<��^%]M��?)���^^�w��#4YI c&�gca��|o��,��b���,
��P�C�_Nvf���XPc4�\o�AUMA
�YYE�g ŀ�!tJ���@7\w��"2�� �ˆ`�%k�gҒ�P>�$���TcJ��R��k��r���+�'�7B��J�m-UF��9�K���y����מ�̥ma0�^>�f��Ys��\`<[<�-f�M��3s!��68[]��p��Vf�63W��3sn�j3s��\��~(f��~�{6��*3�����eef�xV����a�r��U5��Ve�G+�#�%���B���M��&���(!ȃ�0"��r�<Ӑ����!%��M�SJE�"��R[t���֖�X��F(շ�T����̧���h������(�y:PJ#~\;:ȉ�:2&w�l!P�O�U;�(��6d~i6����
��&W�(���m�Sz�s���=1("fxG�<⺄=Q�@�/�	���PI�8�������Yabx�s�^6�w�q��p�|�k�[���4��>2��,3�A-Q�
���K=�*�G��/�j�^(5�;J�>40�2sSg6TJ�Cʰ�i	+u`��K|K�NL�fqI�j���6	��+�P�tBJ����h�Î�3�qc�:)�M]�;�c�wNk;o<o�MS�/��j�L��IEND�B`��PNG


IHDR6l��~	pHYs��]PLTEUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU������������������������������������"y�"y�"y�)�o�tRNS 02@P`���������Ͽ��`@202��� cHRMz%������u0�`:�o�_�F(IDATx����n�0ЛZ(N�m)����(V��͂��|ό�h��'gK�(֦U+�Eҵd8Y��F�N�B�U��+׹�����Z˻���za���}�}����6V�����e@�+�a�,��^�jj��?��ؐV���I7\��d�r;�
�V�N�\��̻{�;��}�w
[/��sbK�ϑEs}Y�^g��
=��+�I�[�TV ��yrvD�b}Z�;']F��U�iT�t*tZ�;�r��.���#�Z�I�/l�����}����NV}�3:���(��v�b��5�&+7q�L�E��IEND�B`��PNG


IHDR$l�	pHYs���+rIDATx��?K#A�]�4�
���+��`���v���"g�;�R�ɇ���+=L�"�p��XJs��w`&�ٙy����lf�y���Lx���#���ۯ�U��-��V
��*x���
[J��A����E�
��`� 3�t��H���[���-ؤ��-�|&���O@7#
�o#�F��j�!.�詃��e#T���Eʏdרp-뛐R6B�$�G`$��	���˜B����N�B
5��Z�����^B+�By��/���8HB���s
�ޒ��W�~�Ѓ�Q`b��
`R9��3(��@3�T�+��xX�
}��	nDF]�8�-��ه�BO`�U�#܂3獗!�2��as����8q�{���{��]��i}��c��c���	�f��Q��AF�c�z�(�F�k ͈�J��Q(�T4s�1����h($q�1Zi=�;����)�g!a¤aP�<��
�o���$�~C2�-BfF����W��(0���0�X�}�J�X���Bm��#�XHp�<�G��gC�O`�U�#܂3�Ӟ!�2��as���=�8��qy��t���GK�D������
^��{�'��ǖ*uP�z2r�s0R�]���ө�"��o�N.2�`����-�'���m���Y�!�p� #i��~Bu�|�]/j9k4�f�Y?�T�Oh�&����a^�i�C4�������Z!I�1�vB4y�|�����
�P�Bz�<��xm�)�PJ��� 	���{���Qo�$�z�8
Ll�n��B����*)�a(*���,$��E���B�5�Y�8�-�p>��-x�B��9���_���C�e�_@�1f`0��z�IEND�B`��PNG


IHDR$l�	pHYs���+�IDATx��1K1ǽA�C�BW�������E����W���t�
"�����:�tqq�������^S|���w�߽�k�733�c��v)4�7���|����{�<�P�)��)����y+�d���T�s�/�܃_2������+0�TR&���c!�{#��̃Al	��X�ZŨ�M�]�IBm�6Ş�j�E�B]�m���E>@1E�H1"��R�>�B-�&�'�E1"�l"�tsccp���]��4W�c�|=mq[B���c^	�����Pt��\2El<i�6�iN��A'iq�B$��`��s��R�q'���	=�C��[/Yҝ���&4���_���=��c�#���z��>S��`���B(S�хP���L=�4�1��1Yz���~�c0Х?s�~�cy�IZܪ�$=F'%���G'�@M�o�dIw�B,�B,��$�C6~��G��P�B<xd�K�	��͐�F�����7�bN��O�U���X�%�ޥ��}I�,�������5e]�y��ڐ2���a���dbK��*Y�A�n��"M�l�)�̥P�&�B]�m����(��)F��\
��'�t����ňز�И��Lԥ�kP��*t,���-nK(�6w�+!kRlt��\2El<iN|�9!���ŭ
т9��	�9g�~+%���G'�@M�o�dIw�B,�B,��$�C6~��G��P�B<B��^O�����IEND�B`��PNG


IHDR$l�%
�	pHYs���+PLTEUUUUUU"y�"y���������btRNS�������LfIDATx���	�@DQKHkn)!M���� s� ���0�C�������b�7�Ť�Ѣl6M��b�n�͔o@��*£E�l���NJ?L�)߀�W�G����a/
c��<�`IEND�B`��PNG


IHDR$l�gAMA���asRGB��, cHRMz&�����u0�`:�p��Q<	pHYs����k��IDATx���)LAG�w��U�Bq_^��������zU��U���_`��K>�yy��Qm�B3���h���06��0�tO�p��B(�`��������h'�t~_@��	�}!�/$�E������Wz *E�@����U�
�V�*[`�l���U�
�V��˅B�P(�-��eݿ�GU.nꗏ�^��c��D(Im��S.B�7��>�E(���RB~_@����}!!�/%���j�V��G���뢟:[`�l���U�
�V�*[`��߇�P(
���<7���tZ/�Q6B�.�[��ۼ{�H(��
��}Y!�/+�e�����ܗ��B~_^��Җb��J`�l���U�
�V�*[`�l��U��B�$�����IEND�B`��PNG


IHDR$le�
	pHYs����k�gAMA���aPLTEz�����'w��?tRNS@��fsRGB��, cHRMz&�����u0�`:�p��Q<%IDATx�c`�:��k(�P b��V��!Ƣ9U��1��&�IEND�B`��PNG


IHDRr
ߔ�IDATx��ַ� @a��<��BL�6a
���8u���)����	�����_��t�!"Cp�dD�:�<#�@{$��:� �
VxB'z�
����<C����	���ܡvM�5���0���b����0x��O�������h�?�~OV?`�+��%��h�)��:����%IEND�B`��PNG


IHDRr
ߔ3IDATH��ֱ
 ð~�_<W^`$�!�פmn�g��ɀ@ �����^�7k�V��IEND�B`��PNG


IHDRr
ߔ�IDATx���!�0�aHHp4� �\��\��h��E�s�3sKf���%��Z�޲lM��)����kj��_eҘ�V �]I�XaT!���E�/V
������-���j��zh�x'�{
��m��@��ڀ�F�G��F妘�-@|뙀�F��X]@��
F5��3�8+�;F�궰z
�83Q��F
*p��?�Z����c�Ϯ�	3-d��IEND�B`�body {
    margin: 0px;
    padding: 0px;
    overflow: hidden;
}

* {
    box-sizing: border-box;
}

.icon-tree-collapsed {
    background: url("../Common/images/itemCollapsedIcon.png") no-repeat; /*[url({vs-image-icon-tree-collapsed}) no-repeat]*/
    background-size: 10px 10px;
}

.icon-tree-expanded {
    background: url("../Common/images/itemExpandedIcon.png") no-repeat; /*[url({vs-image-icon-tree-expanded}) no-repeat]*/
    background-size: 10px 10px;
}

.heading {
    text-transform: uppercase;
    line-height: 1.84em;
    font-size: 12pt; /*[{plugin-font-size}]*/
    font-weight: bold;
    margin-right: 6px;
}

.hidden {
    display: none;
}

.icon {
    display: inline-block;
    height: 11px;
    margin-top: 4px;
    overflow: hidden;
    vertical-align: middle;
    width: 11px;
}

    .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;
}

.menu-bar {
    margin: 0px;
    padding: 0px;
    list-style-type: none;
    box-sizing: border-box;
}

.menu-popup {
    margin: 0px;
    padding: 0px;
    list-style-type: none;
    box-sizing: border-box;
}

.menu-popup-static {
    margin: 0px;
    padding: 0px;
    list-style-type: none;
    box-sizing: border-box;
}

.sub-menu {
    -ms-overflow-y: auto;
}

.virtualizing-list-view {
    border: 1px solid rgb(204, 204, 204); /*[1px solid {plugin-treeview-content-inactive-selected-color}]*/
    position: relative;
    background-color: rgb(252, 252, 252); /*[{plugin-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 {
    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;
    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;
    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;
    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;
    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 __extends,Microsoft;(function(n){(function(n){(function(n){"use strict";var t=function(){function n(){}return n.ZoomIn="ZoomIn",n.ZoomToSelection="ZoomToSelection",n.ZoomOut="ZoomOut",n.ResetZoom="ResetZoom",n.ResetView="ResetView",n.ClearSelection="ClearSelection",n}();n.CommandIds=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio})(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function n(){}return Object.defineProperty(n,"GridLineZIndex",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(n,"SelectionOverlayZIndex",{get:function(){return 130},enumerable:!0,configurable:!0}),Object.defineProperty(n,"DropDownMenuZIndex",{get:function(){return 1e3},enumerable:!0,configurable:!0}),Object.defineProperty(n,"DefaultSwimlaneGraphHeight",{get:function(){return 70},enumerable:!0,configurable:!0}),Object.defineProperty(n,"MinimumSwimlaneGraphHeight",{get:function(){return 50},enumerable:!0,configurable:!0}),Object.defineProperty(n,"MaximumSwimlaneGraphHeight",{get:function(){return 200},enumerable:!0,configurable:!0}),Object.defineProperty(n,"TimeoutImmediate",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(n,"WindowResizeThrottle",{get:function(){return 200},enumerable:!0,configurable:!0}),Object.defineProperty(n,"TooltipTimeoutMs",{get:function(){return 750},enumerable:!0,configurable:!0}),n}();n.Constants=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(i){var r=this;this._viewportStateChangedEvent=new t.AggregatedEvent;this._isSelecting=!1;this._commands=[];this._currentSelection=null;this._viewportTimeRange=i;this._viewableTimeRange=i;this._scrollbar=new t.Scrollbar;this._scrollbar.onScroll=this.onScroll.bind(this);this._onSelectionChangedBoundFunction=this.onSelectionChanged.bind(this);this._telemetry=new t.Telemetry.ViewportController;this._viewEventManager=n.VisualStudio.DiagnosticsHub.getViewEventManager();this._viewEventManager.selectionChanged.addEventListener(this._onSelectionChangedBoundFunction);this._commands.push({id:t.CommandIds.ZoomIn,callback:this.zoomToSelection.bind(this),label:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomInButton"),ariaLabel:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomInAriaLabel"),tooltip:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomInButton"),type:1,iconEnabled:"vs-image-toolbar-chartzoom-in",iconDisabled:"vs-image-toolbar-chartzoom-in-disabled",accessKey:null,hidden:function(){return!1},disabled:function(){return!r.canZoomTo()},checked:function(){return!1},cssClass:null,submenu:null,displayOnToolbar:!0,displayOnContextMenu:!0});this._commands.push({id:t.CommandIds.ResetZoom,callback:this.resetZoom.bind(this),label:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarResetZoomButton"),ariaLabel:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarResetZoomAriaLabel"),tooltip:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarResetZoomButton"),type:1,iconEnabled:"vs-image-toolbar-chartzoom-reset",iconDisabled:"vs-image-toolbar-chartzoom-reset-disabled",accessKey:null,hidden:function(){return!1},disabled:function(){return!r.canResetZoom()},checked:function(){return!1},cssClass:null,submenu:null,displayOnToolbar:!0,displayOnContextMenu:!0});this._commands.push({id:t.CommandIds.ClearSelection,callback:this.clearSelection.bind(this),label:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarClearSelectionButton"),ariaLabel:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarClearSelectionAriaLabel"),tooltip:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarClearSelectionButton"),type:1,iconEnabled:"vs-image-toolbar-chartselection-clear",iconDisabled:"vs-image-toolbar-chartselection-clear-disabled",accessKey:null,hidden:function(){return!1},disabled:function(){return!r.canClearSelection()},checked:function(){return!1},cssClass:null,submenu:null,displayOnToolbar:!0,displayOnContextMenu:!0});this._viewportStateChangedEvent.addEventListener(function(){r._commands.forEach(function(n){n.onDisabledChanged&&n.onDisabledChanged()})})}return Object.defineProperty(i.prototype,"container",{get:function(){return this._scrollbar.container},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"viewportStateChanged",{get:function(){return this._viewportStateChangedEvent},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"visible",{get:function(){return this._viewportTimeRange},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"viewable",{get:function(){return this._viewableTimeRange},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selection",{get:function(){return this._currentSelection},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"scrollbar",{get:function(){return this._scrollbar},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"commands",{get:function(){return this._commands},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this._scrollbar.onScroll=null;this._scrollbar.dispose();this._viewEventManager.selectionChanged.removeEventListener(this._onSelectionChangedBoundFunction);this._viewportStateChangedEvent.dispose()},i.prototype.resize=function(n){this._scrollbar.resize(n)},i.prototype.requestViewportChange=function(n){var i,r,u;return this._isSelecting?!1:(i=this._viewableTimeRange.contains(n.currentTimespan.begin)&&this._viewableTimeRange.contains(n.currentTimespan.end),r=!n.selectionTimespan||this._viewableTimeRange.contains(n.selectionTimespan.begin)&&this._viewableTimeRange.contains(n.selectionTimespan.end),!i||!r)?(t.Debug.Assert.isTrue(i,"Invalid viewport specified"),t.Debug.Assert.isTrue(r,"Invalid selection specified"),!1):(u=!this.isSameSelection(n.selectionTimespan),!u&&this._viewportTimeRange.equals(n.currentTimespan))?!1:(this._viewportTimeRange=n.currentTimespan,u&&(this._currentSelection=n.selectionTimespan,this._viewEventManager.selectionChanged.raiseEvent({position:this._currentSelection,isIntermittent:!1})),this.fireViewportStateChanged(!1),!0)},i.prototype.canZoomTo=function(){return typeof this._currentSelection!="undefined"&&this._currentSelection!==null&&!this._viewportTimeRange.equals(this._currentSelection)&&!this._viewableTimeRange.equals(this._currentSelection)&&!i.MinimumZoomTimeInMs.greater(this._currentSelection.elapsed)},i.prototype.zoomToSelection=function(){this.canZoomTo()&&(this._telemetry.zoomIn(),n.Plugin.VS.Internal.CodeMarkers.fire(25225),this._viewportTimeRange=this._currentSelection,this._scrollbar.update(this._viewableTimeRange,this._viewportTimeRange),this.fireViewportStateChanged(),n.Plugin.VS.Internal.CodeMarkers.fire(25226))},i.prototype.canResetZoom=function(){return!this._viewableTimeRange.equals(this._viewportTimeRange)},i.prototype.resetZoom=function(){this.canResetZoom()&&(this._telemetry.resetZoom(),n.Plugin.VS.Internal.CodeMarkers.fire(25237),this._viewportTimeRange=this._viewableTimeRange,this._scrollbar.update(this._viewableTimeRange,this._viewportTimeRange),this.fireViewportStateChanged(),n.Plugin.VS.Internal.CodeMarkers.fire(25238))},i.prototype.canClearSelection=function(){return typeof this._currentSelection!="undefined"&&this._currentSelection!==null&&!this._currentSelection.equals(this._viewableTimeRange)},i.prototype.clearSelection=function(){this.canClearSelection()&&(this._telemetry.clearSelection(),this._viewEventManager.selectionChanged.raiseEvent({position:this._viewableTimeRange,isIntermittent:!1}))},i.prototype.onScroll=function(n){if(n.totalLength){var i=t.BigNumber.addNumber(this._viewableTimeRange.begin,parseInt(this._viewableTimeRange.elapsed.value)*n.position/n.totalLength),r=t.BigNumber.add(i,this._viewportTimeRange.elapsed);this._viewportTimeRange=new t.JsonTimespan(i,r);this.fireViewportStateChanged()}},i.prototype.onSelectionChanged=function(i){n.Plugin.VS.Internal.CodeMarkers.fire(25233);this._isSelecting=i.isIntermittent;i.position!==null&&typeof i.position!="undefined"&&i.position.end.greater(this._viewableTimeRange.end)?this._viewEventManager.selectionChanged.raiseEvent({position:new t.JsonTimespan(i.position.begin,this._viewableTimeRange.end),isIntermittent:i.isIntermittent}):this.isSameSelection(i.position)||(this._currentSelection=i.position,this.fireViewportStateChanged(this._isSelecting));n.Plugin.VS.Internal.CodeMarkers.fire(25234)},i.prototype.fireViewportStateChanged=function(n){typeof n=="undefined"&&(n=!1);this._viewportStateChangedEvent.invokeEvent({currentTimespan:this._viewportTimeRange,selectionTimespan:this._currentSelection,isIntermittent:n})},i.prototype.isSameSelection=function(n){return!this._currentSelection&&!n||this._currentSelection&&n&&this._currentSelection.equals(n)},i.MinimumZoomTimeInMs=t.BigNumber.convertFromNumber(1e4),i}();t.ViewportController=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function t(t){t&&t.forEach(function(n){n.iconEnabled=null;n.iconDisabled=null});this._contextMenu=n.Plugin.ContextMenu.create(t,null,null,null,function(){})}return t.prototype.onMouseDown=function(n){if(this._contextMenu&&n.which===3){var t=n.clientX,i=n.clientY;return this._contextMenu.show(t,i),!1}return!0},t}();t.ContextMenu=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function n(n){this._decoratedControl=n}return Object.defineProperty(n.prototype,"container",{get:function(){return this._decoratedControl.container},enumerable:!0,configurable:!0}),n.prototype.onDataUpdate=function(n){if(this._decoratedControl.onDataUpdate)this._decoratedControl.onDataUpdate(n)},n.prototype.resize=function(n){this._decoratedControl.resize&&this._decoratedControl.resize(n)},n.prototype.onViewportChanged=function(n){if(this._decoratedControl.onViewportChanged)this._decoratedControl.onViewportChanged(n)},n.prototype.dispose=function(){this._decoratedControl.dispose&&this._decoratedControl.dispose()},n}();n.ControlDecorator=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(i,r){var c=this,e,o,s,f,h,u;this._container=document.createElement("div");this._container.id="informationContainer";this._container.classList.add("main-information-container");e=document.createElement("div");e.classList.add("information-icon");e.appendChild(t.Utilities.getSVGPlaceHolder("vs-image-information-icon"));n.Plugin.Theme.processInjectedSvg(e);this._container.appendChild(e);o=document.createElement("div");o.classList.add("information-message");o.innerHTML=i;this._container.appendChild(o);r&&(s=document.createElement("div"),s.classList.add("information-link"),this._container.appendChild(s),f=document.createElement("a"),f.href=r||"",f.target="blank",f.text=n.Plugin.Resources.getString("/DiagnosticsHubResources/InformationLink"),f.setAttribute("role","link"),f.setAttribute("aria-label",n.Plugin.Resources.getString("/DiagnosticsHubResources/InformationLink")),s.appendChild(f));h=document.createElement("div");h.classList.add("information-close-div");this._container.appendChild(h);u=document.createElement("div");u.classList.add("information-close");u.innerHTML="r";u.tabIndex=0;u.setAttribute("role","button");u.setAttribute("aria-label",n.Plugin.Resources.getString("/DiagnosticsHubResources/InformationClose"));u.setAttribute("data-plugin-vs-tooltip",JSON.stringify({content:n.Plugin.Resources.getString("/DiagnosticsHubResources/InformationClose"),delay:0}));u.onkeypress=function(n){13===n.keyCode&&c.collapse()};u.onclick=this.collapse.bind(this);h.appendChild(u)}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),i.prototype.collapse=function(){this._container.classList.add("main-information-container-hidden");this.onClose&&this.onClose()},i}();t.InformationBarControl=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(t,i){var r=this,u;(this._localizedUnits=[],u=n.VisualStudio.DiagnosticsHub.getLogger(),t)&&(t.forEach(function(n){i&&i[n.Unit]?r._localizedUnits.push({Decimals:n.Decimals,Divider:n.Divider,LowerBound:n.LowerBound,Unit:i[n.Unit]}):(r._localizedUnits.push({Decimals:n.Decimals,Divider:n.Divider,LowerBound:n.LowerBound,Unit:n.Unit}),u.error("Missing resource string for: "+n.Unit))}),t.sort(function(n,t){return n.LowerBound<t.LowerBound?-1:n.LowerBound>t.LowerBound?1:0}))}return i.prototype.formatNumber=function(i,r){var u=this.scaleValue(i),e=typeof r=="number"?r:u.decimals,f=t.Utilities.formatNumber(u.value,e);return u.unit?n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/FormattedNumberWithUnits",f,u.unit):f},i.prototype.scaleValue=function(n){for(var t,u,i=n,f,e=0,r=0;r<this._localizedUnits.length;++r)if(t=this._localizedUnits[r],t.LowerBound<=n)i=n,e=t.Decimals,t.Divider&&(i=i/t.Divider),u=Math.pow(10,t.Decimals),i=Math.round(i*u)/u,f=t.Unit;else break;return{value:i,unit:f,decimals:e}},i}();t.LocalizedUnitConverter=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function n(){}return n.registerClass=function(n){var i;if(n){var r=window||this,u=n.split("."),t=null;for(i=0;i<u.length;i++)if(t=r[u[i]],t)r=t;else throw new Error("Invalid class name.");this.RegisteredClasses[n]=t}else throw new Error("Invalid class name.")},n.registerFunction=function(n){for(var r=window||this,u=n.split("."),t=null,i=0;i<u.length;i++)if(t=r[u[i]],t)r=t;else throw new Error("Invalid function name.");this.RegisteredFunctions[n]=t},n.getRegisteredClass=function(n){return this.RegisteredClasses[n]},n.getRegisteredFunction=function(n){return this.RegisteredFunctions[n]},n.RegisteredClasses={},n.RegisteredFunctions={},n}();n.RegisterNamespace=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function t(){this._logger=n.VisualStudio.DiagnosticsHub.getLogger();this._container=document.createElement("div");this._container.classList.add("scrollbar");this._onScrollBoundFunction=this.onScrollEvent.bind(this);this._container.onscroll=this._onScrollBoundFunction;this._scrollbarCalculator=document.createElement("div");this._scrollbarCalculator.classList.add("scrollbar-width-calculator");this._scrollbarCalculator.id="scrollbarWidthCalculator";this._container.appendChild(this._scrollbarCalculator);this._scrollbarCalculator.style.left=this._container.clientWidth-2+"px";this._container.scrollLeft=this._container.scrollWidth-this._container.offsetWidth}return Object.defineProperty(t.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this._container.onscroll=null;this._animationFrameHandle&&window.cancelAnimationFrame(this._animationFrameHandle)},t.prototype.resize=function(){var n=this;this._animationFrameHandle||(this._animationFrameHandle=window.requestAnimationFrame(function(){return n.onScrollAnimation()}))},t.prototype.update=function(n,t){var e=this,i=parseInt(t.elapsed.value),r=parseInt(t.begin.value),u=parseInt(n.elapsed.value),f=parseInt(n.begin.value);isNaN(i)||isNaN(r)||isNaN(u)||isNaN(f)||i===0||(this._startPages=(r-f)/i,this._totalPages=u/i,this._animationFrameHandle||(this._animationFrameHandle=window.requestAnimationFrame(function(){return e.onScrollAnimation()})))},t.prototype.scrollTo=function(n){var t=this;this._startPages=n*this._totalPages/100;this._animationFrameHandle||window.cancelAnimationFrame(this._animationFrameHandle);this._animationFrameHandle=window.requestAnimationFrame(function(){return t.onScrollAnimation(!1)})},t.prototype.onScrollAnimation=function(n){typeof n=="undefined"&&(n=!0);var i=this._container.clientWidth,r=this._totalPages*i,t=this._totalPages<=1?0:this._startPages*i;this._scrollbarCalculator.style.left=r-2+"px";this._container.scrollLeft!==t&&(n?(this._container.onscroll=null,this._container.scrollLeft=t,this._container.onscroll=this._onScrollBoundFunction):this._container.scrollLeft=t);this._animationFrameHandle=null},t.prototype.onScrollEvent=function(){if(this._startPages=this._container.scrollLeft/this._container.clientWidth,this.onScroll)this.onScroll({position:this._container.scrollLeft,visibleLength:this._container.clientWidth,totalLength:this._container.scrollWidth})},t}();t.Scrollbar=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(i){var r,u;typeof i=="undefined"&&(i=6e7);r=this;this._viewportStateChangedEvent=new t.AggregatedEvent;this._isZoomed=!1;this._isScrolling=!1;this._isSelecting=!1;this._isUserInteracting=!1;this._commands=[];u=new t.JsonTimespan(t.BigNumber.zero,t.BigNumber.zero);this._currentSelection=null;this._viewportTimeRange=u;this._viewableTimeRange=u;this._rolledViewableTimeRange=u;this._timeInNsPerPixel=i;this._maxViewableWidthInNs=t.BigNumber.convertFromNumber(100*this._timeInNsPerPixel);this._scrollbar=new t.Scrollbar;this._scrollbar.onScroll=this.onScroll.bind(this);this._scrollbar.update(this._viewableTimeRange,this._viewportTimeRange);this._onSelectionChangedBoundFunction=this.onSelectionChanged.bind(this);this._onChangeViewportBoundFunction=this.onChangeViewport.bind(this);this._telemetry=new t.Telemetry.ViewportController;this._viewEventManager=n.VisualStudio.DiagnosticsHub.getViewEventManager();this._viewEventManager.selectionChanged.addEventListener(this._onSelectionChangedBoundFunction);this._viewEventManager.changeViewport.addEventListener(this._onChangeViewportBoundFunction);this._commands.push({id:t.CommandIds.ZoomIn,callback:this.zoomIn.bind(this),label:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomInButton"),ariaLabel:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomInAriaLabel"),tooltip:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomInButton"),type:1,iconEnabled:"vs-image-toolbar-chartzoom-in",iconDisabled:"vs-image-toolbar-chartzoom-in-disabled",accessKey:null,hidden:function(){return!1},disabled:function(){return!r.canZoomIn()},checked:function(){return!1},cssClass:null,submenu:null,displayOnToolbar:!0,displayOnContextMenu:!0});this._commands.push({id:t.CommandIds.ZoomToSelection,callback:this.zoomToSelection.bind(this),label:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomToSelectionButton"),ariaLabel:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomToSelectionAriaLabel"),tooltip:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomToSelectionButton"),type:1,iconEnabled:"vs-image-toolbar-chartzoom-in",iconDisabled:"vs-image-toolbar-chartzoom-in-disabled",accessKey:null,hidden:function(){return!1},disabled:function(){return!r.canZoomToSelection()},checked:function(){return!1},cssClass:null,submenu:null,displayOnToolbar:!1,displayOnContextMenu:!0});this._commands.push({id:t.CommandIds.ZoomOut,callback:this.zoomOut.bind(this),label:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomOutButton"),ariaLabel:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomOutAriaLabel"),tooltip:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarZoomOutButton"),type:1,iconEnabled:"vs-image-toolbar-chartzoom-reset",iconDisabled:"vs-image-toolbar-chartzoom-reset-disabled",accessKey:null,hidden:function(){return!1},disabled:function(){return!r.canZoomOut()},checked:function(){return!1},cssClass:null,submenu:null,displayOnToolbar:!0,displayOnContextMenu:!0});this._commands.push({id:t.CommandIds.ResetView,callback:this.resetView.bind(this),label:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarResetViewButton"),ariaLabel:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarResetViewAriaLabel"),tooltip:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarResetViewButton"),type:1,iconEnabled:"vs-image-toolbar-reset-view",iconDisabled:"vs-image-toolbar-reset-view-disabled",accessKey:null,hidden:function(){return!1},disabled:function(){return!r.canResetView()},checked:function(){return!1},cssClass:null,submenu:null,displayOnToolbar:!0,displayOnContextMenu:!0});this._viewportStateChangedEvent.addEventListener(function(){r._commands.forEach(function(n){n.onDisabledChanged&&n.onDisabledChanged()})})}return Object.defineProperty(i.prototype,"container",{get:function(){return this._scrollbar.container},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"viewportStateChanged",{get:function(){return this._viewportStateChangedEvent},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"visible",{get:function(){return this._viewportTimeRange},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"viewable",{get:function(){return this._viewableTimeRange},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selection",{get:function(){return this._currentSelection},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"scrollbar",{get:function(){return this._scrollbar},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"commands",{get:function(){return this._commands},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this._scrollbar.onScroll=null;this._scrollbar.dispose();this._viewEventManager.selectionChanged.removeEventListener(this._onSelectionChangedBoundFunction);this._viewEventManager.changeViewport.removeEventListener(this._onChangeViewportBoundFunction);this._viewportStateChangedEvent.dispose()},i.prototype.resize=function(n){this._scrollbar.resize(n);var i=Math.max(this.container.clientWidth,100);this._maxViewableWidthInNs=t.BigNumber.convertFromNumber(i*this._timeInNsPerPixel);this.rollTimeRange(!0)},i.prototype.onDataUpdate=function(n){t.BigNumber.subtract(n,i.DropPointLimitInNs).greater(this._viewableTimeRange.begin)?(this._viewableTimeRange=new t.JsonTimespan(t.BigNumber.subtract(n,i.OneHourInNs),n),this.rollTimeRange(!0)):(this._viewableTimeRange=new t.JsonTimespan(this._viewableTimeRange.begin,n),this.rollTimeRange())},i.prototype.canZoomIn=function(){var n=t.BigNumber.divideNumber(this._viewportTimeRange.elapsed,2);return!i.MinimumZoomTimeInNs.greater(n)},i.prototype.zoomIn=function(){var n,r,i,u;this.canZoomIn()&&(this._telemetry.zoomIn(),i=t.BigNumber.divideNumber(this._viewportTimeRange.elapsed,4),this._currentSelection?(u=t.BigNumber.add(this._currentSelection.begin,t.BigNumber.divideNumber(this._currentSelection.elapsed,2)),n=t.BigNumber.subtract(u,i),r=t.BigNumber.add(u,i)):this._viewableTimeRange.elapsed.greater(this._viewportTimeRange.elapsed)?(n=t.BigNumber.add(this._viewportTimeRange.begin,i),r=t.BigNumber.subtract(this._viewportTimeRange.end,i)):(n=this._viewableTimeRange.begin,r=t.BigNumber.add(n,t.BigNumber.divideNumber(this._viewportTimeRange.elapsed,2))),this._viewportTimeRange=new t.JsonTimespan(n,r),this._isZoomed=!0,this._isUserInteracting=!0,this._scrollbar.update(this._rolledViewableTimeRange,this._viewportTimeRange),this.fireViewportStateChanged())},i.prototype.canZoomToSelection=function(){return this._currentSelection&&!this._currentSelection.equals(this._viewportTimeRange)&&!i.MinimumZoomTimeInNs.greater(this._currentSelection.elapsed)},i.prototype.zoomToSelection=function(){this.canZoomToSelection()&&(this._telemetry.zoomIn(),n.Plugin.VS.Internal.CodeMarkers.fire(25225),this._viewportTimeRange=this._currentSelection,this._isZoomed=!0,this._scrollbar.update(this._rolledViewableTimeRange,this._viewportTimeRange),this.fireViewportStateChanged(),n.Plugin.VS.Internal.CodeMarkers.fire(25226))},i.prototype.canZoomOut=function(){return i.OneHourInNs.greater(this._viewportTimeRange.elapsed)},i.prototype.zoomOut=function(){var u,r,f;this.canZoomOut()&&(this._telemetry.zoomOut(),n.Plugin.VS.Internal.CodeMarkers.fire(25255),u=t.BigNumber.divideNumber(this._viewportTimeRange.elapsed,2),r=t.BigNumber.subtract(this._viewportTimeRange.begin,u),r=r.greater(this._viewableTimeRange.begin)?r:this._viewableTimeRange.begin,f=t.BigNumber.min(i.OneHourInNs,t.BigNumber.multiplyNumber(u,4)),this._viewportTimeRange=new t.JsonTimespan(r,t.BigNumber.add(r,f)),this._viewportTimeRange.end.greater(this._rolledViewableTimeRange.end)&&(this._rolledViewableTimeRange=new t.JsonTimespan(this._rolledViewableTimeRange.begin,this._viewportTimeRange.end)),this._isZoomed=!0,this._scrollbar.update(this._rolledViewableTimeRange,this._viewportTimeRange),this.fireViewportStateChanged(),n.Plugin.VS.Internal.CodeMarkers.fire(25256))},i.prototype.canResetView=function(){return typeof this._currentSelection!="undefined"&&this._currentSelection!==null||this._isZoomed||this._isScrolling},i.prototype.resetView=function(){this.canResetView()&&(this._telemetry.clearSelection(),this._isZoomed=!1,this._isScrolling=!1,this._isUserInteracting=!1,this.rollTimeRange(!0),this._viewEventManager.selectionChanged.raiseEvent({position:null,isIntermittent:!1}))},i.prototype.requestViewportChange=function(n){var u,f,e,o,s;if(this._isSelecting)return!1;if(u=n.currentTimespan.begin.equals(t.BigNumber.zero)&&n.currentTimespan.end.equals(t.BigNumber.zero)||this._rolledViewableTimeRange.contains(n.currentTimespan.begin)&&this._rolledViewableTimeRange.contains(n.currentTimespan.end),f=!n.selectionTimespan||this._viewableTimeRange.contains(n.selectionTimespan.begin)&&this._viewableTimeRange.contains(n.selectionTimespan.end),!u||!f)return t.Debug.Assert.isTrue(u,"Invalid viewport specified"),t.Debug.Assert.isTrue(f,"Invalid selection specified"),!1;var r=n.currentTimespan,c=new t.JsonTimespan(t.BigNumber.zero,t.BigNumber.zero),h=n.currentTimespan.equals(c);if(h&&(r=new t.JsonTimespan(t.BigNumber.subtract(this._rolledViewableTimeRange.end,t.BigNumber.min(this._viewportTimeRange.elapsed,this._rolledViewableTimeRange.end)),this._rolledViewableTimeRange.end)),r.begin.greaterOrEqual(this._rolledViewableTimeRange.end)||this._rolledViewableTimeRange.begin.greaterOrEqual(r.end))return!1;if(h||r.end.greater(this._viewableTimeRange.end)&&this._rolledViewableTimeRange.end.greater(r.end)?(this._rolledViewableTimeRange=new t.JsonTimespan(this._rolledViewableTimeRange.begin,r.end),this._isScrolling=!1,this._isUserInteracting=!1):this._isUserInteracting=!0,r=new t.JsonTimespan(t.BigNumber.max(r.begin,this._rolledViewableTimeRange.begin),t.BigNumber.min(r.end,this._rolledViewableTimeRange.end)),i.MinimumZoomTimeInNs.greater(r.elapsed))if(e=t.BigNumber.subtract(r.end,i.MinimumZoomTimeInNs),e.greaterOrEqual(this._rolledViewableTimeRange.begin))r=new t.JsonTimespan(e,r.end);else if(o=t.BigNumber.add(r.begin,i.MinimumZoomTimeInNs),this._rolledViewableTimeRange.end.greaterOrEqual(o))r=new t.JsonTimespan(r.begin,o);else return!1;return(s=!this.isSameSelection(n.selectionTimespan),!s&&this._viewportTimeRange.equals(r))?!1:(this._isZoomed=!0,this._viewportTimeRange=r,this._scrollbar.update(this._rolledViewableTimeRange,this._viewportTimeRange),s&&(this._currentSelection=n.selectionTimespan,this._viewEventManager.selectionChanged.raiseEvent({position:this._currentSelection,isIntermittent:!1})),this.fireViewportStateChanged(!1),!0)},i.prototype.rollTimeRange=function(n){var r,i,f,e,u;if(typeof n=="undefined"&&(n=!1),r=!1,this._viewableTimeRange.end.greater(this._rolledViewableTimeRange.end)||n){for(i=n?new t.JsonTimespan(this._viewableTimeRange.begin,t.BigNumber.add(this._viewableTimeRange.begin,this._maxViewableWidthInNs)):this._rolledViewableTimeRange;this._viewableTimeRange.end.greater(i.end);)f=t.BigNumber.divideNumber(this._maxViewableWidthInNs,3),i=new t.JsonTimespan(i.begin,t.BigNumber.add(i.end,f));r=!this._rolledViewableTimeRange.equals(i);this._rolledViewableTimeRange=i}this._isSelecting||this._currentSelection||this._isUserInteracting||this._isScrolling||(e=n?this._maxViewableWidthInNs:t.BigNumber.max(this._maxViewableWidthInNs,this._viewportTimeRange.elapsed),u=new t.JsonTimespan(t.BigNumber.subtract(this._rolledViewableTimeRange.end,e),this._rolledViewableTimeRange.end),this._viewportTimeRange.equals(u)||(r=!0,this._viewportTimeRange=u,this.fireViewportStateChanged()));r&&this._scrollbar.update(this._rolledViewableTimeRange,this._viewportTimeRange)},i.prototype.onChangeViewport=function(n){var o=new t.JsonTimespan(t.BigNumber.zero,t.BigNumber.zero),e=n.equals(o),r,u,f;if(e&&(n=new t.JsonTimespan(t.BigNumber.subtract(this._rolledViewableTimeRange.end,t.BigNumber.min(this._viewportTimeRange.elapsed,this._rolledViewableTimeRange.end)),this._rolledViewableTimeRange.end)),n.begin.greaterOrEqual(this._rolledViewableTimeRange.end)||this._rolledViewableTimeRange.begin.greaterOrEqual(n.end))return!1;if(e||n.end.greater(this._viewableTimeRange.end)&&this._rolledViewableTimeRange.end.greater(n.end)?(this._rolledViewableTimeRange=new t.JsonTimespan(this._rolledViewableTimeRange.begin,n.end),this._isScrolling=!1,this._isUserInteracting=!1):this._isUserInteracting=!0,r=new t.JsonTimespan(t.BigNumber.max(n.begin,this._rolledViewableTimeRange.begin),t.BigNumber.min(n.end,this._rolledViewableTimeRange.end)),i.MinimumZoomTimeInNs.greater(r.elapsed))if(u=t.BigNumber.subtract(r.end,i.MinimumZoomTimeInNs),u.greaterOrEqual(this._rolledViewableTimeRange.begin))r=new t.JsonTimespan(u,r.end);else if(f=t.BigNumber.add(r.begin,i.MinimumZoomTimeInNs),this._rolledViewableTimeRange.end.greaterOrEqual(f))r=new t.JsonTimespan(r.begin,f);else return!1;return this._viewportTimeRange.equals(r)?!1:(this._isZoomed=!0,this._viewportTimeRange=r,this._scrollbar.update(this._rolledViewableTimeRange,this._viewportTimeRange),this.fireViewportStateChanged(),!0)},i.prototype.onSelectionChanged=function(i){if(n.Plugin.VS.Internal.CodeMarkers.fire(25233),this._isSelecting=i.isIntermittent,i.position!==null&&typeof i.position!="undefined"&&i.position.end.greater(this._viewableTimeRange.end)){var r=t.BigNumber.min(i.position.begin,this._viewableTimeRange.end);this._viewEventManager.selectionChanged.raiseEvent({position:new t.JsonTimespan(r,this._viewableTimeRange.end),isIntermittent:this._isSelecting})}else this.isSameSelection(i.position)||(this._currentSelection=i.position,this.fireViewportStateChanged(this._isSelecting));n.Plugin.VS.Internal.CodeMarkers.fire(25234)},i.prototype.onScroll=function(n){if(n.totalLength){Math.abs(n.position+n.visibleLength-n.totalLength)>1?this._isScrolling=!0:(this._isScrolling=!1,this._isUserInteracting=!1);var i=t.BigNumber.addNumber(this._rolledViewableTimeRange.begin,parseInt(this._rolledViewableTimeRange.elapsed.value)*n.position/n.totalLength),r=t.BigNumber.add(i,this._viewportTimeRange.elapsed);this._viewportTimeRange=new t.JsonTimespan(i,r);this.fireViewportStateChanged()}},i.prototype.fireViewportStateChanged=function(n){typeof n=="undefined"&&(n=!1);this._viewportStateChangedEvent.invokeEvent({currentTimespan:this._viewportTimeRange,selectionTimespan:this._currentSelection,isIntermittent:n})},i.prototype.isSameSelection=function(n){return!this._currentSelection&&!n||this._currentSelection&&n&&this._currentSelection.equals(n)},i.MinimumZoomTimeInNs=t.BigNumber.convertFromNumber(1e4),i.OneHourInNs=t.BigNumber.convertFromNumber(36e11),i.DropPointLimitInNs=t.BigNumber.convertFromNumber(366e10),i}();t.RollingViewportController=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={}));__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){(function(t){(function(t){"use strict";var o=function(){function n(){}return Object.defineProperty(n,"Line",{get:function(){return"Line"},enumerable:!0,configurable:!0}),Object.defineProperty(n,"Mark",{get:function(){return"Mark"},enumerable:!0,configurable:!0}),n}(),r,s,u,h,c,l,a,v,y,p,i,f,e;t.SeriesType=o;r=function(){function n(){}return Object.defineProperty(n,"Graph",{get:function(){return"Graph"},enumerable:!0,configurable:!0}),Object.defineProperty(n,"Ruler",{get:function(){return"Ruler"},enumerable:!0,configurable:!0}),n}();t.ViewType=r,function(n){n[n.None=0]="None";n[n.Live=1]="Live";n[n.PostMortem=2]="PostMortem"}(t.GraphBehaviourType||(t.GraphBehaviourType={}));s=t.GraphBehaviourType;u=function(){function n(){}return Object.defineProperty(n,"ScaleInfoChanged",{get:function(){return"scaleInfoChanged"},enumerable:!0,configurable:!0}),n}();t.GraphEvents=u,function(n){n[n.Left=0]="Left";n[n.Right=1]="Right"}(t.ScaleType||(t.ScaleType={}));h=t.ScaleType,function(n){n[n.LessThanOrEqual=0]="LessThanOrEqual";n[n.Nearest=1]="Nearest";n[n.GreaterThanOrEqual=2]="GreaterThanOrEqual"}(t.PointToFind||(t.PointToFind={}));c=t.PointToFind,function(n){n[n.Unknown=0]="Unknown";n[n.Standard=1]="Standard";n[n.Custom=2]="Custom";n[n.FullCustom=3]="FullCustom"}(t.SwimlaneType||(t.SwimlaneType={}));l=t.SwimlaneType,function(n){n[n.LifeCycleEvent=1]="LifeCycleEvent";n[n.UserMark=2]="UserMark";n[n.Custom=3]="Custom"}(t.MarkType||(t.MarkType={}));a=t.MarkType,function(n){n[n.Big=0]="Big";n[n.Medium=1]="Medium";n[n.Small=2]="Small"}(t.TickMarkType||(t.TickMarkType={}));v=t.TickMarkType,function(n){n[n.italicizedAbbreviations=0]="italicizedAbbreviations";n[n.fullName=1]="fullName"}(t.UnitFormat||(t.UnitFormat={}));y=t.UnitFormat,function(n){n[n.perfDiagnosticsHub_ZoomSelectionBegin=25225]="perfDiagnosticsHub_ZoomSelectionBegin";n[n.perfDiagnosticsHub_ZoomSelectionEnd=25226]="perfDiagnosticsHub_ZoomSelectionEnd";n[n.perfDiagnosticsHub_SwimlaneFullRenderBegin=25227]="perfDiagnosticsHub_SwimlaneFullRenderBegin";n[n.perfDiagnosticsHub_SwimlaneFullRenderEnd=25228]="perfDiagnosticsHub_SwimlaneFullRenderEnd";n[n.perfDiagnosticsHub_GraphContentFullRenderBegin=25229]="perfDiagnosticsHub_GraphContentFullRenderBegin";n[n.perfDiagnosticsHub_GraphContentFullRenderEnd=25230]="perfDiagnosticsHub_GraphContentFullRenderEnd";n[n.perfDiagnosticsHub_GraphContentPartialRenderBegin=25231]="perfDiagnosticsHub_GraphContentPartialRenderBegin";n[n.perfDiagnosticsHub_GraphContentPartialRenderEnd=25232]="perfDiagnosticsHub_GraphContentPartialRenderEnd";n[n.perfDiagnosticsHub_OnSelectionChangedBegin=25233]="perfDiagnosticsHub_OnSelectionChangedBegin";n[n.perfDiagnosticsHub_OnSelectionChangedEnd=25234]="perfDiagnosticsHub_OnSelectionChangedEnd";n[n.perfDiagnosticsHub_OnDataUpdateBegin=25235]="perfDiagnosticsHub_OnDataUpdateBegin";n[n.perfDiagnosticsHub_OnDataUpdateEnd=25236]="perfDiagnosticsHub_OnDataUpdateEnd";n[n.perfDiagnosticsHub_ResetZoomBegin=25237]="perfDiagnosticsHub_ResetZoomBegin";n[n.perfDiagnosticsHub_ResetZoomEnd=25238]="perfDiagnosticsHub_ResetZoomEnd";n[n.perfDiagnosticsHub_ZoomOutBegin=25255]="perfDiagnosticsHub_ZoomOutBegin";n[n.perfDiagnosticsHub_ZoomOutEnd=25256]="perfDiagnosticsHub_ZoomOutEnd"}(t.ControlsCodeMarkers||(t.ControlsCodeMarkers={}));p=t.ControlsCodeMarkers;i=function(){function n(n,t,i,r){this.left=n;this.top=t;this.right=i;this.bottom=r}return n}();t.Padding=i;f=function(t){function i(i,r,u,f){if(t.call(this,i,r,u,f),this.left>this.right||this.top>this.bottom)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1000"))}return __extends(i,t),Object.defineProperty(i.prototype,"width",{get:function(){return this.right-this.left},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"height",{get:function(){return this.bottom-this.top},enumerable:!0,configurable:!0}),i}(i);t.RectangleDimension=f;e=function(){function n(n,t){this.min=n;this.max=t}return Object.defineProperty(n.prototype,"range",{get:function(){return(this.min||this.min===0)&&(this.max||this.max===0)?this.max-this.min:null},enumerable:!0,configurable:!0}),n}();t.MinMaxNumber=e})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function t(){if(this._graphConfigurationMarshaler=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.SwimLanesViewMarshaler",{},!0),!this._graphConfigurationMarshaler)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1007"))}return t.prototype.getConfigurations=function(n){this._graphConfigurationMarshaler._call("getConfigurations").done(n)},t.prototype.dataUpdate=function(n){this._graphConfigurationMarshaler.addEventListener("dataUpdate",n)},t}();t.DiagnosticsHubDataManager=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){(function(t){var i=function(){function t(){}return t.loadCss=function(t){if(typeof t!="string"&&t.lastIndexOf(".css")!==t.length-4)throw new Error("file name is null or undefined.");var i=t.substring(t.lastIndexOf("\\")+1,t.lastIndexOf(".css")),r=document.getElementById(i);if(!r)return n.Plugin.Theme.processCSSFileForThemeing(t).then(function(n){var i=document.createElement("style");i.setAttribute("data-plugin-theme","true");i.setAttribute("data-plugin-theme-href",t);i.type="text/css";i.innerHTML=n;document.getElementsByTagName("head")[0].appendChild(i)})},t.loadDependency=function(i){var r=t.toFileUri(i.url).toUpperCase(),f,u;return t.isScriptAppended(r)?(f=n.Plugin.Promise.wrap(null),t.LoadingDependenciesMap[r]&&(f=t.LoadingDependenciesMap[r]),f.then(function(){return t.registerDependency(i)})):(u=document.createElement("script"),u.type="text/javascript",u.src=i.url,t.LoadingDependenciesMap[r]=new n.Plugin.Promise(function(n,f){u.onload=function(){delete t.LoadingDependenciesMap[r];t.registerDependency(i);n(null)};u.onerror=function(){if(f)f(null);else throw new Error("Unable to load resource: "+i.url)}}),document.getElementsByTagName("head")[0].appendChild(u),t.LoadingDependenciesMap[r])},t.registerDependency=function(t){t.objType&&n.VisualStudio.DiagnosticsHub.RegisterNamespace.registerClass(t.objType);t.functionName&&n.VisualStudio.DiagnosticsHub.RegisterNamespace.registerFunction(t.functionName)},t.isScriptAppended=function(n){for(var i,t=0;t<document.scripts.length;++t)if(i=document.scripts[t],i.src&&decodeURIComponent(i.src).toUpperCase()===n.toUpperCase())return!0;return!1},t.toFileUri=function(n){var i=n.split("\\").join("/");return i.substr(0,t.FileUriPrefix.length).toUpperCase()!==t.FileUriPrefix.toUpperCase()&&(i=t.FileUriPrefix+i),i},t.LoadingDependenciesMap={},t.FileUriPrefix="file:///",t}();t.DependencyManager=i})(t.Common||(t.Common={}));var i=t.Common})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){(function(n){"use strict";var t,i;(function(n){n[n.Tab=9]="Tab";n[n.Enter=13]="Enter";n[n.Shift=16]="Shift";n[n.Escape=27]="Escape";n[n.Space=32]="Space";n[n.PageUp=33]="PageUp";n[n.PageDown=34]="PageDown";n[n.End=35]="End";n[n.Home=36]="Home";n[n.ArrowLeft=37]="ArrowLeft";n[n.ArrowFirst=37]="ArrowFirst";n[n.ArrowUp=38]="ArrowUp";n[n.ArrowRight=39]="ArrowRight";n[n.ArrowDown=40]="ArrowDown";n[n.ArrowLast=40]="ArrowLast";n[n.Delete=46]="Delete";n[n.B=66]="B";n[n.C=67]="C";n[n.Plus=107]="Plus";n[n.Minus=109]="Minus";n[n.F1=112]="F1";n[n.F2=113]="F2";n[n.F3=114]="F3";n[n.F4=115]="F4";n[n.F5=116]="F5";n[n.F6=117]="F6";n[n.F7=118]="F7";n[n.F8=119]="F8";n[n.F9=120]="F9";n[n.F10=121]="F10";n[n.F11=122]="F11";n[n.F12=123]="F12"})(n.KeyCodes||(n.KeyCodes={}));t=n.KeyCodes,function(n){n[n.Left=1]="Left";n[n.Right=3]="Right";n[n.Middle=2]="Middle"}(n.MouseCodes||(n.MouseCodes={}));i=n.MouseCodes})(n.Common||(n.Common={}));var t=n.Common})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(r){var o=this,u,f,e;this._command=r;this._command.disabled=this._command.disabled||function(){return!1};this._container=document.createElement("button");this._container.classList.add(i.ButtonDisabledCss);this._container.classList.add(this._command.cssClass);this._container.disabled=this._command.disabled();this._command.tooltip&&this._container.setAttribute("data-plugin-vs-tooltip",JSON.stringify({content:this._command.tooltip}));this._container.setAttribute("role","button");this._container.setAttribute("aria-label",this._command.ariaLabel||this._command.label);this._command.iconEnabled&&(u=document.createElement("div"),u.classList.add(i.ButtonImageCss),u.classList.add(i.SvgEnabled),u.appendChild(t.Utilities.getSVGPlaceHolder(this._command.iconEnabled)),this._container.appendChild(u),n.Plugin.Theme.processInjectedSvg(u));this._command.iconDisabled&&(f=document.createElement("div"),f.classList.add(i.ButtonImageCss),f.classList.add(i.SvgDisabled),f.appendChild(t.Utilities.getSVGPlaceHolder(this._command.iconDisabled)),this._container.appendChild(f),n.Plugin.Theme.processInjectedSvg(f));e=document.createElement("div");e.innerHTML=this._command.label;e.classList.add(i.ButtonTextCss);e.classList.add(i.ButtonTextDisabledCss);this._container.appendChild(e);this._container.onclick=this.onClick.bind(this);this._container.onkeydown=this.onKeyDown.bind(this);this._command.onDisabledChanged=function(){o.setEnabled(!o._command.disabled())};n.Plugin.Theme.addEventListener("themechanged",function(){o.setEnabled(!o._command.disabled())});this._currentState=this._container.disabled;this.setEnabled(!this._container.disabled)}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),i.prototype.onKeyDown=function(n){this._container.disabled||13!==n.keyCode||this._command.callback()},i.prototype.onClick=function(){this._container.disabled||this._command.callback()},i.prototype.setEnabled=function(n){if(this._currentState!==n){this._currentState=n;this._container.disabled=!n;var t=this._container.getElementsByClassName(i.ButtonTextCss)[0];n?(t.classList.remove(i.ButtonTextDisabledCss),this._container.tabIndex=0,this._container.classList.remove(i.ButtonDisabledCss),this._container.classList.add(i.ButtonCss)):(t.classList.add(i.ButtonTextDisabledCss),this._container.tabIndex=-1,this._container.classList.add(i.ButtonDisabledCss),this._container.classList.remove(i.ButtonCss))}},i.ButtonCss="toolbar-button",i.ButtonDisabledCss="toolbar-button-disabled",i.ButtonImageCss="button-image",i.ButtonTextCss="button-text",i.ButtonTextDisabledCss="button-text-disabled",i.SvgDisabled="svg-disabled",i.SvgEnabled="svg-enabled",i}();t.ToolbarButton=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function n(){this._container=document.createElement("div");this._container.classList.add("toolbar-separator");this._container.innerHTML="&nbsp;"}return Object.defineProperty(n.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),n}();n.ToolbarSeparator=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function t(){var n=this;this._items=[];this._container=document.createElement("div");this._container.classList.add("toolbar-container");this._collapseCallback=function(t){t.matches?n._container.classList.add("limitedSpace"):n._container.classList.remove("limitedSpace")};this.updateCollapsingWidth()}return Object.defineProperty(t.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),t.prototype.addCommand=function(t){t.displayOnToolbar&&this.addToolbarItem(new n.ToolbarButton(t))},t.prototype.addCommandGroup=function(n){var t=this;this._items.length>0&&n.length>0&&this.addSeparator();n.forEach(function(n){t.addCommand(n)})},t.prototype.addToolbarItem=function(n){this._items.push(n);this._container.appendChild(n.container);this.updateCollapsingWidth()},t.prototype.addSeparator=function(){this.addToolbarItem(new n.ToolbarSeparator)},t.prototype.updateCollapsingWidth=function(){this._collapseMediaQuery&&this._collapseMediaQuery.removeListener(this._collapseCallback);var t=60;this._items.forEach(function(n){t+=n.container.offsetWidth});this._collapseMediaQuery=window.matchMedia(n.Utilities.formatString("(max-width: {0}px)",t.toString()));this._collapseMediaQuery.addListener(this._collapseCallback);this._collapseCallback(this._collapseMediaQuery)},t}();n.Toolbar=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(){}return i.findChildById=function(n,t){for(var u=[],i=n,r;i;){if(i.id===t)return i;for(r=0;r<i.children.length;++r)u.push(i.children[r]);i=u.shift()}return null},i.findLessThan=function(n,t,r,u,f){if(typeof u=="undefined"&&(u=0),typeof f=="undefined"&&(f=n.length-1),f===u)return u;if(f-u<=1)return r(n[f],t)?f:u;var e=Math.floor((f+u)/2);return r(t,n[e])?i.findLessThan(n,t,r,u,e):i.findLessThan(n,t,r,e,f)},i.findGreaterThan=function(n,t,r,u,f){if(typeof u=="undefined"&&(u=0),typeof f=="undefined"&&(f=n.length-1),f===u)return f;if(f-u<=1)return r(t,n[u])?u:f;var e=Math.floor((f+u)/2);return r(t,n[e])?i.findGreaterThan(n,t,r,u,e):i.findGreaterThan(n,t,r,e,f)},i.scaleToRange=function(n,t,i,r,u){return i===t?0:(u-r)*(n-t)/(i-t)+r},i.linearInterpolate=function(n,i,r,u,f){if(i.equals(u))return r;var e=parseInt(t.BigNumber.subtract(n,i).value),o=parseInt(t.BigNumber.subtract(u,i).value);return r+(f-r)*e/o},i.convertToPixel=function(n,i,r,u){if(typeof u=="undefined"&&(u=!0),u&&(i.elapsed.equals(t.BigNumber.zero)||r<=0))return 0;var e=1,f;return i.begin.greater(n)?(e=-1,f=parseInt(t.BigNumber.subtract(i.begin,n).value)):f=parseInt(t.BigNumber.subtract(n,i.begin).value),e*(f/parseInt(i.elapsed.value))*r},i.getTimestampAtPixel=function(n,i,r){return i>0?t.BigNumber.addNumber(r.begin,parseInt(r.elapsed.value)/i*n):t.BigNumber.zero},i.translateNumPixelToDuration=function(n,t,i){return t>0?parseInt(i.elapsed.value)/t*n:0},i.formatNumber=function(n,t){var r,u;return r=t===null||typeof t=="undefined"?n.toString():n.toFixed(t),u=i.getNumberFormat(),r.replace(".",u.numberDecimalSeparator)},i.formatString=function(n){for(var i,r=[],t=0;t<arguments.length-1;t++)r[t]=arguments[t+1];return i=n,r.forEach(function(n,t){i=i.replace("{"+t+"}",n)}),i},i.getNumberFormat=function(){var t=n.Plugin.Culture.NumberFormat;return t&&t.length!==0||(t={numberDecimalSeparator:"."}),t},i.containsPoint=function(n,t,i){return n.left<=t&&n.right>=t&&n.top<=i&&n.bottom>=i},i.getSVGPlaceHolder=function(n){var t=document.createElement("div");return t.setAttribute("data-plugin-svg",n),t},i.setCapture=function(n){if(n)try{if(n.setCapture){n.setCapture(!0);return}if(n.msSetPointerCapture){n.msSetPointerCapture(i.MousePointerId);return}if(n.setPointerCapture){n.setPointerCapture(i.MousePointerId);return}}catch(r){t.getLogger().error(r.message)}},i.releaseCapture=function(n){if(n)try{if(n.releaseCapture){n.releaseCapture();return}if(n.msReleasePointerCapture){n.msReleasePointerCapture(i.MousePointerId);return}if(n.releasePointerCapture){n.releasePointerCapture(i.MousePointerId);return}}catch(r){t.getLogger().error(r.message)}},i.MousePointerId=1,i}();t.Utilities=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){(function(t){var i=function(){function t(n,t){this._container=n;this._elementCreator=t;this._index=null;this._elements=[];this._recycledElements=[]}return t.forDivWithClass=function(n,i){return new t(n,function(){var n=document.createElement("div");return n.className=i,n})},t.prototype.start=function(){this._index=0},t.prototype.getNext=function(){if(this._index===null)throw new Error(n.Plugin.Resources.getErrorString("JSPerf.1035"));var t=this._elements[this._index];return t||(t=this._recycledElements.length>0?this._recycledElements.pop():this._elementCreator(),this._elements.push(t),this._container.appendChild(t)),this._index++,t},t.prototype.stop=function(){var t,n;if(this._index!==null){for(t=this._elements.length-1;t>=this._index;--t)n=this._elements.pop(),this._recycledElements.push(n),this._container.children.length>0&&n.parentElement&&this._container.removeChild(n);this._index=null}},t.prototype.recycleAll=function(){for(var n,t=this._elements.length-1;t>=0;--t)n=this._elements.pop(),this._recycledElements.push(n),this._container.children.length>0&&n.parentElement&&this._container.removeChild(n)},t.prototype.removeAll=function(){for(var t,n=this._elements.length-1;n>=0;--n)t=this._elements.pop(),this._container.children.length>0&&t.parentElement&&this._container.removeChild(t);this._elements=[];this._recycledElements=[]},t}();t.ElementRecyclerFactory=i})(t.Common||(t.Common={}));var i=t.Common})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function n(n,t){this.time=n;this.tooltip=t}return n}();n.MarkData=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(i,r,u,f,e){typeof e=="undefined"&&(e=!1);var o=this;this._clientWidth=0;this._clientHeight=0;this._rulerMarksImageWidth=9;this._minimumMarkDistance=7;this._timeRange=i;this._container=document.createElement("div");this._container.classList.add("ruler-scale-main");this._container.classList.add("fullsizeOverlay");this._seriesList=r;this._imageTokenList=u;this._aggregatedMarkImageToken=f;this._showZero=e;this._rulerMarks=[];this._canvas=document.createElement("canvas");this._canvas.classList.add("fullsizeOverlay");this._context=this._canvas.getContext("2d");this._context.lineWidth=1;this._strokeStyle=n.Plugin.Theme.getValue("diagnostics-host-ruler-tickmark");this._fontSize=n.Plugin.Theme.getValue("plugin-font-size");this._fontColor=n.Plugin.Theme.getValue("plugin-color");this._fontFamily=n.Plugin.Theme.getValue("plugin-font-family");this._container.appendChild(this._canvas);this._scaleMarksDiv=document.createElement("div");this._scaleMarksDiv.id="scaleMarks";this._scaleMarksDiv.classList.add("fullsizeOverlay");this._scaleMarksDiv.tabIndex=0;this._scaleMarksDiv.onkeydown=function(n){return o.onKeyDown(n)};this._scaleMarksDiv.setAttribute("aria-label",n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerMarkNavigation"));this._container.appendChild(this._scaleMarksDiv);this._scaleMarkElementsFactory=new t.Common.ElementRecyclerFactory(this._scaleMarksDiv,function(){return o.createMarkVisual("ruler-scale-mark-image-event")});this._onThemeChangedBoundFunction=this.onThemeChanged.bind(this);n.Plugin.Theme.addEventListener("themechanged",this._onThemeChangedBoundFunction);this.renderTickMarks();this.renderMarks(!0)}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){n.Plugin.Theme.removeEventListener("themechanged",this._onThemeChangedBoundFunction);this._scaleMarkElementsFactory.recycleAll();this._scaleMarkElementsFactory.removeAll()},i.prototype.resize=function(){var n=this._container.clientWidth;this._clientWidth!==n&&(this._clientWidth=n,this._clientHeight=this._container.clientHeight,this._canvas.width=this._clientWidth,this._canvas.height=this._clientHeight,this.renderTickMarks(),this.renderMarks(!0))},i.prototype.onViewportChanged=function(n){this._timeRange.equals(n.currentTimespan)||(this._timeRange=n.currentTimespan,this.renderTickMarks(),this.renderMarks(!0))},i.prototype.addMark=function(n,t,i){var r,u;if(typeof i=="undefined"&&(i=!0),this._seriesList&&t&&t.time){for(r=0;r<this._seriesList.length;r++)if(this._seriesList[r].id===n){u=this._seriesList[r];u.data||(u.data=[]);u.data.push(t);this.createAggregatedMark(t,u.id-1);break}this._rulerMarks.sort(function(n,t){return n.time.compareTo(t.time)});(i||this._timeRange.contains(t.time))&&this.renderMarks(!1)}},i.prototype.onThemeChanged=function(){this._strokeStyle=n.Plugin.Theme.getValue("diagnostics-host-ruler-tickmark");this._fontSize=n.Plugin.Theme.getValue("plugin-font-size");this._fontColor=n.Plugin.Theme.getValue("plugin-color");this._fontFamily=n.Plugin.Theme.getValue("plugin-font-family");this.renderTickMarks();this.renderMarks(!0)},i.prototype.renderTickMarks=function(){var n=this;if(!this._timeRange.elapsed.equals(t.BigNumber.zero)){this._context.clearRect(0,0,this._clientWidth,this._clientHeight);this._context.strokeStyle=this._strokeStyle;this._context.fillStyle=this._fontColor;this._context.font=this._fontSize+" "+this._fontFamily;this._context.textBaseline="hanging";var i=this._clientHeight,r=this._clientHeight*.4,u=this._clientHeight*.2;t.RulerUtilities.getTickMarksPosition(this._timeRange,this._clientWidth,this._showZero).forEach(function(f){var o=t.Utilities.convertToPixel(f.value,n._timeRange,n._clientWidth,!1),e=0;switch(f.type){case 0:n._context.fillText(t.RulerUtilities.formatTime(f.value),o+2.5,0);e=i;break;case 1:e=r;break;case 2:e=u}n._context.beginPath();n._context.moveTo(o+.5,n._clientHeight);n._context.lineTo(o+.5,n._clientHeight-e);n._context.stroke()})}},i.prototype.renderMarks=function(t){var i=this;(t&&this.createAggregateMarkList(),this._rulerMarks)&&(this._scaleMarkElementsFactory.start(),this._rulerMarks.forEach(function(t){if(t.time&&i._timeRange.contains(t.time)){var r=i._scaleMarkElementsFactory.getNext();r.style.backgroundImage=t.glyphIndex!==null&&typeof t.glyphIndex!="undefined"&&t.glyphIndex!==-1&&i._imageTokenList[t.glyphIndex]?"url("+n.Plugin.Theme.getValue(i._imageTokenList[t.glyphIndex])+")":"url("+n.Plugin.Theme.getValue(i._aggregatedMarkImageToken)+")";r.style.left=t.pixelPosition+"px";r.onmouseover=function(){return i.showMarkTooltip(t)};r.onmouseout=n.Plugin.Tooltip.dismiss;r.onfocus=function(){r.setAttribute("aria-label",n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerMarkLabel",t.getAriaContent()))}}}),this._scaleMarkElementsFactory.stop())},i.prototype.createAggregateMarkList=function(){var n=this;(this._rulerMarks=[],this._seriesList)&&(this._seriesList.forEach(function(t){t.data&&t.data.forEach(function(i){n._timeRange.contains(i.time)&&n.createAggregatedMark(i,t.id-1)})}),this._rulerMarks.sort(function(n,t){return n.time.compareTo(t.time)}))},i.prototype.createAggregatedMark=function(n,i){for(var r,u,e=t.Utilities.convertToPixel(n.time,this._timeRange,this._clientWidth)-this._rulerMarksImageWidth/2,o=!0,f=0;f<this._rulerMarks.length;++f)if(r=this._rulerMarks[f],Math.abs(r.pixelPosition-e)<=this._minimumMarkDistance){r.push(n);r.glyphIndex!==i&&(r.glyphIndex=(r.glyphIndex===0||r.glyphIndex===1)&&(i===0||i===1)?0:-1);o=!1;break}o&&(u=new t.AggregatedMarkData,u.push(n),u.glyphIndex=i,u.pixelPosition=e,this._rulerMarks.push(u))},i.prototype.showMarkTooltip=function(t){var i=t.getTooltipContent();i&&n.Plugin.Tooltip.show({content:i})},i.prototype.createMarkVisual=function(n){var t=document.createElement("div");return t.classList.add(n),t.classList.add("ruler-scale-mark-image-position"),t},i.prototype.onKeyDown=function(n){if(this._scaleMarksDiv.children.length!==0&&(n.keyCode===9||n.keyCode===39||n.keyCode===37)){if(n.keyCode===9){this._focusedMark&&(this._focusedMark.blur(),this._focusedMark.tabIndex=-1,this._focusedMark=null,this._container.focus());return}var i=n.currentTarget,t;(this._focusedMark?(this._focusedMark.tabIndex=-1,n.keyCode===39?t=this._focusedMark.nextElementSibling||i.firstElementChild:n.keyCode===37&&(t=this._focusedMark.previousElementSibling||i.lastElementChild)):n.keyCode===39?t=i.firstElementChild:n.keyCode===37&&(t=i.lastElementChild),t)&&(this._focusedMark=t,t.tabIndex=0,t.focus())}},i}();t.RulerScale=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(i){function r(u,f){i.call(this,f);this._container=document.createElement("div");this._container.classList.add("ruler-doubleSlider");this._container.classList.add("fullsizeOverlay");this._currentTimeRange=u;this._selectionTimeRange=this._currentTimeRange;this._viewEventManager=n.VisualStudio.DiagnosticsHub.getViewEventManager();this._telemetry=new t.Telemetry.ViewportController;this._container.onmousedown=this.onStartSelection.bind(this);this._container.onmousemove=this.onDragSelection.bind(this);this._container.onmouseup=this.onStopSelection.bind(this);this._lSlider=document.createElement("div");this._lSlider.className="ruler-slider";this._lSlider.style.width=r.SliderWidth+"px";this._lSlider.tabIndex=0;this._lSlider.setAttribute("role","slider");this._lSlider.setAttribute("aria-label",n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerLeftSliderAriaLabel"));this._container.appendChild(this._lSlider);this._lSlider.onmousedown=this.onStartSelection.bind(this);this._lSlider.onkeydown=this.onKeyDown.bind(this);this._lSlider.onkeyup=this.onKeyUp.bind(this);this._lSlider.onfocus=this.sliderFocus.bind(this);this._lUnselectedRegion=document.createElement("div");this._lUnselectedRegion.className="ruler-unselected";this._container.appendChild(this._lUnselectedRegion);this._container.appendChild(f.container);this._rSlider=document.createElement("div");this._rSlider.className="ruler-slider";this._rSlider.style.width=r.SliderWidth+"px";this._rSlider.tabIndex=0;this._rSlider.setAttribute("role","slider");this._rSlider.setAttribute("aria-label",n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerRightSliderAriaLabel"));this._container.appendChild(this._rSlider);this._rSlider.onmousedown=this.onStartSelection.bind(this);this._rSlider.onkeydown=this.onKeyDown.bind(this);this._rSlider.onkeyup=this.onKeyUp.bind(this);this._rSlider.onfocus=this.sliderFocus.bind(this);this._rUnselectedRegion=document.createElement("div");this._rUnselectedRegion.className="ruler-unselected";this._container.appendChild(this._rUnselectedRegion);this.updateAriaLabels()}return __extends(r,i),Object.defineProperty(r.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),r.prototype.onViewportChanged=function(n){this._currentTimeRange=n.currentTimespan;this._selectionTimeRange=n.selectionTimespan;this.setSliderHandlePosition(n.selectionTimespan||n.currentTimespan);this.updateAriaLabels();i.prototype.onViewportChanged.call(this,n)},r.prototype.resize=function(n){(this._clientRect=this._container.getBoundingClientRect(),this._clientWidth!==this._clientRect.width)&&(this._clientWidth=this._clientRect.width,this.setSliderHandlePosition(this._selectionTimeRange||this._currentTimeRange),i.prototype.resize.call(this,n))},r.prototype.setSliderHandlePosition=function(n){var u=t.Utilities.convertToPixel(n.begin,this._currentTimeRange,this._clientWidth),i=t.Utilities.convertToPixel(n.end,this._currentTimeRange,this._clientWidth),f;this._lSlider.style.visibility=u<0||u>this._clientWidth-r.SliderWidth?"hidden":"visible";this._lSlider.style.left=u-r.SliderWidth+"px";this._lUnselectedRegion.style.width=u>this._clientWidth?this._clientWidth+"px":Math.max(u,0)+"px";this._rSlider.style.visibility=i<0||i>this._clientWidth?"hidden":"visible";this._rSlider.style.left=i+"px";f=this._clientWidth-i;this._rUnselectedRegion.style.width=f>this._clientWidth?this._clientWidth+"px":Math.max(this._clientWidth-i,0)+"px";this._rUnselectedRegion.style.left=f>this._clientWidth?"0px":i+"px"},r.prototype.sliderFocus=function(n){var u=this._selectionTimeRange||this._currentTimeRange,f,i;n.currentTarget!==this._lSlider||this._currentTimeRange.contains(u.begin)?n.currentTarget!==this._rSlider||this._currentTimeRange.contains(u.end)||(f=parseInt(this._currentTimeRange.elapsed.value)/this._clientWidth*(r.SliderWidth+1),i=t.BigNumber.subtract(u.end,this._currentTimeRange.elapsed),i=t.BigNumber.addNumber(i,f),this._viewEventManager.changeViewport.raiseEvent(new t.JsonTimespan(i,t.BigNumber.add(i,this._currentTimeRange.elapsed)))):(f=parseInt(this._currentTimeRange.elapsed.value)/this._clientWidth*(r.SliderWidth+1),i=t.BigNumber.subtractNumber(u.begin,f),this._viewEventManager.changeViewport.raiseEvent(new t.JsonTimespan(i,t.BigNumber.add(i,this._currentTimeRange.elapsed))))},r.prototype.onKeyDown=function(n){this.handleKeyEvent(n)&&!this._animationFrameHandle&&(this._animationFrameHandle=window.requestAnimationFrame(this.onSelectionAnimation.bind(this)))},r.prototype.onKeyUp=function(n){if(this.handleKeyEvent(n)){window.cancelAnimationFrame(this._animationFrameHandle);this._animationFrameHandle=null;this.raiseSelectionTimeRangeChangedEvent(this._selectionTimeRange,!1);var i=t.Utilities.getTimestampAtPixel(t.SwimlaneViewConstants.MinSelectionInPixels,this._clientWidth,this._currentTimeRange).greaterOrEqual(this._selectionTimeRange.elapsed);this._telemetry.selectionChanged(1,i)}},r.prototype.handleKeyEvent=function(n){if(n.keyCode!==37&&n.keyCode!==39)return!1;this._selectionTimeRange=this._selectionTimeRange||this._currentTimeRange;var u=t.BigNumber.subtract(t.Utilities.getTimestampAtPixel(1,this._clientWidth,this._currentTimeRange),this._currentTimeRange.begin),i=this._selectionTimeRange.begin,r=this._selectionTimeRange.end;return n.keyCode===37&&(n.srcElement===this._lSlider?(i=t.BigNumber.subtract(i,u),i=t.BigNumber.max(i,this._currentTimeRange.begin)):n.srcElement===this._rSlider&&(r=t.BigNumber.subtract(r,u),r=t.BigNumber.max(i,r))),n.keyCode===39&&(n.srcElement===this._lSlider?(i=t.BigNumber.add(i,u),i=t.BigNumber.min(i,r)):n.srcElement===this._rSlider&&(r=t.BigNumber.add(r,u),r=t.BigNumber.min(r,this._currentTimeRange.end))),this._selectionTimeRange=new t.JsonTimespan(i,r),!0},r.prototype.onStartSelection=function(n){n.which===1&&(this._selectionTimeRange=this._selectionTimeRange||this._currentTimeRange,n.target===this._lSlider?this._selectionTimeAnchor=this._selectionTimeRange.end:n.target===this._rSlider?this._selectionTimeAnchor=this._selectionTimeRange.begin:(this._selectionTimeAnchor=t.Utilities.getTimestampAtPixel(n.clientX-this._clientRect.left,this._clientWidth,this._currentTimeRange),this._selectionTimeRange=new t.JsonTimespan(this._selectionTimeAnchor,t.BigNumber.addNumber(this._selectionTimeAnchor,t.Utilities.translateNumPixelToDuration(t.SwimlaneViewConstants.MinSelectionInPixels,this._clientWidth,this._currentTimeRange)))),t.Utilities.setCapture(this._container),this._animationFrameHandle&&window.cancelAnimationFrame(this._animationFrameHandle),this._animationFrameHandle=window.requestAnimationFrame(this.onSelectionAnimation.bind(this)),n.stopPropagation())},r.prototype.onDragSelection=function(n){var i,r;(n.target===this._lSlider||n.target===this._rSlider||n.target===this._container)&&n.which===1&&this._animationFrameHandle&&(i=Math.max(n.clientX-this._clientRect.left,0),i=Math.min(this._clientWidth,i),r=t.Utilities.getTimestampAtPixel(i,this._clientWidth,this._currentTimeRange),this._selectionTimeRange=this._selectionTimeAnchor.greater(r)?new t.JsonTimespan(r,this._selectionTimeAnchor):new t.JsonTimespan(this._selectionTimeAnchor,r),n.stopPropagation())},r.prototype.onStopSelection=function(n){if(n.which===1&&this._lSlider&&this._rSlider&&this._animationFrameHandle){t.Utilities.releaseCapture(this._container);window.cancelAnimationFrame(this._animationFrameHandle);this._animationFrameHandle=null;this._lSlider.blur();this._rSlider.blur();t.Utilities.containsPoint(this._lSlider.getBoundingClientRect(),n.clientX,n.clientY)?this._lSlider.focus():t.Utilities.containsPoint(this._rSlider.getBoundingClientRect(),n.clientX,n.clientY)&&this._rSlider.focus();this.raiseSelectionTimeRangeChangedEvent(this._selectionTimeRange,!1);var i=t.Utilities.getTimestampAtPixel(t.SwimlaneViewConstants.MinSelectionInPixels,this._clientWidth,this._currentTimeRange).greaterOrEqual(this._selectionTimeRange.elapsed);this._telemetry.selectionChanged(1,i);n.stopPropagation()}},r.prototype.onSelectionAnimation=function(){this._animationFrameHandle=window.requestAnimationFrame(this.onSelectionAnimation.bind(this));this.raiseSelectionTimeRangeChangedEvent(this._selectionTimeRange,!0)},r.prototype.raiseSelectionTimeRangeChangedEvent=function(n,t){typeof t=="undefined"&&(t=!1);this._viewEventManager.selectionChanged.raiseEvent({position:n,isIntermittent:t})},r.prototype.updateAriaLabels=function(){var o=t.RulerUtilities.formatTime(this._currentTimeRange.begin,1),s=t.RulerUtilities.formatTime(this._currentTimeRange.end,1),e;if(this._selectionTimeRange){var i=t.RulerUtilities.formatTime(this._selectionTimeRange.begin),r=t.RulerUtilities.formatTime(this._selectionTimeRange.end),h=t.RulerUtilities.formatTime(this._currentTimeRange.begin),c=t.RulerUtilities.formatTime(this._currentTimeRange.end),u=t.RulerUtilities.formatTime(this._selectionTimeRange.begin,1),f=t.RulerUtilities.formatTime(this._selectionTimeRange.end,1),l=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerSliderAriaValueText",u,o,f);this._lSlider.setAttribute("aria-valuetext",l);this._lSlider.setAttribute("aria-valuenow",i);this._lSlider.setAttribute("aria-valuemin",h);this._lSlider.setAttribute("aria-valuemax",r);e=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerSliderAriaValueText",f,u,s);this._rSlider.setAttribute("aria-valuetext",e);this._rSlider.setAttribute("aria-valuenow",r);this._rSlider.setAttribute("aria-valuemin",i);this._rSlider.setAttribute("aria-valuemax",c)}},r.SliderWidth=5,r}(t.ControlDecorator);t.DoubleSlider=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function t(t){var i=this;this._colorDivs=[];this._container=document.createElement("div");this._container.id="rulerLegendContainer";this._container.className="ruler-legend-container";this._onThemeChangedBoundFunction=this.onThemeChange.bind(this);n.Plugin.Theme.addEventListener("themechanged",this._onThemeChangedBoundFunction);t.forEach(function(t){var u=document.createElement("div"),f,r;u.className="ruler-label-mark-image";u.setAttribute("data-imageToken",t.imageToken);u.style.backgroundImage="url("+n.Plugin.Theme.getValue(t.imageToken)+")";i._colorDivs.push(u);f=document.createElement("div");f.className="ruler-legend-text-div";f.innerHTML=t.text;r=document.createElement("div");r.className="ruler-legend-div";r.appendChild(u);r.appendChild(f);t.tooltip&&r.setAttribute("data-plugin-vs-tooltip",t.tooltip);i._container.appendChild(r)})}return Object.defineProperty(t.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){n.Plugin.Theme.removeEventListener("themechanged",this._onThemeChangedBoundFunction)},t.prototype.onThemeChange=function(){this._colorDivs.forEach(function(t){var i=t.getAttribute("data-imageToken");t.style.backgroundImage="url("+n.Plugin.Theme.getValue(i)+")"})},t}();t.RulerLegend=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(){}return i.getUniqueId=function(){return i.Counter++},i.getTickMarksPosition=function(n,r,u){var s,l;typeof u=="undefined"&&(u=!1);var a=n.elapsed,o=parseInt(a.value),h=n.begin,c=[],f=Math.pow(10,Math.floor(Math.log(o)/Math.LN10)),e=r/o*f;return e<100?e<25?f*=8:e<50?f*=4:e<100&&(f*=2):e>250&&(f/=e<400?2:e<800?4:e<1600?8:10),f>0&&(s=f/10,l=f/2,e=r/o*f,e<130&&(s=f/5),c=i.generateTickMarks(n,t.BigNumber.subtract(h,t.BigNumber.moduloNumber(h,f)),t.BigNumber.convertFromNumber(f),t.BigNumber.convertFromNumber(l),t.BigNumber.convertFromNumber(s),u)),c},i.getVerticalLinePositions=function(n,r){for(var f,s,e=[],o=i.getTickMarksPosition(n,r),u=0;u<o.length;++u)f=o[u],f.type===0&&(s=parseInt(t.BigNumber.subtract(f.value,n.begin).value)/parseInt(n.elapsed.value)*100,e.push(s));return e},i.formatTime=function(n,r){var f,e,h;if(typeof r=="undefined"&&(r=0),f="0",e=t.Utilities.getNumberFormat(),n.greaterOrEqual(t.BigNumber.convertFromNumber(i.OneSecond-i.NanosecondsSignificanceThreshold))){var u=i.getSplittedTime(n,i.OneMillisecond/2),o=parseInt(u.minString)?!0:!1,c=parseInt(u.secString)?!0:!1,s=parseInt(u.msString)?!0:!1;f=o?u.minString+":":"";f+=c?u.secString:o?"00":"0";s&&(f+=e.numberDecimalSeparator+this.removeTrailingZeros(u.msString))}else{var u=i.getSplittedTime(n),s=parseInt(u.msString)?!0:!1,l=parseInt(u.nsString)?!0:!1;f=s?u.msString:"0";l&&(f+=e.numberDecimalSeparator+this.removeTrailingZeros(u.nsString))}return h=i.getUnit(parseInt(n.value),r),f+h},i.formatTitleTime=function(n,r,u,f){var a;typeof r=="undefined"&&(r=1);typeof u=="undefined"&&(u=!1);typeof f=="undefined"&&(f=!1);var v=f?i.OneMillisecond:i.NanosecondsSignificanceThreshold,e=i.getSplittedTime(n,v),o="0",c=t.Utilities.getNumberFormat(),y=parseInt(e.minString)?!0:!1,l=parseInt(e.secString)?!0:!1,s=u?!1:parseInt(e.msString)?!0:!1,h=u?!1:parseInt(e.nsString)?!0:!1;return y?(a=l?e.secString:"00",o=e.minString+":"+a):l?(o=e.secString,s&&(o+=c.numberDecimalSeparator+this.removeTrailingZeros(e.msString))):(s||h)&&(o=s?e.msString:h?"0":"",h&&(o+=c.numberDecimalSeparator+this.removeTrailingZeros(e.nsString))),o},i.formatSelectionTime=function(t,r,u){typeof r=="undefined"&&(r=1);typeof u=="undefined"&&(u=!1);var f=i.formatTitleTime(t,r,!1,u),e=i.getUnit(parseInt(t.value),r);return n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerTimeSelected",f,e)},i.formatTotalTime=function(n,t,r){typeof t=="undefined"&&(t=1);typeof r=="undefined"&&(r=!1);var u=i.formatTitleTime(n,t,r),f=i.getUnit(parseInt(n.value),t,r);return u+f},i.generateTickMarks=function(n,i,r,u,f,e){var s=[],c=n.begin,l=n.end,o,h;for(e&&s.push({type:0,value:new t.BigNumber(0,0),label:"0"}),f.equals(t.BigNumber.zero)&&(f=new t.BigNumber(0,1)),o=i;l.greater(o);o=t.BigNumber.add(o,f))o.greater(c)&&(h=o,t.BigNumber.modulo(o,r).equals(t.BigNumber.zero)?s.push({type:0,value:h}):t.BigNumber.modulo(o,u).equals(t.BigNumber.zero)?s.push({type:1,value:h}):s.push({type:2,value:h}));return s},i.getUnit=function(n,t,r){typeof r=="undefined"&&(r=!1);var u=i.getUnits(t);return n<i.OneSecond-i.NanosecondsSignificanceThreshold&&!r?u.milliseconds:n<i.OneMinute-i.NanosecondsSignificanceThreshold?u.seconds:u.minutes},i.getUnits=function(t){return t===1?{milliseconds:" "+n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/MillisecondsLabel"),seconds:" "+n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/SecondsLabel"),minutes:" "+n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/MinutesLabel")}:{milliseconds:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/MillisecondsAbbreviation"),seconds:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/SecondsAbbreviation"),minutes:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/MinutesAbbreviation")}},i.getSplittedTime=function(n,r){var h,c,l,o,v;typeof r=="undefined"&&(r=i.NanosecondsSignificanceThreshold);var y=t.BigNumber.moduloNumber(n,i.OneMillisecond),u=t.BigNumber.subtract(n,y),p=parseInt(y.value),f="";p<i.OneMillisecond-r?(f=Math.round(p/1e3).toString(),f=this.padLeadingZeros(f,3)):u=t.BigNumber.addNumber(u,i.OneMillisecond);h=t.BigNumber.moduloNumber(u,i.OneSecond);u=t.BigNumber.subtract(u,h);c=parseInt(h.value)/i.OneMillisecond;l=t.BigNumber.moduloNumber(u,i.OneMinute);u=t.BigNumber.subtract(u,l);var a=parseInt(l.value)/i.OneSecond,w=u,s=parseInt(w.value)/i.OneMinute,e="";return(f||c)&&(e=c.toString(),(a||s)&&(e=this.padLeadingZeros(e,3))),o="",(f||e||a)&&(o=a.toString(),s&&(o=this.padLeadingZeros(o,2))),v="",s&&(v=s.toString()),{nsString:f,msString:e,secString:o,minString:v}},i.removeTrailingZeros=function(n){return n.replace(/0*$/,"")},i.padLeadingZeros=function(n,t){var i=n,r="00000000";if(i&&t&&t>0){while(t-i.length>=8)i=r+i;i=r.substr(0,t-i.length)+i}return i},i.OneMillisecond=1e6,i.OneSecond=1e9,i.OneMinute=6e10,i.Counter=0,i.NanosecondsSignificanceThreshold=500,i}();t.RulerUtilities=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var r=function(){function n(){this.isLive=!1;this.isPerformanceDebugger=!1;this.isSelectionEnabled=!0;this.showLegend=!0;this.markSeries=[]}return n}(),i;t.RulerConfig=r;i=function(){function i(i){var u,e,o,f,r,s,h;if(this._controls=[],this._logger=n.VisualStudio.DiagnosticsHub.getLogger(),this._totalTimespan=null,this._selectionTimespan=null,this._aggregatedMarkImageToken="vs-image-graph-aggregated-event",this._imageTokenList=["vs-image-graph-app-event","vs-image-graph-user-mark","vs-image-graph-third-event","vs-image-graph-fourth-event","vs-image-graph-fifth-event","vs-image-graph-sixth-event"],!i)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1002"));for(this._config=i,this._totalTimespan=this._config.timeRange,this._container=document.createElement("div"),this._container.classList.add("ruler-container"),u=document.createElement("div"),u.className="ruler-header",this._container.appendChild(u),e=document.createElement("div"),e.className="ruler-body",this._container.appendChild(e);this._config.markSeries.length>this._imageTokenList.length;)this._logger.error("Series removed due to excess count: "+JSON.stringify(this._config.markSeries.pop()));if(this._config.showLegend){for(o=[],r=0;r<this._imageTokenList.length&&r<this._config.markSeries.length;r++)f=this._config.markSeries[r],f.index=r,o.push({text:f.label,imageToken:this._imageTokenList[f.id-1],tooltip:f.tooltip});for(r=0;r<this._config.markSeries.length;r++)if(this._config.markSeries[r].id===3){o.push({text:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerAggregatedMarks"),imageToken:this._aggregatedMarkImageToken,tooltip:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/MergedMarkTooltip")});break}s=new t.RulerLegend(o);u.appendChild(s.container);this._controls.push(s)}this._title=document.createElement("div");this._title.className="ruler-title-text";this._title.setAttribute("aria-live","off");this._title.innerHTML=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerTitle",t.RulerUtilities.formatTotalTime(this._totalTimespan.elapsed,1));u.appendChild(this._title);this._scale=new t.RulerScale(this._totalTimespan,this._config.markSeries,this._imageTokenList,this._aggregatedMarkImageToken);h=this._config.isSelectionEnabled?new t.DoubleSlider(this._totalTimespan,this._scale):this._scale;e.appendChild(h.container);this._controls.push(h)}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this._controls.forEach(function(n){n.dispose&&n.dispose()})},i.prototype.onViewportChanged=function(i){this._selectionTimespan=i.selectionTimespan;this._title.innerHTML=this._selectionTimespan?n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerTitleWithSelection",t.RulerUtilities.formatTotalTime(this._totalTimespan.elapsed,1,this._config.isLive||i.isIntermittent),t.RulerUtilities.formatSelectionTime(i.selectionTimespan.elapsed,0,this._config.isPerformanceDebugger)):n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerTitle",t.RulerUtilities.formatTotalTime(this._totalTimespan.elapsed,1,this._config.isLive||i.isIntermittent));this._controls.forEach(function(n){if(n.onViewportChanged)n.onViewportChanged(i)})},i.prototype.onDataUpdate=function(i){this._totalTimespan=new t.JsonTimespan(this._totalTimespan.begin,i);this._markLoaders&&this._markLoaders.forEach(function(n){return n.onDataUpdate(i)});this._title.innerHTML=this._selectionTimespan?n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerTitleWithSelection",t.RulerUtilities.formatTotalTime(i,1,!0),t.RulerUtilities.formatSelectionTime(this._selectionTimespan.elapsed,0,this._config.isPerformanceDebugger)):n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerTitle",t.RulerUtilities.formatTotalTime(i,1,!0))},i.prototype.resize=function(n){this._controls.forEach(function(t){t.resize&&t.resize(n)})},i.prototype.addMark=function(n,i,r,u){typeof u=="undefined"&&(u=!0);var f=new t.MarkData(i,r);this._scale.addMark(n,f,u)},i.prototype.loadMarks=function(n){var i=this;this._markLoaders=n.map(function(n){var r=n.DataSource;return!r||!r.CounterId||!r.AnalyzerId?null:new t.MarkDataFetcher(n,i._scale)}).filter(function(n){return n!==null})},i}();t.Ruler=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function u(){return i===null&&(i=new r),i}var i=null,r=function(){function t(){this._swimlaneViewStateMarshaler=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject(t.SwimlaneViewStateServiceMarshalerName,{},!0)}return t.prototype.getSwimlaneVisibility=function(t){return n.Plugin.F12?n.Plugin.Promise.wrap(!0):this._swimlaneViewStateMarshaler._call("getSwimlaneVisibility",t)},t.prototype.setSwimlaneVisibility=function(t,i){n.Plugin.F12||this._swimlaneViewStateMarshaler._call("setSwimlaneVisibility",t,i)},t.SwimlaneViewStateServiceMarshalerName="Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.SwimLaneViewStateServiceMarshaler",t}();t.getSwimlaneViewStateService=u})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(n,i,r,u){typeof u=="undefined"&&(u=null);var f=this;this._clientWidth=0;this._clientHeight=0;this._isVisible=!0;this._controls=[];this._swimlaneVisibilityChangedEvent=new t.AggregatedEvent;this._container=document.createElement("div");this._container.classList.add("swimlaneBase");this._currentTimespan=r;this._selectionTimespan=u;this._isVisible=n.isBodyExpanded;this._titleRegion=document.createElement("div");this._contentRegion=document.createElement("div");this._leftRegion=document.createElement("div");this._mainRegion=document.createElement("div");this._rightRegion=document.createElement("div");this._titleRegion.classList.add("titleRegion");this._contentRegion.classList.add("contentRegion");this._leftRegion.classList.add("leftRegion");this._mainRegion.classList.add("mainRegion");this._rightRegion.classList.add("rightRegion");this._contentRegion.style.height=i+"px";this._contentRegion.appendChild(this._leftRegion);this._contentRegion.appendChild(this._mainRegion);this._contentRegion.appendChild(this._rightRegion);this._titleText=n.titleText;this._unit=n.unit;this._titleContainer=document.createElement("div");this._titleContainer.className="title-container";this._titleCollapseExpandButton=document.createElement("div");this._titleCollapseExpandButton.setAttribute("role","button");this._titleCollapseExpandButton.tabIndex=0;this._titleCollapseExpandButton.onclick=this.toggleVisibility.bind(this);this._titleCollapseExpandButton.onkeydown=this.onKeyDown.bind(this);this._titleContainer.appendChild(this._titleCollapseExpandButton);this._titleTextElement=document.createElement("div");this._titleTextElement.className="title-text";this._titleContainer.appendChild(this._titleTextElement);this._container.appendChild(this._titleContainer);this._container.appendChild(this._titleRegion);this._container.appendChild(this._contentRegion);this.updateTitle();this.updateContentVisibility();this._collapseCallback=function(n){n.matches?f._titleRegion.classList.add("limitedSpace"):f._titleRegion.classList.remove("limitedSpace")};this.updateCollapsingWidth()}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"swimlaneVisibilityChangedEvent",{get:function(){return this._swimlaneVisibilityChangedEvent},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this._swimlaneVisibilityChangedEvent.dispose();this._titleCollapseExpandButton.onclick=null;this._titleCollapseExpandButton.onkeydown=null;this._controls.forEach(function(n){n.dispose&&n.dispose()})},i.prototype.resize=function(n){(this._clientWidth||this._clientHeight||this.updateCollapsingWidth(),this._clientWidth!==this._container.clientWidth||this._clientHeight!==this._container.clientHeight)&&(this._clientHeight=this._container.clientHeight,this._clientWidth=this._container.clientWidth,this._isVisible)&&this._controls.forEach(function(t){t.resize&&t.resize(n)})},i.prototype.onViewportChanged=function(n){this._currentTimespan=n.currentTimespan;this._selectionTimespan=n.selectionTimespan;this._isVisible&&this._controls.forEach(function(t){if(t.onViewportChanged)t.onViewportChanged(n)})},i.prototype.onDataUpdate=function(n){this._controls.forEach(function(t){if(t.onDataUpdate)t.onDataUpdate(n)})},i.prototype.onScaleChanged=function(n){this._unit=n.unit||this._unit;this.updateTitle()},i.prototype.addTitleControl=function(n){this._titleRegion.appendChild(n.container);this._controls.push(n);this.updateCollapsingWidth()},i.prototype.addLeftRegionControl=function(n){this._leftRegion.appendChild(n.container);this._controls.push(n)},i.prototype.addRightRegionControl=function(n){this._rightRegion.appendChild(n.container);this._controls.push(n)},i.prototype.addMainRegionControl=function(n){this._mainRegion.appendChild(n.container);this._controls.push(n)},i.prototype.onKeyDown=function(n){13===n.keyCode&&this.toggleVisibility()},i.prototype.toggleVisibility=function(){if(this._isVisible=!this._isVisible,this.updateContentVisibility(),this._isVisible){this.resize(null);this.onViewportChanged({currentTimespan:this._currentTimespan,selectionTimespan:this._selectionTimespan,isIntermittent:!1})}this._swimlaneVisibilityChangedEvent.invokeEvent(this._isVisible)},i.prototype.updateTitle=function(){var n=this._titleText;this._unit&&(n+=" ("+this._unit+")");this._titleTextElement.innerHTML=n},i.prototype.updateContentVisibility=function(){this._isVisible?(this._titleCollapseExpandButton.className="title-expanded-button",this._titleCollapseExpandButton.setAttribute("aria-label",n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/SwimlaneCollapseAriaLabel",this._titleText)),this._titleCollapseExpandButton.setAttribute("aria-expanded","true"),this._contentRegion.style.display="-ms-grid"):(this._titleCollapseExpandButton.className="title-collapsed-button",this._titleCollapseExpandButton.setAttribute("aria-label",n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/SwimlaneExpandAriaLabel",this._titleText)),this._titleCollapseExpandButton.setAttribute("aria-expanded","false"),this._contentRegion.style.display="none")},i.prototype.updateCollapsingWidth=function(){this._collapseMediaQuery&&this._collapseMediaQuery.removeListener(this._collapseCallback);var n=this._titleContainer.offsetWidth+this._titleRegion.offsetWidth;this._collapseMediaQuery=window.matchMedia(t.Utilities.formatString("(max-width: {0}px)",n.toString()));this._collapseMediaQuery.addListener(this._collapseCallback)},i}();t.SwimlaneBase=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(i){function r(r,u,f,e){i.call(this,r);this._selectionTimeAnchor=null;this._animationFrameHandle=null;this._currentTimespan=u;this._currentSelection=f;this._sourceId=e;this._container=document.createElement("div");this._container.className="selectionOverlay";this._container.style.zIndex=t.Constants.SelectionOverlayZIndex.toString();this._leftUnselectedRegion=document.createElement("div");this._rightUnselectedRegion=document.createElement("div");this._leftUnselectedRegion.className="unselected";this._leftUnselectedRegion.style.top="0px";this._rightUnselectedRegion.className="unselected";this._rightUnselectedRegion.style.top="0px";this._container.appendChild(this._leftUnselectedRegion);this._container.appendChild(r.container);this._container.appendChild(this._rightUnselectedRegion);this._container.onmousedown=this.onStartSelection.bind(this);this._container.onmousemove=this.onDragSelection.bind(this);this._container.onmouseup=this.onStopSelection.bind(this);this._telemetry=new t.Telemetry.ViewportController;this._viewEventManager=n.VisualStudio.DiagnosticsHub.getViewEventManager()}return __extends(r,i),Object.defineProperty(r.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),r.prototype.dispose=function(){this._container.onmousedown=null;this._container.onmousemove=null;this._container.onmouseup=null;i.prototype.dispose.call(this)},r.prototype.resize=function(n){this._clientWidth=this._container.clientWidth;this._clientRect=this._container.getBoundingClientRect();this.updateDom();i.prototype.resize.call(this,n)},r.prototype.onViewportChanged=function(n){this._currentTimespan=n.currentTimespan;this._currentSelection=n.selectionTimespan;this.updateDom();i.prototype.onViewportChanged.call(this,n)},r.prototype.onStartSelection=function(n){n.which===1&&(this._selectionTimeAnchor=t.Utilities.getTimestampAtPixel(n.clientX-this._clientRect.left,this._clientWidth,this._currentTimespan),this._currentSelection=new t.JsonTimespan(this._selectionTimeAnchor,t.BigNumber.addNumber(this._selectionTimeAnchor,t.Utilities.translateNumPixelToDuration(t.SwimlaneViewConstants.MinSelectionInPixels,this._clientWidth,this._currentTimespan))),t.Utilities.setCapture(this._container),this._animationFrameHandle&&window.cancelAnimationFrame(this._animationFrameHandle),this._animationFrameHandle=window.requestAnimationFrame(this.onSelectionAnimation.bind(this)),n.stopPropagation())},r.prototype.onDragSelection=function(n){var i,r;n.target===this._container&&n.which===1&&this._animationFrameHandle&&(i=Math.max(n.clientX-this._clientRect.left,0),i=Math.min(i,this._clientWidth),r=t.Utilities.getTimestampAtPixel(i,this._clientWidth,this._currentTimespan),this._currentSelection=this._selectionTimeAnchor.greater(r)?new t.JsonTimespan(r,this._selectionTimeAnchor):new t.JsonTimespan(this._selectionTimeAnchor,r),n.stopPropagation())},r.prototype.onStopSelection=function(n){if(n.which===1){t.Utilities.releaseCapture(this._container);window.cancelAnimationFrame(this._animationFrameHandle);this._animationFrameHandle=null;this.raiseSelectionChanged(!1);var i=!1;this._currentSelection&&(i=t.Utilities.getTimestampAtPixel(t.SwimlaneViewConstants.MinSelectionInPixels,this._clientWidth,this._currentTimespan).greaterOrEqual(this._currentSelection.elapsed));this._telemetry.selectionChanged(0,i,this._sourceId)}},r.prototype.onSelectionAnimation=function(){this.raiseSelectionChanged(!0);this._animationFrameHandle=window.requestAnimationFrame(this.onSelectionAnimation.bind(this))},r.prototype.raiseSelectionChanged=function(n){typeof n=="undefined"&&(n=!1);this._viewEventManager.selectionChanged.raiseEvent({position:this._currentSelection,isIntermittent:n})},r.prototype.updateDom=function(){var n,r,i;this._currentSelection?(n=t.Utilities.convertToPixel(this._currentSelection.begin,this._currentTimespan,this._clientWidth),n=Math.max(n,0),r=t.Utilities.convertToPixel(this._currentSelection.end,this._currentTimespan,this._clientWidth),i=this._clientWidth-r,i=Math.max(i,0),this._leftUnselectedRegion.style.width=n+"px",this._rightUnselectedRegion.style.left=r+"px",this._rightUnselectedRegion.style.width=i+"px"):(this._leftUnselectedRegion.style.width="0px",this._rightUnselectedRegion.style.left=this._clientWidth+"px",this._rightUnselectedRegion.style.width="0px")},r}(t.ControlDecorator);t.SelectionOverlay=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function t(t,i,r){typeof r=="undefined"&&(r=1);this._swimlaneId="00000000-0000-0000-0000-000000000000";this.header={isBodyExpanded:!0,titleText:"Graph",description:"Graph"};this.graph={height:n.Constants.DefaultSwimlaneGraphHeight,registeredClass:null,loadCss:n.Common.DependencyManager.loadCss,jsonConfig:{},description:null,scale:{minimum:0,maximum:100,axes:[]},legend:[],unit:"",swimlaneId:this._swimlaneId};this.graph.registeredClass=t.JavaScriptClassName?n.RegisterNamespace.getRegisteredClass(t.JavaScriptClassName):n.RegisterNamespace.getRegisteredClass("Microsoft.VisualStudio.DiagnosticsHub.MultiSeriesGraph");this._swimlaneId=t.Id;this.graph.swimlaneId=t.Id;this.graph.jsonConfig=t.JsonObject;this.graph.jsonConfig.GraphBehaviour=r;this.graph.scale.minimum=t.JsonObject.MinValue||this.graph.scale.minimum;this.graph.scale.maximum=t.JsonObject.MaxValue||this.graph.scale.minimum;this.graph.scale.isFixed=t.JsonObject.IsScaleFixed;this.graph.scale.axes=t.JsonObject.Axes||[];this.graph.resources=t.Resources;this.graph.description=t.Description;this.graph.pathToScriptFolder=t.PathToScriptFolder;t.JsonObject.RefreshDataOnResizeAndZoom=t.JsonObject.RefreshDataOnResizeAndZoom||!1;var u=t.JsonObject.Height||this.graph.height;u=Math.max(u,n.Constants.MinimumSwimlaneGraphHeight);this.graph.height=Math.min(u,n.Constants.MaximumSwimlaneGraphHeight);this.timeRange=i;this.graph.timeRange=i;this.header.titleText=t.Title}return Object.defineProperty(t.prototype,"id",{get:function(){return this._swimlaneId},enumerable:!0,configurable:!0}),t}();n.SwimlaneConfiguration=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";function t(t,i,r,u,f,e){var o=new n.SwimlaneConfiguration(t,f,u),h,a,v,s,c,l;return o.graph.registeredClass===n.RegisterNamespace.getRegisteredClass("Microsoft.VisualStudio.DiagnosticsHub.MultiLineGraph")&&(o.graph.registeredClass=n.RegisterNamespace.getRegisteredClass("Microsoft.VisualStudio.DiagnosticsHub.MultiSeriesGraph")),h=new o.graph.registeredClass(o.graph),a=new n.LocalizedUnitConverter(o.graph.jsonConfig.Units,o.graph.resources),o.header.isBodyExpanded=i,o.header.unit=o.graph.unit,v=h,r&&(v=new n.SelectionOverlay(h,f,e,o.id)),s=new n.SwimlaneBase(o.header,o.graph.height,f,e),h.scaleChangedEvent.addEventListener(s.onScaleChanged.bind(s)),c=new n.Scale(o.graph.scale,0,a),l=new n.Scale(o.graph.scale,1,a),h.scaleChangedEvent.addEventListener(c.onScaleChanged.bind(c)),h.scaleChangedEvent.addEventListener(l.onScaleChanged.bind(l)),o.graph.scale.axes&&o.graph.scale.axes.forEach(function(t){var i=new n.Axes(t,o.graph.scale.minimum,o.graph.scale.maximum);h.scaleChangedEvent.addEventListener(i.onScaleChangedEvent.bind(i));s.addMainRegionControl(i)}),s.addTitleControl(new n.Legend(o.graph.legend)),s.addMainRegionControl(v),s.addMainRegionControl(new n.GridLineRenderer(f)),s.addLeftRegionControl(c),s.addRightRegionControl(l),s}n.defaultSwimlaneFactory=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function f(){return r}function e(t){if(!i&&!t)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1002"));return i||(i=new u(t)),i}var u=function(){function i(i){if(this._logger=n.VisualStudio.DiagnosticsHub.getLogger(),this._controls=[],this._ruler=null,this._maxHeight=600,this._previousHeight=0,this._dataWarehouse=null,this._defaultAnalyzerId="89fb2d7a-1239-4952-811b-d77e2ee6f2aa",this._countersAnalyzerId="66EDDDF1-2277-40F3-983A-6FF57A433ECB",this._isResizeRegistered=!1,!i)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1002"));i.dataManager||(i.dataManager=new t.DiagnosticsHubDataManager);this._onResizeBoundFunction=t.eventThrottler(this.onResize.bind(this),t.Constants.WindowResizeThrottle);this._onThemeChangedBoundFunction=this.resizeHost.bind(this);this._config=i;this._config.isSelectionEnabled=typeof this._config.isSelectionEnabled=="undefined"||this._config.isSelectionEnabled;this._eventAggregator=n.VisualStudio.DiagnosticsHub.getEventAggregator();var u=this._config.containerId||"mainContainer",r=document.getElementById(u);r.classList.add("base-container");this._headerContainer=document.createElement("div");this._headerContainer.id="header-float";this._headerContainer.classList.add("header-float");this._config.isToolbarFloating&&(this._headerContainer.style.position="fixed");r.appendChild(this._headerContainer);this._swimlaneContainer=document.createElement("div");this._swimlaneContainer.id="mainSwimlaneContainer";this._swimlaneContainer.classList.add("main-swimlane-container");r.appendChild(this._swimlaneContainer);this._footerContainer=document.createElement("div");this._footerContainer.id="footer";this._footerContainer.classList.add("footer-container");r.appendChild(this._footerContainer);n.Plugin.F12||(this._toolbar=new t.Toolbar,this.addControl(this._toolbar,t.SwimlaneViewConstants.ToolbarRendererPriority));this._config.dataManager.getConfigurations(this.initialize.bind(this))}return Object.defineProperty(i,"headerSwimlanePriority",{get:function(){return 128},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"viewportController",{get:function(){return r},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"ruler",{get:function(){return this._ruler},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this._controls.forEach(function(n){n.dispose&&n.dispose()});this._ruler=null;window.removeEventListener("resize",this._onResizeBoundFunction);n.Plugin.Theme.removeEventListener("themechanged",this._onThemeChangedBoundFunction)},i.prototype.addToolbarItem=function(n){this._toolbar&&this._toolbar.addToolbarItem(n)},i.prototype.addControl=function(n,t){var u,r;if(!isNaN(t)&&!(t<0)){for(n.container.setAttribute("data-stackPriority",t.toFixed()),u=t>=i.headerSwimlanePriority?this._swimlaneContainer:this._headerContainer,r=u.firstChild;r&&parseInt(r.getAttribute("data-stackPriority"))<t;)r=r.nextSibling;u.insertBefore(n.container,r);this._controls.push(n);this._isResizeRegistered&&(n.resize&&n.resize(null),this.resizeHost())}},i.prototype.removeControl=function(n){if(n.container.parentElement===this._headerContainer||n.container.parentElement===this._swimlaneContainer){n.dispose&&n.dispose();n.container.parentElement.removeChild(n.container);var t=this._controls.indexOf(n);t!==-1&&this._controls.splice(t,1);this.resizeHost()}},i.prototype.onResize=function(n){this._swimlaneContainer.style.marginTop=this._config.isToolbarFloating?this._headerContainer.clientHeight+"px":"0px";window&&(this._footerContainer.style.visibility=window.innerHeight<=this._footerContainer.clientHeight*2?"collapse":"visible");this._controls.forEach(function(t){t.resize&&t.resize(n)});this._swimlaneContainer.style.marginBottom=this._footerContainer.clientHeight+"px"},i.prototype.initialize=function(i,r){var u=this,f,e;typeof r=="undefined"&&(r=null);f=this._config.isPerformanceDebugger;this._config.isLive&&this._toolbar&&!f&&this._toolbar.addCommand(new t.StopCollectionCommand);e=n.Plugin.Promise.wrap(null);i.length>0&&(i.forEach(function(n){n.JsonObject=JSON.parse(n.JsonConfiguration)}),e=n.VisualStudio.DiagnosticsHub.DataWarehouse.loadDataWarehouse(r).then(function(i){return(u._dataWarehouse=i,!f)?i.getContextService().getGlobalContext().then(function(n){return n.getTimeDomain()},function(){return new t.JsonTimespan(t.BigNumber.zero,t.BigNumber.zero)}):n.Plugin.Promise.wrap(new t.JsonTimespan(t.BigNumber.zero,t.BigNumber.zero))}).then(function(n){return u.initializeViewportController(n)}).then(function(){return u._config.isLive?null:u.getLostEvents()}).then(function(){return u.loadScripts(i)}).then(function(){return u.adjustConfigForNewArchitecture(i)}).then(function(i){if(!n.Plugin.F12){var r=u.viewportController.commands.filter(function(n){return n.displayOnContextMenu});u._contextMenu=new t.ContextMenu(r);u._headerContainer.onmousedown=u._contextMenu.onMouseDown.bind(u._contextMenu);u._swimlaneContainer.onmousedown=u._contextMenu.onMouseDown.bind(u._contextMenu)}return u.addRuler(i),u.addSwimlanes(i)}));e.then(function(){window.addEventListener("resize",u._onResizeBoundFunction);u._isResizeRegistered=!0;u._controls.forEach(function(n){n.resize&&n.resize(null)});u.resizeHost();n.Plugin.Theme.addEventListener("themechanged",u._onThemeChangedBoundFunction)}).then(function(){u._config.dataManager.dataUpdate(u.onDataUpdate.bind(u))}).done(function(){return u._eventAggregator.raiseEvent("Microsoft.DiagnosticsHub.RendererReadyEvent",null)},this.logExecuteError.bind(this))},i.prototype.logExecuteError=function(t){return this._logger.error("executeCallback failed: "+JSON.stringify(t)),n.Plugin.Promise.wrapError(t)},i.prototype.onDataUpdate=function(i){n.Plugin.VS.Internal.CodeMarkers.fire(25235);var r=new t.BigNumber(i.h,i.l);this._controls.forEach(function(n){if(n.onDataUpdate)n.onDataUpdate(r)});n.Plugin.VS.Internal.CodeMarkers.fire(25236)},i.prototype.initializeViewportController=function(n){this._logger.info("Got timespan, elapsed="+n.elapsed.value);r=this._config.isLive?new t.RollingViewportController(this._config.timeInNsPerPixel):new t.ViewportController(n);this._footerContainer.appendChild(this.viewportController.container);this._controls.push(this.viewportController);this._toolbar&&this._toolbar.addCommandGroup(this.viewportController.commands)},i.prototype.getLostEvents=function(){var i=this;return this._dataWarehouse.getFilteredData({customDomain:{task:"get-total-lost-events"}},this._defaultAnalyzerId).then(function(r){var u,f;r&&typeof r.lostEvents=="number"&&r.lostEvents>0&&(u=new t.InformationBarControl(n.Plugin.Resources.getString("/DiagnosticsHubResources/InformationDroppedEvents",r.lostEvents),"http://go.microsoft.com/fwlink/p/?LinkId=391662"),u.onClose=function(){return i.removeControl(u)},i.addControl(u,t.SwimlaneViewConstants.InfobarRendererPriority),f=new t.Telemetry.CollectedData,f.lostEvents(r.lostEvents))},function(n){i._logger.error("Could not get lost events, error: "+JSON.stringify(n))})},i.prototype.loadScripts=function(i){var r=[];return i.forEach(function(n){if(n.PathToScript){var i=n.PathToScript.lastIndexOf("\\");i!==-1&&(n.PathToScriptFolder=n.PathToScript.substring(0,i));r.push(t.Common.DependencyManager.loadDependency({objType:n.JavaScriptClassName,functionName:n.JavaScriptFactoryFunction,url:n.PathToScript}))}}),n.Plugin.Promise.join(r)},i.prototype.resizeHost=function(){var t=0,n,i;this._controls.forEach(function(n){t+=n.container.offsetHeight});n=Math.ceil(t);i=n-this._previousHeight;this._previousHeight=n;this._eventAggregator.raiseEvent("Microsoft.DiagnosticsHub.SwimlaneResizeHeight",{Delta:i,MinValue:this._toolbar?this._toolbar.container.offsetHeight:0,MaxValue:Math.min(this._maxHeight,n),Value:Math.min(this._maxHeight,n)})},i.prototype.adjustConfigForNewArchitecture=function(t){var i=this,r=function(t){if(i._config.isLive)return t.DataSource.AnalyzerId=i._countersAnalyzerId,n.Plugin.Promise.as(t);var r={customDomain:{Task:"HasCounter",CounterId:t.DataSource.CounterId}};return i._dataWarehouse.getFilteredData(r,i._countersAnalyzerId).then(function(n){return n.isPresent&&(t.DataSource.AnalyzerId=i._countersAnalyzerId),t})};return n.Plugin.Promise.thenEach(t,function(t){return t.Type===3||t.JavaScriptClassName&&t.JavaScriptClassName!=="Microsoft.VisualStudio.DiagnosticsHub.MultiLineGraph"?n.Plugin.Promise.wrap(t):n.Plugin.Promise.thenEach(t.JsonObject.Series,r).then(function(n){return t.JsonObject.Series=n,t})})},i.prototype.addSwimlanes=function(r){var u=this,o=0,f=t.getSwimlaneViewStateService(),s=this._config.isLive?1:2,e=[];return r.forEach(function(r){if(!r.JsonObject.View||r.JsonObject.View===t.ViewType.Graph){var h=++o,c=f.getSwimlaneVisibility(r.Id).then(function(e){var c=r.Type===3?t.RegisterNamespace.getRegisteredFunction(r.JavaScriptFactoryFunction):n.VisualStudio.DiagnosticsHub.defaultSwimlaneFactory,o=c(r,e,u._config.isSelectionEnabled,s,u.viewportController.visible,u.viewportController.selection);o.swimlaneVisibilityChangedEvent.addEventListener(function(n){f.setSwimlaneVisibility(r.Id,n);u.resizeHost()});u.viewportController.viewportStateChanged.addEventListener(o.onViewportChanged.bind(o));u.addControl(o,i.headerSwimlanePriority+h);o.onViewportChanged({currentTimespan:u.viewportController.visible,selectionTimespan:u.viewportController.selection,isIntermittent:!1})});e.push(c)}}),n.Plugin.Promise.join(e)},i.prototype.addRuler=function(i){var r=new t.RulerConfig;r.showLegend=!this._config.isPerformanceDebugger;r.isLive=this._config.isLive;r.isSelectionEnabled=this._config.isSelectionEnabled;r.timeRange=this.viewportController.visible;r.isPerformanceDebugger=this._config.isPerformanceDebugger;var f=[],e=3,o={},u={};i.forEach(function(i){i.JsonObject.View&&i.JsonObject.View===t.ViewType.Ruler&&i.JsonObject.Series.forEach(function(t){var a=t.DataSource.CounterId||typeof t.DataSource.CounterId,v=t.DataSource.AnalyzerId||typeof t.DataSource.AnalyzerId,s,c,l,h;o[a.toLowerCase()+","+v.toLowerCase()]||(o[a.toLowerCase()+","+v.toLowerCase()]=!0,s=0,s=typeof t.MarkType=="number"&&(t.MarkType===1||t.MarkType===2)?t.MarkType:e,s===1?(c=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerLifecycleMarkLabel"),u[c]?s=u[h]:(u[c]=s,r.markSeries.push({id:s,label:c,tooltip:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/LifecycleMarkTooltip")}))):s===2?(c=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerUserMarkLabel"),u[c]?s=u[h]:(u[c]=s,r.markSeries.push({id:s,label:c,tooltip:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/UserMarkTooltip")}))):(l=t.LegendTooltip,i.Resources&&i.Resources[l]&&(l=i.Resources[l]),h=t.Legend,i.Resources&&i.Resources[h]&&(h=i.Resources[h]),u[h]?s=u[h]:(u[h]=s,r.markSeries.push({id:s,label:h,tooltip:l||""}),e++)),t.MarkTypeId=s,f.push(t))})});this._ruler=new t.Ruler(r);this.addControl(this._ruler,t.SwimlaneViewConstants.RulerRendererPriority);this.viewportController.viewportStateChanged.addEventListener(this._ruler.onViewportChanged.bind(this._ruler));this._ruler.loadMarks(f)},i}(),r,i;t.Renderer=u;r=null;t.getViewportController=f;i=null;t.getRenderer=e})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(){var i=this;this._isDisabled=!1;this.id="stopCollection";this.label=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarStopCollectionButton");this.ariaLabel=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarStopCollectionAriaLabel");this.tooltip=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolbarStopCollectionTooltip");this.type=1;this.iconEnabled="vs-image-toolbar-stopcollection";this.iconDisabled="vs-image-toolbar-stopcollection-disabled";this.displayOnToolbar=!0;this.displayOnContextMenu=!1;this.checkStopCollection();t.getCurrentSession().addStateChangedEventListener(function(){return i.checkStopCollection()})}return i.prototype.callback=function(){t.getCurrentSession().stopCollection()},i.prototype.hidden=function(){return!1},i.prototype.disabled=function(){return this._isDisabled},i.prototype.checkStopCollection=function(){var n=this;t.getCurrentSession().canStopCollection().then(function(t){n._isDisabled=!t;n.onDisabledChanged&&n.onDisabledChanged()})},i}();t.StopCollectionCommand=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function t(){}return t.OneHourInNs=n.BigNumber.convertFromNumber(36e11),t.MinSelectionInPixels=10,t.InfobarRendererPriority=0,t.ToolbarRendererPriority=5,t.RulerRendererPriority=10,t}();n.SwimlaneViewConstants=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(r,u,f,e,o,s){var h=this;this._cachedPoints=[];this._drawFill=!1;this._dataWarehouseRequestHandle=1;this._droppedRequest=!1;this._currentTimespan=new t.JsonTimespan(t.BigNumber.zero,t.BigNumber.zero);this._seriesMin=0;this._seriesMax=0;this._newDataEvent=new t.AggregatedEvent;this._samples=250;this._currentTimespan=u;this._title=o;this._tooltip=s;this._unitConverter=f;this._colorScheme=e;this._drawFill=typeof e.lineFillColor=="string"&&e.lineFillColor!=="";this._marker=document.createElement("div");this._marker.classList.add("countersDataSeries-marker");this._marker.style.backgroundColor=this._colorScheme.lineColor;this._marker.style.width=2*i.PointRadiusInPixels+"px";this._marker.style.height=2*i.PointRadiusInPixels+"px";n.VisualStudio.DiagnosticsHub.DataWarehouse.loadDataWarehouse().then(function(n){var t={customDomain:{Task:"GetCounter",CounterId:r}};return n.getFilteredData(t,i.analyzerId)}).then(function(n){h._countersResult=n}).done(function(){h._dataWarehouseRequestHandle=null;h._droppedRequest=!1;h.requestUpdate()})}return Object.defineProperty(i,"analyzerId",{get:function(){return"66EDDDF1-2277-40F3-983A-6FF57A433ECB"},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"minValue",{get:function(){return this._seriesMin},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxValue",{get:function(){return this._seriesMax},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"marker",{get:function(){return this._marker},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"title",{get:function(){return this._title},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"tooltip",{get:function(){return this._tooltip},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"newDataEvent",{get:function(){return this._newDataEvent},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this._countersResult.dispose();this._newDataEvent.dispose()},i.prototype.onViewportChanged=function(n){this._currentTimespan=n;this.requestUpdate()},i.prototype.onDataUpdate=function(n){var t=this._cachedPoints.length;this._currentTimespan.contains(n)||t===0?this.requestUpdate():t>0&&this._currentTimespan.end.greater(this._cachedPoints[t-1].Timestamp)&&this.requestUpdate()},i.prototype.getPointAtTimestamp=function(i,r){var u,e,f;if(typeof r=="undefined"&&(r=1),this._cachedPoints.length===0)return null;u={Timestamp:i,Value:0};e=function(n,t){return t.Timestamp.greater(n.Timestamp)};switch(r){case 0:f=t.Utilities.findLessThan(this._cachedPoints,u,e);u=this._cachedPoints[f];break;case 2:f=t.Utilities.findGreaterThan(this._cachedPoints,u,e);u=this._cachedPoints[f];break;case 1:default:var o=t.Utilities.findLessThan(this._cachedPoints,u,e),s=Math.min(o+1,this._cachedPoints.length-1),h=t.BigNumber.subtract(i,this._cachedPoints[o].Timestamp),c=t.BigNumber.subtract(this._cachedPoints[s].Timestamp,i),f=h.greater(c)?s:o;u=this._cachedPoints[f]}return{timestamp:u.Timestamp,tooltip:n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ChartSeriesFormattableTooltipLabel",this._unitConverter.formatNumber(u.Value)),value:u.Value,color:this._colorScheme}},i.prototype.draw=function(r,u){var f,e,o,s;this._cachedPoints.length===0||u.gridX.elapsed.equals(t.BigNumber.zero)||u.chartRect.width<=0||(u.chartRect.width!==this._samples&&(this._samples=u.chartRect.width,this.requestUpdate()),f=function(n){return u.chartRect.height-t.Utilities.scaleToRange(n,u.gridY.min,u.gridY.max,0,u.chartRect.height)},e=function(n){return t.Utilities.convertToPixel(n,u.gridX,u.chartRect.width,!1)},r.save(),r.lineWidth=u.chartRect.height<100?1:2,r.fillStyle=this._colorScheme.lineFillColor,r.strokeStyle=this._colorScheme.lineColor,o=n.Plugin.F12?0:e(this._cachedPoints[0].Timestamp),r.beginPath(),r.moveTo(o,f(this._cachedPoints[0].Value)),this._cachedPoints.forEach(function(n){return r.lineTo(e(n.Timestamp),f(n.Value))}),r.stroke(),this._drawFill&&(r.lineTo(e(this._cachedPoints[this._cachedPoints.length-1].Timestamp),f(u.gridY.min)),r.lineTo(o,u.chartRect.height),r.closePath(),r.fill()),s=t.BigNumber.divideNumber(u.gridX.elapsed,u.chartRect.width),t.BigNumber.convertFromNumber(i.CounterFrequencyPerPixel).greater(s)&&this._cachedPoints.forEach(function(n){r.beginPath();r.arc(e(n.Timestamp),f(n.Value),i.PointRadiusInPixels,0,2*Math.PI);r.fill()}),r.restore())},i.prototype.requestUpdate=function(){var n=this;if(this._dataWarehouseRequestHandle){this._droppedRequest=!0;return}this._dataWarehouseRequestHandle=window.setTimeout(function(){if(n._currentTimespan.elapsed.equals(t.BigNumber.zero)){n._dataWarehouseRequestHandle=null;return}var r=t.BigNumber.divideNumber(n._currentTimespan.elapsed,2),u=t.BigNumber.subtract(n._currentTimespan.begin,t.BigNumber.min(r,n._currentTimespan.begin)),i=t.BigNumber.multiply(t.BigNumber.divide(u,n._currentTimespan.elapsed),n._currentTimespan.elapsed),f=t.BigNumber.add(i,t.BigNumber.multiplyNumber(n._currentTimespan.elapsed,3)),e={type:"SamplePoints",begin:i.jsonValue,end:f.jsonValue,samples:Math.max(n._samples,2)};n._countersResult.getResult(e).then(function(t){return n.cachePoints(t)}).done(function(){n._dataWarehouseRequestHandle=null;n._droppedRequest&&(window.setTimeout(n.requestUpdate.bind(n),t.Constants.TimeoutImmediate),n._droppedRequest=!1)})},t.Constants.TimeoutImmediate)},i.prototype.cachePoints=function(n){var i=this;this._cachedPoints=n.p.map(function(n){var r=new t.BigNumber(n.t.h,n.t.l);return i._seriesMin=Math.min(i._seriesMin,n.v),i._seriesMax=Math.max(i._seriesMax,n.v),{Timestamp:r,Value:n.v,ToolTip:n.tt}});this._newDataEvent.invokeEvent(this)},i.PointRadiusInPixels=2.5,i.CounterFrequencyPerPixel=1e8/(i.PointRadiusInPixels*2+4),i}();t.CountersDataSeries=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(i,r,u,f,e,o,s){var h=this;this._context={};this._dataWarehouseRequestHandle=1;this._droppedRequest=!1;this._minValue=Number.MAX_VALUE;this._maxValue=Number.MIN_VALUE;this._sampledPoints=[];this._data=[];this._width=250;this._newDataEvent=new t.AggregatedEvent;this._analyzerId=i.AnalyzerId;this._viewport=r;this._title=f;this._formattableTooltipText=e||n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ChartSeriesFormattableTooltipLabel");this._unitConverter=s;this._color=o;this._drawFill=typeof o.lineFillColor=="string"&&o.lineFillColor!=="";this._marker=document.createElement("div");this._marker.classList.add("countersDataSeries-marker");this._marker.style.backgroundColor=o.lineColor;this._marker.style.width="5px";this._marker.style.height="5px";this._bufferAllData=u;this._context.timeDomain=this._viewport;this._context.customDomain=i.CustomDomain||{};this._context.customDomain.Task="GetCounter";this._context.customDomain.CounterId=i.CounterId;this._context.customDomain.Width=this._width.toString();n.VisualStudio.DiagnosticsHub.DataWarehouse.loadDataWarehouse().done(function(n){h._dataWarehouseHandle=n;h._dataWarehouseRequestHandle=null;h._droppedRequest=!1;h.requestUpdate()})}return Object.defineProperty(i.prototype,"minValue",{get:function(){return this._minValue},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxValue",{get:function(){return this._maxValue},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"marker",{get:function(){return this._marker},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"title",{get:function(){return this._title},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"newDataEvent",{get:function(){return this._newDataEvent},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this._newDataEvent.dispose()},i.prototype.onDataUpdate=function(){t.Debug.Assert.isFalse(this._bufferAllData,"Perf: Should not buffer all data in live scenarios");this.requestUpdate()},i.prototype.onViewportChanged=function(n){this._viewport=n;this._bufferAllData?this.updatePointSampling(this._viewport):this.requestUpdate()},i.prototype.draw=function(i,r){var u,f,e,o;this._sampledPoints.length!==0&&(r.chartRect.width!==this._width&&(this._width=r.chartRect.width||1,this._bufferAllData?this.updatePointSampling(this._viewport):this.requestUpdate()),u=function(n){return t.Utilities.convertToPixel(n.Timestamp,r.gridX,r.chartRect.width,!1)},f=function(n){return r.chartRect.height-t.Utilities.scaleToRange(n.Value,r.gridY.min,r.gridY.max,0,r.chartRect.height)},i.save(),i.lineWidth=r.chartRect.height<100?1:2,i.fillStyle=this._color.lineFillColor,i.strokeStyle=this._color.lineColor,e=n.Plugin.F12?0:u(this._sampledPoints[0]),i.beginPath(),i.moveTo(e,f(this._sampledPoints[0])),this._sampledPoints.forEach(function(n){return i.lineTo(u(n),f(n))}),i.stroke(),this._drawFill&&(o=r.chartRect.height-t.Utilities.scaleToRange(0,r.gridY.min,r.gridY.max,0,r.chartRect.height),i.lineTo(u(this._sampledPoints[this._sampledPoints.length-1]),o),i.lineTo(e,o),i.closePath(),i.fill()),i.restore())},i.prototype.getPointAtTimestamp=function(n,i){var r,f,e,o,u,s;if(typeof i=="undefined"&&(i=1),this._sampledPoints.length===0)return null;r={Timestamp:n,Value:0};f=function(n,t){return t.Timestamp.greater(n.Timestamp)};switch(i){case 0:e=t.Utilities.findLessThan(this._sampledPoints,r,f);r=this._sampledPoints[e];break;case 2:e=t.Utilities.findGreaterThan(this._sampledPoints,r,f);r=this._sampledPoints[e];break;case 1:o=t.Utilities.findLessThan(this._sampledPoints,r,f);u=this._sampledPoints[o];o===this._sampledPoints.length-1||this._sampledPoints[0].Timestamp.greater(n)?(r.Value=u.Value,r.Timestamp=u.Timestamp):(s=this._sampledPoints[Math.min(o+1,this._sampledPoints.length-1)],r.Value=t.Utilities.linearInterpolate(n,u.Timestamp,u.Value,s.Timestamp,s.Value))}return{timestamp:r.Timestamp,tooltip:t.Utilities.formatString(this._formattableTooltipText,this._unitConverter.formatNumber(r.Value)),color:this._color,value:r.Value}},i.prototype.updatePointSampling=function(n){var r=this,l,h;if(this._data.length!==0){l=2;this._sampledPoints=[];var s=new t.JsonTimespan(this._data[0].Timestamp,this._data[this._data.length-1].Timestamp),u=t.BigNumber.divideNumber(n.elapsed,this._width),f=function(n,t){return t.Timestamp.greater(n.Timestamp)},i={Timestamp:t.BigNumber.zero,Value:0},a=Math.floor(parseInt(t.BigNumber.subtract(n.begin,s.begin).value)/parseInt(u.value)),e=t.BigNumber.add(t.BigNumber.multiplyNumber(u,a),s.begin),v=t.BigNumber.add(t.BigNumber.add(e,n.elapsed),u);i.Timestamp=e;h=t.Utilities.findLessThan(this._data,i,f);i.Timestamp=v;var y=t.Utilities.findGreaterThan(this._data,i,f),c=function(n,t){for(var f=r._data[n],i=0,u=n;u<=t;++u)i=Math.max(i,r._data[u].Value);return{Timestamp:f.Timestamp,ToolTip:f.ToolTip,Value:i}},o=function(n,e,s,h){var l,v;if(h>=s-e)for(l=e;l<=s;++l)r._sampledPoints.push(c(l,l));else if(h===1)r._sampledPoints.push(c(e,s));else{var a=Math.floor(h/2),p=h-a,y=t.BigNumber.add(n,t.BigNumber.multiplyNumber(u,a));i.Timestamp=y;v=t.Utilities.findLessThan(r._data,i,f,e,s);o(n,e,v,a);o(y,v,s,p)}};o(e,h,y,this._width)}},i.prototype.requestUpdate=function(){var n=this;if(this._dataWarehouseRequestHandle){this._droppedRequest=!0;return}this._dataWarehouseRequestHandle=window.setTimeout(function(){n._context.timeDomain=n._viewport;n._context.customDomain.Width=n._width.toString();n._dataWarehouseHandle.getFilteredData(n._context,n._analyzerId).then(function(n){return typeof n.getResult=="function"?n.getResult(null).then(function(t){return n.dispose(),t}):n}).then(function(n){return n.p}).then(function(t){return n.convertDtoToIPointArray(t)}).then(function(t){return n.cachePoints(t)}).done(function(){n._newDataEvent.invokeEvent(n);n._dataWarehouseRequestHandle=null;n._droppedRequest&&(window.setTimeout(n.requestUpdate.bind(n),t.Constants.TimeoutImmediate),n._droppedRequest=!1)})},t.Constants.TimeoutImmediate)},i.prototype.convertDtoToIPointArray=function(n){return n.map(function(n){return{Timestamp:new t.BigNumber(n.t.h,n.t.l),Value:n.v,ToolTip:n.tt,CustomData:n.d}})},i.prototype.cachePoints=function(n){var t=this,i;(this._data=[],this._maxValue=Number.MIN_VALUE,this._minValue=Number.MAX_VALUE,n&&n.length!==0)&&(i=n[0],this._data=n.filter(function(n){return!n.Timestamp||!n.Timestamp.greaterOrEqual(i.Timestamp)?!1:(t._maxValue=Math.max(t._maxValue,n.Value),t._minValue=Math.min(t._minValue,n.Value),i=n,!0)}),this._bufferAllData?this.updatePointSampling(this._viewport):this._sampledPoints=this._data)},i}();t.CustomCounterDataSeries=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(i,r){var u=this;this._logger=n.VisualStudio.DiagnosticsHub.getLogger();this._defaultColorScheme=new t.ChartColorScheme("rgb(118, 174, 200)","rgba(118, 174, 200, 0.65)");this._currentTimespan=new t.JsonTimespan(t.BigNumber.zero,t.BigNumber.zero);this._dataSeries=[];this._clientWidth=0;this._clientHeight=0;this._scaleIncreaseRatio=1.1;this._scaleChangedEvent=new t.AggregatedEvent;this._container=document.createElement("div");this._container.classList.add("graphContainer");this._container.tabIndex=0;this._canvas=document.createElement("canvas");this._canvas.classList.add("graph-canvas");this._context=this._canvas.getContext("2d");this._unitConverter=new t.LocalizedUnitConverter(i.jsonConfig.Units,i.resources);this._currentTimespan=i.timeRange;this._scaleMin=i.scale.minimum;this._scaleMax=i.scale.maximum;this._isScaleFixed=i.scale.isFixed;this._onNewSeriesDataBoundFunction=this.onNewSeriesData.bind(this);i.jsonConfig.Unit&&(i.unit=i.resources[i.jsonConfig.Unit]);this._container.appendChild(this._canvas);i.jsonConfig.Series.forEach(function(n){var r,f=n.Color?new t.ChartColorScheme(n.Color.Line,n.Color.Fill):u._defaultColorScheme,e;n.DataSource.AnalyzerId.toLowerCase()===t.CountersDataSeries.analyzerId.toLowerCase()?r=new t.CountersDataSeries(n.DataSource.CounterId,u._currentTimespan,u._unitConverter,f,i.resources[n.Legend],i.resources[n.LegendTooltip]):(e=!i.jsonConfig.RefreshDataOnResizeAndZoom,r=new t.CustomCounterDataSeries(n.DataSource,u._currentTimespan,e,i.resources[n.Legend],i.resources[n.LegendTooltip],f,u._unitConverter));i.legend.push({legendText:r.title,legendTooltip:r.tooltip,marker:r.marker});r.newDataEvent.addEventListener(u._onNewSeriesDataBoundFunction);u._dataSeries.push(r)});r&&r.forEach(function(n){n.newDataEvent.addEventListener(u._onNewSeriesDataBoundFunction);u._dataSeries.push(n)});this._dataCursor=new t.DataCursor(this._container,this._dataSeries,this._currentTimespan,i.swimlaneId,this._scaleMin,this._scaleMax);this._scaleChangedEvent.addEventListener(this._dataCursor.onScaleChanged.bind(this._dataCursor));this._container.appendChild(this._dataCursor.container)}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"scaleChangedEvent",{get:function(){return this._scaleChangedEvent},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){var n=this;this._dataCursor.dispose();this._dataSeries.forEach(function(t){t.newDataEvent.removeEventListener(n._onNewSeriesDataBoundFunction);t.dispose&&t.dispose()});this._scaleChangedEvent.dispose()},i.prototype.resize=function(n){var t=this._container.clientWidth||1,i=this._container.clientHeight;(this._clientWidth!==t||this._clientHeight!==i)&&(this._clientWidth=t,this._clientHeight=i,this._canvas.width=this._clientWidth,this._canvas.height=this._clientHeight,this._dataCursor.resize(n),this.draw())},i.prototype.onDataUpdate=function(n){this._dataSeries.forEach(function(t){if(t.onDataUpdate)t.onDataUpdate(n)})},i.prototype.addSeriesData=function(){},i.prototype.removeInvalidPoints=function(){},i.prototype.render=function(){},i.prototype.onViewportChanged=function(n){var t=this;if(!n.isIntermittent&&!this._currentTimespan.equals(n.currentTimespan)){this._currentTimespan=n.currentTimespan;this._dataCursor.onViewportChanged(n);this._dataSeries.forEach(function(n){n.onViewportChanged(t._currentTimespan)});this.draw()}},i.prototype.onNewSeriesData=function(n){var t=!1,i;!this._isScaleFixed&&!isNaN(n.minValue)&&n.minValue<this._scaleMin&&(this._scaleMin=n.minValue,t=!0);!this._isScaleFixed&&!isNaN(n.maxValue)&&n.maxValue*this._scaleIncreaseRatio>this._scaleMax&&(this._scaleMax=n.maxValue*this._scaleIncreaseRatio,t=!0);this.draw();t&&(i=this._unitConverter.scaleValue(this._scaleMax),this._scaleChangedEvent.invokeEvent({minimum:this._scaleMin,maximum:this._scaleMax,unit:i.unit}))},i.prototype.draw=function(){var i=this,n;this._context.clearRect(0,0,this._clientWidth,this._clientHeight);this._context.save();n={gridX:this._currentTimespan,gridY:new t.MinMaxNumber(this._scaleMin,this._scaleMax),chartRect:new t.RectangleDimension(0,0,this._clientWidth,this._clientHeight)};this._dataSeries.forEach(function(t){t.draw(i._context,n)});this._context.restore()},i}();t.MultiSeriesGraph=i;n.VisualStudio.DiagnosticsHub.RegisterNamespace.registerClass("Microsoft.VisualStudio.DiagnosticsHub.MultiSeriesGraph")})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(n,i,r,u,f,e){var o=this;this._parentClientWidth=0;this._parentClientHeight=0;this._timePerPixel=t.BigNumber.one;this._cursors=[];this._showingTooltip=!1;this._tooltipTimer=null;this._telemetry=new t.Telemetry.ViewportController;this._parent=n;this._series=i;this._viewport=r;this._previousTime=this._viewport.begin;this._scaleMin=f;this._scaleMax=e;this._container=document.createElement("div");this._container.classList.add("dataCursor");this._container.classList.add("hidden");this._cursors=i.map(function(n){var t=n.marker.cloneNode(!0),i,r;return t.classList.add("dataCursorPoint"),document.body.appendChild(t),i=t.clientWidth+2,r=t.clientHeight+2,document.body.removeChild(t),t.style.left=-i/2+"px",t.style.width=i+"px",t.style.height=r+"px",o._container.appendChild(t),{domElement:t,width:i,height:r}});this._swimlaneId=u;this._onMouseEnterBoundFunction=this.onMouseEnter.bind(this);this._onMouseMoveBoundFunction=this.onMouseMove.bind(this);this._onMouseLeaveBoundFunction=this.onMouseLeave.bind(this);this._onKeyDownBoundFunction=this.onKeyDown.bind(this);this._parent.setAttribute("role","slider");this._parent.setAttribute("aria-live","polite");this._parent.addEventListener("mouseenter",this._onMouseEnterBoundFunction);this._parent.addEventListener("mousemove",this._onMouseMoveBoundFunction);this._parent.addEventListener("mouseleave",this._onMouseLeaveBoundFunction);this._parent.addEventListener("keydown",this._onKeyDownBoundFunction)}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this._parent.removeEventListener("mouseenter",this._onMouseEnterBoundFunction);this._parent.removeEventListener("mousemove",this._onMouseMoveBoundFunction);this._parent.removeEventListener("mouseleave",this._onMouseLeaveBoundFunction);this._parent.removeEventListener("keydown",this._onKeyDownBoundFunction)},i.prototype.resize=function(){this._parentClientWidth=this._parent.clientWidth;this._parentClientHeight=this._parent.clientHeight;this._timePerPixel=this._parentClientWidth!==0?t.BigNumber.divideNumber(this._viewport.elapsed,this._parentClientWidth):t.BigNumber.one},i.prototype.onViewportChanged=function(n){this._viewport.equals(n.currentTimespan)||(this._viewport=n.currentTimespan,this._previousTime=this._viewport.begin,this._timePerPixel=this._parentClientWidth!==0?t.BigNumber.divideNumber(this._viewport.elapsed,this._parentClientWidth):t.BigNumber.one,this.dismissTooltip(),this._container.classList.add("hidden"))},i.prototype.onScaleChanged=function(n){this._scaleMax=n.maximum;this._scaleMax=n.maximum},i.prototype.onKeyDown=function(n){var f,e,u,r,i;(n.keyCode===37||n.keyCode===39)&&(n.preventDefault(),f=n.currentTarget.getBoundingClientRect(),e=this._previousTime,n.keyCode===39?(this._previousTime=t.BigNumber.add(this._previousTime,this._timePerPixel),u=2):(this._previousTime=this._previousTime.greater(this._timePerPixel)?t.BigNumber.subtract(this._previousTime,this._timePerPixel):t.BigNumber.zero,u=0),r=this.getPointsAt(this._previousTime,u),r.length!==0)&&(i=r[0].seriesElement.timestamp,(i.equals(e)||i.greater(this._viewport.end)||this._viewport.begin.greater(i))&&(this._previousTime=n.keyCode===39?this._viewport.begin:this._viewport.end,r=this.getPointsAt(this._previousTime,u),i=r[0].seriesElement.timestamp),this._previousTime=i,this.updateCursorLocation(i,r),this.dismissTooltip(),this.displayTooltip(f,i,r))},i.prototype.onMouseEnter=function(){this._container.classList.remove("hidden")},i.prototype.onMouseMove=function(n){var f=n.currentTarget.getBoundingClientRect(),r=t.Utilities.getTimestampAtPixel(n.clientX-f.left,this._parentClientWidth,this._viewport),u;if(!r.equals(this._previousTime)){if(this._previousTime=r,f=n.currentTarget.getBoundingClientRect(),u=this.getPointsAt(r),u.length===0){this._container.classList.add("hidden");return}var e=u[0].seriesElement.timestamp,s=t.BigNumber.subtract(t.BigNumber.max(e,r),t.BigNumber.min(e,r)),h=t.BigNumber.multiplyNumber(this._timePerPixel,i.SnapThresholdInPixels),o=s.greater(h);o?(this._container.classList.add("interpolating"),this.updateCursorLocation(r,u)):(this._container.classList.remove("interpolating"),this.updateCursorLocation(e,u));this.dismissTooltip();this.displayTooltip(f,r,u,o)}},i.prototype.onMouseLeave=function(n){var i=t.Utilities.getTimestampAtPixel(n.x,this._parentClientWidth,this._viewport);this._showingTooltip&&i.equals(this._previousTime)||(this.dismissTooltip(),this._container.classList.add("hidden"),this._previousTime=this._viewport.begin)},i.prototype.getPointsAt=function(n,i){var r=this;return typeof i=="undefined"&&(i=1),this._series.map(function(t,u){return{seriesElement:t.getPointAtTimestamp(n,i),cursor:r._cursors[u]}}).filter(function(n){return n.seriesElement!==null}).sort(function(i,r){var u=t.BigNumber.subtract(t.BigNumber.max(n,i.seriesElement.timestamp),t.BigNumber.min(n,i.seriesElement.timestamp)),f=t.BigNumber.subtract(t.BigNumber.max(n,r.seriesElement.timestamp),t.BigNumber.min(n,r.seriesElement.timestamp));return u.compareTo(f)}).filter(function(n,i,u){var f=t.BigNumber.subtract(t.BigNumber.max(u[0].seriesElement.timestamp,n.seriesElement.timestamp),t.BigNumber.min(u[0].seriesElement.timestamp,n.seriesElement.timestamp));return r._timePerPixel.greater(f)})},i.prototype.updateCursorLocation=function(n,i){var r=this,u=t.Utilities.convertToPixel(n,this._viewport,this._parentClientWidth);this._container.style.left=Math.floor(u)+"px";this._cursors.forEach(function(n){return n.domElement.style.visibility="hidden"});i.forEach(function(n){if(typeof n.seriesElement.value=="number"){var i=t.Utilities.scaleToRange(n.seriesElement.value,r._scaleMin,r._scaleMax,0,r._parentClientHeight);n.cursor.domElement.style.bottom=i-n.cursor.height/2+"px";n.cursor.domElement.style.visibility="visible"}else n.cursor.domElement.style.visibility="visible"});this._container.classList.remove("hidden")},i.prototype.displayTooltip=function(i,r,u,f){var h=this,c,e,o,s;typeof f=="undefined"&&(f=!1);this._tooltipTimer=null;this._showingTooltip=!0;c=t.Utilities.convertToPixel(r,this._viewport,this._parentClientWidth);e=u.map(function(n){return n.seriesElement.tooltip});f&&e.unshift(n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/DataCursorInterpolatingTooltip"));e.length>0&&(o=e.join("\n"),s=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ChartSeriesFormattableTimeLabel",t.RulerUtilities.formatTime(r,1))+"\n"+o,this._parent.setAttribute("aria-valuenow",s),this._parent.setAttribute("aria-valuetext",s),this._tooltipTimer=setTimeout(function(){var u=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ChartSeriesFormattableTimeLabel",t.RulerUtilities.formatTime(r))+"\n"+o,f={content:u,delay:0,x:c+i.left+10,y:i.top};n.Plugin.Tooltip.show(f);h._telemetry.showGraphTooltip(h._swimlaneId)},t.Constants.TooltipTimeoutMs))},i.prototype.dismissTooltip=function(){clearTimeout(this._tooltipTimer);this._tooltipTimer=null;this._showingTooltip=!1;n.Plugin.Tooltip.dismiss()},i.SnapThresholdInPixels=10,i}();t.DataCursor=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(i){this._clientWidth=0;this._clientHeight=0;this._container=document.createElement("canvas");this._container.className="gridLines";this._container.style.zIndex=t.Constants.GridLineZIndex.toString();this._context=this._container.getContext("2d");this._context.lineWidth=1;this._strokeStyle=n.Plugin.Theme.getValue("diagnostics-host-graph-line");this._currentTimespan=i;this._onThemeChangeBoundFunction=this.onThemeChange.bind(this);n.Plugin.Theme.addEventListener("themechanged",this._onThemeChangeBoundFunction)}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){n.Plugin.Theme.removeEventListener("themechanged",this._onThemeChangeBoundFunction)},i.prototype.resize=function(){this._clientWidth=this._container.clientWidth;this._clientHeight=this._container.clientHeight;this._container.width=this._clientWidth;this._container.height=this._clientHeight;this.render()},i.prototype.onViewportChanged=function(n){this._currentTimespan.equals(n.currentTimespan)||(this._currentTimespan=n.currentTimespan,this.render())},i.prototype.onThemeChange=function(){this._strokeStyle=n.Plugin.Theme.getValue("diagnostics-host-graph-line");this.render()},i.prototype.render=function(){var n=this,i=t.RulerUtilities.getTickMarksPosition(this._currentTimespan,this._clientWidth),r=parseInt(this._currentTimespan.elapsed.value);this._context.clearRect(0,0,this._clientWidth,this._clientHeight);this._context.strokeStyle=this._strokeStyle;i.forEach(function(i){if(i.type===0){var u=Math.round(n._clientWidth*parseInt(t.BigNumber.subtract(i.value,n._currentTimespan.begin).value)/r);n._context.beginPath();n._context.moveTo(u+.5,0);n._context.lineTo(u+.5,n._clientHeight);n._context.stroke()}})},i}();t.GridLineRenderer=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function n(n,t){var i=this;this._subscriptions=[];this._toolName=n.toolName;this._toolId=n.toolId;this._isActive=ko.observable((n.toolState&1)==1);this._isSupported=ko.observable((n.toolState&2)==2);this._hasFocus=ko.observable(!1);this._subscriptions.push(this._isActive.subscribe(function(n){t.setToolEnabled(i._toolId,n)}))}return Object.defineProperty(n.prototype,"toolName",{get:function(){return this._toolName},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"toolId",{get:function(){return this._toolId},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isActive",{get:function(){return this._isActive},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isSupported",{get:function(){return this._isSupported},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hasFocus",{get:function(){return this._hasFocus},enumerable:!0,configurable:!0}),n.prototype.dispose=function(){this._subscriptions.forEach(function(n){n.dispose()})},n}(),r=function(){function r(){var n=this;this._toolsChangedInfoBarVisible=!1;this._previousActiveStates={};this._flyoutVisible=ko.observable(!1);this._tools=ko.observableArray();this._onToolStateChangedBoundFunction=this.onToolStateChanged.bind(this);this._settingsViewModel=new u(function(){return n.onSettingsClicked()});this._toolsService=new t.PerformanceDebuggerToolsService;this._infoBarService=t.getInfoBarService();this._subscription=this._flyoutVisible.subscribe(function(t){return n.onFlyoutVisibilityChanged(t)});this._telemetry=new t.Telemetry.PerformanceDebugger;this._toolsService.getAvailableToolsInformationAndState().done(function(t){t.forEach(function(t){var r=new i(t,n._toolsService);n._tools.push(r)});n._toolsService.toolStateChangedEvent.addEventListener(n._onToolStateChangedBoundFunction)})}return Object.defineProperty(r.prototype,"flyoutVisible",{get:function(){return this._flyoutVisible},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"tools",{get:function(){return this._tools},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"toolSettingsItem",{get:function(){return this._settingsViewModel},enumerable:!0,configurable:!0}),r.prototype.dispose=function(){this._toolsService.toolStateChangedEvent.removeEventListener(this._onToolStateChangedBoundFunction);this._subscription.dispose();this._tools().forEach(function(n){return n.dispose()})},r.prototype.onFlyoutVisibilityChanged=function(t){var i=this;if(t){this.saveToolState();this._telemetry.selectToolsDropdown();return}!this._toolsChangedInfoBarVisible&&this.isToolStateDirty()&&(this._toolsChangedInfoBarVisible=!0,this._infoBarService.addInfoMessage(n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolSelectionChangesNextDebugSession"),null,function(){i._toolsChangedInfoBarVisible=!1}))},r.prototype.onToolStateChanged=function(n){var t=this;n.toolsState.forEach(function(n){for(var i=0;i<t._tools().length;++i)if(n.toolId===t._tools()[i].toolId){t._tools()[i].isActive((n.toolState&1)==1);t._tools()[i].isSupported((n.toolState&2)==2);break}t.saveToolState()})},r.prototype.saveToolState=function(){var n=this;this._tools().forEach(function(t){n._previousActiveStates[t.toolId]=t.isActive()})},r.prototype.isToolStateDirty=function(){var n=this;return this._tools().some(function(t){return n._previousActiveStates[t.toolId]!==t.isActive()})},r.prototype.onSettingsClicked=function(){this.flyoutVisible(!1);this._toolsService.invokeSettingsDialog()},r}(),u=function(){function t(n){this._clickHandler=n;this._hasFocus=ko.observable(!1)}return Object.defineProperty(t.prototype,"label",{get:function(){return n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolSelectionSettingsText")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ariaLabel",{get:function(){return n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ToolSelectionSettingsAriaLabel")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasFocus",{get:function(){return this._hasFocus},enumerable:!0,configurable:!0}),t.prototype.clickCommand=function(){this._clickHandler()},t}(),f=function(){function i(){var f=this,e,i,u;this.registerKnockoutBindings();this._container=document.createElement("div");this._container.id="toolSelectionControl";this._container.innerHTML=document.getElementById("toolSelectionView").innerHTML;this._viewModel=new r;this._flyout=t.Utilities.findChildById(this._container,"toolSelectionFlyout");this._flyout.style.zIndex=t.Constants.DropDownMenuZIndex.toString();e=function(){var n=window.innerHeight-f._dropDownButton.offsetHeight;f._flyout.style.maxHeight=Math.min(n,120)+"px"};this._onWindowResizeBoundFunction=t.eventThrottler(e,t.Constants.WindowResizeThrottle);window.addEventListener("resize",this._onWindowResizeBoundFunction);this._dropDownButton=t.Utilities.findChildById(this._container,"toolSelectionDropdown");this._dropDownButton.style.zIndex=(t.Constants.DropDownMenuZIndex+1).toString();this._dropDownButton.onclick=this.toggleFlyout.bind(this);this._dropDownButton.onkeydown=this.onKeyDown.bind(this);i=t.Utilities.findChildById(this._dropDownButton,"toolSelectionDropdownImage");i.appendChild(t.Utilities.getSVGPlaceHolder("vs-image-tools-settings"));n.Plugin.Theme.processInjectedSvg(i);u=t.Utilities.findChildById(this._flyout,"settingsItemImage");u.appendChild(t.Utilities.getSVGPlaceHolder("vs-image-tools-settings"));n.Plugin.Theme.processInjectedSvg(u);this._onMouseDownBoundFunction=this.onMouseDown.bind(this);window.addEventListener("mousedown",this._onMouseDownBoundFunction);ko.applyBindings(this._viewModel,this.container)}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),i.prototype.dispose=function(){this._dropDownButton.onclick=null;this._dropDownButton.onkeydown=null;window.removeEventListener("mousedown",this._onMouseDownBoundFunction);window.removeEventListener("resize",this._onWindowResizeBoundFunction);this._viewModel.dispose()},i.prototype.onKeyDown=function(n){n.keyCode===40?this._viewModel.flyoutVisible(!0):n.keyCode===13&&this.toggleFlyout()},i.prototype.toggleFlyout=function(){var n=this._viewModel.flyoutVisible();this._viewModel.flyoutVisible(!n)},i.prototype.onMouseDown=function(n){if(this._viewModel.flyoutVisible()){var i=this._flyout.getBoundingClientRect(),r=this._dropDownButton.getBoundingClientRect();t.Utilities.containsPoint(i,n.clientX,n.clientY)||t.Utilities.containsPoint(r,n.clientX,n.clientY)||this._viewModel.flyoutVisible(!1)}},i.prototype.registerKnockoutBindings=function(){ko.bindingHandlers.focus||(ko.bindingHandlers.focus={previousElement:null,init:function(n,t){var i=function(){var r=t(),i;ko.bindingHandlers.focus.previousElement&&ko.bindingHandlers.focus.previousElement!==n&&(i=document.createEvent("Event"),i.initEvent("blur",!1,!1),ko.bindingHandlers.focus.previousElement.dispatchEvent(i));r()||r(!0);ko.bindingHandlers.focus.previousElement=n},r=function(){var n=t();!n()||n(!1)};n.addEventListener("focus",i);n.addEventListener("blur",r)},update:function(n,t){ko.unwrap(t())?n.focus():n.blur()}})},i}();t.ToolSelectionDropDownControl=f})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function n(n){this._container=document.createElement("div");this._container.classList.add("main-usermessage-container");var t=document.createElement("span");t.classList.add("usermessage-message");t.innerHTML=n;this._container.appendChild(t)}return Object.defineProperty(n.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),n}();n.UserMessageControl=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function n(n,t,i){this._container=document.createElement("div");this._container.classList.add("graph-axis-line");n.isThresholdAxis&&this._container.classList.add("threshold-axis");this._value=n.value;this.updatePosition(t,i)}return Object.defineProperty(n.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),n.prototype.onScaleChangedEvent=function(n){this.updatePosition(n.minimum,n.maximum)},n.prototype.updatePosition=function(n,t){if(this._value<n||this._value>t)this._container.style.display="none";else{this._container.style.display="block";var i=(this._value-n)/(t-n)*100;this._container.style.top=100-i+"%"}},n}();n.Axes=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(i){var r=this;if(!i)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1002"));this._container=document.createElement("div");this._container.className="legend-container";i.forEach(function(n){var i,f,u;n.marker?i=n.marker.cloneNode(!0):(i=document.createElement("div"),i.style.backgroundColor=n.color);i.classList.add("legend-marker");i.style.width="1em";i.style.height="1em";f=document.createElement("div");f.classList.add("legend-text-div");f.innerText=n.legendText;u=document.createElement("div");u.classList.add("legend-div");u.appendChild(i);u.appendChild(f);n.legendTooltip&&u.setAttribute("data-plugin-vs-tooltip",JSON.stringify({content:n.legendTooltip,delay:t.Constants.TimeoutImmediate}));r._container.appendChild(u)})}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),i}();t.Legend=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(t,i,r){if(!t)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1002"));this._minimum=t.minimum;this._maximum=t.maximum;this._axes=t.axes;this._unitConverter=r;this._scaleType=i;this._container=document.createElement("div");this._container.className=this._scaleType===0?"graph-scale-left":"graph-scale-right"}return Object.defineProperty(i.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),i.prototype.resize=function(){var n=this._container.clientHeight;this._clientHeight!==n&&(this._clientHeight=n,this.render())},i.prototype.onScaleChanged=function(n){this._minimum=n.minimum;this._maximum=n.maximum;this.render()},i.prototype.render=function(){for(var t,n,i;this._container.childNodes.length>0;)this._container.removeChild(this._container.firstChild);if(t=!1,this._axes&&this._axes.length>0)for(n=0;n<this._axes.length;n++)i=this._axes[n],this.drawAxisValue(i.value),i.isThresholdAxis&&(t=!0);else this.drawAxisValue(this._maximum),this.drawAxisValue(this._minimum);t&&this.drawAxisValue(this._maximum)},i.prototype.drawAxisValue=function(n){var i,u,f,r;n>this._maximum||n<this._minimum||(i=document.createElement("div"),i.className=this._scaleType===0?"graph-axis-left":"graph-axis-right",u=this._unitConverter.scaleValue(n),i.innerHTML=t.Utilities.formatNumber(u.value,0),this._container.appendChild(i),f=0,r=Math.floor((this._maximum-n)/(this._maximum-this._minimum)*this._clientHeight)-i.offsetHeight/2,r=Math.max(0,r),r=Math.min(r,this._clientHeight-i.offsetHeight),i.style.top=r+"px")},i}();t.Scale=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function n(n,t){this._lineColorString="#FF0000";this._lineFillColorString="#FF0000";this._lineColorString=n;this._lineFillColorString=t}return Object.defineProperty(n.prototype,"lineColor",{get:function(){return this._lineColorString},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"lineFillColor",{get:function(){return this._lineFillColorString},enumerable:!0,configurable:!0}),n}();n.ChartColorScheme=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function u(){if(!i)throw new Error("Not initialized correctly");return i}function f(){return i||(i=new r),i}var r=function(){function i(){var u=this,i,r;n.Plugin.Tooltip.defaultTooltipContentToHTML=!1;n.Plugin.VS.Keyboard.setZoomState(!1);i={dataManager:null,containerId:null,isToolbarFloating:!0,isPerformanceDebugger:!0,isSelectionEnabled:!0,isLive:!0,timeInNsPerPixel:6e7};this._onSessionTargetAddFailedBoundFunction=this.onSessionTargetAddFailed.bind(this);this._onStatusMessageUpdateBoundFunction=this.onStatusMessageChanged.bind(this);this._eventAggregator=t.getEventAggregator();this._renderer=n.VisualStudio.DiagnosticsHub.getRenderer(i);r=t.getPerformanceDebuggerStateService();r.isDocumentActiveSession().then(function(n){return u.setupInitialWindow(n)})}return i.prototype.addInfoMessage=function(n,i,r){var f=this,u=new t.InformationBarControl(n,i);u.onClose=function(){f._renderer.removeControl(u);r&&r()};this._renderer.addControl(u,t.SwimlaneViewConstants.InfobarRendererPriority)},i.prototype.setupInitialWindow=function(i){var u=this,r;this._renderer.addToolbarItem(new n.VisualStudio.DiagnosticsHub.ToolSelectionDropDownControl);i?(this._currentSession=n.VisualStudio.DiagnosticsHub.getCurrentSession(),this._eventAggregator.addEventListener("DiagnosticsHub.EventAggregator.SessionTargetAddFailedEvent",this._onSessionTargetAddFailedBoundFunction),this._currentSession.getPerformanceDebuggerSessionTargetProcessInformation().then(function(n){n.addTargetFailureCount>0&&u.onSessionTargetAddFailed()})):(r=t.getPerformanceDebuggerStateService(),r.statusMessageChangedEvent.addEventListener(this._onStatusMessageUpdateBoundFunction),r.getLastNonActiveStatusMessage().then(function(n){return u.showMessage(n)}))},i.prototype.onSessionTargetAddFailed=function(){var t=this;this._eventAggregator.removeEventListener("DiagnosticsHub.EventAggregator.SessionTargetAddFailedEvent",this._onSessionTargetAddFailedBoundFunction);this._currentSession.getPerformanceDebuggerSessionTargetProcessInformation().then(function(i){t.addInfoMessage(n.Plugin.Resources.getString("/DiagnosticsHubResources/InformationPerfDebuggerSingleTarget",i.processName,i.processId))})},i.prototype.onStatusMessageChanged=function(n){this.showMessage(n.statusMessage)},i.prototype.showMessage=function(n){this._userMessage!==null&&typeof this._userMessage!="undefined"&&this._renderer.removeControl(this._userMessage);this._userMessage=new t.UserMessageControl(n);this._renderer.addControl(this._userMessage,t.Renderer.headerSwimlanePriority)},i}(),i=null;t.getInfoBarService=u;t.getPerformanceDebuggerSwimlanesView=f})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(){this._content=[];this._ariaContent=[];this.marks=[]}return i.prototype.getTooltipContent=function(){return this.updateData(),this._content.join("\r\n")},i.prototype.getAriaContent=function(){return this.updateData(),this._ariaContent.join(", ")},i.prototype.push=function(n){(!this.time||this.time>n.time)&&(this.time=n.time);this.marks.push(n)},i.prototype.updateData=function(){var i;if(this._content.length!==this.marks.length)for(this._content=[],this._ariaContent=[],i=0;i<this.marks.length;i++)if(this.marks[i].tooltip!==null&&typeof this.marks[i].tooltip!="undefined"){var r=this.marks[i],u=r.tooltip,f=r.tooltip;u+=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerMarkTooltipLabel",t.RulerUtilities.formatTime(r.time));f+=n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/RulerMarkTooltipLabel",t.RulerUtilities.formatTime(r.time,1));this._content.push(u);this._ariaContent.push(f)}},i}();t.AggregatedMarkData=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(t,i){var r=this;this._droppedRequest=!1;this._dataWarehouseRequestHandle=1;this._logger=n.VisualStudio.DiagnosticsHub.getLogger();this._scale=i;this._markId=t.MarkTypeId;this._analyzerId=t.DataSource.AnalyzerId;n.VisualStudio.DiagnosticsHub.DataWarehouse.loadDataWarehouse().done(function(n){var i,f,u;if(r._dataWarehouse=n,i=t.DataSource,r._dataWarehouseContext={customDomain:{CounterId:i.CounterId}},i.CustomDomain)for(f in i.CustomDomain)i.CustomDomain.hasOwnProperty(f)&&(u=i.CustomDomain[f],u!==null&&typeof u!="string"&&(r._logger.warning("Custom domain property '"+f+"' is not a string, it will be converted to string"),u=u.toString()),r._dataWarehouseContext.customDomain[f]=u);r._dataWarehouseRequestHandle=null;r._droppedRequest=!1;r.requestUpdate()})}return i.prototype.onDataUpdate=function(){this.requestUpdate()},i.prototype.dispose=function(){this._countersResult&&this._countersResult.dispose()},i.prototype.requestUpdate=function(){var n=this;if(this._dataWarehouseRequestHandle){this._droppedRequest=!0;return}this._dataWarehouseRequestHandle=window.setTimeout(function(){var i;i=n._countersResult?n._countersResult.getResult(null):n._dataWarehouse.getFilteredData(n._dataWarehouseContext,n._analyzerId).then(function(t){return typeof t.getResult=="function"?(n._countersResult=t,n._countersResult.getResult(null)):t});i.then(function(i){i&&i.p&&i.p.forEach(function(i){var r=new t.BigNumber(i.t.h,i.t.l),u=i.tt||n.formatMarkTooltip(r),f=new t.MarkData(r,u);n._scale.addMark(n._markId,f,!1)})}).done(function(){n._dataWarehouseRequestHandle=null;n._droppedRequest&&(window.setTimeout(n.requestUpdate.bind(n),t.Constants.TimeoutImmediate),n._droppedRequest=!1)})},t.Constants.TimeoutImmediate)},i.prototype.formatMarkTooltip=function(i){return n.Plugin.Resources.getString("/DiagnosticsHubControlsResources/TooltipTimeLabel")+": "+t.RulerUtilities.formatTime(i,0)},i}();t.MarkDataFetcher=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={}))
//# sourceMappingURL=Controls.min.js.map
.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]*/
}//! Copyright (C) Microsoft. All rights reserved.
var __extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},MemoryAnalyzer,PerfTools,Notifications,Common;(function(n){"use strict";var t=Microsoft.Plugin,i;(function(i){var r;(function(i){var r;(function(r){var u,c,l,e,o,s,a,f;(function(n){var t=function(){function t(){}return t.stableReverse=function(n,t){var e=[],i=n.length-1,r,f,u;for(i>=0&&n[i].data.hasMoreText&&i--;i>=0;i--){for(r=i-1;r>=0;r--)if(0!==t(n[r],n[i]))break;for(f=r+1;f<=i;f++)e.push(n[f]);i=r+1}for(u=0;u<e.length;u++)n[u]=e[u]},t.defaultComparer=function(n,t,i,r){var u=i[n.index],f=r[n.index];return typeof u=="undefined"||u===null?typeof f=="undefined"||f===null?0:-1:u.toString().toLocaleUpperCase().localeCompare(f.toString().toLocaleUpperCase())},t.sortComparer=function(t,i,r,u){var f;if(r.hasMoreText)return 1;if(u.hasMoreText)return-1;for(f=0;f<t.length;f++){var o=t[f],s=i[f],h=s.comparer||n.TreeNodeSort.defaultComparer,e=h(s,o.order,r,u);if(e===0)continue;else return o.order==="desc"?-e:e}return 0},t}();n.TreeNodeSort=t})(u||(u={}));c=function(){function n(n,t,i){this.gridData=n;this.expandStates=t;this.toggleFunction=i}return n}();r.TreeInfo=c;l=function(){function n(n,t,i,r,u,f,e,o,s){this.index=n;this.text=t;this.tooltip=i;this.width=r;this.canSortBy=u;this.getColumnValue=f;this.getCellCSSClass=e;this.comparer=o;this.hasHTMLContent=!1;this.variableWidth=s}return n}();r.ColumnInfo=l;e=function(){function n(n,t){this.index=n;this.order=t}return n}();r.SortOrderInfo=e;o=function(){function n(n,t){this.data=n;this.expandState=t;this.children=[]}return n}();r.TreeNode=o;s=function(){function n(n,t,i,r,u){this.backgroundColor=n;this.icon=t;this.checkbox=i;this.headerClickSortColumn=r;this.getTooltip=u}return n}();r.GutterOptions=s;a=function(){function n(n,t,i,r,u,f){this.childDataCallback=n;this.loadMoreChildDataCallback=t;this.columns=i;this.sortOrders=r;this.allowMultiSelect=!1;this.allowSortOnMultiColumns=!1;this.ariaTitle="";this.asyncInit=!0;this.autoSort=!0;this.coreCssClass="grid";this.cssClass="";this.expandStates=[];this.extendViewportBy=3;this.gutter=new s;this.header=!0;this.height="100%";this.initialSelection=!1;this.keepSelection=!1;this.payloadSize=200;this.source=null;this.editCellCallback=u;this.rowSelectedCallback=f;this.disableRightClickSelection=!0;this.isGridDisabled=!1;this.sizeColumns()}return n.prototype.sizeColumns=function(){var n,i;if(this.columns){var u=document.documentElement.offsetWidth-66,r=0,t=-1;for(n=0;n<this.columns.length;n++)this.columns[n].variableWidth&&t===-1?t=n:r+=this.columns[n].width;t>=0&&(i=u-r,i>this.columns[t].width&&(this.columns[t].width=i))}},n}();r.GridOptions=a;f=function(){function n(n,t){this.rowIndex=n;this.dataIndex=t}return n}();r.RowIndexInfo=f;var v=function(){function n(n,t){this.width=n;this.height=t}return n}(),h=function(){function n(n,t){this.start=n;this.end=t}return n}(),y=function(){function n(n,t,i,r){this.active=n;this.index=t;this.originalWidth=i;this.origin=r}return n}(),p=function(i){function r(n,t){i.call(this,n);this._gridInstanceNumber=r.GlobalGridInstanceNumber++;this._options=t;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=new Map;this._editCellCallback=null;this._selectedRows=null;this._selectionStart=-1;this._selectionCount=0;this._selectedIndex=-1;this._active=!1;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=!1;this._resetScroll=!1;this._ignoreScroll=!1;this._scrollTop=0;this._scrollLeft=0;this._cancelable=null;this._onAriaExpandedModifiedHandler=this.onAriaExpandedModified.bind(this);this.initialize()}return __extends(r,i),r.prototype.getSelectionCount=function(){return this._selectionCount},r.prototype.getElement=function(){return this._element},r.prototype.setAriaDescription=function(n){this._ariaDescription=n;this._updateGridAriaLabel()},r.prototype.setGutterHeaderClickSortColumn=function(n){this._options.gutter.headerClickSortColumn=n},r.prototype.initializeDataSource=function(){var n;if(this._resetScroll){this._ignoreScroll=!0;try{n=this._canvas;n.scrollTop=0;n.scrollLeft=0;this._scrollLeft=0;this._scrollTop=0;this._resetScroll=!1}finally{this._ignoreScroll=!1}}this.setDataSource(this._options.source,this._options.expandStates,this._options.columns,this._options.sortOrders);this._expandedCount>0?this._options.keepSelection&&this._selectedIndex>=0?this._selectRow(Math.min(this._selectedIndex,this._expandedCount-1)):this._selectRow(this._options.initialSelection!==!1?0:-1):this.setSelectedRowIndex(-1)},r.prototype.setDataSource=function(n,t,i,u,f){var s=this,o,h,l,e,c;if(this._rowInfoMap=new Map,this._dataSource=n||[],this._count=l=this._dataSource.length,t?(this._expandStates=t,this._indentLevels=r.expand(t)):(this._indentLevels=null,this._expandStates=null),this._expandedCount=l,this._updateRanges(),this._columns=[],i){var a=function(n,t,i,r,u,f,e){return s._drawCell(n,t,i,r,u,f,e)},v=function(n,t){return s._drawHeaderCellValue(n,t)},y=function(n,t,i){return s.getColumnValue(n,t,i)};for(o=0,h=i.length;o<h;o++)e=i[o],e.index=typeof e.index!="undefined"?e.index:String(o),e.canSortBy=e.canSortBy!==!1,e.canMove=e.canMove!==!1,e.width=typeof e.width!="undefined"?e.width:100,e.getCellContents=e.getCellContents||a,e.getHeaderCellContents=e.getHeaderCellContents||v,e.getColumnValue=e.getColumnValue||y,this._columns.push(e)}if(this._sortOrder=[],u){for(o=0,h=u.length;o<h;o++)c=u[o],c.order!=="desc"&&(c.order="asc"),this._sortOrder.push(c);this.setGutterHeaderSortOrder()}this._clearSelection();this._determineIndentIndex();this._options.asyncInit?window.setTimeout(function(){return s._layoutAfterSetDataSource(f)},0):this._layoutAfterSetDataSource(f)},r.prototype.updateGetChildDataCallback=function(n){this._getChildDataCallback=n},r.prototype.getRowInfo=function(n){return this._rows[n]},r.prototype.getRowData=function(n){return this._dataSource[n]},r.prototype.getColumns=function(){return this._columns||[]},r.prototype.getSortOrder=function(){return this._sortOrder||[]},r.prototype.expandNode=function(n){var u=this,r,t,i;this._dataSource[n+1].isPlaceholder&&(r=this.getExpansionPath(n),this._getChildDataCallback(this._dataSource[n],r,function(t,i){if(t!==null){var r=n+1;u._adjustForDynamicData(t.itemsWithPlaceholders,t.expandStates,n,r,i)}}));this._expandStates&&(t=this._expandStates[n],t<0&&(this._expandStates[n]=-t,this._updateRanges(),i=this._rows[n],i&&(i.isDirty=!0)))},r.prototype.collapseNode=function(n){var t,i;this._expandStates&&(t=this._expandStates[n],t>0&&(this._expandStates[n]=-t,this._updateRanges(),i=this._rows[n],i&&(i.isDirty=!0)))},r.prototype.expandAllNodes=function(){var n=0,f=this._count,t=this._expandStates,i=!1,e=this._rows,r,u;if(t){while(n<f)r=t[n],r<0&&(t[n]=-r,i=!0,u=e[n],u&&(u.isDirty=!0)),n++;i&&this._updateRanges()}return i},r.prototype.collapseAllNodes=function(){var n=0,f=this._count,t=this._expandStates,i=!1,e=this._rows,r,u;if(t){while(n<f)r=t[n],r>0&&(t[n]=-r,i=!0,u=e[n],u&&(u.isDirty=!0)),n++;i&&this._updateRanges()}return i},r.prototype.expandAll=function(){var n=this;this._updateExpansionStateAndRedraw(function(){return n.expandAllNodes})},r.prototype.collapseAll=function(){var n=this;this._updateExpansionStateAndRedraw(function(){return n.collapseAllNodes})},r.prototype.tryToggle=function(n,t,i){var u,r,f;if(!this._expandStates||this._selectedIndex<0||this._expandedCount<=0||(r=typeof i!="undefined"?i:this._getDataIndex(this._selectedIndex),f=this._rows[r],!f))return!1;if(u=this._expandStates[r],u!==0){if(n)if(u<0)this.expandNode(r);else return!1;else if(u>0)this.collapseNode(r);else return!1;return this._clearSelection(),this._addSelection(this._getRowIndex(r)),this._layoutContentSpacer(),this._redraw(),!0}return!1},r.prototype.getSelectedRowIntoView=function(n){this._selectedIndex>=0&&this._getRowIntoView(this._selectedIndex,n)},r.prototype.cacheRows=function(){},r.prototype.updateRow=function(n,t){var r=0,u=0,i;typeof t=="undefined"||t<0?t=this._getDataIndex(n):(typeof n=="undefined"||n<0)&&(n=this._getRowIndex(t));i=this._rows[t];i&&(this._expandStates&&(r=this._expandStates[t],u=this._indentLevels[t]),this._updateRow(i,n,t,r,u))},r.prototype.layout=function(){this._measureCanvasSize();this._cleanUpRows();this._fixScrollPos();this._layoutContentSpacer();this._updateViewport();this._layoutHeader();this._drawHeader()},r.prototype.redraw=function(){this._fixScrollPos();this._redraw(!0)},r.prototype.getColumnValue=function(n,t){return this._dataSource[n][t]},r.prototype.getColumnText=function(n,t,i,u){var f,e=t.getColumnValue(n,t.index,i,this._dataSource,u);return f=typeof e!="string"?r.convertValueToDisplayString(e,t.format):e,t.maxLength=Math.max(t.maxLength||0,f.length),f},r.prototype.getSelectedRowIndex=function(){return this._selectionCount===0?-1:this._selectedIndex},r.prototype.setSelectedRowIndex=function(n){this._clearSelection();this._addSelection(n)},r.prototype.getSelectedDataIndex=function(){return this._getDataIndex(this._selectedIndex)},r.prototype.getSelectedDataIndices=function(){var i,n=this._selectedRows,t=[];if(n)for(i in n)t[t.length]=n[i];return t},r.prototype.ensureDataIndexExpanded=function(n){for(var t=this._getRowIndex(n);t<0||n>0&&t===0;)this.expandNode(this._getDataIndex(-t)),t=this._getRowIndex(n);return t},r.prototype.setSelectedDataIndex=function(n,t){var i=t?this.ensureDataIndexExpanded(n):this._getRowIndex(n);this.setSelectedRowIndex(i)},r.prototype.setFocusToSelectedRow=function(){this._updateAriaAttribute();this.getSelectedRowIntoView(!0)},r.prototype.selectionChanged=function(){},r.prototype.selectedIndexChanged=function(){},r.prototype.onSort=function(n,t){return this.fireCustomEvent(this._element,"sortStarted"),this._options.autoSort&&(this._trySorting(n,t),this._sortOrder=n,this.layout()),!0},r.prototype.getRowInfoFromEvent=function(n,t){var i=this.findClosestElement(n.target,t);return this._rowInfoMap.get(i)},r.prototype.getExpandStates=function(){return this._expandStates},r.prototype.getExpansionPath=function(n){var i,t,r;if(n<0||n>=this._expandStates.length)throw new Error("Item does not exist");for(i=[],t=0;t<n;)r=t+Math.abs(this._expandStates[t]),n<=r?(i.push(this._dataSource[t]),t++):t=r+1;if(t!=n)throw new Error("Invalid expandStates format or incorrect assumption");return i.push(this._dataSource[n]),i},r.prototype.ensureSelectedIndex=function(n){this._ensureSelectedIndex(n,!0)},r.expand=function(n){var u=[],i,t,r,e,f,o;if(n.length>0){for(i=[],t={level:1,origCount:n.length,remainingCount:n.length},i.push(t),r=0;r<n.length;){for(u.push(t.level),t.remainingCount--;t.remainingCount===0;){if(i.pop(),i.length==0)if(r===n.length-1)break;else throw new Error("invalid descendant counts, nesting not possible");if(e=i[i.length-1],e.remainingCount-=t.origCount,t=e,t.remainingCount<0)throw new Error("invalid descendant counts, cannot convert to indentation levels")}f=Math.abs(n[r]);f>0&&(o={level:u[u.length-1]+1,origCount:f,remainingCount:f},i.push(o),t=o);r++}if(i.length>0)throw new Error("invalid descendant counts, more input expected")}return u},r.addItemsToTree=function(n,t,i,u,f){for(var s,h,c=Math.min(i+u,n.length),e=i;e<c;e++)s=new o(n[e],t[e]),h=Math.abs(s.expandState),h>0&&(r.addItemsToTree(n,t,e+1,h,s),e+=h),f.children.push(s)},r.walkTree=function(n,t){var f,i,u,e;if(t&&(t(n),f=0,i=n.children,i&&(f=i.length)))for(u=0;u<f;u++)e=i[u],r.walkTree(e,t)},r.makeElementUnselectable=function(n){var i,t,r;for(n.setAttribute("unselectable","on"),i=n.querySelectorAll("*"),t=0;t<i.length;t++){r=i[t];switch(r.tagName){case"IFRAME":case"TEXTAREA":case"INPUT":case"SELECT":break;default:r.setAttribute("unselectable","on")}}},r.toDecimalLocaleString=function(n,i,r){var p=function(n,t,i){for(var r=n.length;r<t;r++)n=i?"0"+n:n+"0";return n},e,l,s,u=n.toString(),f="";if(l=r?r.numberFormat:t.Culture.NumberFormat,s=u.split(/e/i),u=s[0],e=s.length>1?parseInt(s[1],10):0,s=u.split("."),u=s[0],f=s.length>1?s[1]:"",e>0?(f=p(f,e,!1),u+=f.slice(0,e),f=f.substr(e)):e<0&&(e=-e,u=p(u,e+1,!0),f=u.slice(-e,u.length)+f,u=u.slice(0,-e)),f.length>0&&(f=l.numberDecimalSeparator+f),i===!0){for(var a=l.numberGroupSizes,v=l.numberGroupSeparator,h=a[0],y=1,o=u.length-1,c="";o>=0;){if(h===0||h>o)return c.length>0?u.slice(0,o+1)+v+c+f:u.slice(0,o+1)+f;c=c.length>0?u.slice(o-h+1,o+1)+v+c:u.slice(o-h+1,o+1);o-=h;y<a.length&&(h=a[y],y++)}return u.slice(0,o+1)+v+c+f}return u+f},r.convertValueToDisplayString=function(n,t){return n!=null?typeof n=="string"?n:n instanceof Date?n.localeFormat(t||"G"):typeof n=="number"?t?n.localeFormat(t):r.toDecimalLocaleString(n):typeof n=="boolean"?n?"True":"False":n.toString():""},r._setTooltip=function(n,t,i){var r=t.trim(),u;r&&(u={content:r,height:i},n.setAttribute("data-plugin-vs-tooltip",JSON.stringify(u)))},r.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 v(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;this._options.asyncInit?window.setTimeout(function(){this._attachEvents()}.bind(this),10):this._attachEvents();this.initializeDataSource()},r.prototype.findClosestElement=function(n,t){for(var r=this._element.parentNode,i=n;i&&i!==r;){if(i.msMatchesSelector(t))return i;i=i.parentNode}return i},r.prototype.fireCustomEvent=function(n,t,i){var r=document.createEvent("Event");r.initEvent(t,!0,!0);r.customData=i;n.dispatchEvent(r)},r.prototype.onAriaExpandedModified=function(n){if(n.attrName==="aria-expanded"){var t=this.getRowInfoFromEvent(n,".grid-row");t&&this.tryToggle(n.newValue==="true",!1,t.dataIndex)}},r.prototype.createElementWithClass=function(n,t){var i=document.createElement(n);return t&&(i.className=t),i},r.prototype._getId=function(){return r.TYPE_NAME+this._gridInstanceNumber},r.prototype._enhance=function(){this._buildDom()},r.prototype._buildDom=function(){var i=document.createDocumentFragment(),n=this._options.gutter,f=n&&(n.icon||n.checkbox),r,t,u;for(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),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),i.appendChild(this._header)),f&&(this._element.classList.add("has-gutter"),this._gutter=document.createElement("div"),this._gutter.className="grid-gutter",n&&n.backgroundColor&&(this._gutter.style.backgroundColor=n.backgroundColor),this._canvas.appendChild(this._gutter),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),r=this.createElementWithClass("div","sort-handle"),this._gutterHeader.appendChild(r),this.setGutterHeaderSortOrder())),i.appendChild(this._canvas),this._element.appendChild(i),this._ariaColumns="",t=0;t<this._options.columns.length;t++)u=this._options.columns[t],this._ariaColumns&&(this._ariaColumns+=", "),this._ariaColumns+=u.text;this._updateGridAriaLabel()},r.prototype._updateGridAriaLabel=function(){var n="";n+=this._options.ariaTitle||"";n&&(n+=", ");n+=this._ariaColumns||"";n&&(n+=", ");n+=this._ariaDescription||"";this._element.setAttribute("aria-label",n)},r.prototype.setGutterHeaderSortOrder=function(){var i,t,n;if(this._sortOrder&&this._sortOrder.length!==0&&this._options.gutter.headerClickSortColumn)if(this._options.allowSortOnMultiColumns){for(i=!1,t=0;t<this._sortOrder.length;t++)n=this._sortOrder[t],n.index===this._options.gutter.headerClickSortColumn.index&&(i=!0,this._setSortOrderClass(this._gutterHeader,n.order));i||this._setSortOrderClass(this._gutterHeader,"none")}else n=this._sortOrder[0],n.index===this._options.gutter.headerClickSortColumn.index?this._setSortOrderClass(this._gutterHeader,n.order):this._setSortOrderClass(this._gutterHeader,"none")},r.prototype._attachEvents=function(){var n=this;window.addEventListener("resize",function(t){return n._onContainerResize(t)});this._element.addEventListener("keydown",function(t){return n._onKeyDown(t)});this._canvas.addEventListener("mousedown",function(t){return n._onRowMouseDown(t)});this._canvas.addEventListener("dblclick",function(t){return n._onEditCell(t)});this._canvas.addEventListener("scroll",function(t){return n._onCanvasScroll(t)});this._canvas.addEventListener("selectstart",function(){return!1});this._canvas.addEventListener("focusin",function(){n._canvasContainsFocus=!0});this._canvas.addEventListener("focusout",function(){n._canvasContainsFocus=!1});this._header&&(this._header.addEventListener("mousedown",function(t){return n._onHeaderMouseDown(t)}),this._header.addEventListener("mouseup",function(t){return n._onHeaderMouseUp(t)}),this._header.addEventListener("click",function(t){return n._onHeaderClick(t)}),this._header.addEventListener("dblclick",function(t){return n._onHeaderDblClick(t)}));this._gutter&&(this._gutterHeader&&this._gutterHeader.addEventListener("click",function(){n._sortBy(n._options.gutter.headerClickSortColumn,!1);n.setGutterHeaderSortOrder()}),this._gutter.addEventListener("click",function(t){return n._onGutterClick(t)}),this._gutter.addEventListener("mouseover",function(n){var t=this.findClosestElement(n.target,".grid-gutter-row");t&&t.classList.add("grid-gutter-row-hover")}.bind(this)),this._gutter.addEventListener("mouseout",function(n){var t=this.findClosestElement(n.target,".grid-gutter-row");t&&t.classList.remove("grid-gutter-row-hover")}.bind(this)))},r.prototype._mergeExpandStates=function(n,t,i,r){var o=r.length-1,e,u,f;for(i.splice(t,1),u=0;u<=o;u++)i.splice(t+u,0,r[u]);for(e=0,u=n;u>=0;u--)f=i[u],Math.abs(f)>e?(i[u]=f<0?f-o:f+o,e=0):e++},r.prototype._takeMeasurements=function(){var f=this._options.coreCssClass,n,r,t,i,u;this._options.cssClass&&(f+=" "+this._options.cssClass);n=this.createElementWithClass("div",f);n.style.position="absolute";n.style.left="-5000px";n.style.top="-5000px";n.style.width="1000px";n.style.height="500px";document.body.appendChild(n);r=this.createElementWithClass("div","grid-row grid-row-normal");n.appendChild(r);t=this.createElementWithClass("div","grid-cell");t.style.width="100px";t.innerText="1";r.appendChild(t);this._measurements.rowHeight=r.offsetHeight;this._measurements.cellOffset=t.offsetWidth-100;i=this.createElementWithClass("div");i.style.overflow="hidden";i.style.width="1em";i.style.height="1ex";t.appendChild(i);this._measurements.unitEx=i.offsetHeight;u=this.createElementWithClass("div","grid-gutter");u.appendChild(this.createElementWithClass("div","grid-gutter-row"));n.appendChild(u);this._measurements.gutterWidth=this._gutter?u.clientWidth:0;document.body.removeChild(n)},r.prototype._layoutAfterSetDataSource=function(n){this.layout();n!==-1&&this._ensureSelectedIndex(n)},r.prototype._adjustForDynamicData=function(n,t,i,u,f){var s,e,o;for(f&&(s={hasMoreText:f},n.push(s),t.push(0)),this._dataSource.splice(u,1),e=0;e<n.length;e++)this._dataSource.splice(u+e,0,n[e]);this._mergeExpandStates(i,u,this._expandStates,t);o=this._dataSource.length;this._count=o;this._indentLevels=this._expandStates?r.expand(this._expandStates):null;this._expandedCount=o;this._updateRanges();this._clearSelection();this._determineIndentIndex();this.layout()},r.prototype._ensureSelectedIndex=function(n,t){var i=this._selectedIndex;typeof n=="number"&&(this._selectedIndex=n);this._selectedIndex>=0&&(this._count<=this._selectedIndex&&(this._selectedIndex=this._count-1),(this._selectedIndex!==i||t)&&this._addSelection(this._selectedIndex))},r.prototype._determineIndentIndex=function(){for(var t=this._columns,n=0,i=t.length;n<i;n++)if(t[n].indent){this._indentIndex=n;return}this._indentIndex=0},r.prototype._getDataIndex=function(n){var t,u,r=-1,f=this._visibleRange,i;if(n<0)return-1;for(t=0,u=f.length;t<u;t++)if(i=f[t],r+=i.end-i.start+1,n<=r)return i.end-r+n;return n},r.prototype._getRowIndex=function(n){for(var r=0,f=this._visibleRange,t,i=0,u=f.length;i<u;i++){if(t=f[i],n>=t.start){if(n<=t.end)return r+n-t.start}else break;r+=t.end-t.start+1}return-Math.max(0,r-1)},r.prototype._updateRanges=function(){var n=0,i=0,r=this._count,t=[],u=0,f;if(this._expandStates){while(n<r)f=this._expandStates[n],f<0?(t[t.length]=new h(i,n),u+=n-i+1,n+=1-f,i=n):n++;i<r&&(t[t.length]=new h(i,r-1),u+=r-i)}else u=r,t[t.length]=new h(0,u);this._expandedCount=u;this._visibleRange=t},r.prototype._updateExpansionStateAndRedraw=function(n){var i,t=this._selectedIndex;t>=0&&(i=this._getDataIndex(t));n();t>=0&&(this._clearSelection(),this._addSelection(Math.abs(this._getRowIndex(i))));this._layoutContentSpacer();this._redraw()},r.prototype._getVisibleRowIndices=function(){var n=this._scrollTop,r=n+this._canvasHeight,t=this._expandedCount-1,i=this._measurements.rowHeight;return{first:Math.min(t,Math.max(0,Math.ceil(n/i))),last:Math.min(t,Math.floor(r/i)-1)}},r.prototype._getRowIntoView=function(n,t){if(t)return this._canvas.scrollTop=Math.max(0,Math.min(n||0,this._expandedCount-1))*this._measurements.rowHeight,!0;var u=this._getVisibleRowIndices(),i=u.first,f=u.last,r=f-i;return n<i||n>f?(i=this._selectedIndex>i?Math.max(n-r,0):Math.max(0,Math.min(n+r,this._expandedCount-1)-r),this._canvas.scrollTop=i*this._measurements.rowHeight,!0):!1},r.prototype._updateViewport=function(n){var v=this._count,o=[],s=[],u=[],y=this._expandStates||[],c=this._expandedCount-1,l=this._getVisibleRowIndices(),r=l.first,e=l.last,t,h;r=Math.max(0,r-this._options.extendViewportBy);e=Math.min(c,e+this._options.extendViewportBy);var a=Math.max(0,r-this._options.payloadSize),p=Math.min(c,e+this._options.payloadSize),i=this._getDataIndex(a),w=r;for(t=a;t<=p&&i<v;t++)t<r?o[o.length]=new f(t,i):t>e?s[s.length]=new f(t,i):(u[u.length]=new f(t,i),w=t),h=y[i],h<0?i+=1-h:i++;this.cacheRows(o,u,s);this._drawRows(u,n);this._updateAriaOnViewportUpdate&&(this._updateAriaOnViewportUpdate=!1,this._updateAriaAttribute())},r.prototype._cleanUpRows=function(){var t=this._rows,r=this._gutter,i,n;for(i in t)n=t[i],n.row.parentElement&&n.row.parentElement.removeChild(n.row),r&&n.gutterRow.parentElement&&n.gutterRow.parentElement.removeChild(n.gutterRow);this._rows={}},r.prototype._drawRows=function(n,t){var y=this._expandStates,p=0,tt=this._indentLevels,w=0,h=this._gutter,it=this._canvas,b,f,k=document.createDocumentFragment(),a=null,o,v,d,c,r,e,l,nt;for(h&&(b=this._gutter,a=document.createDocumentFragment()),o=this._rows,v={},this._rows=v,d=n.length,c=0;c<d;c++){var g=n[c],s=g.rowIndex,u=g.dataIndex,i=o[u];i?(f=i.rowIndex!==s,f?i.rowIndex=s:(f=i.isDirty,delete i.isDirty),t&&(f=!0),delete o[u]):(f=!0,r=this.createElementWithClass("div","grid-row grid-row-normal"),r.id="row_"+this._getId()+"_"+s,k.appendChild(r),e={rowIndex:s,dataIndex:u,row:r},h&&(l=this.createElementWithClass("div","grid-gutter-row"),a.appendChild(l),this._rowInfoMap.set(l,e),e.gutterRow=l),this._rowInfoMap.set(r,e),i=e,r.onfocus=this._onFocus.bind(this),r.onblur=this._onBlur.bind(this),r.ondblclick=this._onToggle.bind(this,e));v[u]=i;f&&(y&&(p=y[u],w=tt[u]),this._updateRow(i,s,u,p,w))}for(nt in o)i=o[nt],h&&(this._rowInfoMap.delete(i.gutterRow),i.gutterRow.parentElement.removeChild(i.gutterRow)),this._rowInfoMap.delete(i.row),i.row.parentElement.removeChild(i.row);it.appendChild(k);h&&b.appendChild(a)},r.prototype._setSortOrderClass=function(n,t){t==="asc"?(n.classList.remove("descending"),n.classList.add("ascending")):t==="desc"?(n.classList.remove("ascending"),n.classList.add("descending")):t==="none"&&(n.classList.remove("ascending"),n.classList.remove("descending"))},r.prototype._updateRow=function(n,t,i,u,f){var d=this._indentIndex,e,s,a,v,h,y,p,o,w,c,k,l,b;for(this._gutter&&(e=this._options.gutter,s=n.gutterRow,s.style.top=t*this._measurements.rowHeight+"px",s.style.left="0px",s.style.width=this._measurements.gutterWidth+"px",s.style.height=this._measurements.rowHeight+"px",s.innerHTML="",e.checkbox&&(a=this.createElementWithClass("input","checkbox "+(e.checkbox.cssClass||"")),a.setAttribute("type","checkbox"),v=this.createElementWithClass("div","grid-gutter-cell grid-gutter-checkbox"),v.appendChild(a[0]),s.appendChild(v)),e.icon&&(h="grid-gutter-cell grid-gutter-icon ",typeof e.icon.cssClass!="undefined"&&(h+=e.icon.cssClass+" "),typeof e.icon.index!="undefined"&&(h+=(this.getColumnValue(i,e.icon.index,-1)||"")+" "),e.icon.gutterIconCssCallback&&(h+=e.icon.gutterIconCssCallback(i,this._dataSource)||""),y=this.createElementWithClass("div",h),e.getTooltip&&(p=e.getTooltip(i,this._dataSource),p&&r._setTooltip(y,p,16)),s.appendChild(y)),this._drawGutterCell(n,t,i,u,f)),o=n.row,o.innerHTML="",o.style.top=t*this._measurements.rowHeight+"px",o.style.left=this._measurements.gutterWidth+"px",o.style.height=this._measurements.rowHeight+"px",o.style.width=isNaN(this._contentSize.width)?"":this._contentSize.width+2+"px",w=this._columns,c=0,k=w.length;c<k;c++)(l=w[c],l.hidden)||(b=l.getCellContents(n,i,u,f,l,d,c),b&&o.appendChild(b));r.makeElementUnselectable(o);this._gutter&&r.makeElementUnselectable(s);this._updateRowSelectionStyle(n,this._selectedRows,this._selectedIndex);o.removeEventListener("DOMAttrModified",this._onAriaExpandedModifiedHandler);u!==0&&(o.setAttribute("aria-expanded",u>0?"true":"false"),o.addEventListener("DOMAttrModified",this._onAriaExpandedModifiedHandler))},r.prototype._drawGutterCell=function(){},r.prototype._drawCell=function(n,t,i,u,f,e,o){var p=f.width||20,c,h,s=this.createElementWithClass("div","grid-cell"),l,w,b,nt,a,k,v,d,g,y;if(s.style.width=isNaN(p)?String(p):p+"px",l=this._dataSource[t],b=!!(f.hasMoreColumn&&l&&l.hasMoreText),f.cellDecorator&&!b?(nt=this._dataSource[t],f.cellDecorator(s,nt)):(b?(c=this._onHasMoreClick.bind(this,l),h=l.hasMoreText):(typeof f.hrefIndex!="undefined"&&(c=this.getColumnValue(t,f.hrefIndex,-1)),h=this.getColumnText(t,f,o),w=this.getColumnText(t,f,o,!0)),f.hasHTMLContent||r._setTooltip(s,w?w:h,65),c?(a=document.createElement("a"),typeof c=="function"?a.onclick=c:a.setAttribute("href",c),a.textContent=h,s.appendChild(a)):h?f.hasHTMLContent?s.innerHTML=h:s.textContent=h:s.innerHTML="&nbsp;"),o===e&&u>0&&(k=u*16-13,f.indentOffset=k,i!==0&&(v=this.createElementWithClass("div","icon grid-tree-icon"),v.style.left=k+"px",s.appendChild(v),i>0?v.classList.add("icon-tree-expanded"):v.classList.add("icon-tree-collapsed")),s.style.textIndent=u*16+"px"),f.getCellCSSClass&&(d=f.getCellCSSClass(t,f.index,o,this._dataSource),d))for(g=d.trim().split(" "),y=0;y<g.length;y++)s.classList.add(g[y]);return f.rowCss&&s.classList.add(f.rowCss),s},r.prototype._drawHeader=function(){var c=this,o=this._columns,l=this._sortOrder,e,i,s,n,t,u,f,h;if(this._header){for(e=document.createDocumentFragment(),i=0,s=o.length;i<s;i++)(n=o[i],n.hidden)||(t=this.createElementWithClass("div","grid-header-column"),r._setTooltip(t,n.tooltip,65),t.style.width=(n.width||20)+"px",t._data={columnIndex:i,header:!0},u=this.createElementWithClass("div","separator"),n.fixed&&(u.style.cursor="auto"),u._data={columnIndex:i,separator:!0},t.appendChild(u),f=n.getHeaderCellContents(n,i),n.headerCss&&f.classList.add(n.headerCss),n.tooltip&&r._setTooltip(f,n.tooltip,65),t.appendChild(f),h=this.createElementWithClass("div","sort-handle"),l.forEach(function(i){if(i.index===n.index)return c._setSortOrderClass(t,i.order),!1}),this.setGutterHeaderSortOrder(),t.appendChild(h),e.appendChild(t));this._headerCanvas.innerHTML="";this._headerCanvas.appendChild(e);r.makeElementUnselectable(this._header)}},r.prototype._drawHeaderCellValue=function(n,t){var i=document.createElement("div");return i.classList.add("title"),i.innerText=n.text||"",t!==this._indentIndex||typeof this._indentLevels=="undefined"||this._indentLevels===null||i.classList.add("indented-title"),i},r.prototype._layoutContentSpacer=function(){for(var t,r,u,n=0,f=this._columns,i=0,e=f.length;i<e;i++)f[i].hidden||(n+=(f[i].width||20)+this._measurements.cellOffset);n=n+2;t=Math.max(1,this._expandedCount*this._measurements.rowHeight);this._contentSpacer.style.width=n+"px";this._contentSpacer.style.height=t+"px";this._gutter&&(this._gutter.style.height=t+"px");this._ignoreScroll=!0;try{r=Math.max(0,Math.min(this._scrollTop,t-this._canvasHeight));r!==this._scrollTop&&(this._scrollTop=r,this._canvas.scrollTop=r);u=Math.max(0,Math.min(this._scrollLeft,n-this._canvasWidth));u!==this._scrollLeft&&(this._scrollLeft=u,this._canvas.scrollLeft=u)}finally{this._ignoreScroll=!1}this._contentSize.width=n;this._contentSize.height=t},r.prototype._layoutHeader=function(){this._header&&(this._headerCanvas.style.left=this._measurements.gutterWidth-this._scrollLeft+"px");this._gutter&&(this._gutter.style.left=this._scrollLeft+"px")},r.prototype._fixScrollPos=function(){var n=this._ignoreScroll;this._ignoreScroll=!0;try{this._canvas.scrollLeft=this._scrollLeft;this._canvas.scrollTop=this._scrollTop}finally{this._ignoreScroll=n}},r.prototype._redraw=function(n){this._layoutHeader();this._updateViewport(n)},r.prototype._getExpandState=function(n){var t=0;return this._expandStates&&typeof this._expandStates[n]=="number"&&(t=this._expandStates[n]),t},r.prototype._selectRow=function(n,t,i){var r=i&&i.ctrl,u=i&&i.shift,f=i&&i.rightClick;r?this._addSelection(n,t,{toggle:!0}):u?(this._clearSelection(),this._addSelectionRange(n,t)):f?this._selectedRows&&this._selectedRows.hasOwnProperty(n)?(this._selectedIndex=n,this._updateAriaAttribute()):(this._clearSelection(),this._addSelection(n,t)):(this._clearSelection(),this._addSelection(n,t))},r.prototype._selectAll=function(){if(this._count>0&&this._options.allowMultiSelect!==!1){this._clearSelection();this._selectionStart=0;var n=Math.max(0,this._selectedIndex);this._addSelectionRange(this._count-1,undefined,{doNotFireEvent:!0});this._selectedIndex=n;this._updateSelectionStyles();this._selectionChanged()}},r.prototype._clearSelection=function(){this._selectionCount=0;this._selectedRows=null},r.prototype._addSelection=function(n,t,i){var u=i&&i.keepSelectionStart,e=i&&i.doNotFireEvent,o=i&&i.toggle,f=!1,r;this._options.allowMultiSelect===!1&&(u=!1,f=this._selectedRows?this._selectedRows.hasOwnProperty(n):!1,this._clearSelection());f||(this._selectedRows||(this._selectedRows={}),n>=0?(r=!0,this._selectedRows.hasOwnProperty(n)?o&&(r=!1,this._selectionCount=Math.max(0,this._selectionCount-1),delete this._selectedRows[n]):this._selectionCount++,typeof t!="number"&&(t=this._getDataIndex(n)),r&&(this._selectedRows[n]=t),this._selectedIndex=n,this._updateAriaAttribute(),(this._selectionStart<0||!u)&&(this._selectionStart=n)):(t=-1,this._selectedIndex=-1));e||(this._updateSelectionStyles(),this._selectionChanged(),this._selectedIndexChanged(this._selectedIndex,t))},r.prototype._addSelectionRange=function(n,t,i){var h=i&&i.doNotFireEvent,o=-1,f,u,s,r,e;if(this._options.allowMultiSelect===!1)this._addSelection(n,t);else{for(this._selectedRows&&(o=this._selectedRows[this._selectedIndex]),this._selectionStart<0&&(this._selectionStart=n),u=Math.min(this._selectionStart,n),s=Math.max(this._selectionStart,n),(typeof t!="number"||u!==n)&&(t=this._getDataIndex(u)),r=u;r<=s;r++)this._addSelection(r,t,{keepSelectionStart:!0,doNotFireEvent:!0}),r===n&&(f=t),e=this._getExpandState(t),e<0?t+=1-e:t++;this._selectedIndex=n;this._updateAriaAttribute();h||(this._updateSelectionStyles(),this._selectionChanged(),o!==f&&this._selectedIndexChanged(this._selectedIndex,f))}},r.prototype._updateAriaAttribute=function(){var i=this._getDataIndex(this._selectedIndex),n,t,r;if(i>=0)if(n=this.getRowInfo(i),n&&n.row){t=n.row.getAttribute("id");t!==this._activeAriaId&&(r=this._getAriaLabelForRow(n),n.row.setAttribute("aria-label",r),this._activeAriaId=t);try{this._canvasContainsFocus?n.row.setActive():n.row.focus()}catch(u){}}else this._updateAriaOnViewportUpdate=!0},r.prototype._getAriaLabelForRow=function(n){var t="",a=n.rowIndex,r=n.dataIndex,c=0,l=0,u,f,e,i,s,o,h;for(this._expandStates&&(c=this._expandStates[r],l=this._indentLevels[r]),this._gutter&&(u=this._options.gutter,u.getTooltip&&(f=u.getTooltip(r,this._dataSource),f&&(t&&(t+=", "),t+=f))),e=this._columns,i=0,s=e.length;i<s;i++)(o=e[i],o.hidden)||(h=this.getColumnText(r,o,i),t&&(t+=", "),t+=h);return t},r.prototype._updateSelectionStyles=function(){var n=this;this._delayedUpdateCookie&&window.clearTimeout(this._delayedUpdateCookie);this._delayedUpdateCookie=window.setTimeout(function(){var t,u=n._selectedRows,f=n._selectedIndex,i=n._rows,r;for(t in i)r=i[t],n._updateRowSelectionStyle(r,u,f)},10)},r.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}])},r.prototype._selectedIndexChanged=function(n,t){this.selectedIndexChanged(n,t);this.fireCustomEvent(this._element,r.EVENT_SELECTED_INDEX_CHANGED,[n,t])},r.prototype._updateRowSelectionStyle=function(n,t,i){var e=n.rowIndex,r=n.row,f=n.gutterRow,u;r.classList.remove("grid-row-selected");r.classList.remove("grid-row-selected-blur");r.classList.remove("grid-row-current");r.setAttribute("tabindex","-1");f&&(u=f.querySelector("input.checkbox"),u&&u.setAttribute("checked",String(!1)));t&&t.hasOwnProperty(e)&&(f&&(u=f.querySelector("input.checkbox"),u&&u.setAttribute("checked",String(!1))),this._active?r.classList.add("grid-row-selected"):r.classList.add("grid-row-selected-blur"));e===i&&(r.classList.add("grid-row-current"),this._rowSelectedCallback&&this._rowSelectedCallback())},r.prototype._measureCanvasSize=function(){this._canvasHeight=this._canvas.clientHeight;this._canvasWidth=this._canvas.clientWidth},r.prototype._onContainerResize=function(){this.layout()},r.prototype._setupMoveEvents=function(){var n=this;document.addEventListener("mousemove",function(t){return n._onDocumentMouseMove(t)});document.addEventListener("mouseup",function(t){return n._onDocumentMouseUp(t)})},r.prototype._clearMoveEvents=function(){document.removeEventListener("mousemove",null,!0);document.removeEventListener("mouseup",null,!0)},r.prototype._onDocumentMouseMove=function(n){var t=this._columnSizing;if(t&&t.active===!0){var i=n.pageX-t.origin,r=Math.max(15,t.originalWidth+i),u=this._columns[t.index];u.width=r;this._applyColumnSizing(t.index);this._moveSizingElement(t.index)}},r.prototype._onDocumentMouseUp=function(){var n=this;return window.setTimeout(function(){n._tryFinishColumnSizing(!1)},0),!1},r.prototype._onHeaderMouseDown=function(n){var t,i,r;return n.which!==1?!0:(t=this.findClosestElement(n.target,".separator"),t&&t._data&&(i=t._data.columnIndex,r=this._columns[i],!r.fixed)?(this._columnSizing=new y(!0,i,r.width,n.pageX),this._moveSizingElement(i),this._setupMoveEvents(),n.stopImmediatePropagation(),n.preventDefault(),!1):void 0)},r.prototype._onHeaderMouseUp=function(){return!1},r.prototype._onHeaderClick=function(n){var i=this.findClosestElement(n.target,".grid-header-column"),r,u,t;if(i&&!this._columnSizing){if(r=this.findClosestElement(n.target,".separator"),r&&r._data)return!1;i._data&&(u=i._data.columnIndex,t=this._columns[u],t.canSortBy&&!t.fixed&&this._sortBy(t,n.shiftKey))}},r.prototype._onHeaderDblClick=function(n){var i=this.findClosestElement(n.target,".separator");if(i&&i._data){this._tryFinishColumnSizing(!0);var r=i._data.columnIndex,t=this._columns[r],u=Math.max(t.maxLength||0,3),f=1.1+.7*Math.exp(-u/20),e=t.width;return t.width=(t.indentOffset||0)+Math.round(u*f*this._measurements.unitEx),this._applyColumnSizing(r,e,!0),!1}},r.prototype._onHasMoreClick=function(n){for(var f,e,o=this,u,r,i,t=0;t<this._dataSource.length;t++)if(this._dataSource[t]===n){i=t;break}if(typeof i!="undefined"){if(i<this._expandStates.length)for(t=i-1;t>=0;t--)if(f=Math.abs(this._expandStates[t]),f>=i-t){r=t;break}typeof r!="undefined"&&(u=this._dataSource[r],e=this.getExpansionPath(r),this._getLoadMoreChildDataCallback(u,e,function(n,t){n!==null&&o._adjustForDynamicData(n.itemsWithPlaceholders,n.expandStates,r,i,t)}))}},r.prototype._moveSizingElement=function(n){var r=this._measurements.gutterWidth,t,i;if(!this._sizingElement){if(n<0)return;this._sizingElement=this.createElementWithClass("div","grid-column-sizing");this._canvas.appendChild(this._sizingElement)}if(this._sizingElement.style.height=this._canvas.clientHeight-1+"px",this._sizingElement.style.top=this._scrollTop+"px",n<0)this._sizingElement.style.left="-5000px",this._sizingElement.style.top="-5000px",this._sizingElement.style.height="0px";else{for(t=0;t<=n;)i=this._columns[t++],i.hidden||(r+=i.width);this._sizingElement.style.left=r-1+"px"}},r.prototype._getVisibleColumnIndex=function(n){var t=0,i=0,r=this._columns.length;if(this._columns[n].hidden)return-1;while(t<n)this._columns[t].hidden||i++,t++;return i},r.prototype._applyColumnSizing=function(n,t,i){var e=this._getVisibleColumnIndex(n)+1,r=this._columns[n],u=!1,f;t=t||-1;r&&(u=r.width!==t,f=this.rootElement.querySelector(".grid-header-canvas .grid-header-column:nth-child("+e+")"),f.style.width=r.width+"px");i===!0&&(u&&this.layout(),this._onColumnResize(r))},r.prototype._onColumnResize=function(n){this.fireCustomEvent(this._element,"columnresize",[n])},r.prototype._tryFinishColumnSizing=function(n){var t=this._columnSizing;t&&(t.active===!0&&(n||this._applyColumnSizing(t.index,t.originalWidth,!0),this._moveSizingElement(-1)),this._columnSizing=null,this._clearMoveEvents())},r.prototype._getSortColumns=function(n){for(var r,u,f=this._columns,i=[],t=0,e=n.length;t<e;t++)u=n[t],f.forEach(function(n){if(n.index===u.index)return r=n,!1}),i.push(r);return i},r.prototype._sortBy=function(n,t){var i=this._sortOrder.slice(0),f=!1,u,o,r,s;if(n){for(u=0,o=i.length;u<o;u++)if(r=i[u],r.index===n.index){i.splice(u,1);f=!0;break}r=f?new e(r.index,r.order==="asc"?"desc":"asc"):new e(n.index,"asc");t&&this._options.allowSortOnMultiColumns?i.push(r):i=[r]}s=this._getSortColumns(i);this._onSort(i,s)},r.prototype._onSort=function(n,t){this.onSort(n,t)!==!1&&this.fireCustomEvent(this._element,"sort",[{sortOrder:n,sortColumns:t}])},r.prototype._trySorting=function(n,t){var y=this,s,h,c,l,e,a,i,f,v;t||(t=this._getSortColumns(n));s=[];h=0;for(c in this._selectedRows)f=this._selectedRows[c],l=this._dataSource[f],l&&(s.push(l),h+=parseInt(c));for(e=new o(null,null),r.addItemsToTree(this._dataSource,this._expandStates,0,this._dataSource.length,e),this._sortOrder&&this._sortOrder.length===1&&n.length===1&&this._sortOrder[0]!==n[0]&&this._sortOrder[0].index===n[0].index?this._sortOrder[0].order!==n[0].order&&r.walkTree(e,function(i){u.TreeNodeSort.stableReverse(i.children,function(i,r){return u.TreeNodeSort.sortComparer(n,t,i.data,r.data)})}):r.walkTree(e,function(i){i.children.sort(function(i,r){return u.TreeNodeSort.sortComparer(n,t,i.data,r.data)})}),this._dataSource=[],this._expandStates=[],i=0;i<e.children.length;i++)r.walkTree(e.children[i],function(n){y._dataSource.push(n.data);y._expandStates.push(n.expandState)});if(this._indentLevels=r.expand(this._expandStates),this._updateRanges(),this._selectionCount>0){for(this._clearSelection(),a=0,i=0;i<s.length;i++)f=this._dataSource.indexOf(s[i]),f>=0&&(v=this._getRowIndex(f),this._addSelection(v,f),a+=v);this._scrollTop+=(a-h)/this._selectionCount*this._measurements.rowHeight}},r.prototype._onCanvasScroll=function(){var n=this._canvas;return this._resetScroll=!0,this._scrollLeft=n.scrollLeft,this._scrollTop=n.scrollTop,this._ignoreScroll||this._redraw(),!1},r.prototype._getClickedCell=function(n){return this.findClosestElement(n.target,".grid-cell")},r.prototype._createEditCellBox=function(n,t,i,r){function e(f){var e=u.value;return i.innerText=e,r?(r(e,n,t),f.stopPropagation(),f.preventDefault(),!1):void 0}var f=i.innerText,u=this.createElementWithClass("input","grid-edit-box");u.setAttribute("type","text");u.setAttribute("value",f);u.addEventListener("focusout",function(n){e(n)});u.addEventListener("keydown",function(n){if(n.keyCode===13)e(n);else if(n.keyCode===27)return i.innerText=f,n.stopPropagation(),n.preventDefault(),!1});i.innerHTML="";i.appendChild(u);u.select();u.focus()},r.prototype._onEditCell=function(n){var e=n.target,t,r,i;if(!e.classList.contains("grid-tree-icon")&&(t=this._getClickedCell(n),t&&t.classList.contains("grid-cell-editable")&&(r=this.getRowInfoFromEvent(n,".grid-row"),r))){var u=r.row.children,o=u.length,f=-1;for(i=0;i<o;i++)t===u[i]&&(f=i);this._createEditCellBox(r.dataIndex,f,t,this._editCellCallback)}},r.prototype._onRowMouseDown=function(n){var t=this.getRowInfoFromEvent(n,".grid-row"),i;t&&(i=n.target,n.which===1&&i.classList.contains("grid-tree-icon")?this._onToggle(t):n.which===3&&this._options&&this._options.disableRightClickSelection||this._selectRow(t.rowIndex,t.dataIndex,{ctrl:n.ctrlKey,shift:n.shiftKey,rightClick:n.which===3}))},r.prototype._onGutterClick=function(n){var t=this.getRowInfoFromEvent(n,".grid-gutter-row");t&&(this._selectedRows&&typeof this._selectedRows[t.rowIndex]=="number"||this._selectRow(t.rowIndex,t.dataIndex))},r.prototype._onBlur=function(n){var t=n.target;if(t.classList.contains("grid-edit-box")){n.stopPropagation();return}this._active=!1;this._updateSelectionStyles()},r.prototype._onFocus=function(n){var t=n.target;if(t.classList.contains("grid-edit-box")){n.stopPropagation();return}this._active=!0;this._updateSelectionStyles();this._updateAriaAttribute()},r.prototype._onKeyDown=function(t){var i={lo:-1,hi:-1},h=n.KeyCodes,s=this._canvas,f,o,r,u,e;if(this._options.isGridDisabled)return!1;if(this._copyInProgress)return t.keyCode===27&&this._cancelable&&this._cancelable.cancel(),!1;this._count>0&&(i={lo:0,hi:this._expandedCount-1});f=!1;switch(t.keyCode){case 65:if(t.ctrlKey)this._selectAll();else return!0;break;case 40:this._clearSelection();t.ctrlKey?t.shiftKey?this._addSelectionRange(i.hi):this._addSelection(i.hi):t.shiftKey?this._addSelectionRange(Math.min(this._selectedIndex+1,i.hi)):this._addSelection(Math.min(this._selectedIndex+1,i.hi));break;case 38:this._clearSelection();t.ctrlKey?t.shiftKey?this._addSelectionRange(i.lo):this._addSelection(i.lo):t.shiftKey?this._addSelectionRange(Math.max(this._selectedIndex-1,i.lo)):this._addSelection(Math.max(this._selectedIndex-1,i.lo));break;case 34:case 33:o=s.clientHeight;r=Math.floor(o/this._measurements.rowHeight);this._clearSelection();t.keyCode===34?t.shiftKey?this._addSelectionRange(Math.min(this._selectedIndex+r,i.hi)):this._addSelection(Math.min(this._selectedIndex+r,i.hi)):t.shiftKey?this._addSelectionRange(Math.max(this._selectedIndex-r,i.lo)):this._addSelection(Math.max(this._selectedIndex-r,i.lo));break;case 39:this.tryToggle(!0,t.shiftKey)||this._expandStates[this._getDataIndex(this._selectedIndex)]===0?(this._clearSelection(),this._addSelection(this._selectedIndex)):this._addSelection(Math.min(this._selectedIndex+1,i.hi));break;case 37:if(this.tryToggle(!1,t.shiftKey))this._clearSelection(),this._addSelection(this._selectedIndex);else{if(u=this._selectedIndex,this._indentLevels!==null)for(e=this._indentLevels[this._getDataIndex(this._selectedIndex)];e>1&&u>i.lo&&this._indentLevels[this._getDataIndex(u)]>=e;)--u;this._addSelection(Math.max(u,i.lo))}break;case 36:this._clearSelection();t.shiftKey?this._addSelectionRange(i.lo):this._addSelection(i.lo);break;case 35:this._clearSelection();t.shiftKey?this._addSelectionRange(i.hi):this._addSelection(i.hi);break;case 9:document.activeElement!==this.getElement()&&this.getElement().setActive();f=!0;break;default:f=!0}return this.getSelectedRowIntoView(),f||t.preventDefault(),!1},r.prototype._onToggle=function(n){if(this._expandStates){var t=this._expandStates[n.dataIndex];t!==0&&(t>0?this.collapseNode(n.dataIndex):t<0&&this.expandNode(n.dataIndex),this._clearSelection(),this._addSelection(Math.min(n.rowIndex,this._expandedCount-1),n.dataIndex),this._layoutContentSpacer(),this._redraw())}},r.TYPE_NAME="GridControl",r.MAX_COPY_SIZE=1e3,r.PAYLOAD_SIZE=200,r.EVENT_SELECTED_INDEX_CHANGED="selectedIndexChanged",r.GlobalGridInstanceNumber=0,r}(i.Control);r.GridControl=p})(r=i.Grid||(i.Grid={}))})(r=i.Legacy||(i.Legacy={}))})(i=n.Controls||(n.Controls={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function t(t,r,u){this._rootContainer=document.createElement("div");this._rootContainer.className="BPT-sourceInfoTooltip";r&&u&&(this.addDiv("sourceInfoNameLabel",i.Resources.getString(u)),this.addDiv("sourceInfoName",r));this.addDiv("sourceInfoFileLabel",i.Resources.getString("SourceInfoFileLabel"));this.addDiv("sourceInfoFile",t.source);this.addDiv("sourceInfoLineLabel",i.Resources.getString("SourceInfoLineLabel"));this.addDiv("sourceInfoLine",n.FormattingHelpers.getDecimalLocaleString(t.line,!0));this.addDiv("sourceInfoColumnLabel",i.Resources.getString("SourceInfoColumnLabel"));this.addDiv("sourceInfoColumn",n.FormattingHelpers.getDecimalLocaleString(t.column,!0))}return Object.defineProperty(t.prototype,"html",{get:function(){return this._rootContainer.outerHTML},enumerable:!0,configurable:!0}),t.prototype.addDiv=function(n,t){var i=document.createElement("div");i.className=n;i.textContent=t;this._rootContainer.appendChild(i)},t}();t.SourceInfoTooltip=r})(i=t.Legacy||(t.Legacy={}))})(t=n.Controls||(n.Controls={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(){}return Object.defineProperty(n,"isAvailable",{get:function(){return!!t.F12},enumerable:!0,configurable:!0}),n.selectDomElement=function(n){t.F12&&t.F12.Communications.fireEvent("toolMessage",t.F12.PluginId.Dom,{type:"selectDomElement",uidChain:n})},n.highlightElement=function(n){t.F12&&t.F12.Communications.fireEvent("toolMessage",t.F12.PluginId.Dom,{type:"highlightDomElement",uidChain:n})},n.clearHighlight=function(){t.F12&&t.F12.Communications.fireEvent("toolMessage",t.F12.PluginId.Dom,{type:"removeDomHighlight"})},n}();n.DomHelper=i})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i;(function(n){var i=function(){function n(){this._proxy=t.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Package.Extensions.DiagnosticsHelper",{},!0)}return n.prototype.getFileContents=function(n){return this._proxy._call("getFileContents",n)},n}(),r,u;n.HelperProxy=i;r=function(){function n(){this._agentGuid=new Microsoft.VisualStudio.DiagnosticsHub.Guid("8C0C6320-37F1-11E3-8259-6C3BE516EAD0");this._eventManager=new t.Utilities.EventManager;this._isAttached=!1;this._privatePorts={};this._helper=new i;this._standardCollector=Microsoft.VisualStudio.DiagnosticsHub.Collectors.getStandardTransportService();this._standardCollector&&this._standardCollector.addMessageListener(this._agentGuid,this.onMessageReceived.bind(this))}return n.prototype.addEventListener=function(n,t){this._eventManager.addEventListener(n,t)},n.prototype.createPort=function(){throw new Error(t.Resources.getErrorString("JSPerf.1028"))},n.prototype.isAttached=function(){return t.Promise.as(this._isAttached)},n.prototype.loadScriptInProc=function(t){var i=this,r=document.location.href.substring(0,document.location.href.lastIndexOf("/")),u=r+"/"+t,f=n.getFileName(t);this._helper.getFileContents(u).done(function(n){var t={commandName:"loadScriptInProc",fileName:f,script:n},r=JSON.stringify(t);i.sendMessage(r)})},n.prototype.removeEventListener=function(n,t){this._eventManager.removeEventListener(n,t)},n.getFileName=function(n){var t=n.lastIndexOf("/");return t==-1&&(t=n.lastIndexOf("\\")),t>-1&&(n=n.substring(t+1)),n},n.prototype.createPortInternal=function(n){var u=this;if(this._privatePorts.hasOwnProperty(n))throw new Error(t.Resources.getErrorString("JSPerf.1029"));var i={isConnected:!1,eventManager:new t.Utilities.EventManager},f={name:n,postMessage:function(r){if(i.isConnected){var f={commandName:"message",portName:n,jsonData:r},e=JSON.stringify(f);u.sendMessage(e)}else throw new Error(t.Resources.getErrorString("JSPerf.1030"))},addEventListener:i.eventManager.addEventListener.bind(i.eventManager),removeEventListener:i.eventManager.removeEventListener.bind(i.eventManager)},r={internalData:i,port:f};return this._privatePorts[n]=r,r},n.prototype.onMessageReceived=function(n){var i,r,f,u;if(n&&(i=JSON.parse(n),r=null,i.eventName))switch(i.eventName){case"attach":this._isAttached=!0;this._eventManager.dispatchEvent(i.eventName);break;case"connect":if(f=i,!f.portName)throw new Error(t.Resources.getErrorString("JSPerf.1031"));u=this.createPortInternal(f.portName);u.internalData.isConnected=!0;this._eventManager.dispatchEvent(i.eventName,u.port);break;case"detach":this._isAttached=!1;this._eventManager.dispatchEvent(i.eventName);break;case"message":if(r=i,!r.portName)throw new Error(t.Resources.getErrorString("JSPerf.1032"));u=this._privatePorts[r.portName];u&&(r={data:r.jsonData},u.internalData.eventManager.dispatchEvent("message",r));break;default:this._eventManager.dispatchEvent(i.eventName)}},n.prototype.sendMessage=function(n){this._standardCollector.sendStringToCollectionAgent(this._agentGuid.toString(),n).done(function(n){if(n){var t=JSON.parse(n);if(!t.succeeded)throw new Error(t.errorMessage)}})},n}();n.HubDiagnosticSession=r;u=function(){function n(n){this._externalObj=n}return n.prototype.addEventListener=function(n,t){this._externalObj.addEventListener(n,t)},n.prototype.createPort=function(){throw new Error(t.Resources.getErrorString("JSPerf.1028"))},n.prototype.isAttached=function(){return t.Promise.as(this._externalObj.isAttached)},n.prototype.loadScriptInProc=function(n){try{this._externalObj.loadScriptInProc(n)}catch(t){return}},n.prototype.removeEventListener=function(n,t){this._externalObj.removeEventListener(n,t)},n}();n.F12DiagnosticsSession=u})(i=n.Diagnostics||(n.Diagnostics={}))})(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var i=Microsoft.Plugin,r=function(){function n(){}return n.getSwimlaneViewStateService=function(){return n._swimlaneVisibilityService||(n._swimlaneVisibilityService=new t),n._swimlaneVisibilityService},n}(),t;n.SwimlaneViewStateServiceFactory=r;t=function(){function n(){this._swimlaneVisibilityMap=new Map}return n.prototype.getSwimlaneVisibility=function(n){return i.Promise.wrap(this.getSwimlaneVisibilitySynchronous(n))},n.prototype.getSwimlaneVisibilitySynchronous=function(n){var t=this._swimlaneVisibilityMap.get(n);return t===undefined&&(this._swimlaneVisibilityMap.set(n,!0),t=!0),t},n.prototype.setSwimlaneVisibility=function(n,t){this._swimlaneVisibilityMap.set(n,t)},n}();n.SwimlaneVisibilityService=t})(t=n.Common||(n.Common={}))})(PerfTools||(PerfTools={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(){}return n.GetName=function(n,t){var i,r,u;if(n)for(r in n)if(n.hasOwnProperty(r)&&(u=n[r],u===t)){i=r;break}return i||(i=t.toString()),i},n.Parse=function(n,t,i){var f,r,u;if(i===void 0&&(i=!0),n){i&&(t=t.toLowerCase());for(r in n)if(n.hasOwnProperty(r)&&(u=r.toString(),i&&(u=u.toLowerCase()),t===u)){f=n[r];break}}return f},n.GetValues=function(n){var r=[],t,i;if(n)for(t in n)n.hasOwnProperty(t)&&(i=n[t],typeof i=="number"&&r.push(i));return r},n}();n.Enum=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(n){var t,i;if(this._events={},this._listeners={},n&&n.length>0)for(t=0;t<n.length;t++)i=n[t],i&&(this._events[i]=i);else throw Error("Events are null or empty.")}return n.prototype.addEventListener=function(n,t){var i,r;n&&t&&(i=this._events[n],i&&(r=this._listeners[i]?this._listeners[i]:this._listeners[i]=[],r.push(t)))},n.prototype.removeEventListener=function(n,t){var i,r;if(n&&t&&(i=this._listeners[n],i))for(r=0;r<i.length;r++)if(t===i[r]){i.splice(r,1);break}},n.prototype.invokeListener=function(n){var t,i,r;if(n.type&&(t=this._listeners[n.type],t))for(i=0;i<t.length;i++)r=t[i],r&&r(n)},n}();n.Publisher=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var i,r,u,t;(function(n){n[n.General=0]="General";n[n.String=1]="String";n[n.Number=2]="Number";n[n.Html=3]="Html";n[n.HtmlTagName=4]="HtmlTagName";n[n.HtmlTagDelimiter=5]="HtmlTagDelimiter";n[n.HtmlAttributeName=6]="HtmlAttributeName";n[n.HtmlAttributeValue=7]="HtmlAttributeValue";n[n.EqualOperator=8]="EqualOperator"})(n.TokenType||(n.TokenType={}));i=n.TokenType,function(n){n[n.PreHtmlString=1]="PreHtmlString";n[n.StartDelimiter=2]="StartDelimiter";n[n.TagName=3]="TagName";n[n.IdAttribute=4]="IdAttribute";n[n.IdEqualToToken=5]="IdEqualToToken";n[n.IdAttributeValue=6]="IdAttributeValue";n[n.ClassAttribute=7]="ClassAttribute";n[n.ClassEqualToToken=8]="ClassEqualToToken";n[n.ClassAttributeValue=9]="ClassAttributeValue";n[n.SrcAttribute=10]="SrcAttribute";n[n.SrcEqualToToken=11]="SrcEqualToToken";n[n.SrcAttributeValue=12]="SrcAttributeValue";n[n.EndDelimiter=13]="EndDelimiter";n[n.PostHtmlString=14]="PostHtmlString"}(n.HtmlRegexGroup||(n.HtmlRegexGroup={}));r=n.HtmlRegexGroup,function(n){n[n.LeftHandSide=1]="LeftHandSide";n[n.EqualToOperator=2]="EqualToOperator";n[n.RightHandSide=3]="RightHandSide";n[n.PostString=4]="PostString"}(n.AssignmentRegexGroup||(n.AssignmentRegexGroup={}));u=n.AssignmentRegexGroup;t=function(){function n(){}return n.getHtmlTokens=function(t){var r=[],i;return t?(i=n.HTML_REGEX.exec(t),i?(i[1]&&r.push({type:0,value:i[1].toString()}),i[2]&&r.push({type:5,value:i[2].toString()}),i[3]&&r.push({type:4,value:i[3].toString()}),i[4]&&r.push({type:6,value:i[4].toString()}),i[5]&&r.push({type:8,value:i[5].toString()}),i[6]!==undefined&&r.push({type:7,value:i[6].toString()}),i[7]&&r.push({type:6,value:i[7].toString()}),i[8]&&r.push({type:8,value:i[8].toString()}),i[9]!==undefined&&r.push({type:7,value:i[9].toString()}),i[10]&&r.push({type:6,value:i[10].toString()}),i[11]&&r.push({type:8,value:i[11].toString()}),i[12]!==undefined&&r.push({type:7,value:i[12].toString()}),i[13]&&r.push({type:5,value:i[13].toString()}),i[14]&&r.push({type:0,value:i[14].toString()})):r.push({type:0,value:t}),r):r},n.getStringTokens=function(t){var r=[],i;return t?(i=n.STRING_REGEX.exec(t),i?(i[1]&&r.push({type:0,value:i[1].toString()}),i[2]&&r.push({type:0,value:i[2].toString()}),i[3]&&r.push({type:1,value:i[3].toString()}),i[4]&&r.push({type:0,value:i[4].toString()})):r.push({type:0,value:t}),r):r},n.getNumberTokens=function(t){var r=[],i;return t?(i=n.NUMBER_REGEX.exec(t),i?(i[1]&&r.push({type:0,value:i[1].toString()}),i[2]&&r.push({type:0,value:i[2].toString()}),i[3]&&r.push({type:2,value:i[3].toString()}),i[4]&&r.push({type:0,value:i[4].toString()})):r.push({type:0,value:t}),r):r},n.getCssClass=function(n){switch(n){case 1:return"valueStringToken-String";case 2:return"valueStringToken-Number";case 4:return"perftools-Html-Element-Tag";case 6:return"perftools-Html-Attribute";case 7:return"perftools-Html-Value";case 5:return"perftools-Html-Tag";case 8:return"perftools-Html-Operator";default:return""}},n.isHtmlExpression=function(t){return n.GENERAL_HTML_REGEX.test(t)},n.isStringExpression=function(t){return n.STRING_REGEX.test(t)},n.GENERAL_HTML_REGEX=/^<.*>/,n.HTML_REGEX=/(^.*)?(<)([^\s]+)(?:( id)(=)(\".*?\"))?(?:( class)(=)(\".*?\"))?(?:( src)(=)(\".*?\"))?(>)(.*$)?/,n.NUMBER_REGEX=/(.*)?(=)( ?-?\d+(?:.\d+)?)(.*$)?/,n.STRING_REGEX=/(^.*?)(=)( ?\".*\")(.*$)?/,n}();n.TokenExtractor=t})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,r=function(){function n(){this._hostShellProxy=t.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Package.Extensions.Core.HostShell",{},!0)}return n.prototype.setStatusBarText=function(n,t){return this._hostShellProxy._call("setStatusBarText",n,t||!1)},n}(),i;n.HostShellProxy=r;i=function(){function n(){}return n.prototype.setStatusBarText=function(){return t.Promise.as(null)},n}();n.LocalHostShell=i})(t=n.Extensions||(n.Extensions={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
Notifications=function(){function n(){}return Object.defineProperty(n,"isTestMode",{get:function(){return window.TestMode},enumerable:!0,configurable:!0}),Object.defineProperty(n,"notifications",{get:function(){return n._notifications||(n._notifications=new Microsoft.Plugin.Utilities.EventManager),n._notifications},enumerable:!0,configurable:!0}),n.subscribe=function(t,i){n.isTestMode&&n.notifications.addEventListener(t,i)},n.unsubscribe=function(t,i){n.isTestMode&&n.notifications.removeEventListener(t,i)},n.subscribeOnce=function(t,i){if(n.isTestMode){function r(){n.unsubscribe(t,r);i.apply(this,arguments)}n.subscribe(t,r)}},n.notify=function(t,i){n.isTestMode&&n.notifications.dispatchEvent(t,i)},n}();
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(n){if(this._proxy=n,!this._proxy)throw new Error(t.Resources.getErrorString("JSPerf.1074"))}return n.prototype.openPackage=function(n){try{this._proxy.openPackage(n)}catch(i){console&&console.log("failed openPackage call on packager. Message: "+i.message);throw new Error(t.Resources.getErrorString("JSPerf.1077"))}},n.prototype.createPackage=function(i,r){r||(r=this.generateRandomName()+n.DIAGSESSION_EXTENSION);try{this._proxy.createPackage(i,r)}catch(u){console&&console.log("failed createPackage call on packager. Message: "+u.message);throw new Error(t.Resources.getErrorString("JSPerf.1077"))}return r},n.prototype.hasToolData=function(n){try{return this._proxy.hasToolData(n)}catch(i){console&&console.log("failed hadToolData call on packager. Message: "+i.message);throw new Error(t.Resources.getErrorString("JSPerf.1077"))}},n.prototype.addResource=function(n,i,r){try{this._proxy.addResourceToPackage(n,i,r)}catch(u){console&&console.log("failed addResource call on packager. Message: "+u.message);throw new Error(t.Resources.getErrorString("JSPerf.1077"))}},n.prototype.getResourcePathsByType=function(n){try{return this._proxy.getResourcePathsByType(n)}catch(i){console&&console.log("failed getResourcePathsByType call on packager. Message: "+i.message);throw new Error(t.Resources.getErrorString("JSPerf.1077"))}},n.prototype.commit=function(){try{this._proxy.commitPackage()}catch(n){console&&console.log("failed commit call on packager. Message: "+n.message);throw new Error(t.Resources.getErrorString("JSPerf.1077"))}},n.prototype.closePackage=function(){try{this._proxy.closePackage()}catch(n){console&&console.log("failed closePackage call on packager. Message: "+n.message);throw new Error(t.Resources.getErrorString("JSPerf.1077"))}},n.prototype.generateRandomName=function(){return Math.random().toString(36).substring(2)},n.DIAGSESSION_EXTENSION=".diagsession",n}();n.F12Packager=i})(t=n.Data||(n.Data={}))})(Common||(Common={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(){}return n.E_ABORT=-2147467260,n.MINIMUM_REQUIRED_DOCUMENT_MODE=10,n.MEMORY_ANALYZER_SNAPSHOT_RESOURCE_TYPE="MemoryAnalyzer.Resource.Snapshot",n.MEMORY_ANALYZER_TOOL_GUID="BE2D5223-40F7-4428-A9A0-AF888725C1FB",n.UI_RESPONSIVENESS_TOOL_GUID="{0615D892-30B0-4ADA-AFAB-93BFE13D9538}",n}();n.Constants=t,function(n){var t=function(){function n(){}return n.MEMORY_ANALYZER_SNAPSHOT_ROOT_PATH="%localappdata%\\Temp\\Microsoft\\F12\\perftools\\memory\\",n}();n.F12=t}(t=n.Constants||(n.Constants={}))})(Common||(Common={}))
//# sourceMappingURL=CommonMerged.min.js.map
var __extends,Microsoft;(function(n){(function(n){(function(n){"use strict";var t=function(){function n(){this._eventListeners=[]}return n.prototype.invokeEvent=function(n){this._eventListeners.forEach(function(t){return t(n)})},n.prototype.addEventListener=function(n){this._eventListeners.push(n)},n.prototype.removeEventListener=function(n){var t=this._eventListeners.indexOf(n);t>-1&&this._eventListeners.splice(t,1)},n.prototype.dispose=function(){this._eventListeners=null},n}();n.AggregatedEvent=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio})(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";(function(n){var t=function(){function n(){}return n.isUndefined=function(){},n.isNotUndefined=function(){},n.isNull=function(){},n.isNotNull=function(){},n.isTrue=function(){},n.isFalse=function(){},n.fail=function(){},n.isDebugBuild=function(){return!1},n}();n.Assert=t})(n.Debug||(n.Debug={}));var t=n.Debug})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function f(n){return i===null&&(i=new r(n)),i}var r=function(){function t(n){this._postFilters={};this._preFilters={};this._alertFilters={};this._confirmationFilters={};this._logger=n}return t.prototype.getAutomationPromise=function(t,i,r,u){var o=this,e=this._postFilters[t],s=this._preFilters[t],f=null;return s?(f=this.getPreFilterPromise(s,u),f=e?f.then(function(){return o.getPostFilterPromise(e,i,r,u)},function(n){o._logger.error("Error '"+JSON.stringify(n)+"' while executing pre-filter'")}):f.then(function(){return new n.Plugin.Promise(function(n,t,r){i(n,t,r,u)},r)},function(n){o._logger.error("Error '"+JSON.stringify(n)+"' while executing pre-filter'")})):f=e?this.getPostFilterPromise(e,i,r,u):new n.Plugin.Promise(function(n,t,r){i(n,t,r,u)},r),f},t.prototype.getAlertPromise=function(t,i){var r=this._alertFilters[t];return r?r.bypass(i):new n.Plugin.Promise(function(n){window.alert(i);n(!0)})},t.prototype.getConfirmationPromise=function(t,i){var r=this._confirmationFilters[t];return r?r.bypass(i):new n.Plugin.Promise(function(n){n(window.confirm(i))})},t.prototype.addAutomationPostFilter=function(n,t){this.addAutomationFilter(this._postFilters,n,"IAutomationPostFilter",t)},t.prototype.removeAutomationPostFilter=function(n){this.removeAutomationFilter(this._postFilters,n,"IAutomationPostFilter")},t.prototype.addAutomationPreFilter=function(n,t){this.addAutomationFilter(this._preFilters,n,"IAutomationPreFilter",t)},t.prototype.removeAutomationPreFilter=function(n){this.removeAutomationFilter(this._preFilters,n,"IAutomationPreFilter")},t.prototype.addAutomationAlertBypassFilter=function(n,t){this.addAutomationFilter(this._alertFilters,n,"IAutomationAlertBypassFilter",t)},t.prototype.removeIAutomationAlertBypassFilter=function(n){this.removeAutomationFilter(this._alertFilters,n,"IAutomationAlertBypassFilter")},t.prototype.addAutomationConfirmationBypassFilter=function(n,t){this.addAutomationFilter(this._confirmationFilters,n,"IAutomationConfirmationBypassFilter",t)},t.prototype.removeAutomationConfirmationBypassFilter=function(n){this.removeAutomationFilter(this._confirmationFilters,n,"IAutomationConfirmationBypassFilter")},t.prototype.getPreFilterPromise=function(n,t){if(n)return n.onFilter(t);throw"Pre-filter is null or undefined"},t.prototype.removeAutomationFilter=function(n,t,i){if(!t)throw new Error("key is null, undefined or evaluates to false");if(!n)throw new Error("key is null, undefined or evaluates to false");if(!i)throw new Error("automationFilterType is null, undefined or evaluates to false");delete n[t];this._logger.debug(i+" with key '"+t+"' has been removed")},t.prototype.addAutomationFilter=function(n,t,i,r){if(!n)throw new Error("Invalid filterStore");if(!r)throw new Error("Invalid filter");if(!t)throw new Error("Invalid automation key");if(!i)throw new Error("Invalid automation filter type");n[t]&&this._logger.debug("Replacing existing "+i+" with key '"+t+"'");n[t]=r;this._logger.debug(i+" with key '"+t+"' has been added")},t.prototype.getPostFilterPromise=function(t,i,r,u){var f=this;return new n.Plugin.Promise(function(n,r,e){var o=function(i){return t.onComplete(i,u).then(function(){n(i)},function(){f._logger.error("Error occured during execution of post-filter onComplete handler")})},s=function(n){return t.onError(n,u).then(function(){r(n)},function(){f._logger.error("Error occured during execution of post-filter onError handler")})},h=function(n){return t.onProgress(n,u).then(function(){e(n)},function(){f._logger.error("Error occured during execution of post-filter onProgess handler")})};i(o,s,h,u)},r)},t}(),u=function(){function n(){}return n.SearchNoResultsAlertKey="Microsoft.VisualStudio.DiagnosticsHub.CpuUsageTreeGrid.Search",n.SearchNoResultsConfirmationKey="Microsoft.VisualStudio.DiagnosticsHub.CpuUsageTreeGrid.Search",n.DataWarehouseRequestKey="Microsoft.VisualStudio.DiagnosticsHub.DatawarehouseRequest",n}(),i;t.AutomationConstants=u;i=null;t.getAutomationManager=f})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function t(t,i){if(this._isHighNegative=!1,this._isLowNegative=!1,!(typeof t=="number"&&t<4294967296&&t>=-2147483648)||!(typeof i=="number"&&i<4294967296&&i>=-2147483648))throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1000"));t<0&&(t=t>>>0,this._isHighNegative=!0);i<0&&(i=i>>>0,this._isLowNegative=!0);this._value={h:t,l:i}}return Object.defineProperty(t,"oldest",{get:function(){return t.OldestTimestampFormat},enumerable:!0,configurable:!0}),Object.defineProperty(t,"latest",{get:function(){return t.LatestTimestampFormat},enumerable:!0,configurable:!0}),Object.defineProperty(t,"zero",{get:function(){return t.Zero||(t.Zero=new t(0,0)),t.Zero},enumerable:!0,configurable:!0}),Object.defineProperty(t,"one",{get:function(){return t.One||(t.One=new t(0,1)),t.One},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"jsonValue",{get:function(){var n,t;return this._jsonValue||(n=this._value.h,(this._isHighNegative||n>2147483647)&&(n=n<<0),t=this._value.l,(this._isLowNegative||t>2147483647)&&(t=t<<0),this._jsonValue={h:n,l:t}),this._jsonValue},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._stringValue||(this._stringValue=this._value.h>0?"0x"+this._value.h.toString(16)+t.padLeadingZeros(this._value.l.toString(16),8):"0x"+this._value.l.toString(16)),this._stringValue},enumerable:!0,configurable:!0}),t.max=function(n,t){return n.greaterOrEqual(t)?n:t},t.min=function(n,t){return n.greaterOrEqual(t)?t:n},t.add=function(n,i){return t.addition(n,i)},t.subtract=function(n,i){if(i.greater(n))return t.zero;var r=t.convertToManagedTimeFormat(i.jsonValue),u=~r.h,f=~r.l,e=t.addition(new t(u,f),t.one,!0);return t.addition(n,e,!0)},t.multiply=function(n,i){return t.multiplication(n,i)},t.divide=function(n,i){return t.division(n,i,!1)},t.modulo=function(n,i){return t.division(n,i,!0)},t.addNumber=function(n,i){return i<0?t.subtract(n,t.convertFromNumber(-i)):t.addition(n,t.convertFromNumber(i))},t.subtractNumber=function(n,i){return i<0?t.addition(n,t.convertFromNumber(-i)):t.subtract(n,t.convertFromNumber(i))},t.multiplyNumber=function(i,r){if(r<0)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1000"));return t.multiply(i,t.convertFromNumber(r))},t.divideNumber=function(i,r){if(r<0)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1000"));return t.divide(i,t.convertFromNumber(r))},t.moduloNumber=function(i,r){if(r<0)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1000"));return t.modulo(i,t.convertFromNumber(r))},t.convertFromNumber=function(i){var u,r,f;if(i<0||!(i<9007199254740992))throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1000"));return(i=Math.floor(i),u=i&4294967295,i<=4294967295)?new t(0,u):(r=i.toString(16),r=r.substring(0,r.length-8),f=parseInt(r,16),new t(f,u))},t.convertFromBinaryString=function(i){if(!i||i.match("[^10]")||i.length>64)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1000 "+i));var u=0,r=0;return i.length<=32?r=parseInt(i,2):(r=parseInt(i.slice(i.length-32),2),u=parseInt(i.slice(0,i.length-32),2)),new t(u,r)},t.getBinaryString=function(t){var i=t._value.l.toString(2);return t._value.h>0?t._value.h.toString(2)+n.VisualStudio.DiagnosticsHub.BigNumber.padLeadingZeros(i,32):i},t.padLeadingZeros=function(n,t){var i=n,r="00000000";if(i&&t&&t>0){while(t-i.length>=8)i=r+i;i=r.substr(0,t-i.length)+i}return i},t.prototype.equals=function(n){var i=t.convertToManagedTimeFormat(n.jsonValue);return this._value.h===i.h&&this._value.l===i.l},t.prototype.greater=function(n){var i=!1,r=t.convertToManagedTimeFormat(n.jsonValue);return this._value.h>r.h?i=!0:this._value.h===r.h&&this._value.l>r.l&&(i=!0),i},t.prototype.greaterOrEqual=function(n){var i=!1,r=t.convertToManagedTimeFormat(n.jsonValue);return this._value.h>r.h?i=!0:this._value.h===r.h&&this._value.l>=r.l&&(i=!0),i},t.prototype.compareTo=function(n){return this.greater(n)?1:this.equals(n)?0:-1},t.convertToManagedTimeFormat=function(n){var t=n.h<0?n.h>>>0:n.h,i=n.l<0?n.l>>>0:n.l;return{h:t,l:i}},t.addition=function(i,r,u){var s,h,c,l,a,o;typeof u=="undefined"&&(u=!1);var f=t.convertToManagedTimeFormat(i.jsonValue),e=t.convertToManagedTimeFormat(r.jsonValue),p=0,w=0,v=(f.l&255)+(e.l&255),y=(v>>>8)+(f.l>>>8&255)+(e.l>>>8&255);if(v=v&255,s=(y>>>8)+(f.l>>>16&255)+(e.l>>>16&255),y=y&255,h=(s>>>8)+(f.l>>>24&255)+(e.l>>>24&255),s=s&255,c=(h>>>8)+(f.h&255)+(e.h&255),h=h&255,l=(c>>>8)+(f.h>>>8&255)+(e.h>>>8&255),c=c&255,a=(l>>>8)+(f.h>>>16&255)+(e.h>>>16&255),l=l&255,o=(a>>>8)+(f.h>>>24&255)+(e.h>>>24&255),a=a&255,!u&&o>>>8>0)return n.VisualStudio.DiagnosticsHub.getLogger().error("Addition overflow. Lost upper bits from: 0x"+o.toString(16)),new t(4294967295,4294967295);o=o&255;var b=h<<8|s,k=y<<8|v,d=o<<8|a,g=l<<8|c;return p=b<<16|k,w=d<<16|g,new t(w,p)},t.multiplication=function(i,r){var f=t.convertToManagedTimeFormat(i.jsonValue),e=t.convertToManagedTimeFormat(r.jsonValue),y,u,o,b,k;if(f.h===0&&e.h===0&&0<f.l&&f.l<=67108864&&0<e.l&&e.l<=67108864)return y=f.l*e.l,t.convertFromNumber(y);var h=f.l&65535,l=f.l>>>16,p=f.h&65535,d=f.h>>>16,c=e.l&65535,a=e.l>>>16,w=e.h&65535,g=e.h>>>16,v=h*c,s=v>>>16;return v&=65535,s+=l*c,u=s>>>16,s&=65535,s+=h*a,u+=s>>>16,s&=65535,u+=p*c,o=u>>>16,u&=65535,u+=l*a,o+=u>>>16,u&=65535,u+=h*w,o+=u>>>16,u&=65535,o+=d*c+p*a+l*w+h*g,o>65535&&n.VisualStudio.DiagnosticsHub.getLogger().error("Multiplication overflow. Lost upper 16-bits from: 0x"+o.toString(16)),o&=65535,b=o<<16|u,k=s<<16|v,new t(b,k)},t.division=function(i,r,u){var s,h;if(r.greater(i))return u?i:t.zero;if(r.equals(t.zero)){if(u)return i;throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1000"))}var o=t.getBinaryString(i),v=t.getBinaryString(r),l=v.length,a=o.length,y=new t(2097152,0);if(y.greater(i))return s=parseInt(i.value),h=parseInt(r.value),u?t.convertFromNumber(s%h):t.convertFromNumber(s/h);for(var c="",e=l,f=t.convertFromBinaryString(o.substr(0,l));e<=a;)f.greater(r)||f.equals(r)?(c+="1",f=t.subtract(f,r)):c+="0",e!==a&&(f=t.convertFromBinaryString(t.getBinaryString(f)+o[e])),e++;return u?f:t.convertFromBinaryString(c)},t.OldestTimestampFormat={h:0,l:0},t.LatestTimestampFormat={h:4294967295,l:4294967295},t}(),r;t.BigNumber=i;r=function(){function t(t,i){if(t.greater(i))throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1000"));this._begin=t;this._end=i}return Object.defineProperty(t.prototype,"begin",{get:function(){return this._begin},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this._end},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"elapsed",{get:function(){return this._elapsed||(this._elapsed=i.subtract(this.end,this.begin)),this._elapsed},enumerable:!0,configurable:!0}),t.prototype.equals=function(n){return this.begin.equals(n.begin)&&this.end.equals(n.end)},t.prototype.contains=function(n){return n.greaterOrEqual(this.begin)&&this.end.greaterOrEqual(n)},t}();t.JsonTimespan=r})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){(function(n){"use strict";var t=function(){function n(){}return n}();n.DhContextData=t})(n.DataWarehouse||(n.DataWarehouse={}));var t=n.DataWarehouse})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function r(){return i===null&&(i=new u),i}var u=function(){function t(){var t=this,i;this._isInfoOn=!0;this._isDebugOn=!0;this._isWarningOn=!0;this._isErrorOn=!0;this._loggerProxy=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.LoggerPortMarshaler",{},!0);this._loggerProxy._call("isInfoOn").done(function(n){t._isInfoOn=n});this._loggerProxy._call("isDebugOn").done(function(n){t._isDebugOn=n});this._loggerProxy._call("isWarningOn").done(function(n){t._isWarningOn=n});this._loggerProxy._call("isErrorOn").done(function(n){t._isErrorOn=n});try{i=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.Test.Apex.DiagnosticsHub.ApexJSExtension",{},!0);i!==null?i._call("getApexJavaScript").done(function(n){var i,r;n?(t.debug("got apex javascript files"),i=document.createElement("script"),i.setAttribute("type","text/javascript"),i.setAttribute("src",n),r=document.getElementsByTagName("head"),r?(r[0].appendChild(i),t.debug("Added ApexJSExtension '"+n+"' to document")):t.debug("Unable to add apex script to document")):t.debug("no file was returned by getApexJavaScript, cannot inject TestExtension.ts for ApexJS framework")},function(n){t.debug("Error when calling getApexJavaScript function:"+String(n))}):this.debug("Unable to connect to port marshaler 'Microsoft.Test.Apex.DiagnosticsHub.ApexJSExtension'")}catch(r){this.error(r.toString())}}return t.prototype.info=function(n){this._isInfoOn&&this._loggerProxy._call("logInfo",n)},t.prototype.debug=function(n){this._isDebugOn&&this._loggerProxy._call("logDebug",n)},t.prototype.warning=function(n){this._isWarningOn&&this._loggerProxy._call("logWarning",n)},t.prototype.error=function(n){this._isErrorOn&&this._loggerProxy._call("logError",n)},t}(),i=null;t.getLogger=r;n.Plugin.addEventListener("pluginready",function(){r()})})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function i(){window.onerror=function(i,r,u,f){var o=t.getLogger(),e="Script error caught in: "+(r||"unknown script file")+" at "+u+"\n"+i;o.error(e);n.VisualStudio.DiagnosticsHub.Debug.Assert.fail(e);n.Plugin.Diagnostics.reportError(i,r,u,i,f);n.Plugin.Diagnostics.terminate()}}t.InitializeErrorReporting=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";function t(n,t){var i=!1,r=!1,u=null,f=function(){for(var o=[],e=0;e<arguments.length-0;e++)o[e]=arguments[e+0];u=o;i?r=!0:(n.apply(null,o),i=!0,window.setTimeout(function(){i=!1;r&&window.setTimeout(f,0,u);r=!1},t))};return f}n.eventThrottler=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function r(){return i===null&&(i=new e(t.getLogger())),i}var u=function(){function n(n){this._onHandlerCompleted=n}return n.prototype.complete=function(){this._onHandlerCompleted()},n}(),f=function(){function n(n,t){this._eventArgs=n;this._waitHandler=!1;this._onHandlerCompleted=t;this._eventDeferral=null}return Object.defineProperty(n.prototype,"currentState",{get:function(){return this._eventArgs.CurrentState},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"previousState",{get:function(){return this._eventArgs.PreviousState},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"waitHandler",{get:function(){return this._eventDeferral!==null},enumerable:!0,configurable:!0}),n.prototype.getDeferral=function(){return this._eventDeferral===null&&(this._eventDeferral=new u(this._onHandlerCompleted)),this._eventDeferral},n}(),e=function(){function t(t){var i=this;this._eventsListeners=[];this._logger=t;this._isInitialized=!1;this._sessionProxy=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.SessionPortMarshaler",{},!0);this._initializationPromise=this._sessionProxy._call("initialize");this._initializationPromise.done(function(){i._logger.debug("JavaScript session object connected to host. Ready to get session state notification events.");i._isInitialized=!0},function(n){i._logger.error("Cannot initialize session, error name: '"+n.name+"', error message: '"+n.message+"'")});this._sessionProxy.addEventListener("sessionStateChanged",this.stateChangedHandler.bind(this))}return t.prototype.stopCollection=function(){return this._sessionProxy._call("stopCollection")},t.prototype.canStopCollection=function(){return this._sessionProxy._call("canStopCollection")},t.prototype.getPerformanceDebuggerSessionTargetProcessInformation=function(){return this._sessionProxy._call("getPerformanceDebuggerSessionTargetProcessInformation")},t.prototype.getState=function(){return this._sessionProxy._call("getState")},t.prototype.addStateChangedEventListener=function(n){this._eventsListeners.push(n);this._logger.debug("State changed event handler added.")},t.prototype.isInitialized=function(){return this._isInitialized},t.prototype.removeStateChangedEventListener=function(n){for(var t=0;t<this._eventsListeners.length;t++)if(this._eventsListeners[t]===n){this._logger.debug("State changed event handler removed.");this._eventsListeners.splice(t,1);break}},t.prototype.stateChangedHandler=function(n){var o=this,t,r,u,i,e;this._logger.debug("Invoking JavaScript handlers for State Change Event.");t=0;r=function(){t--;t<=0?o._sessionProxy._call("sessionStateChangedCompleted",n.Token):o._logger.debug("Still waiting when all event state change handlers will complete their work. Handlers count: "+t)};for(u in this._eventsListeners)if(i=this._eventsListeners[u],this._eventsListeners.hasOwnProperty(u))if(typeof i=="function")try{e=new f(n,r);i(e);e.waitHandler&&(t++,this._logger.debug("JavaScipt handlers for event state changed asked to wait while they will finish. Handlers count: "+t))}catch(s){this._logger.error(s.toString())}else this._logger.warning("One of the listeners not a 'function', it has type "+typeof i);t===0&&r()},t}(),i=null;t.getCurrentSession=r;n.Plugin.addEventListener("pluginready",function(){r()})})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){(function(i){"use strict";function u(){return r===null&&(r=new f),r}var f=function(){function i(){this._serviceProxy=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.DataWarehouseServiceMarshaler",{},!0);this._logger=t.getLogger()}return i.prototype.getAllDataSourceInfos=function(n){var t=this;this._serviceProxy._call("getAllDataSourceInfos").done(function(i){for(var r,f=[],u=0;u<i.length;u++)r=i[u],r.type===1||r.type===2||r.type===4?f.push(r):t._logger.error("Unknown data source info type: "+r.type);n(f)})},i}(),r=null;i.getDataWarehouseService=u;n.Plugin.addEventListener("pluginready",function(){u()})})(t.DataWarehouse||(t.DataWarehouse={}));var i=t.DataWarehouse})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function n(n){var t,i;if(typeof n=="undefined"&&(n=null),this._events={},this._listeners={},n&&n.length>0)for(t=0;t<n.length;t++)i=n[t],i&&(this._events[i]=i);else this._events=null}return n.prototype.dispose=function(){delete this._events;delete this._listeners},n.prototype.addEventListener=function(n,t){if(n&&t&&(this._events===null||this._events[n])){var i=this._listeners[n]?this._listeners[n]:this._listeners[n]=[];i.push(t)}},n.prototype.removeEventListener=function(n,t){var i,r;if(n&&t&&(this._events===null||this._events[n])&&(i=this._listeners[n],i)){for(r=0;r<i.length;r++)if(t===i[r]){i.splice(r,1);break}i.length===0&&delete this._listeners[n]}},n.prototype.invokeListener=function(n,t){var i,r,u;if(n&&(this._events===null||this._events[n])&&(i=this._listeners[n],i))for(r=0;r<i.length;r++)u=i[r],u&&u(t)},n}();n.Publisher=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function u(){return i===null&&(i=n.Plugin.F12?new r:new f(t.getLogger())),i}var f=function(){function i(i){var r=this;this._eventsListeners={};this._publisher=new t.Publisher;this._logger=i;this._eventAggregatorProxy=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.EventAggregatorMarshaler",{},!0);this._eventAggregatorProxy.addEventListener("globalEventHandler",function(n){r.globalEventHandler(n)})}return i.prototype.addEventListener=function(n,t){this._publisher.addEventListener(n,t);this._logger.debug("EventAggregator:: Event listener added for event type '"+n+"'")},i.prototype.removeEventListener=function(n,t){this._publisher.removeEventListener(n,t);this._logger.debug("EventAggregator:: Event listener removed for event type '"+n+"'")},i.prototype.globalEventHandler=function(n){var i=n.EventType,t,r;this._logger.debug("EventAggregator:: Handling event type "+i+".");t=n.Data.Json;this._logger.debug("EventAggregator:: Raise handler for event type "+i+" with data "+t+".");try{r=null;t!==null&&typeof t=="string"&&t!==""&&(r=JSON.parse(t));this._publisher.invokeListener(i,r)}catch(u){this._logger.error(u.toString())}},i.prototype.raiseEvent=function(n,t){var i=null;t!==null&&typeof t!="undefined"&&(i=JSON.stringify(t));this._logger.debug("EventAggregator:: Raising event type "+n+" with data "+i+".");this._eventAggregatorProxy._call("raiseEvent",n,i)},i}(),r=function(){function n(){this._publisher=new t.Publisher}return n.prototype.addEventListener=function(n,t){this._publisher.addEventListener(n,t)},n.prototype.removeEventListener=function(n,t){this._publisher.removeEventListener(n,t)},n.prototype.raiseEvent=function(n,t){this._publisher.invokeListener(n,t)},n}(),i;t.LocalEventAggregator=r;i=null;t.getEventAggregator=u;n.Plugin.addEventListener("pluginready",function(){u()})})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";if(window.require){var i=require("serviceHub"),r=function(){function r(){this._logger=t.getLogger();this._controllers={};this._requestId=1;this._requestProgressCallbacks={};this._automationManager=t.getAutomationManager(this._logger);this._serviceHubClient=i.createHubClient()}return r.prototype.request=function(n,i,u,f){f=f||{};f.sessionId=u;var o=this.getController(n),e,s=function(n,u,s){var h=function(i,f){o.request(i,f).then(function(f){if(f.type===r.DATAWAREHOUSE_HOST_RESPONSE_TYPE_SUCCESS)n(JSON.parse(f.content));else if(f.type===r.DATAWAREHOUSE_HOST_RESPONSE_TYPE_PENDING)i!==t.DataWarehouse.Constants.ACTION_DATAWAREHOUSE_GETSTATUS?e=f.content:s&&s(JSON.parse(f.content)),h(t.DataWarehouse.Constants.ACTION_DATAWAREHOUSE_GETSTATUS,e);else if(f.type===r.DATAWAREHOUSE_HOST_RESPONSE_TYPE_CANCELED)u&&u(new Error("Canceled"));else if(f.type===r.DATAWAREHOUSE_HOST_RESPONSE_TYPE_FAILURE){var o=new Error(f.content);if(u)u(o);else throw o}else throw new Error("Invalid response from DataWarehouse")})};h(i,JSON.stringify(f))},h=function(){e&&o.request(t.DataWarehouse.Constants.ACTION_DATAWAREHOUSE_CANCELTASK,e)},c={controllerId:n,actionId:i,sessionId:u,request:f};return this._automationManager.getAutomationPromise(t.AutomationConstants.DataWarehouseRequestKey,s,h,c)},r.prototype.requestSync=function(){throw new Error("Not Implemented.")},r.prototype.initialize=function(){var r=this,i=[];return i.push(this._serviceHubClient.getSessionId().then(function(n){r._hostSessionId=n})),i.push(t.DataWarehouseController.create(this._serviceHubClient).then(function(n){r._controllers[t.DataWarehouse.Constants.CONTROLLER_ID_DATAWAREHOUSE]=n})),i.push(t.ContextServiceController.create(this._serviceHubClient).then(function(n){r._controllers[t.DataWarehouse.Constants.CONTROLLER_ID_DATAWAREHOUSECONTEXTSERVICE]=n})),i.push(t.ContextController.create(this._serviceHubClient).then(function(n){r._controllers[t.DataWarehouse.Constants.CONTROLLER_ID_DATAWAREHOUSECONTEXT]=n})),i.push(t.JmcServiceController.create(this._serviceHubClient).then(function(n){r._controllers[t.DataWarehouse.Constants.CONTROLLER_ID_DATAWAREHOUSEJMCSERVICE]=n})),i.push(t.ActiveCollectionController.create(this._serviceHubClient).then(function(n){r._controllers[t.DataWarehouse.Constants.CONTROLLER_ID_DATAWAREHOUSEACTIVECOLLECTION]=n})),n.Plugin.Promise.join(i)},r.prototype.getController=function(n){if(!this._controllers[n])throw new Error("Invalid controller ID");return this._controllers[n]},r.DATAWAREHOUSE_HOST_RESPONSE_TYPE_SUCCESS=1,r.DATAWAREHOUSE_HOST_RESPONSE_TYPE_FAILURE=2,r.DATAWAREHOUSE_HOST_RESPONSE_TYPE_PENDING=3,r.DATAWAREHOUSE_HOST_RESPONSE_TYPE_CANCELED=4,r}();t.DataWarehouseServiceHubHost=r}})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function t(i){if(i.length===38&&i[0]==="{"&&i[37]==="}"&&(i=i.substr(1,36)),i.length!==36)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1010"));if(this._value=i.toLowerCase(),!t.GuidRegEx.test(this._value))throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1010"))}return Object.defineProperty(t,"empty",{get:function(){return new t("00000000-0000-0000-0000-000000000000")},enumerable:!0,configurable:!0}),t.newGuid=function(){return new t(t.createRandomToken())},t.prototype.equals=function(n){return this._value.toLowerCase()===n._value.toLowerCase()},t.prototype.toString=function(){return this._value},t.createRandomToken=function(){return"rrrrrrrr-rrrr-4rrr-srrr-rrrrrrrrrrrr".replace(/[rs]/g,function(n){var t=Math.random()*16|0;return n!=="r"&&(t=t&3|8),t.toString(16)})},t.GuidRegEx=new RegExp("^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"),t}();t.Guid=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function n(){}return Object.defineProperty(n,"standardCollectorClassId",{get:function(){return"44d04ed9-f786-458c-93a9-7207a3cc52e1"},enumerable:!0,configurable:!0}),n}();n.Guids=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function r(){return i===null&&(i=new u),i}var u=function(){function t(){this._loggerProxy=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.OutputWindowServiceMarshaler",{},!0)}return t.prototype.outputLine=function(n){this._loggerProxy._call("outputLine",n)},t.prototype.outputLineAndShow=function(n){this._loggerProxy._call("outputLineAndShow",n)},t.prototype.outputString=function(n){this._loggerProxy._call("outputString",n)},t.prototype.outputStringAndShow=function(n){this._loggerProxy._call("outputStringAndShow",n)},t}(),i=null;t.getOutputWindowsService=r;n.Plugin.addEventListener("pluginready",function(){r()})})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function u(){return i||(i=new r),i}var r=function(){function i(){this._proxy=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.PerformanceDebuggerToolsServiceMarshaler",{},!0);this._toolStateChangedEvent=new t.ObservableEvent(this._proxy,"DiagnosticsHub.ToolStateChangedEvent")}return Object.defineProperty(i.prototype,"toolStateChangedEvent",{get:function(){return this._toolStateChangedEvent},enumerable:!0,configurable:!0}),i.prototype.getAvailableToolsInformationAndState=function(){return this._proxy._call("getAvailableToolsInformation")},i.prototype.setToolEnabled=function(n,t){this._proxy._call("setToolEnabled",n,t)},i.prototype.invokeSettingsDialog=function(){this._proxy._call("invokeSettingsDialog")},i}(),i;t.PerformanceDebuggerToolsService=r;t.getPerformanceDebuggerToolsService=u})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function h(){return f===null&&(f=new o),f}function c(){return r===null&&(r=new s),r}function e(){return u===null&&(u=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.PerformanceDebuggerStateMarshaler",{},!0)),u}var i=function(){function n(n,t){this._eventName=t;this._eventSource=n}return n.prototype.addEventListener=function(n){this._eventSource.addEventListener(this._eventName,n)},n.prototype.removeEventListener=function(n){this._eventSource.removeEventListener(this._eventName,n)},n}(),r,u;t.ObservableEvent=i;var o=function(){function n(){this._proxy=e();this._debugModeBreak=new i(this._proxy,"DebugModeBreakEvent");this._debugModeRun=new i(this._proxy,"DebugModeRunEvent")}return Object.defineProperty(n.prototype,"debugModeRunEvent",{get:function(){return this._debugModeRun},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"debugModeBreakEvent",{get:function(){return this._debugModeBreak},enumerable:!0,configurable:!0}),n.prototype.isDebuggerInBreakMode=function(){return this._proxy._call("isDebuggerInBreakMode")},n}(),s=function(){function n(){this._proxy=e();this._statusMessageChanged=new i(this._proxy,"StatusMessageChangedEvent")}return Object.defineProperty(n.prototype,"statusMessageChangedEvent",{get:function(){return this._statusMessageChanged},enumerable:!0,configurable:!0}),n.prototype.getLastNonActiveStatusMessage=function(){return this._proxy._call("getLastNonActiveStatusMessage")},n.prototype.isDocumentActiveSession=function(){return this._proxy._call("isDocumentActiveSession")},n}(),f=null;t.getPerformanceDebuggerEventManager=h;r=null;t.getPerformanceDebuggerStateService=c;u=null})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={}));__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){(function(n){(function(n){"use strict";var i,t,r,u,f,e,o;window.require&&(i=require("streamJsonRpc"),t=function(){function t(n,t){this._peer=i.attach(n);this._actionIdToOperationMap=t}return t.prototype.request=function(t,i){return n.Debug.Assert.isNotUndefined(this._actionIdToOperationMap[t],"Unknown action ID"),this._peer.request(this._actionIdToOperationMap[t],[i])},t}(),n.ServiceHubControllerBase=t,r=function(n){function t(){n.apply(this,arguments)}return __extends(t,n),t.create=function(n){return n.requestService("DataWarehouseController").then(function(n){return new t(n,t.ActionIdToOperationMap)})},t.ActionIdToOperationMap={1:"BeginInitialization",2:"EndInitialization",3:"GetData",4:"GetResult",5:"DisposeResult",6:"PushDataSources",7:"PushActiveCollectionDataSource",8:"CompleteActiveCollectionDataSource",9:"RetrieveDataBlob",10:"StoreDataBlob",11:"DeleteDataBlob",12:"SymbolResolverConfigurationUpdate",400:"Close",401:"GetPrivateData",402:"SetPrivateData",403:"GetStatus",404:"CancelTask",405:"AbortAnalysis"},t}(t),n.DataWarehouseController=r,u=function(n){function t(){n.apply(this,arguments)}return __extends(t,n),t.create=function(n){return n.requestService("DataWarehouseContextServiceController").then(function(n){return new t(n,t.ActionIdToOperationMap)})},t.ActionIdToOperationMap={1:"CreateContext",2:"DeleteContext",3:"CopyContext",4:"GetContext",5:"GetGlobalContext"},t}(t),n.ContextServiceController=u,f=function(n){function t(){n.apply(this,arguments)}return __extends(t,n),t.create=function(n){return n.requestService("DataWarehouseContextController").then(function(n){return new t(n,t.ActionIdToOperationMap)})},t.ActionIdToOperationMap={1:"GetTimeDomain",2:"SetTimeDomain",3:"GetMachineDomain",4:"AddMachineDomain",5:"ClearMachineDomain",6:"GetProcessDomain",7:"AddProcessDomain",8:"ClearProcessDomain",9:"GetThreadDomain",10:"AddThreadDomain",11:"ClearThreadDomain",12:"GetCustomDomain",13:"SetCustomDomain",14:"GetData",15:"SetData"},t}(t),n.ContextController=f,e=function(n){function t(){n.apply(this,arguments)}return __extends(t,n),t.create=function(n){return n.requestService("DataWarehouseJmcServiceController").then(function(n){return new t(n,t.ActionIdToOperationMap)})},t.ActionIdToOperationMap={1:"GetJmc",2:"SetJmc"},t}(t),n.JmcServiceController=e,o=function(n){function t(){n.apply(this,arguments)}return __extends(t,n),t.create=function(n){return n.requestService("DataWarehouseActiveCollectionController").then(function(n){return new t(n,t.ActionIdToOperationMap)})},t.ActionIdToOperationMap={1:"NewTargetProcess",2:"GraphUpdates"},t}(t),n.ActiveCollectionController=o)})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){(function(i){"use strict";function u(){return r===null&&(r=new f(t.getLogger())),r}function e(){return u()}var f=function(){function i(t){var i=this;this._messageListeners={};this._logger=t;this._proxy=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.CollectorTransportServiceControllerMarshaler",{},!0);this._proxy.addEventListener("stringMessageReceived",function(n){i.onStringMessageReceived(n)})}return i.prototype.sendStringToCollectionAgent=function(n,i,r){return this._proxy._call("sendStringToCollectionAgent",n,i,r||t.Guids.standardCollectorClassId)},i.prototype.downloadFile=function(n,i,r){return this._proxy._call("downloadFile",n,i,r||t.Guids.standardCollectorClassId)},i.prototype.addMessageListener=function(n,i,r){var f=this,u=n.toString();if(this._logger.debug("Adding message listener ("+u+") for collector "+r||t.Guids.standardCollectorClassId),this._messageListeners[u]){this._logger.error("Listener already exists with guid = "+u);throw new Error("Listener already exists with guid = "+u)}return this._messageListeners[u]=i,this._proxy._call("enableEventsForListenerId",u,r||t.Guids.standardCollectorClassId).then(null,function(n){f._messageListeners[u]=null;f._logger.error(JSON.stringify(n))})},i.prototype.onStringMessageReceived=function(n){var t=n.ListenerId,r=n.Message,i;this._messageListeners[t]?(i=this._messageListeners[t],i(r)):this._logger.warning("Unexpected message received without a message listener - ID: "+t)},i}(),r=null;i.getCollectorTransportServiceController=u;i.getStandardTransportService=e})(t.Collectors||(t.Collectors={}));var i=t.Collectors})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";var i=function(){function i(i){this._externalObject=null;this._logger=i;var r=n.Plugin.F12||n.Plugin.VS;if(!r){this._logger.error("External object creator does not exist");throw"Unable to determine the ScriptedSandbox host"}this._externalObject=r.Utilities.createExternalObject("DiagnosticsHub.DataWarehouseHost","{339B3787-FC17-4BF5-A0DC-CBEF24DB2EDE}");this._automationManager=t.getAutomationManager(this._logger)}return i.prototype.requestSync=function(n,t,i,r){this._externalObject?this._externalObject.requestSync(n,t,i,typeof r=="string"?r:r!==null&&typeof r!="undefined"?JSON.stringify(r):""):this._logger.warning("External object is null. Verify that DiagnosticsHub.ScriptedSandboxPlugin.dll was loaded into ScriptedSandbox.")},i.prototype.request=function(n,i,r,u){var f=this,h=function(n,t){try{n(t)}catch(i){f._logger.error(JSON.stringify(i))}},o=null,e=null,c=function(){f._externalObject&&f._externalObject.cancel&&e&&e.requestId&&f._externalObject.cancel(e.requestId)},s=function(n,t,i){if(n!==null){var r=null;if(t!==null)try{r=t===null||t===""||typeof t!="string"?t:JSON.parse(t)}catch(u){f._logger.error("Could not parse "+i+" response: "+t);f._logger.error(u.Message)}h(n,r)}else f._logger.warning("DataWarehouseNativeHost: "+i+" callback is null.")},l=function(t,h,c){if(f._externalObject?o=f._externalObject.request(n,i,r,typeof u=="string"?u:u!==null&&typeof u!="undefined"?JSON.stringify(u):"",function(n){s(t,n,"completePromise")},function(n){s(h,n,"errorPromise")},function(n){s(c,n,"progressPromise")}):f._logger.warning("External object is null. Verify that DiagnosticsHub.ScriptedSandboxPlugin.dll was loaded into ScriptedSandbox."),e=o===null||typeof o!="string"?{hresult:1}:JSON.parse(o),e.hresult!==0){f._logger.error("Could not invoke request method of native host: "+o);var l=new Error;l.message=l.name=e.hresult.toString(16);h(l)}},a={controllerId:n,actionId:i,sessionId:r,request:u};return this._automationManager.getAutomationPromise(t.AutomationConstants.DataWarehouseRequestKey,l,c,a)},i}();t.DataWarehouseNativeHost=i})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){(function(n){"use strict";var t=function(){function n(){}return n.DiagnosticsPackage="DiagnosticsHub.Resource.DiagnosticsPackage",n.EtlFile="DiagnosticsHub.Resource.EtlFile",n.JavaScriptSource="DiagnosticsHub.Resource.JavaScript.SourceDirectory",n.SymbolCache="DiagnosticsHub.Resource.SymbolCache",n.UserNativeImageDirectory="DiagnosticsHub.Resource.UserNativeImageDirectory",n.PlatformNativeImage="DiagnosticsHub.Resource.PlatformNativeImage",n.PlatformWinmd="DiagnosticsHub.Resource.PlatformWinmd",n.CountersFile="DiagnosticsHub.Resource.CountersFile",n.DWJsonFile="DiagnosticsHub.Resource.DWJsonFile",n.UnknownFile="DiagnosticsHub.Resource.File",n.UnknownDirectory="DiagnosticsHub.Resource.Directory",n}();n.ResourceIdentity=t})(n.DataWarehouse||(n.DataWarehouse={}));var t=n.DataWarehouse})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){(function(i){"use strict";function o(n,t){var i={};return n&&(i.contextId=n),t.timeDomain&&(i.timeDomain={begin:t.timeDomain.begin.jsonValue,end:t.timeDomain.end.jsonValue}),t.machineDomain&&(i.machineDomain=t.machineDomain),t.processDomain&&(i.processDomain=t.processDomain),t.threadDomain&&(i.threadDomain=t.threadDomain),t.customDomain&&(i.customDomain=t.customDomain),i}function a(n){return typeof n=="undefined"&&(n=null),s===null&&(s=new e),s.getDataWarehouse(n)}var r=function(){function n(){}return n.CONTROLLER_ID_DATAWAREHOUSE=1,n.CONTROLLER_ID_DATAWAREHOUSECONTEXTSERVICE=2,n.CONTROLLER_ID_DATAWAREHOUSECONTEXT=3,n.CONTROLLER_ID_DATAWAREHOUSEJMCSERVICE=4,n.CONTROLLER_ID_DATAWAREHOUSEACTIVECOLLECTION=5,n.ACTION_DATAWAREHOUSE_BEGININITIALIZATION=1,n.ACTION_DATAWAREHOUSE_ENDINITIALIZATION=2,n.ACTION_DATAWAREHOUSE_GETDATA=3,n.ACTION_DATAWAREHOUSE_GETRESULT=4,n.ACTION_DATAWAREHOUSE_DISPOSERESULT=5,n.ACTION_DATAWAREHOUSE_PUSHDATASOURCES=6,n.ACTION_DATAWAREHOUSE_PUSHACTIVECOLLECTIONDATASOURCE=7,n.ACTION_DATAWAREHOUSE_COMPLETEACTIVECOLLECTIONDATASOURCE=8,n.ACTION_DATAWAREHOUSE_RETRIEVEDATABLOB=9,n.ACTION_DATAWAREHOUSE_STOREDATABLOB=10,n.ACTION_DATAWAREHOUSE_DELETEDATABLOB=11,n.ACTION_DATAWAREHOUSE_SYMBOLRESOLVERCONFIGURATIONUPDATE=12,n.ACTION_DATAWAREHOUSE_INITIALIZATION_DEPRECATED=100,n.ACTION_DATAWAREHOUSE_CLOSE=400,n.ACTION_DATAWAREHOUSE_GETPRIVATEDATA=401,n.ACTION_DATAWAREHOUSE_SETPRIVATEDATA=402,n.ACTION_DATAWAREHOUSE_GETSTATUS=403,n.ACTION_DATAWAREHOUSE_CANCELTASK=404,n.ACTION_DATAWAREHOUSE_ABORTANALYSIS=405,n.ACTION_DATAWAREHOUSECONTEXTSERVICE_CREATECONTEXT=1,n.ACTION_DATAWAREHOUSECONTEXTSERVICE_DELETECONTEXT=2,n.ACTION_DATAWAREHOUSECONTEXTSERVICE_COPYCONTEXT=3,n.ACTION_DATAWAREHOUSECONTEXTSERVICE_GETCONTEXT=4,n.ACTION_DATAWAREHOUSECONTEXTSERVICE_GETGLOBALCONTEXT=5,n.ACTION_DATAWAREHOUSECONTEXT_GETTIMEDOMAIN=1,n.ACTION_DATAWAREHOUSECONTEXT_SETTIMEDOMAIN=2,n.ACTION_DATAWAREHOUSECONTEXT_GETMACHINEDOMAIN=3,n.ACTION_DATAWAREHOUSECONTEXT_ADDTOMACHINEDOMAIN=4,n.ACTION_DATAWAREHOUSECONTEXT_CLEARMACHINEDOMAIN=5,n.ACTION_DATAWAREHOUSECONTEXT_GETPROCESSDOMAIN=6,n.ACTION_DATAWAREHOUSECONTEXT_ADDTOPROCESSDOMAIN=7,n.ACTION_DATAWAREHOUSECONTEXT_CLEARPROCESSDOMAIN=8,n.ACTION_DATAWAREHOUSECONTEXT_GETTHREADDOMAIN=9,n.ACTION_DATAWAREHOUSECONTEXT_ADDTOTHREADDOMAIN=10,n.ACTION_DATAWAREHOUSECONTEXT_CLEARTHREADDOMAIN=11,n.ACTION_DATAWAREHOUSECONTEXT_GETCUSTOMDOMAIN=12,n.ACTION_DATAWAREHOUSECONTEXT_SETCUSTOMDOMAIN=13,n.ACTION_DATAWAREHOUSECONTEXT_GETDATA=14,n.ACTION_DATAWAREHOUSECONTEXT_SETDATA=15,n.ACTION_DATAWAREHOUSEJMCSERVICE_GETJMCENABLED=1,n.ACTION_DATAWAREHOUSEJMCSERVICE_SETJMCENABLED=2,n.ACTION_DATAWAREHOUSEACTIVECOLLECTION_NEWTARGETPROCESS=1,n.ACTION_DATAWAREHOUSEACTIVECOLLECTION_GRAPHUPDATES=2,n}(),f,e,h;i.Constants=r;f=function(){function n(n,t,i){this._resultId=n;this._sessionId=t;this._controller=i}return Object.defineProperty(n.prototype,"resultId",{get:function(){return this._resultId},enumerable:!0,configurable:!0}),n.prototype.getResult=function(n){var t=null;return t=n!==null?{resultId:this._resultId,customData:JSON.stringify(n)}:{resultId:this._resultId},this._controller.request(r.ACTION_DATAWAREHOUSE_GETRESULT,t)},n.prototype.dispose=function(){return this._controller.request(r.ACTION_DATAWAREHOUSE_DISPOSERESULT,{resultId:this._resultId})},n}();e=function(){function i(){this._getConfigurationPromise=null;this._serviceProxy=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.DataWarehouseServiceMarshaler",{},!0);this._logger=t.getLogger()}return i.prototype.getDataWarehouse=function(t){var i=this;return typeof t=="undefined"&&(t=null),(this._getConfigurationPromise===null||t)&&(this._getConfigurationPromise=t===null?this._serviceProxy._call("getDataWarehouseConfiguration"):n.Plugin.Promise.wrap(t)),this._getConfigurationPromise.then(function(n){return i._logger.debug("Got the sessionId '"+n.sessionId+"'. Creating datawarehouse..."),new h(n)})},i}();i.DataWarehouseFactory=e;h=function(){function i(n){this._logger=null;this._dwConfiguration=null;this._controller=null;this._contextService=null;this._jmcService=null;this._logger=t.getLogger();this._dwConfiguration=n;this._controller=new t.HostController(this._dwConfiguration.sessionId,r.CONTROLLER_ID_DATAWAREHOUSE)}return i.prototype.getConfiguration=function(){return this._dwConfiguration},i.prototype.getData=function(n,t){var i=null;return i=n?{contextId:n,analyzerId:t}:{analyzerId:t},this.getDataFromAnalyzer(i)},i.prototype.getFilteredData=function(n,t){return this.getDataFromAnalyzer({filter:o(null,n),analyzerId:t})},i.prototype.getResultId=function(t){var i=t;if(!i.resultId)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1011"));return i.resultId},i.prototype.getResultById=function(n){return new f(n,this._dwConfiguration.sessionId,this._controller)},i.prototype.getContextService=function(){return this._contextService||(this._contextService=new c(this._dwConfiguration.sessionId)),this._contextService},i.prototype.getJmcService=function(){return this._jmcService||(this._jmcService=new l(this._dwConfiguration.sessionId)),this._jmcService},i.prototype.close=function(){return this._controller.request(r.ACTION_DATAWAREHOUSE_CLOSE)},i.prototype.closeSynchronous=function(){if(n.Plugin.F12)this._controller.requestSync(r.ACTION_DATAWAREHOUSE_CLOSE);else throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1009"))},i.prototype.initialize=function(){this._logger.debug("Initializing DataWarehouse...");var n={analyzers:this._dwConfiguration.analyzers,dataSources:this._dwConfiguration.dataSources,symbolStorePath:this._dwConfiguration.symbolStorePath||"",symbolCachePath:this._dwConfiguration.symbolCachePath||"",isJmcEnabled:typeof this._dwConfiguration.isJmcEnabled=="undefined"?!0:this._dwConfiguration.isJmcEnabled};return this._logger.debug("DataWarehouse configuration: "+JSON.stringify(n)),this._controller.request(r.ACTION_DATAWAREHOUSE_INITIALIZATION_DEPRECATED,n)},i.prototype.beginInitialization=function(){this._logger.debug("Begin initializing DataWarehouse");var n={analyzers:this._dwConfiguration.analyzers,dataSources:this._dwConfiguration.dataSources,symbolStorePath:this._dwConfiguration.symbolStorePath||"",symbolCachePath:this._dwConfiguration.symbolCachePath||"",isJmcEnabled:typeof this._dwConfiguration.isJmcEnabled=="undefined"?!0:this._dwConfiguration.isJmcEnabled,symbolLocatorServiceFullPath:this._dwConfiguration.symbolLocatorServiceFullPath||"",portablePdbLibraryFullPath:this._dwConfiguration.portablePdbLibraryFullPath||""};return this._logger.debug("DataWarehouse configuration: "+JSON.stringify(n)),this._controller.request(r.ACTION_DATAWAREHOUSE_BEGININITIALIZATION,n)},i.prototype.pushDataSources=function(n){this._logger.debug("Begin pushing data source(s) to DataWarehouse");var t={dataSources:n};return this._logger.debug("PushDataSources payload: "+JSON.stringify(t)),this._controller.request(r.ACTION_DATAWAREHOUSE_PUSHDATASOURCES,t)},i.prototype.endInitialization=function(){return this._logger.debug("End initializing DataWarehouse"),this._controller.request(r.ACTION_DATAWAREHOUSE_ENDINITIALIZATION)},i.prototype.getPrivateData=function(n,t){this._logger.debug("Getting private data from DataWarehouse...");var i={id:n,dataArg:t};return this._controller.request(r.ACTION_DATAWAREHOUSE_GETPRIVATEDATA,i)},i.prototype.setPrivateData=function(n,t){this._logger.debug("Setting private data in DataWarehouse...");var i={id:n,data:t};return this._controller.request(r.ACTION_DATAWAREHOUSE_SETPRIVATEDATA,i)},i.prototype.getDataFromAnalyzer=function(t){var i=this,e,u,o,s=function(n,t,i){e=n;u=t;o=i},h=this._controller.request(r.ACTION_DATAWAREHOUSE_GETDATA,t).then(function(n){var t=null;n!==null&&typeof n!="undefined"&&typeof n.dh_r_id=="number"?(i._logger.debug("Result ID ("+n.dh_r_id+") received for Session ID: "+i._dwConfiguration.sessionId),t=new f(n.dh_r_id,i._dwConfiguration.sessionId,i._controller)):t=n;e(t)},function(n){u&&u(n)},function(n){n&&o(n)}),c=function(){h.cancel()};return new n.Plugin.Promise(s,c)},i}();var c=function(){function n(n){this._controller=new t.HostController(n,r.CONTROLLER_ID_DATAWAREHOUSECONTEXTSERVICE);this._sessionId=n}return n.prototype.createContext=function(n){var i=this,t={};return n!==null&&typeof n!="undefined"&&(t.data=o(null,n)),this._controller.request(r.ACTION_DATAWAREHOUSECONTEXTSERVICE_CREATECONTEXT,t).then(function(n){return new u(n,i._sessionId)})},n.prototype.deleteContext=function(n){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXTSERVICE_DELETECONTEXT,{contextId:n})},n.prototype.copyContext=function(n){var t=this;return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXTSERVICE_COPYCONTEXT,{contextId:n}).then(function(n){return new u(n,t._sessionId)})},n.prototype.getContext=function(n){var t=this;return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXTSERVICE_GETCONTEXT,{contextId:n}).then(function(n){return new u(n,t._sessionId)})},n.prototype.getGlobalContext=function(){var n=this;return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXTSERVICE_GETGLOBALCONTEXT).then(function(t){return new u(t,n._sessionId)})},n}(),u=function(){function n(n,i){this._info=n;this._sessionId=i;this._controller=new t.HostController(this._sessionId,r.CONTROLLER_ID_DATAWAREHOUSECONTEXT)}return n.prototype.getContextId=function(){return this._info.contextId},n.prototype.getParentContextId=function(){return this._info.parentContextId},n.prototype.setData=function(n){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_SETDATA,o(this._info.contextId,n))},n.prototype.getData=function(){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_GETDATA,{contextId:this._info.contextId}).then(function(n){return{timeDomain:new t.JsonTimespan(new t.BigNumber(n.timeDomain.begin.h,n.timeDomain.begin.l),new t.BigNumber(n.timeDomain.end.h,n.timeDomain.end.l)),machineDomain:n.machineDomain,processDomain:n.processDomain,threadDomain:n.threadDomain,customDomain:n.customDomain}})},n.prototype.getTimeDomain=function(){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_GETTIMEDOMAIN,{contextId:this._info.contextId}).then(function(n){return new t.JsonTimespan(new t.BigNumber(n.begin.h,n.begin.l),new t.BigNumber(n.end.h,n.end.l))})},n.prototype.setTimeDomain=function(n){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_SETTIMEDOMAIN,{contextId:this._info.contextId,timeDomain:{begin:n.begin.jsonValue,end:n.end.jsonValue}})},n.prototype.getMachineDomain=function(){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_GETMACHINEDOMAIN,{contextId:this._info.contextId})},n.prototype.addToMachineDomain=function(n){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_ADDTOMACHINEDOMAIN,{contextId:this._info.contextId,machineName:n})},n.prototype.clearMachineDomain=function(){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_CLEARMACHINEDOMAIN,{contextId:this._info.contextId})},n.prototype.getProcessDomain=function(){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_GETPROCESSDOMAIN,{contextId:this._info.contextId})},n.prototype.addToProcessDomain=function(n){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_ADDTOPROCESSDOMAIN,{contextId:this._info.contextId,processId:n})},n.prototype.clearProcessDomain=function(){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_CLEARPROCESSDOMAIN,{contextId:this._info.contextId})},n.prototype.getThreadDomain=function(){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_GETTHREADDOMAIN,{contextId:this._info.contextId})},n.prototype.addToThreadDomain=function(n){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_ADDTOTHREADDOMAIN,{contextId:this._info.contextId,threadId:n})},n.prototype.clearThreadDomain=function(){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_CLEARTHREADDOMAIN,{contextId:this._info.contextId})},n.prototype.getCustomDomain=function(n){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_GETCUSTOMDOMAIN,{contextId:this._info.contextId,name:n}).then(function(n){return n.value})},n.prototype.setCustomDomain=function(n,t){return this._controller.request(r.ACTION_DATAWAREHOUSECONTEXT_SETCUSTOMDOMAIN,{contextId:this._info.contextId,name:n,value:t})},n}(),l=function(){function i(i){this._controller=new t.HostController(i,r.CONTROLLER_ID_DATAWAREHOUSEJMCSERVICE);this._logger=t.getLogger();this._viewEventManager=n.VisualStudio.DiagnosticsHub.getViewEventManager()}return i.prototype.getJmcEnabledState=function(){var t=this;return this._controller.request(r.ACTION_DATAWAREHOUSEJMCSERVICE_GETJMCENABLED).then(function(i){if(typeof i.jmcOn=="undefined"){t._logger.error("getJmcEnabledState() result is ill-formed");throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.9999"))}return i.jmcOn})},i.prototype.setJmcEnabledState=function(t){var i=this;return this._controller.request(r.ACTION_DATAWAREHOUSEJMCSERVICE_SETJMCENABLED,{jmcOn:t}).then(function(t){if(typeof t.prevEnabledState=="undefined"||typeof t.currEnabledState=="undefined"){i._logger.error("setJmcEnabledState() result is ill-formed");throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.9999"))}t.prevEnabledState!==t.currEnabledState&&i._viewEventManager.jmcEnabledStateChanged.raiseEvent(t)})},i}(),s=null;i.loadDataWarehouse=a})(t.DataWarehouse||(t.DataWarehouse={}));var i=t.DataWarehouse})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){(function(t){"use strict";function i(){return r===null&&(r=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.VisualStudioServiceMarshaler",{},!0)),r}var u,f,e,o,s,r;(function(n){n[n.UserCode=0]="UserCode";n[n.Library=1]="Library";n[n.Unrelated=2]="Unrelated";n[n.Unsure=3]="Unsure"})(u||(u={}));f=function(){function t(){this._serviceProxy=i()}return t.prototype.getJmcTypeForUrls=function(t){return n.Plugin.F12?n.Plugin.F12.JMC.getJMCTypeForUrls(t).then(function(n){if(!n)return[];for(var t=0;t<n.length;++t)switch(n[t]){case 0:n[t]=0;break;case 1:n[t]=1;break;case 2:n[t]=2;break;case 3:default:n[t]=-1}return n}):this._serviceProxy._call("getJMCTypeForUrls",t)},t}();t.JavaScriptJmc=f;e=function(){function n(){this._serviceProxy=i()}return n.prototype.getAllExecutableCodeOutputs=function(n){return this._serviceProxy._call("getSolutionExecutableCodeOutputs",n)},n}();t.SolutionService=e;o=function(){function n(){this._serviceProxy=i()}return n.prototype.showDocument=function(n,t){return this._serviceProxy._call("showDocument",n,t)},n.prototype.getAccessiblePathToFile=function(n){return this._serviceProxy._call("getAccessiblePathToFile",n)},n}();t.SourceService=o;s=function(){function n(){this._serviceProxy=i()}return n.prototype.isDataWarehouseInVsHub=function(){return this._serviceProxy._call("isDataWarehouseInVsHub")},n}();t.DataWarehouseRegistryService=s;r=null;t.getVisualStudioService=i})(t.Controllers||(t.Controllers={}));var i=t.Controllers})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function e(){return i===null&&(i=new f),i}var r=function(){function n(n){this._onHandlerCompleted=n}return n.prototype.complete=function(n){this._onHandlerCompleted(n)},n}(),u,f,i;t.DocumentClosingEventDeferral=r;u=function(){function n(n){this._onHandlerCompleted=n;this._eventDeferral=null}return Object.defineProperty(n.prototype,"waitHandler",{get:function(){return this._eventDeferral!==null},enumerable:!0,configurable:!0}),n.prototype.getDeferral=function(){return this._eventDeferral===null&&(this._eventDeferral=new r(this._onHandlerCompleted)),this._eventDeferral},n}();t.DocumentClosingEventArgs=u;f=function(){function i(){this._documentProxy=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.DocumentPortMarshaler",{},!0);this._logger=t.getLogger()}return i.prototype.getTools=function(){return this._documentProxy._call("getTools")},i.prototype.openInAlternateFormat=function(t){if(t===1)return this._logger.debug("Opening current document as a Vspx"),this._documentProxy._call("openAsVspx");throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1000"))},i.prototype.isPerformanceDebuggerDocument=function(){return this._documentProxy._call("isPerformanceDebuggerDocument")},i}();i=null;t.getCurrentDocument=e})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){(function(i){"use strict";function f(){return r===null&&(r=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.TelemetryAnalysisServiceMarshaler",{},!0)),r}function l(){return u===null&&(u=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.TelemetryGlobalServiceMarshaler",{},!0)),u}var c,e,o,s,h,r,u;(function(n){n[n.SwimLane=0]="SwimLane";n[n.DoubleSlider=1]="DoubleSlider";n[n.DoubleSliderHandles=2]="DoubleSliderHandles"})(i.SelectionChangeSource||(i.SelectionChangeSource={}));c=i.SelectionChangeSource;e=function(){function n(){this._serviceProxy=f()}return n.prototype.jmcToggle=function(n){this._serviceProxy._post("reportJmcToggle",n)},n.prototype.enabledAtStart=function(n){this._serviceProxy._post("cpuUsageEnabledInitially",n)},n}();i.CpuUsage=e;o=function(){function n(){this._serviceProxy=l()}return n.prototype.selectToolsDropdown=function(){this._serviceProxy._post("reportSelectToolsDropdown")},n}();i.PerformanceDebugger=o;s=function(){function n(){this._serviceProxy=f()}return n.prototype.zoomIn=function(){this._serviceProxy._post("reportZoomIn")},n.prototype.zoomOut=function(){this._serviceProxy._post("reportZoomOut")},n.prototype.resetZoom=function(){this._serviceProxy._post("reportResetZoom")},n.prototype.clearSelection=function(){this._serviceProxy._post("reportClearSelection")},n.prototype.selectionChanged=function(n,i,r){var u=r||t.Guid.empty.toString();this._serviceProxy._post("reportSelectionChanged",n,i,u)},n.prototype.showGraphTooltip=function(n){this._serviceProxy._post("reportGraphTooltip",n)},n}();i.ViewportController=s;h=function(){function n(){this._serviceProxy=f()}return n.prototype.lostEvents=function(n){this._serviceProxy._post("countLostEvents",n)},n}();i.CollectedData=h;r=null;u=null})(t.Telemetry||(t.Telemetry={}));var i=t.Telemetry})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function h(){return i===null&&(i=new s),i}var r=function(){function i(){if(this._publisher=new t.Publisher([i.EventName]),this._eventAggregator=n.VisualStudio.DiagnosticsHub.getEventAggregator(),this._eventAggregator.addEventListener(i.EventGlobalName,this.forwardSelectionTimeRangeEvent.bind(this)),this._timeRangeMarshaler=n.Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.SwimlaneDataServiceMarshaler",{},!0),!this._timeRangeMarshaler)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1007"))}return i.prototype.addEventListener=function(n){this._publisher.addEventListener(i.EventName,n)},i.prototype.removeEventListener=function(n){this._publisher.removeEventListener(i.EventName,n)},i.prototype.raiseEvent=function(n){this.setTimeRange(n.position);var t={i:n.isIntermittent};n.position&&(t.ts={begin:n.position.begin.jsonValue,end:n.position.end.jsonValue});this._eventAggregator.raiseEvent(i.EventGlobalName,t)},i.prototype.getTimeRange=function(){return this._timeRangeMarshaler._call("getCurrentTimeRange").then(function(n){return n&&n.begin&&n.end?new t.JsonTimespan(new t.BigNumber(n.begin.h,n.begin.l),new t.BigNumber(n.end.h,n.end.l)):null})},i.prototype.setTimeRange=function(n){var t=null;n&&(t={begin:n.begin.jsonValue,end:n.end.jsonValue});this._timeRangeMarshaler._call("setCurrentTimeRange",t)},i.prototype.forwardSelectionTimeRangeEvent=function(n){var r,u;typeof n.ts!="undefined"&&(r=new t.JsonTimespan(new t.BigNumber(n.ts.begin.h,n.ts.begin.l),new t.BigNumber(n.ts.end.h,n.ts.end.l)));u={position:r,isIntermittent:n.i};this._publisher.invokeListener(i.EventName,u)},i.EventGlobalName="DiagnosticsHub.EventAggregator.SelectionTimeRangeChanged",i.EventName="DiagnosticsHub.SelectionTimeRangeChanged",i}(),u=function(){function i(){this._publisher=new t.Publisher([i.EventName]);this._eventAggregator=n.VisualStudio.DiagnosticsHub.getEventAggregator();this._eventAggregator.addEventListener(i.EventGlobalName,this.forwardChangeViewportEvent.bind(this))}return i.prototype.addEventListener=function(n){this._publisher.addEventListener(i.EventName,n)},i.prototype.removeEventListener=function(n){this._publisher.removeEventListener(i.EventName,n)},i.prototype.raiseEvent=function(n){var t=null;n&&(t={beginH:n.begin.jsonValue.h,beginL:n.begin.jsonValue.l,endH:n.end.jsonValue.h,endL:n.end.jsonValue.l});this._eventAggregator.raiseEvent(i.EventGlobalName,t)},i.prototype.forwardChangeViewportEvent=function(n){var r=null;typeof n.beginH!="undefined"&&typeof n.beginL!="undefined"&&typeof n.endH!="undefined"&&typeof n.endL!="undefined"&&(r=new t.JsonTimespan(new t.BigNumber(n.beginH,n.beginL),new t.BigNumber(n.endH,n.endL)));this._publisher.invokeListener(i.EventName,r)},i.EventGlobalName="DiagnosticsHub.EventAggregator.ChangeViewport",i.EventName="DiagnosticsHub.ChangeViewport",i}(),f=function(){function i(){this._publisher=new t.Publisher([i.EventName]);this._eventAggregator=n.VisualStudio.DiagnosticsHub.getEventAggregator();this._eventAggregator.addEventListener(i.EventGlobalName,this.forwardJmcEnabledStateChangedEvent.bind(this))}return i.prototype.addEventListener=function(n){this._publisher.addEventListener(i.EventName,n)},i.prototype.removeEventListener=function(n){this._publisher.removeEventListener(i.EventName,n)},i.prototype.raiseEvent=function(n){this._eventAggregator.raiseEvent(i.EventGlobalName,n)},i.prototype.forwardJmcEnabledStateChangedEvent=function(n){this._publisher.invokeListener(i.EventName,n)},i.EventGlobalName="DiagnosticsHub.EventAggregator.JmcEnabledStateChanged",i.EventName="DiagnosticsHub.JmcEnabledStateChanged",i}(),e=function(){function i(){this._publisher=new t.Publisher([i.EventName]);this._eventAggregator=n.VisualStudio.DiagnosticsHub.getEventAggregator();this._eventAggregator.addEventListener(i.EventGlobalName,this.forwardDetailsViewSelectionChangedEvent.bind(this))}return i.prototype.addEventListener=function(n){this._publisher.addEventListener(i.EventName,n)},i.prototype.removeEventListener=function(n){this._publisher.removeEventListener(i.EventName,n)},i.prototype.raiseEvent=function(n){this._eventAggregator.raiseEvent(i.EventGlobalName,n)},i.prototype.forwardDetailsViewSelectionChangedEvent=function(n){this._publisher.invokeListener(i.EventName,n)},i.EventGlobalName="DiagnosticsHub.EventAggregator.DetailsViewSelectionChangedEvent",i.EventName="DiagnosticsHub.DetailsViewSelectionChangedEvent",i}(),o=function(){function i(){this._publisher=new t.Publisher([i.EventName]);this._eventAggregator=n.VisualStudio.DiagnosticsHub.getEventAggregator();this._eventAggregator.addEventListener(i.EventGlobalName,this.forwardDetailsViewSelectionChangedEvent.bind(this))}return i.prototype.addEventListener=function(n){this._publisher.addEventListener(i.EventName,n)},i.prototype.removeEventListener=function(n){this._publisher.removeEventListener(i.EventName,n)},i.prototype.raiseEvent=function(n){this._eventAggregator.raiseEvent(i.EventGlobalName,n)},i.prototype.forwardDetailsViewSelectionChangedEvent=function(n){this._publisher.invokeListener(i.EventName,n)},i.EventGlobalName="DiagnosticsHub.EventAggregator.DetailsViewReadyEvent",i.EventName="DiagnosticsHub.DetailsViewReadyEvent",i}(),s=function(){function n(){this._selectionChanged=new r;this._changeViewport=new u;this._jmcEnabledStateChanged=new f;this._detailsViewSelectionChangedEvent=new e;this._detailsViewReady=new o}return Object.defineProperty(n.prototype,"selectionChanged",{get:function(){return this._selectionChanged},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"changeViewport",{get:function(){return this._changeViewport},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"jmcEnabledStateChanged",{get:function(){return this._jmcEnabledStateChanged},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"detailsViewSelectionChanged",{get:function(){return this._detailsViewSelectionChangedEvent},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"detailsViewReady",{get:function(){return this._detailsViewReady},enumerable:!0,configurable:!0}),n}(),i=null;t.getViewEventManager=h})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(n){(function(n){"use strict";var t=function(){function n(){}return n.VSHUB_E_INVALID_REGEX=3776045057,n}();n.ErrorCodes=t})(n.DiagnosticsHub||(n.DiagnosticsHub={}));var t=n.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={})),function(n){(function(t){(function(t){"use strict";function u(r){if(!i){if(r){var u=new t.DataWarehouseServiceHubHost;return u.initialize().then(function(){return i=u})}i=new t.DataWarehouseNativeHost(t.getLogger())}return n.Plugin.Promise.wrap(i)}function f(n){return i||(i=n?new t.DataWarehouseServiceHubHost:new t.DataWarehouseNativeHost(t.getLogger())),i}var r=function(){function i(t,i){this._sessionId=t;this._controllerId=i;this._dataWarehouseRegistryService=new n.VisualStudio.DiagnosticsHub.Controllers.DataWarehouseRegistryService}return i.prototype.request=function(t,i){var r=this,f,e;return this._host?this._host.request(this._controllerId,t,this._sessionId,i):(f=this.ensureIsPerformanceDebuggerDocument(),e=this.ensureDataWarehouseInVsHub(),n.Plugin.Promise.join([f,e]).then(function(n){if(n){var f=!1;return n.forEach(function(n){f=f||n}),u(f).then(function(n){return r._host=n,r._host.request(r._controllerId,t,r._sessionId,i)})}}))},i.prototype.requestSync=function(n,t){return this._host||(this._host=f(!1)),this._host.requestSync(this._controllerId,n,this._sessionId,t)},i.prototype.ensureIsPerformanceDebuggerDocument=function(){return n.Plugin.F12?n.Plugin.Promise.wrap(!1):t.getCurrentDocument().isPerformanceDebuggerDocument()},i.prototype.ensureDataWarehouseInVsHub=function(){return n.Plugin.F12?n.Plugin.Promise.wrap(!1):this._dataWarehouseRegistryService.isDataWarehouseInVsHub()},i}(),i;t.HostController=r;i=null})(t.DiagnosticsHub||(t.DiagnosticsHub={}));var i=t.DiagnosticsHub})(n.VisualStudio||(n.VisualStudio={}));var t=n.VisualStudio}(Microsoft||(Microsoft={}))
//# sourceMappingURL=DiagnosticsHub.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var expectedWindowProperty,Common;(function(n){var t;(function(t){"use strict";var r=function(){function t(n){this._messageHandlers=[];this._pendingMessages=[];this._pendingMessagesMap={};this._portId=0;this._uid=0;this.childrenElementLimit=200;this.initializeDocumentMaxTries=15;this.initializeDocumentTries=0;this.isEvalModified=!1;this.isExecScriptModified=!1;this.onDetachCallback=null;this.port=null;this.portReady=!1;this._messageHandlers=n}return Object.defineProperty(t.prototype,"errorHandler",{get:function(){return this._errorHandler},enumerable:!0,configurable:!0}),t.getDefaultView=function(n){return n?typeof n.defaultView!="undefined"?n.defaultView:n.parentWindow:null},t.prototype.getUid=function(){return"uid"+(this._uid++).toString(36)},t.prototype.initialize=function(n,t,r){this._errorHandler=new i(this);this.onDetachCallback=r;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(n+this._portId);this.port&&(this.port.addEventListener("message",this.processMessages.bind(this)),toolUI.connect(this.port),t());this._handshakeCallback=t},t.prototype.initializeScriptEngines=function(n){var i,r,u;if(n){if(n.document&&n.document.scripts&&n.document.scripts.length===0)try{browser.executeScript("void(0);"+t.JMCScriptUrl,n)}catch(f){}if(n.frames)for(i=0;i<n.frames.length;i++)r=n.frames[i],r&&(u=dom.getCrossSiteWindow(n,r),this.initializeScriptEngines(u))}},t.prototype.postAllMessages=function(){var n,t;for(n in this._pendingMessagesMap)this._pendingMessages.push(this._pendingMessagesMap[n]);if(this._pendingMessages.length>0){t=JSON.stringify(this._pendingMessages);this._pendingMessages=[];this._pendingMessagesMap={};try{this.port.postMessage(t)}catch(i){return}}},t.prototype.processMessages=function(n){var s=this,o,f,u,r,t,i,e;if(n.data==="InitializeDocument"){this._handshakeCallback();return}for(o=function(n){return function(t,i){s.postObject({uid:n,args:[t]},i)}},f=JSON.parse(n.data),u=0;u<f.length;++u)if(r=f[u],this._messageHandlers[r.command]){for(t=r.args,i=0;i<t.length;++i)t[i]&&t[i].type==="callback"&&(t[i]=o(t[i].uid));e=this._messageHandlers[r.command].apply(this,t);this.postObject({uid:r.uid,args:e!==undefined?[e]:undefined})}},t.prototype.onBreak=function(){this.postAllMessages()},t.prototype.onDetach=function(){this._uid=0;this._pendingMessages=[];this._pendingMessagesMap={};this.isEvalModified=!1;this.isExecScriptModified=!1;this.onDetachCallback&&this.onDetachCallback()},t.prototype.onDocumentComplete=function(i){var r,u;if(expectedWindowProperty&&(r=null,i))try{if(i.browserOrWindow&&(i=i.browserOrWindow),i.document?r=i.document:i.Document&&(r=i.Document),u=n.PerfTools.__BROWSERTOOLS_RemoteHelper.getDefaultView(r),!r||u[expectedWindowProperty])return;browser.executeScript("void(0);"+t.JMCScriptUrl,u)}catch(f){}},t.prototype.postObject=function(n,t,i){i===void 0&&(i=!0);t?this._pendingMessagesMap[t]=n:this._pendingMessages.push(n);this.postAllMessages()},t.JMCScriptUrl="\\r\\n//# sourceURL=browsertools://browsertools.performance.js",t}(),i;t.__BROWSERTOOLS_RemoteHelper=r;i=function(){function t(n){this._remoteHelper=n;this.initializeListeners()}return t.prototype.handleError=function(n,t,i,r){this.onScriptError({message:n,file:t,line:i,column:r})},t.getArgumentString=function(n){var t=typeof n;if(n===undefined)t="undefined";else if(t==="object"){if(n){typeof n.length!="number"||typeof n.propertyIsEnumerable!="function"||n.propertyIsEnumerable("length")||typeof n.splice!="function"||(t="array");try{n.constructor===Array?t="array":n.constructor===Date?t="date":n.constructor===RegExp&&(t="regex")}catch(i){}}else t="null";t="object"}switch(t){case"boolean":return n;case"date":return"[date] "+n;case"function":return""+n;case"null":return"null";case"number":return n;case"regex":return"[regex] "+n;case"string":return'"'+n+'"';case"undefined":return"undefined";case"htmlElement":case"array":case"object":return JSON.stringify(n)}},t.prototype.onScriptError=function(t){var i,r;if(this._remoteHelper&&this._remoteHelper.port){i=[];try{i.push("BreakFlags: "+toolUI.getBreakFlags());i.push("IsEvalModified: "+this._remoteHelper.isEvalModified);i.push("IsExecScriptModified: "+this._remoteHelper.isExecScriptModified);i.push("Url: "+n.PerfTools.__BROWSERTOOLS_RemoteHelper.getDefaultView(browser.document).location.href)}catch(u){}t.additionalInfo=i.join("\r\n\r\n");r=JSON.stringify([{uid:"scriptError",args:[t]}]);try{this._remoteHelper.port.postMessage(r)}catch(u){}}},t.prototype.initializeListeners=function(){var i=this,t;this._onErrorHandler=this.onScriptError.bind(this);toolUI.addEventListener("scripterror",this._onErrorHandler);toolUI.addEventListener("detach",function(){toolUI.removeEventListener("scripterror",i._onErrorHandler)});browser&&browser.document&&(t=n.PerfTools.__BROWSERTOOLS_RemoteHelper.getDefaultView(browser.document),t&&this._remoteHelper.initializeScriptEngines(t))},t}();t.__BROWSERTOOLS_ErrorHandler=i})(t=n.PerfTools||(n.PerfTools={}))})(Common||(Common={}))
//# sourceMappingURL=PerfRemoteHelpers.min.js.map
/* 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 u,f=window.external.pluginUrl||(u=document.cookie.match(/(?:^|;)\s?pluginUrl=(.*?)(?:;|$)/))&&unescape(u[1])||"plugin.b.js",i=document.getElementsByTagName("script"),n,t,e,r;if(i&&f)for(n=0;n<i.length;n++)if(t=i[n],e=t.src,/(^|\\|\/)plugin.js$/.test(e)){r=document.createElement("script");r.src=f;t.parentElement.insertBefore(r,t.nextSibling);break}})()
//# sourceMappingURL=plugin.min.js.map
/**
 * 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}]*/
}
�PNG


IHDRJ~�s	pHYs���+ cHRMz%������u0�`:�o�_�F�IDATx�c`�&����?��_�~
	��?�(�g�2����H3���=��7�h�7:���>FX;�5�[flp?HA;ܼG`M�wa�d�9��������>@!��;�̟�*
�v�������T;��i�qف�|lv�5�̇ف�kہ�S�$k���/��IEND�B`��PNG


IHDRa~e	pHYs���+PLTE���H{��tRNS�ϟ�'�IIDATx�e�A �m���=F-'2	���'36dk2+j)�[�E����OP�bP�^q��T�C����d�I��X\IEND�B`��PNG


IHDRVΎWsRGB��, cHRMz&�����u0�`:�p��Q<	pHYs���+_IDATxڭ�@P������Џ���&9�K(C���p�����cF��֟cF�1�!���4^_�_�u��b��C�1#ƌ{�3b��1Pѫ�kIEND�B`��PNG


IHDR$��j�gAMA���asRGB��, cHRMz&�����u0�`:�p��Q<	pHYs��j։	�IDATx�c�3���!a!�C�B���Az�r�C@z��,44���=�W��#װ� 5D�YXXX.�@r��	�,��Y�	�$C�a��6�Gp��@�~��RŞ�J�{���Az0
+߯�xO�A{���eU�
�1����a��B(U�I�eH��|�*����{���a�d�멖�(7em��*�IEND�B`��PNG


IHDR$��j�gAMA���asRGB��, cHRMz&�����u0�`:�p��Q<	pHYs��j։	�IDATx�cD`����

M�̐����a��Ad��@A���`��֌����5���<���'`������`5$���0�dI���AIc��Q0
�*��W���O�!�{�+U��U{�+!A��B�a 
 ��b�{���ĕ�ʕ{`�6�����a���R�_�†��0$��)"�0��Q����N�IEND�B`��PNG


IHDRVΎW	pHYs���+
OiCCPPhotoshop ICC profilexڝSgTS�=���BK���KoR RB���&*!	J�!��Q�EEȠ�����Q,�
��!��������{�kּ�����>�����H3Q5��B������.@�
$p�d!s�#�~<<+"��x��M��0���B�\���t�8K�@z�B�@F���&S�`�cb�P-`'������{[�!�� e�Dh;��V�EX0fK�9�-0IWfH�����0Q��){`�##x��F�W<�+��*x��<�$9E�[-qWW.(�I+6aa�@.�y�2�4�������x����6��_-��"bb��ϫp@�t~�,/��;�m��%�h^�u��f�@����W�p�~<<E���������J�B[a�W}�g�_�W�l�~<�����$�2]�G�����L�ϒ	�b��G�����"�Ib�X*�Qq�D���2�"�B�)�%�d��,�>�5�j>{�-�]c�K'Xt���o��(�h���w��?�G�%�fI�q^D$.Tʳ?�D��*�A�,����`6�B$��BB
d�r`)��B(�Ͱ*`/�@4�Qh��p.�U�=p�a��(��	A�a!ڈb�X#����!�H�$ ɈQ"K�5H1R�T UH�=r9�\F��;�2����G1���Q=��C��7�F��dt1�����r�=�6��Ыhڏ>C�0��3�l0.��B�8,	�c˱"����V����cϱw�E�	6wB aAHXLXN�H� $4�	7	�Q�'"��K�&���b21�XH,#��/{�C�7$�C2'��I��T��F�nR#�,��4H#���dk�9�, +ȅ����3��!�[
�b@q��S�(R�jJ��4�e�2AU��Rݨ�T5�ZB���R�Q��4u�9̓IK�����hh�i��t�ݕN��W���G���w
��Ljg(�gw��L�Ӌ�T071���oUX*�*|��
�J�&�*/T����ުU�U�T��^S}�FU3S�	Ԗ�U��P�SSg�;���g�oT?�~Y��Y�L�OC�Q��_�� c�x,!k
��u�5�&���|v*�����=���9C3J3W�R�f?�q��tN	�(���~���)�)�4L�1e\k����X�H�Q�G�6����E�Y��A�J'\'Gg����S�Sݧ
�M=:��.�k���Dw�n��^��Lo��y��}/�T�m���GX�$��<�5qo</���QC]�@C�a�a�ᄑ��<��F�F�i�\�$�m�mƣ&&!&KM�M�RM��)�;L;L���͢�֙5�=1�2��כ߷`ZxZ,����eI��Z�Yn�Z9Y�XUZ]�F���%ֻ�����N�N���gð�ɶ�����ۮ�m�}agbg�Ů��}�}��=
���Z~s�r:V:ޚΜ�?}���/gX���3��)�i�S��Ggg�s�󈋉K��.�>.���Ƚ�Jt�q]�z�������ۯ�6�i�ܟ�4�)�Y3s���C�Q��?��0k߬~OCO�g��#/c/�W�װ��w��a�>�>r��>�<7�2�Y_�7��ȷ�O�o�_��C#�d�z����%g��A�[��z|!��?:�e����A���AA�����!h�쐭!��Α�i�P~���a�a��~'���W�?�p�X�1�5w��Cs�D�D�Dޛg1O9�-J5*>�.j<�7�4�?�.fY��X�XIlK9.*�6nl�������{�/�]py�����.,:�@L�N8��A*��%�w%�
y��g"/�6ш�C\*N�H*Mz�쑼5y$�3�,幄'���L
Lݛ:��v m2=:�1����qB�!M��g�g�fvˬe����n��/��k���Y-
�B��TZ(�*�geWf�͉�9���+��̳�ې7����ᒶ��KW-X潬j9�<qy�
�+�V�<���*m�O��W��~�&zMk�^�ʂ��k�U
�}����]OX/Yߵa���>������(�x��oʿ�ܔ���Ĺd�f�f���-�[����n
�ڴ
�V��E�/��(ۻ��C���<��e����;?T�T�T�T6��ݵa�n��{��4���[���>ɾ�UUM�f�e�I���?�����m]�Nmq����#�׹���=TR��+�G�����w-
6
U����#pDy��	�
:�v�{���vg/jB��F�S��[b[�O�>����z�G��4<YyJ�T�i��ӓg�ό���}~.��`ۢ�{�c��jo�t��E���;�;�\�t���W�W��:_m�t�<���Oǻ�����\k��z��{f���7���y���՞9=ݽ�zo�����~r'��˻�w'O�_�@�A�C݇�?[�����j�w����G�������C���ˆ
��8>99�?r��C�d�&����ˮ/~�����јѡ�򗓿m|�����������x31^�V��w�w��O�| (�h���SЧ�������c3-� cHRMz%������u0�`:�o�_�F�IDATxڬ���0���@W�N����
�
p����NP�N�/����汗|�/�Ѷ-)"#Q���m���'���8EB���cߣ-���fKc+���<�����X5#�4�^	+���
�Yi���@��f(7�.�oH_�����'��/]��*o�\���\&ϕ4��vi�K�A;���b���A��T��;$T9�D��IEND�B`��PNG


IHDR$l�gAMA���asRGB��, cHRMz&�����u0�`:�p��Q<	pHYs����k�MIDATx���ǍAFa��h2����M$��lk"`B�@{�zdV�w)D�L���k����>|���;�X���իa��z��}��ru���C�l*�I�J�:T�סR��WR:<�$upBI�ARI��AV)�BT�:6�J^�Q�� *y/D%��b%�#�z9*%�%�㕔�+I�W:^�JR�QI�Q��J�>}�� �m�'k�6Ik���|<ܮ�/��#h9]�V�s��jܦ�Ԑ�Ϡ��*��P)_�J�:T�סR���u���9�|�}^����	����	���Љ��R�#���ul�������AT�:>�J^�Q���JRG�x�%�㕼�*y�P:6�JR�Q���sJ�IZa�$9�CaT�[N7	�C����O�W�_���;�X�T�u�߂JZu����RB���J�:Z	AV�+!��x%Y�� ���tpJ�g��)%]�Q�QG�ATrA��AEQGAI=P�DD�8(��A��XǮ��.�1+A���J�:^	AJ��~)�Rbu�D%��I*�N��߃��� Irжk�5u��5��j��
VŘ;�rvIEND�B`��PNG


IHDR'�ՆiIDATx�c` ��'Z!��=J�
AJ�P��8�����V
QW�OP�g J�TW�,.@X�}��!��c�����2�B�)$B<
	�\a5������J�[IEND�B`��PNG


IHDR'�ՆRIDATxڭ�
PK�(Ζt'�hiI��sJwٌ8Z��l��`�
D���Z&M����(5!��Zۢ�XD�Gжhy��UMSJ�bϵ�IEND�B`�.graph-canvas-div {
    height: 100%;
    width: 100%;
    -ms-grid-row: 1;
    -ms-grid-column: 1;
    position: relative;
    background-color: transparent;
}

.graph-canvas {
    left: 0px;
    top: 0px;
    height: 100%;
    width: 100%;
    position: absolute;
    background-color: transparent;
}

.countersDataSeries-marker {
    border-radius: 50%; /* This causes the div to look like a circle */
    width: 5px;
    height: 5px;
}

.dataCursor {
    width: 0px;
    height: 100%;
    position: absolute;
    z-index: 100;
    border-right: 1px solid black; /*[1px solid {plugin-treeview-content-selected-border-color}]*/
    overflow: visible;
}

.dataCursor.interpolating {
    border-right-style: dashed;
}

.dataCursorPoint {
    position: absolute;
    visibility: hidden;
}

.dataCursor.interpolating .dataCursorPoint {
    display: none;
}

.hidden {
    display: none;
}

.line-separator {
    height: 1px;
    background: black;
    padding: 0px 0px 0px 0px;
}

.graphContainer {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0px;
    left: 0px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: -ms-grid;
    -ms-grid-columns: 1fr;
    -ms-grid-rows: 1fr;
    color: black; /*[{plugin-color}]*/
    background-color: transparent;
    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%;
}

.header-float {
    margin: 0;
    padding: 0;
    z-index: 1000;
    background-color: transparent; /*[{plugin-background-color}]*/
}

.main-usermessage-container {
    height: 150px;
}

.main-usermessage-container .usermessage-message {
    background-color: transparent;
    text-align: center;
    width: 100%;
    display: block;
    position: absolute;
    top: 50%;
}

.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;
}

.main-information-container-hidden {
    display: none;
}

    .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;
    }

    .main-information-container .information-message {
        -ms-grid-row: 1;
        -ms-grid-column: 2;
        color: black; /*[{diagnostics-information-foreground}]*/
        padding-left: 5px;
        padding-right: 5px;
        background-color: transparent;
    }

    .main-information-container .information-link {
        -ms-grid-row: 1;
        -ms-grid-column: 3;
        padding-left: 5px;
        padding-right: 5px;
        background-color: transparent;
    }

    .main-information-container .information-close-div {
        -ms-grid-row: 1;
        -ms-grid-column: 4;
        background-color: transparent;
        vertical-align: middle;
        padding-top: 2px;
        overflow: visible;
    }

    .main-information-container .information-close-div .information-close {
        background-color: transparent;
        font-family: Marlett !important;
        color: black; /*[{diagnostics-information-foreground}]*/
        float: right;
    }

.main-swimlane-container {
    -ms-grid-row: 2;
    -ms-grid-column: 1;
    height: 100%;
    width: 100%;
}

.footer-container {
    background-color: transparent;
    width: 100%;
    position: fixed;
    bottom: 0px;
    /* Above everything*/
    z-index: 1001;
}

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-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]*/
    border-bottom: 1px solid #c0c0c0; /*[1px solid {diagnostics-host-border}]*/
}

.ruler-body {
    position: relative;
    overflow: visible;
    margin: 0px 3em;
    padding: 0;
    left: 0px;
    right: 0px;
    height: 1.8em;
    z-index: 97;
    -ms-user-select: none;
    user-select: none;
    -ms-grid-row: 2;
    -ms-grid-column: 1;
    -ms-grid-row-align: center;
    border-right: 1px solid black; /*[1px solid {diagnostics-host-border}]*/
    border-left: 1px solid black; /*[1px solid {diagnostics-host-border}]*/
}

    .ruler-body:focus {
        outline: 1px dotted grey; /*[1px dotted {plugin-treeview-content-selected-border-color}]*/
    }

.ruler-doubleSlider {
    background-color: transparent;
    overflow: visible;
    z-index: 106;
}

.ruler-scale-main {
    margin: 0;
    padding: 0;
    height: 1.8em;
}

.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-mark-image-event {
    width: 0.750em;
    height: 0.750em;
    background-position-x: left;
    background-position-y: bottom;
    background-size: 100%;
    z-index: 75;
    background-color: transparent;
}

.ruler-scale-mark-image-position {
    position: absolute;
    top: 1.0em;
}

.ruler-legend-div {
    -ms-grid-columns: auto 1fr;
    -ms-grid-rows: 1fr;
    display: -ms-grid;
    -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-label-mark-image {
    width: 1.0em;
    height: 1.0em;
    -ms-grid-column: 1;
    -ms-grid-row: 1;
    -ms-grid-row-align: center;
    background-size: 100%;
}

.ruler-title-text {
    -ms-grid-row: 1;
    -ms-grid-column: 1;
    -ms-grid-row-align: center;
    font-weight: 600;
    margin-left: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ruler-header {
    border-bottom: 1px solid grey; /*[1px solid {diagnostics-host-border}]*/
    padding-top: 2px;
    padding-bottom: 3px;
    -ms-grid-columns: 1fr;
    -ms-grid-rows: 1fr;
    display: -ms-grid;
    -ms-grid-row: 1;
    -ms-grid-column: 1;
    -ms-grid-row-align: center;
}
.scrollbar {
    width: 100%;
    overflow-x: scroll !important;
    border-bottom: 1px solid grey; /*[1px solid {diagnostics-host-swimlane-border}]*/
    z-index: 115;
    transition: opacity .5s ease-in-out;
    opacity: 0;
}

body:hover .scrollbar {
    transition: opacity .5s ease-in-out;
    opacity: 1;
}

.scrollbar .scrollbar-width-calculator {
    position: relative;
    height: 1px;
    width: 1px;
}
.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;
    float: left;
    margin-right: 10px;
}

    .legend-div:last-child {
        margin-right: 0px;
    }

.legend-marker {
    background-size: 100%;
    -ms-grid-column: 1;
    -ms-grid-row: 1;
    -ms-grid-row-align: center;
    -ms-grid-columns: 1fr;
    -ms-grid-rows: 1fr;
}

.legend-text-div {
    -ms-grid-column: 2;
    -ms-grid-row: 1;
    -ms-grid-row-align: center;
    margin-left: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.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;
}

.title-container {
    margin-left: 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;
}

.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;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.title-expanded-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-collapsed-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;
}

.graph-scale-left {
    width: 100%;
    height: 100%;
    position: relative;
}

.graph-scale-right {
    width: 100%;
    height: 100%;
    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;
        height: 100%;
    }

    .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 */
}

.swimlaneBase {
    display: -ms-grid;
    -ms-grid-rows: auto auto;
    -ms-grid-columns: auto 1fr;
}

    .swimlaneBase > * {
        position: relative;
    }

    .swimlaneBase > .title-container {
        -ms-grid-row: 1;
        -ms-grid-column: 1;
        padding: 2px 0px 2px 0px;
        background-color: magenta; /*[{plugin-background-color}]*/
        z-index: 1;
    }

    .swimlaneBase > .titleRegion {
        -ms-grid-row: 1;
        -ms-grid-column: 2;
        -ms-grid-column-align: end;
        padding: 2px 0px 2px 0px;
        display: block;
    }

    .swimlaneBase > .titleRegion.limitedSpace {
        display: none;
    }

    .swimlaneBase > .contentRegion {
        -ms-grid-row: 2;
        -ms-grid-column: 1;
        -ms-grid-column-span: 2;
    }

.contentRegion {
    box-sizing: content-box;
    display: -ms-grid;
    -ms-grid-rows: 1fr;
    -ms-grid-columns: 3em 1fr 3em;
}

    .contentRegion > * {
        position: relative;
    }

    .contentRegion > .leftRegion {
        -ms-grid-row: 1;
        -ms-grid-column: 1;
    }

    .contentRegion > .mainRegion {
        -ms-grid-row: 1;
        -ms-grid-column: 2;
        border: 1px solid red; /*[1px solid {diagnostics-host-swimlane-border}]*/
    }

    .contentRegion > .rightRegion {
        -ms-grid-row: 1;
        -ms-grid-column: 3;
    }

    .mainRegion > div > .unselected {
        background-color: rgba(200, 200, 200, 0.50);
        position: absolute;
        z-index: 110;
        height: 100%;
    }

.gridLines {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0px;
    left: 0px;
    background-color: transparent;
}

.selectionOverlay {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: transparent;
}
/* Styles overriding hub styles */
.ruler-title-text {
    margin-left: 0px;
}
�PNG


IHDR$l�	pHYs���+rIDATx��?K#A�]�4�
���+��`���v���"g�;�R�ɇ���+=L�"�p��XJs��w`&�ٙy����lf�y���Lx���#���ۯ�U��-��V
��*x���
[J��A����E�
��`� 3�t��H���[���-ؤ��-�|&���O@7#
�o#�F��j�!.�詃��e#T���Eʏdרp-뛐R6B�$�G`$��	���˜B����N�B
5��Z�����^B+�By��/���8HB���s
�ޒ��W�~�Ѓ�Q`b��
`R9��3(��@3�T�+��xX�
}��	nDF]�8�-��ه�BO`�U�#܂3獗!�2��as����8q�{���{��]��i}��c��c���	�f��Q��AF�c�z�(�F�k ͈�J��Q(�T4s�1����h($q�1Zi=�;����)�g!a¤aP�<��
�o���$�~C2�-BfF����W��(0���0�X�}�J�X���Bm��#�XHp�<�G��gC�O`�U�#܂3�Ӟ!�2��as���=�8��qy��t���GK�D������
^��{�'��ǖ*uP�z2r�s0R�]���ө�"��o�N.2�`����-�'���m���Y�!�p� #i��~Bu�|�]/j9k4�f�Y?�T�Oh�&����a^�i�C4�������Z!I�1�vB4y�|�����
�P�Bz�<��xm�)�PJ��� 	���{���Qo�$�z�8
Ll�n��B����*)�a(*���,$��E���B�5�Y�8�-�p>��-x�B��9���_���C�e�_@�1f`0��z�IEND�B`��PNG


IHDR$l�%
�	pHYs���+PLTEUUUUUU"y�"y���������btRNS�������LfIDATx���	�@DQKHkn)!M���� s� ���0�C�������b�7�Ť�Ѣl6M��b�n�͔o@��*£E�l���NJ?L�)߀�W�G����a/
c��<�`IEND�B`��PNG


IHDR$l�gAMA���asRGB��, cHRMz&�����u0�`:�p��Q<	pHYs����k��IDATx���)LAG�w��U�Bq_^��������zU��U���_`��K>�yy��Qm�B3���h���06��0�tO�p��B(�`��������h'�t~_@��	�}!�/$�E������Wz *E�@����U�
�V�*[`�l���U�
�V��˅B�P(�-��eݿ�GU.nꗏ�^��c��D(Im��S.B�7��>�E(���RB~_@����}!!�/%���j�V��G���뢟:[`�l���U�
�V�*[`��߇�P(
���<7���tZ/�Q6B�.�[��ۼ{�H(��
��}Y!�/+�e�����ܗ��B~_^��Җb��J`�l���U�
�V�*[`�l��U��B�$�����IEND�B`��PNG


IHDR$le�
	pHYs����k�gAMA���aPLTEz�����'w��?tRNS@��fsRGB��, cHRMz&�����u0�`:�p��Q<%IDATx�c`�:��k(�P b��V��!Ƣ9U��1��&�IEND�B`�{
    "start_url": "PerfTools\\MemoryAnalyzer\\memoryAnalyzer.html",
    "domain": "http://microsoft.com",
    "name": "JavaScript Memory Analyzer",
    "version": "1.1",
    "f12": {
        "start_url": "memoryAnalyzer.html",
        "file_aliases": {
            "DiagnosticsHub.DataWarehouseHost": {
                "path": "DiagnosticsHub.ScriptedSandboxPlugin.dll"
            },
            "MemoryAnalyzerExtension": {
                "path": "MemoryAnalyzer.dll"
            },
            "PerformanceTraceExtension": {
                "path": "PerformanceTrace.dll",
                "optional": true
            }
        },
        "localized_tab_resource": "F12ToolTitle",
        "localized_tooltip_id": 2158,
        "resource_aliases": {
            "MemoryAnalyzer": {
                "is_default": true
            },
            "DiagnosticsHubControlsResources": { },
            "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-info-alert": {
                "bitmap_source": "..\\..\\pluginhost\\theme\\i_alertinfo.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": "HtmlTools\\MemoryAnalyzer\\x86\\MemoryAnalyzer.dll",
            "path_amd64": "HtmlTools\\MemoryAnalyzer\\amd64\\MemoryAnalyzer.dll"
        },
        "PerformanceTraceExtension": {
            "path": "HtmlTools\\PerformanceTrace.dll",
            "optional": true
        }
    },
    "vs": {
        "resource_aliases": {
            "MemoryAnalyzer": {
                "type": "Embedded",
                "name": "Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost",
                "path": "Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Resources.MemoryAnalyzer.Resources",
                "is_default": true
            },
            "Common": {
                "type": "Embedded",
                "name": "Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost",
                "path": "Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Resources.Common.Resources"
            },
            "DiagnosticsHubControlsResources": {
                "path": "..\\..\\..\\..\\Platform\\DiagnosticsHub\\WebViews\\DiagnosticsHub.Javascript.Controls.ScriptResources"
            }
        },
        "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 {
    -ms-grid-columns: 1fr;
    -ms-grid-rows: auto auto auto;
    display: none; /* Initial state is display:none, but becomes visible on control initialization */
    height: 100%;
    position: relative;
    width: 100%;
}

    .heapOverviewGraph .main-swimlane-container {
        margin-bottom: 0px !important;
    }

    .heapOverviewGraph .scrollbar-container {
        -ms-grid-row: 3;
    }

.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;
}

@supports (display: flex) {
    .analysisContainer {
        display: flex;
    }
}

    .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, .BPT-IELink {
    border: 1px solid transparent;
    color: TRANSPARENT; /*[{plugin-link-color}]*/ /*EnvironmentColors.CommandBarMenuLinkTextColorKey*/
    cursor: pointer;
}

    .BPT-FileLink:hover, .BPT-HelpLink:hover, .BPT-IELink: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-treeview-content-inactive-selected-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;
}

/* Override the * rule in gridcontrol.css */
#plugin-vs-tooltip, #plugin-vs-tooltip * {
    box-sizing: content-box;
}<!DOCTYPE html>
<!-- saved from url=(0016)http://localhost -->
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=11" />
    <meta http-equiv="Content-Type" content="text/html" />
    <meta http-equiv="format-detection" content="telephone=no">
    <title>Memory</title>
    <link id="controls" rel="stylesheet" href="../../common/controls/controls.css" type="text/css" data-plugin-theme="true" data-necessary-for-tooltip="true" />
    <link id="MultiLineGraph" rel="stylesheet" href="../Common/controls/MultiLineGraph.css" type="text/css" data-plugin-theme="true" />
    <link id="Renderer" rel="stylesheet" href="../Common/controls/Renderer.css" type="text/css" data-plugin-theme="true" />
    <link id="Ruler" rel="stylesheet" href="../Common/controls/Ruler.css" type="text/css" data-plugin-theme="true" />
    <link id="Scrollbar" rel="stylesheet" href="../Common/controls/Scrollbar.css" type="text/css" data-plugin-theme="true" />
    <link id="Swimlane" rel="stylesheet" href="../Common/controls/Swimlane.css" type="text/css" data-plugin-theme="true" />
    <link id="menuControl" rel="stylesheet" href="../Common/controls/menuControl.css" type="text/css" data-plugin-theme="true" />
    <link id="common.f12" rel="stylesheet" href="../Common/common.f12.css" type="text/css" data-plugin-theme="true" />
    <link id="TokenExtractor" rel="stylesheet" href="../Common/TokenExtractor.css" type="text/css" data-plugin-theme="true" />
    <link id="gridControl" rel="stylesheet" href="../Common/controls/gridControl.css" type="text/css" data-plugin-theme="true" />
    <link id="memoryAnalyzer" rel="stylesheet" href="memoryAnalyzer.css" type="text/css" data-plugin-theme="true" />
    <link id="memoryAnalyzer.f12" rel="stylesheet" href="memoryAnalyzer.f12.css" type="text/css" data-plugin-theme="true" />
    <link id="tabControl" rel="stylesheet" href="js/controls/tabControl.css" type="text/css" data-plugin-theme="true" />
    <link id="snapshotTileView" rel="stylesheet" href="snapshotTileView.css" type="text/css" data-plugin-theme="true" />

    <script type="text/javascript" src="../../Common/isDebugBuild.js"></script>
    <script type="text/javascript" src="../Common/plugin.js"></script>
    <script type="text/javascript" src="../Common/DiagnosticsHub.js"></script>
    <script type="text/javascript" src="../../Common/CommonMerged.js"></script>
    <script type="text/javascript" src="../Common/CommonMerged.js"></script>
    <script type="text/javascript" src="../Common/controls/hubControls.js"></script>
    <script type="text/javascript" src="MemoryAnalyzerMerged.js"></script>
    <script type="text/javascript" src="res://f12test.dll/23/selftest/SelfTestMemoryAnalyzer.js"></script>

    <script id="f12ViewTemplate" type="text/html">
        <div class="headerAndTabContainer">
            <div class="header" id="toolbarContainer">
            </div>
            <div id="tabContainer" class="tabContainer">
                <div id="startProfilingPrompt" class="startProfilingPrompt">
                    <div id="startProfilingMessage" class="BPT-FileLink startProfilingMessage" tabindex="0" role="link"></div>
                </div>
            </div>
        </div>
    </script>

    <script id="SummaryTabTemplate" type="text/html">
        <div class="summaryView">
            <div id="warningSection" class="warningMessage"></div>
            <div class="mainSection">
                <div id="heapOverviewContainer">
                    <div id="heapOverviewGraph" class="heapOverviewGraph"></div>
                </div>
            </div>
            <div id="tilesContainer" class="snapshotTilesContainer">
                <div id="takeSnapshotTile" class="snapshotTile snapshotTileBlank">
                    <div id="snapshotError" class="snapshotError">
                        <span id="snapshotErrorLabel"></span>
                        <span id="snapshotErrorMsg"></span>
                    </div>
                    <div class="snapshotTileInner">
                        <button id="takeSnapshotButton" class="takeSnapshotButton">
                            <div class="snapshotTileTextContainer">
                                <div id="takeSnapshotIcon" class="takeSnapshotIcon"></div>
                                <div id="takeSnapshotLabel" class="takeSnapshotLabel" data-plugin-vs-tooltip='{"resource":"TakeSnapshotTooltip"}'></div>
                            </div>
                            <progress id="takeSnapshotProgress"></progress>
                        </button>
                    </div>
                </div>
            </div>
            <div class="giveFeedbackContainer">
                <button id="giveFeedbackButton_Summary" type="button">Give Feedback</button>
            </div>
        </div>
    </script>

    <script id="SnapshotTileTemplate" type="text/html">
        <div id="snapshotTile" class="snapshotTile snapshotTileTaken">
            <div class="snapshotTileInner">
                <div id="snapshotTileHeader" class="snapshotTileHeader" tabindex="0">
                    <div id="snapshotTileTitle" class="snapshotTileTitle"></div>
                    <div id="snapshotTakenDate" class="snapshotTakenDate"></div>
                    <div id="snapshotTileDetachedDomNodeInfo" class="snapshotTileDetachedDomNodeInfo">
                        <div class="detachedDomNodeWarning"></div>
                        <div id="snapshotTileDetachedDomNodeCount" class="BPT-FileLink snapshotTileDetachedDomNodeCount" tabindex="0" role="link"></div>
                    </div>
                </div>
                <div class="snapshotTileGrid">
                    <div class="rightalign">
                        <div id="heapSizeLink" class="BPT-FileLink instanceLink heapSizeLink" tabindex="0" role="link"></div>
                    </div>
                    <div class="rightColumn rightalign">
                        <div id="objectsCountLink" class="BPT-FileLink instanceLink objectsCountLink" tabindex="0" role="link"></div>
                    </div>
                    <div class="bottomRow rightalign">
                        <div id="heapDiffLink" class="BPT-FileLink heapDiffLink" tabindex="0" role="link"></div>
                    </div>
                    <div id="heapDiffIndicatorIcon" class="bottomRow heapIcon"></div>
                    <div class="bottomRow rightColumn rightalign">
                        <div id="objectsDiffLink" class="BPT-FileLink objectsDiffLink" tabindex="0" role="link"></div>
                    </div>
                    <div id="objectDiffIndicatorIcon" class="bottomRow objectsIcon"></div>
                </div>
                <div id="snapshotTileImageHolder" class="snapshotTileImageHolder">
                    <img id="snapshotTileImage" class="snapshotTileImage" src="#" alt="#" />
                </div>
            </div>
        </div>
    </script>

    <script id="CanvasChartTemplate" type="text/html">
        <canvas id="mainCanvas"></canvas>
    </script>

    <script id="SummaryBreakdownGraphTooltip" type="text/html">
        <div class="snapshotTileBreakdownGraphTooltip">
            <div><span class="breakdownGraphObject"></span><span id="breakdownGraphTooltipObject"></span></div>
            <div><span class="breakdownGraphMarkup"></span><span id="breakdownGraphTooltipMarkup"></span></div>
            <div><span class="breakdownGraphWinRT"></span><span id="breakdownGraphTooltipWinRT"></span></div>
            <div><span class="breakdownGraphExternal"></span><span id="breakdownGraphTooltipExternal"></span></div>
        </div>
    </script>

    <script id="SnapshotTabTemplate" type="text/html">
        <div class="snapshotTab">
            <div id="snapshotDataNavigation" class="snapshotDataNavigation"></div>
            <div class="snapshotErrorProgress">
                <div id="snapshotProcessingError" class="snapshotError">
                    <div id="snapshotProcessingErrorFrown" class="snapshotProcessingErrorFrown">:(</div>
                    <span id="snapshotProcessingErrorLabel"></span>
                    <div id="snapshotProcessingErrorMsg"></div>
                </div>
                <div id="snapshotProcessingProgressDiv" class="snapshotProcessingProgressDiv">
                    <div class="progressContent">
                        <div id="progressText"></div>
                        <progress id="progressBar" />
                    </div>
                </div>
            </div>
        </div>
    </script>

    <script id="SnapshotDataViewTemplate" type="text/html">
        <div id="snapshotScrollableContainer" class="snapshotScrollableContainer">
            <div class="snapshotView">
                <div id="snapshotGridContainer" class="snapshotGridContainer"></div>
                <div id="snapshotViewGridSplitter" class="gridSplitter gridSplitter-Vertical"></div>
                <div id="referenceView" class="referenceView">
                    <div class="referenceGraphTitle">
                        <label id="referenceGraphTitleLabel" for="referenceViewContainer"></label>
                    </div>
                    <div id="referenceViewContainer" class="referenceViewContainer"></div>
                </div>
                <div id="snapshotMessagesContainer" class="snapshotMessagesContainer">
                    <div id="reachedItemsCapMessageContainer" class="reachedItemsCapMessageContainer"></div>
                </div>
            </div>
        </div>
    </script>
</head>
<body tabindex="-1">
    <div id="mainContainer">
    </div>
</body>
</html>
//! Copyright (C) Microsoft. All rights reserved.
var __extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},ControlTemplates,MemoryAnalyzer;(function(n){"use strict";var t;(function(n){var t;(function(n){var e,o,s,i,r;(function(n){n[n.Scale=0]="Scale";n[n.Expand=1]="Expand";n[n.Roll=2]="Roll";n[n.Fixed=3]="Fixed"})(n.ChartViewType||(n.ChartViewType={}));e=n.ChartViewType,function(n){n[n.Points=1]="Points";n[n.Line=2]="Line";n[n.PointsAndLine=n.Points|n.Line]="PointsAndLine";n[n.VerticalLines=4]="VerticalLines";n[n.Triangles=8]="Triangles"}(n.SeriesRenderType||(n.SeriesRenderType={}));o=n.SeriesRenderType,function(n){n[n.Sort=0]="Sort";n[n.Remove=1]="Remove"}(n.SeriesOrderType||(n.SeriesOrderType={}));s=n.SeriesOrderType,function(n){n[n.Background=0]="Background";n[n.Foreground=1]="Foreground";n[n.Grid=2]="Grid";n[n.LegendBackground=3]="LegendBackground";n[n.ViewSelection=4]="ViewSelection";n[n.ViewSelectionOutside=5]="ViewSelectionOutside"}(i||(i={})),function(n){n[n.Foreground=0]="Foreground"}(r||(r={}));var t=function(){function n(n,t){this.x=n;this.y=t}return n}(),h=function(n){function t(t,i,r){n.call(this,t,i);this.data=r}return __extends(t,n),t}(t),v=function(n){function t(t,i,r,u){n.call(this,t,i);this.isInView=r;this.seriesIndex=u}return __extends(t,n),t}(t),u=function(){function n(n,t,i,r){this.left=n;this.top=t;this.right=i;this.bottom=r}return n}(),c=function(n){function t(t,i,r,u){if(n.call(this,t,i,r,u),this.left>this.right||this.top>this.bottom)throw"Invalid rectange size"}return __extends(t,n),Object.defineProperty(t.prototype,"width",{get:function(){return this.right-this.left},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.bottom-this.top},enumerable:!0,configurable:!0}),t}(u),f=function(){function n(n,t){this.min=n;this.max=t}return n}(),l=function(){function n(n,t,i){this._lineColorString="#FF0000";this._lineFillColorString="#FF0000";this._pointColorString="#FF0000";this._pointStrokeColorString="#FF0000";this.index=n;this.legendText=t;this.seriesRenderType=i;this.data=[];switch(n){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)"}}return Object.defineProperty(n.prototype,"lineColor",{get:function(){return this._lineColorString},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"lineFillColor",{get:function(){return this._lineFillColorString},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pointColor",{get:function(){return this._pointColorString},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pointStrokeColor",{get:function(){return this._pointStrokeColorString},enumerable:!0,configurable:!0}),n}(),a=function(n){function i(i){if(n.call(this,"CanvasChartTemplate"),this._chartInitialStartSet=!1,this._chartAxisPadding=new u(50,40,5,5),this._chartAxisCount=5,this._chartAxisIncreaseRatio=1.5,this._chartDrawFill=!0,this._chartOverviewPadding=4,this._chartViewOverview=!1,this._chartViewX=0,this._chartViewWidth=60,this._chartViewType=2,this._gridX=new f(0,0),this._gridY=new f(0,0),this._gridRange=new t(0,0),this._triangleSize=7,this._containerId=i,this._series=[],this._container=document.getElementById(this._containerId),this._container!==null){this._container.appendChild(this.rootElement);this._canvas=this.findElement("mainCanvas");this._context=this._canvas.getContext("2d");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"}return __extends(i,n),i.prototype.setViewType=function(n,t,i,r){t<this._gridX.min&&(t=this._gridX.min);this._chartViewType=n;this._chartViewX=t;this._chartViewWidth=i;typeof r=="number"&&(this._gridY.max=r,this._gridRange.y=r);this.drawChart()},i.prototype.addSeries=function(n,t){var u=new l(this._series.length,n,t),r,i;for(this._series.push(u),r=0,i=0;i<this._series.length;i++)if(this._series[i].seriesRenderType&2&&(r++,r>=2)){this._chartDrawFill=!1;break}return this._series.length-1},i.prototype.addPointToSeries=function(n,t,i,r,u,f){var e,o,s;if(u===void 0&&(u=0),n>=0&&n<this._series.length){if(e=new h(t,i,r),o=this._series[n].data,o.push(e),e.x<this._gridX.max)switch(u){case 1:for(s=o.length-2;s>=0;s--)if(o[s].x<t)break;s++;o.splice(s,o.length-s-1);this._gridX.max=e.x;break;case 0:default:o.sort(function(n,t){return n.x-t.x})}this._chartInitialStartSet||(this._chartInitialStartSet=!0,this._gridX.min=e.x,this._chartViewX=e.x);this.calculateRange(e);f||this.drawChart()}},i.prototype.onResize=function(){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())},i.prototype.getColor=function(n){switch(n){case 0:return"rgb(255, 255, 255)";case 1:return"rgb(0, 0, 0)";case 2:return"rgb(200, 200, 200)";case 3:return"rgba(250, 250, 250, 0.75)";case 4:return"rgb(120, 120, 120)";case 5:return"rgba(255, 255, 255, 0.6)"}return"rgb(255, 0, 0)"},i.prototype.getFontString=function(n){switch(n){case 0:return'7.5pt "Segoe UI", Arial, sans-serif'}return'7.5pt "Segoe UI", Arial, sans-serif'},i.prototype.getYCoord=function(n,t,i){return t+(this._gridY.max-n)/this._gridRange.y*i},i.prototype.drawXAxesValue=function(n,t){this._context.save();this._context.fillStyle=this.getColor(1);this._context.font=this.getFontString(0);this._context.fillText(""+n.toFixed(2),this._chartAxisPadding.left-5,this._chartAxisPadding.top+t+1.5);this._context.restore()},i.prototype.drawChartBackground=function(){this._context.fillStyle=this.getColor(0);this._context.fillRect(0,0,this._canvas.width,this._canvas.height)},i.prototype.drawChartAxes=function(n){var i,t,r,u;for(this._context.fillStyle=this.getColor(2),this._context.strokeStyle=this.getColor(2),this._context.textAlign="right",i=this._gridRange.y/this._chartAxisCount,this.drawXAxesValue(this._gridY.max,0),t=1;t<this._chartAxisCount;t++)r=i*t/this._gridRange.y*n.height,u=n.top+Math.floor(r)+.5,this._context.beginPath(),this._context.moveTo(n.left,u),this._context.lineTo(n.left+n.width,u),this._context.stroke(),this.drawXAxesValue(this._gridY.max-i*t,r);this.drawXAxesValue(this._gridY.min,n.height)},i.prototype.drawChartBorder=function(n){this._context.fillStyle="transparent";this._context.strokeStyle=this.getColor(1);this._context.strokeRect(n.left-.5,n.top-.5,n.width,n.height)},i.prototype.drawChartLegend=function(n){var i,u,t,r,f;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-n.bottom+10+"px",this._legendDiv.style.backgroundColor=this.getColor(3),this._legendDiv.style.color=this.getColor(1),this._legendDiv.style.padding="2px 5px 2px 5px",this._legendDiv.style.font=this.getFontString(0),this._legendDiv.style.borderRadius="3px",this._container!==null&&this._container.appendChild(this._legendDiv)),this._legendDiv.children.length!==this._series.length)for(i=0;i<this._series.length;i++)u=document.createElement("div"),u.className="chartLegendSeries",t=document.createElement("span"),t.style.display="inline-block",t.style.width="16px",t.style.height="10px",t.style.margin="0 4px 2px 0",t.style.verticalAlign="middle",t.style.border="solid "+this._series[i].lineColor+" 1px",this._series[i].seriesRenderType&2&&(t.style.backgroundColor=this._series[i].lineFillColor),r=document.createElement("span"),r.style.display="inline-block",r.style.width="12px",r.style.height="8px",r.style.margin="0 0 10px 1px",r.style.verticalAlign="middle",r.style.backgroundColor=this._series[i].pointColor,t.appendChild(r),u.appendChild(t),f=document.createElement("span"),f.innerText=this._series[i].legendText,u.appendChild(f),this._legendDiv.appendChild(u)},i.prototype.drawChartType=function(n,t){for(var e,o,l,a,i,f,r=[],v=0;v<this._series.length;v++)if(e=this._series[v],o=e.data,o.length>0){var b=0,k=o.length-1,u=0,s=0;switch(n){case 0:u=this._gridX.min;s=this._gridRange.x;break;case 1:u=this._gridX.min;s=Math.max(this._gridRange.x,this._chartViewWidth);break;case 3:u=this._chartViewX;s=this._chartViewWidth;break;case 2:this._chartViewX=Math.max(this._gridX.max-this._chartViewWidth,this._gridX.min);u=this._chartViewX;s=this._chartViewWidth}var y=u+s,p=t.width/s,c=0,l=0,it=o[b],d=!1;for(this._context.save(),this._context.beginPath(),this._context.rect(t.left,t.top,t.width,t.height),this._context.clip(),this._context.fillStyle=e.lineFillColor,this._context.strokeStyle=e.lineColor,this._context.beginPath(),i=b;i<=k;i++){var h=o[i],g=h.x>=u&&h.x<=y,w=g;w||(h.x<u&&i<k&&o[i+1].x>u||h.x>y&&i>0&&o[i-1].x<y)&&(w=!0);w&&(c=t.left+(h.x-u)*p,l=this.getYCoord(h.y,t.top,t.height),d||(this._context.moveTo(c,this.getYCoord(0,t.top,t.height)),d=!0),e.seriesRenderType&2&&this._context.lineTo(c,l),r.push({x:c,y:l,isInView:g,seriesIndex:v}))}if(e.seriesRenderType&2&&(this._chartDrawFill?(l=this.getYCoord(0,t.top,t.height),this._context.lineTo(c,l),this._context.closePath(),this._context.fill()):this._context.stroke(),this._chartDrawFill)){for(this._context.lineWidth=t.height<100?1:2,this._context.strokeStyle=e.lineColor,this._context.beginPath(),i=0;i<r.length;i++)a=r[i],i===0&&this._context.moveTo(a.x,Math.round(a.y)-.5),this._context.lineTo(a.x,Math.round(a.y)-.5);this._context.stroke()}this._context.restore()}this.drawChartBorder(t);var tt=t.left+(this._chartViewX-this._gridX.min)*p,rt=tt+Math.min(this._chartViewWidth*p,t.width),nt=-1;for(i=0;i<r.length;i++)r[i].isInView&&(f=r[i].seriesIndex,nt!==f&&(this._context.fillStyle=this._series[f].pointColor,this._context.strokeStyle=this._series[f].pointStrokeColor,nt=f),this._series[f].seriesRenderType&1&&(this._context.beginPath(),this._context.arc(r[i].x-.5,r[i].y-.5,3,0,Math.PI*2),this._context.fill()),this._series[f].seriesRenderType&4&&(this._context.beginPath(),this._context.rect(Math.round(r[i].x),t.top,1,t.height),this._context.fill()),this._series[f].seriesRenderType&8&&(this._context.beginPath(),this._context.moveTo(r[i].x,t.bottom-2*this._triangleSize),this._context.lineTo(r[i].x-this._triangleSize,t.bottom),this._context.lineTo(r[i].x+this._triangleSize,t.bottom),this._context.lineTo(r[i].x,t.bottom-2*this._triangleSize),this._context.closePath(),this._context.fill()))},i.prototype.drawChartViewSelection=function(n){var t=this._chartOverviewPadding,r=t*2,f=n.width/this._gridRange.x,i=(this._chartViewX-this._gridX.min)*f,e=n.top-t,u=Math.min(this._chartViewWidth*f,n.width),o=n.height+r;this._context.fillStyle=this.getColor(5);this._context.fillRect(n.left-t,e,Math.max(i,0),o);this._context.fillRect(n.left+i+u+t,e,Math.max(n.width-(i+u),0),o);var s=Math.floor(n.left+i-t)-.5,h=Math.floor(n.top-t)-.5,c=Math.ceil(u+r),l=Math.ceil(n.height+r);this._context.save();this._context.strokeStyle=this.getColor(4);this._context.lineWidth=1;this._context.strokeRect(s,h,c,l);this._context.restore()},i.prototype.drawChart=function(){(this._chartViewType===0||this._chartViewType===1)&&(this._chartViewX=this._gridX.min,this._chartViewWidth=Math.max(this._gridRange.x,this._chartViewWidth));this.drawChartBackground();var n=new c(this._chartAxisPadding.left,this._chartAxisPadding.top,this._chartWidth,this._chartHeight-(this._chartViewOverview?40:0));this.drawChartAxes(n);this.drawChartType(this._chartViewType,n,!1);this.drawChartLegend(n);this._chartViewOverview&&(n.top+=n.height+10,n.bottom=n.top+30,this.drawChartType(1,n,!0),this.drawChartViewSelection(n))},i.prototype.calculateRange=function(n){this._gridX.max<n.x&&(this._gridX.max=n.x);this._gridX.min>n.x&&(this._gridX.min=n.x);this._gridY.min>n.y&&(this._gridY.min=Math.floor(n.y*this._chartAxisIncreaseRatio/this._chartAxisCount)*this._chartAxisCount);this._gridY.max<n.y&&(this._gridY.max=Math.ceil(n.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},i}(Common.Controls.Legacy.TemplateControl);n.CanvasChartControl=a})(t=n.Charting||(n.Charting={}))})(t=n.Controls||(n.Controls={}))})(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t;(function(n){var r=function(){function n(){this._propertyChangedObservers=[]}return n.prototype.registerPropertyChanged=function(n){this._propertyChangedObservers.push(n)},n.prototype.removePropertyChanged=function(n){var t=this._propertyChangedObservers.indexOf(n);t>=0&&(this._propertyChangedObservers=this._propertyChangedObservers.splice(t,1))},n.prototype.raisePropertyChanged=function(n){for(var t=0;t<this._propertyChangedObservers.length;t++)this._propertyChangedObservers[t].onPropertyChanged(n)},n}(),u,t,i;n.ObservableViewModel=r,function(n){n[n.Add=0]="Add";n[n.Reset=1]="Reset"}(n.NotifyCollectionChangedAction||(n.NotifyCollectionChangedAction={}));u=n.NotifyCollectionChangedAction;t=function(){function n(n,t,i,r,u){this._action=n;this._newItems=t;this._newStartingIndex=i;this._oldItems=r;this._oldStartingIndex=u}return Object.defineProperty(n.prototype,"action",{get:function(){return this._action},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"newItems",{get:function(){return this._newItems},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"newStartingIndex",{get:function(){return this._newStartingIndex},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"oldItems",{get:function(){return this._oldItems},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"oldStartingIndex",{get:function(){return this._oldStartingIndex},enumerable:!0,configurable:!0}),n}();n.NotifyCollectionChangedEventArgs=t;i=function(){function n(){this._items=[];this._collectionChangedObservers=[]}return Object.defineProperty(n.prototype,"length",{get:function(){return this._items.length},enumerable:!0,configurable:!0}),n.prototype.registerCollectionChanged=function(n){this._collectionChangedObservers.push(n)},n.prototype.removeCollectionChanged=function(n){var t=this._collectionChangedObservers.indexOf(n);t>=0&&(this._collectionChangedObservers=this._collectionChangedObservers.splice(t,1))},n.prototype.add=function(n){this._items.push(n);var i=new t(0,[n],this._items.length-1,[],0);this.onCollectionChanged(i)},n.prototype.clear=function(){var n=this._items,i;this._items=[];i=new t(1,[],0,n,n.length-1);this.onCollectionChanged(i)},n.prototype.getItem=function(n){return this._items[n]},n.prototype.onCollectionChanged=function(n){for(var t=0;t<this._collectionChangedObservers.length;t++)this._collectionChangedObservers[t].onCollectionChanged(n)},n}();n.ObservableCollection=i})(t=n.Controls||(n.Controls={}))})(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,i;(function(n){(function(n){n[n.Horizontal=0]="Horizontal";n[n.Vertical=1]="Vertical"})(n.GridSplitterDirection||(n.GridSplitterDirection={}));var r=n.GridSplitterDirection,i=function(n){function i(t,r,u,f){n.call(this,t);this._direction=null;this._minSize=typeof r=="number"&&r>0?r:i._gridSplitterDefaultMinSize;this._scrollableContainer=u;this._callback=f;this.rootElement.contains(i._gridSplitterClass)||this.rootElement.classList.add(i._gridSplitterClass);this._resizerDisplay=document.createElement("div");this._resizerDisplay.className=i._gridSplitterClass+" "+i._gridSplitterResizerClass;this._resizerDisplay.style.position="relative";this._resizerDisplay.style.display="none";this.rootElement.appendChild(this._resizerDisplay);this.rootElement.addEventListener("mousedown",this.onMouseDown.bind(this))}return __extends(i,n),Object.defineProperty(i.prototype,"direction",{get:function(){return this._direction===null&&(this._direction=this.getSplitterDirection()),this._direction},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"gridCSS",{get:function(){return this._gridCSS||(this._gridCSS=this.getParentGridCSS()),this._gridCSS},enumerable:!0,configurable:!0}),i.prototype.getSplitterDirection=function(){var n,t;return n=this.rootElement.classList.contains(i._gridSplitterVerticalClass)?1:this.rootElement.classList.contains(i._gridSplitterHorizontalClass)?0:this.rootElement.clientWidth>this.rootElement.clientHeight?1:0,t=window.getComputedStyle(this.rootElement),n==1?(this._gridIndex=parseInt(t.msGridRow,10)-1,this._resizerDisplay.className+=" "+i._gridSplitterClass+"-Vertical"):(this._gridIndex=parseInt(t.msGridColumn,10)-1,this._resizerDisplay.className+=" "+i._gridSplitterClass+"-Horizontal"),n},i.prototype.getParentGridCSS=function(){var n=window.getComputedStyle(this.rootElement.parentElement);return this.direction===1?n.msGridRows:n.msGridColumns},i.prototype.calculateGridInfo=function(){if(this._gridCSS=this.getParentGridCSS(),!this._gridCSS)throw new Error(t.Resources.getErrorString("JSPerf.1019"));if(this._gridCSSParts=this._gridCSS.split(" "),this._gridCSSParts.length>=this._gridIndex&&this._gridIndex>0){var n=this._gridCSSParts[this._gridIndex-1],i=this._gridCSSParts[this._gridIndex];if(n.indexOf("px")===-1||i.indexOf("px")===-1)throw new Error(t.Resources.getErrorString("JSPerf.1020"));this._gridCSSTotal=parseFloat(n)+parseFloat(i)}else throw new Error(t.Resources.getErrorString("JSPerf.1021"))},i.prototype.onMouseMove=function(n){var f=this.direction===1?n.pageY:n.pageX,s=this.rootElement.previousElementSibling,u=this.rootElement.nextElementSibling,t=0,i=0,e,r,o;this.direction===1?(t=s.offsetTop+this._minSize,i=u.offsetTop+u.offsetHeight-this._minSize):(t=s.offsetLeft+this._minSize,i=u.offsetLeft+u.offsetWidth-this._minSize);this._scrollableContainer||(e=this._scrollableContainer.scrollTop,t-=e,i-=e);r=f;f<t?r=t:f>i&&(r=i);this._endPosition=r;o=r-this._startPosition;this.direction===1?this._resizerDisplay.style.top=o+"px":this._resizerDisplay.style.left=o+"px";n.stopImmediatePropagation();n.preventDefault()},i.prototype.onMouseUp=function(n){var f,i,e,r,t;if(this._resizerDisplay.style.display="none",this.rootElement.style.removeProperty("background-color"),document.body.style.cursor=this._previousCursor,f=0,i=0,this.direction===1?(f=this.rootElement.previousElementSibling.clientHeight,i=this.rootElement.nextElementSibling.clientHeight):(f=this.rootElement.previousElementSibling.clientWidth,i=this.rootElement.nextElementSibling.clientWidth),e=this._endPosition-this._startPosition,r=(i-e)/(f+i),r>0&&r<1){var o=(1-r)*this._gridCSSTotal,s=r*this._gridCSSTotal,u="";for(t=0;t<this._gridCSSParts.length;t++)u+=t===this._gridIndex-1?o+"fr":t===this._gridIndex?s+"fr":this._gridCSSParts[t],t<this._gridCSSParts.length-1&&(u+=" ");this.direction===1?this.rootElement.parentElement.style.msGridRows=u:this.rootElement.parentElement.style.msGridColumns=u;this._gridCSS=u;this._callback&&typeof this._callback=="function"&&this._callback()}document.removeEventListener("mousemove",this._mouseMoveListener,!0);document.removeEventListener("mouseup",this._mouseUpListener,!0);n.stopImmediatePropagation();n.preventDefault()},i.prototype.onMouseDown=function(n){this.calculateGridInfo();this._previousCursor=document.body.style.cursor;document.body.style.cursor=window.getComputedStyle(this.rootElement).cursor;this._startPosition=this.direction===1?n.pageY:n.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,!0);document.addEventListener("mouseup",this._mouseUpListener,!0);n.stopImmediatePropagation();n.preventDefault()},i._gridSplitterClass="gridSplitter",i._gridSplitterResizerClass="gridSplitter-Resizer",i._gridSplitterVerticalClass="gridSplitter-Vertical",i._gridSplitterHorizontalClass="gridSplitter-Horizontal",i._gridSplitterDefaultMinSize=100,i}(Common.Controls.Legacy.Control);n.GridSplitterControl=i})(i=n.Controls||(n.Controls={}))}(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t;(function(n){var t=function(n){function t(){n.call(this);this._items=[];this.setTemplateFromHTML('<div class="tabControl">   <div class="tabHeader">       <div id="beforeBarContainer" class="beforeBarContainer"><\/div>       <nav id="tabBarContainer" class="tabBarContainer">        <ul class="tabBar"><\/ul>       <\/nav>       <div id="afterBarContainer" class="afterBarContainer"><\/div>   <\/div>   <div class="tabContentPane"><\/div><\/div>');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")}return __extends(t,n),Object.defineProperty(t.prototype,"tabsLeftAligned",{get:function(){return this._tabBarContainer.classList.contains("tabBarContainerLeftAlign")},set:function(n){n?this._tabBarContainer.classList.add("tabBarContainerLeftAlign"):this._tabBarContainer.classList.remove("tabBarContainerLeftAlign")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedItem",{get:function(){return this._selectedItem},set:function(n){if(this._selectedItem!==n){if(!this.containsTab(n))return;var t=this._selectedItem;this._selectedItem&&(this._selectedItem.active=!1);this._selectedItem=n;this._selectedItem&&(this._selectedItem.active=!0);this.selectedItemChanged&&this.selectedItemChanged(t,this._selectedItem)}},enumerable:!0,configurable:!0}),t.prototype.addTab=function(n){this._items.push(n);n.ownerTabControl=this;this._barPanel.appendChild(n.header);this._contentPane.appendChild(n);this._selectedItem||(this.selectedItem=n)},t.prototype.removeTab=function(n){var t=this._items.indexOf(n),i;t<0||(this.selectedItem===n&&(this.selectedItem=null),this._items.splice(t,1),i=Math.min(this._items.length-1,t),i>=0&&(this.selectedItem=this._items[i]),this._barPanel.removeChild(n.header),this._contentPane.removeChild(n),n.ownerTabControl=null)},t.prototype.containsTab=function(n){return this._items.indexOf(n)>=0},t.prototype.getTabIndex=function(n){return this._items.indexOf(n)},t.prototype.getTab=function(n){return this._items[n]},t.prototype.length=function(){return this._items.length},t.prototype.onTabItemSelected=function(n){this.selectedItem=n},t.prototype.onKeyDown=function(n){var t=this.getTabIndex(this._selectedItem);t>=0?n.keyCode===39||n.keyCode===40?this.selectedItem=this.getTab((t+1)%this.length()):(n.keyCode===37||n.keyCode===38)&&(this.selectedItem=this.getTab(t-1<0?this.length()-1:t-1)):this.selectedItem=this.getTab(0);this._selectedItem.header.rootElement.focus()},t}(Common.Controls.Legacy.TemplateControl);n.TabControl=t})(t=n.Controls||(n.Controls={}))}(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,i;(function(i){var r=function(i){function r(){i.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"}return __extends(r,i),Object.defineProperty(r.prototype,"ownerTabControl",{get:function(){return this._ownerTabControl},set:function(n){if(this._ownerTabControl!==n){if(this._ownerTabControl&&n)throw new Error(t.Resources.getErrorString("JSPerf.1022"));this._ownerTabControl=n}},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"active",{get:function(){return this._active},set:function(n){this._active!==n&&(this._active=n,this.header.rootElement.classList.toggle("active"),n?this.header.rootElement.setAttribute("tabIndex","2"):this.header.rootElement.removeAttribute("tabIndex"),this.rootElement.classList.toggle("active"),this.onActiveChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"title",{get:function(){return this.header.rootElement.innerText},set:function(n){this.header.rootElement.innerText=n},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"tooltipString",{get:function(){return this.header.rootElement.getAttribute("data-plugin-vs-tooltip")},set:function(n){var t={content:n};this.header.rootElement.setAttribute("data-plugin-vs-tooltip",JSON.stringify(t))},enumerable:!0,configurable:!0}),r.prototype.onActiveChanged=function(){},r.prototype.onHeaderClicked=function(){if(this.ownerTabControl){switch(this.title){case n.Telemetry.Keyword.SUMMARY:n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.CLICK_SUMMARY,0);break;case n.Telemetry.Keyword.TYPES:n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.TYPE_VIEW,0);break;case n.Telemetry.Keyword.ROOTS:n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.ROOT_VIEW,0);break;case n.Telemetry.Keyword.DOMINATORS:n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.DOMINATOR_VIEW,0);break;default:this.title.indexOf(n.Telemetry.Keyword.SNAPSHOT)===0&&(this.title.lastIndexOf(n.Telemetry.Keyword.SNAPSHOT)===0?n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.CLICK_SHOT,0):n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.CLICK_SHOT_DIFF,0))}this.ownerTabControl.selectedItem=this}n.Program.onIdle()},r.prototype.onKeyDown=function(n){(n.keyCode===13||n.keyCode===32)&&this.onHeaderClicked()},r}(Common.Controls.Legacy.ContentControl);i.TabItem=r})(i=n.Controls||(n.Controls={}))}(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,r=function(){function n(){this._proxy=t.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Package.Extensions.InternalFeedback",{},!0)}return n.prototype.isEnabled=function(){return this._proxy._call("isEnabled")},n.prototype.sendData=function(n,t,i,r,u,f){return this._proxy._call("sendData",n,t,i,r,u,f)},n.instance=new n,n}(),i;n.InternalFeedbackProxy=r;i=function(){function n(){}return n.prototype.isEnabled=function(){return t.Promise.as(!1)},n.prototype.sendData=function(){return t.Promise.as(null)},n}();n.NoOperationInternalFeedback=i})(t=n.Extensions||(n.Extensions={}))})(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,e,r,u,f;(function(n){n[n.session=0]="session";n[n.snapshot=1]="snapshot";n[n.snapshotDiff=2]="snapshotDiff"})(t.SessionType||(t.SessionType={}));e=t.SessionType;r=function(){function n(){this._snapshotId=1}return n.prototype.getNewSnapshotRelativePath=function(){return"snapshot"+this._snapshotId+++".snapjs"},n}();t.Session=r;u=function(n){function t(){n.call(this);this._sessionProxy=i.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Package.Extensions.MemoryAnalyzerSession",{},!0)}return __extends(t,n),t.prototype.addViewTypeEventListener=function(n){this._sessionProxy.addEventListener("viewtypechange",n)},t.prototype.getSessionInfo=function(){return this._sessionProxy._call("getSessionInfo")},t.prototype.openSnapshotDetails=function(n,t,i,r){return this._sessionProxy._call("openSnapshotDetails",n,t,i,0,0,r)},t.prototype.openSnapshotDiff=function(n,t,i,r,u,f){return this._sessionProxy._call("openSnapshotDiff",n,t,i,r,u,f)},t.prototype.save=function(n){return this._sessionProxy._call("save",n)},t}(r);t.HostSessionProxy=u;f=function(t){function r(n,i){i===void 0&&(i=!1);t.call(this);this._sessionInfo={filePaths:[],isOffline:i,sessionType:0,sortProperty:"",storageId:n?n:r.getUniqueStorageId(),targetView:""}}return __extends(r,t),r.prototype.addViewTypeEventListener=function(){},r.prototype.getSessionInfo=function(){return i.Promise.as(this._sessionInfo)},r.prototype.openSnapshotDetails=function(n,t,r,u){var f=this;return new i.Promise(function(i){i({filePaths:[n],isOffline:!0,sessionType:1,sortProperty:u,storageId:f._sessionInfo.storageId,targetView:t})})},r.prototype.openSnapshotDiff=function(n,t,r,u,f,e){var o=this;return new i.Promise(function(i){i({filePaths:n,isOffline:!0,sessionType:2,sortProperty:e,storageId:o._sessionInfo.storageId,targetView:t,firstSnapshotId:u,lastSnapshotId:f})})},r.prototype.save=function(){var t=this;return new i.Promise(function(i,r){var o=Common.Constants.F12.MEMORY_ANALYZER_SNAPSHOT_ROOT_PATH+t._sessionInfo.storageId,f,u,e;try{f=n.Program.packager.createPackage(Common.Constants.MEMORY_ANALYZER_TOOL_GUID);u=t._sessionInfo.storageId.split("\\");e=u.length>1?u[u.length-1]:t._sessionInfo.storageId;n.Program.packager.addResource(Common.Constants.MEMORY_ANALYZER_SNAPSHOT_RESOURCE_TYPE,o,e);n.Program.packager.commit();i(f)}catch(s){r&&r(s)}})},r.getUniqueStorageId=function(){return Math.floor(Math.random()*2821109907455).toString(36)+"."+Math.floor(Math.random()*46655).toString(36)},r}(r);t.LocalSession=f})(t=n.Extensions||(n.Extensions={}))}(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(){}return n.prototype.getUserSettings=function(){return new t.Promise(function(n){t.Settings.get("JavaScriptPerfTools").done(function(t){n(t)},function(){n({})})},null)},n}();n.UserSettingsProxy=i})(t=n.Extensions||(n.Extensions={}))})(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function t(){}return t.format=function(t){if(n.Program.userSettings.showDetailedErrors){var i="Error description:  "+(t.message||t.description);return t.number&&(i+="\r\nError number:  "+t.number),t.stack&&(i+="\r\nError stack:  "+t.stack),i}return t.message||t.description},t}();n.ErrorFormatter=t})(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var r=Microsoft.Plugin,o,s,i,t,u,f,e;(function(n){n[n.Default=1]="Default";n[n.Unknown=2]="Unknown";n[n.Dispatch=3]="Dispatch"})(n.ExternalObjectKind||(n.ExternalObjectKind={}));o=n.ExternalObjectKind,function(n){n[n.Instance=1]="Instance";n[n.RuntimeClass=2]="RuntimeClass";n[n.Delegate=3]="Delegate";n[n.Namespace=4]="Namespace"}(n.WinRTObjectKind||(n.WinRTObjectKind={}));s=n.WinRTObjectKind,function(n){n[n.ExternalOffset=0]="ExternalOffset";n[n.ExternalMask=7]="ExternalMask";n[n.WinRtOffset=3]="WinRtOffset";n[n.WinRtMask=7]="WinRtMask";n[n.IsNew=64]="IsNew";n[n.IsRoot=128]="IsRoot";n[n.IsSiteClosed=256]="IsSiteClosed";n[n.IsBuiltIn=512]="IsBuiltIn";n[n.IsMarkup=1024]="IsMarkup";n[n.IsSizeApproximate=2048]="IsSizeApproximate";n[n.IsChanged=4096]="IsChanged";n[n.IsDetachedDomNode=8192]="IsDetachedDomNode";n[n.IsWinJsDisposable=16384]="IsWinJsDisposable";n[n.IsAdded=32768]="IsAdded";n[n.IsBaseline=65536]="IsBaseline";n[n.IsRelatedToAddedScopedObject=131072]="IsRelatedToAddedScopedObject";n[n.IsRelatedToLeftoverScopedObject=262144]="IsRelatedToLeftoverScopedObject";n[n.IsFabricatedObject=524288]="IsFabricatedObject";n[n.HasDetachedDomNodeChildren=1048576]="HasDetachedDomNodeChildren"}(n.HeapObjectFlags||(n.HeapObjectFlags={}));i=n.HeapObjectFlags;t=function(){function n(){}return n.getValue=function(n,t,i){return n>>t&i},n.setValue=function(n,t,i,r){return~(r<<i)&n|(t&r)<<i},n.isFlagSet=function(n,t){return(n&t)!=0?!0:!1},n.setFlag=function(n,t,i){return t?n|i:n&~i},n}();n.MaskOperations=t;u=function(){function n(n,t,i){this._innerObj=n.object;this._isCircularReference=i;this.name=this.initName(n.name,t);i||(this._hasChildren=n.hasChildren);this.isFabricatedObject?this._diffOperation=null:this.isAdded?this._diffOperation=r.Resources.getString("DiffColumnOperationAdded"):this.isChanged?(this._diffOperation=r.Resources.getString("DiffColumnOperationModified"),this.isBaseline&&(this._diffOperation+=" ("+r.Resources.getString("Baseline")+")")):(this._diffOperation=r.Resources.getString("DiffColumnOperationUnchanged"),this.isBaseline&&(this._diffOperation+=" ("+r.Resources.getString("Baseline")+")"))}return Object.defineProperty(n.prototype,"id",{get:function(){return this.objectId},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"flags",{get:function(){return this._innerObj.flags},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"kind",{get:function(){return this._innerObj.kind},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"objectId",{get:function(){return this._innerObj.objectId},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"retainedSize",{get:function(){return this._innerObj.retainedSize},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"size",{get:function(){return this._innerObj.size},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"sourceInfo",{get:function(){return this._innerObj.sourceInfo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"type",{get:function(){return this._innerObj.type},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._innerObj.value},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"diffOperation",{get:function(){return this._diffOperation},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"sizeDiff",{get:function(){return this._innerObj.sizeDiff},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"retainedSizeDiff",{get:function(){return this._innerObj.retainedSizeDiff},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hasChildren",{get:function(){return this._hasChildren},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isCircularReference",{get:function(){return this._isCircularReference},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"containsDetachedDomNode",{get:function(){return this.isDetachedDomNode||this.hasDetachedDomNodeChildren},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hasDetachedDomNodeChildren",{get:function(){return t.isFlagSet(this._innerObj.flags,i.HasDetachedDomNodeChildren)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isDetachedDomNode",{get:function(){return t.isFlagSet(this._innerObj.flags,i.IsDetachedDomNode)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isSizeApproximate",{get:function(){return t.isFlagSet(this._innerObj.flags,i.IsSizeApproximate)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isNew",{get:function(){return t.isFlagSet(this._innerObj.flags,i.IsNew)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isRoot",{get:function(){return t.isFlagSet(this._innerObj.flags,i.IsRoot)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isSiteClosed",{get:function(){return t.isFlagSet(this._innerObj.flags,i.IsSiteClosed)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isBuiltIn",{get:function(){return t.isFlagSet(this._innerObj.flags,i.IsBuiltIn)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"external",{get:function(){return t.getValue(this._innerObj.flags,0,7)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"winrt",{get:function(){return t.getValue(this._innerObj.flags,3,7)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isMarkup",{get:function(){return t.isFlagSet(this._innerObj.flags,i.IsMarkup)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isAdded",{get:function(){return t.isFlagSet(this._innerObj.flags,i.IsAdded)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isBaseline",{get:function(){return t.isFlagSet(this._innerObj.flags,i.IsBaseline)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isChanged",{get:function(){return t.isFlagSet(this._innerObj.flags,i.IsChanged)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isFabricatedObject",{get:function(){return t.isFlagSet(this._innerObj.flags,i.IsFabricatedObject)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isRelatedToAddedScopedObject",{get:function(){return t.isFlagSet(this._innerObj.flags,i.IsRelatedToAddedScopedObject)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isRelatedToLeftoverScopedObject",{get:function(){return t.isFlagSet(this._innerObj.flags,i.IsRelatedToLeftoverScopedObject)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isWinJsDisposable",{get:function(){return t.isFlagSet(this._innerObj.flags,i.IsWinJsDisposable)},enumerable:!0,configurable:!0}),n.prototype.initName=function(n){var t="",i,r;if(typeof n!="undefined"&&(t+=n),this.winrt)switch(this.winrt){case 2:t+="{Runtime Class} ";break;case 3:t+="{Delegate} ";break;case 4:t+="{Namespace} "}if(this.external){t?t+=": ":t="";i="External";switch(this.external){case 2:i+=" IUnknown";break;case 3:i+=" IDispatch"}t+=i}return typeof this.value!="undefined"&&(t?t+=" = ":t="",r=typeof this.value=="string",r&&(t+='"'),t+=this.value,r&&(t+='"')),t===""&&this.type&&(t+=this.type[0]=="("?this.type:"("+this.type+") "),t},n}();n.NamedHeapObject=u;f=function(n){function t(t,i,r,u){u===void 0&&(u=0);n.call(this,t,i);this.nodeId=u;this.parentObjectId=r}return __extends(t,n),t}(u);n.ReferenceDataObject=f;e=function(){function n(n){this.objectHeapType=n;this._name=this.objectHeapType.type}return Object.defineProperty(n.prototype,"isAdded",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isBaseline",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isRelatedToAddedScopedObject",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isRelatedToLeftoverScopedObject",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isFabricatedObject",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isChanged",{get:function(){return this.objectHeapType.hasModifiedChildren},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return this.objectHeapType.type},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isDetachedDomNode",{get:function(){return this.objectHeapType.hasDetachedDomNodeChildrenOfSameType},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"retainedSize",{get:function(){return this.objectHeapType.retainedSize},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"sizeDiff",{get:function(){return this.objectHeapType.sizeDiff},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"retainedSizeDiff",{get:function(){return this.objectHeapType.retainedSizeDiff},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"size",{get:function(){return this.objectHeapType.size},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isSizeApproximate",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isNew",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"type",{get:function(){return""},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isBuiltIn",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"childrenCount",{get:function(){return this.objectHeapType.childrenCount},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hasChildren",{get:function(){return this.objectHeapType.childrenCount>0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hasDetachedDomNodeChildren",{get:function(){return this.objectHeapType.hasDetachedDomNodeChildren},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"containsDetachedDomNode",{get:function(){return this.isDetachedDomNode||this.hasDetachedDomNodeChildren},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"diffOperation",{get:function(){return null},enumerable:!0,configurable:!0}),n}();n.TypeDataObject=e}(MemoryAnalyzer||(MemoryAnalyzer={})),function(n){"use strict";function f(n,u,f,e,o,s){var h=new t.SwimlaneConfiguration(n,o,e),c;h.header.isBodyExpanded=u;var a=new t.LocalizedUnitConverter(h.graph.jsonConfig.Units,h.graph.resources),p=[],w=new r(o,!0,n.Title,null,new t.ChartColorScheme("#76AEC8","#A6CADB"),a,n.View);p.push(w);h.graph.legend.push({legendText:i.Resources.getString("HubGraphHeapLegend"),legendTooltip:i.Resources.getString("GraphTitle")+", "+i.Resources.getString("HubGraphHeapLegend"),marker:w.marker});var l=new t.MultiSeriesGraph(h.graph,p),v=new t.Scale(h.graph.scale,t.ScaleType.Left,a),y=new t.Scale(h.graph.scale,t.ScaleType.Right,a);return l.scaleChangedEvent.addEventListener(v.onScaleChanged.bind(v)),l.scaleChangedEvent.addEventListener(y.onScaleChanged.bind(y)),c=new t.SwimlaneBase(h.header,h.graph.height,o,s),l.scaleChangedEvent.addEventListener(c.onScaleChanged.bind(c)),c.addTitleControl(new t.Legend(h.graph.legend)),c.addMainRegionControl(l),c.addMainRegionControl(new t.GridLineRenderer(o)),c.addLeftRegionControl(v),c.addRightRegionControl(y),l.container.style.zIndex="130",c}var i=Microsoft.Plugin,t=Microsoft.VisualStudio.DiagnosticsHub,u=function(){function n(t,i){this._collectionStartTime=t;this._frequency=i;this._hundredPicosecondsPerQpcRatio=n.NanosecondsInASecond/this._frequency*10}return n.prototype.getCollectionStartTime=function(){return this._collectionStartTime},n.prototype.getFrequency=function(){return this._frequency},n.prototype.convertQpcTimestampToNanoseconds=function(n){var i=t.BigNumber.subtract(n,this._collectionStartTime),r=t.BigNumber.multiplyNumber(i,this._hundredPicosecondsPerQpcRatio);return t.BigNumber.divideNumber(r,10)},n.NanosecondsInASecond=1e9,n}(),r;n.QpcTimeProperties=u;r=function(){function n(n,r,f,e,o,s,h){var a=this,c,l;this._graphUpdateDelayMilliseconds=100;this._requestHandle=0;this._hasDroppedRequest=!1;this._minValue=Number.MAX_VALUE;this._maxValue=Number.MIN_VALUE;this._sampledPoints=[];this._data=[];this._rawData=[];this._width=250;this._newDataEvent=new t.AggregatedEvent;this._viewport=n;this._title=f;this._formattableTooltipText=e||Microsoft.Plugin.Resources.getString("/DiagnosticsHubControlsResources/ChartSeriesFormattableTooltipLabel");this._unitConverter=s;this._color=o;this._drawFill=typeof o.lineFillColor=="string"&&o.lineFillColor!=="";this._marker=document.createElement("div");this._marker.classList.add("countersDataSeries-marker");this._marker.style.backgroundColor=this._color.lineColor;this._marker.style.width="5px";this._marker.style.height="5px";this._bufferAllData=r;c=i.F12.getQpcTime();l=i.F12.getQpcFrequency();this._qpcTime=new u(t.BigNumber.convertFromNumber(c),l);this._view=h;window.setImmediate(function(){return a.requestUpdate})}return Object.defineProperty(n.prototype,"minValue",{get:function(){return this._minValue},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxValue",{get:function(){return this._maxValue},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"marker",{get:function(){return this._marker},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"title",{get:function(){return this._title},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"newDataEvent",{get:function(){return this._newDataEvent},enumerable:!0,configurable:!0}),n.prototype.dispose=function(){this._newDataEvent.dispose()},n.prototype.onDataUpdate=function(){this.requestUpdate()},n.prototype.onViewportChanged=function(n){this._viewport=n;this._bufferAllData?this.updatePointSampling(this._viewport):this.requestUpdate()},n.prototype.draw=function(n,i){var r,u,f,e;this._sampledPoints.length!==0&&(i.chartRect.width!==this._width&&(this._width=i.chartRect.width,this._bufferAllData?this.updatePointSampling(this._viewport):this.requestUpdate()),r=function(n){return t.Utilities.convertToPixel(n.Timestamp,i.gridX,i.chartRect.width,!1)},u=function(n){return i.chartRect.height-t.Utilities.scaleToRange(n.Value,i.gridY.min,i.gridY.max,0,i.chartRect.height)},n.save(),n.lineWidth=i.chartRect.height<100?1:2,n.fillStyle=this._color.lineFillColor,n.strokeStyle=this._color.lineColor,f=Microsoft.Plugin.F12?0:r(this._sampledPoints[0]),n.beginPath(),n.moveTo(f,u(this._sampledPoints[0])),this._sampledPoints.forEach(function(t){return n.lineTo(r(t),u(t))}),n.stroke(),e=i.chartRect.height-t.Utilities.scaleToRange(0,i.gridY.min,i.gridY.max,0,i.chartRect.height),n.lineTo(r(this._sampledPoints[this._sampledPoints.length-1]),e),n.lineTo(f,e),n.closePath(),n.fill(),n.restore())},n.prototype.getPointAtTimestamp=function(n,i){var r,f,e,o,u,s;if(i===void 0&&(i=t.PointToFind.Nearest),this._sampledPoints.length===0)return null;r={Timestamp:n,Value:0};f=function(n,t){return t.Timestamp.greater(n.Timestamp)};switch(i){case t.PointToFind.LessThanOrEqual:e=t.Utilities.findLessThan(this._sampledPoints,r,f);r=this._sampledPoints[e];break;case t.PointToFind.GreaterThanOrEqual:e=t.Utilities.findGreaterThan(this._sampledPoints,r,f);r=this._sampledPoints[e];break;case t.PointToFind.Nearest:o=t.Utilities.findLessThan(this._sampledPoints,r,f);u=this._sampledPoints[o];o===this._sampledPoints.length-1||this._sampledPoints[0].Timestamp.greater(n)?(r.Value=u.Value,r.Timestamp=u.Timestamp):(s=this._sampledPoints[Math.min(o+1,this._sampledPoints.length-1)],r.Value=t.Utilities.linearInterpolate(n,u.Timestamp,u.Value,s.Timestamp,s.Value))}return{timestamp:r.Timestamp,tooltip:t.Utilities.formatString(this._formattableTooltipText,this._unitConverter.formatNumber(r.Value)),color:this._color,value:r.Value}},n.prototype.requestUpdate=function(){var n=this;if(this._requestHandle){this._hasDroppedRequest=!0;return}this._requestHandle=window.setTimeout(function(){n._view.model.graphCollectorSession&&n._view.model.graphCollectorSession.getGraphDataUpdate("Heap").then(function(i){i&&i.length!=0&&(i.forEach(function(i){n._rawData.push({Timestamp:n._qpcTime.convertQpcTimestampToNanoseconds(t.BigNumber.convertFromNumber(i.timestamp)),Value:i.value,ToolTip:i.toolTip,CustomData:i.customData})}),n.cachePoints(n._rawData))}).then(function(){return n._view.model.graphCollectorSession.getGraphDataUpdate("performancemark")}).then(function(i){i.forEach(function(i){n._view.addRulerMark(n._qpcTime.convertQpcTimestampToNanoseconds(t.BigNumber.convertFromNumber(i.timestamp)),i.toolTip)})}).done(function(){n._newDataEvent.invokeEvent(n);n._requestHandle=0;n._hasDroppedRequest&&(window.setImmediate(function(){return n.requestUpdate}),n._hasDroppedRequest=!1)})},this._graphUpdateDelayMilliseconds)},n.prototype.cachePoints=function(n){var t=this,i;(this._data=[],this._maxValue=Number.MIN_VALUE,this._minValue=Number.MAX_VALUE,n&&n.length!==0)&&(i=n[0],this._data=n.filter(function(n){return!n.Timestamp||!n.Timestamp.greaterOrEqual(i.Timestamp)?!1:(t._maxValue=Math.max(t._maxValue,n.Value),t._minValue=Math.min(t._minValue,n.Value),i=n,!0)}),this._bufferAllData?this.updatePointSampling(this._viewport):this._sampledPoints=this._data)},n.prototype.updatePointSampling=function(n){var r=this,l,h;if(this._data.length!==0){l=2;this._sampledPoints=[];var s=new t.JsonTimespan(this._data[0].Timestamp,this._data[this._data.length-1].Timestamp),u=t.BigNumber.divideNumber(n.elapsed,this._width),f=function(n,t){return t.Timestamp.greater(n.Timestamp)},i={Timestamp:t.BigNumber.zero,Value:0},a=Math.floor(parseInt(t.BigNumber.subtract(n.begin,s.begin).value)/parseInt(u.value)),e=t.BigNumber.add(t.BigNumber.multiplyNumber(u,a),s.begin),v=t.BigNumber.add(t.BigNumber.add(e,n.elapsed),u);i.Timestamp=e;h=t.Utilities.findLessThan(this._data,i,f);i.Timestamp=v;var y=t.Utilities.findGreaterThan(this._data,i,f),c=function(n,t){for(var f=r._data[n],i=0,u=n;u<=t;++u)i=Math.max(i,r._data[u].Value);return{Timestamp:f.Timestamp,ToolTip:f.ToolTip,Value:i}},o=function(n,e,s,h){var l,v;if(h>=s-e)for(l=e;l<=s;++l)r._sampledPoints.push(c(l,l));else if(h===1)r._sampledPoints.push(c(e,s));else{var a=Math.floor(h/2),p=h-a,y=t.BigNumber.add(n,t.BigNumber.multiplyNumber(u,a));i.Timestamp=y;v=t.Utilities.findLessThan(r._data,i,f,e,s);o(n,e,v,a);o(y,v,s,p)}};o(e,h,y,this._width)}},n}();n.SnapshotDataSeries=r;n.MemoryUsageSwimlaneFactory=f}(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(){}return n.getNextId=function(){return n.idCounter++},n.reset=function(){n.frameMap=[];n.currentNavigationId=-1},n.setToolbar=function(t){n.toolbarFrame=Common.NavigationUtilities.makeNavigationFrameFromCallback(document.body,function(){return t.getActiveElement()});n.registerNavigation()},n.switchNavigationView=function(t){n.currentNavigationId=t;n.registerNavigation()},n.updateAdditionalNavigationFrames=function(t,i){i===void 0&&(i=[]);n.frameMap[t]=i;t===n.currentNavigationId&&n.registerNavigation()},n.registerNavigation=function(){var t=[],i;n.toolbarFrame&&(t=[n.toolbarFrame]);n.currentNavigationId>=0&&(i=n.frameMap[n.currentNavigationId],i&&(t=t.concat(i)));Common.NavigationUtilities.registerNavigationFrames(t)},n.currentNavigationId=-1,n.frameMap=[],n.idCounter=0,n}();n.NavigationHelpers=t})(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(){}return n.initialize=function(){var n=Microsoft.Plugin.Resources.getString;Microsoft.Plugin.Resources.getString=function(t){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];return t==="/DiagnosticsHubControlsResources/UserMarkTooltip"?t="UserMarkTooltip":t.indexOf("/DiagnosticsHubResources/")===0&&(t=t.replace("/DiagnosticsHubResources/","/DiagnosticsHubControlsResources/")),r.splice(0,0,t),n.apply(Microsoft.Plugin.Resources,r)}},n}();n.ResourceDecorator=t})(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function t(n,t,i,r){this._snapshotData=n;this._isDiff=t;this._firstSnapshotId=i;this._lastSnapshotId=r}return Object.defineProperty(t.prototype,"isDiff",{get:function(){return this._isDiff},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstSnapshotId",{get:function(){return this._firstSnapshotId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lastSnapshotId",{get:function(){return this._lastSnapshotId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasDetachedDomNodes",{get:function(){return this._snapshotData.hasDetachedDomNodes()},enumerable:!0,configurable:!0}),t.prototype.getUidChain=function(n){return this._snapshotData.getUidChain(n)},t.prototype.getAllObjects=function(t,i,r,u,f){return r===void 0&&(r=0),u===void 0&&(u=-1),f===void 0&&(f=2),this._snapshotData.getDominators(r,u,t.filterString,f,t).then(function(r){for(var o,s,e=r.result,u=[],f=0;f<e.length;f++)o=e[f],s=new n.NamedHeapObject(o,t.displayObjectIDs),u.push(s);return u.sort(i.sortComparer),{items:u,totalCount:r.totalCount}})},t.prototype.getAllRootObjects=function(t,i,r){for(var s,h,e=this._snapshotData.getRootObjects(r,t),o=e.result,u=[],f=0;f<o.length;f++)s=o[f],h=new n.NamedHeapObject(s,t.displayObjectIDs),u.push(h);return u.sort(i.sortComparer),{items:u,totalCount:e.totalCount}},t.prototype.getAllTypes=function(t,i,r){return this._snapshotData.getTypes(t.filterString,r,t).then(function(t){for(var f,e,r=[],u=0;u<t.length;u++)f=t[u],e=new n.TypeDataObject(f),r.push(e);return r.sort(i.sortComparer),{items:r,totalCount:r.length}})},t.prototype.getAllChildrenForObjectOrType=function(n,t,i,r,u,f,e,o){u===void 0&&(u=0);f===void 0&&(f=-1);e===void 0&&(e=2);o===void 0&&(o=!1);var s=parseInt(n);return isNaN(s)?this.getAllObjectsByType(n,i,r,u,f,e):this.getAllChildrenForObject(s,t,i,r,u,f,e,o)},t.prototype.getAllObjectsByType=function(t,i,r,u,f,e){var o,l,a;u===void 0&&(u=0);f===void 0&&(f=-1);var h=this._snapshotData.getObjectsByType(t,u,f,e,i),c=h.result,s=[];for(o=0;o<c.length;o++)l=c[o],a=new n.NamedHeapObject(l,i.displayObjectIDs),s.push(a);return s.sort(r.sortComparer),{items:s,totalCount:h.totalCount}},t.prototype.getAllChildrenForObject=function(t,i,r,u,f,e,o,s){var h,l,p;f===void 0&&(f=0);e===void 0&&(e=-1);o===void 0&&(o=2);s===void 0&&(s=!1);var a=this._snapshotData.getChildrenForObject(t,f,e,o,s,r),v=a.result,c=[],y=new Set;for(h=0;h<i.length;h++)y.add(i[h].id);for(h=0;h<v.length;h++)l=v[h],p=new n.NamedHeapObject(l,r.displayObjectIDs,y.has(l.objectId)),c.push(p);return c.sort(u.sortComparer),{items:c,totalCount:a.totalCount}},t.prototype.getRetainedDescendants=function(t,i,r,u,f,e){var o,l,a;f===void 0&&(f=0);e===void 0&&(e=-1);var h=this._snapshotData.getRetainedDescendants(t,f,e,i,r),c=h.result,s=[];for(o=0;o<c.length;o++)l=c[o],a=new n.NamedHeapObject(l,r.displayObjectIDs),s.push(a);return s.sort(u.sortComparer),{items:s,totalCount:h.totalCount}},t.prototype.getReferenceTreeItems=function(t,i,r,u,f,e){for(var o,a,c=this._snapshotData.getReferenceTreeItems(t,i,r,e),l=c.result,s=[],h=0;h<l.length;h++)o=l[h],a=new n.ReferenceDataObject(o,f,o.parentId,o.nodeId),s.push(a);return s.sort(u.sortComparer),{items:s,totalCount:c.totalCount}},t.prototype.getPathToDominator=function(n,t,i){return this._snapshotData.getPathToDominator(n,t,i)},t.prototype.getPathToRoot=function(n,t,i){return this._snapshotData.getPathToRoot(n,i,t)},t.prototype.getSnapshotDiffStats=function(){return this._snapshotData.getSnapshotDiffStats()},t}();n.Snapshot=t})(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,r,u,i;(function(n){n[n.types=0]="types";n[n.roots=1]="roots";n[n.dominators=2]="dominators"})(n.DataViewType||(n.DataViewType={}));r=n.DataViewType,function(n){n[n.ascending=0]="ascending";n[n.descending=1]="descending"}(n.SortOrderType||(n.SortOrderType={}));u=n.SortOrderType;i=function(){function n(){}return n.getDataSource=function(n,i){switch(n){case 1:return new f(i);case 0:return new e(i);case 2:return new o(i);default:throw new Error(t.Resources.getErrorString("JSPerf.1002"))}},n}();n.SnapshotDataSource=i;var f=function(){function n(n){this.snapshot=n}return Object.defineProperty(n.prototype,"hasDetachedDomNodes",{get:function(){return this.snapshot.hasDetachedDomNodes},enumerable:!0,configurable:!0}),n.prototype.getRootHeapDataTreeItem=function(n,i,r,u,f){return t.Promise.as(this.snapshot.getAllRootObjects(n,i,f))},n.prototype.getHeapDataTreeItem=function(n,t,i,r,u,f,e){return this.snapshot.getAllChildrenForObject(i,r,n,t,u,f,e,!0)},n.prototype.getReferenceTreeItems=function(n,t,i,r,u,f){return this.snapshot.getReferenceTreeItems(n,t,i,r,u,f)},n.prototype.getAvailableFields=function(n){var t=[];return t.push("name"),t.push("type"),t.push("size"),n?t.push("containsDetachedDomNode"):t.push("isDetachedDomNode"),this.snapshot.isDiff&&t.push("sizeDiff"),t.push("retainedSize"),this.snapshot.isDiff&&t.push("retainedSizeDiff"),t},n.prototype.getAvailableFieldsForReferenceTree=function(n){return this.getAvailableFields(n)},n}(),e=function(){function n(n){this.snapshot=n}return Object.defineProperty(n.prototype,"hasDetachedDomNodes",{get:function(){return this.snapshot.hasDetachedDomNodes},enumerable:!0,configurable:!0}),n.prototype.getRootHeapDataTreeItem=function(n,t,i,r,u){return this.snapshot.getAllTypes(n,t,u)},n.prototype.getHeapDataTreeItem=function(n,t,i,r,u,f,e){return this.snapshot.getAllChildrenForObjectOrType(i,r,n,t,u,f,e,!0)},n.prototype.getReferenceTreeItems=function(n,t,i,r,u,f){return this.snapshot.getReferenceTreeItems(n,t,i,r,u,f)},n.prototype.getAvailableFields=function(n){var t=[];return t.push("name"),t.push("type"),t.push("size"),n?t.push("containsDetachedDomNode"):t.push("isDetachedDomNode"),this.snapshot.isDiff&&t.push("sizeDiff"),t.push("retainedSize"),this.snapshot.isDiff&&t.push("retainedSizeDiff"),t.push("childrenCount"),t},n.prototype.getAvailableFieldsForReferenceTree=function(){var n=[];return n.push("name"),n.push("type"),n.push("size"),this.snapshot.isDiff&&n.push("sizeDiff"),n.push("retainedSize"),n},n}(),o=function(){function n(n){this.snapshot=n}return Object.defineProperty(n.prototype,"hasDetachedDomNodes",{get:function(){return this.snapshot.hasDetachedDomNodes},enumerable:!0,configurable:!0}),n.prototype.getRootHeapDataTreeItem=function(n,t,i,r,u){return this.snapshot.getAllObjects(n,t,i,r,u)},n.prototype.getHeapDataTreeItem=function(n,t,i,r,u,f,e){return this.snapshot.getRetainedDescendants(i,e,n,t,u,f)},n.prototype.getReferenceTreeItems=function(n,t,i,r,u,f){return this.snapshot.getReferenceTreeItems(n,t,i,r,u,f)},n.prototype.getAvailableFields=function(n){var t=[];return t.push("name"),t.push("type"),t.push("size"),n?t.push("containsDetachedDomNode"):t.push("isDetachedDomNode"),this.snapshot.isDiff&&t.push("sizeDiff"),t.push("retainedSize"),this.snapshot.isDiff&&t.push("retainedSizeDiff"),t},n.prototype.getAvailableFieldsForReferenceTree=function(n){return this.getAvailableFields(n)},n}()})(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,r=Common.DomHelper,e=function(){function n(n,t,i,r){this.gridData=n;this.expandStates=t;this.toggleFunction=i;this.loadMoreFunction=r}return n}(),u,o,i,f;n.TreeInfo=e;u=function(){function n(n,t){this.view=n;this._item=t}return Object.defineProperty(n.prototype,"object",{get:function(){return this._item},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"objectId",{get:function(){return this._item.objectId},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentObjectId",{get:function(){return this._item.parentObjectId},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"sourceInfo",{get:function(){return this._item.sourceInfo},enumerable:!0,configurable:!0}),n}();n.GridContextMenuData=u;o=function(){function t(t,r,u){this.viewType=t;this.snapshotViewModel=r;this._dataSource=n.SnapshotDataSource.getDataSource(t,this.snapshotViewModel.snapshot);this._viewSwitcher=u;this.dataViewModel=new i(this.viewType,this.snapshotViewModel.snapshot.isDiff);this.dataViewModel.showUnknownTypes=n.Program.userSettings.showUnknownTypes;this.dataViewModel.showUnknownSizes=n.Program.userSettings.showUnknownSizes;this.view=new f(this,this.dataViewModel,this.snapshotViewModel);Notifications.notify(n.MemoryNotifications.SnapshotDataViewReady,{viewModel:this.dataViewModel,snapshotDataSource:this._dataSource})}return Object.defineProperty(t.prototype,"currentDataView",{get:function(){return this._viewSwitcher.currentDataView},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTextFilterSupported",{get:function(){return this.viewType!==1},enumerable:!0,configurable:!0}),t.prototype.setFocusOnGrid=function(){this.view.setFocusOnGrid()},t.prototype.setSnapshotDataSource=function(){this.dataViewModel.snapshotDataSource=this._dataSource;this.view.refreshGrids()},t.prototype.showPathToDominator=function(n,t){this._viewSwitcher.switchToDataView(2);this._viewSwitcher.currentDataView.showPathToDominator(n,t)},t.prototype.showPathToRoot=function(n,t){this._viewSwitcher.switchToDataView(1);this._viewSwitcher.currentDataView.showPathToRoot(n,t)},t}();n.SnapshotDataViewController=o;i=function(n){function t(t,i){i===void 0&&(i=!1);n.call(this);this.viewType=t;this.isDiff=i;this.isTextSearchable=this.viewType!==1;this.isDominatorFoldingPossible=this.viewType!==1}return __extends(t,n),Object.defineProperty(t.prototype,"hasDetachedDomNodes",{get:function(){return this.snapshotDataSource.hasDetachedDomNodes},enumerable:!0,configurable:!0}),t.initialize=function(){Common.ObservableHelpers.defineProperty(t,t.IsDiffPropertyName,!1);Common.ObservableHelpers.defineProperty(t,t.IsDisplayedPropertyName,!1);Common.ObservableHelpers.defineProperty(t,t.IsDominatorFoldingPossiblePropertyname,!0);Common.ObservableHelpers.defineProperty(t,t.IsTextSearchablePropertyName,!1);Common.ObservableHelpers.defineProperty(t,t.FilterStringPropertyName,"");Common.ObservableHelpers.defineProperty(t,t.ShowUnknownSizesPropertyName,!1);Common.ObservableHelpers.defineProperty(t,t.ShowUnknownTypesPropertyName,!1);Common.ObservableHelpers.defineProperty(t,t.SnapshotDataSourcePropertyName,null)},t.FilterStringPropertyName="filterString",t.IsDiffPropertyName="isDiff",t.IsDisplayedPropertyName="isDisplayed",t.IsDominatorFoldingPossiblePropertyname="isDominatorFoldingPossible",t.IsTextSearchablePropertyName="isTextSearchable",t.ShowUnknownSizesPropertyName="showUnknownSizes",t.ShowUnknownTypesPropertyName="showUnknownTypes",t.SnapshotDataSourcePropertyName="snapshotDataSource",t}(Common.Observable);n.SnapshotDataViewModel=i;i.initialize();f=function(f){function o(i,u,e,s){if(f.call(this,"SnapshotDataViewTemplate"),this._fieldNameToColumnMapMainGrid={},this._fieldNameToColumnMapReferenceGrid={},this._controller=i,this._dataViewModel=u,this._snapshotViewModel=e,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=t.Resources.getString("ReferenceGraph"),this._snapshotViewGridSplitter=new n.Controls.GridSplitterControl(this.findElement("snapshotViewGridSplitter"),25,this.findElement("snapshotScrollableContainer"),this.refreshGrids.bind(this)),!o.GridContextMenu){var h={callback:o.onShowInDominatorsViewCommand,hidden:o.isShowInDominatorsViewCommandHidden,disabled:this.isShowInDominatorsViewCommandDisabled.bind(this),label:t.Resources.getString("ShowInDominatorsViewLabel"),type:1},c={callback:o.onShowInRootsViewCommand,hidden:o.isShowInRootsViewCommandHidden,label:t.Resources.getString("ShowInRootsViewLabel"),type:1},l={callback:o.onShowInDomExplorerCommand,hidden:function(){return!r.isAvailable},disabled:o.isShowInDomExplorerCommandDisabled,label:t.Resources.getString("ShowInDomExplorerLabel"),type:1},a={accessKey:t.Resources.getString("EnterKey"),callback:o.onViewSourceCommand,disabled:o.isViewSourceCommandDisabled,label:t.Resources.getString("ViewSourceLabel"),type:1};o.GridContextMenu=t.ContextMenu.create([h,c,{type:3},l,a])}this._sortOrder=s?new Common.Controls.Legacy.Grid.SortOrderInfo(s,"desc"):this._dataViewModel.isDiff?this._dataViewModel.viewType===0?new Common.Controls.Legacy.Grid.SortOrderInfo("childrenCount","desc"):new Common.Controls.Legacy.Grid.SortOrderInfo("retainedSizeDiff","desc"):this._dataViewModel.viewType===0?new Common.Controls.Legacy.Grid.SortOrderInfo("childrenCount","desc"):new Common.Controls.Legacy.Grid.SortOrderInfo("retainedSize","desc");this._sortOrderForReferences=new Common.Controls.Legacy.Grid.SortOrderInfo("retainedSize","desc");this.uiUpdateSnapshotDataSource()}return __extends(o,f),Object.defineProperty(o.prototype,"navigationContainer",{get:function(){return this._referenceViewContainer},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"navigationTarget",{get:function(){return this._gridReference?this._gridReference.getElement():null},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"selectedItem",{get:function(){return this._selectedItem},enumerable:!0,configurable:!0}),o.getSortComparer=function(n,t){var i=t[n.index],r=i.comparer,u=n.order==="asc";return function(t,f){var e=r(i,n.order,t,f);return u?e:-e}},o.columnComparerForStrings=function(n,t,i,r){return o.naturalSort(i[n.index],r[n.index])},o.naturalSort=function(n,t){var s=/(\d+)|([^\d\(\)]+)/g,r=String(n).toLocaleLowerCase().match(s),i=String(t).toLocaleLowerCase().match(s);if(r){if(!i)return 1}else return i?-1:0;while(r.length>0&&i.length>0){var e=r.shift(),o=i.shift(),u=parseInt(e,10),f=parseInt(o,10);if(isNaN(u)&&isNaN(f)){if(e!==o)return e.localeCompare(o)>0?1:-1}else{if(isNaN(u))return 1;if(isNaN(f))return-1;if(u!==f)return u-f}}return r.length-i.length},o.columnComparerForNumbers=function(n,t,i,r){var u=i[n.index]||0,f=r[n.index]||0;return u-f},o.formatChildrenCount=function(n,t,i,r){var u=r[n];return u.childrenCount?Common.FormattingHelpers.getDecimalLocaleString(u.childrenCount,!0):""},o.formatSize=function(n,i,r,u,f){var e=u[n],o;return e.size?(o=Common.FormattingHelpers.getPrettyPrintSize(e.size)+(e.isSizeApproximate?"*":" "),f&&e.isSizeApproximate&&(o=t.Resources.getString("ApproximateSizeTooltip",o)),o):""},o.formatRetainedSize=function(n,t,i,r){var u=r[n];return u.retainedSize?Common.FormattingHelpers.getPrettyPrintSize(u.retainedSize):""},o.formatRetainedSizeDiff=function(n,t,i,r){var u=r[n];return u.retainedSizeDiff?(u.retainedSizeDiff>0?"+":"-")+Common.FormattingHelpers.getPrettyPrintSize(Math.abs(u.retainedSizeDiff)):""},o.formatSizeDiff=function(n,t,i,r){var u=r[n];return u.sizeDiff?(u.sizeDiff>0?"+":"-")+Common.FormattingHelpers.getPrettyPrintSize(Math.abs(u.sizeDiff)):""},o.prototype.populateFieldNameToColumnMap=function(n){var i={};return i.name=new Common.Controls.Legacy.Grid.ColumnInfo("name",t.Resources.getString("Identifiers"),t.Resources.getString("IdentifiersTooltip"),350,!0,null,n?this.getDiffNameCellCSSClass.bind(this):null,o.columnComparerForStrings,!0),i.name.cellDecorator=this.decorateNameCell.bind(this),i.name.hasMoreColumn=!0,i.type=new Common.Controls.Legacy.Grid.ColumnInfo("type",t.Resources.getString("Type"),t.Resources.getString("TypeTooltip"),115,!0,null,n?this.getDiffNameCellCSSClass.bind(this):null,o.columnComparerForStrings),i.size=new Common.Controls.Legacy.Grid.ColumnInfo("size",t.Resources.getString("Size"),t.Resources.getString("SizeTooltip"),65,!0,o.formatSize,this.getNumericCellCSSClass.bind(this,n),o.columnComparerForNumbers),i.retainedSize=new Common.Controls.Legacy.Grid.ColumnInfo("retainedSize",t.Resources.getString("RetainedSize"),t.Resources.getString("RetainedSizeTooltip"),80,!0,o.formatRetainedSize,this.getNumericCellCSSClass.bind(this,n),o.columnComparerForNumbers),i.childrenCount=new Common.Controls.Legacy.Grid.ColumnInfo("childrenCount",t.Resources.getString("Count"),t.Resources.getString("CountTooltip"),50,!0,o.formatChildrenCount,this.getNumericCellCSSClass.bind(this,n),o.columnComparerForNumbers),i.sizeDiff=new Common.Controls.Legacy.Grid.ColumnInfo("sizeDiff",t.Resources.getString("SizeDiff"),t.Resources.getString("SizeDiffTooltip"),65,!0,o.formatSizeDiff,this.getNumericCellCSSClass.bind(this,n),o.columnComparerForNumbers),i.retainedSizeDiff=new Common.Controls.Legacy.Grid.ColumnInfo("retainedSizeDiff",t.Resources.getString("RetainedSizeDiff"),t.Resources.getString("RetainedSizeDiffTooltip"),105,!0,o.formatRetainedSizeDiff,this.getNumericCellCSSClass.bind(this,n),o.columnComparerForNumbers),i.containsDetachedDomNode=new Common.Controls.Legacy.Grid.ColumnInfo("containsDetachedDomNode","","",0,!0,null,null,o.columnComparerForStrings),i.containsDetachedDomNode.hidden=!0,i.isDetachedDomNode=new Common.Controls.Legacy.Grid.ColumnInfo("isDetachedDomNode","","",0,!0,null,null,o.columnComparerForStrings),i.isDetachedDomNode.hidden=!0,i},o.prototype.onPropertyChanged=function(t){switch(t){case n.SnapshotViewModel.ScopeFilterPropertyName:n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.SCOPE_FILTER,0);break;case i.FilterStringPropertyName:n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.IDENTIFIER_FILTER,0);break;case n.SnapshotViewModel.FoldObjectsByDominatorPropertyName:n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.FOLD_BY_DOMINATOR,0);break;case n.SnapshotViewModel.ShowBuiltInsPropertyName:n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.SHOW_BUILT_INS,0);break;case n.SnapshotViewModel.DisplayObjectIDsPropertyName:n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.DISPLAY_OBJECT_IDS,0)}switch(t){case n.SnapshotViewModel.DisplayObjectIDsPropertyName:this.refreshGrids();break;case n.SnapshotViewModel.IsDiffPropertyName:case i.IsDiffPropertyName:case n.SnapshotViewModel.ShowBuiltInsPropertyName:case i.ShowUnknownTypesPropertyName:case i.ShowUnknownSizesPropertyName:case n.SnapshotViewModel.ScopeFilterPropertyName:case i.SnapshotDataSourcePropertyName:case i.FilterStringPropertyName:case n.SnapshotViewModel.DisplayCircularReferencesPropertyName:case n.SnapshotViewModel.ShowNonMatchingReferencesPropertyName:this.uiUpdateSnapshotDataSource();break;case n.SnapshotViewModel.FoldObjectsByDominatorPropertyName:this.updateSortOrders();this.uiUpdateSnapshotDataSource();break;case i.IsDisplayedPropertyName:this.onIsDisplayedChanged()}},o.prototype.refreshGrids=function(){this._grid&&this._grid.layout();this._gridReference&&this._gridReference.layout()},o.prototype.setFocusOnGrid=function(n){if(this._grid){var t=this._grid.getSelectedRowIndex();(typeof n=="number"||typeof t!="number"||t<=0)&&this._grid.ensureSelectedIndex(n||0);this._grid.setFocusToSelectedRow()}},o.prototype.getUidChain=function(n){return this._dataViewModel.snapshotDataSource.snapshot.getUidChain(n)},o.prototype.showPathToDominator=function(n,t){var i=this,r=this._dataViewModel.snapshotDataSource.snapshot.getPathToDominator(n,t,this.getFilter());this._rootQueryPromise&&this._rootQueryPromise.done(function(){return i.navigateToObjectForPath(r)})},o.prototype.showPathToRoot=function(n,t){var i=this,r=this._dataViewModel.snapshotDataSource.snapshot.getPathToRoot(n,this.getFilter(),t);this._rootQueryPromise&&this._rootQueryPromise.done(function(){return i.navigateToObjectForPath(r)})},o.prototype.sortBy=function(n,t){this._sortOrder.index=n;this._sortOrder.order=t;this.updateTree()},o.isShowInRootsViewCommandHidden=function(){return!o.GridContextMenuData||!o.GridContextMenuData.view||o.GridContextMenuData.view._dataViewModel.viewType===1&&o.GridContextMenuData.view._focusedGrid===o.GridContextMenuData.view._grid},o.isShowInDomExplorerCommandDisabled=function(){if(!o.GridContextMenuData)return!1;var n=o.GridContextMenuData.object,t=o.GridContextMenuData.view;return!r.isAvailable||!n||!t||!t.getUidChain(n.objectId)},o.onShowInDomExplorerCommand=function(){var n,t,i;o.GridContextMenuData&&(n=o.GridContextMenuData.object,t=o.GridContextMenuData.view,r.isAvailable&&n&&t&&(i=t.getUidChain(n.objectId),i&&r.selectDomElement(i)))},o.isViewSourceCommandDisabled=function(){return!(o.GridContextMenuData&&o.GridContextMenuData.view&&o.GridContextMenuData.sourceInfo)},o.onRequestViewSource=function(n){o.viewSource(n.source,n.line,n.column)},o.onShowInRootsViewCommand=function(){o.GridContextMenuData&&o.GridContextMenuData.view&&(n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.ROOT_VIEW,2),o.GridContextMenuData.view._controller.showPathToRoot(o.GridContextMenuData.objectId,o.GridContextMenuData.parentObjectId),o.GridContextMenuData=null)},o.onViewSourceCommand=function(){if(o.GridContextMenuData&&o.GridContextMenuData.view&&o.GridContextMenuData.sourceInfo){var n=o.GridContextMenuData.sourceInfo;window.setImmediate(function(){o.viewSource(n.source,n.line,n.column)})}},o.showSourceInfoTooltip=function(i,r){if(r)if(n.Program.hostType===1)t.F12.Debugger.getTranslatedLocation(r.source,r.line,r.column,!0).done(function(n){var u={name:r.name,line:n.oneBasedLine,column:n.oneBasedColumn,source:n.documentPath},f=new Common.Controls.Legacy.SourceInfoTooltip(u,i,"SourceInfoIdentifierLabel"),e={content:f.html,contentContainsHTML:!0};t.Tooltip.show(e)});else{var u=new Common.Controls.Legacy.SourceInfoTooltip(r,i,"SourceInfoIdentifierLabel"),f={content:u.html,contentContainsHTML:!0};t.Tooltip.show(f)}},o.viewSource=function(i,r,u){t.Host.showDocument(i,r,u).done(function(){},function(){n.Program.shell.hostShell.setStatusBarText(t.Resources.getString("UnableToViewSource"),!0)})},o.onShowInDominatorsViewCommand=function(){o.GridContextMenuData&&o.GridContextMenuData.view&&(n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.DOMINATOR_VIEW,2),o.GridContextMenuData.view._controller.showPathToDominator(o.GridContextMenuData.objectId,o.contextMenuScopeFilter()),o.GridContextMenuData=null)},o.isShowInDominatorsViewCommandHidden=function(){return!o.GridContextMenuData||!o.GridContextMenuData.view||o.GridContextMenuData.view._dataViewModel.viewType===2&&o.GridContextMenuData.view._focusedGrid===o.GridContextMenuData.view._grid},o.isObjectScopeConformed=function(n,t){if(!n.diffOperation&&!n.isFabricatedObject)return!1;switch(t){case 1:return n.isAdded;case 0:return!n.isAdded&&!n.isBaseline;case 2:default:return!0}return!1},o.contextMenuScopeFilter=function(){return o.GridContextMenuData&&o.GridContextMenuData.view&&o.GridContextMenuData.view._dataViewModel.isDiff?o.GridContextMenuData.view._snapshotViewModel.scopeFilter:2},o.prototype.onIsDisplayedChanged=function(){this._dataViewModel.isDisplayed?this.updateHighlight():this.clearHighlight()},o.prototype.decorateNameCell=function(n,i){var r=i,e=r.name,s=r.name,u=document.createElement("span"),f,h,a,c,l;if(o.isObjectScopeConformed(r,this.getScopeFilter())&&(o.HTMLRegex.test(r.kind)?f=Common.TokenExtractor.getHtmlTokens(e):"String"===r.kind?f=Common.TokenExtractor.getStringTokens(e):"Number"===r.kind&&(f=Common.TokenExtractor.getNumberTokens(e))),f&&f.length>0)for(h=0;h<f.length;h++)a=f[h],c=document.createElement("span"),c.className=Common.TokenExtractor.getCssClass(a.type),c.textContent=a.value,u.appendChild(c);else u.textContent=e;this._snapshotViewModel.displayObjectIDs&&r.objectId&&!r.isFabricatedObject&&(u.innerHTML+=" @"+r.objectId,s+=" @"+r.objectId);r.isCircularReference&&(u.innerHTML+=t.Resources.getString("CircularReferenceMarker"),s+=t.Resources.getString("CircularReferenceMarker")+" "+t.Resources.getString("CircularReferenceMessage"));l=r.sourceInfo;l?(u.className="BPT-FileLink",u.onclick=o.onRequestViewSource.bind(this,l),n.addEventListener("mouseover",o.showSourceInfoTooltip.bind(this,s,l))):(n.setAttribute("data-plugin-vs-tooltip"," "+s),n.setAttribute("aria-label",r.name));n.appendChild(u)},o.prototype.getWarningCss=function(t,i){var r=i[t];return r.isDetachedDomNode?r instanceof n.TypeDataObject?"detachedDomNodeChildrenWarning":"detachedDomNodeWarning":r.hasDetachedDomNodeChildren&&this._snapshotViewModel.foldObjectsByDominator?"detachedDomNodeChildrenWarning":void 0},o.prototype.isShowInDominatorsViewCommandDisabled=function(){return!(o.GridContextMenuData&&o.GridContextMenuData.view&&o.isObjectScopeConformed(o.GridContextMenuData.object,o.contextMenuScopeFilter()))},o.prototype.navigateToObjectForPath=function(n){var e=this,i;if(n&&n.length>0&&this._grid){var r=n.reverse(),f=this._grid._dataSource,u=this._grid.getExpandStates(),t=0;for(i=0;i<r.length;i++)for(;t<f.length;t++)if(f[t].objectId===r[i]){i===r.length-1?this._grid.setSelectedDataIndex(t):(u[t]<0&&this._grid.expandNode(t),t++);break}else u[t]!==0&&(t+=Math.abs(u[t])-1);this._grid.layout();window.setImmediate(function(){e._grid.setFocusToSelectedRow()})}},o.prototype.getDiffNameCellCSSClass=function(n,t,i,r){var u=r[n],f=this.getScopeFilter();if(!u.diffOperation&&!u.isFabricatedObject)return null;switch(f){case 1:return u.isAdded?null:"unmatchedScopeObject";case 0:if(u.isChanged&&!u.isBaseline)return null;if(u.isAdded||u.isBaseline)return"unmatchedScopeObject";break;case 2:default:return null}return null},o.prototype.getNumericCellCSSClass=function(n,t,i,r,u){var f="numeric-data";return n&&(f+=" "+this.getDiffNameCellCSSClass(t,i,r,u)),f},o.prototype.onGridContextMenu=function(t,i){var c,e,r,l,h;this._focusedGrid=t;var f=t.getSelectedDataIndex(),s=!1,a=i.pageX,v=i.pageY;if(i.clientX===0&&i.clientY===0)s=f>-1,c=t.getRowInfo(f).row,c?(e=c.getBoundingClientRect(),a=Math.round(e.left+e.width/4),v=Math.round(e.top+e.height/2)):s=!1;else for(r=document.elementFromPoint(i.clientX,i.clientY);r;){if(r&&r.classList)if(r.classList.contains("grid-row")){s=!0;break}else if(r.classList.contains("grid-canvas"))break;r=r.parentElement}return s&&(l=-1,typeof f=="number"&&f>=0&&(h=t.getRowData(f),h instanceof n.TypeDataObject||(l=h.objectId)),l>=0?o.GridContextMenu&&(o.GridContextMenuData=new u(this,h),o.GridContextMenu.show(a,v)):o.GridContextMenuData=null),i.preventDefault(),i.stopImmediatePropagation(),!1},o.prototype.uiUpdateAll=function(){this.uiUpdateSnapshotDataSource()},o.prototype.uiUpdateSnapshotDataSource=function(){if(this._dataViewModel.snapshotDataSource){var n=this._dataViewModel.snapshotDataSource.snapshot.isDiff;this._fieldNameToColumnMapMainGrid=this.populateFieldNameToColumnMap(n);this._fieldNameToColumnMapReferenceGrid=this.populateFieldNameToColumnMap(n)}this._referenceViewContainer.style.display="none";this.updateTree()},o.prototype.updateSortOrders=function(){this._snapshotViewModel.foldObjectsByDominator?(this._sortOrder&&this._sortOrder.index==="isDetachedDomNode"&&(this._sortOrder.index="containsDetachedDomNode"),this._sortOrderForReferences&&this._sortOrderForReferences.index==="isDetachedDomNode"&&(this._sortOrderForReferences.index="containsDetachedDomNode")):(this._sortOrder&&this._sortOrder.index==="containsDetachedDomNode"&&(this._sortOrder.index="isDetachedDomNode"),this._sortOrderForReferences&&this._sortOrderForReferences.index==="containsDetachedDomNode"&&(this._sortOrderForReferences.index="isDetachedDomNode"))},o.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}},o.prototype.getScopeFilter=function(){return this._dataViewModel.isDiff?isNaN(this._snapshotViewModel.scopeFilter)?1:this._snapshotViewModel.scopeFilter:2},o.prototype.getUpdatedSorter=function(n,t){return{sortProperty:n.index,sortOrder:n.order==="asc"?0:1,sortComparer:o.getSortComparer(n,t)}},o.prototype.getSorter=function(){return this.getUpdatedSorter(this._sortOrder,this._fieldNameToColumnMapMainGrid)},o.prototype.getSorterForReferences=function(){return this.getUpdatedSorter(this._sortOrderForReferences,this._fieldNameToColumnMapReferenceGrid)},o.prototype.markAllObjectsScopeConformed=function(n){for(var i=n.items,t=0;t<i.length;t++)i[t].isScopeConformed=!0},o.prototype.updateTree=function(){var i=this;this._dataViewModel.snapshotDataSource&&(this._rootQueryPromise&&(n.Program.traceWriter.raiseEvent(210),this._rootQueryPromise.cancel()),n.Program.traceWriter.raiseEvent(210),this._rootQueryPromise=this._dataViewModel.snapshotDataSource.getRootHeapDataTreeItem(this.getFilter(),this.getSorter(),0,o.ROOTS_LOAD_CAP,this.getScopeFilter()).then(function(r){var c=r.items,e,s,h;r.totalCount>r.items.length?(i._reachedItemsCapMessageContainer.style.display="block",e=t.Resources.getString("ReachedItemsCapMessage",Common.FormattingHelpers.getDecimalLocaleString(r.items.length,!0),Common.FormattingHelpers.getDecimalLocaleString(r.totalCount,!0)),i._reachedItemsCapMessageContainer.innerText=e):i._reachedItemsCapMessageContainer.style.display="none";var f=i.getTreeInfo(c,function(n,t,r,u){var f=i.getScopeFilter(),s=!1,e;return i._snapshotViewModel.showNonMatchingReferences&&(o.isObjectScopeConformed(n,f)||n.isScopeConformed)&&(f=2,s=!0),e=i._dataViewModel.snapshotDataSource.getHeapDataTreeItem(i.getFilter(),i.getSorter(),n.id,t,r,u,f),s&&i.markAllObjectsScopeConformed(e),e}.bind(i)),l=i.getColumnInfoForMainGrid(i._dataViewModel.snapshotDataSource.getAvailableFields(i._snapshotViewModel.foldObjectsByDominator)),u=new Common.Controls.Legacy.Grid.GridOptions(f.toggleFunction,f.loadMoreFunction,l,[i._sortOrder],null,i.notifyRowSelected.bind(i));u.disableRightClickSelection=!1;s=i._snapshotViewModel.foldObjectsByDominator?i._fieldNameToColumnMapMainGrid.containsDetachedDomNode:i._fieldNameToColumnMapMainGrid.isDetachedDomNode;i._grid?(i._grid.setDataSource(f.gridData,f.expandStates,u.columns,u.sortOrders,-1),i._grid.setGutterHeaderClickSortColumn(s),i._grid.setAriaDescription(e)):(h={cssClass:"",index:"",gutterIconCssCallback:i.getWarningCss.bind(i)},u.gutter.backgroundColor=t.Theme.getValue("plugin-background-color"),u.gutter.icon=h,u.gutter.headerClickSortColumn=s,u.gutter.getTooltip=i.detachedDomNodeTooltip.bind(i),i._grid=i.createGrid(f.gridData,f.expandStates,u,i._snapshotGridContainer),i._grid.getElement().tabIndex=4,i._grid.getElement().addEventListener("sort",i.sortCompleted.bind(i)),i._grid.getElement().addEventListener("sortStarted",i.sortStarted.bind(i)),i._grid.getElement().addEventListener("selectionchanged",i.onGridSelectionChanged.bind(i)),i._grid.setAriaDescription(e));n.Program.traceWriter.raiseEvent(210);n.Program.onIdle()}))},o.prototype.detachedDomNodeTooltip=function(i,r){var u=r[i];return u.isDetachedDomNode?u.isWinJsDisposable?t.Resources.getString("DetachedDomNodeDisposableTooltip"):u instanceof n.TypeDataObject?t.Resources.getString("DetachedDomNodeTypeObjectTooltip"):t.Resources.getString("DetachedDomNodeTooltip"):u.hasDetachedDomNodeChildren&&this._snapshotViewModel.foldObjectsByDominator?u instanceof n.TypeDataObject?t.Resources.getString("DetachedDomNodeRetainingTypeObjectTooltip"):t.Resources.getString("HasDetachedDomNodeChildrenTooltip"):null},o.prototype.updateHighlight=function(){var t=this._selectedItem,n;r.isAvailable&&t?(n=this.getUidChain(t.objectId),n&&r.highlightElement(n)):this.clearHighlight()},o.prototype.clearHighlight=function(){r.isAvailable&&r.clearHighlight()},o.prototype.onGridSelectionChanged=function(n){var t=n.customData[0],i;t.selectedCount===1?(i=t.selectedRows[t.selectedIndex],typeof i!="undefined"&&(this._selectedItem=this._grid.getRowData(i))):t.selectedCount===0&&(this._selectedItem=null);this.showReferences(this._selectedItem);this.updateHighlight()},o.prototype.notifyRowSelected=function(){Notifications.notify(n.MemoryNotifications.DetailsViewRowSelected)},o.prototype.showReferences=function(i){var e=this,f,o,s;if(n.Program.traceWriter.raiseEvent(215),i&&i.id&&!isNaN(i.id)&&(f=this._dataViewModel.snapshotDataSource.getReferenceTreeItems(i.id,i.id,0,this.getSorterForReferences(),this._snapshotViewModel.displayObjectIDs,this._snapshotViewModel.displayCircularReferences,0,-1).items),!f||f.length===0){this._referenceViewContainer.style.display="none";n.Program.traceWriter.raiseEvent(216);return}var h=i.id,u=this.getTreeInfo(f,function(n){return e._dataViewModel.snapshotDataSource.getReferenceTreeItems(h,n.parentObjectId,n.nodeId,e.getSorterForReferences(),e._snapshotViewModel.displayObjectIDs,e._snapshotViewModel.displayCircularReferences,0,-1)}),c=this.getColumnInfoForReferenceGrid(this._dataViewModel.snapshotDataSource.getAvailableFieldsForReferenceTree(this._snapshotViewModel.foldObjectsByDominator)),r=new Common.Controls.Legacy.Grid.GridOptions(u.toggleFunction,u.loadMoreFunction,c,[this._sortOrderForReferences],null,this.notifyRowSelected.bind(this));r.disableRightClickSelection=!1;r.ariaTitle=t.Resources.getString("ReferenceGraph");o=this._snapshotViewModel.foldObjectsByDominator?this._fieldNameToColumnMapMainGrid.containsDetachedDomNode:this._fieldNameToColumnMapMainGrid.isDetachedDomNode;this._gridReference?(this._gridReference.setDataSource(u.gridData,u.expandStates,r.columns,r.sortOrders,-1),this._gridReference.setGutterHeaderClickSortColumn(o),this._gridReference.updateGetChildDataCallback(u.toggleFunction)):(s={cssClass:"",index:"",gutterIconCssCallback:this.getWarningCss.bind(this)},r.gutter.backgroundColor=t.Theme.getValue("plugin-background-color"),r.gutter.icon=s,r.gutter.headerClickSortColumn=o,r.gutter.getTooltip=this.detachedDomNodeTooltip.bind(this),this._gridReference=this.createGrid(u.gridData,u.expandStates,r,this._referenceViewContainer),this._gridReference.getElement().tabIndex=4,this._gridReference.getElement().addEventListener("sort",this.sortCompletedForReferences.bind(this)));this._referenceViewContainer.style.removeProperty("display");f.length===1&&f[0].hasChildren&&this._gridReference.expandNode(0);n.Program.traceWriter.raiseEvent(216)},o.prototype.getMoreText=function(n,i,r){var u,f;return n<i&&(f=Math.min(r,i-n),u=t.Resources.getString("ChildrenLoadNext",Common.FormattingHelpers.getDecimalLocaleString(f,!0))),u},o.prototype.getTreeInfo=function(n,t){var i=this,r=this.getPlaceholderRowsAndExpandStates(n),u=r.itemsWithPlaceholders,f=r.expandStates,s=function(n,r,u){var f=t(n,r,0,o.CHILDREN_LOAD_CAP),e=i.getMoreText(f.items.length,f.totalCount,o.CHILDREN_LOAD_CAP);e&&(n.nextStartIndex=f.items.length);u(i.getPlaceholderRowsAndExpandStates(f.items),e)},h=function(n,r,u){var e=n.nextStartIndex,f,s;e&&(f=t(n,r,e,o.CHILDREN_LOAD_CAP),s=i.getMoreText(e+f.items.length,f.totalCount,o.CHILDREN_LOAD_CAP),s&&(n.nextStartIndex=e+f.items.length),u(i.getPlaceholderRowsAndExpandStates(f.items),s))};return new e(u,f,s,h)},o.prototype.getPlaceholderRowsAndExpandStates=function(n){for(var r=[],u={name:"",value:"",isPlaceholder:!0},t=[],i=0;n&&i<n.length;i++)r.push(n[i]),n[i].hasChildren?(t.push(-1),r.push(u),t.push(0)):t.push(0);return{itemsWithPlaceholders:r,expandStates:t}},o.prototype.createGrid=function(n,t,i,r){r.innerHTML="";var u=new Common.Controls.Legacy.Grid.GridControl(r,i);return u.setDataSource(n,t,i.columns,i.sortOrders,-1),r.addEventListener("contextmenu",this.onGridContextMenu.bind(this,u)),r.addEventListener("keydown",this.onKeyDown.bind(this,u)),u},o.prototype.getColumnInfo=function(n,i){for(var u=[],r=0;r<n.length;r++)if(i.hasOwnProperty(n[r]))u.push(i[n[r]]);else throw new Error(t.Resources.getErrorString("JSPerf.1003"));return u},o.prototype.getColumnInfoForMainGrid=function(n){return this.getColumnInfo(n,this._fieldNameToColumnMapMainGrid)},o.prototype.getColumnInfoForReferenceGrid=function(n){return this.getColumnInfo(n,this._fieldNameToColumnMapReferenceGrid)},o.prototype.onKeyDown=function(n,t){if(this._focusedGrid=n,t.keyCode!==121||t.altKey||t.ctrlKey||!t.shiftKey)t.keyCode!==13||t.altKey||t.ctrlKey||t.shiftKey||this.tryViewSource();else{var i=document.createEvent("MouseEvent");i.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null);this.onGridContextMenu(n,i)}},o.prototype.sortCompleted=function(t){var i=t.customData[0];this._sortOrder=i.sortOrder[0];n.Program.onIdle();n.Program.traceWriter.raiseEvent(208)},o.prototype.sortStarted=function(){n.Program.traceWriter.raiseEvent(207)},o.prototype.sortCompletedForReferences=function(n){var t=n.customData[0];this._sortOrderForReferences=t.sortOrder[0]},o.prototype.tryViewSource=function(){var t=this._grid.getSelectedDataIndex(),i,n;if(t>-1&&(i=this._grid.getRowData(t),n=i.sourceInfo,n))o.onRequestViewSource(n)},o.ROOTS_LOAD_CAP=2e3,o.CHILDREN_LOAD_CAP=2e3,o.HTMLRegex=/HTML.*Element/,o}(Common.Controls.Legacy.TemplateControl);n.SnapshotDataView=f}(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,i=function(i){function r(r){i.call(this);this._snapshotDataViewController=r;this.title=t.Resources.getString(Common.Enum.GetName(n.DataViewType,this._snapshotDataViewController.dataViewModel.viewType));this.tooltipString=t.Resources.getString(Common.Enum.GetName(n.DataViewType,this._snapshotDataViewController.dataViewModel.viewType)+"Tooltip");this.content=this._snapshotDataViewController.view}return __extends(r,i),Object.defineProperty(r.prototype,"controller",{get:function(){return this._snapshotDataViewController},enumerable:!0,configurable:!0}),r.prototype.onActiveChanged=function(){var n=this;this.active&&(this._snapshotDataViewController.setSnapshotDataSource(),window.setImmediate(function(){var t=n.header.rootElement===document.activeElement;t||n._snapshotDataViewController.setFocusOnGrid()}))},r}(n.Controls.TabItem);n.SnapshotDataViewTab=i}(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(i,r,u){this._storageId=i;this._firstSnapshotId=r;this._lastSnapshotId=u;this._navigationId=n.NavigationHelpers.getNextId();this.model=new n.SnapshotViewModel;this.model.progressText=t.Resources.getString("GeneratingComparisonView");this.view=new n.SnapshotView(this,this.model)}return Object.defineProperty(i.prototype,"currentDataViewController",{get:function(){return this.view.currentDataViewController},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"navigationId",{get:function(){return this._navigationId},enumerable:!0,configurable:!0}),i.prototype.getSnapshotDataViewController=function(t){return new n.SnapshotDataViewController(t,this.model,this.view)},i.prototype.diffSnapshots=function(i,r,u,f){var c=this,s,e,o,h;for(this.setTargetView(u,f),s=[],e=0,o=0;o<r.length;o++)h=n.Program.shell.getSnapshotFullPath(i,r[o]),s.push(h),e+=n.SnapshotViewController.getHashKey(h);n.Program.traceWriter.raiseEventWithKey(219,e);n.Program.memoryAnalyzerData.processSnapshotDiff(s).done(this.onDiffCompleted.bind(this,e),this.onDiffFailed.bind(this,e),function(n){c.model.progressText=t.Resources.getString(n.stringId);c.model.progressValue=n.percentage})},i.prototype.setTargetView=function(n,t){this.model.targetView=n;this.model.sortProperty=t},i.prototype.onDiffCompleted=function(t,i){var r=new n.Snapshot(i,!0,this._firstSnapshotId,this._lastSnapshotId);this.model.snapshot=r;n.Program.traceWriter.raiseEventWithKey(220,t);n.Program.onIdle()},i.prototype.onDiffFailed=function(t,i){this.model.latestSnapshotError=i;n.Program.traceWriter.raiseEventWithKey(220,t);n.Program.onIdle()},i}();n.SnapshotDiffController=i})(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(n,t){this.storageId=n;this.relativePath=t}return n}();n.SnapshotFile=t})(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(n,t,i,r){this.detachedDomNodeCount=n.detachedDomNodeCount;this.id=r;this.objectsCount=n.objectsCount;this.processPrivateBytes=n.privateBytes.toString();this.pointerSize=n.pointerSize;this.screenshotData=n.base64Image;this.snapshotFile=t;this.statsAddedObjects=n.statsAddedObjects;this.statsDeletedObjects=n.statsDeletedObjects;this.taken=i;this.totalObjectSize=n.totalObjectSize}return Object.defineProperty(n,"fileExtension",{get:function(){return".snapshotsummary"},enumerable:!0,configurable:!0}),n.load=function(n,i,r,u){var e,f;t.Storage.openFile(n+"\\"+i,{access:1,encoding:"UTF-8",persistence:1,type:1}).then(function(n){return e=n,n.read()}).then(function(t){return f=JSON.parse(t),f.snapshotFile.storageId=n,e.close()}).done(function(){r(f)},function(n){u&&u(n)})},n.prototype.save=function(i,r){var u=this,f=this.snapshotFile.relativePath+n.fileExtension;t.Storage.createFile(this.snapshotFile.storageId+"\\"+f,{access:2,encoding:"UTF-8",persistence:1,type:1}).done(function(n){n.write(JSON.stringify(u)).done(function(){n.close();i()},function(t){n.close();r&&r(t)})},function(n){r&&r(n)})},n}();n.SnapshotSummary=i})(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=function(t){function i(n){t.call(this);this._snapshotViewController=n;this.content=n.view}return __extends(i,t),Object.defineProperty(i.prototype,"model",{get:function(){return this._snapshotViewController.model},enumerable:!0,configurable:!0}),i.prototype.onActiveChanged=function(){if(this.active){var t=this._snapshotViewController.view.currentDataView;t&&t.refreshGrids();n.NavigationHelpers.switchNavigationView(this._snapshotViewController.navigationId)}},i}(n.Controls.TabItem);n.SnapshotTab=t}(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,r=function(){function n(n,t){this._summary=n;this._snapshotSummaryCollection=t}return Object.defineProperty(n.prototype,"summaryData",{get:function(){return this._summary},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"snapshotSummaryCollection",{get:function(){return this._snapshotSummaryCollection},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"timeTaken",{get:function(){var n=new Date(this._summary.taken);return"("+n.toLocaleTimeString()+")"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"detachedDomNodeCount",{get:function(){return this._summary.detachedDomNodeCount},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"processPrivateBytes",{get:function(){return Common.FormattingHelpers.getPrettyPrintSize(parseInt(this.summaryData.processPrivateBytes))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"totalObjectSize",{get:function(){return Common.FormattingHelpers.getPrettyPrintSize(this.summaryData.totalObjectSize)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"objectsCount",{get:function(){return this.summaryData.objectsCount},enumerable:!0,configurable:!0}),n.prototype.getComparableSnapshots=function(){for(var t,i=[],r=this._summary.taken,n=0;n<this._snapshotSummaryCollection.length;n++)t=this._snapshotSummaryCollection.getItem(n),t.id!==this._summary.id&&i.push(t);return i.sort(function(n,t){return n.id-t.id})},n}(),i;n.SnapshotTileViewModel=r;i=function(n){function i(i,r){var f,s,u,o,e,h;for(n.call(this,"SnapshotTileTemplate"),this._controller=i,this._model=r,this._tileContextMenuItems=[],this._snapshotTile=this.findElement("snapshotTile"),this._comparableSnapshots=this._model.getComparableSnapshots(),this._tileHeader=this.findElement("snapshotTileHeader"),this.findElement("snapshotTileTitle").innerText=t.Resources.getString("SnapshotNumber",this._model.summaryData.id),f=this.findElement("snapshotTileImage"),this._model.summaryData.screenshotData?(f.src="data:image/jpeg;base64,"+this._model.summaryData.screenshotData.replace(/\r\n/g,""),f.alt=t.Resources.getString("Screenshot")):f.style.display="none",s=Common.FormattingHelpers.getDecimalLocaleString(this._model.objectsCount,!0),this.findElement("snapshotTakenDate").innerText=this._model.timeTaken,this.findElement("heapSizeLink").innerText=this._model.totalObjectSize,this.findElement("objectsCountLink").innerText=t.Resources.getString("ObjectsCount",s),this.findElement("heapSizeLink").setAttribute("data-plugin-vs-tooltip",t.Resources.getString("HeapSizeLinkTooltip")),this.findElement("objectsCountLink").setAttribute("data-plugin-vs-tooltip",t.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),r.detachedDomNodeCount>0&&(u=this.findElement("snapshotTileDetachedDomNodeCount"),u.innerText=r.detachedDomNodeCount.toString(),u.setAttribute("data-plugin-vs-tooltip",t.Resources.getString("PotentialIssuesTooltip",r.detachedDomNodeCount)),u.setAttribute("aria-label",t.Resources.getString("PotentialIssuesTooltip",r.detachedDomNodeCount)),u.onclick=this.onDetachedDomNodesClick.bind(this),this.findElement("snapshotTileDetachedDomNodeInfo").style.visibility="visible"),o=this.findElementsByClassName("BPT-FileLink"),e=0;e<o.length;e++)h=o[e],function(n){n.onkeydown=function(t){t.keyCode!==13&&t.keyCode!==32||t.ctrlKey||t.altKey||t.shiftKey||n.click()}}(h);this.populateContextMenu();this._model.snapshotSummaryCollection.collectionChanged.addHandler(this.onCollectionChanged.bind(this))}return __extends(i,n),Object.defineProperty(i.prototype,"navigationElement",{get:function(){return this._tileHeader},enumerable:!0,configurable:!0}),i.prototype.setFocus=function(){this._tileHeader.focus()},i.prototype.onCollectionChanged=function(n){var i,r;n.action===0&&(i=n.newItems[0],this._model.summaryData.id!==i.id&&(r={callback:this.diffTo.bind(this,i.id),label:t.Resources.getString("SnapshotNumber",i.id),type:1},this._tileContextMenuItems.push(r)),this.createContextMenu())},i.prototype.createContextMenu=function(){var r=this,i,n;this._tileContextMenu&&this._tileContextMenu.detach(this._snapshotTile);i={callback:this.onSizeClick.bind(this),label:t.Resources.getString("ViewSnapshotDetails"),type:1};n={callback:function(){},disabled:function(){return r.isFirstSnapshot()},label:t.Resources.getString("CompareToEllipsis"),type:1};this.isFirstSnapshot()||(n.submenu=this._tileContextMenuItems);this._tileContextMenu=t.ContextMenu.create([i,n]);this._tileContextMenu.attach(this._snapshotTile)},i.prototype.isFirstSnapshot=function(){return this._tileContextMenuItems.length===0},i.prototype.populateContextMenu=function(){var n,i,r;for(this._comparableSnapshots=this._model.getComparableSnapshots(),n=0;n<this._comparableSnapshots.length;n++)i=this._comparableSnapshots[n],r={callback:this.diffTo.bind(this,i.id),label:t.Resources.getString("SnapshotNumber",i.id),type:1},this._tileContextMenuItems.push(r);this.createContextMenu()},i.prototype.setupSizeDiff=function(n,i){var u=this._comparableSnapshots[this._model.summaryData.id-2],r;u?(r=this._model.summaryData.totalObjectSize-u.totalObjectSize,r>0?i.classList.add("heapIncreaseIcon"):r<0&&i.classList.add("heapDecreaseIcon"),n.innerText=r===0?t.Resources.getString("NoDiff"):(r>0?"+":"-")+Common.FormattingHelpers.getPrettyPrintSize(Math.abs(r)),n.setAttribute("data-plugin-vs-tooltip",t.Resources.getString("HeapSizeDiffLinkTooltip"))):(n.classList.remove("BPT-FileLink"),n.classList.add("baselineText"),n.innerText=t.Resources.getString("Baseline"),n.tabIndex=-1)},i.prototype.setupCountDiff=function(n,i){var e;if(this._comparableSnapshots.length>=1){var r=this._model.summaryData.statsAddedObjects,u=this._model.summaryData.statsDeletedObjects,f=r-u;f>0?i.classList.add("heapIncreaseIcon"):f<0&&i.classList.add("heapDecreaseIcon");r===0&&u===0?n.innerText=t.Resources.getString("NoDiff"):(e="+"+Common.FormattingHelpers.getDecimalLocaleString(r,!0)+" / -"+Common.FormattingHelpers.getDecimalLocaleString(u,!0),n.innerText=e);n.setAttribute("data-plugin-vs-tooltip",t.Resources.getString("ObjectsCountDiffLinkTooltip"))}else n.classList.remove("BPT-FileLink"),n.classList.add("baselineText"),n.innerText=t.Resources.getString("Baseline"),n.tabIndex=-1},i.prototype.onDetachedDomNodesClick=function(){this._controller.viewSnapshot(this._model.summaryData.id,"Types","containsDetachedDomNode")},i.prototype.onSizeClick=function(){this._controller.viewSnapshot(this._model.summaryData.id,"Types","retainedSize")},i.prototype.onObjectCountClick=function(){this._controller.viewSnapshot(this._model.summaryData.id,"Types","childrenCount")},i.prototype.diffTo=function(n){this._controller.compareSnapshots(this._model.summaryData.id,n,"Types","retainedSize")},i.prototype.onDiffClick=function(){var n=this._comparableSnapshots[this._model.summaryData.id-2];n&&this._controller.compareSnapshots(this._model.summaryData.id,n.id,"Types","retainedSizeDiff")},i.prototype.onObjectDiffClick=function(){var n=this._comparableSnapshots[this._model.summaryData.id-2];n&&this._controller.compareSnapshots(this._model.summaryData.id,n.id,"Types","childrenCount")},i}(Common.Controls.Legacy.TemplateControl);n.SnapshotTileView=i}(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var i=Microsoft.Plugin,f=function(){function u(i){this._storageId=i;this._navigationId=n.NavigationHelpers.getNextId();this.model=new t;this.view=new r(this,this.model)}return Object.defineProperty(u.prototype,"currentDataViewController",{get:function(){return this.view.currentDataViewController},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"navigationId",{get:function(){return this._navigationId},enumerable:!0,configurable:!0}),u.getHashKey=function(n){for(var i=0,t=0;t<n.length;t++)i+=n.charCodeAt(t);return i},u.prototype.getSnapshotDataViewController=function(t){return new n.SnapshotDataViewController(t,this.model,this.view)},u.prototype.giveFeedback=function(){var t=this;n.Program.internalFeedback.isEnabled().done(function(i){if(i){var r="";t.view.currentDataViewController&&(r=Common.Enum.GetName(n.DataViewType,t.view.currentDataViewController.viewType));n.Program.shell.save(!1).done(function(t){n.Program.internalFeedback.sendData(!0,"","",r,"",t)})}})},u.prototype.loadSnapshot=function(t,r,f,e){if(!r||r.length!==1)throw new Error(i.Resources.getErrorString("JSPerf.1012"));this.setTargetView(f,e);var s=n.Program.shell.getSnapshotFullPath(t,r[0]),o=u.getHashKey(s);n.Program.traceWriter.raiseEventWithKey(217,o);this.model.progressText=i.Resources.getString("ProcessingSnapshot");n.Program.memoryAnalyzerData.processSnapshot(s).done(this.onSnapshotProcessingCompleted.bind(this,o),this.onSnapshotProcessingFailed.bind(this,o),this.onSnapshotProgress.bind(this))},u.prototype.setTargetView=function(n,t){this.model.targetView=n;this.model.sortProperty=t},u.prototype.onSnapshotProcessingCompleted=function(t,r){var u=new n.Snapshot(r,!1,0,0);this.model.snapshot=u;this.model.progressText=i.Resources.getString("ProcessingSnapshotCompleted");n.Program.traceWriter.raiseEventWithKey(218,t);n.Program.onIdle()},u.prototype.onSnapshotProcessingFailed=function(t,r){if(!r)throw new Error(i.Resources.getErrorString("JSPerf.1013"));this.model.latestSnapshotError=r;this.model.progressText="";n.Program.traceWriter.raiseEventWithKey(218,t);n.Program.onIdle()},u.prototype.onSnapshotProgress=function(n){this.model.progressText=i.Resources.getString(n.stringId);this.model.progressValue=n.percentage},u}(),t,r,u;n.SnapshotViewController=f;t=function(t){function r(){t.call(this)}return __extends(r,t),r.initialize=function(){Common.ObservableHelpers.defineProperty(r,r.DataTabModelPropertyName,null,function(n,t,i){return n.onDataTabModelChanged(t,i)});Common.ObservableHelpers.defineProperty(r,r.DisplayCircularReferencesPropertyName,!1);Common.ObservableHelpers.defineProperty(r,r.DisplayObjectIDsPropertyName,!1);Common.ObservableHelpers.defineProperty(r,r.FoldObjectsByDominatorPropertyName,!1);Common.ObservableHelpers.defineProperty(r,r.IsDiffPropertyName,!1);Common.ObservableHelpers.defineProperty(r,r.IsDisplayedPropertyName,!1,function(n){return n.onIsDisplayedChanged()});Common.ObservableHelpers.defineProperty(r,r.LatestSnapshotErrorPropertyName,null);Common.ObservableHelpers.defineProperty(r,r.ProgressTextPropertyName,"");Common.ObservableHelpers.defineProperty(r,r.ProgressValuePropertyName,"");Common.ObservableHelpers.defineProperty(r,r.ScopeFilterOptionsPropertyName,null);Common.ObservableHelpers.defineProperty(r,r.ScopeFilterPropertyName,2);Common.ObservableHelpers.defineProperty(r,r.ShowBuiltInsPropertyName,!1);Common.ObservableHelpers.defineProperty(r,r.ShowNonMatchingReferencesPropertyName,!0);Common.ObservableHelpers.defineProperty(r,r.SnapshotPropertyName,null,function(n){return n.onSnapshotChanged()});Common.ObservableHelpers.defineProperty(r,r.SortPropertyPropertyName,"");Common.ObservableHelpers.defineProperty(r,r.TargetViewPropertyName,"")},r.prototype.onDataTabModelChanged=function(n,t){n&&(n.isDisplayed=!1);t&&(t.isDisplayed=this.isDisplayed)},r.prototype.onIsDisplayedChanged=function(){this.dataTabModel&&(this.dataTabModel.isDisplayed=this.isDisplayed)},r.prototype.onSnapshotChanged=function(){this.setScopeFilterOptions()},r.prototype.onFilterStringChanging=function(){n.Program.traceWriter.raiseEvent(213)},r.prototype.onFilterStringChanged=function(){n.Program.traceWriter.raiseEvent(214)},r.prototype.setScopeFilterOptions=function(){if(this.snapshot){var n=this.snapshot.getSnapshotDiffStats(),t=[{value:0..toString(),text:i.Resources.getString("ScopeObjectsLeftFromPreviousSnapshot",this.snapshot.firstSnapshotId,Common.FormattingHelpers.getDecimalLocaleString(n.leftOverObjectsCount,!0))},{value:1..toString(),text:i.Resources.getString("ScopeObjectsAddedBetweenSnapshots",this.snapshot.firstSnapshotId,this.snapshot.lastSnapshotId,Common.FormattingHelpers.getDecimalLocaleString(n.addedObjectsCount,!0))},{value:2..toString(),text:i.Resources.getString("ScopeAllObjects",this.snapshot.lastSnapshotId,Common.FormattingHelpers.getDecimalLocaleString(n.objectsCount,!0))}];this.scopeFilterOptions=t;this.scopeFilter=1;this.isDiff=this.snapshot.isDiff}else this.scopeFilterOptions=[]},r.DataTabModelPropertyName="dataTabModel",r.DisplayCircularReferencesPropertyName="displayCircularReferences",r.DisplayObjectIDsPropertyName="displayObjectIDs",r.FoldObjectsByDominatorPropertyName="foldObjectsByDominator",r.IsDiffPropertyName="isDiff",r.IsDisplayedPropertyName="isDisplayed",r.LatestSnapshotErrorPropertyName="latestSnapshotError",r.ProgressTextPropertyName="progressText",r.ProgressValuePropertyName="progressValue",r.ScopeFilterPropertyName="scopeFilter",r.ScopeFilterOptionsPropertyName="scopeFilterOptions",r.ShowBuiltInsPropertyName="showBuiltIns",r.ShowNonMatchingReferencesPropertyName="showNonMatchingReferences",r.SnapshotPropertyName="snapshot",r.SortPropertyPropertyName="sortProperty",r.TargetViewPropertyName="targetView",r}(Common.Observable);n.SnapshotViewModel=t;t.initialize();r=function(r){function f(n,t){r.call(this,"SnapshotTabTemplate");this._controller=n;this._model=t;this._snapshotAnalysisView=new u(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._progressText.setAttribute("aria-live","assertive");this._progressBar=this.findElement("progressBar");this._snapshotProcessingError=this.findElement("snapshotProcessingError");this._snapshotProcessingErrorMsg=this.findElement("snapshotProcessingErrorMsg");this.findElement("snapshotProcessingErrorLabel").innerText=i.Resources.getString("ErrorWhileProcessing");this.uiUpdateViews();this.updateProgress()}return __extends(f,r),Object.defineProperty(f.prototype,"currentDataView",{get:function(){var n=this.currentDataViewTab;return n?n.content:null},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"currentDataViewController",{get:function(){var n=this.currentDataViewTab;return n?n.controller:null},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"currentDataViewTab",{get:function(){return this._tabControl&&this._tabControl.selectedItem?this._tabControl.selectedItem:null},enumerable:!0,configurable:!0}),f.prototype.switchToDataView=function(n){var t=this._tabControl.getTab(n);t&&(t.controller.dataViewModel.filterString="");this._tabControl.selectedItem=t},f.prototype.onPropertyChanged=function(n){var i=this;switch(n){case t.LatestSnapshotErrorPropertyName:this.updateSnapshotError();break;case t.ProgressTextPropertyName:case t.ProgressValuePropertyName:this.updateProgress();break;case t.ShowBuiltInsPropertyName:this.forEachTab(function(n){n.controller.snapshotViewModel.showBuiltIns=i._model.showBuiltIns});break;case t.SnapshotPropertyName:this.uiUpdateViews();break;case t.SortPropertyPropertyName:this.updateSort();break;case t.TargetViewPropertyName:this.updateTargetView()}},f.prototype.forEachTab=function(n){for(var i,t=0;t<this._tabControl.length();t++)i=this._tabControl.getTab(t),n(i)},f.prototype.updateProgress=function(){this._model.progressText&&(this._progressText.textContent=this._model.progressText);this._model.progressValue&&(this._progressBar.value=this._model.progressValue)},f.prototype.updateTargetView=function(){var i,n,t;if(this._tabControl)for(i=this._model.targetView,n=0;n<this._tabControl.length();n++)t=this._tabControl.getTab(n),t.title===i&&(this._tabControl.selectedItem=t)},f.prototype.updateSort=function(){this.currentDataView&&this.currentDataView.sortBy(this._model.sortProperty,"desc")},f.prototype.updateSnapshotError=function(){var t=this._model.latestSnapshotError;t?(this.showProgress(!1),this._snapshotProcessingErrorMsg.innerText=n.ErrorFormatter.format(t),this._snapshotProcessingError.style.display="block"):(this._snapshotProcessingErrorMsg.innerText="",this._snapshotProcessingError.style.display="none")},f.prototype.getNewTab=function(t){return new n.SnapshotDataViewTab(this._controller.getSnapshotDataViewController(t))},f.prototype.uiUpdateViews=function(){var r=this,o,u,t,f,e;if(this.updateSnapshotError(),this._tabControl){for(t=0;t<this._tabControl.length();t++)o=this._tabControl.getTab(t);this._snapshotDataNavigation.removeChild(this._tabControl)}if(this._model.snapshot){for(this._snapshotDataNavigation.rootElement.classList.remove("snapshotDataNavigationHidden"),this.showProgress(!1),this._tabControl=new n.Controls.TabControl,this._tabControl.tabsLeftAligned=!0,this._tabControl.afterBarContainer.appendChild(this._snapshotAnalysisView.rootElement),u=Common.Enum.GetValues(n.DataViewType),t=0;t<u.length;t++)f=u[t],e=this.getNewTab(f),this._tabControl.addTab(e);this.updateTargetView();this.updateSort();this._snapshotAnalysisView.setupSettingsMenu();this._snapshotAnalysisView.onTabChanged();this._tabControl.selectedItemChanged=function(n,t){r._model.targetView=t.title;r._snapshotAnalysisView.onTabChanged();r.updateNavigationFrames()};this._snapshotDataNavigation.appendChild(this._tabControl);i.VS.Internal.CodeMarkers.fire(23589);this.updateNavigationFrames()}else this._snapshotDataNavigation.rootElement.classList.add("snapshotDataNavigationHidden"),this.showProgress(!0),n.NavigationHelpers.updateAdditionalNavigationFrames(this._controller.navigationId)},f.prototype.showProgress=function(n){n?this._snapshotProcessingProgressDiv.classList.remove("snapshotProcessingProgressDivHidden"):this._snapshotProcessingProgressDiv.classList.add("snapshotProcessingProgressDivHidden")},f.prototype.updateNavigationFrames=function(){var t=this;n.NavigationHelpers.updateAdditionalNavigationFrames(this._controller.navigationId,[Common.NavigationUtilities.makeNavigationFrameFromTarget(this._tabControl.rootElement,this.currentDataViewTab.header.rootElement),Common.NavigationUtilities.makeNavigationFrameFromCallback(this.currentDataView.navigationContainer,function(){return t.currentDataView.navigationContainer.style.display!=="none"?t.currentDataView.navigationTarget:null})])},f}(Common.Controls.Legacy.TemplateControl);n.SnapshotView=r;u=function(t){function i(i,r){t.call(this,"MemoryAnalyzer.analysisBarTemplate");this._controller=i;this.model=r;this.model.displayObjectIDs=n.Program.userSettings.displayObjectIDs;this.model.foldObjectsByDominator=n.Program.userSettings.foldObjectsByDominator;this.model.showBuiltIns=n.Program.userSettings.showBuiltIns;this.model.showNonMatchingReferences=n.Program.userSettings.showNonMatchingReferences;this._filterInput=this.getNamedControl("filterInput")}return __extends(i,t),i.prototype.setupSettingsMenu=function(){if(this.model.snapshot&&!this._settingsMenu){var n=this.getNamedControl("settingsMenuButton");this._settingsMenu=new Common.Controls.MenuControl;this._settingsMenu.menuItemsTemplateId="MemoryAnalyzer.settingsDropDownMenu";this._settingsMenu.targetButtonElement=n.rootElement;this._settingsMenu.dismissOnTargetButtonClick=!0;this.model.isDiff=this.model.snapshot.isDiff;this._settingsMenu.model=this.model;this.rootElement.appendChild(this._settingsMenu.rootElement)}},i.prototype.onTabChanged=function(){var n=this._controller.currentDataViewController;n&&(this.model.dataTabModel=n.dataViewModel)},i}(Common.TemplateControl);n.SnapshotAnalysisView=u}(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,i=function(i){function r(n){i.call(this);this._summaryViewController=n;this.title=t.Resources.getString("Summary").toLocaleUpperCase();this.tooltipString=t.Resources.getString("SummaryTabTooltip");this.content=n.view}return __extends(r,i),r.prototype.onActiveChanged=function(){this.active&&n.NavigationHelpers.switchNavigationView(this._summaryViewController.navigationId)},r}(n.Controls.TabItem);n.SummaryTab=i}(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,u=function(){function u(t,u,f){this._screenshotHeight=150;this._screenshotKeepAspectRatio=!0;this._screenshotWidth=200;this._snapshotStart=0;this._memoryAnalyzer=t;this._storageId=u;this._navigationId=n.NavigationHelpers.getNextId();this.model=new i(f);this.view=new r(this,this.model);Microsoft.VisualStudio.DiagnosticsHub.RegisterNamespace.registerFunction("MemoryAnalyzer.MemoryUsageSwimlaneFactory")}return Object.defineProperty(u.prototype,"navigationId",{get:function(){return this._navigationId},enumerable:!0,configurable:!0}),u.prototype.giveFeedback=function(){n.Program.internalFeedback.isEnabled().done(function(t){t&&n.Program.shell.save(!1).done(function(t){n.Program.internalFeedback.sendData(!0,"","","","",t)})})},u.prototype.loadExistingSnapshots=function(){var r=this,u=".snapjs"+n.SnapshotSummary.fileExtension,i=[],f=0;t.Storage.getFileList(this._storageId,1).done(function(e){e=e.filter(function(n){return n.slice(-u.length)===u});for(var o=0;o<e.length;o++)n.SnapshotSummary.load(r._storageId,e[o],function(n,t){if(i.push(t),f++,f===e.length){i=i.sort(function(n,t){return n.id-t.id});for(var r=0;r<i.length;r++)this.model.snapshotSummaryCollection.push(i[r])}}.bind(r,o),r.onSnapshotFailed.bind(r));t.VS.Internal.CodeMarkers.fire(23589);n.Program.onIdle()},this.onSnapshotFailed.bind(this))},u.prototype.save=function(){return this.model.snapshotSummaryCollection.length>0?n.Program.shell.save(!0):t.Promise.as(null)},u.prototype.startGraphCollectorSession=function(){var i=this;n.Program.shell.isGraphCollectionSupported&&(this._graphCollectorSession||(this.model.isStarting=!0,n.Program.shell.startGraphCollection().done(function(n){i._graphCollectorSession=n;i.model.graphCollectorSession=n;i.view.startGraph();i.model.isStarting=!1;i.model.isOffline=!1},function(r){i.model.isStarting=!1;n.Program.reportError(r,t.Resources.getErrorString("JSPerf.1064"))})))},u.prototype.stopGraphCollectorSession=function(){var n=this;this._graphCollectorSession&&(this.model.isStopping=!0,this.view.stopGraph(),this._graphCollectorSession.stop().done(function(){n._graphCollectorSession=null;n.model.snapshotSummaryCollection.length===0&&n.view.removeExistingGraph();n.model.isStopping=!1;n.model.isOffline=!0},function(){n.model.isStopping=!1}))},u.prototype.takeSnapshot=function(){var t=this;this.model.isTakeSnapshotEnabled&&(this._snapshotStart=Date.now(),this.model.isTakingSnapshot=!0,n.Program.traceWriter.raiseEvent(201),n.Program.shell.createSnapshot().done(function(i){var f=[u._snapshotChunkSize,t._screenshotWidth,t._screenshotHeight,t._screenshotKeepAspectRatio],r=new n.TakeSnapshotCommand(f,i.file);r.completedHandler=function(){var r,n;return t.model.snapshotSummaryCollection.length>0&&(n=t.model.snapshotSummaryCollection.getItem(t.model.snapshotSummaryCollection.length-1),n&&(r=n.snapshotFile.relativePath)),i.file.close().done(function(){return t.onSnapshotResult(i.relativePath,r)})};r.errorHandler=function(n){return i.file.close().done(function(){return t.onSnapshotFailed(n)})};t._memoryAnalyzer.callProxy(r)},this.onSnapshotFailed.bind(this)))},u.prototype.cancelPendingSnapshots=function(){this._snapshotSummaryPromise&&(this._snapshotSummaryPromise.cancel(),this._snapshotSummaryPromise=null)},u.prototype.viewSnapshot=function(i,r,u){var f=this;return new t.Promise(function(e){var o=f.getSnapshotSummary(i);o?(n.Program.traceWriter.raiseEventWithKey(205,i),f._memoryAnalyzer.showSnapshotTab(o.snapshotFile.relativePath,r,t.Resources.getString("SnapshotNumber",o.id),u).done(function(){n.Program.traceWriter.raiseEventWithKey(206,i);e(t.Resources.getString("SnapshotNumber",o.id).toLocaleUpperCase())})):e("")})},u.prototype.compareSnapshots=function(i,r,u,f){var c=i*1e6+r,l,s,h,e;n.Program.traceWriter.raiseEventWithKey(203,c);i<r&&(l=i,i=r,r=l);var o=[],a=this.getSnapshotSummary(i),v=this.getSnapshotSummary(r);if(a&&v){for(e=0;e<this.model.snapshotSummaryCollection.length;e++)s=this.model.snapshotSummaryCollection.getItem(e),s.taken>=v.taken&&s.taken<=a.taken&&o.push(s);o=o.sort(function(n,t){return n.taken-t.taken})}for(h=[],e=0;e<o.length;e++)h.push(o[e].snapshotFile.relativePath);this._memoryAnalyzer.showDiffSnapshotTab(h,u,t.Resources.getString("SnapshotNumberDiff",i,r),r,i,f).done(function(){n.Program.traceWriter.raiseEventWithKey(204,c)})},u.prototype.setScreenshotSize=function(n,t,i){this._screenshotWidth=n;this._screenshotHeight=t;this._screenshotKeepAspectRatio=i},u.prototype.createTileView=function(t){var i=new n.SnapshotTileViewModel(t,this.model.snapshotSummaryCollection);return new n.SnapshotTileView(this,i)},u.prototype.reset=function(){u._nextIdentifier=0;this.model.snapshotSummaryCollection.clear();n.Program.onIdle()},u.prototype.removeExistingGraph=function(){this.view.removeExistingGraph()},u.prototype.getSnapshotSummary=function(n){for(var i,r=null,t=0;t<this.model.snapshotSummaryCollection.length;t++)if(i=this.model.snapshotSummaryCollection.getItem(t),i.id===n){r=i;break}return r},u.prototype.onSnapshotResult=function(t,i){var r=this,f=(new Date).getTime(),e=n.Program.shell.getSnapshotFullPath(this._storageId,t),u;i&&(u=n.Program.shell.getSnapshotFullPath(this._storageId,i));this._snapshotSummaryPromise=n.Program.memoryAnalyzerData.processSnapshotSummary(e,u).then(function(n){r._snapshotSummaryPromise=null;r.onSnapshotCompleted(t,n,f)},function(n){r._snapshotSummaryPromise=null;r.onSnapshotFailed(n)})},u.prototype.onSnapshotCompleted=function(i,r,f){if(!r)throw new Error(t.Resources.getErrorString("JSPerf.1014"));var o=++u._nextIdentifier,e=new n.SnapshotSummary(r,new n.SnapshotFile(this._storageId,i),f,o);this.model.snapshotSummaryCollection.push(e);this.model.isTakingSnapshot=!1;window.console&&window.console.log&&window.console.log("Snapshot taken: "+e.objectsCount+" objects.");e.save(function(){Notifications.notify(n.MemoryNotifications.OnSnapshotProcessingCompleted,e);t.VS.Internal.CodeMarkers.fire(23590);n.Program.traceWriter.raiseEvent(202)},this.onSnapshotFailed.bind(this));this._snapshotStart!=0&&(n.Telemetry.analytics.log(n.Telemetry.EventName.SNAPSHOT_END,{Duration:Date.now()-this._snapshotStart}),this._snapshotStart=0)},u.prototype.onSnapshotFailed=function(i){if(!i)throw new Error(t.Resources.getErrorString("JSPerf.1015"));i.message=t.Resources.getString("SnapshotCreationFailed",i.message);this.model.latestSnapshotError=i;this.model.isTakingSnapshot=!1;n.Program.onIdle()},u._nextIdentifier=0,u._snapshotChunkSize=32768,u}(),i,r;n.SummaryViewController=u;i=function(t){function i(n){t.call(this);this.isOffline=n;this._snapshotSummaryCollection=new Common.ObservableCollection;this._snapshotSummaryCollection.propertyChanged.addHandler(this.onPropertyChanged.bind(this));this.propertyChanged.addHandler(this.onPropertyChanged.bind(this))}return __extends(i,t),Object.defineProperty(i.prototype,"isOpenSessionEnabled",{get:function(){return n.Program.packager!==null&&!this.isStarting&&this.isOffline&&this.isTargetCompatible&&this.isAttached&&this.isRunning},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isSaveSessionEnabled",{get:function(){return this._snapshotSummaryCollection.length>0&&n.Program.packager!==null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isStartEnabled",{get:function(){return!this.isStarting&&this.isOffline&&this.isTargetCompatible&&this.isAttached&&this.isRunning},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isStopEnabled",{get:function(){return!this.isStopping&&!this.isOffline&&this.isAttached&&this.isRunning},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isTakeSnapshotEnabled",{get:function(){return!this.isOffline&&this.isAttached&&this.isRunning&&!this.isTakingSnapshot&&this.isTargetCompatible},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"snapshotSummaryCollection",{get:function(){return this._snapshotSummaryCollection},enumerable:!0,configurable:!0}),i.initialize=function(){Common.ObservableHelpers.defineProperty(i,i.IsActivatedPropertyName,!1);Common.ObservableHelpers.defineProperty(i,i.IsAttachedPropertyName,!1);Common.ObservableHelpers.defineProperty(i,i.IsOfflinePropertyName,!0,function(n){n.onIsOfflineChanged()});Common.ObservableHelpers.defineProperty(i,i.IsRunningPropertyName,!0);Common.ObservableHelpers.defineProperty(i,i.IsStartingPropertyName,!1);Common.ObservableHelpers.defineProperty(i,i.IsStartProfilingPromptVisiblePropertyName,!0);Common.ObservableHelpers.defineProperty(i,i.IsStoppingPropertyName,!1);Common.ObservableHelpers.defineProperty(i,i.IsTakingSnapshotPropertyName,!1);Common.ObservableHelpers.defineProperty(i,i.IsTargetCompatiblePropertyName,!0);Common.ObservableHelpers.defineProperty(i,i.WarningMessagePropertyName,"");Common.ObservableHelpers.defineProperty(i,i.LatestSnapshotErrorPropertyName,null)},i.prototype.onIsOfflineChanged=function(){this.isOffline&&(this.isTakingSnapshot=!1)},i.prototype.onPropertyChanged=function(n){switch(n){case i.IsAttachedPropertyName:case i.IsOfflinePropertyName:case i.IsRunningPropertyName:case i.IsStartingPropertyName:case i.IsTargetCompatiblePropertyName:this.propertyChanged.invoke(i.StartProfilingEnabledPropertyName)}switch(n){case i.IsAttachedPropertyName:case i.IsOfflinePropertyName:case i.IsRunningPropertyName:case i.IsStoppingPropertyName:this.propertyChanged.invoke(i.StopProfilingEnabledPropertyName)}switch(n){case i.IsAttachedPropertyName:case i.IsOfflinePropertyName:case i.IsRunningPropertyName:case i.IsStartingPropertyName:case i.IsTargetCompatiblePropertyName:this.propertyChanged.invoke(i.OpenSessionEnabledPropertyName)}switch(n){case Common.ObservableCollection.LengthProperty:this.propertyChanged.invoke(i.SaveSessionEnabledPropertyName)}switch(n){case i.IsAttachedPropertyName:case i.IsOfflinePropertyName:case i.IsRunningPropertyName:case i.IsTakingSnapshotPropertyName:case i.IsTargetCompatiblePropertyName:this.propertyChanged.invoke(i.TakeSnapshotEnabledPropertyName)}},i.IsActivatedPropertyName="isActivated",i.IsAttachedPropertyName="isAttached",i.IsOfflinePropertyName="isOffline",i.IsRunningPropertyName="isRunning",i.IsStartingPropertyName="isStarting",i.IsStartProfilingPromptVisiblePropertyName="isStartProfilingPromptVisible",i.IsStoppingPropertyName="isStopping",i.IsTakingSnapshotPropertyName="isTakingSnapshot",i.IsTargetCompatiblePropertyName="isTargetCompatible",i.LatestSnapshotErrorPropertyName="latestSnapshotError",i.OpenSessionEnabledPropertyName="isOpenSessionEnabled",i.SaveSessionEnabledPropertyName="isSaveSessionEnabled",i.StartProfilingEnabledPropertyName="isStartEnabled",i.StopProfilingEnabledPropertyName="isStopEnabled",i.TakeSnapshotEnabledPropertyName="isTakeSnapshotEnabled",i.WarningMessagePropertyName="warningMessage",i}(Common.Observable);n.SummaryViewModel=i;i.initialize();r=function(r){function u(i,u){var o=this,f,e;r.call(this,"SummaryTabTemplate");this._graphUpdateDelayMilliseconds=100;this._screenshotWidth=280;this._screenshotHeight=160;this._screenshotKeepAspectRatio=!0;this._controller=i;this._model=u;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);f=this.findElement("giveFeedbackButton_Summary");f.classList.add("hidden");n.Program.internalFeedback.isEnabled().done(function(n){n&&(f.classList.remove("hidden"),f.addEventListener("click",o.onGiveFeedbackClick.bind(o)))});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");e=t.Resources.getString("TakeSnapshot");n.Program.hostType===1&&(e+="<br>"+t.Resources.getString("TakeSnapshotShortcut"));this._snapshotLabel.innerHTML=e;this._snapshotProgress.innerText=t.Resources.getString("Loading");this.toggleProgress(this._model.isTakingSnapshot);this.toggleAttached(this._model.isAttached);this.updateTakeSnapshotTile();this._snapshotTile.addEventListener("click",this._onSnapshotClickHandler);this._model.isOffline?this._takeSnapshotTile.style.display="none":this.updateNavigationTarget(this._snapshotTile);this._controller.setScreenshotSize(this._screenshotWidth,this._screenshotHeight,this._screenshotKeepAspectRatio)}return __extends(u,r),Object.defineProperty(u.prototype,"model",{get:function(){return this._model},enumerable:!0,configurable:!0}),u.prototype.addRulerMark=function(n,t){this._graphRenderer&&this._graphRenderer.ruler.addMark(Microsoft.VisualStudio.DiagnosticsHub.MarkType.UserMark,n,t)},u.prototype.refreshGraph=function(){this._graphRenderer&&this._graphRenderer.onResize()},u.prototype.removeExistingGraph=function(){this._graphRenderer&&(this._graphRenderer.dispose(),this._graphRenderer=null,this._graphResizeCompleted=!1);this._heapGraphContainer.innerHTML="";this._heapGraphContainer.style.display="none"},u.prototype.startGraph=function(){var i=this,r=t.F12.getQpcTime(),f=t.F12.getQpcFrequency();this.removeExistingGraph();var h={GraphBehaviour:Microsoft.VisualStudio.DiagnosticsHub.GraphBehaviourType.Live,Series:[],MinValue:0,MaxValue:100,Units:[{Unit:t.Resources.getString("/Common/ByteUnits"),LowerBound:Number.MIN_VALUE,Divider:1,Decimals:1},{Unit:t.Resources.getString("/Common/KilobyteUnits"),LowerBound:1024,Divider:1024,Decimals:1},{Unit:t.Resources.getString("/Common/MegabyteUnits"),LowerBound:1048576,Divider:1048576,Decimals:1},{Unit:t.Resources.getString("/Common/GigabyteUnits"),LowerBound:1073741824,Divider:1073741824,Decimals:1}]},c={View:"Ruler",Series:[{MarkType:Microsoft.VisualStudio.DiagnosticsHub.MarkType.UserMark,Legend:"",DataSource:{CounterId:u.ProfilerMarkCounterId}}],MinValue:undefined,MaxValue:undefined,Unit:undefined,Units:undefined,Axes:undefined},e={Id:"",Title:t.Resources.getString("GraphTitle"),Description:t.Resources.getString("GraphTitle")+", "+t.Resources.getString("HubGraphHeapLegend"),JsonConfiguration:JSON.stringify(h),Resources:{CPU_Legend:t.Resources.getString("GraphTitle"),CPU_LegendTooltip:t.Resources.getString("GraphTitle")+", "+t.Resources.getString("HubGraphHeapLegend")},JavaScriptFactoryFunction:"MemoryAnalyzer.MemoryUsageSwimlaneFactory",View:this,Type:3},o={Id:"",Title:"None",Description:"None",JsonConfiguration:JSON.stringify(c),Resources:{None:""}},s=Microsoft.VisualStudio.DiagnosticsHub.BigNumber.convertFromNumber(r),p={GraphConfigurations:[e,o],QpcTimeProperties:{CollectionStartTimeH:s.jsonValue.h,CollectionStartTimeL:s.jsonValue.l,Frequency:f}},l={sessionId:"00000000-0000-0000-0000-000000000001",analyzers:[],dataSources:[],symbolCachePath:"",symbolStorePath:""},a=new n.QpcTimeProperties(Microsoft.VisualStudio.DiagnosticsHub.BigNumber.convertFromNumber(r),f),v={getConfigurations:function(n){n([e,o],l)},dataUpdate:function(n){i._graphUpdateIntervalId=window.setInterval(function(){var i=a.convertQpcTimestampToNanoseconds(Microsoft.VisualStudio.DiagnosticsHub.BigNumber.convertFromNumber(t.F12.getQpcTime()));n(i.jsonValue)},i._graphUpdateDelayMilliseconds)}},y={isToolbarRequired:!1,isSelectionEnabled:!1,dataManager:v,containerId:this._heapGraphContainer.id,collectorTimeService:null,isLive:!0,timeInNsPerPixel:2e8};this._graphRenderer=new Microsoft.VisualStudio.DiagnosticsHub.Renderer(y);this._heapGraphContainer.style.display="-ms-grid"},u.prototype.stopGraph=function(){window.clearInterval(this._graphUpdateIntervalId)},u.prototype.onPropertyChanged=function(n){switch(n){case i.WarningMessagePropertyName:this.showWarningMessage(this._model.warningMessage);break;case i.LatestSnapshotErrorPropertyName:this.showSnapshotError(this._model.latestSnapshotError);break;case i.IsTakingSnapshotPropertyName:this.toggleProgress(this._model.isTakingSnapshot);this.updateTakeSnapshotTile();break;case i.IsAttachedPropertyName:case i.IsTargetCompatiblePropertyName:this.toggleAttached(this._model.isAttached);this.updateTakeSnapshotTile();break;case i.IsRunningPropertyName:this.toggleRunning(this._model.isOffline,this._model.isAttached,this._model.isRunning);this.updateTakeSnapshotTile();break;case i.IsOfflinePropertyName:this.toggleOffline(this._model.isOffline,this._model.isAttached,this._model.isRunning);this.updateTakeSnapshotTile()}},u.prototype.onCollectionChanged=function(n){switch(n.action){case 0:this.createTile(n.newItems[0]);break;case 3:this.removeSnapshotTiles()}},u.prototype.onGiveFeedbackClick=function(){this._controller.giveFeedback()},u.prototype.createTile=function(n){var t=this._controller.createTileView(n);this._tilesContainer.insertBefore(t.rootElement,this._takeSnapshotTile);t.rootElement.scrollIntoView(!0);t.setFocus();this.updateNavigationTarget(t.navigationElement)},u.prototype.removeSnapshotTiles=function(){while(this._tilesContainer.hasChildNodes())this._tilesContainer.removeChild(this._tilesContainer.firstChild);this._tilesContainer.appendChild(this._takeSnapshotTile);this.updateNavigationTarget(this._snapshotTile)},u.prototype.toggleAttached=function(n){n||this._controller.cancelPendingSnapshots()},u.prototype.toggleOffline=function(n){this._takeSnapshotTile.style.display=n?"none":"block"},u.prototype.toggleProgress=function(n){this._snapshotProgress&&this._snapshotError&&(n?(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",t.Resources.getString("Loading"))):(this._snapshotLabel.style.display="",this._snapshotIcon.style.display="",this._snapshotProgress.style.display="none",this._snapshotTile.setAttribute("aria-label",t.Resources.getString("TakeSnapshot"))))},u.prototype.toggleRunning=function(n,t,i){!n&&t&&i?this._controller.startGraphCollectorSession():this._controller.stopGraphCollectorSession()},u.prototype.showSnapshotError=function(t){this._snapshotErrorMsg&&this._snapshotError&&(t?(this._snapshotErrorMsg.innerText=n.ErrorFormatter.format(t),this._snapshotError.style.display="block"):(this._snapshotErrorMsg.innerText="",this._snapshotError.style.display="none"))},u.prototype.showWarningMessage=function(n){this._warningSection&&(n?(this._warningSection.innerHTML=n,this._warningSection.style.display="inline"):(this._warningSection.innerHTML="",this._warningSection.style.display="none"))},u.prototype.onSnapshotClick=function(){n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.TAKE_SNAPSHOT_TILE,0);this._controller.takeSnapshot()},u.prototype.updateTakeSnapshotTile=function(){this._snapshotTile&&(this._model.isTakeSnapshotEnabled?(this._snapshotTile.classList.remove("disabled"),this._snapshotTile.disabled=!1):this._model.isTakingSnapshot||(this._snapshotTile.classList.add("disabled"),this._snapshotTile.disabled=!0))},u.prototype.updateNavigationTarget=function(t){var i=this;n.NavigationHelpers.updateAdditionalNavigationFrames(this._controller.navigationId,[Common.NavigationUtilities.makeNavigationFrameFromCallback(this._tilesContainer,function(){return t===i._snapshotTile&&i._snapshotProgress.style.display!=="none"?null:t})])},u.PrivateBytesCounterId="PrivateBytes",u.ProfilerMarkCounterId="performancemark",u}(Common.Controls.Legacy.TemplateControl);n.SummaryView=r}(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";function f(){t.F12?n.analytics=new Common.F12AnalyticsProxy(Common.ToolName.MEMORY):t.VS&&(n.analytics=new Common.VsAnalyticsProxy("Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Package.Extensions.MemoryTelemetry",Common.ToolName.MEMORY))}var t=Microsoft.Plugin,i,r,u;n.analytics=new Common.DoNothingAnalyticsProxy;i=function(){function n(){}return n.SNAPSHOT_END="SnapshotEnd",n}();n.EventName=i;r=function(){function n(){}return n.START_PROFILE="StartProfile",n.STOP_PROFILE="StopProfile",n.IMPORT_SESSION="ImportSession",n.EXPORT_SESSION="ExportSession",n.TAKE_SNAPSHOT="TakeSnapShot",n.TAKE_SNAPSHOT_TILE="TakeSnapShotTile",n.CLICK_SUMMARY="ClickSummary",n.CLICK_SHOT="ClickSnapShot",n.CLICK_SHOT_DIFF="ClickSnapShotDiff",n.TYPE_VIEW="TypeView",n.ROOT_VIEW="RootView",n.DOMINATOR_VIEW="DominatorView",n.IDENTIFIER_FILTER="IdentifierFilter",n.SHOW_BUILT_INS="ShowBuiltIns",n.DISPLAY_OBJECT_IDS="DisplayObjectIds",n.FOLD_BY_DOMINATOR="FoldByDominator",n.SCOPE_FILTER="ScopeFilter",n}();n.CommandName=r;u=function(){function n(){}return n.SUMMARY="SUMMARY",n.SNAPSHOT="SNAPSHOT",n.TYPES="Types",n.ROOTS="Roots",n.DOMINATORS="Dominators",n}();n.Keyword=u;n.initializeAnalytics=f})(t=n.Telemetry||(n.Telemetry={}))})(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";(function(n){n[n.perfBrowserTools_MemoryAnalyzerViewLoaded=23589]="perfBrowserTools_MemoryAnalyzerViewLoaded";n[n.perfBrowserTools_MemoryAnalyzerIdle=23590]="perfBrowserTools_MemoryAnalyzerIdle";n[n.perfBrowserTools_MemoryAnalyzerWindowClose=23591]="perfBrowserTools_MemoryAnalyzerWindowClose";n[n.perfBrowserTools_MemoryAnalyzerSessionEnd=23592]="perfBrowserTools_MemoryAnalyzerSessionEnd"})(n.CodeMarkerValues||(n.CodeMarkerValues={}));var t=n.CodeMarkerValues})(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(){}return n.DetailsViewRowSelected="MemoryNotifications.DetailsViewRowSelected",n.Idle="MemoryNotifications.Idle",n.OnSnapshotProcessingCompleted="MemoryNotifications.OnSnapshotProcessingCompleted",n.SessionEnd="MemoryNotifications.SessionEnd",n.SessionLoadCompleted="MemoryNotifications.SessionLoadCompleted",n.SessionSaveCompleted="MemoryNotifications.SessionSaveCompleted",n.SnapshotDataViewReady="MemoryNotifications.SnapshotDataViewReady",n.WindowClose="MemoryNotifications.WindowClose",n}();n.MemoryNotifications=t})(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(n,i){var r=this;this._callbacks={};this._pendingMessages=[];this._pendingTimeout=null;this._listeningToMessages=!0;this._diagnosticSession=i;n||(this.DiagnosticSession.addEventListener("activated",this.onActivate.bind(this)),this.DiagnosticSession.addEventListener("deactivated",this.onDeactivate.bind(this)),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(){r._isAttached||r.DiagnosticSession.isAttached().done(function(n){n?r.onAttachCallback():r.showWarning(t.Resources.getString("WarningNotAttached"))},function(){r.showWarning(t.Resources.getString("WarningNotAttached"))})}))}return Object.defineProperty(n.prototype,"DiagnosticSession",{get:function(){return this._diagnosticSession},enumerable:!0,configurable:!0}),n.prototype.onActivate=function(){},n.prototype.onDeactivate=function(){},n.prototype.onAttach=function(){},n.prototype.onDetach=function(){},n.prototype.onBreak=function(){},n.prototype.onRun=function(){},n.prototype.onConnect=function(){},n.prototype.onMessage=function(){},n.prototype.onHandshake=function(){},n.prototype.showWarning=function(){},n.prototype.callProxy=function(t){var i=this,e=n.getUid(),r,u,o,f,s,h;if(t.executedHandler&&(this._callbacks[e]={command:t,callback:t.executedHandler,deleteAfterCallback:!0}),r=[],t.args)for(u=0;u<t.args.length;u++)o=t.args[u],r.push(o);t.dataReceivedHandler&&(f=n.getUid(),this._callbacks[f]={command:t,callback:t.dataReceivedHandler,deleteAfterCallback:!1},r.push({uid:f,type:"callback"}));s={uid:e,command:t.name,args:r};h=function(n){i._remotePort&&i._remotePort.postMessage(n)};this._pendingMessages.push(s);this._pendingTimeout||(this._pendingTimeout=window.setImmediate(function(){var n=JSON.stringify(i._pendingMessages);i._pendingMessages=[];i._pendingTimeout=null;h(n)}))},n.prototype.startListeningToMessages=function(){this._listeningToMessages=!0},n.prototype.stopListeningToMessages=function(){this._listeningToMessages=!1},n.getUid=function(){return"uid"+(n._uid++).toString(36)},n.prototype.fireCallbacks=function(n){for(var i,r,f=JSON.parse(n),u=0;u<f.length;u++)i=f[u],r=this._callbacks[i.uid],r?(i.args!==undefined&&r.callback.apply(this,i.args),(r.deleteAfterCallback||r.command.hasCompleted)&&delete this._callbacks[i.uid]):i.uid==="scriptError"&&t.Diagnostics.reportError(i.args[0].message,i.args[0].file,i.args[0].line,i.args[0].additionalInfo)},n.prototype.onAttachCallback=function(){this._isAttached||(this._isAttached=!0,this.showWarning(null),this.onAttach())},n.prototype.onDetachCallback=function(){this._remotePort=null;this._callbacks={};this._pendingMessages=[];this._pendingTimeout=null;this._isAttached=!1;this.showWarning(t.Resources.getString("WarningNotAttached"));this.onDetach()},n.prototype.onBreakCallback=function(){this.onBreak()},n.prototype.onRunCallback=function(){this.onRun()},n.prototype.onMessageCallback=function(n){var i=this,t=n.data,r=this.processHandshakeMessage(t);if(this._listeningToMessages){t==="DocumentNotYetReady"?window.setTimeout(function(){i._remotePort.postMessage("InitializeDocument")},100):r||this.fireCallbacks(t);this.onMessage(t)}},n.prototype.onConnectCallback=function(n){this._remotePort=n;this._remotePort.addEventListener("message",this.onMessageCallback.bind(this));this.onConnect(n)},n.prototype.processHandshakeMessage=function(n){if(n.substr(0,10)==="Handshake:"){var t=JSON.parse(n.substring(10));this.onHandshake(t);return!0}return!1},n._uid=0,n}();n.DiagnosticsToolWindowController=i})(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,r=Microsoft.VisualStudio.DiagnosticsHub,u=function(u){function f(n,t){this._telemetryLoadStartTime=Date.now();u.call(this,n.isOffline,t);this.setSession(n)}return __extends(f,u),Object.defineProperty(f.prototype,"summaryViewController",{get:function(){return this._summaryViewController},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"view",{get:function(){return this._view},enumerable:!0,configurable:!0}),f.prototype.clearSummaryTab=function(){this._summaryViewController.reset()},f.prototype.goOffline=function(){this._summaryViewController.model.isOffline||(this.stopListeningToMessages(),this._summaryViewController.stopGraphCollectorSession())},f.prototype.goOnline=function(){this._summaryViewController.model.isOffline&&(this.startListeningToMessages(),this._summaryViewController.startGraphCollectorSession())},f.prototype.removeExistingGraph=function(){this._summaryViewController.removeExistingGraph()},f.prototype.setSession=function(t){var f=t.isOffline,e=!!this._summaryViewController,o,s,h,c,u;e&&(o=this._summaryViewController.model.isAttached,s=this._summaryViewController.model.isRunning,h=this._summaryViewController.model.isTakingSnapshot,c=this._summaryViewController.model.isTargetCompatible);this._summaryViewController=new n.SummaryViewController(this,t.storageId,f);f?(this._view=new n.SummaryTab(this.summaryViewController),this.summaryViewController.loadExistingSnapshots()):(this._view=new i(this),this.initCommands(),u=r.getCurrentSession(),u&&u.addStateChangedEventListener(this.onDiagnosticsHubStateChanged.bind(this,u)));e&&(this._summaryViewController.model.isAttached=o,this._summaryViewController.model.isRunning=s,this._summaryViewController.model.isTakingSnapshot=h,this._summaryViewController.model.isTargetCompatible=c)},f.prototype.takeSnapshot=function(){this._summaryViewController.takeSnapshot()},f.prototype.showWarning=function(n){this._summaryViewController.model.warningMessage=n},f.prototype.onActivate=function(){this._summaryViewController.model.isActivated=!0},f.prototype.onDeactivate=function(){this._summaryViewController.model.isActivated=!1},f.prototype.onAttach=function(){this.DiagnosticSession.loadScriptInProc("../Common/PerfRemoteHelpers.js");this.DiagnosticSession.loadScriptInProc("Remote.js")},f.prototype.onDetach=function(){this._summaryViewController.model.isAttached=!1;this.goOffline()},f.prototype.onBreak=function(){this._summaryViewController.model.isRunning=!1},f.prototype.onRun=function(){this._summaryViewController.model.isRunning=!0},f.prototype.onHandshake=function(t){var i,r;this._summaryViewController.model.isAttached=!0;t.docMode<Common.Constants.MINIMUM_REQUIRED_DOCUMENT_MODE?(this._summaryViewController.model.isOffline||this.showWarning(n.Program.shell.getHostSpecificString("WarningIncompatibleStandardsMode")),this._summaryViewController.model.isTargetCompatible=!1):(n.Program.traceWriter.raiseEvent(211),this._summaryViewController.model.isOffline||this.showWarning(null),this._summaryViewController.model.isTargetCompatible=!0,this._summaryViewController.model.isTakingSnapshot=!1,this._summaryViewController.model.isOffline?this._summaryViewController.model.snapshotSummaryCollection.length===0&&(this._summaryViewController.reset(),n.Program.shell.closeAllSnapshots(),n.Program.shell.resetView()):(n.Program.shell.closeAllSnapshots(),this._summaryViewController.reset()),i=new n.RegisterConsoleCallbacksCommand(this.consoleNotifyCallback),this.callProxy(i),n.Program.traceWriter.raiseEvent(212),r={toolName:Common.ToolName.MEMORY,durationMs:Date.now()-this._telemetryLoadStartTime},n.Telemetry.analytics.log(Common.TelemetryEventName.TOOL_LOADED,r,2))},f.prototype.showSnapshotTab=function(i,r,u,f){return i?n.Program.shell.openSnapshot(i,r,u,f):t.Promise.as(null)},f.prototype.showDiffSnapshotTab=function(i,r,u,f,e,o){return!i||i.length<2?t.Promise.as(null):n.Program.shell.openSnapshotDiff(i,r,u,f,e,o)},f.prototype.updateCommandState=function(){t.VS&&t.VS.Commands&&t.VS.Commands.setStates({command:this._takeSnapshotCommand,enabled:this.canTakeSnapshot(),visible:this.canShowTakeSnapshot()})},f.prototype.consoleNotifyCallback=function(n){if(this.summaryViewController.model.isTargetCompatible){var t=n.notifyType,i=n.message;t==="takeHeapSnapshot"&&this.takeSnapshot()}},f.prototype.canTakeSnapshot=function(){var n=this._summaryViewController.model;return n.isAttached&&n.isRunning&&!n.isTakingSnapshot&&!n.isOffline},f.prototype.canShowTakeSnapshot=function(){var n=this._summaryViewController.model;return n.isAttached&&n.isRunning&&!n.isOffline},f.prototype.initCommands=function(){t.VS&&t.VS.Commands&&(this._takeSnapshotCommand=t.VS.Commands.bindCommand({name:"takesnapshotcommand",onexecute:this.onTakeSnapshotCommand.bind(this),enabled:this.canTakeSnapshot(),visible:this.canShowTakeSnapshot()}))},f.prototype.onDiagnosticsHubStateChanged=function(t,i){if(i.previousState===300&&i.currentState===400){t.removeStateChangedEventListener(this.onDiagnosticsHubStateChanged.bind(this,t));var u=i.getDeferral(),r=function(){Notifications.notify(n.MemoryNotifications.SessionEnd);n.Program.fireCodeMarker(23592);u.complete()};this._summaryViewController.save().done(r,r)}},f.prototype.onTakeSnapshotCommand=function(){this.takeSnapshot()},f}(n.DiagnosticsToolWindowController),i;n.MemoryAnalyzerController=u;i=function(i){function r(r){i.call(this);this._controller=r;this.title=t.Resources.getString("Summary").toLocaleUpperCase();this.tooltipString=t.Resources.getString("SummaryTabTooltip");this.content=new n.SummaryTab(this._controller.summaryViewController);this._controller.summaryViewController.model.propertyChanged.addHandler(this.onPropertyChanged.bind(this))}return __extends(r,i),r.prototype.onActiveChanged=function(){if(this.active){var t=this._controller.summaryViewController.view;t&&t.refreshGraph();n.NavigationHelpers.switchNavigationView(this._controller.summaryViewController.navigationId)}},r.prototype.onPropertyChanged=function(t){var i=this._controller.summaryViewController.model;switch(t){case n.SummaryViewModel.IsTakingSnapshotPropertyName:case n.SummaryViewModel.IsAttachedPropertyName:case n.SummaryViewModel.IsRunningPropertyName:case n.SummaryViewModel.IsOfflinePropertyName:this._controller.updateCommandState()}},r}(n.Controls.TabItem);n.MemoryAnalyzerView=i}(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,u,i,r;(function(n){n[n.ObjectsLeftFromPreviousSnapshot=0]="ObjectsLeftFromPreviousSnapshot";n[n.ObjectsAddedBetweenSnapshots=1]="ObjectsAddedBetweenSnapshots";n[n.AllObjects=2]="AllObjects"})(n.ScopeFilter||(n.ScopeFilter={}));u=n.ScopeFilter;i=function(){function n(n){if(this._proxy=n,!this._proxy)throw new Error(t.Resources.getErrorString("JSPerf.1065"))}return n.GetErrorFromHr=function(n){n<0&&(n=4294967295+n+1);switch(n){case 2147942414:case 2306408456:return new Error(t.Resources.getString("ERRoutOfMemory"));case 2306408449:return new Error(t.Resources.getString("ERRbadHexDigit"));case 2306408450:return new Error(t.Resources.getString("ERRbadNumber"));case 2306408451:return new Error(t.Resources.getString("ERRillegalChar"));case 2306408453:return new Error(t.Resources.getString("ERRnoColon"));case 2306408454:return new Error(t.Resources.getString("ERRnoRbrack"));case 2306408455:return new Error(t.Resources.getString("ERRnoRcurly"));case 2306408457:return new Error(t.Resources.getString("ERRnoStrEnd"));case 2306408458:return new Error(t.Resources.getString("ERRsyntax"));case 2306408460:return new Error(t.Resources.getString("ERRmissingObjectId"));case 2306408461:return new Error(t.Resources.getString("ERRinvalidObjectID"))}return new Error(t.Resources.getString("ERRunknownError","0x"+n.toString(16).toUpperCase()))},n.prototype.processSnapshotSummary=function(i,r){var u=this;return r===void 0&&(r=""),new t.Promise(function(t,f){u._proxy.processSnapshotSummary(i,r,function(n){t(n)},function(t){f&&f(n.GetErrorFromHr(t))},function(){})})},n.prototype.processSnapshot=function(i){var u=this;return new t.Promise(function(t,f,e){u._proxy.processSnapshot(i,function(n){t(new r(n))},function(t){f&&f(n.GetErrorFromHr(t))},function(n){e&&e(n)})})},n.prototype.processSnapshotDiff=function(i){var u=this;return new t.Promise(function(t,f,e){u._proxy.processSnapshotDiff(i,function(n){t(new r(n))},function(t){f&&f(n.GetErrorFromHr(t))},function(n){e&&e(n)})})},n}();n.MemoryAnalyzerData=i;r=function(){function n(n){if(this._heapObjectCache={},this._proxy=n,!this._proxy)throw new Error(t.Resources.getErrorString("JSPerf.1066"))}return n.prototype.getChildrenForObject=function(n,t,i,r,u,f){t===void 0&&(t=0);i===void 0&&(i=-1);r===void 0&&(r=2);f=this.getFilter(f);var e=this._proxy.getChildrenForObject(n,t,i,r,u,f);return this.performObjectCaching(e),e},n.prototype.getDominators=function(n,r,u,f,e){var o=this,s;return n===void 0&&(n=0),r===void 0&&(r=-1),u===void 0&&(u=""),f===void 0&&(f=2),new t.Promise(function(t,h){s=o._proxy.getDominators(n,r,u,f,e,function(n){o.performObjectCaching(n);t(n)},function(n){h&&h(i.GetErrorFromHr(n))})},function(){typeof s!="undefined"&&o._proxy.cancelRequest(s)})},n.prototype.getObjectsByType=function(n,t,i,r,u){t===void 0&&(t=0);i===void 0&&(i=-1);r===void 0&&(r=2);u=this.getFilter(u);var f=this._proxy.getObjectsByType(n,t,i,r,u);return this.performObjectCaching(f),f},n.prototype.getPathToDominator=function(n,t,i){return t===void 0&&(t=2),i=this.getFilter(i),this._proxy.getPathToDominator(n,t,i)},n.prototype.getPathToRoot=function(n,t,i){return t===void 0&&(t=0),i=this.getFilter(i),this._proxy.getPathToRoot(n,t,i)},n.prototype.getRootObjects=function(n,t){t=this.getFilter(t);var i=this._proxy.getRootObjects(n,t);return this.performObjectCaching(i),i},n.prototype.getTypes=function(n,r,u){var e=this,f;return n===void 0&&(n=""),r===void 0&&(r=2),u=this.getFilter(u),new t.Promise(function(t,o){f=e._proxy.getTypes(n,r,u,function(n){t(n)},function(n){o&&o(i.GetErrorFromHr(n))})},function(){typeof f!="undefined"&&e._proxy.cancelRequest(f)})},n.prototype.getRetainedDescendants=function(n,t,i,r,u){t===void 0&&(t=0);i===void 0&&(i=-1);r===void 0&&(r=2);u=this.getFilter(u);var f=this._proxy.getRetainedDescendants(n,t,i,r,u);return this.performObjectCaching(f),f},n.prototype.getReferenceTreeItems=function(n,t,i,r){var u=this._proxy.getReferenceTreeItems(n,t,i||0,r);return this.performObjectCaching(u),u},n.prototype.hasDetachedDomNodes=function(){return this._proxy.hasDetachedDomNodes()},n.prototype.getSnapshotDiffStats=function(){return this._proxy.getSnapshotDiffStats()},n.prototype.getUidChain=function(n){return this._proxy.getUidChain(n)},n.prototype.getFilter=function(n){var t={};return n=n||{},t.foldObjectsByDominator=n.foldObjectsByDominator||!1,t.showNonMatchingReferences=n.showNonMatchingReferences||!1,t.showBuiltIns=n.showBuiltIns||!1,t.showUnknownSizes=n.showUnknownSizes||!1,t.showUnknownTypes=n.showUnknownTypes||!1,t},n.prototype.performObjectCaching=function(n){var i=n.result,r,t,u;if(i&&i.length>0)for(r=0;r<i.length;r++)t=i[r],typeof t.object!="undefined"?(u=t.object,this._heapObjectCache[u.objectId]=u):typeof t.objectId!="undefined"&&(t.object=this._heapObjectCache[t.objectId])},n}();n.SnapshotData=r})(t=n.Data||(n.Data={}))})(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(n){this.session=n}return n.prototype.createSnapshot=function(){var n=this;return new t.Promise(function(i,r){n.session.getSessionInfo().then(function(u){var f=n.session.getNewSnapshotRelativePath(),e=u.storageId+"\\"+f;return t.Storage.openFile(e,{access:2,encoding:"UTF-8",mode:6,persistence:1,type:1}).then(function(n){i({file:n,relativePath:f})},function(n){r&&r(n)})},function(n){r&&r(n)})})},n.prototype.save=function(n){return this.session.save(n)},n}();n.MemoryAnalyzerShell=i})(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,f=function(f){function e(n,t){f.call(this,n);this.session.addViewTypeEventListener(this.onViewTypeChange.bind(this));this._sessionInfo=t;this._hostShell=new Common.Extensions.HostShellProxy}return __extends(e,f),Object.defineProperty(e.prototype,"controller",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hostShell",{get:function(){return this._hostShell},enumerable:!0,configurable:!0}),e.prototype.changeSession=function(){},e.prototype.closeAllSnapshots=function(){return t.Promise.as(null)},e.prototype.getHostSpecificString=function(n){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];return t.Resources.getString(n+"VS",r)},e.prototype.getSnapshotFullPath=function(n,t){return"%temp%\\ScriptedHost\\"+n+"\\"+t},e.prototype.initializeView=function(){switch(this._sessionInfo.sessionType){case 0:var f=new n.Diagnostics.HubDiagnosticSession;this._view=new i(this._sessionInfo,f);break;case 1:this._view=new r(this._sessionInfo);break;case 2:this._view=new u(this._sessionInfo);break;default:throw new Error(t.Resources.getErrorString("JSPerf.1000"))}},e.prototype.isGraphCollectionSupported=function(){return!1},e.prototype.openSnapshot=function(n,t,i,r){return this.session.openSnapshotDetails(n,t,i,r)},e.prototype.openSnapshotDiff=function(n,t,i,r,u,f){return this.session.openSnapshotDiff(n,t,i,r,u,f)},e.prototype.resetView=function(){},e.prototype.startGraphCollection=function(){return n.Program.reportError(new Error("not implemented"),"startGraphCollection is not implemented"),null},e.prototype.onViewTypeChange=function(n){this._view.changeViewType(n.viewType,n.sortProperty)},e}(n.MemoryAnalyzerShell),i,r,u;n.VsMemoryAnalyzerShell=f;i=function(i){function r(r,u){i.call(this,document.getElementById("mainContainer"));this._controller=new n.MemoryAnalyzerController(r,u);this.appendChild(this._controller.view);t.addEventListener("close",this.onClose.bind(this))}return __extends(r,i),r.prototype.changeViewType=function(){},r.prototype.onClose=function(){this._controller.goOffline()},r}(Common.Controls.Legacy.Control);n.VsMemoryAnalyzerShellSessionView=i;r=function(t){function i(i){t.call(this,document.getElementById("mainContainer"));var r=new n.SnapshotViewController(i.storageId);r.loadSnapshot(i.storageId,i.filePaths,i.targetView,i.sortProperty);this._controller=r;this._snapshotTab=new n.SnapshotTab(r);this.appendChild(this._snapshotTab)}return __extends(i,t),i.prototype.changeViewType=function(n,t){this._controller.setTargetView(n,t)},i}(Common.Controls.Legacy.Control);n.VsMemoryAnalyzerShellSnapshotView=r;u=function(t){function i(i){t.call(this,document.getElementById("mainContainer"));var r=new n.SnapshotDiffController(i.storageId,i.firstSnapshotId,i.lastSnapshotId);r.diffSnapshots(i.storageId,i.filePaths,i.targetView,i.sortProperty);this._diffController=r;this._snapshotTab=new n.SnapshotTab(r);this.appendChild(this._snapshotTab)}return __extends(i,t),i.prototype.changeViewType=function(n,t){this._diffController.setTargetView(n,t)},i}(Common.Controls.Legacy.Control);n.VsMemoryAnalyzerShellSnapshotDiffView=u}(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,u=function(i){function r(n){i.call(this);this.title=t.Resources.getString("F12ToolTitle");this.panelTemplateId="MemoryAnalyzer.toolbarButtonsPanel";this._shellView=n;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))}return __extends(r,i),r.prototype.onOpenSessionToolbarButtonClick=function(){n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.IMPORT_SESSION,0);this._shellView&&this._shellView.openSession()},r.prototype.onSaveSessionToolbarButtonClick=function(){n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.EXPORT_SESSION,0);this._shellView&&this._shellView.saveSession()},r.prototype.onStartToolbarButtonClick=function(){n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.START_PROFILE,0);this._shellView&&this._shellView.startProfiling()},r.prototype.onStopToolbarButtonClick=function(){n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.STOP_PROFILE,0);this._shellView&&this._shellView.stopProfiling()},r.prototype.onTakeSnapshotToolbarButtonClick=function(){n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.TAKE_SNAPSHOT,0);this._shellView&&this._shellView.takeSnapshot()},r}(Common.Controls.ToolbarControl),i,r;n.MemoryAnalyzerToolbarControl=u;i=function(i){function u(t,r,u){var s=this,f,e,o;i.call(this,r);this._openedDocs={};f=new n.Diagnostics.F12DiagnosticsSession(t);e=new n.MemoryAnalyzerController(u,f);this._controller=e;o=window.external;o.addEventListener("closing",function(){s.closeAllSnapshots();n.Program.etwDataCollector.stopCollection()});this._hostShell=new Common.Extensions.LocalHostShell;this._selfTestInitialized=!1}return __extends(u,i),Object.defineProperty(u.prototype,"controller",{get:function(){return this._controller},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"hostShell",{get:function(){return this._hostShell},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"view",{get:function(){return this._view},enumerable:!0,configurable:!0}),u.load=function(i){t.Storage.openFileDialog({name:"",extensions:["diagsession"]},{access:1,encoding:"BINARY",persistence:1,type:0}).then(function(n){return u.loadFromStream(n)}).done(function(t){i&&i();var r=new n.Extensions.LocalSession(t,!0);n.Program.changeSession(r)},function(n){(n.number===undefined||n.number!==Common.Constants.E_ABORT)&&t.F12.ErrorDisplay.show(t.Resources.getString("OpenSessionFailedMessage"))})},u.loadFromStream=function(i){return new t.Promise(function(r,u){var e,f,o;try{if(n.Program.packager.openPackage(i.streamId),e=n.Program.packager.getResourcePathsByType(Common.Constants.MEMORY_ANALYZER_SNAPSHOT_RESOURCE_TYPE),n.Program.packager.closePackage(),e.length<1||e[0]==="")throw new Error(t.Resources.getErrorString("JSPerf.1075"));return f=e[0].split("\\"),o=f[f.length-2]+"\\"+f[f.length-1],i.close().then(function(){r&&r(o)})}catch(s){return i.close().then(function(){u&&u(s)})}})},u.save=function(){t.Storage.saveFileDialog({name:"",extensions:["diagsession"]},{access:3,encoding:"BINARY",persistence:1,type:0}).done(function(i){n.Program.saveSession().done(function(r){t.F12.copyFileToStream(r,i.streamId);i.close();t.F12.deleteFile(r);Notifications.notify(n.MemoryNotifications.SessionSaveCompleted)})},function(n){(n.number===undefined||n.number!==Common.Constants.E_ABORT)&&t.F12.ErrorDisplay.show(t.Resources.getString("SaveSessionFailedMessage"))})},u.prototype.changeSession=function(n){var t=this;this.closeAllSnapshots();this.session=n;this.session.getSessionInfo().done(function(n){t._controller.setSession(n);var i=t._controller.summaryViewController.model;t._controller.summaryViewController.removeExistingGraph();t._view&&(t._view.closeView(),t._view=null);t.initializeView();i.snapshotSummaryCollection&&(i.isStartProfilingPromptVisible=i.snapshotSummaryCollection.length===0)})},u.prototype.getDoc=function(n){return this._openedDocs[n]},u.prototype.closeAllSnapshots=function(){var u,i,f,r,s;for(u in this._openedDocs)this._openedDocs.hasOwnProperty(u)&&this._view.removeDoc(this._openedDocs[u]);for(this._openedDocs={},i=[],f=this._controller.summaryViewController.model.snapshotSummaryCollection,r=0;r<f.length;++r){var h=f.getItem(r),e=h.snapshotFile,o=this.getSnapshotFullPath(e.storageId,e.relativePath);i.push(o);i.push(o+n.SnapshotSummary.fileExtension)}for(this._controller.clearSummaryTab();i.length>0;)s=i.pop(),t.F12.deleteFile(s);return t.Promise.as(null)},u.prototype.getHostSpecificString=function(n){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];return t.Resources.getString(n+"F12",r)},u.prototype.getSnapshotFullPath=function(n,t){return Common.Constants.F12.MEMORY_ANALYZER_SNAPSHOT_ROOT_PATH+n+"\\"+t},u.prototype.initializeView=function(){this._view&&F12.Tools.Utility.Assert.fail("Tried to initialize a view when one already exists!");this._view=new r(this._controller);t.F12&&!this._selfTestInitialized&&n.SelfTest&&(this._selfTestInitialized=!0,n.SelfTest.init())},u.prototype.isGraphCollectionSupported=function(){return!0},u.prototype.openSnapshot=function(t,i,r,u){var f=this;return r=r.toLocaleUpperCase(),this.session.openSnapshotDetails(t,i,r,u).then(function(t){var i=f._openedDocs[r],u;i||(u=new n.SnapshotViewController(t.storageId),i={controller:u,sessionInfo:t,title:r,view:new n.SnapshotTab(u)},i.view.title=r,f._openedDocs[r]=i);i.controller.setTargetView(t.targetView,t.sortProperty);f._view.addOrActivateDoc(i);i.controller.loadSnapshot(t.storageId,t.filePaths,t.targetView,t.sortProperty)})},u.prototype.openSnapshotDiff=function(t,i,r,u,f,e){var o=this;return r=r.toLocaleUpperCase(),this.session.openSnapshotDiff(t,i,r,u,f,e).then(function(t){var i=o._openedDocs[r],e;i||(e=new n.SnapshotDiffController(t.storageId,u,f),e.diffSnapshots(t.storageId,t.filePaths,t.targetView,t.sortProperty),i={controller:e,sessionInfo:t,title:r,view:new n.SnapshotTab(e)},i.view.title=r,o._openedDocs[r]=i);i.controller.setTargetView(t.targetView,t.sortProperty);o._view.addOrActivateDoc(i)})},u.prototype.resetView=function(){this._view.resetView()},u.prototype.startGraphCollection=function(){return n.Program.etwDataCollector.startSession("JavaScriptCollectionAgent.dll","{8C0C6322-37F1-11E3-8259-6C3BE516EAD0}",!1)},u}(n.MemoryAnalyzerShell);n.F12MemoryAnalyzerShell=i;r=function(r){function f(i){var f=this;r.call(this,"f12ViewTemplate");this._controller=i;this._isProfiling=!1;this._startProfilingLink=this.findElement("startProfilingMessage");this._startProfilingLink.innerText=t.Resources.getString("F12StartProfilingMessage");this._startProfilingLink.addEventListener("click",this.onStartClick.bind(this));this._startProfilingLink.addEventListener("keydown",this.onStartClick.bind(this));this._model=i.summaryViewController.model;this._model.propertyChanged.addHandler(this.onPropertyChanged.bind(this));this._model.isOffline=!0;this._model.isRunning=!t.F12.Debugger.getIsAtBreakpoint();this._toolbarControl=new u(this);this._toolbarControl.model=this._model;this.findElement("toolbarContainer").appendChild(this._toolbarControl.rootElement);n.NavigationHelpers.setToolbar(this._toolbarControl);n.NavigationHelpers.updateAdditionalNavigationFrames(this._controller.summaryViewController.navigationId);n.NavigationHelpers.switchNavigationView(this._controller.summaryViewController.navigationId);try{Common.NavigationUtilities.registerFocusHandlers(t.F12.PluginId.Memory)}catch(e){}this._tabControl=new n.Controls.TabControl;this._tabControl.tabsLeftAligned=!0;this._tabControl.addTab(this._controller.view);this._tabControl.selectedItemChanged=function(n,t){return f.onSelectedTabChanged(n,t)};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);t.F12.addEventListener("keydown",this._keyDownHandler);t.F12.addEventListener("browsershortcut",this._keyDownHandler);document.addEventListener("keydown",this._keyDownHandler);this._parentContainer.appendChild(this.rootElement)}return __extends(f,r),Object.defineProperty(f.prototype,"summaryViewModel",{get:function(){return this._model},enumerable:!0,configurable:!0}),f.prototype.addOrActivateDoc=function(n){this._tabControl.containsTab(n.view)||this._tabControl.addTab(n.view);this._tabControl.selectedItem=n.view},f.prototype.closeView=function(){t.F12.removeEventListener("keydown",this._keyDownHandler);t.F12.removeEventListener("browsershortcut",this._keyDownHandler);document.removeEventListener("keydown",this._keyDownHandler);this._parentContainer.innerHTML=""},f.prototype.removeDoc=function(n){this._tabControl.removeTab(n.view)},f.prototype.resetView=function(){this._model.isStartProfilingPromptVisible=!0;n.NavigationHelpers.reset();n.NavigationHelpers.updateAdditionalNavigationFrames(this._controller.summaryViewController.navigationId);n.NavigationHelpers.switchNavigationView(this._controller.summaryViewController.navigationId)},f.prototype.startProfiling=function(){this._controller&&(n.Program.shell.closeAllSnapshots(),F12.Tools.Utility.Assert.isTrue(this._model.isTargetCompatible),n.Program.traceWriter.raiseEvent(211),t.F12.Profiler.notifyOnStartProfiling(),this._isProfiling=!0,this._controller.goOnline(),n.Program.traceWriter.raiseEvent(212),this._model.isStartProfilingPromptVisible=!1,this.updateUIState(),this._toolbarControl.getNamedControl("takeSnapshotToolbarButton").rootElement.focus())},f.prototype.stopProfiling=function(){this._controller&&(t.F12.Profiler.notifyOnStopProfiling(),this._isProfiling=!1,this._controller.showWarning(null),this._controller.goOffline(),this._model.snapshotSummaryCollection.length===0&&this.resetView(),this.updateUIState())},f.prototype.openSession=function(){var n;this._isProfiling&&(n=this.stopProfiling.bind(this));i.load(n)},f.prototype.saveSession=function(){i.save()},f.prototype.takeSnapshot=function(){this._controller&&(this._controller.takeSnapshot(),this.updateUIState())},f.prototype.onPropertyChanged=function(i){switch(i){case n.SummaryViewModel.IsActivatedPropertyName:this.onActivationChange();break;case n.SummaryViewModel.StartProfilingEnabledPropertyName:case n.SummaryViewModel.IsRunningPropertyName:this.updateUIState();break;case n.SummaryViewModel.IsStartProfilingPromptVisiblePropertyName:this.updateStartProfilingPrompt();break;case n.SummaryViewModel.IsTargetCompatiblePropertyName:this._controller&&(this._model.isTargetCompatible?this._controller.showWarning(null):(this._controller.showWarning(n.Program.shell.getHostSpecificString("WarningIncompatibleStandardsMode")),this._model.isStartProfilingPromptVisible=!1));this.updateUIState()}i===n.SummaryViewModel.IsOfflinePropertyName&&this._model.isOffline&&this._isProfiling&&(t.F12.Profiler.notifyOnStopProfiling(),this._isProfiling=!1)},f.prototype.onActivationChange=function(){this.updateSnapshotDisplayState(this._tabControl.selectedItem,this._model.isActivated)},f.prototype.onSelectedTabChanged=function(n,t){this.updateSnapshotDisplayState(n,!1);this.updateSnapshotDisplayState(t,this._model.isActivated)},f.prototype.updateSnapshotDisplayState=function(t,i){t&&t instanceof n.SnapshotTab&&(t.model.isDisplayed=i)},f.prototype.onStartClick=function(t){(this._model.isOffline&&Common.ButtonHelpers.isValidEvent(t)||t.keyCode===32||t.keyCode===13)&&(n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.START_PROFILE,0),this.startProfiling())},f.prototype.onKeyDown=function(t){switch(t.keyCode){case 69:!t.ctrlKey||t.altKey||t.shiftKey||(this._model.isOffline?this._model.isStartEnabled&&(n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.START_PROFILE,1),this.startProfiling()):this._model.isStopEnabled&&(n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.STOP_PROFILE,1),this.stopProfiling()));break;case 79:t.ctrlKey&&!t.altKey&&!t.shiftKey&&this._model.isOpenSessionEnabled&&(n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.IMPORT_SESSION,1),this.openSession());break;case 83:t.ctrlKey&&!t.altKey&&!t.shiftKey&&this._model.isSaveSessionEnabled&&(n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.EXPORT_SESSION,1),this.saveSession());break;case 84:t.ctrlKey&&t.shiftKey&&!t.altKey&&(n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.TAKE_SNAPSHOT,1),this.takeSnapshot())}},f.prototype.updateStartProfilingPrompt=function(){this._startProfilingPrompt.style.display=this._model.isStartProfilingPromptVisible?"":"none";this._tabControl.rootElement.style.display=this._model.isStartProfilingPromptVisible?"none":"";this._model.isStartProfilingPromptVisible&&n.NavigationHelpers.updateAdditionalNavigationFrames(this._controller.summaryViewController.navigationId)},f.prototype.updateUIState=function(){this._startProfilingLink.style.display=this._model.isStartEnabled?"":"none";this._model.isRunning?t.F12.ErrorDisplay.close():t.F12.ErrorDisplay.show(t.Resources.getString("MemoryDisabledAtBreakpoint"))},f}(Common.Controls.Legacy.TemplateControl);n.F12MemoryAnalyzerShellView=r}(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";(function(n){n[n.VS=0]="VS";n[n.F12=1]="F12";n[n.Test=2]="Test"})(n.HostType||(n.HostType={}));var i=n.HostType,t=function(){function n(){}return n.Initialized="initialized",n}();n.ProgramEvents=t})(MemoryAnalyzer||(MemoryAnalyzer={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(){this._eventManager=new t.Utilities.EventManager;this._traceWriter=new Common.DefaultTraceWriter}return Object.defineProperty(i.prototype,"etwDataCollector",{get:function(){return this._etwDataCollector},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hostType",{get:function(){return this._hostType},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"internalFeedback",{get:function(){return this._internalFeedback},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"memoryAnalyzerData",{get:function(){return this._memoryAnalyzerData},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"packager",{get:function(){return this._packager},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"shell",{get:function(){return this._shell},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"traceWriter",{get:function(){return this._traceWriter},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"userSettings",{get:function(){return this._userSettings},enumerable:!0,configurable:!0}),i.prototype.addEventListener=function(t,i){if(t===n.ProgramEvents.Initialized&&this._shell){var r=document.createEvent("Event");r.initEvent(n.ProgramEvents.Initialized,!1,!1);i(r)}else this._eventManager.addEventListener(t,i)},i.prototype.changeSession=function(n){this._session=n;this._shell.changeSession(this._session);t.F12&&t.F12.TraceWriter.markToolReady();this.onIdle()},i.prototype.fireCodeMarker=function(n){t.VS.Internal.CodeMarkers.fire(n)},i.prototype.main=function(){var i=this;window.parent&&window.parent.getExternalObj?this._externalObj=window.parent.getExternalObj():window.external&&(this._externalObj=window.external);this._hostType=t.F12?1:0;n.ResourceDecorator.initialize();t.addEventListener("pluginready",function(){var r,f,u,e;t.Tooltip.defaultTooltipContentToHTML=!1;switch(i.hostType){case 0:r=new n.Extensions.HostSessionProxy;i._internalFeedback=new n.Extensions.InternalFeedbackProxy;f=t.VS.Utilities.createExternalObject("MemoryAnalyzerExtension","{8C0C6312-37F1-11E3-8259-6C3BE516EAD0}");u=t.VS.Utilities.createExternalObject("PerformanceTraceExtension","{8C0C6315-37F1-11E3-8259-6C3BE516EAD0}");break;case 1:r=new n.Extensions.LocalSession;i._internalFeedback=new n.Extensions.NoOperationInternalFeedback;i._etwDataCollector=new Common.Data.F12EtwDataCollector(i._externalObj.etwDataCollector);try{i._packager=new Common.Data.F12Packager(i._externalObj.packager)}catch(o){i._packager=null}f=t.F12.Utilities.createExternalObject("MemoryAnalyzerExtension","{8C0C6312-37F1-11E3-8259-6C3BE516EAD0}");u=t.F12.TraceWriter;break;default:throw new Error(t.Resources.getErrorString("JSPerf.1027"))}n.Telemetry.initializeAnalytics();u&&(i._traceWriter=new Common.TraceWriter(u));i._memoryAnalyzerData=new n.Data.MemoryAnalyzerData(f);e=new n.Extensions.UserSettingsProxy;e.getUserSettings().then(function(u){i._userSettings=u;i._session=r;i.initializeErrorReporting();t.addEventListener("close",i.onClose);r.getSessionInfo().done(function(u){i._shell=i.getShell(r,u);i._shell.initializeView();t.F12&&t.F12.TraceWriter.markToolReady();i.onIdle();i._eventManager.dispatchEvent(n.ProgramEvents.Initialized)})})});Common.ErrorHandling.addPromiseErrorListener()},i.prototype.initializeErrorReporting=function(){var n=this;window.onerror=function(t,i,r){var u,f;return arguments&&arguments[3]&&typeof arguments[3]=="number"&&(u=arguments[3]),f=arguments&&arguments[4]&&arguments[4]instanceof Error?"Error number: "+arguments[4].number+("\r\nStack: "+arguments[4].stack):"Unhandled Error",n.reportError(new Error(t),f,i,r,u),!0}},i.prototype.onIdle=function(){Notifications.notify(n.MemoryNotifications.Idle);t.VS.Internal.CodeMarkers.fire(23590)},i.prototype.removeEventListener=function(n,t){this._eventManager.removeEventListener(n,t)},i.prototype.reportError=function(n,i,r,u,f){var l=this,o,h,e;if(!this.userSettings.disableWER){var c=n.message||n.description,a=r||"MemoryAnalyzer",v=u||0,y=f||0,s="Error description:  "+c;n.number&&(s+="\r\nError number:  "+n.number);r&&(s+="\r\nSource:  "+r);n.stack&&(o=n.stack,s+="\r\nError stack:  "+o,c||(h=o.indexOf("\n"),h>0&&(h=Math.min(h,50),c=o.substring(0,h))),typeof r=="undefined"&&(e=o.match(/(file|res):?([^)]+)\)/),e&&e.length>2&&(a=e[2])),typeof u=="undefined"&&(e=o.match(/line ?(\d+)/),(!e||e.length<=1)&&(e=o.match(/js:?(\d+):/)),e&&e.length>1&&(v=parseInt(e[1]))));i&&(s+="\r\nAdditional Info:  "+i);t.Diagnostics.reportError(c,a,v,s,y);this.internalFeedback.isEnabled().done(function(n){n&&l._session.save(!1).done(function(n){l.internalFeedback.sendData(!0,"","","",s,n)})})}},i.prototype.saveSession=function(){return this._session.save(!1)},i.prototype.getShell=function(i,r){switch(this.hostType){case 0:return new n.VsMemoryAnalyzerShell(i,r);case 1:return new n.F12MemoryAnalyzerShell(this._externalObj,i,r);default:throw new Error(t.Resources.getErrorString("JSPerf.1027"))}},i.prototype.onClose=function(){Notifications.notify(n.MemoryNotifications.WindowClose);t.VS.Internal.CodeMarkers.fire(23591)},i}();n.ProgramMain=i;n.Program=new i})(MemoryAnalyzer||(MemoryAnalyzer={}));MemoryAnalyzer.Program.main();
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var i=Microsoft.Plugin,u=function(){function n(n){this._dataReceivedHandler=n}return Object.defineProperty(n.prototype,"args",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hasCompleted",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"name",{get:function(){return"registerConsoleCallbacks"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"dataReceivedHandler",{get:function(){return this._dataReceivedHandler},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"executedHandler",{get:function(){return null},enumerable:!0,configurable:!0}),n}(),t,r;n.RegisterConsoleCallbacksCommand=u;t=function(){function n(n,t){this._name=n;this._args=t;this._hasCompleted=!1;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)}return Object.defineProperty(n.prototype,"args",{get:function(){return this._args},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hasCompleted",{get:function(){return this._hasCompleted},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),n.prototype.checkCompleted=function(){this.hasCompleted||this.actualPartCount!==this.expectedPartCount||this._processedPartCount!==this.expectedPartCount||(this._hasCompleted=!0,this.allPartsReceivedHandler&&this.allPartsReceivedHandler(this._parts),this.completedHandler&&this.completedHandler(this))},n.prototype.onDataReceived=function(n){var t=this,r,u;if(n.partId===-1){this.errorHandler&&(r=n.data?new Error(n.data):new Error(i.Resources.getString("ERRoutOfMemory")),this.errorHandler(r));return}if(++this.actualPartCount,this._parts[n.partId]=n.data,this.partProcessingHandler)while(typeof this._parts[this._currentPartId]!="undefined")u=this._parts[this._currentPartId],this.partProcessingHandler(u).done(function(){t._processedPartCount++;t.checkCompleted()},function(n){t.errorHandler&&t.errorHandler(n)}),delete this._parts[this._currentPartId],++this._currentPartId;else this._processedPartCount++;this.checkCompleted()},n.prototype.onExecuted=function(n){typeof n!="undefined"?this.expectedPartCount=n:this.errorHandler&&this.errorHandler(new Error(i.Resources.getErrorString("JSPerf.1059")))},n}();n.MultipartResponseCommand=t;r=function(n){function t(t,i){var r=this;n.call(this,"takeSnapshot",t);this._file=i;this.partProcessingHandler=function(n){return r._file.write(n)}}return __extends(t,n),t}(t);n.TakeSnapshotCommand=r}(MemoryAnalyzer||(MemoryAnalyzer={})),function(n){var t=function(){function n(){}return n.toolbarButtonsPanel='<div>            <div id="startToolbarButton" data-name="startToolbarButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton24x24" data-options="className:startToolbarButton,                                tooltip:F12StartButtonTooltip; converter=Common.CommonConverters.ResourceConverter" data-binding="isEnabled:isStartEnabled"><\/div>            <div id="stopToolbarButton" data-name="stopToolbarButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton24x24" data-options="className:stopToolbarButton,                                tooltip:F12StopButtonTooltip; converter=Common.CommonConverters.ResourceConverter" data-binding="isEnabled:isStopEnabled"><\/div>            <div id="openSessionButton" data-name="openSessionButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton24x24" data-options="className:openSessionButton,                                tooltip:F12OpenSessionButtonTooltip; converter=Common.CommonConverters.ResourceConverter" data-binding="isEnabled:isOpenSessionEnabled"><\/div>            <div id="saveSessionButton" data-name="saveSessionButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton24x24" data-options="className:saveSessionButton,                                tooltip:F12SaveSessionButtonTooltip; converter=Common.CommonConverters.ResourceConverter" data-binding="isEnabled:isSaveSessionEnabled"><\/div>            <div id="takeSnapshotToolbarButton" data-name="takeSnapshotToolbarButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton24x24" data-options="className:takeSnapshotToolbarButton,                                tooltip:F12SnapshotButtonTooltip; converter=Common.CommonConverters.ResourceConverter" data-binding="isEnabled:isTakeSnapshotEnabled"><\/div>        <\/div>',n.scopeFilterTemplate='<div class="scopeFilterBox">            <label class="scopeFilterLabel" for="BPT-VisualProfiler-scopeFilter" data-options="textContent:ScopeFilterLabel; converter=Common.CommonConverters.ResourceConverter"><\/label>            <div id="BPT-VisualProfiler-scopeFilter" data-name="scopeFilter" data-control="Common.Controls.ComboBox" data-binding="items:scopeFilterOptions,                                   selectedValue:scopeFilter; mode=twoway; converter=Common.CommonConverters.IntToStringConverter" data-options="className:scopeFilter,                                   tabIndex:2,                                   tooltip:ScopeFilterTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>        <\/div>',n.analysisBarTemplate='<div class="analysisContainer">            <div data-name="scopeFilterTemplate" data-binding="isVisible:isDiff" data-control="Common.TemplateControl" data-control-templateid="MemoryAnalyzer.scopeFilterTemplate" data-controlbinding="model:model"><\/div>            <div data-name="filterInput" data-control="Common.Controls.TextBox" data-binding="text:dataTabModel.filterString; mode=twoway,                                isVisible:dataTabModel.isTextSearchable" data-options="attr-aria-label:IdentifierFilter; converter=Common.CommonConverters.ResourceConverter,                                className: filterInput,                                tabIndex:2,                                placeholder:IdentifierFilter; converter=Common.CommonConverters.ResourceConverter,                                updateOnInput:1,                                tooltip:IdentifierFilterTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="foldObjectsByDominatorButton" data-control="Common.Controls.ToggleButton" data-control-templateid="Common.iconButton24x24" data-binding="isChecked:foldObjectsByDominator; mode=twoway,                                isVisible:dataTabModel.isDominatorFoldingPossible" data-options="className:foldObjectsByDominatorButton,                                tabIndex:2,                                tooltip:FoldInObjectsByDominatorTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="settingsMenuButton" data-control="Common.Controls.DropDownButton" data-control-templateid="Common.menuButton33x24" data-options="className:settingsMenuButton,                                tabIndex:2,                                toggleIsCheckedOnClick:false; converter=Common.CommonConverters.StringToBooleanConverter,                                tooltip:SettingsMenuButtonTooltipText; converter=Common.CommonConverters.ResourceConverter"><\/div>        <\/div>',n.settingsDropDownMenu='<ul>            <div data-name="showBuiltinsMenuItem" data-control="Common.Controls.CheckBoxMenuItem" data-binding="isChecked:showBuiltIns; mode=twoway" data-options="content:ShowBuiltIns; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="displayObjectIdsMenuItem" data-control="Common.Controls.CheckBoxMenuItem" data-binding="isChecked:displayObjectIDs; mode=twoway" data-options="content:DisplayObjectIDs; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="showNonMatchingReferencesMenuItem" data-control="Common.Controls.CheckBoxMenuItem" data-binding="isChecked:showNonMatchingReferences; mode=twoway,                                isVisible:isDiff" data-options="content:ShowNonMatchingReferences; converter=Common.CommonConverters.ResourceConverter"><\/div>        <\/ul>',n}();n.MemoryAnalyzer=t}(ControlTemplates||(ControlTemplates={}));
//! Copyright (C) Microsoft. All rights reserved.
window.TestMode=!0,function(n){"use strict";var t=Microsoft.Plugin,u=function(){function t(){}return Object.defineProperty(t,"controller",{get:function(){return new i(n.Program.shell)},enumerable:!0,configurable:!0}),t}(),i,r;n.TestContractFactory=u;i=function(){function i(n){this._shell=n}return Object.defineProperty(i.prototype,"hostShell",{get:function(){return this._shell.hostShell},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"toolbarViewModel",{get:function(){return n.Program.hostType===1?new r(this._shell.view):null},enumerable:!0,configurable:!0}),i.prototype.getControllerForF12=function(){return this._shell.controller},i.prototype.waitForIdle=function(){return new t.Promise(function(t){Notifications.subscribeOnce(n.MemoryNotifications.Idle,function(){t()})})},i.prototype.takeSnapshot=function(){var i=this;return new t.Promise(function(t){Notifications.subscribeOnce(n.MemoryNotifications.OnSnapshotProcessingCompleted,function(){t()});i.toolbarViewModel.takeSnapshot()})},i.prototype.closeAllSnapshots=function(){return this._shell.closeAllSnapshots()},i.prototype.load=function(i){n.Program.hostType===1&&n.F12MemoryAnalyzerShell.loadFromStream({streamId:i,close:function(){return t.Promise.as(null)}}).done(function(t){var i=new n.Extensions.LocalSession(t,!0);n.Program.changeSession(i)})},i.prototype.save=function(i){var r=this;n.Program.hostType===1&&t.Storage.openFile(i,{access:3,encoding:"BINARY",mode:4,persistence:1,type:0}).then(function(i){r._shell.save(!1).then(function(n){return t.F12.copyFileToStream(n,i.streamId),i.close()}).done(function(){Notifications.notify(n.MemoryNotifications.SessionSaveCompleted)})})},i}();r=function(){function n(n){this._shellView=n;this._summaryViewModel=this._shellView.summaryViewModel}return Object.defineProperty(n.prototype,"isOpenSessionEnabled",{get:function(){return this._summaryViewModel.isOpenSessionEnabled},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isSaveSessionEnabled",{get:function(){return this._summaryViewModel.isSaveSessionEnabled},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isStartEnabled",{get:function(){return this._summaryViewModel.isStartEnabled},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isStopEnabled",{get:function(){return this._summaryViewModel.isStopEnabled},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isTakeSnapshotEnabled",{get:function(){return this._summaryViewModel.isTakeSnapshotEnabled},enumerable:!0,configurable:!0}),n.prototype.startProfiling=function(){this._shellView.startProfiling()},n.prototype.stopProfiling=function(){this._shellView.stopProfiling()},n.prototype.takeSnapshot=function(){var n=this;this.isTakeSnapshotEnabled?this._shellView.takeSnapshot():setTimeout(function(){n._shellView.takeSnapshot()},1e3)},n}()}(MemoryAnalyzer||(MemoryAnalyzer={}))
//# sourceMappingURL=MemoryAnalyzerMerged.min.js.map
//! Copyright (C) Microsoft. All rights reserved.
var MemoryAnalyzer,remoteCode;(function(n){"use strict";var t,i;(function(n){n[n.Empty=0]="Empty";n[n.Loading=1]="Loading";n[n.Done=2]="Done"})(t||(t={}));i=function(){function n(){expectedWindowProperty="__BROWSERTOOLS_MEMORYANALYZER_ADDED"}return n.prototype.initialize=function(){browser.addEventListener("beforeScriptExecute",this.onBeforeScriptExecute.bind(this));this.consoleNotificationQueue=[];var n=[];n.takeSnapshot=this.takeSnapshot.bind(this);n.registerConsoleCallbacks=this.registerConsoleCallbacks.bind(this);this._remoteHelper=new Common.PerfTools.__BROWSERTOOLS_RemoteHelper(n);this._remoteHelper.initialize("MemoryAnalyzerPort",this.initializePage.bind(this),this.onDetach.bind(this))},n.appendSnapshotPart=function(n,t){var i,r;if(n){if(i=JSON.parse(n),!t.version&&i.version&&(t.version=i.version),i.data)for(t.data||(t.data=[]),r=0;r<i.data.length;++r)t.data.push(i.data[r]);!t.privateBytes&&i.privateBytes&&(t.privateBytes=i.privateBytes);!t.pointerSize&&i.pointerSize&&(t.pointerSize=i.pointerSize);!t.base64Image&&i.base64Image&&(t.base64Image=i.base64Image)}},n.readAndChunk=function(n,t,i){var r=new FileReader;r.onloadend=function(){var f,u,o;if(r.readyState===2)try{if(!r.result)throw new Error;for(f=Math.ceil(n.size/t),u=0;u<f;++u){var e=u*t,s=Math.min(e+t,n.size),h=r.result.substring(e,s),c={partId:u,data:h};i(c)}}catch(l){o={partId:-1,data:l.message};i(o)}finally{n.msClose();resources.memory.triggerGarbageCollection()}};r.readAsText(n)},n.prototype.addRemotePageFunctions=function(n){n[expectedWindowProperty]=browser.createSafeFunction(n,function(){})},n.prototype.initializeConsole=function(n){var r=this,t,i;n.Console&&n.Console.prototype&&(n.Console.prototype.takeHeapSnapshot||(n.Console.prototype.takeHeapSnapshot=browser.createSafeFunction(n,function(n){r.onConsoleExecute("takeHeapSnapshot",n)})));t=function(){r.onDetach();toolUI.removeEventListener("detach",t)};i=browser.createSafeFunction(n,function(){toolUI.removeEventListener("detach",t)});n.addEventListener?n.addEventListener("unload",i):n.attachEvent("onunload",i);toolUI.addEventListener("detach",t)},n.prototype.initializeConsoles=function(n){var t=null,i,r,u;try{t=Common.PerfTools.__BROWSERTOOLS_RemoteHelper.getDefaultView(n.document)}catch(f){return}if(this.initializeConsole(t),t.frames)for(i=0;i<t.frames.length;i++)r=t.frames[i],r&&(u=dom.getCrossSiteWindow(t,r),u&&this.initializeConsoles(u))},n.prototype.initializePage=function(){var n,t;try{n=Common.PerfTools.__BROWSERTOOLS_RemoteHelper.getDefaultView(browser.document);browser.documentMode>=1e5&&(this.addRemotePageFunctions(n),this.initializeConsoles(browser));t={docMode:browser.document.documentMode,contextInfo:n.location.href};this._remoteHelper.port.postMessage("Handshake:"+JSON.stringify(t));this._remoteHelper.initializeDocumentTries=0}catch(i){this.onDocumentNotReady()}},n.prototype.onBeforeScriptExecute=function(n){n&&n.browserOrWindow&&(n=n.browserOrWindow);var t=null;try{t=Common.PerfTools.__BROWSERTOOLS_RemoteHelper.getDefaultView(n.document)}catch(i){return}t===Common.PerfTools.__BROWSERTOOLS_RemoteHelper.getDefaultView(browser.document)&&this._remoteHelper.port&&(this._remoteHelper.postAllMessages(),this.initializePage())},n.prototype.onConsoleExecute=function(n,t){this.notifyCallback?this.notifyCallback({notifyType:n,message:t}):this.consoleNotificationQueue.push({notifyType:n,message:t})},n.prototype.onDetach=function(){this._remoteHelper.initializeDocumentTries=0;try{var n=Common.PerfTools.__BROWSERTOOLS_RemoteHelper.getDefaultView(browser.document);n[expectedWindowProperty]&&delete n[expectedWindowProperty]}catch(t){}},n.prototype.onDocumentNotReady=function(){this._remoteHelper.initializeDocumentTries<this._remoteHelper.initializeDocumentMaxTries?(++this._remoteHelper.initializeDocumentTries,this._remoteHelper.port.postMessage("DocumentNotYetReady")):this._remoteHelper.errorHandler.handleError("Document timed out","Remote.js",0)},n.prototype.registerConsoleCallbacks=function(n){var t,i;for(this.notifyCallback=n,t=0;t<this.consoleNotificationQueue.length;t++){i=this.consoleNotificationQueue[t];this.onConsoleExecute(i.notifyType,i.message)}},n.prototype.takeSnapshot=function(t,i,r,u,f){var h,e,y,o,w,b;try{h=resources.memory.getMemoryProfile();try{e=browser.takeVisualSnapshot(i,r,u)}catch(ut){}var k=resources.memory.processPointerSize,d=resources.memory.processPrivateBytes.toString(),a=Math.ceil(h.size/t),c=e?Math.ceil(e.size/t):0,v=a+c+1,s="\r\n";n.readAndChunk(h,t,f);e&&(y=a,o=new FileReader,o.onloadend=function(){var r,i,u,n,h,l,a;if(o.readyState===2)try{for(r={base64Image:o.result},i=s+JSON.stringify(r)+s,n=0;n<c;++n)h=n*t,l=n===c-1?i.length:(n+1)*t,u={partId:n+y,data:i.substring(h,l)},f(u)}catch(v){a={partId:-1,data:v.message};f(a)}finally{e.msClose()}},o.readAsText(e));var p=Common.PerfTools.__BROWSERTOOLS_RemoteHelper.getDefaultView(browser.document),g=p.navigator.appName,nt=p.navigator.appVersion,tt=browser.documentMode/1e4,it={pointerSize:k,privateBytes:d,clientName:g,clientVersion:nt,docMode:tt},l=JSON.stringify(it)+s;return e||(l=s+l),w={partId:v-1,data:l},f(w),v}catch(rt){b={partId:-1,data:rt.message};f(b)}},n}();n.__BROWSERTOOLS_RemoteCode=i})(MemoryAnalyzer||(MemoryAnalyzer={}));remoteCode=new MemoryAnalyzer.__BROWSERTOOLS_RemoteCode;remoteCode.initialize()
//# sourceMappingURL=remote.min.js.map
.snapshotTilesContainer {
    -ms-grid-row: 3;
    align-content: flex-start;
    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: 10px 10px 0px 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;
        align-items: center;
        align-self: center;
        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}]*/
            }

@supports (display: flex) {
    .snapshotTilesContainer {
       display: flex;
    }

    .snapshotTileInner > .snapshotTileHeader > .snapshotTileDetachedDomNodeInfo {
       display: flex;
    }
}�PNG


IHDR `|"p�
IDATx�햱
�0=��	����4 �!#x��H��Г���`I����c]�#2S��E ����Z�IKj$��ԗg��L", �-���:��PjEf
�P��*��?�_<!��З��sDf|�"���^�n-Ѥ%5�j�˳�v&����
�vUSB(�"��J(SQ��r������¼^�#2��\|�"hvk�&-��hVS_�}�3���p|��@n0G���B��5TB�z���S�������W�c�Ʉ�IEND�B`��PNG


IHDRr
ߔsRGB��, cHRMz&�����u0�`:�p��Q<	pHYs���IDATxڽ��A��ڶm�Q�����m+8��mPۈնq���M�y�z�v�_f���;�\�s�0j�5�c���h��N�r�Mx�pK��k�-�!.�b��	��s����Ip�!F���8��o}�^V�!��ѓǼϐ�Yy�53O��O�z��'hol��3U�ǪQ������x��2z%��N��*�|t�A�,��(��m��.X�¯�Ujn(x�s��%՞��·xU
��bp�M�gZ�\����윊V�zH�ةF@����!?xZ_v|��� �ۧ4���`�
�Lu�P�)A;�T�FcU�����%Pp�
*���`��`\
s0EUL��0_���"�
C0����q����.��nMS�������62f�]P)����h
Q�_S��?Cʜ�i{�)^���c
��YyCSLB��=2�7�A�k7_��H��IEND�B`��PNG


IHDR$l5��	pHYs��j։	gAMA���a�PLTEOOOWWWUUUSSSRRRUUUTTTSSSSSSTTTTTTSSSSSSTTTTTT!x�!y�!x�!y�!x�!x�!y�x�z�w�z�w��������������������������������������������!y��{�o*tRNS 0@P`p���������Ͽ���p`@0  0@P`�������}:U�sRGB��, cHRMz&�����u0�`:�p��Q<3IDATx��ۚ�0���G9�(�﷋�4T2��n(�_�4��#,�v�l�b���)�q����a�-�uLD�?��V0;�-Ӵ�
����۴�B�%���-}��U��a+r�Y`��	�X*���8��!tق>XB{�Hh�U��/�
�yॻ��Fu�`:�l�p)�1@�Z�Vöy����#G����eY_�Y6�t����0.������)��.4�./!o�Qр�B=K����cTB��T(��8��JF|��ߦ-:ħ 8�S��1�CH��Y,��B(��6=H�!�B�*@,��U�������4�jB�>`�
	��<�$�<��U'Q�L{$�2>�w�搏����]xΧ�䧳3I�;��B����J3M?�!������?Q�XƣW���`�n���NP�i�1�O��8$�U(KV��z��h�'����r����;���+T@+�-b��:�d���j��P9u	�e�1�}B)pj��*�W�	�	�4�=h|u�[���B}�O���i�,��B8��A5����������A�IEND�B`��PNG


IHDR6l��~	pHYs��NPLTEUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU���������������������������������"y���
^tRNS 0@P`�������Ͽ��`@0�7��sRGB��, cHRMz&�����u0�`:�p��Q<�IDATx��Y� ��M��#G�������EpGDv�V�w�I�� �c�땟�c����m
gs�9{��uC-q��
'M��l�ܸoc���j�_A�ѱP���� u�J($�s��	=��	����ĭ�*�ԉ���r㾍ٷV�����c�$��1:F	���Ŏ�Y�y=�G�<�w{8�Z���+���tʍ�6f�Za�&�Y
�2{!GIEND�B`��PNG


IHDR�A�sRGB��, cHRMz&�����u0�`:�p��Q<	pHYs���+TIDATx�c��{�LJq飳���8j B�~�B��y���a �t>��4�r�0
��0LC)7�P�
�4�r�0
��0LC�5>˚H;=�IEND�B`��PNG


IHDR�A�sRGB��, cHRMz&�����u0�`:�p��Q<	pHYs���+TIDATx�c ^ʪ�y(����C1�P�
�4�r�0
��0LC)7�P�
�4�a�iņ�F��8#��f\��QG
5#?�e6�LIEND�B`��PNG


IHDR@���4	pHYs����k�gAMA���a�PLTEOOOWWWUUUSSSVVVUUUTTTUUUUUUTTTTTTUUUTTTTTTUUUUUU"x�"y�"x�!y�!x�!x�!y�!y�"x�"z�#y�#w�z�w��������������������������������������������������"y��F�9/tRNS 0@P`p����������Ͽ����p`P@0  0@P`p��������ظ]IDATx��і�0�mqE���+����"J�OWP!L�x�����L�d��-���E8�H�*��	��)h��b!�P°��C���+:&E0�a�m�SA�w���ǟV?A�iԟua��r�3�S)��u��ĶǦ�8I�:�QN�=���S?O�$l8`V��4K�`V��^Iy�C�Nʄ���ΗuX�t�j��
(b`�L_5�"�#��d��6 ��0�UC���t�4(��T'D@�Oi[����p��z.`��7�{��9�j~K�b��.iiiii��|�)@�U	���.�@+��1�6����$X�c(B s=�[�"����>��	�����������
��Zp�o�K�[��$a��?,��r�
�ƭ��E0/�w�%���d�$�<�
k'@Qe�˺��v�y]�����0���zѿ_H�Rd�	�lg��ê��|C�[�h�K�`�����u8AR=�R��ý�ޜ<5��p��\�������E	�#���(�C��T�#�Oi��C	�N!�
��R!�ei��A�?;�o�&�A�wT�ՅU��ٞO���w�S���q�0���S�9��c��ϧ"���g����x�W@�𞶓�������e�AI;ݼ�Zyv��L�`�WM���߈/$Y)���H�3@/Q�P���-
h4�U��[����%�:� ��8��c��^noN��?Q��`�KZZ���w�ƞ
&�IEND�B`�/* 
 *   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;
        }
/* 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;
}

.footer-container {
    -ms-grid-row: 3;
    position: static;
}

    .footer-container .scrollbar {
        opacity: 1;
    }

.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}]*/
}
{
    "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": 3318,
        "resource_aliases": {
            "VisualProfiler": {
                "is_default": true
            },
            "Common": { },
            "DiagnosticsHubControlsResources": { }
        },
        "themed_images": {
            "f12-image-host-error-alert": {
                "bitmap_source": "..\\..\\pluginhost\\theme\\i_alerterror.png",
                "background_color": "plugin-font-editor-background-color"
            },
            "f12-image-host-info-alert": {
                "bitmap_source": "..\\..\\pluginhost\\theme\\i_alertinfo.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"
            },
            "plugin-common-image-find-next": {
                "bitmap_source": "..\\..\\Common\\images\\i_next.png",
                "background_color": "plugin-searchcontrol-mouseover-background-background-color"
            },
            "plugin-common-image-find-previous": {
                "bitmap_source": "..\\..\\Common\\images\\i_previous.png",
                "background_color": "plugin-searchcontrol-mouseover-background-background-color"
            }
        }
    },
    "file_aliases": {
        "PerformanceTraceExtension": {
            "path": "HtmlTools\\PerformanceTrace.dll",
            "optional": true
        },
        "DiagnosticsHub.DataWarehouseHost": { }
    },
    "vs": {
        "resource_aliases": {
            "VisualProfiler": {
                "type": "Embedded",
                "name": "Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost",
                "path": "Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Resources.VisualProfiler.Resources",
                "is_default": true
            },
            "Common": {
                "type": "Embedded",
                "name": "Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost",
                "path": "Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Resources.Common.Resources"
            },
            "DiagnosticsHubControlsResources": {
                "path": "..\\..\\..\\..\\Platform\\DiagnosticsHub\\WebViews\\DiagnosticsHub.Javascript.Controls.ScriptResources"
            }
        },
        "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"
            }
        }
    }
}
.dataImageDecoding {
    background: #79d7f2;
    stroke: #79d7f2;
    fill: none;
    opacity: 1;
}

.dataLoading {
    background: #117ad1;
    stroke: #117ad1;
    fill: none;
    opacity: 1;
}

.dataOther {
    background: #b5b5b5;
    stroke: #b5b5b5;
    fill: none;
    opacity: 1;
}

.dataRendering {
    background: #903f8b;
    stroke: #903f8b;
    fill: none;
    opacity: 1;
}

.dataScripting {
    background: #bf3f00;
    stroke: #bf3f00;
    fill: none;
    opacity: 1;
}

.dataScriptingGc {
    background: #fcb714;
    stroke: #fcb714;
    fill: none;
    opacity: 1;
}

.dataStyling {
    background: #71b252;
    stroke: #71b252;
    fill: none;
    opacity: 1;
}

.barGraph .dataImageDecoding {
    stroke: none;
    fill: #79d7f2;
}

.barGraph .dataLoading {
    stroke: none;
    fill: #117ad1;
}

.barGraph .dataOther {
    stroke: none;
    fill: #b5b5b5;
}

.barGraph .dataRendering {
    stroke: none;
    fill: #903f8b;
}

.barGraph .dataScripting {
    stroke: none;
    fill: #bf3f00;
}

.barGraph .dataScriptingGc {
    stroke: none;
    fill: #fcb714;
}

.barGraph .dataStyling {
    stroke: none;
    fill: #71b252;
}

.dataMeasure {
    background: #555555;
    stroke: #555555;
    fill: none;
    opacity: 1;
}

.dataFrame {
    background: #555555;
    stroke: #555555;
    fill: none;
    opacity: 1;
}
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);
    }

    .eventDetails .asyncStackLabel {
        padding-top: 2px;
        padding-bottom: 2px;
    }

    .eventDetails .asyncFrameLink {
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.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;
        align-items: center;
        display: -ms-flexbox;
        height: 100%;
        overflow: hidden;
    }

        .eventDataTemplate > .eventDataTemplateDataCell > .eventBar {
            flex-shrink: 0;
            height: 1em;
            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, .BPT-IELink {
    color: TRANSPARENT; /*[{plugin-link-color}]*/ /*EnvironmentColors.CommandBarMenuLinkTextColorKey*/
    cursor: pointer;
}

    .BPT-FileLink:hover, .BPT-HelpLink:hover, .BPT-IELink: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}]*/
}

@supports (display: flex) {
    .eventDataTemplate .eventDataTemplateNameCell {
        display: flex;
    }

    .eventDataTemplate > .eventDataTemplateDataCell {
        display: flex;
    }

    .filteringBar {
        display: flex;
    }

    /* override ruler-legend-container from the hub's ruler.css */
    .ruler-legend-container {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
    }
}
<!DOCTYPE html>
<!-- saved from url=(0016)http://localhost -->
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=11" />
    <meta http-equiv="Content-Type" content="text/html" />
    <meta http-equiv="format-detection" content="telephone=no">
    <title>UI Responsiveness</title>
    <link id="controls" rel="stylesheet" href="../../common/controls/controls.css" type="text/css" data-plugin-theme="true" data-necessary-for-tooltip="true" />
    <link id="Grid" rel="stylesheet" href="js/CpuUsage/Grid.css" type="text/css" data-plugin-theme="true" />
    <link id="CpuUsageTreeGrid" rel="stylesheet" href="js/CpuUsage/CpuUsageTreeGrid.css" type="text/css" data-plugin-theme="true" />
    <link id="MessageOverlayControl" rel="stylesheet" href="js/CpuUsage/MessageOverlayControl.css" type="text/css" data-plugin-theme="true" />
    <link id="listControl" rel="stylesheet" href="../../common/controls/listControl/listControl.css" type="text/css" data-plugin-theme="true" />
    <link id="menuControl" rel="stylesheet" href="../Common/controls/menuControl.css" type="text/css" data-plugin-theme="true" />
    <link id="MultiLineGraph" rel="stylesheet" href="../Common/controls/MultiLineGraph.css" type="text/css" data-plugin-theme="true" />
    <link id="ruler" rel="stylesheet" href="../Common/controls/ruler.css" type="text/css" data-plugin-theme="true" />
    <link id="Swimlane" rel="stylesheet" href="../Common/controls/Swimlane.css" type="text/css" data-plugin-theme="true" />
    <link id="StackedBarChart" rel="stylesheet" href="js/hubGraphs/StackedBarChart.css" type="text/css" data-plugin-theme="true" />
    <link id="common.f12" rel="stylesheet" href="../Common/common.f12.css" type="text/css" data-plugin-theme="true" />
    <link id="TokenExtractor" rel="stylesheet" href="../Common/TokenExtractor.css" type="text/css" data-plugin-theme="true" />
    <link id="VisualProfiler" rel="stylesheet" href="VisualProfiler.css" type="text/css" data-plugin-theme="true" />
    <link id="VisualProfiler.f12" rel="stylesheet" href="VisualProfiler.f12.css" type="text/css" data-plugin-theme="true" />
    <link id="VisualProfiler.vs" rel="stylesheet" href="VisualProfiler.vs.css" type="text/css" data-plugin-theme="true" />
    <link id="DataCategoryStyles" rel="stylesheet" href="DataCategoryStyles.css" type="text/css" />
    <link id="Divider" rel="stylesheet" href="js/controls/Divider.css" type="text/css" data-plugin-theme="true" />

    <script type="text/javascript" src="../../Common/isDebugBuild.js"></script>
    <script type="text/javascript" src="../common/plugin.js"></script>
    <script type="text/javascript" src="../common/DiagnosticsHub.js"></script>
    <script type="text/javascript" src="../common/controls/hubControls.js"></script>
    <script type="text/javascript" src="../../Common/CommonMerged.js"></script>
    <script type="text/javascript" src="../Common/CommonMerged.js"></script>
    <script type="text/javascript" src="js/CpuUsage/JSTreeGridControl.js"></script>
    <script type="text/javascript" src="CpuUsageMerged.js"></script>
    <script type="text/javascript" src="VisualProfilerMerged.js"></script>
    <script type="text/javascript" src="res://f12test.dll/23/selftest/SelfTestVisualProfiler.js"></script>

    <script id="errorViewTemplate" type="text/html">
        <div class="errorGrid">
            <div class="errorFrown">:(</div>
            <div id="errorMessage" class="errorMessage"></div>
        </div>
    </script>
    <script id="timelineViewTemplate" type="text/html">
        <div id="timelineViewGroup" class="timelineViewGroup">
            <div id="timelineLabel" class="timelineLabel"></div>
            <div id="sortFilterSection" class="sortFilterSection"></div>
            <div id="timelineViewAndDetails" class="timelineViewAndDetails">
                <div id="timelineEventHeaderLabel" class="timelineEventHeaderLabel"></div>
                <div id="timelineEventHeaderDivider" class="timelineEventHeaderDivider"></div>
                <div id="timelineRuler" class="timelineRuler"></div>
                <div id="timelineView" class="timelineView"></div>
                <div id="timelineDetailsHeader" class="timelineDetailsHeader">
                    <span id="eventDetailsTitle"></span>
                </div>
                <div id="timelineDetailsPaneContainer" class="timelineDetailsPaneContainer"></div>
            </div>
        </div>
    </script>
    <script id="eventDetailsTemplate" type="text/html">
        <div class="eventDetails">
            <div class="eventDetailsTable">
                <div id="durationIncRow" class="eventRow BPT-hidden">
                    <div id="durationLabelInc" class="eventCell name"></div>
                    <div id="durationValueInc" class="eventCell value"></div>
                </div>
                <div class="eventRow">
                    <div id="durationLabelExc" class="eventCell name"></div>
                    <div id="durationValueExc" class="eventCell value"></div>
                </div>
                <div class="eventRow">
                    <div id="startTimeLabel" class="eventCell name"></div>
                    <div id="startTimeValue" class="eventCell value"></div>
                </div>
                <div id="threadContextRow" class="eventRow BPT-hidden">
                    <div id="threadContextLabel" class="eventCell name"></div>
                    <div id="threadContextValue" class="eventCell value"></div>
                </div>
            </div>
            <div id="detailSeparator" class="detailSeparator"></div>
            <div id="additionalDetails" class="eventDetailsTable"></div>
            <div id="eventDetailsDescription" class="eventDetailsDescription BPT-hidden"></div>
            <div id="eventAsyncCausalitySeparator" class="detailSeparator BPT-hidden"></div>
            <div id="eventAsyncCausalityDetails" class="eventDetailsDescription BPT-hidden"></div>
            <div id="inclusiveTimeDetailSeparator" class="detailSeparator BPT-hidden"></div>
            <div id="inclusiveTimeBreakDownDetails" class="BPT-hidden"></div>
            <div id="imagePreviewSeparator" class="detailSeparator BPT-hidden"></div>
            <div id="imagePreviewContainer" class="imagePreviewContainer BPT-hidden">
                <div id="imagePreviewHeader"></div>
                <img id="imagePreview" class="imagePreview"></img>
            </div>
        </div>
    </script>
    <script id="dividerTemplate" type="text/html">
        <div id="dividerBackdrop" class="dividerBackdrop"></div>
        <div id="divider" class="divider"></div>
    </script>
    <script id="swimLanesView" type="text/html">
        <div class="swimLanesView">
            <div id="graphRulerViewContainer" class="graphRulerViewContainer">
                <div id="graphRulerView"></div>
            </div>
            <div id="swimlanesContainer" class="swimlanesContainer"></div>
        </div>
    </script>
    <script id="mainViewTemplateF12" type="text/html">
        <div id="mainView" class="mainView">
            <div id="toolbarViewContainer" class="toolbarContainer"></div>

            <div id="profilingPrompt" class="profilingPrompt">
                <div class="profilingMessage">
                    <div id="profilingLink" class="BPT-FileLink" tabindex="0" role="link"></div>
                </div>
                <progress id="profilingProgress"></progress>
            </div>

            <div id="dataViewContainer" class="dataViewContainer">
                <div class="warningViewContainer" tabindex="-1">
                    <div id="warningView" class="warningView">
                        <div id="warningMessage" class="warningMessage"></div>
                    </div>
                </div>
                <div id="detailedViewsContainer" class="detailedViewsContainer">
                    <div id="swimLanesViewContainer" class="swimLanesViewContainer"></div>
                    <div id="timelineViewContainer" class="timelineViewContainer"></div>
                </div>
                <div id="progressContainer" class="progressContainer" tabindex="0">
                    <div class="progressContent">
                        <p id="progressText"></p>
                        <progress id="progress" class="progress" max="100" value="0" />
                    </div>
                </div>
            </div>
        </div>
    </script>
    <script id="mainViewTemplateVS" type="text/html">
        <div id="mainView" class="mainView">
            <div id="dataViewContainer" class="dataViewContainer">
                <div class="warningViewContainer" tabindex="-1">
                    <div id="warningView" class="warningView">
                        <div id="warningMessage" class="warningMessage"></div>
                    </div>
                </div>

                <div id="detailedViewsContainer" class="detailedViewsContainer">
                    <div id="timelineViewContainer" class="timelineViewContainer"></div>
                </div>
            </div>
        </div>
    </script>
</head>

<body tabindex="-1">
    <div id="mainContainer"></div>
</body>

</html>
//! Copyright (C) Microsoft. All rights reserved.
var DiagnosticsHub,Assert,__extends,VisualProfiler,ControlTemplates;(function(n){"use strict";var t=Microsoft.Plugin,i=Microsoft.VisualStudio.DiagnosticsHub,r=function(){function r(n){this._totalRange=n;this._activeRange=this._selection=this._totalRange;this._selectionWasFinal=!1;this._onViewSelectionChangedHandler=this.onViewSelectionChanged.bind(this);this._publisher=new t.Utilities.EventManager;this._viewEventManager=i.getViewEventManager();this._viewEventManager.selectionChanged.addEventListener(this._onViewSelectionChangedHandler)}return Object.defineProperty(r.prototype,"totalRange",{get:function(){return this._totalRange},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"selection",{get:function(){return this._selection},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"activeRange",{get:function(){return this._activeRange},enumerable:!0,configurable:!0}),r.prototype.deinitialize=function(){this._viewEventManager.selectionChanged.removeEventListener(this._onViewSelectionChangedHandler)},r.prototype.setSelection=function(n,t){t===void 0&&(t=!1);this.setSelectionInternal(n,t,!1)},r.prototype.setActiveRange=function(n){this._activeRange.equals(n)||(this._activeRange=n,this._publisher.dispatchEvent(r.ActiveRangeChangedEventType))},r.prototype.addEventListener=function(n,t){this._publisher.addEventListener(n,t)},r.prototype.removeEventListener=function(n,t){this._publisher.removeEventListener(n,t)},r.prototype.setSelectionInternal=function(t,i,u){var f,e,o,s;i===void 0&&(i=!1);u===void 0&&(u=!1);f=!this._selection.equals(t);e=this._selectionWasFinal!==!i;this._selectionWasFinal=!i;(f||e&&!i)&&(n.Program.traceWriter.raiseEvent(109),o=n.TimeStamp.fromNanoseconds(Math.max(t.begin.nsec,this._activeRange.begin.nsec)),s=n.TimeStamp.fromNanoseconds(Math.min(t.end.nsec,this._activeRange.end.nsec)),this._selection=new n.TimeSpan(o,s),u||this._viewEventManager.selectionChanged.raiseEvent({position:this._selection.toJsonTimespan(),isIntermittent:i}),this._publisher.dispatchEvent(r.SelectionChangedEventType,{data:{isIntermittent:i,newSelection:t}}),Notifications.notify(n.ResponsivenessNotifications.UserSelectedTimeslice),n.Program.traceWriter.raiseEvent(110))},r.prototype.onViewSelectionChanged=function(t){var i=n.TimeSpan.fromJsonTimespan(t.position),r=i.begin.nsec===this._totalRange.begin.nsec&&i.end.nsec===this._totalRange.end.nsec,u=i.begin.nsec===this._selection.begin.nsec&&i.end.nsec===this._selection.end.nsec;r||u||n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.SELECT_RANGE,0);this.setSelectionInternal(i,t.isIntermittent,!0)},r.SelectionChangedEventType="selectionChanged",r.ActiveRangeChangedEventType="activeRangeChanged",r}();n.GlobalRuler=r})(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(){}return Object.defineProperty(i,"mappedSourcesCount",{get:function(){return Object.keys(this._mappedSources).length},enumerable:!0,configurable:!0}),i.addMappings=function(i){var r=this,u;n.Program.hostType!==0&&(this.ensureRegisteredForSourceMapStateChangedEvent(),u=i.map(function(n){var i,u,f;return n.context&&(i=n.context.sourceInfo,u=r.getSourceInfoKey(i),!r._mappedSources[u])?(f={originalSource:i,translatedSource:i},r._mappedSources[u]=f,t.F12.Debugger.getTranslatedLocation(i.source,i.line,i.column,!0).then(function(n){r._mappedSources[u].translatedSource={source:n.documentPath,line:n.oneBasedLine,column:n.oneBasedColumn}})):t.Promise.as(null)}))},i.clearMappings=function(){this._mappedSources={}},i.getMappedSourceInfo=function(i){var f=this,r,u;return n.Program.hostType===0?t.Promise.as(i):(r=this.getSourceInfoKey(i),u=this._mappedSources[r],u)?t.Promise.as(u.translatedSource):t.F12.Debugger.getTranslatedLocation(i.source,i.line,i.column,!0).then(function(n){var t={column:n.oneBasedColumn,line:n.oneBasedLine,name:i.name,source:n.documentPath};return f._mappedSources[r]={originalSource:i,translatedSource:t},f._mappedSources[r].translatedSource})},i.ensureRegisteredForSourceMapStateChangedEvent=function(){var n=this;this._registeredForEvent||(t.F12.Communications.addEventListener("onSourceMapStateChanged",function(t){return n.onSourceMapStateChanged(t)}),this._registeredForEvent=!0)},i.onSourceMapStateChanged=function(n){var i=this,f=encodeURI(n.customData),r=[],u,e;for(u in this._mappedSources)this._mappedSources[u].originalSource.source===f&&r.push(u);r.length>0&&(e=r.map(function(n){var r=i._mappedSources[n].originalSource;return t.F12.Debugger.getTranslatedLocation(r.source,r.line,r.column,!0).then(function(t){i._mappedSources[n].translatedSource={source:t.documentPath,line:t.oneBasedLine,column:t.oneBasedColumn}})}),t.Promise.join(e).done(function(){i.sourceMappingChanged.invoke({url:f})}))},i.getSourceInfoKey=function(n){return n.source+"_"+n.line+"_"+n.column},i._mappedSources={},i._registeredForEvent=!1,i.sourceMappingChanged=new Common.EventSource,i}();n.SourceMappingHelper=i})(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(){}return n.prototype.getUserSettings=function(){return new t.Promise(function(n){t.Settings.get("JavaScriptPerfTools").done(function(t){n(t)},function(){n({})})},null)},n}();n.UserSettingsHelper=new i})(t=n.Extensions||(n.Extensions={}))})(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r};DiagnosticsHub=Microsoft.VisualStudio.DiagnosticsHub,function(n){"use strict";var r=Microsoft.Plugin,t=function(n){function t(t){t===void 0&&(t=0);n.call(this,t)}return __extends(t,n),t.fromBigNumber=function(n){var i=n.jsonValue.l,r=n.jsonValue.h,u;return i<0&&(i=i>>>0),r<0&&(r=r>>>0),u=r*4294967296+i,new t(u)},t.toBigNumber=function(n){return DiagnosticsHub.BigNumber.convertFromNumber(n.nsec)},t}(Common.TimeStamp),i;n.TimeStamp=t;i=function(){function n(n,i){if(n===void 0&&(n=new t),i===void 0&&(i=new t),this._begin=n,this._end=i,this._begin.nsec>this._end.nsec)throw new Error(r.Resources.getErrorString("JSPerf.1042"))}return Object.defineProperty(n.prototype,"begin",{get:function(){return this._begin},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"end",{get:function(){return this._end},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"elapsed",{get:function(){return new t(this._end.nsec-this.begin.nsec)},enumerable:!0,configurable:!0}),n.fromJsonTimespan=function(i){var r=t.fromBigNumber(i.begin),u=t.fromBigNumber(i.end);return new n(r,u)},n.prototype.equals=function(n){return this.begin.equals(n.begin)&&this.end.equals(n.end)},n.prototype.toJsonTimespan=function(){return new DiagnosticsHub.JsonTimespan(t.toBigNumber(this._begin),t.toBigNumber(this._end))},n}();n.TimeSpan=i}(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";(function(n){n[n.none=0]="none";n[n.left=1]="left";n[n.right=2]="right"})(n.DragDirection||(n.DragDirection={}));var t=n.DragDirection})(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=function(t){function i(n){t.call(this,"VisualProfiler.asyncStackFrameItem");this._sourceInfo=n;this.model=this._sourceInfo;this.updateTranslatedSourceInfo(this._sourceInfo.source)}return __extends(i,t),i.prototype.updateTranslatedSourceInfo=function(t){var i=this;t&&t!==this._sourceInfo.source||n.SourceMappingHelper.getMappedSourceInfo(this._sourceInfo).done(function(n){i.model=n})},i.prototype.onModelChanged=function(){this.setUpViewSourceHandler()},i.prototype.setUpViewSourceHandler=function(){n.EventDataTemplate.setViewSourceHandler(this.rootElement,this._sourceInfo,!0)},i}(Common.TemplateControl);n.AsyncStackFrameTemplateControl=t}(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(n,i,r,u){this._totalValue=0;this._container=n;this._sectBaseData=[];this._labelOffset=8;this._pathOpacity=1;this._renderTooltipCallback=i;this._addSectorAriaLabelCallback=r;var f=t.Theme.getValue("plugin-font-size");this._textFontPx=f.indexOf("px")!==-1?parseInt(f.substring(0,f.indexOf("px"))):f.indexOf("pt")!==-1?Math.round(parseInt(f.substring(0,f.indexOf("pt")))/.75):0;this._config=u||{explosionFactor:2,radius:55,strokeWidth:25,minDonutArcAngle:10,containerWidth:200,containerHeight:200,clockwiseRotation:!0};typeof this._config.containerWidth=="undefined"||typeof this._config.containerHeight=="undefined"?(n.style.width!==""||n.getAttribute("width")!==null)&&(n.style.height!==""||n.getAttribute("height")!==null)?(this._containerWidth=parseInt(n.getAttribute("width")!==null?n.getAttribute("width"):n.style.width),this._containerHeight=parseInt(n.getAttribute("height")!==null?n.getAttribute("height"):n.style.height)):(this._containerWidth=200,this._containerHeight=200):(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)}return Object.defineProperty(n.prototype,"centerX",{get:function(){return this._centerX},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"centerY",{get:function(){return this._centerY},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"containerHeight",{get:function(){return this._config.containerHeight},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"containerWidth",{get:function(){return this._config.containerWidth},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"clockwiseRotation",{get:function(){return this._config.clockwiseRotation},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"explosionFactor",{get:function(){return this._config.explosionFactor},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"radius",{get:function(){return this._config.radius},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"strokeWidth",{get:function(){return this._config.strokeWidth},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"sectors",{get:function(){return this._sectBaseData},enumerable:!0,configurable:!0}),n.prototype.addSector=function(n){this.addSectorToBaseSeries(n)},n.prototype.addSectors=function(n){for(var t=0;t<n.length;t++)this.addSector(n[t])},n.prototype.removeSector=function(n){var i=this.getSectorIndex(n);if(i===-1)throw new Error(t.Resources.getErrorString("JSPerf.1061"));else this._totalValue-=n.value,this._sectBaseData.splice(i,1)},n.prototype.removeSectors=function(n){for(var t=0;t<n.length;t++)this.removeSector(n[t])},n.prototype.render=function(){var n=this.buildChartData(this._sectBaseData),t=this.calculatePoints(n);this.draw(t)},n.prototype.resetDonutChart=function(){this._totalValue=0;this._sectBaseData=[];this._container.removeChild(this._svg);this._svg=this.createSVG();this._container.appendChild(this._svg)},n.prototype.addSectorToBaseSeries=function(n){this._totalValue+=n.value;this._sectBaseData.push(n)},n.prototype.buildChartData=function(n){var f=[],r,e;if(n.length===1)f.push({startAngle:0,endAngle:360,percentValue:100,info:{name:n[0].name,cssClass:n[0].cssClass,value:n[0].value}});else{for(var i=0,u=0,t=0,o=this.getReductionFactor(n),t=0;t<n.length-1;t++)if(u=n[t].value,r=Math.round(360*u/this._totalValue),e=parseFloat((100*u/this._totalValue).toFixed(2)),r=r<this._config.minDonutArcAngle?this._config.minDonutArcAngle:Math.round(o*r),f.push({startAngle:i,endAngle:i+r-this._config.explosionFactor,percentValue:e,info:{name:n[t].name,cssClass:n[t].cssClass,value:n[t].value}}),i+=r,i>=360)break;t===n.length-1&&i<360&&(u=n[t].value,r=360-i,e=parseFloat((100*u/this._totalValue).toFixed(2)),f.push({startAngle:i,endAngle:i+r-this._config.explosionFactor,percentValue:e,info:{name:n[t].name,cssClass:n[t].cssClass,value:n[t].value}}),i+=r)}return f},n.prototype.calculatePoints=function(n){for(var u=this._config.radius,i=this._config.radius+this._config.strokeWidth/2+this._labelOffset,s=[],o,t=0;t<n.length;t++){var f=n[t].startAngle,e=n[t].endAngle,r=n.length===1?0:(f+e)/2,h=u*Math.sin(f*Math.PI/180),c=u*Math.cos(f*Math.PI/180)*-1,l=u*Math.sin(e*Math.PI/180),a=u*Math.cos(e*Math.PI/180)*-1;r<180&&r>0?(i=n[t].percentValue>9?i+this._textFontPx/2:i,o="start"):o=r>180?"end":"middle";var v=i*Math.sin(r*Math.PI/180),y=i*Math.cos(r*Math.PI/180)*-1,p=e-f>180?1:0,w=this._config.clockwiseRotation?1:0;s.push({startPoint:{x:h,y:c},endPoint:{x:l,y:a},label:{point:{x:v,y:y},anchor:o},percentValue:n[t].percentValue,largeArc:p,sweepFlag:w,info:n[t].info})}return s},n.prototype.createDivContainer=function(){var n=document.createElement("div");return n.style.width="100%",n.style.height="100%",n},n.prototype.createSVG=function(){var t=document.createElementNS(n.SvgNS,"svg");return t.setAttribute("version","1.1"),t.setAttribute("width",this._config.containerWidth+"px"),t.setAttribute("height",this._config.containerHeight+"px"),t.setAttribute("focusable","false"),t},n.prototype.createSVGPath=function(i,r,u,f){var o=this,e=document.createElementNS(n.SvgNS,"path");return e.setAttribute("class",i),e.setAttribute("d",r),e.setAttribute("stroke-width",u.toString()),this._renderTooltipCallback&&(e.onmouseover=function(){return o.showToolTip(f.info,f.percentValue)},e.onmouseout=function(){return t.Tooltip.dismiss()}),this._addSectorAriaLabelCallback&&this._addSectorAriaLabelCallback(f.info,f.percentValue),e},n.prototype.createSVGText=function(i,r,u,f){var e=document.createElementNS(n.SvgNS,"text");return e.setAttribute("x",i.toString()),e.setAttribute("y",r.toString()),e.setAttribute("text-anchor",u),e.setAttribute("class","BPT-donutChartText"),e.textContent=t.Resources.getString("InclusiveTimeSVGLabelString",Math.floor(f)),e},n.prototype.draw=function(n){var t,r,u,i;if(typeof this._svg!="undefined"&&this._div.removeChild(this._svg),this._svg=this.createSVG(),n.length===1){var t=0,r="M "+this._centerX+","+this._centerY+" M "+(this._centerX+n[t].startPoint.x)+", "+(this._centerY+n[t].startPoint.y)+" A "+this._config.radius+","+this._config.radius+" 1 "+n[t].largeArc+", "+n[t].sweepFlag+" "+(this._centerX+n[t].startPoint.x)+","+(this._centerY+n[t].startPoint.y+this._config.radius*2)+" A "+this._config.radius+","+this._config.radius+" 1 "+n[t].largeArc+", "+n[t].sweepFlag+" "+(this._centerX+n[t].endPoint.x)+","+(this._centerY+n[t].endPoint.y),u=this.createSVGPath(n[t].info.cssClass,r,this._config.strokeWidth,n[t]);this._svg.appendChild(u);i=this.createSVGText(this._centerX+n[t].label.point.x,this._centerY+n[t].label.point.y,n[t].label.anchor,n[t].percentValue);this._svg.appendChild(i)}else if(n.length>1)for(t=0;t<n.length;t++)r="M "+this._centerX+","+this._centerY+" M "+(this._centerX+n[t].startPoint.x)+", "+(this._centerY+n[t].startPoint.y)+" A "+this._config.radius+","+this._config.radius+" 1 "+n[t].largeArc+", "+n[t].sweepFlag+" "+(this._centerX+n[t].endPoint.x)+","+(this._centerY+n[t].endPoint.y),u=this.createSVGPath(n[t].info.cssClass,r,this._config.strokeWidth,n[t]),this._svg.appendChild(u),n[t].percentValue>Math.round(this._config.minDonutArcAngle*100/360)&&(i=this.createSVGText(this._centerX+n[t].label.point.x,this._centerY+n[t].label.point.y,n[t].label.anchor,n[t].percentValue),this._svg.appendChild(i));this._div.appendChild(this._svg)},n.prototype.getReductionFactor=function(n){for(var i=0,t=0,r=0,t=0;t<n.length;t++)i=Math.round(360*n[t].value/this._totalValue),r+=i<this._config.minDonutArcAngle?this._config.minDonutArcAngle-i:0;return 1-r/360},n.prototype.getResizedRadius=function(t){return t/n.RadiusResizeFactor},n.prototype.getResizedWidth=function(t){return t/n.WidthResizeFactor},n.prototype.getSectorIndex=function(n){for(var t=0;t<this._sectBaseData.length;t++)if(this._sectBaseData[t]===n||this._sectBaseData[t].name===n.name&&this._sectBaseData[t].cssClass===n.cssClass&&this._sectBaseData[t].value===n.value)return t;return-1},n.prototype.resizeDimensions=function(){var n=this._config.containerHeight>this._config.containerWidth?this._config.containerWidth:this._config.containerHeight;this._config.radius=this.getResizedRadius(n);this._config.strokeWidth=this.getResizedWidth(this._config.radius)},n.prototype.showToolTip=function(n,i){var r=this._renderTooltipCallback(n,i),u;r!==""&&r!==null&&typeof r!="undefined"&&(u={content:r},t.Tooltip.show(u))},n.SvgNS="http://www.w3.org/2000/svg",n.RadiusResizeFactor=4,n.WidthResizeFactor=2.5,n}();n.DonutChart=i})(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.getFilteredResult=function(n,t,i,r,u){var e={timeDomain:r,customDomain:{CounterId:i}},f;if(u)for(f in u)u.hasOwnProperty(f)&&(e.customDomain[f]=u[f]);return n.getFilteredData(e,t)},n}();n.DataUtilities=t})(t=n.Graphs||(n.Graphs={}))})(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function n(n){this._graphResources=n}return n.prototype.getString=function(i){for(var u,f=[],r=1;r<arguments.length;r++)f[r-1]=arguments[r];if(this._graphResources&&(u=this._graphResources[i],u!==undefined))return n.format(i,u,f);try{return t.Resources.getString.apply(t.Resources,arguments)}catch(e){}return i},n.format=function(i,r,u){return r.replace(n.FORMAT_REG_EXP,function(n,r){var f,e;switch(n){case"{{":f="{";break;case"}}":f="}";break;case"{":case"}":throw new Error(t.Resources.getErrorString("JSPlugin.3002"));default:if(e=parseInt(r),u&&e<u.length)f=u[e];else throw new Error(t.Resources.getErrorString("JSPlugin.3003")+" (resourceId = "+i+")")}return(f===undefined||f===null)&&(f=""),typeof f!="string"&&(f=f.toString()),f})},n.FORMAT_REG_EXP=/\{{2}|\{(\d+)\}|\}{2}|\{|\}/g,n}();n.GraphResources=i})(t=n.Graphs||(n.Graphs={}))})(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,f=Microsoft.VisualStudio.DiagnosticsHub,u=function(){function n(n,i,r){if(!n||r===undefined||r===null)throw new Error(t.Resources.getErrorString("JSPerf.1044"));this._name=n;this._cssClass=i;this._sortOrder=r}return Object.defineProperty(n.prototype,"cssClass",{get:function(){return this._cssClass},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"sortOrder",{get:function(){return this._sortOrder},enumerable:!0,configurable:!0}),n}(),i,r;n.DataSeriesInfo=u;i=function(){function n(n){this._data=[];this._dataSeriesInfo={};this._maximumYValue=Number.NEGATIVE_INFINITY;this.viewModel=[];this._options=n;this.validateOptions();this._pixelHorizontalValue=Math.floor(this.xWidth/this._options.width)}return Object.defineProperty(n.prototype,"maximumYValue",{get:function(){return this._maximumYValue},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"xWidth",{get:function(){return this._options.maxX-this._options.minX},enumerable:!0,configurable:!0}),n.prototype.addData=function(n){var i=this;n.forEach(function(n){if(i._dataSeriesInfo.hasOwnProperty(n.series))i._data.push(n);else throw new Error(t.Resources.getErrorString("JSPerf.1043"))});this.generateViewModel()},n.prototype.addSeries=function(n){for(var r,i=0;i<n.length;i++){if(r=n[i],this._dataSeriesInfo.hasOwnProperty(r.name))throw new Error(t.Resources.getErrorString("JSPerf.1045"));this._dataSeriesInfo[r.name]=r}},n.prototype.getViewOptions=function(){return{ariaDescription:this._options.ariaDescription,ariaLabelCallback:this._options.ariaLabelCallback,height:this._options.height,width:this._options.width,tooltipCallback:this._options.tooltipCallback,legendData:this._dataSeriesInfo}},n.prototype.convertChartAreaPercentToDataValue=function(n){return Math.round(n*this.xWidth/100)+this._options.minX},n.prototype.determineYAxisScale=function(t){for(var o,s,e,h,r,i,u,f=0;f<t.length;f++){for(o=0,s=t[f].chartItems,e=0;e<s.length;e++)h=s[e],h.height>0&&(o+=h.height);this._maximumYValue=Math.max(this._maximumYValue,o)}this._maximumYValue=Math.floor(Math.max(this._options.minYHeight,this._maximumYValue));r=this._options.height-n.YAXIS_PIXEL_PADDING;r<=0&&(r=this._options.height);i=Math.floor(this._maximumYValue/100)*100;u=i/r;i=this._options.height*u;i<this._maximumYValue&&(i=Math.ceil(this._maximumYValue/100)*100,u=i/r,i=this._options.height*u);this._pixelVerticalValue=u;this._maximumYValue=i},n.prototype.generateViewModel=function(){for(var r,u=[],e=this._options.barWidth+this._options.barGap,o=this._options.minX+e*this._pixelHorizontalValue,i={x:0,chartItems:[]},f=Math.floor(o),n=0;n<this._data.length&&this._data[n].x<=this._options.maxX;n++){if(r=this._data[n],n>0&&r.x<this._data[n-1].x)throw new Error(t.Resources.getErrorString("JSPerf.1046"));if(!(r.x<this._options.minX)){if(r.x>=f)for(u.push(i),i={x:i.x,chartItems:[]};r.x>=f;)i.x+=e,f=Math.floor(o+i.x*this._pixelHorizontalValue);i.chartItems.push(r)}}for(u.push(i),this.determineYAxisScale(u),n=0;n<u.length;n++)this.generateViewModelForSingleStack(u[n])},n.prototype.generateViewModelForSingleStack=function(n){var i=n.chartItems,f,u,t,e;if(i&&i.length!==0){i.sort(this.sortBySeries.bind(this));var o=0,s=!1,r=null;for(f=i.length-1;f>=0;f--)if((u=i[f],!(u.height<=0))&&(t=Math.round(u.height/this._pixelVerticalValue),u.height>0&&t===0&&(t=1),e=this._options.height-o-t,e<0&&(t=this._options.height-o,e=0,s=!0),o+=t,this._options.showStackGap&&f!==i.length-1&&(t>1?t-=1:r&&r.height>1&&(r.height-=1,r.y+=1)),r={x:n.x,y:e,height:t,width:this._options.barWidth,className:this._dataSeriesInfo[u.series].cssClass,chartItem:u},this.viewModel.push(r),s))break}},n.prototype.sortBySeries=function(n,t){return this._dataSeriesInfo[t.series].sortOrder-this._dataSeriesInfo[n.series].sortOrder},n.prototype.validateOptions=function(){if(!this._options)throw new Error(t.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(t.Resources.getErrorString("JSPerf.1048"));this._options.barGap=this._options.barGap||0;this._options.showStackGap=this._options.showStackGap||!1;this._options.minYHeight=this._options.minYHeight||this._options.minY},n.YAXIS_PIXEL_PADDING=10,n}();n.StackedBarChartPresenter=i;r=function(){function n(){this._idCount=0;this.rootElement=document.createElement("div");this.rootElement.style.width=this.rootElement.style.height="100%";this._selectedId=null}return Object.defineProperty(n.prototype,"presenter",{set:function(n){this._presenter=n;this._viewData=this._presenter.viewModel;this._options=n.getViewOptions();this._barGraphWidth=this._options.width;this.drawChart()},enumerable:!0,configurable:!0}),n.svgAddCssClass=function(n,t){n.setAttribute("class",n.getAttribute("class")+" "+t)},n.svgRemoveCssClass=function(n,t){var i=n.getAttribute("class");i=i.replace(t,"").trim();n.setAttribute("class",i)},n.prototype.convertPageXToChartAreaPercent=function(n){var t=this._chartAreaContainer.getBoundingClientRect();return(n-t.left)/this._barGraphWidth*100},n.prototype.createContainer=function(){var n=this;this._chartAreaContainer?this._chartAreaContainer.innerHTML="":(this._chartAreaContainer=document.createElement("div"),this.rootElement.appendChild(this._chartAreaContainer),this._chartAreaContainer.addEventListener("keydown",function(t){return n.onBarGraphKeydown(t)}),this._chartAreaContainer.addEventListener("focus",function(t){return n.onGraphFocusIn(t)}),this._chartAreaContainer.addEventListener("focusout",function(t){return n.onGraphFocusOut(t)}));this._barAriaLabel?this._barAriaLabel.innerHTML="":this._barAriaLabel=document.createElement("div");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"},n.prototype.createRect=function(t,i,r,u,f){var e=document.createElementNS(n.SVG_NAMESPACE,"rect");return e.id=n.BAR_ID_PREFIX+this._idCount,this._idCount++,e.setAttribute("focusable","false"),e.setAttribute("x",t+"px"),e.setAttribute("y",i+"px"),e.setAttribute("class","bar "+f),e.setAttribute("height",r+"px"),e.setAttribute("width",u+"px"),e},n.prototype.drawChart=function(){if(!this._viewData)throw new Error(t.Resources.getErrorString("JSPerf.1049"));this.createContainer();this.initializeBarGraph();this._chartAreaContainer.appendChild(this._barGraph);this.renderViewData(this._barGraph,this._viewData);this._chartAreaContainer.appendChild(this._barGraph);this._chartAreaContainer.appendChild(this._barAriaLabel);this._options.ariaDescription&&this._chartAreaContainer.setAttribute("aria-label",this._options.ariaDescription)},n.prototype.initializeBarGraph=function(){this._selectedId=-1;this._idCount=0;this._barGraph=document.createElementNS(n.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");this._options.ariaDescription&&this._barGraph.setAttribute("aria-label",this._options.ariaDescription)},n.prototype.onGraphFocusIn=function(){if(this._selectedId===null||this._selectedId<0)this._selectedId=-1;else{var t=document.getElementById(n.BAR_ID_PREFIX+this._selectedId);t&&n.svgAddCssClass(t,n.FOCUSED_CSS_CLASSNAME)}},n.prototype.onGraphFocusOut=function(){var i=document.getElementById(n.BAR_ID_PREFIX+this._selectedId);i&&n.svgRemoveCssClass(i,n.FOCUSED_CSS_CLASSNAME);this._options.ariaDescription&&this._chartAreaContainer.setAttribute("aria-label",this._options.ariaDescription);t.Tooltip.dismiss()},n.prototype.onBarFocusIn=function(t,i){if(n.svgAddCssClass(i,n.FOCUSED_CSS_CLASSNAME),this._options.ariaLabelCallback){var r=this._options.ariaLabelCallback(t);this._barAriaLabel.textContent=r}},n.prototype.onBarFocusOut=function(t,i){n.svgRemoveCssClass(i,n.FOCUSED_CSS_CLASSNAME)},n.prototype.onBarGraphKeydown=function(i){t.Tooltip.dismiss();var r;return(this._selectedId!==-1&&(r=document.getElementById(n.BAR_ID_PREFIX+this._selectedId)),i.keyCode===37||i.keyCode===39||i.keyCode===27)?(r&&r.onlostfocus&&r.onlostfocus(),i.keyCode===27?this._selectedId=-1:(i.keyCode===37?((this._selectedId===0||this._selectedId===-1)&&(this._selectedId=this._idCount),this._selectedId--):i.keyCode===39&&(this._selectedId++,this._selectedId===this._idCount&&(this._selectedId=0)),r=document.getElementById(n.BAR_ID_PREFIX+this._selectedId),r&&r.ongotfocus&&r.ongotfocus()),i.preventDefault(),i.stopPropagation(),!1):r&&r.onkeydown?r.onkeydown(i):!0},n.prototype.onBarKeydown=function(n,t){if(t.keyCode===13){for(var i=t.currentTarget,r=n.x,u=i.offsetHeight;i;)r+=i.offsetLeft,u+=i.offsetTop,i=i.offsetParent;return this.showTooltip(n.chartItem,r,u),t.preventDefault(),t.stopPropagation(),!1}return!0},n.prototype.renderViewData=function(n,i){for(var u,r,f=0;f<i.length;f++)u=i[f],r=this.createRect(u.x,u.y,u.height,u.width,u.className),r.onmouseover=this.showTooltip.bind(this,u.chartItem),r.onmouseout=function(){t.Tooltip.dismiss()},r.onkeydown=this.onBarKeydown.bind(this,u),r.ongotfocus=this.onBarFocusIn.bind(this,u.chartItem,r),r.onlostfocus=this.onBarFocusOut.bind(this,u.chartItem,r),r.parentElement===undefined&&(r.parentElement=n.parentElement),n.appendChild(r)},n.prototype.showTooltip=function(n,i,r){if(this._options.tooltipCallback){var u=this._options.tooltipCallback(n),f={content:u,delay:0,x:i,y:r,contentContainsHTML:!0};t.Tooltip.show(f)}},n.BAR_ID_PREFIX="bar",n.FOCUSED_CSS_CLASSNAME="focused",n.SVG_NAMESPACE="http://www.w3.org/2000/svg",n}();n.StackedBarChartView=r})(t=n.Graphs||(n.Graphs={}))})(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var i=Microsoft.Plugin,t=Microsoft.VisualStudio.DiagnosticsHub,r=function(){function r(i){var e,u,f;for(this._scaleChangedEvent=new t.AggregatedEvent,this._config=i,this._graphResources=new n.GraphResources(this._config.resources),this._timeRange=this._config.timeRange||new t.JsonTimespan(new t.BigNumber(0,0),new t.BigNumber(0,0)),this._container=document.createElement("div"),r.validateConfiguration(this._config),this._dataSource=this._config.jsonConfig.Series[0].DataSource,i.pathToScriptFolder&&i.loadCss&&(i.loadCss(i.pathToScriptFolder+"/js/hubGraphs/StackedBarChart.css"),i.loadCss(i.pathToScriptFolder+"/DataCategoryStyles.css")),this._config.scale=this._config.scale||{},this._config.scale.minimum=0,this._config.scale.maximum=120,this._config.scale.axes=[],u=1;u<64;u++)this._config.scale.axes.push({value:u*100});for(this._config.legend=this._config.legend||[],e=this._config.jsonConfig.Series,u=0;u<e.length;u++)f=e[u],this._config.legend.push({color:f.Color,legendText:this._graphResources.getString(f.Legend),legendTooltip:f.LegendTooltip?this._graphResources.getString(f.LegendTooltip):null})}return Object.defineProperty(r.prototype,"container",{get:function(){return this._container},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"scaleChangedEvent",{get:function(){return this._scaleChangedEvent},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"containerOffsetWidth",{get:function(){return this._containerOffsetWidth===undefined&&(this._containerOffsetWidth=this._container.offsetWidth),this._containerOffsetWidth},enumerable:!0,configurable:!0}),r.prototype.onDataUpdate=function(){},r.prototype.addSeriesData=function(){},r.prototype.getDataPresenter=function(){for(var i,e={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)},r=new n.StackedBarChartPresenter(e),u=[],f=this._config.jsonConfig.Series,t=0;t<f.length;t++)i=f[t],u.push({cssClass:i.CssClass,name:i.Category,sortOrder:t+1});return r.addSeries(u),r},r.prototype.getGranularity=function(){var t=this._config.jsonConfig.BarGap+this._config.jsonConfig.BarWidth,n=parseInt(this._timeRange.elapsed.value);return n<=0||this.containerOffsetWidth<=0?0:Math.floor(t/this.containerOffsetWidth*n)},r.prototype.removeInvalidPoints=function(){},r.prototype.render=function(n){n&&(this._containerOffsetWidth=undefined);this._config.jsonConfig.GraphBehaviour==2&&this.setData(this._timeRange)},r.prototype.resize=function(){this.render(!0,!1)},r.prototype.onViewportChanged=function(n){this._timeRange.equals(n.currentTimespan)||(this._timeRange=n.currentTimespan,this.render())},r.validateConfiguration=function(n){if(!n)throw new Error(i.Resources.getErrorString("JSPerf.1070"));var t=n.jsonConfig;if(!t)throw new Error(i.Resources.getErrorString("JSPerf.1071"));if(!t.Series||t.Series.length===0)throw new Error(i.Resources.getErrorString("JSPerf.1072"));if(t.BarWidth=t.BarWidth||4,t.BarGap=t.BarGap||0,t.ShowStackGap=t.ShowStackGap||!1,!n.height||n.height<0||t.BarWidth<0)throw new Error(i.Resources.getErrorString("JSPerf.1048"))},r.prototype.createTooltip=function(n){var i=this._graphResources.getString("CPUTooltipTimeLabel")+": "+t.RulerUtilities.formatTime(t.BigNumber.convertFromNumber(n.x),1)+"<br />";return i+=this._graphResources.getString("CPUTooltipCategoryLabel")+": "+this._graphResources.getString(n.series)+"<br />",i+(this._graphResources.getString("CPUTooltipUtilizationLabel")+": "+(Math.round(n.height*100)/100).toLocaleString(undefined,{minimumFractionDigits:2})+"%")},r.prototype.createAriaLabel=function(n){var i=(Math.round(n.height*100)/100).toLocaleString(undefined,{minimumFractionDigits:2}),r=t.RulerUtilities.formatTime(t.BigNumber.convertFromNumber(n.x),1);return this._graphResources.getString("CPUBarAriaLabel",this._graphResources.getString(n.series),i,r)},r.prototype.setData=function(t){var r=this;(this._settingDataPromise&&(this._settingDataPromise.cancel(),this._settingDataPromise=null),this._dataSource&&this._dataSource.CounterId&&this._dataSource.AnalyzerId)&&(this._settingDataPromise=this.getDataWarehouse().then(function(u){var f=r.getGranularity();return f>0?n.DataUtilities.getFilteredResult(u,r._dataSource.AnalyzerId,r._dataSource.CounterId,t,{granularity:f.toString()}):i.Promise.as({p:[]})}).then(function(t){var e,u,i,o,f;if(r._chart&&(r._container.removeChild(r._chart.rootElement),r._chart=null),t&&t.p){for(e=[],u=0;u<t.p.length;u++)i=t.p[u],o=i.t.h*4294967296+i.t.l,e.push({series:i.c,x:o,height:i.u});f=r.getDataPresenter();f.addData(e);r._chart=new n.StackedBarChartView;r._chart.presenter=f;r._scaleChangedEvent.invokeEvent({minimum:0,maximum:f.maximumYValue});r._container.appendChild(r._chart.rootElement)}}).then(function(){r._settingDataPromise=null}))},r.prototype.getDataWarehouse=function(){var n=this;return this._dataWarehouse?i.Promise.as(this._dataWarehouse):t.DataWarehouse.loadDataWarehouse().then(function(t){return n._dataWarehouse=t,n._dataWarehouse})},r}();n.StackedBarGraph=r})(t=n.Graphs||(n.Graphs={}))})(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=Microsoft.VisualStudio.DiagnosticsHub,f=function(){function n(n,t){this.padding=40;this._globalRuler=n;this._markEventModel=t}return Object.defineProperty(n.prototype,"globalRuler",{get:function(){return this._globalRuler},enumerable:!0,configurable:!0}),n.prototype.getMarks=function(n){return this._markEventModel.getMarkEvents(this._globalRuler.totalRange,n)},n.prototype.getMarkTooltip=function(n){return this._markEventModel.getMarkTooltip(n)},n.prototype.setSelectionRange=function(n,t){t===void 0&&(t=!1);this._globalRuler.setSelection(n,t)},n.prototype.setActiveRange=function(n){this._globalRuler.setActiveRange(n)},n}(),u;t.RulerViewModel=f;u=function(){function t(t){var r=this;if(this._parentContainer=document.getElementById(t),!this._parentContainer)throw new Error(i.Resources.getErrorString("JSPerf.1034"));n.Program.addEventListener(n.ProgramEvents.Resize,function(n){r._rulerControl&&r._rulerControl.resize(n)})}return Object.defineProperty(t.prototype,"viewModel",{set:function(n){this.unregisterViewModelEvents();this._viewModel=n;this.registerViewModelEvents()},enumerable:!0,configurable:!0}),t.prototype.focus=function(){this._focusRequested=!1;this._rulerControl?this._rulerControl.container.focus():this._focusRequested=!0},t.prototype.render=function(){var n=this,t;this._gettingMarksPromise&&(this._gettingMarksPromise.cancel(),this._gettingMarksPromise=null);this._parentContainer.innerHTML="";this._rulerControl&&this._rulerControl.dispose();t=new r.RulerConfig;t.timeRange=this._viewModel.globalRuler.totalRange.toJsonTimespan();var u=[],f=[],e=this._viewModel.getMarks(0).then(function(n){u=n}),o=this._viewModel.getMarks(1).then(function(n){f=n});this._gettingMarksPromise=i.Promise.join([e,o]).then(function(){t.markSeries=[{id:2,label:i.Resources.getString("RulerUserMarkLabel"),tooltip:i.Resources.getString("UserMarkTooltip"),data:f},{id:1,label:i.Resources.getString("RulerLifecycleMarkLabel"),tooltip:i.Resources.getString("LifecycleMarkTooltip"),data:u}];n._rulerControl=new r.Ruler(t);n._parentContainer.appendChild(n._rulerControl.container);n._rulerControl.resize(null);n._focusRequested&&n.focus()});this._gettingMarksPromise.done(function(){n._gettingMarksPromise=null})},t.prototype.unregisterViewModelEvents=function(){this._viewModel&&(this._viewModel.globalRuler.removeEventListener(n.GlobalRuler.SelectionChangedEventType,this.onGlobalRulerSelectionChanged.bind(this)),this._viewModel.globalRuler.removeEventListener(n.GlobalRuler.ActiveRangeChangedEventType,this.onGlobalRulerActiveRangeChange.bind(this)))},t.prototype.registerViewModelEvents=function(){this._viewModel&&(this._viewModel.globalRuler.addEventListener(n.GlobalRuler.SelectionChangedEventType,this.onGlobalRulerSelectionChanged.bind(this)),this._viewModel.globalRuler.addEventListener(n.GlobalRuler.ActiveRangeChangedEventType,this.onGlobalRulerActiveRangeChange.bind(this)))},t.prototype.adjustSelection=function(n,t){t===void 0&&(t=!1);this._viewModel&&this._viewModel.setSelectionRange(n,t)},t.prototype.onGlobalRulerActiveRangeChange=function(){if(this._viewModel&&this._rulerControl){var n={currentTimespan:this._viewModel.globalRuler.activeRange.toJsonTimespan(),selectionTimespan:this._viewModel.globalRuler.selection.toJsonTimespan(),isIntermittent:!1};this._rulerControl.onViewportChanged(n)}},t.prototype.onGlobalRulerSelectionChanged=function(){if(this._viewModel&&this._rulerControl){var n={currentTimespan:this._viewModel.globalRuler.activeRange.toJsonTimespan(),selectionTimespan:this._viewModel.globalRuler.selection.toJsonTimespan(),isIntermittent:!1};this._rulerControl.onViewportChanged(n)}},t}();t.RulerView=u})(t=n.F12||(n.F12={}))})(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=function(n){function t(t,i){n.call(this,"dividerTemplate");this._callbacks=[];this._container=t;this._backdrop=this.findElement("dividerBackdrop");this._divider=this.findElement("divider");this._divider.addEventListener("mousedown",this.onMouseDown.bind(this),!0);this._container.appendChild(this._backdrop);this._container.appendChild(this._divider);this._minX=0;this.offsetX=i;this._onMouseMoveHandler=this.onMouseMove.bind(this);this._onMouseUpHandler=this.onMouseUp.bind(this)}return __extends(t,n),Object.defineProperty(t.prototype,"height",{set:function(n){this._divider.style.height=n+"px";this._backdrop.style.height=n+"px"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"offsetX",{get:function(){if(this._divider.style.left){var n=parseInt(this._divider.style.left);if(!isNaN(n))return n}return this._divider.offsetLeft},set:function(n){var t=n;t<this._minX?t=this._minX:t>this._maxX&&(t=this._maxX);this._divider.style.left=t+"px"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minX",{get:function(){return this._minX},set:function(n){this._minX=n;this.offsetX<this._minX&&(this.offsetX=this._minX)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxX",{get:function(){return this._maxX},set:function(n){this._maxX=n;this.offsetX>this._maxX&&(this.offsetX=this._maxX)},enumerable:!0,configurable:!0}),t.prototype.onMouseDown=function(){this._backdrop.style.zIndex="1000";this._backdrop.appendChild(this._divider);document.addEventListener("mousemove",this._onMouseMoveHandler,!0);document.addEventListener("mouseup",this._onMouseUpHandler,!0)},t.prototype.onMouseMove=function(n){if(this.updateOffsetX(n.x)&&this.onMoved)this.onMoved(this._divider.offsetLeft);n.stopImmediatePropagation();n.preventDefault()},t.prototype.onMouseUp=function(n){if(this._container.firstChild?this._container.insertBefore(this._divider,this._container.firstChild):this._container.appendChild(this._divider),this._backdrop.style.zIndex="-1",document.removeEventListener("mousemove",this._onMouseMoveHandler,!0),document.removeEventListener("mouseup",this._onMouseUpHandler,!0),this.updateOffsetX(n.x)&&this.onMoved)this.onMoved(this._divider.offsetLeft)},t.prototype.updateOffsetX=function(n){n=n-this._backdrop.clientLeft;var t=n<this._divider.offsetLeft||n>this._divider.offsetLeft+this._divider.offsetWidth;return t?(this.offsetX=n,!0):!1},t}(Common.Controls.Legacy.TemplateControl);n.Divider=t}(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var r=Microsoft.Plugin,i=Microsoft.VisualStudio.DiagnosticsHub,f=function(){function n(n,i,r,u,f){this._globalRuler=n;this._graphConfigs=[];this._session=r;this.padding=u;this.toolbarViewModel=f;this._graphRulerViewModel=new t.RulerViewModel(n,i);this._graphRulerViewModel.padding=u}return Object.defineProperty(n.prototype,"globalRuler",{get:function(){return this._globalRuler},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"graphConfigs",{get:function(){return this._graphConfigs},set:function(n){this._graphConfigs=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"graphRulerViewModel",{get:function(){return this._graphRulerViewModel},enumerable:!0,configurable:!0}),n.prototype.getSwimlaneConfigurationFromManagedConfig=function(n){var t=new i.SwimlaneConfiguration(n,this.globalRuler.activeRange.toJsonTimespan(),2);return t.graph.registeredClass=n.JavaScriptClassName?i.RegisterNamespace.getRegisteredClass(n.JavaScriptClassName):i.RegisterNamespace.getRegisteredClass("Microsoft.VisualStudio.DiagnosticsHub.MultiSeriesGraph"),t.graph.legend=[],t.graph.scale.minimum=n.JsonObject.MinValue,t.graph.scale.maximum=n.JsonObject.MaxValue,t},n}(),u;t.SwimlanesViewModel=f;u=function(u){function f(i){var e=this,f;if(u.call(this,"swimLanesView"),f=document.getElementById(i),!i)throw new Error(r.Resources.getErrorString("JSPerf.1034"));f.appendChild(this.rootElement);this._swimlanes=[];this._swimlanesContainer=this.findElement("swimlanesContainer");this._graphRulerView=new t.RulerView(this.findElement("graphRulerView").id);this._onGlobalRulerActiveRangeChange=this.onGlobalRulerActiveRangeChange.bind(this);this._onGlobalRulerSelectionChanged=this.onGlobalRulerSelectionChanged.bind(this);this._triggerResize=function(){return n.Program.triggerResize()};n.Program.addEventListener(n.ProgramEvents.Resize,function(n){return e.onResize(n)})}return __extends(f,u),Object.defineProperty(f.prototype,"viewModel",{get:function(){return this._viewModel},set:function(n){this.unregisterViewModelEvents();this.removeSwimlanes();this._viewModel=n;this._viewModel&&(this._graphRulerView.viewModel=this._viewModel.graphRulerViewModel,this.setupSwimlanes());this.registerViewModelEvents()},enumerable:!0,configurable:!0}),f.prototype.focusOnRuler=function(){this._graphRulerView.focus()},f.prototype.render=function(){this._graphRulerView.render()},f.prototype.getNewSwimlaneContainer=function(){var n=document.createElement("div");return n.id=f.SWIMLANE_CONTAINER_ID_PREFIX+this._swimlanesContainer.childElementCount.toString(),this._swimlanesContainer.appendChild(n),n},f.prototype.getToolbarViewModel=function(){return this._viewModel&&this._viewModel.toolbarViewModel},f.prototype.onResize=function(n){this._swimlanes.forEach(function(t){t.resize(n)})},f.prototype.registerViewModelEvents=function(){this._viewModel&&(this._viewModel.globalRuler.addEventListener(n.GlobalRuler.SelectionChangedEventType,this._onGlobalRulerSelectionChanged),this._viewModel.globalRuler.addEventListener(n.GlobalRuler.ActiveRangeChangedEventType,this._onGlobalRulerActiveRangeChange))},f.prototype.unregisterViewModelEvents=function(){this._viewModel&&(this._viewModel.globalRuler.removeEventListener(n.GlobalRuler.SelectionChangedEventType,this._onGlobalRulerSelectionChanged),this._viewModel.globalRuler.removeEventListener(n.GlobalRuler.ActiveRangeChangedEventType,this._onGlobalRulerActiveRangeChange))},f.prototype.removeSwimlanes=function(){while(this._swimlanes.length>0){var n=this._swimlanes.pop();n.dispose()}this._swimlanesContainer.innerHTML=""},f.prototype.setupSwimlanes=function(){var u,s,f,n,r,t;if(this._viewModel.graphConfigs)for(!this._swimlaneVisibilityService&&PerfTools.Common.SwimlaneViewStateServiceFactory.getSwimlaneViewStateService&&(this._swimlaneVisibilityService=PerfTools.Common.SwimlaneViewStateServiceFactory.getSwimlaneViewStateService()),u=0;u<this._viewModel.graphConfigs.length;u++){s=this._viewModel.graphConfigs[u];f=this.getNewSwimlaneContainer();this.setupSelectionContextMenu(f);n=this._viewModel.getSwimlaneConfigurationFromManagedConfig(s);r=new n.graph.registeredClass(n.graph);n.header.unit=n.graph.unit;n.header.isBodyExpanded=this._swimlaneVisibilityService?this._swimlaneVisibilityService.getSwimlaneVisibilitySynchronous(n.id):!0;t=new i.SwimlaneBase(n.header,n.graph.height,n.timeRange);r.scaleChangedEvent.addEventListener(t.onScaleChanged.bind(t));t.swimlaneVisibilityChangedEvent.addEventListener(this.toggleSwimlaneVisibility.bind(this,n.id));var h=new i.LocalizedUnitConverter(n.graph.jsonConfig.Units,n.graph.resources),e=new i.Scale(n.graph.scale,0,h),o=new i.Scale(n.graph.scale,1,h);r.scaleChangedEvent.addEventListener(e.onScaleChanged.bind(e));r.scaleChangedEvent.addEventListener(o.onScaleChanged.bind(o));t.addTitleControl(new i.Legend(n.graph.legend));t.addMainRegionControl(new i.SelectionOverlay(r,this._viewModel.globalRuler.activeRange.toJsonTimespan(),this._viewModel.globalRuler.selection.toJsonTimespan()));t.addMainRegionControl(new i.GridLineRenderer(n.timeRange));t.addLeftRegionControl(e);t.addRightRegionControl(o);this._swimlanes.push(t);f.appendChild(t.container);t.resize(null)}},f.prototype.setupSelectionContextMenu=function(){for(var u,n=this,f=[],i=0;i<arguments.length;i++)f[+i]=arguments[i];var t=this.getSelectionContextMenuIconNames(),e={callback:function(){n.getToolbarViewModel()&&n.getToolbarViewModel().zoomIn()},disabled:function(){return n.getToolbarViewModel()?!n.getToolbarViewModel().zoomInEnabled:!0},iconEnabled:t.zoomin.enabled,iconDisabled:t.zoomin.disabled,label:r.Resources.getString("ToolbarButtonZoomIn"),type:1},o={callback:function(){n.getToolbarViewModel()&&n.getToolbarViewModel().resetZoom()},disabled:function(){return n.getToolbarViewModel()?!n.getToolbarViewModel().resetZoomEnabled:!0},iconEnabled:t.resetZoom.enabled,iconDisabled:t.resetZoom.disabled,label:r.Resources.getString("ToolbarButtonResetZoom"),type:1},s={callback:function(){n.getToolbarViewModel()&&n.getToolbarViewModel().clearSelection()},disabled:function(){return n.getToolbarViewModel()?!n.getToolbarViewModel().clearSelectionEnabled:!0},iconEnabled:t.clearSelection.enabled,iconDisabled:t.clearSelection.disabled,label:r.Resources.getString("ToolbarButtonClearSelection"),type:1};for(this._selectionActionContextMenu=r.ContextMenu.create([e,o,s]),u=0;u<f.length;u++)this._selectionActionContextMenu.attach(f[u])},f.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"}}},f.prototype.onGlobalRulerActiveRangeChange=function(){if(this._viewModel){var n={currentTimespan:this._viewModel.globalRuler.activeRange.toJsonTimespan(),selectionTimespan:this._viewModel.globalRuler.selection.toJsonTimespan(),isIntermittent:!1};this._swimlanes.forEach(function(t){t.onViewportChanged(n)})}},f.prototype.onGlobalRulerSelectionChanged=function(){if(this._viewModel){var n={currentTimespan:this._viewModel.globalRuler.activeRange.toJsonTimespan(),selectionTimespan:this._viewModel.globalRuler.selection.toJsonTimespan(),isIntermittent:!1};this._swimlanes.forEach(function(t){t.onViewportChanged(n)})}},f.prototype.toggleSwimlaneVisibility=function(n,t){this._swimlaneVisibilityService.setSwimlaneVisibility(n,t);this._triggerResize()},f.SWIMLANE_CONTAINER_ID_PREFIX="swimlaneContainer_",f}(Common.Controls.Legacy.TemplateControl);t.SwimlanesView=u})(t=n.F12||(n.F12={}))}(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r};Assert=F12.Tools.Utility.Assert,function(n){"use strict";var t=Microsoft.Plugin,i=Common.DomHelper,e,o,r,u,f;(function(n){n[n.ImageDecoding=0]="ImageDecoding";n[n.GC=1]="GC";n[n.Loading=2]="Loading";n[n.Rendering=3]="Rendering";n[n.Scripting=4]="Scripting";n[n.Styling=5]="Styling";n[n.Measure=6]="Measure";n[n.Frame=7]="Frame";n[n.Idle=8]="Idle"})(n.EventCategory||(n.EventCategory={}));e=n.EventCategory,function(n){n[n.Html=0]="Html";n[n.String=1]="String"}(n.TextFormat||(n.TextFormat={}));o=n.TextFormat;r=function(n){function i(t){n.call(this,t||"VisualProfiler.eventDataTooltip")}return __extends(i,n),i.initialize=function(){Common.ObservableHelpers.defineProperty(i,i.EventPropertyName,null,function(n){return n.onEventChanged()})},i.prototype.onEventChanged=function(){if(this.event){var n=this.getNamedElement("durationExc"),i=this.getNamedElement("durationInc"),r=this.getNamedElement("startTime");n.textContent=t.Resources.getString("DurationLabelExclusive",Common.FormattingHelpers.getPrettyPrintTime(this.event.exclusiveDuration));i.textContent=t.Resources.getString("DurationLabelInclusive",Common.FormattingHelpers.getPrettyPrintTime(this.event.timeSpan.elapsed));r.textContent=t.Resources.getString("StartTimeLabel",Common.FormattingHelpers.getPrettyPrintTime(this.event.timeSpan.begin))}},i.EventPropertyName="event",i}(Common.TemplateControl);n.EventDataTooltip=r;r.initialize();u=function(u){function f(n){u.call(this,n||"VisualProfiler.eventDataTemplate")}return __extends(f,u),Object.defineProperty(f.prototype,"canViewSource",{get:function(){var n=this.model.context?this.model.context.sourceInfo:null;return f.hasViewSourceInfo(n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"canShowInDomExplorer",{get:function(){return i.isAvailable&&this.model.canShowInDomExplorer()},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"parentTimeSpan",{get:function(){return this._parentTimeSpan},set:function(n){this._parentTimeSpan&&n&&this._parentTimeSpan.equals(n)||(this._parentTimeSpan=n,this.updateEventUi())},enumerable:!0,configurable:!0}),f.addTokens=function(n,t,i){var r,u,e,f;switch(i){case 0:r=Common.TokenExtractor.getHtmlTokens(n);break;case 1:r=Common.TokenExtractor.getStringTokens(n)}if(r&&r.length>0)for(u=0;u<r.length;u++)e=r[u],f=document.createElement("span"),f.className=Common.TokenExtractor.getCssClass(e.type),f.textContent=e.value,t.appendChild(f);else t.textContent=n},f.hasViewSourceInfo=function(n){return n&&n.source!=="<DOM>"},f.setViewSourceHandler=function(n,i,r,u){n.addEventListener("mouseover",function(n){return f.showSourceInfoTooltip(n,i,u)});n.addEventListener("mouseout",function(){return t.Tooltip.dismiss()});n.onclick=f.contextMouseHandler.bind(this,i);r&&(n.tabIndex=0,n.onkeydown=f.contextKeyHandler.bind(this,i))},f.showSourceInfoTooltip=function(n,i,r){if(i){var u=i,f=new Common.Controls.Legacy.SourceInfoTooltip(u,r,"SourceInfoEventLabel"),e={content:f.html,contentContainsHTML:!0};t.Tooltip.show(e);n.stopImmediatePropagation()}},f.tryClearDomElementHighlight=function(){i.isAvailable&&i.clearHighlight()},f.prototype.onApplyTemplate=function(){var n=this;u.prototype.onApplyTemplate.call(this);this._bar=this.getNamedElement("bar");Assert.isTrue(this._bar,"Expecting an element named bar");this._durationText=this.getNamedElement("durationText");Assert.isTrue(this._durationText,"Expecting an element named durationText");this._eventDataTemplateNameCell=this.getNamedElement("eventDataTemplateNameCell");Assert.isTrue(this._eventDataTemplateNameCell,"Expecting an element named eventDataTemplateNameCell");this._eventData=this.getNamedElement("eventData");Assert.isTrue(this._eventData,"Expecting an element named eventData");this._eventName=this.getNamedElement("eventName");Assert.isTrue(this._eventName,"Expecting an element named eventName");this._bar.addEventListener("mouseover",function(){return n.showBarTooltip()});this._bar.addEventListener("mouseout",function(){return t.Tooltip.dismiss()});this._eventName.addEventListener("mouseover",function(t){return n.showEventNameTooltip(t)});this._eventName.addEventListener("mouseout",function(){return t.Tooltip.dismiss()})},f.prototype.tryViewSource=function(){if(this.canViewSource){var n=this.model.context.sourceInfo;f.viewSource(n.source,n.line,n.column)}},f.prototype.tryHighlightDomElement=function(){var n=this.model.getUidChain();this.canShowInDomExplorer&&n?i.highlightElement(n):f.tryClearDomElementHighlight()},f.prototype.trySelectInDomExplorer=function(){if(this.canShowInDomExplorer){var n=this.model.getUidChain();n&&i.selectDomElement(n)}},f.prototype.onModelChanged=function(){u.prototype.onModelChanged.call(this);this._sourceMapChangedEventRegistration&&(this._sourceMapChangedEventRegistration.unregister(),this._sourceMapChangedEventRegistration=null);this.model&&(this._sourceMapChangedEventRegistration=this.model.sourceInfoChanged.addHandler(this.updateEventUi.bind(this)));this.updateEventUi()},f.contextKeyHandler=function(n,t){t.keyCode!==13&&t.keyCode!==32||t.ctrlKey||t.altKey||t.shiftKey||f.viewSource(n.source,n.line,n.column)},f.contextMouseHandler=function(n){window.setImmediate(function(){f.viewSource(n.source,n.line,n.column)})},f.setBarCss=function(n,t){n.className="eventBar "+t.getCssClass();var i=t.getBarCssClass();i&&n.classList.add(i)},f.viewSource=function(i,r,u){t.Host.showDocument(i,r,u).done(function(){},function(){n.Program.hostShell.setStatusBarText(t.Resources.getString("UnableToNavigateToSource"),!0)})},f.prototype.getContextSpan=function(n,t,i,r){var u=document.createElement("span"),e=t,o,s;return i.source.indexOf(t,i.source.length-t.length)!==-1&&(o=i.source.substring(0,i.source.length-t.length),e=r.source.replace(o,"")),u.textContent=e,s=this.model.context?this.model.context.sourceInfo:null,f.hasViewSourceInfo(i)&&(u.className="BPT-FileLink",f.setViewSourceHandler(u,i,!1,n)),u},f.prototype.showBarTooltip=function(){var n,i;this.model&&(n=new r,n.event=this.model,i={content:n.rootElement.innerHTML,contentContainsHTML:!0},t.Tooltip.show(i))},f.prototype.showEventNameTooltip=function(n){var i,r,u;this.model&&(i=n.currentTarget,r=this._eventName.textContent,i.offsetWidth<i.scrollWidth&&(u={content:r},t.Tooltip.show(u)))},f.prototype.updateEventUi=function(){var t,i,u,e,r;if(this.model&&this._parentTimeSpan){if(t=this.model,t.context){this._eventName.textContent="";i=function(n,t){if(n){var i=document.createElement("span");i.textContent=n;t.appendChild(i)}};i(t.fullName.substring(0,t.context.span.startIndex),this._eventName);var o=t.sourceInfo?t.sourceInfo:t.context.sourceInfo,s=t.context.sourceInfo,h=t.fullName.substring(t.context.span.startIndex,t.context.span.endIndex),c=this.getContextSpan(t.name,h,s,o);this._eventName.appendChild(c);i(t.fullName.substring(t.context.span.endIndex),this._eventName)}else t instanceof n.ProfilerEvent&&Common.TokenExtractor.isHtmlExpression(t.fullName)?(this._eventName.textContent="",f.addTokens(t.fullName,this._eventName,0)):t instanceof n.ProfilerEvent&&Common.TokenExtractor.isStringExpression(t.fullName)?(this._eventName.textContent="",f.addTokens(t.fullName,this._eventName,1)):this._eventName.textContent=t.fullName;u=(t.timeSpan.begin.nsec-this._parentTimeSpan.begin.nsec)/this._parentTimeSpan.elapsed.nsec*100;e=t.timeSpan.elapsed.nsec/this._parentTimeSpan.elapsed.nsec*100;this._bar.style.marginLeft=u+"%";this._bar.style.width=e+"%";f.setBarCss(this._bar,t);r=Common.FormattingHelpers.getPrettyPrintTime(t.timeSpan.elapsed);t.exclusiveDuration.equals(t.timeSpan.elapsed)||(r+=" ("+Common.FormattingHelpers.getPrettyPrintTime(t.exclusiveDuration)+")");this._durationText.textContent=r}},f}(Common.Controls.TreeItemDataTemplate);n.EventDataTemplate=u;f=function(r){function f(i){var u=this;r.call(this,i);this._columnsCssRule=this.getColumnsCssRule();this.ariaLabel=t.Resources.getString("EventsTimelineAriaLabel");this.dataItemTemplate=n.EventDataTemplate;this.onGetItemContainerAriaLabel=function(n){return u.getItemContainerAriaLabel(n)};this.onScrolled=function(){Notifications.notify(n.ResponsivenessNotifications.GridScrolled);n.Program.traceWriter.raiseEvent(107)};n.Program.addEventListener(n.ProgramEvents.Resize,function(){u._columnsCssRule=u.getColumnsCssRule();u.invalidateSizeCache();u._viewModel&&(u.setDividerBounds(),u.resizeColumns(u._divider.offsetX));u.onWindowResize()});this._divider=new n.Divider(this.panel.rootElement,this.eventNameColumnWidth);this._divider.minX=90;this._divider.onMoved=function(t){u.resizeColumns(t);n.Program.triggerResize()};this.setDividerBounds();this._verticalRulerLineElementsFactory=Common.ElementRecyclerFactory.forDivWithClass(this.rootElement,"verticalRulerLine");this.invalidateSizeCache()}return __extends(f,r),Object.defineProperty(f.prototype,"dataColumnLeft",{get:function(){var n=this._columnsCssRule.style.msGridColumns.split(" ");return parseInt(n[0])+parseInt(n[1])},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"dataColumnWidth",{get:function(){if(this._dataColumnWidth===null){var n=this.panel.rootElement.offsetWidth-this.panel.rootElement.clientWidth;this._dataColumnWidth=this.rootElement.offsetWidth-this.dataColumnLeft-n}return this._dataColumnWidth},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"eventNameColumnWidth",{get:function(){var n=this._columnsCssRule.style.msGridColumns.split(" ");return parseInt(n[0])},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"rulerScale",{get:function(){return this._rulerScale},set:function(n){this._rulerScale!==n&&(this._rulerScale=n)},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"timeSpan",{set:function(n){this._timeSpan=n},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"viewModel",{set:function(n){this._viewModel=n},enumerable:!0,configurable:!0}),f.prototype.filterToEvent=function(){var e=this,r=this.getSelectedEventDataTemplate(),u,f;if(r){r.expand();var o=this.selectedItem,t=this.getFilterTimeSpan(o),i=this._viewModel.globalRuler.activeRange;i.equals(this._viewModel.globalRuler.totalRange)||(u=t.begin.nsec<i.begin.nsec?t.begin:i.begin,f=t.end.nsec>i.end.nsec?t.end:i.end,this._viewModel.globalRuler.setActiveRange(new n.TimeSpan(u,f)));this._viewModel.timeSpan=t;this._viewModel.globalRuler.setSelection(t);window.setImmediate(function(){var n=e.getSelectedItemContainer();n&&n.focus()})}},f.prototype.invalidateSizeCache=function(){this._dataColumnWidth=null;r.prototype.invalidateSizeCache.call(this)},f.prototype.onInvalidated=function(){this.updateDividerHeight()},f.prototype.onKeyDownOverride=function(n){var t=!1;switch(n.keyCode){case 13:this.viewSource();t=!0}return t||(t=r.prototype.onKeyDownOverride.call(this,n)),t},f.prototype.onSelectedItemChangedOverride=function(){this.updateHighlightedElement()},f.prototype.onShowContextMenu=function(){var t=this.getSelectedEventDataTemplate(),n;t&&this._contextMenu&&(n=t.rootElement.getBoundingClientRect(),this._contextMenu.show(n.left+n.width/2,n.top+n.height/2,n.width))},f.prototype.renderVerticalRulerLines=function(){var t=this._viewModel.getVerticalRulerLinePositions(this.dataColumnWidth),n,i,r;for(this._verticalRulerLineElementsFactory.start(),n=0;n<t.length;++n)i=this._verticalRulerLineElementsFactory.getNext(),r=this.dataColumnWidth*t[n]/100+this.dataColumnLeft,this.positionVerticalRulerLine(i,r,this.panel.viewportHeight);this._verticalRulerLineElementsFactory.stop()},f.prototype.updateHighlightedElement=function(){var n=this.getSelectedEventDataTemplate();n?n.tryHighlightDomElement():u.tryClearDomElementHighlight()},f.prototype.clearHighlightedElement=function(){u.tryClearDomElementHighlight()},f.prototype.updateContainerOverride=function(n,t){r.prototype.updateContainerOverride.call(this,n,t);var i=n.template;i&&(i.parentTimeSpan=this._timeSpan,i.rootElement.getAttributeNode("data-plugin-contextmenu")||this.setupEventContextMenu(i.rootElement))},f.prototype.positionVerticalRulerLine=function(n,t,i){n.style.left=t+"px";n.style.height=i+"px";n.style.top="0px"},f.prototype.getColumnsCssRule=function(){return n.EventsTimelineView.getCssRule("VisualProfiler",".eventDataTemplate")},f.prototype.resizeColumns=function(n){this._dataColumnWidth=null;this.updateColumnWidth(n);this.dataColumnWidthChanged&&this.dataColumnWidthChanged();this.renderVerticalRulerLines()},f.prototype.setupEventContextMenu=function(){for(var u,n=this,f=[],r=0;r<arguments.length;r++)f[+r]=arguments[r];if(!this._contextMenu){var e=this.getSelectionContextMenuIconNames(),o={callback:function(){n.filterToEvent()},label:t.Resources.getString("FilterToEventContextMenu"),type:1,disabled:function(){return!1}},s={callback:function(){n.clearSelection()},label:t.Resources.getString("ToolbarButtonClearSelection"),type:1,iconEnabled:e.clearSelection.enabled,iconDisabled:e.clearSelection.disabled,disabled:function(){return n.isClearFilterDisabled()}},h={callback:function(){return window.setImmediate(n.showInDomExplorer.bind(n))},disabled:this.isShowInDomExplorerCommandDisabled.bind(this),hidden:function(){return!i.isAvailable},label:t.Resources.getString("ShowInDomExplorerLabel"),type:1},c={accessKey:t.Resources.getString("EnterKey"),callback:function(){return window.setImmediate(n.viewSource.bind(n))},disabled:this.isViewSourceCommandDisabled.bind(this),label:t.Resources.getString("ViewSourceLabel"),type:1};this._contextMenu=t.ContextMenu.create([o,s,{type:3},h,c])}for(u=0;u<f.length;u++)this._contextMenu.attach(f[u])},f.prototype.getSelectionContextMenuIconNames=function(){return n.Program.hostType===1?{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"}}:n.Program.hostType===0?{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"}}:void 0},f.prototype.isClearFilterDisabled=function(){return this._viewModel.globalRuler.selection.equals(this._viewModel.globalRuler.activeRange)},f.prototype.isShowInDomExplorerCommandDisabled=function(){var n=this.getSelectedEventDataTemplate();return!n||!n.canShowInDomExplorer},f.prototype.isViewSourceCommandDisabled=function(){var n=this.getSelectedEventDataTemplate();return!n||!n.canViewSource},f.prototype.getFilterTimeSpan=function(t){var i=t.timeSpan,r=this._viewModel.globalRuler.totalRange,u=Math.max(i.begin.nsec,r.begin.nsec),f=Math.min(i.end.nsec,r.end.nsec);return new n.TimeSpan(new n.TimeStamp(u),new n.TimeStamp(f))},f.prototype.clearSelection=function(){var t=this,n=this.getSelectedEventDataTemplate();n&&n.collapse();this._viewModel.globalRuler.setSelection(this._viewModel.globalRuler.activeRange);window.setImmediate(function(){var n=t.getSelectedItemContainer();n&&n.focus()})},f.prototype.showInDomExplorer=function(){var n=this.getSelectedEventDataTemplate();n&&n.trySelectInDomExplorer()},f.prototype.viewSource=function(){var n=this.getSelectedEventDataTemplate();n&&n.tryViewSource()},f.prototype.setDividerBounds=function(){var n=this.panel.rootElement.offsetWidth;n>0&&(this._divider.maxX=n/2)},f.prototype.getSelectedEventDataTemplate=function(){var n=this.getSelectedItemContainer();return n?n.template:null},f.prototype.getItemContainerAriaLabel=function(i){var r,u=i.item,s,o,f,e,h;if(u){for(r=u.name,r+=" , "+t.Resources.getString("StartTimeLabel",Common.FormattingHelpers.getPrettyPrintTime(u.timeSpan.begin)),r+=" , "+t.Resources.getString("DurationLabelInclusive",Common.FormattingHelpers.getPrettyPrintTime(u.timeSpan.elapsed)),u.timeSpan.elapsed.equals(u.exclusiveDuration)||(r+=" , "+t.Resources.getString("DurationLabelExclusive",Common.FormattingHelpers.getPrettyPrintTime(u.exclusiveDuration))),r+=" , "+t.Resources.getString("ThreadContextLabel",u.contextThreadId||t.Resources.getString("UIThreadContext")),s=this._viewModel.getEventDetails(u),o=0;o<s.length;o++)r+=" , "+s[o].localizedName+": "+s[o].localizedValue;if(r+=" , "+u.getDescription(),f=n.EventDetailsView.GetAsyncFrames(u),f.length>0)for(r+=", "+t.Resources.getString("AsyncStackLabel"),e=0;e<f.length;e++){for(h=0;h<f[e].length;h++)r+=", "+f[e][h].name;e+1<f.length&&(r+=", "+t.Resources.getString("AsyncStackTransition"))}i.rootElement.setAttribute("aria-label",r)}else i.rootElement.removeAttribute("aria-label");return r},f.prototype.updateColumnWidth=function(n){(n===null||typeof n=="undefined")&&(n=this._divider.offsetX);var t=this._columnsCssRule.style.msGridColumns.split(" ");t[0]=n+"px";this._columnsCssRule.style.msGridColumns=t.join(" ")},f.prototype.updateDividerHeight=function(){if(this._divider){var n=Math.max(this.panel.virtualHeight,this.panel.actualHeight);this._divider.height=n}},f}(Common.Controls.TreeListControl);n.EventsTimelineListControl=f}(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,u=Microsoft.VisualStudio.DiagnosticsHub,f=function(){function n(n){this._interval=n}return Object.defineProperty(n.prototype,"tag",{get:function(){return typeof this._tag=="undefined"&&(this._tag="",this._interval.element&&this._interval.element.tag&&(this._tag=this._interval.element.tag.toLowerCase())),this._tag},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"cssId",{get:function(){return typeof this._cssId=="undefined"&&(this._cssId="",this._interval.element&&this._interval.element.id&&(this._cssId=this._interval.element.id)),this._cssId},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"cssClass",{get:function(){return typeof this._cssClass=="undefined"&&(this._cssClass="",this._interval.element&&this._interval.element.class&&(this._cssClass=this._interval.element.class)),this._cssClass},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"uidChain",{get:function(){return typeof this._uidChain=="undefined"&&(this._uidChain="",this._interval.element&&this._interval.element.uidChain&&(this._uidChain=this._interval.element.uidChain)),this._uidChain},enumerable:!0,configurable:!0}),n}(),i=function(){function i(t,r,u){this.details=[];this.sourceInfoChanged=new Common.EventSource;this._interval=t;this._asyncStackJson=t.asyncStackJson;this._category=r;this._contextThreadId=i.getContextThreadId(t,u);this._exclusiveTimeSpan=n.TimeStamp.fromNanoseconds(t.exclusiveDuration);this._timeSpan=new n.TimeSpan(n.TimeStamp.fromNanoseconds(t.begin),n.TimeStamp.fromNanoseconds(t.end))}return Object.defineProperty(i.prototype,"asyncStackJson",{get:function(){return this._asyncStackJson},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"category",{get:function(){return this._category},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"childrenCount",{get:function(){return this._interval.childrenCount},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"context",{get:function(){return this._interval.context},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"contextThreadId",{get:function(){return this._contextThreadId},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"exclusiveDuration",{get:function(){return this._exclusiveTimeSpan},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fullName",{get:function(){return this._interval.fullName},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hasChildren",{get:function(){return this.childrenCount>0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"id",{get:function(){return this._interval.id},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"interval",{get:function(){return this._interval},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isExpanded",{get:function(){return this._interval.isExpanded},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"level",{get:function(){return this._interval.level},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"name",{get:function(){return typeof this._name=="undefined"&&(this._name=this.createName()),this._name},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sourceInfo",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"timeSpan",{get:function(){return this._timeSpan},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"title",{get:function(){return this.name},enumerable:!0,configurable:!0}),i.convertBooleanToYesNoLabel=function(n){return n?"YesLabel":"NoLabel"},i.convertPropagationStatus=function(n){return{preventDefaultCalled:(n&1)!=0,stopImmediatePropagationCalled:(n&2)!=0,stopPropagationCalled:(n&4)!=0}},i.createElementString=function(n,i,r){var u="",f=!1;return n!==""?(f=!0,u+="<"+n):u+="<"+t.Resources.getString("UnknownElement"),i!==""&&(f=!0,u+=' id="'+i+'"'),r!==""&&(f=!0,u+=' class="'+r+'"'),u+=">",f===!1&&(u=""),u},i.createShortenedUrlTextWithQueryString=function(n){if(!n||n.indexOf("data:image")===0)return n;var t=n.split("/");return i.isFile(n)?t[t.length-1]:i.isUrl(n)&&t.length>3?"/"+t.slice(3,t.length).join("/"):n},i.prototype.createDetailInfo=function(n,i,r,u,f){var o,s,e;return o=u?t.Resources.getString(u):i,s=r?t.Resources.getString(r):n,e={propertyName:n,propertyValue:i,localizedName:s,localizedValue:o},f&&(e.sourceInfo=f),e},i.prototype.createName=function(){return t.Resources.getString(this._interval.name)},i.prototype.canShowInDomExplorer=function(){return!!this.getUidChain()},i.prototype.getBarCssClass=function(){return this._category===6?"bracket":null},i.prototype.getCssClass=function(){switch(this._category){case 1:return"dataScriptingGc";case 0:return"dataImageDecoding";case 2:return"dataLoading";case 3:return"dataRendering";case 4:return"dataScripting";case 5:return"dataStyling";case 6:return"dataMeasure";case 7:return"dataFrame";default:throw new Error(t.Resources.getErrorString("JSPerf.1033"))}},i.prototype.getDescription=function(){return""},i.prototype.getDetails=function(){return[]},i.prototype.getEventDetailsRequestInformation=function(){return[]},i.prototype.getThreadContext=function(){return this._contextThreadId===null?"":" ["+this._contextThreadId+"]"},i.prototype.getUidChain=function(){return null},i.prototype.setSourceDetails=function(n,i){var r={propertyName:"CallbackFunction",propertyValue:n.name,localizedName:t.Resources.getString("CallbackFunction"),localizedValue:n.name,sourceInfo:n};i.push(r)},i.prototype.updateSourceInfo=function(){},i.getContextThreadId=function(n,t){return n.beginThreadId!==t?n.beginThreadId:n.endThreadId!==t?n.endThreadId:null},i.createShortenedUrlText=function(n){return i.isUrl(n)?Common.ToolWindowHelpers.createShortenedUrlText(n):n},i.isFile=function(n){return n.match(/^(file|res|ms-appx):/i)?!0:!1},i.isUrl=function(n){return n.match(/^(https?|file|res|ms-appx):/i)?!0:!1},i}(),a,v,y,p,w,b,k,d,e,g,o,nt,tt,it,rt,ut,s,ft,et,h,ot,st,ht,ct,lt,c,at,vt,r,l,pt,yt;n.ProfilerEvent=i;a=function(n){function i(){n.apply(this,arguments)}return __extends(i,n),i.prototype.getDescription=function(){return t.Resources.getString("CssCalculationEventDescription")},i}(i);n.CssCalculationEvent=a;v=function(r){function u(n,t,i){r.call(this,n,t,i);this.updateSourceInfo()}return __extends(u,r),Object.defineProperty(u.prototype,"sourceInfo",{get:function(){return this._mappedSourceInfo},enumerable:!0,configurable:!0}),u.prototype.getDescription=function(){return t.Resources.getString("CssParsingEventDescription")},u.prototype.getDetails=function(){var t=[],n=this.sourceInfo;return n&&t.push(this.createDetailInfo("StylesheetUrl",n.source,"StylesheetUrlLabel",null,n)),t},u.prototype.updateSourceInfo=function(){var r=this,t;if(!this._originalSourceInfo)if(t=this.interval,t.url)this._originalSourceInfo={name:i.createShortenedUrlTextWithQueryString(t.url),line:1,column:1,source:t.url};else return;this._mappedSourceInfo=this._originalSourceInfo;n.SourceMappingHelper.getMappedSourceInfo(this._originalSourceInfo).done(function(n){r._mappedSourceInfo=n;r.sourceInfoChanged.invoke()})},u.prototype.isStylesheetInline=function(){var n=this.interval;return n.isInline},u}(i);n.CssParsingEvent=v;y=function(n){function r(t,i,r){n.call(this,t,i,r);this._ddTrackerHelper=new f(t)}return __extends(r,n),r.prototype.getDescription=function(){return t.Resources.getString("DomEventDescription")},r.prototype.getDetails=function(){var t=[],r,n,u;return t.push(this.createDetailInfo("EventName",this.getEventName(),"EventNameLabel",null)),r=this.interval,n={stopPropagationCalled:!1,stopImmediatePropagationCalled:!1,preventDefaultCalled:!1},r.endingPropagationStatus&&(n=i.convertPropagationStatus(r.endingPropagationStatus)),n.preventDefaultCalled&&t.push(this.createDetailInfo("DefaultPrevented",r.endingPropagationStatus,"DefaultPreventedLabel",i.convertBooleanToYesNoLabel(n.preventDefaultCalled))),n.stopImmediatePropagationCalled&&t.push(this.createDetailInfo("stopImmediatePropagation()",r.endingPropagationStatus,"ImmediatePropagationStoppedLabel",i.convertBooleanToYesNoLabel(n.stopImmediatePropagationCalled))),n.stopPropagationCalled&&t.push(this.createDetailInfo("stopPropagation()",r.endingPropagationStatus,"PropagationStoppedLabel",i.convertBooleanToYesNoLabel(n.stopPropagationCalled))),u=i.createElementString(this._ddTrackerHelper.tag,this._ddTrackerHelper.cssId,this._ddTrackerHelper.cssClass),u!==""&&t.push(this.createDetailInfo("TargetElement",u,"EventTargetLabel",null)),t},r.prototype.getUidChain=function(){return this._ddTrackerHelper.uidChain},r.prototype.getEventName=function(){var n=this.interval;return typeof n.eventName!="undefined"?n.eventName:null},r}(i);n.DomEvent=y;p=function(r){function u(n,t,i){r.call(this,n,t,i);this.updateSourceInfo()}return __extends(u,r),Object.defineProperty(u.prototype,"sourceInfo",{get:function(){return this._mappedSourceInfo},enumerable:!0,configurable:!0}),u.prototype.getDescription=function(){return t.Resources.getString("EvaluatingScriptEventDescription")},u.prototype.getDetails=function(){var n=[],t=this.sourceInfo,i=this.getScriptPreview();return typeof t!="undefined"&&n.push(this.createDetailInfo("ScriptUrl",t.source,"ScriptUrlLabel",null,t)),typeof i!="undefined"&&n.push(this.createDetailInfo("ContentPreview",i,"ScriptContentPreviewLabel",null)),n},u.prototype.updateSourceInfo=function(){var r=this,t;if(!this._originalSourceInfo)if(t=this.interval,t.url)this._originalSourceInfo={name:i.createShortenedUrlTextWithQueryString(t.url),line:1,column:1,source:t.url};else return;this._mappedSourceInfo=this._originalSourceInfo;n.SourceMappingHelper.getMappedSourceInfo(this._originalSourceInfo).done(function(n){r._mappedSourceInfo=n;r.sourceInfoChanged.invoke()})},u.prototype.getScriptPreview=function(){var i=this.interval,n=i.inlineScript,t;return n&&(t=/(\r\n|\r|\n)\s*/gm,n=n.replace(t," "),n=n.trim()),n},u}(i);n.EvaluatingScriptEvent=p;w=function(n){function r(t,i,r){n.call(this,t,i,r);this._ddTrackerHelper=new f(t)}return __extends(r,n),r.prototype.getDescription=function(){return t.Resources.getString("EventHandlerEventDescription")},r.prototype.getDetails=function(n){var t=this.interval,r=[],f,u,e;if(n&&this.setSourceDetails(n,r),t.eventPhase){switch(t.eventPhase){case 1:f="CapturingEventPhaseLabel";break;case 2:f="AtTargetEventPhaseLabel";break;case 3:f="BubblingEventPhaseLabel"}r.push(this.createDetailInfo("EventPhase",t.eventPhase.toString(),"EventPhaseLabel",f))}return u={stopPropagationCalled:!1,stopImmediatePropagationCalled:!1,preventDefaultCalled:!1},t.endingPropagationStatus&&(u=i.convertPropagationStatus(t.endingPropagationStatus)),u.preventDefaultCalled&&r.push(this.createDetailInfo("DefaultPrevented",t.endingPropagationStatus,"DefaultPreventedLabel",i.convertBooleanToYesNoLabel(u.preventDefaultCalled))),u.stopImmediatePropagationCalled&&r.push(this.createDetailInfo("stopImmediatePropagation()",t.endingPropagationStatus,"ImmediatePropagationStoppedLabel",i.convertBooleanToYesNoLabel(u.stopImmediatePropagationCalled))),u.stopPropagationCalled&&r.push(this.createDetailInfo("stopPropagation()",t.endingPropagationStatus,"PropagationStoppedLabel",i.convertBooleanToYesNoLabel(u.stopPropagationCalled))),t.usesCapture&&r.push(this.createDetailInfo("ListenerUsesCapture",t.usesCapture,"ListenerUsesCaptureLabel",i.convertBooleanToYesNoLabel(t.usesCapture))),e=i.createElementString(this._ddTrackerHelper.tag,this._ddTrackerHelper.cssId,this._ddTrackerHelper.cssClass),e!==""&&r.push(this.createDetailInfo("TargetElement",e,"EventTargetLabel",null)),r},r.prototype.getEventDetailsRequestInformation=function(){var n=[];return this.context&&this.context.sourceInfo&&n.push({sourceInfo:this.context.sourceInfo,isSourceRequest:!0}),n},r.prototype.getUidChain=function(){return this._ddTrackerHelper.uidChain},r}(i);n.EventHandlerEvent=w;b=function(n){function i(){n.apply(this,arguments)}return __extends(i,n),i.prototype.getDescription=function(){return t.Resources.getString("GarbageCollectionEventDescription")},i}(i);n.GarbageCollectionEvent=b;k=function(n){function i(){n.apply(this,arguments)}return __extends(i,n),i.prototype.getDescription=function(){return t.Resources.getString("HtmlParsingEventDescription")},i}(i);n.HtmlParsingEvent=k;d=function(n){function i(){n.apply(this,arguments)}return __extends(i,n),i.prototype.getDescription=function(){return t.Resources.getString("HtmlSpeculativeDownloadingEventDescription")},i}(i);n.HtmlSpeculativeDownloadingEvent=d;e=function(r){function u(n,t,i){r.call(this,n,t,i);this.updateSourceInfo()}return __extends(u,r),Object.defineProperty(u.prototype,"sourceInfo",{get:function(){return this._mappedSourceInfo},enumerable:!0,configurable:!0}),u.prototype.getDescription=function(){return t.Resources.getString("HttpRequestEventDescription")},u.prototype.getDetails=function(){var n=[],i=this.interval,t=this.sourceInfo;return t&&n.push(this.createDetailInfo("AddressName",t.source,"AddressNameLabel",null,t)),i.statusLine&&n.push(this.createDetailInfo("StatusCode",i.statusLine,"StatusCodeLabel",null)),n},u.prototype.getEventDetailsRequestInformation=function(){var n=[];return n.push({isSourceRequest:!1}),n},u.prototype.updateSourceInfo=function(){var r=this,t;if(!this._originalSourceInfo)if(t=this.interval,t.url)this._originalSourceInfo={name:i.createShortenedUrlTextWithQueryString(t.url),line:1,column:1,source:t.url};else return;this._mappedSourceInfo=this._originalSourceInfo;n.SourceMappingHelper.getMappedSourceInfo(this._originalSourceInfo).done(function(n){r._mappedSourceInfo=n;r.sourceInfoChanged.invoke()})},u}(i);n.HttpRequestEvent=e;g=function(n){function t(){n.apply(this,arguments)}return __extends(t,n),t}(i);n.IdleEvent=g;o=function(n){function r(t,i,r){n.call(this,t,i,r);this.updateSourceInfo()}return __extends(r,n),Object.defineProperty(r.prototype,"sourceInfo",{get:function(){return this._sourceInfo},enumerable:!0,configurable:!0}),r.prototype.getDescription=function(){return t.Resources.getString("ImageDecodedEventDescription")},r.prototype.getDetails=function(){var n=[];return this._sourceInfo&&n.push(this.createDetailInfo("ImageUrl",this._sourceInfo.source,"ImageUrlLabel",null,this._sourceInfo)),n},r.prototype.updateSourceInfo=function(){var n=this.interval;typeof n.url!="undefined"&&(this._sourceInfo={name:i.createShortenedUrlTextWithQueryString(n.url),line:1,column:1,source:n.url})},r}(i);n.ImageDecodedEvent=o;nt=function(n){function i(){n.apply(this,arguments)}return __extends(i,n),i.prototype.getDescription=function(){return t.Resources.getString("LayoutEventDescription")},i}(i);n.LayoutEvent=nt;tt=function(n){function i(){n.apply(this,arguments)}return __extends(i,n),i.prototype.getDescription=function(){return t.Resources.getString("MeasureDescription")},i.prototype.getDetails=function(){var n=this.interval,t=[];return n.measureName&&t.push(this.createDetailInfo("Name",n.measureName,"MeasureName",null)),n.startMarkName&&t.push(this.createDetailInfo("Start mark",n.startMarkName,"StartMarkName",null)),n.endMarkName&&t.push(this.createDetailInfo("End mark",n.endMarkName,"EndMarkName",null)),t},i}(i);n.MeasureEvent=tt;it=function(n){function i(){n.apply(this,arguments)}return __extends(i,n),i.prototype.getDescription=function(){return t.Resources.getString("MediaQueryListenerEventDescription")},i.prototype.getDetails=function(n){var t=[],i=this.interval;return n&&this.setSourceDetails(n,t),i.mediaQuery&&t.push(this.createDetailInfo("MediaQuery",i.mediaQuery,"MediaQueryLabel",null)),t},i.prototype.getEventDetailsRequestInformation=function(){var n=[];return this.context&&this.context.sourceInfo&&n.push({sourceInfo:this.context.sourceInfo,isSourceRequest:!0}),n},i}(i);n.MediaQueryListenerEvent=it;rt=function(n){function i(){n.apply(this,arguments)}return __extends(i,n),i.prototype.getDescription=function(){return t.Resources.getString("MutationObserverEventDescription")},i.prototype.getDetails=function(n){var t=[];return n&&this.setSourceDetails(n,t),t},i.prototype.getEventDetailsRequestInformation=function(){var n=[];return this.context&&this.context.sourceInfo&&n.push({sourceInfo:this.context.sourceInfo,isSourceRequest:!0}),n},i}(i);n.MutationObserverEvent=rt;ut=function(){function n(n){this._paintRect=n}return Object.defineProperty(n.prototype,"bottom",{get:function(){return this._paintRect.bottom},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){return this._paintRect.bottom-this._paintRect.top},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"left",{get:function(){return this._paintRect.left},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"right",{get:function(){return this._paintRect.right},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"top",{get:function(){return this._paintRect.top},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"width",{get:function(){return this._paintRect.right-this._paintRect.left},enumerable:!0,configurable:!0}),n}();n.PaintRect=ut;s=function(n){function t(i,r,u){n.call(this,i,r,u);this._paintRect=t.getPaintRect(i)}return __extends(t,n),Object.defineProperty(t.prototype,"paintRect",{get:function(){return this._paintRect},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"widthByHeight",{get:function(){return this._paintRect?this._paintRect.width+"x"+this._paintRect.height:null},enumerable:!0,configurable:!0}),t.getPaintRect=function(n){var t=n;return typeof t.paintRect!="undefined"&&typeof t.paintRect.top!="undefined"&&typeof t.paintRect.left!="undefined"&&typeof t.paintRect.right!="undefined"&&typeof t.paintRect.bottom!="undefined"?new ut(t.paintRect):null},t.prototype.getDetails=function(){var n=[];return this._paintRect&&this.widthByHeight&&this.widthByHeight!=="0x0"&&(n.push(this.createDetailInfo("Origin",this._paintRect.left+", "+this._paintRect.top,"OriginLabel",null)),n.push(this.createDetailInfo("Dimensions",this.widthByHeight,"DimensionsLabel",null))),n},t}(i);n.PaintRectEventBase=s;ft=function(n){function i(t,i,r){n.call(this,t,i,r);this._ddTrackerHelper=new f(t)}return __extends(i,n),i.prototype.canShowInDomExplorer=function(){return n.prototype.canShowInDomExplorer.call(this)&&this._ddTrackerHelper.tag!=="root"},i.prototype.getDescription=function(){return t.Resources.getString("PaintEventDescription")},i.prototype.getUidChain=function(){return this._ddTrackerHelper.uidChain},i}(s);n.PaintEvent=ft;et=function(n){function r(t,i,r){n.call(this,t,i,r);this._ddTrackerHelper=new f(t)}return __extends(r,n),Object.defineProperty(r.prototype,"title",{get:function(){return t.Resources.getString("RenderLayer")},enumerable:!0,configurable:!0}),r.prototype.createName=function(){var n=i.createElementString(this._ddTrackerHelper.tag,this._ddTrackerHelper.cssId,this._ddTrackerHelper.cssClass);return n?n:t.Resources.getString("RenderLayer")},r.prototype.canShowInDomExplorer=function(){return n.prototype.canShowInDomExplorer.call(this)&&this._ddTrackerHelper.tag!=="root"},r.prototype.getDescription=function(){return t.Resources.getString("RenderLayoutEventDescription")},r.prototype.getDetails=function(){var t=n.prototype.getDetails.call(this),r=i.createElementString(this._ddTrackerHelper.tag,this._ddTrackerHelper.cssId,this._ddTrackerHelper.cssClass);return r&&t.push(this.createDetailInfo("Element",r,"DDTrackerElementLabel",null)),t},r.prototype.getUidChain=function(){return this._ddTrackerHelper.uidChain},r}(s);n.RenderLayerEvent=et;h=function(i){function r(){i.apply(this,arguments)}return __extends(r,i),r.prototype.getDescription=function(){return t.Resources.getString("TimerFiredEventDescription")},r.prototype.getDetails=function(t){var u=[],i=this.interval,r;t&&this.setSourceDetails(t,u);switch(i.timerType){case 0:r="TimeoutTimerTypeLabel";break;case 1:r="IntervalTimerTypeLabel";break;case 2:r="ImmediateTimerTypeLabel";break;case 3:r="AnimationFrameTimerTypeLabel"}return i.timerType!==3&&u.push(this.createDetailInfo("TimerType",i.timerType,"TimerTypeLabel",r)),(i.timerType===0||i.timerType===1)&&typeof i.timeoutValue=="number"&&u.push(this.createDetailInfo("TimeoutValue",Common.FormattingHelpers.getPrettyPrintTime(n.TimeStamp.fromMilliseconds(i.timeoutValue)),"TimeoutLabel",null)),u},r.prototype.getEventDetailsRequestInformation=function(){var n=[];return this.context&&this.context.sourceInfo&&n.push({sourceInfo:this.context.sourceInfo,isSourceRequest:!0}),n},r}(i);n.TimerFiredEvent=h;ot=function(n){function i(){n.apply(this,arguments)}return __extends(i,n),i.prototype.createName=function(){return t.Resources.getString("AnimationFrame")},i.prototype.getDescription=function(){return t.Resources.getString("AnimationFrameEventDescription")},i}(h);n.AnimationFrameEvent=ot;st=function(n){function i(){n.apply(this,arguments)}return __extends(i,n),i.prototype.getDescription=function(){return t.Resources.getString("WindowsRuntimeEventDescription")},i.prototype.getDetails=function(){var n=[];return n.push(this.createDetailInfo("EventName",this.getEventName(),"EventNameLabel",null)),n},i.prototype.getEventName=function(){var n=this.interval;return typeof n.eventName!="undefined"?n.eventName:null},i}(i);n.WindowsRuntimeEvent=st;ht=function(n){function i(){n.apply(this,arguments)}return __extends(i,n),i.prototype.getDescription=function(){return t.Resources.getString("WindowsRuntimeAsyncCallbackDescription")},i}(i);n.WindowsRuntimeAsyncCallback=ht;ct=function(n){function r(t,i,r){n.call(this,t,i,r);this._ddTrackerHelper=new f(t)}return __extends(r,n),r.prototype.createName=function(){var n=this.interval;if(n.ddtrackerBaseClass)switch(n.ddtrackerBaseClass){case"DOM":return t.Resources.getString("DOMAccessEvent");case"Layout":return t.Resources.getString("DDTrackerLayoutDetailHeader");case"CSS":return n.ddtrackerTaskResource=="TASK_Fi"?t.Resources.getString("CssCalculation"):t.Resources.getString("DDTrackerStyleComputationDetailHeader")}return""},r.prototype.canShowInDomExplorer=function(){var t=this.interval;if(t.ddtrackerBaseClass)switch(t.ddtrackerBaseClass){case"DOM":case"Layout":case"CSS":return n.prototype.canShowInDomExplorer.call(this)}return!1},r.prototype.getDetails=function(){var n=[],u=this.interval,r,t;if(u.ddtrackerBaseClass)switch(u.ddtrackerBaseClass){case"DOM":n.push(this.createDetailInfo("Access type",this.getDDTrackerTaskName(),"AccessTypeLabel",null));break;case"Layout":r=this.getDDTrackerTaskName();r&&n.push(this.createDetailInfo("Category",r,"LayoutModeLabel",null))}return t=i.createElementString(this._ddTrackerHelper.tag,this._ddTrackerHelper.cssId,this._ddTrackerHelper.cssClass),t!==""&&t!=="<root>"&&n.push(this.createDetailInfo("Element",t,"DDTrackerElementLabel",null)),n},r.prototype.getDescription=function(){if(typeof this._description=="undefined"){this._description="";var n=this.interval;if(n.ddtrackerBaseClass)switch(n.ddtrackerBaseClass){case"DOM":this._description=t.Resources.getString("DDTrackerDOMDescription");break;case"Layout":this._description=t.Resources.getString("DDTrackerLayoutDescription");break;case"CSS":this._description=n.ddtrackerTaskResource=="TASK_Fi"?t.Resources.getString("CssCalculationEventDescription"):t.Resources.getString("DDTrackerStyleChangeDescription")}}return this._description},r.prototype.getUidChain=function(){return this._ddTrackerHelper.uidChain},r.prototype.getDDTrackerTaskName=function(){var n,r,u,i;return typeof this._ddTrackerTaskName=="undefined"&&(n=this.interval,n.isSetStyle?(r=Common.FormattingHelpers.stripNewLine(n.styleProperty),u=Common.FormattingHelpers.stripNewLine(n.newValue),this._ddTrackerTaskName=t.Resources.getString("DDTrackerSetStyleContextName",r,u)):(this._ddTrackerTaskName="",n.ddtrackerBaseClass!="CSS"&&(n.ddtrackerTaskString?this._ddTrackerTaskName=n.ddtrackerTaskString:n.ddtrackerTaskResource&&(i=[n.ddtrackerTaskResource],n.ddtrackerTaskResourceArgs&&(i=i.concat(n.ddtrackerTaskResourceArgs)),this._ddTrackerTaskName=t.Resources.getString.apply(t.Resources,i))))),this._ddTrackerTaskName},r}(i);n.DDTrackerEvent=ct;lt=function(n){function i(){n.apply(this,arguments)}return __extends(i,n),i.prototype.getDescription=function(){return t.Resources.getString("PaintEventDescription")},i}(i);n.FrameEvent=lt;c=function(){function i(){this._nameToEventMap={};this._nameToEventMap.CssCalculation=a;this._nameToEventMap.CssParsing=v;this._nameToEventMap.DDTracker=ct;this._nameToEventMap.DomEvent=y;this._nameToEventMap.EvaluatingScript=p;this._nameToEventMap.EventHandler=w;this._nameToEventMap.Frame=lt;this._nameToEventMap.GarbageCollection=b;this._nameToEventMap.HtmlParsing=k;this._nameToEventMap.HtmlSpeculativeDownloading=d;this._nameToEventMap.HttpRequest=e;this._nameToEventMap.Idle=g;this._nameToEventMap.ImageDecoded=o;this._nameToEventMap.Layout=nt;this._nameToEventMap.Measure=tt;this._nameToEventMap.MediaQueryListener=it;this._nameToEventMap.MutationObserver=rt;this._nameToEventMap.Paint=ft;this._nameToEventMap.RenderLayer=et;this._nameToEventMap.TimerFired=h;this._nameToEventMap.WindowsRuntimeEvent=st;this._nameToEventMap.WindowsRuntimeAsyncCallback=ht}return i.prototype.createEvent=function(i,r){var e=n.EventCategory[i.category],u,f;if(i.name==="TimerFired"&&(u=i,u.timerType===3))return new ot(u,e,r);if(f=this._nameToEventMap[i.name],f)return new f(i,e,r);throw new Error(t.Resources.getErrorString("JSPerf.1040"))},i}();n.EventFactory=c;at=function(){function i(n,t,i,r){this._queryResult=n;this._count=this._queryResult.getIntervalsCount();this._uiThreadId=t;this._data=[];this._dataPrevious=[];this._eventsFactory=r;this._currentIndex=null;this._timeSpan=i}return Object.defineProperty(i.prototype,"count",{get:function(){return this._count},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rowsCount",{get:function(){return this.count},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"timeSpan",{get:function(){return this._timeSpan},enumerable:!0,configurable:!0}),i.prototype.collapseBranch=function(n,t){return this._queryResult.collapseIntervalBranch(n),this.resetData(),t&&t(),Common.PromiseUtilities.EmptyPromise},i.prototype.expandBranch=function(t,i){return n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.CLICK_EVENT_DETAIL,0),this._queryResult.expandIntervalBranch(t),this.resetData(),i&&i(),Common.PromiseUtilities.EmptyPromise},i.prototype.expandFrameForEvent=function(n){this._queryResult.expandFrameForEvent(n);this.resetData()},i.prototype.getItemRowInfoFromRow=function(n){return{index:n,rowsSpan:1,topRow:n}},i.prototype.getItemRowInfoFromIndex=function(n){return{index:n,rowsSpan:1,topRow:n}},i.prototype.getNext=function(n){if(this._currentIndex===null)throw new Error(t.Resources.getErrorString("JSPerf.1057"));if(this._currentIndex>=this.count)return null;var r=this._data[this._currentIndex];return r||(this.fetchFromPrevious(this._currentIndex,i._prefetchSize)||this.fetchData(this._currentIndex,i._prefetchSize),r=this._data[this._currentIndex]),this._currentIndex++,isNaN(n)||(this._currentIndex+=n),r},i.prototype.indexOfItem=function(n){return this._queryResult.indexOfInterval(n)},i.prototype.indexOfItemAsync=function(n){return t.Promise.as(this.indexOfItem(n))},i.prototype.indexOfParent=function(n){var i=this._queryResult.indexOfParentInterval(n);return t.Promise.as(i)},i.prototype.getAggregatedDescendantsForEvent=function(n){return this._queryResult.getAggregatedDescendantsForEvent(n)},i.prototype.getSelectionSummary=function(){return this._queryResult.getSelectionSummary()},i.prototype.startAt=function(n){if(this._currentIndex!==null)throw new Error(t.Resources.getErrorString("JSPerf.1058"));if(isNaN(n)||n<0||n>=this.count)throw new Error(t.Resources.getErrorString("JSPerf.1036"));this._currentIndex=n;this._data=[]},i.prototype.stop=function(){return this._currentIndex=null,this._dataPrevious=this._data,this._data=null,Common.PromiseUtilities.EmptyPromise},i.prototype.updateAllSourceInfo=function(){for(var n=0;n<this._dataPrevious.length;n++)this._dataPrevious[n].updateSourceInfo()},i.prototype.updateViewportInfo=function(){},i.prototype.fetchData=function(t,i){var e=Math.max(0,t-i),s=Math.min(this._count,t+i)-1,f=this._queryResult.getIntervals(e,s),r,u,o;for(n.SourceMappingHelper.addMappings(f),r=e,u=0;u<f.length;u++,r++)this._data[r]||(o=f[u],this._data[r]=this._eventsFactory.createEvent(o,this._uiThreadId))},i.prototype.fetchFromPrevious=function(n,t){var u,f,i,r;if(this._dataPrevious[n]){for(u=Math.max(0,n-t),f=Math.min(this._dataPrevious.length,n+t)-1,i=u;i<=f;i++)r=this._dataPrevious[i],r&&(this._data[i]=r);return!0}return!1},i.prototype.resetData=function(){this._dataPrevious=[];this._data=[];this._count=this._queryResult.getIntervalsCount()},i._prefetchSize=30,i}();n.EventsTimelineDataSource=at;vt=function(){function t(t){this._eventFactory=new c;this._session=t;n.SourceMappingHelper.clearMappings()}return t.prototype.getEvents=function(n,t,i){var r=this;return this._session.queryEventIntervals(n.begin.nsec,n.end.nsec,t,i).then(function(t){var i=r._session.getUIThreadId();return new at(t,i,n,r._eventFactory)})},t}();n.EventsTimelineModel=vt;r=function(i){function r(u,f,e){var s=this,o;i.call(this);this._model=u;this._globalRuler=f;this._markEventModel=e;this._globalRuler.addEventListener(n.GlobalRuler.SelectionChangedEventType,function(n){return s.onRulerSelectionChanged(n)});this.timeSpan=this._globalRuler.totalRange;o=t.Resources.getString("MillisecondsAbbreviation");this.durationFilterOptions=[{value:"0",text:t.Resources.getString("DurationFilterAll"),tooltip:t.Resources.getString("DurationFilterTooltip")},{value:r.ONE_MS_IN_NS.toString(),text:t.Resources.getString("DurationFilterTimed",r.ONE_MS_IN_NS/1e6+o),tooltip:t.Resources.getString("DurationFilterTooltip")}];this.sortOptions=[{value:"0",text:t.Resources.getString("TimelineSortStartTime"),tooltip:t.Resources.getString("TimelineSortTooltip")},{value:"1",text:t.Resources.getString("TimelineSortDuration"),tooltip:t.Resources.getString("TimelineSortTooltip")}];n.SourceMappingHelper.sourceMappingChanged.addHandler(this.onSourceMappingChanged.bind(this))}return __extends(r,i),Object.defineProperty(r.prototype,"globalRuler",{get:function(){return this._globalRuler},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"selectedEvent",{get:function(){return this._selectedEvent},set:function(t){this._selectedEvent!==t&&(this._selectedEvent=t,this.selectedEventChanged&&this.selectedEventChanged(this._selectedEvent),Notifications.notify(n.ResponsivenessNotifications.GridRowSelected))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"timeSpan",{get:function(){return this._timeSpan},set:function(n){(n!==undefined||this._timeSpan===undefined)&&(n===undefined||this._timeSpan!==undefined)&&(n===undefined||this._timeSpan===undefined||n.equals(this._timeSpan))||(this._timeSpan=n,this._isDataSourceInvalid=!0,this.timeSpanChanged&&this.timeSpanChanged())},enumerable:!0,configurable:!0}),r.initialize=function(){Common.ObservableHelpers.defineProperty(r,r.DisplayImageDecodingPropertyName,!1,function(n){return n.onFilterChange()},function(n){return n.onFilterChanging()});Common.ObservableHelpers.defineProperty(r,r.DisplayFramesPropertyName,!1,function(n){return n.onFilterChange()},function(n){return n.onFilterChanging()});Common.ObservableHelpers.defineProperty(r,r.DisplayMeasuresPropertyName,!0,function(n){return n.onFilterChange()},function(n){return n.onFilterChanging()});Common.ObservableHelpers.defineProperty(r,r.DisplayNetworkActivitiesPropertyName,!0,function(n){return n.onFilterChange()},function(n){return n.onFilterChanging()});Common.ObservableHelpers.defineProperty(r,r.DisplayUIActivitiesPropertyName,!0,function(n){return n.onFilterChange()},function(n){return n.onFilterChanging()});Common.ObservableHelpers.defineProperty(r,r.DurationFilterPropertyName,0,function(n){return n.onFilterChange()},function(n){return n.onFilterChanging()});Common.ObservableHelpers.defineProperty(r,r.EventNameFilterPropertyName,"",function(n){return n.onFilterChange()},function(n){return n.onFilterChanging()});Common.ObservableHelpers.defineProperty(r,r.HasFilterPropertyName,!0,null,null);Common.ObservableHelpers.defineProperty(r,r.SortPropertyName,0,null,function(n){return n.onFilterChanging()})},r.prototype.getEventDetails=function(n){var i=n.getEventDetailsRequestInformation(),t,r,u,f,e;if(!i||i.length===0)return n.getDetails();for(t=[],r=0;r<i.length;r++)if(u=i[r],u.isSourceRequest){f=u;try{e=f.sourceInfo;t=t.concat(n.getDetails(e))}catch(o){}}else t=t.concat(n.getDetails());return t},r.prototype.getEvents=function(){var n=this,i;return(this._gettingEventsPromise&&(this._gettingEventsPromise.cancel(),this._gettingEventsPromise=null),this._isDataSourceInvalid)?(i={eventNameFilter:this.eventNameFilter,filterImageDecoding:!this.displayImageDecoding,filterFrames:!this.displayFrames,filterMeasures:!this.displayMeasures,filterNegligibleUIActivities:this.durationFilter,filterNetworkActivities:!this.displayNetworkActivities,filterUIActivities:!this.displayUIActivities},this._gettingEventsPromise=this._model.getEvents(this._timeSpan,this.sort,i).then(function(t){return n._dataSource=t,n._isDataSourceInvalid=!1,n._gettingEventsPromise=null,n.displayFrames&&n._selectedEvent&&n._dataSource.expandFrameForEvent(n._selectedEvent.id),n._dataSource}),this._gettingEventsPromise):t.Promise.as(this._dataSource)},r.prototype.getMarks=function(n){return this._markEventModel.getMarkEvents(this._globalRuler.totalRange,n)},r.prototype.getMarkTooltip=function(n){return this._markEventModel.getMarkTooltip(n)},r.prototype.getVerticalRulerLinePositions=function(n){return u.RulerUtilities.getVerticalLinePositions(this._timeSpan.toJsonTimespan(),n)},r.prototype.resetFilter=function(){this.displayImageDecoding=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},r.prototype.onFilterChange=function(){this.hasFilter=!this.displayImageDecoding||!this.displayMeasures||!this.displayNetworkActivities||!this.displayUIActivities||this.durationFilter>0||!!this.eventNameFilter},r.prototype.onFilterChanging=function(){this._isDataSourceInvalid=!0},r.prototype.onRulerSelectionChanged=function(){this.timeSpan=new n.TimeSpan(this._globalRuler.selection.begin,this._globalRuler.selection.end)},r.prototype.onSourceMappingChanged=function(){this._dataSource&&this._dataSource.updateAllSourceInfo()},r.ONE_MS_IN_NS=1e6,r.DisplayImageDecodingPropertyName="displayImageDecoding",r.DisplayFramesPropertyName="displayFrames",r.DisplayMeasuresPropertyName="displayMeasures",r.DisplayNetworkActivitiesPropertyName="displayNetworkActivities",r.DisplayUIActivitiesPropertyName="displayUIActivities",r.DurationFilterPropertyName="durationFilter",r.EventNameFilterPropertyName="eventNameFilter",r.HasFilterPropertyName="hasFilter",r.SortPropertyName="sort",r}(Common.Observable);n.EventsTimelineViewModel=r;r.initialize();l=function(i){function r(u,f,s,h){var v=this,a,l,c;if(i.call(this,"eventDetailsTemplate"),this.initializeEventGroup(),this._imagePreviewSeparator=this.findElement("imagePreviewSeparator"),this._imagePreviewContainer=this.findElement("imagePreviewContainer"),this._aggregatedDescendants=s,u){for(this._details=f,this._event=u,this.displayCommonFields(),this.displayEventSpecificFields(),this.displayAsyncCausalityDetails(!0),this.displayInclusiveTimeSummary(!0),(this._event instanceof e||this._event instanceof o)&&this.displayImagePreview(),a=this.findElementsByClassName("eventCell"),l=0;l<a.length;l++)c=a[l],function(i){c.classList.contains("BPT-FileLink")?c.addEventListener("mouseover",function(t){return n.EventDataTemplate.showSourceInfoTooltip(t,v._event.context.sourceInfo)}):c.addEventListener("mouseover",function(n){return r.showCellTooltip(n,i)});c.addEventListener("mouseout",function(){return t.Tooltip.dismiss()})}(c.textContent);this._sourceInfoChangedEventRegistration=this._event.sourceInfoChanged.addHandler(this.updateSourceInfoUi.bind(this))}else this._aggregatedDescendants&&(this.displaySelectionSummaryFields(h.elapsed,h.begin),this.displayAsyncCausalityDetails(!1),this.displayInclusiveTimeSummary(!1))}return __extends(r,i),r.GetAsyncFrames=function(n){if(!n||!n.asyncStackJson)return[];try{return JSON.parse(n.asyncStackJson)}catch(t){return[]}},r.prototype.dispose=function(){this._sourceInfoChangedEventRegistration&&(this._sourceInfoChangedEventRegistration.unregister(),this._sourceInfoChangedEventRegistration=null)},r.prototype.onSourceMappingChanged=function(n){for(var t=0;t<this._asyncStackFrames.length;t++)this._asyncStackFrames[t].updateTranslatedSourceInfo(n)},r.getCssClass=function(n){switch(n){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(t.Resources.getErrorString("JSPerf.1033"))}},r.isValidImageUrl=function(n){return r.IMG_URL_REGEX.test(n)&&navigator.onLine||r.IMG_DATA_URI_REGEX.test(n)||r.MS_APP_IMG_REGEX.test(n)},r.showCellTooltip=function(n,i){var r=n.currentTarget,u;r.offsetWidth<r.scrollWidth&&(u={content:i},t.Tooltip.show(u))},r.prototype.createDiv=function(t){for(var i,f,r=[],u=1;u<arguments.length;u++)r[u-1]=arguments[u];if(i=document.createElement("div"),Common.TokenExtractor.isHtmlExpression(t)?n.EventDataTemplate.addTokens(t,i,0):Common.TokenExtractor.isStringExpression(t)?n.EventDataTemplate.addTokens(t,i,1):i.textContent=t,r)for(f=0;f<r.length;f++)i.classList.add(r[f]);return i},r.prototype.displayCommonFields=function(){var r=this.findElement("durationLabelExc"),u=this.findElement("durationValueExc"),f=this.findElement("durationIncRow"),e=this.findElement("durationLabelInc"),o=this.findElement("durationValueInc"),s=this.findElement("startTimeLabel"),h=this.findElement("startTimeValue"),c=this.findElement("threadContextRow"),l=this.findElement("threadContextLabel"),a=this.findElement("threadContextValue"),i=this.findElement("eventDetailsDescription"),n;f.classList.remove("BPT-hidden");r.textContent=t.Resources.getString("DurationLabelExclusive","");u.textContent=Common.FormattingHelpers.getPrettyPrintTime(this._event.exclusiveDuration);e.textContent=t.Resources.getString("DurationLabelInclusive","");o.textContent=Common.FormattingHelpers.getPrettyPrintTime(this._event.timeSpan.elapsed);s.textContent=t.Resources.getString("StartTimeLabel","");h.textContent=Common.FormattingHelpers.getPrettyPrintTime(this._event.timeSpan.begin);n=this.getThreadContext();n!=="0"&&(c.classList.remove("BPT-hidden"),l.textContent=t.Resources.getString("ThreadContextLabel",""),a.textContent=n);i.classList.remove("BPT-hidden");i.textContent=this._event.getDescription()},r.prototype.displayImagePreview=function(){for(var n,f=this,i,u=0;u<this._details.length;u++)if(this._details[u].localizedName===t.Resources.getString("AddressNameLabel")||this._details[u].localizedName===t.Resources.getString("ImageUrlLabel")){i=this._details[u].localizedValue;break}(this._event instanceof o||r.isValidImageUrl(i))&&(n=this.findElement("imagePreview"),n.onload=function(){if(n.width>1&&n.height>1){var i=f.findElement("imagePreviewHeader");i.textContent=t.Resources.getString("ImagePreviewHeader",n.width,n.height);f._imagePreviewSeparator.classList.remove("BPT-hidden");f._imagePreviewContainer.classList.remove("BPT-hidden")}},r.MS_APP_IMG_REGEX.test(i)?t.Host.getDocumentLocation(i).done(function(t){n.src=t}):n.src=i)},r.prototype.displayInclusiveTimeSummary=function(i){var o=this,u=this.findElement("inclusiveTimeBreakDownDetails"),f,r,e;i&&this._aggregatedDescendants.length<=1||!i&&this._aggregatedDescendants.length===0||(typeof this._donutChartViewModel=="undefined"&&(this._donutChartViewModel=new n.DonutChartViewModel(u),this._donutChartViewModel.view.addSectorAriaLabel=function(i,r){var u=Common.FormattingHelpers.getPrettyPrintTime(new n.TimeStamp(i.value));return t.Resources.getString("DonutSectorAriaLabel",i.name,r,u)}),this._donutChartViewModel.model.headerText=this._event?t.Resources.getString("InclusiveTimeDetailsHeader"):t.Resources.getString("UIThreadSummaryHeader"),f=this.createSectors(this._aggregatedDescendants),f.forEach(function(n){o._donutChartViewModel.model.addSector(n)}),r=this._donutChartViewModel.model.sectors.length,(i&&r>1||!i&&r>0)&&(u.classList.remove("BPT-hidden"),i&&(e=this.findElement("inclusiveTimeDetailSeparator"),e.classList.remove("BPT-hidden")),this._donutChartViewModel.view.render()))},r.prototype.displayAsyncCausalityDetails=function(i){var f=this.findElement("eventAsyncCausalityDetails"),e,u,o,h,s,c;if((f.innerText="",f.classList.add("BPT-hidden"),this._asyncStackFrames=[],this.findElement("eventAsyncCausalitySeparator").classList.add("BPT-hidden"),i)&&(e=r.GetAsyncFrames(this._event),e.length!=0)){for(u=document.createElement("div"),u.classList.add("asyncStackLabel"),u.innerText=t.Resources.getString("AsyncStackLabel"),f.appendChild(u),o=0;o<e.length;o++){for(h=e[o],s=0;s<h.length;s++)c=new n.AsyncStackFrameTemplateControl(h[s]),this._asyncStackFrames.push(c),f.appendChild(c.rootElement);o+1<e.length&&(u=document.createElement("div"),u.classList.add("asyncStackLabel"),u.innerText=t.Resources.getString("AsyncStackTransition"),f.appendChild(u))}f.classList.remove("BPT-hidden");this.findElement("eventAsyncCausalitySeparator").classList.remove("BPT-hidden")}},r.prototype.createSectors=function(n){for(var t,f,i,o,s=new c,e=[],u=0;u<n.length;u++)t=n[u],f={asyncStackJson:null,begin:0,beginThreadId:0,category:t.category,childrenCount:0,end:0,endThreadId:0,exclusiveDuration:0,fullName:undefined,id:-1,isExpanded:!1,level:-1,name:t.name},t.name==="DDTracker"&&typeof t.ddTrackerProp!="undefined"&&(i=f,i.ddtrackerTaskString=t.ddTrackerProp.ddtrackerTaskString,i.ddtrackerTaskResource=t.ddTrackerProp.ddtrackerTaskResource,i.ddtrackerTaskResourceArgs=t.ddTrackerProp.ddtrackerTaskResourceArgs,i.ddtrackerBaseClass=t.ddTrackerProp.ddtrackerBaseClass),o=s.createEvent(f,0),e.push({name:o.name,cssClass:r.getCssClass(t.category),value:t.value});return this.groupEventTypes(e)},r.prototype.initializeEventGroup=function(){this._eventGroupsMap={};this._eventGroupsMap[t.Resources.getString("DomEvent")]=t.Resources.getString("DomEvent");this._eventGroupsMap[t.Resources.getString("EventHandler")]=t.Resources.getString("DomEvent");this._eventGroupsMap[t.Resources.getString("Layout")]=t.Resources.getString("Layout");this._eventGroupsMap[t.Resources.getString("DDTrackerLayoutDetailHeader")]=t.Resources.getString("Layout");this._eventGroupsMap[t.Resources.getString("CssCalculation")]=t.Resources.getString("CssCalculation");this._eventGroupsMap[t.Resources.getString("DDTrackerStyleComputationDetailHeader")]=t.Resources.getString("CssCalculation");this._eventGroupsMap[t.Resources.getString("Paint")]=t.Resources.getString("Paint");this._eventGroupsMap[t.Resources.getString("RenderLayer")]=t.Resources.getString("Paint")},r.prototype.groupEventTypes=function(n){for(var t,i,e,o,u,r={},f=0;f<n.length;f++)t=n[f],i=this._eventGroupsMap[t.name],typeof i!="undefined"?(u=r[i],typeof u=="undefined"?(r[i]=t,r[i].name=i):t.name===i?(r[i]=t,t.value+=u.value):u.value+=t.value):r[t.name]=t;e=[];for(o in r)e.push(r[o]);return e},r.prototype.displayEventSpecificFields=function(){var f,r,t,e,i,u;if(this._details)for(f=this.findElement("additionalDetails"),r=0;r<this._details.length;r++)(t=this._details[r],t.sourceInfo&&t.sourceInfo.source==="<DOM>")||(e=this.createDiv(t.localizedName+":","eventCell","name"),i=this.createDiv(t.localizedValue,"eventCell","value"),t.sourceInfo&&(i.className+=" BPT-FileLink",i.setAttribute("role","link"),n.EventDataTemplate.setViewSourceHandler(i,t.sourceInfo,!0),t.localizedValue===t.sourceInfo.source&&(this._detailUrlDiv=i,this.updateSourceInfoUi())),u=this.createDiv("","eventRow"),u.appendChild(e),u.appendChild(i),f.appendChild(u))},r.prototype.displaySelectionSummaryFields=function(n,i){var r=this.findElement("durationLabelExc"),u=this.findElement("durationValueExc"),f=this.findElement("startTimeLabel"),e=this.findElement("startTimeValue");r.textContent=t.Resources.getString("SelectionDurationLabel","");u.textContent=Common.FormattingHelpers.getPrettyPrintTime(n);f.textContent=t.Resources.getString("StartTimeLabel","");e.textContent=Common.FormattingHelpers.getPrettyPrintTime(i)},r.prototype.getThreadContext=function(){var n=this._event.contextThreadId;return n!==null?this._event.category===3?t.Resources.getString("RenderThread"):this._event instanceof e?t.Resources.getString("DownloadThread"):this._event.category===0?t.Resources.getString("ImageDecodingThread"):n.toString():t.Resources.getString("UIThreadContext")},r.prototype.updateSourceInfoUi=function(){this._detailUrlDiv.innerText=this._event.sourceInfo.source},r.IMG_URL_REGEX=/^(http|https).*([.jpg]|[.jpeg]|[.gif]|[.png])$/i,r.IMG_DATA_URI_REGEX=/^(data:image\/).*$/i,r.MS_APP_IMG_REGEX=/^(ms-appx(-web)?:\/\/).*$/i,r}(Common.Controls.Legacy.TemplateControl);n.EventDetailsView=l,function(n){n[n.LifeCycle=0]="LifeCycle";n[n.User=1]="User"}(n.MarkCategory||(n.MarkCategory={}));pt=n.MarkCategory;yt=function(i){function f(r){var e=this;if(i.call(this,"timelineViewTemplate"),this._isVisible=!0,this._parentContainer=document.getElementById(r),!this._parentContainer)throw new Error(t.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=t.Resources.getString("TimelineLabel");this._sortFilterSection=this.findElement("sortFilterSection");this._filteringBar=new Common.TemplateControl("VisualProfiler.filteringBarTemplate");this._sortFilterSection.appendChild(this._filteringBar.rootElement);this._listControl=new n.EventsTimelineListControl;this._timelineView.appendChild(this._listControl.rootElement);this._listControl.dataColumnWidthChanged=this.onListControlDataColumnWidthChanged.bind(this);this._parentContainer.appendChild(this.rootElement);this._onResizeHandler=function(){e._columnsCssRule=e.getColumnsCssRule();e._listControl.invalidateSizeCache();e.updateDetailsDivider();e.render()};this.registerResizeEvent();n.SourceMappingHelper.sourceMappingChanged.addHandler(function(n){return e.onSourceMappingChanged(n)});this._eventHeaderDivider=this.findElement("timelineEventHeaderDivider");this._eventHeaderDivider.style.left=this._listControl.eventNameColumnWidth+"px";this._eventHeaderLabel=this.findElement("timelineEventHeaderLabel");this._eventHeaderLabel.textContent=t.Resources.getString("EventHeaderLabel");this._eventHeaderLabel.style.width=this._listControl.eventNameColumnWidth+"px";this._rulerContainer=this.findElement("timelineRuler");this._columnsCssRule=this.getColumnsCssRule();this._eventDetailsDivider=new n.Divider(this._timelineViewAndDetailsContainer,0);this._eventDetailsDivider.onMoved=this.onResizeDetails.bind(this);this.createFilteringMenu();this._viewEventManager=u.getViewEventManager();this._viewEventManager.detailsViewSelectionChanged.addEventListener(this.onDetailsViewChanged.bind(this));this._viewEventManager.detailsViewReady.raiseEvent({Id:f.DETAILS_VIEW_ID})}return __extends(f,i),Object.defineProperty(f.prototype,"detailsView",{get:function(){return this._detailsView},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"listControl",{get:function(){return this._listControl},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"viewModel",{get:function(){return this.model},set:function(n){this.unregisterViewModelEvents();this._listControl.dataSource=null;this.model=n;this._filteringBar.model=this.model;this._filteringMenu.model=this.model;this.createRuler();this.updateDetailsPane(null);this.updateDetailsDivider();this.registerViewModelEvents()},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"sortFilterSection",{get:function(){return this._sortFilterSection},enumerable:!0,configurable:!0}),f.getCssRule=function(n,t){var u=document.styleSheets[n],i,r;if(u)for(i=0;i<u.rules.length;++i)if(r=u.rules[i],r&&r.selectorText===t)return r;return null},f.prototype.onTabActivated=function(){},f.prototype.onTabResize=function(){},f.prototype.render=function(){var n=this;return this.model&&this._isVisible?(this.unregisterResizeEvent(),this.model.getEvents().then(function(t){var i=n.model.timeSpan;n._listControl.dataSource=t;n._listControl.timeSpan=i;n._listControl.viewModel=n.model;n._listControl.rulerScale=n._rulerScale;n._listControl.selectedItemChanged=n.onSelectedEventChanged.bind(n);n._listControl.render();n.setRulerRect();n._rulerScale.onViewportChanged({currentTimespan:i.toJsonTimespan(),selectionTimespan:null,isIntermittent:!1});n._listControl.renderVerticalRulerLines();n._listControl.selectedItem||n.updateDetailsPane(null);n.registerResizeEvent()},function(){n.registerResizeEvent()})):t.Promise.as(null)},f.showTooltip=function(n){var i={content:t.Resources.getString(n)};t.Tooltip.show(i)},f.prototype.createFilteringMenu=function(){var n=this._filteringBar.getNamedControl("filteringMenuButton");this._filteringMenu=new Common.Controls.MenuControl;this._filteringMenu.menuItemsTemplateId="VisualProfiler.filteringMenuDropDown";this._filteringMenu.targetButtonElement=n.rootElement;this._filteringMenu.dismissOnMenuItemClick=!0;this._filteringMenu.dismissOnTargetButtonClick=!0;this._filteringMenu.focusFirstItemOnShow=!0;this._filteringBar.rootElement.appendChild(this._filteringMenu.rootElement)},f.prototype.createRuler=function(){var n=this,i,r,f,e;this._gettingMarksPromise&&(this._gettingMarksPromise.cancel(),this._gettingMarksPromise=null);i=[];r=[];this._rulerContainer.innerHTML="";this._rulerScale&&this._rulerScale.dispose();this._rulerScale=new u.RulerScale(this.model?this.model.timeSpan.toJsonTimespan():new u.JsonTimespan(new u.BigNumber(0,0),new u.BigNumber(0,0)));this.model?(f=this.model.getMarks(0).then(function(n){i=n}),e=this.model.getMarks(1).then(function(n){r=n}),this._gettingMarksPromise=t.Promise.join([f,e]).then(function(){n._rulerScale.dispose();n._rulerScale=new u.RulerScale(n.model.timeSpan.toJsonTimespan(),[{index:0,id:2,label:t.Resources.getString("RulerUserMarkLabel"),data:r},{index:1,id:1,label:t.Resources.getString("RulerLifecycleMarkLabel"),data:i}],["vs-image-graph-app-event","vs-image-graph-user-mark"],"vs-image-graph-aggregated-event");n._rulerContainer.appendChild(n._rulerScale.container);n._rulerScale.resize(null)}),this._gettingMarksPromise.done(function(){n._gettingMarksPromise=null})):(this._rulerContainer.appendChild(this._rulerScale.container),this._rulerScale.resize(null))},f.prototype.getColumnsCssRule=function(){return f.getCssRule("VisualProfiler",".mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .timelineViewGroup .timelineViewAndDetails")},f.prototype.onDetailsViewChanged=function(n){if(!n)throw new Error(t.Resources.getErrorString("JSPerf.1078"));this._isVisible=n.Id.toLowerCase()===f.DETAILS_VIEW_ID.toLowerCase();this._isVisible&&this.render()},f.prototype.onResizeDetails=function(t){this.updateColumnWidth(t);n.Program.triggerResize()},f.prototype.onSelectedEventChanged=function(n){this.model.selectedEvent=n},f.prototype.onListControlDataColumnWidthChanged=function(){this._eventHeaderDivider.style.left=this._listControl.eventNameColumnWidth+"px";this._eventHeaderLabel.style.width=this._listControl.eventNameColumnWidth+"px";this.setRulerRect()},f.prototype.onSortChanged=function(){n.Program.traceWriter.raiseEvent(103);this.render().done(function(){Notifications.notify(n.ResponsivenessNotifications.SortFinishedOnGrid);n.Program.traceWriter.raiseEvent(104)})},f.prototype.onTimeSpanChanged=function(){this.render().done(function(){Notifications.notify(n.ResponsivenessNotifications.GridUpdatedForTimeSelection)})},f.prototype.onToggleFilter=function(t,i){t!==undefined&&n.Program.traceWriter.raiseEvent(t);this.render().done(function(){i!==undefined&&n.Program.traceWriter.raiseEvent(i)})},f.prototype.onEventNameFilterChange=function(){var t=this;clearTimeout(this._eventNameFilterResponseTimeoutHandle);this._eventNameFilterResponseTimeoutHandle=setTimeout(function(){n.Program.traceWriter.raiseEvent(119);t.render().done(function(){n.Program.traceWriter.raiseEvent(120);Notifications.notify(n.ResponsivenessNotifications.GridUpdatedForFilter)})},200)},f.prototype.onViewModelPropertyChanged=function(t){switch(t){case r.DisplayImageDecodingPropertyName:n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.FILTER_IMAGE_DECODING,0);this.onToggleFilter(111,112);break;case r.DisplayFramesPropertyName:n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.FILTER_FRAME,0);this.onToggleFilter(117,118);break;case r.DisplayMeasuresPropertyName:n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.FILTER_USER_MEASURES,0);this.onToggleFilter(115,116);break;case r.DisplayNetworkActivitiesPropertyName:n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.FILTER_NETWORK_TRAFFIC,0);this.onToggleFilter(113,114);break;case r.DisplayUIActivitiesPropertyName:n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.FILTER_UI_ACTIVITIES,0);this.onToggleFilter();break;case r.DurationFilterPropertyName:n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.FILTER_DURATION,0);this.onToggleFilter();break;case r.EventNameFilterPropertyName:n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.FILTER_BY_NAME,0);this.onEventNameFilterChange();break;case r.SortPropertyName:n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.CHANGE_SORT_BY,0);this.onSortChanged()}},f.prototype.onViewModelSelectionChanged=function(n){this._listControl.selectedItem=n;this.updateDetailsPane(n)},f.prototype.onSourceMappingChanged=function(n){if(this._detailsView){var t;n&&(t=n.url);this._detailsView.onSourceMappingChanged(t)}},f.prototype.registerResizeEvent=function(){n.Program.addEventListener(n.ProgramEvents.Resize,this._onResizeHandler)},f.prototype.registerViewModelEvents=function(){this.model&&(this._viewModelPropertyChangeEvtReg=this.model.propertyChanged.addHandler(this.onViewModelPropertyChanged.bind(this)),this.model.timeSpanChanged=this.onTimeSpanChanged.bind(this),this.model.selectedEventChanged=this.onViewModelSelectionChanged.bind(this))},f.prototype.setDetailsDividerBounds=function(){var n=this._timelineViewAndDetailsContainer.offsetWidth;this._eventDetailsDivider.minX=n/2;this._eventDetailsDivider.maxX=n},f.prototype.setRulerRect=function(){var n=this._listControl.dataColumnLeft+"px",t=this._listControl.dataColumnWidth+"px";(this._rulerContainer.style.marginLeft!==n||this._rulerContainer.style.width!==t)&&(this._rulerContainer.style.marginLeft=n,this._rulerContainer.style.width=t,this._rulerScale&&this._rulerScale.resize(null))},f.prototype.updateDetailsPane=function(t){var i=this._listControl.dataSource,r,u,f;i&&(this._timelineDetailsHeader.classList.remove(this._eventDetailsHeaderClass),this._detailsView&&this._detailsView.dispose(),t?(this._eventDetailsTitle.textContent=t.title,this._eventDetailsHeaderClass=t.getCssClass(),f=this.model.getEventDetails(t),r=i.getAggregatedDescendantsForEvent(t.id),this._detailsView=new l(t,f,r,u)):(i&&(this._eventDetailsTitle.textContent="",this._eventDetailsHeaderClass="emptyHeader",r=i.getSelectionSummary(),u=i.timeSpan),this._detailsView=new l(null,null,r,u)),this._timelineDetailsHeader.classList.add(this._eventDetailsHeaderClass),this._timelineDetailsPaneContainer.innerHTML="",this._timelineDetailsPaneContainer.appendChild(this._detailsView.rootElement),Notifications.notify(n.ResponsivenessNotifications.DetailsPaneLoaded))},f.prototype.updateColumnWidth=function(n){(n===null||typeof n=="undefined")&&(n=this._eventDetailsDivider.offsetX);var t=this._columnsCssRule.style.msGridColumns.split(" ");t[2]=this._timelineViewAndDetailsContainer.clientWidth-n+"px";this._columnsCssRule.style.msGridColumns=t.join(" ")},f.prototype.updateDetailsDivider=function(){this.setDetailsDividerBounds();this._eventDetailsDivider.offsetX=this._timelineView.offsetWidth;this.updateColumnWidth(this._eventDetailsDivider.offsetX+3)},f.prototype.unregisterResizeEvent=function(){n.Program.removeEventListener(n.ProgramEvents.Resize,this._onResizeHandler)},f.prototype.unregisterViewModelEvents=function(){this.model&&(this.model.selectedEvent=null,this.model.timeSpanChanged=null,this.model.selectedEventChanged=null);this._viewModelPropertyChangeEvtReg&&(this._viewModelPropertyChangeEvtReg.unregister(),this._viewModelPropertyChangeEvtReg=null)},f.DETAILS_VIEW_ID="0615d892-30b0-4ada-afab-93bfe13d9538",f}(Common.Controls.Legacy.TemplateControl);n.EventsTimelineView=yt}(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.Plugin,u,i,r;(function(n){n[n.None=0]="None";n[n.Profiling=1]="Profiling";n[n.Analyzing=2]="Analyzing";n[n.Interactive=3]="Interactive"})(n.CollectionState||(n.CollectionState={}));u=n.CollectionState;i=function(i){function r(n){i.call(this);this._controller=n;this._eventManager=new t.Utilities.EventManager;this._startProfilingEnabled=!0}return __extends(r,i),Object.defineProperty(r.prototype,"startProfilingEnabled",{get:function(){return this._startProfilingEnabled&&!this.isAtBreakpoint},set:function(n){n!==this._startProfilingEnabled&&(this._startProfilingEnabled=n,this.propertyChanged.invoke(r.StartProfilingEnabledPropertyName))},enumerable:!0,configurable:!0}),r.initialize=function(){Common.ObservableHelpers.defineProperty(r,r.ClearSelectionEnabledPropertyName,!1);Common.ObservableHelpers.defineProperty(r,r.CollectionStatePropertyName,0);Common.ObservableHelpers.defineProperty(r,r.IsAtBreakpointPropertyName,!1,function(n){return n.onIsAtBreakpointChanged()});Common.ObservableHelpers.defineProperty(r,r.OpenSessionPropertyName,!0);Common.ObservableHelpers.defineProperty(r,r.ResetZoomEnabledPropertyName,!1);Common.ObservableHelpers.defineProperty(r,r.SaveSessionPropertyName,!1);Common.ObservableHelpers.defineProperty(r,r.StopProfilingEnabledPropertyName,!1);Common.ObservableHelpers.defineProperty(r,r.ZoomInEnabledPropertyName,!1)},r.prototype.clearSelection=function(){this._globalRuler&&this._globalRuler.setSelection(this._globalRuler.activeRange)},r.prototype.resetZoom=function(){this._globalRuler&&(this._globalRuler.setActiveRange(this._globalRuler.totalRange),this.zoomInEnabled=!0,this.clearSelectionEnabled=!0);Notifications.notify(n.ResponsivenessNotifications.ResetZoomFinished)},r.prototype.setGlobalRuler=function(t){this._globalRuler&&(this._globalRuler.removeEventListener(n.GlobalRuler.ActiveRangeChangedEventType,this.onActiveRangeChanged.bind(this)),this._globalRuler.removeEventListener(n.GlobalRuler.SelectionChangedEventType,this.onSelectionChanged.bind(this)));this._globalRuler=t;this._globalRuler&&(this._globalRuler.addEventListener(n.GlobalRuler.ActiveRangeChangedEventType,this.onActiveRangeChanged.bind(this)),this._globalRuler.addEventListener(n.GlobalRuler.SelectionChangedEventType,this.onSelectionChanged.bind(this)))},r.prototype.openSession=function(){var n=this;t.Storage.openFileDialog({name:"",extensions:["diagsession"]},{access:1,encoding:"BINARY",persistence:1,type:0}).then(function(t){return n._controller.openSession(t)}).done(function(){},function(n){(n.number===undefined||n.number!==Common.Constants.E_ABORT)&&t.F12.ErrorDisplay.show(t.Resources.getString("OpenSessionFailedMessage"))})},r.prototype.saveSession=function(){var i=this;t.Storage.saveFileDialog({name:"",extensions:["diagsession"]},{access:3,encoding:"BINARY",persistence:1,type:0}).then(function(n){i._controller.saveSession(n)}).done(function(){Notifications.notify(n.ResponsivenessNotifications.SaveSessionFinished)},function(n){(n.number===undefined||n.number!==Common.Constants.E_ABORT)&&t.F12.ErrorDisplay.show(t.Resources.getString("SaveSessionFailedMessage"))})},r.prototype.startProfiling=function(){var i=this;this.clearSelectionEnabled=!1;this.openSessionEnabled=!1;this.resetZoomEnabled=!1;this.saveSessionEnabled=!1;this.startProfilingEnabled=!1;this.stopProfilingEnabled=!1;this.zoomInEnabled=!1;this.collectionState=0;this._controller.startProfiling().done(function(){i.stopProfilingEnabled=!0;i.collectionState=1},function(r){i.startProfilingEnabled=!0;i.openSessionEnabled=n.Program.packager!==null;n.Program.reportError(r,t.Resources.getErrorString("JSPerf.1067"))})},r.prototype.stopProfiling=function(){var i=this;this.clearSelectionEnabled=!1;this.openSessionEnabled=!1;this.resetZoomEnabled=!1;this.saveSessionEnabled=!1;this.startProfilingEnabled=!1;this.stopProfilingEnabled=!1;this.zoomInEnabled=!1;this.collectionState=2;this._controller.stopProfiling().done(function(){i.openSessionEnabled=n.Program.packager!==null;i.saveSessionEnabled=n.Program.packager!==null;i.startProfilingEnabled=!0;i.collectionState=3},function(r){i.startProfilingEnabled=!0;i.collectionState=0;n.Program.reportError(r,t.Resources.getErrorString("JSPerf.1068"))})},r.prototype.zoomIn=function(){n.Program.traceWriter.raiseEvent(101);this._globalRuler&&(this._globalRuler.setActiveRange(this._globalRuler.selection),this.zoomInEnabled=!1,this.clearSelectionEnabled=!1);Notifications.notify(n.ResponsivenessNotifications.ZoomInFinished);n.Program.traceWriter.raiseEvent(102)},r.prototype.onActiveRangeChanged=function(){this.resetZoomEnabled=!this._globalRuler.activeRange.equals(this._globalRuler.totalRange)},r.prototype.onSelectionChanged=function(n){var t=!n.data.newSelection.equals(this._globalRuler.activeRange);this.clearSelectionEnabled=t;this.zoomInEnabled=t&&n.data.newSelection.elapsed.nsec>r.MinimumZoomLevelInNs},r.prototype.onIsAtBreakpointChanged=function(){this.propertyChanged.invoke(r.StartProfilingEnabledPropertyName)},r.MinimumZoomLevelInNs=1e5,r.ClearSelectionEnabledPropertyName="clearSelectionEnabled",r.CollectionStatePropertyName="collectionState",r.IsAtBreakpointPropertyName="isAtBreakpoint",r.OpenSessionPropertyName="openSessionEnabled",r.ResetZoomEnabledPropertyName="resetZoomEnabled",r.SaveSessionPropertyName="saveSessionEnabled",r.StartProfilingEnabledPropertyName="startProfilingEnabled",r.StopProfilingEnabledPropertyName="stopProfilingEnabled",r.ZoomInEnabledPropertyName="zoomInEnabled",r}(Common.Observable);n.ToolbarViewModel=i;i.initialize();r=function(i){function r(){i.call(this);this.title=t.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))}return __extends(r,i),r.prototype.onStartToolbarButtonClick=function(){this.model&&(n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.START_PROFILE,0),this.model.startProfiling())},r.prototype.onStopToolbarButtonClick=function(){this.model&&(n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.STOP_PROFILE,0),this.model.stopProfiling())},r.prototype.onOpenSessionButtonClick=function(){this.model&&(n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.IMPORT_SESSION,0),this.model.openSession())},r.prototype.onSaveSessionButtonClick=function(){this.model&&(n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.EXPORT_SESSION,0),this.model.saveSession())},r.prototype.onZoomInButtonClick=function(){this.model&&(n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.ZOOM_IN,0),this.model.zoomIn())},r.prototype.onResetZoomButtonClick=function(){this.model&&(n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.ZOOM_RESET,0),this.model.resetZoom())},r.prototype.onClearSelectionButtonClick=function(){this.model&&(n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.CLEAR_SELECTION,0),this.model.clearSelection())},r}(Common.Controls.ToolbarControl);n.VisualProfilerToolbarControl=r}(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var i=Microsoft.Plugin,r=function(){function n(){this._sectors=[]}return Object.defineProperty(n.prototype,"headerText",{get:function(){return this._headerText},set:function(n){this._headerText=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"sectors",{get:function(){return this._sectors},enumerable:!0,configurable:!0}),n.prototype.addSector=function(n){this._sectors.push(n)},n}(),u,t;n.DonutChartModel=r;u=function(){function n(n){this._model=new r;this._view=new t(n,this)}return Object.defineProperty(n.prototype,"model",{get:function(){return this._model},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"view",{get:function(){return this._view},enumerable:!0,configurable:!0}),n}();n.DonutChartViewModel=u;t=function(t){function r(r,u){t.call(this,r);this._controller=u;this.rootElement.tabIndex=0;this._donutChart=new n.DonutChart(this.rootElement,this.onRenderSectorTooltip.bind(this),this.onAddSectorAriaLabel.bind(this),{explosionFactor:2,radius:45,strokeWidth:20,minDonutArcAngle:10,containerWidth:210,containerHeight:180,clockwiseRotation:!0});this.rootElement.setAttribute("aria-label",i.Resources.getString("InclusiveTimeAriaLabel"))}return __extends(r,t),r.prototype.render=function(){this.addHeaderElement();r.sortEventsByValue(this._controller.model.sectors);this._donutChart.addSectors(this._controller.model.sectors);this._donutChart.render()},r.sortEventsByValue=function(n){n.sort(function(n,t){return t.value-n.value})},r.prototype.addHeaderElement=function(){var t=document.createElement("div"),n=document.createElement("span");n.style.marginLeft="10px";n.innerText=this._controller.model.headerText;t.appendChild(n);this.rootElement.insertBefore(t,this.rootElement.firstChild)},r.prototype.onAddSectorAriaLabel=function(n,t){var i,r;this.addSectorAriaLabel&&(i=this.addSectorAriaLabel(n,t),i&&(r=this.rootElement.getAttribute("aria-label")+" "+i,this.rootElement.setAttribute("aria-label",r)))},r.prototype.onRenderSectorTooltip=function(t,r){var u=Common.FormattingHelpers.getPrettyPrintTime(new n.TimeStamp(t.value));return i.Resources.getString("SectorTooltipFormat",t.name,Common.FormattingHelpers.getDecimalLocaleString(r,!1),u)},r}(Common.Controls.Legacy.Control);n.DonutChartView=t}(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.VisualStudio.DiagnosticsHub,i=function(){function i(n){this._dataWarehouse=n;this._threadId=0;this._sessionUrl=null;this._lowestObservedDocumentMode=0}return i.prototype.initialize=function(){var n=this;return this._dataWarehouse.getContextService().getGlobalContext().then(function(n){return n.getTimeDomain()}).then(function(t){return n._totalDuration={begin:parseInt(t.begin.value),end:parseInt(t.end.value)},n.getFilteredResult(i.GET_UITHREAD_ID_OPERATION)}).then(function(t){return n._threadId=t.getResult(),n.getFilteredResult(i.GET_SESSION_URL_OPERATION)}).then(function(t){return n._sessionUrl=t.getResult(),n.getFilteredResult(i.GET_LOWEST_OBSERVED_DOCUMENT_MODE_OPERATION)}).then(function(t){n._lowestObservedDocumentMode=t.getResult()})},i.prototype.close=function(){this._dataWarehouse.closeSynchronous()},i.prototype.closeAsync=function(){return this._dataWarehouse.close()},i.prototype.getTotalDuration=function(){return this._totalDuration},i.prototype.initializeResources=function(n){var r=new t.JsonTimespan(t.BigNumber.convertFromNumber(0),t.BigNumber.convertFromNumber(this._totalDuration.end));return this.getFilteredResult(i.INITIALIZE_RESOURCES_OPERATION,r,n)},i.prototype.queryEventIntervals=function(n,r,u,f){var e=new t.JsonTimespan(t.BigNumber.convertFromNumber(n),t.BigNumber.convertFromNumber(r)),o={eventNameFilter:f&&f.eventNameFilter,minDuration:f&&f.filterNegligibleUIActivities?f.filterNegligibleUIActivities.toString():"0",sort:u.toString(),filterImageDecoding:f&&f.filterImageDecoding?"true":"false",filterFrames:f&&f.filterFrames?"true":"false",filterMeasures:f&&f.filterMeasures?"true":"false",filterNetworkActivities:f&&f.filterNetworkActivities?"true":"false",filterUIActivities:f&&f.filterUIActivities?"true":"false"};return this.getFilteredResult(i.QUERY_EVENT_INTERVALS,e,o)},i.prototype.queryCPUUsage=function(r,u,f){var e=new t.JsonTimespan(t.BigNumber.convertFromNumber(r),t.BigNumber.convertFromNumber(u)),o={granularity:f.toString()};return n.Graphs.DataUtilities.getFilteredResult(this._dataWarehouse,i.TIMELINE_ANALYZER_CLASSID,i.CPU_USAGE_COUNTERID,e,o).then(function(n){var i;return n&&n.p&&(i=n.p.map(function(n){var i=new t.BigNumber(n.t.h,n.t.l);return{category:n.c,time:parseInt(i.value),utilization:n.u}})),i})},i.prototype.queryFrameRate=function(r,u){var f=new t.JsonTimespan(t.BigNumber.convertFromNumber(r),t.BigNumber.convertFromNumber(u));return n.Graphs.DataUtilities.getFilteredResult(this._dataWarehouse,i.TIMELINE_ANALYZER_CLASSID,i.FRAME_RATE_COUNTERID,f).then(function(n){var i;return n&&n.p&&(i=n.p.map(function(n){var i=new t.BigNumber(n.t.h,n.t.l);return{fps:n.v,time:parseInt(i.value)}})),i})},i.prototype.queryMarkEvents=function(r,u,f){var o=new t.JsonTimespan(t.BigNumber.convertFromNumber(r),t.BigNumber.convertFromNumber(u)),e;return e=f===0?i.LIFE_CYCLE_MARKS_COUNTERID:i.USER_MARKS_COUNTERID,n.Graphs.DataUtilities.getFilteredResult(this._dataWarehouse,i.TIMELINE_ANALYZER_CLASSID,e,o).then(function(n){var u,i,r;if(n&&n.p)for(u=[],i=0;i<n.p.length;i++)r=n.p[i],u.push({time:new t.BigNumber(r.t.h,r.t.l),tooltip:r.tt});return u})},i.prototype.getUIThreadId=function(){return this._threadId},i.prototype.getSessionUrl=function(){return this._sessionUrl},i.prototype.getLowestObservedDocumentMode=function(){return this._lowestObservedDocumentMode},i.prototype.getFilteredResult=function(n,t,r){var f={timeDomain:t,customDomain:{operation:n}},u;if(r)for(u in r)r.hasOwnProperty(u)&&(f.customDomain[u]=r[u]);return this._dataWarehouse.getFilteredData(f,i.TIMELINE_ANALYZER_CLASSID)},i.GET_UITHREAD_ID_OPERATION="getUIThreadId",i.GET_SESSION_URL_OPERATION="getSessionUrl",i.GET_LOWEST_OBSERVED_DOCUMENT_MODE_OPERATION="getLowestObservedDocumentMode",i.INITIALIZE_RESOURCES_OPERATION="initializeResources",i.QUERY_EVENT_INTERVALS="queryEventIntervals",i.CPUUSAGE_ANALYZER_CLASSID="DCA8B3EF-28C5-4B08-BAFC-B072F8AA9277",i.TIMELINE_ANALYZER_CLASSID="8C0C631D-37F1-11E3-8259-6C3BE516EAD0",i.CPU_USAGE_COUNTERID="CPUUsage",i.FRAME_RATE_COUNTERID="frameRate",i.LIFE_CYCLE_MARKS_COUNTERID="lifeCycleMarks",i.USER_MARKS_COUNTERID="userMarks",i}();n.AnalyzerDataSession=i})(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(n){this._session=n}return i.prototype.getMarkEvents=function(n,t){return this._session.queryMarkEvents(n.begin.nsec,n.end.nsec,t)},i.prototype.getMarkTooltip=function(i){var r=i.toolTip,u=parseInt(i.timestamp.value);return r+t.Resources.getString("RulerMarkTooltipLabel",Common.FormattingHelpers.getPrettyPrintTime(n.TimeStamp.fromNanoseconds(u)))},i}();n.MarkEventModel=i})(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=Microsoft.VisualStudio.DiagnosticsHub,r=function(){function t(n){this._dataWarehouse=n}return t.prototype.clean=function(){},t.prototype.getDataSession=function(){var t=new n.AnalyzerDataSession(this._dataWarehouse);return t.initialize().then(function(){return t})},t}(),u;n.DataWarehouseProfilerSource=r;u=function(){function u(n,t,i){this._etlFilePath=n;this._isUserSpecifiedFile=t;i&&(this._analyzerDir=i,this._analyzerDir.charAt(this._analyzerDir.length-1)!=="\\"&&(this._analyzerDir+="\\"))}return Object.defineProperty(u.prototype,"etlPath",{get:function(){return this._etlFilePath},enumerable:!0,configurable:!0}),u.prototype.clean=function(){var i,n,r;if(this._dataWarehouseSource&&(this._dataWarehouseSource.clean(),this._dataWarehouseSource=null),t.F12&&this._etlFilePath&&!this._isUserSpecifiedFile){for(i=this._etlFilePath.split("|"),n=0;n<i.length;n++)r=i[n],r&&t.F12.deleteFile(r);this._etlFilePath=null}},u.prototype.getDataSession=function(){var e=this,o={id:this._etlFilePath,identity:i.DataWarehouse.ResourceIdentity.EtlFile,type:1,path:this._etlFilePath,tags:[]},c={type:2,localDllPath:this.getAnalyzerPath("timeline.dll"),clsid:n.AnalyzerDataSession.TIMELINE_ANALYZER_CLASSID},l={type:2,localDllPath:this.getAnalyzerPath("timeline.dll"),clsid:n.AnalyzerDataSession.CPUUSAGE_ANALYZER_CLASSID},s,f,h;return u._sessionId++,s={sessionId:u.getSimpleGuid(u._sessionId),analyzers:[c,l],dataSources:[o],symbolCachePath:"",symbolStorePath:""},new t.Promise(function(n,t,u){h=i.DataWarehouse.loadDataWarehouse(s).then(function(n){return f=n,e._dataWarehouseSource=new r(f),f.beginInitialization()}).then(function(){return f.pushDataSources([o])}).then(function(){return f.endInitialization()},t,function(n){u&&u(n)}).then(function(){return e._dataWarehouseSource.getDataSession()}).then(function(t){n&&n(t)},t)},function(){h.cancel()})},u.getSimpleGuid=function(n){var t="00000000-0000-0000-0000-000000000000",i=(n%0xffffffffffff).toString(16);return t.substr(0,t.length-i.length)+i},u.prototype.getAnalyzerPath=function(n){return this._analyzerDir?this._analyzerDir+n:n},u._sessionId=0,u}();n.EtlFileProfilingSource=u})(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";function r(){t.F12?n.analytics=new Common.F12AnalyticsProxy(Common.ToolName.VISUAL_PROFILER):t.VS&&(n.analytics=new Common.VsAnalyticsProxy("Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Package.Extensions.VisualProfilerTelemetry",Common.ToolName.VISUAL_PROFILER))}var t=Microsoft.Plugin,i;n.analytics=new Common.DoNothingAnalyticsProxy;i=function(){function n(){}return n.START_PROFILE="StartProfile",n.STOP_PROFILE="StopProfile",n.IMPORT_SESSION="ImportSession",n.EXPORT_SESSION="ExportSession",n.ZOOM_IN="ZoomIn",n.ZOOM_RESET="ZoomReset",n.CLEAR_SELECTION="ClearSelection",n.CHANGE_SORT_BY="ChangeSortBy",n.FILTER_BY_NAME="FilterByName",n.FILTER_FRAME="FilterFrame",n.FILTER_IMAGE_DECODING="FilterImageDecoding",n.FILTER_NETWORK_TRAFFIC="FilterNetworkTraffic",n.FILTER_UI_ACTIVITIES="FilterUIActivities",n.FILTER_USER_MEASURES="FilterUserMeasures",n.FILTER_DURATION="FilterDuration",n.SELECT_RANGE="SelectRange",n.CLICK_EVENT_DETAIL="ClickEventDetail",n}();n.CommandName=i;n.initializeAnalytics=r})(t=n.Telemetry||(n.Telemetry={}))})(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";(function(n){n[n.perfBrowserTools_VisualProfilerResultsLoaded=23573]="perfBrowserTools_VisualProfilerResultsLoaded"})(n.CodeMarkerValues||(n.CodeMarkerValues={}));var t=n.CodeMarkerValues})(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(){}return n.DetailsPaneLoaded="ResponsivenessNotifications.DetailsPaneLoaded",n.GraphCollapsed="ResponsivenessNotifications.GraphCollapsed",n.GraphExpanded="ResponsivenessNotifications.GraphExpanded",n.GridRowSelected="ResponsivenessNotifications.GridRowSelected",n.GridScrolled="ResponsivenessNotifications.GridScrolled",n.GridUpdatedForFilter="ResponsivenessNotifications.GridUpdatedForFilter",n.GridUpdatedForTimeSelection="ResponsivenessNotifications.GridUpdatedForTimeSelection",n.ResetZoomFinished="ResponsivenessNotifications.ResetZoomFinished",n.ResultsLoaded="ResponsivenessNotifications.ResultsLoaded",n.SaveSessionFinished="ResponsivenessNotifications.SaveSessionFinished",n.SortFinishedOnGrid="ResponsivenessNotifications.SortFinishedOnGrid",n.UserSelectedTimeslice="ResponsivenessNotifications.UserSelectedTimeslice",n.ZoomInFinished="ResponsivenessNotifications.ZoomInFinished",n}();n.ResponsivenessNotifications=t})(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=Microsoft.VisualStudio.DiagnosticsHub,r=function(){function r(){var r=this,u;this._toolbarViewModel=new n.ToolbarViewModel(this);n.Program.hostType===1?(this._view=new n.F12.VisualProfilerView(this,this._toolbarViewModel),t.F12.addEventListener("activated",function(){return r.onToolActivated()}),t.F12.addEventListener("deactivated",function(){return r.onToolDeactivated()}),this.onToolActivated(),u=window.external,u.addEventListener("detach",function(){r._toolbarViewModel.stopProfiling()}),u.addEventListener("closing",function(){r._session&&(r._session.close(),r._session=null);r.deleteEtlFile();n.Program.etwDataCollector.stopCollection()})):(this._view=new n.VS.VisualProfilerView(this),i.DataWarehouse.loadDataWarehouse().done(function(t){r._view.setSource(new n.DataWarehouseProfilerSource(t))}));t.F12&&n.SelfTest&&n.SelfTest.init()}return Object.defineProperty(r.prototype,"globalRuler",{get:function(){return this._globalRuler},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"toolbarViewModel",{get:function(){return this._toolbarViewModel},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"view",{get:function(){return this._view},enumerable:!0,configurable:!0}),r.prototype.initializeSession=function(i){var u=this,f;return this._profilingSource=i,new t.Promise(function(t,i,e){f=u._profilingSource.getDataSession().then(function(n){return u._session=n,u.initializeResources()},i,function(n){e&&e({totalStages:n.stageCount,currentStage:n.currentStage,errCode:n.result,isCompleted:n.finished,max:n.maxValue,value:n.progressValue})}).then(function(){var i,f,h;u._globalRuler&&u._globalRuler.deinitialize();i=u._session.getTotalDuration();u._globalRuler=new n.GlobalRuler(new n.TimeSpan(n.TimeStamp.fromNanoseconds(i.begin),n.TimeStamp.fromNanoseconds(i.end)));u._toolbarViewModel.setGlobalRuler(u._globalRuler);var e=new n.MarkEventModel(u._session),c=new n.EventsTimelineModel(u._session),o=new n.EventsTimelineViewModel(c,u._globalRuler,e),s=u._session.getLowestObservedDocumentMode();n.Program.hostType===1?(f=new n.F12.SwimlanesViewModel(u._globalRuler,e,u._session,r.PADDING,u._toolbarViewModel),h=new n.F12.SwimlaneConfigurations,f.graphConfigs=h.configurations,t&&t({eventsTimelineViewModel:o,globalRuler:u._globalRuler,swimlanesViewModel:f,lowestObservedDocumentMode:s})):t&&t({eventsTimelineViewModel:o,globalRuler:u._globalRuler,lowestObservedDocumentMode:s})},i)},function(){f.cancel()})},r.prototype.startProfiling=function(){var i=this;return this._collectionSession?t.Promise.as(null):this.closeSession().then(function(){return t.F12.Profiler.notifyOnStartProfiling(),n.Program.etwDataCollector.startSession("JavaScriptCollectionAgent.dll","{8C0C6321-37F1-11E3-8259-6C3BE516EAD0}",!0).then(function(n){i._collectionSession=n;i._view.onProfilingStarted()},function(n){t.F12.Profiler.notifyOnStopProfiling();i._view.onProfilingStartFailed(n);throw n})})},r.prototype.stopProfiling=function(){var i=this;return this._collectionSession?(this._view.onProfilingStopping(),this._collectionSession.stop().then(function(r){return t.F12.Profiler.notifyOnStopProfiling(),i._collectionSession=null,i._view.setSource(new n.EtlFileProfilingSource(r,!1,window.external.utilities.getF12RootPath()))},function(n){i._collectionSession=null;i._view.onProfilingStopFailed(n);throw n})):t.Promise.as(null)},r.prototype.openSession=function(i){var u=this;return new t.Promise(function(f,e){try{if(n.Program.packager.openPackage(i.streamId),!n.Program.packager.hasToolData(Common.Constants.UI_RESPONSIVENESS_TOOL_GUID))throw new Error(t.Resources.getErrorString("JSPerf.1076"));return u.closeSession().then(function(){var t=n.Program.packager.getResourcePathsByType(r.ETL_RESOURCE_TYPE);return n.Program.packager.closePackage(),u._view.onProfilingStopping(),u.toolbarViewModel.openSessionEnabled=!0,u.toolbarViewModel.saveSessionEnabled=!0,u.toolbarViewModel.startProfilingEnabled=!0,u.toolbarViewModel.collectionState=3,u._view.setSource(new n.EtlFileProfilingSource(t.join("|"),!0,window.external.utilities.getF12RootPath())),i.close().then(function(){f&&f()})})}catch(o){return n.Program.packager.closePackage(),i.close().then(function(){e&&e(o)})}})},r.prototype.saveSession=function(i){var u=this;return new t.Promise(function(f,e){var s,h,o;if(u._profilingSource instanceof n.EtlFileProfilingSource)s=u._profilingSource.etlPath.split("|");else throw new Error(t.Resources.getString("WrongDataSource"));try{for(h=n.Program.packager.createPackage(Common.Constants.UI_RESPONSIVENESS_TOOL_GUID),o=0;o<s.length;++o)n.Program.packager.addResource(r.ETL_RESOURCE_TYPE,s[o],r.ETL_SAVE_NAME+o+".etl");return n.Program.packager.commit(),t.F12.copyFileToStream(h,i.streamId),i.close().then(function(){try{t.F12.deleteFile(h);f&&f()}catch(n){e&&e(n)}})}catch(c){e&&e(c)}})},r.prototype.closeSession=function(){var n=this;return this._session?(this._view.resetSource(),this._session.closeAsync().then(function(){n._session=null;n.deleteEtlFile()},function(t){n._session=null;throw t})):t.Promise.as(null)},r.prototype.deleteEtlFile=function(){this._profilingSource&&this._profilingSource.clean()},r.prototype.initializeResources=function(){var n={};return["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"].forEach(function(i){var r=t.Resources.getString(i);r=Common.FormattingHelpers.convertFormatString(r);n[i]=r}),this._session.initializeResources(n)},r.prototype.onToolActivated=function(){var n=t.F12.Debugger.getIsAtBreakpoint();this._toolbarViewModel.isAtBreakpoint=n;this._view.onToolActivated()},r.prototype.onToolDeactivated=function(){this._view.onToolDeactivated()},r.PADDING=34,r.ETL_RESOURCE_TYPE="DiagnosticsHub.Resource.EtlFile",r.ETL_SAVE_NAME="Trace",r}();n.VisualProfilerController=r})(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(t,i){this.controller=i;var r=document.getElementById("mainContainer"),u=new Common.Controls.Legacy.Control(r);this.mainView=new Common.Controls.Legacy.TemplateControl(t);u.appendChild(this.mainView);this.dataViewContainer=this.mainView.findElement("dataViewContainer");this.detailedViewsContainer=this.mainView.findElement("detailedViewsContainer");this.eventsTimelineView=new n.EventsTimelineView(this.mainView.findElement("timelineViewContainer").id);this._warningView=this.mainView.findElement("warningView");this._warningView.style.display="none";this._warningMessage=this.mainView.findElement("warningMessage")}return i.prototype.onProcessingStarting=function(){},i.prototype.onProcessingCompleted=function(){},i.prototype.onProcessingFailed=function(){},i.prototype.onProcessingProgress=function(){},i.prototype.onProfilingStarted=function(){this._warningView.style.display="none"},i.prototype.onProfilingStartFailed=function(){},i.prototype.onProfilingStopping=function(){},i.prototype.onProfilingStopFailed=function(){},i.prototype.onToolActivated=function(){this.eventsTimelineView&&this.eventsTimelineView.listControl&&this.eventsTimelineView.listControl.updateHighlightedElement()},i.prototype.onToolDeactivated=function(){this.eventsTimelineView&&this.eventsTimelineView.listControl&&this.eventsTimelineView.listControl.clearHighlightedElement()},i.prototype.setSource=function(i){var r=this;return n.Program.traceWriter.raiseEvent(105),this._warningView.style.display="none",this.onProcessingStarting(),this.controller.initializeSession(i).then(function(t){r.onProcessingCompleted();r.detailedViewsContainer.style.display="";t.lowestObservedDocumentMode<Common.Constants.MINIMUM_REQUIRED_DOCUMENT_MODE&&(r._warningMessage.innerText=n.Program.getHostSpecificString("WarningIncompatibleStandardsMode"),r._warningView.style.display="block");r.setupAnalysisView(t)},function(i){r.onProcessingFailed(i);r.showError(new Error(t.Resources.getString("GenericDataProcessingError",i.message)));n.Program.reportError(i,t.Resources.getString("GenericDataProcessingError"))},function(n){r.onProcessingProgress(n)})},i.prototype.setupAnalysisView=function(t){this.setupAnalysisViewOverride(t);this.eventsTimelineView.viewModel=t.eventsTimelineViewModel;this.eventsTimelineView.viewModel.resetFilter();this.eventsTimelineView.render().done(function(){n.Program.fireCodeMarker(23573);Notifications.notify(n.ResponsivenessNotifications.ResultsLoaded);n.Program.traceWriter.raiseEvent(106)})},i.prototype.setupAnalysisViewOverride=function(){},i.prototype.showError=function(){},i.prototype.resetSource=function(){this.eventsTimelineView.viewModel=null},i}();n.VisualProfilerView=i})(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=Microsoft.Plugin,r=function(r){function u(u,f){var h=this,o,s,e;r.call(this,"mainViewTemplateF12",u);this.timelineViewContainer=this.mainView.findElement("timelineViewContainer");this.eventsTimelineTab=new Common.Controls.TabItem;this.eventsTimelineTab.tabPane=this.eventsTimelineView;this.eventsTimelineTab.title=i.Resources.getString("TimelineTabLabel");this.eventsTimelineTab.tooltip=i.Resources.getString("TimelineTabTooltip");o=new n.CpuUsageView(this.timelineViewContainer.id);this.cpuUsageTab=new Common.Controls.TabItem;this.cpuUsageTab.tabPane=o;this.cpuUsageTab.title=i.Resources.getString("JavaScriptCallStacksTabLabel");this.cpuUsageTab.tooltip=i.Resources.getString("JavaScriptCallStacksTabTooltip");this.tabControl=new Common.Controls.TabControl;this.tabControl.tabsLeftAligned=!0;this.timelineViewContainer.appendChild(this.tabControl.rootElement);this.tabControl.selectedItemChanged=function(){return h.onSelectedTabChanged()};this.tabControl.addTab(this.eventsTimelineTab);this.tabControl.addTab(this.cpuUsageTab);this.toolbarViewModel=f;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",i.Resources.getString("AnalyzeDataStatus"));this._progressContainer.style.display="none";this._profilingInProgress=!1;this._profilingFailed=!1;s=this.mainView.findElement("progressText");s.innerText=i.Resources.getString("AnalyzeDataStatus");this._toolbarControl=new n.VisualProfilerToolbarControl;this._toolbarControl.model=f;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(i.Resources.getString("F12StartProfilingMessage"));e=this.onProfilingLinkClick.bind(this);this._profilingLink.addEventListener("click",e);this._profilingLink.addEventListener("keydown",e);this._swimLanesView=new t.SwimlanesView(this.mainView.findElement("swimLanesViewContainer").id);i.F12.addEventListener("keydown",this.shortcutHandler.bind(this));document.addEventListener("keydown",this.shortcutHandler.bind(this));i.F12.addEventListener("browsershortcut",this.shortcutHandler.bind(this));this._toolbarViewModel.openSessionEnabled=n.Program.packager!==null;this.updateNavigationFrames(!0);Common.NavigationUtilities.registerFocusHandlers(i.F12.PluginId.VisualProfiler)}return __extends(u,r),Object.defineProperty(u.prototype,"toolbarViewModel",{get:function(){return this._toolbarViewModel},set:function(n){this.unregisterToolbarViewModelEvents();this._toolbarViewModel=n;this.registerToolbarViewModelEvents()},enumerable:!0,configurable:!0}),u.prototype.onProcessingStarting=function(){r.prototype.onProcessingStarting.call(this);this._progressSoFar=0;this._progressStageNumber=0;this._progress.value=0;this._progress.max=100;this.detailedViewsContainer.style.display="none";this._progressContainer.style.display=""},u.prototype.onProcessingCompleted=function(){r.prototype.onProcessingCompleted.call(this);this._progressContainer.style.display="none"},u.prototype.onProcessingFailed=function(n){r.prototype.onProcessingFailed.call(this,n);this._progressContainer.style.display="none";this._profilingPrompt&&(this._profilingPrompt.style.display="",this.setProfilingLinkText(i.Resources.getString("F12StartProfilingMessage")))},u.prototype.onProcessingProgress=function(n){if(r.prototype.onProcessingProgress.call(this,n),this._progressStageNumber!==n.currentStage&&(this._progressStageNumber=n.currentStage,this._progressSoFar=this._progress.value),this._progressStageNumber!=n.totalStages||!(n.totalStages>1)){var t=n.value/n.max*100,i=t/Math.max(n.totalStages-1,1);this._progress.value=this._progressSoFar+i}},u.prototype.onProfilingStarted=function(){r.prototype.onProfilingStarted.call(this);this._profilingFailed=!1;this._profilingInProgress=!0;this.dataViewContainer.style.display="none";this._profilingPrompt.style.display="";this.setProfilingLinkText(i.Resources.getString("F12StopProfilingMessage"));this._profilingProgress.style.display=""},u.prototype.onProfilingStartFailed=function(n){r.prototype.onProfilingStartFailed.call(this,n);this._profilingFailed=!0;this._profilingInProgress=!1;this._profilingProgress.style.display="none";this.dataViewContainer.style.display="none";this._profilingPrompt.style.display="";this.setProfilingLinkText(i.Resources.getString("F12StartProfilingMessage"));var t=n.message==="-2147221164"?"http://go.microsoft.com/fwlink/?LinkID=306020":null;this.showError(new Error(i.Resources.getString("GenericDataProcessingError",n.message)),t)},u.prototype.onProfilingStopping=function(){r.prototype.onProfilingStopping.call(this);this._profilingInProgress=!1;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()},u.prototype.onProfilingStopFailed=function(n){r.prototype.onProfilingStopFailed.call(this,n);this._profilingFailed=!0;this.dataViewContainer.style.display="none";this._profilingPrompt.style.display="";this.setProfilingLinkText(i.Resources.getString("F12StartProfilingMessage"));this.showError(new Error(i.Resources.getString("GenericDataProcessingError",n.message)));this.updateNavigationFrames(!0)},u.prototype.registerToolbarViewModelEvents=function(){this.toolbarViewModel&&(this._toolbarViewModelPropertyChangedEvtReg=this.toolbarViewModel.propertyChanged.addHandler(this.onToolbarViewModelPropertyChanged.bind(this)))},u.prototype.setupAnalysisViewOverride=function(t){var i=this;r.prototype.setupAnalysisViewOverride.call(this,t);this._swimLanesView.viewModel=t.swimlanesViewModel;this._swimLanesView.render();this.cpuUsageTab&&this.cpuUsageTab.tabPane.model.render();window.setImmediate(function(){n.Program.triggerResize();i._swimLanesView.focusOnRuler();i.updateNavigationFrames(!1)})},u.prototype.showError=function(n,t){r.prototype.showError.call(this,n,t);i.F12.ErrorDisplay.show(n.message,null,t)},u.prototype.unregisterToolbarViewModelEvents=function(){this._toolbarViewModelPropertyChangedEvtReg&&(this._toolbarViewModelPropertyChangedEvtReg.unregister(),this._toolbarViewModelPropertyChangedEvtReg=null)},u.prototype.onProfilingLinkClick=function(t){this.controller&&(t.type==="click"||t.keyCode===13||t.keyCode===32)&&(this._profilingInProgress&&this.toolbarViewModel.stopProfilingEnabled?n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.STOP_PROFILE,0):this.toolbarViewModel.startProfilingEnabled&&n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.START_PROFILE,0),this.toggleProfiling())},u.prototype.onSelectedTabChanged=function(){for(var n,t;this.tabControl.afterBarContainer.firstChild;)this.tabControl.afterBarContainer.removeChild(this.tabControl.afterBarContainer.firstChild);this.tabControl.selectedItem===this.eventsTimelineTab?(n=this.eventsTimelineView.sortFilterSection,this.tabControl.afterBarContainer.appendChild(n)):this.tabControl.selectedItem===this.cpuUsageTab&&(t=this.cpuUsageTab.tabPane.SearchControl.rootElement,this.tabControl.afterBarContainer.appendChild(t))},u.prototype.onToolbarViewModelPropertyChanged=function(t){switch(t){case n.ToolbarViewModel.StartProfilingEnabledPropertyName:this._profilingInProgress||this.updateProfilingLinkState(!this.toolbarViewModel.isAtBreakpoint);break;case n.ToolbarViewModel.StopProfilingEnabledPropertyName:this._profilingInProgress&&this.updateProfilingLinkState(!this.toolbarViewModel.isAtBreakpoint)}},u.prototype.shortcutHandler=function(t){!t.ctrlKey||t.shiftKey||t.altKey||(t.keyCode===69?(this._profilingInProgress&&this.toolbarViewModel.stopProfilingEnabled?n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.STOP_PROFILE,1):this.toolbarViewModel.startProfilingEnabled&&n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.START_PROFILE,1),this.toggleProfiling()):this.toolbarViewModel.saveSessionEnabled&&t.keyCode===83?(n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.EXPORT_SESSION,1),this.toolbarViewModel.saveSession()):this.toolbarViewModel.openSessionEnabled&&t.keyCode===79&&(n.Telemetry.analytics.logExecuteCommand(n.Telemetry.CommandName.IMPORT_SESSION,1),this.toolbarViewModel.openSession()))},u.prototype.toggleProfiling=function(){this._profilingInProgress&&this.toolbarViewModel.stopProfilingEnabled?this.toolbarViewModel.stopProfiling():this.toolbarViewModel.startProfilingEnabled&&(this._profilingFailed=!1,this.toolbarViewModel.startProfiling(),this.updateNavigationFrames(!0))},u.prototype.setProfilingLinkText=function(n){this._profilingLink.innerText=n;this._profilingLink.setAttribute("aria-label",n)},u.prototype.updateProfilingLinkState=function(n){n?(this._profilingLink.style.display="",this._profilingFailed||i.F12.ErrorDisplay.close()):(this._profilingLink.style.display="none",i.F12.ErrorDisplay.show(i.Resources.getString("VisualProfilerDisabledAtBreakpoint")))},u.prototype.updateNavigationFrames=function(n){var i=this,t=[Common.NavigationUtilities.makeNavigationFrameFromCallback(document.body,function(){return i._toolbarControl.getActiveElement()})];n||t.push(Common.NavigationUtilities.makeNavigationFrameFromCallback(this.mainView.findElement("timelineViewContainer"),function(){return document.getElementById("timelineSortSelector")}));Common.NavigationUtilities.registerNavigationFrames(t)},u}(n.VisualProfilerView);t.VisualProfilerView=r})(t=n.F12||(n.F12={}))}(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){"use strict";var i=function(t){function i(n){t.call(this,"mainViewTemplateVS",n)}return __extends(i,t),i.prototype.setupAnalysisViewOverride=function(i){t.prototype.setupAnalysisViewOverride.call(this,i);n.Program.triggerResize()},i.prototype.showError=function(n,i){t.prototype.showError.call(this,n,i);var r=new Common.Controls.Legacy.TemplateControl("errorViewTemplate"),u=r.findElement("errorMessage");u.innerText=n.message;this.mainView.rootElement.innerHTML="";this.mainView.rootElement.appendChild(r.rootElement)},i}(n.VisualProfilerView);t.VisualProfilerView=i})(t=n.VS||(n.VS={}))}(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";(function(n){n[n.VS=0]="VS";n[n.F12=1]="F12";n[n.Test=2]="Test"})(n.HostType||(n.HostType={}));var i=n.HostType,t=function(){function n(){}return n.Resize="resize",n.Initialized="initialized",n}();n.ProgramEvents=t})(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(){this._eventManager=new t.Utilities.EventManager;this._traceWriter=new Common.DefaultTraceWriter}return Object.defineProperty(i.prototype,"controller",{get:function(){return this._visualProfilerController},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"etwDataCollector",{get:function(){return this._etwDataCollector},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hostType",{get:function(){return this._hostType},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hostShell",{get:function(){return this._hostShell},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"packager",{get:function(){return this._packager},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"traceWriter",{get:function(){return this._traceWriter},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"userSettings",{get:function(){return this._userSettings},enumerable:!0,configurable:!0}),i.prototype.addEventListener=function(t,i){if(t===n.ProgramEvents.Initialized&&this._visualProfilerController){var r=document.createEvent("Event");r.initEvent(n.ProgramEvents.Initialized,!1,!1);r.controller=this._visualProfilerController;i(r)}else this._eventManager.addEventListener(t,i)},i.prototype.fireCodeMarker=function(n){t.VS&&t.VS.Internal&&t.VS.Internal.CodeMarkers&&t.VS.Internal.CodeMarkers.fire(n)},i.prototype.getHostSpecificString=function(i){for(var f,u=[],r=1;r<arguments.length;r++)u[r-1]=arguments[r];return f=i+Common.Enum.GetName(n.HostType,this._hostType),t.Resources.getString(f,u)},i.prototype.main=function(){var i=this;this._telemetryLoadStartTime=Date.now();window.parent&&window.parent.getExternalObj?this._externalObj=window.parent.getExternalObj():window.external&&(this._externalObj=window.external);this._hostType=t.F12?1:0;t.addEventListener("pluginready",function(){t.Tooltip.defaultTooltipContentToHTML=!1;i._visualProfilerController=new n.VisualProfilerController;t.VS&&t.VS.Keyboard&&t.VS.Keyboard.setZoomState(!1);var r;switch(i.hostType){case 0:i._hostShell=new Common.Extensions.HostShellProxy;r=t.VS.Utilities.createExternalObject("PerformanceTraceExtension","{8C0C6315-37F1-11E3-8259-6C3BE516EAD0}");break;case 1:i._hostShell=new Common.Extensions.LocalHostShell;i._etwDataCollector=new Common.Data.F12EtwDataCollector(i._externalObj.etwDataCollector);try{i._packager=new Common.Data.F12Packager(i._externalObj.packager)}catch(u){i._packager=null}r=t.F12.TraceWriter;break;default:throw new Error(t.Resources.getErrorString("JSPerf.1056"))}n.Telemetry.initializeAnalytics();r&&(i._traceWriter=new Common.TraceWriter(r));n.Extensions.UserSettingsHelper.getUserSettings().then(function(r){i._userSettings=r;i.initializeErrorReporting();window.addEventListener("resize",i.triggerResize.bind(i));t.F12&&t.F12.TraceWriter.markToolReady();var u={toolName:Common.ToolName.VISUAL_PROFILER,durationMs:Date.now()-i._telemetryLoadStartTime};n.Telemetry.analytics.log(Common.TelemetryEventName.TOOL_LOADED,u,2);i._eventManager.dispatchEvent(n.ProgramEvents.Initialized)})});Common.ErrorHandling.addPromiseErrorListener()},i.prototype.initializeErrorReporting=function(){var n=this;window.onerror=function(t,i,r){var u,f;return arguments&&arguments[3]&&typeof arguments[3]=="number"&&(u=arguments[3]),f=arguments&&arguments[4]&&arguments[4]instanceof Error?"Error number: "+arguments[4].number+("\r\nStack: "+arguments[4].stack):"Unhandled Error",n.reportError(new Error(t),f,i,r,u),!0}},i.prototype.removeEventListener=function(n,t){this._eventManager.removeEventListener(n,t)},i.prototype.reportError=function(n,i,r,u,f){var o,h,e;if(!this.userSettings.disableWER){var c=n.message||n.description,l=r||"Visual Profiler",a=u||0,v=f||0,s="Error description:  "+c;n.number&&(s+="\r\nError number:  "+n.number);r&&(s+="\r\nSource:  "+r);n.stack&&(o=n.stack,s+="\r\nError stack:  "+o,c||(h=o.indexOf("\n"),h>0&&(h=Math.min(h,50),c=o.substring(0,h))),typeof r=="undefined"&&(e=o.match(/(file|res):?([^)]+)\)/),e&&e.length>2&&(l=e[2])),typeof u=="undefined"&&(e=o.match(/line ?(\d+)/),(!e||e.length<=1)&&(e=o.match(/js:?(\d+):/)),e&&e.length>1&&(a=parseInt(e[1]))));i&&(s+="\r\nAdditional Info:  "+i);t.Diagnostics.reportError(c,l,a,s,v)}},i.prototype.triggerResize=function(){this._eventManager.dispatchEvent(n.ProgramEvents.Resize)},i}();n.ProgramMain=i;n.Program=new i})(VisualProfiler||(VisualProfiler={}));VisualProfiler.Program.main();
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=Microsoft.VisualStudio.DiagnosticsHub,r=function(){function n(){this.configurations=[n.getCpuUsageConfiguration(),n.getVisualThroughputConfiguration()]}return n.getCpuUsageConfiguration=function(){var n='               {                 "View": "Graph",                 "GraphBehaviour": 2,                 "Series": [{                     "Legend": "Loading_Category",                     "LegendTooltip": "LoadingLegendTooltip",                     "Category": "Loading_Category",                     "Color": "#117ad1",                     "CssClass": "dataLoading",                     "DataSource": {                         "CounterId": "CPUUsage",                         "AnalyzerId": "8C0C631D-37F1-11E3-8259-6C3BE516EAD0"                     }                 }, {                     "Legend": "Scripting_Category",                     "LegendTooltip": "ScriptingLegendTooltip",                     "Category": "Scripting_Category",                     "Color": "#bf3f00",                     "CssClass": "dataScripting"                 }, {                     "Legend": "GC_Category",                     "LegendTooltip": "GCLegendTooltip",                     "Category": "GC_Category",                     "Color": "#fcb714",                     "CssClass": "dataScriptingGc"                 }, {                     "Legend": "Styling_Category",                     "LegendTooltip": "StylingLegendTooltip",                     "Category": "Styling_Category",                     "Color": "#71b252",                     "CssClass": "dataStyling"                 }, {                     "Legend": "Rendering_Category",                     "LegendTooltip": "RenderingLegendTooltip",                     "Category": "Rendering_Category",                     "Color": "#903f8b",                     "CssClass": "dataRendering"                 }, {                     "Legend": "ImageDecoding_Category",                     "LegendTooltip": "ImageDecodingLegendTooltip",                     "Category": "ImageDecoding_Category",                     "Color": "#79d7f2",                     "CssClass": "dataImageDecoding"                 }],                 "BarWidth": 4,                 "BarGap": 1,                 "ShowStackGap": true,                 "Height": 60               }',r=JSON.parse(n),u={Id:"918f5d75-c371-4e52-88bb-c27b4669cb4c",Title:t.Resources.getString("CPUChartTitle"),Description:t.Resources.getString("CPUGraphAriaLabel"),JsonObject:r,JsonConfiguration:n,JavaScriptClassName:"VisualProfiler.Graphs.StackedBarGraph",Resources:{CPUBarAriaLabel:t.Resources.getString("CPUBarAriaLabel"),CPUGraphAriaLabel:t.Resources.getString("CPUGraphAriaLabel"),CPUTooltipCategoryLabel:t.Resources.getString("CPUTooltipCategoryLabel"),CPUTooltipTimeLabel:t.Resources.getString("CPUTooltipTimeLabel"),CPUTooltipUtilizationLabel:t.Resources.getString("CPUTooltipUtilizationLabel"),GC_Category:t.Resources.getString("GC_Category"),GCLegendTooltip:t.Resources.getString("GCLegendTooltip"),ImageDecoding_Category:t.Resources.getString("ImageDecoding_Category"),ImageDecodingLegendTooltip:t.Resources.getString("ImageDecodingLegendTooltip"),Loading_Category:t.Resources.getString("Loading_Category"),LoadingLegendTooltip:t.Resources.getString("LoadingLegendTooltip"),Rendering_Category:t.Resources.getString("Rendering_Category"),RenderingLegendTooltip:t.Resources.getString("RenderingLegendTooltip"),Scripting_Category:t.Resources.getString("Scripting_Category"),ScriptingLegendTooltip:t.Resources.getString("ScriptingLegendTooltip"),Styling_Category:t.Resources.getString("Styling_Category"),StylingLegendTooltip:t.Resources.getString("StylingLegendTooltip"),Unknown_Category:t.Resources.getString("Unknown_Category"),UnknownLegendTooltip:t.Resources.getString("UnknownLegendTooltip")}};return i.RegisterNamespace.registerClass("VisualProfiler.Graphs.StackedBarGraph"),u},n.getVisualThroughputConfiguration=function(){var n='              {                "View": "Graph",                "GraphBehaviour": 2,                "Series": [{                    "Legend": "AFG_Legend",                    "LegendTooltip": "AFG_Legend",                    "Category": "AFG_Legend",                    "Color": {                            "Line":"#76AEC8",                            "Fill":"#A6CADB"                         },                    "CssClass": "dataLoading",                    "DataSource": {                        "CounterId": "frameRate",                        "AnalyzerId": "8C0C631D-37F1-11E3-8259-6C3BE516EAD0"                    }                }],                "Axes": [{ "value": 30 }, { "value": 60 }],                "ScaleType": 2,                "MinValue": 0,                "MaxValue": 70,                "Unit": "AFG_Unit",                "Height": 50              }',i=JSON.parse(n);return{Id:"fa1d7085-b7da-4ffa-9ba7-0f85bee330bb",Title:t.Resources.getString("AFG_Title"),Description:t.Resources.getString("VisualThroughputGraphAriaLabel"),JsonObject:i,JsonConfiguration:n,Resources:{AFG_Legend:t.Resources.getString("AFG_Legend"),AFG_Unit:t.Resources.getString("AFG_Unit")}}},n}();n.SwimlaneConfigurations=r})(t=n.F12||(n.F12={}))})(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
window.TestMode=!0,function(n){"use strict";var t=Microsoft.Plugin,r=function(){function n(){}return Object.defineProperty(n,"controller",{get:function(){return new u},enumerable:!0,configurable:!0}),n}();n.TestContractFactory=r;var u=function(){function i(){}return Object.defineProperty(i.prototype,"globalRuler",{get:function(){return new f(this._controller.globalRuler)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"toolbarViewModel",{get:function(){return new e(this._controller.toolbarViewModel)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"view",{get:function(){return new o(this._controller.view)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_controller",{get:function(){return n.Program.controller},enumerable:!0,configurable:!0}),i.prototype.startProfiling=function(){return this._controller.startProfiling()},i.prototype.stopProfiling=function(){return this._controller.stopProfiling()},i.prototype.openSession=function(n){return this._controller.openSession({streamId:n,close:function(){return t.Promise.as(null)}})},i.prototype.saveSession=function(i){var r=this;return t.Storage.openFile(i,{access:3,encoding:"BINARY",mode:4,persistence:1,type:0}).then(function(t){return r._controller.saveSession(t).then(function(){Notifications.notify(n.ResponsivenessNotifications.SaveSessionFinished)})},function(){throw new Error("Error")})},i.prototype.isRootedPath=function(n){return n.indexOf(":")>=0?!0:!1},i.prototype.generateRandomFilename=function(){return Math.random().toString(36).slice(2)},i}(),f=function(){function i(n){this._globalRuler=n}return Object.defineProperty(i.prototype,"activeRange",{get:function(){return this._globalRuler.activeRange},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selection",{get:function(){return this._globalRuler.selection},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"totalRange",{get:function(){return this._globalRuler.totalRange},enumerable:!0,configurable:!0}),i.prototype.setSelection=function(i){var r=this;return new t.Promise(function(t){Notifications.subscribeOnce(n.ResponsivenessNotifications.GridUpdatedForTimeSelection,function(){return t()});r._globalRuler.setSelection(i)})},i.prototype.setActiveRange=function(i){var r=this;return new t.Promise(function(t){Notifications.subscribeOnce(n.ResponsivenessNotifications.GridUpdatedForTimeSelection,function(){return t()});r._globalRuler.setActiveRange(i)})},i}(),e=function(){function i(n){this._toolbarViewModel=n}return Object.defineProperty(i.prototype,"clearSelectionEnabled",{get:function(){return this._toolbarViewModel.clearSelectionEnabled},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"resetZoomEnabled",{get:function(){return this._toolbarViewModel.resetZoomEnabled},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"zoomInEnabled",{get:function(){return this._toolbarViewModel.zoomInEnabled},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isVisualProfilerDisabled",{get:function(){return this._toolbarViewModel.isAtBreakpoint},enumerable:!0,configurable:!0}),i.prototype.startProfiling=function(){return this._toolbarViewModel.startProfilingEnabled?(this._toolbarViewModel.startProfiling(),!0):!1},i.prototype.stopProfiling=function(){return this._toolbarViewModel.stopProfilingEnabled?(this._toolbarViewModel.stopProfiling(),!0):!1},i.prototype.clearSelection=function(){var i=this;return new t.Promise(function(t){i._toolbarViewModel.clearSelectionEnabled?(Notifications.subscribeOnce(n.ResponsivenessNotifications.GridUpdatedForTimeSelection,function(){return t()}),i._toolbarViewModel.clearSelection()):t()})},i.prototype.resetZoom=function(){var i=this;return new t.Promise(function(t){i._toolbarViewModel.resetZoomEnabled?(Notifications.subscribeOnce(n.ResponsivenessNotifications.ResetZoomFinished,function(){return t()}),i._toolbarViewModel.resetZoom()):t()})},i.prototype.zoomIn=function(){var i=this;return new t.Promise(function(t){i._toolbarViewModel.zoomInEnabled?(Notifications.subscribeOnce(n.ResponsivenessNotifications.ZoomInFinished,function(){return t()}),i._toolbarViewModel.zoomIn()):t()})},i.prototype.visualProfilerDisabled=function(){return this.isVisualProfilerDisabled},i}(),o=function(){function n(n){this._view=n}return Object.defineProperty(n.prototype,"eventsTimelineView",{get:function(){return new s(this._view.eventsTimelineView)},enumerable:!0,configurable:!0}),n}(),s=function(){function n(n){this._view=n}return Object.defineProperty(n.prototype,"listControl",{get:function(){return new l(this._view.listControl)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"viewModel",{get:function(){return new h(this._view)},enumerable:!0,configurable:!0}),n}(),h=function(){function n(n){this._view=n;this._viewModel=n.viewModel}return Object.defineProperty(n.prototype,"filterEventName",{get:function(){return this._viewModel.eventNameFilter},set:function(n){this._viewModel.eventNameFilter=n},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selectedEvent",{get:function(){return new i(this._viewModel.selectedEvent)},set:function(n){this._viewModel.selectedEvent=n.event},enumerable:!0,configurable:!0}),n.prototype.filterDurationHideNegligibleEvents=function(){var n=parseInt(this._viewModel.durationFilterOptions[1].value);this._viewModel.durationFilter=n},n.prototype.filterDurationShowAll=function(){var n=parseInt(this._viewModel.durationFilterOptions[0].value);this._viewModel.durationFilter=n},n.prototype.getEventDetails=function(n){return this._viewModel.getEventDetails(n.event)},n.prototype.getEvents=function(){var n=this;return new t.Promise(function(t,i){n._viewModel.getEvents().then(function(n){return t(new c(n))},i)})},n.prototype.getUserMarks=function(){return this._viewModel.getMarks(1)},n.prototype.getLifeCycleMarks=function(){return this._viewModel.getMarks(1)},n.prototype.toggleBackgroundActivityFilter=function(){var n=this._viewModel.displayImageDecoding;this._viewModel.displayImageDecoding=!n},n.prototype.toggleMeasuresFilter=function(){var n=this._viewModel.displayMeasures;this._viewModel.displayMeasures=!n},n.prototype.toggleNetworkActivityFilter=function(){var n=this._viewModel.displayNetworkActivities;this._viewModel.displayNetworkActivities=!n},n.prototype.toggleUIActivityFilter=function(){var n=this._viewModel.displayUIActivities;this._viewModel.displayUIActivities=!n},n}(),c=function(){function n(n){this._dataSource=n}return Object.defineProperty(n.prototype,"count",{get:function(){return this._dataSource.count},enumerable:!0,configurable:!0}),n.prototype.expandIntervalBranch=function(n){this._dataSource.expandBranch(n)},n.prototype.getNext=function(n){var t=this._dataSource.getNext(n);return t?new i(t):null},n.prototype.startAt=function(n){this._dataSource.startAt(n)},n.prototype.stop=function(){this._dataSource.stop()},n}(),l=function(){function n(n){this._listControl=n}return n.prototype.dispatchEvent=function(n){return this._listControl.rootElement.dispatchEvent(n)},n.prototype.filterToEvent=function(){this._listControl.filterToEvent()},n}(),i=function(){function n(n){this._event=n}return Object.defineProperty(n.prototype,"context",{get:function(){return this._event.context},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"contextThreadId",{get:function(){return this._event.contextThreadId},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"event",{get:function(){return this._event},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"exclusiveDuration",{get:function(){return this._event.exclusiveDuration},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"fullName",{get:function(){return this._event.fullName},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hasChildren",{get:function(){return this._event.hasChildren},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return this._event.id},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"name",{get:function(){return this._event.name},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"timeSpan",{get:function(){return this._event.timeSpan},enumerable:!0,configurable:!0}),n}()}(VisualProfiler||(VisualProfiler={})),function(n){var t=function(){function n(){}return n.toolbarButtonsPanel='<div>            <div data-name="startToolbarButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton24x24" data-options="className:startToolbarButton,                                tooltip:F12StartButtonTooltip; converter=Common.CommonConverters.ResourceConverter" data-binding="isEnabled:startProfilingEnabled"><\/div>            <div data-name="stopToolbarButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton24x24" data-options="className:stopToolbarButton,                                tooltip:F12StopButtonTooltip; converter=Common.CommonConverters.ResourceConverter" data-binding="isEnabled:stopProfilingEnabled"><\/div>            <div data-name="openSessionButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton24x24" data-options="className:openSessionButton,                                tooltip:F12OpenSessionButtonTooltip; converter=Common.CommonConverters.ResourceConverter" data-binding="isEnabled:openSessionEnabled"><\/div>            <div data-name="saveSessionButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton24x24" data-options="className:saveSessionButton,                                tooltip:F12SaveSessionButtonTooltip; converter=Common.CommonConverters.ResourceConverter" data-binding="isEnabled:saveSessionEnabled"><\/div>            <div data-name="zoomInButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton24x24" data-options="className:zoomInButton,                                tooltip:ToolbarButtonZoomIn; converter=Common.CommonConverters.ResourceConverter" data-binding="isEnabled:zoomInEnabled"><\/div>            <div data-name="resetZoomButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton24x24" data-options="className:resetZoomButton,                                tooltip:ToolbarButtonResetZoom; converter=Common.CommonConverters.ResourceConverter" data-binding="isEnabled:resetZoomEnabled"><\/div>            <div data-name="clearSelectionButton" data-control="Common.Controls.Button" data-control-templateid="Common.iconButton24x24" data-options="className:clearSelectionButton,                                tooltip:ToolbarButtonClearSelection; converter=Common.CommonConverters.ResourceConverter" data-binding="isEnabled:clearSelectionEnabled"><\/div>        <\/div>',n.filteringBarTemplate='<div class="filteringBar">            <div id="timelineSort" class="timelineSort">                <label class="timelineSortLabel" for="timelineSortSelector" data-options="textContent:TimelineSortLabel; converter=Common.CommonConverters.ResourceConverter"><\/label>                <div id="timelineSortSelector" data-control="Common.Controls.ComboBox" data-binding="items:sortOptions,                                    selectedValue:sort; mode=twoway; converter=Common.CommonConverters.IntToStringConverter" data-options="className:timelineSortSelector"><\/div>            <\/div>            <div data-name="frameGroupingButton" data-control="Common.Controls.ToggleButton" data-control-templateid="Common.iconButton24x24" data-binding="isChecked:displayFrames; mode=twoway" data-options="className:frameGroupingButton,                                tabIndex:0,                                tooltip:FrameGroupingTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="filteringMenuButton" data-control="Common.Controls.ToggleButton" data-control-templateid="Common.labeledIconButton" data-binding="isChecked:hasFilter" data-options="className:labeledIconButton33x24 filteringMenuButton,                                content:FilterEvents; converter=Common.CommonConverters.ResourceConverter,                                tabIndex:0,                                toggleIsCheckedOnClick:false; converter=Common.CommonConverters.StringToBooleanConverter,                                tooltip:FilteringMenuButtonTooltipText; converter=Common.CommonConverters.ResourceConverter"><\/div>        <\/div>',n.cpuUsageTemplate='<div class="cpu-usage-body">            <div class="cpu-usage-container">                <div class="cpu-usage-main" id="mainContainer">                    <div class="cpu-usage-toolbar" id="toolbarForm">                        <div class="create-report">                            <div class="create-report-button" id="buttonCreateDetailedReport"><\/div>                        <\/div>                        <div class="thread-filter" id="filterContainer"><\/div>                        <div class="search-container" id="search-container"><\/div>                    <\/div>                <\/div>                <div id="gridContainer" class="main-gridcontainer"><\/div>            <\/div>            <div class="cpu-usage-container-overlay">                <div id="progress-container" class="progress-container">                    <div id="progressMessage" class="progress progress-hidden"><\/div>                    <div>                        <progress id="progressBar" class="progress progress-hidden"><\/progress>                    <\/div>                <\/div>            <\/div>        <\/div>',n.filteringMenuDropDown='<ul>            <div data-name="eventNameFilter" data-control="Common.Controls.TextBoxMenuItem" data-binding="content:eventNameFilter; mode=twoway" data-options="className:eventNameFilter,                                placeholder:EventNameFilterPlaceholder; converter=Common.CommonConverters.ResourceConverter,                                tooltip:EventNameFilterTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <hr />            <div data-name="displayImageDecoding" data-control="Common.Controls.CheckBoxMenuItem" data-binding="isChecked:displayImageDecoding; mode=twoway" data-options="content:FilterImageDecoding; converter=Common.CommonConverters.ResourceConverter,                                tooltip:BackgroundActivityFilterTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="displayNetworkActivities" data-control="Common.Controls.CheckBoxMenuItem" data-binding="isChecked:displayNetworkActivities; mode=twoway" data-options="content:FilterNetworkActivities; converter=Common.CommonConverters.ResourceConverter,                                tooltip:NetworkTrafficFilterTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="displayUIActivities" data-control="Common.Controls.CheckBoxMenuItem" data-binding="isChecked:displayUIActivities; mode=twoway" data-options="content:FilterUIActivities; converter=Common.CommonConverters.ResourceConverter,                                tooltip:UIActivityFilterTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <div data-name="displayMeasures" data-control="Common.Controls.CheckBoxMenuItem" data-binding="isChecked:displayMeasures; mode=twoway" data-options="content:FilterMeasures; converter=Common.CommonConverters.ResourceConverter,                                tooltip:UserMeasuresFilterTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>            <hr />            <div data-name="durationFilter" data-control="Common.Controls.ComboBoxMenuItem" data-binding="items:durationFilterOptions,                                selectedValue:durationFilter; mode=twoway; converter=Common.CommonConverters.IntToStringConverter" data-options="tooltip:DurationFilterTooltip; converter=Common.CommonConverters.ResourceConverter"><\/div>        <\/ul>',n.asyncStackFrameItem='<div class="BPT-FileLink asyncFrameLink">            <a data-name="stackLink">                <span data-name="asyncFrameFunctionName" data-options="className:asyncFrameFunctionName" data-binding="innerText:name"><\/span>                (<span data-name="asyncFrameFileName" data-options="className:asyncFrameFileName" data-binding="innerText:source; converter=Common.CommonConverters.CreateShortenedUrlConverter"><\/span>:<span data-name="asyncFrameLineNumber" data-options="className:asyncFrameLineNumber" data-binding="innerText:line; converter=Common.CommonConverters.IntToStringConverter"><\/span>)            <\/a>            <br />        <\/div>',n.eventDataTemplate='<div class="eventDataTemplate">            <div data-name="eventDataTemplateNameCell" class="eventDataTemplateNameCell">                <div data-name="expander"><\/div>                <div data-name="eventName" class="eventDataTemplateName"><\/div>            <\/div>            <div data-name="eventData" class="eventDataTemplateDataCell">                <div data-name="bar" class="eventBar"><\/div>                <div data-name="durationText" class="durationText"><\/div>            <\/div>        <\/div>',n.eventDataTooltip='<div data-name="tooltip">            <div data-name="durationInc"><\/div>            <div data-name="durationExc"><\/div>            <div data-name="startTime"><\/div>        <\/div>',n}();n.VisualProfiler=t}(ControlTemplates||(ControlTemplates={}))
//# sourceMappingURL=VisualProfilerMerged.min.js.map
/* VS specific CSS */.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;
}.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;
    }
�PNG


IHDR�a	pHYs���+�IDATx�c`�&�����H�>'�9������;99�q~~��+W����O�H����%�����#�� q�<P].�lF��<��<�;�xr.����0H&��3���#""`�p���
��X��P,��t���x
�����k��NHD��{�@�e�y���
@7N�_�&��A�?��2�IEND�B`��PNG


IHDR��7�	pHYs���o�dgAMA���asRGB��, cHRMz&�����u0�`:�p��Q<	IDATx�u�1K�_+�4)0��)���Z��������Oh���]�ņ�ZJ.� ��ں�����}�$I�Y��e�d�)�����̀���2��h�Ά��q7���
9ɪx�EV&�@�p�I���lq��g9\�tp%����B��ڪ�ᔚD�Ϥ��;�
���<�t��@�>$נJ�.�(R版�n��ׄD��+iJ�ǒ�i�1�Ĵg8���t%$b��&!���4l�c[�~�V�iiIEND�B`��PNG


IHDR�a	pHYs���+�IDATx�c`�&�����H�>'�9������;99�q~~��+W����O�H����%�����#�� q�<P].�lF׌lH�\�9�f�C����a0��h8��Ć��QJ(`Q�y�f��`Mmmm`��5[J'$�
��=P �2��<�aHJJ
��
�ׯ_�l� �tїzPIEND�B`��PNG


IHDR��7�	pHYs���o�dgAMA���asRGB��, cHRMz&�����u0�`:�p��Q<IDATxu�1K��,�4i0���[
�r9sn�8����������846T�
F-%��-א����G�@ζm�l��/ʜ�ʄO�t��7*�qO�
6��d4C�sn)j�j��bVa¡�G[V��������%�SP�}ˑ���ŕ��NA1�`W	4�U�%��ZVS��q��j��G�
��)�*�Lx�.�SWi��ϊ�i�F]�)Z|1���<A�!#v4_��Mȍ�[��V�oB��(}oIEND�B`��PNG


IHDR�a�IDATx�c�o߾��(N����wn��p��e�2�7�Z�����{��_>�oo]�<��t�$�B5� ��S`/ΞҼ�f$羇7(v�|�e�H����`��4999�1�M�v���l�@^kjkk�m��ϟ�����3}M��8h�&�X�T�S��0/m�r���; �@��5�\5d=P������΄i�g&����6�gBr(@*��IF���IEND�B`��PNG


IHDR��7�	pHYs���o�dgAMA���asRGB��, cHRMz&�����u0�`:�p��Q<�IDATx�͏=Q���A(F��(�4� �Eh$:P��d��
��DE1���73�o���sw�R��}�()]�eesnt䭲��@�s�a�$J2�.OV�Tzi�3/�:��f��-�̎Y�.;�ɺ.?�#956�d���O�+,��c�%�4��.��=z��	<D�g�Y���U��)��r�IEND�B`��PNG


IHDR:���	pHYs����k�gAMA���aIDATx�c8��F3�!����w�߁�5�IEND�B`��PNG


IHDR6l��~	pHYs��]PLTEUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU������������������������������������"y�"y�"y�)�o�tRNS 02@P`���������Ͽ��`@202��� cHRMz%������u0�`:�o�_�F(IDATx����n�0ЛZ(N�m)����(V��͂��|ό�h��'gK�(֦U+�Eҵd8Y��F�N�B�U��+׹�����Z˻���za���}�}����6V�����e@�+�a�,��^�jj��?��ؐV���I7\��d�r;�
�V�N�\��̻{�;��}�w
[/��sbK�ϑEs}Y�^g��
=��+�I�[�TV ��yrvD�b}Z�;']F��U�iT�t*tZ�;�r��.���#�Z�I�/l�����}����NV}�3:���(��v�b��5�&+7q�L�E��IEND�B`��PNG


IHDR$l�%
�	pHYs���+PLTEUUU"y�����H2tRNS@��f cHRMz%������u0�`:�o�_�F�IDATx�͒�	�0D��+����֏�5U�J�}�����Z3���
!��S���4����QjmRl;C���r����P�t �wb'N-bD�p�6K��F��ɱ���~�Uy?
$C
�-��߉�8�HLM�!��,�^e�֦Ķ3�.0j/gE7~�QIT�[IEND�B`�/* F12 specific CSS */
body {
    background-color: #ffffff; /*[{plugin-background-color}]*/
}

.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 + 100px), 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 .detailedViewsContainer .timelineViewContainer .BPT-tabControl .tabHeader {
                    background-color: transparent;
                }

                    .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .BPT-tabControl .tabHeader .tabBarContainer ul.tabBar li {
                        padding-bottom: 4px;
                        padding-top: 2px;
                    }

                    .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .BPT-tabControl .tabHeader .BPT-SearchBox-Border {
                        margin-top: 0px;
                        margin-right: 0px;
                        padding-bottom: 0px;
                    }

                .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .timelineViewGroup {
                    -ms-grid-rows: auto 1fr;
                }

                    .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .timelineViewGroup .timelineLabel {
                        display: none;
                    }

                    .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .timelineViewGroup .timelineViewAndDetails {
                        -ms-grid-row: 2;
                        border-top: none;
                    }

                .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .cpu-usage-main .cpu-usage-toolbar {
                    display: none;
                }

                .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .grid {
                    border-top-width: 0px;
                }

                    .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .grid .grid-header .grid-header-canvas {
                        border-top-style: none;
                    }

                    .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .grid .grid-header-column:hover {
                        background-color: TRANSPARENT; /*[{plugin-perftools-grid-header-hover}]*/
                    }

        .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)}]*/
    color: TRANSPARENT; /*[{plugin-font-editor-color}]*/
}

.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 .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-label-mark-image {
    margin-left: 10px;
}

.ruler-legend-container {
    margin-right: 0px;
}

.ruler-legend-text-div {
    margin-right: 0px;
}

.ruler-legend-color-div {
    margin-left: 10px;
}

.swimlaneBase > .contentRegion {
    -ms-grid-columns: 34px 1fr 34px;
}

/* 
 * Overriden from the jstreegrid, to point to our tree-icons.png in common
 */
.icon-tree-collapse-all {
    background: url("../../Common/images/tree_icons.png") no-repeat -16px -16px !important; /*[ url({vs-image-tree-icons}) no-repeat -16px -16px !important]*/
}

.icon-tree-collapsed {
    background: url("../../Common/images/tree_icons.png") no-repeat -64px -16px !important; /*[ url({vs-image-tree-icons}) no-repeat -64px -16px !important]*/
}

.icon-tree-collapsed-2 {
    background: url("../../Common/images/tree_icons.png") no-repeat -108px -16px !important; /*[ url({vs-image-tree-icons}) no-repeat -108px -16px !important]*/
}

.icon-tree-empty {
    background: url("../../Common/images/tree_icons.png") no-repeat -156px -16px !important; /*[ url({vs-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({vs-image-tree-icons}) no-repeat -204px -16px !important]*/
}

.icon-tree-expanded {
    background: url("../../Common/images/tree_icons.png") no-repeat -252px -16px !important; /*[ url({vs-image-tree-icons}) no-repeat -252px -16px !important]*/
}

.icon-tree-expanded-2 {
    background: url("../../Common/images/tree_icons.png") no-repeat -296px -16px !important; /*[ url({vs-image-tree-icons}) no-repeat -296px -16px !important]*/
}
//! Copyright (C) Microsoft. All rights reserved.
var ClipboardHelper,__extends,VisualProfiler,Microsoft;(function(n){"use strict";var t=function(){function n(n){this._grid=n}return n.prototype.findNextMatch=function(n,t){return this._grid.search(n,!1,!1,t)},n.prototype.findAndHighlightMatches=function(){return null},n.prototype.getSearchTextFromSelection=function(){return null},n}();n.CpuUsageSearchProvider=t})(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
var CommonControls=Common.Controls,CommonKeyCodes=Common.KeyCodes,CommonData=Common.Data;
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r};ClipboardHelper=Common.ClipboardHelper,function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.Plugin,r=function(r){function u(n,t){r.call(this,n,t);this._columnHeaderText=null;this.initializeContextMenuCommands();this._hideTooltipHandler=this.hideTooltip.bind(this);ClipboardHelper.addCopyListener(this.rootElement,this.onCopy.bind(this))}return __extends(u,r),u.prototype._onDismissContextMenu=function(){this._contextMenuActive=!1;this._onBlur(null)},u.prototype._onContextMenu=function(n){var f=this,u,e,o,s,h,c,r,l;if(this.contextMenu){if(e=0,o=0,n.type==="contextmenu")u=this.getRowInfoFromEvent(n,".grid-row"),e=n.clientX,o=n.clientY;else if(n.type==="keydown"&&this.isActive()){if(s=this.getSelectedRowIndex(),h=this.getVisibleRowIndices(),s<h.first||s>h.last){this.getSelectedRowIntoView();return}if(c=this.getSelectedDataIndex(),u=this.getRowInfo(c),!u)return;e=u.row.clientLeft;o=this.getElement().offsetTop+this.getHeaderHeight()+this.getRowTop(u.rowIndex)-this.getCanvas().scrollTop+this.getMeasurements().rowHeight}u&&(this._cachedSourceFilename=null,r=this.getRowData(this.getSelectedDataIndex()),i.F12&&!r.aggType&&this.cacheF12SourceInfo(r),!i.F12&&this.getSelectionCount()===1&&r&&r.fileName?(l=new t.Controllers.SourceService,l.getAccessiblePathToFile(r.fileName).then(function(n){n&&(f._cachedSourceFilename=n,f._cachedSourceLineNumber=r.lineNumber);f.cacheSelectedRows()&&(f._contextMenuActive=!0,f.contextMenu.show(e,o))})):this.cacheSelectedRows()&&(this._contextMenuActive=!0,this.contextMenu.show(e,o)))}},u.prototype._onKeyDown=function(n){switch(n.keyCode){case 121:if(n.shiftKey)return this._onContextMenu(n),!1;break;case 93:return this._onContextMenu(n),!1;case 9:return n.shiftKey&&this.rootElement.focus(),!0;case 13:return this.onEnter(),!1;case 123:return!0}return r.prototype._onKeyDown.call(this,n)},u.prototype._onBlur=function(n){this._contextMenuActive||r.prototype._onBlur.call(this,n)},u.prototype.onEnter=function(){var r=this,n,u;if(this._cachedSourceFilename=null,n=this.getRowData(this.getSelectedDataIndex()),i.F12&&!n.aggType){this.cacheF12SourceInfo(n);this.showDocument();return}this.getSelectionCount()===1&&n&&n.fileName&&(u=new t.Controllers.SourceService,u.getAccessiblePathToFile(n.fileName).then(function(t){t&&(r._cachedSourceFilename=t,r._cachedSourceLineNumber=n.lineNumber)}).then(function(){r.navigateToCachedSource()}))},u.prototype.getClipboardFormattedRowString=function(n,t){var r="",e=this.getRowData(n),s,u,f,h,o,c;if(!e)return r;for(s=this.getColumns(),u=0;u<s.length;++u)f=s[u],u>0&&(r+="\t"),r+=f.format?e[f.index].toLocaleString(i.Culture.lang,f.format):e[f.index];for(h=this._getExpandState(n),r=h<0?" + "+r:h>0?" - "+r:"   "+r,o=e.parent,c=0;o;)c++>=t&&(r="  "+r),o=o.parent;return r},u.prototype.getShallowestDepthOfSelection=function(){var n=0,t=this.getSelectedRows(),i;if(t){n=Number.MAX_VALUE;for(i in t)if(t[i]!==null&&typeof t[i]!="undefined"){for(var f=this.getRowData(t[i]),u=f.parent,r=0;u;){if(r++,r>n)break;u=u.parent}r<n&&(n=r)}}return n},u.prototype.expandNodesWhile=function(n){var t=this.getSelectedDataIndex(),i;for(t===-1&&(t=0),i=this.getRowData(t);i&&!i.isPlaceholder&&this._getExpandState(t)!==0;){if(this.expandNode(t),!n(i))break;t++;i=this.getRowData(t)}},u.prototype.getColumnPixelIndent=function(n){return n*12},u.prototype._drawCell=function(n,t,i,r,u,f,e){var l=u.width||20,o=this.createElementWithClass("div",this.options().cellClass),s,h,p,v,w,c,y,a;if(o.style.width=isNaN(l)?String(l):l+"px",s=this.getColumnText(t,u,e),u.hasHTMLContent||CommonControls.Grid.GridControl._setTooltip(o,s,65),h=u,h.getDynamicTooltip?(p=h.getDynamicTooltip(this.getRowData(t)),o.addEventListener("mouseenter",this.showTooltip.bind(this,p)),o.addEventListener("mouseleave",this._hideTooltipHandler),this.populateCell(o,t,u,s)):e===f&&r>0?(v=this.getColumnPixelIndent(r),v<l?(this.populateCell(o,t,u,s),this.addTreeIconWithIndent(o,i,r,u),h.getDynamicSourceInfoTooltip&&(w=h.getDynamicSourceInfoTooltip(this.getRowData(t)),o.addEventListener("mouseenter",this.showSourceInfoTooltip.bind(this,w)),o.addEventListener("mouseleave",this._hideTooltipHandler))):(c=document.createElement("div"),c.innerHTML="[...]",c.style.left=l-18+"px",c.style.position="absolute",c.addEventListener("click",this.expandColumn.bind(this,c,u,v,s)),o.appendChild(c),o.addEventListener("mouseenter",this.showTooltip.bind(this,s)),o.addEventListener("mouseleave",this._hideTooltipHandler))):this.populateCell(o,t,u,s),h.cssClass)for(y=h.cssClass.trim().split(" "),a=0;a<y.length;a++)o.classList.add(y[a]);return u.rowCss&&o.classList.add(u.rowCss),o},u.prototype.onCopy=function(){var n=undefined;return(this._dataForClipboard||this.cacheSelectedRows())&&(n=this._dataForClipboard,this._dataForClipboard=null),n},u.prototype.expandColumn=function(n,t,i,r){var u=document.createElement("div"),f;u.innerHTML=r;u.style.position="absolute";u.style.left="10000px";n.appendChild(u);f=i+u.scrollWidth;n.removeChild(u);t.width=f+10;this._applyColumnSizing(0,-1,!0)},u.prototype.showTooltip=function(n){i.Tooltip.show({content:n,delay:0})},u.prototype.showSourceInfoTooltip=function(n){var t=new CommonControls.Legacy.SourceInfoTooltip(n),r={content:t.html,contentContainsHTML:!0};i.Tooltip.show(r)},u.prototype.hideTooltip=function(){i.Tooltip.dismiss()},u.prototype.populateCell=function(n,t,i,r){var f,u;typeof i.hrefIndex!="undefined"&&(f=this.getColumnValue(t,i.hrefIndex,-1));f?(u=document.createElement("a"),u.setAttribute("href",f),u.innerText=r,n.appendChild(u)):r?i.hasHTMLContent?n.innerHTML=r:n.innerText=r:n.innerHTML="&nbsp;"},u.prototype.initializeContextMenuCommands=function(){var n=this,t=[];t[0]={id:"copy",callback:function(){return ClipboardHelper.fireCopyEvent(n.rootElement)},label:i.Resources.getString("CpuUsageTreeGrid_ContextMenu_Copy"),type:1,iconEnabled:null,iconDisabled:null,accessKey:"Ctrl+C",hidden:function(){return!1},disabled:function(){return!1},checked:function(){return!1},cssClass:null,submenu:null};t[1]={id:"gotosource",callback:function(){i.F12?n.showDocument():n.navigateToCachedSource()},label:i.Resources.getString("CpuUsageTreeGrid_ContextMenu_ViewSource"),type:1,iconEnabled:null,iconDisabled:null,accessKey:"Enter",hidden:function(){return n.getSelectionCount()!==1},disabled:function(){return!n._cachedSourceFilename},checked:function(){return!1},cssClass:null,submenu:null};this._contextMenuCommands=t;this._contextMenuCommands.forEach(function(t){if(t.callback){var i=t.callback;t.callback=function(t,r){i(t,r);n.focus(10)}}});this.contextMenu=i.ContextMenu.create(this._contextMenuCommands,null,null,null,function(){});this._contextMenuActive=!1;this._onDismissContextMenu=this._onDismissContextMenu.bind(this);this.addEventListenerToCanvas("contextmenu",this,this._onContextMenu);this.contextMenu.addEventListener("dismiss",this._onDismissContextMenu)},u.prototype.getColumnHeaderText=function(){var t,n,i;if(!this._columnHeaderText)for(this._columnHeaderText="",t=this.getColumns(),n=0;n<t.length;n++)n>0&&(this._columnHeaderText+="\t"),i=t[n],this._columnHeaderText+=i.text;return this._columnHeaderText},u.prototype.navigateToCachedSource=function(){if(this._cachedSourceFilename){var n=new t.Controllers.SourceService;n.showDocument(this._cachedSourceFilename,this._cachedSourceLineNumber)}},u.prototype.showDocument=function(){i.Host.showDocument(this._cachedSourceFilename,this._cachedSourceLineNumber,this._cachedSourceColumnNumber).done(function(){},function(){VisualProfiler.Program.hostShell.setStatusBarText(n.Plugin.Resources.getString("UnableToNavigateToSource"),!0)})},u.prototype.cacheF12SourceInfo=function(n){n.sourceInfo&&(this._cachedSourceFilename=n.sourceInfo.source,this._cachedSourceLineNumber=n.sourceInfo.line,this._cachedSourceColumnNumber=n.sourceInfo.column,this._cachedSourceLineNumber===0&&this._cachedSourceColumnNumber===0&&this.cacheF12SourceInfo(n.parent))},u.prototype.cacheSelectedRows=function(){var n,t,f,i;if(this._dataForClipboard=null,n=this.getSelectedRows(),n===null)return!1;var e=this.getShallowestDepthOfSelection(),r=this.getColumnHeaderText(),u=-1;for(t in n)f=parseInt(t.toString()),n[t]!==null&&typeof n[t]!="undefined"&&(i=this.getClipboardFormattedRowString(n[t],e),u!==-1&&u!==f-1&&(i="[...]\r\n"+i),r=r+"\r\n"+i),u=f;return this._dataForClipboard=r,!0},u}(CommonControls.Grid.GridControl);t.CpuUsageGridControl=r})(i=t.DiagnosticsHub||(t.DiagnosticsHub={}))})(t=n.VisualStudio||(n.VisualStudio={}))}(Microsoft||(Microsoft={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(t){var i;(function(t){"use strict";var f=n.Plugin,h=!1,c,e,l,a,v,y,u,w,s;(function(n){n[n.SystemCode=1]="SystemCode";n[n.JmcRejected=2]="JmcRejected"})(t.AggregateType||(t.AggregateType={}));c=t.AggregateType,function(n){n[n.perfDiagnosticsHub_CpuToolJmcChangedBegin=25243]="perfDiagnosticsHub_CpuToolJmcChangedBegin";n[n.perfDiagnosticsHub_CpuToolJmcChangedEnd=25244]="perfDiagnosticsHub_CpuToolJmcChangedEnd";n[n.perfDiagnosticsHub_CpuToolSelectionChangedBegin=25245]="perfDiagnosticsHub_CpuToolSelectionChangedBegin";n[n.perfDiagnosticsHub_CpuToolSelectionChangedEnd=25246]="perfDiagnosticsHub_CpuToolSelectionChangedEnd";n[n.perfDiagnosticsHub_CpuToolThreadChangedBegin=25247]="perfDiagnosticsHub_CpuToolThreadChangedBegin";n[n.perfDiagnosticsHub_CpuToolThreadChangedEnd=25248]="perfDiagnosticsHub_CpuToolThreadChangedEnd"}(e||(e={})),function(n){n[n.None=0]="None";n[n.Collection=1]="Collection";n[n.Analysis=2]="Analysis";n[n.PerformanceDebugging=4]="PerformanceDebugging"}(t.ViewDestination||(t.ViewDestination={}));l=t.ViewDestination,function(n){n[n.Id=1]="Id";n[n.FunctionName=2]="FunctionName";n[n.InclusiveSamples=3]="InclusiveSamples";n[n.ExclusiveSamples=4]="ExclusiveSamples";n[n.InclusivePercent=5]="InclusivePercent";n[n.ExclusivePercent=6]="ExclusivePercent";n[n.Module=7]="Module"}(t.SortColumn||(t.SortColumn={}));a=t.SortColumn,function(n){n[n.Asc=1]="Asc";n[n.Desc=2]="Desc"}(t.SortDirection||(t.SortDirection={}));v=t.SortDirection,function(n){n[n.Expand=1]="Expand";n[n.Search=2]="Search"}(t.ResultTaskType||(t.ResultTaskType={}));y=t.ResultTaskType,function(n){n[n.Unknown=0]="Unknown";n[n.UIThread=1]="UIThread";n[n.GCThread=256]="GCThread"}(t.ThreadRoles||(t.ThreadRoles={}));var b=t.ThreadRoles,o=function(n){for(var i=[],t=n;t&&t.id!==null&&typeof t.id!="undefined";)i.push(t.id),t=t.parent;return i},r=function(t,i){i===void 0&&(i=null);i||(i=t.sortOrder.order==="desc"?2:1);var r=null;switch(t.column.index){case"name":r=2;break;case"iSamples":r=3;break;case"eSamples":r=4;break;case"iPercent":r=5;break;case"ePercent":r=6;break;case"module":r=7;break;case"id":r=1;break;default:throw new Error(n.Plugin.Resources.getErrorString("JSCpuUsage.1001"))}return{column:r,direction:i}},p=function(n,t,i,r){var e=0,u=i[n.index],f=r[n.index];return typeof u=="undefined"||u===null?typeof f=="undefined"||f===null?0:-1:(n.index==="name"?(u=u.toUpperCase(),f=f.toUpperCase(),e=u===f?0:u>f?1:-1):e=u-f,e===0&&(e=i.id-r.id),e)},i=function(t){function i(i,r,u,f,e,o,s,h,c,l,a,v){t.call(this,i,n.Plugin.Resources.getString(r),n.Plugin.Resources.getString(u),f,o);this.defaultSortOrder=s?"asc":"desc";this.indent=e;this.comparer=p;this.format=h;this.cssClass=c;this.getDynamicTooltip=a;this.getDynamicSourceInfoTooltip=v;l&&(this.getHeaderCellContents=l)}return __extends(i,t),i}(CommonControls.Grid.ColumnInfo);t.CpuTreeGridColumnInfo=i;u=function(){function n(){this._dictionary={}}return n.prototype.setThreadChecked=function(n,t){this._dictionary[n]=t},n.prototype.isThreadChecked=function(n){var t=this._dictionary[n];return typeof t=="undefined"?!0:t},n.prototype.getThreadIds=function(){var n=[];for(var t in this._dictionary)this._dictionary.hasOwnProperty(t)&&n.push(parseInt(t,10));return n},n}();t.ThreadCheckedDictionary=u,function(n){n[n.CallTree=1]="CallTree";n[n.Filter=2]="Filter";n[n.All=3]="All"}(t.LoadDataFor||(t.LoadDataFor={}));w=t.LoadDataFor;s=function(){function e(i){if(this._analyzerId="DCA8B3EF-28C5-4B08-BAFC-B072F8AA9277",this._detailViewId="DCA8B3EF-17B4-4B08-BAFC-B072F8AA9277",this._buttonAnalyzeNowId="buttonAnalyzeNow",this._buttonCreateDetailedReportId="buttonCreateDetailedReport",this._logger=n.VisualStudio.DiagnosticsHub.getLogger(),this._currentContextData={customDomain:{}},this._callTreeResult=null,this._grid=null,this._config=null,this._dataWarehouse=null,this._columns=null,this._progressBar=null,this._progressMessage=null,this._disableTreeGrid=null,this._lastSearchPromise=null,this._buttonCreateDetailedReport=null,this._buttons={},this._timeRangeChanged=!1,this._inputIsFocused=!1,this._isReportButtonFocused=!1,this._jmcOn=!0,this._isSearching=!1,this._cachedJmcOn=!0,this._isVisible=!1,this._threadDropDownDefaultState=!0,i&&i.containerId)this._config=i;else throw new Error(n.Plugin.Resources.getErrorString("JSCpuUsage.1000"));for(this._threadSelectionChangedHandler=this.threadSelectionChanged.bind(this),this._timeRangeChangedHandler=this.timeRangeChanged.bind(this),this._cacheTimeRangeChangedHandler=this.timeRangeChanged.bind(this),this._jmcEnabledStateChangedHandler=this.jmcEnabledStateChangedHandler.bind(this),this._cacheJmcEnabledStateChangedHandler=this.cacheJmcEnabledStateChangedHandler.bind(this),this._viewEventManager=t.getViewEventManager(),this.addExternalEvents(this._cacheTimeRangeChangedHandler,this._cacheJmcEnabledStateChangedHandler),this._container=document.getElementById(this._config.containerId),this._reportButtonFocusHandler=this.onReportButtonFocus.bind(this),this._reportButtonBlurHandler=this.onReportButtonBlur.bind(this),this._reportButtonKeyPressHandler=this.onReportButtonKeyPress.bind(this),this._reportButtonClickHandler=this.onReportButtonClick.bind(this),this._automation=t.getAutomationManager(this._logger);this._container.firstChild;)this._container.removeChild(this._container.firstChild);this._viewEventManager.detailsViewSelectionChanged.addEventListener(this.detailsViewChanged.bind(this));this._viewEventManager.detailsViewReady.raiseEvent({Id:this._detailViewId});this._sqmCpuUsage=new t.Telemetry.CpuUsage}return e.prototype.render=function(){var t=this;this._disableTreeGrid=document.getElementsByClassName("cpu-usage-container-overlay")[0];this.createToolbar();this._progressBar=document.getElementById("progressBar");this._progressMessage=document.getElementById("progressMessage");this._initialLoad=n.VisualStudio.DiagnosticsHub.DataWarehouse.loadDataWarehouse().then(function(n){return t._dataWarehouse=n,t._dataWarehouse.getContextService().getGlobalContext()}).then(function(n){return n.getTimeDomain()}).then(function(n){t._currentContextData.timeDomain=n}).then(function(){return t._dataWarehouse.getJmcService().setJmcEnabledState(!0)}).then(function(){return t._dataWarehouse.getPrivateData(1)}).then(function(n){var r={},i;for(r["*.html"]=0,i=0;i<n.length;i++)n[i].substring(0,6)!=="dsh://"&&(r[n[i]]=0);return t._dataWarehouse.setPrivateData(1,r)}).then(this.loadData.bind(this,3))},e.prototype.drawHeaderCellValue=function(n,t,i){var r=document.createElement("div");return r.classList.add("title"),n.hasHTMLContent?r.innerHTML=n.text||"&nbsp;":r.innerText=n.text||"",i&&r.classList.add(i),r},e.prototype.search=function(t,i,u,f){if(f===void 0&&(f=!0),this._lastSearchPromise&&this._lastSearchPromise.cancel(),this._searchString=t,t.length>0){this.setProgressMessage(n.Plugin.Resources.getString("SearchProgressMessage"));this.enableInProgressState();var e=this._grid.getRowData(this._grid.getSelectedDataIndex());this._request={type:2,selectedPath:o(e),sort:r(this.getCurrentSortInfo()),str:t,caseSensitive:i,isRegex:u,forward:f};this._isSearching=!0;this._lastSearchPromise=this._callTreeResult.getResult(this._request).then(this.searchChildNode.bind(this),this.errorHandler.bind(this))}return this._lastSearchPromise},e.prototype.getCurrentThreadFilterConfig=function(){var n=new u,t,i,r;return this._threadDropDown?(t=this._threadDropDown.getConfiguration(),!t)?(this._logger.debug("Drop down exists but does not have configuration"),n):t.body.items.length!==2?(this._logger.debug("Current body configuration count should be '2'"),n):(i=t.body.items[1],r=i.checkboxItems,r.forEach(function(t){n.setThreadChecked(t.data.tid,t.checked)}),n):n},e.prototype.setCurrentThreadFilterConfig=function(t){var i,r,u;if(!t)throw new Error(n.Plugin.Resources.getErrorString("JSProfiler.1000"));return(i=this._threadDropDown.getConfiguration(),!i)?(this._logger.debug("Drop down exists but does not have configuration"),!1):i.body.items.length!==2?(this._logger.debug("Current body configuration count should be '2'"),!1):(r=i.body.items[1],u=r.checkboxItems,u.forEach(function(n){var i=document.getElementById(n.id);i&&(i.checked=t.isThreadChecked(n.data.tid))}),this._threadDropDown.triggerApplyChanges(),!0)},e.prototype.getGridControl=function(){return this._grid},e.prototype.setLoadDataCompleteCallback=function(n){n?this._logger.debug("Setting additional callback for load data complete"):this._logger.debug("Clearing additional callback for load data complete");this._loadDataCompleteCallback=n},e.prototype.detailsViewChanged=function(n){var t=this;if(!n){this._logger.debug("detailsViewChanged - args is null or undefined.");return}this._cachedDetailsViewSelectionChangedEventArgs=n;this._initialLoad?(this._initialLoad.then(function(){t.switchDetailsView(t._cachedDetailsViewSelectionChangedEventArgs)}),this._initialLoad=null):this.switchDetailsView(n)},e.prototype.switchDetailsView=function(n){n.Id.toLowerCase()!==this._detailViewId.toLowerCase()||this._isVisible?n.Id.toLowerCase()!==this._detailViewId.toLowerCase()&&this._isVisible&&(this._isVisible=!1,this._cachedJmcOn=this._jmcOn,this._inactiveTimeRange=this._currentContextData.timeDomain,this.removeExternalEvents(this._timeRangeChangedHandler,this._jmcEnabledStateChangedHandler),this.addExternalEvents(this._cacheTimeRangeChangedHandler,this._cacheJmcEnabledStateChangedHandler)):(this._isVisible=!0,this.addExternalEvents(this._timeRangeChangedHandler,this._jmcEnabledStateChangedHandler),this.removeExternalEvents(this._cacheTimeRangeChangedHandler,this._cacheJmcEnabledStateChangedHandler),this.timeRangeChanged({isIntermittent:!1,position:this._inactiveTimeRange}),this.jmcEnabledStateChangedHandler({currEnabledState:this._cachedJmcOn,prevEnabledState:this._jmcOn}))},e.prototype.cacheTimeRangeChanged=function(n){if(this._inactiveTimeRange=n.position,!n.isIntermittent){var t=n.position;t&&(this._inactiveTimeRange=t,this.render())}},e.prototype.cacheJmcEnabledStateChangedHandler=function(n){n.currEnabledState!==n.prevEnabledState&&(this._cachedJmcOn=n.currEnabledState)},e.prototype.addExternalEvents=function(n,t){this._viewEventManager&&(this._viewEventManager.selectionChanged.addEventListener(n),this._viewEventManager.jmcEnabledStateChanged.addEventListener(t))},e.prototype.removeExternalEvents=function(n,t){this._viewEventManager&&(this._viewEventManager.selectionChanged.removeEventListener(n),this._viewEventManager.jmcEnabledStateChanged.removeEventListener(t))},e.prototype.enableInProgressState=function(){this._disableTreeGrid.classList.add("cpu-usage-container-disable");this._progressBar.classList.remove("progress-hidden");this._progressMessage.classList.remove("progress-hidden")},e.prototype.disableInProgressState=function(){this._progressBar.classList.add("progress-hidden");this._progressMessage.classList.add("progress-hidden");this._disableTreeGrid.classList.remove("cpu-usage-container-disable")},e.prototype.setProgressMessage=function(n){this._progressMessage.innerText=n},e.prototype.createToolbar=function(){var r=0,i;this._config.viewDestination===2&&(this._buttonCreateDetailedReport=document.getElementById("buttonCreateDetailedReport"),this._buttonCreateDetailedReport.innerHTML=n.Plugin.Resources.getString("Button_CreateDetailedReport"),this._buttonCreateDetailedReport.setAttribute("role","button"),this._buttonCreateDetailedReport.setAttribute("aria-label",n.Plugin.Resources.getString("Button_CreateDetailedReport")),this.enableReportButton(),r++);this._config.viewDestination===4&&(i=new t.DefaultButton(this._buttonAnalyzeNowId,"Button_AnalyzeNow","","Button_AnalyzeNow",r),i.enable(),i.addButtonClickedListener(this.onButtonClicked.bind(this)),this._buttons[this._buttonAnalyzeNowId]=i,r++)},e.prototype.enableReportButton=function(){this._buttonCreateDetailedReport.addEventListener("click",this._reportButtonClickHandler);this._buttonCreateDetailedReport.addEventListener("focus",this._reportButtonFocusHandler);this._buttonCreateDetailedReport.addEventListener("blur",this._reportButtonBlurHandler);this._buttonCreateDetailedReport.addEventListener("keypress",this._reportButtonKeyPressHandler);this._buttonCreateDetailedReport.classList.add("create-report-button-enabled");this._buttonCreateDetailedReport.classList.remove("create-report-button-disabled");this._buttonCreateDetailedReport.tabIndex=0},e.prototype.disableReportButton=function(){this._buttonCreateDetailedReport.removeEventListener("click",this._reportButtonClickHandler);this._buttonCreateDetailedReport.removeEventListener("focus",this._reportButtonFocusHandler);this._buttonCreateDetailedReport.removeEventListener("blur",this._reportButtonBlurHandler);this._buttonCreateDetailedReport.removeEventListener("keypress",this._reportButtonKeyPressHandler);this._buttonCreateDetailedReport.classList.remove("create-report-button-enabled");this._buttonCreateDetailedReport.classList.add("create-report-button-disabled");this._buttonCreateDetailedReport.tabIndex=-1},e.prototype.onReportButtonClick=function(){this.createDetailedReport()},e.prototype.onReportButtonFocus=function(){this._isReportButtonFocused=!0},e.prototype.onReportButtonBlur=function(){this._isReportButtonFocused=!1},e.prototype.onReportButtonKeyPress=function(n){this._isReportButtonFocused&&13===n.keyCode&&this.createDetailedReport()},e.prototype.createDetailedReport=function(){var n=this;this.disableReportButton();t.getCurrentDocument().openInAlternateFormat(1).then(function(){n.enableReportButton()},function(t){n._logger.debug("Create detailed report failure: "+JSON.stringify(t));n.enableReportButton()})},e.prototype.onButtonClicked=function(n){if(!this._buttons[n]){this._logger.error("Button ID '"+n+"' is unknown.");return}this._buttons[n].disable();try{n===this._buttonAnalyzeNowId?this.render():n===this._buttonCreateDetailedReportId&&this.createDetailedReport()}catch(t){this._logger.error(t.Message)}this._buttons[n].enable()},e.prototype.getThreadInfo=function(n){var t={customDomain:{task:"get-threads"}};return this._currentContextData.timeDomain&&(t.timeDomain=this._currentContextData.timeDomain),n&&(t.customDomain.control=n),this.queryDataWarehouse(t,this._analyzerId)},e.prototype.onShowExternalCodeChangedHandler=function(n){n&&n.hasChanged&&(this._jmcOn=!n.checked,this.threadDropDownStateChange(),this._sqmCpuUsage.jmcToggle(this._jmcOn),this._dataWarehouse&&this._dataWarehouse.getJmcService().setJmcEnabledState(!1))},e.prototype.populateThreadFilter=function(i){var g=this,e,y,o,s,l,a,w;if(f.F12){this._currentContextData.threadDomain=[];i.forEach(function(n){n.roles===1&&g._currentContextData.threadDomain.push(n.tid)});return}for(e=[],i.sort(function(n,t){return n.roles===0&&t.roles!==0?1:n.roles!==0&&t.roles===0?-1:t.sampleCount-n.sampleCount}),y=this.getCurrentThreadFilterConfig(),o=[],s=0;s<i.length;s++){var r=i[s],u=n.Plugin.Resources.getString("ThreadsSelection_Thread")+r.tid,h=[u],nt=r.roles,p=.001,c;c=r.sampleCount===0?r.sampleFractionOfProcess.toLocaleString(n.Plugin.Culture.lang,{style:"percent",maximumFractionDigits:0}):r.sampleFractionOfProcess<p?"< "+p.toLocaleString(n.Plugin.Culture.lang,{style:"percent",maximumFractionDigits:1}):r.sampleFractionOfProcess.toLocaleString(n.Plugin.Culture.lang,{style:"percent",maximumFractionDigits:1});u+=" : "+c;(nt&1)!=0&&(l=n.Plugin.Resources.getString("ThreadsSelection_UIThread"),u+=" ("+l+")",h.push(n.Plugin.Resources.getString("ThreadRoleLabel")+l));h.push(n.Plugin.Resources.getString("SamplePercentOfProcessLabel")+c);h.push(n.Plugin.Resources.getString("SampleCountLabel")+r.sampleCount);a=y.isThreadChecked(r.tid);w={ariaText:u,data:r,label:u,tooltip:h.join("\r\n"),checked:a,type:t.DropDownLegacyItemType.checkbox};a&&o.push(r.tid);e.push(w)}var v=n.Plugin.Resources.getString("CPUViewShowExternalCodeLabel"),tt={ariaText:v,checked:!this._jmcOn,data:null,label:v,onChangeHandler:this.onShowExternalCodeChangedHandler.bind(this),iconToken:"diagnosticsHub-justmycode",tooltip:v,type:t.DropDownLegacyItemType.checkbox},it=n.Plugin.Resources.getString("CPUViewThreadListboxLabel"),rt={areAllSelected:e.length===o.length,checkboxItems:e,ariaText:n.Plugin.Resources.getString("CPUViewThreadListboxTooltip"),data:i,label:it,onChangeHandler:this._threadSelectionChangedHandler.bind(this),tooltip:n.Plugin.Resources.getString("CPUViewThreadListboxTooltip"),type:t.DropDownLegacyItemType.listbox},b=n.Plugin.Resources.getString("CPUViewFilterView"),k=n.Plugin.Resources.getString("Button_CPUViewApply"),d=n.Plugin.Resources.getString("Button_CPUViewCancel"),ut={container:null,containerId:"filterContainer",header:{text:b,ariaText:b,iconToken:"diagnosticsHub-filter"},body:{items:[tt,rt],applyFilterImmediately:!1},footer:{applyButton:{text:k,ariaText:k},cancelButton:{text:d,ariaText:d}}};this._currentContextData.threadDomain=o;this._threadDropDown&&(this._threadDropDown.unload(),this._threadDropDown=null);this._threadDropDown=new n.VisualStudio.DiagnosticsHub.DropDownOptionsLegacy(ut);this.threadDropDownStateChange()},e.prototype.threadDropDownStateChange=function(){this._threadDropDown&&this._threadDropDown.setHighlight(!this._threadDropDownDefaultState||!this._jmcOn)},e.prototype.threadSelectionChanged=function(t){var i=[],r,u,f;if(t&&t.itemsData){for(r=0;r<t.itemsData.length;r++)u=t.itemsData[r],u.checked&&(f=u.data,f&&i.push(f.tid));this._threadDropDownDefaultState=t.itemsData.length===i.length}this.threadDropDownStateChange();i.length===0&&i.push(-1);this._currentContextData.threadDomain=i;this._loadDataPromise&&this._loadDataPromise.cancel();n.Plugin.VS.Internal.CodeMarkers.fire(25247);this._loadDataPromise=this.loadData(1).then(function(){return n.Plugin.VS.Internal.CodeMarkers.fire(25248)})},e.prototype.timeRangeChanged=function(t){if(!t.isIntermittent){var i=t.position;i&&(this._currentContextData.timeDomain&&this._currentContextData.timeDomain.equals(i)||(this._currentContextData.timeDomain=i,this._timeRangeChanged=!0,this._currentContextData.threadDomain&&this._currentContextData.threadDomain.length>0&&(this._loadDataPromise&&this._loadDataPromise.cancel(),n.Plugin.VS.Internal.CodeMarkers.fire(25245),this._loadDataPromise=this.loadData().then(function(){return n.Plugin.VS.Internal.CodeMarkers.fire(25246)}))))}},e.prototype.loadData=function(t){t===void 0&&(t=3);this.setProgressMessage(n.Plugin.Resources.getString("LoadDataProgressMessage"));this.enableInProgressState();switch(t){case 1:return this.loadCallTree().then(this.getShowExternalCodeState.bind(this)).then(this.populateShowExternalCodeState.bind(this)).then(this.loadDataComplete.bind(this),this.errorHandler.bind(this));case 2:return this.getShowExternalCodeState().then(this.populateShowExternalCodeState.bind(this)).then(this.getThreadInfo.bind(this,"filter")).then(this.populateThreadFilter.bind(this)).then(this.loadDataComplete.bind(this),this.errorHandler.bind(this));case 3:default:return this.getThreadInfo("filter").then(this.populateThreadFilter.bind(this)).then(this.loadCallTree.bind(this)).then(this.getShowExternalCodeState.bind(this)).then(this.populateShowExternalCodeState.bind(this)).then(this.loadDataComplete.bind(this),this.errorHandler.bind(this))}},e.prototype.getShowExternalCodeState=function(){if(this._dataWarehouse)return this._dataWarehouse.getJmcService().getJmcEnabledState()},e.prototype.populateShowExternalCodeState=function(n){typeof n=="boolean"&&(this._jmcOn=n)},e.prototype.jmcEnabledStateChangedHandler=function(t){t.currEnabledState!==t.prevEnabledState&&(this._jmcOn=t.currEnabledState,this._loadDataPromise&&this._loadDataPromise.cancel(),n.Plugin.VS.Internal.CodeMarkers.fire(25243),this._loadDataPromise=this.loadData().then(function(){return n.Plugin.VS.Internal.CodeMarkers.fire(25244)}))},e.prototype.loadDataComplete=function(){this._initialLoad=null;this._timeRangeChanged=!1;this.disableInProgressState();this._loadDataCompleteCallback&&this._loadDataCompleteCallback()},e.prototype.loadCallTree=function(){var t,i;return this._lastSearchPromise&&(this._lastSearchPromise.cancel(),this._lastSearchPromise=null),this._callTreeResult&&(i=this._callTreeResult,this._callTreeResult=null,i.dispose()),t=n.Plugin.Promise.wrap(null),this._currentContextData.customDomain.task="get-call-tree-view",t.then(this.queryDataWarehouse.bind(this,this._currentContextData,this._analyzerId)).then(this.getResultData.bind(this)).then(this.setCreateDetailedReportButtonState.bind(this)).then(this.populateTreeGrid.bind(this),this.errorHandler.bind(this))},e.prototype.queryDataWarehouse=function(n,t){return this._dataWarehouse.getFilteredData(n,t)},e.prototype.getResultData=function(n){this._callTreeResult=n;var t={type:1,sort:r(this.getCurrentSortInfo(),1),path:[]};return this._callTreeResult.getResult(t)},e.prototype.setCreateDetailedReportButtonState=function(n){var t=n.enableIceCap;return t&&this._config.viewDestination===2&&(this._buttonCreateDetailedReport.style.display="block"),n.callTreeData},e.prototype.populateTreeGrid=function(n){var u=this,i,r;return this._grid||(i=new CommonControls.Grid.GridOptions(this.getChildrenDataCallback.bind(this),this.getColumns(),[this.getDefaultSortInfo()],null),i.asyncInit=!1,i.allowMultiSelect=!0,this._grid=new t.CpuUsageGridControl(this._container,i)),r=this.constructRows(null,n),this._grid.setSelectedRowIndex(-1),this._timeRangeChanged=!1,this._grid.setDataSource(r.itemsWithPlaceholders,r.expandStates,this.getColumns(),[this.getDefaultSortInfo()]).then(function(){u._grid.getCanvas().scrollTop=0;u.autoExpand()})},e.prototype.errorHandler=function(n){this._loadDataPromise&&this._loadDataPromise.cancel();this._isSearching=!1;this.disableInProgressState();this._logger.error(JSON.stringify(n))},e.prototype.getChildrenDataCallback=function(n,t){var i=n,u;this._timeRangeChanged||(this._loadDataPromise=this._callTreeResult.getResult({type:1,sort:r(this.getCurrentSortInfo(),1),path:o(i)}),u=this._loadDataPromise.then(this.updateGridWithResult.bind(this,i,t)),this._isSearching||u.done(this.autoExpand.bind(this),this.errorHandler.bind(this)))},e.prototype.updateGridWithResult=function(t,i,r){return i(this.constructRows(t,r.callTreeData)),this._result&&this._result.length>0&&this.searchChildNode(this._result),n.Plugin.Promise.wrap(null)},e.prototype.autoExpand=function(){this._grid&&this._grid.expandNodesWhile(function(n){return!n||this._timeRangeChanged?!1:n.childCount===1}.bind(this))},e.prototype.constructRows=function(t,i){var e=[],u=[],r;if(i)while(i.length>0){if(r=i.pop(),r.aggType)switch(r.aggType){case 1:r.name=n.Plugin.Resources.getString("SystemCodeLabel");break;case 2:r.name="[External code]"}switch(r.moduleCount){case 0:r.module="";break;case 1:break;default:r.module=n.Plugin.Resources.getString("MultipleModuleLabel",r.moduleCount)}if(!r.aggType){var f=r.name.split(/-|:/),o=0,s=0;f.length>2&&(o=parseInt(f.pop()),s=parseInt(f.pop()),r.name=f.toString());r.sourceInfo={source:r.module,column:o,line:s}}r.name==="Global code"&&(r.name="(Global code)");this._logger.debug(JSON.stringify(r));r.parent=t;e.push(r);r.childCount>0?(u.push(-1),e.push({isPlaceholder:!0,name:"",iSamples:0,eSamples:0,iPercent:0,ePercent:0,childCount:0,lineNumber:0,id:0,module:"",moduleCount:0,parent:null,fileName:""}),u.push(0)):u.push(0)}return{itemsWithPlaceholders:e,expandStates:u}},e.prototype.getColumns=function(){var t=this,u,r;return this._columns===null&&(u={style:"percent",maximumFractionDigits:2,minimumFractionDigits:2},r=125,this._columns=[new i("name","CpuUsageTreeGrid_FunctionNameHeader","CpuUsageTreeGrid_FunctionNameTooltip",300,!0,!0,!0,null,null,null,null,function(n){return n.sourceInfo}),new i("iPercent","CpuUsageTreeGrid_TotalSamplesPercentHeader","CpuUsageTreeGrid_TotalSamplesPercentHeaderTooltip",r,!1,!0,!1,u,"grid-cell-numeric",function(n,i){return t.drawHeaderCellValue(n,i,"grid-header-cell-numeric")},function(i){return i.isPlaceholder?"":n.Plugin.Resources.getString("CpuUsageTreeGrid_PercentageTooltip",i.iPercent.toLocaleString(n.Plugin.Culture.lang,u),i.iSamples,t._grid.getRowData(0).iSamples)}),new i("ePercent","CpuUsageTreeGrid_SelfSamplesPercentHeader","CpuUsageTreeGrid_SelfSamplesPercentHeaderTooltip",r,!1,!0,!1,u,"grid-cell-numeric",function(n,i){return t.drawHeaderCellValue(n,i,"grid-header-cell-numeric")},function(i){return i.isPlaceholder?"":n.Plugin.Resources.getString("CpuUsageTreeGrid_PercentageTooltip",i.ePercent.toLocaleString(n.Plugin.Culture.lang,u),i.eSamples,t._grid.getRowData(0).iSamples)}),new i("iSamples","CpuUsageTreeGrid_TotalSamplesHeader","CpuUsageTreeGrid_TotalSamplesHeaderTooltip",r,!1,!0,!1,null,"grid-cell-numeric",function(n,i){return t.drawHeaderCellValue(n,i,"grid-header-cell-numeric")},function(t){return t.isPlaceholder?"":n.Plugin.Resources.getString("CpuUsageTreeGrid_SamplesTooltip",t.iSamples,t.iSamples)}),new i("eSamples","CpuUsageTreeGrid_SelfSamplesHeader","CpuUsageTreeGrid_SelfSamplesHeaderTooltip",r,!1,!0,!1,null,"grid-cell-numeric",function(n,i){return t.drawHeaderCellValue(n,i,"grid-header-cell-numeric")},function(t){return t.isPlaceholder?"":n.Plugin.Resources.getString("CpuUsageTreeGrid_SamplesTooltip",t.eSamples,t.eSamples)}),new i("module","CpuUsageTreeGrid_ModuleHeader","CpuUsageTreeGrid_ModuleTooltip",400,!1,!0,!1)],h&&this._columns.push(new i("id","CpuUsageTreeGrid_FunctionNameHeader","CpuUsageTreeGrid_FunctionNameTooltip",r,!1,!0,!1,null,"grid-cell-numeric",function(n,i){return t.drawHeaderCellValue(n,i,"grid-header-cell-numeric")}))),this._columns},e.prototype.getDefaultSortInfo=function(){var t=this.getColumns(),n=t[1];return new CommonControls.Grid.SortOrderInfo(n.index,n.defaultSortOrder)},e.prototype.getCurrentSortInfo=function(){var u=null,n=null,i,r,t;for(this._grid&&(i=this._grid.getSortOrder(),i&&i.length>0&&(n=i[0])),n||(n=this.getDefaultSortInfo()),r=this.getColumns(),t=0;t<r.length;t++)if(r[t].index===n.index){u=r[t];break}return{column:u,sortOrder:n}},e.prototype.searchChildNode=function(t){var r=this,s,i,e,u,o;if(this._result=t,this._searchString!==null)if(this.disableInProgressState(),this._result.length===0){if(f.F12)return this._isSearching=!1,!1;s=this._request.selectedPath.length===0?this._automation.getAlertPromise("Microsoft.VisualStudio.DiagnosticsHub.CpuUsageTreeGrid.Search",n.Plugin.Resources.getString("Message_SearchNoMatches")):this._automation.getConfirmationPromise("Microsoft.VisualStudio.DiagnosticsHub.CpuUsageTreeGrid.Search",n.Plugin.Resources.getString("Message_SearchStartFromTop")).then(function(n){return n&&(r._grid.setSelectedRowIndex(-1),r.search(r._request.str,r._request.caseSensitive,r._request.isRegex)),!1});s.then(function(n){return r._isSearching=!1,n})}else{for(i=0,e=!1;;){if(u=this._grid.getRowData(i),!u)break;if(!u.isPlaceholder&&u.id===this._result[0].nodeId)if(this._result.length>1){if(this._result.shift(),o=this._grid.getRowData(i+1),o&&o.isPlaceholder){e=!0;break}this._grid.expandNode(i)}else{this._result.shift();this._grid.setSelectedDataIndex(i);this._grid.getSelectedRowIntoViewCenter()||this._grid.redraw();this._result=null;this._searchString=null;this._request=null;this._isSearching=!1;break}i++}return e&&this._grid.expandNode(i),!0}},e}();t.CpuUsageTreeGrid=s})(i=t.DiagnosticsHub||(t.DiagnosticsHub={}))})(t=n.VisualStudio||(n.VisualStudio={}))}(Microsoft||(Microsoft={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){"use strict";var t=Microsoft.VisualStudio.DiagnosticsHub,i=function(i){function r(r,u){var e=this,f;i.call(this,u||"VisualProfiler.cpuUsageTemplate");f=document.getElementById(r);f.appendChild(this.rootElement);this.model=new t.CpuUsageTreeGrid({containerId:"gridContainer",viewDestination:0});this.SearchControl.searchProvider=new n.CpuUsageSearchProvider(this.model);n.Program.addEventListener(n.ProgramEvents.Resize,function(){return e.onTabResize()})}return __extends(r,i),Object.defineProperty(r.prototype,"SearchControl",{get:function(){return this._searchControl||(this._searchControl=new Common.Controls.SearchControl),this._searchControl},enumerable:!0,configurable:!0}),r.prototype.onTabActivated=function(){},r.prototype.onTabResize=function(){},r}(Common.TemplateControl);n.CpuUsageView=i}(VisualProfiler||(VisualProfiler={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(){function t(t,i,r,u,f){r===void 0&&(r="");u===void 0&&(u="");f===void 0&&(f=-1);this._buttonDiv=null;this._tabIndex=-1;this._buttonClickedListeners=[];var e=document.getElementById(t);e.innerHTML=n.Plugin.Resources.getString(i);e.setAttribute("role","button");u&&e.setAttribute("aria-label",n.Plugin.Resources.getString(u));r&&e.setAttribute("data-plugin-vs-tooltip",n.Plugin.Resources.getString(r));this._buttonDiv=e;this._tabIndex=f;this._clickHandler=this.onButtonClick.bind(this);this._keyPressHandler=this.onButtonKeyPress.bind(this)}return t.prototype.getContainer=function(){return this._buttonDiv},t.prototype.enable=function(){this._buttonDiv.removeEventListener("click",this._clickHandler);this._buttonDiv.removeEventListener("keypress",this._keyPressHandler);this._buttonDiv.addEventListener("click",this._clickHandler);this._buttonDiv.addEventListener("keypress",this._keyPressHandler);this._buttonDiv.classList.add("tree-grid-button-enabled");this._buttonDiv.classList.remove("tree-grid-button-disabled");this._buttonDiv.tabIndex=this._tabIndex},t.prototype.disable=function(){this._buttonDiv.removeEventListener("click",this._clickHandler);this._buttonDiv.removeEventListener("keypress",this._keyPressHandler);this._buttonDiv.classList.remove("tree-grid-button-enabled");this._buttonDiv.classList.add("tree-grid-button-disabled");this._buttonDiv.tabIndex=-1},t.prototype.addButtonClickedListener=function(n){for(var t=0;t<this._buttonClickedListeners.length;t++)if(n===this._buttonClickedListeners[t])return;this._buttonClickedListeners.push(n)},t.prototype.removeButtonClickedListener=function(n){for(var t=0;t<this._buttonClickedListeners.length;t++)if(n===this._buttonClickedListeners[t]){this._buttonClickedListeners.splice(t,1);return}},t.prototype.onButtonClick=function(){this.invokeButtonClickedListeners()},t.prototype.onButtonKeyPress=function(n){13===n.keyCode&&this.invokeButtonClickedListeners()},t.prototype.invokeButtonClickedListeners=function(){for(var n=0;n<this._buttonClickedListeners.length;n++)this._buttonClickedListeners[n](this._buttonDiv.id)},t}();t.DefaultButton=i})(i=t.DiagnosticsHub||(t.DiagnosticsHub={}))})(t=n.VisualStudio||(n.VisualStudio={}))})(Microsoft||(Microsoft={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t){this._hideClass="message-overlay-hide";this._control=n;this._overlaidControl=t;this._control.classList.add(this._hideClass);this._message=document.createElement("span");this._message.classList.add("message-overlay-message");this._control.appendChild(this._message)}return n.prototype.enable=function(){this._overlaidControl.classList.add(this._hideClass);this._control.classList.remove(this._hideClass)},n.prototype.disable=function(){this._control.classList.add(this._hideClass);this._overlaidControl.classList.remove(this._hideClass)},n.prototype.setMessage=function(n){this._message.innerText=n},n}();n.MessageOverlayControl=t})(t=n.DiagnosticsHub||(n.DiagnosticsHub={}))})(t=n.VisualStudio||(n.VisualStudio={}))})(Microsoft||(Microsoft={}))
//# sourceMappingURL=CpuUsageMerged.min.js.map
html, body {
    height: 100%;
    width: 100%;
    -ms-high-contrast-adjust: none;
    cursor: default;
}

.cpu-usage-body {
    height: 100%;
    width: 100%;
    float: left;
}

.cpu-usage-container {
    height: 100%;
    width: 100%;
    position: relative;
    /* This will set the toolbar as the top row and the grid using the remaining space */
    display: -ms-grid;
    -ms-grid-rows: auto 1fr;
    -ms-grid-columns: 1fr;
}

.cpu-usage-toolbar {
    height: 100%;
    width: 100%;
    -ms-grid-column: 1;
    -ms-grid-row: 1;
    display: -ms-grid;
    -ms-grid-columns: 1fr auto auto auto;
    -ms-grid-column-align: end;
    background-color: transparent;
    padding: 5px;
}

    .cpu-usage-toolbar .create-report {
        -ms-grid-column: 2;
        padding-right: 5px;
        background-color: transparent;
    }

    .cpu-usage-toolbar .analyze-now-button-placeholder {
        -ms-grid-column: 2;
        padding-right: 5px;
        background-color: transparent;
    }

    .cpu-usage-toolbar .thread-filter {
        -ms-grid-column: 3;
        width: auto;
        min-width: 70px;
        padding-right: 5px;
        background-color: transparent;
    }

.cpu-usage-container-overlay {
    height: 0px;
    width: 0px;
    position: absolute;
    left: 0px;
    top: 0px;
    background-color: rgba(200,200,200,0.50); /*[{plugin-background-color}]*/
    opacity: 0.75;
    z-index: 10000;
    display: -ms-grid;
    -ms-grid-columns: 1fr auto 1fr;
    -ms-grid-rows: 1fr auto 1fr 1fr;
}

.cpu-usage-container-disable {
    height: 100% !important;
    width: 100% !important;
}

.main-gridcontainer {
    height: 100%;
    width: 100%;
    -ms-grid-column: 1;
    -ms-grid-row: 2;
}

.progress {
    background-color: transparent;
    text-align: center;
}

.progress-container {
    height: 100%;
    width: 100%;
    -ms-grid-column: 2;
    -ms-grid-row: 2;
}

.progress-hidden {
    display: none;
}

.inlineBlock {
    display: inline-block;
    float: right;
}

.create-report-button {
    background: transparent;
    padding-left: 5px;
    padding-right: 5px;
    display: none;
    padding-top: 1px;
}

.create-report-button-enabled {
    color: blue; /*[{vs-command-control-link-text}]*/
    cursor: pointer;
}

    .create-report-button-enabled:hover {
        color: blue; /*[{vs-command-control-link-text-hover}]*/
        text-decoration: underline;
    }

    .create-report-button-enabled:focus {
        color: blue; /*[{vs-command-control-link-text-hover}]*/
    }

.create-report-button-disabled {
    color: grey; /*[{diagnostics-host-toolbar-text-disabled}]*/
}

/* Default styles for a button in Tree Grid */
.tree-grid-button {
    background: transparent;
    padding-left: 5px;
    padding-right: 5px;
    display: block;
    padding-top: 1px;
}

.tree-grid-button-enabled {
    color: blue; /*[{vs-command-control-link-text}]*/
    cursor: pointer;
}

    .tree-grid-button-enabled:hover {
        color: blue; /*[{vs-command-control-link-text-hover}]*/
        text-decoration: underline;
    }

    .tree-grid-button-enabled:focus {
        color: blue; /*[{vs-command-control-link-text-hover}]*/
    }

.tree-grid-button-disabled {
    color: grey; /*[{diagnostics-host-toolbar-text-disabled}]*/
}

.grid-row {
    height: 1.75em;
}

.grid-row-normal {
    border-bottom-width: 0px;
    border-top-width: 0px;
    border-left-width: 1px;
    border-right-width: 0px;
    border-style: solid;
    border-color: #FAFAFA; /*[{vs-command-bar-options-background-color}]*/
}

.grid-cell-numeric {
    text-align: right;
}

.grid-header {
    background-color: #DCE0EC; /*[{vs-command-bar-gradient-begin-color}]*/
}

.grid-header-cell-numeric {
    text-align: right !important;
    width: 100%;
    padding-right: 0px !important;
}

.grid-header-canvas {
    border-bottom-color: #cccedb; /*[{diagnostics-host-grid-border}]*/
    border-bottom-width: 1px;
    border-bottom-style: solid;
    margin-left: 1px;
    background-color: #DCE0EC; /*[{vs-command-bar-gradient-begin-color}]*/
    border-top-width: 1px;
    border-top-style: solid;
    border-top-color: #cccedb; /*[{diagnostics-host-grid-border}]*/
}

.grid-cell {
    padding-top: 1px;
    height: 100%;
    border-style: solid;
    border-right-width: 1px;
    border-left-width: 0px;
    border-top-width: 0px;
    border-bottom-width: 1px;
    border-color: #FAFAFA; /*[{vs-command-bar-options-background-color}]*/
    float: left;
}

.grid-header-column {
    border-color: #FAFAFA; /*[{diagnostics-host-grid-border}]*/
    border-left-width: 0px;
    border-left-style: solid;
    background-color: #FAFAFA; /*[{vs-command-bar-gradient-begin-color}]*/
}

.grid {
    border-left-width: 0px;
    border-right-width: 0px;
}

.grid-row-selected, .grid-row-selected:hover {
    background-color: transparent !important;
}

    .grid-row-selected .grid-cell, .grid-row-selected:hover .grid-cell {
        background-color: rgb(220, 235, 252) !important; /*[{plugin-treeview-content-selected-background-color} !important]*/
    }

.grid-row-selected-blur {
    background-color: transparent !important;
}

    .grid-row-selected-blur .grid-cell {
        background-color: rgb(230, 230, 230); /*[{plugin-treeview-content-inactive-selected-background-color}]*/
    }

.grid-row:hover {
    background-color: transparent !important;
}

    .grid-row:hover .grid-cell {
        background-color: rgb(242, 247, 253); /*[{plugin-treeview-content-inactive-selected-background-color}]*/
    }

.grid-header-column > .sort-handle {
    color: black; /*[{plugin-color}]*/
}

.grid-header-column:hover > .sort-handle {
    color: rgb(0, 0, 0); /*[{plugin-treeview-content-inactive-selected-color}]*/
}
.message-overlay {
    height: 100%;
    width: 100%;
    position: absolute;
    left: 0px;
    top: 0px;
    z-index: 10000;
    background-color: rgba(200,200,200,0.50); /*[{plugin-background-color}]*/
}

.message-overlay-hide {
    display: none;
}

.message-overlay-message {
    background-color: transparent;
    text-align: center;
    width: 100%;
    display: block;
    position: absolute;
    top: 30%;
}body {
    margin: 0px;
    padding: 0px;
    color: rgb(0, 0, 0); /*[{plugin-color}]*/
    overflow: hidden;
    font-family: Segoe UI, Tahoma, Arial, Verdana; /*[{plugin-font-family}]*/
    font-size: 12px; /*[{plugin-font-size}]*/
    background-image: url("icons/texture.png");
    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("./BptDiagnosticCommon/icons/add_row.png") no-repeat 0px 0px !important;
}

.icon-empty {
    background: url("./BptDiagnosticCommon/icons/common-icons.png") no-repeat -640px -16px !important;
}

.icon-tip {
    background: url("./BptDiagnosticCommon/icons/misc-icons.png") no-repeat -3952px -16px !important;
}

.icon-tools {
    background: url("./BptDiagnosticCommon/icons/common-icons.png") no-repeat -2258px -16px !important;
}

.icon-tree {
    background: url("./BptDiagnosticCommon/icons/misc-icons.png") no-repeat -3998px -16px !important;
}

.icon-tree-add {
    background: url("./BptDiagnosticCommon/icons/misc-icons.png") no-repeat -4046px -16px !important;
}

/*
Define the next section in your manifest to get tree icons themed
"themed_images": {
    "vs-image-tree-icons": {
        "bitmap_source": "BptDiagnosticCommon\\icons\\tree-icons.png",
        "background_color": "plugin-contextmenu-background-color"
    }
*/

.icon-tree-collapse-all {
    background: url("./BptDiagnosticCommon/icons/tree-icons.png") no-repeat -16px -16px !important; /*[ url({vs-image-tree-icons}) no-repeat -16px -16px !important]*/
}

.icon-tree-collapsed {
    background: url("./BptDiagnosticCommon/icons/itemCollapsedIcon.png") no-repeat 0px 0px !important; /*[ url({vs-image-icon-tree-collapsed}) no-repeat 0px 0px !important]*/
    background-position-x: center !important;
    background-position-y: center !important;
    background-size: 70% !important;
}

.icon-tree-collapsed-2 {
    background: url("./BptDiagnosticCommon/icons/tree-icons.png") no-repeat -108px -16px !important; /*[ url({vs-image-tree-icons}) no-repeat -108px -16px !important]*/
}

.icon-tree-corner {
    background: url("./BptDiagnosticCommon/icons/misc-icons.png") no-repeat -4622px -16px !important;
}

.icon-tree-empty {
    background: url("./BptDiagnosticCommon/icons/tree-icons.png") no-repeat -156px -16px !important; /*[ url({vs-image-tree-icons}) no-repeat -156px -16px !important]*/
}

.icon-tree-expand-all {
    background: url("./BptDiagnosticCommon/icons/tree-icons.png") no-repeat -204px -16px !important; /*[ url({vs-image-tree-icons}) no-repeat -204px -16px !important]*/
}

.icon-tree-expanded {
    background: url("./BptDiagnosticCommon/icons/itemExpandedIcon.png") no-repeat 0px 0px !important; /*[ url({vs-image-icon-tree-expanded}) no-repeat 0px 0px !important]*/
    background-position-x: center !important;
    background-position-y: center !important;
    background-size: 60% !important;
}

.icon-tree-expanded-2 {
    background: url("./BptDiagnosticCommon/icons/tree-icons.png") no-repeat -296px -16px !important; /*[ url({vs-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: 0px;
    position: absolute;
}

.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-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: url("./BptDiagnosticCommon/icons/grid-header-separator.png") no-repeat right top;
    background-color: #FAFAFA; /*[{plugin-table-header-background-color}]*/
    width: 20px;
    height: 100%;
    overflow: hidden;
    display: flex;
    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:hover > .title {
        color: rgb(0, 0, 0); /*[{plugin-treeview-content-inactive-selected-color}]*/
    }

    .grid-header-column > .separator {
        background: url("./BptDiagnosticCommon/icons/updownsep.png") repeat-y -1000px 0px;
        top: 0px;
        width: 12px;
        right: -6px;
        bottom: 0px;
        z-index: 6;
        cursor: e-resize;
        position: absolute;
    }

    .grid-header-column > .sort-handle {
        z-index: 3;
        font-family: Marlett !important;
        padding-top: 7px;
        padding-left: 4px;
        padding-right: 4px;
        padding-bottom: 4px;
        text-align: left;
        vertical-align: middle;
        float:left;
    }

    .grid-header-column > .title {
        padding: 4px;
        text-align: left;
        vertical-align: middle;
        float:left;
        color: rgb(128, 128, 128); /*[{plugin-color}]*/
        overflow: hidden;
        white-space: nowrap;
        cursor: default;
        text-overflow: ellipsis;
    }

    .grid-header-column > .indented-title {
        text-indent: 16px;
    }

.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;
    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("./BptDiagnosticCommon/icons/columnmove.png") -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("./BptDiagnosticCommon/icons/common-icons.png") no-repeat -401px 50% !important;
    }

.grid-gutter-drop:hover {
    background: url("./BptDiagnosticCommon/icons/common-icons.png") 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("./BptDiagnosticCommon/icons/common-icons.png") 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;
    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-inactive-selected-color}]*/
        background-color: rgb(242, 247, 253); /*[{plugin-treeview-content-inactive-selected-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: 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;
    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;
    text-overflow: ellipsis;
}

.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;
        }

.gridSplitter {
    position: relative;
    background-color: #FAFAFA; /*[{vs-command-bar-options-background-color}]*/
}

.gridSplitter-Vertical {
    width: 100%;
    height: 5px;
    cursor: ns-resize;
}

.gridSplitter-Horizontal {
    width: 5px;
    height: 100%;
    cursor: ew-resize;
}

.has-header.grid .grid-canvas {
    top: 2.2em;
}
var __extends,Common;(function(n){function r(){document.addEventListener("keydown",function(n){if(n.keyCode===116||n.keyCode===117||n.keyCode===121&&n.shiftKey||n.keyCode===70&&n.ctrlKey)return n.preventDefault(),n.stopPropagation(),!1});document.addEventListener("contextmenu",function(n){return n.preventDefault(),n.stopPropagation(),!1});window.addEventListener("mousewheel",function(n){if(n.ctrlKey)return n.preventDefault(),n.stopPropagation(),!1})}var t,i;(function(n){n[n.BACKSPACE=8]="BACKSPACE";n[n.TAB=9]="TAB";n[n.ENTER=13]="ENTER";n[n.SHIFT=16]="SHIFT";n[n.CONTROL=17]="CONTROL";n[n.ALT=18]="ALT";n[n.CAPS_LOCK=20]="CAPS_LOCK";n[n.ESCAPE=27]="ESCAPE";n[n.SPACE=32]="SPACE";n[n.PAGE_UP=33]="PAGE_UP";n[n.PAGE_DOWN=34]="PAGE_DOWN";n[n.END=35]="END";n[n.HOME=36]="HOME";n[n.ARROW_LEFT=37]="ARROW_LEFT";n[n.ARROW_FIRST=37]="ARROW_FIRST";n[n.ARROW_UP=38]="ARROW_UP";n[n.ARROW_RIGHT=39]="ARROW_RIGHT";n[n.ARROW_DOWN=40]="ARROW_DOWN";n[n.ARROW_LAST=40]="ARROW_LAST";n[n.INSERT=45]="INSERT";n[n.DELETE=46]="DELETE";n[n.A=65]="A";n[n.B=66]="B";n[n.C=67]="C";n[n.F=70]="F";n[n.G=71]="G";n[n.K=75]="K";n[n.M=77]="M";n[n.O=79]="O";n[n.V=86]="V";n[n.X=88]="X";n[n.Y=89]="Y";n[n.Z=90]="Z";n[n.MENU=93]="MENU";n[n.PLUS=107]="PLUS";n[n.MINUS=109]="MINUS";n[n.F1=112]="F1";n[n.F2=113]="F2";n[n.F3=114]="F3";n[n.F4=115]="F4";n[n.F5=116]="F5";n[n.F6=117]="F6";n[n.F7=118]="F7";n[n.F8=119]="F8";n[n.F9=120]="F9";n[n.F10=121]="F10";n[n.F11=122]="F11";n[n.F12=123]="F12";n[n.COMMA=188]="COMMA";n[n.PERIOD=190]="PERIOD"})(n.KeyCodes||(n.KeyCodes={}));t=n.KeyCodes,function(n){n[n.LEFT_BUTTON=0]="LEFT_BUTTON";n[n.MIDDLE_BUTTON=1]="MIDDLE_BUTTON";n[n.RIGHT_BUTTON=2]="RIGHT_BUTTON"}(n.MouseButtons||(n.MouseButtons={}));i=n.MouseButtons;n.blockBrowserAccelerators=r})(Common||(Common={})),function(n){(function(n){var t=function(){function n(n){if(this._rootElement=n,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.")}return n.prototype.appendChild=function(n){this._rootElement.appendChild(n.rootElement);n.parent=this},n.prototype.removeChild=function(n){n.rootElement.parentElement&&(this._rootElement.removeChild(n.rootElement),n.parent=null)},Object.defineProperty(n.prototype,"rootElement",{get:function(){return this._rootElement},set:function(n){if(!n)throw new Error("Invalid root");var t=this._rootElement;this._rootElement=n;t&&t.parentNode&&t.parentNode.replaceChild(n,t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parent",{get:function(){return this._parent},set:function(n){this._parent!==n&&(this._parent=n,this._parent&&!this._parent.rootElement.contains(this._rootElement)&&this._parent.appendChild(this),this.onParentChanged())},enumerable:!0,configurable:!0}),n.prototype.onParentChanged=function(){},n}();n.Control=t})(n.Controls||(n.Controls={}));var t=n.Controls}(Common||(Common={}));__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){(function(t){(function(i){var u,l,o,f,e,s,a,r,h;(function(n){var t=function(){function t(){}return t.stableReverse=function(n,t){for(var r,u,f=[],i=n.length-1;i>=0;i--){for(r=i-1;r>=0;r--)if(0!==t(n[r],n[i]))break;for(u=r+1;u<=i;u++)f.push(n[u]);i=r+1}for(i=0;i<f.length;i++)n[i]=f[i]},t.defaultComparer=function(n,t,i,r){var f=i[n.index],u=r[n.index];return typeof f=="undefined"||f===null?typeof u=="undefined"||u===null?0:-1:typeof u=="undefined"||u===null?1:f.toString().toLocaleUpperCase().localeCompare(u.toString().toLocaleUpperCase())},t.sortComparer=function(t,i,r,u){for(var f=0;f<t.length;f++){var o=t[f],s=i[f],h=s.comparer||n.TreeNodeSort.defaultComparer,e=h(s,o.order,r,u);if(e===0)continue;else return o.order==="desc"?-e:e}return 0},t}();n.TreeNodeSort=t})(i.Utility||(i.Utility={}));u=i.Utility;l=function(){function n(n,t,i){this.gridData=n;this.expandStates=t;this.toggleFunction=i}return n}();i.TreeInfo=l;o=function(){function n(t,i,r,u,f,e,o,s,h){this.index=t;this.text=i;this.tooltip=r;this.width=u;this.canSortBy=f;this.getColumnValue=e;this.getCellCSSClass=o;this.comparer=s;this.hasHTMLContent=!1;this.defaultSortOrder=h||"asc";this.maxTooltipLineLength=n.DEFAULT_MAX_TOOLTIP_LINE_LENGTH}return n.DEFAULT_MAX_TOOLTIP_LINE_LENGTH=64,n}();i.ColumnInfo=o;f=function(){function n(n,t){this.index=n;this.order=t}return n}();i.SortOrderInfo=f;e=function(){function n(n,t){this.data=n;this.expandState=t;this.children=[]}return n}();i.TreeNode=e;s=function(){function n(n,t){this.icon=n;this.checkbox=t}return n}();i.GutterOptions=s;a=function(){function n(n,t,i,r,u){this.childDataCallback=n;this.columns=t;this.sortOrders=i;this.allowMultiSelect=u||!1;this.allowSortOnMultiColumns=!1;this.asyncInit=!0;this.autoSort=!0;this.coreCssClass="grid";this.cssClass="";this.canvasClass="grid-canvas";this.headerElementClass="grid-header";this.headerColumnElementClass="grid-header-column";this.rowClass="grid-row";this.rowNormalClass="grid-row-normal";this.rowSelectedClass="grid-row-selected";this.rowSelectedBlurClass="grid-row-selected-blur";this.rowCurrentClass="grid-row-current";this.cellClass="grid-cell";this.expandStates=[];this.extendViewportBy=3;this.gutter=new s;this.header=!0;this.height="100%";this.initialSelection=!1;this.keepSelection=!1;this.payloadSize=200;this.source=null;this.editCellCallback=r;this.overflowColumn=!1;this.focusable=!0}return n}();i.GridOptions=a;r=function(){function n(n,t){this.rowIndex=n;this.dataIndex=t}return n}();i.RowIndexInfo=r;h=function(){function n(n,t){this.width=n;this.height=t}return n}();i.Size=h;var c=function(){function n(n,t){this.start=n;this.end=t}return n}(),v=function(){function n(n,t,i,r){this.active=n;this.index=t;this.originalWidth=i;this.origin=r}return n}(),y=function(t){function i(n,i){t.call(this,n);this._options=i;this._canvas=null;this._contentSpacer=null;this._element=null;this._focus=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=!1;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=!1;this._resetScroll=!1;this._ignoreScroll=!1;this._scrollTop=0;this._scrollLeft=0;this._cancelable=null;this._updateThemeAttributes();this.initialize()}return __extends(i,t),i._setTooltip=function(n,t,i,r){r=r||o.DEFAULT_MAX_TOOLTIP_LINE_LENGTH;r!==-1&&(t=this._textSplit(t,r));Microsoft.Plugin.Tooltip.defaultTooltipContentToHTML&&(t=t.replace(/[<>]/g,function(n){return n==="<"?"&lt;":"&gt;"}),t=t.replace("\r\n","<br/>"));var u={content:t,height:i,contentContainsHTML:Microsoft.Plugin.Tooltip.defaultTooltipContentToHTML};n.setAttribute("data-plugin-vs-tooltip",JSON.stringify(u))},i.prototype.getSelectionCount=function(){return this._selectionCount},i.prototype.getElement=function(){return this._element},i.prototype.setAriaDescription=function(n){this._ariaDescription=n;this._updateGridAriaLabel()},i.prototype.initializeDataSource=function(){var n;if(this._resetScroll){this._ignoreScroll=!0;try{n=this._canvas;n.scrollTop=0;n.scrollLeft=0;this._scrollLeft=0;this._scrollTop=0;this._resetScroll=!1}finally{this._ignoreScroll=!1}}return this.setDataSource(this._options.source,this._options.expandStates,this._options.columns,this._options.sortOrders).then(this._initializeDataSourceComplete.bind(this))},i.prototype.activateWithDynamicData=function(n){this.setDataSource([],[],this._options.columns,null);this._count=n;this._expandedCount=n;this._expandStates=[0]},i.prototype.setDataSource=function(n,t,r,u,f){var s=this,o,h,l,e,c;if(this._dataSource=n||[],this._count=l=this._dataSource.length,t?(this._expandStates=t,this._indentLevels=i.expand(t)):(this._indentLevels=null,this._expandStates=null),this._expandedCount=l,this._updateRanges(),this._columns=[],r){var a=function(n,t,i,r,u,f,e){return s._drawCell(n,t,i,r,u,f,e)},v=function(n,t){return s._drawHeaderCellValue(n,t)},y=function(n,t,i){return s.getColumnValue(n,t,i)};for(o=0,h=r.length;o<h;o++)e=r[o],e.index=typeof e.index!="undefined"?e.index:String(o),e.canSortBy=e.canSortBy!==!1,e.canMove=e.canMove!==!1,e.width=typeof e.width!="undefined"?e.width:100,e.getCellContents=e.getCellContents||a,e.getHeaderCellContents=e.getHeaderCellContents||v,e.getColumnValue=e.getColumnValue||y,this._columns.push(e)}if(this._sortOrder=[],u)for(o=0,h=u.length;o<h;o++)c=u[o],c.order!=="desc"&&(c.order="asc"),this._sortOrder.push(c);return this._clearSelection(),this._determineIndentIndex(),this._options.asyncInit?window.setTimeout(function(){return s._layoutAfterSetDataSource(f)},0):this._layoutAfterSetDataSource(f),this._updateAriaLabelForColumns(r),Microsoft.Plugin.Promise.wrap(null)},i.prototype.getRowInfo=function(n){return this._rows[n]},i.prototype.getRowData=function(n){return this._dataSource[n]},i.prototype.getRowDataIndex=function(n){return this._dataSource.indexOf(n)},i.prototype.getColumns=function(){return this._columns||[]},i.prototype.getSortOrder=function(){return this._sortOrder||[]},i.prototype.getSortColumns=function(n){return n=n||this.getSortOrder(),this._getSortColumns(n)},i.prototype._updateRanges=function(){var n=0,i=0,r=this._count,t=[],u=0,f;if(this._expandStates){while(n<r)f=this._expandStates[n],f<0?(t[t.length]=new c(i,n),u+=n-i+1,n+=1-f,i=n):n++;i<r&&(t[t.length]=new c(i,r-1),u+=r-i)}else u=r,t[t.length]=new c(0,u);this._expandedCount=u;this._visibleRange=t},i.prototype.expandNode=function(n){var r=this,t,i;this._dataSource[n+1].isPlaceholder&&this._getChildDataCallback(this._dataSource[n],function(t){t!==null&&r._adjustForDynamicData(t.itemsWithPlaceholders,t.expandStates,n)});this._expandStates&&(t=this._getExpandState(n),t<0&&(this._expandStates[n]=-t,this._updateRanges(),i=this._rows[n],i&&(i.isDirty=!0),this._onExpandedCollapsed(!0,n)))},i.prototype.collapseNode=function(n){var t,i;this._expandStates&&(t=this._expandStates[n],t>0&&(this._expandStates[n]=-t,this._updateRanges(),i=this._rows[n],i&&(i.isDirty=!0),this._onExpandedCollapsed(!1,n)))},i.prototype.expandAllNodes=function(){var n=0,f=this._count,t=this._expandStates,i=!1,e=this._rows,r,u;if(t){while(n<f)r=t[n],r<0&&(t[n]=-r,i=!0,u=e[n],u&&(u.isDirty=!0)),n++;i&&(this._updateRanges(),this._onExpandedCollapsed(!0))}return i},i.prototype.collapseAllNodes=function(){var n=0,f=this._count,t=this._expandStates,i=!1,e=this._rows,r,u;if(t){while(n<f)r=t[n],r>0&&(t[n]=-r,i=!0,u=e[n],u&&(u.isDirty=!0)),n++;i&&(this._updateRanges(),this._onExpandedCollapsed(!1))}return i},i.prototype.expandAll=function(){var n=this;this._updateExpansionStateAndRedraw(function(){return n.expandAllNodes()})},i.prototype.collapseAll=function(){var n=this;this._updateExpansionStateAndRedraw(function(){return n.collapseAllNodes()})},i.prototype.tryToggle=function(n){var i,t,r;if(!this._expandStates||this._selectedIndex<0||this.getExpandedCount()<=0||(t=this._getDataIndex(this._selectedIndex),r=this._rows[t],!r))return!1;if(i=this._getExpandState(t),i!==0){if(n)if(i<0)this.expandNode(t);else return!1;else if(i>0)this.collapseNode(t);else return!1;return this._clearSelection(),this._addSelection(this._selectedIndex),this._layoutContentSpacer(),this._redraw(),!0}return!1},i.prototype.calculateVisibleRowIndices=function(n,t){var i=this.getExpandedCount()-1,r=this._measurements.rowHeight;return{first:Math.min(i,Math.max(0,Math.ceil(n/r))),last:Math.min(i,Math.floor(t/r)-1)}},i.prototype.getSelectedRowIntoView=function(n){return this._getRowIntoView(this._selectedIndex,n)},i.prototype.getSelectedRowIntoViewCenter=function(){return this._getRowIntoViewCenter(this._selectedIndex)},i.prototype.getSelectedRows=function(){return this._selectedRows},i.prototype.cacheRows=function(){},i.prototype.updateRow=function(n,t){var r=0,u=0,i;typeof t=="undefined"||t<0?t=this._getDataIndex(n):(typeof n=="undefined"||n<0)&&(n=this._getRowIndex(t));i=this._rows[t];i&&(this._expandStates&&(r=this._getExpandState(t),u=this.indentLevel(t)),this._updateRow(i,n,t,r,u))},i.prototype.layout=function(){this._measureCanvasSize();this._cleanUpRows();this._fixScrollPos();this._layoutContentSpacer();this._updateViewport();this._layoutHeader();this._drawHeader()},i.prototype.redraw=function(){this._fixScrollPos();this._redraw(!0)},i.prototype.getColumnValue=function(n,t){return this._dataSource[n][t]},i.prototype.getColumnText=function(n,t,r){var u,f=t.getColumnValue(n,t.index,r,this._dataSource);return u=typeof f!="string"?i.convertValueToDisplayString(f,t.format):f,t.maxLength=Math.max(t.maxLength||0,u.length),u},i.prototype.getSelectedRowIndex=function(){return this._selectionCount>0?this._selectedIndex:-1},i.prototype.setSelectedRowIndex=function(n){this._clearSelection();this._addSelection(n)},i.prototype.getSelectedDataIndex=function(){return this._getDataIndex(this.getSelectedRowIndex())},i.prototype.getSelectedDataIndices=function(){var i,n=this._selectedRows,t=[];if(n)for(i in n)t[t.length]=n[i];return t},i.prototype.ensureDataIndexExpanded=function(n){for(var t=this._getRowIndex(n);t<0||n>0&&t===0;)this.expandNode(this._getDataIndex(-t)),t=this._getRowIndex(n);return t},i.prototype.setSelectedDataIndex=function(n,t){var i=t?this.ensureDataIndexExpanded(n):this._getRowIndex(n);this.setSelectedRowIndex(i)},i.prototype.selectionChanged=function(){},i.prototype.selectedIndexChanged=function(){},i.prototype.onSort=function(n,t){return this._options.autoSort&&(this._trySorting(n,t),this._sortOrder=n,this.layout()),!0},i.prototype.getRowInfoFromEvent=function(n,t){var i=this.findClosestElement(n.target,t);return i?this._rowInfoMap[i.id]:null},i.prototype.getExpandStates=function(){return this._expandStates},i.prototype.options=function(){return this._options},i.prototype.getExpandedCount=function(){return this._expandedCount},i.prototype.setCounts=function(n){this._expandedCount=n;this._count=n},i.prototype.updateCounts=function(n){this._expandedCount+=n;this._count+=n},i.prototype.getVisibleRowIndices=function(){return this._getVisibleRowIndices()},i.prototype.addEventListenerToCanvas=function(n,t,i){this._canvas.addEventListener(n,function(){return i.apply(t,arguments)})},i.prototype.onSelectRow=function(){},i.prototype.widenRows=function(n){var u=4,i,r,t,f;for(t in this._canvas.children)if(t!=="0"&&this._canvas.children.hasOwnProperty(t)&&this._canvas.children[t].children){i=0;for(r in this._canvas.children[t].children)this._canvas.children[t].children.hasOwnProperty(r)&&(i+=this._canvas.children[t].children[r].scrollWidth);n<i+u&&(n=i+u)}for(t in this._canvas.children)t!=="0"&&this._canvas.children.hasOwnProperty(t)&&this._canvas.children[t].children&&(f=this._canvas.children[t],f.style.width=n+"px")},i.prototype.canvasClientWidth=function(){return this._canvas.clientWidth},i.prototype.markRowDirty=function(n){this._rows[n]&&(this._rows[n].isDirty=!0)},i.prototype.getMeasurements=function(){return this._measurements},i.prototype.getRowTop=function(n){return n*this._measurements.rowHeight},i.prototype.getTotalDataHeight=function(){return this.getExpandedCount()*this._measurements.rowHeight},i.prototype.isActive=function(){return this._active},i.prototype.getHeaderHeight=function(){return this._options.header?this._header.clientHeight:0},i.prototype.onCtrlC=function(){},i.prototype.onF12=function(){},i.prototype.onCtrlG=function(){},i.prototype.isEmpty=function(){var n,t;for(n in this._rows)if(t=parseInt(n),this._rows.hasOwnProperty(t))return!1;return!0},i.prototype.getCanvas=function(){return this._canvas},i.prototype.updateMouseOverRowStyle=function(){},i.prototype.updateMouseOutRowStyle=function(){},i.prototype.updateSelectedRowStyle=function(){},i.prototype.updateUnselectedRowStyle=function(){},i.prototype.onTreeIconMouseOver=function(){},i.prototype.onTreeIconMouseOut=function(){},i.expand=function(n){var u=[],i,t,r,e,f,o;if(n.length>0){for(i=[],t={level:1,origCount:n.length,remainingCount:n.length},i.push(t),r=0;r<n.length;){for(u.push(t.level),t.remainingCount--;t.remainingCount===0;){if(i.pop(),i.length==0)if(r===n.length-1)break;else throw new Error("invalid descendant counts, nesting not possible");if(e=i[i.length-1],e.remainingCount-=t.origCount,t=e,t.remainingCount<0)throw new Error("invalid descendant counts, cannot convert to indentation levels")}f=Math.abs(n[r]);f>0&&(o={level:u[u.length-1]+1,origCount:f,remainingCount:f},i.push(o),t=o);r++}if(i.length>0)throw new Error("invalid descendant counts, more input expected")}return u},i.prototype._getExpandState=function(n){var t=0;return this._expandStates&&typeof this._expandStates[n]=="number"&&(t=this._expandStates[n]),t},i.prototype._clearSelection=function(){this._selectionCount=0;this._selectedRows=null;this._activeAriaId=null},i.prototype._addSelection=function(n,t,i){var u=i&&i.keepSelectionStart,f=i&&i.doNotFireEvent,e=i&&i.toggle,r;if(this._options.allowMultiSelect===!1&&(u=!1,this._clearSelection()),this._selectedRows||(this._selectedRows={}),n>=0?(r=!0,this._selectedRows.hasOwnProperty(n)?e&&(r=!1,this._selectionCount=Math.max(0,this._selectionCount-1),delete this._selectedRows[n]):this._selectionCount++,typeof t!="number"&&(t=this._getDataIndex(n)),r&&(this._selectedRows[n]=t),this._selectedIndex=n,this._updateAriaAttribute(),(this._selectionStart<0||!u)&&(this._selectionStart=n)):(t=-1,this._selectedIndex=-1),f||(this._updateSelectionStyles(),this._selectionChanged(),this._selectedIndexChanged(this._selectedIndex,t)),n>=0)this.onSelectRow(n)},i.prototype.checkUpdateActive=function(n){this._selectionCount>0&&n.rowIndex===this._selectedIndex&&n.row&&this.updateActive(n.row)},i.prototype.updateActive=function(n){try{n.setActive()}catch(t){}},i.prototype._updateAriaAttribute=function(){var i=this._getDataIndex(this._selectedIndex),n,t,r;i!=null&&(n=this.getRowInfo(i),n&&n.row?(t=n.row.getAttribute("id"),t!==this._activeAriaId&&(r=this._getAriaLabelForRow(n),n.row.setAttribute("aria-label",r),this._activeAriaId=t),this._active&&this.checkUpdateActive(n)):this._updateAriaOnViewportUpdate=!0)},i.prototype._getAriaLabelForRow=function(n){var i="",c=n.rowIndex,u=n.dataIndex,s=0,h=0,f,t,e,r,o;for(this._expandStates&&(s=this._expandStates[u],h=this._indentLevels[u]),f=this._columns,t=0,e=f.length;t<e;t++)(r=f[t],r.hidden)||(o=r.text+", "+this.getColumnText(u,r,t),i&&(i+=", "),i+=o);return i},i.prototype._updateSelectionStyles=function(){var n=this,t=function(){var t,u=n._selectedRows,f=n._selectedIndex,i=n._rows,r;for(t in i)r=i[t],n._updateRowSelectionStyle(r,u,f)};this._options.allowMultiSelect?(this._delayedUpdateSelectionCookie&&window.clearTimeout(this._delayedUpdateSelectionCookie),this._delayedUpdateSelectionCookie=window.setImmediate(function(){t()})):t()},i.prototype._updateRowSelectionStyle=function(n,t,i){var f=n.rowIndex,u=n.row,r=n.gutterRow;u.classList.remove(this._options.rowSelectedClass);u.classList.remove(this._options.rowSelectedBlurClass);u.classList.remove(this._options.rowCurrentClass);this.updateUnselectedRowStyle(n);r&&(r.classList.remove("grid-gutter-row-selected"),r.classList.remove("grid-gutter-row-selected-blur"),r.classList.remove("grid-gutter-row-current"),r.querySelector("input.checkbox").setAttribute("checked",String(!1)));t&&t.hasOwnProperty(f)&&(r&&r.querySelector("input.checkbox").setAttribute("checked",String(!0)),this._active?(u.classList.add(this._options.rowSelectedClass),this.updateSelectedRowStyle(n),r&&r.classList.add("grid-gutter-row-selected")):(u.classList.add(this._options.rowSelectedBlurClass),r&&r.classList.add("grid-gutter-row-selected-blur")));f===i&&(u.classList.add(this._options.rowCurrentClass),r&&r.classList.add("grid-gutter-row-current"))},i.prototype.focus=function(n){if(this._options.focusable){var i=this._focus,t=function(){try{i.focus()}catch(n){}};typeof n=="undefined"?t():window.setTimeout(function(){t()},n)}},i.prototype._onContainerMouseDown=function(n){var t=n.target;t.classList.contains("grid-edit-box")||this._options.focusable&&this.focus(10)},i.prototype._onContainerResize=function(){this.layout()},i.prototype._applyColumnSizing=function(n,t,i){var e=this._getVisibleColumnIndex(n)+1,r=this._columns[n],u=!1,f;t=t||-1;r&&(u=r.width!==t,f=this.rootElement.querySelector(".grid-header-canvas ."+this._options.headerColumnElementClass+":nth-child("+e+")"),f.style.width=r.width+"px");i===!0&&(u&&this.layout(),this._onColumnResize(r))},i.prototype._trySorting=function(n,t){var y=this,s,h,c,l,o,a,r,f,v;t||(t=this._getSortColumns(n));s=[];h=0;for(c in this._selectedRows)f=this._selectedRows[c],l=this._dataSource[f],l&&(s.push(l),h+=parseInt(c));for(o=new e(null,null),i.addItemsToTree(this._dataSource,this._expandStates,0,this._dataSource.length,o),this._sortOrder&&this._sortOrder.length===1&&n.length===1&&this._sortOrder[0]!==n[0]&&this._sortOrder[0].index===n[0].index?this._sortOrder[0].order!==n[0].order&&i.walkTree(o,function(i){u.TreeNodeSort.stableReverse(i.children,function(i,r){return u.TreeNodeSort.sortComparer(n,t,i.data,r.data)})}):i.walkTree(o,function(i){i.children.sort(function(i,r){return u.TreeNodeSort.sortComparer(n,t,i.data,r.data)})}),this._dataSource=[],this._expandStates=[],r=0;r<o.children.length;r++)i.walkTree(o.children[r],function(n){y._dataSource.push(n.data);y._expandStates.push(n.expandState)});if(this._indentLevels=i.expand(this._expandStates),this._updateRanges(),this._selectionCount>0){for(this._clearSelection(),a=0,r=0;r<s.length;r++)f=this._dataSource.indexOf(s[r]),f>=0&&(v=this._getRowIndex(f),this._addSelection(v,f),a+=v);this._scrollTop+=(a-h)/this._selectionCount*this._measurements.rowHeight}},i.prototype.findClosestElement=function(n,t){for(var r=this._element.parentNode,i=n;i&&i!==r;){if(i.msMatchesSelector(t))return i;i=i.parentNode}return i},i.prototype.fireCustomEvent=function(n,t,i){var r=document.createEvent("Event");r.initEvent(t,!0,!0);r.customData=i;n.dispatchEvent(r)},i.prototype.createElementWithClass=function(n,t){var i=document.createElement(n);return t&&(i.className=t),i},i.prototype._attachEvents=function(){var n=this;window.addEventListener("resize",function(t){return n._onContainerResize(t)});this._element.addEventListener("mousedown",function(t){return n._onContainerMouseDown(t)});this._element.addEventListener("keydown",function(t){return n._onKeyDown(t)});Microsoft.Plugin.Theme.addEventListener("themechanged",function(t){return n._onThemeChanged(t)});this._options.focusable&&(this._focus.addEventListener("focus",function(t){return n._onFocus(t)}),this._focus.addEventListener("blur",function(t){return n._onBlur(t)}));this._canvas.addEventListener("mousedown",function(t){return n._onRowMouseDown(t)});this._canvas.addEventListener("dblclick",function(t){return n._onEditCell(t)});this._canvas.addEventListener("scroll",function(t){return n._onCanvasScroll(t)});this._canvas.addEventListener("selectstart",function(){return!1});this._header&&(this._header.addEventListener("mousedown",function(t){return n._onHeaderMouseDown(t)}),this._header.addEventListener("mouseup",function(t){return n._onHeaderMouseUp(t)}),this._header.addEventListener("click",function(t){return n._onHeaderClick(t)}),this._header.addEventListener("dblclick",function(t){return n._onHeaderDblClick(t)}));this._gutter&&(this._gutter.addEventListener("click",function(t){return n._onGutterClick(t)}),this._gutter.addEventListener("mouseover",function(n){var t=this.findClosestElement(n.target,".grid-gutter-row");t&&t.classList.add("grid-gutter-row-hover")}.bind(this)),this._gutter.addEventListener("mouseout",function(n){var t=this.findClosestElement(n.target,".grid-gutter-row");t&&t.classList.remove("grid-gutter-row-hover")}.bind(this)))},i.prototype._getDataIndex=function(n){var t,u,r=-1,f=this._visibleRange,i;if(n<0)return-1;for(t=0,u=f.length;t<u;t++)if(i=f[t],r+=i.end-i.start+1,n<=r)return i.end-r+n;return n},i.prototype._getRowIndex=function(n){for(var r=0,f=this._visibleRange,t,i=0,u=f.length;i<u;i++){if(t=f[i],n>=t.start){if(n<=t.end)return r+n-t.start}else break;r+=t.end-t.start+1}return-Math.max(0,r-1)},i.prototype._updateViewport=function(n){var v=this._count,o=[],s=[],f=[],y=this._expandStates||[],c=this.getExpandedCount()-1,l=this._getVisibleRowIndices(),u=l.first,e=l.last,t,h;u=Math.max(0,u-this._options.extendViewportBy);e=Math.min(c,e+this._options.extendViewportBy);var a=Math.max(0,u-this._options.payloadSize),p=Math.min(c,e+this._options.payloadSize),i=this._getDataIndex(a),w=u;for(t=a;t<=p&&i<v;t++)t<u?o[o.length]=new r(t,i):t>e?s[s.length]=new r(t,i):(f[f.length]=new r(t,i),w=t),h=y[i],h<0?i+=1-h:i++;this.cacheRows(o,f,s);this._drawRows(f,n);this._updateAriaOnViewportUpdate&&(this._updateAriaOnViewportUpdate=!1,this._updateAriaAttribute())},i.prototype._drawRows=function(n,t){var u=this,tt=this._expandStates,p=0,w=0,l=this._gutter,it=this._canvas,b,e,k=document.createDocumentFragment(),v=null,o,y,d,a,r,h,c,nt;for(l&&(b=this._gutter,v=document.createDocumentFragment()),o=this._rows,y={},this._rows=y,d=n.length,a=0;a<d;a++){var g=n[a],s=g.rowIndex,f=g.dataIndex,i=o[f];i?(e=i.rowIndex!==s,e?i.rowIndex=s:(e=i.isDirty,delete i.isDirty),t&&(e=!0),delete o[f]):(e=!0,r=this.createElementWithClass("div",this._options.rowClass),r.classList.add(this._options.rowNormalClass),r.id="row_"+this._getId()+"_"+s,r.addEventListener("mouseover",function(n){var t=n.target,i=n.relatedTarget,r;t&&i&&(i.parentElement===t||t.parentElement===i)||(r=u.getRowInfoFromEvent(n,"."+u._options.rowClass),r&&u.updateMouseOverRowStyle(r))},!1),r.addEventListener("mouseout",function(n){var t=n.target,i=n.relatedTarget,r;t&&i&&(i.parentElement===t||t.parentElement===i)||(r=u.getRowInfoFromEvent(n,"."+u._options.rowClass),r&&u.updateMouseOutRowStyle(r))},!1),k.appendChild(r),h={rowIndex:s,dataIndex:f,row:r},l&&(c=this.createElementWithClass("div","grid-gutter-row grid-gutter-row-normal"),v.appendChild(c),c.id="gtr_"+r.id,this._rowInfoMap[c.id]=h,h.gutterRow=c),this._rowInfoMap[r.id]=h,i=h);y[f]=i;e&&(tt&&(p=this._getExpandState(f),w=this.indentLevel(f)),this._updateRow(i,s,f,p,w));r&&(r.onfocus=function(n){return u._onRowElementFocus(n)},r.onblur=function(n){return u._onRowElementBlur(n)})}for(nt in o)i=o[nt],l&&(delete this._rowInfoMap[i.gutterRow.id],i.gutterRow.parentElement.removeChild(i.gutterRow)),delete this._rowInfoMap[i.row.id],this._cleanUpCells(i),i.row.parentElement.removeChild(i.row);it.appendChild(k);this._updateDynamicRowsStyle(n);l&&b.appendChild(v)},i.prototype.getColumnPixelIndent=function(n){return n*i.INDENT_PER_LEVEL},i.prototype.addTreeIconWithIndent=function(n,t,i,r){var f=this,e=this.getColumnPixelIndent(i)-13,u;r.indentOffset=e;t!==0&&(u=this.createElementWithClass("div","icon grid-tree-icon"),u.style.left=e+"px",n.appendChild(u),t>0?u.classList.add("icon-tree-expanded"):u.classList.add("icon-tree-collapsed"),u.addEventListener("mouseover",function(n){f.onTreeIconMouseOver(n)}),u.addEventListener("mouseout",function(n){f.onTreeIconMouseOut(n)}));n.style.textIndent=this.getColumnPixelIndent(i)+"px"},i.prototype._drawCell=function(n,t,r,u,f,e,o){var a=f.width||20,v,s=this.createElementWithClass("div",this._options.cellClass),h,c,y,p,l;if(s.style.width=isNaN(a)?String(a):a+"px",typeof f.hrefIndex!="undefined"&&(v=this.getColumnValue(t,f.hrefIndex,-1)),h=this.getColumnText(t,f,o),f.hasHTMLContent||i._setTooltip(s,h,65,f.maxTooltipLineLength),v?(c=document.createElement("a"),c.setAttribute("href",v),c.innerText=h,s.appendChild(c)):h?f.hasHTMLContent?s.innerHTML=h:s.innerText=h:s.innerHTML="&nbsp;",o===e&&u>0&&this.addTreeIconWithIndent(s,r,u,f),f.getCellCSSClass&&(y=f.getCellCSSClass(t,f.index,o,this._dataSource),y))for(p=y.trim().split(" "),l=0;l<p.length;l++)s.classList.add(p[l]);return f.rowCss&&s.classList.add(f.rowCss),s},i.prototype._onRowMouseDown=function(n){var t=this.getRowInfoFromEvent(n,"."+this._options.rowClass),i;t&&(i=n.target,n.which===1&&i.classList.contains("grid-tree-icon")?this._onToggle(t):this._selectRow(t.rowIndex,t.dataIndex,{ctrl:n.ctrlKey,shift:n.shiftKey,rightClick:n.which===3}))},i.prototype._onBlur=function(n){if(n){var t=n.target;if(t.classList.contains("grid-edit-box")){n.stopPropagation();return}}this._active=!1;this._updateSelectionStyles()},i.prototype._onFocus=function(n){var t=n.target;if(t.classList.contains("grid-edit-box")){n.stopEventPropagation();return}this._active=!0;this._updateSelectionStyles();this._updateAriaAttribute()},i.prototype._onCanvasFocus=function(){},i.prototype._onRowElementFocus=function(n){return this._onFocus(n)},i.prototype._onRowElementBlur=function(n){return this._onBlur(n)},i.prototype._onKeyDown=function(t){var i={lo:-1,hi:-1},e=n.KeyCodes,f=this._canvas,u,r;if(this._copyInProgress)return t.keyCode===27&&this._cancelable&&this._cancelable.cancel(),!1;this._count>0&&(i={lo:0,hi:this.getExpandedCount()-1});this._selectedIndex<0&&this._addSelection(i.lo);switch(t.keyCode){case 65:if(t.ctrlKey)this._selectAll();else return!0;break;case 67:t.ctrlKey&&this.onCtrlC();break;case 123:t.altKey||t.ctrlKey||t.shiftKey||this.onF12();break;case 71:t.ctrlKey&&this.onCtrlG();break;case 40:this._clearSelection();t.ctrlKey?t.shiftKey?this._addSelectionRange(i.hi):this._addSelection(i.hi):t.shiftKey?this._addSelectionRange(Math.min(this._selectedIndex+1,i.hi)):this._addSelection(Math.min(this._selectedIndex+1,i.hi));break;case 38:this._clearSelection();t.ctrlKey?t.shiftKey?this._addSelectionRange(i.lo):this._addSelection(i.lo):t.shiftKey?this._addSelectionRange(Math.max(this._selectedIndex-1,i.lo)):this._addSelection(Math.max(this._selectedIndex-1,i.lo));break;case 34:case 33:u=f.clientHeight;r=Math.floor(u/this._measurements.rowHeight);this._clearSelection();t.keyCode===34?t.shiftKey?this._addSelectionRange(Math.min(this._selectedIndex+r,i.hi)):this._addSelection(Math.min(this._selectedIndex+r,i.hi)):t.shiftKey?this._addSelectionRange(Math.max(this._selectedIndex-r,i.lo)):this._addSelection(Math.max(this._selectedIndex-r,i.lo));break;case 39:this._clearSelection();this.tryToggle(!0,t.shiftKey)?(this._addSelection(this._selectedIndex),this.layout()):t.shiftKey?this._addSelectionRange(Math.min(this._selectedIndex+1,i.hi)):this._addSelection(Math.min(this._selectedIndex+1,i.hi));break;case 37:this._clearSelection();this.tryToggle(!1,t.shiftKey)?(this._addSelection(this._selectedIndex),this.layout()):t.shiftKey?this._addSelectionRange(Math.max(this._selectedIndex-1,i.lo)):this._addSelection(Math.max(this._selectedIndex-1,i.lo));break;case 36:this._clearSelection();t.shiftKey?this._addSelectionRange(i.lo):this._addSelection(i.lo);break;case 35:this._clearSelection();t.shiftKey?this._addSelectionRange(i.hi):this._addSelection(i.hi);break;case 9:return t.shiftKey&&this.rootElement.focus(),this.getSelectedRowIntoView(),!0}return this.getSelectedRowIntoView(),t.preventDefault(),!1},i.prototype._onThemeChanged=function(){var n=this._textFontPx;this._updateThemeAttributes();this._textFontPx!==n&&this._textFontPx!==0&&n!==0&&(this._measurements.rowHeight=this._measurements.rowHeight*this._textFontPx/n,this._measurements.textLineHeight=this._measurements.textLineHeight*this._textFontPx/n,this.redraw())},i.prototype._onToggle=function(n){if(this._expandStates){var t=this._getExpandState(n.dataIndex);t!==0&&(t>0?this.collapseNode(n.dataIndex):t<0&&this.expandNode(n.dataIndex),this._clearSelection(),this._addSelection(Math.min(n.rowIndex,this.getExpandedCount()-1),n.dataIndex),this._layoutContentSpacer(),this._redraw())}},i.prototype._onExpandedCollapsed=function(n,t){this.fireCustomEvent(this._element,i.EVENT_ROW_EXPANDED_COLLAPSED,[{isExpanded:n,dataIndex:t}])},i.prototype.indentLevel=function(n){return this._indentLevels[n]},i.prototype.setVisibleRange=function(n){this._visibleRange=n},i.addItemsToTree=function(n,t,r,u,f){for(var s,h,c=Math.min(r+u,n.length),o=r;o<c;o++)s=new e(n[o],t[o]),h=Math.abs(s.expandState),h>0&&(i.addItemsToTree(n,t,o+1,h,s),o+=h),f.children.push(s)},i.walkTree=function(n,t){var f,r,u,e;if(t&&(t(n),f=0,r=n.children,r&&(f=r.length)))for(u=0;u<f;u++)e=r[u],i.walkTree(e,t)},i.makeElementUnselectable=function(n){var i,t,r;for(n.setAttribute("unselectable","on"),i=n.querySelectorAll("*"),t=0;t<i.length;t++){r=i[t];switch(r.tagName){case"IFRAME":case"TEXTAREA":case"INPUT":case"SELECT":break;default:r.setAttribute("unselectable","on")}}},i.toDecimalLocaleString=function(n,t,i){var y=function(n,t,i){for(var r=n.length;r<t;r++)n=i?"0"+n:n+"0";return n},f,c,o,r=n.toString(),u="";if(c=i?i.numberFormat:Microsoft.Plugin.Culture.NumberFormat,o=r.split(/e/i),r=o[0],f=o.length>1?parseInt(o[1],10):0,o=r.split("."),r=o[0],u=o.length>1?o[1]:"",f>0?(u=y(u,f,!1),r+=u.slice(0,f),u=u.substr(f)):f<0&&(f=-f,r=y(r,f+1,!0),u=r.slice(-f,r.length)+u,r=r.slice(0,-f)),u.length>0&&(u=c.NumberDecimalSeparator+u),t===!0){for(var l=c.NumberGroupSizes,a=c.NumberGroupSeparator,s=l[0],v=1,e=r.length-1,h="";e>=0;){if(s===0||s>e)return h.length>0?r.slice(0,e+1)+a+h+u:r.slice(0,e+1)+u;h=h.length>0?r.slice(e-s+1,e+1)+a+h:r.slice(e-s+1,e+1);e-=s;v<l.length&&(s=l[v],v++)}return r.slice(0,e+1)+a+h+u}return r+u},i.convertValueToDisplayString=function(n,t){return n!=null?typeof n=="string"?n:n instanceof Date?n.toLocaleString(Microsoft.Plugin.Culture.lang,t):typeof n=="number"?t?n.toLocaleString(Microsoft.Plugin.Culture.lang,t):i.toDecimalLocaleString(n):typeof n=="boolean"?n?"True":"False":n.toString():""},i._textSplit=function(n,t){var r="\r\n",i,u;return n.indexOf(r)>=0?n:n.length<=t?n:(i=n.lastIndexOf(" ",t),i!==-1?n=n.substring(0,i)+r+n.substring(i+1):(i=t,n=n.substring(0,i)+r+n.substring(i)),u=i+r.length,n.substring(0,u)+this._textSplit(n.substring(u),t))},i._approximateTextWidth=function(n,t){var i=1.1+.7*Math.exp(-n/20);return Math.round(n*i*t)},i.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 h(300,400);this._takeMeasurements();this._getChildDataCallback=this._options.childDataCallback||null;this._editCellCallback=this._options.editCellCallback||null;this._options.asyncInit?window.setTimeout(function(){this._attachEvents()}.bind(this),10):this._attachEvents();this.initializeDataSource().done()},i.prototype._cleanUpCells=function(n){var t,r,i;if(this._options.cellCleanUpCallback&&(t=n.row,t&&t.hasChildNodes()))for(r=t.children,i=0;i<r.length;i++)this._options.cellCleanUpCallback(r.item(i))},i.prototype._getId=function(){return i.TYPE_NAME},i.prototype._enhance=function(){this._buildDom()},i.prototype._buildDom=function(){var n=document.createDocumentFragment(),t=this._options.gutter,i=t&&(t.icon||t.checkbox);this._options.focusable&&(this._focus=document.createElement("div"),this._focus.className="grid-focus",this._focus.setAttribute("tabIndex","0"),n.appendChild(this._focus));this._canvas=document.createElement("div");this._canvas.className=this._options.canvasClass;this._contentSpacer=document.createElement("div");this._contentSpacer.className="grid-content-spacer";this._canvas.appendChild(this._contentSpacer);this._options.header&&(this._element.classList.add("has-header"),this._header=document.createElement("div"),this._header.className=this._options.headerElementClass,this._headerCanvas=document.createElement("div"),this._headerCanvas.className="grid-header-canvas",this._header.appendChild(this._headerCanvas),n.appendChild(this._header));i&&(this._element.classList.add("has-gutter"),this._gutter=document.createElement("div"),this._gutter.className="grid-gutter",this._canvas.appendChild(this._gutter),this._header&&(this._gutterHeader=document.createElement("div"),this._gutterHeader.className="grid-gutter-header",this._header.appendChild(this._gutterHeader)));n.appendChild(this._canvas);this._element.appendChild(n);this._updateAriaLabelForColumns(this._options.columns)},i.prototype._updateAriaLabelForColumns=function(n){var t,i;if(n){for(this._ariaColumns="",t=0;t<n.length;t++)i=n[t],this._ariaColumns&&(this._ariaColumns+=", "),this._ariaColumns+=i.text;this._updateGridAriaLabel()}},i.prototype._updateGridAriaLabel=function(){var n="";n+=this._ariaColumns||"";n&&(n+=", ");n+=this._ariaDescription||"";this._element.setAttribute("aria-label",n)},i.prototype._mergeExpandStates=function(n,t,i){var e=i.length-1,f,r,u;for(t.splice(n+1,1),r=0;r<=e;r++)t.splice(n+r+1,0,i[r]);for(f=0,r=n;r>=0;r--)u=t[r],Math.abs(u)>f?(t[r]=u<0?u-e:u+e,f=0):f++},i.prototype._takeMeasurements=function(){var f=this._options.coreCssClass,n,i,t,r,u;this._options.cssClass&&(f+=" "+this._options.cssClass);n=this.createElementWithClass("div",f);n.style.position="absolute";n.style.left="-5000px";n.style.top="-5000px";n.style.width="1000px";n.style.height="500px";document.body.appendChild(n);i=this.createElementWithClass("div",this._options.rowClass);i.classList.add(this._options.rowNormalClass);n.appendChild(i);t=this.createElementWithClass("div",this._options.cellClass);t.style.width="100px";t.innerText="1";i.appendChild(t);this._measurements.rowHeight=i.offsetHeight;this._measurements.cellOffset=t.offsetWidth-100;t.innerText="1\n1";this._measurements.textLineHeight=i.offsetHeight-this._measurements.rowHeight;r=this.createElementWithClass("div");r.style.overflow="hidden";r.style.width="1em";r.style.height="1ex";t.appendChild(r);this._measurements.unitEx=r.offsetHeight;u=this.createElementWithClass("div","grid-gutter");u.appendChild(this.createElementWithClass("div","grid-gutter-row grid-gutter-row-selected"));n.appendChild(u);this._measurements.gutterWidth=this._gutter?u.clientWidth:0;n.style.overflow="scroll";this._measurements.scrollbarWidth=n.offsetWidth-n.clientWidth;document.body.removeChild(n)},i.prototype._initializeDataSourceComplete=function(){this.getExpandedCount()>0?this._options.keepSelection&&this._selectedIndex>=0?this._selectRow(Math.min(this._selectedIndex,this.getExpandedCount()-1)):this._selectRow(this._options.initialSelection!==!1?0:-1):this.setSelectedRowIndex(-1)},i.prototype._layoutAfterSetDataSource=function(n){this.layout();this._ensureSelectedIndex(n)},i.prototype._adjustForDynamicData=function(n,t,r){var u,f;for(this._dataSource.splice(r+1,1),u=0;u<n.length;u++)this._dataSource.splice(r+u+1,0,n[u]);this._mergeExpandStates(r,this._expandStates,t);f=this._dataSource.length;this._count=f;this._indentLevels=this._expandStates?i.expand(this._expandStates):null;this._expandedCount=f;this._updateRanges();this._determineIndentIndex();this.layout()},i.prototype._ensureSelectedIndex=function(n){var t=this._selectedIndex;typeof n=="number"&&(this._selectedIndex=n);this._selectedIndex>=0&&(this._count<=this._selectedIndex&&(this._selectedIndex=this._count-1),this._selectedIndex!==t&&this._addSelection(this._selectedIndex))},i.prototype._determineIndentIndex=function(){for(var t=this._columns,n=0,i=t.length;n<i;n++)if(t[n].indent){this._indentIndex=n;return}this._indentIndex=0},i.prototype._updateExpansionStateAndRedraw=function(n){var i,t=this._selectedIndex;t>=0&&(i=this._getDataIndex(t));n();t>=0&&(this._clearSelection(),this._addSelection(Math.abs(this._getRowIndex(i))));this._layoutContentSpacer();this._redraw()},i.prototype._getVisibleRowIndices=function(){var n=this._scrollTop,t=n+this._canvasHeight;return this.calculateVisibleRowIndices(n,t)},i.prototype._getRowIntoView=function(n,t){var u;if(t)return u=Math.max(0,Math.min(n||0,this.getExpandedCount()-1)),this._canvas.scrollTop=this.getRowTop(u),!0;var f=this._getVisibleRowIndices(),i=f.first,e=f.last,r=e-i;return n<i||n>e?(i=this._selectedIndex>i?Math.max(n-r,0):Math.max(0,Math.min(n+r,this.getExpandedCount()-1)-r),this._canvas.scrollTop=this.getRowTop(i),!0):!1},i.prototype._getRowIntoViewCenter=function(n){var t=this.getRowTop(n),i,r;return(t=t-this._canvasHeight/2,i=this._canvas.scrollHeight-this._canvasHeight,t>i&&(t=i),r=0,t<r&&(t=r),this._canvas.scrollTop!=t)?(this._canvas.scrollTop=t,!0):!1},i.prototype._cleanUpRows=function(){var t=this._rows,r=this._gutter,i,n;for(i in t)n=t[i],n.row.parentElement&&(this._cleanUpCells(n),n.row.parentElement.removeChild(n.row),delete this._rowInfoMap[n.row.id]),r&&n.gutterRow.parentElement&&(n.gutterRow.parentElement.removeChild(n.gutterRow),delete this._rowInfoMap[n.gutterRow.id]);this._rows={}},i.prototype._updateDynamicRowsStyle=function(n){for(var r,f,t,e,u,o,i=0;i<n.length;i++)if(r=this._rows[n[i].dataIndex],r){for(f=r.row.children,t=0;t<f.length;t++)(e=this._columns[t],e&&e.alwaysEnableTooltip)||(u=f[t],o=u.scrollWidth>u.offsetWidth,o||u.removeAttribute("data-plugin-vs-tooltip"));this.checkUpdateActive(r)}},i.prototype._updateRow=function(n,t,r,u,f){var k=this._indentIndex,a,v,h,w,e,y,c,b,l,p;if(this._gutter){var o=this._options.gutter,d=n.gutterRow,s=d.firstElementChild;s.style.top=this.getRowTop(t)+"px";s.style.left="0px";s.style.width=this._measurements.gutterWidth+"px";s.style.height=this._measurements.rowHeight+"px";o.checkbox&&(a=this.createElementWithClass("input","checkbox "+(o.checkbox.cssClass||"")),a.setAttribute("type","checkbox"),v=this.createElementWithClass("div","grid-gutter-cell grid-gutter-checkbox"),v.appendChild(a[0]),s.appendChild(v));o.icon&&(h="grid-gutter-cell grid-gutter-icon ",typeof o.icon.cssClass!="undefined"&&(h+=o.icon.cssClass+" "),typeof o.icon.index!="undefined"&&(h+=(this.getColumnValue(r,o.icon.index,-1)||"")+" "),o.icon.ownerDraw!==!1&&(h+=this._getGutterIconClass(t,r,u,f)||""),w=this.createElementWithClass("div",h),s.appendChild(w));this._drawGutterCell(n,t,r,u,f)}for(this._cleanUpCells(n),e=n.row,e.innerHTML="",e.style.top=this.getRowTop(t)+"px",e.style.left=this._measurements.gutterWidth+"px",e.style.height=this._measurements.rowHeight+"px",this._options.overflowColumn===!1?e.style.width=isNaN(this._contentSize.width)?"":this._contentSize.width+2+"px":e.style.minWidth=isNaN(this._contentSize.width)?"":this._contentSize.width+2+"px",y=this._columns,c=0,b=y.length;c<b;c++)(l=y[c],l.hidden)||(p=l.getCellContents(n,r,u,f,l,k,c),p&&e.appendChild(p));i.makeElementUnselectable(e);this._gutter&&i.makeElementUnselectable(s);this._updateRowSelectionStyle(n,this._selectedRows,this._selectedIndex);u!==0&&e.setAttribute("aria-expanded",u>0?"true":"false")},i.prototype._getGutterIconClass=function(){return""},i.prototype._drawGutterCell=function(){},i.prototype._drawHeader=function(){var s=this._columns,c=this._sortOrder,o,r,h,n,t,f,e,u;if(this._header){for(o=document.createDocumentFragment(),r=0,h=s.length;r<h;r++)(n=s[r],n.hidden)||(t=this.createElementWithClass("div",this._options.headerColumnElementClass),i._setTooltip(t,n.tooltip,65,n.maxTooltipLineLength),t.style.width=(n.width||20)+"px",t._data={columnIndex:r,header:!0},f=this.createElementWithClass("div","separator"),n.fixed&&(f.style.cursor="auto"),f._data={columnIndex:r,separator:!0},t.appendChild(f),e=n.getHeaderCellContents(n,r),n.headerCss&&e.classList.add(n.headerCss),n.tooltip&&i._setTooltip(e,n.tooltip,65,n.maxTooltipLineLength),t.appendChild(e),u=this.createElementWithClass("div","sort-handle"),c.forEach(function(t){if(t.index===n.index)return t.order==="asc"?u.innerHTML=i.ASCENDING_ARROW:t.order==="desc"&&(u.innerHTML=i.DESCENDING_ARROW),u.setAttribute("aria-label",""),u.setAttribute("role","img"),!1}),t.appendChild(u),o.appendChild(t));this._headerCanvas.innerHTML="";this._headerCanvas.appendChild(o);i.makeElementUnselectable(this._header)}},i.prototype._drawHeaderCellValue=function(n,t){var i=document.createElement("div");return i.classList.add("title"),n.hasHTMLContent?i.innerHTML=n.text||"&nbsp;":i.innerText=n.text||"",t!==this._indentIndex||typeof this._indentLevels=="undefined"||this._indentLevels===null||i.classList.add("indented-title"),i},i.prototype._layoutContentSpacer=function(){for(var t,r,u,n=0,f=this._columns,i=0,e=f.length;i<e;i++)f[i].hidden||(n+=(f[i].width||20)+this._measurements.cellOffset);n=n+2;t=Math.max(1,this.getTotalDataHeight());this._contentSpacer.style.width=n+"px";this._contentSpacer.style.height=t+"px";this._gutter&&(this._gutter.style.height=t+"px");this._ignoreScroll=!0;try{r=Math.max(0,Math.min(this._scrollTop,t-this._canvasHeight));r!==this._scrollTop&&(this._scrollTop=r,this._canvas.scrollTop=r);u=Math.max(0,Math.min(this._scrollLeft,n-this._canvasWidth));u!==this._scrollLeft&&(this._scrollLeft=u,this._canvas.scrollLeft=u)}finally{this._ignoreScroll=!1}this._contentSize.width=n;this._contentSize.height=t},i.prototype._layoutHeader=function(){this._header&&(this._headerCanvas.style.left=this._measurements.gutterWidth-this._scrollLeft+"px");this._gutter&&(this._gutter.style.left=this._scrollLeft+"px")},i.prototype._fixScrollPos=function(){var n=this._ignoreScroll;this._ignoreScroll=!0;try{this._canvas.scrollLeft=this._scrollLeft;this._canvas.scrollTop=this._scrollTop}finally{this._ignoreScroll=n}},i.prototype._redraw=function(n){this._layoutHeader();this._updateViewport(n)},i.prototype._selectRow=function(n,t,i){var r=i&&i.ctrl,u=i&&i.shift,f=i&&i.rightClick;r?this._addSelection(n,t,{toggle:!0}):u?(this._clearSelection(),this._addSelectionRange(n,t)):f?this._selectedRows&&this._selectedRows.hasOwnProperty(n)?(this._selectedIndex=n,this._updateAriaAttribute()):(this._clearSelection(),this._addSelection(n,t)):(this._clearSelection(),this._addSelection(n,t))},i.prototype._selectAll=function(){for(var i,r,n=0,t=0,u=this._dataSource.length;t<u;++t)i=this._dataSource[t],i&&!i.isPlaceholder&&++n;n--;n>=0&&this._options.allowMultiSelect!==!1&&(this._clearSelection(),this._selectionStart=0,r=Math.max(0,this._selectedIndex),this._addSelectionRange(n,undefined,{doNotFireEvent:!0}),this._selectedIndex=r,this._updateSelectionStyles(),this._selectionChanged())},i.prototype._addSelectionRange=function(n,t,i){var h=i&&i.doNotFireEvent,o=-1,f,u,s,r,e;if(this._options.allowMultiSelect===!1)this._addSelection(n,t);else{for(this._selectedRows&&(o=this._selectedRows[this._selectedIndex]),this._selectionStart<0&&(this._selectionStart=n),u=Math.min(this._selectionStart,n),s=Math.max(this._selectionStart,n),(typeof t!="number"||u!==n)&&(t=this._getDataIndex(u)),r=u;r<=s;r++)this._addSelection(r,t,{keepSelectionStart:!0,doNotFireEvent:!0}),r===n&&(f=t),typeof t=="number"&&(e=this._getExpandState(t),t+=e<0?1-e:1);this._selectedIndex=n;this._updateAriaAttribute();h||(this._updateSelectionStyles(),this._selectionChanged(),o!==f&&this._selectedIndexChanged(this._selectedIndex,f))}},i.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}])},i.prototype._selectedIndexChanged=function(n,t){this.selectedIndexChanged(n,t);this.fireCustomEvent(this._element,i.EVENT_SELECTED_INDEX_CHANGED,[n,t])},i.prototype._measureCanvasSize=function(){this._canvasHeight=this._canvas.clientHeight;this._canvasWidth=this._canvas.clientWidth},i.prototype._setupMoveEvents=function(){var n=this;document.addEventListener("mousemove",function(t){return n._onDocumentMouseMove(t)});document.addEventListener("mouseup",function(t){return n._onDocumentMouseUp(t)})},i.prototype._clearMoveEvents=function(){document.removeEventListener("mousemove",null,!0);document.removeEventListener("mouseup",null,!0)},i.prototype._onDocumentMouseMove=function(n){var t=this._columnSizing;if(t&&t.active===!0){var i=n.pageX-t.origin,r=Math.max(15,t.originalWidth+i),u=this._columns[t.index];u.width=r;this._applyColumnSizing(t.index);this._moveSizingElement(t.index)}},i.prototype._onDocumentMouseUp=function(){var n=this;return window.setTimeout(function(){n._tryFinishColumnSizing(!1)},0),!1},i.prototype._onHeaderMouseDown=function(n){var t,i,r;return n.which!==1?!0:(t=this.findClosestElement(n.target,".separator"),t&&t._data&&(i=t._data.columnIndex,r=this._columns[i],!r.fixed)?(this._columnSizing=new v(!0,i,r.width,n.pageX),this._moveSizingElement(i),this._setupMoveEvents(),n.stopImmediatePropagation(),n.preventDefault(),!1):void 0)},i.prototype._onHeaderMouseUp=function(){return!1},i.prototype._onHeaderClick=function(n){var i=this.findClosestElement(n.target,"."+this._options.headerColumnElementClass),r,u,t;if(i&&!this._columnSizing){if(r=this.findClosestElement(n.target,".separator"),r&&r._data)return!1;i._data&&(u=i._data.columnIndex,t=this._columns[u],t.canSortBy&&!t.fixed&&this._sortBy(t,n.shiftKey))}},i.prototype._onHeaderDblClick=function(n){var f=this.findClosestElement(n.target,".separator"),r,u,o,s,l;if(f&&f._data){this._tryFinishColumnSizing(!0);var h=f._data.columnIndex,t=this._columns[h],c=3,e=i._approximateTextWidth(c,this._measurements.unitEx),a=this.getExpandedCount();for(r=0;r<a;r++)(u=0,o=this._getDataIndex(r),t.indent&&(u+=this.getColumnPixelIndent(this._indentLevels[o])),s=this.getColumnText(o,t,-1).length,!t.indent&&s<=c)||(u+=i._approximateTextWidth(s,this._measurements.unitEx),e=Math.max(e,u));return l=t.width,t.width=e,this._applyColumnSizing(h,l,!0),!1}},i.prototype._moveSizingElement=function(n){var r=this._measurements.gutterWidth,t,i;if(!this._sizingElement){if(n<0)return;this._sizingElement=this.createElementWithClass("div","grid-column-sizing");this._canvas.appendChild(this._sizingElement)}if(this._sizingElement.style.height=this._canvas.clientHeight-1+"px",this._sizingElement.style.top=this._scrollTop+"px",n<0)this._sizingElement.style.left="-5000px",this._sizingElement.style.top="-5000px",this._sizingElement.style.height="0px";else{for(t=0;t<=n;)i=this._columns[t++],i.hidden||(r+=i.width);this._sizingElement.style.left=r-1+"px"}},i.prototype._getVisibleColumnIndex=function(n){var t=0,i=0,r=this._columns.length;if(this._columns[n].hidden)return-1;while(t<n)this._columns[t].hidden||i++,t++;return i},i.prototype._onColumnResize=function(n){this.fireCustomEvent(this._element,"columnresize",[n])},i.prototype._tryFinishColumnSizing=function(n){var t=this._columnSizing;t&&(t.active===!0&&(n||this._applyColumnSizing(t.index,t.originalWidth,!0),this._moveSizingElement(-1)),this._columnSizing=null,this._clearMoveEvents())},i.prototype._getSortColumns=function(n){for(var e,t,r,u=this._columns,f=[],i=0,o=n.length;i<o;i++)for(e=n[i],t=0;t<u.length;++t)if(r=u[t],r.index===e.index){f.push(r);break}return f},i.prototype._sortBy=function(n,t){var i=this._sortOrder.slice(0),e=!1,u,o,r,s;if(n){for(u=0,o=i.length;u<o;u++)if(r=i[u],r.index===n.index){i.splice(u,1);e=!0;break}r=e?new f(r.index,r.order==="asc"?"desc":"asc"):new f(n.index,n.defaultSortOrder);t&&this._options.allowSortOnMultiColumns?i.push(r):i=[r]}if(this._options.onBeforeSortCallback)this._options.onBeforeSortCallback(i);s=this._getSortColumns(i);this._onSort(i,s)},i.prototype._onSort=function(n,t){this.onSort(n,t)!==!1&&this.fireCustomEvent(this._element,"sort",[{sortOrder:n,sortColumns:t}])},i.prototype._onCanvasScroll=function(){var n=this._canvas;return this._resetScroll=!0,this._scrollLeft=n.scrollLeft,this._scrollTop=n.scrollTop,this._ignoreScroll||this._redraw(),!1},i.prototype._getClickedCell=function(n){return this.findClosestElement(n.target,".grid-cell")},i.prototype._createEditCellBox=function(n,t,i,r){function e(f){var e=u.value;return i.innerText=e,r?(r(e,n,t),f.stopPropagation(),f.preventDefault(),!1):void 0}var f=i.innerText,u=this.createElementWithClass("input","grid-edit-box");u.setAttribute("type","text");u.setAttribute("value",f);u.addEventListener("focusout",function(n){e(n)});u.addEventListener("keydown",function(n){if(n.keyCode===13)e(n);else if(n.keyCode===27)return i.innerText=f,n.stopPropagation(),n.preventDefault(),!1});i.innerHTML="";i.appendChild(u);u.select();u.focus()},i.prototype._onEditCell=function(n){var e=n.target,t,r,i;if(!e.classList.contains("grid-tree-icon")&&(t=this._getClickedCell(n),t&&t.classList.contains("grid-cell-editable")&&(r=this.getRowInfoFromEvent(n,"."+this._options.rowClass),r))){var u=r.row.children,o=u.length,f=-1;for(i=0;i<o;i++)t===u[i]&&(f=i);this._createEditCellBox(r.dataIndex,f,t,this._editCellCallback)}},i.prototype._onGutterClick=function(n){var t=this.getRowInfoFromEvent(n,".grid-gutter-row");t&&(this._selectedRows&&typeof this._selectedRows[t.rowIndex]=="number"||this._selectRow(t.rowIndex,t.dataIndex))},i.prototype._updateThemeAttributes=function(){var n=Microsoft.Plugin.Theme.getValue("plugin-font-size");this._textFontPx=n.indexOf("px")!==-1?parseInt(n.substring(0,n.indexOf("px"))):n.indexOf("pt")!==-1?Math.round(parseInt(n.substring(0,n.indexOf("pt")))/.75):0},i.EVENT_ROW_EXPANDED_COLLAPSED="rowExpandedCollapsed",i.TYPE_NAME="GridControl",i.MAX_COPY_SIZE=1e3,i.PAYLOAD_SIZE=200,i.EVENT_SELECTED_INDEX_CHANGED="selectedIndexChanged",i.INDENT_PER_LEVEL=16,i.ASCENDING_ARROW="5",i.DESCENDING_ARROW="6",i}(t.Control);i.GridControl=y})(t.Grid||(t.Grid={}));var i=t.Grid})(n.Controls||(n.Controls={}));var t=n.Controls}(Common||(Common={})),function(n){(function(t){(function(n){n[n.Horizontal=0]="Horizontal";n[n.Vertical=1]="Vertical"})(t.GridSplitterDirection||(t.GridSplitterDirection={}));var r=t.GridSplitterDirection,i=function(n){function t(i,r,u){n.call(this,i);this._direction=null;this._minSize=typeof r=="number"&&r>0?r:t._gridSplitterDefaultMinSize;this._callback=u;this.rootElement.contains(t._gridSplitterClass)||this.rootElement.classList.add(t._gridSplitterClass);this._resizerDisplay=document.createElement("div");this._resizerDisplay.className=t._gridSplitterClass+" "+t._gridSplitterResizerClass;this._resizerDisplay.style.position="relative";this._resizerDisplay.style.display="none";this.rootElement.appendChild(this._resizerDisplay);this.rootElement.addEventListener("mousedown",this.onMouseDown.bind(this));this.rootElement.addEventListener("keyup",this.onKeyPress.bind(this))}return __extends(t,n),Object.defineProperty(t.prototype,"direction",{get:function(){return this._direction===null&&(this._direction=this.getSplitterDirection()),this._direction},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gridCSS",{get:function(){return this._gridCSS||(this._gridCSS=this.getParentGridCSS()),this._gridCSS},enumerable:!0,configurable:!0}),t.prototype.getSplitterDirection=function(){var n;return n=this.rootElement.classList.contains(t._gridSplitterVerticalClass)?1:this.rootElement.classList.contains(t._gridSplitterHorizontalClass)?0:this.rootElement.clientWidth>this.rootElement.clientHeight?1:0,n==1?(this._gridIndex=parseInt(this.rootElement.currentStyle.msGridRow,10)-1,this._resizerDisplay.className+=" "+t._gridSplitterClass+"-Vertical"):(this._gridIndex=parseInt(this.rootElement.currentStyle.msGridColumn,10)-1,this._resizerDisplay.className+=" "+t._gridSplitterClass+"-Horizontal"),n},t.prototype.getParentGridCSS=function(){return this.direction===1?this.rootElement.parentElement.currentStyle.msGridRows:this.rootElement.parentElement.currentStyle.msGridColumns},t.prototype.calculateGridInfo=function(){if(this._gridCSS=this.getParentGridCSS(),!this._gridCSS)throw new Error(Microsoft.Plugin.Resources.getErrorString("JSPerf.1019"));if(this._gridCSSParts=this._gridCSS.split(" "),this._gridCSSParts.length>=this._gridIndex&&this._gridIndex>0){var n=this._gridCSSParts[this._gridIndex-1],t=this._gridCSSParts[this._gridIndex];if(n.indexOf("fr")===-1||t.indexOf("fr")===-1)throw new Error(Microsoft.Plugin.Resources.getErrorString("JSPerf.1020"));this._gridCSSTotal=parseFloat(n)+parseFloat(t)}else throw new Error(Microsoft.Plugin.Resources.getErrorString("JSPerf.1021"))},t.prototype.onMouseMove=function(n){var f=this.direction===1?n.pageY:n.pageX,o=this.rootElement.previousElementSibling,i=this.rootElement.nextElementSibling,r=0,u=0,t,e;this.direction===1?(r=o.offsetTop+this._minSize,u=i.offsetTop+i.offsetHeight-this._minSize):(r=o.offsetLeft+this._minSize,u=i.offsetLeft+i.offsetWidth-this._minSize);t=f;f<r?t=r:f>u&&(t=u);this._endPosition=t;e=t-this._startPosition;this.direction===1?this._resizerDisplay.style.top=e+"px":this._resizerDisplay.style.left=e+"px";n.stopImmediatePropagation();n.preventDefault()},t.prototype.onMouseUp=function(n){this._resizerDisplay.style.display="none";this.rootElement.style.removeProperty("background-color");document.body.style.cursor=this._previousCursor;var t=this._endPosition-this._startPosition;this.moveSplitter(t);document.removeEventListener("mousemove",this._mouseMoveListener,!0);document.removeEventListener("mouseup",this._mouseUpListener,!0);n.stopImmediatePropagation();n.preventDefault()},t.prototype.onMouseDown=function(n){this.calculateGridInfo();this._previousCursor=document.body.style.cursor;document.body.style.cursor=this.rootElement.currentStyle.cursor;this._startPosition=this.direction===1?n.pageY:n.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,!0);document.addEventListener("mouseup",this._mouseUpListener,!0);n.stopImmediatePropagation();n.preventDefault()},t.prototype.onKeyPress=function(n){var i,u,f,r;(this.getSplitterDirection()==1?(i=40,u=38):(i=39,u=37),n.keyCode==i||n.keyCode==u)&&(f=n.keyCode==i,r=this.sizePrevious+this.sizeCurrent,r*=f?1:-1,r*=t._gridSplitterArrowMoveRatio,this.calculateGridInfo(),this.moveSplitter(r),n.stopImmediatePropagation(),n.preventDefault())},t.prototype.moveSplitter=function(n){var r=(this.sizeCurrent-n)/(this.sizePrevious+this.sizeCurrent),t;if(r>0&&r<1){var u=(1-r)*this._gridCSSTotal,f=r*this._gridCSSTotal,i="";for(t=0;t<this._gridCSSParts.length;t++)i+=t===this._gridIndex-1?u+"fr":t===this._gridIndex?f+"fr":this._gridCSSParts[t],t<this._gridCSSParts.length-1&&(i+=" ");this.direction===1?this.rootElement.parentElement.style.msGridRows=i:this.rootElement.parentElement.style.msGridColumns=i;this._gridCSS=i;this._callback&&typeof this._callback=="function"&&this._callback()}},Object.defineProperty(t.prototype,"sizePrevious",{get:function(){var n=this.rootElement.previousElementSibling;return this.computeSize(n)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sizeCurrent",{get:function(){var n=this.rootElement.nextElementSibling;return this.computeSize(n)},enumerable:!0,configurable:!0}),t.prototype.computeSize=function(n){return this.direction==1?n.clientHeight:n.clientWidth},t._gridSplitterClass="gridSplitter",t._gridSplitterResizerClass="gridSplitter-Resizer",t._gridSplitterVerticalClass="gridSplitter-Vertical",t._gridSplitterHorizontalClass="gridSplitter-Horizontal",t._gridSplitterDefaultMinSize=100,t._gridSplitterArrowMoveRatio=.02,t}(n.Controls.Control);t.GridSplitterControl=i})(n.Controls||(n.Controls={}));var t=n.Controls}(Common||(Common={}))
//# sourceMappingURL=JSTreeGridControl.min.js.map
�PNG


IHDR$l5��iPLTE������������������������������������������������TTT!x��"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"3�7�#tRNS 0@P`p������������Ͽ����p`P@0 m�7]�IDATx��[s�0��T�T$�F H$��n.��P�>��y`V�f�l2�$�OɎO���`C��-Q0
8t�q!�h�����A�~ÉU
]PP�,.5�Y`t'�ɒ'V�c�p16��B=22z�*�ؼ�:)˷i0�Ch����^H\��/�q�������+ ����mJ�i�̹^P�?��{����������U,|4���ѸG[�.E��&����Ģ~�1���L�ۍG�z4]���1Y�ZLP*������Dep_'a�BIo߼�G�A�S{���|Aۇ6��t��x@'B�Ԕ�X8�$��cZ�Yh�[�T���Ju�Jr�YO��Ru�*}ŴG��4R,��m\�^����.�bӑ;��.IO�t���7���K����VA�S{���|Aۇ��5cNQ�l�IEND�B`��PNG


IHDR$l5��	pHYs����k�gAMA���a�PLTE?????????CCCBBBBBBBBBAAAAAAAAAAAAAAABBBBBBBBBBBBUUU"x�"y�"x�!y�!x�!x�!y�!y�"x�"z�#y�#w�z�w��������������������������������������������������"y���10tRNS 0@P`p����������Ͽ����p`P@0  0@P`p��������	sRGB��, cHRMz&�����u0�`:�p��Q<�IDATx���m�� `*+�޶L���ܲ������Ȍf�a���'<�2�����P�}:�ԚL6�mܭ5��t]7����$_�3�ժ>���ο3S�P#�tXK|}}�ŀi(yػ�">o��^H�.���c� +�� E�c�4�F
�r8�&�$���F�cS��Xd^E�|�WрU��BM�����t�4���LL3�I��M����T�b�:�4�&ź�I�X��ū{������5`�j��2>0���a��F��K4�k2��K�ա�8|l�v]��z�o0V��q��U;0N%=��P�Pk�\XK|�^y1`J���(f_��u�i�1K~��(�\Q���hC�Ñ<Y%9�D�����V��W��z�T�%G�#��PVU��a��]@��,\�<;/Q^6�Z٫�,*QGG�N�b��U>�f�a���*���a��DmY�ڶ�����3���{ޒ����7���՛�3�x<�G]�s6?���Չw2;���'P],&M�X��O���ح�*v�B��]�b�^1bI�TP����w>�/PHЕ"�$?\9�#}��#��#�y"���|3�v!�N��|uS:bzv<��
b^�3V�+y^��)�U���]���,*Qa"+��M�����~��gw���b{MJ-����]��~Xq����/�!�ܝ΀:IEND�B`��PNG


IHDR$l5��	pHYs����k�gAMA���a�PLTE?????????CCCBBBBBBBBBAAAAAAAAAAAAAAABBBBBBBBBBBBUUU"x�"y�"x�!y�!x�!x�!y�!y�"x�"z�#y�#w�z�w��������������������������������������������������"y���10tRNS 0@P`p����������Ͽ����p`P@0  0@P`p��������	sRGB��, cHRMz&�����u0�`:�p��Q<�IDATx�Քٖ�@�QQ�qADT�F\@|����PI�8}NOnJ×?K-��o6k�T�!�ע6C�1ck��|(dt��k�i��hk$a�g���Rc`�Ny&P����155C���0 ��4n�9FD�`�l��Ua�	,^Ɯs
��QhJ�a%M�队%�f�c�HOd,c�3![5&B��٥F��L�4��ꢳbi5���I(�
6���=ń��GC�Q�pf�.��b`s��R������j��S��'K��j�����	o���|��2fk?Z[테Ǿ-׾ﻌ�w�yf9ll!������?�SSk��
�P��{H�6�cG�@
��I/P�`igɜ+
�ZShC�a�M�队%�f�c�Hr�-�	�Vm�P%�t��-(�9�=:����~���s\�
�`g宖�P	u�ڏ�'����y]9��ֽ����'T��SAߓ�}��؛�DI��'�KQ2�O��o��I���v����*>��^�ԑ��:P�	���#PMV��	d��P��.�����+�>�2������K;L��KJt�PJ�a�oQM9�b�|����4ӱ	;R��.�#�{�J�Rq�A:��Yy����TY��Sv���J��h'^�2JI��D���k�f�IӞ���Sg����=Xy?è��O�_��PxH�IEND�B`��PNG


IHDR((&�p�	pHYs����k�gAMA���asRGB��, cHRMz&�����u0�`:�p��Q<*IDATx�Ֆ�kSa��{�e�&�66��� $���AqQ̐�	��"���fq*]ttrh�Dqrr�H��"��I��(�֟CR{c�&���������c�.LN��D���ŷ]r��QD	�4��"u�=ȯˑ���?mE��"G�Y%�n `)g�Y;��
��,_��H���0�Ηc���y�/�1c�a�Y�۫v0�2��=B<#o�s�;g��HI.�
6����.���t9�Qް�:�y�d��b%J�UĪ�%�sf:E8���I�5>P,����ѥ�b�M���ܣ�{_�0Iݒ-�Cm���p���5{����yl��}B!D���e��&+�u;_�c���-�{�B<��V��
���f�l�?��EN��>u�s,2��2
��%��l���Np#��
$������f`��0�x������
U�T�.!���V ���C
��ݿl^{��	�5)��k~
xx�a����
������	9*�!���|J*��\E�*R����UD)�jB�uP�ӄ�VZ%���z����.K+�fIEND�B`��PNG


IHDR((&�p�	pHYs��(J�gAMA���asRGB��, cHRMz&�����u0�`:�p��Q<�IDATx���+Da����!5��a1��,�,dMJf�?`�����R,Dr�ǚb#5J��ʷLj��k�QC�^�➳y�9��=���=99��o��ݞ�8�49�nK�� \��l�_��T�v�q��}|���Q��P�z�q�mz��"�E�y��p�Q��ef,vVc��<�/����mpc�O��q&
.���2�%x���1�k�/�3�s��:(�����N�	��Ei�
�[yav	r�W�;a�<;���k� �$�p_6���$Tx
�=�Թ�&=��A)0�1T��%�e��g���8P�~���$W���ǒϻFeܬ0�j}��F���������,��Hc���k-��n90�Na9y�Q珗�eg�1=ao�&IEND�B`��PNG


IHDR((&�p�	pHYs��(J�gAMA���asRGB��, cHRMz&�����u0�`:�p��Q<�IDATx��MHTQǟ83~[~��MJ�B�oB)��q1��BZM."k#n""i��0d6A;Iچd`B�0
��b6��R��E�>5���sw�{��9�{�����@�)
�I�	Q�l��VB��xH�T�����V"$1���GR��9N*b�-l�3�3��|���0s��0�2�]i�z����6q���R�X�0Gg��QS��'�M�������aNnɁC�O	l&�[�D�b��m����ب�R��^��M~Yԑ�fdW��
��$��\pcc��bX&��m?� �,�
7
)`�G�I�UU}�F#����]!V1Ի�`��ax�˲,]Q�w�w�&�p�k�eYڧa
kD�NhX���3��cs�tx
-��n3̦
���hJ!�l� ��|x]�،s�P��1��%��.^�� E��ӧ�b�J���P+��I��t`�Q!OHaX��亽���7	�ҿs,P"u��J�Ƙ��vޔ�ElRL2HH:����eϸ]u-;p�.���a�U�X"�&�(d\�ݿ(��^>��͈�� AbdT:2y�|r���t�(ՔX��JБ��|FȿV/֎|���h��V;QlG-�u�Ev0�@f��#�QG{brG�'w _K��k�;���Ɂ��/�i!�T��$W���|J�t��NA�Y�?�h����RIEND�B`��PNG


IHDR((&�p�	pHYs��(J�gAMA���asRGB��, cHRMz&�����u0�`:�p��Q<�IDATx��MHTQ�o96c~�
2�AE��jP#2	2�M�
B�X�6d�A��-
B��;?���$�"jS-��`Im&F���9�h��v޻�����ιJm���L��6���l�
e?~9/���i*)3s�ssXn1����a�g]8vr�	��ĉ`a��9�7]���`� ��4c`��ޣ�3NcFH3�kDЄ	r��$�K�/!b��>�j��&L@
�=Ĉ3�8�xy�s��v��,Wl+��OBh�0f�j,<gW��@ӕbech��s$b��f���+��zY�r�<��fR����������7~'��K9��RXIQ������:�>����	1�F�k�����Z��2�f�Y�<�J�L�!PriFcqq��x�&N�Jg�9B���w5 A3D�3��'$��$��W)�.�o48����fJN�DJ!�h��@�C��z������J�.�$lK�u8�9��GM�~Z�~�r��� ���Qj�w�rn�	fy�c|��D���|C��X�qBi�c�t�!_S�Ig�R%�$H���	v�.)NC�g�T���gi�JA�iȊ���mt0�bJ,kpm��V
r�:Ǻ\9���Lt�*�#%��G+�Z�&3>-qo��#E����U
��6�b:���,�R�<Jų����= #E��$IIEND�B`��PNG


IHDR((&�p�	pHYs��(J�gAMA���asRGB��, cHRMz&�����u0�`:�p��Q<�IDATx��MHTQǯ83����jjSD�R�PAAޜ߄.R�q��	�i!��Edm�MD -���	�E��6$rf�a0C1�L��ۢ��_�{��<g{��=�)ub�т^����P����2�%@�D��i�s�~i	�3���%���gH�Q�8if�uv����,��;l�A�F�{�K6�d��tK�tJ/wxM���r���q6�,3j����yF�`�&bx��>��,�59pH�����\tZn�Yv�2(���e�<?%n���WF9,&�����W�q"c��Ѭ)�Q?cl�*W���	4�M)��>s���d�t:�`�L�y���2��z����v��RJ��ͻ{�5�J�Y�`Ѩ9��ӏ�;�E�R�ۤ�ՙ/K����g49�x�<e�<#Ru�NL�IH����.���~�y4)����m��8_�d�fc�X�^:�"_؍I����i��X�c���%L�'|ڳnSb:.;t�!�f�,k��cM��
���/�GZ$�;23�tI��
����g�'縊0���J�R◈-K�W�?R/�lW>1Iې	�)�X�^��'~$2̊
�F�E�	�x�rC����!_H]�4w'�@�ҁ��.��X���/f�9&\!�S�P���r�V'��'IEND�B`��PNG


IHDR((&�p�	pHYs��(J�gAMA���asRGB��, cHRMz&�����u0�`:�p��Q<}IDATx��OHTQ�o96c��%1�A���?ԠFddT�l
B�X�5d���n�mi�Χa�@��\Dmʠœ�!�����d&u�O�����;|�s��{��<��X�ky���@��ABrA:��3TSn����a���&̾u���&Y@�"���O4��hy���a�d�Z	����G�b�fWH�����ĈRi����$��n�W�41"R��?	�K�Cƹ��G,2O�l_�[$(�h�	V�Zl��g-�a�S�F"��h�h��㧏E>�a��]4SrL)�8G8��QDH�I���y)��R
{Y�iK{��3�zs�PJ)�r3�\G��C3)9�i%n�BZ��\�Q=��Qm&��$p����d�0�f� Op��"����r�7�L;��f����S+�RB���4Qh��I/	4Ӵdny�O�XZB�h�t�P�	4qi���i��d�*Ǩ3�8��s�c�q>�%|�@���|*8AV�$�"�Y��Ժ��e��y�2�np���GJ��.�JY��O���>� J"Y���u]̲���:<Cz������X�9���q��5�]��<^����et��3	�E4#����n&�t3%y�)�E���ڛ��C���IEND�B`�var __n=window.__n||function(){},__extends,__rpcLog,F12,Common,Microsoft,pluginGetString,Plugin;
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){"use strict";var i=function(){function i(){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),"plugin.host.telemetrylogging":this.createNewTelemetryLoggingService.bind(this)}}return i.prototype.addAriaTabName=function(){var n=document.getElementsByTagName("html"),t;n.length>0&&(t=n[0],this._manifest&&this._manifest.f12&&typeof this._manifest.f12.localized_tab_resource=="string"&&t.setAttribute("aria-label",Microsoft.Plugin.Resources.getString(this._manifest.f12.localized_tab_resource,"")))},i.prototype.addHostCss=function(){var n=document.createElement("link"),r;n.type="text/css";n.setAttribute("data-plugin-theme","true");n.setAttribute("data-necessary-for-tooltip","true");n.setAttribute("data-plugin-theme-href",t.Impl.Theme._hostFilePrefix+"theme/f12.css");(document.head||document.body).appendChild(n);r=document.getElementsByTagName("html");r.length>0&&r[0].classList.add(i.F12ClassName);document.addEventListener("focusin",function(){t.ExternalApis.notifyOnBrowserActivated()},!0)},i.prototype.loadManifest=function(){var n=t.Impl.Storage.readPluginFile("manifest.json");return JSON.parse(n)},i.prototype.onLoaded=function(){var n=this;Common.blockBrowserAccelerators();this.addHostCss();this._manifest=this.loadManifest();this._f12Extensions=new t.Impl.F12Extensions;Microsoft.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();this.registerZoomEvent();window.setTimeout(function(){n.loadModule("plugin.host.core").setControlReady(n._manifest)},0)},i.prototype.createNewActivityLogService=function(){return new t.Impl.ActivityLog},i.prototype.createNewCodeMarkersService=function(){return new t.Impl.CodeMarkers},i.prototype.createNewContextMenuService=function(){return new t.Impl.ContextMenu},i.prototype.createNewCoreService=function(){return new t.Impl.Core},i.prototype.createNewCultureService=function(){return new t.Impl.Culture},i.prototype.createNewDiagnosticsService=function(){return new t.Impl.Diagnostics},i.prototype.registerZoomEvent=function(){var t=this;this._f12Extensions.addEventListener("zoomevent",function(i){if(n.Host.ExternalApis.isSelectedTool){var r=null;n.Host.ExternalApis.pluginId===3&&(r=document.getElementById("hEditorConsoleSplitter"));t._f12Extensions.ZoomDisplay.show(i.zoomLevel,1200,r)}return})},i.prototype.getFileAliasesService=function(){return this._filealiases||(this._filealiases=new t.Impl.FileAliases),this._filealiases},i.prototype.loadModule=function(n){var t=this._modules[n];return typeof t=="function"&&(this._modules[n]=t=t()),t},i.prototype.triggerContextMenuEvent=function(n,t){this.loadModule("plugin.host.contextmenu").triggerContextMenuEvent(n,t)},i.prototype.createNewHostService=function(){return new t.Impl.Host},i.prototype.createNewOutputService=function(){return new t.Impl.Output},i.prototype.createNewResourcesService=function(){return new t.Impl.Resources},i.prototype.createNewSettingsService=function(){return new t.Impl.Settings},i.prototype.createNewStorageService=function(){return new t.Impl.Storage},i.prototype.createNewThemeService=function(){return new t.Impl.Theme},i.prototype.createNewTooltipService=function(){return new t.Impl.Tooltip},i.prototype.createNewTelemetryLoggingService=function(){return new t.Impl.TelemetryLogger},i.F12ClassName="hostedF12",i}();t.PluginHost=i})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=function(){function t(){}return t.main=function(){t.pluginHost=new n.PluginHost},t}();n.App=t})(t=n.Host||(n.Host={}))})(F12||(F12={}));F12.Host.App.main();window.loadModule=F12.Host.App.pluginHost.loadModule.bind(F12.Host.App.pluginHost);
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t){var r=this,i,u,e,f,o;this._resizeDebounceLastDate=null;this._resizeEventListener=function(){};this._keyPressEventListener=function(){};this._anchorElement=null;i=document.createElement("div");i.id="f12HostMessageBox";i.className="f12HostMessageContainer";i.tabIndex=0;i.innerHTML="<div class='f12HostMessageInnerContainer'>                                <div id='f12HostMessageHelp' class='f12HostCmdIcon' tabindex='0' role='button'><\/div>                                <div id='f12HostMessageClose' class='f12HostCmdIcon' tabindex='0' role='button'><\/div>                                <div id='f12HostMessageIcon'><\/div>                                <div id='f12HostMessageText'><\/div>                            <\/div>";i.addEventListener("keydown",function(n){return!n.ctrlKey&&!n.shiftKey&&!n.altKey&&n.keyCode===27?(r.close(),!1):!0});this._messageBoxElement=i;this._anchorElement=t;n.appendChild(i);this._resizeEventListener=this.resize.bind(this,!1);u=document.getElementById("f12HostMessageHelp");e=Microsoft.Plugin.Resources.getString("/Common/HelpButtonTooltip");u.setAttribute("aria-label",e);u.setAttribute("data-plugin-vs-tooltip",e);u.addEventListener("click",function(){return r.showHelpLink()});u.addEventListener("keydown",function(n){return n.keyCode===13||n.keyCode===32?(r.showHelpLink(),!1):!0});f=document.getElementById("f12HostMessageClose");o=Microsoft.Plugin.Resources.getString("/Common/CloseButtonTooltip");f.setAttribute("aria-label",o);f.setAttribute("data-plugin-vs-tooltip",o);f.addEventListener("click",function(){return r.close()});f.addEventListener("keydown",function(n){return n.keyCode===13||n.keyCode===32?(r.close(),!1):!0});this._messageIconElement=document.getElementById("f12HostMessageIcon");this._messageElement=document.getElementById("f12HostMessageText");this._resizeDebounceLastDate=new Date;this._keyPressEventListener=this.onHelpKeyPressed.bind(this)}return Object.defineProperty(n.prototype,"messageText",{get:function(){return this._messageText},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"helpUri",{get:function(){return this._helpUri},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isShown",{get:function(){return this._messageBoxElement.style.display==="block"},enumerable:!0,configurable:!0}),n.prototype.showWithDocUrl=function(n,t,i,r,u,f,e){var o=document.createElement("div"),s;o.innerHTML='(<a href="#"><\/a>)';s=o.children[0];s.innerText=u+":"+f+":"+e;s.onclick=function(){Common.ProjectDocuments.showDocument(encodeURI(u),f,e)};this.show(n,t,i,r);this._messageElement.appendChild(o)},n.prototype.show=function(n,t,i,r){var f=this,u;window.addEventListener("resize",this._resizeEventListener);this._messageText=n;this._helpUri=null;this._messageElement.innerText=n;typeof t=="number"&&t>0?this._timeoutId=window.setTimeout(function(){return f.close()},t):(this._timeoutId&&window.clearTimeout(this._timeoutId),this._timeoutId=null);u=document.getElementById("f12HostMessageHelp");typeof i=="string"&&i.length>0?(this._helpUri=i,u.style.display="block",Microsoft.Plugin.F12.addEventListener("browsershortcut",this._keyPressEventListener)):(this._helpUri=null,u.style.display="none");r?this._messageIconElement.classList.add("info"):this._messageIconElement.classList.remove("info");this._messageBoxElement.style.display="block";this.resize(!0)},n.prototype.close=function(){this._timeoutId&&(window.clearTimeout(this._timeoutId),this._timeoutId=null);window.removeEventListener("resize",this._resizeEventListener);this._helpUri!==null&&Microsoft.Plugin.F12.removeEventListener("browsershortcut",this._keyPressEventListener);this._messageBoxElement.style.display="none";this._messageText=null;this._helpUri=null},n.prototype.resize=function(t){var i=Date.now();(t||i-this._resizeDebounceLastDate>n.ResizeDebounceThreshold)&&(this.setupPosition(),this._resizeDebounceLastDate=i)},n.prototype.onHelpKeyPressed=function(n){return n.keyCode===112?(this.showHelpLink(),!1):!0},n.prototype.setupPosition=function(){var i=this._messageBoxElement.offsetWidth,r=window.innerWidth,u=this._messageBoxElement.offsetHeight,f=window.innerHeight,e=(r-i)/2,n=f,t;this._anchorElement&&this._anchorElement.style.display!=="none"&&(n=this._anchorElement.getBoundingClientRect().top);t=parseInt(window.getComputedStyle(this._messageBoxElement).boxShadow);isNaN(t)&&(t=0);n=n-u-t;this._messageBoxElement.style.top=n+"px";this._messageBoxElement.style.left=e+"px"},n.prototype.showHelpLink=function(){typeof this._helpUri=="string"&&this._helpUri.length>0&&Microsoft.Plugin.F12.openBrowser(this._helpUri)},n.ResizeDebounceThreshold=100,n}();n.MessageAlert=t})(t=n.Impl||(n.Impl={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t){var r=this,i;this._anchorElement=null;this._keyPressEventListener=function(){};i=document.createElement("div");i.id="f12HostZoomBox";i.className="f12HostZoomContainer";i.innerHTML="<div>                                <div id='f12HostZoomMessageBold' class='f12HostZoomMessageBold'><\/div>                                <div id='f12HostZoomMessage' class='f12HostZoomMessageNotBold'><\/div>                            <\/div>";i.addEventListener("keydown",function(n){return!n.ctrlKey&&!n.shiftKey&&!n.altKey&&n.keyCode===27?(r.close(),!1):!0});this._zoomBoxElement=i;this._anchorElement=t;n.appendChild(i)}return Object.defineProperty(n.prototype,"isShown",{get:function(){return this._zoomBoxElement.style.display==="block"},enumerable:!0,configurable:!0}),n.prototype.show=function(n,t){var r=this,u=document.getElementById("f12HostZoomMessageBold"),i=document.getElementById("f12HostZoomMessage");u.innerText=Microsoft.Plugin.Resources.getString("/Common/ZoomDialogCurrentLevel",n);i.innerText=Microsoft.Plugin.Resources.getString("/Common/ZoomDialogShortcutInfo");i.style.display=n!==100?"":"none";typeof t=="number"&&t>0?(this.removeTimer(),this._timeoutId=window.setTimeout(function(){return r.close()},t)):this._timeoutId=null;this.setupPosition();this._zoomBoxElement.style.display="block"},n.prototype.close=function(){this.removeTimer();this._zoomBoxElement.style.display="none"},n.prototype.removeTimer=function(){this._timeoutId&&(window.clearTimeout(this._timeoutId),this._timeoutId=null)},n.prototype.setupPosition=function(){var u=window.innerWidth,t=window.innerHeight,i,r;this._anchorElement&&this._anchorElement.style.display!=="none"&&(t=this._anchorElement.getBoundingClientRect().top);i=(u-n.DIALOG_WIDTH)/2;r=(t-n.DIALOG_HEIGHT)/2;this._zoomBoxElement.style.top=r+"px";this._zoomBoxElement.style.left=i+"px"},n.DIALOG_WIDTH=180,n.DIALOG_HEIGHT=80,n}();n.ZoomAlert=t})(t=n.Impl||(n.Impl={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";n.ExternalApis=window.__externalApis||window.external||{}})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){"use strict";var t=function(){function n(){this._listeners={}}return n.prototype.addEventListener=function(n,t){if(this._listeners.hasOwnProperty(n)||(this._listeners[n]=[]),this._listeners[n].push(t),this._queuedEvents&&this._queuedEvents[n]){var i=this._queuedEvents[n];this._queuedEvents[n]=null;this.dispatchEvent(n,i)}},n.prototype.removeEventListener=function(n,t){var r,i;if(this._listeners.hasOwnProperty(n)){for(r=[],i=0;i<this._listeners[n].length;i++)this._listeners[n][i]!==t&&r.push(this._listeners[n][i]);this._listeners[n]=r}},n.prototype.dispatchEvent=function(n,t,i){var s=!1,f=this._listeners[n],e,r,u,o;if(f){if(e=document.createEvent("Event"),t)for(r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);for(u=0;u<f.length;u++)o=f[u](e),typeof o=="undefined"||o||(s=!0)}else i&&(this._queuedEvents||(this._queuedEvents={}),this._queuedEvents[n]=t);return s},n}();n.EventManager=t})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){"use strict";var h,c,t,r,u,f,i,e,o,s;(function(n){n[n.none=0]="none";n[n.portCreated=1]="portCreated";n[n.portClosed=2]="portClosed";n[n.portConnected=3]="portConnected";n[n.controlInitialized=4]="controlInitialized";n[n.hostReady=5]="hostReady";n[n.event=6]="event";n[n.error=7]="error";n[n.initiateShutdown=8]="initiateShutdown";n[n.shutdownComplete=9]="shutdownComplete"})(n.controlCommands||(n.controlCommands={}));h=n.controlCommands,function(n){n[n.connected=0]="connected";n[n.disconnected=1]="disconnected";n[n.closed=2]="closed"}(n.ScriptedHostPortState||(n.ScriptedHostPortState={}));c=n.ScriptedHostPortState;t=function(){function n(){this.supportedForProcessing=!1;this.NONE=0;this.CAPTURING_PHASE=1;this.AT_TARGET=2;this.BUBBLING_PHASE=3}return Object.defineProperty(n.prototype,"currentTarget",{get:function(){return this.target},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"defaultPrevented",{get:function(){return this._preventDefaultCalled},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isTrusted",{get:function(){return!1},enumerable:!0,configurable:!0}),n.prototype.stopPropagation=function(){},n.prototype.preventDefault=function(){this._preventDefaultCalled=!0},n.prototype.stopImmediatePropagation=function(){this._stopImmediatePropagationCalled=!0},n.prototype.initEvent=function(){},n}();n.CustomEvent=t;r=function(){function n(n,t){this._manager=n;this._tokenId=t}return n.prototype.unblockControlReadyEvent=function(){this._manager.unblockControlReadyEvent(this._tokenId)},n}();n.DelayControlReadyToken=r;u=function(n){function t(t){n.call(this);this._manager=t}return __extends(t,n),t.prototype.delayControlReadyEvent=function(){var n=this._manager.delayControlReadyEvent();return new r(this._manager,n)},t}(t);n.BeforeControlReadyEventArgs=u;f=function(n){function t(t,i,r,u){n.call(this);this.message=t;this.replyRequested=i;this._port=r;this._messageId=u}return __extends(t,n),t.prototype.reply=function(n){this._port.reply(this._messageId,n)},t.prototype.reportError=function(n){this._port.reportError(this._messageId,n)},t}(t);n.PortMessageEventArgs=f;i=function(){function n(){}return n.prototype.addEventListener=function(n,t){var i,r,u,f;for(this._listeners=this._listeners||{},i=this._listeners[n]=this._listeners[n]||[],r=0,u=i.length;r<u;r++)if(f=i[r],f.listener===t)return;i.push({listener:t})},n.prototype.removeEventListener=function(n,t){var i=this._listeners&&this._listeners[n],r,u,f;if(i)for(r=0,u=i.length;r<u;r++)if(f=i[r],f.listener===t){i.splice(r,1);i.length===0&&delete this._listeners[n];break}},n.prototype.dispatchEvent=function(){return!1},n.prototype.dispatchEventInternal=function(n,t){var i=this._listeners&&this._listeners[n],u,r,f;if(i){for(u=t,i=i.slice(0,i.length),r=0,f=i.length;r<f;r++)i[r].listener(this,u);return u.defaultPrevented||!1}return!1},n}();n.CustomEventTarget=i;e=function(n){function t(t,i,r){n.call(this);this._manager=t;this._portName=i;this._portId=r;this._portState=1}return __extends(t,n),Object.defineProperty(t.prototype,"state",{get:function(){return this._portState},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._portName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this._portId},enumerable:!0,configurable:!0}),t.prototype.connect=function(){this._portState===1&&this._manager.registerPort(this)},t.prototype.postMessage=function(n){this._portState===0&&this._manager.postPortMessage(this._portId,n)},t.prototype.close=function(){this._portState!==2&&(this._portState=2,this._manager.unregisterPort(this),this._manager=null,this.dispatchEventInternal("close",document.createEvent("Event")))},t.prototype.processMessage=function(n,t,i){if(this._portState===0){var r=new f(t,i,this,n);this.dispatchEventInternal("message",r)}},t.prototype.processConnect=function(){this._portState!==2&&(this._portState=0,this.dispatchEventInternal("connected",document.createEvent("Event")))},t.prototype.processDisconnect=function(){this._portState!==2&&(this._portState=1)},t.prototype.reply=function(n,t){this._portState!==2&&this._manager.postMessageReply(this._portId,n,t)},t.prototype.reportError=function(n,t){this._portState!==2&&this._manager.postMessageErrorReply(this._portId,n,t)},t}(i);n.Port=e;o=function(n){function t(t,i){n.call(this);this._port=t;this._extension=i;this._isInitialized=!1;typeof i.initialize=="function"&&i.initialize(this);this._port.addEventListener("connected",this.onConnected.bind(this));this._port.addEventListener("message",this.onMessage.bind(this))}return __extends(t,n),t.prototype.fireEvent=function(n,t){var i={eventName:n,arg:t};this._port.postMessage(JSON.stringify(i))},t.prototype.onConnected=function(){this._isInitialized||(this._isInitialized=!0);this.dispatchEvent("PortConnected")},t.prototype.onMessage=function(n,t){var i,e;try{var o=t.message,r=JSON.parse(o),u=r.method,f=this._extension[u];if(typeof f=="function")i=f.apply(this._extension,r.args),t.replyRequested&&(i&&typeof i.then=="function"?i.then(function(n){var i={result:n};t.reply(JSON.stringify(i))},function(n){t.reportError(n)}):(e={result:i||""},t.reply(JSON.stringify(e))));else throw new Error("Unknown method: "+u)}catch(s){t.replyRequested&&t.reportError(s)}},t}(n.EventManager);n.PortMarshaller=o;s=function(n){function t(t){n.call(this);this._lastMessageId=0;this._lastPortId=1;this._registeredPorts={};this._registeredPortNames={};this._pendingRemotePorts={};this._controlReadyWaitTaskList={length:0};this._lastDelayControlReadyTokenId=0;this._postMessageToPlugin=t}return __extends(t,n),t.prototype.processMessage=function(n){var e=n.indexOf(t.MessageHeaderDelimiter),o,s=null,i,r,f,h;if(e<0?o=n:(o=n.substring(0,e),s=n.substring(e+1)),i=JSON.parse(o),i.portId>t.DefaultPort)if(this._registeredPorts[i.portId])this._registeredPorts[i.portId].processMessage(i.msgId,s,i.replyRequested);else throw new Error("OnMessage: Unknown portId: "+i.portId);else switch(i.command){case 4:this._pendingRemotePorts={};this.disconnectPorts();this._controlReadyWaitTaskList={length:0};this.dispatchEventInternal("BeforeControlReady",new u(this));this._controlReadyWaitTaskList.length===0&&this.fireControlReady();break;case 1:if(!i.args||i.args.Length<=0)throw new Error("OnMessage: Invalid message header for command PortCreated.");if(r=i.args[0],typeof r!="string"||r.length<=0)throw new Error("OnMessage: Invalid message header for command PortCreated.");if(this._registeredPortNames[r])this.connectPort(r);else{if(this._pendingRemotePorts[r])throw new Error("Received connect event for the same port more than once.");this._pendingRemotePorts[r]||(this._pendingRemotePorts[r]={})}break;case 2:if(!i.args||i.args.Length<=0)throw new Error("OnMessage: Invalid message header for command PortClosed.");if(f=i.args[0],typeof f!="string"||f.length<=0)throw new Error("OnMessage: Invalid message header for command PortClosed.");if(this._registeredPortNames[f])h=this._registeredPortNames[f],this.disconnectPort(h._portId);else{if(!this._pendingRemotePorts[f])throw new Error("Received close event before a create event.");delete this._pendingRemotePorts[f]}break;case 9:this.dispatchEventInternal("ControlShutdown",document.createEvent("Event"));break;default:throw new Error("OnMessage: Unexpected command: "+i.command)}},t.prototype.delayControlReadyEvent=function(){var n=this._lastDelayControlReadyTokenId++;return this._controlReadyWaitTaskList[n]=!0,this._controlReadyWaitTaskList.length++,n},t.prototype.unblockControlReadyEvent=function(n){this._controlReadyWaitTaskList[n]&&(this._controlReadyWaitTaskList[n]=null,this._controlReadyWaitTaskList.length--,this._controlReadyWaitTaskList.length===0&&this.fireControlReady())},t.prototype.registerPort=function(n){var t=this;if(this._registeredPorts[n.id])throw new Error("RegisterPort: Port already exists.");if(!this._registeredPortNames[n.name])throw new Error("RegisterPort: Port name is not listed.");this._registeredPorts[n.id]=n;this._registeredPortNames[n.name]=n;this._pendingRemotePorts[n.name]&&window.setImmediate(function(){t._pendingRemotePorts[n.name]&&(delete t._pendingRemotePorts[n.name],t.connectPort(n.name))})},t.prototype.unregisterPort=function(n){if(!this._registeredPorts[n.id])throw new Error("UnregisterPort: Port does not exist.");if(!this._registeredPortNames[n.name])throw new Error("UnregisterPort: Port name does not exist.");delete this._registeredPorts[n.id];delete this._registeredPortNames[n.name];this._pendingRemotePorts[n.name]={};this.postMessageInternal(t.DefaultPort,2,[n.id])},t.prototype.postPortMessage=function(n,t){this.postMessageInternal(n,0,null,t)},t.prototype.postMessageReply=function(n,t,i){this.postMessageInternal(n,0,null,i,t)},t.prototype.postMessageErrorReply=function(n,t,i){this.postMessageInternal(n,7,[{message:i.message,stack:i.stack}],null,t)},t.prototype.createPort=function(n){var t=this._lastPortId++,i=new e(this,n,t);return this._registeredPortNames[n]={},i},t.prototype.fireEvent=function(n,i){if(typeof n!="string"||n.length<=0)throw new Error("Invalid eventName");if(n.indexOf(t.MessageHeaderDelimiter)>0)throw new Error("eventName cannot contain "+t.MessageHeaderDelimiter);this.postMessageInternal(t.DefaultPort,6,[n,i])},t.prototype.initiateShutdown=function(){this.postMessageInternal(t.DefaultPort,8)},t.prototype.connectPort=function(n){var i,r;if(!this._registeredPortNames[n])throw new Error("ConnectPort: Port does not exist.");if(i=this._registeredPortNames[n],i.state!==1)throw new Error("ConnectPort: Port state is unexpected.");r=[i.id,i.name];this.postMessageInternal(t.DefaultPort,3,r);i.processConnect()},t.prototype.disconnectPort=function(n){if(!this._registeredPorts[n])throw new Error("DisconnectPort: Port does not exist.");var t=this._registeredPorts[n];if(t.state!==0)throw new Error("DisconnectPort: Port state is unexpected.");t.processDisconnect()},t.prototype.disconnectPorts=function(){var t,n;for(t in this._registeredPorts)n=this._registeredPorts[t],n&&n.portId&&n.processDisconnect()},t.prototype.postMessageInternal=function(n,i,r,u,f){var e={msgId:++this._lastMessageId,portId:n},o;typeof f=="number"&&(e.replyId=f);e.command=i;r&&(e.args=r);o=JSON.stringify(e);typeof u=="string"&&(o+=t.MessageHeaderDelimiter+u);this._postMessageToPlugin(o)},t.prototype.fireControlReady=function(){this.postMessageInternal(t.DefaultPort,5);this.dispatchEventInternal("ControlReady",document.createEvent("Event"))},t.DefaultPort=0,t.MessageHeaderDelimiter="$",t}(i);n.CommunicationManager=s})(t=n.Host||(n.Host={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(t){"use strict";(function(n){n[n.Local=2]="Local";n[n.Host=3]="Host"})(t.ResourceLocation||(t.ResourceLocation={}));var r=t.ResourceLocation,i=function(){function t(){}return t.prototype.closeFile=function(n){return new Microsoft.Plugin.Promise(function(i,r){try{t.StorageDispatch.closeFile(n);i()}catch(u){r(u)}})},t.prototype.deleteFile=function(n){return new Microsoft.Plugin.Promise(function(i,r){try{t.StorageDispatch.deleteFile(n);i()}catch(u){r(u)}})},t.prototype.fileDialog=function(n,i,r){var u=[];return r&&u.push(r.encoding),new Microsoft.Plugin.Promise(function(r,f){try{var e=null;switch(n){case 0:e=t.StorageDispatch.showOpenFileDialog(i.name,u,i.extensions);break;case 1:e=t.StorageDispatch.showSaveFileDialog(i.name,u,i.extensions);break;default:throw new Error("Invalid dialog mode")}r(e)}catch(o){f(o)}})},t.prototype.getFileList=function(n,i,r,u){return i===void 0&&(i=1),r===void 0&&(r=0),u===void 0&&(u=0),new Microsoft.Plugin.Promise(function(f,e){try{var o=t.StorageDispatch.getFileList(n,i,r,u);f(o)}catch(s){e(s)}})},t.prototype.openFile=function(n,i){return new Microsoft.Plugin.Promise(function(r,u){try{var f=t.StorageDispatch.openFile(n,i.access,i.encoding,i.mode,i.persistence,typeof i.type!="undefined"?i.type:1);r(f)}catch(e){u(e)}})},t.prototype.seek=function(n,i,r){return new Microsoft.Plugin.Promise(function(u,f){try{var e=t.StorageDispatch.seek(n,i,r);u(e)}catch(o){f(o)}})},t.prototype.read=function(n,i,r){return new Microsoft.Plugin.Promise(function(u,f){try{var e;switch(r){case 0:e=t.StorageDispatch.readBinaryToByteArray(n,i);break;case 1:e=t.StorageDispatch.readText(n,i);break;default:throw new Error("Unsupported File Type")}u(e)}catch(o){f(o)}})},t.prototype.write=function(n,i,r,u,f){return new Microsoft.Plugin.Promise(function(e,o){try{switch(f){case 0:t.StorageDispatch.writeBinaryFromByteArray(n,i,r,u);break;case 1:t.StorageDispatch.writeText(n,i,r,u);break;default:throw new Error("Unsupported File Type")}e()}catch(s){o(s)}})},t.getPluginRelativePath=function(n){var f=document.createElement("a"),i,t;f.href=n;i=f.pathname.replace(/\//g,"\\");f.href=document.location.href;var s=f.pathname.replace(/\//g,"\\"),h=i.substr(0,i.lastIndexOf("\\")),c=s.substr(0,s.lastIndexOf("\\")),r=h.split("\\"),e=c.split("\\"),o=[],l=Math.max(r.length,e.length),u=0;for(t=0;t<l;t++)if(r[t]===e[t])u++;else break;if(e.length>u)for(t=u;t<e.length;t++)o.push("..");if(r.length>u)for(t=u;t<r.length;t++)o.push(r[t]);return o.push(i.substr(i.lastIndexOf("\\")+1)),o.join("/")},t.getResourceIdFromRelativePath=function(n){var t=n.replace(/\\/g,"/");return t.length>0&&t[0]==="/"&&(t=t.substr(1)),t},t.readHostFile=function(n){try{return t.StorageDispatch.readResourceText(n,3)}catch(i){return null}},t.readPluginFile=function(n,i){try{return i?t.StorageDispatch.readResourceBinaryToBase64(n,2):t.StorageDispatch.readResourceText(n,2)}catch(r){return null}},t.readEntireFile=function(n,i,r){return new Microsoft.Plugin.Promise(function(u,f){try{var e=null,o=null;e=t.StorageDispatch.openFile(n,1,i.encoding,i.mode,i.persistence,i.type);o=r?t.StorageDispatch.readBinaryToBase64(e,0):t.StorageDispatch.readText(e,0);e!==null&&(t.StorageDispatch.closeFile(e),e=null);u(o)}catch(s){f(s)}finally{e!==null&&t.StorageDispatch.closeFile(e)}})},t.writeEntireFile=function(n,i,r,u){var f=null;try{f=t.StorageDispatch.openFile(n,2,r.encoding,r.mode,r.persistence,r.type);u?t.StorageDispatch.writeBinaryFromBase64(f,i,0,0):t.StorageDispatch.writeText(f,i,0,0)}catch(e){}finally{f!==null&&t.StorageDispatch.closeFile(f)}},t.StorageDispatch=n.Host.ExternalApis.storage,t}();t.Storage=i})(i=t.Impl||(t.Impl={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(){function i(){var t=this;this._loadedScriptExtensions={};this._communicationManager=new n.CommunicationManager(this.postMessageToPlugin.bind(this));this._communicationManager.addEventListener("BeforeControlReady",function(n){return t.onBeforeControlReady(n)})}return i.prototype.loadExtensions=function(n){var r,u,i,s,e,o,f;if(n&&(r=n.f12||n.webhost,r&&r.published_objects)){u=r.published_objects;for(i in u)if(s=u[i],s.path){if(e=u[i].path.replace(/\//g,"\\"),o=t.Storage.readPluginFile(e),o){try{eval(o)}catch(h){t.Diagnostics.reportHostError("Invalid host extension at: "+e);break}f=null;try{f=eval("new "+i+"()")}catch(h){t.Diagnostics.reportHostError("Invalid published object class name: "+i);break}if(!f){t.Diagnostics.reportHostError("Invalid published object: "+i);break}this.publishExtension(i,f)}}else t.Diagnostics.reportHostError("Invalid host extension: "+i)}},i.prototype.publishExtension=function(t,i){var r=this._communicationManager.createPort(t),u=new n.PortMarshaller(r,i);this._loadedScriptExtensions[t]=u;r.connect()},i.prototype.onBeforeControlReady=function(n){this._delayToken=n.delayControlReadyEvent()},i.prototype.hostDescription=function(){return"F12 Developer Tools"},i.prototype.postMessage=function(n){var t=this;window.setTimeout(function(){t._communicationManager.processMessage(n)},0)},i.prototype.postMessageToPlugin=function(n){this.messageReceived&&this.messageReceived(n)},i.prototype.setControlReady=function(n){this.loadExtensions(n);this._communicationManager.unblockControlReadyEvent(this._delayToken)},i.prototype.setMessageCallback=function(n){this.messageReceived=n},i}();t.Core=i})(t=n.Impl||(n.Impl={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(i){"use strict";var r=function(t){function i(){t.call(this)}return __extends(i,t),i.prototype.loadResources=function(){return Microsoft.Plugin.Promise.wrap(null)},i.prototype.triggerInitialized=function(n){this._loadedResources=this.loadAllResources(n);this.dispatchEvent("resourcesinitialized",this._loadedResources,!0)},i.prototype.triggerChanged=function(){this.dispatchEvent("resourceschanged",this._loadedResources)},i.prototype.loadAllResources=function(n){var u={},f=null,e,r,t,o;if(n&&(e=n.f12&&n.f12.resource_aliases,r=e?n.f12.resource_aliases:n.resource_aliases,r))for(t in r)o=i.UtilitiesDispatch.getStringTableResources(t),u[t]=o,r[t].is_default&&(f=t);return{ResourceMap:u,DefaultAlias:f,GenericError:"An error has occurred"}},i.UtilitiesDispatch=n.Host.ExternalApis.utilities,i}(t.EventManager);i.Resources=r})(i=t.Impl||(t.Impl={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(i){"use strict";var r=function(t){function r(){var i=this;t.call(this);n.Host.ExternalApis.addEventListener("syscolorchanged",function(){i.updateTheme()})}return __extends(r,t),r.prototype.addImagesToThemeMap=function(t,u,f){var o,e,c,l,a,s,h,v;for(o in u)if(e=null,u[o].bitmap_source){if(c=i.Storage.getResourceIdFromRelativePath(u[o].bitmap_source),l=t[u[o].background_color],f&&l){for(this._conversionElement=this._conversionElement||document.createElement("div"),this._conversionElement.style.backgroundColor=l,a=this._conversionElement.style.backgroundColor.split(","),n.Tools.Utility.Assert.isTrue(a.length===3,"Unexpected number of RGB parts when adding images to the theme map."),s=[],h=0;h<3;h++)s.push(parseInt(a[h].replace(r._rgbRegEx,""),10));v=n.Host.ExternalApis.storage.getResourceFileName(c,2);e=n.Host.ExternalApis.utilities.getThemedImage(v,s[0],s[1],s[2])}e||(e=i.Storage.readPluginFile(c,!0));e&&(e="data:image/png;base64,"+e,t[o]=e)}},r.prototype.addSVGFilesToThemeMap=function(n,t){var f,l,r,u,e,o,s,h,a,c;for(f in t)if(t[f].svg_source&&(l=i.Storage.getResourceIdFromRelativePath(t[f].svg_source),r=i.Storage.readPluginFile(l,!1),r)){u="\n<style>\n";e=t[f].svg_colors;for(o in e)u+=o+" { ",s=n[e[o].fill],s&&(u+="fill: "+s+"; "),h=n[e[o].stroke],h&&(u+="stroke: "+h+"; "),u+="}\n";u+="<\/style>\n";a=r.indexOf("<svg");c=r.indexOf(">",a)+1;r=r.substr(0,c)+u+r.substr(c);r="data:image/svg+xml;base64,"+window.btoa(r);n[f]=r}},r.prototype.loadTheme=function(t,u){var e={},l=i.Storage.readHostFile("theme/plugin.css"),o,s,f,h,c;if(u){f=i.Storage.readHostFile("theme/"+r._highContrastThemeFile+".json");o=n.Host.ExternalApis.utilities.getHighContrastReplacements();for(s in o)f=f.replace(new RegExp(s,"g"),o[s]);e=JSON.parse(f)}else f=i.Storage.readHostFile("theme/"+r._themeFile+".json"),e=JSON.parse(f);return t&&(t.f12&&t.f12.themed_images&&(h=t.f12.themed_images,this.addImagesToThemeMap(e,h,u)),t.f12&&t.f12.themed_svg&&(c=t.f12.themed_svg,this.addSVGFilesToThemeMap(e,c,u))),{PluginCss:l,themeMap:e}},r.prototype.updateTheme=function(){if(n.Host.ExternalApis.utilities.isHighContrast()&&this._manifest){var t=this.loadTheme(this._manifest,!0);this.dispatchEvent("themechanged",t,!0)}else this.dispatchEvent("themechanged",this._loadedTheme,!0)},r.prototype.fireThemeReady=function(){this.dispatchEvent("themeReady")},r.prototype.getCssFile=function(n){if(n.indexOf(r._hostFilePrefix)===0)return n=n.substr(r._hostFilePrefix.length),new Microsoft.Plugin.Promise(function(t){t(i.Storage.readHostFile(n))});var t=i.Storage.getPluginRelativePath(n);return new Microsoft.Plugin.Promise(function(n){n(i.Storage.readPluginFile(t))})},r.prototype.triggerInitialized=function(t){if(this._manifest=t,this._loadedTheme=this.loadTheme(t,!1),n.Host.ExternalApis.utilities.isHighContrast()){var i=this.loadTheme(t,!0);this.dispatchEvent("themeinitialize",i,!0)}else this.dispatchEvent("themeinitialize",this._loadedTheme,!0)},r.prototype.triggerChanged=function(){this.dispatchEvent("themechanged",this._loadedTheme)},r._hostFilePrefix="F12HOSTFILE__",r._themeFile="light",r._highContrastThemeFile="highContrast",r._rgbRegEx=/[^0-9]+/g,r}(t.EventManager);i.Theme=r})(i=t.Impl||(t.Impl={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(n){function t(){n.call(this)}return __extends(t,n),t.prototype.loadCulture=function(){var n=window.external.utilities.getCultureInfo();return n.numberFormat.currencyGroupSizes=this.convertPatternToArray(n.numberFormat.currencyGroupSizes),n.numberFormat.numberGroupSizes=this.convertPatternToArray(n.numberFormat.numberGroupSizes),n.numberFormat.percentGroupSizes=this.convertPatternToArray(n.numberFormat.percentGroupSizes),n.direction="ltr",typeof n.language=="string"&&(n.language=n.language.replace(/_/g,"-")),n},t.prototype.convertPatternToArray=function(n){for(var i=[],r=n.split(";"),t=0;t<r.length;t++)i.push(parseInt(r[t],10));return i},t.prototype.triggerInitialized=function(n){this._loadedCulture=this.loadCulture(n);this.dispatchEvent("cultureinitialize",this._loadedCulture,!0)},t.prototype.triggerChanged=function(){this.dispatchEvent("culturechanged",this._loadedCulture)},t}(n.EventManager);t.Culture=i})(t=n.Impl||(n.Impl={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(i){"use strict";var r=function(t){function i(){var n=this;t.call(this);this._isListening=!1;this.addEventListener("dismiss",function(){n.dismiss()});this._popupMessageCallback=function(t){return n.onMessageFromPopup(t)}}return __extends(i,t),i.prototype.triggerDismiss=function(){this.dispatchEvent("dismiss")},i.prototype.adjustShowCoordinates=function(n){return n},i.prototype.callback=function(n){var t={name:"contextmenuclicked",id:n};return document.defaultView.postMessage(t,document.URL),Microsoft.Plugin.Promise.as(null)},i.prototype.canCreatePopup=function(n){return n?!1:!0},i.prototype.disableZoom=function(){},i.prototype.dismiss=function(){return n.Host.ExternalApis.pluginId!==8&&Microsoft.Plugin.F12.Communications.jsonRpcMethodCall(8,"hidePopup",[]),i.IsContextMenuActive=!1,this._isListening&&(Microsoft.Plugin.F12.Communications.removeEventListener("popupMessage",this._popupMessageCallback),this.dispatchEvent("contextmenudismissed",{id:this._menuId}),this._isListening=!1),Microsoft.Plugin.Promise.as(null)},i.prototype.dismissCurrent=function(n){if(!n)document.defaultView.postMessage({name:"contextmenudismissed"},document.URL);return Microsoft.Plugin.Promise.as(null)},i.prototype.dismissSubmenus=function(){return Microsoft.Plugin.Promise.as(null)},i.prototype.fireContentReady=function(){var n=document.getElementById("contextmenu");return n.focus(),Microsoft.Plugin.Promise.as(null)},i.prototype.show=function(t,r,u,f){var e,o;return Microsoft.Plugin.Tooltip.dismiss(),this._contextMenus=u,this._menuId=t,this._currentDisplayInfo=i.adjustCoordinates(f.clientCoordinates.X,f.clientCoordinates.Y,f.width,f.height),this._isListening=!0,Microsoft.Plugin.F12.Communications.addEventListener("popupMessage",this._popupMessageCallback),e=JSON.stringify({contextMenus:u.innerHTML,id:this._menuId,ariaLabel:r}),i.IsContextMenuActive=!0,o={pluginId:n.Host.ExternalApis.pluginId,x:this._currentDisplayInfo.screenX,y:this._currentDisplayInfo.screenY,width:this._currentDisplayInfo.width,height:this._currentDisplayInfo.height,activate:!0,style:"",content:e,isTooltip:!1},Microsoft.Plugin.F12.Communications.jsonRpcMethodCall(8,"showPopup",[o],!0)},i.prototype.triggerContextMenuEvent=function(n,t){this.dispatchEvent(n,t)},i.prototype.onMessageFromPopup=function(n){switch(n.customData.name){case"contextmenuclicked":this.dispatchEvent(n.customData.name,{Id:n.customData.id});break;case"contextmenudismissed":this.dispatchEvent("dismiss")}},i.isContextMenuActive=function(){return i.IsContextMenuActive},i.adjustCoordinates=function(n,t,r,u,f){var v=f?18:0,s=screen.deviceXDPI/screen.logicalXDPI,y=i.UtilitiesDispatch.getClientToScreenPoint(n*s,t*s),o=y.x,e=y.y,p=Math.ceil(r*s),w=Math.ceil(u*s),b=i.UtilitiesDispatch.getMonitorTopFromCoord(o,e),k=i.UtilitiesDispatch.getMonitorLeftFromCoord(o,e),d=i.UtilitiesDispatch.getMonitorRightFromCoord(o,e),g=i.UtilitiesDispatch.getMonitorBottomFromCoord(o,e),c,l,a,h;return e+=v*s,c=d-(o+p),c<0&&(o+=c,l=o-k,l<0&&(o-=l)),a=g-(e+u),a<0&&(e-=v*s+w,h=e-b,h>a&&h<0&&(e-=h)),{screenX:o,screenY:e,width:p,height:w}},i.prototype.handleMouseClick=function(n){var t=n.x<this._currentDisplayInfo.screenX||n.x>this._currentDisplayInfo.screenX+this._currentDisplayInfo.width||n.y<this._currentDisplayInfo.screenY||n.y>this._currentDisplayInfo.screenY+this._currentDisplayInfo.height;t&&this.dismiss()},i.IsContextMenuActive=!1,i.UtilitiesDispatch=n.Host.ExternalApis.utilities,i}(t.EventManager);i.ContextMenu=r})(i=t.Impl||(t.Impl={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(){function i(){this._isFirstShow=!0}return i.prototype.getDblClickTime=function(){return i.UtilitiesDispatch.getDoubleClickTime()},i.prototype.canCreatePopup=function(){return!0},i.prototype.getScreenSizeForXY=function(n,t){var f=screen.deviceXDPI/screen.logicalXDPI,r=n*f,u=t*f,e=i.UtilitiesDispatch.getMonitorTopFromCoord(r,u),o=i.UtilitiesDispatch.getMonitorLeftFromCoord(r,u),s=i.UtilitiesDispatch.getMonitorRightFromCoord(r,u),h=i.UtilitiesDispatch.getMonitorBottomFromCoord(r,u);return{Width:s-o,Height:h-e}},i.prototype.hostContentInPopup=function(i){var h=this,r,f,e,o,u,s;if(!t.ContextMenu.isContextMenuActive()){if(r=t.ContextMenu.adjustCoordinates(i.clientCoordinates.X,i.clientCoordinates.Y,i.contentSize.Width,i.contentSize.Height,!0),n.Host.ExternalApis.popup.addEventListener("click",function(){h.dismissPopup()}),this._isFirstShow){for(this._styleNecessaryForPopup="",e=document.implementation.createHTMLDocument("Tooltip Document"),e.documentElement.innerHTML=i.content,f=e.getElementById("plugin-vs-tooltip").outerHTML,o=document.head.querySelectorAll("#pluginCss, [data-necessary-for-tooltip]"),u=0;u<o.length;u++)this._styleNecessaryForPopup+=o[u].outerHTML;n.Host.ExternalApis.markToolReady();this._isFirstShow=!1}else f=i.content;s={pluginId:n.Host.ExternalApis.pluginId,x:r.screenX,y:r.screenY,width:r.width,height:r.height,activate:!1,style:this._styleNecessaryForPopup,content:f,isTooltip:!0};Microsoft.Plugin.F12.Communications.jsonRpcMethodCall(8,"showPopup",[s],!0)}},i.prototype.dismissPopup=function(){n.Host.Impl.ContextMenu.isContextMenuActive()||(n.Host.ExternalApis.popup.removeAllEventListeners(),Microsoft.Plugin.F12.Communications.jsonRpcMethodCall(8,"hidePopup",[]))},i.UtilitiesDispatch=n.Host.ExternalApis.utilities,i}();t.Tooltip=i})(i=t.Impl||(t.Impl={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.prototype.logEntry=function(n,t){console.log("ActivityLog: "+n+", "+t)},n}();n.ActivityLog=t})(t=n.Impl||(n.Impl={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){Microsoft.Plugin.detect||(Microsoft.Plugin.detect={})}return n.prototype.fireCodeMarker=function(n){window.msWriteProfilerMark("F12:"+n)},n}();n.CodeMarkers=t})(t=n.Impl||(n.Impl={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(){function t(){}return Object.defineProperty(t.prototype,"version",{get:function(){return{major:1,minor:1,build:1,revision:1}},set:function(){},enumerable:!0,configurable:!0}),t.prototype.showDocument=function(n,t,i){return Microsoft.Plugin.F12.Debugger.showDocument(n,t,i)},t.prototype.getDocumentLocation=function(n){return Microsoft.Plugin.Promise.wrap(n)},t.prototype.supportsAllowSetForeground=function(){return!0},t.prototype.allowSetForeground=function(t){return n.Host.ExternalApis.allowSetForeground(t)},t}();t.Host=i})(i=t.Impl||(t.Impl={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.prototype.log=function(n){console.log("Output.log: "+n)},n}();n.Output=t})(t=n.Impl||(n.Impl={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(){function t(){}return t.prototype.reportError=function(n,i,r,u,f){return t.reportError(n,i,r,u,f)},t.reportError=function(n,i,r,u,f){n||(n="");i||(i="");typeof r!="string"&&(r=""+r);f||(f="0");typeof f!="string"&&(f=""+f);var e="";return u&&(e=""+u),t.UtilitiesDispatch.reportError(t.PluginName,n,i,r,f,e)},t.prototype.terminate=function(){},t.reportHostError=function(n,t){this.reportError("Host Error - "+n,"plugin.f12.js","",t)},t.prototype.triggerInitialized=function(n){n&&n.name&&(t.PluginName=n.name)},t.UtilitiesDispatch=n.Host.ExternalApis.utilities,t.PluginName="Plugin",t}();t.Diagnostics=i})(i=t.Impl||(t.Impl={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.prototype.initialize=function(n){this._fileAliasMap={};n&&(this.loadFileAliases(n.file_aliases),n.f12&&this.loadFileAliases(n.f12.file_aliases))},n.prototype.getPath=function(n){return!this._fileAliasMap||!this._fileAliasMap[n]?null:this._fileAliasMap[n].path},n.prototype.loadFileAliases=function(n){if(n)for(var t in n)n.hasOwnProperty(t)&&(this._fileAliasMap[t]=n[t])},n}();n.FileAliases=t})(t=n.Impl||(n.Impl={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(){function t(){}return t.prototype.logAsTelemetry=function(n,i){t._telemetryLogger.logAsTelemetry(n,i)},t.prototype.logAsMeasure=function(n,i){t._telemetryLogger.logAsMeasure(n,i)},t._telemetryLogger=n.Host.ExternalApis.telemetryLogging,t}();t.TelemetryLogger=i})(i=t.Impl||(t.Impl={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";var t=function(){function n(){}return n.addPromiseErrorListener=function(){var t=Microsoft.Plugin;t.Promise.addEventListener("error",function(i){t.F12&&t.F12.SelfTest.selfTestEnabled||!isDebugBuild&&n.ReportedToWatson||i&&i.detail&&i.detail.exception&&(!i.detail.exception.ExceptionType||i.detail.exception.ExceptionType!=="UnexpectedResult")&&(n.reportErrorGivenStack(i.detail.exception),n.ReportedToWatson=!0)})},n.reportErrorGivenStack=function(t){var e=t.message,u,f,i,r;if(!("stack"in t))try{throw t}catch(o){t=o}for(u=t.stack||"",f=u.split("\n"),r=0;r<f.length;r++)if(i=n.StackRegex.exec(f[r]),i)break;if(i){var s=i[3],h=parseInt(i[4],10),c=parseInt(i[5],10);window.reportError(e,s,h,u,c)}},n.reportErrorDetails=function(n){window.reportError(n.message,n.file,n.line,n.additionalInfo,n.column)},n.StackRegex=new RegExp(".* at ([^(]+) (.*/23/([^:]+):([0-9]+):([0-9]+))","gim"),n.ReportedToWatson=!1,n}();n.ErrorHandling=t})(Common||(Common={}));typeof window!="undefined"&&(window.reportError=function(n,t,i,r,u){var f,e;n=n||"";t=t||"";i=i||0;r=r||"";u=u||0;isDebugBuild&&(window.parent.getExternalObj?f=window.parent.getExternalObj():window.external&&(f=window.external),f&&(e=window.errorComponent?window.errorComponent:"Common",console.error([e,n,t,i,u].join("\r\n")),window.errorDisplayHandler&&window.errorDisplayHandler(n,t,i,r,u)));Microsoft&&Microsoft.Plugin&&Microsoft.Plugin.Diagnostics&&Microsoft.Plugin.Diagnostics.reportError&&Microsoft.Plugin.Diagnostics.reportError(n,t,i,r,u)},window.onerror=function(n,t,i){var r=0,u="";return arguments&&(arguments[3]&&typeof arguments[3]=="number"&&(r=arguments[3]),arguments[4]&&arguments[4]instanceof Error&&(u="Error number: "+arguments[4].number+("\r\nStack: "+arguments[4].stack))),window.reportError(n,t,i,u,r),!0});
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.isTrue=function(t,i){t||(i=i?"Internal error. "+i:"Internal error. Unexpectedly false.",n.fail(i))},n.isFalse=function(t,i){t&&(i=i?"Internal error. "+i:"Internal error. Unexpectedly true.",n.fail(i))},n.isNull=function(t,i){t!==null&&(i=i?"Internal error. "+i:"Internal error. Unexpectedly not null.",i+=" '"+t+"'",n.fail(i))},n.isUndefined=function(t,i){undefined!==void 0&&(i="Internal error. Unexpectedly undefined has been redefined.",i+=" '"+undefined+"'",n.fail(i));t!==undefined&&(i=i?"Internal error. "+i:"Internal error. Unexpectedly not undefined.",i+=" '"+t+"'",n.fail(i))},n.hasValue=function(t,i){undefined!==void 0&&(i="Internal error. Unexpectedly undefined has been redefined.",i+=" '"+undefined+"'",n.fail(i));(t===null||t===undefined)&&(i=i?"Internal error. "+i:"Internal error. Unexpectedly "+(t===null?"null":"undefined")+".",n.fail(i))},n.areEqual=function(t,i,r){t!==i&&(r=r?"Internal error. "+r:"Internal error. Unexpectedly not equal.",r+=" '"+t+"' !== '"+i+"'.",n.fail(r))},n.areNotEqual=function(t,i,r){t===i&&(r=r?"Internal error. "+r:"Internal error. Unexpectedly equal.",r+=" '"+t+"' === '"+i+"'.",n.fail(r))},n.throws=function(t,i){try{t();i=i?"Internal error. "+i:"Internal error. Unexpectedly didn't throw.";n.fail(i)}catch(r){return}},n.fail=function(t){n.fail_helper(t,!0)},n.reportWatson=function(t){n.fail_helper(t,!1)},n.failDebugOnly=function(t){isDebugBuild&&n.fail(t)},n.fail_helper=function(n,t){var f=new Error((n||"Assert failed.")+"\n"),r,u;try{throw f}catch(i){if(r=typeof Common!="undefined"&&Common&&Common.ErrorHandling,u=typeof Microsoft!="undefined"&&Microsoft&&Microsoft.Plugin&&Microsoft.Plugin.F12&&Microsoft.Plugin.F12.SelfTest,r&&u&&!Microsoft.Plugin.F12.SelfTest.selfTestEnabled&&Common.ErrorHandling.reportErrorGivenStack(i),isDebugBuild||t){i.stack&&(i.description=i.stack);throw i}}},n}();n.Assert=t})(t=n.Utility||(n.Utility={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(t){"use strict";var u=function(){function t(n,t,i,r,u){var f=this;this._ourIdentifier=n;this._nextId=0;this._promiseTable={};this._jsonRpcMethodReceive=t;this._jsonRpcNotificationReceive=i;this._postMessage=r;Date.now||(Date.now=function(){return+new Date});this._startTime=Date.now();u(function(n){f.onMessage(n)})}return t.prototype.jsonRpcMethodCall=function(n,t,r,u,f){var s=this,o=this._ourIdentifier+"|"+this._nextId,e;return this._nextId++,this._promiseTable[o]={completed:r,error:u},e=JSON.stringify({id:o,method:n,params:t}),this.logTraffic(e),i.RandomDelay?(i.queueData(function(){s._postMessage(e,f)},e),!0):this._postMessage(e,f)},t.prototype.jsonRpcNotification=function(n,t,r){var f=this,e=this._ourIdentifier+"|NULL",u=JSON.stringify({id:e,method:n,params:t});this.logTraffic(u);i.RandomDelay?i.queueData(function(){f._postMessage(u,r)},u):this._postMessage(u,r)},t.prototype.logTraffic=function(n){if(isDebugBuild){var t=("  "+(Date.now()-this._startTime)/1e3).slice(-9);__rpcLog.push(t+" | "+n);__rpcLog.length>100&&__rpcLog.shift()}},t.prototype.onMessage=function(t){var f=this,r,u;this.logTraffic(t.data);r=JSON.parse(t.data);u=r.id.split("|");n.Utility.Assert.areEqual(u.length,2);u[1]==="NULL"?u[0]!==this._ourIdentifier&&this._jsonRpcNotificationReceive(r.method,r.params):u[0]===this._ourIdentifier?i.RandomDelay?i.queueData(function(){f.handleReply(r)},t.data):this.handleReply(r):i.RandomDelay?i.queueData(function(){f.handleCall(r)},t.data):this.handleCall(r)},t.prototype.handleReply=function(t){if(!this._promiseTable[t.id]){n.Utility.Assert.failDebugOnly("Can't complete a promise that does not exist in the promise table. Probably a dup reply msg.");return}t.error?(n.Utility.Assert.isUndefined(t.data,"Can't have both data and error"),this._promiseTable[t.id].error(t.error)):this._promiseTable[t.id].completed(t.data);delete this._promiseTable[t.id]},t.prototype.handleCall=function(t){var i=this;this._jsonRpcMethodReceive(t.method,t.params,function(r,u){var f;r!==null&&r!==undefined?(n.Utility.Assert.isUndefined(u,"Can't have both data and error"),f=JSON.stringify({id:t.id,data:r})):(n.Utility.Assert.hasValue(u,"RPC call returned no value, but no error object either"),f=JSON.stringify({id:t.id,error:u}));i._postMessage(f)})},t}(),r,i;t.JsonRPCEndpoint=u;r=function(){function n(n,t){this.callback=n;this.message=t}return n}();t.RpcDelayData=r;i=function(){function n(){}return n.enableDelay=function(t,i){n.RandomDelay=!0;n.CalculateDelayTime=t;n.DelayedMessage=i},n.disableDelay=function(){n.RandomDelay=!1;n.RandomDelayTimeout&&(clearTimeout(n.RandomDelayTimeout),n.RandomDelayTimeout=null,n.clearQueue())},n.queueData=function(t,i){var f=new r(t,i),u;n.DelayedQueue.push(f);n.RandomDelayTimeout||(u=n.CalculateDelayTime(i),n.RandomDelayTimeout=setTimeout(n.fireRandomly,u))},n.fireRandomly=function(){var t=n.DelayedQueue.shift(),i;n.DelayedMessage(t.message);t.callback();n.DelayedQueue.length>0?(i=n.CalculateDelayTime(n.DelayedQueue[0].message),n.RandomDelayTimeout=setTimeout(n.fireRandomly,i)):n.RandomDelayTimeout=null},n.clearQueue=function(){for(var i,t=0;t<n.DelayedQueue.length;t++)i=n.DelayedQueue[t],n.DelayedMessage(i.message),i.callback();n.DelayedQueue=[]},n.RandomDelay=!1,n.DelayedQueue=[],n}();t.RpcDelayHook=i})(t=n.RPC||(n.RPC={}))})(t=n.Tools||(n.Tools={}))})(F12||(F12={}));isDebugBuild&&(__rpcLog=[]);
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){"use strict";(function(n){n[n.user=0]="user";n[n.config=1]="config"})(n.SettingsScope||(n.SettingsScope={}));var i=n.SettingsScope,t=function(){function t(){}return t.prototype.getSettingsData=function(){var i=this,r;return this._loadedData?Microsoft.Plugin.Promise.wrap(this._loadedData):(r={access:1,encoding:"UTF-8",mode:4,share:0,persistence:0,type:1},n.Storage.readEntireFile(t.DefaultFileName,r).then(function(n){var t=null;if(n)try{t=JSON.parse(n)}catch(r){t={}}return t||(t={}),t[0]||(t[0]={}),t[1]||(t[1]={}),i._loadedData=t,i._loadedData}))},t.prototype.setSettingsData=function(i){var r=JSON.stringify(i);n.Storage.writeEntireFile(t.DefaultFileName,r,{access:2,encoding:"UTF-8",mode:1,share:0,persistence:0,type:1});this._loadedData=i},t.prototype.getSettingsInfoFromCollection=function(n){var t=0,i=n||"";return n.indexOf(":")===1&&(n[0].toLowerCase()==="c"&&(t=1),i=n.substr(2)||""),{scope:t,name:i}},t.prototype.getScopedData=function(n){var t=this.getSettingsInfoFromCollection(n);return this.getSettingsData().then(function(n){var i=n[t.scope];return t.name&&(i[t.name]||(i[t.name]={}),i=i[t.name]),i})},t.prototype.get=function(n,t){return n&&typeof n=="string"||(n=""),t||(t=[]),this.getScopedData(n).then(function(n){var u,i,r;for(t.length===0&&(t=Object.getOwnPropertyNames(n)),u={},i=0;i<t.length;i++)r=t[i],u[r]=n.hasOwnProperty(r)?n[r]:null;return u})},t.prototype.set=function(n,t){var i=this;n&&typeof n=="string"||(n="");t||(t={});this.getScopedData(n).done(function(n){for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);i.setSettingsData(i._loadedData)})},t.DefaultFileName="settings.json",t}();n.Settings=t})(t=n.Impl||(n.Impl={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(i){"use strict";var r=function(t){function i(){t.call(this);this._methodHandlers={};this._rpc=new n.Tools.RPC.JsonRPCEndpoint("F12_RPC_CLIENT_"+n.Host.ExternalApis.pluginId,this.jsonRpcMethodReceive.bind(this),this.jsonRpcNotificationReceive.bind(this),function(t,i){return(typeof i=="undefined"||i===null)&&t&&(i=n.Host.Impl.Communications.parsePluginIdFromMessageId(t)),typeof i!="undefined"&&i!==null?n.Host.ExternalApis.sendJsonMessage(i,t):void 0},function(t){n.Host.ExternalApis.addEventListener("jsonmessage",function(n){t({data:n})})})}return __extends(i,t),i.prototype.registerMethodHandler=function(n,t,i){if(this._methodHandlers.hasOwnProperty(n))throw new Error("There is already a handler registered for the '"+n+"' method.");this._methodHandlers[n]=t;this._methodHandlers[n].isAsync=i},i.prototype.unregisterMethodHandler=function(n){this._methodHandlers.hasOwnProperty(n)&&delete this._methodHandlers[n]},i.prototype.callMethod=function(n,t,i,r){return this.jsonRpcMethodCall(n,t,i,r)},i.prototype.jsonRpcMethodCall=function(t,i,r,u){var f=this;return t===n.Host.ExternalApis.pluginId?this.directInvoke(i,r):new Microsoft.Plugin.Promise(function(e,o){f._rpc.jsonRpcMethodCall(i,r,e,o,t);u&&n.Host.ExternalApis.activateTab(t)})},i.prototype.directInvoke=function(t,i){var r=this;return new Microsoft.Plugin.Promise(function(u,f){r.jsonRpcMethodReceive(t,i,function(t,i){t!==null&&t!==undefined?(n.Tools.Utility.Assert.isUndefined(i,"Can't have both data and error"),u(t)):(n.Tools.Utility.Assert.hasValue(i,"RPC call returned no value, but no error object either"),f(i))})})},i.prototype.fireEvent=function(n,t,i){i===void 0&&(i={});this._rpc.jsonRpcNotification(n,i,t)},i.parsePluginIdFromMessageId=function(t){var i=t.split("F12_RPC_CLIENT_");if(i&&i.length>1){if(i=i[1].split("|"),i&&i.length>0&&!isNaN(parseInt(i[0])))return parseInt(i[0]);n.Tools.Utility.Assert.fail("Unable to parse valid target plugin ID from F12 RPC message: "+t)}return undefined},i.prototype.jsonRpcMethodReceive=function(n,t,i){var u,r;if(this._methodHandlers.hasOwnProperty(n)){r=this._methodHandlers[n];r.isAsync&&(t=t||[],t.push(i));u=t?r.apply(r,t):r.apply(r);r.isAsync||i(u,undefined);return}i(null,new Error("There was no method handler registered for the '"+n+"' method."))},i.prototype.jsonRpcNotificationReceive=function(n,t){var i={customData:t};this.dispatchEvent(n,i,!1)},i}(t.EventManager);i.Communications=r})(i=t.Impl||(t.Impl={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(t){var i;(function(i){"use strict";var r,y,p,u,f,e,o,s,h,c,l,a,v,w;(function(n){n[n.None=-1]="None";n[n.Header=0]="Header";n[n.Console=1]="Console";n[n.Dom=2]="Dom";n[n.Debugger=3]="Debugger";n[n.Emulation=4]="Emulation";n[n.Memory=5]="Memory";n[n.VisualProfiler=6]="VisualProfiler";n[n.IRViewer=7]="IRViewer";n[n.Popup=8]="Popup";n[n.Network=9]="Network"})(i.PluginId||(i.PluginId={}));r=i.PluginId,function(n){n[n.UserCode=0]="UserCode";n[n.Library=1]="Library";n[n.Unrelated=2]="Unrelated";n[n.Unsure=-1]="Unsure"}(i.JMCType||(i.JMCType={}));y=i.JMCType,function(n){n[n.Chooser=0]="Chooser";n[n.Classic=1]="Classic";n[n.Spartan=2]="Spartan";n[n.WWA=3]="WWA"}(i.LaunchMode||(i.LaunchMode={}));p=i.LaunchMode;u=function(){function r(){}return r.prototype.createExternalObject=function(i,r){var f=t.App.pluginHost.getFileAliasesService(),u=f.getPath(i);return u?n.Host.ExternalApis.utilities.loadExtension(u,r):undefined},r.prototype.readResourceFile=function(n,t){return i.Storage.readPluginFile(n,t)},r}();i.Utilities=u;f=function(){function n(n){this._communications=n}return n.prototype.notifyConsoleErrorsUpdated=function(n){this._communications.jsonRpcMethodCall(0,"consoleErrorsUpdated",[n])},n.prototype.notifyProfilingStarted=function(n){this._communications.jsonRpcMethodCall(0,"profilerstarted",[n])},n.prototype.notifyProfilingStopped=function(n){this._communications.jsonRpcMethodCall(0,"profilerstopped",[n])},n.prototype.notifyEmulationStateUpdated=function(n,t){this._communications.jsonRpcMethodCall(0,"emulationStateUpdated",[n,t])},n}();i.Header=f;e=function(){function t(n){this._communications=n}return t.prototype.notifyOnActiveStackFrameChanged=function(){n.Host.ExternalApis.notifyOnActiveStackFrameChanged()},t.prototype.notifyOnBreak=function(t){n.Host.ExternalApis.notifyOnBreak(t)},t.prototype.notifyOnRun=function(){n.Host.ExternalApis.notifyOnRun()},t.prototype.getIsAtBreakpoint=function(){return n.Host.ExternalApis.isAtBreakpoint},t.prototype.getIsAtBreakpointInWorker=function(){return n.Host.ExternalApis.isAtBreakpointInWorker},t.prototype.executeBreakModeCommand=function(n){return this.getIsAtBreakpoint()?this._communications.jsonRpcMethodCall(3,"breakModeCommand",[n]):new Microsoft.Plugin.Promise(function(n){n(!1)})},t.prototype.addToWatch=function(n){return this._communications.jsonRpcMethodCall(3,"addToWatch",[n],!0)},t.prototype.getLocalsForCurrentStackFrame=function(){return this._communications.jsonRpcMethodCall(3,"getLocalsForCurrentStackFrame",[],!1)},t.prototype.abortScriptExecution=function(){return this._communications.jsonRpcMethodCall(3,"abortScriptExecution",[],!1)},t.prototype.showDocument=function(n,t,i,r){return t===void 0&&(t=1),i===void 0&&(i=1),r===void 0&&(r=""),this._communications.jsonRpcMethodCall(3,"showDocument",[n,t||1,i||1,r],!0)},t.prototype.getTranslatedLocation=function(n,t,i,r){return t===void 0&&(t=1),i===void 0&&(i=1),r===void 0&&(r=!0),this._communications.jsonRpcMethodCall(3,"getTranslatedLocation",[n,t||1,i||1,r],!1)},t}();i.Debugger=e;o=function(){function t(n){this._communications=n}return t.prototype.notifyOnStartProfiling=function(){if(n.Host.ExternalApis.isAtBreakpoint)throw new Error("Cannot call notifyOnStartProfiling while at a breakpoint.");return n.Host.ExternalApis.notifyOnStartProfiling()},t.prototype.notifyOnStopProfiling=function(){if(n.Host.ExternalApis.isAtBreakpoint)throw new Error("Cannot call notifyOnStopProfiling while at a breakpoint.");return n.Host.ExternalApis.notifyOnStopProfiling()},t.prototype.getIsProfiling=function(){return n.Host.ExternalApis.isProfiling},t}();i.Profiler=o;s=function(){function n(){}return n.prototype.show=function(n,t,r){this._display||(this._display=new i.ZoomAlert(document.body,r));this._display.show(n,t)},n.prototype.close=function(){this._display&&this._display.close()},n}();i.ZoomDisplay=s;h=function(){function n(){}return Object.defineProperty(n.prototype,"messageText",{get:function(){return this._display?this._display.messageText:null},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"helpUri",{get:function(){return this._display?this._display.helpUri:null},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isShown",{get:function(){return this._display?this._display.isShown:!1},enumerable:!0,configurable:!0}),n.prototype.showWithDocUrl=function(n,t,r,u,f,e,o,s){this._display||(this._display=new i.MessageAlert(document.body,u));this._display.showWithDocUrl(n,t,r,f,e,o,s)},n.prototype.show=function(n,t,r,u,f){this._display||(this._display=new i.MessageAlert(document.body,u));this._display.show(n,t,r,f)},n.prototype.close=function(){this._display&&this._display.close()},n.prototype.resize=function(n){this._display&&this._display.resize(n)},n}();i.ErrorDisplay=h;c=function(){function n(n){this._communications=n}return n.prototype.isJMCAvailable=function(){return this._communications.jsonRpcMethodCall(0,"jmcIsJMCAvailable")},n.prototype.getJMCTypeForUrls=function(n){return this._communications.jsonRpcMethodCall(0,"jmcGetJMCTypeForUrls",[n])},n.prototype.getJMCTypeForEval=function(){return this._communications.jsonRpcMethodCall(0,"jmcGetJMCTypeForEval")},n.prototype.getJMCTypeForScriptBlock=function(){return this._communications.jsonRpcMethodCall(0,"jmcGetJMCTypeForScriptBlock")},n.prototype.getJMCTypeForFunction=function(){return this._communications.jsonRpcMethodCall(0,"jmcGetJMCTypeForFunction")},n.prototype.getJMCTypeForUrl=function(n){return this._communications.jsonRpcMethodCall(0,"jmcGetJMCTypeForUrl",[n])},n.prototype.setJMCTypeForUrl=function(n,t){return this._communications.jsonRpcMethodCall(0,"jmcSetJMCTypeForUrl",[n,t])},n.prototype.getCurrentRules=function(){return this._communications.jsonRpcMethodCall(0,"jmcGetCurrentRules")},n.prototype.load=function(){return this._communications.jsonRpcMethodCall(0,"jmcLoad")},n.prototype.save=function(){return this._communications.jsonRpcMethodCall(0,"jmcSave")},n.prototype.loadFromJSON=function(n){return this._communications.jsonRpcMethodCall(0,"jmcLoadFromJSON",[n])},n.prototype.saveToJSON=function(){return this._communications.jsonRpcMethodCall(0,"jmcSaveToJSON")},n.prototype.getError=function(){return this._communications.jsonRpcMethodCall(0,"jmcGetError")},n}();i.JMC=c;l=function(){function t(){this._isReady=!1}return t.prototype.raiseEvent=function(n,t){this.raiseEventWithMessage(n,t)},t.prototype.raiseEventWithMessage=function(t,i){n.Host.ExternalApis.traceWriter.raiseEvent(t,i)},t.prototype.raiseEventWithKey=function(t,i,r){n.Host.ExternalApis.traceWriter.raiseEventWithKey(t,i,r)},t.prototype.markToolReady=function(){this._isReady||(this._isReady=!0,n.Host.ExternalApis.markToolReady())},t}();i.TraceWriter=l;a=function(){function t(n){this._communications=n}return t.prototype.logMessage=function(t){return this._communications.jsonRpcMethodCall(0,"logselftestmessage",[{pluginName:r[n.Host.ExternalApis.pluginId],message:t,timestamp:Date.now()}])},Object.defineProperty(t.prototype,"selfTestEnabled",{get:function(){return n.Host.ExternalApis.utilities.getEnvironmentVariable("f12selftest")==="1"&&!n.Host.ExternalApis.isLoadedByF12Chooser},enumerable:!0,configurable:!0}),t}();i.SelfTest=a;v=function(){function n(n){this._communications=n}return n.prototype.storeGlobalTestData=function(n,t){return this._communications.jsonRpcMethodCall(0,"storeglobaltestdata",[n,t])},n.prototype.getGlobalTestData=function(n){return this._communications.jsonRpcMethodCall(0,"getglobaltestdata",[n])},n}();i.Test=v;w=function(t){function w(){var i=this;t.call(this);n.Host.ExternalApis.addEventListener("browsershortcut",function(n){return i.dispatchEvent("browsershortcut",n,!1)});n.Host.ExternalApis.addEventListener("keydown",function(n){return i.dispatchEvent("keydown",n,!1)});n.Host.ExternalApis.addEventListener("dockstatechanged",function(n){return i.dispatchEvent("dockstatechanged",n,!1)});n.Host.ExternalApis.addEventListener("profilingstarted",function(){return i.dispatchEvent("profilingstarted",null,!1)});n.Host.ExternalApis.addEventListener("profilingstopped",function(){return i.dispatchEvent("profilingstopped",null,!1)});n.Host.ExternalApis.addEventListener("consolestateshown",function(){return i.dispatchEvent("consolestateshown",null,!1)});n.Host.ExternalApis.addEventListener("consolestatehidden",function(){return i.dispatchEvent("consolestatehidden",null,!1)});n.Host.ExternalApis.addEventListener("activated",function(){return i.dispatchEvent("activated",null,!1)});n.Host.ExternalApis.addEventListener("deactivated",function(){return i.dispatchEvent("deactivated",null,!1)});n.Host.ExternalApis.addEventListener("navigatesubframes",function(n,t){return i.dispatchEvent("navigatesubframes",{isForward:n,useActiveElement:t},!1)});n.Host.ExternalApis.addEventListener("zoomevent",function(n){return i.dispatchEvent("zoomevent",{zoomLevel:n},!1)});n.Host.ExternalApis.addEventListener("selectedpluginchanged",function(n){return i.dispatchEvent("selectedpluginchanged",{activePluginId:n},!1)});n.Host.ExternalApis.pluginId===3&&n.Host.ExternalApis.addEventListener("showdocument",function(n){i.Communications.directInvoke("showDocument",[n.url,n.oneBasedLine,n.oneBasedColumn])});n.Host.ExternalApis.pluginId===0&&n.Host.ExternalApis.addEventListener("consolebuttonchanged",function(){return i.dispatchEvent("consolebuttonchanged",{},!1)});n.Host.ExternalApis.addEventListener("activeframechanged",function(){return i.dispatchEvent("activeframechanged",null,!1)});n.Host.ExternalApis.addEventListener("break",function(){return i.dispatchEvent("break",null,!1)});n.Host.ExternalApis.addEventListener("run",function(){return i.dispatchEvent("run",null,!1)})}return __extends(w,t),Object.defineProperty(w.prototype,"PluginId",{get:function(){return r},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"JMCType",{get:function(){return y},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"LaunchMode",{get:function(){return p},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"myPluginId",{get:function(){return n.Host.ExternalApis.pluginId},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"myPluginName",{get:function(){return r[this.myPluginId]},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"activePluginId",{get:function(){return n.Host.ExternalApis.activePluginId},enumerable:!0,configurable:!0}),w.prototype.getFilePathFromStreamId=function(t){return n.Host.ExternalApis.storage.getFilePathFromStreamId(t)},w.prototype.bringPluginToForeground=function(){n.Host.ExternalApis.bringToolToForeground()},w.prototype.bringRemoteToForeground=function(){n.Host.ExternalApis.bringRemoteToForeground()},w.prototype.copyFileToStream=function(t,i){n.Host.ExternalApis.storage.copyFileToStream(t,i)},w.prototype.getDoubleClickTime=function(){return n.Host.ExternalApis.utilities.getDoubleClickTime()},w.prototype.setRegEntryForF12=function(t,i){n.Host.ExternalApis.utilities.setRegEntryForF12(t,i)},w.prototype.getRegEntryForF12=function(t){return n.Host.ExternalApis.utilities.getRegEntryForF12(t)},w.prototype.isEnterpriseModeMenuOptionEnabled=function(){return n.Host.ExternalApis.utilities.isEnterpriseModeMenuOptionEnabled()},w.prototype.getQpcFrequency=function(){return n.Host.ExternalApis.utilities.getQpcFrequency()},w.prototype.getQpcTime=function(){return n.Host.ExternalApis.utilities.getQpcTime()},w.prototype.getInspectElementId=function(){return n.Host.ExternalApis.inspectElementId},w.prototype.setInspectElementId=function(t){n.Host.ExternalApis.inspectElementId=t},w.prototype.activateTab=function(t){n.Host.ExternalApis.activateTab(t)},w.prototype.notifyOnToolActivated=function(){n.Host.ExternalApis.notifyOnToolActivated()},w.prototype.openBrowser=function(t){n.Host.ExternalApis.openBrowser(t)},w.prototype.getProcessId=function(){return n.Host.ExternalApis.getProcessId()},w.prototype.getRemoteProcessId=function(){return n.Host.ExternalApis.getRemoteProcessId()},w.prototype.takeForeground=function(){return n.Host.ExternalApis.takeForeground()},w.prototype.setForeground=function(t){return n.Host.ExternalApis.setForeground(t)},w.prototype.allowSetForeground=function(t){return n.Host.ExternalApis.allowSetForeground(t)},w.prototype.getHostInfo=function(){return n.Host.ExternalApis.hostInfo},w.prototype.getIsShowingConsole=function(){return n.Host.ExternalApis.isShowingConsole},w.prototype.setConsoleClientArea=function(t,i,r,u){n.Host.ExternalApis.setConsoleClientArea(t,i,r,u)},w.prototype.showHideConsole=function(){n.Host.ExternalApis.showHideConsole()},w.prototype.notifyOnKeydown=function(t,i){return n.Host.ExternalApis.notifyOnKeydown(t,i)},w.prototype.deleteFile=function(t){n.Host.ExternalApis.storage.deleteFile(t)},w.prototype.getEnvironmentVariable=function(t){return n.Host.ExternalApis.utilities.getEnvironmentVariable(t)},Object.defineProperty(w.prototype,"isTargetEdge",{get:function(){return n.Host.ExternalApis.isTargetEdge},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"traceWriter",{get:function(){return n.Host.ExternalApis.traceWriter},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"launchMode",{get:function(){return n.Host.ExternalApis.launchMode},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"Communications",{get:function(){return typeof this._communications=="undefined"&&(this._communications=new i.Communications),this._communications},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"Utilities",{get:function(){return typeof this._utilities=="undefined"&&(this._utilities=new u),this._utilities},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"Header",{get:function(){return typeof this._header=="undefined"&&(this._header=new f(this.Communications)),this._header},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"Debugger",{get:function(){return typeof this._debugger=="undefined"&&(this._debugger=new e(this.Communications)),this._debugger},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"Profiler",{get:function(){return typeof this._profiler=="undefined"&&(this._profiler=new o(this.Communications)),this._profiler},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"ZoomDisplay",{get:function(){return typeof this._zoomDisplay=="undefined"&&(this._zoomDisplay=new s),this._zoomDisplay},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"ErrorDisplay",{get:function(){return typeof this._errorDisplay=="undefined"&&(this._errorDisplay=new h),this._errorDisplay},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"JMC",{get:function(){return typeof this._jmc=="undefined"&&(this._jmc=new c(this.Communications)),this._jmc},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"TraceWriter",{get:function(){return typeof this._traceWriter=="undefined"&&(this._traceWriter=new l),this._traceWriter},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"SelfTest",{get:function(){return typeof this._selfTest=="undefined"&&(this._selfTest=new a(this.Communications)),this._selfTest},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"Test",{get:function(){return typeof this._test=="undefined"&&(this._test=new v(this.Communications)),this._test},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"TelemetryLogger",{get:function(){return typeof this._telemetryLogger=="undefined"&&(this._telemetryLogger=new i.TelemetryLogger),this._telemetryLogger},enumerable:!0,configurable:!0}),w}(t.EventManager);i.F12Extensions=w})(i=t.Impl||(t.Impl={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){"use strict";function e(){document.addEventListener("keydown",function(n){return t(n)});document.addEventListener("contextmenu",function(n){return n.preventDefault(),n.stopPropagation(),!1});window.addEventListener("mousewheel",function(n){if(n.ctrlKey)return n.preventDefault(),n.stopPropagation(),!1})}function o(n){return n.shiftKey||n.ctrlKey||n.altKey}function s(n){return n.ctrlKey&&!n.shiftKey&&!n.altKey}function t(n){return n.keyCode===116||n.keyCode===117||n.keyCode===121&&n.shiftKey||n.keyCode===70&&n.ctrlKey?(n.preventDefault(),n.stopPropagation(),!1):!0}var i=function(){function n(){}return n.C="c",n.DEL="Del",n.DOWN="Down",n.END="End",n.ENTER="Enter",n.F10="F10",n.HOME="Home",n.LEFT="Left",n.RIGHT="Right",n.SPACEBAR="Spacebar",n.UP="Up",n}(),r,u,f;n.Keys=i,function(n){n[n.Backspace=8]="Backspace";n[n.Tab=9]="Tab";n[n.Enter=13]="Enter";n[n.Shift=16]="Shift";n[n.Control=17]="Control";n[n.Alt=18]="Alt";n[n.CapsLock=20]="CapsLock";n[n.Escape=27]="Escape";n[n.Space=32]="Space";n[n.PageUp=33]="PageUp";n[n.PageDown=34]="PageDown";n[n.End=35]="End";n[n.Home=36]="Home";n[n.ArrowLeft=37]="ArrowLeft";n[n.ArrowFirst=37]="ArrowFirst";n[n.ArrowUp=38]="ArrowUp";n[n.ArrowRight=39]="ArrowRight";n[n.ArrowDown=40]="ArrowDown";n[n.ArrowLast=40]="ArrowLast";n[n.Insert=45]="Insert";n[n.Delete=46]="Delete";n[n.A=65]="A";n[n.B=66]="B";n[n.C=67]="C";n[n.D=68]="D";n[n.E=69]="E";n[n.F=70]="F";n[n.G=71]="G";n[n.H=72]="H";n[n.I=73]="I";n[n.J=74]="J";n[n.K=75]="K";n[n.L=76]="L";n[n.M=77]="M";n[n.N=78]="N";n[n.O=79]="O";n[n.P=80]="P";n[n.Q=81]="Q";n[n.R=82]="R";n[n.S=83]="S";n[n.T=84]="T";n[n.U=85]="U";n[n.V=86]="V";n[n.W=87]="W";n[n.X=88]="X";n[n.Y=89]="Y";n[n.Z=90]="Z";n[n.ContextMenu=93]="ContextMenu";n[n.Multiply=106]="Multiply";n[n.Plus=107]="Plus";n[n.Minus=109]="Minus";n[n.F1=112]="F1";n[n.F2=113]="F2";n[n.F3=114]="F3";n[n.F4=115]="F4";n[n.F5=116]="F5";n[n.F6=117]="F6";n[n.F7=118]="F7";n[n.F8=119]="F8";n[n.F9=120]="F9";n[n.F10=121]="F10";n[n.F11=122]="F11";n[n.F12=123]="F12";n[n.Comma=188]="Comma";n[n.Period=190]="Period"}(n.KeyCodes||(n.KeyCodes={}));r=n.KeyCodes,function(n){n[n.LeftButton=0]="LeftButton";n[n.MiddleButton=1]="MiddleButton";n[n.RightButton=2]="RightButton"}(n.MouseButtons||(n.MouseButtons={}));u=n.MouseButtons,function(n){n[n.None=0]="None";n[n.Shift=1]="Shift";n[n.Ctrl=2]="Ctrl";n[n.Alt=4]="Alt"}(n.KeyFlags||(n.KeyFlags={}));f=n.KeyFlags;n.blockBrowserAccelerators=e;n.HasAnyOfAltCtrlShiftKeyFlags=o;n.HasOnlyCtrlKeyFlags=s;n.preventIEKeys=t})(Common||(Common={})),function(n){var t;(function(n){var t;(function(t){var i;(function(t){"use strict";function i(t,i,r){u.logEntry(t,n.Utilities.formatString(i,r))}function f(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];i(3,n,r)}function e(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];i(2,n,r)}function o(n){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];i(1,n,r)}var u=loadModule("plugin.host.activitylog"),r;(function(n){n[n.ALE_ERROR=1]="ALE_ERROR";n[n.ALE_WARNING=2]="ALE_WARNING";n[n.ALE_INFORMATION=3]="ALE_INFORMATION"})(r||(r={}));t.info=f;t.warn=e;t.error=o})(i=t.ActivityLog||(t.ActivityLog={}))})(t=n.VS||(n.VS={}))})(t=n.Plugin||(n.Plugin={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t;(function(t){var i;(function(t){var i;(function(t){"use strict";function r(t){if(typeof t!="number"||!isFinite(t))throw new Error(n.Resources.getErrorString("JSPlugin.6000"));return t}function u(n){i.fireCodeMarker(r(n))}var i=loadModule("plugin.host.codemarkers");t.fire=u})(i=t.CodeMarkers||(t.CodeMarkers={}))})(i=t.Internal||(t.Internal={}))})(t=n.VS||(n.VS={}))})(t=n.Plugin||(n.Plugin={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";function u(t,i,r,u,f){var e,h,l;return o>=Infinity&&(o=0),e={msgId:++o,portId:t},i&&(e.command=i),r&&(e.args=r),f&&(e.replyRequested=!0),h=JSON.stringify(e),u&&(h+=a+u),f&&(l=new n.Promise(function(n,t){s[e.msgId]={onComplete:n,onError:t}})),c.postMessage(h),l}function w(n,t,i,r){return u(n,t,i,r,!0)}function y(n){var t=new Error(n.message+"\r\n"+n.stack);return t.innerError=n.innerError,t.source=n.source,t.helpLink=n.helpLink,t}function b(t,r,u,f,e){var o;if(typeof t!="string")throw new Error(n.Resources.getErrorString("JSPlugin.1008"));if(typeof u!="function")throw new Error(n.Resources.getErrorString("JSPlugin.1009"));var l=t,s=r||{},h=[],c=!1;return s._forceConnect=function(){c||(o.connect(),c=!0)},s._postMessage=function(n){h.push({message:n});s._forceConnect()},s._sendMessage=function(t){var i=new n.Promise(function(n,i){h.push({message:t,onComplete:n,onError:i})});return s._forceConnect(),i},o=i.createPort(l),o.addEventListener("connect",function a(){o.removeEventListener("connect",a);o.addEventListener("message",function(n){var t=n.data;u(t)});typeof f=="function"&&o.addEventListener("close",f);s._postMessage=function(n){return o.postMessage(n)};s._sendMessage=function(n){return o.sendMessage(n)};h.forEach(function(n){n.onComplete?o.sendMessage(n.message).done(function(t){n.onComplete(t)},function(t){n.onError(t)}):o.postMessage(n.message)});h=null}),e||s._forceConnect(),s}function k(n){t.logError(n)}function d(n,t){r.addEventListener(n,t)}function g(n,t){r.removeEventListener(n,t)}function nt(n){return i.createPort(n)}var c=loadModule("plugin.host.core"),l,e,p,v,i,h;(function(n){n[n.none=0]="none";n[n.portCreated=1]="portCreated";n[n.portClosed=2]="portClosed";n[n.portConnected=3]="portConnected";n[n.controlInitialized=4]="controlInitialized";n[n.hostReady=5]="hostReady";n[n.event=6]="event";n[n.error=7]="error";n[n.initiateShutdown=8]="initiateShutdown";n[n.shutdownComplete=9]="shutdownComplete"})(l||(l={})),function(n){function r(n){var t=new Error(n.message+"\r\n"+n.stack);return t.innerError=n.innerError,t.source=n.source,t.helpLink=n.helpLink,t}function u(n,t){var f=0,r=0,u="",e,i,o;for(n=""+n;r<n.length;)if(e=n.indexOf("%",r),e===-1||e===n.length-1)u+=n.substring(r),r=n.length;else{u+=n.substring(r,e);r=e+1;i=t[f];switch(n[r]){case"d":case"i":typeof i!="undefined"&&(i=typeof i=="number"?i>=0?Math.floor(i):Math.ceil(i):parseInt(i),i!==~~i&&(i=0));u+=i;f++;r++;break;case"f":i===null?i=0:typeof i!="undefined"&&(i=parseFloat(i));u+=i;f++;r++;break;case"s":case"o":typeof i!="undefined"&&(i=""+i);u+=i;f++;r++;break;case"%":u+="%";r++;break;default:u+="%"}}for(o=f;o<t.length;o++)u+=t[o];return u}var t=function(){function n(n,t,i){this.type=n;this.timeStamp=Date.now();this.target=i;var r=this;t&&typeof t=="object"&&Object.getOwnPropertyNames(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i)})}return Object.defineProperty(n.prototype,"bubbles",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"cancelable",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"currentTarget",{get:function(){return this.target},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"defaultPrevented",{get:function(){return!!this._preventDefaultsCalled},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"trusted",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isTrusted",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CAPTURING_PHASE",{get:function(){return n.CAPTURING_PHASE},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"AT_TARGET",{get:function(){return n.AT_TARGET},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"BUBBLING_PHASE",{get:function(){return n.BUBBLING_PHASE},enumerable:!0,configurable:!0}),n.prototype.preventDefault=function(){this._preventDefaultsCalled=!0},n.prototype.stopImmediatePropagation=function(){this._stopImmediatePropagationCalled=!0},n.prototype.stopPropagation=function(){},n.prototype.initEvent=function(){},n.supportForProcessing=!1,n.NONE=0,n.CAPTURING_PHASE=1,n.AT_TARGET=2,n.BUBBLING_PHASE=3,n}(),i;t.prototype.eventPhase=0;t.prototype.detail=null;i=function(){function n(){}return n.prototype.addEventListener=function(n,t){var i,r,u,f;for(this.listeners=this.listeners||{},i=this.listeners[n]=this.listeners[n]||[],r=0,u=i.length;r<u;r++)if(f=i[r],f.listener===t)return;i.push({listener:t})},n.prototype.dispatchEvent=function(n,i){var r=this.listeners&&this.listeners[n],e=this.target&&this.target["on"+n],u,f,o;if(r||typeof e=="function"){if(u=new t(n,i,this.target),r)for(r=r.slice(0,r.length),f=0,o=r.length;f<o&&!u._stopImmediatePropagationCalled;f++)r[f].listener(u);return typeof e=="function"&&e(u),u.defaultPrevented||!1}return!1},n.prototype.removeEventListener=function(n,t){var i=this.listeners&&this.listeners[n],r,u,f;if(i)for(r=0,u=i.length;r<u;r++)if(f=i[r],f.listener===t){i.splice(r,1);i.length===0&&delete this.listeners[n];break}},n.prototype.setTarget=function(n){this.target=n},n}();n.EventManager=i;n.marshalHostError=r;n.formatString=u}(e=n.Utilities||(n.Utilities={})),function(){}(e=n.Utilities||(n.Utilities={}));var f=0,a="$",o=0,s=[],r=new e.EventManager,t;(function(n){function u(n){if(i){var r=document.getElementById("pluginMessages");r&&(r.innerHTML+="<\/br>"+n)}else{t.push(n);return}}function f(n){u(n)}function e(n){f("Error: "+n)}var t=[],i=!1;document.body?i=!0:r.addEventListener("load",function(){if(i=!0,t){for(var n=0;n<t.length;n++)u(t[n]);t=null}});n.log=f;n.logError=e})(t||(t={})),function(n){n[n.connected=0]="connected";n[n.disconnected=1]="disconnected";n[n.closed=2]="closed"}(n.PortState||(n.PortState={}));p=n.PortState;v=function(){function n(n){this.name=n;this.eventManager=new e.EventManager;this.eventManager.setTarget(this);this._state=1}return Object.defineProperty(n.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),n.prototype.removeEventListener=function(n,t){this.eventManager.removeEventListener(n,t)},n.prototype.addEventListener=function(n,t){this.eventManager.addEventListener(n,t)},n.prototype.dispatchEvent=function(n){return this.eventManager.dispatchEvent(n)},n.prototype.connect=function(){if(this._state!==1)return!1;var n=this,t=i.registerPort(this.name,function(){if(n._state===1){n._state=0;var t={port:n};n.eventManager.dispatchEvent("connect",t)}},function(){n._state===0&&(n._state=1)},function(t){if(n._state===0){var i={data:t};n.eventManager.dispatchEvent("message",i)}});return this._cookie=t,!0},n.prototype.postMessage=function(n){this._state===0&&i.postMessage(this._cookie,n)},n.prototype.sendMessage=function(n){if(this._state===0)return i.sendMessage(this._cookie,n)},n.prototype.close=function(){if(this._state!==2){this._state=2;i.unregisterPort(this._cookie);this.eventManager.dispatchEvent("close",{})}},n}(),function(i){function h(t){if(typeof t!="string"||t.length<=0)throw new Error(n.Resources.getErrorString("JSPlugin.1001"));if(e[t])throw new Error(n.Resources.getErrorString("JSPlugin.1002")+"\r\n"+t);return new v(t)}function c(t,i,o,h){if(typeof t!="string"||t.length<=0)throw new Error(n.Resources.getErrorString("JSPlugin.1001"));if(e[t])throw new Error(n.Resources.getErrorString("JSPlugin.1002")+"\r\n"+t);if(typeof i!="function")throw new Error(n.Resources.getErrorString("JSPlugin.1003"));if(typeof o!="function")throw new Error(n.Resources.getErrorString("JSPlugin.1004"));if(typeof h!="function")throw new Error(n.Resources.getErrorString("JSPlugin.1005"));var c=++s;return r[c]=e[t]={id:null,name:t,onConnect:i,onDisconnect:o,onMessage:h},u(f,1,[t]),c}function l(n){var t=r[n];t&&(delete r[n],t.name&&delete e[t.name],t.id&&delete o[t.id],u(f,2,[t.name]))}function a(t,i){if(!r[t]||r[t].id===null)throw new Error(n.Resources.getErrorString("JSPlugin.1006"));u(r[t].id,0,null,i)}function y(t,i){if(!r[t]||r[t].id===null)throw new Error(n.Resources.getErrorString("JSPlugin.1006"));return w(r[t].id,0,null,i)}function p(n,i){var r=e[i];r?(r.id=n,o[n]=r,r.onConnect()):t.logError("JSPlugin.1010\r\n"+i)}function b(n){var i=o[n];i?i.onDisconnect():t.logError("JSPlugin.1011\r\n"+n)}function k(n,i){var r=o[n];if(r)r.onMessage(i);else t.logError("JSPlugin.1012\r\n"+n)}var r={},e={},o={},s=1;i.createPort=h;i.registerPort=c;i.unregisterPort=l;i.postMessage=a;i.sendMessage=y;i.processPortConnectedMessage=p;i.processPortClosedMessage=b;i.processMessage=k}(i||(i={})),function(n){function u(){t&&i&&r.dispatchEvent("pluginready",{})}function f(){r.dispatchEvent("hostready",{});t=!0;u()}var t=!1,i=!1;window.addEventListener("DOMContentLoaded",function(){i=!0;u()});n.setHostReady=f}(h||(h={}));c.messageReceived=function(e){var c,g,o,v,p,l,w,b,k,d,nt;if(typeof e=="string"){c=e.indexOf(a);c===-1&&(c=e.length);g=e.substr(0,c);try{o=JSON.parse(g)}catch(tt){t.logError("JSPlugin.1013")}if(v=e.substr(c+1),o.replyId>0){if(l=s[o.replyId],l){delete s[o.replyId];switch(o.command){case 0:l.onComplete(v);break;case 7:o.args&&o.args.length||t.logError("JSPlugin.1014");l.onError(o.args[0]);break;default:t.logError("JSPlugin.1015");l.onError(new Error(n.Resources.getErrorString("JSPlugin.1015")))}}else if(o.command===7)if(o.args&&o.args[0])throw y(o.args[0]);else throw new Error(n.Resources.getErrorString("JSPlugin.1007"))}else if(o.portId>f&&o.command===0)i.processMessage(o.portId,v);else switch(o.command){case 5:h.setHostReady();break;case 2:if(o.args&&o.args.length||t.logError("JSPlugin.1016"),w=o.args[0],typeof w!="number"){t.logError("JSPlugin.1016");return}i.processPortClosedMessage(w);break;case 3:if(o.args&&o.args.length||t.logError("JSPlugin.1017"),b=o.args[0],k=o.args[1],typeof b!="number"||typeof k!="string"){t.logError("JSPlugin.1017");return}i.processPortConnectedMessage(b,k);break;case 6:o.args&&o.args.length||t.logError("JSPlugin.1018");d=o.args[0];p=o.args[1];typeof d!="string"&&t.logError("JSPlugin.1018");r.dispatchEvent(d,p);break;case 8:r.dispatchEvent("close",p);u(f,9);break;default:nt=o.args&&o.args.length?y(o.args[0]):new Error(n.Resources.getErrorString("JSPlugin.1007"));throw nt}}};n.attachToPublishedObject=b;n._logError=k;n.addEventListener=d;n.removeEventListener=g;n.createPort=nt;r.setTarget(n);window.addEventListener("load",function(){r.dispatchEvent("load",{})});r.addEventListener("load",function(){for(var t=document.getElementsByTagName("*"),n=0;n<t.length;n++)t[n].className+=t[n].nodeName==="INPUT"||t[n].nodeName==="TEXTAREA"?" selectElement":" selectNone"});document.oncontextmenu=function(){return!1};document.ondragstart=function(){return!1};u(f,4)})(t=n.Plugin||(n.Plugin={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t;(function(t){"use strict";function u(n,u,f,e,o){if(t.lang=n,t.dir=u,t.formatRegion=f,t.DateTimeFormat=e,t.NumberFormat=o,!r){var s=document.getElementsByTagName("html");if(s.length>0)r=!0,s[0].dir=t.dir,s[0].lang=t.lang,i.dispatchEvent("cultureinitialize");else return!1}return!0}function e(n,t){i.addEventListener(n,t)}function o(n,t){i.removeEventListener(n,t)}var f=loadModule("plugin.host.culture"),r,i;t.dir="";t.lang="";t.formatRegion="";t.DateTimeFormat={};t.NumberFormat={};r=!1;i=new n.Utilities.EventManager;i.setTarget({});f.addEventListener("cultureinitialize",function(t){u(t.language,t.direction,t.formatRegion,t.dateTimeFormat,t.numberFormat)||n.addEventListener("load",function(){return u(t.language,t.direction,t.formatRegion,t.dateTimeFormat,t.numberFormat)})});f.addEventListener("culturechanged",function(n){u(n.language,n.direction,n.formatRegion,n.dateTimeFormat,n.numberFormat);i.dispatchEvent("culturechanged")});t.addEventListener=e;t.removeEventListener=o})(t=n.Culture||(n.Culture={}))})(t=n.Plugin||(n.Plugin={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t;(function(n){"use strict";function i(n,t,i,f,e){return e&&(n=e),r(n,t,i,[],f),u(),!0}function r(n,i,r,u,f){var o,h,c,s,e;return n instanceof Error?(o=n.message?n.message.toString():null,s=u,n&&n.number&&typeof n.number=="number"&&(u="Error number: 0x"+(n.number>>>0).toString(16)+"\r\n"),u+="Stack: "+n.stack,s&&(e=s.toString(),e&&e.length>0&&(u+="\r\n\r\nAdditional Info: "+e))):(o=n?n.toString():null,u=u?u.toString():null),i=i?i.toString():null,h=r?r.toString():null,c=f?f.toString():null,t.reportError(o,i,h,u,c)}function u(){t.terminate()}var t=loadModule("plugin.host.diagnostics");n.onerror=i;window.onerror=i;n.reportError=r;n.terminate=u})(t=n.Diagnostics||(n.Diagnostics={}))})(t=n.Plugin||(n.Plugin={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(t){var i;(function(t){"use strict";function r(n,t,r){return i.showDocument(""+n,+t,+r)}function u(n){return i.getDocumentLocation(""+n)}function f(){return i.supportsAllowSetForeground()}function e(n){return i.allowSetForeground(n)}var i=loadModule("plugin.host");Object.defineProperty(n.Plugin.Host,"version",{get:function(){return i.version}});t.showDocument=r;t.getDocumentLocation=u;t.supportsAllowSetForeground=f;t.allowSetForeground=e})(i=t.Host||(t.Host={}))})(t=n.Plugin||(n.Plugin={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t;(function(t){var i;(function(t){"use strict";function i(t,i,r){var u=new n.Utilities.EventManager,f=n.attachToPublishedObject(t,i,function(t){if(typeof t=="string"){var i=JSON.parse(t);typeof i.eventName=="string"?u.dispatchEvent(i.eventName,i.arg):n._logError("JSPlugin.2000")}else n._logError("JSPlugin.2001")},function(){n._logError("JSPlugin.2002\r\n"+t)},r);return u.setTarget(f),f._post=function(n){for(var r,i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];r={method:n,args:i.length?i:undefined};this._postMessage(JSON.stringify(r))},f._call=function(n){var t={method:n,args:arguments.length>1?Array.prototype.slice.call(arguments,1):undefined};return this._sendMessage(JSON.stringify(t)).then(function(n){var t=JSON.parse(n);return t.result})},f.addEventListener=r?function(n,t){f._forceConnect();u.addEventListener(n,t);f.addEventListener=u.addEventListener.bind(u)}:u.addEventListener.bind(u),f.removeEventListener=u.removeEventListener.bind(u),f}t.attachToPublishedObject=i})(i=t.JSONMarshaler||(t.JSONMarshaler={}))})(t=n.Utilities||(n.Utilities={}))})(t=n.Plugin||(n.Plugin={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){"use strict";function i(i){for(var u=[],r=1;r<arguments.length;r++)u[r-1]=arguments[r];t.log(n.Utilities.formatString(i,u))}var t=loadModule("plugin.host.output");n.log=i})(t=n.Plugin||(n.Plugin={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t;(function(t){"use strict";function e(t){var r,e;if(typeof t.GenericError!="string"||t.GenericError==="")throw new Error(n.Resources.getErrorString("JSPlugin.3000"));if(f=t.GenericError,r=t.ResourceMap,!r){n._logError("JSPlugin.3001");return}i=r;e=t.DefaultAlias;e&&(u=e)}function s(t,i,r){return i.replace(o,function(i,u){var f,e;switch(i){case"{{":f="{";break;case"}}":f="}";break;case"{":case"}":throw new Error(n.Resources.getErrorString("JSPlugin.3002"));default:if(e=parseInt(u),r&&r.length-1>=e)f=r[e];else throw new Error(n.Resources.getErrorString("JSPlugin.3003")+" ("+t+")")}return(typeof f=="undefined"||f===null)&&(f=""),typeof f!="string"&&(f=f.toString()),f})}function h(t){for(var c=[],r=1;r<arguments.length;r++)c[r-1]=arguments[r];if(typeof t!="string"||t==="")throw new Error(n.Resources.getErrorString("JSPlugin.3004"));var f=u,e="",o="",h=t.split("/");switch(h.length){case 1:e=h[0];break;case 3:f=h[1];e=h[2];break;default:throw new Error(n.Resources.getErrorString("JSPlugin.3004"))}if(!i[f]||!i[f][e])throw new Error(n.Resources.getErrorString("JSPlugin.3005")+" ("+t+")");return o=i[f][e],c.length>0&&(o=s(t,o,c)),o}function c(n){if(typeof n!="string"||n==="")throw new Error(f+"JSPlugin.3006");return f+n}function l(t){t&&typeof t.isRelative=="undefined"&&(t.isRelative=!0);var f=r.loadResources(t);return f?f.then(function(n){var r,e,o,f,s;if(n)if(r=t.alias,e=i[r],e)for(o=Object.keys(n),f=0;f<o.length;f++)s=o[f],e[s]=n[s];else i[r]=n;t.isDefault&&(u=r)}):n.Promise.wrap(null)}function a(n,t){r.addEventListener(n,t)}function v(n,t){r.removeEventListener(n,t)}(function(n){n[n.resx=0]="resx";n[n.resjson=1]="resjson";n[n.embedded=2]="embedded"})(t.ResourceType||(t.ResourceType={}));var y=t.ResourceType,r=loadModule("plugin.host.resources"),u="Resources",f="An error has occurred.  Please try the operation again.  You can search for the error online: ",i={},o=/\{{2}|\{(\d+)\}|\}{2}|\{|\}/g;r.addEventListener("resourcesinitialized",e);r.addEventListener("resourceschanged",e);t.getString=h;t.getErrorString=c;t.loadResourceFile=l;t.addEventListener=a;t.removeEventListener=v})(t=n.Resources||(n.Resources={}))})(t=n.Plugin||(n.Plugin={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t;(function(t){"use strict";function p(t,f,e,o){if(!i(t)&&typeof t!="string")throw new Error(n.Resources.getErrorString("JSPlugin.7003"));if(!i(e)&&!u(e))throw new Error(n.Resources.getErrorString("JSPlugin.7008"));if(!i(o)&&!u(o))throw new Error(n.Resources.getErrorString("JSPlugin.7005"));return r.getFileList(t,f,e,o)}function w(t,u){if(!i(t)&&typeof t!="string")throw new Error(n.Resources.getErrorString("JSPlugin.7006"));var o=e(u);return o.mode=1,r.openFile(t,o).then(function(n){return new f(n,o)})}function b(t,i){if(typeof t!="string"||t==="")throw new Error(n.Resources.getErrorString("JSPlugin.7003"));var u=e(i);return r.openFile(t,u).then(function(n){return new f(n,u)})}function k(n,t){var u=o(n),i=e(t);return r.fileDialog(0,u,i).then(function(n){if(n!==null&&n!=="")return new f(n,i)})}function d(n,t){var u=o(n),i=e(t);return i.mode=4,r.fileDialog(1,u,i).then(function(n){if(n!==null&&n!=="")return new f(n,i)})}function e(n){var t={access:3,encoding:"UTF-8",mode:3,persistence:1,share:0,type:1};return n&&(t.access=i(n.access)?t.access:n.access,t.encoding=n.encoding||t.encoding,t.mode=i(n.mode)?t.mode:n.mode,t.persistence=i(n.persistence)?t.persistence:n.persistence,t.share=i(n.share)?t.share:n.share,t.type=i(n.type)?t.type:n.type),t}function o(n){var t={name:"",extensions:[],extensionsIndex:0,initialDirectory:"",title:""};return n&&(t.name=n.name||t.name,t.extensions=n.extensions||t.extensions,t.extensionsIndex=n.extensionsIndex||t.extensionsIndex,t.initialDirectory=n.initialDirectory||t.initialDirectory,t.title=n.title||t.title),t}function u(n){return parseFloat(n)===parseInt(n)&&!isNaN(n)}function i(n){return n===null||typeof n=="undefined"}var r=loadModule("plugin.host.storage"),s,h,c,l,a,v,y,f;(function(n){n[n.read=1]="read";n[n.write=2]="write";n[n.readWrite=3]="readWrite"})(t.FileAccess||(t.FileAccess={}));s=t.FileAccess,function(n){n[n.open=0]="open";n[n.save=1]="save"}(t.FileDialogMode||(t.FileDialogMode={}));h=t.FileDialogMode,function(n){n[n.createNew=1]="createNew";n[n.create=2]="create";n[n.open=3]="open";n[n.openOrCreate=4]="openOrCreate";n[n.truncate=5]="truncate";n[n.append=6]="append"}(t.FileMode||(t.FileMode={}));c=t.FileMode,function(n){n[n.none=0]="none";n[n.read=1]="read";n[n.write=2]="write";n[n.readWrite=3]="readWrite";n[n["delete"]=4]="delete"}(t.FileShare||(t.FileShare={}));l=t.FileShare,function(n){n[n.binary=0]="binary";n[n.text=1]="text"}(t.FileType||(t.FileType={}));a=t.FileType,function(n){n[n.permanent=0]="permanent";n[n.temporary=1]="temporary"}(t.FilePersistence||(t.FilePersistence={}));v=t.FilePersistence,function(n){n[n.begin=0]="begin";n[n.current=1]="current";n[n.end=2]="end"}(t.SeekOrigin||(t.SeekOrigin={}));y=t.SeekOrigin;f=function(){function t(n,t){this.maxBuffer=32768;this.id=n;this.options=t}return Object.defineProperty(t.prototype,"streamId",{get:function(){return this.id},enumerable:!0,configurable:!0}),t.prototype.close=function(){return r.closeFile(this.id)},t.prototype.read=function(t){if(!i(t)&&!u(t))throw new Error(n.Resources.getErrorString("JSPlugin.7005"));if(i(t)){var f;return f=this.options.type===0?[]:"",this.readAllHelper(f)}return r.read(this.id,t,this.options.type)},t.prototype.seek=function(t,f){if(!u(t))throw new Error(n.Resources.getErrorString("JSPlugin.7000"));if(i(f))throw new Error(n.Resources.getErrorString("JSPlugin.7001"));return r.seek(this.id,t,f)},t.prototype.write=function(t,f,e){if(typeof t!="string"&&!(t instanceof Array))throw new Error(n.Resources.getErrorString("JSPlugin.7002"));if(!i(f)&&!u(f))throw new Error(n.Resources.getErrorString("JSPlugin.7000"));if(f=f||0,!i(e)&&!u(e))throw new Error(n.Resources.getErrorString("JSPlugin.7007"));return e=e||t.length,r.write(this.id,t,f,e,this.options.type)},t.prototype.readAllHelper=function(n){var t=this;return r.read(this.id,this.maxBuffer,this.options.type).then(function(i){return i===null||i.length===0?n:t.readAllHelper(n.concat(i))})},t}();t.getFileList=p;t.createFile=w;t.openFile=b;t.openFileDialog=k;t.saveFileDialog=d})(t=n.Storage||(n.Storage={}))})(t=n.Plugin||(n.Plugin={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t;(function(n){"use strict";function i(n,i){return t.get(n,i)}function r(n,i){return t.set(n,i)}var t=loadModule("plugin.host.settings");n.get=i;n.set=r})(t=n.Settings||(n.Settings={}))})(t=n.Plugin||(n.Plugin={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(t){var i;(function(i){"use strict";function v(n,i,r){if(e=n,!e){t._logError("JSPlugin.4001");return}h=i;it(r);c.processImages(document)}function y(n){if(!e[n])throw new Error(t.Resources.getErrorString("JSPlugin.4002"));return e[n]}function g(i){var u,r,f,e,o,s;for(i||(i=document),u=i.querySelectorAll("[data-plugin-svg]"),r=0;r<u.length;r++){if(f=n.Plugin.Theme.getValue(u[r].getAttribute("data-plugin-svg")),e=nt(f),u[r].innerHTML=e,!u[r].firstChild)throw new Error(t.Resources.getErrorString("JSPlugin.4002"));o=u[r].firstChild;s=u[r].parentNode;s.replaceChild(o,u[r])}}function nt(n){var t={"&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&amp;":"&"};return n.replace(/(&lt;|&gt;|&quot;|&apos;|&amp;)/g,function(n,i){return t[i]})}function tt(n){return r.getCssFile(n,!1).then(function(n){return t.Promise.wrap(l(n,f))})}function it(n){var t,u,f,e,o,a,y;if(s){if(t=document.createElement("style"),t.type="text/css",t.innerHTML=l(s,n),u=document.head.firstChild,u?(document.head.insertBefore(t,u),u.id==="pluginCss"&&document.head.removeChild(u)):document.head.firstChild=t,t.id="pluginCss",f=document.querySelectorAll("[data-plugin-theme='true']"),h&&f.length===0){r.fireThemeReady();return}for(e=0;e<f.length;e++){var i=f[e],p=i.href?i.href:i.getAttribute("data-plugin-theme-href"),w=h&&e===f.length-1,v={};for(o=0;o<i.attributes.length;o++)a=i.attributes[o],y=a.nodeName.indexOf("data-")===0,y&&(v[a.nodeName]=a.nodeValue);c.processCssFileContents(p,document,i,w,n,v)}}}function rt(n,t){return n&&n.match(/rgba/i)!==null?n:t&&t.match(/rgba/i)!==null?t:null}function l(n,t){return n.replace(w,function(n,i,r,f,o,s){var c=0,h=o.replace(k,function(n,i,r,f){var l=!1,o,a,s,v,y,w,h;if(r&&r.toUpperCase()==="!HCONLY"?l=!0:f&&f.toUpperCase()==="!HCONLY"&&(l=!0),l&&typeof t!="undefined"&&!t)return null;if(c++,o=e[i],a=rt(r,f),a&&(s=a.match(b),v="1.0",s&&s.length>=1&&(v=s[0].replace(/\(|\)|\s/g,"")),u=u||document.createElement("div"),u.style.backgroundColor=o,y=u.style.backgroundColor.split(","),y.length===3)){for(w=[],h=0;h<3;h++)w.push(parseInt(y[h].replace(p,""),10));u.style.backgroundColor="rgba("+w.join(", ")+", "+v+")";o=u.style.backgroundColor}return o});return(c===0||h.match(d))&&(h=f),i+r+": "+h+";"+s})}function ut(n,t){return o.addEventListener(n,t)}function ft(n,t){return o.removeEventListener(n,t)}var r=loadModule("plugin.host.theme"),f=!1,h=!1,e={},s,u,p=/[^0-9]+/g,w=/^(\s*)([\w\-]+)\s*:\s*([^;^\{\*]+|url\([^\)]+\));\s*\/\*\s*\[([^\[\]]+)\]\s*\*\/(.*)$/gm,b=/\(([^\)]+)\)/,a=/(?:\s+((?:rgba\s*\([^\)]+\))|(?:\!HCOnly)))?/,k=new RegExp("\\{"+/\s*([\{\}\w\-]*)/.source+a.source+a.source+"\\s*\\}","igm"),d=/undefined|null/,o=new t.Utilities.EventManager,c;o.setTarget(r);r.addEventListener("themeinitialize",function(n){if(s=n.PluginCss,!s){t._logError("JSPlugin.4000");return}f=n.isHighContrastTheme;v(n.themeMap,!0,f);o.dispatchEvent("themeinitialize")});r.addEventListener("themechanged",function(n){f=n.isHighContrastTheme;v(n.themeMap,!1,f);o.dispatchEvent("themechanged")});i.getValue=y;i.processInjectedSvg=g;i.processCSSFileForThemeing=tt,function(n){function i(n,i,u,f,e,o){return r.getCssFile(n,!0).done(function(t){var s,h;if(t){if(t=l(t,e),s=i.createElement("style"),s.setAttribute("data-plugin-theme","true"),s.setAttribute("data-plugin-theme-href",n),o)for(h in o)s.setAttribute(h,o[h]);if(s.type="text/css",s.innerHTML=t,u){if(!u.parentNode)return;i.head.insertBefore(s,u);i.head.removeChild(u);s.id=u.id}else i.head.appendChild(s)}f&&r.fireThemeReady()},function(n){f&&r.fireThemeReady();t._logError("JSPlugin.4003\r\n"+n.message+"\r\n"+n.stack)})}function u(n){for(var i=n.querySelectorAll("[data-plugin-theme-src]"),t=0;t<i.length;t++)i[t].src=y(i[t].getAttribute("data-plugin-theme-src"))}n.processCssFileContents=i;n.processImages=u}(c=i._cssHelpers||(i._cssHelpers={}));i.addEventListener=ut;i.removeEventListener=ft})(i=t.Theme||(t.Theme={}))})(t=n.Plugin||(n.Plugin={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t;(function(t){"use strict";function w(){return u.canCreatePopup()}function b(){f=!1}function ot(t){var y=f&&(typeof t.useCachedDocument=="undefined"||typeof t.useCachedDocument=="boolean"&&t.useCachedDocument),r,i,l,a,v;if(!y){var p=n.Culture.dir,w=n.Culture.lang,b='xmlns="http://www.w3.org/1999/xhtml" lang="'+w+'" dir="'+p+'" style="overflow: hidden"',k="<html "+b+">",o="<!DOCTYPE html>"+k+'<head><meta http-equiv="X-UA-Compatible" content="IE=Edge"/><meta charset="UTF-16">',c=document.head.querySelectorAll("style, link[type='text/css']");for(r=0;r<c.length;r++){var s=c[r],h=document.createElement(s.nodeName),e=s.attributes;for(i=0;i<e.length;i++)e[i].specified&&h.setAttribute(e[i].nodeName,e[i].nodeValue);h.innerHTML=s.innerHTML;o+=h.outerHTML}l='<body style="margin: 0px">';o+="<\/head>"+l;a="<\/body>";v=o+t.content+a;t.content=v}f||(f=!0);u.hostContentInPopup(t)}function st(){u.dismissPopup()}function ht(n){if(n){var t=n.contentDiv;t.innerHTML="";n.parent=null;a=!0}}function h(n){var t=null,r;s&&(clearTimeout(s),s=null);e&&(clearTimeout(e),e=null);i&&(t=i.parent,r=w(),r?st():(document.body.contains(i)&&document.body.removeChild(i),i.style.display="none"),(typeof n=="undefined"||n)&&ht(i));__n("TooltipDismiss",i,t,typeof n=="undefined"||n)}function d(n,t){i&&i.parent===n&&h(t)}function ct(){var n=document.createElement("div");return n.setAttribute("id","plugin-vs-tooltip"),n}function lt(){var n=document.createElement("div");return n.setAttribute("id","plugin-vs-tooltip-nested-cell"),n}function at(){var n=document.createElement("div");return n.setAttribute("id","plugin-vs-tooltip-content"),n}function vt(){var n=document.createElement("div");return n.id="plugin-vs-tooltip-measure-container",n.style.position="absolute",n.style.display="none",document.body.appendChild(n),n}function yt(){var n=ct(),i=lt(),t;return n.appendChild(i),t=at(),i.appendChild(t),n.contentDiv=t,n}function g(){if(!a)throw new Error(n.Resources.getErrorString("JSPlugin.4004"));var t=i;return t===null&&(t=i=yt(),t.contentDiv.addEventListener("mouseover",function(){t.style.display="none";__n("TooltipDismiss",t,t.parent,!1)})),t}function pt(n){return c||(c=document.createElement("div")),c.innerText=n,c.innerHTML}function wt(t){var r=g(),i=r.contentDiv,u,f;return i&&(u=typeof t.contentContainsHTML=="boolean",f=u?t.contentContainsHTML:n.Tooltip.defaultTooltipContentToHTML,typeof t.content=="string"?(i.innerHTML=f?t.content:pt(t.content),n.Theme._cssHelpers.processImages(i)):t.content&&(i.innerText=t.content)),r}function v(n){var t=g(),i;return t&&n&&(i=t.contentDiv,i&&(i.innerText=n)),t}function bt(n,t){var i=document.documentElement.clientWidth-(n+t);return i<0&&(n=document.documentElement.clientWidth-(t+1)),n}function kt(n,t,i){var r=document.documentElement.clientHeight-(n+t);return r<0&&(n-=t+2*i+1,n<0&&(n=0)),n}function nt(n){var t=n["box-sizing"];return typeof t=="string"&&t.toLowerCase()==="border-box"}function tt(n,t){if(nt(t))return n;var i=parseInt(t["border-top-width"],10),r=parseInt(t["border-bottom-width"],10),u=parseInt(t["padding-top"],10),f=parseInt(t["padding-bottom"],10);return n-(i+r+u+f)}function it(n,t){if(nt(t))return n;var i=parseInt(t["border-right-width"],10),r=parseInt(t["border-left-width"],10),u=parseInt(t["padding-left"],10),f=parseInt(t["padding-right"],10);return n-(i+r+u+f)}function y(n,t){t.width&&(n.style.width=t.width);t.height&&(n.style.height=t.height);t.left&&(n.style.left=t.left);t.top&&(n.style.top=t.top)}function rt(n,t){return typeof n[t]=="number"&&isFinite(n[t])}function dt(n){return n!=null&&rt(n,"Width")&&rt(n,"Height")}function ut(n){var v,f,c,g,p,rt;if(n.tooltip){var ut=typeof n.position=="undefined"||typeof n.position.clientX!="number",i=ut?o.clientX:n.position.clientX,nt=0,b=typeof n.position=="undefined"||typeof n.position.clientY!="number",t=b?o.clientY:n.position.clientY;b&&(nt=1);n.duration=typeof n.duration=="number"?n.duration:(l||(l=u.getDblClickTime()))*10;var k=-500,d=-500,a=w();a&&(r||(r=vt()),v=u.getScreenSizeForXY(window.screenX+i,window.screenY+t),dt(v)&&(k=-v.Width,d=-v.Height,r.style.display="inline",r.style.top=d+"px",r.style.left=k+"px",r.style["min-width"]=v.Width+"px",r.style["min-height"]=v.Height+"px"));y(n.tooltip,{left:k+"px",top:d+"px",width:"auto",height:"auto"});a?r.appendChild(n.tooltip):document.body.appendChild(n.tooltip);n.tooltip.style.display="table";f=n.tooltip.offsetWidth;c=n.tooltip.offsetHeight;a&&(r.style.display="none");g=nt*et;a||(t+=g);p=window.getComputedStyle(n.tooltip);a?(y(n.tooltip,{left:"0px",top:"0px",width:it(f,p)+1+"px",height:tt(c,p)+1+"px"}),f+=1,c+=1,rt={content:n.tooltip.outerHTML,clientCoordinates:{X:i,Y:t},contentSize:{Width:f,Height:c},ensureNotUnderMouseCursor:!0,placementTargetIsMouseRect:b,useCachedDocument:n.useCachedDocument},ot(rt),n.tooltip.style.display="none",r.removeChild(n.tooltip)):(i=bt(i,f),t=kt(t,c,g),i+=window.pageXOffset,t+=window.pageYOffset,y(n.tooltip,{left:i+"px",top:t+"px",width:it(f,p)+1+"px",height:tt(c,p)+1+"px"}))}s=null;n.duration>0&&(e=setTimeout(function(){h(!1);e=null},n.duration));a||__n("TooltipShow",n.tooltip,i,t,f,c,n.duration,e)}function gt(n,t,i,r,e){if(!n)return null;if(t=typeof t=="number"?t:l||(l=u.getDblClickTime()),e=typeof e!="undefined"?e:f,t<=0)return ut({tooltip:n,duration:i,position:r,useCachedDocument:e}),null;var o=setTimeout(function(){ut({tooltip:n,duration:i,position:r,useCachedDocument:e})},t);return __n("TooltipShowScheduled",n,t),o}function ft(t,r){h();var o=f,u=null,e={};if(t&&typeof t=="object"){if(o&&typeof t.useCachedDocument=="boolean"&&(o=t.useCachedDocument),t.resource)if(t.content||t.content==="")try{u=v(n.Resources.getString(t.resource))}catch(c){}else u=v(n.Resources.getString(t.resource));if(!u&&(t.content||t.content==="")&&(u=wt(t)),!u)throw new Error(n.Resources.getErrorString("JSPlugin.4005"));e=t}else u=v(t);if(!u)throw new Error(n.Resources.getErrorString("JSPlugin.4006"));u.parent=r;i=u;a=!1;s=gt(u,e.delay,e.duration,{clientX:e.x,clientY:e.y},o)}function p(t){function r(n,t){for(var i=t?t.parentNode:null;i&&i!==document.body;){if(i===n)return!0;i=i.parentNode}return!1}function u(n){var t=n.currentTarget,o,s;if(!t.hasAttribute("data-plugin-vs-tooltip")){t.removeEventListener("mouseover",u);t.removeEventListener("mouseout",f);t.removeEventListener("mousedown",e);t.__plugin_tooltip_initialized=!1;return}i&&!a&&i.parent&&(i.parent===n.currentTarget||i.parent===n.target||r(i.parent,n.target)&&r(n.currentTarget,i.parent))||(o=t.getAttribute("data-plugin-vs-tooltip"),s=typeof o=="string"&&o.length>0&&o[0]==="{"?JSON.parse(o):o,ft(s,n.currentTarget))}function f(n){n.relatedTarget&&n.currentTarget!==n.relatedTarget&&!r(n.currentTarget,n.relatedTarget)&&d(n.currentTarget)}function e(n){d(n.currentTarget,!1)}if(!t||!t.addEventListener){n._logError("JSPlugin.4007");return}!t.__plugin_tooltip_initialized&&t.hasAttribute("data-plugin-vs-tooltip")&&(t.addEventListener("mouseover",u,!0),t.addEventListener("mouseout",f),t.addEventListener("mousedown",e),t.__plugin_tooltip_initialized=!0)}function ni(n){ft(n,null)}function ti(n){h(n)}var k,c;t.defaultTooltipContentToHTML=!0;var u=loadModule("plugin.host.tooltip"),et=15,l,f=!1,i=null,a=!0,s,e,o={clientX:0,clientY:0,screenX:0,screenY:0},r;t.invalidatePopupTooltipDocumentCache=b;k=loadModule("plugin.host.theme");k.addEventListener("themechanged",function(){b()});c=null;t.initializeElementTooltip=p;document.addEventListener("DOMContentLoaded",function(){for(var t=document.querySelectorAll("[data-plugin-vs-tooltip]"),n=0;n<t.length;n++)p(t[n])},!1);document.addEventListener("mouseout",function(n){n.relatedTarget&&n.relatedTarget.nodeName!=="HTML"||h()},!1);document.addEventListener("mouseover",function(n){!n.target.__plugin_tooltip_initialized&&n.target.hasAttribute("data-plugin-vs-tooltip")&&p(n.target)},!0);document.addEventListener("mousemove",function(n){o.screenX=n.screenX;o.screenY=n.screenY;o.clientX=n.clientX;o.clientY=n.clientY},!1);t.show=ni;t.dismiss=ti})(t=n.Tooltip||(n.Tooltip={}))})(t=n.Plugin||(n.Plugin={}))}(Microsoft||(Microsoft={})),function(n){var t;(function(n){var t;(function(t){"use strict";function s(){var t,i,f;if(n.ContextMenu.canCreatePopup())t=r.dismiss();else{i=[];for(f in u)u.hasOwnProperty(f)&&i.push(u[f].dismiss());t=n.Promise.join(i)}return l=!1,t}function vt(n){for(var t=n.offsetTop,i=n.offsetLeft;n=n.offsetParent;)t+=n.offsetTop,i+=n.offsetLeft;return{left:i,top:t}}function yt(n,t){return n<0||t<0||n>document.documentElement.clientWidth||t>document.documentElement.clientHeight}function pt(n,t){var r=t.left+n.offsetWidth,i={left:window.pageXOffset,top:window.pageYOffset,right:window.pageXOffset+window.document.documentElement.clientWidth,bottom:window.pageYOffset+window.document.documentElement.clientHeight},u=t.left>=i.left&&r<=i.right;return u?n.offsetWidth:r<i.left||t.left>i.right?0:t.left<i.left&&r<=i.right?n.offsetWidth-(i.left-t.left):r>i.right&&t.left>=i.left?n.offsetWidth-(r-i.right):window.document.documentElement.clientWidth}function wt(n,t){var r=t.top+n.offsetHeight,i={left:window.pageXOffset,top:window.pageYOffset,right:window.pageXOffset+window.document.documentElement.clientWidth,bottom:window.pageYOffset+window.document.documentElement.clientHeight},u=t.top>=i.top&&r<=i.bottom;return u?n.offsetHeight:r<i.top||t.top>i.bottom?0:t.top<i.top&&r<=i.bottom?n.offsetHeight-(i.top-t.top):r>i.bottom&&t.top>=i.top?n.offsetHeight-(r-i.bottom):window.document.documentElement.clientHeight}function nt(n,t,i){var s,e,l,f,h,c;if(!n)return!1;for(e=n;n.parentElement;){if(s=n.getAttribute("data-plugin-contextmenu"),s!==null){if(l=u[s],f={X:t,Y:i},typeof r.adjustShowCoordinates=="function"&&(f=r.adjustShowCoordinates(f)),f.X===0&&f.Y===0){var o=vt(e),a=pt(e,o),v=wt(e,o);a===0||v===0?f.X=f.Y=0:(h=a/2,c=v/2,f.X=o.left<window.pageXOffset||e.offsetWidth>window.document.documentElement.clientWidth?h:o.left-window.pageXOffset+h,f.Y=o.top<window.pageYOffset||e.offsetHeight>window.document.documentElement.clientHeight?c:o.top-window.pageYOffset+c)}return yt(f.X,f.Y)&&(f.X=f.Y=0),l.show(f.X,f.Y,0,n.id),!0}if(n=n.parentElement,!n)return!1}return!1}function h(n){n.stopPropagation();n.preventDefault()}function v(n){for(var e,r,u,i=0,f=n.querySelectorAll(".shortcut"),t=0;t<f.length;t++)e=f[t],n.style.display="block",r=parseInt(getComputedStyle(e).getPropertyValue("width")),n.style.display="none",i=r>i?r:i;for(u=n.querySelectorAll(".main"),i+=50,t=0;t<u.length;t++)u[t].style.paddingRight=i+"px"}function rt(n){var r=document.getElementById(n),i,t;for(f.removeChild(r),delete u[n],i=r.querySelectorAll("[data-plugin-contextmenu]"),t=0;t<i.length;t++)rt(i[t].getAttribute("data-plugin-contextmenu"))}function bt(n,t,i,r,u){return new it(n,t,i,r,u)}function kt(){return r.canCreatePopup()&&!l}function ut(n){var r=n.clientCoordinates.Y,u=n.clientCoordinates.Y-n.height,t,i;return n.clientCoordinates.Y+n.height>n.viewPortHeight&&u>=0&&(r=u),t=n.clientCoordinates.X,i=n.clientCoordinates.X-(n.width+n.widthOffset),n.clientCoordinates.X+n.width>n.viewPortWidth&&i>=0&&(t=i),n.clientCoordinates.Y=r,n.clientCoordinates.X=t,n}function y(t){function r(n){for(var t="";t.length<n;)t+=Math.floor(Math.random()*65536).toString(16);return t.substr(0,n)}if(i(t))throw new Error(n.Resources.getErrorString("JSPlugin.5009"));return t+"-"+r(8)+"-"+r(4)+"-"+r(4)+"-"+r(4)+"-"+r(12)}function i(n){return n===null||typeof n=="undefined"||n===""}function p(n){return isFinite(n)&&typeof n=="number"}function w(n){var t=n.currentTarget;!t.classList.contains("disabled")&&i(t.getAttribute("data-plugin-contextmenu"))?r.callback(t.id):t.classList.contains("disabled")&&t.focus();h(n)}function ft(n){var f,i,t,u;if(!n.classList.contains("active"))for(f={X:1,Y:n.offsetTop+1},r.dismissSubmenus(f),i=n.parentNode.querySelectorAll("[data-plugin-contextmenu]"),t=0;t<i.length;t++)u=i[t],u!==this&&u.classList.remove("active")}function dt(n){var t,i;n.classList.contains("active")||(t=n.getAttribute("data-plugin-contextmenu"),t!==null&&typeof t!="undefined"&&(i=document.getElementById(t),n.classList.add("active"),v(i),a.show(i,null,0,0,n.offsetTop,0,null,null,r.show.bind(r))))}function gt(n){var t=n.currentTarget;c(t)?t.focus():ft(n.currentTarget);dt(t)}function et(n){var t=n.currentTarget;t.classList.remove("active");t.blur()}function ni(n){ft(n.currentTarget)}function c(n){var t=n.parentElement.classList.contains("allowDisabledItemNavigation"),i=n.classList.contains("disabled"),r=n.classList.contains("hidden");return(t||!i)&&!r&&n.hasAttribute("tabindex")}function ti(n,t,i){var u=0,r,f;if(n!==t)for(r=0;r<i.length;r++)if(f=i[r],f===n){u=r+1;break}return u}function b(n,t){for(var r,u,i=n-2;i>=0;i--)if(r=t[i],c(r)){u=r;break}if(!u)for(i=t.length-1;i>n-1;i--)if(r=t[i],c(r)){u=r;break}return u}function k(n,t){for(var r,u,i=n;i<t.length;i++)if(r=t[i],c(r)){u=r;break}if(!u)for(i=0;i<n-1;i++)if(r=t[i],c(r)){u=r;break}return u}function ot(t,i){if(n.ContextMenu.canCreatePopup()){r.dismissCurrent(i);return}var f=!t.hasAttribute("plugin-contextmenu-parent");i&&f||(u[t.id].dismiss(),f||st(t.getAttribute("plugin-contextmenu-parent")))}function st(n){var u=document.getElementById(n),r,t,i;for(u.focus(),r=u.getElementsByClassName("menuitem"),t=0;t<r.length;t++)i=r[t],i.classList.contains("active")&&(i.classList.remove("active"),i.focus())}function d(n){var t,i;if(!n.classList.contains("active")&&(t=n.getAttribute("data-plugin-contextmenu"),t!==null&&typeof t!="undefined")){n.classList.add("active");i=document.getElementById(t);i.style.zIndex=(parseInt(getComputedStyle(n.parentElement).getPropertyValue("z-index"))+1).toString();var u=parseInt(getComputedStyle(n.parentElement).getPropertyValue("width")),f=u+parseInt(getComputedStyle(n.parentElement).getPropertyValue("left"))-window.pageXOffset,e=n.offsetTop+parseInt(getComputedStyle(n.parentElement).getPropertyValue("top"))-window.pageYOffset,o=u-3;v(i);a.show(i,null,f,e,n.offsetTop,o,null,ut,r.show.bind(r))}}function ht(n){var t=n.target;switch(n.keyCode){case 13:d(t);t.click();n.preventDefault();n.stopImmediatePropagation();break;case 39:d(t);n.preventDefault();n.stopImmediatePropagation()}}function ct(n){var t,f=n.target,r=n.currentTarget,i=r.getElementsByClassName("menuitem"),u=ti(f,r,i);switch(n.keyCode){case 9:t=n.shiftKey?b(u,i):k(u,i);n.preventDefault();break;case 18:s();break;case 27:ot(r,!1);n.preventDefault();break;case 35:t=b(0,i);n.preventDefault();break;case 36:t=k(0,i);n.preventDefault();break;case 37:ot(r,!0);n.preventDefault();break;case 38:t=b(u,i);n.preventDefault();break;case 40:t=k(u,i);n.preventDefault();break;case 93:s();n.preventDefault()}t&&t.focus()}function ii(n){n.attrName==="aria-checked"&&n.attrChange===1&&w(n)}var r=loadModule("plugin.host.contextmenu"),lt=/url\(['"]?([^'"]*)['"]?\)/gm,at=/^[^\:\.]*$/,g,e,l,o,tt,it,a;(function(n){n[n.checkbox=0]="checkbox";n[n.command=1]="command";n[n.radio=2]="radio";n[n.separator=3]="separator"})(t.MenuItemType||(t.MenuItemType={}));var ri=t.MenuItemType,u={},f=document.createElement("div");f.id="plugin-contextmenu-container";n.addEventListener("load",function(){return document.body.appendChild(f)});l=!1;o=0;Object.defineProperty(n.ContextMenu,"isShowing",{get:function(){return o!==0},enumerable:!0});t.dismissAll=s;document.addEventListener("keydown",function(n){if(n.key==="F10"&&n.shiftKey&&!n.altKey&&!n.ctrlKey){var t=document.activeElement;nt(t,0,0)&&n.preventDefault()}},!1);document.addEventListener("contextmenu",function(n){nt(n.target,n.clientX,n.clientY);n.preventDefault()},!1);document.addEventListener("click",function(n){for(var t=n.target;t;){if(t.hasAttribute("data-plugin-is-contextmenu"))return;t=t.parentElement}s()},!0);window.addEventListener("resize",function(){n.ContextMenu.canCreatePopup()||s()},!1);tt=function(){function n(n,t,i,r){this.target=n;this.type=t;this.listener=i;this.useCapture=r}return n.prototype.install=function(){this.target.addEventListener(this.type,this.listener,this.useCapture)},n.prototype.uninstall=function(){this.target.removeEventListener(this.type,this.listener,this.useCapture)},n}();it=function(){function t(l,a,v,p,w,b,k){var it,si,ti,tt,nt,ft,ii,ot,pt,wt,ri,ui,st,vt,bt,rt,fi,hi,kt,dt,gt,yt,ut,ei,oi,li;if(this.disposableEventListeners=[],l===null||typeof l=="undefined"||l.length===0)throw new Error(n.Resources.getErrorString("JSPlugin.5006"));if(typeof a!="string"&&!i(a))throw new Error(n.Resources.getErrorString("JSPlugin.5015"));if(this.id=i(a)?y("plugin-contextmenu"):a,this.ariaLabel=v,!i(u[this.id]))throw new Error(n.Resources.getErrorString("JSPlugin.5007"));if(typeof p!="string"&&!i(p))throw new Error(n.Resources.getErrorString("JSPlugin.5016"));this.callback=w;this.eventManager=new n.Utilities.EventManager;this.eventManager.setTarget(this);it=document.createElement("ul");it.id=this.id;i(b)||(si=function(n){return function(){n.dispatchEvent("show")}},this.addDisposableEventListener(b,"show",si(this.eventManager)),it.setAttribute("plugin-contextmenu-parent",k));it.className="plugin-contextmenu";i(p)||it.classList.add(p);it.setAttribute("data-plugin-is-contextmenu","true");ti=1;for(tt in l)if(l.hasOwnProperty(tt)){nt=document.createElement("li");nt.className="menuitem";l[tt].type!==3&&(nt.setAttribute("tabIndex",ti.toString()),ti++);ft="";switch(l[tt].type){case 0:ft="menuitemcheckbox";break;case 1:ft="menuitem";break;case 3:ft="separator";break;case 2:ft="menuitemradio"}if(nt.setAttribute("role",ft),ii=l[tt].id,nt.id=i(ii)?y("plugin-contextmenuitem"):ii,ot=document.createElement("div"),ot.className="main",pt=l[tt].label,wt=i(pt),wt&&l[tt].type!==3||typeof pt!="string"&&!wt)throw new Error(n.Resources.getErrorString("JSPlugin.5018"));if(wt||(ot.innerText=pt),nt.appendChild(ot),ri=l[tt].iconEnabled,!i(ri)&&typeof ri!="string")throw new Error(n.Resources.getErrorString("JSPlugin.5019"));if(ui=l[tt].iconDisabled,!i(ui)&&typeof ui!="string")throw new Error(n.Resources.getErrorString("JSPlugin.5020"));if(st=document.createElement("img"),st.className="icon",st.style.display="none",nt.appendChild(st),vt=l[tt].accessKey,!i(vt)&&typeof vt!="string")throw new Error(n.Resources.getErrorString("JSPlugin.5021"));if(bt=document.createElement("div"),bt.className="shortcut",i(vt)||(bt.innerText=vt),nt.appendChild(bt),rt=l[tt].callback,i(rt)&&(rt=this.callback),typeof rt!="function"&&l[tt].type!==3)throw new Error(n.Resources.getErrorString("JSPlugin.5017"));if(fi=function(t){return function(r){var u=r.currentTarget,f,e;if(t&&!u.classList.contains("disabled")&&i(u.getAttribute("data-plugin-contextmenu"))){switch(u.getAttribute("data-plugin-contextmenu-item-type")){case"checkbox":f=0;break;case"command":f=1;break;case"separator":f=3;break;case"radio":f=2;break;default:throw new Error(n.Resources.getErrorString("JSPlugin.5008"))}e={id:u.id,callback:t,label:u.getElementsByClassName("main")[0].innerText,type:f,iconEnabled:u.getElementsByClassName("icon")[0].src,iconDisabled:"",accessKey:u.getElementsByClassName("shortcut")[0].innerText,hidden:function(){return!1},disabled:function(){return!1},checked:function(){return u.getAttribute("aria-checked")==="true"},cssClass:u.className,submenu:null};s().done(function(){t(u.parentNode.id,e,g)})}else h(r)}},this.addDisposableEventListener(nt,"click",fi(rt),!1),this.addDisposableEventListener(nt,"contextmenu",fi(rt),!1),hi=function(n,t,r,u,f,e,o){return function(){var h,s,c;typeof n=="function"&&n()?o.classList.add("hidden"):o.classList.remove("hidden");typeof t=="function"&&t()?(o.classList.add("disabled"),o.setAttribute("aria-disabled","true"),h=f):(o.classList.remove("disabled"),o.removeAttribute("aria-disabled"),h=u);s=o.getElementsByClassName("icon")[0];switch(e){case 0:o.removeAttribute("aria-checked");typeof r=="function"&&r()?(c=getComputedStyle(s).getPropertyValue("background-image"),c=c.replace(lt,function(n,t){return t}),s.src=c,o.setAttribute("aria-checked","true"),s.style.display="block"):(o.setAttribute("aria-checked","false"),s.style.display="none");break;case 1:i(h)?s.style.display="none":(at.test(h)?s.setAttribute("data-plugin-theme-src",h):(s.src=h,s.removeAttribute("data-plugin-theme-src")),s.style.display="block")}}},kt=l[tt].hidden,!i(kt)&&typeof kt!="function")throw new Error(n.Resources.getErrorString("JSPlugin.5023"));if(dt=l[tt].disabled,!i(dt)&&typeof dt!="function")throw new Error(n.Resources.getErrorString("JSPlugin.5024"));if(gt=l[tt].checked,!i(gt)&&typeof gt!="function")throw new Error(n.Resources.getErrorString("JSPlugin.5025"));if(this.addDisposableEventListener(this,"show",hi(kt,dt,gt,l[tt].iconEnabled,l[tt].iconDisabled,l[tt].type,nt)),yt=l[tt].cssClass,!i(yt)&&typeof yt!="string")throw new Error(n.Resources.getErrorString("JSPlugin.5022"));if(i(yt)||nt.classList.add(yt),ut=l[tt].submenu,ei=typeof ut=="undefined"||ut===null,!ei&&!Array.isArray(ut))throw new Error(n.Resources.getErrorString("JSPlugin.5026"));if(!ei){var ni=y("plugin-contextsubmenu"),ai=new t(ut,ni,null,p,rt,this,this.id),ci=document.createElement("div");ci.className="arrow";nt.setAttribute("data-plugin-contextmenu",ni);nt.appendChild(ci)}oi=function(n){var r,i,t;if(getComputedStyle(n.parentElement).getPropertyValue("display")!=="none")for(r=n.parentElement.querySelectorAll("[data-plugin-contextmenu]"),i=0;i<r.length;i++)t=r[i],t!==n&&typeof t.className!="undefined"&&(t.classList.remove("active"),ni=t.getAttribute("data-plugin-contextmenu"),ut=document.getElementById(ni),ut.style.display="none")};this.addDisposableEventListener(nt,"mouseover",function(n){var t=n.currentTarget;c(t)?t.focus():oi(n.currentTarget);d(t)},!1);this.addDisposableEventListener(nt,"mouseout",et,!1);this.addDisposableEventListener(nt,"focus",function(n){oi(n.currentTarget)},!1);this.addDisposableEventListener(nt,"keydown",ht,!1);switch(l[tt].type){case 0:st.classList.add("checkbox");nt.setAttribute("data-plugin-contextmenu-item-type","checkbox");break;case 1:nt.setAttribute("data-plugin-contextmenu-item-type","command");break;case 2:throw new Error("Not implemented");case 3:ot.classList.add("hr");nt.setAttribute("data-plugin-contextmenu-item-type","separator");break;default:throw new Error(n.Resources.getErrorString("JSPlugin.5008"))}it.appendChild(nt)}this.addDisposableEventListener(it,"click",h,!1);this.addDisposableEventListener(it,"contextmenu",h,!1);li=function(n,t){return function(i){t===i.id&&(e&&(e.focus(),e=null),n.eventManager.dispatchEvent("dismiss"),o=Math.max(0,o-1))}};r.addEventListener("contextmenudismissed",li(this,this.id));f.appendChild(it);u[it.id]=this;this.addDisposableEventListener(it,"keydown",ct,!1)}return t.prototype.attach=function(t){if(i(this.id))throw new Error(n.Resources.getErrorString("JSPlugin.5010"));t.setAttribute("data-plugin-contextmenu",this.id)},t.prototype.detach=function(t){if(i(this.id))throw new Error(n.Resources.getErrorString("JSPlugin.5010"));t.getAttribute("data-plugin-contextmenu")===this.id&&t.removeAttribute("data-plugin-contextmenu")},t.prototype.dismiss=function(){if(i(this.id))throw new Error(n.Resources.getErrorString("JSPlugin.5010"));if(o=Math.max(0,o-1),n.ContextMenu.canCreatePopup())r.dismiss();else{var t=document.getElementById(this.id);t.style.display!=="none"&&(document.getElementById(this.id).style.display="none",e&&(e.focus(),e=null),this.eventManager.dispatchEvent("dismiss"))}},t.prototype.dispose=function(){var r,t;if(i(this.id))throw new Error(n.Resources.getErrorString("JSPlugin.5010"));for(this.disposableEventListeners.forEach(function(n){n.uninstall()}),this.disposableEventListeners=[],r=document.querySelectorAll("[data-plugin-contextmenu="+this.id+"]"),t=0;t<r.length;t++)r[t].removeAttribute("data-plugin-contextmenu");rt(this.id);this.id=null;this.callback=null},t.prototype.show=function(t,u,f,o){var l,h,c;if(i(this.id))throw new Error(n.Resources.getErrorString("JSPlugin.5010"));if(!p(t)||!p(u))throw new Error(n.Resources.getErrorString("JSPlugin.5012"));if(!p(f)&&!i(f))throw new Error(n.Resources.getErrorString("JSPlugin.5013"));if(typeof o!="string"&&!i(o))throw new Error(n.Resources.getErrorString("JSPlugin.5014"));for(s(),g=o,e=document.activeElement,l=f||0,h=document.getElementById(this.id),c=0;c<h.children.length;c++)h.children[c].classList.remove("active");this.eventManager.dispatchEvent("show");v(h);a.show(h,this.ariaLabel,t,u,0,l,null,ut,r.show.bind(r))},t.prototype.addEventListener=function(t,r){if(i(this.id))throw new Error(n.Resources.getErrorString("JSPlugin.5010"));this.eventManager.addEventListener(t,r)},t.prototype.removeEventListener=function(t,r){if(i(this.id))throw new Error(n.Resources.getErrorString("JSPlugin.5010"));this.eventManager.removeEventListener(t,r)},t.prototype.dispatchEvent=function(t){if(i(this.id))throw new Error(n.Resources.getErrorString("JSPlugin.5010"));return this.eventManager.dispatchEvent(t.type)},t.prototype.addDisposableEventListener=function(n,t,i,r){var u=new tt(n,t,i,r);u.install();this.disposableEventListeners.push(u)},t}();t.create=bt;t.canCreatePopup=kt,function(t){function i(t,i,u,e,s,h,c,a,v){var it=t.querySelectorAll("[data-plugin-contextmenu]"),p,w,b,y;l=l||it.length>0&&!r.canCreatePopup(!0);n.Theme._cssHelpers.processImages(t);p=c||"block";t.style.display=p;w=t.offsetHeight;b=t.offsetWidth;t.style.display="none";var k=window.pageYOffset,d=window.pageXOffset,nt=document.documentElement.clientHeight,tt=document.documentElement.clientWidth,g={clientCoordinates:{X:u,Y:e},width:b,height:w,viewPortWidth:tt,viewPortHeight:nt,scrollOffsetLeft:d,scrollOffsetTop:k,elementOffsetTop:s,widthOffset:h};if(o++,n.ContextMenu.canCreatePopup()){v(t.id,i,f,g);return}y=g;(e+w>nt||u+b>tt)&&typeof a=="function"&&(y=a(g));t.style.left=y.clientCoordinates.X+d+"px";t.style.top=y.clientCoordinates.Y+k+"px";t.style.display=p;t.setAttribute("tabindex","0");t.focus();__n("ContextMenuShow",y.clientCoordinates.X+d,y.clientCoordinates.Y+k,y.width,y.height)}t.show=i}(a=t._positionHelpers||(t._positionHelpers={}));r.addEventListener("contextmenufocused",function(){st("contextmenu")});r.addEventListener("contextmenuinitialized",function(n){var t=document.getElementById("contextmenu"),e,u;if(i(n.id))t.innerHTML="",t.removeAttribute("aria-label"),f.innerHTML="";else{for(f.innerHTML=n.contextMenus,t.innerHTML=document.getElementById(n.id).innerHTML,n.ariaLabel&&n.ariaLabel.length!==0&&t.setAttribute("aria-label",n.ariaLabel),t.addEventListener("click",h,!1),t.addEventListener("contextmenu",h,!1),t.addEventListener("keydown",ct,!1),e=t.getElementsByClassName("menuitem"),u=0;u<e.length;u++)e[u].addEventListener("mouseover",gt,!1),e[u].addEventListener("mouseout",et,!1),e[u].addEventListener("focus",ni,!1),e[u].addEventListener("click",w,!1),e[u].addEventListener("contextmenu",w,!1),e[u].addEventListener("keydown",ht,!1),e[u].addEventListener("DOMAttrModified",ii,!1);t.style.display="block";t.setAttribute("tabindex","0");r.disableZoom();r.fireContentReady()}});r.addEventListener("contextmenuclicked",function(n){var t=document.getElementById(n.Id);t&&t.click()});r.addEventListener("contextmenuopened",function(n){__n("ContextMenuShow",n.x,n.y,n.width,n.height)})})(t=n.ContextMenu||(n.ContextMenu={}))})(t=n.Plugin||(n.Plugin={}))}(Microsoft||(Microsoft={})),function(n,t){"use strict";function i(n,i,r){for(var h=Object.keys(i),f,o=0,c=h.length;o<c;o++){var e=h[o],s=e.charCodeAt(0)!==95,u=i[e];if(u&&typeof u=="object"&&(u.value!==t||typeof u.get=="function"||typeof u.set=="function")){u.enumerable===t&&(u.enumerable=s);r&&u.setName&&typeof u.setName=="function"&&u.setName(r+"."+e);f=f||{};f[e]=u;continue}if(!s){f=f||{};f[e]={value:u,enumerable:s,configurable:!0,writable:!0};continue}n[e]=u}f&&Object.defineProperties(n,f)}Debug=Debug||{};Debug.msTraceAsyncOperationStarting||(Debug.msTraceAsyncOperationStarting=function(){return 0});Debug.msTraceAsyncOperationCompleted||(Debug.msTraceAsyncOperationCompleted=function(){});Debug.msTraceAsyncCallbackStarting||(Debug.msTraceAsyncCallbackStarting=function(){});Debug.msTraceAsyncCallbackCompleted||(Debug.msTraceAsyncCallbackCompleted=function(){});typeof Debug.MS_ASYNC_CALLBACK_STATUS_ASSIGN_DELEGATE=="undefined"&&(Debug.MS_ASYNC_CALLBACK_STATUS_ASSIGN_DELEGATE=0);typeof Debug.MS_ASYNC_CALLBACK_STATUS_CANCEL=="undefined"&&(Debug.MS_ASYNC_CALLBACK_STATUS_CANCEL=3);typeof Debug.MS_ASYNC_CALLBACK_STATUS_CHOOSEANY=="undefined"&&(Debug.MS_ASYNC_CALLBACK_STATUS_CHOOSEANY=2);typeof Debug.MS_ASYNC_CALLBACK_STATUS_ERROR=="undefined"&&(Debug.MS_ASYNC_CALLBACK_STATUS_ERROR=4);typeof Debug.MS_ASYNC_CALLBACK_STATUS_JOIN=="undefined"&&(Debug.MS_ASYNC_CALLBACK_STATUS_JOIN=1);typeof Debug.MS_ASYNC_OP_STATUS_CANCELED=="undefined"&&(Debug.MS_ASYNC_OP_STATUS_CANCELED=2);typeof Debug.MS_ASYNC_OP_STATUS_ERROR=="undefined"&&(Debug.MS_ASYNC_OP_STATUS_ERROR=3);typeof Debug.MS_ASYNC_OP_STATUS_SUCCESS=="undefined"&&(Debug.MS_ASYNC_OP_STATUS_SUCCESS=1);typeof Debug.debuggerEnabled=="undefined"&&(Debug.debuggerEnabled=!1),function(t){function f(n,t,r){var u=n||{},o,f,s,e;if(t)for(o=t.split("."),f=0,s=o.length;f<s;f++)e=o[f],u[e]||Object.defineProperty(u,e,{value:{},writable:!1,enumerable:!0,configurable:!0}),u=u[e];return r&&i(u,r,t||"<ANONYMOUS>"),u}function e(t,i){return f(n,t,i)}function o(n){var f,u,t,i;return typeof n=="string"&&(f=n,n=function(){return PluginUtilities.Utilities.getMember(f)}),t=r.uninitialized,{setName:function(n){u=n},get:function(){switch(t){case r.initialized:return i;case r.uninitialized:t=r.working;try{msWriteProfilerMark("PluginUtilities.Namespace._lazy:"+u+",StartTM");i=n()}finally{msWriteProfilerMark("PluginUtilities.Namespace._lazy:"+u+",StopTM");t=r.uninitialized}return n=null,t=r.initialized,i;case r.working:throw"Illegal: reentrancy on initialization";default:throw"Illegal"}},set:function(n){switch(t){case r.working:throw"Illegal: reentrancy on initialization";default:t=r.initialized;i=n}},enumerable:!0,configurable:!0}}var u,r;n[t]||(n[t]=Object.create(Object.prototype));u=n[t];u.Namespace||(u.Namespace=Object.create(Object.prototype));r={uninitialized:1,working:2,initialized:3};Object.defineProperties(u.Namespace,{defineWithParent:{value:f,writable:!0,enumerable:!0,configurable:!0},define:{value:e,writable:!0,enumerable:!0,configurable:!0},_lazy:{value:o,writable:!0,enumerable:!0,configurable:!0}})}("PluginUtilities"),function(n){function t(t,r,u){return t=t||function(){},n.Utilities.markSupportedForProcessing(t),r&&i(t.prototype,r),u&&i(t,u),t}function r(r,u,f,e){if(r){u=u||function(){};var o=r.prototype;return u.prototype=Object.create(o),n.Utilities.markSupportedForProcessing(u),Object.defineProperty(u.prototype,"constructor",{value:u,writable:!0,configurable:!0,enumerable:!0}),f&&i(u.prototype,f),e&&i(u,e),u}return t(u,f,e)}function u(n){n=n||function(){};for(var t=1,r=arguments.length;t<r;t++)i(n.prototype,arguments[t]);return n}n.Namespace.define("PluginUtilities.Class",{define:t,derive:r,mix:u})}(PluginUtilities)}(this),function(n,t){"use strict";function f(n){return n}function r(n,t,i){return n.split(".").reduce(function(n,t){return n?i(n[t]):null},t)}var i=!!n.Windows,u={get notSupportedForProcessing(){return t.Resources._getPluginUtilitiesString("base/notSupportedForProcessing").value}};t.Namespace.define("PluginUtilities.Utilities",{_setHasWinRT:{value:function(n){i=n},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||n,f):null},ready:function(i,r){return new t.Promise(function(u,f){function e(){if(i)try{i();u()}catch(n){f(n)}else u()}var o=t.Utilities.testReadyState;o||(o=n.document?document.readyState:"complete");o==="complete"||n.document&&document.body!==null?r?t.Utilities.Scheduler.schedule(function(){e()},t.Utilities.Scheduler.Priority.normal,null,"PluginUtilities.Utilities.ready"):e():n.addEventListener("DOMContentLoaded",e,!1)})},strictProcessing:{get:function(){return!0},configurable:!1,enumerable:!0},markSupportedForProcessing:{value:function(n){return n.supportedForProcessing=!0,n},configurable:!1,writable:!1,enumerable:!0},requireSupportedForProcessing:{value:function(i){var r=!0,f,e;r=r&&!(i===n);r=r&&!(i===n.location);r=r&&!(i instanceof HTMLIFrameElement);r=r&&!(typeof i=="function"&&!i.supportedForProcessing);switch(n.frames.length){case 0:break;case 1:r=r&&!(i===n.frames[0]);break;default:for(f=0,e=n.frames.length;r&&f<e;f++)r=r&&!(i===n.frames[f])}if(r)return i;throw new t.ErrorFromName("PluginUtilities.Utilities.requireSupportedForProcessing",t.Resources._formatString(u.notSupportedForProcessing,i))},configurable:!1,writable:!1,enumerable:!0},_shallowCopy:function(n){return this._mergeAll([n])},_merge:function(n,t){return this._mergeAll([n,t])},_mergeAll:function(n){var t={};return n.forEach(function(n){Object.keys(n).forEach(function(i){t[i]=n[i]})}),t},_getProfilerMarkIdentifier:function(n){var t="";return n.id&&(t+=" id='"+n.id+"'"),n.className&&(t+=" class='"+n.className+"'"),t}});t.Namespace.define("PluginUtilities",{validation:!1,strictProcessing:{value:function(){},configurable:!1,writable:!1,enumerable:!1}})}(this,PluginUtilities),function(){"use strict";function r(t,r,u){var f=t;return typeof f=="function"&&(f=f()),(u&&i.test(u)?"":u?u+": ":"")+(r?r.replace(n,":")+": ":"")+f}function u(n,t,r){var u=PluginUtilities.Utilities.formatLog(n,t,r);console[r&&i.test(r)?r:"log"](u)}function t(n){return n.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&")}var n=/\s+/g,i=/^(error|warn|info|log)$/;PluginUtilities.Namespace.define("PluginUtilities.Utilities",{startLog:function(i){var r;i=i||{};typeof i=="string"&&(i={tags:i});var f=i.type&&new RegExp("^("+t(i.type).replace(n," ").split(" ").join("|")+")$"),e=i.excludeTags&&new RegExp("(^|\\s)("+t(i.excludeTags).replace(n," ").split(" ").join("|")+")(\\s|$)","i"),o=i.tags&&new RegExp("(^|\\s)("+t(i.tags).replace(n," ").split(" ").join("|")+")(\\s|$)","i"),s=i.action||u;if(!f&&!e&&!o&&!PluginUtilities.log){PluginUtilities.log=s;return}r=function(n,t,i){f&&!f.test(i)||e&&e.test(t)||o&&!o.test(t)||s(n,t,i);r.next&&r.next(n,t,i)};r.next=PluginUtilities.log;PluginUtilities.log=r},stopLog:function(){delete PluginUtilities.log},formatLog:r})}(),function(n){"use strict";function t(n){var t="_on"+n+"state";return{get:function(){var n=this[t];return n&&n.userHandler},set:function(i){var r=this[t];i?(r||(r={wrapper:function(n){return r.userHandler(n)},userHandler:i},Object.defineProperty(this,t,{value:r,enumerable:!1,writable:!0,configurable:!0}),this.addEventListener(n,r.wrapper,!1)),r.userHandler=i):r&&(this.removeEventListener(n,r.wrapper,!1),this[t]=null)},enumerable:!0}}function i(){for(var i,r={},n=0,u=arguments.length;n<u;n++)i=arguments[n],r["on"+i]=t(i);return r}var r=n.Class.define(function(n,t,i){this.detail=t;this.target=i;this.timeStamp=Date.now();this.type=n},{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}),u={_listeners:null,addEventListener:function(n,t,i){var r,u,e,f;for(i=i||!1,this._listeners=this._listeners||{},r=this._listeners[n]=this._listeners[n]||[],u=0,e=r.length;u<e;u++)if(f=r[u],f.useCapture===i&&f.listener===t)return;r.push({listener:t,useCapture:i})},dispatchEvent:function(n,t){var i=this._listeners&&this._listeners[n],u,f,e;if(i){for(u=new r(n,t,this),i=i.slice(0,i.length),f=0,e=i.length;f<e&&!u._stopImmediatePropagationCalled;f++)i[f].listener(u);return u.defaultPrevented||!1}return!1},removeEventListener:function(n,t,i){var r,u,e,f;if(i=i||!1,r=this._listeners&&this._listeners[n],r)for(u=0,e=r.length;u<e;u++)if(f=r[u],f.listener===t&&f.useCapture===i){r.splice(u,1);r.length===0&&delete this._listeners[n];break}}};n.Namespace.define("PluginUtilities.Utilities",{_createEventProperty:t,createEventProperties:i,eventMixin:u})}(PluginUtilities),function(n,t){"use strict";function i(){}function w(n,t){var i;i=t&&typeof t=="object"&&typeof t.then=="function"?l:pt;n._value=t;n._setState(i)}function b(n,t,i,r,u,f){return{exception:n,error:t,promise:i,handler:f,id:r,parent:u}}function k(n,t,i,r){var u=i._isException,f=i._errorId;return b(u?t:null,u?null:t,n,f,i,r)}function wt(n,t,i){var r=i._isException,u=i._errorId;return ht(n,u,r),b(r?t:null,r?null:t,n,u,i)}function bt(n,t){var i=++ft;return ht(n,i),b(null,t,n,i)}function kt(n,t){var i=++ft;return ht(n,i,!0),b(t,null,n,i)}function d(n,t,i,r){var u=Debug.msTraceAsyncOperationStarting("PluginUtilities.Promise.done");st(n,{c:t,e:i,p:r,asyncOpID:u})}function g(n,t,i,r){n._value=t;o(n,t,i,r);n._setState(ot)}function dt(n,t){var h=n._value,r=n._listeners,u,o;if(r)for(n._listeners=null,u=0,o=Array.isArray(r)?r.length:1;u<o;u++){var f=o===1?r:r[u],s=f.c,i=f.promise;if(Debug.msTraceAsyncOperationCompleted(f.asyncOpID,Debug.MS_ASYNC_OP_STATUS_SUCCESS),i){Debug.msTraceAsyncCallbackStarting(f.asyncOpID);try{i._setCompleteValue(s?s(h):h)}catch(c){i._setExceptionValue(c)}finally{Debug.msTraceAsyncCallbackCompleted()}i._state!==l&&i._listeners&&t.push(i)}else e.prototype.done.call(n,s)}}function gt(n,t){var r=n._value,u=n._listeners,e,a,v;if(u)for(n._listeners=null,e=0,a=Array.isArray(u)?u.length:1;e<a;e++){var h=a===1?u:u[e],f=h.e,i=h.promise,y=r&&r.name===c?Debug.MS_ASYNC_OP_STATUS_CANCELED:Debug.MS_ASYNC_OP_STATUS_ERROR;if(Debug.msTraceAsyncOperationCompleted(h.asyncOpID,y),i){v=!1;try{f?(Debug.msTraceAsyncCallbackStarting(h.asyncOpID),v=!0,f.handlesOnError||o(i,r,k,n,f),i._setCompleteValue(f(r))):i._setChainedErrorValue(r,n)}catch(p){i._setExceptionValue(p)}finally{v&&Debug.msTraceAsyncCallbackCompleted()}i._state!==l&&i._listeners&&t.push(i)}else s.prototype.done.call(n,null,f)}}function o(n,t,i,r,u){if(h._listeners[ut]){if(t instanceof Error&&t.message===c)return;h.dispatchEvent(ut,i(n,t,r,u))}}function nt(n,t){var r=n._listeners,u,f,i,e;if(r)for(u=0,f=Array.isArray(r)?r.length:1;u<f;u++){if(i=f===1?r:r[u],e=i.p,e)try{e(t)}catch(o){}i.c||i.e||!i.promise||i.promise._progress(t)}}function st(n,t){var i=n._listeners;i?(i=Array.isArray(i)?i:[i],i.push(t)):i=t;n._listeners=i}function ht(n,t,i){n._isException=i||!1;n._errorId=t}function tt(n,t,i,r){n._value=t;o(n,t,i,r);n._setState(y)}function it(n,t){var i;i=t&&typeof t=="object"&&typeof t.then=="function"?l:v;n._value=t;n._setState(i)}function rt(n,t,i,r){var u=new ct(n),f=Debug.msTraceAsyncOperationStarting("PluginUtilities.Promise.then");return st(n,{promise:u,c:t,e:i,p:r,asyncOpID:f}),u}function ui(n){var t;return new PluginUtilities.Promise(function(i){n?t=setTimeout(i,n):setImmediate(i)},function(){t&&clearTimeout(t)})}function fi(n,t){var r=function(){t.cancel()},i=function(){n.cancel()};return n.then(r),t.then(i,i),t}var lt,h,ft,a,at,l,vt,yt,et,pt,v,ot,y,p,ti,u,ii,ri;n.Debug&&(n.Debug.setNonUserCodeExceptions=!0);lt=PluginUtilities.Class.mix(PluginUtilities.Class.define(null,{},{supportedForProcessing:!1}),PluginUtilities.Utilities.eventMixin);h=new lt;h._listeners={};var ut="error",c="Canceled",r=!1,f={promise:1,thenPromise:2,errorPromise:4,exceptionPromise:8,completePromise:16};f.all=f.promise|f.thenPromise|f.errorPromise|f.exceptionPromise|f.completePromise;ft=1;a={name:"created",enter:function(n){n._setState(at)},cancel:i,done:i,then:i,_completed:i,_error:i,_notify:i,_progress:i,_setCompleteValue:i,_setErrorValue:i};at={name:"working",enter:i,cancel:function(n){n._setState(yt)},done:d,then:rt,_completed:w,_error:g,_notify:i,_progress:nt,_setCompleteValue:it,_setErrorValue:tt};l={name:"waiting",enter:function(n){var t=n._value,i;t instanceof ct&&t._state!==y&&t._state!==v?st(t,{promise:n}):(i=function(r){t._errorId?n._chainedError(r,t):(o(n,r,k,t,i),n._error(r))},i.handlesOnError=!0,t.then(n._completed.bind(n),i,n._progress.bind(n)))},cancel:function(n){n._setState(vt)},done:d,then:rt,_completed:w,_error:g,_notify:i,_progress:nt,_setCompleteValue:it,_setErrorValue:tt};vt={name:"waiting_canceled",enter:function(n){n._setState(et);var t=n._value;t.cancel&&t.cancel()},cancel:i,done:d,then:rt,_completed:w,_error:g,_notify:i,_progress:nt,_setCompleteValue:it,_setErrorValue:tt};yt={name:"canceled",enter:function(n){n._setState(et);n._cancelAction()},cancel:i,done:d,then:rt,_completed:w,_error:g,_notify:i,_progress:nt,_setCompleteValue:it,_setErrorValue:tt};et={name:"canceling",enter:function(n){var t=new Error(c);t.name=t.message;n._value=t;n._setState(ot)},cancel:i,done:i,then:i,_completed:i,_error:i,_notify:i,_progress:i,_setCompleteValue:i,_setErrorValue:i};pt={name:"complete_notify",enter:function(n){if(n.done=e.prototype.done,n.then=e.prototype.then,n._listeners)for(var t=[n],i;t.length;)i=t.shift(),i._state._notify(i,t);n._setState(v)},cancel:i,done:null,then:null,_completed:i,_error:i,_notify:dt,_progress:i,_setCompleteValue:i,_setErrorValue:i};v={name:"success",enter:function(n){n.done=e.prototype.done;n.then=e.prototype.then;n._cleanupAction()},cancel:i,done:null,then:null,_completed:i,_error:i,_notify:dt,_progress:i,_setCompleteValue:i,_setErrorValue:i};ot={name:"error_notify",enter:function(n){if(n.done=s.prototype.done,n.then=s.prototype.then,n._listeners)for(var t=[n],i;t.length;)i=t.shift(),i._state._notify(i,t);n._setState(y)},cancel:i,done:null,then:null,_completed:i,_error:i,_notify:gt,_progress:i,_setCompleteValue:i,_setErrorValue:i};y={name:"error",enter:function(n){n.done=s.prototype.done;n.then=s.prototype.then;n._cleanupAction()},cancel:i,done:null,then:null,_completed:i,_error:i,_notify:gt,_progress:i,_setCompleteValue:i,_setErrorValue:i};p=PluginUtilities.Class.define(null,{_listeners:null,_nextState:null,_state:null,_value:null,cancel:function(){this._state.cancel(this);this._run()},done:function(n,t,i){this._state.done(this,n,t,i)},then:function(n,t,i){return this._state.then(this,n,t,i)},_chainedError:function(n,t){var i=this._state._error(this,n,wt,t);return this._run(),i},_completed:function(n){var t=this._state._completed(this,n);return this._run(),t},_error:function(n){var t=this._state._error(this,n,bt);return this._run(),t},_progress:function(n){this._state._progress(this,n)},_setState:function(n){this._nextState=n},_setCompleteValue:function(n){this._state._setCompleteValue(this,n);this._run()},_setChainedErrorValue:function(n,t){var i=this._state._setErrorValue(this,n,wt,t);return this._run(),i},_setExceptionValue:function(n){var t=this._state._setErrorValue(this,n,kt);return this._run(),t},_run:function(){while(this._nextState)this._state=this._nextState,this._nextState=null,this._state.enter(this)}},{supportedForProcessing:!1});var ct=PluginUtilities.Class.derive(p,function(n){r&&(r===!0||r&f.thenPromise)&&(this._stack=PluginUtilities.Promise._getStack());this._creator=n;this._setState(a);this._run()},{_creator:null,_cancelAction:function(){this._creator&&this._creator.cancel()},_cleanupAction:function(){this._creator=null}},{supportedForProcessing:!1}),s=PluginUtilities.Class.define(function(n){r&&(r===!0||r&f.errorPromise)&&(this._stack=PluginUtilities.Promise._getStack());this._value=n;o(this,n,bt)},{cancel:function(){},done:function(n,t){var i=this._value,r;if(t)try{t.handlesOnError||o(null,i,k,this,t);r=t(i);r&&typeof r=="object"&&typeof r.done=="function"&&r.done();return}catch(u){i=u}i instanceof Error&&i.message===c||PluginUtilities.Utilities.Scheduler.schedule(function(){throw i},PluginUtilities.Utilities.Scheduler.Priority.normal,null,"PluginUtilities.Promise._throwException")},then:function(n,t){if(!t)return this;var i,r=this._value;try{t.handlesOnError||o(null,r,k,this,t);i=new e(t(r))}catch(u){i=u===r?this:new ni(u)}return i}},{supportedForProcessing:!1}),ni=PluginUtilities.Class.derive(s,function(n){r&&(r===!0||r&f.exceptionPromise)&&(this._stack=PluginUtilities.Promise._getStack());this._value=n;o(this,n,kt)},{},{supportedForProcessing:!1}),e=PluginUtilities.Class.define(function(n){if(r&&(r===!0||r&f.completePromise)&&(this._stack=PluginUtilities.Promise._getStack()),n&&typeof n=="object"&&typeof n.then=="function"){var t=new ct(null);return t._setCompleteValue(n),t}this._value=n},{cancel:function(){},done:function(n){if(n)try{var t=n(this._value);t&&typeof t=="object"&&typeof t.done=="function"&&t.done()}catch(i){PluginUtilities.Utilities.Scheduler.schedule(function(){throw i},PluginUtilities.Utilities.Scheduler.Priority.normal,null,"PluginUtilities.Promise._throwException")}},then:function(n){try{var t=n?n(this._value):this._value;return t===this._value?this:new e(t)}catch(i){return new ni(i)}}},{supportedForProcessing:!1});u=PluginUtilities.Class.derive(p,function(n,t){r&&(r===!0||r&f.promise)&&(this._stack=PluginUtilities.Promise._getStack());this._oncancel=t;this._setState(a);this._run();try{var i=this._completed.bind(this),u=this._error.bind(this),e=this._progress.bind(this);n(i,u,e)}catch(o){this._setExceptionValue(o)}},{_oncancel:null,_cancelAction:function(){if(this._oncancel)try{this._oncancel()}catch(n){}},_cleanupAction:function(){this._oncancel=null}},{addEventListener:function(n,t,i){h.addEventListener(n,t,i)},any:function(n){return new u(function(t,i){var r=Object.keys(n),e=Array.isArray(n)?[]:{},f;r.length===0&&t();f=0;r.forEach(function(e){u.as(n[e]).then(function(){t({key:e,value:n[e]})},function(u){if(u instanceof Error&&u.name===c){++f===r.length&&t(PluginUtilities.Promise.cancel);return}i({key:e,value:n[e]})})})},function(){var t=Object.keys(n);t.forEach(function(t){var i=u.as(n[t]);typeof i.cancel=="function"&&i.cancel()})})},as:function(n){return n&&typeof n=="object"&&typeof n.then=="function"?n:new e(n)},cancel:{get:function(){return ti=ti||new s(new PluginUtilities.ErrorFromName(c))}},dispatchEvent:function(n,t){return h.dispatchEvent(n,t)},is:function(n){return n&&typeof n=="object"&&typeof n.then=="function"},join:function(n){return new u(function(i,r,f){var o=Object.keys(n),e=Array.isArray(n)?[]:{},s=Array.isArray(n)?[]:{},l=0,h=o.length,a=function(n){var t,u;--h==0?(t=Object.keys(e).length,t===0?i(s):(u=0,o.forEach(function(n){var t=e[n];t instanceof Error&&t.name===c&&u++}),u===t?i(PluginUtilities.Promise.cancel):r(e))):f({Key:n,Done:!0})};if(o.forEach(function(i){var r=n[i];r===t?l++:u.then(r,function(n){s[i]=n;a(i)},function(n){e[i]=n;a(i)})}),h-=l,h===0){i(s);return}},function(){Object.keys(n).forEach(function(t){var i=u.as(n[t]);typeof i.cancel=="function"&&i.cancel()})})},removeEventListener:function(n,t,i){h.removeEventListener(n,t,i)},supportedForProcessing:!1,then:function(n,t,i,r){return u.as(n).then(t,i,r)},thenEach:function(n,t,i,r){var f=Array.isArray(n)?[]:{};return Object.keys(n).forEach(function(e){f[e]=u.as(n[e]).then(t,i,r)}),u.join(f)},timeout:function(n,t){var i=ui(n);return t?fi(i,t):i},wrap:function(n){return new e(n)},wrapError:function(n){return new s(n)},_veryExpensiveTagWithStack:{get:function(){return r},set:function(n){r=n}},_veryExpensiveTagWithStack_tag:f,_getStack:function(){if(Debug.debuggerEnabled)try{throw new Error}catch(n){return n.stack}},_cancelBlocker:function(n){if(!u.is(n))return u.wrap(n);var t,i,r=new PluginUtilities.Promise(function(n,r){t=n;i=r},function(){t=null;i=null});return n.then(function(n){t&&t(n)},function(n){i&&i(n)}),r}});Object.defineProperties(u,PluginUtilities.Utilities.createEventProperties(ut));ii=PluginUtilities.Class.derive(p,function(n){this._oncancel=n;this._setState(a);this._run()},{_cancelAction:function(){this._oncancel&&this._oncancel()},_cleanupAction:function(){this._oncancel=null}},{supportedForProcessing:!1});ri=PluginUtilities.Class.define(function(n){this._promise=new ii(n)},{promise:{get:function(){return this._promise}},cancel:function(){this._promise.cancel()},complete:function(n){this._promise._completed(n)},error:function(n){this._promise._error(n)},progress:function(n){this._promise._progress(n)}},{supportedForProcessing:!1});PluginUtilities.Namespace.define("PluginUtilities",{Promise:u,_Signal:ri});Microsoft.Plugin.Promise=u}(this),function(n,t){"use strict";t.Namespace.define("PluginUtilities",{ErrorFromName:t.Class.derive(Error,function(n,t){this.name=n;this.message=t||n},{},{supportedForProcessing:!1})})}(this,PluginUtilities),function(){"use strict";function n(n){var r={},t="_prev"+n,i="_next"+n;return r["_remove"+n]=function(){var n=this[t],r=this[i];r&&(r[t]=n);n&&(n[i]=r);this[t]=null;this[i]=null},r["_insert"+n+"Before"]=function(n){var r=this[t];return r&&(r[i]=n),n[i]=this,n[t]=r,this[t]=n,n},r["_insert"+n+"After"]=function(n){var r=this[i];return this[i]=n,n[i]=r,n[t]=this,r&&(r[t]=n),n},r}PluginUtilities.Namespace.define("PluginUtilities.Utilities",{_linkedListMixin:n})}(this),function(n,t){"use strict";function ni(n,i,r){return r!==t?"("+n+";"+i+";"+r+")":i!==t?"("+n+";"+i+")":n!==t?"("+n+")":""}function p(n,t,i,r){msWriteProfilerMark("PluginUtilities.Scheduler:"+n+ni(i,r)+","+t)}function e(n,i,r,u,f){var e=n.name||u!==t||f!==t;msWriteProfilerMark("PluginUtilities.Scheduler:"+i+":"+n.id+(e?ni(n.name,u,f):"")+","+r)}function r(){return!1}function d(n){throw"Illegal call by job("+n.id+") in state: "+this.name}function v(n){return function(t,i,r){t._setState(n,i,r)}}function ht(n,t){n._setPriority(t)}function fr(n,t){function e(n,t){PluginUtilities.log&&PluginUtilities.log(t+": MARKER: "+n.name,"PluginUtilities scheduler","log")}function o(n,t){PluginUtilities.log&&PluginUtilities.log(t+": JOB("+n.id+"): state: "+(n._state?n._state.name:"")+(n.name?", name: "+n.name:""),"PluginUtilities scheduler","log")}PluginUtilities.log&&PluginUtilities.log("highWaterMark: "+f,"PluginUtilities scheduler","log");var u=0,s=t?ct[ct.length-1]:ct[0],r=s;do r instanceof i&&e(r,u),r instanceof k&&o(r,u),u++,r=t?r["_prev"+n]:r["_next"+n];while(r)}function er(){function u(t,i){n+="    "+(i?"*":" ")+"id: "+t.id+", priority: "+h(t.priority).name+(t.name?", name: "+t.name:"")+"\n"}var n="",t,r,i,e;for(n+="Jobs:\n",t=h(f),r=0,st&&(u(st,!0),r++);t.priority>=s.min;)t instanceof k&&(u(t,!1),r++),t=t._nextJob;for(r===0&&(n+="     None\n"),n+="Drain requests:\n",i=0,e=o.length;i<e;i++)n+="    "+(i===0?"*":" ")+"priority: "+h(o[i].priority).name+", name: "+o[i].name+"\n";return o.length===0&&(n+="     None\n"),n}function or(){var n=ct[0];do{if(n instanceof k)return!1;n=n._nextJob}while(n);return!0}function bi(){return o.length===0?null:o[0].priority}function ri(n){p("drain","StartTM",n.name,h(n.priority).name)}function ki(n,t){t&&p("drain-canceled","info",n.name,h(n.priority).name);p("drain","StopTM",n.name,h(n.priority).name)}function sr(n,t,i){o.push({priority:n,complete:t,name:i});o.length===1&&(ri(o[0]),n>f&&(f=n,rt=!0))}function hr(n,t){for(var r=o.length,i=0;i<r;i++)if(o[i].complete===n){i===0&&(ki(o[0],t),o[1]&&ri(o[1]));o.splice(i,1);break}}function cr(){var n=o.shift();n&&(ki(n),o[0]&&ri(o[0]),n.complete())}function di(){var t=!1,n;if(!!o.length)for(n=bi();+n===n&&n>f;)lt=n,cr(),t=!0,n=bi();return t}function vt(n){return n>=s.aboveNormal+1?u.HIGH:n>=s.belowNormal?u.NORMAL:u.IDLE}function lr(n,t){return ut[n]>=ut[t]}function ar(n,t){return ut[n]>ut[t]}function gi(n){switch(n){case u.HIGH:return!1;case u.NORMAL:return u.isTaskScheduledAtPriorityOrHigher(u.HIGH);case u.IDLE:return u.isTaskScheduledAtPriorityOrHigher(u.NORMAL)}}function vr(n,t){var i=h(t);i.priority>f&&(f=i.priority,rt=!0);i._insertJobAfter(n)}function ui(n,t){var i=h(t);i.priority>f&&(f=i.priority,rt=!0);i._nextMarker._insertJobBefore(n)}function fi(n){return n=n|0,n=Math.max(n,ur),Math.min(n,pi)}function h(n){return n=fi(n),ct[-1*(n-pi)]}function yr(n){var r,c,t,b,y,a,d;yt=!0;p("timeslice","StartTM");c=!0;rt=!1;try{for(var g=ei(),nt=g+wi,i,l=!1,v=!1,w=function(){return(v=!1,rt)?!0:gi(vt(f))?!0:!o.length?ei()>nt?(v=!0,!0):!1:!1};f>=s.min&&!w()&&!l;){r=!1;t=h(f)._nextJob;do lt=t.priority,t instanceof k?(i!==t.priority&&(+i===i&&p("priority","StopTM",h(i).name),p("priority","StartTM",h(t.priority).name),i=t.priority),r=!0,c=!1,st=t,e(st,"job-running","StartTM",h(lt).name),t._execute(w),e(st,"job-running","StopTM",h(lt).name),st=null,c=!0):(b=vt(f),f=t.priority,r=di(),y=vt(f),ar(b,y)&&(!at||u.isTaskScheduledAtPriorityOrHigher(y))&&(l=!0)),t=t._nextJob;while(t&&!r&&!l&&!gi(vt(f)));rt=!1}}finally{for(st=null,c||(e(t,"job-error","info"),e(t,"job-running","StopTM",h(lt).name),t.cancel()),+i===i&&p("priority","StopTM",h(i).name),a=!1;f>=s.min&&!a;){r=!1;t=h(f)._nextJob;do t instanceof k?a=!0:(f=t.priority,r=di()),t=t._nextJob;while(t&&!r&&!a)}d=c?v?"timeslice exhausted":f<s.min?"jobs exhausted":l?"reached WWA priority boundary":"WWA host work":"job error";n&&(bt=null);yt=!1;f>=s.min&&hi();p("yielding","info",d);p("timeslice","StopTM")}}function hi(n){var t,i,r;(+n!==n&&(n=f),t=vt(n),yt)||bt&&(!at||lr(bt,t))||(i=++oi,r=function(){si<i&&(si=oi,yr(!0))},u.execAsyncAtPriority(r,t),bt=t)}function pr(n,i){var f=rr++,r,u;return i===t&&(i="Drain Request "+f),n=+n===n?n:s.min,n=fi(n),u=new dt(function(t){r=t;sr(n,r,i)},function(){hr(r,!0)}),yt||hi(),u}function wr(n){return u.execAtPriority(n,u.HIGH)}function br(){return new li}function nr(n,t,i,r){t=t||s.normal;i=i||null;var u=++ir,f=Debug.msTraceAsyncOperationStarting("PluginUtilities.Utilities.Scheduler.schedule: "+u+ni(r));return r=r||"",new k(u,n,t,i,r,f)}function kr(){if(yt)return lt;switch(u.getCurrentPriority()){case u.HIGH:return s.high;case u.NORMAL:return s.normal;case u.IDLE:return s.idle}}function pt(n){return function(t,i){var r;return new PluginUtilities.Promise(function(u){r=nr(function(){u(t)},n,null,i)},function(){r.cancel()})}}var dt=PluginUtilities.Promise,gt=PluginUtilities.Utilities._linkedListMixin,tr={get jobInfoIsNoLongerValid(){return PluginUtilities.Resources._getPluginUtilitiesString("base/jobInfoIsNoLongerValid").value}},k=PluginUtilities.Class.define(function(n,t,i,r,u,f){this._id=n;this._work=t;this._context=r;this._name=u;this._asyncOpID=f;this._setPriority(i);this._setState(ai);e(this,"job-scheduled","info")},{completed:{get:function(){return!!this._state.completed}},id:{get:function(){return this._id}},name:{get:function(){return this._name},set:function(n){this._name=n}},owner:{get:function(){return this._owner},set:function(n){this._owner&&this._owner._remove(this);this._owner=n;this._owner&&this._owner._add(this)}},priority:{get:function(){return this._priority},set:function(n){n=fi(n);this._state.setPriority(this,n)}},cancel:function(){this._state.cancel(this)},pause:function(){this._state.pause(this)},resume:function(){this._state.resume(this)},_execute:function(n){this._state.execute(this,n)},_executeDone:function(n){return this._state.executeDone(this,n)},_blockedDone:function(n){return this._state.blockedDone(this,n)},_setPriority:function(n){+this._priority===this._priority&&this._priority!==n&&e(this,"job-priority-changed","info",h(this._priority).name,h(n).name);this._priority=n},_setState:function(n,t,i){this._state&&PluginUtilities.log&&PluginUtilities.log("Transitioning job ("+this.id+") from: "+this._state.name+" to: "+n.name,"PluginUtilities scheduler","log");this._state=n;this._state.enter(this,t,i)}}),i,kt,u,ut,ei,oi,si;PluginUtilities.Class.mix(k,gt("Job"));var l={complete:1,"continue":2,block:3},ci=PluginUtilities.Class.define(function(n,t){this._job=t;this._result=null;this._yieldPolicy=l.complete;this._shouldYield=n},{job:{get:function(){return this._throwIfDisabled(),this._job}},shouldYield:{get:function(){return this._throwIfDisabled(),this._shouldYield()}},setPromise:function(n){this._throwIfDisabled();this._result=n;this._yieldPolicy=l.block},setWork:function(n){this._throwIfDisabled();this._result=n;this._yieldPolicy=l.continue},_disablePublicApi:function(){this._publicApiDisabled=!0},_throwIfDisabled:function(){if(this._publicApiDisabled)throw new PluginUtilities.ErrorFromName("PluginUtilities.Utilities.Scheduler.JobInfoIsNoLongerValid",tr.jobInfoIsNoLongerValid)}}),li=PluginUtilities.Class.define(function(){this._jobs={}},{cancelAll:function(){var t=this._jobs,i=Object.keys(t),n,r;for(this._jobs={},n=0,r=i.length;n<r;n++)t[i[n]].cancel()},_add:function(n){this._jobs[n.id]=n},_remove:function(n){delete this._jobs[n.id]}});var c=PluginUtilities.Class.define(function(n){this.name=n;this.enter=d;this.execute=d;this.executeDone=d;this.blockedDone=d;this.cancel=d;this.pause=d;this.resume=d;this.setPriority=d}),ai=new c("created"),w=new c("scheduled"),ft=new c("paused"),a=new c("canceled"),et=new c("running"),g=new c("running_paused"),ot=new c("running_resumed"),b=new c("running_canceled"),vi=new c("running_canceled_blocked"),wt=new c("cooperative_yield"),ti=new c("cooperative_yield_paused"),ii=new c("blocked"),nt=new c("blocked_waiting"),yi=new c("blocked_paused"),tt=new c("blocked_paused_waiting"),it=new c("blocked_canceled"),y=new c("complete");ai.enter=function(n){ui(n,n.priority);n._setState(w)};w.enter=function(){hi()};w.execute=v(et);w.cancel=v(a);w.pause=v(ft);w.resume=r;w.setPriority=function(n,t){n.priority!==t&&(n._setPriority(t),n.pause(),n.resume())};ft.enter=function(n){e(n,"job-paused","info");n._removeJob()};ft.cancel=v(a);ft.pause=r;ft.resume=function(n){e(n,"job-resumed","info");ui(n,n.priority);n._setState(w)};ft.setPriority=ht;a.enter=function(n){e(n,"job-canceled","info");Debug.msTraceAsyncOperationCompleted(n._asyncOpID,Debug.MS_ASYNC_OP_STATUS_CANCELED);n._removeJob();n._work=null;n._context=null;n.owner=null};a.cancel=r;a.pause=r;a.resume=r;a.setPriority=r;et.enter=function(n,t){var i,e;n._removeJob();var r=n.priority,o=n._work,f=n._context;n._work=null;n._context=null;i=new ci(t,n);Debug.msTraceAsyncCallbackStarting(n._asyncOpID);try{u.execAtPriority(function(){o.call(f,i)},vt(r))}finally{Debug.msTraceAsyncCallbackCompleted();i._disablePublicApi()}n._context=f;e=n._executeDone(i._yieldPolicy);n._setState(e,i._result,r)};et.executeDone=function(n,t){switch(t){case l.complete:return y;case l.continue:return wt;case l.block:return ii}};et.cancel=function(n){rt=!0;n._setState(b)};et.pause=function(n){rt=!0;n._setState(g)};et.resume=r;et.setPriority=ht;g.enter=r;g.executeDone=function(n,t){switch(t){case l.complete:return y;case l.continue:return ti;case l.block:return yi}};g.cancel=v(b);g.pause=r;g.resume=v(ot);g.setPriority=ht;ot.enter=r;ot.executeDone=function(n,t){switch(t){case l.complete:return y;case l.continue:return wt;case l.block:return ii}};ot.cancel=v(b);ot.pause=v(g);ot.resume=r;ot.setPriority=ht;b.enter=r;b.executeDone=function(n,t){switch(t){case l.complete:case l.continue:return a;case l.block:return vi}};b.cancel=r;b.pause=r;b.resume=r;b.setPriority=r;vi.enter=function(n,t){t.cancel();n._setState(a)};wt.enter=function(n,t,i){e(n,"job-yielded","info");i===n.priority?vr(n,n.priority):ui(n,n.priority);n._work=t;n._setState(w)};ti.enter=function(n,t){e(n,"job-yielded","info");n._work=t;n._setState(ft)};ii.enter=function(n,t,i){e(n,"job-blocked","StartTM");n._work=t;n._setState(nt);t.done(function(t){e(n,"job-blocked","StopTM");var r=n._blockedDone(t);n._setState(r,t,i)},function(t){return t&&t.name==="Canceled"||e(n,"job-error","info"),e(n,"job-blocked","StopTM"),n._setState(a),dt.wrapError(t)})};nt.enter=r;nt.blockedDone=function(n,t){return typeof t=="function"?wt:y};nt.cancel=v(it);nt.pause=v(tt);nt.resume=r;nt.setPriority=ht;yi.enter=function(n,t,i){e(n,"job-blocked","StartTM");n._work=t;n._setState(tt);t.done(function(t){e(n,"job-blocked","StopTM");var r=n._blockedDone(t);n._setState(r,t,i)},function(t){return t&&t.name==="Canceled"||e(n,"job-error","info"),e(n,"job-blocked","StopTM"),n._setState(a),dt.wrapError(t)})};tt.enter=r;tt.blockedDone=function(n,t){return typeof t=="function"?ti:y};tt.cancel=v(it);tt.pause=r;tt.resume=v(nt);tt.setPriority=ht;it.enter=function(n){n._work.cancel();n._work=null};it.blockedDone=function(){return a};it.cancel=r;it.pause=r;it.resume=r;it.setPriority=r;y.completed=!0;y.enter=function(n){Debug.msTraceAsyncOperationCompleted(n._asyncOpID,Debug.MS_ASYNC_OP_STATUS_SUCCESS);n._work=null;n._context=null;n.owner=null;e(n,"job-completed","info")};y.cancel=r;y.pause=r;y.resume=r;y.setPriority=r;i=PluginUtilities.Class.define(function(n,t){this.priority=n;this.name=t},{});PluginUtilities.Class.mix(i,gt("Job"),gt("Marker"));var ir=0,rr=0,ur=-15,pi=15,s={max:15,high:13,aboveNormal:9,normal:0,belowNormal:-9,idle:-13,min:-15},ct=[new i(15,"max"),new i(14,"14"),new i(13,"high"),new i(12,"12"),new i(11,"11"),new i(10,"10"),new i(9,"aboveNormal"),new i(8,"8"),new i(7,"7"),new i(6,"6"),new i(5,"5"),new i(4,"4"),new i(3,"3"),new i(2,"2"),new i(1,"1"),new i(0,"normal"),new i(-1,"-1"),new i(-2,"-2"),new i(-3,"-3"),new i(-4,"-4"),new i(-5,"-5"),new i(-6,"-6"),new i(-7,"-7"),new i(-8,"-8"),new i(-9,"belowNormal"),new i(-10,"-10"),new i(-11,"-11"),new i(-12,"-12"),new i(-13,"idle"),new i(-14,"-14"),new i(-15,"min"),new i(-16,"<TAIL>")];var bt=null,yt,lt,st=null,at=!!(n.MSApp&&n.MSApp.execAtPriority),o=[],rt,wi=30,f=s.min;ct.reduce(function(n,t){return n&&(n._insertJobAfter(t),n._insertMarkerAfter(t)),t});kt={execAsyncAtPriority:function(n,t){t===u.HIGH&&setTimeout(n,0);setImmediate(n)},execAtPriority:function(n){return n()},getCurrentPriority:function(){return kt.NORMAL},isTaskScheduledAtPriorityOrHigher:function(){return!1},HIGH:"high",NORMAL:"normal",IDLE:"idle"};u=at?n.MSApp:kt;ut={};ut[u.IDLE]=1;ut[u.NORMAL]=2;ut[u.HIGH]=3;ei=n.performance&&performance.now&&performance.now.bind(performance)||Date.now.bind(Date);oi=0;si=0;PluginUtilities.Namespace.define("PluginUtilities.Utilities.Scheduler",{Priority:s,schedule:nr,createOwnerToken:br,execHigh:wr,requestDrain:pr,currentPriority:{get:kr},schedulePromiseHigh:pt(s.high),schedulePromiseAboveNormal:pt(s.aboveNormal),schedulePromiseNormal:pt(s.normal),schedulePromiseBelowNormal:pt(s.belowNormal),schedulePromiseIdle:pt(s.idle),retrieveState:er,_JobNode:k,_JobInfo:ci,_OwnerToken:li,_dumpList:fr,_isEmpty:{get:or},_usingWwaScheduler:{get:function(){return at},set:function(t){at=t;u=at?n.MSApp:kt}},_MSApp:{get:function(){return u},set:function(n){u=n}},_TIME_SLICE:wi})}(this),function(n,t){function i(n,t,i){u.schedule(function(){n(t)},i,null,"Microsoft.Plugin.Utilities.xhr")}function r(){}var u=PluginUtilities.Utilities.Scheduler;Microsoft.Plugin.Utilities.xhr=function(n){var f;return new Microsoft.Plugin.Promise(function(e,o,s){var h=u.currentPriority;f=new XMLHttpRequest;f.onreadystatechange=function(){if(f._canceled){f.onreadystatechange=r;return}f.readyState===4?(f.status>=200&&f.status<300?i(e,f,h):i(o,f,h),f.onreadystatechange=r):i(s,f,h)};f.open(n.type||"GET",n.url,!0,n.user,n.password);f.responseType=n.responseType||"";Object.keys(n.headers||{}).forEach(function(t){f.setRequestHeader(t,n.headers[t])});n.customRequestInitializer&&n.customRequestInitializer(f);n.data===t?f.send():f.send(n.data)},function(){f.onreadystatechange=r;f._canceled=!0;f.abort()})}}(this);F12.Host.App.pluginHost.onLoaded();pluginGetString=Microsoft.Plugin.Resources.getString;Microsoft.Plugin.Resources.getString=function(){try{return pluginGetString.apply(this,arguments)}catch(r){var n=Array.prototype.slice.call(arguments),t=n[0];n[0]="/Common/"+t;try{return pluginGetString.apply(this,n)}catch(i){if(t.indexOf("vs_")===0)return isDebugBuild?"!!"+t+"!!":"";throw i}}};Plugin=window.Plugin||{};Plugin.Resources=Plugin.Resources||{};Plugin.Resources.getString=Microsoft.Plugin.Resources.getString
//# sourceMappingURL=plugin.f12.min.js.map
<!DOCTYPE html>
<!-- saved from url=(0016)http://localhost -->
<html>
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=11">
        <meta http-equiv="Content-Type" content="text/html">
        <meta http-equiv="format-detection" content="telephone=no">
        <title>Popup</title>
        <script type="text/javascript">

            var pluginId = -1;
            var scriptLibs = ["f12script.dll", "f12script2.dll"];

            function showPopup(popupInfo) {
                pluginId = popupInfo.pluginId;

                // Replace popup document styles if we were given a new set otherwise we just keep the current ones
                if (popupInfo.style != "") {
                    var popupStyleNodes = document.head.querySelectorAll("style, link[type='text/css']");
                    for (var i = 0; i < popupStyleNodes.length; i++) {
                        // Keep the default popup window styles
                        if (popupStyleNodes[i].id !== "pluginPopupWindowDefault") {
                            document.head.removeChild(popupStyleNodes[i]);
                        }
                    }

                    document.head.innerHTML += popupInfo.style;
                }

                // Hide the other element
                var otherElement = document.getElementById((popupInfo.isTooltip ? "contextmenu" : "plugin-vs-tooltip"));
                if (otherElement) {
                    otherElement.style.display = "none";
                }

                // Show the popup element
                var popupElement = document.getElementById((popupInfo.isTooltip ? "plugin-vs-tooltip": "contextmenu"));
                if (popupElement) {
                    if (popupInfo.isTooltip) {
                        // Set the tooltip content
                        popupElement.outerHTML = popupInfo.content;
                    } else {
                        // Set the context menu content
                        var info = JSON.parse(popupInfo.content);

                        if (info.ariaLabel && info.ariaLabel.length > 0) {
                            popupElement.setAttribute("aria-label", ariaLabel);
                        }

                        F12.Host.App.pluginHost.triggerContextMenuEvent("contextmenuinitialized", info);

                        if (info.id === "headerOverflowMenu") {
                            Microsoft.Plugin.F12.Communications.callMethod(Microsoft.Plugin.F12.PluginId.Header, "OverflowPopupShown");

                            popupElement.classList.add("headerMenu");
                            document.body.classList.add("headerMenuVisible");
                            drawBadges(popupElement);

                            var div = document.createElement("div");
                            div.classList.add("partialTopBorder")
                            popupElement.insertBefore(div, popupElement.firstChild);
                        } else if (info.id === "emulationContextMenu") {
                            Microsoft.Plugin.F12.Communications.callMethod(Microsoft.Plugin.F12.PluginId.Header, "EmulationPopupShown");

                            popupElement.classList.add("headerMenu");
                            document.body.classList.add("headerMenuVisible");

                            var div = document.createElement("div");
                            div.classList.add("partialTopBorder")
                            div.classList.add("docModeButtonTopBorder")
                            popupElement.insertBefore(div, popupElement.firstChild);
                        } else {
                            // because class list persists between menus, we need to make sure that we don't apply header css if the popup did not come from the header
                            popupElement.classList.remove("headerMenu");
                            document.body.classList.remove("headerMenuVisible");
                        }
                    }

                    popupElement.style.display = "block";
                }

                // Call showPopup immediately after HTML layout to avoid a flash of the previous popup's content
                window.setTimeout(function() { 
                    F12.Host.ExternalApis.popup.showPopup(popupInfo.x, popupInfo.y, popupInfo.width, popupInfo.height, popupInfo.activate);
                }, 0);

                return true;
            }

            function hidePopup() {
                F12.Host.ExternalApis.popup.hidePopup();
                // we only really need to call this when a header menu is dismissed, but this also works fine
                Microsoft.Plugin.F12.Communications.callMethod(Microsoft.Plugin.F12.PluginId.Header, "PopupHidden");
                return true;
            }

            // all the API let's us pass in is a single class, because we need to show how many errors are in the console, we encode both the 
            // badge that should be shown and the number of errors in the class, are parse the info out in this function
            function drawBadges(popupElement) {
                var rowElements = popupElement.querySelectorAll(".menuitem");
                for (var i = 0; i < rowElements.length; i++) {
                    for (var j = 0; j < rowElements[i].classList.length; j++) {
                        var match = rowElements[i].classList[j].match(/badgeCount_(\d+)$/);
                        if (match && match[1]) {
                            rowElements[i].classList.add("badgeType2");
                            if (parseInt(match[1]) === 99) {
                                rowElements[i].querySelector(".shortcut").textContent = "99+";
                            } else {
                                rowElements[i].querySelector(".shortcut").textContent = match[1];
                            }
                        }
                    }
                }
            }

            window.addEventListener("message", function (event) {
                // Ensure the message was received from a trusted origin (Script dll)
                var popupUrl = document.location.href.toLowerCase();
                for (var i = 0; i < scriptLibs.length; i++) {
                    var scriptLib = scriptLibs[i];
                    var endIndex = popupUrl.indexOf(scriptLib);
                    if (endIndex > -1 && event.origin.toLowerCase() === popupUrl.substring(0, endIndex + scriptLib.length)) {
                        Microsoft.Plugin.F12.Communications.fireEvent("popupMessage", pluginId, { name: event.data.name, id: event.data.id });
                        break;
                    }
                }
            });

            window.addEventListener("DOMContentLoaded", function () {
                Microsoft.Plugin.addEventListener("pluginready", function() {
                    Microsoft.Plugin.F12.Communications.registerMethodHandler("showPopup", showPopup);
                    Microsoft.Plugin.F12.Communications.registerMethodHandler("hidePopup", hidePopup);

                    try {
                        window.external.popup.addEventListener("close", hidePopup);
                    } catch (e) {
                        // Sometimes fails with "Invalid procedure call or argument" presumably during shutdown.
                    }

                    window.setImmediate(function () {
                        Microsoft.Plugin.F12.notifyOnToolActivated();

                        // Inform the F12 host that our tool is ready so that we can measure tool launch performance via PerfTrack
                        Microsoft.Plugin.F12.TraceWriter.markToolReady();
                    });
                });
            });
        </script>

        <!-- Daytona Includes -->
        <script type="text/javascript" src="../common/isDebugBuild.js"></script>
        <script type="text/javascript" src="../common/plugin.js"></script>
        <link rel="stylesheet" href="popupWindow.css" type="text/css"  id="pluginPopupWindowDefault" data-plugin-theme="true" />

    </head>
    <body>
        <ul id="contextmenu" class="plugin-contextmenu allowDisabledItemNavigation" role="menu"></ul>
        <div id="plugin-vs-tooltip"></div>
    </body>
</html>
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.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


IHDRt&xHD	pHYs���o�dPLTEg�*�Ԓ�������www~
�tRNS@��f	�iCCPxxڤ��Aƿg��|�m��۝w������m_��a׎�6f�ڈ٠vP�����D�W����h�l,+$��$�!�P$��5j�J�����x� �)��R��g1�`aZ%&�9')�+s>��m1C����,���Q�}���
q�`ţ)��9�G|��i��r��|үR��s�{�>����롒��������"��@x�}��1�G�Ơ��������tRN-7e,�^�]���"�cH� 0tg!��%�ȩ	��1��	0w�%|;D� `�}�6�8���:;�f;�9l|;ֶ���8p�Ѹ����`�Ȍ��,+V�r�0(0�sk��b�r��!�t@�v�u��3�אdJbƂxq�8ǑF:@M���<�T��ݭ)*Su���T'.a�
�5�5��bm_,V>Z����&
A�W���:���v�q?�ӓxF����@�wc3�}�_0!��
��&l�n@��,���C3:�x`����X�X_5f۶m۶m۶m۶m�Ɯ�Q4���L�G�i��M��v�:J��<]��t���KzG_(����(��8H�H�,ȍ�(�r���h����臡�)���X�M؅C8�K��Gx�O�O��q9��\�Kq��͸��<���B^�[y?��+|�_��_RI6)(e��4���[��d�/�e��rG^�W�T�8�R�i��������:U�Fݯg�����k�,�e��V�Z`�m���}v���;s����xEo�}�O�e��O�-�	���`��l۶m۶m۶m۶m;��A*��
@g0���>p<�!�.��š�-�•p/���_�C1��C�Q4-F;�9���<q\���t����'BH@r�
��O����8y@~P��*Dզ�Pc�e�~�����8���Iw���+�C�]�;#2i�Lc�3���\d޲���غlOv*��=Ǿ��
q
���,nw��‹|�߆ͯ�O�� ą"Bca��H8$<����H$.��O�dR(��ZJ��5�Y�,ș�rwy��G��$V�J	��2N٨\U~��Z@m��Pת�o���ךh#�u����E�V�}�~�Hb�4*݌���)���F�Hs�y�Jd��*Z��E�i���������Q��NKg���y�n^��;����d���ڛ����_���/����0��w"8�=�429r0�>�F�D{GWEo�P,{�ylZ�X�[<�W���/A���m۵9��l۶m۶m۶m�J���>�f�t��)���� uP$�|����ݐ[<D	�ޅ�A��q�a�������s�����-���ь�B���8��e�*C�hyt8z�Ì�Ɣ`v��"6
;�{�#�qu�K<���¯�d�a�"у�Bv���̚���On@�G�M�P�H�X�P*R&P�S���������A-CC=C�F�&�f��7�m�2�N�.�n�I�G_H�@�`�P�x���э���� S��/fe�t��9K
�]VV_�a��l�l�l;�vK��'�as�`N=�2�-;ɟ4���K����?n6n�I�.O9�=^�p�%>�_3�k~i�4�#zo�qA���`��s!	�T�caFa?����H��'QU���bBbIb��L��8	'�!I���d��')
�J��Ҳ�2we�e�d.d�e�d���"�v����hV��������V�����WUhT�T6TT�Tw�XբՎչՓկ5�5�5h�h�j��R�j��m�ݫ�qҙ�%�
�����K�__R����A�!���pֈ�(���X�8�䥉�I�)���tٌ�,����y��O[�YK:�X�����[;X/ڰؤ�>�U��C���ۗ9|u�q�wdqLwz��4�L��r�Eե���z����tr��h�Dy�x^{)yuy㽣|�h�������3�'��p8�l
�E?
6�	�)	��z�6N��%�5�8R!�/�6*+�k�{�Y�j�H,KlQܿ���{�F�K	B	͉��ԤOI�I��Z�3)|)
���Դ/i���
�W3$2z23K�`Y����s��1�Y˕���ȫ�'�g�-�(|]�V��i�N�J�L�hIo){i]EYa9�<��gEx��J�GUU��fՇ5:5�ʵ�u�u�"�
�
]��-M�M��t��-T-�䭥mĶ�v|{Q����Y؅�*�&t���R�V����3�7
�
�r
�	�Kό(���j������Lܝp�|14�e*n4�=����e������__�_�XtXz���}9u�R�ʼڳ&�����~��r3b�U�M�ݱ#�����{��q?�{Pw�s8u�yt~�v��$�x�|&|�|n|q�"�tYv�q5q�y}}���q cHRMz%������u0�`:�o�_�FtIDATx���A
�0@��?9kb,�"��ׁ�
@�+˝���F��Xo(���Yo(�u��V��V��V���I��s^�9�K3�yy&؛�n��Y�V�[�!��2�6��;:(�!x^4IEND�B`�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;
    -ms-overflow-style: scrollbar;
}

/* Don't add anything to this id if you can scope it more specifically. Changes to this
   CSS will affect the layout of every tooltip, so make changes cautiously if necessary. */
#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;
    box-sizing: content-box;
}

#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}]*/
    font-family: "Segoe UI", Arial, sans-serif;
}

#plugin-vs-tooltip-measure-container {
    box-sizing: content-box;
}

.f12HostMessageContainer {
    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;
}

.f12HostMessageInnerContainer {
    display: -ms-grid;
    -ms-grid-columns: auto 1fr auto auto;
    -ms-grid-rows: auto;
}

.f12HostZoomContainer {
    display: none;
    background: TRANSPARENT; /*[{plugin-contextmenu-background-color}]*/
    color: TRANSPARENT; /*[{plugin-font-editor-color}]*/
    width: 180px;
    border: 1px solid TRANSPARENT; /*[1px solid {plugin-contextmenu-active-border-color}]*/
    position: absolute;
    z-index: 1011;
    padding-top: 18px;
    padding-bottom: 20px;
    font-size: 12px;
    font-family: 'Segoe UI';
    text-align: center
}

.f12HostZoomMessageBold {
    font-size: 14px;
    font-family: 'Segoe UI Semibold';
}

.f12HostZoomMessageNotBold {
    padding-top: 10px;
}

.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;
    }

#f12HostMessageIcon {
    -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;
}

    #f12HostMessageIcon.info {
        background-image: url("../pluginhost/theme/i_alertinfo.png"); /*[url({f12-image-host-info-alert})]*/
    }

#f12HostMessageText {
    -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;
}

#f12HostMessageHelp {
    -ms-grid-row: 1;
    -ms-grid-column: 3;
    background-image: url("../pluginhost/theme/helpErrorBox.png"); /*[url({f12-image-host-error-help})]*/
}

#f12HostMessageClose {
    -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


IHDRt&xHD	pHYs���o�dPLTEg�*�Ԓ�������www~
�tRNS@��f	�iCCPxxڤ��Aƿg��|�m��۝w������m_��a׎�6f�ڈ٠vP�����D�W����h�l,+$��$�!�P$��5j�J�����x� �)��R��g1�`aZ%&�9')�+s>��m1C����,���Q�}���
q�`ţ)��9�G|��i��r��|үR��s�{�>����롒��������"��@x�}��1�G�Ơ��������tRN-7e,�^�]���"�cH� 0tg!��%�ȩ	��1��	0w�%|;D� `�}�6�8���:;�f;�9l|;ֶ���8p�Ѹ����`�Ȍ��,+V�r�0(0�sk��b�r��!�t@�v�u��3�אdJbƂxq�8ǑF:@M���<�T��ݭ)*Su���T'.a�
�5�5��bm_,V>Z����&
A�W���:���v�q?�ӓxF����@�wc3�}�_0!��
��&l�n@��,���C3:�x`����X�X_5f۶m۶m۶m۶m�Ɯ�Q4���L�G�i��M��v�:J��<]��t���KzG_(����(��8H�H�,ȍ�(�r���h����臡�)���X�M؅C8�K��Gx�O�O��q9��\�Kq��͸��<���B^�[y?��+|�_��_RI6)(e��4���[��d�/�e��rG^�W�T�8�R�i��������:U�Fݯg�����k�,�e��V�Z`�m���}v���;s����xEo�}�O�e��O�-�	���`��l۶m۶m۶m۶m;��A*��
@g0���>p<�!�.��š�-�•p/���_�C1��C�Q4-F;�9���<q\���t����'BH@r�
��O����8y@~P��*Dզ�Pc�e�~�����8���Iw���+�C�]�;#2i�Lc�3���\d޲���غlOv*��=Ǿ��
q
���,nw��‹|�߆ͯ�O�� ą"Bca��H8$<����H$.��O�dR(��ZJ��5�Y�,ș�rwy��G��$V�J	��2N٨\U~��Z@m��Pת�o���ךh#�u����E�V�}�~�Hb�4*݌���)���F�Hs�y�Jd��*Z��E�i���������Q��NKg���y�n^��;����d���ڛ����_���/����0��w"8�=�429r0�>�F�D{GWEo�P,{�ylZ�X�[<�W���/A���m۵9��l۶m۶m۶m�J���>�f�t��)���� uP$�|����ݐ[<D	�ޅ�A��q�a�������s�����-���ь�B���8��e�*C�hyt8z�Ì�Ɣ`v��"6
;�{�#�qu�K<���¯�d�a�"у�Bv���̚���On@�G�M�P�H�X�P*R&P�S���������A-CC=C�F�&�f��7�m�2�N�.�n�I�G_H�@�`�P�x���э���� S��/fe�t��9K
�]VV_�a��l�l�l;�vK��'�as�`N=�2�-;ɟ4���K����?n6n�I�.O9�=^�p�%>�_3�k~i�4�#zo�qA���`��s!	�T�caFa?����H��'QU���bBbIb��L��8	'�!I���d��')
�J��Ҳ�2we�e�d.d�e�d���"�v����hV��������V�����WUhT�T6TT�Tw�XբՎչՓկ5�5�5h�h�j��R�j��m�ݫ�qҙ�%�
�����K�__R����A�!���pֈ�(���X�8�䥉�I�)���tٌ�,����y��O[�YK:�X�����[;X/ڰؤ�>�U��C���ۗ9|u�q�wdqLwz��4�L��r�Eե���z����tr��h�Dy�x^{)yuy㽣|�h�������3�'��p8�l
�E?
6�	�)	��z�6N��%�5�8R!�/�6*+�k�{�Y�j�H,KlQܿ���{�F�K	B	͉��ԤOI�I��Z�3)|)
���Դ/i���
�W3$2z23K�`Y����s��1�Y˕���ȫ�'�g�-�(|]�V��i�N�J�L�hIo){i]EYa9�<��gEx��J�GUU��fՇ5:5�ʵ�u�u�"�
�
]��-M�M��t��-T-�䭥mĶ�v|{Q����Y؅�*�&t���R�V����3�7
�
�r
�	�Kό(���j������Lܝp�|14�e*n4�=����e������__�_�XtXz���}9u�R�ʼڳ&�����~��r3b�U�M�ݱ#�����{��q?�{Pw�s8u�yt~�v��$�x�|&|�|n|q�"�tYv�q5q�y}}���q cHRMz%������u0�`:�o�_�FoIDATx���A
�PEQ�l�K���{|���
TP��,cI�Am�����C��!���bf��Y-&T�#h�
��
�B�ߔ��S�i}S��̴es��9�z���K�ҧ�wS�IEND�B`�{
"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-word-highlight-color": "#1E1E1E",
"plugin-word-highlight-strong-color": "rgba(249, 206, 130, 0.7)",
"plugin-highlight-border-color": "transparent",
"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-preview-tab-background-color": "#C0C0C0",
"vs-file-preview-tab-hover-background-color": "#B064AB",
"vs-file-preview-tab-hover-text-color": "#FFFFFF",
"vs-file-preview-tab-selected-background-color": "#68217A",
"vs-file-preview-tab-selected-text-color": "#FFFFFF",
"vs-file-preview-tab-text-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-treeview-content-mouseover-background-color": "#E2E2E2",
"plugin-perftools-treeview-content-mouseover-color": "#1E1E1E",
"plugin-perftools-treeview-content-selected-background-color": "#CCE4F5",
"plugin-perftools-treeview-content-selected-color": "#1E1E1E",
"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-font-editor-text-spotlight-background-color": "#E8A277",

"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-editor-selected-text-focus-background-color" : "#ADD6FF",
"plugin-editor-selected-text-background-color" : "#E5EBF1",

"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-debugger-document-toolbar-seperator-color" : "#9F9F9F",

"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-network-grid-border-color": "#1e1e1e",
"plugin-network-grid-cell-even-background-color": "#ffffff",
"plugin-network-grid-cell-odd-background-color": "#fcfcfc",
"plugin-network-grid-column-header-background-color": "#eeeef2",
"plugin-network-grid-path-color": "#717171",
"plugin-network-grid-path-color-highlighted": "#717171",
"plugin-network-grid-path-color-selected": "#717171",
"plugin-network-grid-response-blur-cache-color": "#717171",
"plugin-network-grid-response-blur-error-color": "#E61E27",
"plugin-network-grid-response-cache-color": "#717171",
"plugin-network-grid-response-error-color": "#e61e27",
"plugin-network-grid-response-selected-cache-color": "#717171",
"plugin-network-grid-response-selected-error-color": "#E61E27",
"plugin-network-splitter": "#C8C8C8",
"plugin-network-tabpane-key-color": "#717171",
"plugin-network-tabpane-value-color": "#ab6c1c",
"plugin-network-toolbar-button-hover-text-color": "#000000",
"plugin-network-toolbar-button-popup-text-color": "#000000",
"plugin-network-toolbar-button-pressed-text-color": "#1E1E1E",
"plugin-network-toolbar-button-text-color": "#000000",

"plugin-resources-grid-cell-even-background-color": "#ffffff",
"plugin-resources-grid-cell-odd-background-color": "#fcfcfc",
"plugin-resources-grid-hborder": "#f3f3f3",
"plugin-resources-grid-vborder": "#EDEDED",
"plugin-resources-grid-header-hborder": "#CCCEDB",
"plugin-resources-grid-active-cell-background": "#99CCFF",
"plugin-resources-grid-active-cell-border": "#ADADAD",
"plugin-resources-grid-active-row-background": "#CCE4F5",
"plugin-resources-grid-editable-cell-background": "#FFFFFF",

"plugin-theme-color": "#FFFFFF",

"plugin-experiment-switch-inner-before-background-color": "#2E8DEF",
"plugin-experiment-switch-inner-after-background-color": "#CCCCCC",
"plugin-experiment-switch-inner-after-color": "#333333",
"plugin-experiment-on-off-switch-border-color": "#FFFFFF",
"plugin-experiment-on-off-switch-color": "#000000",

"monaco-gotoline-background-color": "#F6F6F6",
"monaco-gotoline-focused-background-color": "#DCEBFC",
"monaco-gotoline-selected-background-color": "#3399FF",
"monaco-gotoline-hover-background-color":  "#F0F0F0"
}
{
"plugin-font-family": "\"Segoe UI\"",
"plugin-font-size": "12px",
"plugin-font-weight": "normal",
"plugin-color": "<COLOR_WINDOWTEXT>",
"plugin-contextmenu-active-color": "<COLOR_HIGHLIGHT>",
"plugin-contextmenu-background-color": "<COLOR_WINDOW>",
"plugin-contextmenu-border-color": "<COLOR_WINDOWFRAME>",
"plugin-contextmenu-color": "<COLOR_WINDOWFRAME>",
"plugin-contextmenu-hover-color": "<COLOR_HIGHLIGHT>",
"plugin-contextmenu-hover-text-color": "<COLOR_HIGHLIGHTTEXT>",
"plugin-contextmenu-inactive-text-color": "<COLOR_INACTIVEBORDER>",
"plugin-contextmenu-separator-color": "<COLOR_HIGHLIGHTTEXT>",
"plugin-contextmenu-active-border-color": "<COLOR_HIGHLIGHTTEXT>",
"plugin-contextmenu-inactive-border-color": "<COLOR_INACTIVEBORDER>",
"plugin-contextmenu-inactive-background-color": "<COLOR_WINDOW>",
"plugin-contextmenu-checkbox-border-color": "<COLOR_HIGHLIGHTTEXT>",
"plugin-contextmenu-checkbox-background-color": "<COLOR_WINDOW>",
"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": "<COLOR_WINDOW>",
"plugin-border-color": "<COLOR_WINDOWTEXT>",
"plugin-box-shadow-color": "<COLOR_WINDOWTEXT>",
"plugin-inactive-color": "<COLOR_INACTIVECAPTIONTEXT>",
"plugin-link-color": "<COLOR_HOTLIGHT>",
"plugin-link-hover-color": "<COLOR_HOTLIGHT>",
"plugin-link-active-color": "<COLOR_WINDOWTEXT>",
"plugin-link-active-selected-color": "<COLOR_HIGHLIGHTTEXT>",
"plugin-highlight-color": "<COLOR_HIGHLIGHTTEXT>",
"plugin-word-highlight-color": "<COLOR_WINDOW>",
"plugin-word-highlight-strong-color": "<COLOR_WINDOW>",
"plugin-highlight-border-color": "<COLOR_ACTIVEBORDER>",
"plugin-highlight-background-color": "<COLOR_HIGHLIGHT>",
"plugin-table-border-color": "<COLOR_WINDOW>",
"plugin-scrollbar-background-color": "<COLOR_SCROLLBAR>",
"plugin-scrollbar-face-color": "<COLOR_BTNFACE>",
"plugin-select-option-background-color": "<COLOR_WINDOW>",
"plugin-select-option-color": "<COLOR_WINDOWTEXT>",
"plugin-select-option-checked-background-color": "<COLOR_HIGHLIGHT>",
"plugin-select-option-checked-border-color": "<COLOR_HIGHLIGHT>",
"plugin-select-option-checked-foreground-color": "<COLOR_HIGHLIGHTTEXT>",
"plugin-select-option-hover-background-color": "<COLOR_HIGHLIGHT>",
"plugin-select-option-hover-border-color": "<COLOR_HIGHLIGHT>",
"plugin-select-option-hover-foreground-color": "<COLOR_HIGHLIGHTTEXT>",
"plugin-select-border-color": "<COLOR_WINDOWFRAME>",
"plugin-select-background-color": "<COLOR_WINDOW>",
"plugin-select-foreground-color": "<COLOR_WINDOWTEXT>",
"plugin-select-hover-background-color": "<COLOR_HIGHLIGHT>",
"plugin-select-hover-border-color": "<COLOR_WINDOWFRAME>",
"plugin-select-hover-foreground-color": "<COLOR_HIGHLIGHTTEXT>",
"plugin-textbox-disabled-background-color": "<COLOR_WINDOW>",
"plugin-textbox-color": "<COLOR_WINDOWTEXT>",
"plugin-textbox-background-color": "<COLOR_WINDOW>",
"plugin-textbox-border-color": "<COLOR_WINDOWTEXT>",
"plugin-tooltip-background-color": "<COLOR_WINDOW>",
"plugin-tooltip-border-color": "<COLOR_WINDOWFRAME>",
"plugin-tooltip-text-color": "<COLOR_WINDOWFRAME>",
"plugin-treeview-content-inactive-selected-background-color": "<COLOR_HIGHLIGHT>",
"plugin-treeview-content-inactive-selected-color": "<COLOR_HIGHLIGHTTEXT>",
"plugin-treeview-content-selected-background-color": "<COLOR_HIGHLIGHT>",
"plugin-treeview-content-selected-color": "<COLOR_HIGHLIGHTTEXT>",
"plugin-treeview-content-selected-border-color": "<COLOR_HIGHLIGHT>",
"plugin-treeview-content-background-color": "<COLOR_WINDOW>",
"plugin-treeview-content-mouseover-color": "<COLOR_HIGHLIGHTTEXT>",
"plugin-treeview-content-mouseover-background-color": "<COLOR_HIGHLIGHT>",
"plugin-searchcontrol-clear-hover-color": "<COLOR_HIGHLIGHTTEXT>",
"plugin-searchcontrol-selection-color": "<COLOR_HIGHLIGHT>",
"plugin-searchcontrol-unfocused-watermark-text-color": "<COLOR_WINDOWTEXT>",
"plugin-searchcontrol-unfocused-background-color": "<COLOR_WINDOW>",
"plugin-searchcontrol-unfocused-border-color": "<COLOR_WINDOWTEXT>",
"plugin-searchcontrol-mouseover-watermark-text-color": "<COLOR_WINDOWTEXT>",
"plugin-searchcontrol-mouseover-background-background-color": "<COLOR_WINDOW>",
"plugin-searchcontrol-mouseover-background-foreground-color": "<COLOR_WINDOWTEXT>",
"plugin-searchcontrol-mouseover-border-color": "<COLOR_HIGHLIGHT>",
"plugin-menucontrol-background-color": "<COLOR_WINDOW>",

"plugin-pseudo-class-panel-disabled-color": "<COLOR_WINDOWTEXT>",
"plugin-styles-deleted-item-color": "<COLOR_INACTIVECAPTIONTEXT>",
"plugin-styles-changebar-add-color": "<COLOR_HIGHLIGHT>",
"plugin-styles-changebar-update-color": "<COLOR_HIGHLIGHT>",
"plugin-styles-changebar-remove-color": "<COLOR_HIGHLIGHT>",

"vs-combo-box-popup-background-begin-color": "<COLOR_WINDOW>",
"vs-combo-box-popup-border-color": "<COLOR_WINDOWTEXT>",
"vs-command-bar-gradient-begin-color": "<COLOR_WINDOW>",
"vs-command-bar-menu-separator-color": "<COLOR_WINDOW>",
"vs-command-bar-mouse-down-background-begin-color": "<COLOR_HOTLIGHT>",
"vs-command-bar-mouse-down-background-end-color": "<COLOR_HOTLIGHT>",
"vs-command-bar-mouse-down-border-color": "<COLOR_HOTLIGHT>",
"vs-command-bar-mouse-over-background-begin-color": "<COLOR_WINDOW>",
"vs-command-bar-mouse-over-background-middle1-color": "<COLOR_WINDOW>",
"vs-command-bar-options-background-color": "<COLOR_WINDOW>",
"vs-command-bar-selected-border-color": "<COLOR_HIGHLIGHT>",
"vs-command-bar-text-inactive-color": "<COLOR_INACTIVECAPTIONTEXT>",
"vs-command-bar-text-selected-color": "<COLOR_WINDOWTEXT>",
"vs-designer-selection-dots-color": "<COLOR_WINDOWTEXT>",
"vs-drop-down-background-color": "<COLOR_WINDOW>",
"vs-drop-down-border-color": "<COLOR_WINDOW>",
"vs-drop-down-button-mouse-over-background-color": "<COLOR_WINDOW>",
"vs-drop-down-disabled-text-color": "<COLOR_HIGHLIGHT>",
"vs-drop-down-mouse-over-background-begin-color": "<COLOR_WINDOW>",
"vs-drop-down-mouse-over-border-color": "<COLOR_WINDOW>",
"vs-drop-down-mouse-over-text-color": "<COLOR_WINDOWTEXT>",
"vs-drop-down-popup-background-begin-color": "<COLOR_WINDOW>",
"vs-drop-down-text-color": "<COLOR_WINDOWTEXT>",
"vs-drop-shadow-background-color": "<COLOR_WINDOWTEXT>",
"vs-file-preview-tab-background-color": "<COLOR_WINDOW>",
"vs-file-preview-tab-hover-background-color": "<COLOR_HIGHLIGHT>",
"vs-file-preview-tab-hover-text-color": "<COLOR_HIGHLIGHTTEXT>",
"vs-file-preview-tab-selected-background-color": "<COLOR_HIGHLIGHT>",
"vs-file-preview-tab-selected-text-color": "<COLOR_HIGHLIGHTTEXT>",
"vs-file-preview-tab-text-color": "<COLOR_WINDOWTEXT>",
"vs-file-tab-button-hover-selected-active-border-color": "<COLOR_WINDOWTEXT>",
"vs-file-tab-hot-gradient-bottom-color": "<COLOR_WINDOWTEXT>",
"vs-file-tab-hot-text-color": "<COLOR_WINDOW>",
"vs-file-tab-selected-gradient-bottom-color": "<COLOR_WINDOWTEXT>",
"vs-file-tab-selected-text-color": "<COLOR_WINDOW>",
"vs-file-tab-text-color": "<COLOR_WINDOWTEXT>",
"vs-horizontal-resize-grip-color": "<COLOR_WINDOWTEXT>",
"vs-main-window-button-down-color": "<COLOR_HOTLIGHT>",
"vs-main-window-button-down-glyph-color": "<COLOR_WINDOW>",
"vs-main-window-button-hover-active-color": "<COLOR_WINDOW>",
"vs-tool-window-background-color": "<COLOR_WINDOW>",
"vs-tool-window-text-color": "<COLOR_WINDOWTEXT>",
"vs-toolbox-background-color": "<COLOR_WINDOW>",
"vs-tree-view-selected-item-inactive-color": "<COLOR_WINDOW>",

"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": "<COLOR_HIGHLIGHTTEXT>",
"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": "<COLOR_HIGHLIGHTTEXT>",
"f12-intellisense-hover-background-color": "<COLOR_HIGHLIGHT>",
"f12-intellisense-checked-color": "<COLOR_HIGHLIGHTTEXT>",
"f12-intellisense-checked-background-color": "<COLOR_HIGHLIGHT>",

"f12-header-popup-hover": "<COLOR_HIGHLIGHT>",
"f12-header-popup-border-color": "<COLOR_WINDOWFRAME>",

"diagnostics-host-border": "<COLOR_WINDOWFRAME>",
"diagnostics-host-graph-cursor": "<COLOR_WINDOWFRAME>",
"diagnostics-host-graph-line": "<COLOR_WINDOWFRAME>",
"diagnostics-host-graph-scale": "<COLOR_WINDOWFRAME>",
"diagnostics-host-ruler-slider": "<COLOR_WINDOWFRAME>",
"diagnostics-host-ruler-slider-active": "<COLOR_HOTLIGHT>",
"diagnostics-host-ruler-tickmark": "<COLOR_WINDOWFRAME>",
"diagnostics-host-swimlane-border": "<COLOR_WINDOWFRAME>",

"plugin-memory-drop-down-button": "<COLOR_BTNFACE>",
"plugin-memory-drop-down-button-hover": "<COLOR_HIGHLIGHT>",
"plugin-memory-snapshot-button": "<COLOR_WINDOW>",
"plugin-memory-snapshot-button-active": "<COLOR_HIGHLIGHT>",
"plugin-memory-snapshot-button-active-text": "<COLOR_HIGHLIGHTTEXT>",
"plugin-memory-snapshot-button-border": "<COLOR_INACTIVEBORDER>",
"plugin-memory-snapshot-button-border-active": "<COLOR_ACTIVEBORDER>",
"plugin-memory-snapshot-button-border-hover": "<COLOR_ACTIVEBORDER>",
"plugin-memory-snapshot-button-disabled": "<COLOR_WINDOW>",
"plugin-memory-snapshot-button-disabled-text": "<COLOR_GRAYTEXT>",
"plugin-memory-snapshot-button-hover": "<COLOR_HIGHLIGHT>",
"plugin-memory-snapshot-button-hover-text": "<COLOR_HIGHLIGHTTEXT>",
"plugin-memory-snapshot-diff-added-text": "<COLOR_WINDOWTEXT>",
"plugin-memory-snapshot-diff-modified-text": "<COLOR_WINDOWTEXT>",
"plugin-memory-snapshot-messages-border": "<COLOR_ACTIVEBORDER>",
"plugin-memory-snapshot-tile": "<COLOR_WINDOW>",
"plugin-memory-snapshot-tile-baseline-text": "<COLOR_WINDOWTEXT>",
"plugin-memory-snapshot-tile-border": "<COLOR_ACTIVEBORDER>",
"plugin-memory-snapshot-tile-error-text": "<COLOR_WINDOWTEXT>",
"plugin-memory-snapshot-tile-header": "<COLOR_WINDOW>",
"plugin-memory-tab-header": "<COLOR_WINDOW>",
"plugin-memory-tab-text": "<COLOR_GRAYTEXT>",
"plugin-memory-tab-hover": "<COLOR_HIGHLIGHT>",
"plugin-memory-tab-hover-text": "<COLOR_HIGHLIGHTTEXT>",

"plugin-perftools-detail-pane": "<COLOR_WINDOW>",
"plugin-perftools-drop-down-button-focus": "<COLOR_HIGHLIGHT>",
"plugin-perftools-drop-down-button-focus-border": "<COLOR_ACTIVEBORDER>",
"plugin-perftools-focusdots": "<COLOR_HIGHLIGHT>",
"plugin-perftools-grid-column-sizer": "<COLOR_WINDOWFRAME>",
"plugin-perftools-grid-border-color": "<COLOR_WINDOWTEXT>",
"plugin-perftools-grid-header-hover": "<COLOR_HIGHLIGHT>",
"plugin-perftools-grid-header-hover-text": "<COLOR_HIGHLIGHTTEXT>",
"plugin-perftools-grid-header-text": "<COLOR_WINDOWTEXT>",
"plugin-perftoots-grid-groupline-color": "<COLOR_HOTLIGHT>",
"plugin-perftools-list-item-selected-active-background-color":"<COLOR_HOTLIGHT>",
"plugin-perftools-menu": "<COLOR_MENU>",
"plugin-perftools-menu-border": "<COLOR_ACTIVEBORDER>",
"plugin-perftools-menu-drop-shadow": "<COLOR_WINDOWFRAME>",
"plugin-perftools-menu-focus": "<COLOR_HIGHLIGHT>",
"plugin-perftools-menu-focus-text": "<COLOR_HIGHLIGHTTEXT>",
"plugin-perftools-menu-hover": "<COLOR_HIGHLIGHT>",
"plugin-perftools-menu-hover-text": "<COLOR_HIGHLIGHTTEXT>",
"plugin-perftools-progress": "<COLOR_HIGHLIGHT>",
"plugin-perftools-splitter": "<COLOR_WINDOWFRAME>",
"plugin-perftools-treeview-content-mouseover-background-color": "<COLOR_HIGHLIGHT>",
"plugin-perftools-treeview-content-mouseover-color": "<COLOR_HIGHLIGHTTEXT>",
"plugin-perftools-treeview-content-selected-background-color": "<COLOR_HIGHLIGHT>",
"plugin-perftools-treeview-content-selected-color": "<COLOR_HIGHLIGHTTEXT>",
"plugin-perftools-watermark-text": "<COLOR_GRAYTEXT>",

"plugin-responsiveness-drop-down-button-hover": "<COLOR_HIGHLIGHT>",
"plugin-responsiveness-graph-border": "<COLOR_WINDOWFRAME>",

"plugin-subheading-color": "<COLOR_WINDOWTEXT>",

"plugin-font-console": "\"Consolas\"",
"plugin-font-console-color": "<COLOR_WINDOWTEXT>",
"plugin-font-console-background-color": "<COLOR_WINDOW>",
"plugin-font-console-output-color": "<COLOR_WINDOWTEXT>",
"plugin-font-console-output-background-color": "<COLOR_WINDOW>",
"plugin-font-console-input-color": "<COLOR_WINDOWTEXT>",
"plugin-font-console-input-background-color": "<COLOR_WINDOW>",
"plugin-font-console-inputarea-color": "<COLOR_WINDOWTEXT>",
"plugin-font-console-inputarea-background-color": "<COLOR_WINDOW>",
"plugin-font-console-info-color": "<COLOR_WINDOWTEXT>",
"plugin-font-console-info-background-color": "<COLOR_WINDOW>",
"plugin-font-console-warning-color": "<COLOR_WINDOWTEXT>",
"plugin-font-console-warning-background-color": "<COLOR_WINDOW>",
"plugin-font-console-error-color": "<COLOR_WINDOWTEXT>",
"plugin-font-console-error-background-color": "<COLOR_WINDOW>",

"plugin-font-editor": "\"Consolas\"",
"plugin-font-editor-color": "<COLOR_WINDOWTEXT>",
"plugin-font-editor-background-color": "<COLOR_WINDOW>",
"plugin-font-editor-selected-background-color": "<COLOR_HOTLIGHT>",
"plugin-font-editor-selected-border-color": "<COLOR_HOTLIGHT>",
"plugin-font-editor-collapse-adornment-color": "<COLOR_HOTLIGHT>",
"plugin-font-editor-keyword-color": "<COLOR_WINDOWTEXT>",
"plugin-font-editor-keyword-background-color": "<COLOR_WINDOW>",
"plugin-font-editor-string-color": "<COLOR_WINDOWTEXT>",
"plugin-font-editor-string-background-color": "<COLOR_WINDOW>",
"plugin-font-editor-number-color": "<COLOR_WINDOWTEXT>",
"plugin-font-editor-number-background-color": "<COLOR_WINDOW>",
"plugin-font-editor-regexp-color": "<COLOR_WINDOWTEXT>",
"plugin-font-editor-regexp-background-color": "<COLOR_WINDOW>",
"plugin-font-editor-symbol-color": "<COLOR_WINDOWTEXT>",
"plugin-font-editor-symbol-background-color": "<COLOR_WINDOW>",
"plugin-font-editor-identifier-color": "<COLOR_WINDOWTEXT>",
"plugin-font-editor-literal-color": "<COLOR_WINDOWTEXT>",
"plugin-font-editor-comment-color": "<COLOR_WINDOWTEXT>",
"plugin-font-editor-html-tag-color": "<COLOR_WINDOWTEXT>",
"plugin-font-editor-html-tag-background-color": "<COLOR_WINDOW>",
"plugin-font-editor-html-element-color": "<COLOR_WINDOWTEXT>",
"plugin-font-editor-html-element-background-color": "<COLOR_WINDOW>",
"plugin-font-editor-html-comment-color": "<COLOR_WINDOWTEXT>",
"plugin-font-editor-html-comment-background-color": "<COLOR_WINDOW>",
"plugin-font-editor-html-attribute-name-color": "<COLOR_WINDOWTEXT>",
"plugin-font-editor-html-attribute-name-background-color": "<COLOR_WINDOW>",
"plugin-font-editor-html-attribute-value-color": "<COLOR_WINDOWTEXT>",
"plugin-font-editor-html-attribute-value-background-color": "<COLOR_WINDOW>",
"plugin-font-editor-html-operator-color": "<COLOR_WINDOWTEXT>",
"plugin-font-editor-html-operator-background-color": "<COLOR_WINDOW>",
"plugin-font-editor-css-name-color": "<COLOR_WINDOWTEXT>",
"plugin-font-editor-css-name-background-color": "<COLOR_WINDOW>",
"plugin-font-editor-css-value-color": "<COLOR_WINDOWTEXT>",
"plugin-font-editor-css-value-background-color": "<COLOR_WINDOW>",
"plugin-font-editor-css-selector-color": "<COLOR_WINDOWTEXT>",
"plugin-font-editor-css-selector-background-color": "<COLOR_WINDOW>",
"plugin-font-editor-margin-color": "<COLOR_WINDOWTEXT>",
"plugin-font-editor-margin-background-color": "<COLOR_WINDOW>",
"plugin-font-editor-instruction-pointer-background-color": "<COLOR_HIGHLIGHT>",
"plugin-font-editor-breakpoint-background-color": "<COLOR_INACTIVECAPTIONTEXT>",
"plugin-font-editor-erroradornment-color": "<COLOR_WINDOW>",
"plugin-font-editor-erroradornment-background-color": "<COLOR_WINDOWTEXT>",
"plugin-font-editor-search-result-background-color": "<COLOR_ACTIVECAPTION>",
"plugin-font-editor-current-statement-color": "<COLOR_WINDOWTEXT>",
"plugin-font-editor-current-statement-background-color": "<COLOR_WINDOW>",
"plugin-font-editor-text-spotlight-background-color": "<COLOR_HIGHLIGHT>",

"plugin-editor-scrollbar-marker-instruction-pointer-color" : "<COLOR_WINDOWTEXT>",
"plugin-editor-scrollbar-marker-breakpoint-color" : "<COLOR_WINDOWTEXT>",
"plugin-editor-scrollbar-marker-active-frame-color" : "<COLOR_WINDOWTEXT>",
"plugin-editor-scrollbar-marker-search-result-color" : "<COLOR_WINDOWTEXT>",
"plugin-editor-selected-text-focus-background-color" : "<COLOR_WINDOW>",
"plugin-editor-selected-text-background-color" : "<COLOR_WINDOW>",

"plugin-debugger-grid-row-hover-background-color" : "<COLOR_WINDOW>",
"plugin-debugger-grid-row-selected-background-color" : "<COLOR_WINDOWTEXT>",
"plugin-debugger-grid-active-splitter-color": "<COLOR_WINDOWTEXT>",
"plugin-debugger-tab-color" : "<COLOR_WINDOWTEXT>",
"plugin-debugger-tab-area-background-color" : "<COLOR_WINDOW>",
"plugin-debugger-button-active-background-color" : "<COLOR_WINDOW>",
"plugin-debugger-button-toggled-on-background-color" : "<COLOR_WINDOW>",
"plugin-debugger-button-toggled-on-border-color" : "<COLOR_HOTLIGHT>",
"plugin-debugger-watch-font-color" : "<COLOR_WINDOWTEXT>",
"plugin-debugger-watch-overlay-color" : "#888888",
"plugin-debugger-filepicker-background-color" : "<COLOR_WINDOW>",
"plugin-debugger-document-toolbar-seperator-color" : "<COLOR_WINDOWTEXT>",

"plugin-tab-header-background-color": "<COLOR_BTNSHADOW>",
"plugin-tab-header-active-background-color": "<COLOR_WINDOW>",
"plugin-tab-header-hover-background-color": "<COLOR_HIGHLIGHT>",
"plugin-tab-header-color": "<COLOR_BTNTEXT>",
"plugin-tab-header-active-color": "<COLOR_WINDOWTEXT>",
"plugin-tab-header-hover-color": "<COLOR_BTNFACE>",

"plugin-breadcrumb-border-color": "<COLOR_WINDOWTEXT>",
"plugin-breadcrumb-background-color": "<COLOR_WINDOW>",
"plugin-breadcrumb-hover-color": "<COLOR_WINDOW>",
"plugin-breadcrumb-hover-background-color": "<COLOR_HOTLIGHT>",
"plugin-breadcrumb-selected-color": "<COLOR_WINDOW>",
"plugin-breadcrumb-selected-background-color": "<COLOR_HIGHLIGHT>",
"plugin-breadcrumb-tooltip-color": "<COLOR_WINDOWTEXT>",
"plugin-breadcrumb-tooltip-background-color": "<COLOR_WINDOW>",
"plugin-breadcrumb-tooltip-border-color": "<COLOR_HOTLIGHT>",

"plugin-network-grid-border-color": "<COLOR_WINDOWTEXT>",
"plugin-network-grid-cell-even-background-color": "<COLOR_WINDOW>",
"plugin-network-grid-cell-odd-background-color": "<COLOR_WINDOW>",
"plugin-network-grid-column-header-background-color": "<COLOR_WINDOW>",
"plugin-network-grid-path-color": "<COLOR_WINDOWTEXT>",
"plugin-network-grid-path-color-highlighted": "<COLOR_HIGHLIGHTTEXT>",
"plugin-network-grid-path-color-selected": "<COLOR_HIGHLIGHTTEXT>",
"plugin-network-grid-response-blur-cache-color": "<COLOR_HIGHLIGHTTEXT>",
"plugin-network-grid-response-blur-error-color": "<COLOR_HIGHLIGHTTEXT>",
"plugin-network-grid-response-cache-color": "<COLOR_WINDOWTEXT>",
"plugin-network-grid-response-error-color": "<COLOR_HIGHLIGHTTEXT>",
"plugin-network-grid-response-selected-cache-color": "<COLOR_HIGHLIGHTTEXT>",
"plugin-network-grid-response-selected-error-color": "<COLOR_HIGHLIGHTTEXT>",
"plugin-network-splitter": "<COLOR_BTNSHADOW>",
"plugin-network-tabpane-key-color": "<COLOR_WINDOWTEXT>",
"plugin-network-tabpane-value-color": "<COLOR_WINDOWTEXT>",
"plugin-network-toolbar-button-hover-text-color": "<COLOR_HIGHLIGHTTEXT>",
"plugin-network-toolbar-button-popup-text-color": "<COLOR_HIGHLIGHTTEXT>",
"plugin-network-toolbar-button-pressed-text-color": "<COLOR_BTNTEXT>",
"plugin-network-toolbar-button-text-color": "<COLOR_HIGHLIGHTTEXT>",

"plugin-resources-grid-cell-even-background-color": "<COLOR_WINDOW>",
"plugin-resources-grid-cell-odd-background-color": "<COLOR_WINDOW>",
"plugin-resources-grid-hborder": "<COLOR_HIGHLIGHT>",
"plugin-resources-grid-vborder": "<COLOR_HIGHLIGHT>",
"plugin-resources-grid-header-hborder": "<COLOR_HIGHLIGHT>",
"plugin-resources-grid-active-cell-background": "<COLOR_HOTLIGHT>",
"plugin-resources-grid-active-cell-border": "<COLOR_HOTLIGHT>",
"plugin-resources-grid-active-row-background": "<COLOR_WINDOW>",
"plugin-resources-grid-editable-cell-background": "<COLOR_WINDOW>",

"plugin-theme-color": "#FFFF00",

"plugin-experiment-switch-inner-before-background-color": "<COLOR_WINDOW>",
"plugin-experiment-switch-inner-after-background-color": "<COLOR_WINDOW>",
"plugin-experiment-switch-inner-after-color": "<COLOR_WINDOW>",
"plugin-experiment-on-off-switch-border-color": "<COLOR_WINDOWFRAME>",
"plugin-experiment-on-off-switch-color": "<COLOR_WINDOWTEXT>",

"monaco-gotoline-background-color": "<COLOR_WINDOW>",
"monaco-gotoline-focused-background-color": "<COLOR_WINDOW>",
"monaco-gotoline-selected-background-color": "<COLOR_WINDOW>",
"monaco-gotoline-hover-background-color": "<COLOR_WINDOW>"
}
/* 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


IHDR00`�	�	pHYs���+'PLTE�!�!�!�!�!�!�!�!�!�!�!������CtRNS 0@`�����Q�R� cHRMz%������u0�`:�o�_�F�IDATx���I� DQ�$����y��� Ak����
LyY�3/�	V~|�.��	����
�Dx�9b+�	>���r�9g�8�"�E0!b��`HD-�9P"�L�&0�h2� v;P�7�@%�Q c�b�pdh|�9�`��(b���D��Z�!T��	��&�.B�"#8�
�D��~��͊s����T/s�3FIEND�B`��PNG


IHDR00W��	pHYs���+_IDATx����q�P�a�<�A3
{�t�ЃJ`wv4�������
ģ3�R�'s/U5�v*-�L�� G�S �`�)�*?Y=@�s$�B/�E�9���"B�I��fąH�
I6 .��a��7�ڲ5F��l��`T!�5d�zK\ .�vė��ѣ����"��&H1<' ��.��č��8 ø,`����էz0/H�=�����"�L�@����/`i(`�C��
侀�P@�P30`~2�?������D����-������s󏔦�����2=�hzp���	����I>Ӭ��n��e>����8u8&]IEND�B`�#mainContainer {
    background-color: TRANSPARENT; /*[{plugin-background-color}]*/
    font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/
    cursor: default;
    overflow: auto;
}

.title {
    height: 36px;
}

.experimentsSection {
    font-size: 13px;
    margin-left: 14px;
}

    .experimentsSection h1 {
        font-size: 14px;
        font-weight: 600;
    }

    .experimentsSection .infoText {
        color: TRANSPARENT; /*[{plugin-styles-deleted-item-color}]*/
    }

    .experimentsSection .footerText {
        font-size: 12px;
        color: TRANSPARENT; /*[{plugin-styles-deleted-item-color}]*/
    }

    .experimentsSection .experimentRow {
        display: table;
        table-layout: fixed;
        width: 100%;
        height: 36px;
    }

    .experimentsSection .experimentName {
        display: table-cell;
        width: 244px;
    }

    .experimentsSection .experimentToggle {
        display: table-cell;
        text-align: center;
        vertical-align: top;
        width: 46px;
    }

    .experimentsSection .experimentState {
        display: table-cell;
        padding-left: 12px;
    }

#rule {
    width: 364px;
    background-color: TRANSPARENT; /*[{plugin-styles-deleted-item-color}]*/
    height: 1px;
    border: 0;
    text-align: left;
}

.onoffswitch {
    position: relative;
    width: 46px;
    -ms-user-select: none;
}

.onoffswitch-checkbox {
    display: none;
}

.onoffswitch-label {
    display: block;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid;
    border-color: TRANSPARENT; /*[{plugin-experiment-on-off-switch-border-color}]*/
    border-radius: 0px;
}

.onoffswitch-inner {
    display: block;
    width: 200%;
    margin-left: -100%;
    transition: margin 0.3s ease-in 0s;
}

    .onoffswitch-inner:before, .onoffswitch-inner:after {
        display: block;
        float: left;
        width: 50%;
        height: 13px;
        padding: 0;
        line-height: 9px;
        font-size: 14px;
        color: white;
        font-family: Trebuchet, Arial, sans-serif;
        font-weight: bold;
        box-sizing: border-box;
        background-clip: padding-box;
    }

    .onoffswitch-inner:before {
        content: "";
        padding-left: 10px;
        background-color: TRANSPARENT; /*[{plugin-experiment-switch-inner-before-background-color}]*/
        color: TRANSPARENT; /*[{plugin-color}]*/
    }

    .onoffswitch-inner:after {
        content: "";
        padding-right: 10px;
        background-color: TRANSPARENT; /*[{plugin-experiment-switch-inner-after-background-color}]*/
        color: TRANSPARENT; /*[{plugin-experiment-switch-inner-after-color}]*/
        text-align: right;
    }

.onoffswitch-switch {
    display: block;
    width: 9px;
    margin: 0px;
    background: TRANSPARENT; /*[{plugin-experiment-on-off-switch-color}]*/
    position: absolute;
    top: 0;
    bottom: 0;
    right: 37px;
    transition: all 0.3s ease-in 0s;
}

.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
    margin-left: 0;
}

.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
    right: 0px;
}
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=11" />
    <meta http-equiv="format-detection" content="telephone=no">
    <title>Experiments</title>

    <link rel="stylesheet" type="text/css" href="experiments.css" data-plugin-theme="true" />

    <!-- Daytona Includes -->
    <script type="text/javascript" src="../Common/isDebugBuild.js"></script>
    <script type="text/javascript" src="../common/plugin.js"></script>

    <script type="text/javascript" src="../Common/CommonMinimal.js"></script>
    <script type="text/javascript" src="ExperimentsMerged.js"></script>

    <script type="text/javascript">
        // The main entry point
        document.addEventListener("DOMContentLoaded", function () {
            F12.Host.Experiments.App.main();
        });
    </script>
</head>

<body>
    <div id="mainContainer">
        <div class="experimentsSection" tabindex="-1">
            <div class="title">
                <h1><label id="experimentsLabel"></label></h1>
            </div>
            
            <!-- JS editing -->

            <div class="experimentRow">
                <div class="experimentName">
                    <label id="jsEditLabel"></label>
                </div>
                <div class="experimentToggle">
                    <div class="onoffswitch" tabindex="0" id="jsEditSwitchDiv">
                        <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="jsEditSwitch" />
                        <label class="onoffswitch-label" for="jsEditSwitch">
                            <span class="onoffswitch-inner"></span>
                            <span class="onoffswitch-switch"></span>
                        </label>
                    </div>
                </div>
                <div class="experimentState">
                    <label id="jsEditStateLabel" class="infoText"></label>
                </div>
            </div>

            <hr id="rule" />
            <div class="footerText"><a id="moreInformationLink" tabindex="0"></a></div>
        </div>
    </div>
</body>
</html>var F12;(function(n){var t;(function(n){var t;(function(n){"use strict";var t=Microsoft.Plugin,i=function(){function i(){}return i.main=function(){t.addEventListener("pluginready",function(){i.Experiment=new n.ExperimentsWindow});Common.ErrorHandling.addPromiseErrorListener()},i}();n.App=i})(t=n.Experiments||(n.Experiments={}))})(t=n.Host||(n.Host={}))})(F12||(F12={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=Microsoft.Plugin,r=function(){function r(){var n=this;this._experimentsLabel=document.getElementById("experimentsLabel");this._jsEditLabel=document.getElementById("jsEditLabel");this._jsToggle=document.getElementById("jsEditSwitch");this._jsEditStateLabel=document.getElementById("jsEditStateLabel");this._moreInfoLink=document.getElementById("moreInformationLink");this._enabledLabelText=i.Resources.getString("EnabledLabel");this._disabledLabelText=i.Resources.getString("DisabledLabel");this._experimentsLabel.textContent=i.Resources.getString("ExperimentsPluginTitle");this._jsEditLabel.textContent=i.Resources.getString("JSEditLabel");this._moreInfoLink.innerText=i.Resources.getString("MoreInformationLabel");this._moreInfoLink.setAttribute("data-plugin-vs-tooltip",t.ExperimentsWindow.MORE_INFO_LINK);this._moreInfoLink.addEventListener("click",function(){return n.onMoreInfoClicked()});this._jsToggle.checked=Common.FeatureAvailability.isEnabled(0);t.Telemetry.analytics.log(t.Telemetry.TelemetryEventName.EXPERIMENTS_LOAD_SETTINGS,{EditJs:this._jsToggle.checked});this._jsEditStateLabel.textContent=Common.FeatureAvailability.isEnabled(0)?this._enabledLabelText:this._disabledLabelText;this._jsToggle.addEventListener("change",function(){return n.onExperimentStateChange(0,t.Telemetry.CommandName.TOGGLE_EDIT_JS,0)})}return r.prototype.onExperimentStateChange=function(r,u,f){var e,o;t.Telemetry.analytics.logExecuteCommand(u,f);e=Common.FeatureAvailability.isEnabled(r);switch(r){case 0:this._jsEditStateLabel.textContent=e?this._disabledLabelText:this._enabledLabelText;break;default:n.Tools.Utility.Assert.fail("Cannot switch the label for the experiment: "+r.toString())}o=!e&&i.F12.isTargetEdge;Common.FeatureAvailability.setEnabledState(r,o,!0)},r.prototype.onMoreInfoClicked=function(){i.F12.openBrowser(t.ExperimentsWindow.MORE_INFO_LINK)},r.FWLINK_PREFIX="http://go.microsoft.com/fwlink/?LinkID=",r.MORE_INFO_LINK=r.FWLINK_PREFIX+"526245",r}();t.ExperimentsWindow=r})(i=t.Experiments||(t.Experiments={}))})(t=n.Host||(n.Host={}))}(F12||(F12={}));
//! Copyright (C) Microsoft. All rights reserved.
(function(n){var t;(function(n){var t;(function(n){var t;(function(n){"use strict";var i=function(){function n(){}return n.TOGGLE_EDIT_JS="ToggleEditJs",n}(),t;n.CommandName=i;t=function(){function n(){}return n.EXPERIMENTS_LOAD_SETTINGS="ExperimentsLoadSettings",n}();n.TelemetryEventName=t;n.analytics=new Common.F12AnalyticsProxy(Common.ToolName.EXPERIMENTS)})(t=n.Telemetry||(n.Telemetry={}))})(t=n.Experiments||(n.Experiments={}))})(t=n.Host||(n.Host={}))})(F12||(F12={}))
//# sourceMappingURL=ExperimentsMerged.min.js.map
{
    "start_url": "experiments.html",
    "domain": "http://microsoft.com",
    "name": "Experiments",
    "version": "1.0",
    "f12": {
        "localized_tab_resource": "ExperimentsPluginTitle",
        "localized_tooltip_id": 10017,
        "resource_aliases": {
            "Experiments": {
                "is_default": true
            },
            "Common": {
            }
        },
        "themed_images": {

        },
        "theme_token_aliases": {
            "plugin-experiment-switch-inner-before-background-color": {
                "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891",
                "key_type": "BackgroundColor",
                "name": "Plain Text"
            },
            "plugin-experiment-switch-inner-after-background-color": {
                "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891",
                "key_type": "BackgroundColor",
                "name": "Plain Text"
            },
            "plugin-experiment-switch-inner-after-color": {
                "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891",
                "key_type": "ForegroundColor",
                "name": "Plain Text"
            },
            "plugin-experiment-on-off-switch-color": {
                "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891",
                "key_type": "ForegroundColor",
                "name": "Plain Text"
            }
        }
    }
}������r ������~�w��F�x��~J������MUIMUIen-US$<0H0P0�0�2303?3H3Q3f3{3�300